From 2a4bb7ef2cd48142ee099e01678a4093340a140a Mon Sep 17 00:00:00 2001 From: Miguel Date: Sat, 10 Apr 2021 13:21:58 +0200 Subject: [PATCH 001/428] Moved phpy pseudo lang functions to separate file --- grammar/phpyLang.php | 192 +++++++++++++++++++++++++++++++++++++ grammar/rebuildParsers.php | 192 ++----------------------------------- 2 files changed, 198 insertions(+), 186 deletions(-) create mode 100644 grammar/phpyLang.php diff --git a/grammar/phpyLang.php b/grammar/phpyLang.php new file mode 100644 index 0000000000..1a9808dcf5 --- /dev/null +++ b/grammar/phpyLang.php @@ -0,0 +1,192 @@ +\'[^\\\\\']*+(?:\\\\.[^\\\\\']*+)*+\') + (?"[^\\\\"]*+(?:\\\\.[^\\\\"]*+)*+") + (?(?&singleQuotedString)|(?&doubleQuotedString)) + (?/\*[^*]*+(?:\*(?!/)[^*]*+)*+\*/) + (?\{[^\'"/{}]*+(?:(?:(?&string)|(?&comment)|(?&code)|/)[^\'"/{}]*+)*+}) +)'; + +const PARAMS = '\[(?[^[\]]*+(?:\[(?¶ms)\][^[\]]*+)*+)\]'; +const ARGS = '\((?[^()]*+(?:\((?&args)\)[^()]*+)*+)\)'; + +/////////////////////////////// +/// Preprocessing functions /// +/////////////////////////////// + +function preprocessGrammar($code) { + $code = resolveNodes($code); + $code = resolveMacros($code); + $code = resolveStackAccess($code); + + return $code; +} + +function resolveNodes($code) { + return preg_replace_callback( + '~\b(?[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\()(?[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 ('makeNop' === $name) { + assertArgs(3, $args, $name); + + return '$startAttributes = ' . $args[1] . ';' + . ' if (isset($startAttributes[\'comments\']))' + . ' { ' . $args[0] . ' = new Stmt\Nop($startAttributes + ' . $args[2] . '); }' + . ' else { ' . $args[0] . ' = null; }'; + } + + if ('makeZeroLengthNop' == $name) { + assertArgs(2, $args, $name); + + return '$startAttributes = ' . $args[1] . ';' + . ' if (isset($startAttributes[\'comments\']))' + . ' { ' . $args[0] . ' = new Stmt\Nop($this->createCommentNopAttributes($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 ('prependLeadingComments' === $name) { + assertArgs(1, $args, $name); + + return '$attrs = $this->startAttributeStack[#1]; $stmts = ' . $args[0] . '; ' + . 'if (!empty($attrs[\'comments\'])) {' + . '$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); +} + +////////////////////////////// +/// 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/grammar/rebuildParsers.php b/grammar/rebuildParsers.php index 88a53f1334..2d0c6b14d3 100644 --- a/grammar/rebuildParsers.php +++ b/grammar/rebuildParsers.php @@ -1,5 +1,7 @@ 'Php5', __DIR__ . '/php7.y' => 'Php7', @@ -23,21 +25,6 @@ $optionDebug = isset($options['--debug']); $optionKeepTmpGrammar = isset($options['--keep-tmp-grammar']); -/////////////////////////////// -/// Utility regex constants /// -/////////////////////////////// - -const LIB = '(?(DEFINE) - (?\'[^\\\\\']*+(?:\\\\.[^\\\\\']*+)*+\') - (?"[^\\\\"]*+(?:\\\\.[^\\\\"]*+)*+") - (?(?&singleQuotedString)|(?&doubleQuotedString)) - (?/\*[^*]*+(?:\*(?!/)[^*]*+)*+\*/) - (?\{[^\'"/{}]*+(?:(?:(?&string)|(?&comment)|(?&code)|/)[^\'"/{}]*+)*+}) -)'; - -const PARAMS = '\[(?[^[\]]*+(?:\[(?¶ms)\][^[\]]*+)*+)\]'; -const ARGS = '\((?[^()]*+(?:\((?&args)\)[^()]*+)*+)\)'; - /////////////////// /// Main script /// /////////////////// @@ -49,10 +36,7 @@ $grammarCode = file_get_contents($grammarFile); $grammarCode = str_replace('%tokens', $tokens, $grammarCode); - - $grammarCode = resolveNodes($grammarCode); - $grammarCode = resolveMacros($grammarCode); - $grammarCode = resolveStackAccess($grammarCode); + $grammarCode = preprocessGrammar($grammarCode); file_put_contents($tmpGrammarFile, $grammarCode); @@ -77,151 +61,9 @@ } } -/////////////////////////////// -/// Preprocessing functions /// -/////////////////////////////// - -function resolveNodes($code) { - return preg_replace_callback( - '~\b(?[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\()(?[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 ('makeNop' === $name) { - assertArgs(3, $args, $name); - - return '$startAttributes = ' . $args[1] . ';' - . ' if (isset($startAttributes[\'comments\']))' - . ' { ' . $args[0] . ' = new Stmt\Nop($startAttributes + ' . $args[2] . '); }' - . ' else { ' . $args[0] . ' = null; }'; - } - - if ('makeZeroLengthNop' == $name) { - assertArgs(2, $args, $name); - - return '$startAttributes = ' . $args[1] . ';' - . ' if (isset($startAttributes[\'comments\']))' - . ' { ' . $args[0] . ' = new Stmt\Nop($this->createCommentNopAttributes($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 ('prependLeadingComments' === $name) { - assertArgs(1, $args, $name); - - return '$attrs = $this->startAttributeStack[#1]; $stmts = ' . $args[0] . '; ' - . 'if (!empty($attrs[\'comments\'])) {' - . '$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); -} +//////////////////////////////// +/// Utility helper functions /// +//////////////////////////////// function ensureDirExists($dir) { if (!is_dir($dir)) { @@ -237,25 +79,3 @@ function execCmd($cmd) { } return $output; } - -////////////////////////////// -/// 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; -} From f767b9fd9f9b7c2f411ca6f28e3bdf06e66a1754 Mon Sep 17 00:00:00 2001 From: "Iskander (Alex) Sharipov" Date: Sun, 25 Apr 2021 13:15:40 +0300 Subject: [PATCH 002/428] ParserAbstract: add missing '*' to the phpdoc Otherwise, it's somewhat incompatible with the phpdoc definition. --- lib/PhpParser/ParserAbstract.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 3ff474264e..b7a9d1b866 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -60,7 +60,7 @@ abstract class ParserAbstract implements Parser /** @var int[] 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. */ + * action is defaulted, i.e. $actionDefault[$state] should be used instead. */ protected $actionBase; /** @var int[] Table of actions. Indexed according to $actionBase comment. */ protected $action; From f68e1a43ff3994e674458574f0d3f577a9a6f2b1 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 25 Apr 2021 21:11:36 +0200 Subject: [PATCH 003/428] [PHP 8.1] Add support for enums (#758) RFC: https://wiki.php.net/rfc/enumerations Co-authored-by: Nikita Popov --- .editorconfig | 9 + grammar/php7.y | 16 +- grammar/tokens.y | 1 + lib/PhpParser/Node/Stmt/Class_.php | 2 +- lib/PhpParser/Node/Stmt/EnumCase.php | 37 + lib/PhpParser/Node/Stmt/Enum_.php | 40 + lib/PhpParser/Parser/Php5.php | 12 +- lib/PhpParser/Parser/Php7.php | 2231 +++++++++-------- lib/PhpParser/Parser/Tokens.php | 56 +- lib/PhpParser/ParserAbstract.php | 47 +- lib/PhpParser/PrettyPrinter/Standard.php | 14 + lib/PhpParser/PrettyPrinterAbstract.php | 11 +- test/code/formatPreservation/enum.test | 100 + test/code/parser/stmt/class/enum.test | 65 + .../parser/stmt/class/enum_with_string.test | 67 + test/code/prettyPrinter/stmt/enum.test | 39 + 16 files changed, 1585 insertions(+), 1162 deletions(-) create mode 100644 .editorconfig create mode 100644 lib/PhpParser/Node/Stmt/EnumCase.php create mode 100644 lib/PhpParser/Node/Stmt/Enum_.php create mode 100644 test/code/formatPreservation/enum.test create mode 100644 test/code/parser/stmt/class/enum.test create mode 100644 test/code/parser/stmt/class/enum_with_string.test create mode 100644 test/code/prettyPrinter/stmt/enum.test diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..9c76d07083 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*.y] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 4 diff --git a/grammar/php7.y b/grammar/php7.y index 4ca244d8a6..e85c1c71ca 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -28,7 +28,7 @@ reserved_non_modifiers: | 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 | T_FN - | T_MATCH + | T_MATCH | T_ENUM ; semi_reserved: @@ -356,6 +356,18 @@ class_declaration_statement: $this->checkInterface($$, #3); } | optional_attributes T_TRAIT identifier '{' class_statement_list '}' { $$ = Stmt\Trait_[$3, ['stmts' => $5, 'attrGroups' => $1]]; } + | optional_attributes T_ENUM identifier enum_scalar_type implements_list '{' class_statement_list '}' + { $$ = Stmt\Enum_[$3, ['scalarType' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]]; + $this->checkEnum($$, #3); } +; + +enum_scalar_type: + /* empty */ { $$ = null; } + | ':' type { $$ = $2; } + +enum_case_expr: + /* empty */ { $$ = null; } + | '=' expr { $$ = $2; } ; class_entry_type: @@ -637,6 +649,8 @@ class_statement: { $$ = Stmt\ClassMethod[$5, ['type' => $2, 'byRef' => $4, 'params' => $7, 'returnType' => $9, 'stmts' => $10, 'attrGroups' => $1]]; $this->checkClassMethod($$, #2); } | T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; } + | optional_attributes T_CASE identifier enum_case_expr semi + { $$ = Stmt\EnumCase[$3, $4, $1]; } | error { $$ = null; /* will be skipped */ } ; diff --git a/grammar/tokens.y b/grammar/tokens.y index d2c2b7205d..1ce52f93fd 100644 --- a/grammar/tokens.y +++ b/grammar/tokens.y @@ -83,6 +83,7 @@ %token T_CLASS %token T_TRAIT %token T_INTERFACE +%token T_ENUM %token T_EXTENDS %token T_IMPLEMENTS %token T_OBJECT_OPERATOR diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index ace266f74b..0f35fe0863 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -32,7 +32,7 @@ class Class_ extends ClassLike * 'extends' => null : Name of extended class * 'implements' => array(): Names of implemented interfaces * 'stmts' => array(): Statements - * '$attrGroups' => array(): PHP attribute groups + * 'attrGroups' => array(): PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/EnumCase.php b/lib/PhpParser/Node/Stmt/EnumCase.php new file mode 100644 index 0000000000..5beff8b39f --- /dev/null +++ b/lib/PhpParser/Node/Stmt/EnumCase.php @@ -0,0 +1,37 @@ +name = \is_string($name) ? new Node\Identifier($name) : $name; + $this->expr = $expr; + $this->attrGroups = $attrGroups; + } + + public function getSubNodeNames() : array { + return ['attrGroups', 'name', 'expr']; + } + + public function getType() : string { + return 'Stmt_EnumCase'; + } +} diff --git a/lib/PhpParser/Node/Stmt/Enum_.php b/lib/PhpParser/Node/Stmt/Enum_.php new file mode 100644 index 0000000000..3a50c225db --- /dev/null +++ b/lib/PhpParser/Node/Stmt/Enum_.php @@ -0,0 +1,40 @@ + null : Scalar type + * 'implements' => array() : Names of implemented interfaces + * 'stmts' => array() : Statements + * 'attrGroups' => array() : PHP attribute groups + * @param array $attributes Additional attributes + */ + public function __construct($name, array $subNodes = [], array $attributes = []) { + $this->name = \is_string($name) ? new Node\Identifier($name) : $name; + $this->scalarType = $subNodes['scalarType'] ?? null; + $this->implements = $subNodes['implements'] ?? []; + $this->stmts = $subNodes['stmts'] ?? []; + $this->attrGroups = $subNodes['attrGroups'] ?? []; + + parent::__construct($attributes); + } + + public function getSubNodeNames() : array { + return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts']; + } + + public function getType() : string { + return 'Stmt_Enum'; + } +} diff --git a/lib/PhpParser/Parser/Php5.php b/lib/PhpParser/Parser/Php5.php index 331adb6791..39cdbcc30f 100644 --- a/lib/PhpParser/Parser/Php5.php +++ b/lib/PhpParser/Parser/Php5.php @@ -193,9 +193,9 @@ class Php5 extends \PhpParser\ParserAbstract "'`'", "']'", "'\"'", + "T_ENUM", "T_NULLSAFE_OBJECT_OPERATOR", - "T_ATTRIBUTE", - "T_ENUM" + "T_ATTRIBUTE" ); protected $tokenToSymbol = array( @@ -235,10 +235,10 @@ class Php5 extends \PhpParser\ParserAbstract 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, 163, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 164, 165 + 124, 125, 126, 127, 128, 163, 129, 130, 131, 164, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 165 ); protected $action = array( diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 3d09a65804..e7bb199667 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -18,16 +18,16 @@ class Php7 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 393; - protected $actionTableSize = 1162; - protected $gotoTableSize = 588; + protected $actionTableSize = 1178; + protected $gotoTableSize = 582; protected $invalidSymbol = 166; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 397; - protected $numNonLeafStates = 688; + protected $YY2TBLSTATE = 401; + protected $numNonLeafStates = 700; protected $symbolToName = array( "EOF", @@ -159,6 +159,7 @@ class Php7 extends \PhpParser\ParserAbstract "T_CLASS", "T_TRAIT", "T_INTERFACE", + "T_ENUM", "T_EXTENDS", "T_IMPLEMENTS", "T_OBJECT_OPERATOR", @@ -194,24 +195,23 @@ class Php7 extends \PhpParser\ParserAbstract "')'", "'`'", "'\"'", - "'$'", - "T_ENUM" + "'$'" ); protected $tokenToSymbol = array( 0, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 55, 163, 166, 164, 54, 37, 166, - 160, 161, 52, 49, 8, 50, 51, 53, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 31, 156, + 166, 166, 166, 55, 164, 166, 165, 54, 37, 166, + 161, 162, 52, 49, 8, 50, 51, 53, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, 31, 157, 43, 16, 45, 30, 67, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 69, 166, 157, 36, 166, 162, 166, 166, 166, + 166, 69, 166, 158, 36, 166, 163, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 158, 35, 159, 57, 166, 166, 166, + 166, 166, 166, 159, 35, 160, 57, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, @@ -238,499 +238,504 @@ class Php7 extends \PhpParser\ParserAbstract 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 165 + 154, 155, 156 ); protected $action = array( - 130, 131, 132, 552, 133, 134, 0, 698, 699, 700, - 135, 36, 883, 528, 529,-32766, 1212,-32766,-32766,-32766, - -551, 1145, 772, 889, 430, 431, 1232, -551,-32766,-32766, - -32766, -293,-32766, 1231,-32766, 245,-32766, -189,-32766,-32766, - -32766,-32766,-32766, 458,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32766, 124, 783, 701, 777,-32766, 388, 1024, 1025, - 1026, 1023, 1022, 1021,-32766, 428, 429, 955, 261, 136, - 372, 705, 706, 707, 708, 391, -188, 397, 1024, 1025, - 1026, 1023, 1022, 1021, 709, 710, 711, 712, 713, 714, - 715, 716, 717, 718, 719, 739, 553, 740, 741, 742, - 743, 731, 732, 373, 374, 734, 735, 720, 721, 722, - 724, 725, 726, 333, 765, 766, 767, 768, 769, 727, - 728, 554, 555, 760, 751, 749, 750, 746, 747, 778, - 2, 556, 557, 745, 558, 559, 560, 561, 562, 563, - -542, -548, 19, -502, -542, 748, 564, 565, -548, 137, - -32766,-32766,-32766, 130, 131, 132, 552, 133, 134, 976, - 698, 699, 700, 135, 36,-32766,-32766,-32766,-32766, 675, - -32766,-32766,-32766, 80, 1145, 544, -551,-32766,-32766, 309, - -551,-32766,-32766,-32766, -293,-32766,-32766,-32766, 245,-32766, - -189,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - 31, 433, 429,-32766,-32766, -502, -502, 701, 782,-32766, - 388, 391,-32766,-32766,-32766, 235, 126,-32766, -82, 142, - -502, 261, 136, 372, 705, 706, 707, 708, 247, -188, - 397, 292, -502,-32766, -508,-32766,-32766, 709, 710, 711, - 712, 713, 714, 715, 716, 717, 718, 719, 739, 553, - 740, 741, 742, 743, 731, 732, 373, 374, 734, 735, - 720, 721, 722, 724, 725, 726, 333, 765, 766, 767, - 768, 769, 727, 728, 554, 555, 760, 751, 749, 750, - 746, 747, 294, -82, 556, 557, 745, 558, 559, 560, - 561, 562, 563, 310, 81, 82, 83, -548, 748, 564, - 565, -548, 137, 723, 693, 694, 695, 696, 697,-32766, - 698, 699, 700, 736, 737, 33, 307, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 322, 263,-32766,-32766,-32766, 104, 105, 106, 346, 263, - 952, 951, 950, 107, 350, 438, 439, 701,-32766,-32766, - -32766, 107, -253,-32766, 355,-32766,-32766,-32766,-32766,-32766, - -32766, 702, 703, 704, 705, 706, 707, 708, 452,-32766, - 770,-32766,-32766,-32766,-32766,-32766, 357, 709, 710, 711, - 712, 713, 714, 715, 716, 717, 718, 719, 739, 762, - 740, 741, 742, 743, 731, 732, 733, 761, 734, 735, - 720, 721, 722, 724, 725, 726, 764, 765, 766, 767, - 768, 769, 727, 728, 729, 730, 760, 751, 749, 750, - 746, 747, 619, 24, 738, 744, 745, 752, 753, 755, - 754, 756, 757, 524,-32766,-32766,-32766, 574, 748, 759, - 758, 48, 49, 50, 483, 51, 52, 147, 397, 580, - 408, 53, 54, 409, 55,-32766, 975,-32766,-32766,-32766, - -32766,-32766,-32766,-32767,-32767,-32767,-32767,-32767, 865,-32767, - -32767,-32767,-32767, 99, 100, 101, 102, 103, 1257, 410, - 1172, 1258, 411, 1145, 865, 271, 634, 635, 56, 57, - 148, 808, 1184, 809, 58, 453, 59, 240, 241, 60, - 61, 62, 63, 64, 65, 66, 67, 787, 26, 262, - 68, 412, 484, 121, 667,-32766, 1178, 1179, 485, 1143, - 781, 1147, 1146, 1148, 1176, 40, 23, 486, 1002, 487, - 150, 488, 234, 489, 962, 963, 490, 491, 780, 423, - 424, 42, 43, 413, 417, 415, 865, 44, 492, 151, - 855, 920, 248, 345, 321, 1152, 1147, 1146, 1148, 122, - 781, 493, 494, 495, 152, -330, 855, -330, 127, -505, - 960, 154, 496, 497, 35, 1166, 1167, 1168, 1169, 1163, - 1164, 280, 146, 377, 26, -14, 128, 1170, 1165, 962, - 963, 1147, 1146, 1148, 281, 141, 781, -501, 155, 69, - 1176, 305, 306, 309, 34, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 156, -149, - -149, -149, 478, 867, 18, 662, 1152, 1152, 855, 440, - 441, -505, -505, 157, -149, 781, -149, 138, -149, 867, - -149, 662, 808, 309, 809, 242, 1060, 1062, 496, 497, - 414, 1166, 1167, 1168, 1169, 1163, 1164, -500, -505, -501, - -501, -107, -107, 1170, 1165, -503, 1228, 865, 611, 612, - 841, -107, -107, -107, -501, 71, 921, -84, 306, 309, - -107,-32766, -76, 1001, -49, 686, -501, 1145, -507, -73, - -71, 774, -70, -69,-32766,-32766,-32766, 668,-32766, -68, - -32766, 867,-32766, 662, -149,-32766, 781, 781, -67, 281, - -32766,-32766,-32766, -66, 73, -65,-32766,-32766, 309, -500, - -500, 129,-32766, 388, -64, -45,-32766, -503, -503, -16, - -32766, 145, 1145, 264, -500, 676, 865, 679, 864,-32766, - -32766,-32766, -503,-32766, 772,-32766, -500,-32766, 144, 855, - -32766, 272, -107, 273, -503,-32766,-32766,-32766, 879, 72, - 244,-32766,-32766,-32766, 275, 776, 669,-32766, 388, 1145, - 664, 865, -500, 274, 276,-32766,-32766,-32766,-32766, 315, - -32766, 281,-32766, 263,-32766, 73, 73,-32766, 107, 309, - 309, 143,-32766,-32766,-32766, 642,-32766, 246,-32766,-32766, - 532, 671, 1145, 772,-32766, 388, -4, 865, 1259,-32766, - -32766,-32766,-32766,-32766, 781,-32766,-32766,-32766, 855, 1030, - -32766, 865, 867, 139, 662,-32766,-32766,-32766, 655, 309, - 865,-32766,-32766,-32766, -500, -500, 526,-32766, 388, 1145, - 101, 102, 103, 620, 637,-32766,-32766,-32766,-32766, -500, - -32766, 960,-32766, 855,-32766, 20, 865,-32766,-32766, 625, - 677, -500,-32766,-32766,-32766, 435,-32766, 463,-32766,-32766, - 962, 963, 1145, 626,-32766, 388, 638, 962, 963,-32766, - -32766,-32766,-32766,-32766, 609,-32766, 289,-32766, 46, 855, - -32766, 906, 407, 662,-32766,-32766,-32766,-32766, 287, 1016, - 1183,-32766,-32766, 855, 286, 293, 781,-32766, 388, 1247, - 890, 414, 855, 402, 891,-32766, 881, 538, 279, -231, - -231, -231, -107, -107, 1000, 414, 867, 26, 662, 1185, - 578, 800, -107, -107, -107, -466, -107, -107, 855, 781, - 47, -456, 7, 1176, 22, 841, -107, -107, -107, 348, - 282, 283, 780, 9, -230, -230, -230, 281, 1173, -536, - 414, 38, 867, 39, 662, -4, 683, 684, 846, 32, - 243, -107, -107, 930, 907, 680, 867, 123, 662, -231, - 841, -107, -107, -107, 914, 867, 904, 662, 915, 844, - 902, 1005, 497, 1008, 1166, 1167, 1168, 1169, 1163, 1164, - 1009, 1006, 284, 285, 1007, 1013, 1170, 1165, 792, 1198, - 1216, 867, 30, 662, -230, 304, 1250, 349, 71, 614, - 842, 306, 309, 347, 663, 666, 670, 672, -107, 125, - -107, 673, 674, 678, 665, 288, 1254, 1256, -107, -107, - -107, -107, -107, -107, -107, 803, 802, 811, 888, 922, - 810, 1255, 887, 886, 1131, 874, 882, 872, 912, 913, - 1253, 1210, 1199, 1217, 1223, 1226, 0, -534, -508, -507, - -506, 1, 27, 28, 37, 41, 45, 70, 74, 75, - 76, 77, -307, -256, 78, 79, 140, 149, 153, 239, - 311, 334, 335, 336, 337, 338, 339, 340, 341, 342, - 343, 344, 403, 404, 0, -254, -253, 12, 13, 14, - 15, 17, 376, 454, 455, 462, 465, 466, 467, 468, - 472, 473, 474, 481, 649, 1156, 1099, 1174, 977, 1135, - -258, -99, 11, 16, 25, 278, 375, 571, 575, 601, - 654, 1103, 1151, 1100, 1229, 0, -470, 1116, 0, 1177, - 0, 309 + 130, 131, 132, 561, 133, 134, 0, 710, 711, 712, + 135, 36, 896, 537, 538,-32766, 1231,-32766,-32766,-32766, + -558, 1164, 785, 907, 434, 435, 436, -558,-32766,-32766, + -32766, -299,-32766, 973,-32766, 247,-32766, -190,-32766,-32766, + -32766,-32766,-32766, 465,-32766,-32766,-32766,-32766,-32766,-32766, + -32766,-32766, 124, 796, 713,-32766,-32766, 392, 1043, 1044, + 1045, 1042, 1041, 1040,-32766,-32766,-32766,-32766, 263, 136, + 375, 717, 718, 719, 720, 980, 981, 401, 1043, 1044, + 1045, 1042, 1041, 1040, 721, 722, 723, 724, 725, 726, + 727, 728, 729, 730, 731, 751, 562, 752, 753, 754, + 755, 743, 744, 376, 377, 746, 747, 732, 733, 734, + 736, 737, 738, 336, 778, 779, 780, 781, 782, 739, + 740, 563, 564, 772, 763, 761, 762, 775, 758, 759, + -189, 978, 565, 566, 757, 567, 568, 569, 570, 571, + 572, 533, -555, -509,-32766,-32766, 760, 573, 574, -555, + 137, 980, 981, 313, 130, 131, 132, 561, 133, 134, + 994, 710, 711, 712, 135, 36,-32766,-32766,-32766,-32766, + 687,-32766,-32766,-32766, 80, 1164, 553, -558, 629, 24, + 312, -558,-32766,-32766,-32766, -299,-32766,-32766,-32766, 247, + -32766, -190,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32766, 1203, 432, 433,-32766,-32766, -509, -509, 713, 795, + -32766, 392, 395,-32766,-32766,-32766, 443, 444,-32766, 438, + 433, -509, 263, 136, 375, 717, 718, 719, 720, 395, + -83, 401, 237, -509,-32766, -515,-32766,-32766, 721, 722, + 723, 724, 725, 726, 727, 728, 729, 730, 731, 751, + 562, 752, 753, 754, 755, 743, 744, 376, 377, 746, + 747, 732, 733, 734, 736, 737, 738, 336, 778, 779, + 780, 781, 782, 739, 740, 563, 564, 772, 763, 761, + 762, 775, 758, 759, -189, 2, 565, 566, 757, 567, + 568, 569, 570, 571, 572, -83, 81, 82, 83, -555, + 760, 573, 574, -555, 137, 735, 705, 706, 707, 708, + 709, 1251, 710, 711, 712, 748, 749, 33, 1250, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 12, 265,-32766,-32766,-32766, 104, 105, 106, + 31, 265, 970, 969, 968, 107, 101, 102, 103, 713, + -32766,-32766,-32766, 107, 459,-32766, 583,-32766,-32766,-32766, + -32766,-32766,-32766, 714, 715, 716, 717, 718, 719, 720, + -259,-32766, 783,-32766,-32766,-32766,-32766,-32766, 126, 721, + 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, + 751, 774, 752, 753, 754, 755, 743, 744, 745, 773, + 746, 747, 732, 733, 734, 736, 737, 738, 777, 778, + 779, 780, 781, 782, 739, 740, 741, 742, 772, 763, + 761, 762, 775, 758, 759, 142, 938, 750, 756, 757, + 764, 765, 767, 766, 768, 769, -549,-32766,-32766,-32766, + -549, 760, 771, 770, 48, 49, 50, 492, 51, 52, + 790, 236, 589, -510, 53, 54, 249, 55,-32766, 993, + -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, + -32767, 296,-32767,-32767,-32767,-32767, 99, 100, 101, 102, + 103, 1276, 460, 787, 1277, 821, 298, 822, 274, 482, + 1191, 56, 57, -337, 310, -337, -508, 58, 1171, 59, + 242, 243, 60, 61, 62, 63, 64, 65, 66, 67, + 1035, 26, 264, 68, 416, 493, -510, -510, 325, 1197, + 1198, 494, 349, 794, 1171, 791, 353, 1195, 40, 23, + 495, -510, 496, 793, 497, 487, 498, 11, 358, 499, + 500, 645, 646, -510, 42, 43, 417, 421, 419, 878, + 44, 501, 939, 401, -14, 360, 348, 324, 789, -508, + -508, 412, -507, 675, 502, 503, 504, 427, 428, 47, + 794, 146, 380, 978, -508, 413, 505, 506, 794, 1185, + 1186, 1187, 1188, 1182, 1183, 284, -508, 414, -514, 1247, + 415, 1189, 1184, 980, 981, 1166, 1165, 1167, 285, 821, + 878, 822, 800, 69, 794, 308, 309, 312, 34, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, -150, -150, -150, -507, -507, 1166, 1165, 1167, + 678, 868, 288, 289, 1021,-32766, 1020, -150, 698, -150, + -507, -150, 147, -150, 244, 445, 446, 352, 138, -108, + 1079, 1081, -507, 418, 312, 621, 622, 148, 73, 125, + 150, -507, 312, 151, -108, -108, 152, 785, -85, 154, + 35, -49, -77, 854, -108, -108, -108, -108, 121, 285, + -32766, 122, 868, 127, 73, 128, 1164, 141, 312, 155, + 878, 156, 157,-32766,-32766,-32766, 158,-32766, 277,-32766, + 878,-32766, 107, -73,-32766, 880, 878, 673, -150,-32766, + -32766,-32766, -71,-32766, -70,-32766,-32766, -69, 129, 1164, + 679,-32766, 392, -512, -507, -507,-32766,-32766,-32766,-32766, + -32766, -68,-32766, 878,-32766, -67, 680,-32766, -66, -507, + -65, -64,-32766,-32766,-32766, 1171, -45, 139,-32766,-32766, + 878, -507, -16, 312,-32766, 392, 880, 246, 673, 72, + -32766, 145,-32766, 682, 1164, 266, 1164, 273, 688, -4, + 878, 691, 868,-32766,-32766,-32766, 877,-32766, 144,-32766, + 689,-32766, 868,-32766,-32766, 275, -512, -512, 868,-32766, + -32766,-32766, 892,-32766, 248,-32766,-32766, 276, 278, 1164, + 1162,-32766, 392, 980, 981, 279,-32766,-32766,-32766,-32766, + -32766, 318,-32766, -512,-32766, 868, 265,-32766, 653, 794, + 46, 143,-32766,-32766,-32766, 794, 666, 785,-32766,-32766, + -32766, 541, 868,-32766,-32766, 392, 1164, 1049, 1166, 1165, + 1167, 1278,-32766,-32766,-32766,-32766, 880,-32766, 673,-32766, + -32766,-32766, 868, 630,-32766, 250, 880, 535, 673,-32766, + -32766,-32766, 924, 635, 673,-32766,-32766, 648, 13, 290, + -108,-32766, 392, 440, 418, 794, 406, 470, 1266,-32766, + 293, 283, 636, 286, 287, -108, -108, 26, 878, 880, + 649, 673, 619, -473, 813, -108, -108, -108, -108, 794, + 285,-32766, 878, 1195, 411, 73, 880, 1164, 673, 312, + 123, 908, 909, 291,-32766,-32766,-32766, 9,-32766, 297, + -32766, 285,-32766, 1202, 793,-32766, 880, 894, 673, -4, + -32766,-32766,-32766, 0, 1019, -463,-32766,-32766, 547, 32, + 245, 1204,-32766, 392, 587, 7, 15, 351, 1192, 38, + -32766, 0, 505, 506, 805, 1185, 1186, 1187, 1188, 1182, + 1183, 39, 695, 696, 859, 948, 925, 1189, 1184, 932, + 868, 922, 933, 857, 920, -262, 1024, 1027, 1028, 71, + 1025, 1026, 309, 312, 868, 1217, -237, -237, -237, 1032, + 30, 1235, 418, 1269, 624, -543, 307, 350, 674, 677, + -236, -236, -236, -108, -108, 681, 418, 26, 683, 684, + 685, 686, 854, -108, -108, -108, -108, -108, -108, 794, + 690, 676, -260, 1195, 692, 855, 854, -108, -108, -108, + -108, 1273, 1275, -108, 816, 815, 824, 901, -108, 940, + -108, 823, 1274, 900, 880, 292, 673, -237, -108, -108, + -108, -108, -108, -108, -108, 902, 899, 1150, 880, 887, + 673, -236, 895, 885, 930, 931, 1272, 1229, 1218, 1236, + 1242, 1245, 0, 506, -541, 1185, 1186, 1187, 1188, 1182, + 1183, -515, -514, -513, 1, 27, 28, 1189, 1184, 37, + 41, 45, 70, -313, -259, 74, 75, 76, 77, 71, + 78, 79, 309, 312, 140, 149, 153, 241, 314, 337, + 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, + 407, 408, 0, 17, 18, 19, 20, 22, 379, 461, + 462, 469, 472, 473, 474, 475, 479, 480, 481, 490, + 660, 1175, 1118, 1193, 995, 1154, -264, -100, 16, 21, + 25, 282, 378, 580, 584, 611, 665, 1122, 1170, 1119, + 1248, 0, -477, 1135, 0, 1196, 0, 312 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 1, 116, 117, 73, 1, 9, 10, 11, - 1, 79, 79, 126, 127, 128, 1, 8, 86, 87, - 88, 8, 90, 8, 92, 37, 94, 8, 30, 97, + 1, 79, 79, 126, 127, 128, 129, 8, 86, 87, + 88, 8, 90, 1, 92, 37, 94, 8, 30, 97, 32, 33, 34, 101, 102, 103, 104, 9, 10, 11, - 108, 109, 14, 1, 56, 79, 114, 115, 115, 116, - 117, 118, 119, 120, 122, 105, 106, 1, 70, 71, - 72, 73, 74, 75, 76, 115, 8, 79, 115, 116, + 108, 109, 14, 1, 56, 115, 114, 115, 115, 116, + 117, 118, 119, 120, 122, 9, 10, 11, 70, 71, + 72, 73, 74, 75, 76, 135, 136, 79, 115, 116, 117, 118, 119, 120, 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, 153, - 8, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 157, 1, 8, 69, 161, 147, 148, 149, 8, 151, - 9, 10, 11, 2, 3, 4, 5, 6, 7, 161, - 9, 10, 11, 12, 13, 9, 10, 11, 73, 158, - 9, 10, 11, 158, 79, 80, 157, 9, 10, 164, - 161, 86, 87, 88, 161, 90, 30, 92, 37, 94, - 161, 30, 97, 32, 33, 34, 35, 102, 103, 104, - 8, 105, 106, 108, 109, 131, 132, 56, 156, 114, - 115, 115, 9, 10, 11, 14, 8, 122, 31, 8, - 146, 70, 71, 72, 73, 74, 75, 76, 8, 161, - 79, 8, 158, 30, 160, 32, 33, 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, 8, 96, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 69, 9, 10, 11, 157, 147, 148, - 149, 161, 151, 2, 3, 4, 5, 6, 7, 9, - 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 8, 56, 9, 10, 11, 52, 53, 54, 8, 56, - 118, 119, 120, 68, 8, 131, 132, 56, 9, 10, - 11, 68, 161, 30, 8, 32, 33, 34, 35, 36, - 37, 70, 71, 72, 73, 74, 75, 76, 31, 30, - 79, 32, 33, 34, 35, 36, 8, 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, 74, 75, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 84, 9, 10, 11, 1, 147, 148, - 149, 2, 3, 4, 5, 6, 7, 14, 79, 50, - 8, 12, 13, 8, 15, 30, 1, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 1, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 79, 8, - 1, 82, 8, 79, 1, 30, 74, 75, 49, 50, - 14, 105, 143, 107, 55, 158, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 8, 69, 70, - 71, 72, 73, 16, 31, 115, 77, 78, 79, 115, - 81, 152, 153, 154, 85, 86, 87, 88, 159, 90, - 14, 92, 96, 94, 134, 135, 97, 98, 152, 105, - 106, 102, 103, 104, 105, 106, 1, 108, 109, 14, - 83, 31, 37, 114, 115, 1, 152, 153, 154, 16, - 81, 122, 123, 124, 14, 105, 83, 107, 16, 69, - 115, 14, 133, 134, 14, 136, 137, 138, 139, 140, - 141, 142, 100, 101, 69, 31, 16, 148, 149, 134, - 135, 152, 153, 154, 155, 16, 81, 69, 16, 160, - 85, 162, 163, 164, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 16, 74, - 75, 76, 105, 156, 107, 158, 1, 1, 83, 105, - 106, 131, 132, 16, 89, 81, 91, 158, 93, 156, - 95, 158, 105, 164, 107, 37, 58, 59, 133, 134, - 105, 136, 137, 138, 139, 140, 141, 69, 158, 131, - 132, 116, 117, 148, 149, 69, 1, 1, 110, 111, - 125, 126, 127, 128, 146, 160, 156, 31, 163, 164, - 126, 73, 31, 156, 31, 158, 158, 79, 160, 31, - 31, 79, 31, 31, 86, 87, 88, 31, 90, 31, - 92, 156, 94, 158, 159, 97, 81, 81, 31, 155, - 102, 103, 104, 31, 160, 31, 108, 109, 164, 131, - 132, 31, 114, 115, 31, 31, 73, 131, 132, 31, - 122, 31, 79, 31, 146, 31, 1, 31, 31, 86, - 87, 88, 146, 90, 79, 92, 158, 94, 31, 83, - 97, 35, 126, 35, 158, 102, 103, 104, 37, 151, - 37, 108, 109, 73, 35, 153, 31, 114, 115, 79, - 158, 1, 69, 30, 35, 122, 86, 87, 88, 35, - 90, 155, 92, 56, 94, 160, 160, 97, 68, 164, - 164, 69, 102, 103, 104, 76, 73, 37, 108, 109, - 88, 31, 79, 79, 114, 115, 0, 1, 82, 86, - 87, 88, 122, 90, 81, 92, 84, 94, 83, 81, - 97, 1, 156, 158, 158, 102, 103, 104, 91, 164, - 1, 108, 109, 73, 131, 132, 84, 114, 115, 79, - 49, 50, 51, 89, 93, 122, 86, 87, 88, 146, - 90, 115, 92, 83, 94, 96, 1, 97, 115, 95, - 31, 158, 102, 103, 104, 96, 73, 96, 108, 109, - 134, 135, 79, 99, 114, 115, 99, 134, 135, 86, - 87, 88, 122, 90, 112, 92, 113, 94, 69, 83, - 97, 156, 126, 158, 115, 102, 103, 104, 130, 121, - 143, 108, 109, 83, 129, 129, 81, 114, 115, 84, - 126, 105, 83, 107, 126, 122, 151, 150, 112, 99, - 100, 101, 116, 117, 1, 105, 156, 69, 158, 143, - 150, 125, 126, 127, 128, 146, 116, 117, 83, 81, - 69, 146, 146, 85, 146, 125, 126, 127, 128, 146, - 131, 132, 152, 147, 99, 100, 101, 155, 157, 160, - 105, 156, 156, 156, 158, 159, 156, 156, 156, 144, - 145, 116, 117, 156, 156, 159, 156, 158, 158, 159, - 125, 126, 127, 128, 156, 156, 156, 158, 156, 156, - 156, 156, 134, 156, 136, 137, 138, 139, 140, 141, - 156, 156, 131, 132, 156, 156, 148, 149, 157, 157, - 157, 156, 158, 158, 159, 158, 157, 146, 160, 157, - 159, 163, 164, 158, 158, 158, 158, 158, 105, 158, - 107, 158, 158, 158, 158, 112, 159, 159, 115, 116, - 117, 118, 119, 120, 121, 159, 159, 159, 159, 159, - 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, - 159, 159, 159, 159, 159, 159, -1, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 159, 161, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, -1, 161, 161, 161, 161, 161, - 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, - 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 8, 115, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 84, 1, 69, 9, 10, 148, 149, 150, 8, + 152, 135, 136, 69, 2, 3, 4, 5, 6, 7, + 162, 9, 10, 11, 12, 13, 9, 10, 11, 73, + 159, 9, 10, 11, 159, 79, 80, 158, 74, 75, + 165, 162, 86, 87, 88, 162, 90, 30, 92, 37, + 94, 162, 30, 97, 32, 33, 34, 35, 102, 103, + 104, 144, 105, 106, 108, 109, 132, 133, 56, 157, + 114, 115, 115, 9, 10, 11, 132, 133, 122, 105, + 106, 147, 70, 71, 72, 73, 74, 75, 76, 115, + 31, 79, 14, 159, 30, 161, 32, 33, 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, 162, 8, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 96, 9, 10, 11, 158, + 148, 149, 150, 162, 152, 2, 3, 4, 5, 6, + 7, 1, 9, 10, 11, 12, 13, 30, 8, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 8, 56, 9, 10, 11, 52, 53, 54, + 8, 56, 118, 119, 120, 68, 49, 50, 51, 56, + 9, 10, 11, 68, 31, 30, 1, 32, 33, 34, + 35, 36, 37, 70, 71, 72, 73, 74, 75, 76, + 162, 30, 79, 32, 33, 34, 35, 36, 8, 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, 8, 31, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 158, 9, 10, 11, + 162, 148, 149, 150, 2, 3, 4, 5, 6, 7, + 79, 96, 50, 69, 12, 13, 8, 15, 30, 1, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 8, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 79, 159, 79, 82, 105, 8, 107, 30, 100, + 1, 49, 50, 105, 8, 107, 69, 55, 1, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 121, 69, 70, 71, 72, 73, 132, 133, 8, 77, + 78, 79, 8, 81, 1, 154, 8, 85, 86, 87, + 88, 147, 90, 153, 92, 105, 94, 107, 8, 97, + 98, 74, 75, 159, 102, 103, 104, 105, 106, 1, + 108, 109, 157, 79, 31, 8, 114, 115, 154, 132, + 133, 8, 69, 159, 122, 123, 124, 105, 106, 69, + 81, 100, 101, 115, 147, 8, 134, 135, 81, 137, + 138, 139, 140, 141, 142, 143, 159, 8, 161, 1, + 8, 149, 150, 135, 136, 153, 154, 155, 156, 105, + 1, 107, 8, 161, 81, 163, 164, 165, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 74, 75, 76, 132, 133, 153, 154, 155, + 31, 83, 132, 133, 160, 9, 157, 89, 159, 91, + 147, 93, 14, 95, 37, 105, 106, 147, 159, 126, + 58, 59, 159, 105, 165, 110, 111, 14, 161, 159, + 14, 69, 165, 14, 116, 117, 14, 79, 31, 14, + 14, 31, 31, 125, 126, 127, 128, 129, 16, 156, + 73, 16, 83, 16, 161, 16, 79, 16, 165, 16, + 1, 16, 16, 86, 87, 88, 16, 90, 30, 92, + 1, 94, 68, 31, 97, 157, 1, 159, 160, 102, + 103, 104, 31, 73, 31, 108, 109, 31, 31, 79, + 31, 114, 115, 69, 132, 133, 86, 87, 88, 122, + 90, 31, 92, 1, 94, 31, 31, 97, 31, 147, + 31, 31, 102, 103, 104, 1, 31, 159, 108, 109, + 1, 159, 31, 165, 114, 115, 157, 37, 159, 152, + 73, 31, 122, 31, 79, 31, 79, 31, 31, 0, + 1, 31, 83, 86, 87, 88, 31, 90, 31, 92, + 31, 94, 83, 115, 97, 35, 132, 133, 83, 102, + 103, 104, 37, 73, 37, 108, 109, 35, 35, 79, + 115, 114, 115, 135, 136, 35, 86, 87, 88, 122, + 90, 35, 92, 159, 94, 83, 56, 97, 76, 81, + 69, 69, 102, 103, 104, 81, 91, 79, 108, 109, + 73, 88, 83, 115, 114, 115, 79, 81, 153, 154, + 155, 82, 122, 86, 87, 88, 157, 90, 159, 92, + 84, 94, 83, 89, 97, 37, 157, 84, 159, 102, + 103, 104, 157, 95, 159, 108, 109, 93, 96, 130, + 126, 114, 115, 96, 105, 81, 107, 96, 84, 122, + 113, 112, 99, 132, 133, 116, 117, 69, 1, 157, + 99, 159, 112, 147, 125, 126, 127, 128, 129, 81, + 156, 73, 1, 85, 126, 161, 157, 79, 159, 165, + 159, 126, 126, 131, 86, 87, 88, 148, 90, 130, + 92, 156, 94, 144, 153, 97, 157, 152, 159, 160, + 102, 103, 104, -1, 1, 147, 108, 109, 151, 145, + 146, 144, 114, 115, 151, 147, 147, 147, 158, 157, + 122, -1, 134, 135, 158, 137, 138, 139, 140, 141, + 142, 157, 157, 157, 157, 157, 157, 149, 150, 157, + 83, 157, 157, 157, 157, 162, 157, 157, 157, 161, + 157, 157, 164, 165, 83, 158, 99, 100, 101, 157, + 159, 158, 105, 158, 158, 161, 159, 159, 159, 159, + 99, 100, 101, 116, 117, 159, 105, 69, 159, 159, + 159, 159, 125, 126, 127, 128, 129, 116, 117, 81, + 159, 159, 162, 85, 160, 160, 125, 126, 127, 128, + 129, 160, 160, 100, 160, 160, 160, 160, 105, 160, + 107, 160, 160, 160, 157, 112, 159, 160, 115, 116, + 117, 118, 119, 120, 121, 160, 160, 160, 157, 160, + 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, -1, 135, 161, 137, 138, 139, 140, 141, + 142, 161, 161, 161, 161, 161, 161, 149, 150, 161, + 161, 161, 161, 160, 162, 161, 161, 161, 161, 161, + 161, 161, 164, 165, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, - 161, 161, 161, 161, 161, -1, 162, 162, -1, 163, - -1, 164 + 161, 161, -1, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, -1, 163, 163, -1, 164, -1, 165 ); protected $actionBase = array( - 0, -2, 151, 555, 816, 830, 865, 489, 379, 622, - 858, 676, 780, 780, 839, 780, 493, 745, 301, 301, - -57, 301, 301, 477, 477, 477, 618, 618, 618, 618, - -58, -58, 95, 700, 733, 770, 663, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 803, 803, 803, 803, 803, 803, 803, 52, 530, - 446, 570, 984, 990, 986, 991, 982, 981, 985, 987, - 992, 911, 912, 727, 913, 914, 915, 916, 988, 872, - 983, 989, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 300, 38, 168, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, - 156, 156, 156, 203, 525, 525, 8, 598, 161, 868, - 868, 868, 868, 868, 868, 868, 868, 868, 868, 349, - 333, 435, 435, 435, 435, 435, 436, 436, 436, 436, - 933, 564, 636, 635, 465, 470, 801, 801, 753, 753, - 788, 746, 746, 746, 410, 410, 410, 74, 538, 396, - 359, 414, 675, 675, 675, 675, 414, 414, 414, 414, - 796, 996, 414, 414, 414, -103, 606, 713, 713, 881, - 293, 293, 293, 713, 547, 762, 835, 547, 835, 15, - 409, 789, -40, 96, -17, 789, 510, 829, 140, 19, - 810, 444, 810, 742, 859, 886, 993, 232, 784, 909, - 787, 910, 224, 661, 979, 979, 979, 979, 979, 979, - 979, 979, 979, 979, 979, 997, 980, -24, 997, 997, - 997, 568, -24, 358, 422, -24, 754, 980, 52, 805, - 52, 52, 52, 52, 941, 52, 52, 52, 52, 52, - 52, 946, 708, 704, 668, 347, 52, 530, 11, 11, - 537, 66, 11, 11, 11, 11, 52, 52, 444, 737, - 777, 534, 790, 68, 737, 737, 737, 187, 23, 201, - 29, 527, 734, 734, 731, 748, 921, 921, 734, 743, - 734, 748, 926, 734, 731, 731, 921, 731, 812, 208, - 452, 332, 346, 731, 731, 455, 921, 223, 731, 731, - 734, 734, 734, 731, 481, 734, 220, 211, 734, 734, - 731, 731, 785, 786, 122, 921, 921, 921, 786, 340, - 778, 778, 820, 821, 782, 712, 308, 274, 509, 192, - 731, 712, 712, 734, 356, 782, 712, 782, 712, 775, - 712, 712, 712, 782, 712, 743, 378, 712, 731, 484, - 134, 712, 6, 927, 928, 656, 929, 924, 930, 952, - 931, 934, 876, 939, 925, 935, 923, 922, 717, 507, - 553, 806, 799, 920, 730, 730, 730, 918, 730, 730, - 730, 730, 730, 730, 730, 730, 507, 811, 813, 776, - 722, 942, 562, 580, 767, 871, 994, 995, 794, 798, - 941, 974, 936, 815, 589, 960, 943, 826, 867, 944, - 945, 961, 975, 976, 887, 732, 888, 896, 861, 947, - 877, 730, 927, 934, 925, 935, 923, 922, 703, 694, - 687, 692, 678, 672, 669, 671, 710, 917, 809, 862, - 946, 919, 507, 863, 956, 864, 962, 963, 875, 779, - 736, 869, 897, 948, 949, 950, 878, 977, 817, 957, - 932, 964, 781, 898, 965, 966, 967, 968, 899, 879, - 883, 822, 764, 954, 774, 900, 443, 739, 749, 953, - 486, 940, 884, 901, 902, 969, 970, 971, 903, 937, - 827, 958, 761, 959, 955, 828, 838, 526, 726, 728, - 545, 560, 904, 905, 938, 714, 729, 840, 842, 978, - 906, 567, 843, 592, 907, 973, 612, 627, 747, 885, - 808, 783, 769, 951, 716, 844, 908, 845, 847, 854, - 972, 855, 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, 449, - 449, 449, 449, 449, 449, 301, 301, 301, 301, 449, - 449, 449, 449, 449, 449, 449, 0, 0, 301, 0, - 0, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 449, 449, 449, 449, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, + 0, -2, 152, 558, 779, 897, 911, 499, 484, 414, + 834, 303, 303, -57, 303, 303, 699, 742, 742, 759, + 742, 609, 715, 709, 709, 709, 617, 617, 617, 617, + -58, -58, 96, 697, 730, 767, 650, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 838, 838, 838, 838, 838, 838, 838, 838, 52, + 405, 365, 666, 999, 1005, 1001, 1006, 997, 996, 1000, + 1002, 1007, 916, 917, 757, 918, 919, 920, 921, 1003, + 846, 998, 1004, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 636, 38, 135, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 157, 157, 157, 204, 828, 828, 8, 602, + 162, 948, 948, 948, 948, 948, 948, 948, 948, 948, + 948, 351, 335, 438, 438, 438, 438, 438, 943, 439, + 439, 439, 439, 533, 754, 507, 468, 399, 398, 307, + 307, 678, 678, 16, 16, 16, 16, -60, -60, -60, + -103, 74, 437, 390, 57, 695, 598, 598, 598, 598, + 695, 695, 695, 695, 807, 1011, 695, 695, 695, 394, + 503, 503, 510, 295, 295, 295, 503, 504, 783, 804, + 504, 804, 15, 412, 728, 97, 114, 288, 728, 664, + 761, 141, 19, 781, 472, 781, 776, 842, 872, 1008, + 234, 793, 914, 801, 915, 84, 651, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 1012, 995, + 381, 1012, 1012, 1012, 555, 381, 104, 477, 381, 786, + 995, 52, 798, 52, 52, 52, 52, 958, 52, 52, + 52, 52, 52, 52, 963, 731, 725, 682, 333, 52, + 405, 11, 11, 489, 32, 11, 11, 11, 11, 52, + 52, 52, 472, 770, 797, 550, 803, 122, 770, 770, + 770, 199, 23, 218, 29, 440, 758, 758, 765, 766, + 933, 933, 758, 748, 758, 766, 940, 758, 765, 765, + 933, 765, 775, 380, 563, 520, 528, 765, 765, 577, + 933, 473, 765, 765, 758, 758, 758, 758, 765, 589, + 758, 458, 427, 758, 758, 765, 765, 749, 746, 799, + 277, 933, 933, 933, 799, 524, 792, 792, 792, 815, + 816, 790, 744, 496, 488, 604, 342, 765, 744, 744, + 758, 540, 790, 744, 790, 744, 785, 744, 744, 744, + 790, 744, 758, 748, 557, 744, 683, 765, 592, 334, + 744, 6, 941, 944, 647, 945, 938, 946, 969, 947, + 949, 849, 956, 939, 950, 935, 934, 755, 672, 675, + 808, 756, 932, 644, 644, 644, 930, 644, 644, 644, + 644, 644, 644, 644, 644, 672, 800, 810, 788, 753, + 959, 677, 679, 789, 875, 1009, 1010, 795, 796, 958, + 989, 953, 802, 681, 975, 960, 874, 847, 961, 962, + 976, 990, 991, 881, 762, 882, 884, 806, 964, 850, + 644, 941, 949, 939, 950, 935, 934, 720, 719, 714, + 717, 710, 696, 691, 693, 740, 923, 844, 837, 963, + 931, 672, 843, 971, 841, 977, 978, 848, 787, 769, + 845, 885, 965, 966, 967, 856, 992, 814, 972, 823, + 979, 791, 886, 980, 981, 982, 983, 887, 859, 860, + 861, 817, 774, 870, 778, 889, 638, 773, 780, 970, + 653, 957, 862, 891, 892, 984, 985, 986, 893, 954, + 818, 973, 784, 974, 942, 819, 822, 656, 760, 772, + 659, 662, 905, 906, 907, 955, 747, 752, 824, 825, + 993, 909, 665, 826, 685, 912, 988, 686, 690, 745, + 871, 809, 777, 782, 968, 750, 827, 913, 829, 830, + 831, 987, 833, 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, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 414, 414, 285, 0, 285, 414, 414, 414, - 414, 414, 414, 414, 414, 414, 414, 285, 285, 285, - 285, 285, 285, 285, 293, 293, 293, 293, 812, 414, - 414, 414, 414, -37, 293, 293, 414, 414, -37, 414, - 414, 414, 414, 414, 414, 0, 0, -24, 835, 0, - 743, 743, 743, 743, 0, 0, 0, 0, 835, 835, + 0, 452, 452, 452, 452, 452, 452, 303, 303, 303, + 303, 0, 0, 303, 0, 0, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, + 452, 452, 452, 452, 452, 452, 452, 452, 452, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -24, 835, 0, -24, 0, 743, 743, 414, - 812, 812, 25, 414, 0, 0, 0, 0, -24, 743, - -24, 835, 11, 52, 25, 0, 492, 492, 492, 492, - 0, 444, 812, 812, 812, 812, 812, 812, 812, 812, - 812, 812, 812, 743, 812, 0, 743, 743, 743, 0, - 0, 0, 0, 0, 743, 731, 0, 921, 0, 0, - 0, 0, 734, 0, 0, 0, 0, 0, 0, 734, - 926, 731, 731, 0, 0, 0, 0, 0, 0, 743, - 0, 0, 0, 0, 0, 0, 0, 730, 779, 0, - 779, 0, 730, 730, 730 + 0, 0, 0, 0, 0, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 695, 695, 287, 0, + 287, 695, 695, 695, 695, 695, 695, 695, 695, 695, + 695, 287, 287, 287, 287, 287, 287, 287, 775, 295, + 295, 295, 295, 695, 695, 695, 695, -37, -37, 295, + 295, 695, 695, 695, 695, 695, 695, 695, 695, 695, + 0, 0, 0, 381, 804, 0, 748, 748, 748, 748, + 0, 0, 0, 0, 804, 804, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 381, 804, 0, + 381, 0, 748, 748, 695, 775, 775, 310, 695, 0, + 0, 0, 0, 381, 748, 381, 804, 11, 52, 310, + 0, 481, 481, 481, 481, 0, 472, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 775, 775, 748, 775, + 0, 748, 748, 748, 0, 0, 0, 0, 0, 748, + 765, 0, 933, 0, 0, 0, 0, 758, 0, 0, + 0, 0, 0, 0, 758, 940, 765, 765, 0, 0, + 0, 0, 0, 0, 748, 0, 0, 0, 0, 0, + 0, 0, 0, 644, 787, 0, 787, 0, 644, 644, + 644 ); protected $actionDefault = array( - 3,32767, 99,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 97, - 32767,32767,32767,32767,32767,32767, 554, 554, 554, 554, - 235, 99,32767,32767,32767,32767, 430, 349, 349, 349, - 32767,32767, 498, 498, 498, 498, 498, 498,32767,32767, - 32767,32767,32767,32767, 430,32767,32767,32767,32767,32767, + 3,32767, 100,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 98,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 561, 561, 561, 561, + 241, 100,32767,32767,32767,32767, 437, 356, 356, 356, + 32767,32767, 505, 505, 505, 505, 505, 505,32767,32767, + 32767,32767,32767,32767, 437,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, 97,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 98,32767,32767,32767, 35, 5, 6, 8, 9, 48, 15,32767,32767,32767, - 32767,32767, 99,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 547,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 434, 413, 414, 416, 417, 348, 499, 553, - 292, 550, 347, 142, 304, 294, 223, 295, 239, 240, - 266, 344, 146, 378, 431, 380, 429, 433, 379, 354, - 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, - 369, 370, 371, 352, 353, 432, 435, 436, 439, 440, - 410, 409, 408, 376,32767,32767, 377, 351, 381,32767, - 32767,32767,32767,32767,32767,32767,32767, 99,32767, 383, - 382, 399, 400, 397, 398, 401, 402, 403, 404, 405, - 32767,32767,32767,32767,32767, 327, 390, 391, 283, 283, - 329,32767,32767,32767,32767,32767,32767, 492, 407,32767, + 32767,32767, 100,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 99,32767, 97,32767, 494, 373, 375, 462, - 385, 386, 384, 355,32767, 469,32767, 99, 471,32767, - 32767,32767, 108,32767,32767,32767, 493,32767, 500, 500, - 32767, 455, 97,32767,32767,32767,32767, 261,32767,32767, - 32767,32767, 561, 455, 107, 107, 107, 107, 107, 107, - 107, 107, 107, 107, 107,32767, 107,32767,32767,32767, - 97, 185,32767, 249, 251, 99, 515, 190,32767, 474, + 32767,32767, 554,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 467, 190, 190,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 455, 395, - 135,32767, 135, 500, 387, 388, 389, 457, 500, 500, - 500,32767,32767,32767, 190,32767, 472, 472, 97, 97, - 97, 97, 467,32767, 190, 190,32767, 190, 108, 96, - 96, 96, 96, 190, 190, 96, 100, 98, 190, 190, - 32767,32767,32767, 190, 96,32767, 98, 98,32767,32767, - 190, 190, 206, 204, 98,32767, 519, 520, 204, 98, - 208, 208, 228, 228, 446, 285, 98, 96, 98, 98, - 190, 285, 285,32767, 98, 446, 285, 446, 285, 192, - 285, 285, 285, 446, 285,32767, 98, 285, 190, 96, - 96, 285,32767,32767,32767, 457,32767,32767,32767,32767, + 32767,32767,32767, 441, 420, 421, 423, 424, 355, 506, + 560, 298, 557, 354, 143, 310, 300, 229, 301, 245, + 246, 206, 272, 351, 147, 385, 438, 387, 436, 440, + 386, 361, 366, 367, 368, 369, 370, 371, 372, 373, + 374, 375, 376, 377, 378, 359, 360, 439, 442, 443, + 446, 447, 417, 416, 415, 383,32767,32767, 384, 358, + 388,32767,32767,32767,32767,32767,32767,32767,32767, 100, + 32767, 390, 389, 406, 407, 404, 405, 408,32767, 409, + 410, 411, 412,32767,32767,32767,32767, 336, 334, 397, + 398, 289, 289,32767,32767,32767,32767,32767,32767,32767, + 32767, 499, 414,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 98, 501, + 380, 382, 469, 392, 393, 391, 362,32767, 476,32767, + 100, 478,32767,32767,32767, 109,32767,32767,32767, 500, + 32767, 507, 507,32767, 462, 98,32767,32767,32767,32767, + 267,32767,32767,32767,32767, 568, 462, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 108,32767, 108, + 32767,32767,32767, 98, 186,32767, 255, 257, 100, 522, + 191,32767, 481,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 474, 191, 191,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 487,32767, 504, 517, 393, 394, 396, 502, 418, 419, - 420, 421, 422, 423, 424, 426, 549,32767, 461,32767, - 32767,32767,32767, 303, 559,32767, 559,32767,32767,32767, + 32767,32767, 462, 402, 136,32767, 136, 507, 394, 395, + 396, 464, 507, 507, 507,32767,32767,32767, 191,32767, + 479, 479, 98, 98, 98, 98, 474,32767, 191, 191, + 32767, 191, 109, 97, 97, 97, 97, 191, 191, 97, + 101, 99, 191, 191,32767,32767,32767,32767, 191, 97, + 32767, 99, 99,32767,32767, 191, 191, 212, 203, 210, + 99,32767, 526, 527, 210, 99, 214, 214, 214, 234, + 234, 453, 291, 99, 97, 99, 99, 191, 291, 291, + 32767, 99, 453, 291, 453, 291, 193, 291, 291, 291, + 453, 291,32767,32767, 99, 291, 205, 191, 97, 97, + 291,32767,32767,32767, 464,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 494, + 32767, 511, 524, 400, 401, 403, 509, 425, 426, 427, + 428, 429, 430, 431, 433, 556,32767, 468,32767,32767, + 32767,32767, 309, 566,32767, 566,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 560,32767, 500,32767,32767,32767, - 32767, 392, 7, 74, 41, 42, 50, 56, 478, 479, - 480, 481, 475, 476, 482, 477,32767, 483, 525,32767, - 32767, 501, 552,32767,32767,32767,32767,32767,32767, 135, + 32767,32767,32767, 567,32767, 507,32767,32767,32767,32767, + 399, 7, 74, 41, 42, 50, 56, 485, 486, 487, + 488, 482, 483, 489, 484,32767, 490, 532,32767,32767, + 508, 559,32767,32767,32767,32767,32767,32767, 136,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 494, + 32767, 134,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 507,32767,32767,32767, 286, 288,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 487,32767, 133,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 500,32767,32767,32767, 280, 282,32767, + 32767,32767,32767,32767, 507,32767,32767,32767, 274, 276, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 500,32767,32767,32767, 268, 270, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 265,32767,32767, 343,32767,32767,32767, - 32767, 323,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 148, 148, 3, 3, 306, 148, 148, 148, - 306, 148, 306, 306, 148, 148, 148, 148, 148, 148, - 180, 243, 246, 228, 228, 148, 315, 148 + 32767,32767,32767,32767, 271,32767,32767, 350,32767,32767, + 32767,32767, 330,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 149, 149, 3, 3, 312, 149, 149, + 149, 312, 149, 312, 312, 312, 149, 149, 149, 149, + 149, 149, 181, 249, 252, 234, 234, 149, 322, 149 ); protected $goto = array( - 190, 190, 650, 1020, 979, 399, 624, 798, 1019, 658, - 393, 297, 298, 318, 546, 303, 398, 319, 400, 603, - 362, 366, 531, 569, 573, 161, 161, 161, 161, 187, - 187, 171, 173, 209, 191, 204, 187, 187, 187, 187, - 187, 188, 188, 188, 188, 188, 188, 182, 183, 184, - 185, 186, 206, 204, 207, 504, 505, 389, 506, 508, - 509, 510, 511, 512, 513, 514, 515, 1046, 162, 163, - 164, 189, 165, 166, 167, 160, 168, 169, 170, 172, - 203, 205, 208, 230, 233, 236, 238, 249, 250, 251, - 252, 253, 254, 255, 256, 257, 258, 259, 266, 267, - 300, 301, 302, 394, 395, 396, 551, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 174, 225, 175, 192, 193, 194, 231, 182, - 183, 184, 185, 186, 206, 1046, 195, 176, 177, 178, - 196, 192, 179, 232, 197, 159, 198, 226, 180, 199, - 227, 228, 181, 229, 200, 201, 202, 312, 312, 312, - 312, 801, 577, 591, 594, 595, 596, 597, 615, 616, - 617, 660, 799, 329, 530, 521, 590, 590, 568, 794, - 794, 1175, 1175, 1175, 1175, 1175, 1175, 1175, 1175, 1175, - 1175, 858, 779, 859, 806, 775, 854, 849, 850, 863, - 905, 807, 851, 804, 852, 853, 805, 295, 295, 295, - 295, 832, 857, 607, 607, 364, 521, 773, 530, 969, - 966, 967, 996, 997, 539, 540, 957, 964, 965, 371, - 549, 588, 621, 779, 570, 779, 1244, 1244, 1193, 1193, - 543, 584, 585, 1193, 1193, 1193, 1193, 1193, 1193, 1193, - 1193, 1193, 1193, 326, 1244, 1144, 1144, 1144, 961, 1140, - 1233, 469, 961, 961, 926, 961, 961, 961, 961, 961, - 961, 1225, 1225, 1225, 1225, 1144, 470, 360, 471, 21, - 1144, 1144, 1144, 1144, 477, 794, 1144, 1144, 1144, 332, - 437, 437, 567, 1012, 618, 661, 632, 633, 542, 332, - 332, 437, 623, 647, 647, 870, 653, 1010, 1094, 871, - 447, 1218, 1219, 814, 332, 332, 1141, 332, 826, 1260, - 5, 813, 6, 518, 518, 518, 789, 320, 1191, 1191, - 523, 791, 332, 1191, 1191, 1191, 1191, 1191, 1191, 1191, - 1191, 1191, 1191, 426, 405, 1142, 1201, 1202, 899, 899, - 899, 899, 370, 536, 426, 893, 900, 897, 380, 657, - 583, 507, 507, 308, 291, 1204, 507, 507, 507, 507, - 507, 507, 507, 507, 507, 507, 1243, 1243, 516, 516, - 516, 516, 1220, 1221, 819, 875, 1034, 572, 547, 582, - 643, 522, 534, 587, 1243, 816, 948, 522, 945, 534, - 685, 985, 363, 330, 331, 818, 828, 627, 924, 1246, - 392, 1137, 579, 812, 418, 418, 418, 448, 523, 550, - 442, 443, 989, 1029, 824, 1136, 910, 1251, 1252, 451, - 600, 537, 1215, 1215, 1215, 682, 602, 604, 0, 622, - 0, 0, 640, 644, 940, 648, 656, 936, 0, 0, - 797, 0, 822, 1227, 1227, 1227, 1227, 929, 903, 903, - 901, 903, 681, 0, 270, 519, 519, 0, 0, 520, - 938, 933, 0, 827, 815, 984, 0, 0, 988, 0, - 1211, 0, 0, 0, 1139, 0, 0, 908, 418, 418, - 418, 418, 418, 418, 418, 418, 418, 418, 418, 0, - 418, 0, 378, 379, 0, 0, 0, 630, 0, 631, - 898, 382, 383, 384, 0, 641, 987, 0, 385, 1213, - 1213, 987, 324, 1125, 884, 0, 0, 1126, 1129, 885, - 1130, 0, 1027, 831, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 191, 191, 661, 403, 634, 453, 1237, 1238, 397, 300, + 301, 321, 555, 306, 402, 322, 404, 613, 1038, 1039, + 669, 315, 315, 315, 315, 162, 162, 162, 162, 188, + 188, 172, 174, 211, 192, 206, 188, 188, 188, 188, + 188, 189, 189, 189, 189, 189, 189, 183, 184, 185, + 186, 187, 208, 206, 209, 513, 514, 393, 515, 517, + 518, 519, 520, 521, 522, 523, 524, 1065, 163, 164, + 165, 190, 166, 167, 168, 161, 169, 170, 171, 173, + 205, 207, 210, 232, 235, 238, 240, 251, 252, 253, + 254, 255, 256, 257, 259, 260, 261, 262, 269, 270, + 303, 304, 305, 398, 399, 400, 560, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 175, 227, 176, 193, 194, 195, 233, 183, + 184, 185, 186, 187, 208, 1065, 196, 177, 178, 179, + 197, 193, 180, 234, 198, 160, 199, 228, 181, 200, + 229, 230, 182, 231, 201, 202, 203, 204, 814, 586, + 600, 603, 604, 605, 606, 625, 626, 627, 671, 811, + 599, 599, 539, 530, 577, 1194, 1194, 1194, 1194, 1194, + 1194, 1194, 1194, 1194, 1194, 280, 280, 280, 280, 997, + 332, 819, 812, 867, 862, 863, 876, 845, 820, 864, + 817, 865, 866, 818, 597, 631, 1144, 897, 788, 870, + 1145, 1148, 898, 1149, 367, 530, 871, 539, 872, 1018, + 1014, 1015, 792, 548, 549, 617, 617, 786, 374, 558, + 1159, 987, 984, 985, 579, 915, 383, 668, 1212, 1212, + 923, 593, 594, 1212, 1212, 1212, 1212, 1212, 1212, 1212, + 1212, 1212, 1212, 904, 975, 982, 983, 1163, 1163, 1163, + 979, 552, 792, 476, 792, 979, 979, 979, 979, 979, + 979, 979, 979, 979, 329, 396, 422, 588, 5, 1163, + 6, 422, 422, 14, 1163, 1163, 1163, 1163, 1160, 1252, + 1163, 1163, 1163, 1244, 1244, 1244, 1244, 944, 802, 363, + 335, 546, 551, 311, 295, 694, 612, 614, 883, 632, + 335, 335, 884, 651, 655, 958, 659, 667, 954, 1161, + 1220, 1221, 1239, 1240, 335, 335, 633, 335, 1113, 1279, + 365, 369, 540, 578, 582, 323, 1262, 1262, 1210, 1210, + 532, 804, 335, 1210, 1210, 1210, 1210, 1210, 1210, 1210, + 1210, 1210, 1210, 1262, 409, 422, 422, 422, 422, 422, + 422, 422, 422, 422, 422, 422, 832, 422, 1265, 373, + 525, 525, 525, 525, 545, 1223, 829, 516, 516, 581, + 966, 592, 516, 516, 516, 516, 516, 516, 516, 516, + 516, 516, 609, 610, 381, 382, 807, 807, 1156, 640, + 654, 641, 1003, 385, 386, 387, 628, 652, 642, 643, + 644, 388, 697, 531, 543, 454, 327, 1263, 1263, 531, + 841, 543, 442, 442, 366, 333, 334, 556, 591, 532, + 1234, 1234, 1234, 442, 1263, 527, 527, 527, 1007, 1048, + 267, 559, 447, 448, 449, 528, 528, 837, 928, 0, + 1270, 1271, 458, 1246, 1246, 1246, 1246, 430, 477, 0, + 478, 0, 917, 917, 917, 917, 485, 827, 430, 911, + 918, 810, 839, 0, 0, 826, 0, 835, 0, 1230, + 0, 0, 0, 947, 921, 921, 919, 921, 693, 486, + 529, 956, 951, 840, 828, 1002, 0, 0, 1006, 1158, + 888, 1053, 0, 807, 0, 0, 0, 0, 926, 596, + 0, 0, 0, 0, 963, 1005, 0, 0, 1232, 1232, + 1005, 0, 831, 0, 637, 942, 0, 0, 0, 0, + 825, 576, 1031, 916, 672, 658, 658, 0, 664, 1029, + 0, 0, 0, 1155, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1046, 844, 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, 943, 943 + 961, 961 ); protected $gotoCheck = array( - 41, 41, 71, 128, 111, 64, 64, 25, 128, 8, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 57, 57, 57, 57, 57, 41, 41, 41, 41, 41, + 41, 41, 71, 64, 64, 160, 160, 160, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 130, 130, + 8, 22, 22, 22, 22, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, @@ -743,90 +748,90 @@ class Php7 extends \PhpParser\ParserAbstract 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 22, 22, 22, - 22, 14, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 26, 88, 74, 74, 99, 99, 114, 21, - 21, 99, 99, 99, 99, 99, 99, 99, 99, 99, - 99, 63, 11, 63, 14, 6, 14, 14, 14, 14, - 48, 14, 14, 14, 14, 14, 14, 23, 23, 23, - 23, 44, 14, 107, 107, 74, 74, 5, 74, 107, - 107, 107, 14, 14, 74, 74, 105, 105, 105, 74, - 74, 54, 54, 11, 74, 11, 165, 165, 152, 152, - 154, 74, 74, 152, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 161, 165, 71, 71, 71, 71, 19, - 163, 74, 71, 71, 94, 71, 71, 71, 71, 71, - 71, 8, 8, 8, 8, 71, 139, 60, 139, 74, - 71, 71, 71, 71, 139, 21, 71, 71, 71, 13, - 133, 133, 7, 7, 82, 7, 82, 82, 95, 13, - 13, 133, 62, 7, 7, 71, 7, 7, 135, 71, - 158, 158, 158, 34, 13, 13, 19, 13, 34, 13, - 45, 34, 45, 18, 18, 18, 19, 28, 153, 153, - 13, 17, 13, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 18, 103, 19, 19, 19, 18, 18, - 18, 18, 27, 8, 18, 18, 18, 84, 84, 84, - 8, 155, 155, 151, 151, 13, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 164, 164, 98, 98, - 98, 98, 160, 160, 38, 16, 16, 98, 2, 2, - 13, 8, 8, 16, 164, 36, 101, 8, 16, 8, - 90, 113, 8, 88, 88, 16, 40, 16, 16, 164, - 12, 144, 12, 16, 22, 22, 22, 141, 13, 8, - 8, 8, 116, 131, 8, 16, 87, 8, 8, 80, - 81, 47, 114, 114, 114, 47, 47, 47, -1, 47, - -1, -1, 47, 47, 47, 47, 47, 47, -1, -1, - 24, -1, 8, 114, 114, 114, 114, 24, 24, 24, - 24, 24, 24, -1, 23, 23, 23, -1, -1, 24, - 24, 24, -1, 15, 15, 15, -1, -1, 15, -1, - 114, -1, -1, -1, 13, -1, -1, 15, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, -1, - 22, -1, 78, 78, -1, -1, -1, 78, -1, 78, - 15, 78, 78, 78, -1, 78, 114, -1, 78, 114, - 114, 114, 78, 76, 76, -1, -1, 76, 76, 76, - 76, -1, 15, 15, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 41, 41, 41, 41, 41, 41, 41, 41, 14, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 25, + 102, 102, 74, 74, 116, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 23, 23, 23, 23, 113, + 91, 14, 26, 14, 14, 14, 14, 44, 14, 14, + 14, 14, 14, 14, 54, 54, 76, 76, 6, 14, + 76, 76, 76, 76, 74, 74, 63, 74, 63, 14, + 14, 14, 11, 74, 74, 109, 109, 5, 74, 74, + 19, 109, 109, 109, 74, 87, 87, 87, 154, 154, + 48, 74, 74, 154, 154, 154, 154, 154, 154, 154, + 154, 154, 154, 85, 85, 85, 85, 71, 71, 71, + 71, 156, 11, 74, 11, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 163, 12, 22, 12, 45, 71, + 45, 22, 22, 74, 71, 71, 71, 71, 19, 165, + 71, 71, 71, 8, 8, 8, 8, 97, 19, 60, + 13, 47, 98, 153, 153, 47, 47, 47, 71, 47, + 13, 13, 71, 47, 47, 47, 47, 47, 47, 19, + 19, 19, 162, 162, 13, 13, 62, 13, 137, 13, + 57, 57, 57, 57, 57, 28, 166, 166, 155, 155, + 13, 17, 13, 155, 155, 155, 155, 155, 155, 155, + 155, 155, 155, 166, 106, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 38, 22, 166, 27, + 101, 101, 101, 101, 8, 13, 36, 157, 157, 101, + 104, 8, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 81, 81, 78, 78, 21, 21, 146, 78, + 13, 78, 115, 78, 78, 78, 82, 78, 82, 82, + 82, 78, 93, 8, 8, 143, 78, 167, 167, 8, + 40, 8, 135, 135, 8, 91, 91, 2, 2, 13, + 116, 116, 116, 135, 167, 18, 18, 18, 118, 133, + 23, 8, 8, 8, 8, 23, 23, 8, 90, -1, + 8, 8, 80, 116, 116, 116, 116, 18, 141, -1, + 141, -1, 18, 18, 18, 18, 141, 34, 18, 18, + 18, 24, 34, -1, -1, 34, -1, 8, -1, 116, + -1, -1, -1, 24, 24, 24, 24, 24, 24, 8, + 24, 24, 24, 15, 15, 15, -1, -1, 15, 13, + 16, 16, -1, 21, -1, -1, -1, -1, 15, 16, + -1, -1, -1, -1, 16, 116, -1, -1, 116, 116, + 116, -1, 16, -1, 16, 16, -1, -1, -1, -1, + 16, 7, 7, 15, 7, 7, 7, -1, 7, 7, + -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 15, 15, -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, 98, 98 + 101, 101 ); protected $gotoBase = array( - 0, 0, -276, 0, 0, 197, 186, 285, -11, 0, - 0, -87, 90, 9, -164, 53, -51, 39, 62, -100, - 0, -133, 154, 204, 446, 3, 168, 32, 48, 0, - 0, 0, 0, 0, -34, 0, 73, 0, 77, 0, - -2, -1, 0, 0, 192, -365, 0, -232, 183, 0, - 0, 0, 0, 0, 193, 0, 0, -23, 0, 0, - 237, 0, 67, 178, -229, 0, 0, 0, 0, 0, - 0, -6, 0, 0, -199, 0, 145, -173, 41, 0, - -19, -21, -376, 0, 70, 0, 0, 16, -280, 0, - 23, 0, 0, 0, 233, 257, 0, 0, 352, -58, - 0, 50, 0, 75, 0, -45, 0, -55, 0, 0, - 0, 2, 0, 51, 171, 0, 13, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -262, 0, - 0, 12, 0, 260, 0, 45, 0, 0, 0, -189, - 0, 10, 0, 0, 7, 0, 0, 0, 0, 0, - 0, 58, 4, 94, 213, 127, 0, 0, 27, 0, - 34, 225, 0, 231, 86, -54, 0, 0 + 0, 0, -248, 0, 0, 214, 199, 524, 7, 0, + 0, -61, -48, 16, -170, 69, 59, 45, 172, -132, + 0, 81, 18, 182, 467, 165, 188, 46, 52, 0, + 0, 0, 0, 0, 117, 0, 51, 0, 56, 0, + 8, -1, 0, 0, 185, -419, 0, -373, 218, 0, + 0, 0, 0, 0, 166, 0, 0, 287, 0, 0, + 259, 0, 89, 198, -233, 0, 0, 0, 0, 0, + 0, -6, 0, 0, -204, 0, -175, -179, -74, 0, + -2, -65, -275, 0, 0, -20, 0, -56, 0, 0, + 34, -270, 0, 32, 0, 0, 0, 266, 261, 0, + 0, 344, -66, 0, 31, 0, 82, 0, 0, -46, + 0, 0, 0, 187, 0, 49, 167, 0, 25, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -249, 0, 0, 24, 0, 392, 0, 63, 0, 0, + 0, -14, 0, 4, 0, 0, -10, 0, 0, 0, + 0, 0, 0, -5, 2, 102, 234, 141, 0, 0, + -282, 0, -29, 246, 0, 260, 42, 123, 0, 0 ); protected $gotoDefault = array( - -32768, 482, 689, 4, 690, 763, 771, 566, 498, 659, - 325, 592, 390, 1209, 856, 1033, 548, 790, 1153, 1161, - 427, 793, 313, 327, 838, 839, 840, 367, 352, 358, - 365, 613, 593, 464, 825, 421, 817, 456, 820, 420, - 829, 158, 387, 480, 833, 3, 835, 525, 866, 353, - 843, 354, 636, 845, 533, 847, 848, 361, 368, 369, - 1038, 541, 589, 860, 237, 535, 861, 351, 862, 869, - 356, 359, 645, 436, 475, 381, 1014, 576, 610, 432, - 450, 599, 598, 586, 895, 457, 434, 909, 328, 917, - 687, 1045, 605, 459, 925, 606, 932, 935, 499, 500, - 449, 947, 268, 460, 974, 628, 629, 959, 608, 972, - 444, 978, 422, 986, 1197, 425, 990, 260, 993, 269, - 386, 401, 998, 999, 8, 1004, 651, 652, 10, 265, - 479, 1028, 646, 419, 1044, 406, 1113, 1115, 527, 461, - 1133, 1132, 639, 476, 1138, 1200, 416, 501, 445, 299, - 502, 290, 316, 296, 517, 277, 317, 503, 446, 1206, - 1214, 314, 29, 1234, 1245, 323, 545, 581 + -32768, 491, 701, 4, 702, 776, 784, 575, 507, 670, + 328, 601, 394, 1228, 869, 1052, 557, 803, 1172, 1180, + 431, 806, 316, 330, 851, 852, 853, 370, 355, 361, + 368, 623, 602, 471, 838, 425, 830, 463, 833, 424, + 842, 159, 391, 489, 846, 3, 848, 534, 879, 356, + 856, 357, 647, 858, 542, 860, 861, 364, 371, 372, + 1057, 550, 598, 873, 239, 544, 874, 354, 875, 882, + 359, 362, 656, 441, 483, 384, 1033, 585, 620, 437, + 457, 608, 607, 595, 456, 638, 389, 913, 464, 439, + 927, 331, 935, 699, 1064, 615, 466, 943, 616, 950, + 953, 508, 509, 455, 965, 271, 467, 992, 639, 977, + 618, 990, 450, 996, 426, 1004, 1216, 429, 1008, 258, + 1011, 272, 390, 405, 1016, 1017, 8, 1023, 662, 663, + 10, 268, 488, 1047, 657, 423, 1063, 410, 1132, 1134, + 536, 468, 1152, 1151, 650, 484, 1157, 1219, 420, 510, + 451, 302, 511, 294, 319, 299, 526, 281, 320, 512, + 452, 1225, 1233, 317, 29, 1253, 1264, 326, 554, 590 ); protected $ruleToNonTerminal = array( @@ -837,35 +842,35 @@ class Php7 extends \PhpParser\ParserAbstract 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, 9, 10, 10, 10, 11, - 11, 12, 12, 13, 14, 14, 15, 15, 16, 16, - 17, 17, 20, 20, 21, 22, 22, 23, 23, 4, + 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, + 6, 6, 6, 7, 7, 8, 9, 10, 10, 10, + 11, 11, 12, 12, 13, 14, 14, 15, 15, 16, + 16, 17, 17, 20, 20, 21, 22, 22, 23, 23, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 28, 28, 29, 29, 31, 33, 33, 27, 35, 35, - 32, 37, 37, 34, 34, 36, 36, 38, 38, 30, - 39, 39, 40, 42, 43, 43, 44, 45, 45, 47, - 46, 46, 46, 46, 48, 48, 48, 48, 48, 48, + 4, 28, 28, 29, 29, 31, 33, 33, 27, 35, + 35, 32, 37, 37, 34, 34, 36, 36, 38, 38, + 30, 39, 39, 40, 42, 43, 43, 44, 45, 45, + 47, 46, 46, 46, 46, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 24, 24, - 67, 67, 70, 70, 69, 68, 68, 61, 73, 73, - 74, 74, 75, 75, 76, 76, 25, 25, 26, 26, - 26, 79, 79, 79, 80, 80, 83, 83, 81, 81, - 84, 85, 85, 55, 55, 63, 63, 66, 66, 66, - 65, 86, 86, 87, 56, 56, 56, 56, 88, 88, - 89, 89, 90, 90, 91, 92, 92, 93, 93, 94, - 94, 53, 53, 49, 49, 96, 51, 51, 97, 50, - 50, 52, 52, 62, 62, 62, 62, 77, 77, 100, - 100, 102, 102, 102, 102, 101, 101, 101, 104, 104, - 104, 105, 105, 107, 107, 107, 106, 106, 108, 108, - 109, 109, 109, 103, 103, 78, 78, 78, 19, 19, - 110, 110, 111, 111, 111, 111, 58, 112, 112, 113, - 59, 115, 115, 116, 116, 117, 117, 82, 118, 118, - 118, 118, 118, 123, 123, 124, 124, 125, 125, 125, - 125, 125, 126, 127, 127, 122, 122, 119, 119, 121, - 121, 129, 129, 128, 128, 128, 128, 128, 128, 120, - 130, 130, 132, 131, 131, 60, 95, 133, 133, 54, - 54, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 24, + 24, 67, 67, 70, 70, 69, 68, 68, 61, 73, + 73, 74, 74, 75, 75, 76, 76, 25, 25, 26, + 26, 26, 26, 84, 84, 86, 86, 79, 79, 79, + 80, 80, 83, 83, 81, 81, 87, 88, 88, 55, + 55, 63, 63, 66, 66, 66, 65, 89, 89, 90, + 56, 56, 56, 56, 91, 91, 92, 92, 93, 93, + 94, 95, 95, 96, 96, 97, 97, 53, 53, 49, + 49, 99, 51, 51, 100, 50, 50, 52, 52, 62, + 62, 62, 62, 77, 77, 103, 103, 105, 105, 105, + 105, 104, 104, 104, 107, 107, 107, 85, 85, 109, + 109, 109, 108, 108, 110, 110, 111, 111, 111, 106, + 106, 78, 78, 78, 19, 19, 112, 112, 113, 113, + 113, 113, 58, 114, 114, 115, 59, 117, 117, 118, + 118, 119, 119, 82, 120, 120, 120, 120, 120, 120, + 125, 125, 126, 126, 127, 127, 127, 127, 127, 128, + 129, 129, 124, 124, 121, 121, 123, 123, 131, 131, + 130, 130, 130, 130, 130, 130, 122, 132, 132, 134, + 133, 133, 60, 98, 135, 135, 54, 54, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, @@ -874,20 +879,20 @@ class Php7 extends \PhpParser\ParserAbstract 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 140, 134, 134, 139, 139, 142, 143, - 143, 144, 145, 145, 145, 18, 18, 71, 71, 71, - 71, 135, 135, 135, 135, 147, 147, 136, 136, 138, - 138, 138, 141, 141, 152, 152, 152, 152, 152, 152, - 152, 152, 152, 153, 153, 99, 155, 155, 155, 155, - 137, 137, 137, 137, 137, 137, 137, 137, 57, 57, - 150, 150, 150, 150, 156, 156, 146, 146, 146, 157, - 157, 157, 157, 157, 157, 72, 72, 64, 64, 64, - 64, 114, 114, 114, 114, 160, 159, 149, 149, 149, - 149, 149, 149, 149, 148, 148, 148, 158, 158, 158, - 158, 98, 154, 162, 162, 161, 161, 163, 163, 163, - 163, 163, 163, 163, 163, 151, 151, 151, 151, 165, - 166, 164, 164, 164, 164, 164, 164, 164, 164, 167, - 167, 167, 167 + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 142, 136, 136, 141, 141, 144, 145, 145, 146, 147, + 147, 147, 18, 18, 71, 71, 71, 71, 137, 137, + 137, 137, 149, 149, 138, 138, 140, 140, 140, 143, + 143, 154, 154, 154, 154, 154, 154, 154, 154, 154, + 155, 155, 102, 157, 157, 157, 157, 139, 139, 139, + 139, 139, 139, 139, 139, 57, 57, 152, 152, 152, + 152, 158, 158, 148, 148, 148, 159, 159, 159, 159, + 159, 159, 72, 72, 64, 64, 64, 64, 116, 116, + 116, 116, 162, 161, 151, 151, 151, 151, 151, 151, + 151, 150, 150, 150, 160, 160, 160, 160, 101, 156, + 164, 164, 163, 163, 165, 165, 165, 165, 165, 165, + 165, 165, 153, 153, 153, 153, 167, 168, 166, 166, + 166, 166, 166, 166, 166, 166, 169, 169, 169, 169 ); protected $ruleToLength = array( @@ -900,55 +905,55 @@ class Php7 extends \PhpParser\ParserAbstract 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, 0, 1, 0, 1, - 1, 2, 1, 3, 4, 1, 2, 0, 1, 1, - 1, 1, 1, 3, 5, 4, 3, 4, 2, 3, - 1, 1, 7, 6, 2, 3, 1, 2, 3, 1, - 2, 3, 1, 1, 3, 1, 3, 1, 2, 2, - 3, 1, 3, 2, 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, 6, 5, 6, 3, 2, 1, 1, 1, - 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, - 0, 1, 0, 1, 3, 1, 8, 9, 8, 7, - 6, 1, 2, 2, 0, 2, 0, 2, 0, 2, - 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, - 2, 1, 3, 3, 3, 4, 4, 5, 0, 2, - 4, 3, 1, 1, 7, 0, 2, 1, 3, 3, - 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, - 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, - 3, 0, 1, 1, 1, 6, 8, 6, 1, 2, - 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, - 1, 2, 1, 0, 1, 0, 2, 2, 2, 4, - 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, - 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, - 10, 3, 1, 1, 3, 0, 2, 4, 5, 4, - 4, 4, 3, 1, 1, 1, 1, 1, 1, 0, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, - 1, 3, 1, 1, 3, 2, 2, 3, 1, 0, - 1, 1, 3, 3, 3, 4, 1, 1, 2, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, + 1, 1, 2, 1, 3, 4, 1, 2, 0, 1, + 1, 1, 1, 1, 3, 5, 4, 3, 4, 2, + 3, 1, 1, 7, 6, 2, 3, 1, 2, 3, + 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, + 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, 2, 1, 1, + 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, + 3, 0, 1, 0, 1, 3, 1, 8, 9, 8, + 7, 6, 8, 0, 2, 0, 2, 1, 2, 2, + 0, 2, 0, 2, 0, 2, 2, 1, 3, 1, + 4, 1, 4, 1, 1, 4, 2, 1, 3, 3, + 3, 4, 4, 5, 0, 2, 4, 3, 1, 1, + 7, 0, 2, 1, 3, 3, 4, 1, 4, 0, + 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, + 2, 1, 1, 2, 0, 1, 3, 0, 1, 1, + 1, 6, 8, 6, 1, 2, 1, 1, 1, 1, + 1, 1, 3, 3, 3, 3, 1, 2, 1, 0, + 1, 0, 2, 2, 2, 4, 1, 3, 1, 2, + 2, 3, 2, 3, 1, 1, 2, 3, 1, 1, + 3, 2, 0, 1, 5, 5, 10, 3, 5, 1, + 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, + 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, + 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, + 3, 3, 4, 1, 1, 2, 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, 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, 2, 8, 9, 8, 9, 9, - 10, 9, 10, 8, 3, 2, 0, 4, 2, 1, - 3, 2, 2, 2, 4, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 0, 3, 0, - 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 3, 3, 4, 1, 1, 3, - 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, - 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, - 4, 4, 1, 4, 4, 0, 1, 1, 1, 3, - 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, - 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, - 1, 4, 1, 1, 1, 3, 1, 1, 2, 1, - 3, 4, 3, 2, 0, 2, 2, 1, 2, 1, - 1, 1, 4, 3, 3, 3, 3, 6, 3, 1, - 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, 10, 9, 10, + 8, 3, 2, 0, 4, 2, 1, 3, 2, 2, + 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 1, 1, 1, 0, 3, 0, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 4, 1, 1, 3, 1, 1, 1, + 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, + 1, 1, 1, 1, 3, 1, 1, 4, 4, 1, + 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, + 2, 2, 1, 3, 1, 4, 4, 3, 3, 3, + 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, + 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, + 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, + 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks() { @@ -1201,7 +1206,7 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos]; }, 82 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 83 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1213,7 +1218,7 @@ protected function initReduceCallbacks() { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 86 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 87 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1228,16 +1233,16 @@ protected function initReduceCallbacks() { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 91 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 92 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 93 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 94 => function ($stackPos) { - /* nothing */ + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 95 => function ($stackPos) { /* nothing */ @@ -1246,40 +1251,40 @@ protected function initReduceCallbacks() { /* nothing */ }, 97 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + /* nothing */ }, 98 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 99 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 100 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 101 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 102 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 103 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 104 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 105 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 106 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 107 => function ($stackPos) { - $this->semValue = []; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 108 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = []; }, 109 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -1291,129 +1296,129 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 112 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 113 => function ($stackPos) { + $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 114 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); $this->checkNamespace($this->semValue); }, - 114 => function ($stackPos) { + 115 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 115 => function ($stackPos) { + 116 => function ($stackPos) { $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 116 => function ($stackPos) { + 117 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 117 => function ($stackPos) { + 118 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 118 => function ($stackPos) { + 119 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 119 => function ($stackPos) { + 120 => function ($stackPos) { $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 120 => function ($stackPos) { + 121 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_FUNCTION; }, - 121 => function ($stackPos) { + 122 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_CONSTANT; }, - 122 => function ($stackPos) { + 123 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 123 => function ($stackPos) { + 124 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 124 => function ($stackPos) { + 125 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 125 => function ($stackPos) { + 126 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 126 => function ($stackPos) { + 127 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 127 => function ($stackPos) { + 128 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 128 => function ($stackPos) { + 129 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 129 => function ($stackPos) { + 130 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 130 => function ($stackPos) { + 131 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 131 => function ($stackPos) { + 132 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 132 => function ($stackPos) { + 133 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 133 => function ($stackPos) { + 134 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, - 134 => function ($stackPos) { + 135 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, - 135 => function ($stackPos) { + 136 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, - 136 => function ($stackPos) { + 137 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, - 137 => function ($stackPos) { + 138 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; }, - 138 => function ($stackPos) { + 139 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; }, - 139 => function ($stackPos) { + 140 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 140 => function ($stackPos) { + 141 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 141 => function ($stackPos) { + 142 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 142 => function ($stackPos) { + 143 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 143 => function ($stackPos) { + 144 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 144 => function ($stackPos) { + 145 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 145 => function ($stackPos) { + 146 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 146 => function ($stackPos) { + 147 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 147 => function ($stackPos) { + 148 => function ($stackPos) { if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; }, - 148 => function ($stackPos) { + 149 => function ($stackPos) { $this->semValue = array(); }, - 149 => function ($stackPos) { + 150 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 150 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, 151 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, @@ -1421,9 +1426,12 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 153 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 154 => function ($stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 155 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; @@ -1433,46 +1441,46 @@ protected function initReduceCallbacks() { } }, - 155 => function ($stackPos) { + 156 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 156 => function ($stackPos) { + 157 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 157 => function ($stackPos) { + 158 => function ($stackPos) { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 158 => function ($stackPos) { + 159 => function ($stackPos) { $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 159 => function ($stackPos) { + 160 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 160 => function ($stackPos) { + 161 => function ($stackPos) { $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 161 => function ($stackPos) { + 162 => function ($stackPos) { $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 162 => function ($stackPos) { + 163 => function ($stackPos) { $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 163 => function ($stackPos) { + 164 => function ($stackPos) { $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 164 => function ($stackPos) { + 165 => function ($stackPos) { $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 165 => function ($stackPos) { + 166 => function ($stackPos) { $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 166 => function ($stackPos) { + 167 => function ($stackPos) { $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 167 => function ($stackPos) { + 168 => function ($stackPos) { $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 168 => function ($stackPos) { + 169 => function ($stackPos) { $e = $this->semStack[$stackPos-(2-1)]; if ($e instanceof Expr\Throw_) { @@ -1484,1234 +1492,1253 @@ protected function initReduceCallbacks() { } }, - 169 => function ($stackPos) { + 170 => function ($stackPos) { $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 170 => function ($stackPos) { + 171 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 171 => function ($stackPos) { + 172 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 172 => function ($stackPos) { + 173 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 173 => function ($stackPos) { + 174 => function ($stackPos) { $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 174 => function ($stackPos) { + 175 => function ($stackPos) { $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); }, - 175 => function ($stackPos) { + 176 => function ($stackPos) { $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 176 => function ($stackPos) { + 177 => function ($stackPos) { $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 177 => function ($stackPos) { + 178 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, - 178 => function ($stackPos) { + 179 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 179 => function ($stackPos) { + 180 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, - 180 => function ($stackPos) { + 181 => function ($stackPos) { $this->semValue = array(); }, - 181 => function ($stackPos) { + 182 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 182 => function ($stackPos) { + 183 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 183 => function ($stackPos) { + 184 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 184 => function ($stackPos) { + 185 => function ($stackPos) { $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 185 => function ($stackPos) { + 186 => function ($stackPos) { $this->semValue = null; }, - 186 => function ($stackPos) { + 187 => function ($stackPos) { $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 187 => function ($stackPos) { + 188 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 188 => function ($stackPos) { + 189 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 189 => function ($stackPos) { + 190 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 190 => function ($stackPos) { + 191 => function ($stackPos) { $this->semValue = false; }, - 191 => function ($stackPos) { + 192 => function ($stackPos) { $this->semValue = true; }, - 192 => function ($stackPos) { + 193 => function ($stackPos) { $this->semValue = false; }, - 193 => function ($stackPos) { + 194 => function ($stackPos) { $this->semValue = true; }, - 194 => function ($stackPos) { + 195 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 195 => function ($stackPos) { + 196 => function ($stackPos) { $this->semValue = []; }, - 196 => function ($stackPos) { + 197 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 197 => function ($stackPos) { + 198 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 198 => function ($stackPos) { + 199 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(8-3)); }, - 199 => function ($stackPos) { + 200 => function ($stackPos) { $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkInterface($this->semValue, $stackPos-(7-3)); }, - 200 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, 201 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 202 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->checkEnum($this->semValue, $stackPos-(8-3)); }, 203 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = null; }, 204 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 205 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 206 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 207 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = 0; }, 208 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 209 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 210 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = null; }, 211 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 212 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array(); }, 213 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 214 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = array(); }, 215 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 216 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 217 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 218 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 219 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 220 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 221 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 222 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 223 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 224 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = null; }, 225 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 226 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 227 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 228 => function ($stackPos) { - $this->semValue = array(); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 229 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 230 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 231 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 232 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 233 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(5-3)]; }, 234 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = array(); }, 235 => function ($stackPos) { - $this->semValue = []; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 236 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 237 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 238 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 239 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 240 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 241 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = []; }, 242 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 243 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 244 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 245 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 246 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 247 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 248 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 249 => function ($stackPos) { - $this->semValue = null; + $this->semValue = array(); }, 250 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 251 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 252 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array(); }, 253 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 254 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 255 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = null; }, 256 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 257 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = null; }, 258 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 259 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 260 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 261 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 262 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 263 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 264 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = array(); }, 265 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 266 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 267 => function ($stackPos) { + $this->semValue = 0; + }, + 268 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + }, + 269 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + }, + 270 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + }, + 271 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, - 266 => function ($stackPos) { + 272 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); $this->checkParam($this->semValue); }, - 267 => function ($stackPos) { + 273 => function ($stackPos) { $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, - 268 => function ($stackPos) { + 274 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 269 => function ($stackPos) { + 275 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 270 => function ($stackPos) { + 276 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 271 => function ($stackPos) { + 277 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 272 => function ($stackPos) { + 278 => function ($stackPos) { $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 273 => function ($stackPos) { + 279 => function ($stackPos) { $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, - 274 => function ($stackPos) { + 280 => function ($stackPos) { $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 275 => function ($stackPos) { + 281 => function ($stackPos) { $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 276 => function ($stackPos) { + 282 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 277 => function ($stackPos) { + 283 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 278 => function ($stackPos) { + 284 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 279 => function ($stackPos) { + 285 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 280 => function ($stackPos) { + 286 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 281 => function ($stackPos) { + 287 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 282 => function ($stackPos) { + 288 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 283 => function ($stackPos) { + 289 => function ($stackPos) { $this->semValue = null; }, - 284 => function ($stackPos) { + 290 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 285 => function ($stackPos) { + 291 => function ($stackPos) { $this->semValue = null; }, - 286 => function ($stackPos) { + 292 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 287 => function ($stackPos) { + 293 => function ($stackPos) { $this->semValue = null; }, - 288 => function ($stackPos) { + 294 => function ($stackPos) { $this->semValue = array(); }, - 289 => function ($stackPos) { + 295 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 290 => function ($stackPos) { + 296 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 291 => function ($stackPos) { + 297 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 292 => function ($stackPos) { + 298 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 293 => function ($stackPos) { + 299 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 294 => function ($stackPos) { + 300 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 295 => function ($stackPos) { + 301 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, - 296 => function ($stackPos) { + 302 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 297 => function ($stackPos) { + 303 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 298 => function ($stackPos) { + 304 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 299 => function ($stackPos) { + 305 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 300 => function ($stackPos) { + 306 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 301 => function ($stackPos) { + 307 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 302 => function ($stackPos) { + 308 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 303 => function ($stackPos) { + 309 => function ($stackPos) { $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 304 => function ($stackPos) { + 310 => function ($stackPos) { $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 305 => function ($stackPos) { + 311 => function ($stackPos) { if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, - 306 => function ($stackPos) { + 312 => function ($stackPos) { $this->semValue = array(); }, - 307 => function ($stackPos) { + 313 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 308 => function ($stackPos) { + 314 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 309 => function ($stackPos) { + 315 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 310 => function ($stackPos) { + 316 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, - 311 => function ($stackPos) { + 317 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 312 => function ($stackPos) { + 318 => function ($stackPos) { + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 319 => function ($stackPos) { $this->semValue = null; /* will be skipped */ }, - 313 => function ($stackPos) { + 320 => function ($stackPos) { $this->semValue = array(); }, - 314 => function ($stackPos) { + 321 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 315 => function ($stackPos) { + 322 => function ($stackPos) { $this->semValue = array(); }, - 316 => function ($stackPos) { + 323 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 317 => function ($stackPos) { + 324 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 318 => function ($stackPos) { + 325 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 319 => function ($stackPos) { + 326 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 320 => function ($stackPos) { + 327 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 321 => function ($stackPos) { + 328 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 322 => function ($stackPos) { + 329 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 323 => function ($stackPos) { + 330 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 324 => function ($stackPos) { + 331 => function ($stackPos) { $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, - 325 => function ($stackPos) { + 332 => function ($stackPos) { $this->semValue = null; }, - 326 => function ($stackPos) { + 333 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 327 => function ($stackPos) { + 334 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 328 => function ($stackPos) { + 335 => function ($stackPos) { $this->semValue = 0; }, - 329 => function ($stackPos) { + 336 => function ($stackPos) { $this->semValue = 0; }, - 330 => function ($stackPos) { + 337 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 331 => function ($stackPos) { + 338 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 332 => function ($stackPos) { + 339 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 333 => function ($stackPos) { + 340 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, - 334 => function ($stackPos) { + 341 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, - 335 => function ($stackPos) { + 342 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, - 336 => function ($stackPos) { + 343 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, - 337 => function ($stackPos) { + 344 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, - 338 => function ($stackPos) { + 345 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, - 339 => function ($stackPos) { + 346 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 340 => function ($stackPos) { + 347 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 341 => function ($stackPos) { + 348 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 342 => function ($stackPos) { + 349 => function ($stackPos) { $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 343 => function ($stackPos) { + 350 => function ($stackPos) { $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 344 => function ($stackPos) { + 351 => function ($stackPos) { $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 345 => function ($stackPos) { + 352 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 346 => function ($stackPos) { + 353 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 347 => function ($stackPos) { + 354 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 348 => function ($stackPos) { + 355 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 349 => function ($stackPos) { + 356 => function ($stackPos) { $this->semValue = array(); }, - 350 => function ($stackPos) { + 357 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 351 => function ($stackPos) { + 358 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 352 => function ($stackPos) { + 359 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 353 => function ($stackPos) { + 360 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 354 => function ($stackPos) { + 361 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 355 => function ($stackPos) { + 362 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 356 => function ($stackPos) { + 363 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 357 => function ($stackPos) { + 364 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 358 => function ($stackPos) { + 365 => function ($stackPos) { $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 359 => function ($stackPos) { + 366 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 360 => function ($stackPos) { + 367 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 361 => function ($stackPos) { + 368 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 362 => function ($stackPos) { + 369 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 363 => function ($stackPos) { + 370 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 364 => function ($stackPos) { + 371 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 365 => function ($stackPos) { + 372 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 366 => function ($stackPos) { + 373 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 367 => function ($stackPos) { + 374 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 368 => function ($stackPos) { + 375 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 369 => function ($stackPos) { + 376 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 370 => function ($stackPos) { + 377 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 371 => function ($stackPos) { + 378 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 372 => function ($stackPos) { + 379 => function ($stackPos) { $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 373 => function ($stackPos) { + 380 => function ($stackPos) { $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 374 => function ($stackPos) { + 381 => function ($stackPos) { $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 375 => function ($stackPos) { + 382 => function ($stackPos) { $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 376 => function ($stackPos) { + 383 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 377 => function ($stackPos) { + 384 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 378 => function ($stackPos) { + 385 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 379 => function ($stackPos) { + 386 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 380 => function ($stackPos) { + 387 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 381 => function ($stackPos) { + 388 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 382 => function ($stackPos) { + 389 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 383 => function ($stackPos) { + 390 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 384 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 385 => function ($stackPos) { + 392 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 386 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 387 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 388 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 389 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 390 => function ($stackPos) { + 397 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 391 => function ($stackPos) { + 398 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 392 => function ($stackPos) { + 399 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 393 => function ($stackPos) { + 400 => function ($stackPos) { $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 394 => function ($stackPos) { + 401 => function ($stackPos) { $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 395 => function ($stackPos) { + 402 => function ($stackPos) { $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { + 403 => function ($stackPos) { $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 397 => function ($stackPos) { + 404 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 398 => function ($stackPos) { + 405 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 399 => function ($stackPos) { + 406 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 400 => function ($stackPos) { + 407 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 401 => function ($stackPos) { + 408 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 402 => function ($stackPos) { + 409 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 403 => function ($stackPos) { + 410 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 404 => function ($stackPos) { + 411 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 405 => function ($stackPos) { + 412 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 406 => function ($stackPos) { + 413 => function ($stackPos) { $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 407 => function ($stackPos) { + 414 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 408 => function ($stackPos) { + 415 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 409 => function ($stackPos) { + 416 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 410 => function ($stackPos) { + 417 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 411 => function ($stackPos) { + 418 => function ($stackPos) { $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 412 => function ($stackPos) { + 419 => function ($stackPos) { $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 413 => function ($stackPos) { + 420 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 414 => function ($stackPos) { + 421 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 415 => function ($stackPos) { + 422 => function ($stackPos) { $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 416 => function ($stackPos) { + 423 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 417 => function ($stackPos) { + 424 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 418 => function ($stackPos) { + 425 => function ($stackPos) { $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 419 => function ($stackPos) { + 426 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 420 => function ($stackPos) { + 427 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 421 => function ($stackPos) { + 428 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 422 => function ($stackPos) { + 429 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 423 => function ($stackPos) { + 430 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 424 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 425 => function ($stackPos) { + 432 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 426 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 427 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 428 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 429 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 431 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 432 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 447 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 441 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 443 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 444 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 445 => function ($stackPos) { + 452 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 446 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = array(); }, - 447 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 448 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 449 => function ($stackPos) { + 456 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 450 => function ($stackPos) { + 457 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 451 => function ($stackPos) { + 458 => function ($stackPos) { $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 452 => function ($stackPos) { + 459 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 455 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 457 => function ($stackPos) { + 464 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 458 => function ($stackPos) { + 465 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 467 => function ($stackPos) { $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 461 => function ($stackPos) { + 468 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 462 => function ($stackPos) { + 469 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 463 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 464 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, - 465 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 466 => function ($stackPos) { + 473 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 467 => function ($stackPos) { + 474 => function ($stackPos) { $this->semValue = null; }, - 468 => function ($stackPos) { + 475 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 469 => function ($stackPos) { + 476 => function ($stackPos) { $this->semValue = array(); }, - 470 => function ($stackPos) { + 477 => function ($stackPos) { $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 471 => function ($stackPos) { + 478 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 472 => function ($stackPos) { + 479 => function ($stackPos) { $this->semValue = array(); }, - 473 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 474 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 475 => function ($stackPos) { + 482 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 476 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 477 => function ($stackPos) { + 484 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 478 => function ($stackPos) { + 485 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 479 => function ($stackPos) { + 486 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 480 => function ($stackPos) { + 487 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 481 => function ($stackPos) { + 488 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 482 => function ($stackPos) { + 489 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 483 => function ($stackPos) { + 490 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 484 => function ($stackPos) { + 491 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, - 485 => function ($stackPos) { + 492 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 486 => function ($stackPos) { + 493 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 487 => function ($stackPos) { + 494 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 488 => function ($stackPos) { + 495 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)]), $attrs); }, - 489 => function ($stackPos) { + 496 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, - 490 => function ($stackPos) { + 497 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 491 => function ($stackPos) { + 498 => function ($stackPos) { $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 492 => function ($stackPos) { + 499 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 493 => function ($stackPos) { + 500 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 494 => function ($stackPos) { + 501 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 495 => function ($stackPos) { + 502 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, - 496 => function ($stackPos) { + 503 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, - 497 => function ($stackPos) { + 504 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, - 498 => function ($stackPos) { + 505 => function ($stackPos) { $this->semValue = null; }, - 499 => function ($stackPos) { + 506 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 500 => function ($stackPos) { + 507 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 501 => function ($stackPos) { + 508 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 502 => function ($stackPos) { + 509 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 503 => function ($stackPos) { + 510 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 504 => function ($stackPos) { + 511 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 505 => function ($stackPos) { + 512 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 506 => function ($stackPos) { + 513 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 507 => function ($stackPos) { + 514 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 508 => function ($stackPos) { + 515 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 509 => function ($stackPos) { + 516 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 510 => function ($stackPos) { + 517 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 511 => function ($stackPos) { + 518 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 512 => function ($stackPos) { + 519 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 513 => function ($stackPos) { + 520 => function ($stackPos) { $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 514 => function ($stackPos) { + 521 => function ($stackPos) { $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 515 => function ($stackPos) { + 522 => function ($stackPos) { $this->semValue = null; }, - 516 => function ($stackPos) { + 523 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 517 => function ($stackPos) { + 524 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 518 => function ($stackPos) { + 525 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 519 => function ($stackPos) { + 526 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 520 => function ($stackPos) { + 527 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 521 => function ($stackPos) { + 528 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 522 => function ($stackPos) { + 529 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 523 => function ($stackPos) { + 530 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 524 => function ($stackPos) { + 531 => function ($stackPos) { $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, - 525 => function ($stackPos) { + 532 => function ($stackPos) { $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, - 526 => function ($stackPos) { + 533 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 527 => function ($stackPos) { + 534 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 528 => function ($stackPos) { + 535 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 529 => function ($stackPos) { + 536 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 530 => function ($stackPos) { + 537 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 531 => function ($stackPos) { + 538 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 532 => function ($stackPos) { + 539 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 533 => function ($stackPos) { + 540 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 534 => function ($stackPos) { + 541 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 535 => function ($stackPos) { + 542 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 536 => function ($stackPos) { + 543 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 537 => function ($stackPos) { + 544 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 538 => function ($stackPos) { + 545 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 539 => function ($stackPos) { + 546 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 540 => function ($stackPos) { + 547 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, - 541 => function ($stackPos) { + 548 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 542 => function ($stackPos) { + 549 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, - 543 => function ($stackPos) { + 550 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 544 => function ($stackPos) { + 551 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, - 545 => function ($stackPos) { + 552 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 546 => function ($stackPos) { + 553 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 547 => function ($stackPos) { + 554 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 548 => function ($stackPos) { + 555 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 549 => function ($stackPos) { + 556 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 550 => function ($stackPos) { + 557 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 551 => function ($stackPos) { + 558 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 552 => function ($stackPos) { + 559 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 553 => function ($stackPos) { + 560 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 554 => function ($stackPos) { + 561 => function ($stackPos) { $this->semValue = null; }, - 555 => function ($stackPos) { + 562 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 556 => function ($stackPos) { + 563 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 557 => function ($stackPos) { + 564 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 558 => function ($stackPos) { + 565 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, - 559 => function ($stackPos) { + 566 => function ($stackPos) { $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 560 => function ($stackPos) { + 567 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 561 => function ($stackPos) { + 568 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 562 => function ($stackPos) { + 569 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 563 => function ($stackPos) { + 570 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 564 => function ($stackPos) { + 571 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 565 => function ($stackPos) { + 572 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 566 => function ($stackPos) { + 573 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 567 => function ($stackPos) { + 574 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 568 => function ($stackPos) { + 575 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 569 => function ($stackPos) { + 576 => function ($stackPos) { $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 570 => function ($stackPos) { + 577 => function ($stackPos) { $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 571 => function ($stackPos) { + 578 => function ($stackPos) { $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 572 => function ($stackPos) { + 579 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/Parser/Tokens.php b/lib/PhpParser/Parser/Tokens.php index 07cab217a8..ed5ead224d 100644 --- a/lib/PhpParser/Parser/Tokens.php +++ b/lib/PhpParser/Parser/Tokens.php @@ -114,32 +114,32 @@ final class Tokens const T_CLASS = 362; const T_TRAIT = 363; const T_INTERFACE = 364; - const T_EXTENDS = 365; - const T_IMPLEMENTS = 366; - const T_OBJECT_OPERATOR = 367; - const T_NULLSAFE_OBJECT_OPERATOR = 368; - const T_LIST = 369; - const T_ARRAY = 370; - const T_CALLABLE = 371; - const T_CLASS_C = 372; - const T_TRAIT_C = 373; - const T_METHOD_C = 374; - const T_FUNC_C = 375; - const T_LINE = 376; - const T_FILE = 377; - const T_START_HEREDOC = 378; - const T_END_HEREDOC = 379; - const T_DOLLAR_OPEN_CURLY_BRACES = 380; - const T_CURLY_OPEN = 381; - const T_PAAMAYIM_NEKUDOTAYIM = 382; - const T_NAMESPACE = 383; - const T_NS_C = 384; - const T_DIR = 385; - const T_NS_SEPARATOR = 386; - const T_ELLIPSIS = 387; - const T_NAME_FULLY_QUALIFIED = 388; - const T_NAME_QUALIFIED = 389; - const T_NAME_RELATIVE = 390; - const T_ATTRIBUTE = 391; - const T_ENUM = 392; + const T_ENUM = 365; + const T_EXTENDS = 366; + const T_IMPLEMENTS = 367; + const T_OBJECT_OPERATOR = 368; + const T_NULLSAFE_OBJECT_OPERATOR = 369; + const T_LIST = 370; + const T_ARRAY = 371; + const T_CALLABLE = 372; + const T_CLASS_C = 373; + const T_TRAIT_C = 374; + const T_METHOD_C = 375; + const T_FUNC_C = 376; + const T_LINE = 377; + const T_FILE = 378; + const T_START_HEREDOC = 379; + const T_END_HEREDOC = 380; + const T_DOLLAR_OPEN_CURLY_BRACES = 381; + const T_CURLY_OPEN = 382; + const T_PAAMAYIM_NEKUDOTAYIM = 383; + const T_NAMESPACE = 384; + const T_NS_C = 385; + const T_DIR = 386; + const T_NS_SEPARATOR = 387; + const T_ELLIPSIS = 388; + const T_NAME_FULLY_QUALIFIED = 389; + const T_NAME_QUALIFIED = 390; + const T_NAME_RELATIVE = 391; + const T_ATTRIBUTE = 392; } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index b7a9d1b866..0600b98008 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -16,6 +16,7 @@ use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassConst; use PhpParser\Node\Stmt\ClassMethod; +use PhpParser\Node\Stmt\Enum_; use PhpParser\Node\Stmt\Interface_; use PhpParser\Node\Stmt\Namespace_; use PhpParser\Node\Stmt\Property; @@ -912,22 +913,17 @@ protected function checkNamespace(Namespace_ $node) { } } - protected function checkClass(Class_ $node, $namePos) { - if (null !== $node->name && $node->name->isSpecialClassName()) { + private function checkClassName($name, $namePos) { + if (null !== $name && $name->isSpecialClassName()) { $this->emitError(new Error( - sprintf('Cannot use \'%s\' as class name as it is reserved', $node->name), + sprintf('Cannot use \'%s\' as class name as it is reserved', $name), $this->getAttributesAt($namePos) )); } + } - if ($node->extends && $node->extends->isSpecialClassName()) { - $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) { + private function checkImplementedInterfaces(array $interfaces) { + foreach ($interfaces as $interface) { if ($interface->isSpecialClassName()) { $this->emitError(new Error( sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), @@ -937,22 +933,27 @@ protected function checkClass(Class_ $node, $namePos) { } } - protected function checkInterface(Interface_ $node, $namePos) { - if (null !== $node->name && $node->name->isSpecialClassName()) { + protected function checkClass(Class_ $node, $namePos) { + $this->checkClassName($node->name, $namePos); + + if ($node->extends && $node->extends->isSpecialClassName()) { $this->emitError(new Error( - sprintf('Cannot use \'%s\' as class name as it is reserved', $node->name), - $this->getAttributesAt($namePos) + sprintf('Cannot use \'%s\' as class name as it is reserved', $node->extends), + $node->extends->getAttributes() )); } - foreach ($node->extends as $interface) { - if ($interface->isSpecialClassName()) { - $this->emitError(new Error( - sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface), - $interface->getAttributes() - )); - } - } + $this->checkImplementedInterfaces($node->implements); + } + + protected function checkInterface(Interface_ $node, $namePos) { + $this->checkClassName($node->name, $namePos); + $this->checkImplementedInterfaces($node->extends); + } + + protected function checkEnum(Enum_ $node, $namePos) { + $this->checkClassName($node->name, $namePos); + $this->checkImplementedInterfaces($node->implements); } protected function checkClassMethod(ClassMethod $node, $modifierPos) { diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 636129d553..5453b30d5b 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -727,6 +727,13 @@ protected function pStmt_Interface(Stmt\Interface_ $node) { . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } + protected function pStmt_Enum(Stmt\Enum_ $node) { + return $this->pAttrGroups($node->attrGroups) + . 'enum ' . $node->name + . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') + . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + protected function pStmt_Class(Stmt\Class_ $node) { return $this->pClassCommon($node, ' ' . $node->name); } @@ -737,6 +744,13 @@ protected function pStmt_Trait(Stmt\Trait_ $node) { . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } + protected function pStmt_EnumCase(Stmt\EnumCase $node) { + return $this->pAttrGroups($node->attrGroups) + . 'case ' . $node->name + . ($node->expr ? ' = ' . $this->p($node->expr) : '') + . ';'; + } + protected function pStmt_TraitUse(Stmt\TraitUse $node) { return 'use ' . $this->pCommaSeparated($node->traits) . (empty($node->adaptations) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 804026eff6..f453db0919 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1242,7 +1242,7 @@ protected function initializeFixupMap() { /** * Lazily initializes the removal map. * - * The removal map is used to determine which additional tokens should be returned when a + * The removal map is used to determine which additional tokens should be removed when a * certain node is replaced by null. */ protected function initializeRemovalMap() { @@ -1269,6 +1269,8 @@ protected function initializeRemovalMap() { 'Stmt_Catch->var' => $stripLeft, 'Stmt_ClassMethod->returnType' => $stripColon, 'Stmt_Class->extends' => ['left' => \T_EXTENDS], + 'Stmt_Enum->scalarType' => $stripColon, + 'Stmt_EnumCase->expr' => $stripEquals, 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], 'Stmt_Continue->num' => $stripBoth, 'Stmt_Foreach->keyVar' => $stripDoubleArrow, @@ -1307,6 +1309,8 @@ protected function initializeInsertionMap() { 'Stmt_Catch->var' => [null, false, ' ', null], 'Stmt_ClassMethod->returnType' => [')', false, ' : ', null], 'Stmt_Class->extends' => [null, false, ' extends ', null], + 'Stmt_Enum->scalarType' => [null, false, ' : ', null], + 'Stmt_EnumCase->expr' => [null, false, ' = ', null], 'Expr_PrintableNewAnonClass->extends' => [null, ' extends ', null], 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], @@ -1356,6 +1360,7 @@ protected function initializeListInsertionMap() { 'Stmt_ClassConst->consts' => ', ', 'Stmt_ClassMethod->params' => ', ', 'Stmt_Class->implements' => ', ', + 'Stmt_Enum->implements' => ', ', 'Expr_PrintableNewAnonClass->implements' => ', ', 'Stmt_Const->consts' => ', ', 'Stmt_Declare->declares' => ', ', @@ -1382,6 +1387,7 @@ protected function initializeListInsertionMap() { 'Stmt_Case->stmts' => "\n", 'Stmt_Catch->stmts' => "\n", 'Stmt_Class->stmts' => "\n", + 'Stmt_Enum->stmts' => "\n", 'Expr_PrintableNewAnonClass->stmts' => "\n", 'Stmt_Interface->stmts' => "\n", 'Stmt_Trait->stmts' => "\n", @@ -1397,6 +1403,8 @@ protected function initializeListInsertionMap() { 'Stmt_If->stmts' => "\n", 'Stmt_Namespace->stmts' => "\n", 'Stmt_Class->attrGroups' => "\n", + 'Stmt_Enum->attrGroups' => "\n", + 'Stmt_EnumCase->attrGroups' => "\n", 'Stmt_Interface->attrGroups' => "\n", 'Stmt_Trait->attrGroups' => "\n", 'Stmt_Function->attrGroups' => "\n", @@ -1435,6 +1443,7 @@ protected function initializeEmptyListInsertionMap() { 'Expr_PrintableNewAnonClass->implements' => [null, ' implements ', ''], 'Expr_StaticCall->args' => ['(', '', ''], 'Stmt_Class->implements' => [null, ' implements ', ''], + 'Stmt_Enum->implements' => [null, ' implements ', ''], 'Stmt_ClassMethod->params' => ['(', '', ''], 'Stmt_Interface->extends' => [null, ' extends ', ''], 'Stmt_Function->params' => ['(', '', ''], diff --git a/test/code/formatPreservation/enum.test b/test/code/formatPreservation/enum.test new file mode 100644 index 0000000000..c6abcbf74c --- /dev/null +++ b/test/code/formatPreservation/enum.test @@ -0,0 +1,100 @@ +Enum formatting preservation +----- +scalarType = null; +----- +stmts[0]->expr = null; +----- +scalarType = new Node\Identifier('int'); +----- +scalarType = new Node\Identifier('int'); +----- +stmts[0]->expr = new Scalar\LNumber(1); +----- +stmts[] = new Node\Stmt\EnumCase('C'); +----- +implements[] = new Node\Name('Z'); +----- +implements[] = new Node\Name('Y'); +----- + Date: Sun, 25 Apr 2021 21:22:15 +0200 Subject: [PATCH 004/428] Use hex escaping for special characters in strings Apart from \0, using the \xHH notation is more typical. --- lib/PhpParser/PrettyPrinter/Standard.php | 10 +++------- test/code/prettyPrinter/expr/stringEscaping.test | 8 ++++---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 5453b30d5b..9378df112a 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -999,13 +999,9 @@ protected function escapeString($string, $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; + return preg_replace_callback('/[\x00-\x08\x0e-\x1f]/', function ($matches) { + $hex = dechex(ord($matches[0]));; + return '\\x' . str_pad($hex, 2, '0', \STR_PAD_LEFT); }, $escaped); } diff --git a/test/code/prettyPrinter/expr/stringEscaping.test b/test/code/prettyPrinter/expr/stringEscaping.test index 5d114b814e..c2c7679f88 100644 --- a/test/code/prettyPrinter/expr/stringEscaping.test +++ b/test/code/prettyPrinter/expr/stringEscaping.test @@ -15,13 +15,13 @@ 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"; +"\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"; +"\x000\x001"; "äöü"; << Date: Sun, 25 Apr 2021 21:36:22 +0200 Subject: [PATCH 005/428] Escape invalid UTF-8 in strings To be friendlier to tooling that expects PHP files to be UTF-8 encoded, escape any sequences that are not legal under UTF-8. --- lib/PhpParser/PrettyPrinter/Standard.php | 20 +++++++++++++++++-- .../prettyPrinter/expr/stringEscaping.test | 4 ++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 9378df112a..7eb995c8f8 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -998,8 +998,24 @@ protected function escapeString($string, $quote) { $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\"); } - // Escape other control characters - return preg_replace_callback('/[\x00-\x08\x0e-\x1f]/', function ($matches) { + // Escape control characters and non-UTF-8 characters. + // Regex taken from https://stackoverflow.com/a/11709412/385378. + $regex = '/( + [\x00-\x08\x0E-\x1F] # Control characters + | [\xC0-\xC1] # Invalid UTF-8 Bytes + | [\xF5-\xFF] # Invalid UTF-8 Bytes + | \xE0[\x80-\x9F] # Overlong encoding of prior code point + | \xF0[\x80-\x8F] # Overlong encoding of prior code point + | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start + | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start + | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start + | (?<=[\x00-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle + | (? Date: Sun, 25 Apr 2021 21:47:07 +0200 Subject: [PATCH 006/428] Make sure match is one character long --- lib/PhpParser/PrettyPrinter/Standard.php | 7 ++++--- test/code/prettyPrinter/expr/stringEscaping.test | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 7eb995c8f8..14496ceb3c 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -999,13 +999,13 @@ protected function escapeString($string, $quote) { } // Escape control characters and non-UTF-8 characters. - // Regex taken from https://stackoverflow.com/a/11709412/385378. + // Regex based on https://stackoverflow.com/a/11709412/385378. $regex = '/( [\x00-\x08\x0E-\x1F] # Control characters | [\xC0-\xC1] # Invalid UTF-8 Bytes | [\xF5-\xFF] # Invalid UTF-8 Bytes - | \xE0[\x80-\x9F] # Overlong encoding of prior code point - | \xF0[\x80-\x8F] # Overlong encoding of prior code point + | \xE0(?=[\x80-\x9F]) # Overlong encoding of prior code point + | \xF0(?=[\x80-\x8F]) # Overlong encoding of prior code point | [\xC2-\xDF](?![\x80-\xBF]) # Invalid UTF-8 Sequence Start | [\xE0-\xEF](?![\x80-\xBF]{2}) # Invalid UTF-8 Sequence Start | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start @@ -1016,6 +1016,7 @@ protected function escapeString($string, $quote) { | (?<=[\xF0-\xF4][\x80-\xBF])[\x80-\xBF](?![\x80-\xBF]) # Short 4 byte sequence (2) )/x'; return preg_replace_callback($regex, function ($matches) { + assert(strlen($matches[0]) === 1); $hex = dechex(ord($matches[0]));; return '\\x' . str_pad($hex, 2, '0', \STR_PAD_LEFT); }, $escaped); diff --git a/test/code/prettyPrinter/expr/stringEscaping.test b/test/code/prettyPrinter/expr/stringEscaping.test index c2861e6146..fd17462cb5 100644 --- a/test/code/prettyPrinter/expr/stringEscaping.test +++ b/test/code/prettyPrinter/expr/stringEscaping.test @@ -7,6 +7,7 @@ Escape sequences in double-quoted strings "äöü"; "\xc0\x80"; "\xd0\x01"; +"\xf0\x80\x80"; << Date: Sun, 25 Apr 2021 22:19:49 +0200 Subject: [PATCH 007/428] Fix precedence of arrow functions Arrow functions should have lowest precedence. Fixes #769. --- grammar/php7.y | 8 +- grammar/tokens.y | 2 +- lib/PhpParser/Parser/Php7.php | 32 +++---- test/code/parser/expr/arrow_function.test | 89 +++++++++++++++++++ .../prettyPrinter/expr/arrow_function.test | 4 + 5 files changed, 114 insertions(+), 21 deletions(-) diff --git a/grammar/php7.y b/grammar/php7.y index e85c1c71ca..3c34398d6d 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -843,18 +843,18 @@ expr: | T_YIELD_FROM expr { $$ = Expr\YieldFrom[$2]; } | T_THROW expr { $$ = Expr\Throw_[$2]; } - | T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr + | T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW { $$ = Expr\ArrowFunction[['static' => false, 'byRef' => $2, 'params' => $4, 'returnType' => $6, 'expr' => $8, 'attrGroups' => []]]; } - | T_STATIC T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr + | T_STATIC T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW { $$ = Expr\ArrowFunction[['static' => true, 'byRef' => $3, 'params' => $5, 'returnType' => $7, 'expr' => $9, 'attrGroups' => []]]; } | T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error { $$ = Expr\Closure[['static' => false, 'byRef' => $2, 'params' => $4, 'uses' => $6, 'returnType' => $7, 'stmts' => $8, 'attrGroups' => []]]; } | T_STATIC T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error { $$ = Expr\Closure[['static' => true, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => []]]; } - | attributes T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr + | attributes T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW { $$ = Expr\ArrowFunction[['static' => false, 'byRef' => $3, 'params' => $5, 'returnType' => $7, 'expr' => $9, 'attrGroups' => $1]]; } - | attributes T_STATIC T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr + | attributes T_STATIC T_FN optional_ref '(' parameter_list ')' optional_return_type T_DOUBLE_ARROW expr %prec T_THROW { $$ = Expr\ArrowFunction[['static' => true, 'byRef' => $4, 'params' => $6, 'returnType' => $8, 'expr' => $10, 'attrGroups' => $1]]; } | attributes T_FUNCTION optional_ref '(' parameter_list ')' lexical_vars optional_return_type block_or_error { $$ = Expr\Closure[['static' => false, 'byRef' => $3, 'params' => $5, 'uses' => $7, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => $1]]; } diff --git a/grammar/tokens.y b/grammar/tokens.y index 1ce52f93fd..88d4498bfa 100644 --- a/grammar/tokens.y +++ b/grammar/tokens.y @@ -112,4 +112,4 @@ %token T_NAME_QUALIFIED %token T_NAME_RELATIVE %token T_ATTRIBUTE -%token T_ENUM \ No newline at end of file +%token T_ENUM diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index e7bb199667..c56685c210 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -504,8 +504,8 @@ class Php7 extends \PhpParser\ParserAbstract 1002, 1007, 916, 917, 757, 918, 919, 920, 921, 1003, 846, 998, 1004, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, - 287, 287, 287, 287, 287, 636, 38, 135, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 636, + 38, 135, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 157, 157, 157, 204, 828, 828, 8, 602, 162, 948, 948, 948, 948, 948, 948, 948, 948, 948, @@ -574,7 +574,7 @@ class Php7 extends \PhpParser\ParserAbstract 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 287, 287, 287, 287, 287, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 695, 695, 287, 0, @@ -618,10 +618,10 @@ class Php7 extends \PhpParser\ParserAbstract 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767, 441, 420, 421, 423, 424, 355, 506, 560, 298, 557, 354, 143, 310, 300, 229, 301, 245, - 246, 206, 272, 351, 147, 385, 438, 387, 436, 440, - 386, 361, 366, 367, 368, 369, 370, 371, 372, 373, - 374, 375, 376, 377, 378, 359, 360, 439, 442, 443, - 446, 447, 417, 416, 415, 383,32767,32767, 384, 358, + 442, 246, 443, 446, 447, 206, 272, 351, 147, 385, + 438, 387, 436, 440, 386, 361, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 375, 376, 377, 378, 359, + 360, 439, 417, 416, 415, 383,32767,32767, 384, 358, 388,32767,32767,32767,32767,32767,32767,32767,32767, 100, 32767, 390, 389, 406, 407, 404, 405, 408,32767, 409, 410, 411, 412,32767,32767,32767,32767, 336, 334, 397, @@ -674,19 +674,19 @@ class Php7 extends \PhpParser\ParserAbstract 191, 191, 661, 403, 634, 453, 1237, 1238, 397, 300, 301, 321, 555, 306, 402, 322, 404, 613, 1038, 1039, 669, 315, 315, 315, 315, 162, 162, 162, 162, 188, - 188, 172, 174, 211, 192, 206, 188, 188, 188, 188, + 188, 172, 174, 215, 192, 210, 188, 188, 188, 188, 188, 189, 189, 189, 189, 189, 189, 183, 184, 185, - 186, 187, 208, 206, 209, 513, 514, 393, 515, 517, + 186, 187, 212, 210, 213, 513, 514, 393, 515, 517, 518, 519, 520, 521, 522, 523, 524, 1065, 163, 164, 165, 190, 166, 167, 168, 161, 169, 170, 171, 173, - 205, 207, 210, 232, 235, 238, 240, 251, 252, 253, + 209, 211, 214, 232, 235, 238, 240, 251, 252, 253, 254, 255, 256, 257, 259, 260, 261, 262, 269, 270, - 303, 304, 305, 398, 399, 400, 560, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - 225, 226, 175, 227, 176, 193, 194, 195, 233, 183, - 184, 185, 186, 187, 208, 1065, 196, 177, 178, 179, - 197, 193, 180, 234, 198, 160, 199, 228, 181, 200, - 229, 230, 182, 231, 201, 202, 203, 204, 814, 586, + 303, 304, 305, 398, 399, 400, 560, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 175, 231, 176, 193, 194, 195, 233, 183, + 184, 185, 186, 187, 212, 1065, 196, 177, 178, 179, + 197, 193, 180, 234, 198, 160, 199, 200, 181, 201, + 202, 203, 182, 204, 205, 206, 207, 208, 814, 586, 600, 603, 604, 605, 606, 625, 626, 627, 671, 811, 599, 599, 539, 530, 577, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 1194, 280, 280, 280, 280, 997, diff --git a/test/code/parser/expr/arrow_function.test b/test/code/parser/expr/arrow_function.test index 96cd526539..6b1cf36e31 100644 --- a/test/code/parser/expr/arrow_function.test +++ b/test/code/parser/expr/arrow_function.test @@ -7,6 +7,9 @@ static fn(&$x) => $x; fn&($x) => $x; fn($x, ...$rest) => $rest; fn(): int => $x; + +fn($a, $b) => $a and $b; +fn($a, $b) => $a && $b; ----- !!php7 array( @@ -172,4 +175,90 @@ array( ) ) ) + 6: Stmt_Expression( + expr: Expr_ArrowFunction( + attrGroups: array( + ) + static: false + byRef: false + params: array( + 0: Param( + attrGroups: array( + ) + flags: 0 + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: a + ) + default: null + ) + 1: Param( + attrGroups: array( + ) + flags: 0 + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: b + ) + default: null + ) + ) + returnType: null + expr: Expr_BinaryOp_LogicalAnd( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + ) + ) + 7: Stmt_Expression( + expr: Expr_ArrowFunction( + attrGroups: array( + ) + static: false + byRef: false + params: array( + 0: Param( + attrGroups: array( + ) + flags: 0 + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: a + ) + default: null + ) + 1: Param( + attrGroups: array( + ) + flags: 0 + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: b + ) + default: null + ) + ) + returnType: null + expr: Expr_BinaryOp_BooleanAnd( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + ) + ) ) \ No newline at end of file diff --git a/test/code/prettyPrinter/expr/arrow_function.test b/test/code/prettyPrinter/expr/arrow_function.test index fe8d8791b5..78a684c81e 100644 --- a/test/code/prettyPrinter/expr/arrow_function.test +++ b/test/code/prettyPrinter/expr/arrow_function.test @@ -8,6 +8,8 @@ fn(&$x) => $x; fn&($x) => $x; static fn($x, ...$rest) => $rest; fn(): int => $x; +fn($a, $b) => $a and $b; +fn($a, $b) => $a && $b; ----- !!php7 fn($a) => $a; @@ -16,3 +18,5 @@ fn(&$x) => $x; fn&($x) => $x; static fn($x, ...$rest) => $rest; fn(): int => $x; +fn($a, $b) => $a and $b; +fn($a, $b) => $a && $b; \ No newline at end of file From 8eb194ea1f8b9f77a51df28c865a2d84cfc6c7cb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 25 Apr 2021 22:35:28 +0200 Subject: [PATCH 008/428] Add never type This should be recognized as Identifier instead of Name now. --- lib/PhpParser/ParserAbstract.php | 1 + test/code/parser/stmt/function/neverType.test | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 test/code/parser/stmt/function/neverType.test diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 0600b98008..c61208b072 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -663,6 +663,7 @@ protected function handleBuiltinTypes(Name $name) { 'null' => true, 'false' => true, 'mixed' => true, + 'never' => true, ]; if (!$name->isUnqualified()) { diff --git a/test/code/parser/stmt/function/neverType.test b/test/code/parser/stmt/function/neverType.test new file mode 100644 index 0000000000..7842e8a2a4 --- /dev/null +++ b/test/code/parser/stmt/function/neverType.test @@ -0,0 +1,23 @@ +Never type +----- + Date: Sun, 25 Apr 2021 22:42:18 +0200 Subject: [PATCH 009/428] Check for \r as newline in closing tag Fixes #761. --- lib/PhpParser/Lexer.php | 3 ++- .../code/prettyPrinter/inlineHTMLandPHPtest.file-test | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 1826c615fb..e29e4b91fb 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -322,7 +322,8 @@ public function getNextToken(&$value = null, &$startAttributes = null, &$endAttr $value = $token[1]; $id = $this->tokenMap[$token[0]]; if (\T_CLOSE_TAG === $token[0]) { - $this->prevCloseTagHasNewline = false !== strpos($token[1], "\n"); + $this->prevCloseTagHasNewline = false !== strpos($token[1], "\n") + || false !== strpos($token[1], "\r"); } elseif (\T_INLINE_HTML === $token[0]) { $startAttributes['hasLeadingNewline'] = $this->prevCloseTagHasNewline; } diff --git a/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test b/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test index b33eb527df..bc91a74f45 100644 --- a/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test +++ b/test/code/prettyPrinter/inlineHTMLandPHPtest.file-test @@ -55,4 +55,13 @@ HTMLHTML ----- HTMLHTML \ No newline at end of file +?>HTML +----- +@@{ "\r\r\n" }@@Test +----- +@@{ "\n\n" }@@Test \ No newline at end of file From 37ac4ea9c20ffd121ea63b7a4532ad730305f11c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 25 Apr 2021 22:47:15 +0200 Subject: [PATCH 010/428] Document that namespaced names containing whitespace are not supported --- doc/0_Introduction.markdown | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/0_Introduction.markdown b/doc/0_Introduction.markdown index 433cf10499..b300e733bc 100644 --- a/doc/0_Introduction.markdown +++ b/doc/0_Introduction.markdown @@ -1,7 +1,7 @@ Introduction ============ -This project is a PHP 5.2 to PHP 7.4 parser **written in PHP itself**. +This project is a PHP 5.2 to PHP 8.0 parser **written in PHP itself**. What is this for? ----------------- @@ -26,7 +26,11 @@ programmatic PHP code analysis are incidentally PHP developers, not C developers What can it parse? ------------------ -The parser supports parsing PHP 5.2-7.4. +The parser supports parsing PHP 5.2-8.0, with the following exceptions: + + * Namespaced names containing whitespace (e.g. `Foo \ Bar` instead of `Foo\Bar`) are not supported. + These are illegal in PHP 8, but are legal in earlier version. However, PHP-Parser does not + support them for any version. 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. From 4432ba399e47c66624bc73c8c0f811e5c109576f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 3 May 2021 21:11:20 +0200 Subject: [PATCH 011/428] Release PHP-Parser 4.10.5 --- CHANGELOG.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c44bc648e..2eb45056e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,27 @@ -Version 4.10.5-dev +Version 4.10.6-dev ------------------ Nothing yet. +Version 4.10.5 (2020-05-03) +--------------------------- + +### Added + +* [PHP 8.1] Added support for enums. These are represented using the `Stmt\Enum_` and + `Stmt\EnumCase` nodes. +* [PHP 8.1] Added support for never type. This type will now be returned as an `Identifier` rather + than `Name`. +* Added `ClassConst` builder. + +### Changed + +* Non-UTF-8 code units in strings will now be hex-encoded. + +### Fixed + +* Fixed precedence of arrow functions. + Version 4.10.4 (2020-12-20) --------------------------- From b67560d38854dc072a17f5b0af0df6e094690661 Mon Sep 17 00:00:00 2001 From: Tom Klingenberg <352517+ktomk@users.noreply.github.com> Date: Tue, 4 May 2021 19:24:07 +0200 Subject: [PATCH 012/428] Update CHANGELOG.md very minor for the year. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2eb45056e9..6196fac5d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ Version 4.10.6-dev Nothing yet. -Version 4.10.5 (2020-05-03) +Version 4.10.5 (2021-05-03) --------------------------- ### Added From eccf1bf464b5d6590ad7fb5960690361028fc9c4 Mon Sep 17 00:00:00 2001 From: Krystian Marcisz Date: Mon, 14 Jun 2021 23:52:57 +0200 Subject: [PATCH 013/428] Add Attribute builder and support for named args (#781) Add BuilderFactory::attribute() and support named args in BuilderFactory::args(). --- lib/PhpParser/BuilderFactory.php | 27 ++++++++++++++++++++++----- test/PhpParser/BuilderFactoryTest.php | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/lib/PhpParser/BuilderFactory.php b/lib/PhpParser/BuilderFactory.php index cc8c48bd9e..6a6b7b07b5 100644 --- a/lib/PhpParser/BuilderFactory.php +++ b/lib/PhpParser/BuilderFactory.php @@ -12,6 +12,21 @@ class BuilderFactory { + /** + * Creates an attribute node. + * + * @param string|Name $name Name of the attribute + * @param array $args Attribute named arguments + * + * @return Node\Attribute + */ + public function attribute($name, array $args = []) : Node\Attribute { + return new Node\Attribute( + BuilderHelpers::normalizeName($name), + $this->args($args) + ); + } + /** * Creates a namespace builder. * @@ -210,12 +225,14 @@ public function var($name) : Expr\Variable { */ public function args(array $args) : array { $normalizedArgs = []; - foreach ($args as $arg) { - if ($arg instanceof Arg) { - $normalizedArgs[] = $arg; - } else { - $normalizedArgs[] = new Arg(BuilderHelpers::normalizeValue($arg)); + foreach ($args as $key => $arg) { + if (!($arg instanceof Arg)) { + $arg = new Arg(BuilderHelpers::normalizeValue($arg)); + } + if (\is_string($key)) { + $arg->name = BuilderHelpers::normalizeIdentifier($key); } + $normalizedArgs[] = $arg; } return $normalizedArgs; } diff --git a/test/PhpParser/BuilderFactoryTest.php b/test/PhpParser/BuilderFactoryTest.php index 1d0bfcfc4a..9e0eed7701 100644 --- a/test/PhpParser/BuilderFactoryTest.php +++ b/test/PhpParser/BuilderFactoryTest.php @@ -3,6 +3,7 @@ namespace PhpParser; use PhpParser\Node\Arg; +use PhpParser\Node\Attribute; use PhpParser\Node\Expr; use PhpParser\Node\Expr\BinaryOp\Concat; use PhpParser\Node\Identifier; @@ -41,6 +42,16 @@ public function testFactoryClassConst() { $this->assertInstanceOf(Builder\ClassConst::class, $factory->classConst('TEST',1)); } + public function testAttribute() { + $factory = new BuilderFactory(); + $this->assertEquals( + new Attribute(new Name('AttributeName'), [new Arg( + new String_('bar'), false, false, [], new Identifier('foo') + )]), + $factory->attribute('AttributeName', ['foo' => 'bar']) + ); + } + public function testVal() { // This method is a wrapper around BuilderHelpers::normalizeValue(), // which is already tested elsewhere @@ -96,6 +107,17 @@ public function testArgs() { ); } + public function testNamedArgs() { + $factory = new BuilderFactory(); + $this->assertEquals( + [ + new Arg(new String_('foo')), + new Arg(new String_('baz'), false, false, [], new Identifier('bar')), + ], + $factory->args(['foo', 'bar' => 'baz']) + ); + } + public function testCalls() { $factory = new BuilderFactory(); From 49e9951f2c1f504ecdaad0ab74df4b964c182afe Mon Sep 17 00:00:00 2001 From: Krystian Marcisz Date: Wed, 16 Jun 2021 17:47:22 +0200 Subject: [PATCH 014/428] Add addAttribute() method to Builders with normalizer (#782) Adds addAttribute() method to Builders of all nodes supporting attributes with BuilderHelpers::normalizeAttribute() usage inside so we can pass both Node\Attribute and Node\AttributeGroup instances. --- lib/PhpParser/Builder/ClassConst.php | 20 ++++++++++++++- lib/PhpParser/Builder/Class_.php | 18 +++++++++++++ lib/PhpParser/Builder/Function_.php | 17 +++++++++++++ lib/PhpParser/Builder/Interface_.php | 18 +++++++++++++ lib/PhpParser/Builder/Method.php | 17 +++++++++++++ lib/PhpParser/Builder/Param.php | 18 ++++++++++++- lib/PhpParser/Builder/Property.php | 20 ++++++++++++++- lib/PhpParser/Builder/Trait_.php | 20 ++++++++++++++- lib/PhpParser/BuilderHelpers.php | 20 +++++++++++++++ test/PhpParser/Builder/ClassConstTest.php | 28 ++++++++++++++++++++ test/PhpParser/Builder/ClassTest.php | 26 +++++++++++++++++++ test/PhpParser/Builder/FunctionTest.php | 22 ++++++++++++++++ test/PhpParser/Builder/InterfaceTest.php | 22 ++++++++++++++++ test/PhpParser/Builder/MethodTest.php | 22 ++++++++++++++++ test/PhpParser/Builder/ParamTest.php | 23 +++++++++++++++++ test/PhpParser/Builder/PropertyTest.php | 31 +++++++++++++++++++++++ test/PhpParser/Builder/TraitTest.php | 28 ++++++++++++++++++++ test/PhpParser/BuilderHelpersTest.php | 22 ++++++++++++++++ 18 files changed, 388 insertions(+), 4 deletions(-) create mode 100644 test/PhpParser/BuilderHelpersTest.php diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index 442307e808..be7160f131 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -6,6 +6,7 @@ use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Node; use PhpParser\Node\Const_; use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; @@ -16,6 +17,9 @@ class ClassConst implements PhpParser\Builder protected $attributes = []; protected $constants = []; + /** @var Node\AttributeGroup[] */ + protected $attributeGroups = []; + /** * Creates a class constant builder * @@ -88,6 +92,19 @@ public function setDocComment($docComment) { return $this; } + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + /** * Returns the built class node. * @@ -97,7 +114,8 @@ public function getNode(): PhpParser\Node { return new Stmt\ClassConst( $this->constants, $this->flags, - $this->attributes + $this->attributes, + $this->attributeGroups ); } } diff --git a/lib/PhpParser/Builder/Class_.php b/lib/PhpParser/Builder/Class_.php index c2f2468914..87e2901a9a 100644 --- a/lib/PhpParser/Builder/Class_.php +++ b/lib/PhpParser/Builder/Class_.php @@ -4,6 +4,7 @@ use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; @@ -20,6 +21,9 @@ class Class_ extends Declaration protected $properties = []; protected $methods = []; + /** @var Node\AttributeGroup[] */ + protected $attributeGroups = []; + /** * Creates a class builder. * @@ -106,6 +110,19 @@ public function addStmt($stmt) { return $this; } + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + /** * Returns the built class node. * @@ -117,6 +134,7 @@ public function getNode() : PhpParser\Node { 'extends' => $this->extends, 'implements' => $this->implements, 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), + 'attrGroups' => $this->attributeGroups, ], $this->attributes); } } diff --git a/lib/PhpParser/Builder/Function_.php b/lib/PhpParser/Builder/Function_.php index 56eda2a812..1cd73c0d3b 100644 --- a/lib/PhpParser/Builder/Function_.php +++ b/lib/PhpParser/Builder/Function_.php @@ -12,6 +12,9 @@ class Function_ extends FunctionLike protected $name; protected $stmts = []; + /** @var Node\AttributeGroup[] */ + protected $attributeGroups = []; + /** * Creates a function builder. * @@ -34,6 +37,19 @@ public function addStmt($stmt) { return $this; } + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + /** * Returns the built function node. * @@ -45,6 +61,7 @@ public function getNode() : Node { 'params' => $this->params, 'returnType' => $this->returnType, 'stmts' => $this->stmts, + 'attrGroups' => $this->attributeGroups, ], $this->attributes); } } diff --git a/lib/PhpParser/Builder/Interface_.php b/lib/PhpParser/Builder/Interface_.php index 87e5b93ee1..7806e85fce 100644 --- a/lib/PhpParser/Builder/Interface_.php +++ b/lib/PhpParser/Builder/Interface_.php @@ -4,6 +4,7 @@ use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; @@ -14,6 +15,9 @@ class Interface_ extends Declaration protected $constants = []; protected $methods = []; + /** @var Node\AttributeGroup[] */ + protected $attributeGroups = []; + /** * Creates an interface builder. * @@ -61,6 +65,19 @@ public function addStmt($stmt) { return $this; } + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + /** * Returns the built interface node. * @@ -70,6 +87,7 @@ public function getNode() : PhpParser\Node { return new Stmt\Interface_($this->name, [ 'extends' => $this->extends, 'stmts' => array_merge($this->constants, $this->methods), + 'attrGroups' => $this->attributeGroups, ], $this->attributes); } } diff --git a/lib/PhpParser/Builder/Method.php b/lib/PhpParser/Builder/Method.php index a3e8676592..232d7cb874 100644 --- a/lib/PhpParser/Builder/Method.php +++ b/lib/PhpParser/Builder/Method.php @@ -15,6 +15,9 @@ class Method extends FunctionLike /** @var array|null */ protected $stmts = []; + /** @var Node\AttributeGroup[] */ + protected $attributeGroups = []; + /** * Creates a method builder. * @@ -112,6 +115,19 @@ public function addStmt($stmt) { return $this; } + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + /** * Returns the built method node. * @@ -124,6 +140,7 @@ public function getNode() : Node { 'params' => $this->params, 'returnType' => $this->returnType, 'stmts' => $this->stmts, + 'attrGroups' => $this->attributeGroups, ], $this->attributes); } } diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index c6491786e3..0ea91683c0 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -19,6 +19,9 @@ class Param implements PhpParser\Builder protected $variadic = false; + /** @var Node\AttributeGroup[] */ + protected $attributeGroups = []; + /** * Creates a parameter builder. * @@ -92,6 +95,19 @@ public function makeVariadic() { return $this; } + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + /** * Returns the built parameter node. * @@ -100,7 +116,7 @@ public function makeVariadic() { public function getNode() : Node { return new Node\Param( new Node\Expr\Variable($this->name), - $this->default, $this->type, $this->byRef, $this->variadic + $this->default, $this->type, $this->byRef, $this->variadic, [], 0, $this->attributeGroups ); } } diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 1f3bdb2723..94ed96106e 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -4,6 +4,7 @@ use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\NullableType; @@ -20,6 +21,9 @@ class Property implements PhpParser\Builder /** @var null|Identifier|Name|NullableType */ protected $type; + /** @var Node\AttributeGroup[] */ + protected $attributeGroups = []; + /** * Creates a property builder. * @@ -114,6 +118,19 @@ public function setType($type) { return $this; } + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + /** * Returns the built class node. * @@ -126,7 +143,8 @@ public function getNode() : PhpParser\Node { new Stmt\PropertyProperty($this->name, $this->default) ], $this->attributes, - $this->type + $this->type, + $this->attributeGroups ); } } diff --git a/lib/PhpParser/Builder/Trait_.php b/lib/PhpParser/Builder/Trait_.php index a836d40c60..97f32f98d6 100644 --- a/lib/PhpParser/Builder/Trait_.php +++ b/lib/PhpParser/Builder/Trait_.php @@ -4,6 +4,7 @@ use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Node; use PhpParser\Node\Stmt; class Trait_ extends Declaration @@ -13,6 +14,9 @@ class Trait_ extends Declaration protected $properties = []; protected $methods = []; + /** @var Node\AttributeGroup[] */ + protected $attributeGroups = []; + /** * Creates an interface builder. * @@ -45,6 +49,19 @@ public function addStmt($stmt) { return $this; } + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + /** * Returns the built trait node. * @@ -53,7 +70,8 @@ public function addStmt($stmt) { public function getNode() : PhpParser\Node { return new Stmt\Trait_( $this->name, [ - 'stmts' => array_merge($this->uses, $this->properties, $this->methods) + 'stmts' => array_merge($this->uses, $this->properties, $this->methods), + 'attrGroups' => $this->attributeGroups, ], $this->attributes ); } diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index 180bf35d0e..1a26dab292 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -270,6 +270,26 @@ public static function normalizeDocComment($docComment) : Comment\Doc { } } + /** + * Normalizes a attribute: Converts attribute to the Attribute Group if needed. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return Node\AttributeGroup The Attribute Group + */ + public static function normalizeAttribute($attribute) : Node\AttributeGroup + { + if ($attribute instanceof Node\AttributeGroup) { + return $attribute; + } + + if (!($attribute instanceof Node\Attribute)) { + throw new \LogicException('Attribute must be an instance of PhpParser\Node\Attribute or PhpParser\Node\AttributeGroup'); + } + + return new Node\AttributeGroup([$attribute]); + } + /** * Adds a modifier and returns new modifier bitmask. * diff --git a/test/PhpParser/Builder/ClassConstTest.php b/test/PhpParser/Builder/ClassConstTest.php index 0e88e073e7..e5a3a1c949 100644 --- a/test/PhpParser/Builder/ClassConstTest.php +++ b/test/PhpParser/Builder/ClassConstTest.php @@ -3,8 +3,12 @@ namespace PhpParser\Builder; use PhpParser\Comment; +use PhpParser\Node\Arg; +use PhpParser\Node\Attribute; +use PhpParser\Node\AttributeGroup; use PhpParser\Node\Const_; use PhpParser\Node\Expr; +use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar; use PhpParser\Node\Scalar\LNumber; @@ -99,6 +103,30 @@ public function testAddConst() { ); } + public function testAddAttribute() { + $attribute = new Attribute( + new Name('Attr'), + [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + ); + $attributeGroup = new AttributeGroup([$attribute]); + + $node = $this->createClassConstBuilder('ATTR_GROUP', 1) + ->addAttribute($attributeGroup) + ->getNode(); + + $this->assertEquals( + new Stmt\ClassConst( + [ + new Const_("ATTR_GROUP", new LNumber(1) ) + ], + 0, + [], + [$attributeGroup] + ), + $node + ); + } + /** * @dataProvider provideTestDefaultValues */ diff --git a/test/PhpParser/Builder/ClassTest.php b/test/PhpParser/Builder/ClassTest.php index 2cfa787231..cc362b09eb 100644 --- a/test/PhpParser/Builder/ClassTest.php +++ b/test/PhpParser/Builder/ClassTest.php @@ -4,7 +4,12 @@ use PhpParser\Comment; use PhpParser\Node; +use PhpParser\Node\Arg; +use PhpParser\Node\Attribute; +use PhpParser\Node\AttributeGroup; +use PhpParser\Node\Identifier; use PhpParser\Node\Name; +use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; class ClassTest extends \PHPUnit\Framework\TestCase @@ -122,6 +127,27 @@ public function testDocComment() { ); } + public function testAddAttribute() { + $attribute = new Attribute( + new Name('Attr'), + [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + ); + $attributeGroup = new AttributeGroup([$attribute]); + + $class = $this->createClassBuilder('ATTR_GROUP') + ->addAttribute($attributeGroup) + ->getNode(); + + $this->assertEquals( + new Stmt\Class_('ATTR_GROUP', [ + 'attrGroups' => [ + $attributeGroup, + ] + ], []), + $class + ); + } + public function testInvalidStmtError() { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Unexpected node of type "Stmt_Echo"'); diff --git a/test/PhpParser/Builder/FunctionTest.php b/test/PhpParser/Builder/FunctionTest.php index c17045b83f..937fa8ec15 100644 --- a/test/PhpParser/Builder/FunctionTest.php +++ b/test/PhpParser/Builder/FunctionTest.php @@ -4,8 +4,14 @@ use PhpParser\Comment; use PhpParser\Node; +use PhpParser\Node\Arg; +use PhpParser\Node\Attribute; +use PhpParser\Node\AttributeGroup; use PhpParser\Node\Expr\Print_; use PhpParser\Node\Expr\Variable; +use PhpParser\Node\Identifier; +use PhpParser\Node\Name; +use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; @@ -81,6 +87,22 @@ public function testDocComment() { ]), $node); } + public function testAddAttribute() { + $attribute = new Attribute( + new Name('Attr'), + [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + ); + $attributeGroup = new AttributeGroup([$attribute]); + + $node = $this->createFunctionBuilder('attrGroup') + ->addAttribute($attributeGroup) + ->getNode(); + + $this->assertEquals(new Stmt\Function_('attrGroup', [ + 'attrGroups' => [$attributeGroup], + ], []), $node); + } + public function testReturnType() { $node = $this->createFunctionBuilder('test') ->setReturnType('void') diff --git a/test/PhpParser/Builder/InterfaceTest.php b/test/PhpParser/Builder/InterfaceTest.php index 63ce6b9859..5eaf5ff9f1 100644 --- a/test/PhpParser/Builder/InterfaceTest.php +++ b/test/PhpParser/Builder/InterfaceTest.php @@ -4,7 +4,13 @@ use PhpParser\Comment; use PhpParser\Node; +use PhpParser\Node\Arg; +use PhpParser\Node\Attribute; +use PhpParser\Node\AttributeGroup; +use PhpParser\Node\Identifier; +use PhpParser\Node\Name; use PhpParser\Node\Scalar\DNumber; +use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; class InterfaceTest extends \PHPUnit\Framework\TestCase @@ -76,6 +82,22 @@ public function testDocComment() { ]), $node); } + public function testAddAttribute() { + $attribute = new Attribute( + new Name('Attr'), + [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + ); + $attributeGroup = new AttributeGroup([$attribute]); + + $node = $this->createInterfaceBuilder() + ->addAttribute($attributeGroup) + ->getNode(); + + $this->assertEquals(new Stmt\Interface_('Contract', [ + 'attrGroups' => [$attributeGroup], + ], []), $node); + } + public function testInvalidStmtError() { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Unexpected node of type "Stmt_PropertyProperty"'); diff --git a/test/PhpParser/Builder/MethodTest.php b/test/PhpParser/Builder/MethodTest.php index 529f035497..c73e28a087 100644 --- a/test/PhpParser/Builder/MethodTest.php +++ b/test/PhpParser/Builder/MethodTest.php @@ -4,8 +4,14 @@ use PhpParser\Comment; use PhpParser\Node; +use PhpParser\Node\Arg; +use PhpParser\Node\Attribute; +use PhpParser\Node\AttributeGroup; use PhpParser\Node\Expr\Print_; use PhpParser\Node\Expr\Variable; +use PhpParser\Node\Identifier; +use PhpParser\Node\Name; +use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; @@ -125,6 +131,22 @@ public function testDocComment() { ]), $node); } + public function testAddAttribute() { + $attribute = new Attribute( + new Name('Attr'), + [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + ); + $attributeGroup = new AttributeGroup([$attribute]); + + $node = $this->createMethodBuilder('attributeGroup') + ->addAttribute($attributeGroup) + ->getNode(); + + $this->assertEquals(new Stmt\ClassMethod('attributeGroup', [ + 'attrGroups' => [$attributeGroup], + ], []), $node); + } + public function testReturnType() { $node = $this->createMethodBuilder('test') ->setReturnType('bool') diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index 781fffa6f3..05b3c912ca 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -3,8 +3,14 @@ namespace PhpParser\Builder; use PhpParser\Node; +use PhpParser\Node\Arg; +use PhpParser\Node\Attribute; +use PhpParser\Node\AttributeGroup; use PhpParser\Node\Expr; +use PhpParser\Node\Identifier; +use PhpParser\Node\Name; use PhpParser\Node\Scalar; +use PhpParser\Node\Scalar\LNumber; class ParamTest extends \PHPUnit\Framework\TestCase { @@ -198,4 +204,21 @@ public function testVariadic() { $node ); } + + public function testAddAttribute() { + $attribute = new Attribute( + new Name('Attr'), + [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + ); + $attributeGroup = new AttributeGroup([$attribute]); + + $node = $this->createParamBuilder('attributeGroup') + ->addAttribute($attributeGroup) + ->getNode(); + + $this->assertEquals( + new Node\Param(new Expr\Variable('attributeGroup'), null, null, false, false, [], 0, [$attributeGroup]), + $node + ); + } } diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index a15cd43c76..6d89f3ba82 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -3,9 +3,14 @@ namespace PhpParser\Builder; use PhpParser\Comment; +use PhpParser\Node\Arg; +use PhpParser\Node\Attribute; +use PhpParser\Node\AttributeGroup; use PhpParser\Node\Expr; +use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar; +use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; class PropertyTest extends \PHPUnit\Framework\TestCase @@ -91,6 +96,32 @@ public function testDefaultValues($value, $expectedValueNode) { $this->assertEquals($expectedValueNode, $node->props[0]->default); } + public function testAddAttribute() { + $attribute = new Attribute( + new Name('Attr'), + [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + ); + $attributeGroup = new AttributeGroup([$attribute]); + + $node = $this->createPropertyBuilder('test') + ->addAttribute($attributeGroup) + ->getNode() + ; + + $this->assertEquals( + new Stmt\Property( + Stmt\Class_::MODIFIER_PUBLIC, + [ + new Stmt\PropertyProperty('test') + ], + [], + null, + [$attributeGroup] + ), + $node + ); + } + public function provideTestDefaultValues() { return [ [ diff --git a/test/PhpParser/Builder/TraitTest.php b/test/PhpParser/Builder/TraitTest.php index 2f2bd6b959..6b27b492cb 100644 --- a/test/PhpParser/Builder/TraitTest.php +++ b/test/PhpParser/Builder/TraitTest.php @@ -3,7 +3,12 @@ namespace PhpParser\Builder; use PhpParser\Comment; +use PhpParser\Node\Arg; +use PhpParser\Node\Attribute; +use PhpParser\Node\AttributeGroup; +use PhpParser\Node\Identifier; use PhpParser\Node\Name; +use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassConst; @@ -88,4 +93,27 @@ public function testGetProperties() $this->assertSame($properties, $trait->getProperties()); } + + public function testAddAttribute() { + $attribute = new Attribute( + new Name('Attr'), + [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + ); + $attributeGroup = new AttributeGroup([$attribute]); + + $node = $this->createTraitBuilder('AttributeGroup') + ->addAttribute($attributeGroup) + ->getNode() + ; + + $this->assertEquals( + new Stmt\Trait_( + 'AttributeGroup', + [ + 'attrGroups' => [$attributeGroup], + ] + ), + $node + ); + } } diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php new file mode 100644 index 0000000000..72f2b84a35 --- /dev/null +++ b/test/PhpParser/BuilderHelpersTest.php @@ -0,0 +1,22 @@ +assertEquals($attributeGroup, BuilderHelpers::normalizeAttribute($attribute)); + $this->assertSame($attributeGroup, BuilderHelpers::normalizeAttribute($attributeGroup)); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Attribute must be an instance of PhpParser\Node\Attribute or PhpParser\Node\AttributeGroup'); + BuilderHelpers::normalizeAttribute('test'); + } +} From 2d193bb0e4bb4c69271919e64d51720427e8462e Mon Sep 17 00:00:00 2001 From: simivar Date: Thu, 17 Jun 2021 00:27:41 +0200 Subject: [PATCH 015/428] Add attributes to integration Builder test --- test/PhpParser/BuilderFactoryTest.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/test/PhpParser/BuilderFactoryTest.php b/test/PhpParser/BuilderFactoryTest.php index 9e0eed7701..1a57c9ecee 100644 --- a/test/PhpParser/BuilderFactoryTest.php +++ b/test/PhpParser/BuilderFactoryTest.php @@ -273,6 +273,7 @@ public function testIntegration() { ->class('SomeClass') ->extend('SomeOtherClass') ->implement('A\Few', '\Interfaces') + ->addAttribute($factory->attribute('ClassAttribute', ['repository' => 'fqcn'])) ->makeAbstract() ->addStmt($factory->useTrait('FirstTrait')) @@ -283,7 +284,9 @@ public function testIntegration() { ->with($factory->traitUseAdaptation('AnotherTrait', 'baz')->as('test')) ->with($factory->traitUseAdaptation('AnotherTrait', 'func')->insteadof('SecondTrait'))) - ->addStmt($factory->method('firstMethod')) + ->addStmt($factory->method('firstMethod') + ->addAttribute($factory->attribute('Route', ['/index', 'name' => 'homepage'])) + ) ->addStmt($factory->method('someMethod') ->makePublic() @@ -297,13 +300,24 @@ public function testIntegration() { ->addStmt($factory->method('anotherMethod') ->makeProtected() - ->addParam($factory->param('someParam')->setDefault('test')) + ->addParam($factory->param('someParam') + ->setDefault('test') + ->addAttribute($factory->attribute('TaggedIterator', ['app.handlers'])) + ) ->addStmt(new Expr\Print_(new Expr\Variable('someParam')))) ->addStmt($factory->property('someProperty')->makeProtected()) ->addStmt($factory->property('anotherProperty') ->makePrivate() ->setDefault([1, 2, 3])) + ->addStmt($factory->property('integerProperty') + ->setType('int') + ->addAttribute($factory->attribute('Column', ['options' => ['unsigned' => true]])) + ->setDefault(1)) + ->addStmt($factory->classConst('CONST_WITH_ATTRIBUTE', 1) + ->makePublic() + ->addAttribute($factory->attribute('ConstAttribute')) + ) ->addStmt($factory->classConst("FIRST_CLASS_CONST", 1) ->addConst("SECOND_CLASS_CONST",2) @@ -320,6 +334,7 @@ public function testIntegration() { use Foo\Bar as A; use function strlen; use const PHP_VERSION; +#[ClassAttribute(repository: 'fqcn')] abstract class SomeClass extends SomeOtherClass implements A\Few, \Interfaces { use FirstTrait; @@ -328,9 +343,14 @@ abstract class SomeClass extends SomeOtherClass implements A\Few, \Interfaces AnotherTrait::baz as test; AnotherTrait::func insteadof SecondTrait; } + #[ConstAttribute] + public const CONST_WITH_ATTRIBUTE = 1; private const FIRST_CLASS_CONST = 1, SECOND_CLASS_CONST = 2; protected $someProperty; private $anotherProperty = array(1, 2, 3); + #[Column(options: array('unsigned' => true))] + public int $integerProperty = 1; + #[Route('/index', name: 'homepage')] function firstMethod() { } @@ -340,7 +360,7 @@ function firstMethod() * @param SomeClass And takes a parameter */ public abstract function someMethod(SomeClass $someParam); - protected function anotherMethod($someParam = 'test') + protected function anotherMethod(#[TaggedIterator('app.handlers')] $someParam = 'test') { print $someParam; } From 0b258d9a9e9698b29e5fa33a3ad5c05937ddbebc Mon Sep 17 00:00:00 2001 From: simivar Date: Thu, 17 Jun 2021 16:09:19 +0200 Subject: [PATCH 016/428] Add missing tests for methods of BuilderHelpers --- lib/PhpParser/BuilderHelpers.php | 56 +++++--- test/PhpParser/BuilderHelpersTest.php | 200 +++++++++++++++++++++++++- 2 files changed, 233 insertions(+), 23 deletions(-) diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index 1a26dab292..f5bfae9ee5 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -27,7 +27,9 @@ final class BuilderHelpers public static function normalizeNode($node) : Node { if ($node instanceof Builder) { return $node->getNode(); - } elseif ($node instanceof Node) { + } + + if ($node instanceof Node) { return $node; } @@ -127,18 +129,22 @@ public static function normalizeNameOrExpr($name) { private static function normalizeNameCommon($name, bool $allowExpr) { if ($name instanceof Name) { return $name; - } elseif (is_string($name)) { + } + + if (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\\')) { + } + + if (0 === strpos($name, 'namespace\\')) { return new Name\Relative(substr($name, strlen('namespace\\'))); - } else { - return new Name($name); } + + return new Name($name); } if ($allowExpr) { @@ -148,9 +154,9 @@ private static function normalizeNameCommon($name, bool $allowExpr) { throw new \LogicException( 'Name must be a string or an instance of Node\Name or Node\Expr' ); - } else { - throw new \LogicException('Name must be a string or an instance of Node\Name'); } + + throw new \LogicException('Name must be a string or an instance of Node\Name'); } /** @@ -215,21 +221,33 @@ public static function normalizeType($type) { public static function normalizeValue($value) : Expr { if ($value instanceof Node\Expr) { return $value; - } elseif (is_null($value)) { + } + + if (is_null($value)) { return new Expr\ConstFetch( new Name('null') ); - } elseif (is_bool($value)) { + } + + if (is_bool($value)) { return new Expr\ConstFetch( new Name($value ? 'true' : 'false') ); - } elseif (is_int($value)) { + } + + if (is_int($value)) { return new Scalar\LNumber($value); - } elseif (is_float($value)) { + } + + if (is_float($value)) { return new Scalar\DNumber($value); - } elseif (is_string($value)) { + } + + if (is_string($value)) { return new Scalar\String_($value); - } elseif (is_array($value)) { + } + + if (is_array($value)) { $items = []; $lastKey = -1; foreach ($value as $itemKey => $itemValue) { @@ -248,9 +266,9 @@ public static function normalizeValue($value) : Expr { } return new Expr\Array_($items); - } else { - throw new \LogicException('Invalid value'); } + + throw new \LogicException('Invalid value'); } /** @@ -263,11 +281,13 @@ public static function normalizeValue($value) : Expr { public static function normalizeDocComment($docComment) : Comment\Doc { if ($docComment instanceof Comment\Doc) { return $docComment; - } elseif (is_string($docComment)) { + } + + 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'); } + + throw new \LogicException('Doc comment must be a string or an instance of PhpParser\Comment\Doc'); } /** diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index 72f2b84a35..9376cda461 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -2,15 +2,205 @@ namespace PhpParser; -use PhpParser\Node\Attribute; -use PhpParser\Node\AttributeGroup; -use PhpParser\Node\Name; +use PhpParser\Builder\Class_; +use PhpParser\Node\Scalar; +use PhpParser\Node\Stmt; +use PhpParser\Node\Expr; class BuilderHelpersTest extends \PHPUnit\Framework\TestCase { + public function testNormalizeNode() { + $builder = new Class_('SomeClass'); + $this->assertEquals($builder->getNode(), BuilderHelpers::normalizeNode($builder)); + + $attribute = new Node\Attribute(new Node\Name('Test')); + $this->assertSame($attribute, BuilderHelpers::normalizeNode($attribute)); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Expected node or builder object'); + BuilderHelpers::normalizeNode('test'); + } + + public function testNormalizeStmt() { + $stmt = new Node\Stmt\Class_('Class'); + $this->assertSame($stmt, BuilderHelpers::normalizeStmt($stmt)); + + $expr = new Expr\Variable('fn'); + $normalizedExpr = BuilderHelpers::normalizeStmt($expr); + $this->assertEquals(new Stmt\Expression($expr), $normalizedExpr); + $this->assertSame($expr, $normalizedExpr->expr); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Expected statement or expression node'); + BuilderHelpers::normalizeStmt(new Node\Attribute(new Node\Name('Test'))); + } + + public function testNormalizeStmtInvalidType() { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Expected node or builder object'); + BuilderHelpers::normalizeStmt('test'); + } + + public function testNormalizeIdentifier() { + $identifier = new Node\Identifier('fn'); + $this->assertSame($identifier, BuilderHelpers::normalizeIdentifier($identifier)); + $this->assertEquals($identifier, BuilderHelpers::normalizeIdentifier('fn')); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Expected string or instance of Node\Identifier'); + BuilderHelpers::normalizeIdentifier(1); + } + + public function testNormalizeIdentifierOrExpr() { + $identifier = new Node\Identifier('fn'); + $this->assertSame($identifier, BuilderHelpers::normalizeIdentifierOrExpr($identifier)); + + $expr = new Expr\Variable('fn'); + $this->assertSame($expr, BuilderHelpers::normalizeIdentifierOrExpr($expr)); + $this->assertEquals($identifier, BuilderHelpers::normalizeIdentifierOrExpr('fn')); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Expected string or instance of Node\Identifier'); + BuilderHelpers::normalizeIdentifierOrExpr(1); + } + + public function testNormalizeName() { + $name = new Node\Name('test'); + $this->assertSame($name, BuilderHelpers::normalizeName($name)); + $this->assertEquals( + new Node\Name\FullyQualified(['Namespace', 'Test']), + BuilderHelpers::normalizeName('\\Namespace\\Test') + ); + $this->assertEquals( + new Node\Name\Relative(['Test']), + BuilderHelpers::normalizeName('namespace\\Test') + ); + $this->assertEquals($name, BuilderHelpers::normalizeName('test')); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Name cannot be empty'); + BuilderHelpers::normalizeName(''); + } + + public function testNormalizeNameInvalidType() { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Name must be a string or an instance of Node\Name'); + BuilderHelpers::normalizeName(1); + } + + public function testNormalizeNameOrExpr() { + $expr = new Expr\Variable('fn'); + $this->assertSame($expr, BuilderHelpers::normalizeNameOrExpr($expr)); + + $name = new Node\Name('test'); + $this->assertSame($name, BuilderHelpers::normalizeNameOrExpr($name)); + $this->assertEquals( + new Node\Name\FullyQualified(['Namespace', 'Test']), + BuilderHelpers::normalizeNameOrExpr('\\Namespace\\Test') + ); + $this->assertEquals( + new Node\Name\Relative(['Test']), + BuilderHelpers::normalizeNameOrExpr('namespace\\Test') + ); + $this->assertEquals($name, BuilderHelpers::normalizeNameOrExpr('test')); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Name cannot be empty'); + BuilderHelpers::normalizeNameOrExpr(''); + } + + public function testNormalizeNameOrExpInvalidType() { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Name must be a string or an instance of Node\Name or Node\Expr'); + BuilderHelpers::normalizeNameOrExpr(1); + } + + public function testNormalizeType() { + $this->assertEquals(new Node\Identifier('array'), BuilderHelpers::normalizeType('array')); + $this->assertEquals(new Node\Identifier('callable'), BuilderHelpers::normalizeType('callable')); + $this->assertEquals(new Node\Identifier('string'), BuilderHelpers::normalizeType('string')); + $this->assertEquals(new Node\Identifier('int'), BuilderHelpers::normalizeType('int')); + $this->assertEquals(new Node\Identifier('float'), BuilderHelpers::normalizeType('float')); + $this->assertEquals(new Node\Identifier('bool'), BuilderHelpers::normalizeType('bool')); + $this->assertEquals(new Node\Identifier('iterable'), BuilderHelpers::normalizeType('iterable')); + $this->assertEquals(new Node\Identifier('void'), BuilderHelpers::normalizeType('void')); + $this->assertEquals(new Node\Identifier('object'), BuilderHelpers::normalizeType('object')); + $this->assertEquals(new Node\Identifier('mixed'), BuilderHelpers::normalizeType('mixed')); + + $intIdentifier = new Node\Identifier('int'); + $this->assertSame($intIdentifier, BuilderHelpers::normalizeType($intIdentifier)); + + $intName = new Node\Name('int'); + $this->assertSame($intName, BuilderHelpers::normalizeType($intName)); + + $intNullable = new Node\NullableType('int'); + $this->assertSame($intNullable, BuilderHelpers::normalizeType($intNullable)); + + $unionType = new Node\UnionType([new Node\Identifier('int'), new Node\Identifier('string')]); + $this->assertSame($unionType, BuilderHelpers::normalizeType($unionType)); + + $expectedNullable = new Node\NullableType($intIdentifier); + $nullable = BuilderHelpers::normalizeType('?int'); + $this->assertEquals($expectedNullable, $nullable); + $this->assertEquals($intIdentifier, $nullable->type); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Type must be a string, or an instance of Name, Identifier, NullableType or UnionType'); + BuilderHelpers::normalizeType(1); + } + + public function testNormalizeTypeNullableVoid() { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('void type cannot be nullable'); + BuilderHelpers::normalizeType('?void'); + } + + public function testNormalizeTypeNullableMixed() { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('mixed type cannot be nullable'); + BuilderHelpers::normalizeType('?mixed'); + } + + public function testNormalizeValue() { + $expression = new Scalar\LNumber(1); + $this->assertSame($expression, BuilderHelpers::normalizeValue($expression)); + + $this->assertEquals(new Expr\ConstFetch(new Node\Name('null')), BuilderHelpers::normalizeValue(null)); + $this->assertEquals(new Expr\ConstFetch(new Node\Name('true')), BuilderHelpers::normalizeValue(true)); + $this->assertEquals(new Expr\ConstFetch(new Node\Name('false')), BuilderHelpers::normalizeValue(false)); + $this->assertEquals(new Scalar\LNumber(2), BuilderHelpers::normalizeValue(2)); + $this->assertEquals(new Scalar\DNumber(2.5), BuilderHelpers::normalizeValue(2.5)); + $this->assertEquals(new Scalar\String_('text'), BuilderHelpers::normalizeValue('text')); + $this->assertEquals( + new Expr\Array_([ + new Expr\ArrayItem(new Scalar\LNumber(0)), + new Expr\ArrayItem(new Scalar\LNumber(1), new Scalar\String_('test')), + ]), + BuilderHelpers::normalizeValue([ + 0, + 'test' => 1, + ]) + ); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Invalid value'); + BuilderHelpers::normalizeValue(new \stdClass()); + } + + public function testNormalizeDocComment() { + $docComment = new Comment\Doc('Some doc comment'); + $this->assertSame($docComment, BuilderHelpers::normalizeDocComment($docComment)); + + $this->assertEquals($docComment, BuilderHelpers::normalizeDocComment('Some doc comment')); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Doc comment must be a string or an instance of PhpParser\Comment\Doc'); + BuilderHelpers::normalizeDocComment(1); + } + public function testNormalizeAttribute() { - $attribute = new Attribute(new Name('Test')); - $attributeGroup = new AttributeGroup([$attribute]); + $attribute = new Node\Attribute(new Node\Name('Test')); + $attributeGroup = new Node\AttributeGroup([$attribute]); $this->assertEquals($attributeGroup, BuilderHelpers::normalizeAttribute($attribute)); $this->assertSame($attributeGroup, BuilderHelpers::normalizeAttribute($attributeGroup)); From e69ebbbfd98ea606516d58ed7d9c015748f4ff5a Mon Sep 17 00:00:00 2001 From: Rod Elias Date: Mon, 3 May 2021 20:36:30 -0300 Subject: [PATCH 017/428] chore: use the word Xdebug instead of XDebug --- README.md | 2 +- bin/php-parse | 2 +- doc/2_Usage_of_basic_components.markdown | 2 +- doc/README.md | 2 +- doc/component/Performance.markdown | 18 +++++++++--------- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4c8deada93..e5b26bf5c2 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,7 @@ Component documentation: * [JSON representation](doc/component/JSON_representation.markdown) * JSON encoding and decoding of ASTs * [Performance](doc/component/Performance.markdown) - * Disabling XDebug + * Disabling Xdebug * Reusing objects * Garbage collection impact * [Frequently asked questions](doc/component/FAQ.markdown) diff --git a/bin/php-parse b/bin/php-parse index a002f85271..bb3e46df4b 100755 --- a/bin/php-parse +++ b/bin/php-parse @@ -10,7 +10,7 @@ foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php ini_set('xdebug.max_nesting_level', 3000); -// Disable XDebug var_dump() output truncation +// 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); diff --git a/doc/2_Usage_of_basic_components.markdown b/doc/2_Usage_of_basic_components.markdown index 7fabd5cf69..599de1e640 100644 --- a/doc/2_Usage_of_basic_components.markdown +++ b/doc/2_Usage_of_basic_components.markdown @@ -19,7 +19,7 @@ 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 +preferable to disable Xdebug completely, as it can easily make this library more than five times slower. Parsing diff --git a/doc/README.md b/doc/README.md index 3b8cd76563..ac462f792b 100644 --- a/doc/README.md +++ b/doc/README.md @@ -39,7 +39,7 @@ Component documentation * [JSON representation](component/JSON_representation.markdown) * JSON encoding and decoding of ASTs * [Performance](component/Performance.markdown) - * Disabling XDebug + * Disabling Xdebug * Reusing objects * Garbage collection impact * [Frequently asked questions](component/FAQ.markdown) diff --git a/doc/component/Performance.markdown b/doc/component/Performance.markdown index 4281ce8cbe..4de4160767 100644 --- a/doc/component/Performance.markdown +++ b/doc/component/Performance.markdown @@ -8,20 +8,20 @@ described in the following. Xdebug ------ -Running PHP with XDebug adds a lot of overhead, especially for code that performs many method calls. -Just by loading XDebug (without enabling profiling or other more intrusive XDebug features), you +Running PHP with Xdebug adds a lot of overhead, especially for code that performs many method calls. +Just by loading Xdebug (without enabling profiling or other more intrusive Xdebug features), you can expect that code using PHP-Parser will be approximately *five times slower*. -As such, you should make sure that XDebug is not loaded when using this library. Note that setting -the `xdebug.default_enable=0` ini option does *not* disable XDebug. The *only* way to disable -XDebug is to not load the extension in the first place. +As such, you should make sure that Xdebug is not loaded when using this library. Note that setting +the `xdebug.default_enable=0` ini option does *not* disable Xdebug. The *only* way to disable +Xdebug is to not load the extension in the first place. -If you are building a command-line utility for use by developers (who often have XDebug enabled), -you may want to consider automatically restarting PHP with XDebug unloaded. The +If you are building a command-line utility for use by developers (who often have Xdebug enabled), +you may want to consider automatically restarting PHP with Xdebug unloaded. The [composer/xdebug-handler](https://github.com/composer/xdebug-handler) package can be used to do this. -If you do run with XDebug, you may need to increase the `xdebug.max_nesting_level` option to a +If you do run with Xdebug, you may need to increase the `xdebug.max_nesting_level` option to a higher level, such as 3000. While the parser itself is recursion free, most other code working on the AST uses recursion and will generate an error if the value of this option is too low. @@ -62,4 +62,4 @@ disproportionally (and are usually generated anyway). Of course, you can also try to (temporarily) disable GC. By design the AST generated by PHP-Parser is cycle-free, so the AST itself will never cause leaks with GC disabled. However, other code (including for example the parser object itself) may hold cycles, so disabling of GC should be -approached with care. \ No newline at end of file +approached with care. From c35cc4b2cb82fd543444d6afeb42f858b5e375e3 Mon Sep 17 00:00:00 2001 From: simivar Date: Fri, 18 Jun 2021 17:04:21 +0200 Subject: [PATCH 018/428] Add support for "never" type in the BuilderHelpers::normalizeType() --- lib/PhpParser/BuilderHelpers.php | 13 ++++++------- test/PhpParser/BuilderHelpersTest.php | 7 +++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index f5bfae9ee5..c6d8f16136 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -189,7 +189,7 @@ public static function normalizeType($type) { } $builtinTypes = [ - 'array', 'callable', 'string', 'int', 'float', 'bool', 'iterable', 'void', 'object', 'mixed' + 'array', 'callable', 'string', 'int', 'float', 'bool', 'iterable', 'void', 'object', 'mixed', 'never', ]; $lowerType = strtolower($type); @@ -199,12 +199,11 @@ public static function normalizeType($type) { $type = self::normalizeName($type); } - if ($nullable && (string) $type === 'void') { - throw new \LogicException('void type cannot be nullable'); - } - - if ($nullable && (string) $type === 'mixed') { - throw new \LogicException('mixed type cannot be nullable'); + $notNullableTypes = [ + 'void', 'mixed', 'never', + ]; + if ($nullable && in_array((string) $type, $notNullableTypes)) { + throw new \LogicException(sprintf('%s type cannot be nullable', $type)); } return $nullable ? new NullableType($type) : $type; diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index 9376cda461..da6348f6db 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -126,6 +126,7 @@ public function testNormalizeType() { $this->assertEquals(new Node\Identifier('void'), BuilderHelpers::normalizeType('void')); $this->assertEquals(new Node\Identifier('object'), BuilderHelpers::normalizeType('object')); $this->assertEquals(new Node\Identifier('mixed'), BuilderHelpers::normalizeType('mixed')); + $this->assertEquals(new Node\Identifier('never'), BuilderHelpers::normalizeType('never')); $intIdentifier = new Node\Identifier('int'); $this->assertSame($intIdentifier, BuilderHelpers::normalizeType($intIdentifier)); @@ -161,6 +162,12 @@ public function testNormalizeTypeNullableMixed() { BuilderHelpers::normalizeType('?mixed'); } + public function testNormalizeTypeNullableNever() { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('never type cannot be nullable'); + BuilderHelpers::normalizeType('?never'); + } + public function testNormalizeValue() { $expression = new Scalar\LNumber(1); $this->assertSame($expression, BuilderHelpers::normalizeValue($expression)); From 3fb73520c1d3529f2e4ebffebc84b32db43f16ea Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Sat, 3 Jul 2021 02:00:54 +0200 Subject: [PATCH 019/428] Add handling for Enum(Case)s in NameResolver --- lib/PhpParser/NodeVisitor/NameResolver.php | 11 +++++++++++ lib/PhpParser/PrettyPrinter/Standard.php | 1 + test/PhpParser/NodeVisitor/NameResolverTest.php | 15 +++++++++++++++ test/code/prettyPrinter/stmt/enum.test | 4 ++-- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index c55532a5ea..79bbc4577a 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -86,6 +86,15 @@ public function enterNode(Node $node) { $this->resolveAttrGroups($node); $this->addNamespacedName($node); + } elseif ($node instanceof Stmt\Enum_) { + foreach ($node->implements as &$interface) { + $interface = $this->resolveClassName($interface); + } + + $this->resolveAttrGroups($node); + if (null !== $node->name) { + $this->addNamespacedName($node); + } } elseif ($node instanceof Stmt\Trait_) { $this->resolveAttrGroups($node); $this->addNamespacedName($node); @@ -110,6 +119,8 @@ public function enterNode(Node $node) { } } else if ($node instanceof Stmt\ClassConst) { $this->resolveAttrGroups($node); + } else if ($node instanceof Stmt\EnumCase) { + $this->resolveAttrGroups($node); } elseif ($node instanceof Expr\StaticCall || $node instanceof Expr\StaticPropertyFetch || $node instanceof Expr\ClassConstFetch diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 14496ceb3c..62d1f34c10 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -730,6 +730,7 @@ protected function pStmt_Interface(Stmt\Interface_ $node) { protected function pStmt_Enum(Stmt\Enum_ $node) { return $this->pAttrGroups($node->attrGroups) . 'enum ' . $node->name + . ($node->scalarType ? " : $node->scalarType" : '') . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index a98b57cd00..5c85c292bd 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -206,6 +206,12 @@ public function a(A $a) : A; public function b(A|B|int $a): A|B|int; } +#[X] +enum E: int { + #[X] + case A = 1; +} + #[X] trait A {} @@ -264,6 +270,12 @@ public function a(\NS\A $a) : \NS\A; public function b(\NS\A|\NS\B|int $a) : \NS\A|\NS\B|int; } #[\NS\X] +enum E : int +{ + #[\NS\X] + case A = 1; +} +#[\NS\X] trait A { } @@ -327,6 +339,7 @@ public function testAddDeclarationNamespacedName() { ]), new Stmt\Trait_('E'), new Expr\New_(new Stmt\Class_(null)), + new Stmt\Enum_('F'), ]; $traverser = new PhpParser\NodeTraverser; @@ -339,6 +352,7 @@ public function testAddDeclarationNamespacedName() { $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); + $this->assertSame('NS\\F', (string) $stmts[0]->stmts[6]->namespacedName); $stmts = $traverser->traverse([new Stmt\Namespace_(null, $nsStmts)]); $this->assertSame('A', (string) $stmts[0]->stmts[0]->namespacedName); @@ -347,6 +361,7 @@ public function testAddDeclarationNamespacedName() { $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); + $this->assertSame('F', (string) $stmts[0]->stmts[6]->namespacedName); } public function testAddRuntimeResolvedNamespacedName() { diff --git a/test/code/prettyPrinter/stmt/enum.test b/test/code/prettyPrinter/stmt/enum.test index 260e27320e..407c371e4b 100644 --- a/test/code/prettyPrinter/stmt/enum.test +++ b/test/code/prettyPrinter/stmt/enum.test @@ -28,12 +28,12 @@ enum A implements B { } } -enum B +enum B : int { case X = 1; case Y = 2; } -enum C implements D +enum C : string implements D { case Z = 'A'; } \ No newline at end of file From fe14cf3672a149364fb66dfe11bf6549af899f94 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Jul 2021 15:36:55 +0200 Subject: [PATCH 020/428] Release PHP-Parser 4.11.0 --- CHANGELOG.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6196fac5d0..8c8e34ed63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,24 @@ -Version 4.10.6-dev +Version 4.11.1-dev ------------------ Nothing yet. +Version 4.11.0 (2021-07-03) +--------------------------- + +### Added + +* `BuilderFactory::args()` now accepts named arguments. +* `BuilderFactory::attribute()` has been added. +* An `addAttribute()` method accepting an `Attribute` or `AttributeGroup` has been adde to all + builders that accept attributes, such as `Builder\Class_`. + +### Fixed + +* `NameResolver` now handles enums. +* `PrettyPrinter` now prints backing enum type. +* Builder methods for types now property handle `never` type. + Version 4.10.5 (2021-05-03) --------------------------- From feed91cf0f70857968d3719211204f9e00274ffe Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 9 Jul 2021 15:46:50 +0200 Subject: [PATCH 021/428] Avoid ctype_alnum() on integer This is deprecated in PHP 8.1 --- lib/PhpParser/PrettyPrinterAbstract.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index f453db0919..0e0e79d7b1 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1123,7 +1123,8 @@ protected function initializeLabelCharMap() { for ($i = 0; $i < 256; $i++) { // Since PHP 7.1 The lower range is 0x80. However, we also want to support code for // older versions. - $this->labelCharMap[chr($i)] = $i >= 0x7f || ctype_alnum($i); + $chr = chr($i); + $this->labelCharMap[$chr] = $i >= 0x7f || ctype_alnum($chr); } } From c758510a37218d631fd10f67bca5bccbfef864fa Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 9 Jul 2021 16:08:46 +0200 Subject: [PATCH 022/428] Add support for PHP 8.1 With the introduction of intersection types, PHP now lexes the token '&' either as T_AMPERSAND_(NOT_)FOLLOWED_BY_VAR_OR_VARARG. This completely breaks parsing of any code containing '&'. Fix this by canonicalizing to the new token format (unconditionally, independent of emulation) and adjusting the parser to use the two new tokens. This doesn't add actual support for intersection types yet. --- grammar/php5.y | 36 +- grammar/php7.y | 34 +- grammar/tokens.y | 2 +- lib/PhpParser/Lexer.php | 29 +- lib/PhpParser/Parser/Php5.php | 2293 +++++++++-------- lib/PhpParser/Parser/Php7.php | 2394 +++++++++--------- lib/PhpParser/Parser/Tokens.php | 216 +- test/PhpParser/CodeParsingTest.php | 7 +- test/code/parser/errorHandling/recovery.test | 6 +- 9 files changed, 2578 insertions(+), 2439 deletions(-) diff --git a/grammar/php5.y b/grammar/php5.y index c7d245dc78..f9e7e7dd16 100644 --- a/grammar/php5.y +++ b/grammar/php5.y @@ -20,6 +20,11 @@ top_statement_list: if ($nop !== null) { $1[] = $nop; } $$ = $1; } ; +ampersand: + T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG + | T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG +; + 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 @@ -246,7 +251,12 @@ variables_list: optional_ref: /* empty */ { $$ = false; } - | '&' { $$ = true; } + | ampersand { $$ = true; } +; + +optional_arg_ref: + /* empty */ { $$ = false; } + | T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG { $$ = true; } ; optional_ellipsis: @@ -378,7 +388,7 @@ new_else_single: foreach_variable: variable { $$ = array($1, false); } - | '&' variable { $$ = array($2, true); } + | ampersand variable { $$ = array($2, true); } | list_expr { $$ = array($1, false); } ; @@ -393,9 +403,9 @@ non_empty_parameter_list: ; parameter: - optional_param_type optional_ref optional_ellipsis plain_variable + optional_param_type optional_arg_ref optional_ellipsis plain_variable { $$ = Node\Param[$4, null, $1, $2, $3]; $this->checkParam($$); } - | optional_param_type optional_ref optional_ellipsis plain_variable '=' static_scalar + | optional_param_type optional_arg_ref optional_ellipsis plain_variable '=' static_scalar { $$ = Node\Param[$4, $6, $1, $2, $3]; $this->checkParam($$); } ; @@ -428,7 +438,7 @@ non_empty_argument_list: argument: expr { $$ = Node\Arg[$1, false, false]; } - | '&' variable { $$ = Node\Arg[$2, true, false]; } + | ampersand variable { $$ = Node\Arg[$2, true, false]; } | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; } ; @@ -562,8 +572,8 @@ 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]; } + | variable '=' ampersand variable { $$ = Expr\AssignRef[$1, $4]; } + | variable '=' ampersand 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]; } @@ -589,7 +599,8 @@ expr: | 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 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } + | expr T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 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]; } @@ -816,7 +827,10 @@ static_operation: | 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 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG static_scalar + { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } + | static_scalar T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 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]; } @@ -986,8 +1000,8 @@ non_empty_array_pair_list: 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]; } + | expr T_DOUBLE_ARROW ampersand variable { $$ = Expr\ArrayItem[$4, $1, true]; } + | ampersand variable { $$ = Expr\ArrayItem[$2, null, true]; } | T_ELLIPSIS expr { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; } ; diff --git a/grammar/php7.y b/grammar/php7.y index 3c34398d6d..f1fa070df8 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -20,6 +20,11 @@ top_statement_list: if ($nop !== null) { $1[] = $nop; } $$ = $1; } ; +ampersand: + T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG + | T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG +; + 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 @@ -327,7 +332,12 @@ non_empty_variables_list: optional_ref: /* empty */ { $$ = false; } - | '&' { $$ = true; } + | ampersand { $$ = true; } +; + +optional_arg_ref: + /* empty */ { $$ = false; } + | T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG { $$ = true; } ; optional_ellipsis: @@ -505,7 +515,7 @@ new_else_single: foreach_variable: variable { $$ = array($1, false); } - | '&' variable { $$ = array($2, true); } + | ampersand variable { $$ = array($2, true); } | list_expr { $$ = array($1, false); } | array_short_syntax { $$ = array($1, false); } ; @@ -528,13 +538,16 @@ optional_visibility_modifier: ; parameter: - optional_attributes optional_visibility_modifier optional_type_without_static optional_ref optional_ellipsis plain_variable + optional_attributes optional_visibility_modifier optional_type_without_static + optional_arg_ref optional_ellipsis plain_variable { $$ = new Node\Param($6, null, $3, $4, $5, attributes(), $2, $1); $this->checkParam($$); } - | optional_attributes optional_visibility_modifier optional_type_without_static optional_ref optional_ellipsis plain_variable '=' expr + | optional_attributes optional_visibility_modifier optional_type_without_static + optional_arg_ref optional_ellipsis plain_variable '=' expr { $$ = new Node\Param($6, $8, $3, $4, $5, attributes(), $2, $1); $this->checkParam($$); } - | optional_attributes optional_visibility_modifier optional_type_without_static optional_ref optional_ellipsis error + | optional_attributes optional_visibility_modifier optional_type_without_static + optional_arg_ref optional_ellipsis error { $$ = new Node\Param(Expr\Error[], null, $3, $4, $5, attributes(), $2, $1); } ; @@ -594,7 +607,7 @@ non_empty_argument_list: argument: expr { $$ = Node\Arg[$1, false, false]; } - | '&' variable { $$ = Node\Arg[$2, true, false]; } + | ampersand variable { $$ = Node\Arg[$2, true, false]; } | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; } | identifier_ex ':' expr { $$ = new Node\Arg($3, false, false, attributes(), $1); } @@ -756,7 +769,7 @@ expr: | 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]; } + | variable '=' ampersand variable { $$ = Expr\AssignRef[$1, $4]; } | new_expr { $$ = $1; } | match { $$ = $1; } | T_CLONE expr { $$ = Expr\Clone_[$2]; } @@ -783,7 +796,8 @@ expr: | 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 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } + | expr T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 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]; } @@ -1106,10 +1120,10 @@ inner_array_pair_list: array_pair: expr { $$ = Expr\ArrayItem[$1, null, false]; } - | '&' variable { $$ = Expr\ArrayItem[$2, null, true]; } + | ampersand variable { $$ = Expr\ArrayItem[$2, null, true]; } | list_expr { $$ = Expr\ArrayItem[$1, null, false]; } | expr T_DOUBLE_ARROW expr { $$ = Expr\ArrayItem[$3, $1, false]; } - | expr T_DOUBLE_ARROW '&' variable { $$ = Expr\ArrayItem[$4, $1, true]; } + | expr T_DOUBLE_ARROW ampersand variable { $$ = Expr\ArrayItem[$4, $1, true]; } | expr T_DOUBLE_ARROW list_expr { $$ = Expr\ArrayItem[$3, $1, false]; } | T_ELLIPSIS expr { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; } | /* empty */ { $$ = null; } diff --git a/grammar/tokens.y b/grammar/tokens.y index 88d4498bfa..ab36c55973 100644 --- a/grammar/tokens.y +++ b/grammar/tokens.y @@ -18,7 +18,7 @@ %left T_BOOLEAN_AND %left '|' %left '^' -%left '&' +%left T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG %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 diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index e29e4b91fb..20495e5073 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -134,10 +134,11 @@ protected function postprocessTokens(ErrorHandler $errorHandler) { // detected by finding "gaps" in the token array. Unterminated comments are detected // by checking if a trailing comment has a "*/" at the end. // - // Additionally, we canonicalize to the PHP 8 comment format here, which does not include - // the trailing whitespace anymore. - // - // We also canonicalize to the PHP 8 T_NAME_* tokens. + // Additionally, we perform a number of canonicalizations here: + // * Use the PHP 8.0 comment format, which does not include trailing whitespace anymore. + // * Use PHP 8.0 T_NAME_* tokens. + // * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and + // T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types. $filePos = 0; $line = 1; @@ -208,6 +209,22 @@ protected function postprocessTokens(ErrorHandler $errorHandler) { } } + if ($token === '&') { + $next = $i + 1; + while (isset($this->tokens[$next]) && $this->tokens[$next][0] === \T_WHITESPACE) { + $next++; + } + $followedByVarOrVarArg = isset($this->tokens[$next]) && + ($this->tokens[$next][0] === \T_VARIABLE || $this->tokens[$next][0] === \T_ELLIPSIS); + $this->tokens[$i] = $token = [ + $followedByVarOrVarArg + ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG + : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG, + '&', + $line, + ]; + } + $tokenValue = \is_string($token) ? $token : $token[1]; $tokenLen = \strlen($tokenValue); @@ -424,6 +441,8 @@ private function defineCompatibilityTokens() { 'T_ATTRIBUTE', // PHP 8.1 'T_ENUM', + 'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', + 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', ]; // PHP-Parser might be used together with another library that also emulates some or all @@ -514,6 +533,8 @@ protected function createTokenMap() : array { $tokenMap[\T_MATCH] = Tokens::T_MATCH; $tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = Tokens::T_NULLSAFE_OBJECT_OPERATOR; $tokenMap[\T_ATTRIBUTE] = Tokens::T_ATTRIBUTE; + $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; + $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; $tokenMap[\T_ENUM] = Tokens::T_ENUM; return $tokenMap; diff --git a/lib/PhpParser/Parser/Php5.php b/lib/PhpParser/Parser/Php5.php index 39cdbcc30f..c260e598bd 100644 --- a/lib/PhpParser/Parser/Php5.php +++ b/lib/PhpParser/Parser/Php5.php @@ -17,17 +17,17 @@ */ class Php5 extends \PhpParser\ParserAbstract { - protected $tokenToSymbolMapSize = 393; - protected $actionTableSize = 1069; - protected $gotoTableSize = 580; + protected $tokenToSymbolMapSize = 395; + protected $actionTableSize = 1093; + protected $gotoTableSize = 643; - protected $invalidSymbol = 166; + protected $invalidSymbol = 167; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 405; - protected $numNonLeafStates = 658; + protected $YY2TBLSTATE = 415; + protected $numNonLeafStates = 662; protected $symbolToName = array( "EOF", @@ -67,7 +67,8 @@ class Php5 extends \PhpParser\ParserAbstract "T_BOOLEAN_AND", "'|'", "'^'", - "'&'", + "T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG", + "T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG", "T_IS_EQUAL", "T_IS_NOT_EQUAL", "T_IS_IDENTICAL", @@ -199,662 +200,685 @@ class Php5 extends \PhpParser\ParserAbstract ); protected $tokenToSymbol = array( - 0, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 55, 162, 166, 159, 54, 37, 166, - 157, 158, 52, 49, 8, 50, 51, 53, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 31, 154, - 43, 16, 45, 30, 67, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 69, 166, 161, 36, 166, 160, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 155, 35, 156, 57, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 1, 2, 3, 4, + 0, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 56, 163, 167, 160, 55, 167, 167, + 158, 159, 53, 50, 8, 51, 52, 54, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 31, 155, + 44, 16, 46, 30, 68, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 70, 167, 162, 36, 167, 161, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 156, 35, 157, 58, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 32, 33, 34, 38, 39, 40, 41, - 42, 44, 46, 47, 48, 56, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 68, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 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, 163, 129, 130, 131, 164, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 165 + 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, + 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 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, 164, 130, 131, + 132, 165, 133, 134, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, + 151, 152, 153, 154, 166 ); protected $action = array( - 693, 663, 664, 665, 666, 667, 282, 668, 669, 670, - 706, 707, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 0, 230, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32767,-32767,-32767,-32767, 27, 242, 243,-32766, - -32766,-32766,-32766,-32766, 671,-32766, 333,-32766,-32766,-32766, - -32766,-32766,-32766,-32767,-32767,-32767,-32767,-32767, 672, 673, - 674, 675, 676, 677, 678, 1034, 816, 740, 941, 942, - 943, 940, 939, 938, 679, 680, 681, 682, 683, 684, - 685, 686, 687, 688, 689, 709, 732, 710, 711, 712, - 713, 701, 702, 703, 731, 704, 705, 690, 691, 692, - 694, 695, 696, 734, 735, 736, 737, 738, 739, 697, - 698, 699, 700, 730, 721, 719, 720, 716, 717, 437, - 708, 714, 715, 722, 723, 725, 724, 726, 727, 55, - 56, 417, 57, 58, 718, 729, 728, 28, 59, 60, - -220, 61,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766, 36,-32767,-32767,-32767,-32767, 1034, 35, 106, 107, + 699, 669, 670, 671, 672, 673, 286, 674, 675, 676, + 712, 713, 223, 224, 225, 226, 227, 228, 229, 230, + 231, 232, 0, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244,-32766,-32766,-32766,-32766,-32766, + -32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, 245, 246, + 242, 243, 244,-32766,-32766, 677,-32766, 750,-32766,-32766, + -32766,-32766,-32766,-32766,-32766, 1224, 245, 246, 1225, 678, + 679, 680, 681, 682, 683, 684,-32766, 48, 746,-32766, + -32766,-32766,-32766,-32766,-32766, 685, 686, 687, 688, 689, + 690, 691, 692, 693, 694, 695, 715, 738, 716, 717, + 718, 719, 707, 708, 709, 737, 710, 711, 696, 697, + 698, 700, 701, 702, 740, 741, 742, 743, 744, 745, + 703, 704, 705, 706, 736, 727, 725, 726, 722, 723, + 751, 714, 720, 721, 728, 729, 731, 730, 732, 733, + 55, 56, 425, 57, 58, 724, 735, 734, 1073, 59, + 60, -224, 61,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 121,-32767,-32767,-32767,-32767, 29, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118,-32766,-32766,-32766,-32766, 62, 63, 1034, 125, 285, - 292, 64, 748, 65, 290, 291, 66, 67, 68, 69, - 70, 71, 72, 73, 763, 25, 298, 74, 409, 973, - 975, 294, 294, 1086, 1087, 1064, 796, 748, 218, 219, - 220, 465,-32766,-32766,-32766, 742, 864, 817, 54, 807, - 9,-32766,-32766,-32766, 760, 320, 761, 410, 10, 202, - 246, 428, 209,-32766, 933,-32766,-32766,-32766,-32766,-32766, - -32766, 488,-32766, 438,-32766,-32766,-32766,-32766,-32766, 473, - 474, 941, 942, 943, 940, 939, 938,-32766, 475, 476, - 337, 1092, 1093, 1094, 1095, 1089, 1090, 315, 1214, -255, - 747, 1215, -505, 1096, 1091, 888, 889, 1066, 1065, 1067, - 218, 219, 220, 41, 414, 337, 330, 895, 332, 418, - -126, -126, -126, 75, 52, 464, -4, 817, 54, 805, - -224, 202, 40, 21, 419, -126, 466, -126, 467, -126, - 468, -126, 359, 420, 128, 128, 748, 1171, 31, 32, - 421, 422, 1034, 894, 33, 469,-32766,-32766,-32766, 1186, - 351, 352, 470, 471,-32766,-32766,-32766, 309, 472, 865, - 323, 788, 835, 423, 424,-32767,-32767,-32767,-32767, 97, - 98, 99, 100, 101, 615,-32766, 313,-32766,-32766,-32766, - -32766, 354, 1185, 1171, 218, 219, 220, 475, 748, 418, - 819, 629, -126, 297, 915, 464, 817, 54,-32766, 805, - 124, 748, 40, 21, 419, 202, 466, 48, 467, 534, - 468, 129, 429, 420, 337, 341, 888, 889, 31, 32, - 421, 422, 416, 405, 33, 469,-32766,-32766, 311, 298, - 351, 352, 470, 471,-32766,-32766,-32766, 748, 472, 412, - 748, 752, 835, 423, 424, 338, 1066, 1065, 1067, 219, - 220, 919, 1136, 296, 20,-32766, 576,-32766,-32766,-32766, - 742, 341, 342, 413, 429, 1064, 337, 512, 418, 202, - 819, 629, -4, 1034, 464, 817, 54, 49, 805, 337, - 762, 40, 21, 419, 51, 466, 1034, 467, 475, 468, - 340, 748, 420, 120, -205, -205, -205, 31, 32, 421, - 422, 1062,-32766, 33, 469,-32766,-32766,-32766, 744, 351, - 352, 470, 471, 429, 1098, 337, 429, 472, 337, 1034, - 788, 835, 423, 424, 415, 1098,-32766, 802,-32766,-32766, - 102, 103, 104, 1137, 303, 202, 130, 1066, 1065, 1067, - 337, 123, 239, 240, 241, 748, 105, 418, 1205, 819, - 629, -205, 440, 464,-32766,-32766,-32766, 805, 242, 243, - 40, 21, 419, 121, 466, 126, 467, 429, 468, 337, - 122, 420, 1052, -204, -204, -204, 31, 32, 421, 422, - 1034, 745, 33, 469, 220, 759, 817, 54, 351, 352, - 470, 471, 218, 219, 220, 119, 472, 244, 127, 788, - 835, 423, 424, 202,-32766,-32766,-32766, 30, 293, 803, - 79, 80, 81, 202, 798, 210, 632, 99, 100, 101, - 236, 237, 238, 817, 54,-32766, 211, 800, 819, 629, - -204, 34, 1034, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 286, 303, 418, 1034, - 817, 54,-32766,-32766, 464, 218, 219, 220, 805, 105, - 914, 40, 21, 419, 78, 466, 212, 467, 337, 468, - 133, 247, 420, 295, 567, 248, 202, 31, 32, 421, - 633, 242, 243, 33, 469, 418, 249, 817, 54, 351, - 352, 464, 760, -84, 761, 805, 310, 472, 40, 21, - 419,-32766, 466, 640, 467, 643, 468, 447, 22, 420, - 815, 452, 584, 132, 31, 32, 421, 637, 134, 364, - 33, 469, 418, 303, 817, 54, 351, 352, 464, 819, - 629, 828, 805, 43, 472, 40, 21, 419, 44, 466, - 45, 467, 46, 468, 591, 592, 420, 753, 635, 930, - 649, 31, 32, 421, 641, 918, 657, 33, 469, 418, - 105, 817, 54, 351, 352, 464, 819, 629, 47, 805, - 50, 472, 40, 21, 419, 53, 466, 131, 467, 298, - 468, 599, 742, 420,-32766, -274, 516, 570, 31, 32, - 421, 646, 748, 946, 33, 469, 418, 589, 436,-32766, - 351, 352, 464, 819, 629, 623, 805, 836, 472, 40, - 21, 419, 611, 466, -82, 467, 603, 468, 11, 573, - 420, 439, 456, 281, 318, 31, 32, 421, 588, 432, - 321, 33, 469, 418, -414, 458, 322, 351, 352, 464, - 851, 629, 837, 805, -505, 472, 40, 21, 419, 654, - 466, 38, 467, 24, 468, 0, 0, 420, 319, 0, - -405, 0, 31, 32, 421, 245, 312, 314, 33, 469, - -506, 0, 0, 1097, 351, 352, 1143, 819, 629, 0, - 0, 527, 472, 213, 214, 6, 7, 12, 14, 215, - 363, 216, -415, 558, 789, -221, 830, 0, 0, 747, - 0, 0, 0, 207, 39, 652, 653, 758, 806, 814, - 793, 1086, 1087, 808, 819, 629, 213, 214, 867, 1088, - 858, 859, 215, 791, 216, 852, 849, 847, 925, 926, - 923, 813, 797, 799, 801, 804, 207, 922, 756, 757, - 924, 287, 78, 331, 1086, 1087, 353, 630, 634, 636, - 638, 639, 1088, 642, 644, 645, 647, 648, 631, 1142, - 1211, 1213, 755, 834, 754, 833, 1212, 554, 832, 1092, - 1093, 1094, 1095, 1089, 1090, 388, 1048, 824, 1036, 831, - 1037, 1096, 1091, 822, 931, 856, 857, 451, 1210, 1179, - 0, 217, 1177, 1162, 1175, 1077, 906, 1183, 1173, 0, - 554, 26, 1092, 1093, 1094, 1095, 1089, 1090, 388, 29, - 37, 42, 76, 77, 1096, 1091, 208, 284, 288, 289, - 304, 305, 306, 307, 217, 335, 406, 408, 0, -220, - 16, 17, 18, 383, 448, 455, 457, 462, 548, 620, - 1039, 1042, 896, 1102, 1038, 1014, 559, 1013, 1079, 0, - 0, -424, 1032, 0, 1043, 1045, 1044, 1047, 1046, 1061, - 1176, 1161, 1157, 1174, 1076, 1208, 1103, 1156, 595 + 118, 119, 1043, 766, 1071, 767, 580, 62, 63,-32766, + -32766,-32766,-32766, 64, 516, 65, 294, 295, 66, 67, + 68, 69, 70, 71, 72, 73, 822, 25, 302, 74, + 418, 981, 983, 1043, 1181, 1095, 1096, 1073, 748, 754, + 1075, 1074, 1076, 469,-32766,-32766,-32766, 337, 823, 54, + -32767,-32767,-32767,-32767, 98, 99, 100, 101, 102, 220, + 221, 222, 78, 361, 1107,-32766, 341,-32766,-32766,-32766, + -32766,-32766, 1107, 492, 949, 950, 951, 948, 947, 946, + 207, 477, 478, 949, 950, 951, 948, 947, 946, 1043, + 479, 480, 52, 1101, 1102, 1103, 1104, 1098, 1099, 319, + 872, 668, 667, 27, -511, 1105, 1100,-32766, 130, 1075, + 1074, 1076, 345, 668, 667, 41, 126, 341, 334, 369, + 336, 426, -128, -128, -128, 896, 897, 468, 220, 221, + 222, 811, 1195, 619, 40, 21, 427, -128, 470, -128, + 471, -128, 472, -128, 802, 428, -4, 823, 54, 207, + 33, 34, 429, 360, 317, 28, 35, 473,-32766,-32766, + -32766, 211, 356, 357, 474, 475,-32766,-32766,-32766, 754, + 476, 49, 313, 794, 843, 430, 431, 289, 125,-32766, + 813,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, + -32767,-32767,-32767,-32766,-32766,-32766, 769, 103, 104, 105, + 327, 307, 825, 633, -128, 1075, 1074, 1076, 221, 222, + 927, 748, 1146, 106,-32766, 129,-32766,-32766,-32766,-32766, + 426, 823, 54, 902, 873, 302, 468, 75, 207, 359, + 811, 668, 667, 40, 21, 427, 754, 470, 754, 471, + 423, 472, 1043, 127, 428, 435, 1043, 341, 1043, 33, + 34, 429, 360, 1181, 415, 35, 473, 122, 10, 315, + 128, 356, 357, 474, 475,-32766,-32766,-32766, 768, 476, + 668, 667, 758, 843, 430, 431, 754, 1043, 1147,-32766, + -32766,-32766, 754, 419, 342, 1215,-32766, 131,-32766,-32766, + -32766, 341, 363, 346, 426, 823, 54, 100, 101, 102, + 468, 825, 633, -4, 811, 442, 903, 40, 21, 427, + 754, 470, 435, 471, 341, 472, 341, 766, 428, 767, + -209, -209, -209, 33, 34, 429, 360, 479, 1196, 35, + 473, 345,-32766,-32766,-32766, 356, 357, 474, 475, 220, + 221, 222, 421, 476, 32, 297, 794, 843, 430, 431, + 754, 754, 435,-32766, 341,-32766,-32766, 9, 300, 51, + 207, 249, 324, 753, 120, 220, 221, 222, 426, 30, + 247, 941, 422, 424, 468, 825, 633, -209, 811, 1043, + 1061, 40, 21, 427, 129, 470, 207, 471, 341, 472, + 804, 20, 428, 124, -208, -208, -208, 33, 34, 429, + 360, 479, 212, 35, 473, 923, -259, 823, 54, 356, + 357, 474, 475,-32766,-32766,-32766, 1043, 476, 213, 806, + 794, 843, 430, 431,-32766,-32766, 435, 435, 341, 341, + 443, 79, 80, 81,-32766, 668, 667, 636, 344, 808, + 668, 667, 239, 240, 241, 123, 214, 538, 250, 825, + 633, -208, 36, 251, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 252, 307, + 426, 220, 221, 222, 823, 54, 468,-32766, 222, 765, + 811, 106, 134, 40, 21, 427, 571, 470, 207, 471, + 445, 472, 207,-32766, 428, 896, 897, 207, 307, 33, + 34, 429, 245, 246, 637, 35, 473, 452, 22, 809, + 922, 356, 357, 457, 588, 135, 374, 595, 596, 476, + -228, 759, 639, 938, 653, 926, 661, -86, 823, 54, + 314, 644, 647, 821, 133, 836, 43, 106, 603, 44, + 45, 46, 47, 748, 50, 53, 132, 426, 302,-32766, + 520, 825, 633, 468, -84, 607, 577, 811, 641, 362, + 40, 21, 427, -278, 470, 754, 471, 954, 472, 441, + 627, 428, 823, 54, 574, 844, 33, 34, 429, 11, + 615, 845, 35, 473, 444, 461, 285, -511, 356, 357, + 592, -419, 593, 1106, 1153, -410, 476, 368, 838, 38, + 658, 426, 645, 795, 1052, 0, 325, 468, 0,-32766, + 0, 811, 0, 0, 40, 21, 427, 0, 470, 0, + 471, 0, 472, 0, 322, 428, 823, 54, 825, 633, + 33, 34, 429, 0, 326, 0, 35, 473, 323, 0, + 316, 318, 356, 357, -512, 426, 0, 753, 531, 0, + 476, 468, 6, 0, 0, 811, 650, 7, 40, 21, + 427, 12, 470, 14, 471, 373, 472, -420, 562, 428, + 823, 54, 78, -225, 33, 34, 429, 39, 656, 657, + 35, 473, 859, 633, 764, 812, 356, 357, 820, 799, + 814, 875, 866, 867, 476, 797, 860, 857, 855, 426, + 933, 934, 931, 819, 803, 468, 805, 807, 810, 811, + 930, 762, 40, 21, 427, 763, 470, 932, 471, 335, + 472, 358, 634, 428, 638, 640, 825, 633, 33, 34, + 429, 642, 643, 646, 35, 473, 648, 649, 651, 652, + 356, 357, 635, 426, 1221, 1223, 761, 842, 476, 468, + 248, 760, 841, 811, 1222, 840, 40, 21, 427, 1057, + 470, 830, 471, 1045, 472, 839, 1046, 428, 828, 215, + 216, 939, 33, 34, 429, 217, 864, 218, 35, 473, + 825, 633, 24, 865, 356, 357, 456, 1220, 1189, 209, + 1187, 1172, 476, 1185, 215, 216, 1086, 1095, 1096, 914, + 217, 1193, 218, 1183, -224, 1097, 26, 31, 37, 42, + 76, 77, 210, 288, 209, 292, 293, 308, 309, 310, + 311, 339, 1095, 1096, 825, 633, 355, 291, 416, 1152, + 1097, 16, 17, 18, 393, 453, 460, 462, 466, 552, + 624, 1048, 1051, 904, 1111, 1047, 1023, 563, 1022, 1088, + 0, 0, -429, 558, 1041, 1101, 1102, 1103, 1104, 1098, + 1099, 398, 1054, 1053, 1056, 1055, 1070, 1105, 1100, 1186, + 1171, 1167, 1184, 1085, 1218, 1112, 1166, 219, 558, 599, + 1101, 1102, 1103, 1104, 1098, 1099, 398, 0, 0, 0, + 0, 0, 1105, 1100, 0, 0, 0, 0, 0, 0, + 0, 0, 219 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 14, 9, 10, 11, 12, 13, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 0, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 9, 10, 11, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 8, 68, 69, 33, - 34, 35, 36, 37, 56, 30, 8, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 70, 71, - 72, 73, 74, 75, 76, 13, 1, 79, 115, 116, - 117, 118, 119, 120, 86, 87, 88, 89, 90, 91, + 41, 42, 0, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 9, 10, 11, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 69, 70, + 53, 54, 55, 9, 10, 57, 30, 80, 32, 33, + 34, 35, 36, 37, 38, 80, 69, 70, 83, 71, + 72, 73, 74, 75, 76, 77, 9, 70, 80, 33, + 34, 35, 36, 37, 38, 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, 31, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 3, - 4, 5, 6, 7, 146, 147, 148, 8, 12, 13, - 158, 15, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 14, 43, 44, 45, 46, 13, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 33, 34, 35, 36, 49, 50, 13, 8, 8, - 37, 55, 81, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 156, 69, 70, 71, 72, 58, - 59, 37, 37, 77, 78, 79, 154, 81, 9, 10, - 11, 85, 9, 10, 11, 79, 31, 1, 2, 154, - 107, 9, 10, 11, 105, 112, 107, 126, 8, 30, - 31, 105, 8, 30, 121, 32, 33, 34, 35, 36, - 37, 115, 30, 155, 32, 33, 34, 35, 36, 123, - 124, 115, 116, 117, 118, 119, 120, 115, 132, 133, - 159, 135, 136, 137, 138, 139, 140, 141, 79, 156, - 151, 82, 131, 147, 148, 133, 134, 151, 152, 153, - 9, 10, 11, 157, 8, 159, 160, 158, 162, 73, - 74, 75, 76, 150, 69, 79, 0, 1, 2, 83, - 158, 30, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 8, 97, 150, 150, 81, 81, 102, 103, - 104, 105, 13, 158, 108, 109, 9, 10, 11, 158, - 114, 115, 116, 117, 9, 10, 11, 8, 122, 154, - 8, 125, 126, 127, 128, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 79, 30, 131, 32, 33, 34, - 35, 8, 1, 81, 9, 10, 11, 132, 81, 73, - 154, 155, 156, 37, 154, 79, 1, 2, 115, 83, - 155, 81, 86, 87, 88, 30, 90, 69, 92, 80, - 94, 155, 157, 97, 159, 159, 133, 134, 102, 103, - 104, 105, 8, 107, 108, 109, 9, 10, 112, 70, - 114, 115, 116, 117, 9, 10, 11, 81, 122, 8, - 81, 125, 126, 127, 128, 8, 151, 152, 153, 10, - 11, 156, 161, 8, 158, 30, 84, 32, 33, 34, - 79, 159, 146, 8, 157, 79, 159, 84, 73, 30, - 154, 155, 156, 13, 79, 1, 2, 69, 83, 159, - 156, 86, 87, 88, 69, 90, 13, 92, 132, 94, - 69, 81, 97, 155, 99, 100, 101, 102, 103, 104, - 105, 115, 9, 108, 109, 9, 10, 11, 79, 114, - 115, 116, 117, 157, 142, 159, 157, 122, 159, 13, - 125, 126, 127, 128, 8, 142, 30, 154, 32, 33, - 52, 53, 54, 158, 56, 30, 155, 151, 152, 153, - 159, 14, 52, 53, 54, 81, 68, 73, 84, 154, - 155, 156, 131, 79, 33, 34, 35, 83, 68, 69, - 86, 87, 88, 155, 90, 155, 92, 157, 94, 159, - 155, 97, 158, 99, 100, 101, 102, 103, 104, 105, - 13, 152, 108, 109, 11, 154, 1, 2, 114, 115, - 116, 117, 9, 10, 11, 16, 122, 14, 31, 125, - 126, 127, 128, 30, 9, 10, 11, 143, 144, 154, - 9, 10, 11, 30, 154, 16, 31, 49, 50, 51, - 49, 50, 51, 1, 2, 30, 16, 154, 154, 155, - 156, 30, 13, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 37, 56, 73, 13, - 1, 2, 33, 34, 79, 9, 10, 11, 83, 68, - 154, 86, 87, 88, 155, 90, 16, 92, 159, 94, - 155, 16, 97, 37, 159, 16, 30, 102, 103, 104, - 31, 68, 69, 108, 109, 73, 16, 1, 2, 114, - 115, 79, 105, 31, 107, 83, 31, 122, 86, 87, - 88, 33, 90, 31, 92, 31, 94, 74, 75, 97, - 31, 74, 75, 31, 102, 103, 104, 31, 100, 101, - 108, 109, 73, 56, 1, 2, 114, 115, 79, 154, - 155, 37, 83, 69, 122, 86, 87, 88, 69, 90, - 69, 92, 69, 94, 110, 111, 97, 154, 155, 154, - 155, 102, 103, 104, 31, 154, 155, 108, 109, 73, - 68, 1, 2, 114, 115, 79, 154, 155, 69, 83, - 69, 122, 86, 87, 88, 69, 90, 69, 92, 70, - 94, 76, 79, 97, 84, 81, 84, 89, 102, 103, - 104, 31, 81, 81, 108, 109, 73, 112, 88, 115, - 114, 115, 79, 154, 155, 91, 83, 126, 122, 86, - 87, 88, 93, 90, 96, 92, 95, 94, 96, 99, - 97, 96, 96, 96, 129, 102, 103, 104, 99, 105, - 113, 108, 109, 73, 145, 105, 129, 114, 115, 79, - 154, 155, 126, 83, 131, 122, 86, 87, 88, 156, - 90, 154, 92, 157, 94, -1, -1, 97, 130, -1, - 145, -1, 102, 103, 104, 31, 131, 131, 108, 109, - 131, -1, -1, 142, 114, 115, 142, 154, 155, -1, - -1, 149, 122, 49, 50, 145, 145, 145, 145, 55, - 145, 57, 145, 149, 156, 158, 150, -1, -1, 151, - -1, -1, -1, 69, 154, 154, 154, 154, 154, 154, - 154, 77, 78, 154, 154, 155, 49, 50, 154, 85, - 154, 154, 55, 154, 57, 154, 154, 154, 154, 154, - 154, 154, 154, 154, 154, 154, 69, 154, 154, 154, - 154, 159, 155, 155, 77, 78, 155, 155, 155, 155, - 155, 155, 85, 155, 155, 155, 155, 155, 155, 162, - 156, 156, 156, 156, 156, 156, 156, 133, 156, 135, - 136, 137, 138, 139, 140, 141, 156, 156, 156, 156, - 156, 147, 148, 156, 156, 156, 156, 156, 156, 156, - -1, 157, 156, 156, 156, 156, 156, 156, 156, -1, - 133, 157, 135, 136, 137, 138, 139, 140, 141, 157, - 157, 157, 157, 157, 147, 148, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, -1, 158, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 158, 158, 158, 158, 158, 158, -1, - -1, 160, 160, -1, 161, 161, 161, 161, 161, 161, - 161, 161, 161, 161, 161, 161, 161, 161, 161 + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 153, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 3, 4, 5, 6, 7, 147, 148, 149, 80, 12, + 13, 159, 15, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 156, 44, 45, 46, 47, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 13, 106, 116, 108, 85, 50, 51, 33, + 34, 35, 36, 56, 85, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 1, 70, 71, 72, + 73, 59, 60, 13, 82, 78, 79, 80, 80, 82, + 152, 153, 154, 86, 9, 10, 11, 8, 1, 2, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 9, + 10, 11, 156, 106, 143, 30, 160, 32, 33, 34, + 35, 36, 143, 116, 116, 117, 118, 119, 120, 121, + 30, 124, 125, 116, 117, 118, 119, 120, 121, 13, + 133, 134, 70, 136, 137, 138, 139, 140, 141, 142, + 31, 37, 38, 8, 132, 148, 149, 116, 156, 152, + 153, 154, 160, 37, 38, 158, 8, 160, 161, 8, + 163, 74, 75, 76, 77, 134, 135, 80, 9, 10, + 11, 84, 1, 80, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 155, 98, 0, 1, 2, 30, + 103, 104, 105, 106, 132, 8, 109, 110, 9, 10, + 11, 8, 115, 116, 117, 118, 9, 10, 11, 82, + 123, 70, 8, 126, 127, 128, 129, 8, 156, 30, + 155, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 9, 10, 11, 157, 53, 54, 55, + 8, 57, 155, 156, 157, 152, 153, 154, 10, 11, + 157, 80, 162, 69, 30, 151, 32, 33, 34, 35, + 74, 1, 2, 159, 155, 71, 80, 151, 30, 8, + 84, 37, 38, 87, 88, 89, 82, 91, 82, 93, + 8, 95, 13, 156, 98, 158, 13, 160, 13, 103, + 104, 105, 106, 82, 108, 109, 110, 156, 8, 113, + 31, 115, 116, 117, 118, 9, 10, 11, 157, 123, + 37, 38, 126, 127, 128, 129, 82, 13, 159, 33, + 34, 35, 82, 127, 8, 85, 30, 156, 32, 33, + 34, 160, 8, 147, 74, 1, 2, 50, 51, 52, + 80, 155, 156, 157, 84, 31, 159, 87, 88, 89, + 82, 91, 158, 93, 160, 95, 160, 106, 98, 108, + 100, 101, 102, 103, 104, 105, 106, 133, 159, 109, + 110, 160, 9, 10, 11, 115, 116, 117, 118, 9, + 10, 11, 8, 123, 144, 145, 126, 127, 128, 129, + 82, 82, 158, 30, 160, 32, 33, 108, 8, 70, + 30, 31, 113, 152, 16, 9, 10, 11, 74, 14, + 14, 122, 8, 8, 80, 155, 156, 157, 84, 13, + 159, 87, 88, 89, 151, 91, 30, 93, 160, 95, + 155, 159, 98, 14, 100, 101, 102, 103, 104, 105, + 106, 133, 16, 109, 110, 155, 157, 1, 2, 115, + 116, 117, 118, 9, 10, 11, 13, 123, 16, 155, + 126, 127, 128, 129, 33, 34, 158, 158, 160, 160, + 156, 9, 10, 11, 30, 37, 38, 31, 70, 155, + 37, 38, 50, 51, 52, 156, 16, 81, 16, 155, + 156, 157, 30, 16, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 16, 57, + 74, 9, 10, 11, 1, 2, 80, 116, 11, 155, + 84, 69, 156, 87, 88, 89, 160, 91, 30, 93, + 132, 95, 30, 33, 98, 134, 135, 30, 57, 103, + 104, 105, 69, 70, 31, 109, 110, 75, 76, 155, + 155, 115, 116, 75, 76, 101, 102, 111, 112, 123, + 159, 155, 156, 155, 156, 155, 156, 31, 1, 2, + 31, 31, 31, 31, 31, 38, 70, 69, 77, 70, + 70, 70, 70, 80, 70, 70, 70, 74, 71, 85, + 85, 155, 156, 80, 97, 96, 100, 84, 31, 106, + 87, 88, 89, 82, 91, 82, 93, 82, 95, 89, + 92, 98, 1, 2, 90, 127, 103, 104, 105, 97, + 94, 127, 109, 110, 97, 97, 97, 132, 115, 116, + 100, 146, 113, 143, 143, 146, 123, 106, 151, 155, + 157, 74, 31, 157, 162, -1, 114, 80, -1, 116, + -1, 84, -1, -1, 87, 88, 89, -1, 91, -1, + 93, -1, 95, -1, 130, 98, 1, 2, 155, 156, + 103, 104, 105, -1, 130, -1, 109, 110, 131, -1, + 132, 132, 115, 116, 132, 74, -1, 152, 150, -1, + 123, 80, 146, -1, -1, 84, 31, 146, 87, 88, + 89, 146, 91, 146, 93, 146, 95, 146, 150, 98, + 1, 2, 156, 159, 103, 104, 105, 155, 155, 155, + 109, 110, 155, 156, 155, 155, 115, 116, 155, 155, + 155, 155, 155, 155, 123, 155, 155, 155, 155, 74, + 155, 155, 155, 155, 155, 80, 155, 155, 155, 84, + 155, 155, 87, 88, 89, 155, 91, 155, 93, 156, + 95, 156, 156, 98, 156, 156, 155, 156, 103, 104, + 105, 156, 156, 156, 109, 110, 156, 156, 156, 156, + 115, 116, 156, 74, 157, 157, 157, 157, 123, 80, + 31, 157, 157, 84, 157, 157, 87, 88, 89, 157, + 91, 157, 93, 157, 95, 157, 157, 98, 157, 50, + 51, 157, 103, 104, 105, 56, 157, 58, 109, 110, + 155, 156, 158, 157, 115, 116, 157, 157, 157, 70, + 157, 157, 123, 157, 50, 51, 157, 78, 79, 157, + 56, 157, 58, 157, 159, 86, 158, 158, 158, 158, + 158, 158, 158, 158, 70, 158, 158, 158, 158, 158, + 158, 158, 78, 79, 155, 156, 158, 160, 158, 163, + 86, 159, 159, 159, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, + -1, -1, 161, 134, 161, 136, 137, 138, 139, 140, + 141, 142, 162, 162, 162, 162, 162, 148, 149, 162, + 162, 162, 162, 162, 162, 162, 162, 158, 134, 162, + 136, 137, 138, 139, 140, 141, 142, -1, -1, -1, + -1, -1, 148, 149, -1, -1, -1, -1, -1, -1, + -1, -1, 158 ); protected $actionBase = array( - 0, 226, 306, 385, 464, 285, 246, 246, 786, -2, - -2, 146, -2, -2, -2, 649, 723, 760, 723, 575, - 686, 612, 612, 612, 175, 153, 153, 153, 174, 890, - 319, 62, 450, 463, 557, 609, 636, 496, 496, 496, - 496, 136, 136, 496, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, - 496, 496, 496, 496, 496, 195, 75, 777, 517, 147, - 778, 779, 780, 886, 727, 887, 832, 833, 682, 836, - 837, 838, 839, 840, 831, 841, 907, 842, 591, 591, - 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, - 483, 573, 365, 209, 281, 407, 646, 646, 646, 646, - 646, 646, 646, 327, 327, 327, 327, 327, 327, 327, - 327, 327, 327, 327, 327, 327, 327, 327, 327, 327, - 327, 429, 834, 585, 585, 585, 563, 867, 867, 867, - 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - 867, 867, 867, 867, 867, 867, 867, 867, 867, 867, - 495, 486, -21, -21, 415, 668, 335, 619, 222, 511, - 213, 25, 25, 25, 25, 25, 148, 16, 4, 4, - 4, 4, 151, 312, 312, 312, 312, 119, 119, 119, - 119, 346, 346, 123, 245, 245, 349, 400, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 111, 558, - 558, 561, 561, 310, 152, 152, 152, 152, 704, 273, - 273, 129, 371, 371, 371, 373, 734, 797, 376, 376, - 376, 376, 376, 376, 468, 468, 468, 480, 480, 480, - 702, 587, 454, 587, 454, 684, 748, 509, 748, 700, - 199, 515, 803, 398, 720, 829, 729, 830, 601, 747, - 235, 782, 724, 419, 782, 633, 637, 634, 419, 419, - 715, 98, 863, 292, 195, 595, 405, 667, 781, 421, - 732, 784, 363, 445, 411, 593, 328, 286, 744, 785, - 888, 889, 181, 739, 667, 667, 667, 139, 362, 328, - -8, 613, 613, 613, 613, 48, 613, 613, 613, 613, - 314, 230, 506, 404, 783, 703, 703, 712, 694, 852, - 696, 696, 703, 711, 703, 712, 694, 854, 854, 854, - 854, 703, 694, 703, 703, 703, 696, 696, 694, 709, - 696, 38, 694, 695, 707, 707, 854, 751, 752, 703, - 703, 728, 696, 696, 696, 728, 694, 854, 685, 746, - 234, 696, 854, 665, 711, 665, 703, 685, 694, 665, - 711, 711, 665, 21, 662, 664, 853, 855, 869, 792, - 681, 716, 861, 862, 856, 860, 844, 679, 753, 754, - 569, 669, 671, 673, 699, 740, 701, 735, 724, 692, - 692, 692, 713, 741, 713, 692, 692, 692, 692, 692, - 692, 692, 692, 893, 689, 745, 736, 710, 755, 589, - 600, 793, 731, 738, 882, 875, 891, 892, 863, 880, - 713, 894, 697, 180, 650, 864, 693, 788, 713, 865, - 713, 794, 713, 883, 804, 708, 805, 806, 692, 884, - 895, 896, 897, 898, 899, 900, 901, 902, 706, 903, - 756, 698, 876, 339, 859, 715, 742, 725, 791, 759, - 807, 342, 904, 808, 713, 713, 795, 787, 713, 796, - 764, 750, 872, 766, 877, 905, 731, 726, 878, 713, - 730, 809, 906, 342, 672, 705, 737, 721, 767, 870, - 885, 868, 798, 655, 659, 810, 812, 820, 674, 769, - 873, 874, 871, 771, 799, 670, 800, 719, 821, 801, - 866, 772, 822, 823, 881, 718, 743, 717, 722, 714, - 802, 824, 879, 773, 774, 775, 827, 776, 828, 0, + 0, 227, 326, 400, 474, 233, 132, 132, 752, -2, + -2, 138, -2, -2, -2, 663, 761, 815, 761, 586, + 717, 859, 859, 859, 244, 256, 256, 256, 413, 583, + 583, 880, 546, 169, 415, 444, 409, 200, 200, 200, + 200, 137, 137, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 200, 200, 200, 200, 200, 200, 249, 205, 738, 559, + 535, 739, 741, 742, 876, 679, 877, 820, 821, 693, + 823, 824, 826, 829, 832, 819, 834, 907, 836, 602, + 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, + 602, 67, 536, 299, 510, 230, 44, 652, 652, 652, + 652, 652, 652, 652, 337, 337, 337, 337, 337, 337, + 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, + 337, 337, 378, 584, 584, 584, 657, 909, 648, 934, + 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, + 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, + 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, + 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, + 934, 934, 934, 503, -21, -21, 436, 650, 364, 571, + 215, 426, 156, 26, 26, 329, 329, 329, 329, 329, + 46, 46, 5, 5, 5, 5, 152, 186, 186, 186, + 186, 120, 120, 120, 120, 374, 374, 429, 448, 448, + 334, 267, 449, 449, 449, 449, 449, 449, 449, 449, + 449, 449, 336, 427, 427, 572, 572, 408, 551, 551, + 551, 551, 671, 171, 171, 391, 311, 311, 311, 109, + 641, 856, 68, 68, 68, 68, 68, 68, 324, 324, + 324, -3, -3, -3, 655, 77, 380, 77, 380, 683, + 685, 86, 685, 654, -15, 516, 776, 281, 646, 809, + 680, 816, 560, 711, 202, 578, 857, 643, -23, 578, + 578, 578, 578, 857, 622, 628, 596, -23, 578, -23, + 639, 454, 849, 351, 249, 558, 469, 631, 743, 514, + 688, 746, 464, 544, 548, 556, 7, 412, 708, 750, + 878, 879, 349, 702, 631, 631, 631, 327, 101, 7, + -8, 623, 623, 623, 623, 219, 623, 623, 623, 623, + 291, 430, 545, 401, 745, 653, 653, 675, 839, 814, + 814, 653, 673, 653, 675, 841, 841, 841, 841, 653, + 653, 653, 653, 814, 814, 667, 814, 275, 684, 694, + 694, 841, 713, 714, 653, 653, 697, 814, 814, 814, + 697, 687, 841, 669, 637, 333, 814, 841, 689, 673, + 689, 653, 669, 689, 673, 673, 689, 22, 686, 656, + 840, 842, 860, 756, 638, 644, 847, 848, 843, 845, + 838, 692, 719, 720, 528, 659, 660, 661, 662, 696, + 664, 698, 643, 658, 658, 658, 645, 701, 645, 658, + 658, 658, 658, 658, 658, 658, 658, 632, 635, 709, + 699, 670, 723, 566, 582, 758, 640, 636, 872, 865, + 881, 883, 849, 870, 645, 890, 634, 288, 610, 850, + 633, 753, 645, 851, 645, 759, 645, 873, 777, 666, + 778, 779, 658, 874, 891, 892, 893, 894, 897, 898, + 899, 900, 665, 901, 724, 674, 866, 344, 844, 639, + 705, 677, 755, 725, 780, 372, 902, 784, 645, 645, + 765, 706, 645, 766, 726, 712, 862, 727, 867, 903, + 640, 678, 868, 645, 681, 785, 904, 372, 690, 651, + 704, 649, 728, 858, 875, 853, 767, 612, 617, 787, + 788, 792, 691, 730, 863, 864, 835, 731, 770, 642, + 771, 676, 794, 772, 852, 732, 796, 798, 871, 647, + 707, 682, 672, 668, 773, 799, 869, 733, 735, 736, + 801, 737, 804, 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, 136, - 136, 136, 136, -2, -2, -2, -2, 0, 0, -2, - 0, 0, 0, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 0, - 0, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 591, 591, 591, 591, 591, 591, 591, - 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, - 591, 591, 591, 591, 591, 591, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 591, -21, - -21, -21, -21, 591, -21, -21, -21, -21, -21, -21, - -21, 591, 591, 591, 591, 591, 591, 591, 591, 591, - 591, 591, 591, 591, 591, 591, 591, 591, 591, -21, - 376, 591, 591, 591, -21, 376, 376, 376, 376, 376, - 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, - 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, - 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, - 376, 376, 376, 376, 376, 376, 376, 376, -21, 591, - 0, 0, 591, -21, 591, -21, 591, -21, 591, 591, - 591, 591, 591, 591, -21, -21, -21, -21, -21, -21, - 0, 468, 468, 468, 468, -21, -21, -21, -21, 376, - 376, -37, 376, 376, 376, 376, 376, 376, 376, 376, - 376, 376, 376, 376, 376, 376, 376, 468, 468, 480, - 480, 376, 376, 376, 376, 376, -37, 376, 376, 419, - 711, 711, 711, 454, 454, 454, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 454, 419, - 0, 419, 0, 376, 419, 711, 419, 454, 711, 711, - 419, 696, 618, 618, 618, 618, 342, 328, 0, 711, - 711, 0, 711, 0, 0, 0, 0, 0, 696, 0, - 703, 0, 0, 0, 0, 692, 180, 0, 725, 427, - 0, 0, 0, 0, 0, 0, 725, 427, 435, 435, - 0, 706, 692, 692, 692, 0, 0, 0, 0, 0, + 0, 0, 0, 137, 137, 137, 137, -2, -2, -2, + -2, 0, 0, -2, 0, 0, 0, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 0, 0, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 137, 137, 602, 602, + 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, + 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, + 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 602, -21, -21, -21, -21, 602, -21, + -21, -21, -21, -21, -21, -21, 602, 602, 602, 602, + 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, + 602, 602, 602, 602, -21, 602, 602, 602, -21, 68, + -21, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 602, 0, 0, 602, -21, + 602, -21, 602, -21, -21, 602, 602, 602, 602, 602, + 602, 602, -21, -21, -21, -21, -21, -21, 0, 324, + 324, 324, 324, -21, -21, -21, -21, 68, 68, 147, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 324, 324, -3, -3, 68, + 68, 68, 68, 68, 147, 68, 68, -23, 673, 673, + 673, 380, 380, 380, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 380, -23, 0, -23, + 0, 68, -23, 673, -23, 380, 673, 673, -23, 814, + 604, 604, 604, 604, 372, 7, 0, 0, 673, 673, + 0, 0, 0, 0, 0, 673, 0, 0, 0, 0, + 0, 0, 814, 0, 653, 0, 0, 0, 0, 658, + 288, 0, 677, 456, 0, 0, 0, 0, 0, 0, + 677, 456, 530, 530, 0, 665, 658, 658, 658, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 342 + 0, 0, 0, 0, 0, 0, 372 ); 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,32767, 534, 534, 489,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 293, 293, 293, - 32767,32767,32767, 522, 522, 522, 522, 522, 522, 522, - 522, 522, 522, 522,32767,32767,32767,32767,32767,32767, - 376,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 540, 540, 495,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 297, 297, 297, + 32767,32767,32767, 528, 528, 528, 528, 528, 528, 528, + 528, 528, 528, 528,32767,32767,32767,32767,32767,32767, + 381,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, 382, 539, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 387, + 545,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 362, + 363, 365, 366, 296, 548, 529, 245, 388, 544, 295, + 247, 325, 499,32767,32767,32767, 327, 122, 256, 201, + 498, 125, 294, 232, 380, 382, 326, 301, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 300, 454, 359, 358, 357, 456,32767, 455, 492, + 492, 495,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, 357, 358, - 360, 361, 292, 542, 523, 241, 383, 538, 291, 243, - 321, 493,32767,32767,32767, 323, 120, 252, 197, 492, - 123, 290, 228, 375, 377, 322, 297, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 296, 449,32767, 354, 353, 352, 451, 486, 486, 489, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 323, 483, 482, 324, 452, 328, 453, + 331, 457, 460, 329, 330, 347, 348, 345, 346, 349, + 458, 459, 476, 477, 474, 475, 299, 350, 351, 352, + 353, 478, 479, 480, 481,32767,32767, 280, 539, 539, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 338, 339, 467, 468,32767, 236, 236, + 236, 236, 281, 236,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 333, 334, + 332, 462, 463, 461, 428,32767,32767,32767, 430,32767, + 32767,32767,32767,32767,32767,32767,32767, 500,32767,32767, + 32767,32767,32767, 513, 417, 171,32767, 409,32767, 171, + 171, 171, 171,32767, 220, 222, 167,32767, 171,32767, + 486,32767,32767,32767,32767,32767, 518, 343,32767,32767, + 116,32767,32767,32767, 555,32767, 513,32767, 116,32767, + 32767,32767,32767, 356, 335, 336, 337,32767,32767, 517, + 511, 470, 471, 472, 473,32767, 464, 465, 466, 469, + 32767,32767,32767,32767,32767,32767,32767,32767, 425, 431, + 431,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 516, 515,32767, 410, 494, 186, 184, + 184,32767, 206, 206,32767,32767, 188, 487, 506,32767, + 188, 173,32767, 398, 175, 494,32767,32767, 238,32767, + 238,32767, 398, 238,32767,32767, 238,32767, 411, 435, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 450, 319, 477, 476, 320, 447, 324, 448, 326, 452, - 325, 342, 343, 340, 341, 344, 454, 453, 470, 471, - 468, 469, 295, 345, 346, 347, 348, 472, 473, 474, - 475,32767,32767, 276, 533, 533,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 333, - 334, 461, 462,32767, 232, 232, 232, 232, 277, 232, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 328, 329, 327, 456, 457, 455, - 423,32767,32767,32767, 425,32767,32767,32767,32767,32767, - 32767,32767,32767, 494,32767,32767,32767,32767,32767, 507, - 412,32767, 404,32767,32767, 216, 218, 165,32767,32767, - 480,32767,32767,32767,32767,32767, 512, 338,32767,32767, - 114,32767,32767,32767, 549,32767, 507,32767, 114,32767, - 32767,32767,32767, 351, 330, 331, 332,32767,32767, 511, - 505, 464, 465, 466, 467,32767, 458, 459, 460, 463, - 32767,32767,32767,32767,32767,32767,32767,32767, 169, 420, - 426, 426,32767,32767,32767,32767, 169,32767,32767,32767, - 32767,32767, 169,32767,32767,32767, 510, 509, 169,32767, - 405, 488, 169, 182, 180, 180,32767, 202, 202,32767, - 32767, 184, 481, 500,32767, 184, 169,32767, 393, 171, - 488,32767,32767, 234,32767, 234,32767, 393, 169, 234, - 32767,32767, 234,32767, 406, 430,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 372, 373, 483, 496,32767, 497,32767, 404, 336, - 337, 339, 316,32767, 318, 362, 363, 364, 365, 366, - 367, 368, 370,32767, 410,32767, 413,32767,32767,32767, - 251,32767, 547,32767,32767, 300, 547,32767,32767,32767, - 541,32767,32767, 294,32767,32767,32767,32767, 247,32767, - 167,32767, 531,32767, 548,32767, 505,32767, 335,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 506,32767, - 32767,32767,32767, 223,32767, 443,32767, 114,32767,32767, - 32767, 183,32767,32767, 298, 242,32767,32767, 540,32767, - 32767,32767,32767,32767,32767,32767,32767, 112,32767, 168, - 32767,32767,32767, 185,32767,32767, 505,32767,32767,32767, - 32767,32767,32767,32767, 289,32767,32767,32767,32767,32767, - 32767,32767, 505,32767,32767, 227,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 406,32767, 270,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 125, - 125, 3, 125, 125, 254, 3, 254, 125, 254, 254, - 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, - 210, 213, 202, 202, 162, 125, 125, 262 + 32767,32767,32767,32767,32767, 377, 378, 489, 502,32767, + 503,32767, 409, 341, 342, 344, 320,32767, 322, 367, + 368, 369, 370, 371, 372, 373, 375,32767, 415,32767, + 418,32767,32767,32767, 255,32767, 553,32767,32767, 304, + 553,32767,32767,32767, 547,32767,32767, 298,32767,32767, + 32767,32767, 251,32767, 169,32767, 537,32767, 554,32767, + 511,32767, 340,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 512,32767,32767,32767,32767, 227,32767, 448, + 32767, 116,32767,32767,32767, 187,32767,32767, 302, 246, + 32767,32767, 546,32767,32767,32767,32767,32767,32767,32767, + 32767, 114,32767, 170,32767,32767,32767, 189,32767,32767, + 511,32767,32767,32767,32767,32767,32767,32767, 293,32767, + 32767,32767,32767,32767,32767,32767, 511,32767,32767, 231, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 411, + 32767, 274,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 127, 127, 3, 127, 127, 258, 3, + 258, 127, 258, 258, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 214, 217, 206, 206, 164, 127, + 127, 266 ); protected $goto = array( - 165, 139, 139, 139, 165, 143, 146, 140, 141, 142, - 148, 186, 167, 162, 162, 162, 162, 143, 143, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 137, 158, 159, 160, 161, 183, 138, 184, 489, 490, - 367, 491, 495, 496, 497, 498, 499, 500, 501, 502, - 959, 163, 144, 145, 147, 170, 175, 185, 203, 251, - 254, 256, 258, 260, 261, 262, 263, 264, 265, 273, - 274, 275, 276, 299, 300, 324, 325, 326, 384, 385, - 386, 538, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 149, 150, 151, 166, - 152, 168, 153, 204, 169, 154, 155, 156, 205, 157, - 135, 616, 556, 574, 578, 622, 624, 556, 556, 556, - 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, - 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, - 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, - 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, - 1099, 515, 345, 571, 600, 1099, 1099, 1099, 1099, 1099, - 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, - 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, - 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, - 1099, 1099, 1099, 1099, 1099, 1099, 1099, 1099, 504, 1202, - 1202, 1075, 1074, 504, 540, 541, 542, 543, 544, 545, - 546, 547, 549, 582, 3, 4, 173, 1202, 844, 844, - 844, 844, 839, 845, 176, 177, 178, 391, 392, 393, - 394, 172, 201, 206, 250, 255, 257, 259, 266, 267, - 268, 269, 270, 271, 277, 278, 279, 280, 301, 302, - 327, 328, 329, 396, 397, 398, 399, 174, 179, 252, - 253, 180, 181, 182, 493, 493, 750, 493, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 505, 929, 442, 444, 627, 505, 751, 779, 1100, - 610, 927, 880, 880, 765, 1190, 1190, 1168, 555, 775, - 764, 743, 1168, 555, 555, 555, 555, 555, 555, 555, - 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, - 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, - 555, 555, 555, 555, 555, 555, 555, 555, 555, 555, - 555, 555, 555, 555, 555, 555, 390, 602, 746, 532, - 532, 564, 528, 530, 530, 492, 494, 520, 536, 565, - 568, 579, 586, 810, 606, 506, 346, 347, 609, 850, - 506, 365, 537, 746, 533, 746, 563, 430, 430, 375, - 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, - 430, 430, 430, 430, 1063, 581, 957, 596, 597, 1063, - 887, 887, 887, 887, 1160, 887, 887, 1182, 1182, 1182, - 376, 376, 376, 749, 1063, 1063, 1063, 1063, 1063, 1063, - 334, 1056, 317, 374, 374, 374, 866, 848, 846, 848, - 650, 461, 507, 875, 870, 376, 1194, 368, 374, 389, - 374, 898, 374, 1080, 583, 348, 404, 374, 1216, 590, - 601, 1017, 19, 15, 361, 1148, 1187, 525, 936, 904, - 510, 526, 904, 651, 551, 381, 1201, 1201, 587, 1007, - 550, 877, 607, 608, 873, 612, 613, 619, 621, 626, - 628, 23, 884, 937, 1201, 336, 598, 1059, 1060, 1204, - 378, 1056, 557, 539, 893, 768, 766, 379, 514, 902, - 509, 524, 655, 1057, 1159, 1057, 776, 509, 1167, 524, - 514, 514, 1058, 1167, 1049, 907, 508, 1054, 511, 433, - 434, 510, 1184, 1184, 1184, 854, 445, 945, 569, 1145, - 459, 362, 0, 0, 773, 1209, 0, 518, 0, 519, - 0, 529, 0, 0, 0, 0, 0, 1166, 0, 0, - 0, 771, 0, 0, 0, 449, 0, 0, 0, 0, - 0, 0, 605, 0, 0, 0, 0, 13, 1055, 614 + 166, 140, 140, 140, 166, 187, 168, 144, 147, 141, + 142, 143, 149, 163, 163, 163, 163, 144, 144, 165, + 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, + 138, 159, 160, 161, 162, 184, 139, 185, 493, 494, + 377, 495, 499, 500, 501, 502, 503, 504, 505, 506, + 967, 164, 145, 146, 148, 171, 176, 186, 203, 253, + 256, 258, 260, 263, 264, 265, 266, 267, 268, 269, + 277, 278, 279, 280, 303, 304, 328, 329, 330, 394, + 395, 396, 542, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 150, 151, 152, + 167, 153, 169, 154, 204, 170, 155, 156, 157, 205, + 158, 136, 620, 560, 756, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, + 560, 560, 560, 560, 560, 560, 560, 560, 560, 1108, + 628, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, + 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, + 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, + 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, + 1108, 1108, 1108, 1108, 1108, 757, 888, 888, 508, 1200, + 1200, 400, 606, 508, 536, 536, 568, 532, 534, 534, + 496, 498, 524, 540, 569, 572, 583, 590, 852, 852, + 852, 852, 847, 853, 174, 585, 519, 600, 601, 177, + 178, 179, 401, 402, 403, 404, 173, 202, 206, 208, + 257, 259, 261, 262, 270, 271, 272, 273, 274, 275, + 281, 282, 283, 284, 305, 306, 331, 332, 333, 406, + 407, 408, 409, 175, 180, 254, 255, 181, 182, 183, + 497, 497, 785, 497, 497, 497, 497, 497, 497, 497, + 497, 497, 497, 497, 497, 497, 497, 509, 578, 582, + 626, 749, 509, 544, 545, 546, 547, 548, 549, 550, + 551, 553, 586, 338, 559, 321, 559, 559, 559, 559, + 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, + 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, + 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, + 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, + 530, 349, 655, 555, 587, 352, 414, 591, 575, 604, + 885, 611, 612, 881, 616, 617, 623, 625, 630, 632, + 298, 296, 296, 296, 298, 290, 299, 944, 610, 816, + 1170, 613, 436, 436, 375, 436, 436, 436, 436, 436, + 436, 436, 436, 436, 436, 436, 436, 436, 436, 1072, + 1084, 1083, 945, 1065, 1072, 895, 895, 895, 895, 1178, + 895, 895, 1212, 1212, 1178, 388, 858, 561, 755, 1072, + 1072, 1072, 1072, 1072, 1072, 3, 4, 384, 384, 384, + 1212, 874, 856, 854, 856, 654, 465, 511, 883, 878, + 1089, 541, 384, 537, 384, 567, 384, 1026, 19, 15, + 371, 384, 1226, 510, 1204, 1192, 1192, 1192, 510, 906, + 372, 522, 533, 554, 912, 514, 1068, 1069, 13, 1065, + 378, 912, 1158, 594, 23, 965, 386, 386, 386, 602, + 1066, 1169, 1066, 937, 447, 449, 631, 752, 1177, 1067, + 1109, 614, 935, 1177, 605, 1197, 391, 1211, 1211, 543, + 892, 386, 1194, 1194, 1194, 399, 518, 1016, 901, 389, + 771, 529, 752, 340, 752, 1211, 518, 518, 385, 781, + 1214, 770, 772, 1063, 910, 774, 1058, 1176, 659, 953, + 514, 782, 862, 915, 450, 573, 1155, 0, 463, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 513, 528, 0, 0, 0, 0, + 513, 0, 528, 0, 350, 351, 0, 609, 512, 515, + 438, 439, 1064, 618, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 779, 1219, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 777, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 523, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 301, 301 ); protected $gotoCheck = array( - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 56, 66, 59, 59, 59, 8, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 124, 99, 69, 39, 39, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 66, 140, - 140, 122, 122, 66, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 29, 29, 26, 140, 66, 66, - 66, 66, 66, 66, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 115, 115, 14, 115, 115, 115, - 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, - 115, 115, 7, 7, 7, 7, 115, 15, 28, 7, - 7, 7, 74, 74, 22, 74, 74, 116, 56, 22, - 22, 5, 116, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 50, 50, 10, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 49, 60, 120, 69, 69, 60, 32, - 120, 60, 2, 10, 107, 10, 2, 56, 56, 10, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 64, 99, 64, 64, 56, - 56, 56, 56, 56, 79, 56, 56, 8, 8, 8, - 121, 121, 121, 13, 56, 56, 56, 56, 56, 56, - 123, 79, 123, 12, 12, 12, 13, 13, 13, 13, - 13, 56, 13, 13, 13, 121, 138, 45, 12, 121, - 12, 81, 12, 33, 67, 67, 67, 12, 12, 125, - 48, 33, 33, 33, 33, 129, 136, 8, 95, 12, - 12, 31, 12, 31, 31, 47, 139, 139, 31, 100, - 33, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 33, 76, 95, 139, 17, 33, 79, 79, 139, - 11, 79, 11, 46, 78, 24, 23, 16, 46, 82, - 8, 8, 71, 79, 79, 79, 25, 8, 117, 8, - 46, 46, 79, 117, 111, 83, 8, 113, 8, 8, - 8, 12, 117, 117, 117, 68, 62, 97, 63, 128, - 106, 57, -1, -1, 8, 8, -1, 57, -1, 99, - -1, 57, -1, -1, -1, -1, -1, 117, -1, -1, - -1, 8, -1, -1, -1, 57, -1, -1, -1, -1, - -1, -1, 12, -1, -1, -1, -1, 57, 12, 12 + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 57, 68, 15, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 126, + 9, 126, 126, 126, 126, 126, 126, 126, 126, 126, + 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, + 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, + 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, + 126, 126, 126, 126, 126, 16, 76, 76, 68, 76, + 76, 51, 51, 68, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 68, 68, + 68, 68, 68, 68, 27, 66, 101, 66, 66, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 117, 117, 29, 117, 117, 117, 117, 117, 117, 117, + 117, 117, 117, 117, 117, 117, 117, 117, 61, 61, + 61, 6, 117, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 125, 57, 125, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 32, 71, 32, 32, 69, 69, 69, 32, 40, 40, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 5, 5, 5, 5, 5, 5, 5, 97, 62, 50, + 81, 62, 57, 57, 62, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 124, 124, 97, 81, 57, 57, 57, 57, 57, 118, + 57, 57, 142, 142, 118, 12, 33, 12, 14, 57, + 57, 57, 57, 57, 57, 30, 30, 13, 13, 13, + 142, 14, 14, 14, 14, 14, 57, 14, 14, 14, + 34, 2, 13, 109, 13, 2, 13, 34, 34, 34, + 34, 13, 13, 122, 140, 9, 9, 9, 122, 83, + 58, 58, 58, 34, 13, 13, 81, 81, 58, 81, + 46, 13, 131, 127, 34, 101, 123, 123, 123, 34, + 81, 81, 81, 8, 8, 8, 8, 11, 119, 81, + 8, 8, 8, 119, 49, 138, 48, 141, 141, 47, + 78, 123, 119, 119, 119, 123, 47, 102, 80, 17, + 23, 9, 11, 18, 11, 141, 47, 47, 11, 23, + 141, 23, 24, 115, 84, 25, 113, 119, 73, 99, + 13, 26, 70, 85, 64, 65, 130, -1, 108, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, + 9, -1, 9, -1, 71, 71, -1, 13, 9, 9, + 9, 9, 13, 13, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 9, 9, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 101, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 5, 5 ); protected $gotoBase = array( - 0, 0, -249, 0, 0, 300, 0, 287, 105, 0, - 47, 164, 118, 421, 274, 295, 171, 184, 0, 0, - 0, 0, -49, 168, 172, 104, 24, 0, 288, -431, - 0, -159, 359, 44, 0, 0, 0, 0, 0, 125, - 0, 0, -24, 0, 0, 407, 479, 186, 178, 355, - 75, 0, 0, 0, 0, 0, 106, 119, 0, -192, - -81, 0, 101, 93, -231, 0, -90, 135, 121, -276, - 0, 148, 0, 0, 21, 0, 183, 0, 194, 71, - 0, 423, 155, 112, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 185, 0, 122, 0, 120, - 176, 0, 0, 0, 0, 0, 83, 358, 170, 0, - 0, 113, 0, 111, 0, -7, 9, 220, 0, 0, - 77, 108, -102, 100, -42, 251, 0, 0, 89, 256, - 0, 0, 0, 0, 0, 0, 181, 0, 419, 160, - -107, 0, 0 + 0, 0, -184, 0, 0, 356, 290, 0, 488, 149, + 0, 182, 85, 118, 426, 112, 203, 179, 208, 0, + 0, 0, 0, 162, 190, 198, 120, 27, 0, 272, + -224, 0, -274, 406, 32, 0, 0, 0, 0, 0, + 330, 0, 0, -24, 0, 0, 440, 485, 213, 218, + 371, -74, 0, 0, 0, 0, 0, 107, 110, 0, + 0, -11, -72, 0, 104, 95, -405, 0, -94, 41, + 119, -82, 0, 164, 0, 0, -79, 0, 197, 0, + 204, 43, 0, 441, 171, 121, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 100, 0, 115, + 0, 195, 210, 0, 0, 0, 0, 0, 86, 427, + 259, 0, 0, 116, 0, 174, 0, -5, 117, 196, + 0, 0, 161, 170, 93, -21, -48, 273, 0, 0, + 91, 271, 0, 0, 0, 0, 0, 0, 216, 0, + 437, 187, 102, 0, 0 ); protected $gotoDefault = array( - -32768, 463, 659, 2, 660, 733, 741, 593, 477, 625, - 577, 370, 1178, 785, 786, 787, 371, 358, 478, 369, - 400, 395, 774, 767, 769, 777, 171, 401, 780, 1, - 782, 513, 818, 1008, 355, 790, 356, 585, 792, 522, - 794, 795, 136, 372, 373, 523, 479, 380, 572, 809, - 272, 377, 811, 357, 812, 821, 360, 460, 454, 552, - 604, 425, 441, 566, 560, 531, 1072, 561, 853, 344, - 861, 656, 869, 872, 480, 553, 883, 446, 891, 1085, - 387, 897, 903, 908, 283, 911, 407, 402, 580, 916, - 917, 5, 921, 617, 618, 8, 308, 944, 594, 958, - 411, 1027, 1029, 481, 482, 517, 453, 503, 521, 483, - 1050, 435, 403, 1053, 484, 485, 426, 427, 1069, 350, - 1153, 349, 443, 316, 1140, 575, 1104, 450, 1193, 1149, - 343, 486, 487, 366, 1172, 382, 1188, 431, 1195, 1203, - 339, 535, 562 + -32768, 467, 663, 2, 664, 834, 739, 747, 597, 481, + 629, 581, 380, 1188, 791, 792, 793, 381, 367, 482, + 379, 410, 405, 780, 773, 775, 783, 172, 411, 786, + 1, 788, 517, 824, 1017, 364, 796, 365, 589, 798, + 526, 800, 801, 137, 382, 383, 527, 483, 390, 576, + 815, 276, 387, 817, 366, 818, 827, 370, 464, 454, + 459, 556, 608, 432, 446, 570, 564, 535, 1081, 565, + 861, 348, 869, 660, 877, 880, 484, 557, 891, 451, + 899, 1094, 397, 905, 911, 916, 287, 919, 417, 412, + 584, 924, 925, 5, 929, 621, 622, 8, 312, 952, + 598, 966, 420, 1036, 1038, 485, 486, 521, 458, 507, + 525, 487, 1059, 440, 413, 1062, 488, 489, 433, 434, + 1078, 354, 1163, 353, 448, 320, 1150, 579, 1113, 455, + 1203, 1159, 347, 490, 491, 376, 1182, 392, 1198, 437, + 1205, 1213, 343, 539, 566 ); 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, 5, 5, 6, 6, 6, 6, 6, - 6, 6, 7, 7, 8, 9, 10, 10, 11, 11, - 12, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 17, 17, 18, 18, 20, 20, 16, 16, - 21, 21, 22, 22, 23, 23, 24, 24, 19, 19, - 25, 27, 27, 28, 29, 29, 31, 30, 30, 30, - 30, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 13, 13, 53, 53, 55, 54, 54, 47, 47, 57, - 57, 58, 58, 14, 15, 15, 15, 61, 61, 61, - 62, 62, 65, 65, 63, 63, 67, 67, 40, 40, - 49, 49, 52, 52, 52, 51, 51, 68, 41, 41, - 41, 41, 69, 69, 70, 70, 71, 71, 38, 38, - 34, 34, 72, 36, 36, 73, 35, 35, 37, 37, - 48, 48, 48, 59, 59, 75, 75, 76, 76, 78, - 78, 78, 77, 77, 60, 60, 79, 79, 79, 80, - 80, 81, 81, 81, 43, 43, 82, 82, 82, 44, - 44, 83, 83, 84, 84, 64, 85, 85, 85, 85, - 90, 90, 91, 91, 92, 92, 92, 92, 92, 93, - 94, 94, 89, 89, 86, 86, 88, 88, 96, 96, - 95, 95, 95, 95, 95, 95, 87, 87, 98, 97, - 97, 45, 45, 39, 39, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 33, 33, 46, 46, 103, 103, 104, 104, 104, 104, - 110, 99, 99, 106, 106, 112, 112, 113, 114, 114, - 114, 114, 114, 114, 66, 66, 56, 56, 56, 56, - 100, 100, 118, 118, 115, 115, 119, 119, 119, 119, - 101, 101, 101, 105, 105, 105, 111, 111, 124, 124, - 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, - 124, 26, 26, 26, 26, 26, 26, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 109, 109, 102, 102, 102, 102, 125, 125, 128, 128, - 127, 127, 129, 129, 50, 50, 50, 50, 131, 131, - 130, 130, 130, 130, 130, 132, 132, 117, 117, 120, - 120, 116, 116, 134, 133, 133, 133, 133, 121, 121, - 121, 121, 108, 108, 122, 122, 122, 122, 74, 135, - 135, 136, 136, 136, 107, 107, 137, 137, 138, 138, - 138, 138, 138, 123, 123, 123, 123, 140, 141, 139, - 139, 139, 139, 139, 139, 139, 142, 142, 142 + 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 8, 8, 9, 10, 11, 11, + 12, 12, 13, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 18, 18, 19, 19, 21, 21, + 17, 17, 22, 22, 23, 23, 24, 24, 25, 25, + 20, 20, 26, 28, 28, 29, 30, 30, 32, 31, + 31, 31, 31, 33, 33, 33, 33, 33, 33, 33, + 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, + 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, + 33, 33, 14, 14, 54, 54, 56, 55, 55, 48, + 48, 58, 58, 59, 59, 60, 60, 15, 16, 16, + 16, 63, 63, 63, 64, 64, 67, 67, 65, 65, + 69, 69, 41, 41, 50, 50, 53, 53, 53, 52, + 52, 70, 42, 42, 42, 42, 71, 71, 72, 72, + 73, 73, 39, 39, 35, 35, 74, 37, 37, 75, + 36, 36, 38, 38, 49, 49, 49, 61, 61, 77, + 77, 78, 78, 80, 80, 80, 79, 79, 62, 62, + 81, 81, 81, 82, 82, 83, 83, 83, 44, 44, + 84, 84, 84, 45, 45, 85, 85, 86, 86, 66, + 87, 87, 87, 87, 92, 92, 93, 93, 94, 94, + 94, 94, 94, 95, 96, 96, 91, 91, 88, 88, + 90, 90, 98, 98, 97, 97, 97, 97, 97, 97, + 89, 89, 100, 99, 99, 46, 46, 40, 40, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 34, 34, 47, 47, 105, + 105, 106, 106, 106, 106, 112, 101, 101, 108, 108, + 114, 114, 115, 116, 116, 116, 116, 116, 116, 68, + 68, 57, 57, 57, 57, 102, 102, 120, 120, 117, + 117, 121, 121, 121, 121, 103, 103, 103, 107, 107, + 107, 113, 113, 126, 126, 126, 126, 126, 126, 126, + 126, 126, 126, 126, 126, 126, 27, 27, 27, 27, + 27, 27, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 111, 111, 104, 104, + 104, 104, 127, 127, 130, 130, 129, 129, 131, 131, + 51, 51, 51, 51, 133, 133, 132, 132, 132, 132, + 132, 134, 134, 119, 119, 122, 122, 118, 118, 136, + 135, 135, 135, 135, 123, 123, 123, 123, 110, 110, + 124, 124, 124, 124, 76, 137, 137, 138, 138, 138, + 109, 109, 139, 139, 140, 140, 140, 140, 140, 125, + 125, 125, 125, 142, 143, 141, 141, 141, 141, 141, + 141, 141, 144, 144, 144 ); protected $ruleToLength = array( @@ -867,53 +891,54 @@ class Php5 extends \PhpParser\ParserAbstract 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, 5, 4, 3, 4, - 2, 3, 1, 1, 7, 6, 3, 1, 3, 1, - 3, 1, 1, 3, 1, 3, 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, 3, 3, 3, 1, 2, 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, 1, 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, 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, 3, 2, 2, 2, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 3, 5, 4, + 3, 4, 2, 3, 1, 1, 7, 6, 3, 1, + 3, 1, 3, 1, 1, 3, 1, 3, 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, 3, 3, 3, 1, + 2, 2, 5, 7, 9, 5, 6, 3, 3, 2, + 2, 1, 1, 1, 0, 2, 8, 0, 4, 1, + 3, 0, 1, 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, 1, + 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, 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, 3, 2, + 2, 2, 2, 3, 3, 3, 3, 3, 3, 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, 1, 1, 1, - 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, 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, 1, 1, 1, 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, 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, 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, 2, 1, 2, 1, 1, 1, - 4, 3, 3, 3, 6, 3, 1, 1, 1 + 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, 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, + 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, + 6, 3, 1, 1, 1 ); protected function initReduceCallbacks() { @@ -1166,10 +1191,10 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos]; }, 82 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 83 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 84 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1178,76 +1203,76 @@ protected function initReduceCallbacks() { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 86 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 87 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 88 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 89 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 90 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 91 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 92 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 93 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 94 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 95 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 96 => function ($stackPos) { + $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 97 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); $this->checkNamespace($this->semValue); }, - 96 => function ($stackPos) { + 98 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 97 => function ($stackPos) { + 99 => function ($stackPos) { $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 98 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 99 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, 100 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 101 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 102 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_FUNCTION; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 103 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_CONSTANT; + $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 104 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = Stmt\Use_::TYPE_FUNCTION; }, 105 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = Stmt\Use_::TYPE_CONSTANT; }, 106 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 107 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 108 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; @@ -1262,10 +1287,10 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 112 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 113 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 114 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); @@ -1274,52 +1299,58 @@ protected function initReduceCallbacks() { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 116 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; + $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 117 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 118 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; }, 119 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; }, 120 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 121 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 122 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 123 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 124 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 125 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 126 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; }, 127 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 128 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 129 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 130 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 131 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 132 => function ($stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 133 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; @@ -1329,123 +1360,117 @@ protected function initReduceCallbacks() { } }, - 132 => function ($stackPos) { + 134 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(5-2)], ['stmts' => is_array($this->semStack[$stackPos-(5-3)]) ? $this->semStack[$stackPos-(5-3)] : array($this->semStack[$stackPos-(5-3)]), 'elseifs' => $this->semStack[$stackPos-(5-4)], 'else' => $this->semStack[$stackPos-(5-5)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 133 => function ($stackPos) { + 135 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(8-2)], ['stmts' => $this->semStack[$stackPos-(8-4)], 'elseifs' => $this->semStack[$stackPos-(8-5)], 'else' => $this->semStack[$stackPos-(8-6)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 134 => function ($stackPos) { + 136 => function ($stackPos) { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 135 => function ($stackPos) { + 137 => function ($stackPos) { $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(5-4)], is_array($this->semStack[$stackPos-(5-2)]) ? $this->semStack[$stackPos-(5-2)] : array($this->semStack[$stackPos-(5-2)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 136 => function ($stackPos) { + 138 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 137 => function ($stackPos) { + 139 => function ($stackPos) { $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 138 => function ($stackPos) { + 140 => function ($stackPos) { $this->semValue = new Stmt\Break_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 139 => function ($stackPos) { + 141 => function ($stackPos) { $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 140 => function ($stackPos) { + 142 => function ($stackPos) { $this->semValue = new Stmt\Continue_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 141 => function ($stackPos) { + 143 => function ($stackPos) { $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 142 => function ($stackPos) { + 144 => function ($stackPos) { $this->semValue = new Stmt\Return_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 143 => function ($stackPos) { + 145 => function ($stackPos) { $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 144 => function ($stackPos) { + 146 => function ($stackPos) { $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 145 => function ($stackPos) { + 147 => function ($stackPos) { $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 146 => function ($stackPos) { + 148 => function ($stackPos) { $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 147 => function ($stackPos) { + 149 => function ($stackPos) { $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 148 => function ($stackPos) { + 150 => function ($stackPos) { $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 149 => function ($stackPos) { + 151 => function ($stackPos) { $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 150 => function ($stackPos) { + 152 => function ($stackPos) { $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 151 => function ($stackPos) { + 153 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 152 => function ($stackPos) { + 154 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 153 => function ($stackPos) { + 155 => function ($stackPos) { $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 154 => function ($stackPos) { + 156 => function ($stackPos) { $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); }, - 155 => function ($stackPos) { + 157 => function ($stackPos) { $this->semValue = new Stmt\Throw_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 156 => function ($stackPos) { + 158 => function ($stackPos) { $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 157 => function ($stackPos) { + 159 => function ($stackPos) { $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 158 => function ($stackPos) { + 160 => function ($stackPos) { $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 159 => function ($stackPos) { + 161 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, - 160 => function ($stackPos) { + 162 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 161 => function ($stackPos) { + 163 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, - 162 => function ($stackPos) { - $this->semValue = array(); - }, - 163 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, 164 => function ($stackPos) { - $this->semValue = new Stmt\Catch_(array($this->semStack[$stackPos-(8-3)]), $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = array(); }, 165 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 166 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Catch_(array($this->semStack[$stackPos-(8-3)]), $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 167 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = null; }, 168 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 169 => function ($stackPos) { - $this->semValue = false; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 170 => function ($stackPos) { - $this->semValue = true; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 171 => function ($stackPos) { $this->semValue = false; @@ -1454,1175 +1479,1193 @@ protected function initReduceCallbacks() { $this->semValue = true; }, 173 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(10-3)], ['byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-5)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = false; }, 174 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - $this->checkClass($this->semValue, $stackPos-(7-2)); + $this->semValue = true; }, 175 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(6-2)], ['extends' => $this->semStack[$stackPos-(6-3)], 'stmts' => $this->semStack[$stackPos-(6-5)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - $this->checkInterface($this->semValue, $stackPos-(6-2)); + $this->semValue = false; }, 176 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(5-2)], ['stmts' => $this->semStack[$stackPos-(5-4)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = true; }, 177 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(10-3)], ['byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-5)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 178 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->checkClass($this->semValue, $stackPos-(7-2)); }, 179 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(6-2)], ['extends' => $this->semStack[$stackPos-(6-3)], 'stmts' => $this->semStack[$stackPos-(6-5)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->checkInterface($this->semValue, $stackPos-(6-2)); }, 180 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(5-2)], ['stmts' => $this->semStack[$stackPos-(5-4)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 181 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = 0; }, 182 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 183 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 184 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 185 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 186 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 187 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 188 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 189 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 190 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 191 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 192 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 193 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 194 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 195 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 196 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 197 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = null; }, 198 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 199 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 200 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 201 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 202 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 203 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 204 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 205 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(5-3)]; }, 206 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = array(); }, 207 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 208 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 209 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 210 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos]; }, 211 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 212 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(3-2)], is_array($this->semStack[$stackPos-(3-3)]) ? $this->semStack[$stackPos-(3-3)] : array($this->semStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 213 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 214 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 215 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 216 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(3-2)], is_array($this->semStack[$stackPos-(3-3)]) ? $this->semStack[$stackPos-(3-3)] : array($this->semStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 217 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array(); }, 218 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 219 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 220 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = null; }, 221 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 222 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = null; }, 223 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 224 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 225 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 226 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 227 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(4-4)], null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 228 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-3)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); + $this->semValue = array(); }, 229 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 230 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 231 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Param($this->semStack[$stackPos-(4-4)], null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); }, 232 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-3)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); }, 233 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 234 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 236 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 237 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 238 => function ($stackPos) { - $this->semValue = array(new Node\Arg($this->semStack[$stackPos-(3-2)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes)); + $this->semValue = null; }, 239 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 240 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array(); }, 241 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 242 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array(new Node\Arg($this->semStack[$stackPos-(3-2)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes)); }, 243 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 244 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 245 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 246 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 247 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 248 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 249 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 250 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 251 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 252 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 253 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 254 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 255 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 256 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $stackPos-(3-1)); + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 257 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(3-2)], 0, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, 258 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(9-4)], ['type' => $this->semStack[$stackPos-(9-1)], 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(9-1)); + $this->semValue = array(); }, 259 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 260 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $stackPos-(3-1)); }, 261 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(3-2)], 0, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 262 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(9-4)], ['type' => $this->semStack[$stackPos-(9-1)], 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->checkClassMethod($this->semValue, $stackPos-(9-1)); }, 263 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 264 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 265 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 266 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 267 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 268 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 269 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 270 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 271 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 272 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 273 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 274 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 275 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 276 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = null; }, 277 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 278 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 279 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = 0; }, 280 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = 0; }, 281 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 282 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 283 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 284 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 285 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 286 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 287 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, 288 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 289 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 290 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 291 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 292 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 293 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 294 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 295 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 296 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 297 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array(); }, 298 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 299 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 300 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 301 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 302 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 303 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 304 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 305 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 306 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 307 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 308 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 309 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 310 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 311 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 312 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 313 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 314 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 315 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 316 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 317 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 318 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 319 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 320 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 321 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 322 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 323 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 325 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 326 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 327 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 328 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 329 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 330 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 331 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 332 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 333 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 334 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 335 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 336 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 337 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 338 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 339 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 340 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 341 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 342 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 343 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 344 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 345 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 346 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 347 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 348 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 349 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 350 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 351 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 352 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 353 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 354 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 355 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 356 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 357 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 358 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 359 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 360 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 361 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 362 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 363 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 364 => function ($stackPos) { + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 365 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 366 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 367 => function ($stackPos) { + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 368 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 364 => function ($stackPos) { + 369 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 365 => function ($stackPos) { + 370 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 366 => function ($stackPos) { + 371 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 367 => function ($stackPos) { + 372 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 368 => function ($stackPos) { + 373 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 369 => function ($stackPos) { + 374 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 370 => function ($stackPos) { + 375 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 371 => function ($stackPos) { + 376 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 372 => function ($stackPos) { + 377 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 373 => function ($stackPos) { + 378 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 374 => function ($stackPos) { + 379 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 375 => function ($stackPos) { + 380 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 376 => function ($stackPos) { + 381 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 377 => function ($stackPos) { + 382 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 378 => function ($stackPos) { + 383 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-4)], 'uses' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 379 => function ($stackPos) { + 384 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(11-3)], 'params' => $this->semStack[$stackPos-(11-5)], 'uses' => $this->semStack[$stackPos-(11-7)], 'returnType' => $this->semStack[$stackPos-(11-8)], 'stmts' => $this->semStack[$stackPos-(11-10)]], $this->startAttributeStack[$stackPos-(11-1)] + $this->endAttributes); }, - 380 => function ($stackPos) { + 385 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 381 => function ($stackPos) { + 386 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 382 => function ($stackPos) { + 387 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 383 => function ($stackPos) { + 388 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 384 => function ($stackPos) { + 389 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 385 => function ($stackPos) { + 390 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 386 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 387 => function ($stackPos) { + 392 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(4-1)][0] === "'" || ($this->semStack[$stackPos-(4-1)][1] === "'" && ($this->semStack[$stackPos-(4-1)][0] === 'b' || $this->semStack[$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[$stackPos-(4-1)]), $attrs), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 388 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 389 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 390 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes), $this->semStack[$stackPos-(7-2)]); $this->checkClass($this->semValue[0], -1); }, - 391 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 392 => function ($stackPos) { + 397 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 393 => function ($stackPos) { + 398 => function ($stackPos) { $this->semValue = array(); }, - 394 => function ($stackPos) { + 399 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 395 => function ($stackPos) { + 400 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 396 => function ($stackPos) { + 401 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 397 => function ($stackPos) { + 402 => function ($stackPos) { $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 398 => function ($stackPos) { + 403 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 399 => function ($stackPos) { + 404 => function ($stackPos) { $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 400 => function ($stackPos) { + 405 => function ($stackPos) { $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 401 => function ($stackPos) { + 406 => function ($stackPos) { $this->semValue = $this->fixupPhp5StaticPropCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 402 => function ($stackPos) { + 407 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 403 => function ($stackPos) { + 408 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 404 => function ($stackPos) { + 409 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 405 => function ($stackPos) { + 410 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 406 => function ($stackPos) { + 411 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 407 => function ($stackPos) { + 412 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 408 => function ($stackPos) { + 413 => function ($stackPos) { $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 409 => function ($stackPos) { + 414 => function ($stackPos) { $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 410 => function ($stackPos) { + 415 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 411 => function ($stackPos) { + 416 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 412 => function ($stackPos) { + 417 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 413 => function ($stackPos) { + 418 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 414 => function ($stackPos) { + 419 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 415 => function ($stackPos) { + 420 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 416 => function ($stackPos) { + 421 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 417 => function ($stackPos) { + 422 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 418 => function ($stackPos) { + 423 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 419 => function ($stackPos) { + 424 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 420 => function ($stackPos) { + 425 => function ($stackPos) { $this->semValue = null; }, - 421 => function ($stackPos) { + 426 => function ($stackPos) { $this->semValue = null; }, - 422 => function ($stackPos) { + 427 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 423 => function ($stackPos) { + 428 => function ($stackPos) { $this->semValue = array(); }, - 424 => function ($stackPos) { + 429 => function ($stackPos) { $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', false), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 425 => function ($stackPos) { + 430 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', false); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 426 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = array(); }, - 427 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 428 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true); }, - 429 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 435 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)], false), $attrs); }, - 431 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 432 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], false); }, - 440 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], false); }, - 441 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 442 => function ($stackPos) { + 447 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 443 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 444 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 445 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 446 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 447 => function ($stackPos) { + 452 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 448 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 450 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 456 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 452 => function ($stackPos) { + 457 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 458 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 459 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 460 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 455 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 457 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 458 => function ($stackPos) { + 464 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 465 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 461 => function ($stackPos) { + 467 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 462 => function ($stackPos) { + 468 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 463 => function ($stackPos) { + 469 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 464 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 465 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 466 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 467 => function ($stackPos) { + 473 => function ($stackPos) { $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 468 => function ($stackPos) { + 474 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 469 => function ($stackPos) { + 475 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 470 => function ($stackPos) { + 476 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 471 => function ($stackPos) { + 477 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 472 => function ($stackPos) { + 478 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 473 => function ($stackPos) { + 479 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 474 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 475 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 476 => function ($stackPos) { + 482 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 477 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 478 => function ($stackPos) { + 484 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 479 => function ($stackPos) { + 485 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 480 => function ($stackPos) { + 486 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 481 => function ($stackPos) { + 487 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 482 => function ($stackPos) { + 488 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 483 => function ($stackPos) { + 489 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 484 => function ($stackPos) { + 490 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, - 485 => function ($stackPos) { + 491 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, - 486 => function ($stackPos) { + 492 => function ($stackPos) { $this->semValue = array(); }, - 487 => function ($stackPos) { + 493 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 488 => function ($stackPos) { + 494 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 489 => function ($stackPos) { + 495 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 490 => function ($stackPos) { + 496 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 491 => function ($stackPos) { + 497 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 492 => function ($stackPos) { + 498 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 493 => function ($stackPos) { + 499 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 494 => function ($stackPos) { + 500 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 495 => function ($stackPos) { + 501 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 496 => function ($stackPos) { + 502 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 497 => function ($stackPos) { + 503 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 498 => function ($stackPos) { + 504 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 499 => function ($stackPos) { + 505 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 500 => function ($stackPos) { + 506 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 501 => function ($stackPos) { + 507 => function ($stackPos) { $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 502 => function ($stackPos) { + 508 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 503 => function ($stackPos) { + 509 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 504 => function ($stackPos) { + 510 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 505 => function ($stackPos) { + 511 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 506 => function ($stackPos) { + 512 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 507 => function ($stackPos) { + 513 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 508 => function ($stackPos) { + 514 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 509 => function ($stackPos) { + 515 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 510 => function ($stackPos) { + 516 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 511 => function ($stackPos) { + 517 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 512 => function ($stackPos) { + 518 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 513 => function ($stackPos) { + 519 => function ($stackPos) { $var = substr($this->semStack[$stackPos-(1-1)], 1); $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, - 514 => function ($stackPos) { + 520 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 515 => function ($stackPos) { + 521 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 516 => function ($stackPos) { + 522 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 517 => function ($stackPos) { + 523 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 518 => function ($stackPos) { + 524 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 519 => function ($stackPos) { + 525 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 520 => function ($stackPos) { + 526 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 521 => function ($stackPos) { + 527 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 522 => function ($stackPos) { + 528 => function ($stackPos) { $this->semValue = null; }, - 523 => function ($stackPos) { + 529 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 524 => function ($stackPos) { + 530 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 525 => function ($stackPos) { + 531 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 526 => function ($stackPos) { + 532 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 527 => function ($stackPos) { + 533 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, - 528 => function ($stackPos) { + 534 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 529 => function ($stackPos) { + 535 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 530 => function ($stackPos) { + 536 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 531 => function ($stackPos) { + 537 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 532 => function ($stackPos) { + 538 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 533 => function ($stackPos) { + 539 => function ($stackPos) { $this->semValue = null; }, - 534 => function ($stackPos) { + 540 => function ($stackPos) { $this->semValue = array(); }, - 535 => function ($stackPos) { + 541 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 536 => function ($stackPos) { + 542 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 537 => function ($stackPos) { + 543 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 538 => function ($stackPos) { + 544 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 539 => function ($stackPos) { + 545 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 540 => function ($stackPos) { + 546 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 541 => function ($stackPos) { + 547 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 542 => function ($stackPos) { + 548 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 543 => function ($stackPos) { + 549 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 544 => function ($stackPos) { + 550 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 545 => function ($stackPos) { + 551 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 546 => function ($stackPos) { + 552 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, - 547 => function ($stackPos) { + 553 => function ($stackPos) { $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 548 => function ($stackPos) { + 554 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 549 => function ($stackPos) { + 555 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 550 => function ($stackPos) { + 556 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 551 => function ($stackPos) { + 557 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 552 => function ($stackPos) { + 558 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 553 => function ($stackPos) { + 559 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 554 => function ($stackPos) { + 560 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 555 => function ($stackPos) { + 561 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 556 => function ($stackPos) { + 562 => function ($stackPos) { $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 557 => function ($stackPos) { + 563 => function ($stackPos) { $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 558 => function ($stackPos) { + 564 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index c56685c210..f2189d6580 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -17,17 +17,17 @@ */ class Php7 extends \PhpParser\ParserAbstract { - protected $tokenToSymbolMapSize = 393; - protected $actionTableSize = 1178; - protected $gotoTableSize = 582; + protected $tokenToSymbolMapSize = 395; + protected $actionTableSize = 1179; + protected $gotoTableSize = 685; - protected $invalidSymbol = 166; + protected $invalidSymbol = 167; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 401; - protected $numNonLeafStates = 700; + protected $YY2TBLSTATE = 415; + protected $numNonLeafStates = 702; protected $symbolToName = array( "EOF", @@ -67,7 +67,8 @@ class Php7 extends \PhpParser\ParserAbstract "T_BOOLEAN_AND", "'|'", "'^'", - "'&'", + "T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG", + "T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG", "T_IS_EQUAL", "T_IS_NOT_EQUAL", "T_IS_IDENTICAL", @@ -199,700 +200,725 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $tokenToSymbol = array( - 0, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 55, 164, 166, 165, 54, 37, 166, - 161, 162, 52, 49, 8, 50, 51, 53, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 31, 157, - 43, 16, 45, 30, 67, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 69, 166, 158, 36, 166, 163, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 159, 35, 160, 57, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 1, 2, 3, 4, + 0, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 56, 165, 167, 166, 55, 167, 167, + 162, 163, 53, 50, 8, 51, 52, 54, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 31, 158, + 44, 16, 46, 30, 68, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 70, 167, 159, 36, 167, 164, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 160, 35, 161, 58, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 32, 33, 34, 38, 39, 40, 41, - 42, 44, 46, 47, 48, 56, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 68, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 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, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156 + 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, + 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 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, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157 ); protected $action = array( - 130, 131, 132, 561, 133, 134, 0, 710, 711, 712, - 135, 36, 896, 537, 538,-32766, 1231,-32766,-32766,-32766, - -558, 1164, 785, 907, 434, 435, 436, -558,-32766,-32766, - -32766, -299,-32766, 973,-32766, 247,-32766, -190,-32766,-32766, - -32766,-32766,-32766, 465,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32766, 124, 796, 713,-32766,-32766, 392, 1043, 1044, - 1045, 1042, 1041, 1040,-32766,-32766,-32766,-32766, 263, 136, - 375, 717, 718, 719, 720, 980, 981, 401, 1043, 1044, - 1045, 1042, 1041, 1040, 721, 722, 723, 724, 725, 726, - 727, 728, 729, 730, 731, 751, 562, 752, 753, 754, - 755, 743, 744, 376, 377, 746, 747, 732, 733, 734, - 736, 737, 738, 336, 778, 779, 780, 781, 782, 739, - 740, 563, 564, 772, 763, 761, 762, 775, 758, 759, - -189, 978, 565, 566, 757, 567, 568, 569, 570, 571, - 572, 533, -555, -509,-32766,-32766, 760, 573, 574, -555, - 137, 980, 981, 313, 130, 131, 132, 561, 133, 134, - 994, 710, 711, 712, 135, 36,-32766,-32766,-32766,-32766, - 687,-32766,-32766,-32766, 80, 1164, 553, -558, 629, 24, - 312, -558,-32766,-32766,-32766, -299,-32766,-32766,-32766, 247, - -32766, -190,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766, 1203, 432, 433,-32766,-32766, -509, -509, 713, 795, - -32766, 392, 395,-32766,-32766,-32766, 443, 444,-32766, 438, - 433, -509, 263, 136, 375, 717, 718, 719, 720, 395, - -83, 401, 237, -509,-32766, -515,-32766,-32766, 721, 722, - 723, 724, 725, 726, 727, 728, 729, 730, 731, 751, - 562, 752, 753, 754, 755, 743, 744, 376, 377, 746, - 747, 732, 733, 734, 736, 737, 738, 336, 778, 779, - 780, 781, 782, 739, 740, 563, 564, 772, 763, 761, - 762, 775, 758, 759, -189, 2, 565, 566, 757, 567, - 568, 569, 570, 571, 572, -83, 81, 82, 83, -555, - 760, 573, 574, -555, 137, 735, 705, 706, 707, 708, - 709, 1251, 710, 711, 712, 748, 749, 33, 1250, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 12, 265,-32766,-32766,-32766, 104, 105, 106, - 31, 265, 970, 969, 968, 107, 101, 102, 103, 713, - -32766,-32766,-32766, 107, 459,-32766, 583,-32766,-32766,-32766, - -32766,-32766,-32766, 714, 715, 716, 717, 718, 719, 720, - -259,-32766, 783,-32766,-32766,-32766,-32766,-32766, 126, 721, - 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, - 751, 774, 752, 753, 754, 755, 743, 744, 745, 773, - 746, 747, 732, 733, 734, 736, 737, 738, 777, 778, - 779, 780, 781, 782, 739, 740, 741, 742, 772, 763, - 761, 762, 775, 758, 759, 142, 938, 750, 756, 757, - 764, 765, 767, 766, 768, 769, -549,-32766,-32766,-32766, - -549, 760, 771, 770, 48, 49, 50, 492, 51, 52, - 790, 236, 589, -510, 53, 54, 249, 55,-32766, 993, + 131, 132, 133, 563, 134, 135, 0, 714, 715, 716, + 136, 36,-32766,-32766,-32766, 462,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 100, 101, 102, 103, 104, -303, 979, + -32766,-32766,-32766,-32766, 2, 708, 707,-32766, 999,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 296,-32767,-32767,-32767,-32767, 99, 100, 101, 102, - 103, 1276, 460, 787, 1277, 821, 298, 822, 274, 482, - 1191, 56, 57, -337, 310, -337, -508, 58, 1171, 59, - 242, 243, 60, 61, 62, 63, 64, 65, 66, 67, - 1035, 26, 264, 68, 416, 493, -510, -510, 325, 1197, - 1198, 494, 349, 794, 1171, 791, 353, 1195, 40, 23, - 495, -510, 496, 793, 497, 487, 498, 11, 358, 499, - 500, 645, 646, -510, 42, 43, 417, 421, 419, 878, - 44, 501, 939, 401, -14, 360, 348, 324, 789, -508, - -508, 412, -507, 675, 502, 503, 504, 427, 428, 47, - 794, 146, 380, 978, -508, 413, 505, 506, 794, 1185, - 1186, 1187, 1188, 1182, 1183, 284, -508, 414, -514, 1247, - 415, 1189, 1184, 980, 981, 1166, 1165, 1167, 285, 821, - 878, 822, 800, 69, 794, 308, 309, 312, 34, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, -150, -150, -150, -507, -507, 1166, 1165, 1167, - 678, 868, 288, 289, 1021,-32766, 1020, -150, 698, -150, - -507, -150, 147, -150, 244, 445, 446, 352, 138, -108, - 1079, 1081, -507, 418, 312, 621, 622, 148, 73, 125, - 150, -507, 312, 151, -108, -108, 152, 785, -85, 154, - 35, -49, -77, 854, -108, -108, -108, -108, 121, 285, - -32766, 122, 868, 127, 73, 128, 1164, 141, 312, 155, - 878, 156, 157,-32766,-32766,-32766, 158,-32766, 277,-32766, - 878,-32766, 107, -73,-32766, 880, 878, 673, -150,-32766, - -32766,-32766, -71,-32766, -70,-32766,-32766, -69, 129, 1164, - 679,-32766, 392, -512, -507, -507,-32766,-32766,-32766,-32766, - -32766, -68,-32766, 878,-32766, -67, 680,-32766, -66, -507, - -65, -64,-32766,-32766,-32766, 1171, -45, 139,-32766,-32766, - 878, -507, -16, 312,-32766, 392, 880, 246, 673, 72, - -32766, 145,-32766, 682, 1164, 266, 1164, 273, 688, -4, - 878, 691, 868,-32766,-32766,-32766, 877,-32766, 144,-32766, - 689,-32766, 868,-32766,-32766, 275, -512, -512, 868,-32766, - -32766,-32766, 892,-32766, 248,-32766,-32766, 276, 278, 1164, - 1162,-32766, 392, 980, 981, 279,-32766,-32766,-32766,-32766, - -32766, 318,-32766, -512,-32766, 868, 265,-32766, 653, 794, - 46, 143,-32766,-32766,-32766, 794, 666, 785,-32766,-32766, - -32766, 541, 868,-32766,-32766, 392, 1164, 1049, 1166, 1165, - 1167, 1278,-32766,-32766,-32766,-32766, 880,-32766, 673,-32766, - -32766,-32766, 868, 630,-32766, 250, 880, 535, 673,-32766, - -32766,-32766, 924, 635, 673,-32766,-32766, 648, 13, 290, - -108,-32766, 392, 440, 418, 794, 406, 470, 1266,-32766, - 293, 283, 636, 286, 287, -108, -108, 26, 878, 880, - 649, 673, 619, -473, 813, -108, -108, -108, -108, 794, - 285,-32766, 878, 1195, 411, 73, 880, 1164, 673, 312, - 123, 908, 909, 291,-32766,-32766,-32766, 9,-32766, 297, - -32766, 285,-32766, 1202, 793,-32766, 880, 894, 673, -4, - -32766,-32766,-32766, 0, 1019, -463,-32766,-32766, 547, 32, - 245, 1204,-32766, 392, 587, 7, 15, 351, 1192, 38, - -32766, 0, 505, 506, 805, 1185, 1186, 1187, 1188, 1182, - 1183, 39, 695, 696, 859, 948, 925, 1189, 1184, 932, - 868, 922, 933, 857, 920, -262, 1024, 1027, 1028, 71, - 1025, 1026, 309, 312, 868, 1217, -237, -237, -237, 1032, - 30, 1235, 418, 1269, 624, -543, 307, 350, 674, 677, - -236, -236, -236, -108, -108, 681, 418, 26, 683, 684, - 685, 686, 854, -108, -108, -108, -108, -108, -108, 794, - 690, 676, -260, 1195, 692, 855, 854, -108, -108, -108, - -108, 1273, 1275, -108, 816, 815, 824, 901, -108, 940, - -108, 823, 1274, 900, 880, 292, 673, -237, -108, -108, - -108, -108, -108, -108, -108, 902, 899, 1150, 880, 887, - 673, -236, 895, 885, 930, 931, 1272, 1229, 1218, 1236, - 1242, 1245, 0, 506, -541, 1185, 1186, 1187, 1188, 1182, - 1183, -515, -514, -513, 1, 27, 28, 1189, 1184, 37, - 41, 45, 70, -313, -259, 74, 75, 76, 77, 71, - 78, 79, 309, 312, 140, 149, 153, 241, 314, 337, - 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, - 407, 408, 0, 17, 18, 19, 20, 22, 379, 461, - 462, 469, 472, 473, 474, 475, 479, 480, 481, 490, - 660, 1175, 1118, 1193, 995, 1154, -264, -100, 16, 21, - 25, 282, 378, 580, 584, 611, 665, 1122, 1170, 1119, - 1248, 0, -477, 1135, 0, 1196, 0, 312 + -32767,-32766, 12,-32766,-32766, 717, 902, 800,-32766,-32766, + -32766, 1049, 1050, 1051, 1048, 1047, 1046, 276, 33, 265, + 137, 391, 721, 722, 723, 724, -192, 1025, 415,-32766, + 127,-32766,-32766,-32766,-32766, 725, 726, 727, 728, 729, + 730, 731, 732, 733, 734, 735, 755, 564, 756, 757, + 758, 759, 747, 748, 330, 331, 750, 751, 736, 737, + 738, 740, 741, 742, 341, 782, 783, 784, 785, 786, + 743, 744, 565, 566, 776, 767, 765, 766, 779, 762, + 763, 789, -191, 567, 568, 761, 569, 570, 571, 572, + 573, 574, 415, -563, 463, 1171, 143, 764, 575, 576, + -563, 138, -341, 984, -341, 131, 132, 133, 563, 134, + 135, 1000, 714, 715, 716, 136, 36, 1049, 1050, 1051, + 1048, 1047, 1046, 986, 987, 539, 540, -110,-32766,-32766, + -32766, 1169, -110, -303, -110, 913, 440, 441, 442, 294, + 708, 707, -110, -110, -110, -110, -110, -110, -110,-32766, + 1238,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 708, 707, + 717,-32766,-32766,-32766, 799, 689, 1173, 1172, 1174, 1173, + 1172, 1174, 251, 1027, 265, 137, 391, 721, 722, 723, + 724, -192,-32766, 415,-32766,-32766,-32766, -317, 794, 298, + 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, + 735, 755, 564, 756, 757, 758, 759, 747, 748, 330, + 331, 750, 751, 736, 737, 738, 740, 741, 742, 341, + 782, 783, 784, 785, 786, 743, 744, 565, 566, 776, + 767, 765, 766, 779, 762, 763, 300, -191, 567, 568, + 761, 569, 570, 571, 572, 573, 574, -514, 81, 82, + 83, -563, 764, 575, 576, -563, 138, 739, 709, 710, + 711, 712, 713, 795, 714, 715, 716, 752, 753, 35, + 238, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107,-32766, 267,-32766,-32766,-32766, + 105, 106, 107, 312, 267,-32766,-32766,-32766, 108, 80, + -514, -514, 717, 327, 944, 314, 108, 279,-32766, 328, + -32766,-32766,-32766,-32766,-32766, -514, 718, 719, 720, 721, + 722, 723, 724, 355, 1178, 787, -513, -514, 315, -520, + 1178, 585, 725, 726, 727, 728, 729, 730, 731, 732, + 733, 734, 735, 755, 778, 756, 757, 758, 759, 747, + 748, 749, 777, 750, 751, 736, 737, 738, 740, 741, + 742, 781, 782, 783, 784, 785, 786, 743, 744, 745, + 746, 776, 767, 765, 766, 779, 762, 763, 148, 535, + 754, 760, 761, 768, 769, 771, 770, 772, 773, -513, + -513, 448, 449,-32766, 764, 775, 774, 48, 49, 50, + 494, 51, 52, 591, -513, 798, -85, 53, 54, -263, + 55, 798, 791, 986, 987, 359, -513, 1254, -519,-32766, + -32766,-32766,-32766, 825, 125, 826, 1198, 237, 984, -554, + 882, 945, 1283, -554, 1258, 1284, 102, 103, 104, 1210, + 882, 1257, 986, 987, 798, 56, 57, 1273, 986, 987, + -110, 58, 374, 59, 244, 245, 60, 61, 62, 63, + 64, 65, 66, 67, 425, 26, 266, 68, 429, 495, + 680, 797, -85, 1204, 1205, 496, 376, 798, 11, 426, + 287, 1202, 40, 23, 497, 73, 498, 793, 499, 314, + 500, 73, 677, 501, 502, 314, 789, 427, 42, 43, + 430, 362, 361, 882, 44, 503, 485, 798, 34, 247, + 353, 326, 1178, 872, 365, 366, 428, -515, 504, 505, + 506,-32766,-32766, 872, 409, 804, 882, 1041, 631, 24, + 507, 508, 122, 1192, 1193, 1194, 1195, 1189, 1190, 286, + -560, -87, -16, 367, 366, 1196, 1191, -560, 149, 1173, + 1172, 1174, 287, 409, 882, 151, 681, 69, -512, 310, + 311, 314, 30, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 140, -152, -152, -152, + -515, -515, 314, 882, 682, 139, 872, 884, -517, 675, + 152, 314, -152, 798, -152, -515, -152, 884, -152, 675, + 976, 975, 974, 708, 707, 1085, 1087, -515, 360, 872, + 825, 153, 826, 684, 882, 1026, -512, 700, 155, -110, + -110, -512, -512, 647, 648, 147, 394, 123, 858, -110, + -110, -110, -110, 363, 364, 31, -512, 872, -110, 128, + -32766, 368, 369, 129, 691, 142, 1171, 156, -512, 708, + 707, -517, -517,-32766,-32766,-32766, 157,-32766, 158,-32766, + 884,-32766, 675, -152,-32766, 159, 872, -79, 287,-32766, + -32766,-32766, -75, 73, -73,-32766,-32766, 314, -517, -512, + -512,-32766, 406, 884, -72, 675,-32766, 708, 707,-32766, + -51, -71, 1171, -70, -512, 623, 624, 872, -560,-32766, + -32766,-32766, -560,-32766, -69,-32766, -512,-32766, -68, -67, + -32766, 930, -66, 675, -47,-32766,-32766,-32766, -18, 72, + 26,-32766,-32766, 146, 268, 275, 690,-32766, 406, 693, + 881, 145, 798,-32766, 46,-32766, 1202, 277, 278, 1171, + 884, 280, 675, 281, 320, 898,-32766,-32766,-32766, 108, + -32766, 655,-32766, 267,-32766, 144, 789,-32766, 1285, 543, + 668, 130,-32766,-32766,-32766, 650, 798,-32766,-32766,-32766, + 1055, 884, 638, 675,-32766, 406, 537, 295, 621, 632, + 293, 424,-32766, 13, 47, 507, 508, 445, 1192, 1193, + 1194, 1195, 1189, 1190, 473,-32766, 914, 288, 289, -478, + 1196, 1191, 1209, 1211,-32766, 651, 637, 549, -4, 882, + 1171, 1199, 71, 589, -468, 311, 314,-32766,-32766,-32766, + 900,-32766, 314,-32766, 124,-32766, 0, 0,-32766, 0, + 0, 915, 292,-32766,-32766,-32766, 0,-32766, 0,-32766, + -32766, 0, 299, 1171, 0,-32766, 406, 290, 291, 0, + -32766,-32766,-32766,-32766,-32766, 0,-32766, 0,-32766, 0, + 7,-32766, 358, 15, 357, 468,-32766,-32766,-32766, 0, + -32766, 797,-32766,-32766, 126, 287, 1171, 555,-32766, 406, + 882, 38, 39,-32766,-32766,-32766,-32766,-32766, 809,-32766, + 697,-32766, 872, 698,-32766, 863, 954, 931, 938,-32766, + -32766,-32766, 928, 939, 861,-32766,-32766, 926, 1030, 1033, + 1034,-32766, 406, 1031, 360, 1032, 420, 882, 1038,-32766, + 1224, 285, 32, 1242, 1276, -110, -110, 626, 694, 309, + 356, 676, 679, 683, 817, -110, -110, -110, -110, 685, + 686,-32766, 687, 688, 692, 678, 1203, 1171, 859, 1280, + 1282, 820, 819, 828,-32766,-32766,-32766, 9,-32766, 907, + -32766, 946,-32766, 872, 827,-32766, 884, 1281, 675, -4, + -32766,-32766,-32766, 906, 908, 905,-32766,-32766, 1157, -241, + -241, -241,-32766, 406, 891, 360, 901, 26, 889, 936, + -32766, 937, 1279, 1236, 1225, 1243, -110, -110, 1249, 798, + 872, 1252, -266, 1202, -548, 858, -110, -110, -110, -110, + -546, -520, -519, -518, 1, 27, -240, -240, -240, 28, + 37, 41, 360, 45, 70, 74, 75, 76, 77, 0, + 78, 79, 141, -110, -110, 150, 154, 884, 243, 675, + -241, -264, 858, -110, -110, -110, -110, 316, 342, 343, + 344, 345, 346, 508, 347, 1192, 1193, 1194, 1195, 1189, + 1190, 348, 349, 350, 351, 352, 354, 1196, 1191, 421, + -482, -263, 17, 18, 884, 19, 675, -240, 20, 71, + 0, 22, 311, 314, 393, 464, 465, 472, 475, 476, + 477, 478, 482, 483, 484, 492, 662, 1182, 1125, 1200, + 1001, 1161, -268, -102, 16, 21, 25, 284, 392, 582, + 586, 613, 667, 1129, 1177, 1126, 1255, 0, 1142 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 1, 116, 117, 73, 1, 9, 10, 11, - 1, 79, 79, 126, 127, 128, 129, 8, 86, 87, - 88, 8, 90, 1, 92, 37, 94, 8, 30, 97, - 32, 33, 34, 101, 102, 103, 104, 9, 10, 11, - 108, 109, 14, 1, 56, 115, 114, 115, 115, 116, - 117, 118, 119, 120, 122, 9, 10, 11, 70, 71, - 72, 73, 74, 75, 76, 135, 136, 79, 115, 116, - 117, 118, 119, 120, 86, 87, 88, 89, 90, 91, + 12, 13, 9, 10, 11, 31, 9, 10, 11, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 8, 1, + 9, 10, 11, 30, 8, 37, 38, 30, 1, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 30, 8, 32, 33, 57, 1, 1, 9, 10, + 11, 116, 117, 118, 119, 120, 121, 30, 8, 71, + 72, 73, 74, 75, 76, 77, 8, 1, 80, 30, + 8, 32, 33, 34, 35, 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, - 8, 115, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 84, 1, 69, 9, 10, 148, 149, 150, 8, - 152, 135, 136, 69, 2, 3, 4, 5, 6, 7, - 162, 9, 10, 11, 12, 13, 9, 10, 11, 73, - 159, 9, 10, 11, 159, 79, 80, 158, 74, 75, - 165, 162, 86, 87, 88, 162, 90, 30, 92, 37, - 94, 162, 30, 97, 32, 33, 34, 35, 102, 103, - 104, 144, 105, 106, 108, 109, 132, 133, 56, 157, - 114, 115, 115, 9, 10, 11, 132, 133, 122, 105, - 106, 147, 70, 71, 72, 73, 74, 75, 76, 115, - 31, 79, 14, 159, 30, 161, 32, 33, 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, 162, 8, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 96, 9, 10, 11, 158, - 148, 149, 150, 162, 152, 2, 3, 4, 5, 6, - 7, 1, 9, 10, 11, 12, 13, 30, 8, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 8, 56, 9, 10, 11, 52, 53, 54, - 8, 56, 118, 119, 120, 68, 49, 50, 51, 56, - 9, 10, 11, 68, 31, 30, 1, 32, 33, 34, - 35, 36, 37, 70, 71, 72, 73, 74, 75, 76, - 162, 30, 79, 32, 33, 34, 35, 36, 8, 86, + 132, 80, 8, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 80, 1, 160, 80, 8, 149, 150, 151, + 8, 153, 106, 116, 108, 2, 3, 4, 5, 6, + 7, 163, 9, 10, 11, 12, 13, 116, 117, 118, + 119, 120, 121, 136, 137, 117, 118, 101, 9, 10, + 11, 116, 106, 163, 108, 127, 128, 129, 130, 113, + 37, 38, 116, 117, 118, 119, 120, 121, 122, 30, + 1, 32, 33, 34, 35, 36, 37, 38, 37, 38, + 57, 9, 10, 11, 158, 160, 154, 155, 156, 154, + 155, 156, 8, 161, 71, 72, 73, 74, 75, 76, + 77, 163, 30, 80, 32, 33, 34, 161, 80, 8, 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, 8, 31, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 158, 9, 10, 11, - 162, 148, 149, 150, 2, 3, 4, 5, 6, 7, - 79, 96, 50, 69, 12, 13, 8, 15, 30, 1, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 8, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 79, 159, 79, 82, 105, 8, 107, 30, 100, - 1, 49, 50, 105, 8, 107, 69, 55, 1, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 121, 69, 70, 71, 72, 73, 132, 133, 8, 77, - 78, 79, 8, 81, 1, 154, 8, 85, 86, 87, - 88, 147, 90, 153, 92, 105, 94, 107, 8, 97, - 98, 74, 75, 159, 102, 103, 104, 105, 106, 1, - 108, 109, 157, 79, 31, 8, 114, 115, 154, 132, - 133, 8, 69, 159, 122, 123, 124, 105, 106, 69, - 81, 100, 101, 115, 147, 8, 134, 135, 81, 137, - 138, 139, 140, 141, 142, 143, 159, 8, 161, 1, - 8, 149, 150, 135, 136, 153, 154, 155, 156, 105, - 1, 107, 8, 161, 81, 163, 164, 165, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 74, 75, 76, 132, 133, 153, 154, 155, - 31, 83, 132, 133, 160, 9, 157, 89, 159, 91, - 147, 93, 14, 95, 37, 105, 106, 147, 159, 126, - 58, 59, 159, 105, 165, 110, 111, 14, 161, 159, - 14, 69, 165, 14, 116, 117, 14, 79, 31, 14, - 14, 31, 31, 125, 126, 127, 128, 129, 16, 156, - 73, 16, 83, 16, 161, 16, 79, 16, 165, 16, - 1, 16, 16, 86, 87, 88, 16, 90, 30, 92, - 1, 94, 68, 31, 97, 157, 1, 159, 160, 102, - 103, 104, 31, 73, 31, 108, 109, 31, 31, 79, - 31, 114, 115, 69, 132, 133, 86, 87, 88, 122, - 90, 31, 92, 1, 94, 31, 31, 97, 31, 147, - 31, 31, 102, 103, 104, 1, 31, 159, 108, 109, - 1, 159, 31, 165, 114, 115, 157, 37, 159, 152, - 73, 31, 122, 31, 79, 31, 79, 31, 31, 0, - 1, 31, 83, 86, 87, 88, 31, 90, 31, 92, - 31, 94, 83, 115, 97, 35, 132, 133, 83, 102, - 103, 104, 37, 73, 37, 108, 109, 35, 35, 79, - 115, 114, 115, 135, 136, 35, 86, 87, 88, 122, - 90, 35, 92, 159, 94, 83, 56, 97, 76, 81, - 69, 69, 102, 103, 104, 81, 91, 79, 108, 109, - 73, 88, 83, 115, 114, 115, 79, 81, 153, 154, - 155, 82, 122, 86, 87, 88, 157, 90, 159, 92, - 84, 94, 83, 89, 97, 37, 157, 84, 159, 102, - 103, 104, 157, 95, 159, 108, 109, 93, 96, 130, - 126, 114, 115, 96, 105, 81, 107, 96, 84, 122, - 113, 112, 99, 132, 133, 116, 117, 69, 1, 157, - 99, 159, 112, 147, 125, 126, 127, 128, 129, 81, - 156, 73, 1, 85, 126, 161, 157, 79, 159, 165, - 159, 126, 126, 131, 86, 87, 88, 148, 90, 130, - 92, 156, 94, 144, 153, 97, 157, 152, 159, 160, - 102, 103, 104, -1, 1, 147, 108, 109, 151, 145, - 146, 144, 114, 115, 151, 147, 147, 147, 158, 157, - 122, -1, 134, 135, 158, 137, 138, 139, 140, 141, - 142, 157, 157, 157, 157, 157, 157, 149, 150, 157, - 83, 157, 157, 157, 157, 162, 157, 157, 157, 161, - 157, 157, 164, 165, 83, 158, 99, 100, 101, 157, - 159, 158, 105, 158, 158, 161, 159, 159, 159, 159, - 99, 100, 101, 116, 117, 159, 105, 69, 159, 159, - 159, 159, 125, 126, 127, 128, 129, 116, 117, 81, - 159, 159, 162, 85, 160, 160, 125, 126, 127, 128, - 129, 160, 160, 100, 160, 160, 160, 160, 105, 160, - 107, 160, 160, 160, 157, 112, 159, 160, 115, 116, - 117, 118, 119, 120, 121, 160, 160, 160, 157, 160, - 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, -1, 135, 161, 137, 138, 139, 140, 141, - 142, 161, 161, 161, 161, 161, 161, 149, 150, 161, - 161, 161, 161, 160, 162, 161, 161, 161, 161, 161, - 161, 161, 164, 165, 161, 161, 161, 161, 161, 161, - 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, - 161, 161, -1, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, -1, 163, 163, -1, 164, -1, 165 + 127, 128, 129, 130, 131, 132, 8, 163, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 70, 9, 10, + 11, 159, 149, 150, 151, 163, 153, 2, 3, 4, + 5, 6, 7, 155, 9, 10, 11, 12, 13, 30, + 14, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 9, 57, 9, 10, 11, + 53, 54, 55, 8, 57, 9, 10, 11, 69, 160, + 133, 134, 57, 8, 31, 166, 69, 30, 30, 8, + 32, 33, 34, 35, 36, 148, 71, 72, 73, 74, + 75, 76, 77, 8, 1, 80, 70, 160, 70, 162, + 1, 1, 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, 14, 85, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 133, + 134, 133, 134, 116, 149, 150, 151, 2, 3, 4, + 5, 6, 7, 51, 148, 82, 31, 12, 13, 163, + 15, 82, 80, 136, 137, 8, 160, 1, 162, 9, + 10, 11, 116, 106, 14, 108, 1, 97, 116, 159, + 1, 158, 80, 163, 1, 83, 50, 51, 52, 145, + 1, 8, 136, 137, 82, 50, 51, 85, 136, 137, + 127, 56, 8, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 8, 70, 71, 72, 73, 74, + 31, 154, 97, 78, 79, 80, 106, 82, 108, 8, + 157, 86, 87, 88, 89, 162, 91, 155, 93, 166, + 95, 162, 160, 98, 99, 166, 80, 8, 103, 104, + 105, 106, 107, 1, 109, 110, 101, 82, 146, 147, + 115, 116, 1, 84, 106, 107, 8, 70, 123, 124, + 125, 9, 10, 84, 116, 8, 1, 122, 75, 76, + 135, 136, 16, 138, 139, 140, 141, 142, 143, 144, + 1, 31, 31, 106, 107, 150, 151, 8, 14, 154, + 155, 156, 157, 116, 1, 14, 31, 162, 70, 164, + 165, 166, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 160, 75, 76, 77, + 133, 134, 166, 1, 31, 160, 84, 158, 70, 160, + 14, 166, 90, 82, 92, 148, 94, 158, 96, 160, + 119, 120, 121, 37, 38, 59, 60, 160, 106, 84, + 106, 14, 108, 31, 1, 158, 70, 160, 14, 117, + 118, 133, 134, 75, 76, 101, 102, 16, 126, 127, + 128, 129, 130, 106, 107, 14, 148, 84, 127, 16, + 74, 106, 107, 16, 31, 16, 80, 16, 160, 37, + 38, 133, 134, 87, 88, 89, 16, 91, 16, 93, + 158, 95, 160, 161, 98, 16, 84, 31, 157, 103, + 104, 105, 31, 162, 31, 109, 110, 166, 160, 133, + 134, 115, 116, 158, 31, 160, 74, 37, 38, 123, + 31, 31, 80, 31, 148, 111, 112, 84, 159, 87, + 88, 89, 163, 91, 31, 93, 160, 95, 31, 31, + 98, 158, 31, 160, 31, 103, 104, 105, 31, 153, + 70, 109, 110, 31, 31, 31, 31, 115, 116, 31, + 31, 31, 82, 74, 70, 123, 86, 35, 35, 80, + 158, 35, 160, 35, 35, 38, 87, 88, 89, 69, + 91, 77, 93, 57, 95, 70, 80, 98, 83, 89, + 92, 31, 103, 104, 105, 94, 82, 85, 109, 110, + 82, 158, 100, 160, 115, 116, 85, 114, 113, 90, + 132, 127, 123, 97, 70, 135, 136, 97, 138, 139, + 140, 141, 142, 143, 97, 116, 127, 133, 134, 148, + 150, 151, 145, 145, 74, 100, 96, 152, 0, 1, + 80, 159, 162, 152, 148, 165, 166, 87, 88, 89, + 153, 91, 166, 93, 160, 95, -1, -1, 98, -1, + -1, 127, 131, 103, 104, 105, -1, 74, -1, 109, + 110, -1, 131, 80, -1, 115, 116, 133, 134, -1, + 87, 88, 89, 123, 91, -1, 93, -1, 95, -1, + 148, 98, 148, 148, 148, 102, 103, 104, 105, -1, + 74, 154, 109, 110, 160, 157, 80, 81, 115, 116, + 1, 158, 158, 87, 88, 89, 123, 91, 159, 93, + 158, 95, 84, 158, 98, 158, 158, 158, 158, 103, + 104, 105, 158, 158, 158, 109, 110, 158, 158, 158, + 158, 115, 116, 158, 106, 158, 108, 1, 158, 123, + 159, 113, 160, 159, 159, 117, 118, 159, 161, 160, + 160, 160, 160, 160, 126, 127, 128, 129, 130, 160, + 160, 74, 160, 160, 160, 160, 165, 80, 161, 161, + 161, 161, 161, 161, 87, 88, 89, 149, 91, 161, + 93, 161, 95, 84, 161, 98, 158, 161, 160, 161, + 103, 104, 105, 161, 161, 161, 109, 110, 161, 100, + 101, 102, 115, 116, 161, 106, 161, 70, 161, 161, + 123, 161, 161, 161, 161, 161, 117, 118, 161, 82, + 84, 161, 163, 86, 162, 126, 127, 128, 129, 130, + 162, 162, 162, 162, 162, 162, 100, 101, 102, 162, + 162, 162, 106, 162, 162, 162, 162, 162, 162, -1, + 162, 162, 162, 117, 118, 162, 162, 158, 162, 160, + 161, 163, 126, 127, 128, 129, 130, 162, 162, 162, + 162, 162, 162, 136, 162, 138, 139, 140, 141, 142, + 143, 162, 162, 162, 162, 162, 162, 150, 151, 162, + 164, 163, 163, 163, 158, 163, 160, 161, 163, 162, + -1, 163, 165, 166, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, -1, 164 ); protected $actionBase = array( - 0, -2, 152, 558, 779, 897, 911, 499, 484, 414, - 834, 303, 303, -57, 303, 303, 699, 742, 742, 759, - 742, 609, 715, 709, 709, 709, 617, 617, 617, 617, - -58, -58, 96, 697, 730, 767, 650, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 838, - 838, 838, 838, 838, 838, 838, 838, 838, 838, 52, - 405, 365, 666, 999, 1005, 1001, 1006, 997, 996, 1000, - 1002, 1007, 916, 917, 757, 918, 919, 920, 921, 1003, - 846, 998, 1004, 287, 287, 287, 287, 287, 287, 287, - 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, - 287, 287, 287, 287, 287, 287, 287, 287, 287, 636, - 38, 135, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 157, 157, 157, 204, 828, 828, 8, 602, - 162, 948, 948, 948, 948, 948, 948, 948, 948, 948, - 948, 351, 335, 438, 438, 438, 438, 438, 943, 439, - 439, 439, 439, 533, 754, 507, 468, 399, 398, 307, - 307, 678, 678, 16, 16, 16, 16, -60, -60, -60, - -103, 74, 437, 390, 57, 695, 598, 598, 598, 598, - 695, 695, 695, 695, 807, 1011, 695, 695, 695, 394, - 503, 503, 510, 295, 295, 295, 503, 504, 783, 804, - 504, 804, 15, 412, 728, 97, 114, 288, 728, 664, - 761, 141, 19, 781, 472, 781, 776, 842, 872, 1008, - 234, 793, 914, 801, 915, 84, 651, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 1012, 995, - 381, 1012, 1012, 1012, 555, 381, 104, 477, 381, 786, - 995, 52, 798, 52, 52, 52, 52, 958, 52, 52, - 52, 52, 52, 52, 963, 731, 725, 682, 333, 52, - 405, 11, 11, 489, 32, 11, 11, 11, 11, 52, - 52, 52, 472, 770, 797, 550, 803, 122, 770, 770, - 770, 199, 23, 218, 29, 440, 758, 758, 765, 766, - 933, 933, 758, 748, 758, 766, 940, 758, 765, 765, - 933, 765, 775, 380, 563, 520, 528, 765, 765, 577, - 933, 473, 765, 765, 758, 758, 758, 758, 765, 589, - 758, 458, 427, 758, 758, 765, 765, 749, 746, 799, - 277, 933, 933, 933, 799, 524, 792, 792, 792, 815, - 816, 790, 744, 496, 488, 604, 342, 765, 744, 744, - 758, 540, 790, 744, 790, 744, 785, 744, 744, 744, - 790, 744, 758, 748, 557, 744, 683, 765, 592, 334, - 744, 6, 941, 944, 647, 945, 938, 946, 969, 947, - 949, 849, 956, 939, 950, 935, 934, 755, 672, 675, - 808, 756, 932, 644, 644, 644, 930, 644, 644, 644, - 644, 644, 644, 644, 644, 672, 800, 810, 788, 753, - 959, 677, 679, 789, 875, 1009, 1010, 795, 796, 958, - 989, 953, 802, 681, 975, 960, 874, 847, 961, 962, - 976, 990, 991, 881, 762, 882, 884, 806, 964, 850, - 644, 941, 949, 939, 950, 935, 934, 720, 719, 714, - 717, 710, 696, 691, 693, 740, 923, 844, 837, 963, - 931, 672, 843, 971, 841, 977, 978, 848, 787, 769, - 845, 885, 965, 966, 967, 856, 992, 814, 972, 823, - 979, 791, 886, 980, 981, 982, 983, 887, 859, 860, - 861, 817, 774, 870, 778, 889, 638, 773, 780, 970, - 653, 957, 862, 891, 892, 984, 985, 986, 893, 954, - 818, 973, 784, 974, 942, 819, 822, 656, 760, 772, - 659, 662, 905, 906, 907, 955, 747, 752, 824, 825, - 993, 909, 665, 826, 685, 912, 988, 686, 690, 745, - 871, 809, 777, 782, 968, 750, 827, 913, 829, 830, - 831, 987, 833, 0, 0, 0, 0, 0, 0, 0, + 0, -2, 153, 562, 868, 939, 976, 485, 62, 392, + 817, 305, 305, 51, 305, 305, 585, 642, 642, 673, + 642, 499, 613, 489, 489, 489, 626, 626, 626, 626, + 672, 672, 823, 823, 856, 790, 719, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, + 56, 333, 390, 681, 1004, 1010, 1006, 1011, 1002, 1001, + 1005, 1007, 1012, 891, 892, 760, 893, 894, 897, 900, + 1008, 828, 1003, 1009, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 336, 470, 572, 346, 346, 346, 346, 346, 346, 346, + 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, + 346, 346, 346, 3, 3, 3, 21, 710, 710, 202, + 49, 606, 338, 977, 977, 977, 977, 977, 977, 977, + 977, 977, 977, 169, 169, 7, 7, 7, 7, 7, + 76, -25, -25, -25, -25, 571, 383, 389, 37, 465, + 46, 446, 446, 337, 337, 372, 372, 372, 372, 366, + 366, 366, 58, 227, 316, 377, 354, 65, 476, 476, + 476, 476, 65, 65, 65, 65, 718, 841, 65, 65, + 65, 507, 548, 548, 774, 297, 297, 297, 548, 564, + 751, 422, 564, 422, 199, 412, 739, 468, 497, 330, + 739, 578, 724, 599, 142, 777, 587, 777, 1000, 742, + 743, 701, 820, 845, 1013, 541, 732, 888, 765, 890, + 318, 696, 999, 999, 999, 999, 999, 999, 999, 999, + 999, 999, 999, 716, 171, 1000, 158, 716, 716, 716, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 644, 158, 513, 608, 158, 769, 171, 56, 726, 56, + 56, 56, 56, 946, 56, 56, 56, 56, 56, 56, + 952, 747, -16, 56, 333, 55, 55, 517, 28, 55, + 55, 55, 55, 56, 56, 56, 587, 756, 715, 595, + 721, 124, 756, 756, 756, 435, 20, 306, 68, 430, + 736, 736, 748, 912, 912, 736, 744, 736, 748, 921, + 736, 912, 778, 72, 516, 355, 467, 531, 912, 231, + 736, 736, 736, 736, 549, 736, 214, 138, 736, 736, + 761, 754, 771, 26, 912, 912, 912, 771, 375, 708, + 708, 708, 792, 795, 725, 753, 345, 278, 577, 60, + 767, 753, 753, 736, 504, 725, 753, 725, 753, 727, + 753, 753, 753, 725, 753, 736, 744, 361, 753, 691, + 568, 44, 753, 6, 922, 923, 570, 924, 918, 925, + 967, 926, 928, 831, 936, 919, 929, 917, 913, 759, + 576, 671, 772, 711, 911, 740, 740, 740, 909, 740, + 740, 740, 740, 740, 740, 740, 740, 576, 712, 776, + 714, 730, 947, 683, 687, 717, 847, 966, 1014, 729, + 764, 946, 994, 930, 783, 689, 978, 948, 827, 829, + 949, 950, 981, 995, 996, 848, 745, 849, 850, 789, + 959, 832, 740, 922, 928, 919, 929, 917, 913, 741, + 738, 733, 737, 722, 720, 703, 713, 752, 908, 902, + 821, 952, 910, 576, 824, 969, 822, 982, 983, 830, + 750, 735, 825, 851, 960, 961, 962, 833, 997, 784, + 970, 899, 984, 757, 852, 985, 986, 987, 988, 858, + 839, 840, 842, 797, 749, 938, 770, 860, 424, 766, + 768, 964, 594, 945, 843, 863, 866, 989, 990, 991, + 872, 933, 798, 972, 731, 975, 968, 799, 800, 601, + 762, 763, 636, 657, 873, 874, 877, 934, 755, 734, + 804, 805, 998, 883, 664, 806, 700, 885, 993, 702, + 709, 728, 844, 775, 723, 746, 963, 758, 809, 887, + 810, 811, 812, 992, 815, 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, 452, 452, 452, 452, 452, 452, 303, 303, 303, - 303, 0, 0, 303, 0, 0, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, - 452, 452, 452, 452, 452, 452, 452, 452, 452, 287, - 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, - 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, - 287, 287, 287, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 455, 455, 455, 455, 455, 455, 305, + 305, 305, 305, 0, 0, 305, 0, 0, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 287, - 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, - 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, - 287, 287, 287, 287, 287, 287, 695, 695, 287, 0, - 287, 695, 695, 695, 695, 695, 695, 695, 695, 695, - 695, 287, 287, 287, 287, 287, 287, 287, 775, 295, - 295, 295, 295, 695, 695, 695, 695, -37, -37, 295, - 295, 695, 695, 695, 695, 695, 695, 695, 695, 695, - 0, 0, 0, 381, 804, 0, 748, 748, 748, 748, - 0, 0, 0, 0, 804, 804, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 381, 804, 0, - 381, 0, 748, 748, 695, 775, 775, 310, 695, 0, - 0, 0, 0, 381, 748, 381, 804, 11, 52, 310, - 0, 481, 481, 481, 481, 0, 472, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 775, 775, 748, 775, - 0, 748, 748, 748, 0, 0, 0, 0, 0, 748, - 765, 0, 933, 0, 0, 0, 0, 758, 0, 0, - 0, 0, 0, 0, 758, 940, 765, 765, 0, 0, - 0, 0, 0, 0, 748, 0, 0, 0, 0, 0, - 0, 0, 0, 644, 787, 0, 787, 0, 644, 644, - 644 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 65, + 65, 289, 289, 0, 289, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 289, 289, 289, 289, 289, + 289, 289, 778, 297, 297, 297, 297, 65, 65, 65, + 65, -55, -55, 297, 297, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 0, 0, 0, 158, 422, 0, + 744, 744, 744, 744, 0, 0, 0, 0, 422, 422, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 158, 422, 0, 158, 0, 744, 744, 65, 778, + 778, 493, 65, 0, 0, 0, 0, 158, 744, 158, + 171, 422, 171, 171, 55, 56, 493, 0, 584, 584, + 584, 584, 0, 587, 778, 778, 778, 778, 778, 778, + 778, 778, 778, 778, 778, 744, 0, 778, 0, 744, + 744, 744, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 744, 0, 0, + 912, 0, 0, 0, 0, 736, 0, 0, 0, 0, + 0, 0, 736, 921, 0, 0, 0, 0, 0, 0, + 744, 0, 0, 0, 0, 0, 0, 0, 0, 740, + 750, 0, 750, 0, 740, 740, 740 ); protected $actionDefault = array( - 3,32767, 100,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 98,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 561, 561, 561, 561, - 241, 100,32767,32767,32767,32767, 437, 356, 356, 356, - 32767,32767, 505, 505, 505, 505, 505, 505,32767,32767, - 32767,32767,32767,32767, 437,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 100,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 566, 566, 566, 566, + 32767,32767, 245, 102,32767,32767, 442, 360, 360, 360, + 32767,32767, 510, 510, 510, 510, 510, 510,32767,32767, + 32767,32767,32767,32767, 442,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, 98,32767,32767,32767, - 35, 5, 6, 8, 9, 48, 15,32767,32767,32767, - 32767,32767, 100,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 554,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 100,32767,32767, + 32767, 37, 7, 8, 10, 11, 50, 17,32767,32767, + 32767,32767,32767, 102,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 441, 420, 421, 423, 424, 355, 506, - 560, 298, 557, 354, 143, 310, 300, 229, 301, 245, - 442, 246, 443, 446, 447, 206, 272, 351, 147, 385, - 438, 387, 436, 440, 386, 361, 366, 367, 368, 369, - 370, 371, 372, 373, 374, 375, 376, 377, 378, 359, - 360, 439, 417, 416, 415, 383,32767,32767, 384, 358, - 388,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767, 390, 389, 406, 407, 404, 405, 408,32767, 409, - 410, 411, 412,32767,32767,32767,32767, 336, 334, 397, - 398, 289, 289,32767,32767,32767,32767,32767,32767,32767, - 32767, 499, 414,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 98, 501, - 380, 382, 469, 392, 393, 391, 362,32767, 476,32767, - 100, 478,32767,32767,32767, 109,32767,32767,32767, 500, - 32767, 507, 507,32767, 462, 98,32767,32767,32767,32767, - 267,32767,32767,32767,32767, 568, 462, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 108,32767, 108, - 32767,32767,32767, 98, 186,32767, 255, 257, 100, 522, - 191,32767, 481,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 474, 191, 191,32767,32767, + 32767,32767,32767, 559,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 462, 402, 136,32767, 136, 507, 394, 395, - 396, 464, 507, 507, 507,32767,32767,32767, 191,32767, - 479, 479, 98, 98, 98, 98, 474,32767, 191, 191, - 32767, 191, 109, 97, 97, 97, 97, 191, 191, 97, - 101, 99, 191, 191,32767,32767,32767,32767, 191, 97, - 32767, 99, 99,32767,32767, 191, 191, 212, 203, 210, - 99,32767, 526, 527, 210, 99, 214, 214, 214, 234, - 234, 453, 291, 99, 97, 99, 99, 191, 291, 291, - 32767, 99, 453, 291, 453, 291, 193, 291, 291, 291, - 453, 291,32767,32767, 99, 291, 205, 191, 97, 97, - 291,32767,32767,32767, 464,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 494, - 32767, 511, 524, 400, 401, 403, 509, 425, 426, 427, - 428, 429, 430, 431, 433, 556,32767, 468,32767,32767, - 32767,32767, 309, 566,32767, 566,32767,32767,32767,32767, + 32767,32767,32767,32767, 446, 425, 426, 428, 429, 359, + 511, 565, 302, 562, 358, 145, 314, 304, 233, 305, + 249, 447, 250, 448, 451, 452, 210, 276, 355, 149, + 389, 443, 391, 441, 445, 390, 365, 370, 371, 372, + 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, + 363, 364, 444, 422, 421, 420, 387,32767,32767, 388, + 392, 362, 395,32767,32767,32767,32767,32767,32767,32767, + 32767, 102,32767, 393, 394, 411, 412, 409, 410, 413, + 32767, 414, 415, 416, 417,32767,32767,32767,32767, 340, + 338, 402, 403, 293, 293,32767,32767,32767,32767,32767, + 32767,32767,32767, 504, 419,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, + 100, 506, 384, 386, 474, 397, 398, 396, 366,32767, + 481,32767, 102, 483,32767,32767,32767, 111,32767,32767, + 32767, 505,32767, 512, 512,32767, 467, 100, 193,32767, + 193, 193,32767,32767,32767, 271,32767,32767,32767,32767, + 573, 467, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110,32767, 193, 110,32767,32767,32767, 100, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 188,32767, 259, 261, 102, 527, 193,32767, 486,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 567,32767, 507,32767,32767,32767,32767, - 399, 7, 74, 41, 42, 50, 56, 485, 486, 487, - 488, 482, 483, 489, 484,32767, 490, 532,32767,32767, - 508, 559,32767,32767,32767,32767,32767,32767, 136,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 494, - 32767, 134,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 507,32767,32767,32767, 286, 288,32767, + 32767, 479,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 467, 407, 138,32767, + 138, 512, 399, 400, 401, 469, 512, 512, 512,32767, + 32767,32767,32767, 484, 484, 100, 100, 100, 100, 479, + 32767,32767, 111, 99, 99, 99, 99, 99, 103, 101, + 32767,32767,32767,32767, 99,32767, 101, 101,32767,32767, + 216, 207, 214, 101,32767, 531, 532, 214, 101, 218, + 218, 218, 238, 238, 458, 295, 101, 99, 101, 101, + 195, 295, 295,32767, 101, 458, 295, 458, 295, 197, + 295, 295, 295, 458, 295,32767,32767, 101, 295, 209, + 99, 99, 295,32767,32767,32767, 469,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 507,32767,32767,32767, 274, 276, + 32767, 499,32767, 516, 529, 405, 406, 408, 514, 430, + 431, 432, 433, 434, 435, 436, 438, 561,32767, 473, + 32767,32767,32767,32767, 313, 571,32767, 571,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 271,32767,32767, 350,32767,32767, - 32767,32767, 330,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 149, 149, 3, 3, 312, 149, 149, - 149, 312, 149, 312, 312, 312, 149, 149, 149, 149, - 149, 149, 181, 249, 252, 234, 234, 149, 322, 149 + 32767,32767,32767,32767,32767, 572,32767, 512,32767,32767, + 32767,32767, 404, 9, 76, 43, 44, 52, 58, 490, + 491, 492, 493, 487, 488, 494, 489,32767, 495, 537, + 32767,32767, 513, 564,32767,32767,32767,32767,32767,32767, + 138,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 499,32767, 136,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 512,32767,32767,32767, 290, + 292,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 512,32767,32767,32767, + 278, 280,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 275,32767,32767, 354, + 32767,32767,32767,32767, 334,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 151, 151, 3, 3, 316, + 151, 151, 151, 316, 151, 316, 316, 316, 151, 151, + 151, 151, 151, 151, 183, 253, 256, 238, 238, 151, + 326, 151 ); protected $goto = array( - 191, 191, 661, 403, 634, 453, 1237, 1238, 397, 300, - 301, 321, 555, 306, 402, 322, 404, 613, 1038, 1039, - 669, 315, 315, 315, 315, 162, 162, 162, 162, 188, - 188, 172, 174, 215, 192, 210, 188, 188, 188, 188, - 188, 189, 189, 189, 189, 189, 189, 183, 184, 185, - 186, 187, 212, 210, 213, 513, 514, 393, 515, 517, - 518, 519, 520, 521, 522, 523, 524, 1065, 163, 164, - 165, 190, 166, 167, 168, 161, 169, 170, 171, 173, - 209, 211, 214, 232, 235, 238, 240, 251, 252, 253, - 254, 255, 256, 257, 259, 260, 261, 262, 269, 270, - 303, 304, 305, 398, 399, 400, 560, 216, 217, 218, + 192, 192, 663, 417, 636, 910, 981, 988, 989, 411, + 302, 303, 323, 557, 308, 416, 324, 418, 615, 1003, + 671, 317, 317, 317, 317, 163, 163, 163, 163, 216, + 193, 189, 189, 173, 175, 211, 189, 189, 189, 189, + 189, 190, 190, 190, 190, 190, 190, 184, 185, 186, + 187, 188, 213, 211, 214, 515, 516, 407, 517, 519, + 520, 521, 522, 523, 524, 525, 526, 1071, 164, 165, + 166, 191, 167, 168, 169, 162, 170, 171, 172, 174, + 210, 212, 215, 233, 236, 239, 240, 242, 253, 254, + 255, 256, 257, 258, 259, 261, 262, 263, 264, 271, + 272, 305, 306, 307, 412, 413, 414, 562, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 175, 231, 176, 193, 194, 195, 233, 183, - 184, 185, 186, 187, 212, 1065, 196, 177, 178, 179, - 197, 193, 180, 234, 198, 160, 199, 200, 181, 201, - 202, 203, 182, 204, 205, 206, 207, 208, 814, 586, - 600, 603, 604, 605, 606, 625, 626, 627, 671, 811, - 599, 599, 539, 530, 577, 1194, 1194, 1194, 1194, 1194, - 1194, 1194, 1194, 1194, 1194, 280, 280, 280, 280, 997, - 332, 819, 812, 867, 862, 863, 876, 845, 820, 864, - 817, 865, 866, 818, 597, 631, 1144, 897, 788, 870, - 1145, 1148, 898, 1149, 367, 530, 871, 539, 872, 1018, - 1014, 1015, 792, 548, 549, 617, 617, 786, 374, 558, - 1159, 987, 984, 985, 579, 915, 383, 668, 1212, 1212, - 923, 593, 594, 1212, 1212, 1212, 1212, 1212, 1212, 1212, - 1212, 1212, 1212, 904, 975, 982, 983, 1163, 1163, 1163, - 979, 552, 792, 476, 792, 979, 979, 979, 979, 979, - 979, 979, 979, 979, 329, 396, 422, 588, 5, 1163, - 6, 422, 422, 14, 1163, 1163, 1163, 1163, 1160, 1252, - 1163, 1163, 1163, 1244, 1244, 1244, 1244, 944, 802, 363, - 335, 546, 551, 311, 295, 694, 612, 614, 883, 632, - 335, 335, 884, 651, 655, 958, 659, 667, 954, 1161, - 1220, 1221, 1239, 1240, 335, 335, 633, 335, 1113, 1279, - 365, 369, 540, 578, 582, 323, 1262, 1262, 1210, 1210, - 532, 804, 335, 1210, 1210, 1210, 1210, 1210, 1210, 1210, - 1210, 1210, 1210, 1262, 409, 422, 422, 422, 422, 422, - 422, 422, 422, 422, 422, 422, 832, 422, 1265, 373, - 525, 525, 525, 525, 545, 1223, 829, 516, 516, 581, - 966, 592, 516, 516, 516, 516, 516, 516, 516, 516, - 516, 516, 609, 610, 381, 382, 807, 807, 1156, 640, - 654, 641, 1003, 385, 386, 387, 628, 652, 642, 643, - 644, 388, 697, 531, 543, 454, 327, 1263, 1263, 531, - 841, 543, 442, 442, 366, 333, 334, 556, 591, 532, - 1234, 1234, 1234, 442, 1263, 527, 527, 527, 1007, 1048, - 267, 559, 447, 448, 449, 528, 528, 837, 928, 0, - 1270, 1271, 458, 1246, 1246, 1246, 1246, 430, 477, 0, - 478, 0, 917, 917, 917, 917, 485, 827, 430, 911, - 918, 810, 839, 0, 0, 826, 0, 835, 0, 1230, - 0, 0, 0, 947, 921, 921, 919, 921, 693, 486, - 529, 956, 951, 840, 828, 1002, 0, 0, 1006, 1158, - 888, 1053, 0, 807, 0, 0, 0, 0, 926, 596, - 0, 0, 0, 0, 963, 1005, 0, 0, 1232, 1232, - 1005, 0, 831, 0, 637, 942, 0, 0, 0, 0, - 825, 576, 1031, 916, 672, 658, 658, 0, 664, 1029, - 0, 0, 0, 1155, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1046, 844, 0, + 229, 230, 231, 176, 232, 177, 194, 195, 196, 234, + 184, 185, 186, 187, 188, 213, 1071, 197, 178, 179, + 180, 198, 194, 181, 235, 199, 161, 200, 201, 182, + 202, 203, 204, 183, 205, 206, 207, 208, 209, 818, + 579, 601, 601, 541, 532, 1270, 1270, 1201, 1201, 1201, + 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1219, 1219, 456, + 1244, 1245, 1270, 1219, 1219, 1219, 1219, 1219, 1219, 1219, + 1219, 1219, 1219, 383, 532, 541, 550, 551, 390, 560, + 581, 595, 596, 823, 815, 871, 866, 867, 880, 14, + 824, 868, 821, 869, 870, 822, 816, 811, 811, 874, + 792, 282, 282, 282, 282, 849, 1217, 1217, 790, 1024, + 1020, 1021, 1217, 1217, 1217, 1217, 1217, 1217, 1217, 1217, + 1217, 1217, 929, 518, 518, 921, 397, 670, 831, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 1170, + 1170, 1170, 985, 843, 599, 633, 830, 985, 985, 985, + 985, 985, 985, 985, 985, 985, 554, 796, 432, 249, + 249, 1170, 334, 432, 432, 337, 1170, 1170, 1170, 1170, + 1259, 340, 1170, 1170, 1170, 1251, 1251, 1251, 1251, 1044, + 1045, 340, 340, 950, 246, 246, 246, 246, 248, 250, + 887, 529, 529, 529, 888, 340, 340, 796, 340, 796, + 1286, 588, 602, 605, 606, 607, 608, 627, 628, 629, + 673, 534, 811, 438, 340, 814, 313, 297, 923, 923, + 923, 923, 1246, 1247, 438, 917, 924, 953, 927, 927, + 925, 927, 695, 379, 531, 962, 957, 875, 553, 876, + 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, + 432, 548, 410, 432, 590, 696, 614, 616, 635, 634, + 1230, 611, 612, 653, 657, 964, 661, 669, 960, 1120, + 547, 395, 396, 1269, 1269, 422, 642, 594, 643, 325, + 399, 400, 401, 656, 654, 5, 808, 6, 402, 480, + 1269, 481, 332, 844, 832, 1008, 1012, 488, 1241, 1241, + 1241, 447, 447, 932, 558, 593, 1272, 533, 545, 836, + 447, 534, 533, 833, 545, 389, 630, 382, 644, 645, + 646, 1253, 1253, 1253, 1253, 1163, 922, 561, 450, 451, + 452, 972, 841, 1009, 1166, 1277, 1278, 1151, 903, 892, + 1059, 1152, 1155, 904, 1156, 699, 598, 1237, 457, 1052, + 848, 969, 527, 527, 527, 527, 845, 583, 269, 835, + 839, 639, 948, 530, 530, 1013, 1054, 829, 934, 461, + 0, 1165, 489, 0, 578, 1037, 0, 674, 660, 660, + 1162, 666, 1035, 0, 0, 0, 1011, 1167, 0, 0, + 1239, 1239, 1011, 0, 806, 252, 252, 619, 619, 338, + 339, 0, 0, 993, 990, 991, 0, 0, 0, 0, + 1168, 1227, 1228, 381, 385, 542, 580, 584, 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, - 961, 961 + 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, 967, 967 ); protected $gotoCheck = array( - 41, 41, 71, 64, 64, 160, 160, 160, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 130, 130, - 8, 22, 22, 22, 22, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 14, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 25, - 102, 102, 74, 74, 116, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 23, 23, 23, 23, 113, - 91, 14, 26, 14, 14, 14, 14, 44, 14, 14, - 14, 14, 14, 14, 54, 54, 76, 76, 6, 14, - 76, 76, 76, 76, 74, 74, 63, 74, 63, 14, - 14, 14, 11, 74, 74, 109, 109, 5, 74, 74, - 19, 109, 109, 109, 74, 87, 87, 87, 154, 154, - 48, 74, 74, 154, 154, 154, 154, 154, 154, 154, - 154, 154, 154, 85, 85, 85, 85, 71, 71, 71, - 71, 156, 11, 74, 11, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 163, 12, 22, 12, 45, 71, - 45, 22, 22, 74, 71, 71, 71, 71, 19, 165, - 71, 71, 71, 8, 8, 8, 8, 97, 19, 60, - 13, 47, 98, 153, 153, 47, 47, 47, 71, 47, - 13, 13, 71, 47, 47, 47, 47, 47, 47, 19, - 19, 19, 162, 162, 13, 13, 62, 13, 137, 13, - 57, 57, 57, 57, 57, 28, 166, 166, 155, 155, - 13, 17, 13, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 166, 106, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 38, 22, 166, 27, - 101, 101, 101, 101, 8, 13, 36, 157, 157, 101, - 104, 8, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 81, 81, 78, 78, 21, 21, 146, 78, - 13, 78, 115, 78, 78, 78, 82, 78, 82, 82, - 82, 78, 93, 8, 8, 143, 78, 167, 167, 8, - 40, 8, 135, 135, 8, 91, 91, 2, 2, 13, - 116, 116, 116, 135, 167, 18, 18, 18, 118, 133, - 23, 8, 8, 8, 8, 23, 23, 8, 90, -1, - 8, 8, 80, 116, 116, 116, 116, 18, 141, -1, - 141, -1, 18, 18, 18, 18, 141, 34, 18, 18, - 18, 24, 34, -1, -1, 34, -1, 8, -1, 116, - -1, -1, -1, 24, 24, 24, 24, 24, 24, 8, - 24, 24, 24, 15, 15, 15, -1, -1, 15, 13, - 16, 16, -1, 21, -1, -1, -1, -1, 15, 16, - -1, -1, -1, -1, 16, 116, -1, -1, 116, 116, - 116, -1, 16, -1, 16, 16, -1, -1, -1, -1, - 16, 7, 7, 15, 7, 7, 7, -1, 7, 7, - -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 15, 15, -1, + 42, 42, 72, 65, 65, 87, 87, 87, 87, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 115, + 9, 23, 23, 23, 23, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 15, + 118, 104, 104, 75, 75, 169, 169, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 156, 156, 162, + 162, 162, 169, 156, 156, 156, 156, 156, 156, 156, + 156, 156, 156, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 15, 26, 15, 15, 15, 15, 75, + 15, 15, 15, 15, 15, 15, 27, 22, 22, 15, + 7, 24, 24, 24, 24, 45, 157, 157, 6, 15, + 15, 15, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 49, 159, 159, 89, 89, 89, 35, 159, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 72, + 72, 72, 72, 35, 55, 55, 35, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 158, 12, 23, 5, + 5, 72, 165, 23, 23, 93, 72, 72, 72, 72, + 167, 14, 72, 72, 72, 9, 9, 9, 9, 132, + 132, 14, 14, 99, 5, 5, 5, 5, 5, 5, + 72, 19, 19, 19, 72, 14, 14, 12, 14, 12, + 14, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 14, 22, 19, 14, 25, 155, 155, 19, 19, + 19, 19, 164, 164, 19, 19, 19, 25, 25, 25, + 25, 25, 25, 61, 25, 25, 25, 64, 100, 64, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 48, 13, 23, 13, 48, 48, 48, 63, 48, + 14, 83, 83, 48, 48, 48, 48, 48, 48, 139, + 9, 80, 80, 168, 168, 108, 80, 9, 80, 29, + 80, 80, 80, 14, 80, 46, 18, 46, 80, 143, + 168, 143, 80, 16, 16, 16, 16, 143, 118, 118, + 118, 137, 137, 16, 2, 2, 168, 9, 9, 39, + 137, 14, 9, 37, 9, 28, 84, 9, 84, 84, + 84, 118, 118, 118, 118, 148, 16, 9, 9, 9, + 9, 106, 9, 117, 20, 9, 9, 78, 78, 17, + 17, 78, 78, 78, 78, 95, 17, 118, 145, 16, + 16, 17, 103, 103, 103, 103, 41, 103, 24, 17, + 9, 17, 17, 24, 24, 120, 135, 17, 92, 82, + -1, 14, 9, -1, 8, 8, -1, 8, 8, 8, + 17, 8, 8, -1, -1, -1, 118, 20, -1, -1, + 118, 118, 118, -1, 20, 5, 5, 111, 111, 93, + 93, -1, -1, 111, 111, 111, -1, -1, -1, -1, + 20, 20, 20, 58, 58, 58, 58, 58, -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 101, 101 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 103, 103 ); protected $gotoBase = array( - 0, 0, -248, 0, 0, 214, 199, 524, 7, 0, - 0, -61, -48, 16, -170, 69, 59, 45, 172, -132, - 0, 81, 18, 182, 467, 165, 188, 46, 52, 0, - 0, 0, 0, 0, 117, 0, 51, 0, 56, 0, - 8, -1, 0, 0, 185, -419, 0, -373, 218, 0, - 0, 0, 0, 0, 166, 0, 0, 287, 0, 0, - 259, 0, 89, 198, -233, 0, 0, 0, 0, 0, - 0, -6, 0, 0, -204, 0, -175, -179, -74, 0, - -2, -65, -275, 0, 0, -20, 0, -56, 0, 0, - 34, -270, 0, 32, 0, 0, 0, 266, 261, 0, - 0, 344, -66, 0, 31, 0, 82, 0, 0, -46, - 0, 0, 0, 187, 0, 49, 167, 0, 25, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -249, 0, 0, 24, 0, 392, 0, 63, 0, 0, - 0, -14, 0, 4, 0, 0, -10, 0, 0, 0, - 0, 0, 0, -5, 2, 102, 234, 141, 0, 0, - -282, 0, -29, 246, 0, 260, 42, 123, 0, 0 + 0, 0, -253, 0, 0, 278, 215, 211, 487, 7, + 0, 0, -8, 47, 5, -174, -21, 13, 108, 46, + 76, 0, -100, 18, 218, 331, 200, 212, 110, 114, + 0, 0, 0, 0, 0, -108, 0, 106, 0, 117, + 0, 51, -1, 0, 0, 213, -294, 0, -305, 220, + 0, 0, 0, 0, 0, 226, 0, 0, 490, 0, + 0, 313, 0, 140, 339, -234, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -167, 0, 0, 62, -22, + -80, 0, 32, -79, -247, 0, 0, -270, 0, -48, + 0, 0, 61, -178, 0, 71, 0, 0, 0, 270, + 317, 0, 0, 446, -76, 0, 96, 0, 121, 0, + 0, 244, 0, 0, 0, 17, 0, 94, 153, 0, + 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 30, 0, 0, 58, 0, 389, 0, 122, + 0, 0, 0, -66, 0, 44, 0, 0, 91, 0, + 0, 0, 0, 0, 0, 26, -60, -11, 249, 6, + 0, 0, -110, 0, -15, 254, 0, 261, 97, -131, + 0, 0 ); protected $gotoDefault = array( - -32768, 491, 701, 4, 702, 776, 784, 575, 507, 670, - 328, 601, 394, 1228, 869, 1052, 557, 803, 1172, 1180, - 431, 806, 316, 330, 851, 852, 853, 370, 355, 361, - 368, 623, 602, 471, 838, 425, 830, 463, 833, 424, - 842, 159, 391, 489, 846, 3, 848, 534, 879, 356, - 856, 357, 647, 858, 542, 860, 861, 364, 371, 372, - 1057, 550, 598, 873, 239, 544, 874, 354, 875, 882, - 359, 362, 656, 441, 483, 384, 1033, 585, 620, 437, - 457, 608, 607, 595, 456, 638, 389, 913, 464, 439, - 927, 331, 935, 699, 1064, 615, 466, 943, 616, 950, - 953, 508, 509, 455, 965, 271, 467, 992, 639, 977, - 618, 990, 450, 996, 426, 1004, 1216, 429, 1008, 258, - 1011, 272, 390, 405, 1016, 1017, 8, 1023, 662, 663, - 10, 268, 488, 1047, 657, 423, 1063, 410, 1132, 1134, - 536, 468, 1152, 1151, 650, 484, 1157, 1219, 420, 510, - 451, 302, 511, 294, 319, 299, 526, 281, 320, 512, - 452, 1225, 1233, 317, 29, 1253, 1264, 326, 554, 590 + -32768, 493, 703, 4, 704, 896, 780, 788, 577, 509, + 672, 333, 603, 408, 1235, 873, 1058, 559, 807, 1179, + 1187, 439, 810, 318, 335, 855, 856, 857, 386, 371, + 377, 384, 625, 604, 474, 842, 435, 834, 466, 837, + 434, 846, 160, 405, 491, 850, 3, 852, 536, 883, + 372, 860, 373, 649, 862, 544, 864, 865, 380, 387, + 388, 1063, 552, 600, 877, 241, 546, 878, 370, 879, + 886, 375, 378, 658, 446, 486, 479, 398, 1039, 587, + 622, 443, 460, 610, 609, 597, 459, 640, 403, 919, + 467, 444, 933, 336, 941, 701, 1070, 617, 469, 949, + 618, 956, 959, 510, 511, 458, 971, 273, 470, 998, + 641, 983, 620, 996, 453, 1002, 436, 1010, 1223, 437, + 1014, 260, 1017, 274, 404, 419, 1022, 1023, 8, 1029, + 664, 665, 10, 270, 490, 1053, 659, 433, 1069, 423, + 1139, 1141, 538, 471, 1159, 1158, 652, 487, 1164, 1226, + 431, 512, 454, 304, 513, 296, 321, 301, 528, 283, + 322, 514, 455, 1232, 1240, 319, 29, 1260, 1271, 329, + 556, 592 ); 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, 5, 5, 5, 6, 6, 6, 6, - 6, 6, 6, 7, 7, 8, 9, 10, 10, 10, - 11, 11, 12, 12, 13, 14, 14, 15, 15, 16, - 16, 17, 17, 20, 20, 21, 22, 22, 23, 23, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 28, 28, 29, 29, 31, 33, 33, 27, 35, - 35, 32, 37, 37, 34, 34, 36, 36, 38, 38, - 30, 39, 39, 40, 42, 43, 43, 44, 45, 45, - 47, 46, 46, 46, 46, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 48, 48, 48, 48, 24, - 24, 67, 67, 70, 70, 69, 68, 68, 61, 73, - 73, 74, 74, 75, 75, 76, 76, 25, 25, 26, - 26, 26, 26, 84, 84, 86, 86, 79, 79, 79, - 80, 80, 83, 83, 81, 81, 87, 88, 88, 55, - 55, 63, 63, 66, 66, 66, 65, 89, 89, 90, - 56, 56, 56, 56, 91, 91, 92, 92, 93, 93, - 94, 95, 95, 96, 96, 97, 97, 53, 53, 49, - 49, 99, 51, 51, 100, 50, 50, 52, 52, 62, - 62, 62, 62, 77, 77, 103, 103, 105, 105, 105, - 105, 104, 104, 104, 107, 107, 107, 85, 85, 109, - 109, 109, 108, 108, 110, 110, 111, 111, 111, 106, - 106, 78, 78, 78, 19, 19, 112, 112, 113, 113, - 113, 113, 58, 114, 114, 115, 59, 117, 117, 118, - 118, 119, 119, 82, 120, 120, 120, 120, 120, 120, - 125, 125, 126, 126, 127, 127, 127, 127, 127, 128, - 129, 129, 124, 124, 121, 121, 123, 123, 131, 131, - 130, 130, 130, 130, 130, 130, 122, 132, 132, 134, - 133, 133, 60, 98, 135, 135, 54, 54, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 142, 136, 136, 141, 141, 144, 145, 145, 146, 147, - 147, 147, 18, 18, 71, 71, 71, 71, 137, 137, - 137, 137, 149, 149, 138, 138, 140, 140, 140, 143, - 143, 154, 154, 154, 154, 154, 154, 154, 154, 154, - 155, 155, 102, 157, 157, 157, 157, 139, 139, 139, - 139, 139, 139, 139, 139, 57, 57, 152, 152, 152, - 152, 158, 158, 148, 148, 148, 159, 159, 159, 159, - 159, 159, 72, 72, 64, 64, 64, 64, 116, 116, - 116, 116, 162, 161, 151, 151, 151, 151, 151, 151, - 151, 150, 150, 150, 160, 160, 160, 160, 101, 156, - 164, 164, 163, 163, 165, 165, 165, 165, 165, 165, - 165, 165, 153, 153, 153, 153, 167, 168, 166, 166, - 166, 166, 166, 166, 166, 166, 169, 169, 169, 169 + 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, + 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, + 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, + 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, + 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, + 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, + 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, + 62, 74, 74, 75, 75, 76, 76, 77, 77, 78, + 78, 26, 26, 27, 27, 27, 27, 86, 86, 88, + 88, 81, 81, 81, 82, 82, 85, 85, 83, 83, + 89, 90, 90, 56, 56, 64, 64, 67, 67, 67, + 66, 91, 91, 92, 57, 57, 57, 57, 93, 93, + 94, 94, 95, 95, 96, 97, 97, 98, 98, 99, + 99, 54, 54, 50, 50, 101, 52, 52, 102, 51, + 51, 53, 53, 63, 63, 63, 63, 79, 79, 105, + 105, 107, 107, 107, 107, 106, 106, 106, 109, 109, + 109, 87, 87, 111, 111, 111, 110, 110, 112, 112, + 113, 113, 113, 108, 108, 80, 80, 80, 20, 20, + 114, 114, 115, 115, 115, 115, 59, 116, 116, 117, + 60, 119, 119, 120, 120, 121, 121, 84, 122, 122, + 122, 122, 122, 122, 127, 127, 128, 128, 129, 129, + 129, 129, 129, 130, 131, 131, 126, 126, 123, 123, + 125, 125, 133, 133, 132, 132, 132, 132, 132, 132, + 124, 134, 134, 136, 135, 135, 61, 100, 137, 137, + 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 144, 138, 138, 143, 143, + 146, 147, 147, 148, 149, 149, 149, 19, 19, 72, + 72, 72, 72, 139, 139, 139, 139, 151, 151, 140, + 140, 142, 142, 142, 145, 145, 156, 156, 156, 156, + 156, 156, 156, 156, 156, 157, 157, 104, 159, 159, + 159, 159, 141, 141, 141, 141, 141, 141, 141, 141, + 58, 58, 154, 154, 154, 154, 160, 160, 150, 150, + 150, 161, 161, 161, 161, 161, 161, 73, 73, 65, + 65, 65, 65, 118, 118, 118, 118, 164, 163, 153, + 153, 153, 153, 153, 153, 153, 152, 152, 152, 162, + 162, 162, 162, 103, 158, 166, 166, 165, 165, 167, + 167, 167, 167, 167, 167, 167, 167, 155, 155, 155, + 155, 169, 170, 168, 168, 168, 168, 168, 168, 168, + 168, 171, 171, 171, 171 ); protected $ruleToLength = array( @@ -905,55 +931,56 @@ class Php7 extends \PhpParser\ParserAbstract 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, 0, 1, 0, - 1, 1, 2, 1, 3, 4, 1, 2, 0, 1, - 1, 1, 1, 1, 3, 5, 4, 3, 4, 2, - 3, 1, 1, 7, 6, 2, 3, 1, 2, 3, - 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, - 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, 2, 1, 1, - 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, - 3, 0, 1, 0, 1, 3, 1, 8, 9, 8, - 7, 6, 8, 0, 2, 0, 2, 1, 2, 2, - 0, 2, 0, 2, 0, 2, 2, 1, 3, 1, - 4, 1, 4, 1, 1, 4, 2, 1, 3, 3, - 3, 4, 4, 5, 0, 2, 4, 3, 1, 1, - 7, 0, 2, 1, 3, 3, 4, 1, 4, 0, - 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, - 2, 1, 1, 2, 0, 1, 3, 0, 1, 1, - 1, 6, 8, 6, 1, 2, 1, 1, 1, 1, - 1, 1, 3, 3, 3, 3, 1, 2, 1, 0, - 1, 0, 2, 2, 2, 4, 1, 3, 1, 2, - 2, 3, 2, 3, 1, 1, 2, 3, 1, 1, - 3, 2, 0, 1, 5, 5, 10, 3, 5, 1, - 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, - 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, - 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, - 3, 3, 4, 1, 1, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, + 0, 1, 1, 1, 1, 1, 3, 5, 4, 3, + 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, + 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, + 1, 2, 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, 2, + 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, + 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, + 1, 8, 9, 8, 7, 6, 8, 0, 2, 0, + 2, 1, 2, 2, 0, 2, 0, 2, 0, 2, + 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, + 2, 1, 3, 3, 3, 4, 4, 5, 0, 2, + 4, 3, 1, 1, 7, 0, 2, 1, 3, 3, + 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, + 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, + 3, 0, 1, 1, 1, 6, 8, 6, 1, 2, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, + 1, 2, 1, 0, 1, 0, 2, 2, 2, 4, + 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, + 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, + 10, 3, 5, 1, 1, 3, 0, 2, 4, 5, + 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, + 2, 1, 3, 1, 1, 3, 2, 2, 3, 1, + 0, 1, 1, 3, 3, 3, 4, 1, 1, 2, 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, 2, 8, 9, 8, 9, 9, 10, 9, 10, - 8, 3, 2, 0, 4, 2, 1, 3, 2, 2, - 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 1, 1, 1, 0, 3, 0, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 3, 3, 4, 1, 1, 3, 1, 1, 1, - 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, - 1, 1, 1, 1, 3, 1, 1, 4, 4, 1, - 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, - 2, 2, 1, 3, 1, 4, 4, 3, 3, 3, - 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, - 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, - 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, - 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 + 3, 3, 3, 2, 2, 2, 2, 3, 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, 2, 8, 9, 8, + 9, 9, 10, 9, 10, 8, 3, 2, 0, 4, + 2, 1, 3, 2, 2, 2, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, + 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 3, 3, 4, 1, + 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, + 0, 1, 1, 3, 1, 1, 1, 1, 1, 3, + 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, + 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, + 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, + 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, + 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, + 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, + 3, 1, 1, 2, 1 ); protected function initReduceCallbacks() { @@ -1209,10 +1236,10 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos]; }, 83 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 84 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 85 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1221,10 +1248,10 @@ protected function initReduceCallbacks() { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 87 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 88 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 89 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1236,61 +1263,61 @@ protected function initReduceCallbacks() { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 92 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 93 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 94 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 95 => function ($stackPos) { - /* nothing */ + $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 96 => function ($stackPos) { - /* nothing */ + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 97 => function ($stackPos) { /* nothing */ }, 98 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + /* nothing */ }, 99 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + /* nothing */ }, 100 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 101 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 102 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 103 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 104 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 105 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 106 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 107 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 108 => function ($stackPos) { - $this->semValue = []; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 109 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 110 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = []; }, 111 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -1299,139 +1326,145 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 113 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 114 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 115 => function ($stackPos) { + $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 116 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); $this->checkNamespace($this->semValue); }, - 115 => function ($stackPos) { + 117 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 116 => function ($stackPos) { + 118 => function ($stackPos) { $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 117 => function ($stackPos) { + 119 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 118 => function ($stackPos) { + 120 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 119 => function ($stackPos) { + 121 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 120 => function ($stackPos) { + 122 => function ($stackPos) { $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 121 => function ($stackPos) { + 123 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_FUNCTION; }, - 122 => function ($stackPos) { + 124 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_CONSTANT; }, - 123 => function ($stackPos) { + 125 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 124 => function ($stackPos) { + 126 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 125 => function ($stackPos) { + 127 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 126 => function ($stackPos) { + 128 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 127 => function ($stackPos) { + 129 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 128 => function ($stackPos) { + 130 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 129 => function ($stackPos) { + 131 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 130 => function ($stackPos) { + 132 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 131 => function ($stackPos) { + 133 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 132 => function ($stackPos) { + 134 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 133 => function ($stackPos) { + 135 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 134 => function ($stackPos) { + 136 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, - 135 => function ($stackPos) { + 137 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, - 136 => function ($stackPos) { + 138 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, - 137 => function ($stackPos) { + 139 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, - 138 => function ($stackPos) { + 140 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; }, - 139 => function ($stackPos) { + 141 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; }, - 140 => function ($stackPos) { + 142 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 141 => function ($stackPos) { + 143 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 142 => function ($stackPos) { + 144 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 143 => function ($stackPos) { + 145 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 144 => function ($stackPos) { + 146 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 145 => function ($stackPos) { + 147 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 146 => function ($stackPos) { + 148 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 147 => function ($stackPos) { + 149 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 148 => function ($stackPos) { + 150 => function ($stackPos) { if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; }, - 149 => function ($stackPos) { + 151 => function ($stackPos) { $this->semValue = array(); }, - 150 => function ($stackPos) { + 152 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 151 => function ($stackPos) { + 153 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 152 => function ($stackPos) { + 154 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 153 => function ($stackPos) { + 155 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 154 => function ($stackPos) { + 156 => function ($stackPos) { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 155 => function ($stackPos) { + 157 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; @@ -1441,46 +1474,46 @@ protected function initReduceCallbacks() { } }, - 156 => function ($stackPos) { + 158 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 157 => function ($stackPos) { + 159 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 158 => function ($stackPos) { + 160 => function ($stackPos) { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 159 => function ($stackPos) { + 161 => function ($stackPos) { $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 160 => function ($stackPos) { + 162 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 161 => function ($stackPos) { + 163 => function ($stackPos) { $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 162 => function ($stackPos) { + 164 => function ($stackPos) { $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 163 => function ($stackPos) { + 165 => function ($stackPos) { $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 164 => function ($stackPos) { + 166 => function ($stackPos) { $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 165 => function ($stackPos) { + 167 => function ($stackPos) { $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 166 => function ($stackPos) { + 168 => function ($stackPos) { $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 167 => function ($stackPos) { + 169 => function ($stackPos) { $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 168 => function ($stackPos) { + 170 => function ($stackPos) { $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 169 => function ($stackPos) { + 171 => function ($stackPos) { $e = $this->semStack[$stackPos-(2-1)]; if ($e instanceof Expr\Throw_) { @@ -1492,75 +1525,69 @@ protected function initReduceCallbacks() { } }, - 170 => function ($stackPos) { + 172 => function ($stackPos) { $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 171 => function ($stackPos) { + 173 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 172 => function ($stackPos) { + 174 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 173 => function ($stackPos) { + 175 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 174 => function ($stackPos) { + 176 => function ($stackPos) { $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 175 => function ($stackPos) { + 177 => function ($stackPos) { $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); }, - 176 => function ($stackPos) { + 178 => function ($stackPos) { $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 177 => function ($stackPos) { + 179 => function ($stackPos) { $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 178 => function ($stackPos) { + 180 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, - 179 => function ($stackPos) { + 181 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 180 => function ($stackPos) { + 182 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, - 181 => function ($stackPos) { - $this->semValue = array(); - }, - 182 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, 183 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 184 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 185 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 186 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 187 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 188 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = null; }, 189 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 190 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 191 => function ($stackPos) { - $this->semValue = false; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 192 => function ($stackPos) { - $this->semValue = true; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 193 => function ($stackPos) { $this->semValue = false; @@ -1569,342 +1596,342 @@ protected function initReduceCallbacks() { $this->semValue = true; }, 195 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = false; }, 196 => function ($stackPos) { - $this->semValue = []; + $this->semValue = true; }, 197 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = false; }, 198 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = true; }, 199 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - $this->checkClass($this->semValue, $stackPos-(8-3)); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 200 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - $this->checkInterface($this->semValue, $stackPos-(7-3)); + $this->semValue = []; }, 201 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 202 => function ($stackPos) { - $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - $this->checkEnum($this->semValue, $stackPos-(8-3)); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 203 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->checkClass($this->semValue, $stackPos-(8-3)); }, 204 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->checkInterface($this->semValue, $stackPos-(7-3)); }, 205 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 206 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->checkEnum($this->semValue, $stackPos-(8-3)); }, 207 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = null; }, 208 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 209 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = null; }, 210 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 211 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = 0; }, 212 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 214 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 215 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 216 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 217 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 218 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array(); }, 219 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 220 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 221 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 222 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 223 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 224 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 225 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 226 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 227 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 228 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = null; }, 229 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 230 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 231 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 232 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 233 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 234 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 235 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 236 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 237 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(5-3)]; }, 238 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = array(); }, 239 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 240 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 241 => function ($stackPos) { - $this->semValue = []; + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 242 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 243 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos]; }, 244 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 245 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = []; }, 246 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 247 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 248 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 249 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 250 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 251 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 252 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 253 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 254 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 255 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 256 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array(); }, 257 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 258 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 259 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = null; }, 260 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 261 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = null; }, 262 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 263 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 264 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 265 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 266 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 267 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 268 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = array(); }, 269 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 270 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 271 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); + $this->semValue = 0; }, 272 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); - $this->checkParam($this->semValue); + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 273 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 274 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 275 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->checkParam($this->semValue); }, 276 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->checkParam($this->semValue); }, 277 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, 278 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 279 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 280 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 281 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 282 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 283 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 284 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 285 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 286 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 287 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 288 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 289 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 290 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 291 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 292 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 293 => function ($stackPos) { $this->semValue = null; }, 294 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 295 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = null; }, 296 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 297 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = null; }, 298 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 299 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 300 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 301 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 302 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 303 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 304 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 305 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 306 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; @@ -1916,92 +1943,92 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 309 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 310 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 311 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 312 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 313 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 314 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); - $this->checkProperty($this->semValue, $stackPos-(5-2)); + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 315 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); - $this->checkClassConst($this->semValue, $stackPos-(5-2)); + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, 316 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); + $this->semValue = array(); }, 317 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 318 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); + $this->checkProperty($this->semValue, $stackPos-(5-2)); }, 319 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); + $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, 320 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, 321 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 322 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 323 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = null; /* will be skipped */ }, 324 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 325 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 326 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 327 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 328 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 329 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 330 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 331 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 332 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 333 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 334 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 335 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 336 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = null; }, 337 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2010,529 +2037,529 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 339 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = 0; }, 340 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = 0; }, 341 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 342 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 343 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 344 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 345 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 346 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 347 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, 348 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 349 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 350 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 351 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 352 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 353 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 354 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 355 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 356 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 357 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 358 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 359 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 360 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array(); }, 361 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 362 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 363 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 364 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 365 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 366 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 367 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 368 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 369 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 370 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 371 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 372 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 373 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 374 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 375 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 379 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 380 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 381 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 382 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 383 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 384 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 385 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 386 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 387 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 388 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 389 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 390 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 391 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 392 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 393 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 394 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 395 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 396 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 397 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 398 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 404 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 405 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 406 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 410 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 411 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 419 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 420 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 421 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 422 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 423 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 424 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 425 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 426 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 427 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 428 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 429 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 430 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 431 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); + $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, 432 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 433 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 434 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 435 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 436 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 437 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, 438 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 439 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 440 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 441 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 442 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 443 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 444 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 445 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 446 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 447 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 448 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 449 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 450 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 451 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 452 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 453 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 454 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 455 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->checkClass($this->semValue[0], -1); }, 456 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 457 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 458 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array(); }, 459 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 460 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 461 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 462 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 463 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 464 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 465 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 466 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 467 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 468 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 469 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 470 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 471 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 472 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 473 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 474 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 475 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 476 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 477 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 478 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 479 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 480 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 481 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 482 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 483 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 484 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 485 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 486 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 487 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 488 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 489 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 490 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 491 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 492 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 493 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 494 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 495 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)]), $attrs); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 496 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, 497 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, 498 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, 499 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 500 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)]), $attrs); }, 501 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, 502 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 503 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 504 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 505 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 506 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 507 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 508 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 509 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 510 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 511 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2541,10 +2568,10 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 513 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 514 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 515 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2553,192 +2580,207 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 517 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 518 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 519 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 520 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 521 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 522 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 523 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 524 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 525 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 526 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 527 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = null; }, 528 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 529 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 530 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 531 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 532 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 533 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 534 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 535 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 536 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 537 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 538 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 539 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 540 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 543 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 544 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 545 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 546 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 548 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 549 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 551 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 552 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 553 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 554 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, 555 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 556 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 557 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 558 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 559 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 560 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 561 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 562 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 563 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 565 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 566 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = null; }, 567 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 568 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 569 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 570 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 571 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 572 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 573 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 574 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 575 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 576 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 577 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 578 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 579 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 580 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 581 => function ($stackPos) { + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 582 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 583 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 584 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/Parser/Tokens.php b/lib/PhpParser/Parser/Tokens.php index ed5ead224d..d6a99d6890 100644 --- a/lib/PhpParser/Parser/Tokens.php +++ b/lib/PhpParser/Parser/Tokens.php @@ -35,111 +35,113 @@ final class Tokens const T_COALESCE = 283; const T_BOOLEAN_OR = 284; const T_BOOLEAN_AND = 285; - const T_IS_EQUAL = 286; - const T_IS_NOT_EQUAL = 287; - const T_IS_IDENTICAL = 288; - const T_IS_NOT_IDENTICAL = 289; - const T_SPACESHIP = 290; - const T_IS_SMALLER_OR_EQUAL = 291; - const T_IS_GREATER_OR_EQUAL = 292; - const T_SL = 293; - const T_SR = 294; - const T_INSTANCEOF = 295; - const T_INC = 296; - const T_DEC = 297; - const T_INT_CAST = 298; - const T_DOUBLE_CAST = 299; - const T_STRING_CAST = 300; - const T_ARRAY_CAST = 301; - const T_OBJECT_CAST = 302; - const T_BOOL_CAST = 303; - const T_UNSET_CAST = 304; - const T_POW = 305; - const T_NEW = 306; - const T_CLONE = 307; - const T_EXIT = 308; - const T_IF = 309; - const T_ELSEIF = 310; - const T_ELSE = 311; - const T_ENDIF = 312; - const T_LNUMBER = 313; - const T_DNUMBER = 314; - const T_STRING = 315; - const T_STRING_VARNAME = 316; - const T_VARIABLE = 317; - const T_NUM_STRING = 318; - const T_INLINE_HTML = 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_MATCH = 334; - const T_ENDSWITCH = 335; - const T_CASE = 336; - const T_DEFAULT = 337; - const T_BREAK = 338; - const T_CONTINUE = 339; - const T_GOTO = 340; - const T_FUNCTION = 341; - const T_FN = 342; - const T_CONST = 343; - const T_RETURN = 344; - const T_TRY = 345; - const T_CATCH = 346; - const T_FINALLY = 347; - const T_USE = 348; - const T_INSTEADOF = 349; - const T_GLOBAL = 350; - const T_STATIC = 351; - const T_ABSTRACT = 352; - const T_FINAL = 353; - const T_PRIVATE = 354; - const T_PROTECTED = 355; - const T_PUBLIC = 356; - const T_VAR = 357; - const T_UNSET = 358; - const T_ISSET = 359; - const T_EMPTY = 360; - const T_HALT_COMPILER = 361; - const T_CLASS = 362; - const T_TRAIT = 363; - const T_INTERFACE = 364; - const T_ENUM = 365; - const T_EXTENDS = 366; - const T_IMPLEMENTS = 367; - const T_OBJECT_OPERATOR = 368; - const T_NULLSAFE_OBJECT_OPERATOR = 369; - const T_LIST = 370; - const T_ARRAY = 371; - const T_CALLABLE = 372; - const T_CLASS_C = 373; - const T_TRAIT_C = 374; - const T_METHOD_C = 375; - const T_FUNC_C = 376; - const T_LINE = 377; - const T_FILE = 378; - const T_START_HEREDOC = 379; - const T_END_HEREDOC = 380; - const T_DOLLAR_OPEN_CURLY_BRACES = 381; - const T_CURLY_OPEN = 382; - const T_PAAMAYIM_NEKUDOTAYIM = 383; - const T_NAMESPACE = 384; - const T_NS_C = 385; - const T_DIR = 386; - const T_NS_SEPARATOR = 387; - const T_ELLIPSIS = 388; - const T_NAME_FULLY_QUALIFIED = 389; - const T_NAME_QUALIFIED = 390; - const T_NAME_RELATIVE = 391; - const T_ATTRIBUTE = 392; + const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286; + const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287; + const T_IS_EQUAL = 288; + const T_IS_NOT_EQUAL = 289; + const T_IS_IDENTICAL = 290; + const T_IS_NOT_IDENTICAL = 291; + const T_SPACESHIP = 292; + const T_IS_SMALLER_OR_EQUAL = 293; + const T_IS_GREATER_OR_EQUAL = 294; + const T_SL = 295; + const T_SR = 296; + const T_INSTANCEOF = 297; + const T_INC = 298; + const T_DEC = 299; + const T_INT_CAST = 300; + const T_DOUBLE_CAST = 301; + const T_STRING_CAST = 302; + const T_ARRAY_CAST = 303; + const T_OBJECT_CAST = 304; + const T_BOOL_CAST = 305; + const T_UNSET_CAST = 306; + const T_POW = 307; + const T_NEW = 308; + const T_CLONE = 309; + const T_EXIT = 310; + const T_IF = 311; + const T_ELSEIF = 312; + const T_ELSE = 313; + const T_ENDIF = 314; + const T_LNUMBER = 315; + const T_DNUMBER = 316; + const T_STRING = 317; + const T_STRING_VARNAME = 318; + const T_VARIABLE = 319; + const T_NUM_STRING = 320; + const T_INLINE_HTML = 321; + const T_ENCAPSED_AND_WHITESPACE = 322; + const T_CONSTANT_ENCAPSED_STRING = 323; + const T_ECHO = 324; + const T_DO = 325; + const T_WHILE = 326; + const T_ENDWHILE = 327; + const T_FOR = 328; + const T_ENDFOR = 329; + const T_FOREACH = 330; + const T_ENDFOREACH = 331; + const T_DECLARE = 332; + const T_ENDDECLARE = 333; + const T_AS = 334; + const T_SWITCH = 335; + const T_MATCH = 336; + const T_ENDSWITCH = 337; + const T_CASE = 338; + const T_DEFAULT = 339; + const T_BREAK = 340; + const T_CONTINUE = 341; + const T_GOTO = 342; + const T_FUNCTION = 343; + const T_FN = 344; + const T_CONST = 345; + const T_RETURN = 346; + const T_TRY = 347; + const T_CATCH = 348; + const T_FINALLY = 349; + const T_USE = 350; + const T_INSTEADOF = 351; + const T_GLOBAL = 352; + const T_STATIC = 353; + const T_ABSTRACT = 354; + const T_FINAL = 355; + const T_PRIVATE = 356; + const T_PROTECTED = 357; + const T_PUBLIC = 358; + const T_VAR = 359; + const T_UNSET = 360; + const T_ISSET = 361; + const T_EMPTY = 362; + const T_HALT_COMPILER = 363; + const T_CLASS = 364; + const T_TRAIT = 365; + const T_INTERFACE = 366; + const T_ENUM = 367; + const T_EXTENDS = 368; + const T_IMPLEMENTS = 369; + const T_OBJECT_OPERATOR = 370; + const T_NULLSAFE_OBJECT_OPERATOR = 371; + const T_LIST = 372; + const T_ARRAY = 373; + const T_CALLABLE = 374; + const T_CLASS_C = 375; + const T_TRAIT_C = 376; + const T_METHOD_C = 377; + const T_FUNC_C = 378; + const T_LINE = 379; + const T_FILE = 380; + const T_START_HEREDOC = 381; + const T_END_HEREDOC = 382; + const T_DOLLAR_OPEN_CURLY_BRACES = 383; + const T_CURLY_OPEN = 384; + const T_PAAMAYIM_NEKUDOTAYIM = 385; + const T_NAMESPACE = 386; + const T_NS_C = 387; + const T_DIR = 388; + const T_NS_SEPARATOR = 389; + const T_ELLIPSIS = 390; + const T_NAME_FULLY_QUALIFIED = 391; + const T_NAME_QUALIFIED = 392; + const T_NAME_RELATIVE = 393; + const T_ATTRIBUTE = 394; } diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php index 24e93dd522..08640ff6ab 100644 --- a/test/PhpParser/CodeParsingTest.php +++ b/test/PhpParser/CodeParsingTest.php @@ -107,8 +107,11 @@ public function enterNode(Node $node) { $endFilePos < $startFilePos || $endTokenPos < $startTokenPos ) { - // Nops and error can have inverted order, if they are empty - if (!$node instanceof Stmt\Nop && !$node instanceof Expr\Error) { + // Nop and Error can have inverted order, if they are empty. + // This can also happen for a Param containing an Error. + if (!$node instanceof Stmt\Nop && !$node instanceof Expr\Error && + !$node instanceof Node\Param + ) { throw new \Exception('End < start on ' . $node->getType()); } } diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index 27f7cb4434..461bb71eb2 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -1008,7 +1008,7 @@ function(Foo); Syntax error, unexpected ')', expecting T_VARIABLE from 3:18 to 3:18 Syntax error, unexpected ')', expecting T_VARIABLE from 7:31 to 7:31 Syntax error, unexpected ')', expecting T_VARIABLE from 11:17 to 11:17 -Syntax error, unexpected ')', expecting T_VARIABLE from 15:15 to 15:15 +Syntax error, unexpected T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG, expecting T_VARIABLE from 15:14 to 15:14 Syntax error, unexpected ')', expecting T_VARIABLE from 19:17 to 19:17 Syntax error, unexpected ')', expecting T_VARIABLE from 22:21 to 22:21 Syntax error, unexpected ')', expecting T_VARIABLE from 25:13 to 25:13 @@ -1137,7 +1137,7 @@ array( ) flags: 0 type: null - byRef: true + byRef: false variadic: false var: Expr_Error( ) @@ -1521,4 +1521,4 @@ array( ) ) ) -) \ No newline at end of file +) From a8b5ed4306bda6494667e16f1764a546b6df6bfc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 21 Jul 2021 11:49:28 +0200 Subject: [PATCH 023/428] Fix JSON encoding test on PHP 8.1 Duplicate the test expectation for a different order. --- test/PhpParser/NodeAbstractTest.php | 127 ++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index 4c56e8f32b..e52479fac8 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -334,6 +334,133 @@ function functionName(&$a = 0, $b = 1.0) { } ] JSON; + $expected81 = <<<'JSON' +[ + { + "nodeType": "Stmt_Function", + "attributes": { + "startLine": 4, + "comments": [ + { + "nodeType": "Comment", + "text": "\/\/ comment", + "line": 2, + "filePos": 6, + "tokenPos": 1, + "endLine": 2, + "endFilePos": 15, + "endTokenPos": 1 + }, + { + "nodeType": "Comment_Doc", + "text": "\/** doc comment *\/", + "line": 3, + "filePos": 17, + "tokenPos": 3, + "endLine": 3, + "endFilePos": 34, + "endTokenPos": 3 + } + ], + "endLine": 6 + }, + "byRef": false, + "name": { + "nodeType": "Identifier", + "attributes": { + "startLine": 4, + "endLine": 4 + }, + "name": "functionName" + }, + "params": [ + { + "nodeType": "Param", + "attributes": { + "startLine": 4, + "endLine": 4 + }, + "type": null, + "byRef": true, + "variadic": false, + "var": { + "nodeType": "Expr_Variable", + "attributes": { + "startLine": 4, + "endLine": 4 + }, + "name": "a" + }, + "default": { + "nodeType": "Scalar_LNumber", + "attributes": { + "startLine": 4, + "endLine": 4, + "kind": 10 + }, + "value": 0 + }, + "flags": 0, + "attrGroups": [] + }, + { + "nodeType": "Param", + "attributes": { + "startLine": 4, + "endLine": 4 + }, + "type": null, + "byRef": false, + "variadic": false, + "var": { + "nodeType": "Expr_Variable", + "attributes": { + "startLine": 4, + "endLine": 4 + }, + "name": "b" + }, + "default": { + "nodeType": "Scalar_DNumber", + "attributes": { + "startLine": 4, + "endLine": 4 + }, + "value": 1 + }, + "flags": 0, + "attrGroups": [] + } + ], + "returnType": null, + "stmts": [ + { + "nodeType": "Stmt_Echo", + "attributes": { + "startLine": 5, + "endLine": 5 + }, + "exprs": [ + { + "nodeType": "Scalar_String", + "attributes": { + "startLine": 5, + "endLine": 5, + "kind": 1 + }, + "value": "Foo" + } + ] + } + ], + "attrGroups": [] + } +] +JSON; + + if (version_compare(PHP_VERSION, '8.1', '>=')) { + $expected = $expected81; + } $parser = new Parser\Php7(new Lexer()); $stmts = $parser->parse(canonicalize($code)); From acf16edc8e30af440026abdd7cd6ede6fd68423c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 21 Jul 2021 11:58:38 +0200 Subject: [PATCH 024/428] Add PHP 8.1 to GH actions --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 426d4c83d2..2e75f86db9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,7 @@ jobs: - "7.3" - "7.4" - "8.0" + - "8.1" steps: - name: "Checkout" uses: "actions/checkout@v2" From b099e8fc7684ecc3e783eb05703601312d70d43c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 21 Jul 2021 12:08:11 +0200 Subject: [PATCH 025/428] Pass --ignore-platform-req=php --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2e75f86db9..82bdda528b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,7 +50,7 @@ jobs: php-version: "${{ matrix.php-version }}" tools: composer:v2 - name: "Install dependencies" - run: "composer update --no-progress --prefer-dist" + run: "composer update --no-progress --prefer-dist --ignore-platform-req=php" - name: "PHPUnit" run: "php vendor/bin/phpunit" test_old_73_80: From c4304c76bd3d269bd88ae302bbf6bb3cfa624d89 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 21 Jul 2021 12:11:59 +0200 Subject: [PATCH 026/428] Try to pass --ignore-platform-req=php on 8.1 only --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 82bdda528b..7eedbce017 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,6 +40,9 @@ jobs: - "7.4" - "8.0" - "8.1" + include: + - php-version: "8.1" + flags: "--ignore-platform-req=php" steps: - name: "Checkout" uses: "actions/checkout@v2" @@ -50,7 +53,7 @@ jobs: php-version: "${{ matrix.php-version }}" tools: composer:v2 - name: "Install dependencies" - run: "composer update --no-progress --prefer-dist --ignore-platform-req=php" + run: "composer update --no-progress --prefer-dist ${{ matrix.flags }}" - name: "PHPUnit" run: "php vendor/bin/phpunit" test_old_73_80: From 55c42692320d7295081d9441f33f974f53215a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 21 Jul 2021 12:43:29 +0200 Subject: [PATCH 027/428] Add support for new PHP 8.1 modifiers (#796) Implement support for readonly properties (https://wiki.php.net/rfc/readonly_properties_v2) and final class contstants (https://wiki.php.net/rfc/final_class_const). --- grammar/php7.y | 4 +- grammar/tokens.y | 2 +- lib/PhpParser/Builder/ClassConst.php | 11 + lib/PhpParser/Builder/Property.php | 11 + lib/PhpParser/Lexer.php | 4 +- lib/PhpParser/Lexer/Emulative.php | 2 + .../TokenEmulator/ReadonlyTokenEmulator.php | 23 + lib/PhpParser/Node/Stmt/ClassConst.php | 9 + lib/PhpParser/Node/Stmt/Class_.php | 5 + lib/PhpParser/Node/Stmt/Property.php | 9 + lib/PhpParser/NodeDumper.php | 3 + lib/PhpParser/Parser/Php5.php | 67 +- lib/PhpParser/Parser/Php7.php | 2254 ++++++++--------- lib/PhpParser/Parser/Tokens.php | 73 +- lib/PhpParser/ParserAbstract.php | 10 +- lib/PhpParser/PrettyPrinterAbstract.php | 3 +- test/PhpParser/Builder/ClassConstTest.php | 15 + test/PhpParser/Builder/PropertyTest.php | 15 + test/PhpParser/Node/Stmt/ClassConstTest.php | 2 + test/PhpParser/Node/Stmt/PropertyTest.php | 7 + .../stmt/class/constModifierErrors.test | 8 +- .../parser/stmt/class/constModifiers.test | 16 + test/code/parser/stmt/class/modifier.test | 59 + .../code/parser/stmt/class/propertyTypes.test | 19 + .../parser/stmt/class/readonlyMethod.test | 35 + test/code/prettyPrinter/stmt/properties.test | 2 + 26 files changed, 1457 insertions(+), 1211 deletions(-) create mode 100644 lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php create mode 100644 test/code/parser/stmt/class/readonlyMethod.test diff --git a/grammar/php7.y b/grammar/php7.y index f1fa070df8..d9a450379a 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -38,7 +38,7 @@ reserved_non_modifiers: semi_reserved: reserved_non_modifiers - | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC + | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC | T_READONLY ; identifier_ex: @@ -535,6 +535,7 @@ optional_visibility_modifier: | T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } + | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } ; parameter: @@ -725,6 +726,7 @@ member_modifier: | T_STATIC { $$ = Stmt\Class_::MODIFIER_STATIC; } | T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; } + | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } ; property_declaration_list: diff --git a/grammar/tokens.y b/grammar/tokens.y index ab36c55973..8f0b217254 100644 --- a/grammar/tokens.y +++ b/grammar/tokens.y @@ -74,7 +74,7 @@ %token T_USE %token T_INSTEADOF %token T_GLOBAL -%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC +%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC T_READONLY %token T_VAR %token T_UNSET %token T_ISSET diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index be7160f131..f616c62701 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -77,6 +77,17 @@ public function makePrivate() { return $this; } + /** + * Makes the constant final. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeFinal() { + $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + + return $this; + } + /** * Sets doc comment for the constant. * diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 94ed96106e..90ee4b0ba8 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -77,6 +77,17 @@ public function makeStatic() { return $this; } + /** + * Makes the property readonly. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeReadonly() { + $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_READONLY); + + return $this; + } + /** * Sets default value for the property. * diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 20495e5073..e15dd0a5d2 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -443,6 +443,7 @@ private function defineCompatibilityTokens() { 'T_ENUM', 'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', + 'T_READONLY', ]; // PHP-Parser might be used together with another library that also emulates some or all @@ -536,6 +537,7 @@ protected function createTokenMap() : array { $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; $tokenMap[\T_ENUM] = Tokens::T_ENUM; + $tokenMap[\T_READONLY] = Tokens::T_READONLY; return $tokenMap; } @@ -544,7 +546,7 @@ private function createIdentifierTokenMap(): array { // Based on semi_reserved production. return array_fill_keys([ \T_STRING, - \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, + \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, \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, diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 6d517f40a3..a8f4e334a7 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -13,6 +13,7 @@ use PhpParser\Lexer\TokenEmulator\MatchTokenEmulator; use PhpParser\Lexer\TokenEmulator\NullsafeTokenEmulator; use PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator; +use PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReverseEmulator; use PhpParser\Lexer\TokenEmulator\TokenEmulator; @@ -53,6 +54,7 @@ public function __construct(array $options = []) new NullsafeTokenEmulator(), new AttributeEmulator(), new EnumTokenEmulator(), + new ReadonlyTokenEmulator(), ]; // Collect emulators that are relevant for the PHP version we're running diff --git a/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php new file mode 100644 index 0000000000..b97f8d1126 --- /dev/null +++ b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php @@ -0,0 +1,23 @@ +flags & Class_::MODIFIER_PRIVATE); } + /** + * Whether constant is final. + * + * @return bool + */ + public function isFinal() : bool { + return (bool) ($this->flags & Class_::MODIFIER_FINAL); + } + public function getType() : string { return 'Stmt_ClassConst'; } diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 0f35fe0863..b290aaf6df 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -13,6 +13,7 @@ class Class_ extends ClassLike const MODIFIER_STATIC = 8; const MODIFIER_ABSTRACT = 16; const MODIFIER_FINAL = 32; + const MODIFIER_READONLY = 64; const VISIBILITY_MODIFIER_MASK = 7; // 1 | 2 | 4 @@ -96,6 +97,10 @@ public static function verifyModifier($a, $b) { throw new Error('Multiple final modifiers are not allowed'); } + if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) { + throw new Error('Multiple readonly 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/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index 324345b85f..4f04805d26 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -77,6 +77,15 @@ public function isStatic() : bool { return (bool) ($this->flags & Class_::MODIFIER_STATIC); } + /** + * Whether the property is readonly. + * + * @return bool + */ + public function isReadonly() : bool { + return (bool) ($this->flags & Class_::MODIFIER_READONLY); + } + public function getType() : string { return 'Stmt_Property'; } diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index 197ebc144c..ba622efd12 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -128,6 +128,9 @@ protected function dumpFlags($flags) { if ($flags & Class_::MODIFIER_FINAL) { $strs[] = 'MODIFIER_FINAL'; } + if ($flags & Class_::MODIFIER_READONLY) { + $strs[] = 'MODIFIER_READONLY'; + } if ($strs) { return implode(' | ', $strs) . ' (' . $flags . ')'; diff --git a/lib/PhpParser/Parser/Php5.php b/lib/PhpParser/Parser/Php5.php index c260e598bd..c62adfd2ce 100644 --- a/lib/PhpParser/Parser/Php5.php +++ b/lib/PhpParser/Parser/Php5.php @@ -17,11 +17,11 @@ */ class Php5 extends \PhpParser\ParserAbstract { - protected $tokenToSymbolMapSize = 395; + protected $tokenToSymbolMapSize = 396; protected $actionTableSize = 1093; protected $gotoTableSize = 643; - protected $invalidSymbol = 167; + protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; @@ -194,38 +194,39 @@ class Php5 extends \PhpParser\ParserAbstract "'`'", "']'", "'\"'", + "T_READONLY", "T_ENUM", "T_NULLSAFE_OBJECT_OPERATOR", "T_ATTRIBUTE" ); protected $tokenToSymbol = array( - 0, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 56, 163, 167, 160, 55, 167, 167, - 158, 159, 53, 50, 8, 51, 52, 54, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 31, 155, - 44, 16, 46, 30, 68, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 70, 167, 162, 36, 167, 161, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 156, 35, 157, 58, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 1, 2, 3, 4, + 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 56, 163, 168, 160, 55, 168, 168, + 158, 159, 53, 50, 8, 51, 52, 54, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 31, 155, + 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 70, 168, 162, 36, 168, 161, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 156, 35, 157, 58, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, @@ -235,11 +236,11 @@ class Php5 extends \PhpParser\ParserAbstract 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, 164, 130, 131, - 132, 165, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 166 + 113, 114, 115, 116, 117, 118, 119, 120, 121, 164, + 122, 123, 124, 125, 126, 127, 128, 129, 165, 130, + 131, 132, 166, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 167 ); protected $action = array( diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index f2189d6580..75fc06db7f 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -17,11 +17,11 @@ */ class Php7 extends \PhpParser\ParserAbstract { - protected $tokenToSymbolMapSize = 395; - protected $actionTableSize = 1179; - protected $gotoTableSize = 685; + protected $tokenToSymbolMapSize = 396; + protected $actionTableSize = 1187; + protected $gotoTableSize = 579; - protected $invalidSymbol = 167; + protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; @@ -152,6 +152,7 @@ class Php7 extends \PhpParser\ParserAbstract "T_PRIVATE", "T_PROTECTED", "T_PUBLIC", + "T_READONLY", "T_VAR", "T_UNSET", "T_ISSET", @@ -200,32 +201,32 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $tokenToSymbol = array( - 0, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 56, 165, 167, 166, 55, 167, 167, - 162, 163, 53, 50, 8, 51, 52, 54, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 31, 158, - 44, 16, 46, 30, 68, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 70, 167, 159, 36, 167, 164, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 160, 35, 161, 58, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 1, 2, 3, 4, + 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 56, 166, 168, 167, 55, 168, 168, + 163, 164, 53, 50, 8, 51, 52, 54, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 31, 159, + 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 70, 168, 160, 36, 168, 165, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 161, 35, 162, 58, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, @@ -239,510 +240,501 @@ class Php7 extends \PhpParser\ParserAbstract 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157 + 153, 154, 155, 156, 157, 158 ); protected $action = array( 131, 132, 133, 563, 134, 135, 0, 714, 715, 716, - 136, 36,-32766,-32766,-32766, 462,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 100, 101, 102, 103, 104, -303, 979, - -32766,-32766,-32766,-32766, 2, 708, 707,-32766, 999,-32766, + 136, 36, 977, 976, 975, 978,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 100, 101, 102, 103, 104, 1051, 1052, + 1053, 1050, 1049, 1048, 1054, 708, 707,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767,-32766, 12,-32766,-32766, 717, 902, 800,-32766,-32766, - -32766, 1049, 1050, 1051, 1048, 1047, 1046, 276, 33, 265, - 137, 391, 721, 722, 723, 724, -192, 1025, 415,-32766, - 127,-32766,-32766,-32766,-32766, 725, 726, 727, 728, 729, + -32767, 539, 540, 903, 2, 717,-32766,-32766,-32766, 988, + 989, -88, 914, 440, 441, 442, 365, 366, 462, 265, + 137, 391, 721, 722, 723, 724, 409,-32766, 415,-32766, + -32766,-32766,-32766,-32766, -305, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 755, 564, 756, 757, - 758, 759, 747, 748, 330, 331, 750, 751, 736, 737, + 758, 759, 747, 748, 331, 332, 750, 751, 736, 737, 738, 740, 741, 742, 341, 782, 783, 784, 785, 786, - 743, 744, 565, 566, 776, 767, 765, 766, 779, 762, - 763, 789, -191, 567, 568, 761, 569, 570, 571, 572, - 573, 574, 415, -563, 463, 1171, 143, 764, 575, 576, - -563, 138, -341, 984, -341, 131, 132, 133, 563, 134, - 135, 1000, 714, 715, 716, 136, 36, 1049, 1050, 1051, - 1048, 1047, 1046, 986, 987, 539, 540, -110,-32766,-32766, - -32766, 1169, -110, -303, -110, 913, 440, 441, 442, 294, - 708, 707, -110, -110, -110, -110, -110, -110, -110,-32766, - 1238,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 708, 707, - 717,-32766,-32766,-32766, 799, 689, 1173, 1172, 1174, 1173, - 1172, 1174, 251, 1027, 265, 137, 391, 721, 722, 723, - 724, -192,-32766, 415,-32766,-32766,-32766, -317, 794, 298, - 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, - 735, 755, 564, 756, 757, 758, 759, 747, 748, 330, - 331, 750, 751, 736, 737, 738, 740, 741, 742, 341, - 782, 783, 784, 785, 786, 743, 744, 565, 566, 776, - 767, 765, 766, 779, 762, 763, 300, -191, 567, 568, - 761, 569, 570, 571, 572, 573, 574, -514, 81, 82, - 83, -563, 764, 575, 576, -563, 138, 739, 709, 710, - 711, 712, 713, 795, 714, 715, 716, 752, 753, 35, - 238, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107,-32766, 267,-32766,-32766,-32766, - 105, 106, 107, 312, 267,-32766,-32766,-32766, 108, 80, - -514, -514, 717, 327, 944, 314, 108, 279,-32766, 328, - -32766,-32766,-32766,-32766,-32766, -514, 718, 719, 720, 721, - 722, 723, 724, 355, 1178, 787, -513, -514, 315, -520, - 1178, 585, 725, 726, 727, 728, 729, 730, 731, 732, - 733, 734, 735, 755, 778, 756, 757, 758, 759, 747, - 748, 749, 777, 750, 751, 736, 737, 738, 740, 741, - 742, 781, 782, 783, 784, 785, 786, 743, 744, 745, - 746, 776, 767, 765, 766, 779, 762, 763, 148, 535, - 754, 760, 761, 768, 769, 771, 770, 772, 773, -513, - -513, 448, 449,-32766, 764, 775, 774, 48, 49, 50, - 494, 51, 52, 591, -513, 798, -85, 53, 54, -263, - 55, 798, 791, 986, 987, 359, -513, 1254, -519,-32766, - -32766,-32766,-32766, 825, 125, 826, 1198, 237, 984, -554, - 882, 945, 1283, -554, 1258, 1284, 102, 103, 104, 1210, - 882, 1257, 986, 987, 798, 56, 57, 1273, 986, 987, - -110, 58, 374, 59, 244, 245, 60, 61, 62, 63, - 64, 65, 66, 67, 425, 26, 266, 68, 429, 495, - 680, 797, -85, 1204, 1205, 496, 376, 798, 11, 426, - 287, 1202, 40, 23, 497, 73, 498, 793, 499, 314, - 500, 73, 677, 501, 502, 314, 789, 427, 42, 43, - 430, 362, 361, 882, 44, 503, 485, 798, 34, 247, - 353, 326, 1178, 872, 365, 366, 428, -515, 504, 505, - 506,-32766,-32766, 872, 409, 804, 882, 1041, 631, 24, - 507, 508, 122, 1192, 1193, 1194, 1195, 1189, 1190, 286, - -560, -87, -16, 367, 366, 1196, 1191, -560, 149, 1173, - 1172, 1174, 287, 409, 882, 151, 681, 69, -512, 310, - 311, 314, 30, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 140, -152, -152, -152, - -515, -515, 314, 882, 682, 139, 872, 884, -517, 675, - 152, 314, -152, 798, -152, -515, -152, 884, -152, 675, - 976, 975, 974, 708, 707, 1085, 1087, -515, 360, 872, - 825, 153, 826, 684, 882, 1026, -512, 700, 155, -110, - -110, -512, -512, 647, 648, 147, 394, 123, 858, -110, - -110, -110, -110, 363, 364, 31, -512, 872, -110, 128, - -32766, 368, 369, 129, 691, 142, 1171, 156, -512, 708, - 707, -517, -517,-32766,-32766,-32766, 157,-32766, 158,-32766, - 884,-32766, 675, -152,-32766, 159, 872, -79, 287,-32766, - -32766,-32766, -75, 73, -73,-32766,-32766, 314, -517, -512, - -512,-32766, 406, 884, -72, 675,-32766, 708, 707,-32766, - -51, -71, 1171, -70, -512, 623, 624, 872, -560,-32766, - -32766,-32766, -560,-32766, -69,-32766, -512,-32766, -68, -67, - -32766, 930, -66, 675, -47,-32766,-32766,-32766, -18, 72, - 26,-32766,-32766, 146, 268, 275, 690,-32766, 406, 693, - 881, 145, 798,-32766, 46,-32766, 1202, 277, 278, 1171, - 884, 280, 675, 281, 320, 898,-32766,-32766,-32766, 108, - -32766, 655,-32766, 267,-32766, 144, 789,-32766, 1285, 543, - 668, 130,-32766,-32766,-32766, 650, 798,-32766,-32766,-32766, - 1055, 884, 638, 675,-32766, 406, 537, 295, 621, 632, - 293, 424,-32766, 13, 47, 507, 508, 445, 1192, 1193, - 1194, 1195, 1189, 1190, 473,-32766, 914, 288, 289, -478, - 1196, 1191, 1209, 1211,-32766, 651, 637, 549, -4, 882, - 1171, 1199, 71, 589, -468, 311, 314,-32766,-32766,-32766, - 900,-32766, 314,-32766, 124,-32766, 0, 0,-32766, 0, - 0, 915, 292,-32766,-32766,-32766, 0,-32766, 0,-32766, - -32766, 0, 299, 1171, 0,-32766, 406, 290, 291, 0, - -32766,-32766,-32766,-32766,-32766, 0,-32766, 0,-32766, 0, - 7,-32766, 358, 15, 357, 468,-32766,-32766,-32766, 0, - -32766, 797,-32766,-32766, 126, 287, 1171, 555,-32766, 406, - 882, 38, 39,-32766,-32766,-32766,-32766,-32766, 809,-32766, - 697,-32766, 872, 698,-32766, 863, 954, 931, 938,-32766, - -32766,-32766, 928, 939, 861,-32766,-32766, 926, 1030, 1033, - 1034,-32766, 406, 1031, 360, 1032, 420, 882, 1038,-32766, - 1224, 285, 32, 1242, 1276, -110, -110, 626, 694, 309, - 356, 676, 679, 683, 817, -110, -110, -110, -110, 685, - 686,-32766, 687, 688, 692, 678, 1203, 1171, 859, 1280, - 1282, 820, 819, 828,-32766,-32766,-32766, 9,-32766, 907, - -32766, 946,-32766, 872, 827,-32766, 884, 1281, 675, -4, - -32766,-32766,-32766, 906, 908, 905,-32766,-32766, 1157, -241, - -241, -241,-32766, 406, 891, 360, 901, 26, 889, 936, - -32766, 937, 1279, 1236, 1225, 1243, -110, -110, 1249, 798, - 872, 1252, -266, 1202, -548, 858, -110, -110, -110, -110, - -546, -520, -519, -518, 1, 27, -240, -240, -240, 28, - 37, 41, 360, 45, 70, 74, 75, 76, 77, 0, - 78, 79, 141, -110, -110, 150, 154, 884, 243, 675, - -241, -264, 858, -110, -110, -110, -110, 316, 342, 343, - 344, 345, 346, 508, 347, 1192, 1193, 1194, 1195, 1189, - 1190, 348, 349, 350, 351, 352, 354, 1196, 1191, 421, - -482, -263, 17, 18, 884, 19, 675, -240, 20, 71, - 0, 22, 311, 314, 393, 464, 465, 472, 475, 476, - 477, 478, 482, 483, 484, 492, 662, 1182, 1125, 1200, - 1001, 1161, -268, -102, 16, 21, 25, 284, 392, 582, - 586, 613, 667, 1129, 1177, 1126, 1255, 0, 1142 + 787, 743, 744, 565, 566, 776, 767, 765, 766, 779, + 762, 763, 981, 415, 567, 568, 761, 569, 570, 571, + 572, 573, 574, -193, -566, 535, 485, 790, 764, 575, + 576, -566, 138,-32766,-32766,-32766, 131, 132, 133, 563, + 134, 135, 1002, 714, 715, 716, 136, 36, 1043,-32766, + -32766,-32766, 799, -86,-32766, 1276,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 1051, 1052, 1053, 1050, 1049, 1048, 1054, + -32766, 708, 707,-32766,-32766,-32766, 1241, 238, 463,-32766, + -32766,-32766,-32766,-32766,-32766, 883, 1213, 125, 1176, 1175, + 1177, 717, 801, 689,-32766, 1029,-32766,-32766,-32766,-32766, + -32766, -192,-32766,-32766,-32766, 265, 137, 391, 721, 722, + 723, 724, 883, 945, 415, 680, 12, 34, 247, -86, + -305, 725, 726, 727, 728, 729, 730, 731, 732, 733, + 734, 735, 755, 564, 756, 757, 758, 759, 747, 748, + 331, 332, 750, 751, 736, 737, 738, 740, 741, 742, + 341, 782, 783, 784, 785, 786, 787, 743, 744, 565, + 566, 776, 767, 765, 766, 779, 762, 763, 873, 585, + 567, 568, 761, 569, 570, 571, 572, 573, 574, -193, + 81, 82, 83, -566, 764, 575, 576, -566, 138, 739, + 709, 710, 711, 712, 713, 873, 714, 715, 716, 752, + 753, 35, 33, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, + 101, 102, 103, 104, 105, 106, 107, -264, 267,-32766, + -32766,-32766,-32766, 105, 106, 107, 80, 267, 127, 1001, + 108, 946, 314, 885, 717, 675, 367, 366, 143, 108, + 800,-32766, 1027,-32766,-32766, 148, 409, -192, 718, 719, + 720, 721, 722, 723, 724, 237, 1181, 788, 276, -517, + 885, 315, 675, 149, 725, 726, 727, 728, 729, 730, + 731, 732, 733, 734, 735, 755, 778, 756, 757, 758, + 759, 747, 748, 749, 777, 750, 751, 736, 737, 738, + 740, 741, 742, 781, 782, 783, 784, 785, 786, 787, + 743, 744, 745, 746, 776, 767, 765, 766, 779, 762, + 763,-32766,-32766, 754, 760, 761, 768, 769, 771, 770, + 772, 773, 251, -517, -517, 448, 449, 764, 775, 774, + 48, 49, 50, 494, 51, 52, 795, 799, -517, 591, + 53, 54, -111, 55, 986, 708, 707, -111, 792, -111, + -517, 298, -523, 986, 294, 631, 24, -111, -111, -111, + -111, -111, -111, -111, -111, 988, 989, 300, 1286, 1261, + -343, 1287, -343, 1174, 988, 989, 1260, 312, 56, 57, + -32766,-32766,-32766, -111, 58, 1201, 59, 244, 245, 60, + 61, 62, 63, 64, 65, 66, 67, -516, 26, 266, + 68, 429, 495, -319, 647, 648, 1207, 1208, 496, 1172, + 799, 1181, 796, 287, 1205, 40, 23, 497, 73, 498, + 328, 499, 314, 500, 794, 329, 501, 502, 826, 677, + 827, 42, 43, 430, 362, 361, 883, 44, 503, 147, + 394, -16, -557, 353, 327, 355, -557, 1181, 1176, 1175, + 1177, -518, 504, 505, 506, 359, -515, 1257, 47, 363, + 364, -516, -516, 374, 507, 508, 799, 1195, 1196, 1197, + 1198, 1192, 1193, 286, -563, 425, -516, 798, 151, 1199, + 1194, -563, 426, 1176, 1175, 1177, 287, 883, -516, 427, + -522, 69, 799, 310, 311, 314, 30, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + -153, -153, -153, 368, 369, -518, -518, 681, 428, 873, + -515, -515, 290, 291, 883, -153, 805, -153, 799, -153, + -518, -153, 708, 707, 152, -515, 790, 358, -111, 1088, + 1090, 360, -518, 153, 883, 139, 376, -515, 11, 126, + -515, 314, -111, -111, 682, 155, 279, -520, 102, 103, + 104, 31, 859, -111, -111, -111, -111, 46, 287,-32766, + 873, 623, 624, 73, 684, 1174, 826, 314, 827, 1028, + -79, 700,-32766,-32766,-32766, 122,-32766, 123,-32766, 128, + -32766, 708, 707,-32766, 885, 883, 675, -153,-32766,-32766, + -32766, 708, 707, 129,-32766,-32766, 142, 873, 156, 73, + -32766, 406, 157, 314, -515, -515, 158, 140, 159,-32766, + -75, -520, -520, 314, 26, 691, -73, 873, -72, -515, + -71, 288, 289, -563, -70, -69, 799, -563,-32766, -68, + 1205, -515,-32766, -67, 1174, 885, -66, 675, -520, 72, + -47,-32766,-32766,-32766, -18,-32766, 146,-32766, 124,-32766, + 268, 275,-32766, 988, 989, 690, -51,-32766,-32766,-32766, + 693, 882, 145,-32766,-32766, 899, 108, 277, 873,-32766, + 406, 278, 931, 280, 675, 281, 321, 144,-32766, 267, + 507, 508, 799, 1195, 1196, 1197, 1198, 1192, 1193, 655, + 130, 790, 885, 1288, 675, 1199, 1194, 543, 1058,-32766, + 650, 13,-32766, 537, 632, 1174, 424, 71, 621, 915, + 311, 314,-32766,-32766,-32766, 668,-32766, 637,-32766,-32766, + -32766, 293, 1212,-32766, 916, 445, 638, 549,-32766,-32766, + -32766, 473, -481,-32766,-32766,-32766, -4, 883, -551, 1174, + -32766, 406, 651, 885, 589, 675,-32766,-32766,-32766,-32766, + -32766, 295,-32766, 901,-32766, 0, 798,-32766, 0, 0, + 0, 0,-32766,-32766,-32766,-32766, 0, 292,-32766,-32766, + 0, 1174, 0, 0,-32766, 406, 299, 0,-32766,-32766, + -32766, 0,-32766,-32766,-32766, 1214,-32766, 0, 0,-32766, + 0, 287, -471, 468,-32766,-32766,-32766,-32766, 7, 15, + -32766,-32766, 357, 1174, 555, 38,-32766, 406, 1202, 883, + -32766,-32766,-32766, 39,-32766,-32766,-32766, 697,-32766, 698, + 873,-32766, 864, 955, 932, 939,-32766,-32766,-32766, 929, + 940, 862,-32766,-32766, 927, 1032, 1035, 1036,-32766, 406, + 1033, 1034, 360, 1040, 420, 883, 810,-32766, 1227, 285, + 1245, 694, 1279, -111, -111, 626, 860, 32, 309, 356, + 676, 679, 683, 818, -111, -111, -111, -111, 685, 686, + -32766, 687, 688, 692, 678, 1206, 1174, 1283, 1285, 821, + 820, 829, 908,-32766,-32766,-32766, 9,-32766, 947,-32766, + 828,-32766, 873, 1284,-32766, 885, 907, 675, -4,-32766, + -32766,-32766, 909, 906, 1160,-32766,-32766, 892, -242, -242, + -242,-32766, 406, 902, 360, 26, 890, 937, 938, 1282, + -32766, 1239, 1228, 1246, 1252, -111, -111, 799, 873, 1255, + -267, 1205, -549, -523, -522, 859, -111, -111, -111, -111, + -521, 1, 27, 28, -241, -241, -241, 37, 41, 45, + 360, 70, 74, 75, 76, 77, 78, 79, 141, 0, + 150, -111, -111, 154, 243, 316, 342, 885, 343, 675, + -242, 859, -111, -111, -111, -111, 344, 345, 346, 347, + 348, 349, 508, 350, 1195, 1196, 1197, 1198, 1192, 1193, + 351, 352, 354, 421, 0, -265, 1199, 1194, -264, 17, + 18, 19, 20, 885, 22, 675, -241, 393, 71, 314, + 464, 311, 314, 465, 472, 475, 476, 477, 478, 482, + 483, 484, 492, 662, 1185, 1128, 1203, 1003, 1164, -269, + -103, 16, 21, 25, 284, 392, 582, 586, 613, 667, + 1132, 1180, 1129, 1258, 0, -485, 1145 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 9, 10, 11, 31, 9, 10, 11, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 8, 1, - 9, 10, 11, 30, 8, 37, 38, 30, 1, 32, + 12, 13, 119, 120, 121, 122, 9, 10, 11, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, + 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 30, 8, 32, 33, 57, 1, 1, 9, 10, - 11, 116, 117, 118, 119, 120, 121, 30, 8, 71, - 72, 73, 74, 75, 76, 77, 8, 1, 80, 30, - 8, 32, 33, 34, 35, 87, 88, 89, 90, 91, + 43, 117, 118, 1, 8, 57, 9, 10, 11, 137, + 138, 31, 128, 129, 130, 131, 106, 107, 31, 71, + 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, + 33, 34, 35, 36, 8, 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, 80, 8, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 80, 1, 160, 80, 8, 149, 150, 151, - 8, 153, 106, 116, 108, 2, 3, 4, 5, 6, - 7, 163, 9, 10, 11, 12, 13, 116, 117, 118, - 119, 120, 121, 136, 137, 117, 118, 101, 9, 10, - 11, 116, 106, 163, 108, 127, 128, 129, 130, 113, - 37, 38, 116, 117, 118, 119, 120, 121, 122, 30, - 1, 32, 33, 34, 35, 36, 37, 38, 37, 38, - 57, 9, 10, 11, 158, 160, 154, 155, 156, 154, - 155, 156, 8, 161, 71, 72, 73, 74, 75, 76, - 77, 163, 30, 80, 32, 33, 34, 161, 80, 8, - 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, 8, 163, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 70, 9, 10, - 11, 159, 149, 150, 151, 163, 153, 2, 3, 4, - 5, 6, 7, 155, 9, 10, 11, 12, 13, 30, - 14, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 9, 57, 9, 10, 11, - 53, 54, 55, 8, 57, 9, 10, 11, 69, 160, - 133, 134, 57, 8, 31, 166, 69, 30, 30, 8, - 32, 33, 34, 35, 36, 148, 71, 72, 73, 74, - 75, 76, 77, 8, 1, 80, 70, 160, 70, 162, - 1, 1, 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, 14, 85, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 133, - 134, 133, 134, 116, 149, 150, 151, 2, 3, 4, - 5, 6, 7, 51, 148, 82, 31, 12, 13, 163, - 15, 82, 80, 136, 137, 8, 160, 1, 162, 9, - 10, 11, 116, 106, 14, 108, 1, 97, 116, 159, - 1, 158, 80, 163, 1, 83, 50, 51, 52, 145, - 1, 8, 136, 137, 82, 50, 51, 85, 136, 137, - 127, 56, 8, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 8, 70, 71, 72, 73, 74, - 31, 154, 97, 78, 79, 80, 106, 82, 108, 8, - 157, 86, 87, 88, 89, 162, 91, 155, 93, 166, - 95, 162, 160, 98, 99, 166, 80, 8, 103, 104, - 105, 106, 107, 1, 109, 110, 101, 82, 146, 147, - 115, 116, 1, 84, 106, 107, 8, 70, 123, 124, - 125, 9, 10, 84, 116, 8, 1, 122, 75, 76, - 135, 136, 16, 138, 139, 140, 141, 142, 143, 144, - 1, 31, 31, 106, 107, 150, 151, 8, 14, 154, - 155, 156, 157, 116, 1, 14, 31, 162, 70, 164, - 165, 166, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 160, 75, 76, 77, - 133, 134, 166, 1, 31, 160, 84, 158, 70, 160, - 14, 166, 90, 82, 92, 148, 94, 158, 96, 160, - 119, 120, 121, 37, 38, 59, 60, 160, 106, 84, - 106, 14, 108, 31, 1, 158, 70, 160, 14, 117, - 118, 133, 134, 75, 76, 101, 102, 16, 126, 127, - 128, 129, 130, 106, 107, 14, 148, 84, 127, 16, - 74, 106, 107, 16, 31, 16, 80, 16, 160, 37, - 38, 133, 134, 87, 88, 89, 16, 91, 16, 93, - 158, 95, 160, 161, 98, 16, 84, 31, 157, 103, - 104, 105, 31, 162, 31, 109, 110, 166, 160, 133, - 134, 115, 116, 158, 31, 160, 74, 37, 38, 123, - 31, 31, 80, 31, 148, 111, 112, 84, 159, 87, - 88, 89, 163, 91, 31, 93, 160, 95, 31, 31, - 98, 158, 31, 160, 31, 103, 104, 105, 31, 153, - 70, 109, 110, 31, 31, 31, 31, 115, 116, 31, - 31, 31, 82, 74, 70, 123, 86, 35, 35, 80, - 158, 35, 160, 35, 35, 38, 87, 88, 89, 69, - 91, 77, 93, 57, 95, 70, 80, 98, 83, 89, - 92, 31, 103, 104, 105, 94, 82, 85, 109, 110, - 82, 158, 100, 160, 115, 116, 85, 114, 113, 90, - 132, 127, 123, 97, 70, 135, 136, 97, 138, 139, - 140, 141, 142, 143, 97, 116, 127, 133, 134, 148, - 150, 151, 145, 145, 74, 100, 96, 152, 0, 1, - 80, 159, 162, 152, 148, 165, 166, 87, 88, 89, - 153, 91, 166, 93, 160, 95, -1, -1, 98, -1, - -1, 127, 131, 103, 104, 105, -1, 74, -1, 109, - 110, -1, 131, 80, -1, 115, 116, 133, 134, -1, - 87, 88, 89, 123, 91, -1, 93, -1, 95, -1, - 148, 98, 148, 148, 148, 102, 103, 104, 105, -1, - 74, 154, 109, 110, 160, 157, 80, 81, 115, 116, - 1, 158, 158, 87, 88, 89, 123, 91, 159, 93, - 158, 95, 84, 158, 98, 158, 158, 158, 158, 103, - 104, 105, 158, 158, 158, 109, 110, 158, 158, 158, - 158, 115, 116, 158, 106, 158, 108, 1, 158, 123, - 159, 113, 160, 159, 159, 117, 118, 159, 161, 160, - 160, 160, 160, 160, 126, 127, 128, 129, 130, 160, - 160, 74, 160, 160, 160, 160, 165, 80, 161, 161, - 161, 161, 161, 161, 87, 88, 89, 149, 91, 161, - 93, 161, 95, 84, 161, 98, 158, 161, 160, 161, - 103, 104, 105, 161, 161, 161, 109, 110, 161, 100, - 101, 102, 115, 116, 161, 106, 161, 70, 161, 161, - 123, 161, 161, 161, 161, 161, 117, 118, 161, 82, - 84, 161, 163, 86, 162, 126, 127, 128, 129, 130, - 162, 162, 162, 162, 162, 162, 100, 101, 102, 162, - 162, 162, 106, 162, 162, 162, 162, 162, 162, -1, - 162, 162, 162, 117, 118, 162, 162, 158, 162, 160, - 161, 163, 126, 127, 128, 129, 130, 162, 162, 162, - 162, 162, 162, 136, 162, 138, 139, 140, 141, 142, - 143, 162, 162, 162, 162, 162, 162, 150, 151, 162, - 164, 163, 163, 163, 158, 163, 160, 161, 163, 162, - -1, 163, 165, 166, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, -1, 164 + 132, 133, 1, 80, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 8, 1, 85, 101, 80, 150, 151, + 152, 8, 154, 9, 10, 11, 2, 3, 4, 5, + 6, 7, 164, 9, 10, 11, 12, 13, 123, 9, + 10, 11, 82, 31, 30, 85, 32, 33, 34, 35, + 36, 37, 38, 116, 117, 118, 119, 120, 121, 122, + 30, 37, 38, 9, 10, 11, 1, 14, 161, 9, + 10, 11, 9, 10, 11, 1, 146, 14, 155, 156, + 157, 57, 1, 161, 30, 162, 32, 33, 34, 35, + 30, 8, 32, 33, 34, 71, 72, 73, 74, 75, + 76, 77, 1, 31, 80, 31, 8, 147, 148, 97, + 164, 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, 84, 1, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 164, + 9, 10, 11, 160, 150, 151, 152, 164, 154, 2, + 3, 4, 5, 6, 7, 84, 9, 10, 11, 12, + 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 164, 57, 9, + 9, 10, 11, 53, 54, 55, 161, 57, 8, 1, + 69, 159, 167, 159, 57, 161, 106, 107, 8, 69, + 159, 30, 1, 32, 33, 14, 116, 164, 71, 72, + 73, 74, 75, 76, 77, 97, 1, 80, 30, 70, + 159, 70, 161, 14, 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, 9, 10, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 8, 134, 135, 134, 135, 150, 151, 152, + 2, 3, 4, 5, 6, 7, 80, 82, 149, 51, + 12, 13, 101, 15, 116, 37, 38, 106, 80, 108, + 161, 8, 163, 116, 113, 75, 76, 116, 117, 118, + 119, 120, 121, 122, 123, 137, 138, 8, 80, 1, + 106, 83, 108, 80, 137, 138, 8, 8, 50, 51, + 9, 10, 11, 128, 56, 1, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 70, 70, 71, + 72, 73, 74, 162, 75, 76, 78, 79, 80, 116, + 82, 1, 156, 158, 86, 87, 88, 89, 163, 91, + 8, 93, 167, 95, 156, 8, 98, 99, 106, 161, + 108, 103, 104, 105, 106, 107, 1, 109, 110, 101, + 102, 31, 160, 115, 116, 8, 164, 1, 155, 156, + 157, 70, 124, 125, 126, 8, 70, 1, 70, 106, + 107, 134, 135, 8, 136, 137, 82, 139, 140, 141, + 142, 143, 144, 145, 1, 8, 149, 155, 14, 151, + 152, 8, 8, 155, 156, 157, 158, 1, 161, 8, + 163, 163, 82, 165, 166, 167, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 75, 76, 77, 106, 107, 134, 135, 31, 8, 84, + 134, 135, 134, 135, 1, 90, 8, 92, 82, 94, + 149, 96, 37, 38, 14, 149, 80, 149, 128, 59, + 60, 106, 161, 14, 1, 161, 106, 161, 108, 161, + 70, 167, 117, 118, 31, 14, 30, 70, 50, 51, + 52, 14, 127, 128, 129, 130, 131, 70, 158, 74, + 84, 111, 112, 163, 31, 80, 106, 167, 108, 159, + 31, 161, 87, 88, 89, 16, 91, 16, 93, 16, + 95, 37, 38, 98, 159, 1, 161, 162, 103, 104, + 105, 37, 38, 16, 109, 110, 16, 84, 16, 163, + 115, 116, 16, 167, 134, 135, 16, 161, 16, 124, + 31, 134, 135, 167, 70, 31, 31, 84, 31, 149, + 31, 134, 135, 160, 31, 31, 82, 164, 74, 31, + 86, 161, 116, 31, 80, 159, 31, 161, 161, 154, + 31, 87, 88, 89, 31, 91, 31, 93, 161, 95, + 31, 31, 98, 137, 138, 31, 31, 103, 104, 105, + 31, 31, 31, 109, 110, 38, 69, 35, 84, 115, + 116, 35, 159, 35, 161, 35, 35, 70, 124, 57, + 136, 137, 82, 139, 140, 141, 142, 143, 144, 77, + 31, 80, 159, 83, 161, 151, 152, 89, 82, 74, + 94, 97, 85, 85, 90, 80, 128, 163, 113, 128, + 166, 167, 87, 88, 89, 92, 91, 96, 93, 116, + 95, 133, 146, 98, 128, 97, 100, 153, 103, 104, + 105, 97, 149, 74, 109, 110, 0, 1, 163, 80, + 115, 116, 100, 159, 153, 161, 87, 88, 89, 124, + 91, 114, 93, 154, 95, -1, 155, 98, -1, -1, + -1, -1, 103, 104, 105, 74, -1, 132, 109, 110, + -1, 80, -1, -1, 115, 116, 132, -1, 87, 88, + 89, -1, 91, 124, 93, 146, 95, -1, -1, 98, + -1, 158, 149, 102, 103, 104, 105, 74, 149, 149, + 109, 110, 149, 80, 81, 159, 115, 116, 160, 1, + 87, 88, 89, 159, 91, 124, 93, 159, 95, 159, + 84, 98, 159, 159, 159, 159, 103, 104, 105, 159, + 159, 159, 109, 110, 159, 159, 159, 159, 115, 116, + 159, 159, 106, 159, 108, 1, 160, 124, 160, 113, + 160, 162, 160, 117, 118, 160, 162, 161, 161, 161, + 161, 161, 161, 127, 128, 129, 130, 131, 161, 161, + 74, 161, 161, 161, 161, 166, 80, 162, 162, 162, + 162, 162, 162, 87, 88, 89, 150, 91, 162, 93, + 162, 95, 84, 162, 98, 159, 162, 161, 162, 103, + 104, 105, 162, 162, 162, 109, 110, 162, 100, 101, + 102, 115, 116, 162, 106, 70, 162, 162, 162, 162, + 124, 162, 162, 162, 162, 117, 118, 82, 84, 162, + 164, 86, 163, 163, 163, 127, 128, 129, 130, 131, + 163, 163, 163, 163, 100, 101, 102, 163, 163, 163, + 106, 163, 163, 163, 163, 163, 163, 163, 163, -1, + 163, 117, 118, 163, 163, 163, 163, 159, 163, 161, + 162, 127, 128, 129, 130, 131, 163, 163, 163, 163, + 163, 163, 137, 163, 139, 140, 141, 142, 143, 144, + 163, 163, 163, 163, -1, 164, 151, 152, 164, 164, + 164, 164, 164, 159, 164, 161, 162, 164, 163, 167, + 164, 166, 167, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, -1, 165, 165 ); protected $actionBase = array( - 0, -2, 153, 562, 868, 939, 976, 485, 62, 392, - 817, 305, 305, 51, 305, 305, 585, 642, 642, 673, - 642, 499, 613, 489, 489, 489, 626, 626, 626, 626, - 672, 672, 823, 823, 856, 790, 719, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 927, 927, 927, 927, 927, 927, 927, 927, 927, 927, - 56, 333, 390, 681, 1004, 1010, 1006, 1011, 1002, 1001, - 1005, 1007, 1012, 891, 892, 760, 893, 894, 897, 900, - 1008, 828, 1003, 1009, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 336, 470, 572, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 346, 3, 3, 3, 21, 710, 710, 202, - 49, 606, 338, 977, 977, 977, 977, 977, 977, 977, - 977, 977, 977, 169, 169, 7, 7, 7, 7, 7, - 76, -25, -25, -25, -25, 571, 383, 389, 37, 465, - 46, 446, 446, 337, 337, 372, 372, 372, 372, 366, - 366, 366, 58, 227, 316, 377, 354, 65, 476, 476, - 476, 476, 65, 65, 65, 65, 718, 841, 65, 65, - 65, 507, 548, 548, 774, 297, 297, 297, 548, 564, - 751, 422, 564, 422, 199, 412, 739, 468, 497, 330, - 739, 578, 724, 599, 142, 777, 587, 777, 1000, 742, - 743, 701, 820, 845, 1013, 541, 732, 888, 765, 890, - 318, 696, 999, 999, 999, 999, 999, 999, 999, 999, - 999, 999, 999, 716, 171, 1000, 158, 716, 716, 716, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 644, 158, 513, 608, 158, 769, 171, 56, 726, 56, - 56, 56, 56, 946, 56, 56, 56, 56, 56, 56, - 952, 747, -16, 56, 333, 55, 55, 517, 28, 55, - 55, 55, 55, 56, 56, 56, 587, 756, 715, 595, - 721, 124, 756, 756, 756, 435, 20, 306, 68, 430, - 736, 736, 748, 912, 912, 736, 744, 736, 748, 921, - 736, 912, 778, 72, 516, 355, 467, 531, 912, 231, - 736, 736, 736, 736, 549, 736, 214, 138, 736, 736, - 761, 754, 771, 26, 912, 912, 912, 771, 375, 708, - 708, 708, 792, 795, 725, 753, 345, 278, 577, 60, - 767, 753, 753, 736, 504, 725, 753, 725, 753, 727, - 753, 753, 753, 725, 753, 736, 744, 361, 753, 691, - 568, 44, 753, 6, 922, 923, 570, 924, 918, 925, - 967, 926, 928, 831, 936, 919, 929, 917, 913, 759, - 576, 671, 772, 711, 911, 740, 740, 740, 909, 740, - 740, 740, 740, 740, 740, 740, 740, 576, 712, 776, - 714, 730, 947, 683, 687, 717, 847, 966, 1014, 729, - 764, 946, 994, 930, 783, 689, 978, 948, 827, 829, - 949, 950, 981, 995, 996, 848, 745, 849, 850, 789, - 959, 832, 740, 922, 928, 919, 929, 917, 913, 741, - 738, 733, 737, 722, 720, 703, 713, 752, 908, 902, - 821, 952, 910, 576, 824, 969, 822, 982, 983, 830, - 750, 735, 825, 851, 960, 961, 962, 833, 997, 784, - 970, 899, 984, 757, 852, 985, 986, 987, 988, 858, - 839, 840, 842, 797, 749, 938, 770, 860, 424, 766, - 768, 964, 594, 945, 843, 863, 866, 989, 990, 991, - 872, 933, 798, 972, 731, 975, 968, 799, 800, 601, - 762, 763, 636, 657, 873, 874, 877, 934, 755, 734, - 804, 805, 998, 883, 664, 806, 700, 885, 993, 702, - 709, 728, 844, 775, 723, 746, 963, 758, 809, 887, - 810, 811, 812, 992, 815, 0, 0, 0, 0, 0, + 0, -2, 154, 565, 876, 948, 984, 514, 53, 398, + 822, 307, 307, 67, 307, 307, 616, 673, 673, 724, + 673, 204, 653, 231, 231, 231, 625, 625, 625, 625, + 694, 694, 831, 831, 863, 799, 765, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, + 211, 202, 288, 677, 1010, 1016, 1012, 1017, 1008, 1007, + 1011, 1013, 1018, 897, 899, 771, 900, 901, 902, 907, + 1014, 835, 1009, 1015, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 340, 193, 432, 501, 501, 501, 501, 501, 501, 501, + 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, + 501, 501, 501, 160, 160, 160, 341, 684, 684, 190, + 184, 610, 47, 985, 985, 985, 985, 985, 985, 985, + 985, 985, 985, 144, 144, 7, 7, 7, 7, 7, + 371, -25, -25, -25, -25, 540, 385, 576, 358, 45, + 394, 638, 638, 656, 656, 367, 367, 367, 367, -78, + -78, -78, -66, 319, 457, 452, 60, 423, 586, 586, + 586, 586, 423, 423, 423, 423, 779, 849, 423, 423, + 423, 511, 516, 516, 518, 300, 300, 300, 516, 600, + 758, 90, 600, 90, 195, 418, 743, -40, 260, 412, + -107, 743, 617, 627, 603, 143, 741, 483, 741, 1006, + 757, 749, 719, 824, 853, 1019, 766, 895, 782, 896, + 321, 679, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, + 1005, 1005, 1005, 982, 438, 1006, 386, 982, 982, 982, + 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, + 590, 386, 410, 459, 386, 781, 438, 211, 783, 211, + 211, 211, 211, 943, 211, 211, 211, 211, 211, 211, + 956, 753, 37, 211, 202, 52, 52, 550, 131, 52, + 52, 52, 52, 211, 211, 211, 483, 762, 714, 537, + 731, 213, 762, 762, 762, 142, 76, 183, 135, 570, + 751, 751, 756, 918, 918, 751, 740, 751, 756, 926, + 751, 918, 773, 350, 597, 542, 577, 604, 918, 473, + 751, 751, 751, 751, 611, 751, 444, 360, 751, 751, + 775, 760, 784, 46, 918, 918, 918, 784, 567, 728, + 728, 728, 798, 800, 735, 759, 499, 489, 648, 314, + 767, 759, 759, 751, 585, 735, 759, 735, 759, 739, + 759, 759, 759, 735, 759, 751, 740, 547, 759, 722, + 640, 228, 759, 6, 928, 929, 30, 930, 924, 931, + 970, 932, 933, 839, 941, 925, 934, 920, 919, 770, + 699, 701, 789, 723, 917, 737, 737, 737, 910, 737, + 737, 737, 737, 737, 737, 737, 737, 699, 788, 793, + 718, 748, 945, 703, 717, 716, 834, 1020, 1021, 721, + 736, 943, 1000, 935, 786, 720, 980, 953, 829, 837, + 954, 955, 983, 1001, 1002, 855, 747, 856, 857, 826, + 957, 840, 737, 928, 933, 925, 934, 920, 919, 745, + 742, 734, 738, 733, 729, 725, 727, 755, 909, 715, + 828, 956, 911, 699, 830, 975, 836, 986, 989, 838, + 768, 750, 832, 858, 958, 960, 967, 841, 1003, 794, + 976, 906, 990, 774, 859, 991, 992, 993, 994, 860, + 847, 848, 850, 803, 754, 971, 761, 866, 361, 778, + 780, 969, 379, 942, 851, 868, 871, 995, 996, 997, + 874, 937, 804, 977, 746, 978, 974, 805, 806, 594, + 772, 776, 650, 659, 880, 881, 882, 940, 764, 752, + 810, 811, 1004, 885, 671, 812, 726, 891, 999, 730, + 732, 763, 852, 790, 777, 744, 968, 769, 815, 894, + 816, 817, 818, 998, 821, 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, 455, 455, 455, 455, 455, 455, 305, - 305, 305, 305, 0, 0, 305, 0, 0, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 0, 0, 0, 0, + 0, 0, 0, 458, 458, 458, 458, 458, 458, 307, + 307, 307, 307, 0, 0, 307, 0, 0, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 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, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 65, - 65, 289, 289, 0, 289, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 65, 289, 289, 289, 289, 289, - 289, 289, 778, 297, 297, 297, 297, 65, 65, 65, - 65, -55, -55, 297, 297, 65, 65, 65, 65, 65, - 65, 65, 65, 65, 0, 0, 0, 158, 422, 0, - 744, 744, 744, 744, 0, 0, 0, 0, 422, 422, + 0, 0, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 423, + 423, 291, 291, 0, 291, 423, 423, 423, 423, 423, + 423, 423, 423, 423, 423, 291, 291, 291, 291, 291, + 291, 291, 773, 300, 300, 300, 300, 423, 423, 423, + 423, -88, -88, 300, 300, 423, 423, 423, 423, 423, + 423, 423, 423, 423, 0, 0, 0, 386, 90, 0, + 740, 740, 740, 740, 0, 0, 0, 0, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 158, 422, 0, 158, 0, 744, 744, 65, 778, - 778, 493, 65, 0, 0, 0, 0, 158, 744, 158, - 171, 422, 171, 171, 55, 56, 493, 0, 584, 584, - 584, 584, 0, 587, 778, 778, 778, 778, 778, 778, - 778, 778, 778, 778, 778, 744, 0, 778, 0, 744, - 744, 744, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 744, 0, 0, - 912, 0, 0, 0, 0, 736, 0, 0, 0, 0, - 0, 0, 736, 921, 0, 0, 0, 0, 0, 0, - 744, 0, 0, 0, 0, 0, 0, 0, 0, 740, - 750, 0, 750, 0, 740, 740, 740 + 0, 386, 90, 0, 386, 0, 740, 740, 423, 773, + 773, 498, 0, 423, 0, 0, 0, 0, 386, 740, + 386, 438, 90, 438, 438, 52, 211, 498, 468, 468, + 468, 468, 0, 483, 773, 773, 773, 773, 773, 773, + 773, 773, 773, 773, 773, 740, 0, 773, 0, 740, + 740, 740, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 740, 0, 0, + 918, 0, 0, 0, 0, 751, 0, 0, 0, 0, + 0, 0, 751, 926, 0, 0, 0, 0, 0, 0, + 740, 0, 0, 0, 0, 0, 0, 0, 0, 737, + 768, 0, 768, 0, 737, 737, 737 ); protected $actionDefault = array( - 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 100,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 566, 566, 566, 566, - 32767,32767, 245, 102,32767,32767, 442, 360, 360, 360, - 32767,32767, 510, 510, 510, 510, 510, 510,32767,32767, - 32767,32767,32767,32767, 442,32767,32767,32767,32767,32767, + 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 569, 569, 569, 569, + 32767,32767, 246, 103,32767,32767, 445, 363, 363, 363, + 32767,32767, 513, 513, 513, 513, 513, 513,32767,32767, + 32767,32767,32767,32767, 445,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, 100,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 101,32767,32767, 32767, 37, 7, 8, 10, 11, 50, 17,32767,32767, - 32767,32767,32767, 102,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 103,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 559,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 562,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 446, 425, 426, 428, 429, 359, - 511, 565, 302, 562, 358, 145, 314, 304, 233, 305, - 249, 447, 250, 448, 451, 452, 210, 276, 355, 149, - 389, 443, 391, 441, 445, 390, 365, 370, 371, 372, - 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, - 363, 364, 444, 422, 421, 420, 387,32767,32767, 388, - 392, 362, 395,32767,32767,32767,32767,32767,32767,32767, - 32767, 102,32767, 393, 394, 411, 412, 409, 410, 413, - 32767, 414, 415, 416, 417,32767,32767,32767,32767, 340, - 338, 402, 403, 293, 293,32767,32767,32767,32767,32767, - 32767,32767,32767, 504, 419,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, - 100, 506, 384, 386, 474, 397, 398, 396, 366,32767, - 481,32767, 102, 483,32767,32767,32767, 111,32767,32767, - 32767, 505,32767, 512, 512,32767, 467, 100, 193,32767, - 193, 193,32767,32767,32767, 271,32767,32767,32767,32767, - 573, 467, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110,32767, 193, 110,32767,32767,32767, 100, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 188,32767, 259, 261, 102, 527, 193,32767, 486,32767, + 32767,32767,32767,32767, 449, 428, 429, 431, 432, 362, + 514, 568, 304, 565, 361, 146, 316, 306, 234, 307, + 250, 450, 251, 451, 454, 455, 211, 278, 358, 150, + 392, 446, 394, 444, 448, 393, 368, 373, 374, 375, + 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, + 366, 367, 447, 425, 424, 423, 390,32767,32767, 391, + 395, 365, 398,32767,32767,32767,32767,32767,32767,32767, + 32767, 103,32767, 396, 397, 414, 415, 412, 413, 416, + 32767, 417, 418, 419, 420,32767,32767,32767,32767, 342, + 340, 405, 406, 295, 295,32767,32767,32767,32767,32767, + 32767,32767,32767, 507, 422,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 103,32767, + 101, 509, 387, 389, 477, 400, 401, 399, 369,32767, + 484,32767, 103, 486,32767,32767,32767, 112,32767,32767, + 272,32767, 508,32767, 515, 515,32767, 470, 101, 194, + 32767, 194, 194,32767,32767,32767,32767,32767,32767,32767, + 576, 470, 111, 111, 111, 111, 111, 111, 111, 111, + 111, 111, 111,32767, 194, 111,32767,32767,32767, 101, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 189,32767, 260, 262, 103, 530, 194,32767, 489,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 479,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 467, 407, 138,32767, - 138, 512, 399, 400, 401, 469, 512, 512, 512,32767, - 32767,32767,32767, 484, 484, 100, 100, 100, 100, 479, - 32767,32767, 111, 99, 99, 99, 99, 99, 103, 101, - 32767,32767,32767,32767, 99,32767, 101, 101,32767,32767, - 216, 207, 214, 101,32767, 531, 532, 214, 101, 218, - 218, 218, 238, 238, 458, 295, 101, 99, 101, 101, - 195, 295, 295,32767, 101, 458, 295, 458, 295, 197, - 295, 295, 295, 458, 295,32767,32767, 101, 295, 209, - 99, 99, 295,32767,32767,32767, 469,32767,32767,32767, + 32767, 482,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 470, 410, 139,32767, + 139, 515, 402, 403, 404, 472, 515, 515, 515,32767, + 32767,32767,32767, 487, 487, 101, 101, 101, 101, 482, + 32767,32767, 112, 100, 100, 100, 100, 100, 104, 102, + 32767,32767,32767,32767, 100,32767, 102, 102,32767,32767, + 217, 208, 215, 102,32767, 534, 535, 215, 102, 219, + 219, 219, 239, 239, 461, 297, 102, 100, 102, 102, + 196, 297, 297,32767, 102, 461, 297, 461, 297, 198, + 297, 297, 297, 461, 297,32767,32767, 102, 297, 210, + 100, 100, 297,32767,32767,32767, 472,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 499,32767, 516, 529, 405, 406, 408, 514, 430, - 431, 432, 433, 434, 435, 436, 438, 561,32767, 473, - 32767,32767,32767,32767, 313, 571,32767, 571,32767,32767, + 32767, 502,32767, 519, 532, 408, 409, 411, 517, 433, + 434, 435, 436, 437, 438, 439, 441, 564,32767, 476, + 32767,32767,32767,32767, 315, 574,32767, 574,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 572,32767, 512,32767,32767, - 32767,32767, 404, 9, 76, 43, 44, 52, 58, 490, - 491, 492, 493, 487, 488, 494, 489,32767, 495, 537, - 32767,32767, 513, 564,32767,32767,32767,32767,32767,32767, - 138,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 499,32767, 136,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 512,32767,32767,32767, 290, - 292,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 512,32767,32767,32767, - 278, 280,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 275,32767,32767, 354, - 32767,32767,32767,32767, 334,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 151, 151, 3, 3, 316, - 151, 151, 151, 316, 151, 316, 316, 316, 151, 151, - 151, 151, 151, 151, 183, 253, 256, 238, 238, 151, - 326, 151 + 32767,32767,32767,32767,32767, 575,32767, 515,32767,32767, + 32767,32767, 407, 9, 76, 43, 44, 52, 58, 493, + 494, 495, 496, 490, 491, 497, 492,32767, 498, 540, + 32767,32767, 516, 567,32767,32767,32767,32767,32767,32767, + 139,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 502,32767, 137,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 515,32767,32767,32767, 292, + 294,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 515,32767,32767,32767, + 280, 282,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 277,32767,32767, 357, + 32767,32767,32767,32767, 336,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 152, 152, 3, 3, 318, + 152, 152, 152, 318, 152, 318, 318, 318, 152, 152, + 152, 152, 152, 152, 184, 254, 257, 239, 239, 152, + 328, 152 ); protected $goto = array( - 192, 192, 663, 417, 636, 910, 981, 988, 989, 411, - 302, 303, 323, 557, 308, 416, 324, 418, 615, 1003, + 192, 192, 663, 417, 636, 911, 983, 990, 991, 411, + 302, 303, 324, 557, 308, 416, 325, 418, 615, 1005, 671, 317, 317, 317, 317, 163, 163, 163, 163, 216, 193, 189, 189, 173, 175, 211, 189, 189, 189, 189, 189, 190, 190, 190, 190, 190, 190, 184, 185, 186, 187, 188, 213, 211, 214, 515, 516, 407, 517, 519, - 520, 521, 522, 523, 524, 525, 526, 1071, 164, 165, + 520, 521, 522, 523, 524, 525, 526, 1074, 164, 165, 166, 191, 167, 168, 169, 162, 170, 171, 172, 174, 210, 212, 215, 233, 236, 239, 240, 242, 253, 254, 255, 256, 257, 258, 259, 261, 262, 263, 264, 271, 272, 305, 306, 307, 412, 413, 414, 562, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 176, 232, 177, 194, 195, 196, 234, - 184, 185, 186, 187, 188, 213, 1071, 197, 178, 179, + 184, 185, 186, 187, 188, 213, 1074, 197, 178, 179, 180, 198, 194, 181, 235, 199, 161, 200, 201, 182, - 202, 203, 204, 183, 205, 206, 207, 208, 209, 818, - 579, 601, 601, 541, 532, 1270, 1270, 1201, 1201, 1201, - 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1219, 1219, 456, - 1244, 1245, 1270, 1219, 1219, 1219, 1219, 1219, 1219, 1219, - 1219, 1219, 1219, 383, 532, 541, 550, 551, 390, 560, - 581, 595, 596, 823, 815, 871, 866, 867, 880, 14, - 824, 868, 821, 869, 870, 822, 816, 811, 811, 874, - 792, 282, 282, 282, 282, 849, 1217, 1217, 790, 1024, - 1020, 1021, 1217, 1217, 1217, 1217, 1217, 1217, 1217, 1217, - 1217, 1217, 929, 518, 518, 921, 397, 670, 831, 518, - 518, 518, 518, 518, 518, 518, 518, 518, 518, 1170, - 1170, 1170, 985, 843, 599, 633, 830, 985, 985, 985, - 985, 985, 985, 985, 985, 985, 554, 796, 432, 249, - 249, 1170, 334, 432, 432, 337, 1170, 1170, 1170, 1170, - 1259, 340, 1170, 1170, 1170, 1251, 1251, 1251, 1251, 1044, - 1045, 340, 340, 950, 246, 246, 246, 246, 248, 250, - 887, 529, 529, 529, 888, 340, 340, 796, 340, 796, - 1286, 588, 602, 605, 606, 607, 608, 627, 628, 629, - 673, 534, 811, 438, 340, 814, 313, 297, 923, 923, - 923, 923, 1246, 1247, 438, 917, 924, 953, 927, 927, - 925, 927, 695, 379, 531, 962, 957, 875, 553, 876, + 202, 203, 204, 183, 205, 206, 207, 208, 209, 819, + 579, 601, 601, 541, 532, 815, 816, 1204, 1204, 1204, + 1204, 1204, 1204, 1204, 1204, 1204, 1204, 954, 928, 928, + 926, 928, 695, 817, 531, 963, 958, 381, 385, 542, + 580, 584, 383, 532, 541, 550, 551, 390, 560, 581, + 595, 596, 824, 793, 872, 867, 868, 881, 14, 825, + 869, 822, 870, 871, 823, 480, 850, 481, 875, 527, + 527, 527, 527, 488, 583, 1222, 1222, 791, 1026, 1022, + 1023, 1222, 1222, 1222, 1222, 1222, 1222, 1222, 1222, 1222, + 1222, 1220, 1220, 812, 812, 599, 633, 1220, 1220, 1220, + 1220, 1220, 1220, 1220, 1220, 1220, 1220, 313, 297, 1173, + 1173, 1173, 987, 282, 282, 282, 282, 987, 987, 987, + 987, 987, 987, 987, 987, 987, 447, 447, 432, 249, + 249, 1173, 554, 432, 432, 447, 1173, 1173, 1173, 1173, + 1046, 1047, 1173, 1173, 1173, 1254, 1254, 1254, 1254, 337, + 797, 1272, 1272, 930, 246, 246, 246, 246, 248, 250, + 888, 335, 876, 340, 877, 889, 1249, 1250, 1272, 518, + 518, 832, 1262, 340, 340, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 1275, 844, 340, 340, 831, + 340, 797, 1289, 797, 630, 1169, 644, 645, 646, 529, + 529, 529, 611, 612, 534, 1273, 1273, 340, 812, 951, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, - 432, 548, 410, 432, 590, 696, 614, 616, 635, 634, - 1230, 611, 612, 653, 657, 964, 661, 669, 960, 1120, - 547, 395, 396, 1269, 1269, 422, 642, 594, 643, 325, - 399, 400, 401, 656, 654, 5, 808, 6, 402, 480, - 1269, 481, 332, 844, 832, 1008, 1012, 488, 1241, 1241, - 1241, 447, 447, 932, 558, 593, 1272, 533, 545, 836, - 447, 534, 533, 833, 545, 389, 630, 382, 644, 645, - 646, 1253, 1253, 1253, 1253, 1163, 922, 561, 450, 451, - 452, 972, 841, 1009, 1166, 1277, 1278, 1151, 903, 892, - 1059, 1152, 1155, 904, 1156, 699, 598, 1237, 457, 1052, - 848, 969, 527, 527, 527, 527, 845, 583, 269, 835, - 839, 639, 948, 530, 530, 1013, 1054, 829, 934, 461, - 0, 1165, 489, 0, 578, 1037, 0, 674, 660, 660, - 1162, 666, 1035, 0, 0, 0, 1011, 1167, 0, 0, - 1239, 1239, 1011, 0, 806, 252, 252, 619, 619, 338, - 339, 0, 0, 993, 990, 991, 0, 0, 0, 0, - 1168, 1227, 1228, 381, 385, 542, 580, 584, 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, + 432, 438, 1273, 432, 558, 593, 924, 924, 924, 924, + 379, 635, 438, 918, 925, 553, 1123, 1154, 904, 422, + 547, 1155, 1158, 905, 1159, 548, 326, 594, 1170, 696, + 614, 616, 1233, 634, 410, 807, 590, 653, 657, 965, + 661, 669, 961, 456, 1247, 1248, 809, 837, 1244, 1244, + 1244, 1171, 1230, 1231, 5, 656, 6, 533, 545, 389, + 968, 968, 533, 1166, 545, 834, 973, 382, 922, 397, + 670, 1256, 1256, 1256, 1256, 1011, 699, 561, 450, 451, + 452, 846, 842, 534, 457, 1280, 1281, 619, 619, 1015, + 1057, 395, 396, 995, 992, 993, 642, 1240, 643, 935, + 399, 400, 401, 461, 654, 0, 0, 0, 402, 0, + 840, 0, 333, 578, 1039, 0, 674, 660, 660, 0, + 666, 1037, 489, 588, 602, 605, 606, 607, 608, 627, + 628, 629, 673, 0, 0, 0, 1013, 893, 1062, 0, + 1242, 1242, 1013, 1168, 598, 252, 252, 0, 0, 970, + 269, 845, 833, 1010, 1014, 530, 530, 836, 0, 639, + 949, 933, 0, 338, 339, 830, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1165, 0, + 0, 0, 0, 0, 923, 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, 967, 967 + 0, 0, 0, 0, 0, 0, 0, 1055, 849 ); protected $gotoCheck = array( @@ -762,100 +754,89 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 15, - 118, 104, 104, 75, 75, 169, 169, 104, 104, 104, - 104, 104, 104, 104, 104, 104, 104, 156, 156, 162, - 162, 162, 169, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 15, 26, 15, 15, 15, 15, 75, - 15, 15, 15, 15, 15, 15, 27, 22, 22, 15, - 7, 24, 24, 24, 24, 45, 157, 157, 6, 15, - 15, 15, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 49, 159, 159, 89, 89, 89, 35, 159, - 159, 159, 159, 159, 159, 159, 159, 159, 159, 72, - 72, 72, 72, 35, 55, 55, 35, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 158, 12, 23, 5, - 5, 72, 165, 23, 23, 93, 72, 72, 72, 72, - 167, 14, 72, 72, 72, 9, 9, 9, 9, 132, - 132, 14, 14, 99, 5, 5, 5, 5, 5, 5, - 72, 19, 19, 19, 72, 14, 14, 12, 14, 12, - 14, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 14, 22, 19, 14, 25, 155, 155, 19, 19, - 19, 19, 164, 164, 19, 19, 19, 25, 25, 25, - 25, 25, 25, 61, 25, 25, 25, 64, 100, 64, + 118, 104, 104, 75, 75, 25, 26, 104, 104, 104, + 104, 104, 104, 104, 104, 104, 104, 25, 25, 25, + 25, 25, 25, 27, 25, 25, 25, 58, 58, 58, + 58, 58, 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 15, 7, 15, 15, 15, 15, 75, 15, + 15, 15, 15, 15, 15, 143, 45, 143, 15, 103, + 103, 103, 103, 143, 103, 156, 156, 6, 15, 15, + 15, 156, 156, 156, 156, 156, 156, 156, 156, 156, + 156, 157, 157, 22, 22, 55, 55, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 155, 155, 72, + 72, 72, 72, 24, 24, 24, 24, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 137, 137, 23, 5, + 5, 72, 158, 23, 23, 137, 72, 72, 72, 72, + 132, 132, 72, 72, 72, 9, 9, 9, 9, 93, + 12, 168, 168, 49, 5, 5, 5, 5, 5, 5, + 72, 165, 64, 14, 64, 72, 164, 164, 168, 159, + 159, 35, 167, 14, 14, 159, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 168, 35, 14, 14, 35, + 14, 12, 14, 12, 84, 20, 84, 84, 84, 19, + 19, 19, 83, 83, 14, 169, 169, 14, 22, 99, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 48, 13, 23, 13, 48, 48, 48, 63, 48, - 14, 83, 83, 48, 48, 48, 48, 48, 48, 139, - 9, 80, 80, 168, 168, 108, 80, 9, 80, 29, - 80, 80, 80, 14, 80, 46, 18, 46, 80, 143, - 168, 143, 80, 16, 16, 16, 16, 143, 118, 118, - 118, 137, 137, 16, 2, 2, 168, 9, 9, 39, - 137, 14, 9, 37, 9, 28, 84, 9, 84, 84, - 84, 118, 118, 118, 118, 148, 16, 9, 9, 9, - 9, 106, 9, 117, 20, 9, 9, 78, 78, 17, - 17, 78, 78, 78, 78, 95, 17, 118, 145, 16, - 16, 17, 103, 103, 103, 103, 41, 103, 24, 17, - 9, 17, 17, 24, 24, 120, 135, 17, 92, 82, - -1, 14, 9, -1, 8, 8, -1, 8, 8, 8, - 17, 8, 8, -1, -1, -1, 118, 20, -1, -1, - 118, 118, 118, -1, 20, 5, 5, 111, 111, 93, - 93, -1, -1, 111, 111, 111, -1, -1, -1, -1, - 20, 20, 20, 58, 58, 58, 58, 58, -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, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 23, 19, 169, 23, 2, 2, 19, 19, 19, 19, + 61, 63, 19, 19, 19, 100, 139, 78, 78, 108, + 9, 78, 78, 78, 78, 48, 29, 9, 20, 48, + 48, 48, 14, 48, 13, 20, 13, 48, 48, 48, + 48, 48, 48, 162, 162, 162, 18, 39, 118, 118, + 118, 20, 20, 20, 46, 14, 46, 9, 9, 28, + 103, 103, 9, 148, 9, 37, 106, 9, 89, 89, + 89, 118, 118, 118, 118, 117, 95, 9, 9, 9, + 9, 41, 9, 14, 145, 9, 9, 111, 111, 120, + 135, 80, 80, 111, 111, 111, 80, 118, 80, 92, + 80, 80, 80, 82, 80, -1, -1, -1, 80, -1, + 9, -1, 80, 8, 8, -1, 8, 8, 8, -1, + 8, 8, 9, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, -1, -1, -1, 118, 17, 17, -1, + 118, 118, 118, 14, 17, 5, 5, -1, -1, 17, + 24, 16, 16, 16, 16, 24, 24, 17, -1, 17, + 17, 16, -1, 93, 93, 17, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, + -1, -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 103, 103 + -1, -1, -1, -1, -1, -1, -1, 16, 16 ); protected $gotoBase = array( - 0, 0, -253, 0, 0, 278, 215, 211, 487, 7, - 0, 0, -8, 47, 5, -174, -21, 13, 108, 46, - 76, 0, -100, 18, 218, 331, 200, 212, 110, 114, - 0, 0, 0, 0, 0, -108, 0, 106, 0, 117, - 0, 51, -1, 0, 0, 213, -294, 0, -305, 220, - 0, 0, 0, 0, 0, 226, 0, 0, 490, 0, - 0, 313, 0, 140, 339, -234, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -167, 0, 0, 62, -22, - -80, 0, 32, -79, -247, 0, 0, -270, 0, -48, - 0, 0, 61, -178, 0, 71, 0, 0, 0, 270, - 317, 0, 0, 446, -76, 0, 96, 0, 121, 0, - 0, 244, 0, 0, 0, 17, 0, 94, 153, 0, - 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 30, 0, 0, 58, 0, 389, 0, 122, - 0, 0, 0, -66, 0, 44, 0, 0, 91, 0, - 0, 0, 0, 0, 0, 26, -60, -11, 249, 6, - 0, 0, -110, 0, -15, 254, 0, 261, 97, -131, + 0, 0, -303, 0, 0, 278, 214, 194, 476, 7, + 0, 0, 15, 78, 27, -175, 87, 61, 118, 84, + -33, 0, -74, 18, 260, 161, 162, 179, 103, 111, + 0, 0, 0, 0, 0, -35, 0, 107, 0, 105, + 0, 26, -1, 0, 0, 204, -275, 0, -281, 281, + 0, 0, 0, 0, 0, 207, 0, 0, 144, 0, + 0, 340, 0, 143, 294, -234, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -168, 0, 0, -8, 150, + -10, 0, 16, -108, -339, 0, 0, -270, 0, 145, + 0, 0, 42, -164, 0, 52, 0, 0, 0, 326, + 344, 0, 0, 193, -76, 0, 81, 0, 115, 0, + 0, 184, 0, 0, 0, 17, 0, 86, 153, 0, + 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 21, 0, 0, 32, 0, 244, 0, 119, + 0, 0, 0, -260, 0, 30, 0, 0, 79, 0, + 0, 0, 0, 0, 0, -53, -12, 4, 255, 82, + 0, 0, 124, 0, -41, 283, 0, 293, 5, 59, 0, 0 ); protected $gotoDefault = array( - -32768, 493, 703, 4, 704, 896, 780, 788, 577, 509, - 672, 333, 603, 408, 1235, 873, 1058, 559, 807, 1179, - 1187, 439, 810, 318, 335, 855, 856, 857, 386, 371, - 377, 384, 625, 604, 474, 842, 435, 834, 466, 837, - 434, 846, 160, 405, 491, 850, 3, 852, 536, 883, - 372, 860, 373, 649, 862, 544, 864, 865, 380, 387, - 388, 1063, 552, 600, 877, 241, 546, 878, 370, 879, - 886, 375, 378, 658, 446, 486, 479, 398, 1039, 587, - 622, 443, 460, 610, 609, 597, 459, 640, 403, 919, - 467, 444, 933, 336, 941, 701, 1070, 617, 469, 949, - 618, 956, 959, 510, 511, 458, 971, 273, 470, 998, - 641, 983, 620, 996, 453, 1002, 436, 1010, 1223, 437, - 1014, 260, 1017, 274, 404, 419, 1022, 1023, 8, 1029, - 664, 665, 10, 270, 490, 1053, 659, 433, 1069, 423, - 1139, 1141, 538, 471, 1159, 1158, 652, 487, 1164, 1226, - 431, 512, 454, 304, 513, 296, 321, 301, 528, 283, - 322, 514, 455, 1232, 1240, 319, 29, 1260, 1271, 329, + -32768, 493, 703, 4, 704, 897, 780, 789, 577, 509, + 672, 334, 603, 408, 1238, 874, 1061, 559, 808, 1182, + 1190, 439, 811, 318, 320, 856, 857, 858, 386, 371, + 377, 384, 625, 604, 474, 843, 435, 835, 466, 838, + 434, 847, 160, 405, 491, 851, 3, 853, 536, 884, + 372, 861, 373, 649, 863, 544, 865, 866, 380, 387, + 388, 1066, 552, 600, 878, 241, 546, 879, 370, 880, + 887, 375, 378, 658, 446, 486, 479, 398, 1041, 587, + 622, 443, 460, 610, 609, 597, 459, 640, 403, 920, + 467, 444, 934, 336, 942, 701, 1073, 617, 469, 950, + 618, 957, 960, 510, 511, 458, 972, 273, 470, 1000, + 641, 985, 620, 998, 453, 1004, 436, 1012, 1226, 437, + 1016, 260, 1019, 274, 404, 419, 1024, 1025, 8, 1031, + 664, 665, 10, 270, 490, 1056, 659, 433, 1072, 423, + 1142, 1144, 538, 471, 1162, 1161, 652, 487, 1167, 1229, + 431, 512, 454, 304, 513, 296, 322, 301, 528, 283, + 323, 514, 455, 1235, 1243, 319, 29, 1263, 1274, 330, 556, 592 ); @@ -868,35 +849,35 @@ class Php7 extends \PhpParser\ParserAbstract 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, - 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, - 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, - 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, - 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, - 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, - 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, - 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, + 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, + 11, 11, 11, 12, 12, 13, 13, 14, 15, 15, + 16, 16, 17, 17, 18, 18, 21, 21, 22, 23, + 23, 24, 24, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, + 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, + 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, + 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, - 62, 74, 74, 75, 75, 76, 76, 77, 77, 78, - 78, 26, 26, 27, 27, 27, 27, 86, 86, 88, - 88, 81, 81, 81, 82, 82, 85, 85, 83, 83, - 89, 90, 90, 56, 56, 64, 64, 67, 67, 67, - 66, 91, 91, 92, 57, 57, 57, 57, 93, 93, - 94, 94, 95, 95, 96, 97, 97, 98, 98, 99, - 99, 54, 54, 50, 50, 101, 52, 52, 102, 51, - 51, 53, 53, 63, 63, 63, 63, 79, 79, 105, - 105, 107, 107, 107, 107, 106, 106, 106, 109, 109, - 109, 87, 87, 111, 111, 111, 110, 110, 112, 112, - 113, 113, 113, 108, 108, 80, 80, 80, 20, 20, - 114, 114, 115, 115, 115, 115, 59, 116, 116, 117, - 60, 119, 119, 120, 120, 121, 121, 84, 122, 122, - 122, 122, 122, 122, 127, 127, 128, 128, 129, 129, - 129, 129, 129, 130, 131, 131, 126, 126, 123, 123, - 125, 125, 133, 133, 132, 132, 132, 132, 132, 132, - 124, 134, 134, 136, 135, 135, 61, 100, 137, 137, - 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, + 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, + 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, + 78, 78, 26, 26, 27, 27, 27, 27, 86, 86, + 88, 88, 81, 81, 81, 82, 82, 85, 85, 83, + 83, 89, 90, 90, 56, 56, 64, 64, 67, 67, + 67, 66, 91, 91, 92, 57, 57, 57, 57, 93, + 93, 94, 94, 95, 95, 96, 97, 97, 98, 98, + 99, 99, 54, 54, 50, 50, 101, 52, 52, 102, + 51, 51, 53, 53, 63, 63, 63, 63, 79, 79, + 105, 105, 107, 107, 107, 107, 107, 106, 106, 106, + 109, 109, 109, 87, 87, 111, 111, 111, 110, 110, + 112, 112, 113, 113, 113, 108, 108, 80, 80, 80, + 20, 20, 114, 114, 115, 115, 115, 115, 59, 116, + 116, 117, 60, 119, 119, 120, 120, 121, 121, 84, + 122, 122, 122, 122, 122, 122, 127, 127, 128, 128, + 129, 129, 129, 129, 129, 130, 131, 131, 126, 126, + 123, 123, 125, 125, 133, 133, 132, 132, 132, 132, + 132, 132, 132, 124, 134, 134, 136, 135, 135, 61, + 100, 137, 137, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -905,20 +886,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 144, 138, 138, 143, 143, - 146, 147, 147, 148, 149, 149, 149, 19, 19, 72, - 72, 72, 72, 139, 139, 139, 139, 151, 151, 140, - 140, 142, 142, 142, 145, 145, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 157, 157, 104, 159, 159, - 159, 159, 141, 141, 141, 141, 141, 141, 141, 141, - 58, 58, 154, 154, 154, 154, 160, 160, 150, 150, - 150, 161, 161, 161, 161, 161, 161, 73, 73, 65, - 65, 65, 65, 118, 118, 118, 118, 164, 163, 153, - 153, 153, 153, 153, 153, 153, 152, 152, 152, 162, - 162, 162, 162, 103, 158, 166, 166, 165, 165, 167, - 167, 167, 167, 167, 167, 167, 167, 155, 155, 155, - 155, 169, 170, 168, 168, 168, 168, 168, 168, 168, - 168, 171, 171, 171, 171 + 42, 42, 42, 42, 42, 42, 42, 42, 144, 138, + 138, 143, 143, 146, 147, 147, 148, 149, 149, 149, + 19, 19, 72, 72, 72, 72, 139, 139, 139, 139, + 151, 151, 140, 140, 142, 142, 142, 145, 145, 156, + 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, + 104, 159, 159, 159, 159, 141, 141, 141, 141, 141, + 141, 141, 141, 58, 58, 154, 154, 154, 154, 160, + 160, 150, 150, 150, 161, 161, 161, 161, 161, 161, + 73, 73, 65, 65, 65, 65, 118, 118, 118, 118, + 164, 163, 153, 153, 153, 153, 153, 153, 153, 152, + 152, 152, 162, 162, 162, 162, 103, 158, 166, 166, + 165, 165, 167, 167, 167, 167, 167, 167, 167, 167, + 155, 155, 155, 155, 169, 170, 168, 168, 168, 168, + 168, 168, 168, 168, 171, 171, 171, 171 ); protected $ruleToLength = array( @@ -931,56 +912,56 @@ class Php7 extends \PhpParser\ParserAbstract 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, 0, - 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, - 0, 1, 1, 1, 1, 1, 3, 5, 4, 3, - 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, - 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, - 1, 2, 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, 2, - 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, - 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, - 1, 8, 9, 8, 7, 6, 8, 0, 2, 0, - 2, 1, 2, 2, 0, 2, 0, 2, 0, 2, - 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, - 2, 1, 3, 3, 3, 4, 4, 5, 0, 2, - 4, 3, 1, 1, 7, 0, 2, 1, 3, 3, - 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, - 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, - 3, 0, 1, 1, 1, 6, 8, 6, 1, 2, - 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, - 1, 2, 1, 0, 1, 0, 2, 2, 2, 4, - 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, - 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, - 10, 3, 5, 1, 1, 3, 0, 2, 4, 5, - 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 2, 1, 3, 1, 1, 3, 2, 2, 3, 1, - 0, 1, 1, 3, 3, 3, 4, 1, 1, 2, - 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, 3, 3, - 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, + 2, 0, 1, 1, 1, 1, 1, 3, 5, 4, + 3, 4, 2, 3, 1, 1, 7, 6, 2, 3, + 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, + 3, 1, 2, 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, + 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, + 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, + 3, 1, 8, 9, 8, 7, 6, 8, 0, 2, + 0, 2, 1, 2, 2, 0, 2, 0, 2, 0, + 2, 2, 1, 3, 1, 4, 1, 4, 1, 1, + 4, 2, 1, 3, 3, 3, 4, 4, 5, 0, + 2, 4, 3, 1, 1, 7, 0, 2, 1, 3, + 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, + 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, + 1, 3, 0, 1, 1, 1, 1, 6, 8, 6, + 1, 2, 1, 1, 1, 1, 1, 1, 3, 3, + 3, 3, 1, 2, 1, 0, 1, 0, 2, 2, + 2, 4, 1, 3, 1, 2, 2, 3, 2, 3, + 1, 1, 2, 3, 1, 1, 3, 2, 0, 1, + 5, 5, 10, 3, 5, 1, 1, 3, 0, 2, + 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 2, 1, 3, 1, 1, 3, 2, + 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, + 1, 1, 2, 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, - 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, 2, 8, 9, 8, - 9, 9, 10, 9, 10, 8, 3, 2, 0, 4, - 2, 1, 3, 2, 2, 2, 4, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, - 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 4, 1, - 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, - 0, 1, 1, 3, 1, 1, 1, 1, 1, 3, - 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, - 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, - 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, - 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, - 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, - 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, - 3, 1, 1, 2, 1 + 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, 2, + 8, 9, 8, 9, 9, 10, 9, 10, 8, 3, + 2, 0, 4, 2, 1, 3, 2, 2, 2, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, + 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, + 1, 1, 3, 1, 1, 4, 4, 1, 4, 4, + 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, + 1, 3, 1, 4, 4, 3, 3, 3, 3, 1, + 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, + 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, + 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, + 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks() { @@ -1242,7 +1223,7 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos]; }, 85 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 86 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1254,7 +1235,7 @@ protected function initReduceCallbacks() { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 89 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 90 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1269,16 +1250,16 @@ protected function initReduceCallbacks() { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 94 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 95 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 96 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 97 => function ($stackPos) { - /* nothing */ + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 98 => function ($stackPos) { /* nothing */ @@ -1287,40 +1268,40 @@ protected function initReduceCallbacks() { /* nothing */ }, 100 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + /* nothing */ }, 101 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 102 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 103 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 104 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 105 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 106 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 107 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 108 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 109 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 110 => function ($stackPos) { - $this->semValue = []; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 111 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = []; }, 112 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -1332,129 +1313,129 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 115 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 116 => function ($stackPos) { + $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 117 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); $this->checkNamespace($this->semValue); }, - 117 => function ($stackPos) { + 118 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 118 => function ($stackPos) { + 119 => function ($stackPos) { $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 119 => function ($stackPos) { + 120 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 120 => function ($stackPos) { + 121 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 121 => function ($stackPos) { + 122 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 122 => function ($stackPos) { + 123 => function ($stackPos) { $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 123 => function ($stackPos) { + 124 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_FUNCTION; }, - 124 => function ($stackPos) { + 125 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_CONSTANT; }, - 125 => function ($stackPos) { + 126 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 126 => function ($stackPos) { + 127 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 127 => function ($stackPos) { + 128 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 128 => function ($stackPos) { + 129 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 129 => function ($stackPos) { + 130 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 130 => function ($stackPos) { + 131 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 131 => function ($stackPos) { + 132 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 132 => function ($stackPos) { + 133 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 133 => function ($stackPos) { + 134 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 134 => function ($stackPos) { + 135 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 135 => function ($stackPos) { + 136 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 136 => function ($stackPos) { + 137 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, - 137 => function ($stackPos) { + 138 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, - 138 => function ($stackPos) { + 139 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, - 139 => function ($stackPos) { + 140 => function ($stackPos) { $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, - 140 => function ($stackPos) { + 141 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; }, - 141 => function ($stackPos) { + 142 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; }, - 142 => function ($stackPos) { + 143 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 143 => function ($stackPos) { + 144 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 144 => function ($stackPos) { + 145 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 145 => function ($stackPos) { + 146 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 146 => function ($stackPos) { + 147 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 147 => function ($stackPos) { + 148 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 148 => function ($stackPos) { + 149 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 149 => function ($stackPos) { + 150 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 150 => function ($stackPos) { + 151 => function ($stackPos) { if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; }, - 151 => function ($stackPos) { + 152 => function ($stackPos) { $this->semValue = array(); }, - 152 => function ($stackPos) { + 153 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 153 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, 154 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, @@ -1462,9 +1443,12 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 156 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 157 => function ($stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 158 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; @@ -1474,46 +1458,46 @@ protected function initReduceCallbacks() { } }, - 158 => function ($stackPos) { + 159 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 159 => function ($stackPos) { + 160 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 160 => function ($stackPos) { + 161 => function ($stackPos) { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 161 => function ($stackPos) { + 162 => function ($stackPos) { $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 162 => function ($stackPos) { + 163 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 163 => function ($stackPos) { + 164 => function ($stackPos) { $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 164 => function ($stackPos) { + 165 => function ($stackPos) { $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 165 => function ($stackPos) { + 166 => function ($stackPos) { $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 166 => function ($stackPos) { + 167 => function ($stackPos) { $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 167 => function ($stackPos) { + 168 => function ($stackPos) { $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 168 => function ($stackPos) { + 169 => function ($stackPos) { $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 169 => function ($stackPos) { + 170 => function ($stackPos) { $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 170 => function ($stackPos) { + 171 => function ($stackPos) { $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 171 => function ($stackPos) { + 172 => function ($stackPos) { $e = $this->semStack[$stackPos-(2-1)]; if ($e instanceof Expr\Throw_) { @@ -1525,359 +1509,356 @@ protected function initReduceCallbacks() { } }, - 172 => function ($stackPos) { + 173 => function ($stackPos) { $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 173 => function ($stackPos) { + 174 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 174 => function ($stackPos) { + 175 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 175 => function ($stackPos) { + 176 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 176 => function ($stackPos) { + 177 => function ($stackPos) { $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 177 => function ($stackPos) { + 178 => function ($stackPos) { $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); }, - 178 => function ($stackPos) { + 179 => function ($stackPos) { $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 179 => function ($stackPos) { + 180 => function ($stackPos) { $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 180 => function ($stackPos) { + 181 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, - 181 => function ($stackPos) { + 182 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 182 => function ($stackPos) { + 183 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, - 183 => function ($stackPos) { + 184 => function ($stackPos) { $this->semValue = array(); }, - 184 => function ($stackPos) { + 185 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 185 => function ($stackPos) { + 186 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 186 => function ($stackPos) { + 187 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 187 => function ($stackPos) { + 188 => function ($stackPos) { $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 188 => function ($stackPos) { + 189 => function ($stackPos) { $this->semValue = null; }, - 189 => function ($stackPos) { + 190 => function ($stackPos) { $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 190 => function ($stackPos) { + 191 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 191 => function ($stackPos) { + 192 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 192 => function ($stackPos) { + 193 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 193 => function ($stackPos) { + 194 => function ($stackPos) { $this->semValue = false; }, - 194 => function ($stackPos) { + 195 => function ($stackPos) { $this->semValue = true; }, - 195 => function ($stackPos) { + 196 => function ($stackPos) { $this->semValue = false; }, - 196 => function ($stackPos) { + 197 => function ($stackPos) { $this->semValue = true; }, - 197 => function ($stackPos) { + 198 => function ($stackPos) { $this->semValue = false; }, - 198 => function ($stackPos) { + 199 => function ($stackPos) { $this->semValue = true; }, - 199 => function ($stackPos) { + 200 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 200 => function ($stackPos) { + 201 => function ($stackPos) { $this->semValue = []; }, - 201 => function ($stackPos) { + 202 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 202 => function ($stackPos) { + 203 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 203 => function ($stackPos) { + 204 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(8-3)); }, - 204 => function ($stackPos) { + 205 => function ($stackPos) { $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkInterface($this->semValue, $stackPos-(7-3)); }, - 205 => function ($stackPos) { + 206 => function ($stackPos) { $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 206 => function ($stackPos) { + 207 => function ($stackPos) { $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); $this->checkEnum($this->semValue, $stackPos-(8-3)); }, - 207 => function ($stackPos) { + 208 => function ($stackPos) { $this->semValue = null; }, - 208 => function ($stackPos) { + 209 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 209 => function ($stackPos) { - $this->semValue = null; - }, 210 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 211 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 212 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = 0; }, 213 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 214 => function ($stackPos) { - $this->semValue = null; + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 215 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 216 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 217 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 218 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 219 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 220 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 221 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 222 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 223 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 224 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 225 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 226 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 227 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 228 => function ($stackPos) { - $this->semValue = null; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 229 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = null; }, 230 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 231 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 232 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 233 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 234 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 236 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 237 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 238 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(5-3)]; }, 239 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 240 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 241 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 242 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 243 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 244 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 245 => function ($stackPos) { - $this->semValue = []; + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 246 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = []; }, 247 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 248 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 249 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 250 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 251 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 252 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 253 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 254 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 255 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 256 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 257 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 258 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 259 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 260 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = null; }, 261 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 262 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = null; }, 263 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 264 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 265 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 266 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 267 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 268 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 269 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 270 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 271 => function ($stackPos) { - $this->semValue = 0; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 272 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = 0; }, 273 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 274 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 275 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 276 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); - $this->checkParam($this->semValue); + $this->semValue = Stmt\Class_::MODIFIER_READONLY; }, 277 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->checkParam($this->semValue); }, 278 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->checkParam($this->semValue); }, 279 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, 280 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 281 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 282 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 283 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 284 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 285 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 286 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 287 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 288 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -1886,689 +1867,689 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 290 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 291 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 292 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 293 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 294 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 295 => function ($stackPos) { $this->semValue = null; }, 296 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 297 => function ($stackPos) { $this->semValue = null; }, 298 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 299 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = null; }, 300 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 301 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 302 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 303 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 304 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 305 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 306 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 307 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 308 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 309 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 310 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 311 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 312 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 313 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 314 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 315 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 316 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 317 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + }, + 318 => function ($stackPos) { + $this->semValue = array(); + }, + 319 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 318 => function ($stackPos) { + 320 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 319 => function ($stackPos) { + 321 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 320 => function ($stackPos) { + 322 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, - 321 => function ($stackPos) { + 323 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 322 => function ($stackPos) { + 324 => function ($stackPos) { $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 323 => function ($stackPos) { + 325 => function ($stackPos) { $this->semValue = null; /* will be skipped */ }, - 324 => function ($stackPos) { + 326 => function ($stackPos) { $this->semValue = array(); }, - 325 => function ($stackPos) { + 327 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 326 => function ($stackPos) { + 328 => function ($stackPos) { $this->semValue = array(); }, - 327 => function ($stackPos) { + 329 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 328 => function ($stackPos) { + 330 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 329 => function ($stackPos) { + 331 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 330 => function ($stackPos) { + 332 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 331 => function ($stackPos) { + 333 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 332 => function ($stackPos) { + 334 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 333 => function ($stackPos) { + 335 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 334 => function ($stackPos) { + 336 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 335 => function ($stackPos) { + 337 => function ($stackPos) { $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, - 336 => function ($stackPos) { + 338 => function ($stackPos) { $this->semValue = null; }, - 337 => function ($stackPos) { + 339 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 338 => function ($stackPos) { + 340 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 339 => function ($stackPos) { + 341 => function ($stackPos) { $this->semValue = 0; }, - 340 => function ($stackPos) { + 342 => function ($stackPos) { $this->semValue = 0; }, - 341 => function ($stackPos) { + 343 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 342 => function ($stackPos) { + 344 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 343 => function ($stackPos) { + 345 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 344 => function ($stackPos) { + 346 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, - 345 => function ($stackPos) { + 347 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, - 346 => function ($stackPos) { + 348 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, - 347 => function ($stackPos) { + 349 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, - 348 => function ($stackPos) { + 350 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, - 349 => function ($stackPos) { + 351 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, - 350 => function ($stackPos) { + 352 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_READONLY; + }, + 353 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 351 => function ($stackPos) { + 354 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 352 => function ($stackPos) { + 355 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 353 => function ($stackPos) { + 356 => function ($stackPos) { $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 354 => function ($stackPos) { + 357 => function ($stackPos) { $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 355 => function ($stackPos) { + 358 => function ($stackPos) { $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 356 => function ($stackPos) { + 359 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 357 => function ($stackPos) { + 360 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 358 => function ($stackPos) { + 361 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 359 => function ($stackPos) { + 362 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 360 => function ($stackPos) { + 363 => function ($stackPos) { $this->semValue = array(); }, - 361 => function ($stackPos) { + 364 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 362 => function ($stackPos) { + 365 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 363 => function ($stackPos) { + 366 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 364 => function ($stackPos) { + 367 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 365 => function ($stackPos) { + 368 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 366 => function ($stackPos) { + 369 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 367 => function ($stackPos) { + 370 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 368 => function ($stackPos) { + 371 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 369 => function ($stackPos) { + 372 => function ($stackPos) { $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 370 => function ($stackPos) { + 373 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 371 => function ($stackPos) { + 374 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 372 => function ($stackPos) { + 375 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 373 => function ($stackPos) { + 376 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 374 => function ($stackPos) { + 377 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 375 => function ($stackPos) { + 378 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 376 => function ($stackPos) { + 379 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 377 => function ($stackPos) { + 380 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 378 => function ($stackPos) { + 381 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 379 => function ($stackPos) { + 382 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 380 => function ($stackPos) { + 383 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 381 => function ($stackPos) { + 384 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 382 => function ($stackPos) { + 385 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 383 => function ($stackPos) { + 386 => function ($stackPos) { $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 384 => function ($stackPos) { + 387 => function ($stackPos) { $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 385 => function ($stackPos) { + 388 => function ($stackPos) { $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 386 => function ($stackPos) { + 389 => function ($stackPos) { $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 387 => function ($stackPos) { + 390 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 388 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 389 => function ($stackPos) { + 392 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 390 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 391 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 392 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 393 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 394 => function ($stackPos) { + 397 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 395 => function ($stackPos) { + 398 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { + 399 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 397 => function ($stackPos) { + 400 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 398 => function ($stackPos) { + 401 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 399 => function ($stackPos) { + 402 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 400 => function ($stackPos) { + 403 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 401 => function ($stackPos) { + 404 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 402 => function ($stackPos) { + 405 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 403 => function ($stackPos) { + 406 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 404 => function ($stackPos) { + 407 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 405 => function ($stackPos) { + 408 => function ($stackPos) { $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 406 => function ($stackPos) { + 409 => function ($stackPos) { $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 407 => function ($stackPos) { + 410 => function ($stackPos) { $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 408 => function ($stackPos) { + 411 => function ($stackPos) { $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 409 => function ($stackPos) { + 412 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 410 => function ($stackPos) { + 413 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 411 => function ($stackPos) { + 414 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 412 => function ($stackPos) { + 415 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 413 => function ($stackPos) { + 416 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 414 => function ($stackPos) { + 417 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 415 => function ($stackPos) { + 418 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 416 => function ($stackPos) { + 419 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 417 => function ($stackPos) { + 420 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 418 => function ($stackPos) { + 421 => function ($stackPos) { $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 419 => function ($stackPos) { + 422 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 420 => function ($stackPos) { + 423 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 421 => function ($stackPos) { + 424 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 422 => function ($stackPos) { + 425 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 423 => function ($stackPos) { + 426 => function ($stackPos) { $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 424 => function ($stackPos) { + 427 => function ($stackPos) { $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 425 => function ($stackPos) { + 428 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 426 => function ($stackPos) { + 429 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 427 => function ($stackPos) { + 430 => function ($stackPos) { $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 428 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 429 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 431 => function ($stackPos) { + 434 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 432 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 440 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 438 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 439 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 440 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, 441 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 442 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 443 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 444 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 445 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 446 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 447 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 448 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 449 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 450 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 451 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 452 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 453 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 454 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 455 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 456 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 457 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 458 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->checkClass($this->semValue[0], -1); }, 459 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 460 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 461 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 462 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 463 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 464 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 465 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 466 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 467 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 468 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 469 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 470 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 471 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 472 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 473 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 474 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 475 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 476 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 477 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 478 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 479 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 480 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 481 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 482 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = null; }, 483 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 484 => function ($stackPos) { $this->semValue = array(); }, 485 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 486 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 487 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 488 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 489 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 490 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 491 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 492 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 493 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 494 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 495 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 496 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 497 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 498 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 499 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, 500 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)]), $attrs); + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, 501 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, 502 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 503 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)]), $attrs); }, 504 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, 505 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 506 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 507 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 508 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 509 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 510 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 511 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 512 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 513 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = null; }, 514 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2577,7 +2558,7 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 517 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2586,7 +2567,7 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 519 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 520 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2595,85 +2576,85 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 522 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 523 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 524 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 525 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 526 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 527 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 528 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 531 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 532 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 533 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 534 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 535 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 536 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 537 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 538 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 539 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 540 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 541 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 542 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 543 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 544 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 545 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 546 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 548 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 549 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2685,102 +2666,111 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 552 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 553 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 554 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 555 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 556 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 557 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, 558 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos]; }, 559 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 560 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 561 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 562 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 563 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 565 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 566 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 567 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 568 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 569 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = null; }, 570 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 571 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 572 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 573 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 574 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 575 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 576 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 577 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 578 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 579 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 580 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 581 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 582 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 583 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 584 => function ($stackPos) { + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 585 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 586 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 587 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/Parser/Tokens.php b/lib/PhpParser/Parser/Tokens.php index d6a99d6890..b76a5d94c8 100644 --- a/lib/PhpParser/Parser/Tokens.php +++ b/lib/PhpParser/Parser/Tokens.php @@ -108,40 +108,41 @@ final class Tokens const T_PRIVATE = 356; const T_PROTECTED = 357; const T_PUBLIC = 358; - const T_VAR = 359; - const T_UNSET = 360; - const T_ISSET = 361; - const T_EMPTY = 362; - const T_HALT_COMPILER = 363; - const T_CLASS = 364; - const T_TRAIT = 365; - const T_INTERFACE = 366; - const T_ENUM = 367; - const T_EXTENDS = 368; - const T_IMPLEMENTS = 369; - const T_OBJECT_OPERATOR = 370; - const T_NULLSAFE_OBJECT_OPERATOR = 371; - const T_LIST = 372; - const T_ARRAY = 373; - const T_CALLABLE = 374; - const T_CLASS_C = 375; - const T_TRAIT_C = 376; - const T_METHOD_C = 377; - const T_FUNC_C = 378; - const T_LINE = 379; - const T_FILE = 380; - const T_START_HEREDOC = 381; - const T_END_HEREDOC = 382; - const T_DOLLAR_OPEN_CURLY_BRACES = 383; - const T_CURLY_OPEN = 384; - const T_PAAMAYIM_NEKUDOTAYIM = 385; - const T_NAMESPACE = 386; - const T_NS_C = 387; - const T_DIR = 388; - const T_NS_SEPARATOR = 389; - const T_ELLIPSIS = 390; - const T_NAME_FULLY_QUALIFIED = 391; - const T_NAME_QUALIFIED = 392; - const T_NAME_RELATIVE = 393; - const T_ATTRIBUTE = 394; + const T_READONLY = 359; + const T_VAR = 360; + const T_UNSET = 361; + const T_ISSET = 362; + const T_EMPTY = 363; + const T_HALT_COMPILER = 364; + const T_CLASS = 365; + const T_TRAIT = 366; + const T_INTERFACE = 367; + const T_ENUM = 368; + const T_EXTENDS = 369; + const T_IMPLEMENTS = 370; + const T_OBJECT_OPERATOR = 371; + const T_NULLSAFE_OBJECT_OPERATOR = 372; + const T_LIST = 373; + const T_ARRAY = 374; + const T_CALLABLE = 375; + const T_CLASS_C = 376; + const T_TRAIT_C = 377; + const T_METHOD_C = 378; + const T_FUNC_C = 379; + const T_LINE = 380; + const T_FILE = 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; + const T_NAME_FULLY_QUALIFIED = 392; + const T_NAME_QUALIFIED = 393; + const T_NAME_RELATIVE = 394; + const T_ATTRIBUTE = 395; } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index c61208b072..5ee5a64bbd 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -977,6 +977,12 @@ protected function checkClassMethod(ClassMethod $node, $modifierPos) { break; } } + + if ($node->flags & Class_::MODIFIER_READONLY) { + $this->emitError(new Error( + sprintf('Method %s() cannot be readonly', $node->name), + $this->getAttributesAt($modifierPos))); + } } protected function checkClassConst(ClassConst $node, $modifierPos) { @@ -990,9 +996,9 @@ protected function checkClassConst(ClassConst $node, $modifierPos) { "Cannot use 'abstract' as constant modifier", $this->getAttributesAt($modifierPos))); } - if ($node->flags & Class_::MODIFIER_FINAL) { + if ($node->flags & Class_::MODIFIER_READONLY) { $this->emitError(new Error( - "Cannot use 'final' as constant modifier", + "Cannot use 'readonly' as constant modifier", $this->getAttributesAt($modifierPos))); } } diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 0e0e79d7b1..8a3565f1cf 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1074,7 +1074,8 @@ protected function pModifiers(int $modifiers) { . ($modifiers & Stmt\Class_::MODIFIER_PRIVATE ? 'private ' : '') . ($modifiers & Stmt\Class_::MODIFIER_STATIC ? 'static ' : '') . ($modifiers & Stmt\Class_::MODIFIER_ABSTRACT ? 'abstract ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_FINAL ? 'final ' : ''); + . ($modifiers & Stmt\Class_::MODIFIER_FINAL ? 'final ' : '') + . ($modifiers & Stmt\Class_::MODIFIER_READONLY ? 'readonly ' : ''); } /** diff --git a/test/PhpParser/Builder/ClassConstTest.php b/test/PhpParser/Builder/ClassConstTest.php index e5a3a1c949..ba3edcd40e 100644 --- a/test/PhpParser/Builder/ClassConstTest.php +++ b/test/PhpParser/Builder/ClassConstTest.php @@ -65,6 +65,21 @@ public function testModifiers() { ), $node ); + + $node = $this->createClassConstBuilder("TEST", 1) + ->makeFinal() + ->getNode() + ; + + $this->assertEquals( + new Stmt\ClassConst( + [ + new Const_("TEST", new LNumber(1) ) + ], + Stmt\Class_::MODIFIER_FINAL + ), + $node + ); } public function testDocComment() { diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index 6d89f3ba82..5e6c17d53f 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -66,6 +66,21 @@ public function testModifiers() { ), $node ); + + $node = $this->createPropertyBuilder('test') + ->makeReadonly() + ->getNode() + ; + + $this->assertEquals( + new Stmt\Property( + Stmt\Class_::MODIFIER_READONLY, + [ + new Stmt\PropertyProperty('test') + ] + ), + $node + ); } public function testDocComment() { diff --git a/test/PhpParser/Node/Stmt/ClassConstTest.php b/test/PhpParser/Node/Stmt/ClassConstTest.php index 9a1b4697ca..1685c0bff2 100644 --- a/test/PhpParser/Node/Stmt/ClassConstTest.php +++ b/test/PhpParser/Node/Stmt/ClassConstTest.php @@ -22,6 +22,7 @@ public function testNoModifiers() { $this->assertTrue($node->isPublic()); $this->assertFalse($node->isProtected()); $this->assertFalse($node->isPrivate()); + $this->assertFalse($node->isFinal()); } public function provideModifiers() { @@ -29,6 +30,7 @@ public function provideModifiers() { ['public'], ['protected'], ['private'], + ['final'], ]; } } diff --git a/test/PhpParser/Node/Stmt/PropertyTest.php b/test/PhpParser/Node/Stmt/PropertyTest.php index e5d69fba5d..ea99d250cf 100644 --- a/test/PhpParser/Node/Stmt/PropertyTest.php +++ b/test/PhpParser/Node/Stmt/PropertyTest.php @@ -23,6 +23,7 @@ public function testNoModifiers() { $this->assertFalse($node->isProtected()); $this->assertFalse($node->isPrivate()); $this->assertFalse($node->isStatic()); + $this->assertFalse($node->isReadonly()); } public function testStaticImplicitlyPublic() { @@ -31,6 +32,12 @@ public function testStaticImplicitlyPublic() { $this->assertFalse($node->isProtected()); $this->assertFalse($node->isPrivate()); $this->assertTrue($node->isStatic()); + $this->assertFalse($node->isReadonly()); + } + + public function testReadonly() { + $node = new Property(Class_::MODIFIER_READONLY, []); + $this->assertTrue($node->isReadonly()); } public function provideModifiers() { diff --git a/test/code/parser/stmt/class/constModifierErrors.test b/test/code/parser/stmt/class/constModifierErrors.test index a3035e60d8..8b6abec291 100644 --- a/test/code/parser/stmt/class/constModifierErrors.test +++ b/test/code/parser/stmt/class/constModifierErrors.test @@ -78,11 +78,11 @@ array( ----- Date: Wed, 21 Jul 2021 12:44:31 +0200 Subject: [PATCH 028/428] Release PHP-Parser 4.12.0 --- CHANGELOG.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c8e34ed63..18b70004e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,22 @@ -Version 4.11.1-dev +Version 4.12.1-dev ------------------ Nothing yet. +Version 4.12.0 (2021-07-21) +--------------------------- + +### Added + +* [PHP 8.1] Added support for readonly properties (through a new `MODIFIER_READONLY`). +* [PHP 8.1] Added support for final class constants. + +### Fixed + +* Fixed compatibility with PHP 8.1. `&` tokens are now canonicalized to the + `T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG` and `T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG` tokens + used in PHP 8.1. This happens unconditionally, regardless of whether the emulative lexer is used. + Version 4.11.0 (2021-07-03) --------------------------- From 5a430154993baff5c828aec8350939ce5018f911 Mon Sep 17 00:00:00 2001 From: simivar Date: Fri, 18 Jun 2021 19:46:50 +0200 Subject: [PATCH 029/428] Simplify BuilderHelpers::normalizeName() implementation In order to get rid of the flag in `BuilderHelpers::normalizeNameCommon()` I have moved all the logic related to the normalization of the name to the `BuilderHelpers::normalizeName()` method and expr-related stuff to the `BuilderHelpers::normalizeNameOrExpr()` method which later calls the basic `normalizeName()` as well --- lib/PhpParser/BuilderHelpers.php | 45 ++++++++++++-------------------- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index c6d8f16136..835e929f8a 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -104,29 +104,6 @@ public static function normalizeIdentifierOrExpr($name) { * @return Name The normalized name */ public static function normalizeName($name) : Name { - return self::normalizeNameCommon($name, false); - } - - /** - * Normalizes a name: Converts string names to Name nodes, while also allowing expressions. - * - * @param Expr|Name|string $name The name to normalize - * - * @return Name|Expr The normalized name or expression - */ - public static function normalizeNameOrExpr($name) { - return self::normalizeNameCommon($name, true); - } - - /** - * Normalizes a name: Converts string names to Name nodes, optionally allowing expressions. - * - * @param Expr|Name|string $name The name to normalize - * @param bool $allowExpr Whether to also allow expressions - * - * @return Name|Expr The normalized name, or expression (if allowed) - */ - private static function normalizeNameCommon($name, bool $allowExpr) { if ($name instanceof Name) { return $name; } @@ -147,16 +124,28 @@ private static function normalizeNameCommon($name, bool $allowExpr) { return new Name($name); } - if ($allowExpr) { - if ($name instanceof Expr) { - return $name; - } + throw new \LogicException('Name must be a string or an instance of Node\Name'); + } + + /** + * Normalizes a name: Converts string names to Name nodes, while also allowing expressions. + * + * @param Expr|Name|string $name The name to normalize + * + * @return Name|Expr The normalized name or expression + */ + public static function normalizeNameOrExpr($name) { + if ($name instanceof Expr) { + return $name; + } + + if (!is_string($name) && !($name instanceof Name)) { throw new \LogicException( 'Name must be a string or an instance of Node\Name or Node\Expr' ); } - throw new \LogicException('Name must be a string or an instance of Node\Name'); + return self::normalizeName($name); } /** From 9aebf377fcdf205b2156cb78c0bd6e7b2003f106 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 8 Aug 2021 19:12:44 +0200 Subject: [PATCH 030/428] Allow multiple modifiers for property promotion Fixes issue #800. --- grammar/php7.y | 15 +- lib/PhpParser/Parser/Php7.php | 1577 +++++++++-------- .../parser/stmt/class/property_promotion.test | 19 +- .../stmt/property_promotion.test | 3 +- 4 files changed, 832 insertions(+), 782 deletions(-) diff --git a/grammar/php7.y b/grammar/php7.y index d9a450379a..e7030d63b9 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -530,24 +530,29 @@ non_empty_parameter_list: | non_empty_parameter_list ',' parameter { push($1, $3); } ; -optional_visibility_modifier: +optional_property_modifiers: /* empty */ { $$ = 0; } - | T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } + | optional_property_modifiers property_modifier + { $this->checkModifier($1, $2, #2); $$ = $1 | $2; } +; + +property_modifier: + T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } ; parameter: - optional_attributes optional_visibility_modifier optional_type_without_static + optional_attributes optional_property_modifiers optional_type_without_static optional_arg_ref optional_ellipsis plain_variable { $$ = new Node\Param($6, null, $3, $4, $5, attributes(), $2, $1); $this->checkParam($$); } - | optional_attributes optional_visibility_modifier optional_type_without_static + | optional_attributes optional_property_modifiers optional_type_without_static optional_arg_ref optional_ellipsis plain_variable '=' expr { $$ = new Node\Param($6, $8, $3, $4, $5, attributes(), $2, $1); $this->checkParam($$); } - | optional_attributes optional_visibility_modifier optional_type_without_static + | optional_attributes optional_property_modifiers optional_type_without_static optional_arg_ref optional_ellipsis error { $$ = new Node\Param(Expr\Error[], null, $3, $4, $5, attributes(), $2, $1); } ; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 75fc06db7f..6f5fa20a07 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -18,15 +18,15 @@ class Php7 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1187; - protected $gotoTableSize = 579; + protected $actionTableSize = 1189; + protected $gotoTableSize = 697; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 415; + protected $YY2TBLSTATE = 414; protected $numNonLeafStates = 702; protected $symbolToName = array( @@ -244,253 +244,253 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $action = array( - 131, 132, 133, 563, 134, 135, 0, 714, 715, 716, - 136, 36, 977, 976, 975, 978,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 100, 101, 102, 103, 104, 1051, 1052, - 1053, 1050, 1049, 1048, 1054, 708, 707,-32766,-32766,-32766, + 131, 132, 133, 562, 134, 135, 0, 714, 715, 716, + 136, 36, 826, 903, 827, 461,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 100, 101, 102, 103, 104, 1052, 1053, + 1054, 1051, 1050, 1049, 1055, 708, 707,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 539, 540, 903, 2, 717,-32766,-32766,-32766, 988, - 989, -88, 914, 440, 441, 442, 365, 366, 462, 265, - 137, 391, 721, 722, 723, 724, 409,-32766, 415,-32766, - -32766,-32766,-32766,-32766, -305, 725, 726, 727, 728, 729, - 730, 731, 732, 733, 734, 735, 755, 564, 756, 757, - 758, 759, 747, 748, 331, 332, 750, 751, 736, 737, - 738, 740, 741, 742, 341, 782, 783, 784, 785, 786, - 787, 743, 744, 565, 566, 776, 767, 765, 766, 779, - 762, 763, 981, 415, 567, 568, 761, 569, 570, 571, - 572, 573, 574, -193, -566, 535, 485, 790, 764, 575, - 576, -566, 138,-32766,-32766,-32766, 131, 132, 133, 563, - 134, 135, 1002, 714, 715, 716, 136, 36, 1043,-32766, - -32766,-32766, 799, -86,-32766, 1276,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 1051, 1052, 1053, 1050, 1049, 1048, 1054, - -32766, 708, 707,-32766,-32766,-32766, 1241, 238, 463,-32766, - -32766,-32766,-32766,-32766,-32766, 883, 1213, 125, 1176, 1175, - 1177, 717, 801, 689,-32766, 1029,-32766,-32766,-32766,-32766, - -32766, -192,-32766,-32766,-32766, 265, 137, 391, 721, 722, - 723, 724, 883, 945, 415, 680, 12, 34, 247, -86, - -305, 725, 726, 727, 728, 729, 730, 731, 732, 733, - 734, 735, 755, 564, 756, 757, 758, 759, 747, 748, - 331, 332, 750, 751, 736, 737, 738, 740, 741, 742, - 341, 782, 783, 784, 785, 786, 787, 743, 744, 565, - 566, 776, 767, 765, 766, 779, 762, 763, 873, 585, - 567, 568, 761, 569, 570, 571, 572, 573, 574, -193, - 81, 82, 83, -566, 764, 575, 576, -566, 138, 739, - 709, 710, 711, 712, 713, 873, 714, 715, 716, 752, - 753, 35, 33, 84, 85, 86, 87, 88, 89, 90, + -32767, 538, 539,-32766,-32766, 717,-32766,-32766,-32766, 989, + 990, 798, 914, 439, 440, 441, 364, 365, 2, 265, + 137, 390, 721, 722, 723, 724, 408,-32766, 414,-32766, + -32766,-32766,-32766,-32766, 982, 725, 726, 727, 728, 729, + 730, 731, 732, 733, 734, 735, 755, 563, 756, 757, + 758, 759, 747, 748, 330, 331, 750, 751, 736, 737, + 738, 740, 741, 742, 340, 782, 783, 784, 785, 786, + 787, 743, 744, 564, 565, 776, 767, 765, 766, 779, + 762, 763, 279, 414, 566, 567, 761, 568, 569, 570, + 571, 572, 573, 590, -567, 462, 484, 790, 764, 574, + 575, -567, 138,-32766,-32766,-32766, 131, 132, 133, 562, + 134, 135, 1003, 714, 715, 716, 136, 36, 1044,-32766, + -32766,-32766, 1287, 688,-32766, 1288,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 1052, 1053, 1054, 1051, 1050, 1049, 1055, + -32766, 708, 707, 366, 365, 1242,-32766,-32766,-32766, -564, + 105, 106, 107, 408, 268, 883, -564, 238, 1177, 1176, + 1178, 717,-32766,-32766,-32766, 1030, 108,-32766,-32766,-32766, + -32766, 978, 977, 976, 979, 265, 137, 390, 721, 722, + 723, 724, 12,-32766, 414,-32766,-32766,-32766,-32766, 989, + 990, 725, 726, 727, 728, 729, 730, 731, 732, 733, + 734, 735, 755, 563, 756, 757, 758, 759, 747, 748, + 330, 331, 750, 751, 736, 737, 738, 740, 741, 742, + 340, 782, 783, 784, 785, 786, 787, 743, 744, 564, + 565, 776, 767, 765, 766, 779, 762, 763, 873, 315, + 566, 567, 761, 568, 569, 570, 571, 572, 573,-32766, + 81, 82, 83, -567, 764, 574, 575, -567, 138, 739, + 709, 710, 711, 712, 713, 1262, 714, 715, 716, 752, + 753, 35, 1261, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, -264, 267,-32766, - -32766,-32766,-32766, 105, 106, 107, 80, 267, 127, 1001, - 108, 946, 314, 885, 717, 675, 367, 366, 143, 108, - 800,-32766, 1027,-32766,-32766, 148, 409, -192, 718, 719, - 720, 721, 722, 723, 724, 237, 1181, 788, 276, -517, - 885, 315, 675, 149, 725, 726, 727, 728, 729, 730, + 101, 102, 103, 104, 105, 106, 107, 987, 268, 148, + -32766,-32766,-32766, 447, 448, 80, 33, -264, -564, 1002, + 108, 314, -564, 885, 717, 674, 795, 127, 989, 990, + 584,-32766, 1028,-32766,-32766,-32766, 801, 149, 718, 719, + 720, 721, 722, 723, 724, -88, 1182, 788, 276, -518, + 279,-32766,-32766,-32766, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 755, 778, 756, 757, 758, 759, 747, 748, 749, 777, 750, 751, 736, 737, 738, 740, 741, 742, 781, 782, 783, 784, 785, 786, 787, 743, 744, 745, 746, 776, 767, 765, 766, 779, 762, - 763,-32766,-32766, 754, 760, 761, 768, 769, 771, 770, - 772, 773, 251, -517, -517, 448, 449, 764, 775, 774, - 48, 49, 50, 494, 51, 52, 795, 799, -517, 591, - 53, 54, -111, 55, 986, 708, 707, -111, 792, -111, - -517, 298, -523, 986, 294, 631, 24, -111, -111, -111, - -111, -111, -111, -111, -111, 988, 989, 300, 1286, 1261, - -343, 1287, -343, 1174, 988, 989, 1260, 312, 56, 57, - -32766,-32766,-32766, -111, 58, 1201, 59, 244, 245, 60, - 61, 62, 63, 64, 65, 66, 67, -516, 26, 266, - 68, 429, 495, -319, 647, 648, 1207, 1208, 496, 1172, - 799, 1181, 796, 287, 1205, 40, 23, 497, 73, 498, - 328, 499, 314, 500, 794, 329, 501, 502, 826, 677, - 827, 42, 43, 430, 362, 361, 883, 44, 503, 147, - 394, -16, -557, 353, 327, 355, -557, 1181, 1176, 1175, - 1177, -518, 504, 505, 506, 359, -515, 1257, 47, 363, - 364, -516, -516, 374, 507, 508, 799, 1195, 1196, 1197, - 1198, 1192, 1193, 286, -563, 425, -516, 798, 151, 1199, - 1194, -563, 426, 1176, 1175, 1177, 287, 883, -516, 427, - -522, 69, 799, 310, 311, 314, 30, 109, 110, 111, + 763, 143, 796, 754, 760, 761, 768, 769, 771, 770, + 772, 773, -306, -518, -518, -193, -192, 764, 775, 774, + 48, 49, 50, 493, 51, 52, 237, 799, -518, -86, + 53, 54, -111, 55, 987, 251,-32766, -111, 792, -111, + -518, 534, -524, -344, 294, -344, 298, -111, -111, -111, + -111, -111, -111, -111, -111, 989, 990, 989, 990, 151, + -32766,-32766,-32766, 1175, 799, 125, 300, 1277, 56, 57, + 102, 103, 104, -111, 58, 1202, 59, 244, 245, 60, + 61, 62, 63, 64, 65, 66, 67, -517, 26, 266, + 68, 428, 494, -320, 800, -86, 1208, 1209, 495, 1173, + 799, 1182, 1214, 287, 1206, 40, 23, 496, 73, 497, + 945, 498, 314, 499, 794, 312, 500, 501, 375, 676, + 11, 42, 43, 429, 361, 360, 883, 44, 502, 34, + 247, -16, -558, 352, 326, 327, -558, 1182, 1177, 1176, + 1178, -519, 503, 504, 505, 328, -516, 1258, 47, 708, + 707, -517, -517, 354, 506, 507, 799, 1196, 1197, 1198, + 1199, 1193, 1194, 286, 358, 826, -517, 827, -306, 1200, + 1195, -193, -192, 1177, 1176, 1178, 287, 883, -517, 373, + -523, 69, 799, 310, 311, 314, 30, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - -153, -153, -153, 368, 369, -518, -518, 681, 428, 873, - -515, -515, 290, 291, 883, -153, 805, -153, 799, -153, - -518, -153, 708, 707, 152, -515, 790, 358, -111, 1088, - 1090, 360, -518, 153, 883, 139, 376, -515, 11, 126, - -515, 314, -111, -111, 682, 155, 279, -520, 102, 103, - 104, 31, 859, -111, -111, -111, -111, 46, 287,-32766, - 873, 623, 624, 73, 684, 1174, 826, 314, 827, 1028, - -79, 700,-32766,-32766,-32766, 122,-32766, 123,-32766, 128, - -32766, 708, 707,-32766, 885, 883, 675, -153,-32766,-32766, - -32766, 708, 707, 129,-32766,-32766, 142, 873, 156, 73, - -32766, 406, 157, 314, -515, -515, 158, 140, 159,-32766, - -75, -520, -520, 314, 26, 691, -73, 873, -72, -515, - -71, 288, 289, -563, -70, -69, 799, -563,-32766, -68, - 1205, -515,-32766, -67, 1174, 885, -66, 675, -520, 72, - -47,-32766,-32766,-32766, -18,-32766, 146,-32766, 124,-32766, - 268, 275,-32766, 988, 989, 690, -51,-32766,-32766,-32766, - 693, 882, 145,-32766,-32766, 899, 108, 277, 873,-32766, - 406, 278, 931, 280, 675, 281, 321, 144,-32766, 267, - 507, 508, 799, 1195, 1196, 1197, 1198, 1192, 1193, 655, - 130, 790, 885, 1288, 675, 1199, 1194, 543, 1058,-32766, - 650, 13,-32766, 537, 632, 1174, 424, 71, 621, 915, - 311, 314,-32766,-32766,-32766, 668,-32766, 637,-32766,-32766, - -32766, 293, 1212,-32766, 916, 445, 638, 549,-32766,-32766, - -32766, 473, -481,-32766,-32766,-32766, -4, 883, -551, 1174, - -32766, 406, 651, 885, 589, 675,-32766,-32766,-32766,-32766, - -32766, 295,-32766, 901,-32766, 0, 798,-32766, 0, 0, - 0, 0,-32766,-32766,-32766,-32766, 0, 292,-32766,-32766, - 0, 1174, 0, 0,-32766, 406, 299, 0,-32766,-32766, - -32766, 0,-32766,-32766,-32766, 1214,-32766, 0, 0,-32766, - 0, 287, -471, 468,-32766,-32766,-32766,-32766, 7, 15, - -32766,-32766, 357, 1174, 555, 38,-32766, 406, 1202, 883, - -32766,-32766,-32766, 39,-32766,-32766,-32766, 697,-32766, 698, - 873,-32766, 864, 955, 932, 939,-32766,-32766,-32766, 929, - 940, 862,-32766,-32766, 927, 1032, 1035, 1036,-32766, 406, - 1033, 1034, 360, 1040, 420, 883, 810,-32766, 1227, 285, - 1245, 694, 1279, -111, -111, 626, 860, 32, 309, 356, - 676, 679, 683, 818, -111, -111, -111, -111, 685, 686, - -32766, 687, 688, 692, 678, 1206, 1174, 1283, 1285, 821, - 820, 829, 908,-32766,-32766,-32766, 9,-32766, 947,-32766, - 828,-32766, 873, 1284,-32766, 885, 907, 675, -4,-32766, - -32766,-32766, 909, 906, 1160,-32766,-32766, 892, -242, -242, - -242,-32766, 406, 902, 360, 26, 890, 937, 938, 1282, - -32766, 1239, 1228, 1246, 1252, -111, -111, 799, 873, 1255, - -267, 1205, -549, -523, -522, 859, -111, -111, -111, -111, - -521, 1, 27, 28, -241, -241, -241, 37, 41, 45, - 360, 70, 74, 75, 76, 77, 78, 79, 141, 0, - 150, -111, -111, 154, 243, 316, 342, 885, 343, 675, - -242, 859, -111, -111, -111, -111, 344, 345, 346, 347, - 348, 349, 508, 350, 1195, 1196, 1197, 1198, 1192, 1193, - 351, 352, 354, 421, 0, -265, 1199, 1194, -264, 17, - 18, 19, 20, 885, 22, 675, -241, 393, 71, 314, - 464, 311, 314, 465, 472, 475, 476, 477, 478, 482, - 483, 484, 492, 662, 1185, 1128, 1203, 1003, 1164, -269, - -103, 16, 21, 25, 284, 392, 582, 586, 613, 667, - 1132, 1180, 1129, 1258, 0, -485, 1145 + -153, -153, -153, 630, 24, -519, -519, 679, 424, 873, + -516, -516, 290, 291, 883, -153, 425, -153, 799, -153, + -519, -153, 708, 707, 426, -516, 790, 357, -111, 1089, + 1091, 359, -519, 427, 883, 139, 805, -516, 946, 126, + -516, 314, -111, -111, 680, 152, 1029, -521, 700, 646, + 647, 153, 859, -111, -111, -111, -111, 46, 287,-32766, + 873, 147, 393, 73, 681, 1175, 155, 314, 362, 363, + 367, 368,-32766,-32766,-32766, 31,-32766, -79,-32766, 122, + -32766, 708, 707,-32766, 885, 883, 674, -153,-32766,-32766, + -32766, 708, 707, 883,-32766,-32766, 123, 873, 128, 73, + -32766, 405, 129, 314, -516, -516, 142, 140, -75,-32766, + 156, -521, -521, 314, 26, 683, 157, 873, 158, -516, + 159, 288, 289, 690, -73, 899, 799, -72,-32766, -71, + 1206, -516, 622, 623, 1175, 885, -70, 674, -521, 72, + -69,-32766,-32766,-32766, -68,-32766, -67,-32766, 124,-32766, + -66, -47,-32766, -18, 146, 269, -51,-32766,-32766,-32766, + 275, 689, 692,-32766,-32766, 882, 145, 277, 873,-32766, + 405, 278, 885, 280, 674, 281, 873, 320,-32766, 108, + 506, 507, 144, 1196, 1197, 1198, 1199, 1193, 1194, 799, + 130, 654, 931, 1059, 674, 1200, 1195, 790, 268,-32766, + 667, 1289, 636, 637, 620, 1175,-32766, 71, 292, 295, + 311, 314,-32766,-32766,-32766, 542,-32766, 631,-32766, 1213, + -32766, 299, 536,-32766, 1215, 13, 901, 649,-32766,-32766, + -32766, 1203,-32766,-32766,-32766,-32766, -4, 883, 548, 1175, + -32766, 405, 444, 885, 472, 674,-32766,-32766,-32766,-32766, + -32766, 885,-32766, 674,-32766, 650, 798,-32766, 38, 694, + 0, 0,-32766,-32766,-32766,-32766, 0, 423,-32766,-32766, + 0, 1175, 915, 0,-32766, 405, 916, 0,-32766,-32766, + -32766, 0,-32766,-32766,-32766, 293,-32766, 0, 0,-32766, + 0, 0, -482, 467,-32766,-32766,-32766,-32766, -472, 7, + -32766,-32766, 15, 1175, 554, 356,-32766, 405, 860, 883, + -32766,-32766,-32766, 588,-32766,-32766,-32766, 39,-32766, 287, + 873,-32766, 697, 698, 864, 955,-32766,-32766,-32766, 932, + 939, 929,-32766,-32766, 940, 862, 927, 1033,-32766, 405, + 1036, 1037, 359, 1034, 419, 883, 1035,-32766, 1041, 285, + 810, -552, 1228, -111, -111, 1246, 1280, 625, -267, 32, + 309, 355, 675, 818, -111, -111, -111, -111, 678, 682, + -32766, 684, 685, 686, 687, 691, 1175, 677, -550, 1284, + 1286, 821, 820,-32766,-32766,-32766, 9,-32766, 829,-32766, + 908,-32766, 873, 947,-32766, 885, 828, 674, -4,-32766, + -32766,-32766, 1285, 907, 909,-32766,-32766, 906, -242, -242, + -242,-32766, 405, 1161, 359, 26, 892, 902, 890, 937, + -32766, 938, 1283, 1240, 1229, -111, -111, 799, 873, 1247, + 1253, 1206, 1256, -265, -524, 859, -111, -111, -111, -111, + -523, -522, 1, 27, -241, -241, -241, 28, 37, 41, + 359, 45, 70, 74, 75, 76, 77, 78, 79, 0, + 141, -111, -111, 150, 154, 243, 316, 885, 341, 674, + -242, 859, -111, -111, -111, -111, 342, 343, 344, 345, + 346, 347, 507, 348, 1196, 1197, 1198, 1199, 1193, 1194, + 349, 350, 351, 353, 420, 0, 1200, 1195, -264, 17, + 18, 19, 20, 885, 22, 674, -241, 392, 71, 314, + 463, 311, 314, 464, 471, 474, 475, 476, 477, 481, + 482, 483, 491, 661, 1186, 1129, 1204, 1004, 1165, -269, + -103, 16, 21, 25, 284, 391, 581, 585, 612, 666, + 1133, 1181, 1130, 1259, 0, -486, 1146, 0, 1207 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 119, 120, 121, 122, 9, 10, 11, 44, + 12, 13, 106, 1, 108, 31, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 117, 118, 1, 8, 57, 9, 10, 11, 137, - 138, 31, 128, 129, 130, 131, 106, 107, 31, 71, + 43, 117, 118, 9, 10, 57, 9, 10, 11, 137, + 138, 155, 128, 129, 130, 131, 106, 107, 8, 71, 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, - 33, 34, 35, 36, 8, 87, 88, 89, 90, 91, + 33, 34, 35, 36, 1, 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, 1, 80, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 8, 1, 85, 101, 80, 150, 151, + 132, 133, 30, 80, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 51, 1, 161, 101, 80, 150, 151, 152, 8, 154, 9, 10, 11, 2, 3, 4, 5, 6, 7, 164, 9, 10, 11, 12, 13, 123, 9, - 10, 11, 82, 31, 30, 85, 32, 33, 34, 35, + 10, 11, 80, 161, 30, 83, 32, 33, 34, 35, 36, 37, 38, 116, 117, 118, 119, 120, 121, 122, - 30, 37, 38, 9, 10, 11, 1, 14, 161, 9, - 10, 11, 9, 10, 11, 1, 146, 14, 155, 156, - 157, 57, 1, 161, 30, 162, 32, 33, 34, 35, - 30, 8, 32, 33, 34, 71, 72, 73, 74, 75, - 76, 77, 1, 31, 80, 31, 8, 147, 148, 97, - 164, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 30, 37, 38, 106, 107, 1, 9, 10, 11, 1, + 53, 54, 55, 116, 57, 1, 8, 14, 155, 156, + 157, 57, 9, 10, 11, 162, 69, 30, 116, 32, + 33, 119, 120, 121, 122, 71, 72, 73, 74, 75, + 76, 77, 8, 30, 80, 32, 33, 34, 35, 137, + 138, 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, 84, 1, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 164, + 126, 127, 128, 129, 130, 131, 132, 133, 84, 70, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 9, 9, 10, 11, 160, 150, 151, 152, 164, 154, 2, - 3, 4, 5, 6, 7, 84, 9, 10, 11, 12, + 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 164, 57, 9, - 9, 10, 11, 53, 54, 55, 161, 57, 8, 1, - 69, 159, 167, 159, 57, 161, 106, 107, 8, 69, - 159, 30, 1, 32, 33, 14, 116, 164, 71, 72, - 73, 74, 75, 76, 77, 97, 1, 80, 30, 70, - 159, 70, 161, 14, 87, 88, 89, 90, 91, 92, + 49, 50, 51, 52, 53, 54, 55, 116, 57, 14, + 9, 10, 11, 134, 135, 161, 8, 164, 160, 1, + 69, 167, 164, 159, 57, 161, 80, 8, 137, 138, + 1, 30, 1, 32, 33, 34, 1, 14, 71, 72, + 73, 74, 75, 76, 77, 31, 1, 80, 30, 70, + 30, 9, 10, 11, 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, 9, 10, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 8, 134, 135, 134, 135, 150, 151, 152, - 2, 3, 4, 5, 6, 7, 80, 82, 149, 51, - 12, 13, 101, 15, 116, 37, 38, 106, 80, 108, - 161, 8, 163, 116, 113, 75, 76, 116, 117, 118, - 119, 120, 121, 122, 123, 137, 138, 8, 80, 1, - 106, 83, 108, 80, 137, 138, 8, 8, 50, 51, - 9, 10, 11, 128, 56, 1, 58, 59, 60, 61, + 133, 8, 156, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 8, 134, 135, 8, 8, 150, 151, 152, + 2, 3, 4, 5, 6, 7, 97, 82, 149, 31, + 12, 13, 101, 15, 116, 8, 116, 106, 80, 108, + 161, 85, 163, 106, 113, 108, 8, 116, 117, 118, + 119, 120, 121, 122, 123, 137, 138, 137, 138, 14, + 9, 10, 11, 80, 82, 14, 8, 85, 50, 51, + 50, 51, 52, 128, 56, 1, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 70, 71, - 72, 73, 74, 162, 75, 76, 78, 79, 80, 116, - 82, 1, 156, 158, 86, 87, 88, 89, 163, 91, - 8, 93, 167, 95, 156, 8, 98, 99, 106, 161, - 108, 103, 104, 105, 106, 107, 1, 109, 110, 101, - 102, 31, 160, 115, 116, 8, 164, 1, 155, 156, - 157, 70, 124, 125, 126, 8, 70, 1, 70, 106, - 107, 134, 135, 8, 136, 137, 82, 139, 140, 141, - 142, 143, 144, 145, 1, 8, 149, 155, 14, 151, - 152, 8, 8, 155, 156, 157, 158, 1, 161, 8, + 72, 73, 74, 162, 159, 97, 78, 79, 80, 116, + 82, 1, 146, 158, 86, 87, 88, 89, 163, 91, + 31, 93, 167, 95, 156, 8, 98, 99, 106, 161, + 108, 103, 104, 105, 106, 107, 1, 109, 110, 147, + 148, 31, 160, 115, 116, 8, 164, 1, 155, 156, + 157, 70, 124, 125, 126, 8, 70, 1, 70, 37, + 38, 134, 135, 8, 136, 137, 82, 139, 140, 141, + 142, 143, 144, 145, 8, 106, 149, 108, 164, 151, + 152, 164, 164, 155, 156, 157, 158, 1, 161, 8, 163, 163, 82, 165, 166, 167, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 75, 76, 77, 106, 107, 134, 135, 31, 8, 84, + 75, 76, 77, 75, 76, 134, 135, 31, 8, 84, 134, 135, 134, 135, 1, 90, 8, 92, 82, 94, - 149, 96, 37, 38, 14, 149, 80, 149, 128, 59, - 60, 106, 161, 14, 1, 161, 106, 161, 108, 161, - 70, 167, 117, 118, 31, 14, 30, 70, 50, 51, - 52, 14, 127, 128, 129, 130, 131, 70, 158, 74, - 84, 111, 112, 163, 31, 80, 106, 167, 108, 159, - 31, 161, 87, 88, 89, 16, 91, 16, 93, 16, + 149, 96, 37, 38, 8, 149, 80, 149, 128, 59, + 60, 106, 161, 8, 1, 161, 8, 161, 159, 161, + 70, 167, 117, 118, 31, 14, 159, 70, 161, 75, + 76, 14, 127, 128, 129, 130, 131, 70, 158, 74, + 84, 101, 102, 163, 31, 80, 14, 167, 106, 107, + 106, 107, 87, 88, 89, 14, 91, 31, 93, 16, 95, 37, 38, 98, 159, 1, 161, 162, 103, 104, - 105, 37, 38, 16, 109, 110, 16, 84, 16, 163, - 115, 116, 16, 167, 134, 135, 16, 161, 16, 124, - 31, 134, 135, 167, 70, 31, 31, 84, 31, 149, - 31, 134, 135, 160, 31, 31, 82, 164, 74, 31, - 86, 161, 116, 31, 80, 159, 31, 161, 161, 154, + 105, 37, 38, 1, 109, 110, 16, 84, 16, 163, + 115, 116, 16, 167, 134, 135, 16, 161, 31, 124, + 16, 134, 135, 167, 70, 31, 16, 84, 16, 149, + 16, 134, 135, 31, 31, 38, 82, 31, 74, 31, + 86, 161, 111, 112, 80, 159, 31, 161, 161, 154, 31, 87, 88, 89, 31, 91, 31, 93, 161, 95, - 31, 31, 98, 137, 138, 31, 31, 103, 104, 105, - 31, 31, 31, 109, 110, 38, 69, 35, 84, 115, - 116, 35, 159, 35, 161, 35, 35, 70, 124, 57, - 136, 137, 82, 139, 140, 141, 142, 143, 144, 77, - 31, 80, 159, 83, 161, 151, 152, 89, 82, 74, - 94, 97, 85, 85, 90, 80, 128, 163, 113, 128, - 166, 167, 87, 88, 89, 92, 91, 96, 93, 116, - 95, 133, 146, 98, 128, 97, 100, 153, 103, 104, - 105, 97, 149, 74, 109, 110, 0, 1, 163, 80, - 115, 116, 100, 159, 153, 161, 87, 88, 89, 124, - 91, 114, 93, 154, 95, -1, 155, 98, -1, -1, - -1, -1, 103, 104, 105, 74, -1, 132, 109, 110, - -1, 80, -1, -1, 115, 116, 132, -1, 87, 88, - 89, -1, 91, 124, 93, 146, 95, -1, -1, 98, - -1, 158, 149, 102, 103, 104, 105, 74, 149, 149, - 109, 110, 149, 80, 81, 159, 115, 116, 160, 1, - 87, 88, 89, 159, 91, 124, 93, 159, 95, 159, + 31, 31, 98, 31, 31, 31, 31, 103, 104, 105, + 31, 31, 31, 109, 110, 31, 31, 35, 84, 115, + 116, 35, 159, 35, 161, 35, 84, 35, 124, 69, + 136, 137, 70, 139, 140, 141, 142, 143, 144, 82, + 31, 77, 159, 82, 161, 151, 152, 80, 57, 74, + 92, 83, 96, 100, 113, 80, 85, 163, 132, 114, + 166, 167, 87, 88, 89, 89, 91, 90, 93, 146, + 95, 132, 85, 98, 146, 97, 154, 94, 103, 104, + 105, 160, 116, 74, 109, 110, 0, 1, 153, 80, + 115, 116, 97, 159, 97, 161, 87, 88, 89, 124, + 91, 159, 93, 161, 95, 100, 155, 98, 159, 162, + -1, -1, 103, 104, 105, 74, -1, 128, 109, 110, + -1, 80, 128, -1, 115, 116, 128, -1, 87, 88, + 89, -1, 91, 124, 93, 133, 95, -1, -1, 98, + -1, -1, 149, 102, 103, 104, 105, 74, 149, 149, + 109, 110, 149, 80, 81, 149, 115, 116, 162, 1, + 87, 88, 89, 153, 91, 124, 93, 159, 95, 158, 84, 98, 159, 159, 159, 159, 103, 104, 105, 159, 159, 159, 109, 110, 159, 159, 159, 159, 115, 116, - 159, 159, 106, 159, 108, 1, 160, 124, 160, 113, - 160, 162, 160, 117, 118, 160, 162, 161, 161, 161, + 159, 159, 106, 159, 108, 1, 159, 124, 159, 113, + 160, 163, 160, 117, 118, 160, 160, 160, 164, 161, 161, 161, 161, 127, 128, 129, 130, 131, 161, 161, - 74, 161, 161, 161, 161, 166, 80, 162, 162, 162, + 74, 161, 161, 161, 161, 161, 80, 161, 163, 162, 162, 162, 162, 87, 88, 89, 150, 91, 162, 93, 162, 95, 84, 162, 98, 159, 162, 161, 162, 103, 104, 105, 162, 162, 162, 109, 110, 162, 100, 101, 102, 115, 116, 162, 106, 70, 162, 162, 162, 162, 124, 162, 162, 162, 162, 117, 118, 82, 84, 162, - 164, 86, 163, 163, 163, 127, 128, 129, 130, 131, + 162, 86, 162, 164, 163, 127, 128, 129, 130, 131, 163, 163, 163, 163, 100, 101, 102, 163, 163, 163, 106, 163, 163, 163, 163, 163, 163, 163, 163, -1, 163, 117, 118, 163, 163, 163, 163, 159, 163, 161, 162, 127, 128, 129, 130, 131, 163, 163, 163, 163, 163, 163, 137, 163, 139, 140, 141, 142, 143, 144, - 163, 163, 163, 163, -1, 164, 151, 152, 164, 164, + 163, 163, 163, 163, 163, -1, 151, 152, 164, 164, 164, 164, 164, 159, 164, 161, 162, 164, 163, 167, 164, 166, 167, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, -1, 165, 165 + 164, 164, 164, 164, -1, 165, 165, -1, 166 ); protected $actionBase = array( 0, -2, 154, 565, 876, 948, 984, 514, 53, 398, - 822, 307, 307, 67, 307, 307, 616, 673, 673, 724, - 673, 204, 653, 231, 231, 231, 625, 625, 625, 625, + 827, 307, 307, 67, 307, 307, 653, 724, 724, 732, + 724, 616, 673, 204, 204, 204, 625, 625, 625, 625, 694, 694, 831, 831, 863, 799, 765, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, @@ -504,58 +504,58 @@ class Php7 extends \PhpParser\ParserAbstract 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 211, 202, 288, 677, 1010, 1016, 1012, 1017, 1008, 1007, - 1011, 1013, 1018, 897, 899, 771, 900, 901, 902, 907, - 1014, 835, 1009, 1015, 291, 291, 291, 291, 291, 291, + 375, 519, 369, 701, 1010, 1016, 1012, 1017, 1008, 1007, + 1011, 1013, 1018, 900, 901, 775, 902, 907, 908, 910, + 1014, 837, 1009, 1015, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 340, 193, 432, 501, 501, 501, 501, 501, 501, 501, - 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, - 501, 501, 501, 160, 160, 160, 341, 684, 684, 190, - 184, 610, 47, 985, 985, 985, 985, 985, 985, 985, + 290, 491, 44, 382, 382, 382, 382, 382, 382, 382, + 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, + 382, 382, 382, 160, 160, 160, 187, 684, 684, 341, + 203, 610, 47, 985, 985, 985, 985, 985, 985, 985, 985, 985, 985, 144, 144, 7, 7, 7, 7, 7, - 371, -25, -25, -25, -25, 540, 385, 576, 358, 45, - 394, 638, 638, 656, 656, 367, 367, 367, 367, -78, - -78, -78, -66, 319, 457, 452, 60, 423, 586, 586, - 586, 586, 423, 423, 423, 423, 779, 849, 423, 423, - 423, 511, 516, 516, 518, 300, 300, 300, 516, 600, - 758, 90, 600, 90, 195, 418, 743, -40, 260, 412, - -107, 743, 617, 627, 603, 143, 741, 483, 741, 1006, - 757, 749, 719, 824, 853, 1019, 766, 895, 782, 896, - 321, 679, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, - 1005, 1005, 1005, 982, 438, 1006, 386, 982, 982, 982, - 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, - 590, 386, 410, 459, 386, 781, 438, 211, 783, 211, - 211, 211, 211, 943, 211, 211, 211, 211, 211, 211, - 956, 753, 37, 211, 202, 52, 52, 550, 131, 52, - 52, 52, 52, 211, 211, 211, 483, 762, 714, 537, - 731, 213, 762, 762, 762, 142, 76, 183, 135, 570, - 751, 751, 756, 918, 918, 751, 740, 751, 756, 926, - 751, 918, 773, 350, 597, 542, 577, 604, 918, 473, - 751, 751, 751, 751, 611, 751, 444, 360, 751, 751, - 775, 760, 784, 46, 918, 918, 918, 784, 567, 728, - 728, 728, 798, 800, 735, 759, 499, 489, 648, 314, - 767, 759, 759, 751, 585, 735, 759, 735, 759, 739, - 759, 759, 759, 735, 759, 751, 740, 547, 759, 722, - 640, 228, 759, 6, 928, 929, 30, 930, 924, 931, - 970, 932, 933, 839, 941, 925, 934, 920, 919, 770, - 699, 701, 789, 723, 917, 737, 737, 737, 910, 737, - 737, 737, 737, 737, 737, 737, 737, 699, 788, 793, - 718, 748, 945, 703, 717, 716, 834, 1020, 1021, 721, - 736, 943, 1000, 935, 786, 720, 980, 953, 829, 837, - 954, 955, 983, 1001, 1002, 855, 747, 856, 857, 826, - 957, 840, 737, 928, 933, 925, 934, 920, 919, 745, - 742, 734, 738, 733, 729, 725, 727, 755, 909, 715, - 828, 956, 911, 699, 830, 975, 836, 986, 989, 838, - 768, 750, 832, 858, 958, 960, 967, 841, 1003, 794, - 976, 906, 990, 774, 859, 991, 992, 993, 994, 860, - 847, 848, 850, 803, 754, 971, 761, 866, 361, 778, - 780, 969, 379, 942, 851, 868, 871, 995, 996, 997, - 874, 937, 804, 977, 746, 978, 974, 805, 806, 594, - 772, 776, 650, 659, 880, 881, 882, 940, 764, 752, - 810, 811, 1004, 885, 671, 812, 726, 891, 999, 730, - 732, 763, 852, 790, 777, 744, 968, 769, 815, 894, - 816, 817, 818, 998, 821, 0, 0, 0, 0, 0, + 371, -25, -25, -25, -25, 540, 385, 102, 576, 358, + 45, 377, 460, 460, 360, 231, 231, 231, 231, -78, + -78, -78, -66, 319, 457, -94, 396, 423, 586, 586, + 586, 586, 423, 423, 423, 423, 718, 1022, 423, 423, + 423, 511, 516, 516, 518, 147, 147, 147, 516, 499, + 777, 422, 499, 422, 194, 92, 756, -40, 87, 412, + 756, 617, 627, 198, 143, 741, 602, 741, 1006, 761, + 760, 717, 829, 856, 1019, 743, 897, 795, 899, 219, + 686, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, + 1005, 1005, 982, 552, 1006, 286, 982, 982, 982, 552, + 552, 552, 552, 552, 552, 552, 552, 552, 552, 661, + 286, 568, 614, 286, 782, 552, 375, 789, 375, 375, + 375, 375, 945, 375, 375, 375, 375, 375, 375, 957, + 762, -16, 375, 519, 12, 12, 527, 83, 12, 12, + 12, 12, 375, 375, 375, 602, 781, 725, 604, 800, + 448, 781, 781, 781, 438, 444, 193, 447, 452, 757, + 757, 751, 919, 919, 757, 747, 757, 751, 928, 757, + 919, 801, 359, 640, 567, 596, 648, 919, 478, 757, + 757, 757, 757, 656, 757, 467, 433, 757, 757, 716, + 769, 729, 60, 919, 919, 919, 729, 585, 792, 792, + 792, 803, 804, 731, 764, 547, 498, 668, 348, 727, + 764, 764, 757, 611, 731, 764, 731, 764, 712, 764, + 764, 764, 731, 764, 757, 747, 577, 764, 734, 665, + 224, 764, 6, 929, 930, 354, 931, 925, 932, 971, + 933, 934, 841, 942, 926, 935, 924, 920, 774, 703, + 720, 790, 783, 918, 750, 750, 750, 911, 750, 750, + 750, 750, 750, 750, 750, 750, 703, 711, 796, 779, + 766, 953, 722, 726, 713, 786, 1020, 1021, 784, 788, + 945, 1000, 937, 739, 730, 980, 954, 737, 839, 955, + 956, 983, 1001, 1002, 857, 752, 858, 859, 830, 958, + 847, 750, 929, 934, 926, 935, 924, 920, 759, 755, + 749, 753, 745, 738, 733, 736, 763, 855, 828, 832, + 957, 917, 703, 835, 975, 838, 986, 989, 840, 785, + 758, 836, 860, 960, 967, 968, 848, 1003, 798, 976, + 834, 990, 787, 866, 991, 992, 993, 994, 868, 850, + 851, 852, 805, 767, 909, 746, 871, 335, 778, 780, + 970, 363, 943, 853, 874, 880, 995, 996, 997, 881, + 940, 806, 977, 773, 978, 974, 810, 811, 485, 772, + 776, 671, 677, 882, 885, 891, 941, 770, 754, 812, + 815, 1004, 894, 692, 816, 740, 895, 999, 742, 744, + 748, 854, 793, 735, 768, 969, 771, 817, 896, 818, + 821, 822, 998, 824, 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, 458, 458, 458, 458, 458, 458, 307, @@ -584,31 +584,31 @@ class Php7 extends \PhpParser\ParserAbstract 291, 291, 291, 291, 291, 291, 291, 291, 291, 423, 423, 291, 291, 0, 291, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 291, 291, 291, 291, 291, - 291, 291, 773, 300, 300, 300, 300, 423, 423, 423, - 423, -88, -88, 300, 300, 423, 423, 423, 423, 423, - 423, 423, 423, 423, 0, 0, 0, 386, 90, 0, - 740, 740, 740, 740, 0, 0, 0, 0, 90, 90, + 291, 291, 801, 147, 147, 147, 147, 423, 423, 423, + 423, 423, -88, -88, 147, 147, 423, 423, 423, 423, + 423, 423, 423, 423, 0, 0, 0, 286, 422, 0, + 747, 747, 747, 747, 0, 0, 0, 0, 422, 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 386, 90, 0, 386, 0, 740, 740, 423, 773, - 773, 498, 0, 423, 0, 0, 0, 0, 386, 740, - 386, 438, 90, 438, 438, 52, 211, 498, 468, 468, - 468, 468, 0, 483, 773, 773, 773, 773, 773, 773, - 773, 773, 773, 773, 773, 740, 0, 773, 0, 740, - 740, 740, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 740, 0, 0, - 918, 0, 0, 0, 0, 751, 0, 0, 0, 0, - 0, 0, 751, 926, 0, 0, 0, 0, 0, 0, - 740, 0, 0, 0, 0, 0, 0, 0, 0, 737, - 768, 0, 768, 0, 737, 737, 737 + 0, 286, 422, 0, 286, 0, 747, 747, 423, 801, + 801, 314, 423, 0, 0, 0, 0, 286, 747, 286, + 552, 422, 552, 552, 12, 375, 314, 600, 600, 600, + 600, 0, 602, 801, 801, 801, 801, 801, 801, 801, + 801, 801, 801, 801, 747, 0, 801, 0, 747, 747, + 747, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 747, 0, 0, 919, + 0, 0, 0, 0, 757, 0, 0, 0, 0, 0, + 0, 757, 928, 0, 0, 0, 0, 0, 0, 747, + 0, 0, 0, 0, 0, 0, 0, 0, 750, 785, + 0, 785, 0, 750, 750, 750 ); protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 569, 569, 569, 569, - 32767,32767, 246, 103,32767,32767, 445, 363, 363, 363, - 32767,32767, 513, 513, 513, 513, 513, 513,32767,32767, - 32767,32767,32767,32767, 445,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 570, 570, 570, 570, + 32767,32767, 246, 103,32767,32767, 446, 364, 364, 364, + 32767,32767, 514, 514, 514, 514, 514, 514,32767,32767, + 32767,32767,32767,32767, 446,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, @@ -619,127 +619,139 @@ class Php7 extends \PhpParser\ParserAbstract 32767, 37, 7, 8, 10, 11, 50, 17,32767,32767, 32767,32767,32767, 103,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 562,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 563,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 449, 428, 429, 431, 432, 362, - 514, 568, 304, 565, 361, 146, 316, 306, 234, 307, - 250, 450, 251, 451, 454, 455, 211, 278, 358, 150, - 392, 446, 394, 444, 448, 393, 368, 373, 374, 375, - 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, - 366, 367, 447, 425, 424, 423, 390,32767,32767, 391, - 395, 365, 398,32767,32767,32767,32767,32767,32767,32767, - 32767, 103,32767, 396, 397, 414, 415, 412, 413, 416, - 32767, 417, 418, 419, 420,32767,32767,32767,32767, 342, - 340, 405, 406, 295, 295,32767,32767,32767,32767,32767, - 32767,32767,32767, 507, 422,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 450, 429, 430, 432, 433, 363, + 515, 569, 305, 566, 362, 146, 317, 307, 234, 308, + 250, 451, 251, 452, 455, 456, 211, 279, 359, 150, + 393, 447, 395, 445, 449, 394, 369, 374, 375, 376, + 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, + 367, 368, 448, 426, 425, 424, 391,32767,32767, 392, + 396, 366, 399,32767,32767,32767,32767,32767,32767,32767, + 32767, 103,32767, 397, 398, 415, 416, 413, 414, 417, + 32767, 418, 419, 420, 421,32767,32767, 296,32767,32767, + 343, 341, 406, 407, 296,32767,32767,32767,32767,32767, + 32767,32767,32767, 508, 423,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767, 103,32767, - 101, 509, 387, 389, 477, 400, 401, 399, 369,32767, - 484,32767, 103, 486,32767,32767,32767, 112,32767,32767, - 272,32767, 508,32767, 515, 515,32767, 470, 101, 194, - 32767, 194, 194,32767,32767,32767,32767,32767,32767,32767, - 576, 470, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111,32767, 194, 111,32767,32767,32767, 101, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 189,32767, 260, 262, 103, 530, 194,32767, 489,32767, + 101, 510, 388, 390, 478, 401, 402, 400, 370,32767, + 485,32767, 103, 487,32767,32767,32767, 112,32767,32767, + 32767, 509,32767, 516, 516,32767, 471, 101, 194,32767, + 194, 194,32767,32767,32767,32767,32767,32767,32767, 577, + 471, 111, 111, 111, 111, 111, 111, 111, 111, 111, + 111, 111,32767, 194, 111,32767,32767,32767, 101, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 189, + 32767, 260, 262, 103, 531, 194,32767, 490,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 482,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 470, 410, 139,32767, - 139, 515, 402, 403, 404, 472, 515, 515, 515,32767, - 32767,32767,32767, 487, 487, 101, 101, 101, 101, 482, - 32767,32767, 112, 100, 100, 100, 100, 100, 104, 102, - 32767,32767,32767,32767, 100,32767, 102, 102,32767,32767, - 217, 208, 215, 102,32767, 534, 535, 215, 102, 219, - 219, 219, 239, 239, 461, 297, 102, 100, 102, 102, - 196, 297, 297,32767, 102, 461, 297, 461, 297, 198, - 297, 297, 297, 461, 297,32767,32767, 102, 297, 210, - 100, 100, 297,32767,32767,32767, 472,32767,32767,32767, + 483,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 471, 411, 139,32767, 139, + 516, 403, 404, 405, 473, 516, 516, 516,32767,32767, + 32767,32767, 488, 488, 101, 101, 101, 101, 483,32767, + 32767, 112, 100, 100, 100, 100, 100, 104, 102,32767, + 32767,32767,32767, 100,32767, 102, 102,32767,32767, 217, + 208, 215, 102,32767, 535, 536, 215, 102, 219, 219, + 219, 239, 239, 462, 298, 102, 100, 102, 102, 196, + 298, 298,32767, 102, 462, 298, 462, 298, 198, 298, + 298, 298, 462, 298,32767,32767, 102, 298, 210, 100, + 100, 298,32767,32767,32767, 473,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 502,32767, 519, 532, 408, 409, 411, 517, 433, - 434, 435, 436, 437, 438, 439, 441, 564,32767, 476, - 32767,32767,32767,32767, 315, 574,32767, 574,32767,32767, + 503,32767, 520, 533, 409, 410, 412, 518, 434, 435, + 436, 437, 438, 439, 440, 442, 565,32767, 477,32767, + 32767,32767,32767, 316, 575,32767, 575,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 575,32767, 515,32767,32767, - 32767,32767, 407, 9, 76, 43, 44, 52, 58, 493, - 494, 495, 496, 490, 491, 497, 492,32767, 498, 540, - 32767,32767, 516, 567,32767,32767,32767,32767,32767,32767, - 139,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 502,32767, 137,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 515,32767,32767,32767, 292, - 294,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 515,32767,32767,32767, - 280, 282,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 277,32767,32767, 357, - 32767,32767,32767,32767, 336,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 152, 152, 3, 3, 318, - 152, 152, 152, 318, 152, 318, 318, 318, 152, 152, - 152, 152, 152, 152, 184, 254, 257, 239, 239, 152, - 328, 152 + 32767,32767,32767,32767, 576,32767, 516,32767,32767,32767, + 32767, 408, 9, 76, 43, 44, 52, 58, 494, 495, + 496, 497, 491, 492, 498, 493,32767, 499, 541,32767, + 32767, 517, 568,32767,32767,32767,32767,32767,32767, 139, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 503,32767, 137,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 516,32767,32767,32767, 293, 295, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 516,32767,32767,32767, 281, + 283,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 278,32767,32767, 358,32767, + 32767,32767,32767, 337,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 152, 152, 3, 3, 319, 152, + 152, 152, 319, 152, 319, 319, 319, 152, 152, 152, + 152, 152, 152, 272, 184, 254, 257, 239, 239, 152, + 329, 152 ); protected $goto = array( - 192, 192, 663, 417, 636, 911, 983, 990, 991, 411, - 302, 303, 324, 557, 308, 416, 325, 418, 615, 1005, - 671, 317, 317, 317, 317, 163, 163, 163, 163, 216, + 192, 192, 662, 416, 635, 911, 984, 991, 992, 410, + 302, 303, 323, 556, 308, 415, 324, 417, 614, 1006, + 670, 317, 317, 317, 317, 163, 163, 163, 163, 216, 193, 189, 189, 173, 175, 211, 189, 189, 189, 189, 189, 190, 190, 190, 190, 190, 190, 184, 185, 186, - 187, 188, 213, 211, 214, 515, 516, 407, 517, 519, - 520, 521, 522, 523, 524, 525, 526, 1074, 164, 165, + 187, 188, 213, 211, 214, 514, 515, 406, 516, 518, + 519, 520, 521, 522, 523, 524, 525, 1075, 164, 165, 166, 191, 167, 168, 169, 162, 170, 171, 172, 174, 210, 212, 215, 233, 236, 239, 240, 242, 253, 254, - 255, 256, 257, 258, 259, 261, 262, 263, 264, 271, - 272, 305, 306, 307, 412, 413, 414, 562, 217, 218, + 255, 256, 257, 258, 259, 261, 262, 263, 264, 272, + 273, 305, 306, 307, 411, 412, 413, 561, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 176, 232, 177, 194, 195, 196, 234, - 184, 185, 186, 187, 188, 213, 1074, 197, 178, 179, + 184, 185, 186, 187, 188, 213, 1075, 197, 178, 179, 180, 198, 194, 181, 235, 199, 161, 200, 201, 182, 202, 203, 204, 183, 205, 206, 207, 208, 209, 819, - 579, 601, 601, 541, 532, 815, 816, 1204, 1204, 1204, - 1204, 1204, 1204, 1204, 1204, 1204, 1204, 954, 928, 928, - 926, 928, 695, 817, 531, 963, 958, 381, 385, 542, - 580, 584, 383, 532, 541, 550, 551, 390, 560, 581, - 595, 596, 824, 793, 872, 867, 868, 881, 14, 825, - 869, 822, 870, 871, 823, 480, 850, 481, 875, 527, - 527, 527, 527, 488, 583, 1222, 1222, 791, 1026, 1022, - 1023, 1222, 1222, 1222, 1222, 1222, 1222, 1222, 1222, 1222, - 1222, 1220, 1220, 812, 812, 599, 633, 1220, 1220, 1220, - 1220, 1220, 1220, 1220, 1220, 1220, 1220, 313, 297, 1173, - 1173, 1173, 987, 282, 282, 282, 282, 987, 987, 987, - 987, 987, 987, 987, 987, 987, 447, 447, 432, 249, - 249, 1173, 554, 432, 432, 447, 1173, 1173, 1173, 1173, - 1046, 1047, 1173, 1173, 1173, 1254, 1254, 1254, 1254, 337, - 797, 1272, 1272, 930, 246, 246, 246, 246, 248, 250, - 888, 335, 876, 340, 877, 889, 1249, 1250, 1272, 518, - 518, 832, 1262, 340, 340, 518, 518, 518, 518, 518, - 518, 518, 518, 518, 518, 1275, 844, 340, 340, 831, - 340, 797, 1289, 797, 630, 1169, 644, 645, 646, 529, - 529, 529, 611, 612, 534, 1273, 1273, 340, 812, 951, - 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, - 432, 438, 1273, 432, 558, 593, 924, 924, 924, 924, - 379, 635, 438, 918, 925, 553, 1123, 1154, 904, 422, - 547, 1155, 1158, 905, 1159, 548, 326, 594, 1170, 696, - 614, 616, 1233, 634, 410, 807, 590, 653, 657, 965, - 661, 669, 961, 456, 1247, 1248, 809, 837, 1244, 1244, - 1244, 1171, 1230, 1231, 5, 656, 6, 533, 545, 389, - 968, 968, 533, 1166, 545, 834, 973, 382, 922, 397, - 670, 1256, 1256, 1256, 1256, 1011, 699, 561, 450, 451, - 452, 846, 842, 534, 457, 1280, 1281, 619, 619, 1015, - 1057, 395, 396, 995, 992, 993, 642, 1240, 643, 935, - 399, 400, 401, 461, 654, 0, 0, 0, 402, 0, - 840, 0, 333, 578, 1039, 0, 674, 660, 660, 0, - 666, 1037, 489, 588, 602, 605, 606, 607, 608, 627, - 628, 629, 673, 0, 0, 0, 1013, 893, 1062, 0, - 1242, 1242, 1013, 1168, 598, 252, 252, 0, 0, 970, - 269, 845, 833, 1010, 1014, 530, 530, 836, 0, 639, - 949, 933, 0, 338, 339, 830, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1165, 0, - 0, 0, 0, 0, 923, 0, 0, 0, 0, 0, + 578, 600, 600, 540, 531, 815, 816, 1205, 1205, 1205, + 1205, 1205, 1205, 1205, 1205, 1205, 1205, 954, 928, 928, + 926, 928, 695, 817, 530, 963, 958, 380, 384, 541, + 579, 583, 382, 531, 540, 549, 550, 389, 559, 580, + 594, 595, 824, 336, 872, 867, 868, 881, 14, 825, + 869, 822, 870, 871, 823, 339, 1274, 1274, 875, 528, + 528, 876, 528, 877, 793, 339, 339, 791, 1027, 1023, + 1024, 1155, 904, 1274, 850, 1156, 1159, 905, 1160, 339, + 339, 437, 339, 479, 1290, 480, 924, 924, 924, 924, + 930, 487, 437, 918, 925, 533, 598, 632, 339, 1174, + 1174, 988, 1174, 988, 282, 282, 282, 282, 988, 988, + 988, 988, 988, 988, 988, 988, 446, 446, 431, 249, + 249, 1174, 553, 431, 431, 446, 1174, 1174, 1174, 1174, + 1047, 1048, 1174, 1174, 1174, 1255, 1255, 1255, 1255, 313, + 297, 812, 812, 1234, 246, 246, 246, 246, 248, 250, + 888, 618, 577, 1040, 889, 673, 659, 659, 618, 665, + 1038, 1223, 1223, 996, 993, 994, 655, 1223, 1223, 1223, + 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1221, 1221, 1250, + 1251, 1273, 1273, 1221, 1221, 1221, 1221, 1221, 1221, 1221, + 1221, 1221, 1221, 629, 533, 643, 644, 645, 1273, 431, + 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, + 517, 517, 431, 409, 1276, 589, 517, 517, 517, 517, + 517, 517, 517, 517, 517, 517, 547, 334, 797, 546, + 696, 613, 615, 5, 633, 6, 593, 1263, 652, 656, + 965, 660, 668, 961, 587, 601, 604, 605, 606, 607, + 626, 627, 628, 672, 1169, 812, 610, 611, 1245, 1245, + 951, 1245, 832, 455, 1248, 1249, 532, 544, 797, 378, + 797, 532, 552, 544, 557, 592, 381, 844, 337, 338, + 831, 1257, 1257, 1257, 1257, 634, 560, 449, 450, 451, + 1124, 842, 394, 395, 1281, 1282, 325, 641, 421, 642, + 1170, 398, 399, 400, 809, 653, 837, 1241, 388, 401, + 922, 396, 669, 332, 834, 1167, 893, 1063, 973, 840, + 699, 1012, 846, 597, 526, 526, 526, 526, 970, 582, + 1016, 488, 845, 833, 1011, 1015, 836, 456, 638, 949, + 1058, 935, 933, 460, 830, 1014, 0, 0, 0, 1243, + 1243, 1014, 0, 1171, 0, 252, 252, 1166, 0, 0, + 807, 270, 0, 0, 0, 923, 529, 529, 0, 0, + 0, 0, 0, 0, 0, 0, 1172, 1231, 1232, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1056, 849, + 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, 1055, 849 + 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, 968, 968 ); protected $gotoCheck = array( 42, 42, 72, 65, 65, 87, 87, 87, 87, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 115, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 116, 9, 23, 23, 23, 23, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -754,90 +766,102 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 15, - 118, 104, 104, 75, 75, 25, 26, 104, 104, 104, + 119, 104, 104, 75, 75, 25, 26, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 25, 25, 25, 25, 25, 25, 27, 25, 25, 25, 58, 58, 58, 58, 58, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 15, 7, 15, 15, 15, 15, 75, 15, - 15, 15, 15, 15, 15, 143, 45, 143, 15, 103, - 103, 103, 103, 143, 103, 156, 156, 6, 15, 15, - 15, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 157, 157, 22, 22, 55, 55, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 155, 155, 72, - 72, 72, 72, 24, 24, 24, 24, 72, 72, 72, - 72, 72, 72, 72, 72, 72, 137, 137, 23, 5, - 5, 72, 158, 23, 23, 137, 72, 72, 72, 72, - 132, 132, 72, 72, 72, 9, 9, 9, 9, 93, - 12, 168, 168, 49, 5, 5, 5, 5, 5, 5, - 72, 165, 64, 14, 64, 72, 164, 164, 168, 159, - 159, 35, 167, 14, 14, 159, 159, 159, 159, 159, - 159, 159, 159, 159, 159, 168, 35, 14, 14, 35, - 14, 12, 14, 12, 84, 20, 84, 84, 84, 19, - 19, 19, 83, 83, 14, 169, 169, 14, 22, 99, + 75, 75, 15, 93, 15, 15, 15, 15, 75, 15, + 15, 15, 15, 15, 15, 14, 170, 170, 15, 19, + 19, 64, 19, 64, 7, 14, 14, 6, 15, 15, + 15, 78, 78, 170, 45, 78, 78, 78, 78, 14, + 14, 19, 14, 144, 14, 144, 19, 19, 19, 19, + 49, 144, 19, 19, 19, 14, 55, 55, 14, 72, + 72, 72, 72, 72, 24, 24, 24, 24, 72, 72, + 72, 72, 72, 72, 72, 72, 138, 138, 23, 5, + 5, 72, 159, 23, 23, 138, 72, 72, 72, 72, + 133, 133, 72, 72, 72, 9, 9, 9, 9, 156, + 156, 22, 22, 14, 5, 5, 5, 5, 5, 5, + 72, 112, 8, 8, 72, 8, 8, 8, 112, 8, + 8, 157, 157, 112, 112, 112, 14, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 158, 158, 165, + 165, 169, 169, 158, 158, 158, 158, 158, 158, 158, + 158, 158, 158, 84, 14, 84, 84, 84, 169, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 19, 169, 23, 2, 2, 19, 19, 19, 19, - 61, 63, 19, 19, 19, 100, 139, 78, 78, 108, - 9, 78, 78, 78, 78, 48, 29, 9, 20, 48, - 48, 48, 14, 48, 13, 20, 13, 48, 48, 48, - 48, 48, 48, 162, 162, 162, 18, 39, 118, 118, - 118, 20, 20, 20, 46, 14, 46, 9, 9, 28, - 103, 103, 9, 148, 9, 37, 106, 9, 89, 89, - 89, 118, 118, 118, 118, 117, 95, 9, 9, 9, - 9, 41, 9, 14, 145, 9, 9, 111, 111, 120, - 135, 80, 80, 111, 111, 111, 80, 118, 80, 92, - 80, 80, 80, 82, 80, -1, -1, -1, 80, -1, - 9, -1, 80, 8, 8, -1, 8, 8, 8, -1, - 8, 8, 9, 79, 79, 79, 79, 79, 79, 79, - 79, 79, 79, -1, -1, -1, 118, 17, 17, -1, - 118, 118, 118, 14, 17, 5, 5, -1, -1, 17, - 24, 16, 16, 16, 16, 24, 24, 17, -1, 17, - 17, 16, -1, 93, 93, 17, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, - -1, -1, -1, -1, 16, -1, -1, -1, -1, -1, + 160, 160, 23, 13, 169, 13, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 48, 166, 12, 9, + 48, 48, 48, 46, 48, 46, 9, 168, 48, 48, + 48, 48, 48, 48, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 14, 22, 83, 83, 119, 119, + 99, 119, 35, 163, 163, 163, 9, 9, 12, 61, + 12, 9, 100, 9, 2, 2, 9, 35, 93, 93, + 35, 119, 119, 119, 119, 63, 9, 9, 9, 9, + 140, 9, 80, 80, 9, 9, 29, 80, 109, 80, + 20, 80, 80, 80, 18, 80, 39, 119, 28, 80, + 89, 89, 89, 80, 37, 149, 17, 17, 106, 9, + 95, 118, 41, 17, 103, 103, 103, 103, 17, 103, + 121, 9, 16, 16, 16, 16, 17, 146, 17, 17, + 136, 92, 16, 82, 17, 119, -1, -1, -1, 119, + 119, 119, -1, 20, -1, 5, 5, 17, -1, -1, + 20, 24, -1, -1, -1, 16, 24, 24, -1, -1, + -1, -1, -1, -1, -1, -1, 20, 20, 20, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 16, 16, + -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, 16, 16 + -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 103, 103 ); protected $gotoBase = array( - 0, 0, -303, 0, 0, 278, 214, 194, 476, 7, - 0, 0, 15, 78, 27, -175, 87, 61, 118, 84, - -33, 0, -74, 18, 260, 161, 162, 179, 103, 111, - 0, 0, 0, 0, 0, -35, 0, 107, 0, 105, - 0, 26, -1, 0, 0, 204, -275, 0, -281, 281, - 0, 0, 0, 0, 0, 207, 0, 0, 144, 0, - 0, 340, 0, 143, 294, -234, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -168, 0, 0, -8, 150, - -10, 0, 16, -108, -339, 0, 0, -270, 0, 145, - 0, 0, 42, -164, 0, 52, 0, 0, 0, 326, - 344, 0, 0, 193, -76, 0, 81, 0, 115, 0, - 0, 184, 0, 0, 0, 17, 0, 86, 153, 0, - 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 21, 0, 0, 32, 0, 244, 0, 119, - 0, 0, 0, -260, 0, 30, 0, 0, 79, 0, - 0, 0, 0, 0, 0, -53, -12, 4, 255, 82, - 0, 0, 124, 0, -41, 283, 0, 293, 5, 59, - 0, 0 + 0, 0, -242, 0, 0, 278, 214, 215, 305, 7, + 0, 0, 103, 48, -71, -174, 59, 31, 166, -46, + 83, 0, -16, 18, 261, 161, 162, 179, 143, 171, + 0, 0, 0, 0, 0, 67, 0, 147, 0, 154, + 0, 58, -1, 0, 0, 222, -306, 0, -289, 228, + 0, 0, 0, 0, 0, 218, 0, 0, 144, 0, + 0, 389, 0, 207, 203, -234, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -167, 0, 0, -163, 62, + -18, 0, 47, -43, -329, 0, 0, -270, 0, 177, + 0, 0, 75, -259, 0, 87, 0, 0, 0, 387, + 391, 0, 0, 458, -76, 0, 124, 0, 0, 184, + 0, 0, 44, 0, 0, 0, 17, 0, 123, 153, + 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 20, 0, 0, 73, 0, 244, 0, + 182, 0, 0, 0, -231, 0, 74, 0, 0, 122, + 0, 0, 0, 0, 0, 0, -11, 84, 100, 255, + 133, 0, 0, 134, 0, -17, 359, 0, 368, 45, + -80, 0, 0 ); protected $gotoDefault = array( - -32768, 493, 703, 4, 704, 897, 780, 789, 577, 509, - 672, 334, 603, 408, 1238, 874, 1061, 559, 808, 1182, - 1190, 439, 811, 318, 320, 856, 857, 858, 386, 371, - 377, 384, 625, 604, 474, 843, 435, 835, 466, 838, - 434, 847, 160, 405, 491, 851, 3, 853, 536, 884, - 372, 861, 373, 649, 863, 544, 865, 866, 380, 387, - 388, 1066, 552, 600, 878, 241, 546, 879, 370, 880, - 887, 375, 378, 658, 446, 486, 479, 398, 1041, 587, - 622, 443, 460, 610, 609, 597, 459, 640, 403, 920, - 467, 444, 934, 336, 942, 701, 1073, 617, 469, 950, - 618, 957, 960, 510, 511, 458, 972, 273, 470, 1000, - 641, 985, 620, 998, 453, 1004, 436, 1012, 1226, 437, - 1016, 260, 1019, 274, 404, 419, 1024, 1025, 8, 1031, - 664, 665, 10, 270, 490, 1056, 659, 433, 1072, 423, - 1142, 1144, 538, 471, 1162, 1161, 652, 487, 1167, 1229, - 431, 512, 454, 304, 513, 296, 322, 301, 528, 283, - 323, 514, 455, 1235, 1243, 319, 29, 1263, 1274, 330, - 556, 592 + -32768, 492, 703, 4, 704, 897, 780, 789, 576, 508, + 671, 333, 602, 407, 1239, 874, 1062, 558, 808, 1183, + 1191, 438, 811, 318, 693, 856, 857, 858, 385, 370, + 376, 383, 624, 603, 473, 843, 434, 835, 465, 838, + 433, 847, 160, 404, 490, 851, 3, 853, 535, 884, + 371, 861, 372, 648, 863, 543, 865, 866, 379, 386, + 387, 1067, 551, 599, 878, 241, 545, 879, 369, 880, + 887, 374, 377, 657, 445, 485, 478, 397, 1042, 586, + 621, 442, 459, 609, 608, 596, 458, 639, 402, 920, + 466, 443, 934, 335, 942, 701, 1074, 616, 468, 950, + 617, 957, 960, 509, 510, 457, 972, 267, 975, 469, + 1001, 640, 986, 619, 999, 452, 1005, 435, 1013, 1227, + 436, 1017, 260, 1020, 274, 403, 418, 1025, 1026, 8, + 1032, 663, 664, 10, 271, 489, 1057, 658, 432, 1073, + 422, 1143, 1145, 537, 470, 1163, 1162, 651, 486, 1168, + 1230, 430, 511, 453, 304, 512, 296, 321, 301, 527, + 283, 322, 513, 454, 1236, 1244, 319, 29, 1264, 1275, + 329, 555, 591 ); protected $ruleToNonTerminal = array( @@ -868,16 +892,16 @@ class Php7 extends \PhpParser\ParserAbstract 93, 94, 94, 95, 95, 96, 97, 97, 98, 98, 99, 99, 54, 54, 50, 50, 101, 52, 52, 102, 51, 51, 53, 53, 63, 63, 63, 63, 79, 79, - 105, 105, 107, 107, 107, 107, 107, 106, 106, 106, - 109, 109, 109, 87, 87, 111, 111, 111, 110, 110, - 112, 112, 113, 113, 113, 108, 108, 80, 80, 80, - 20, 20, 114, 114, 115, 115, 115, 115, 59, 116, - 116, 117, 60, 119, 119, 120, 120, 121, 121, 84, - 122, 122, 122, 122, 122, 122, 127, 127, 128, 128, - 129, 129, 129, 129, 129, 130, 131, 131, 126, 126, - 123, 123, 125, 125, 133, 133, 132, 132, 132, 132, - 132, 132, 132, 124, 134, 134, 136, 135, 135, 61, - 100, 137, 137, 55, 55, 42, 42, 42, 42, 42, + 105, 105, 107, 107, 108, 108, 108, 108, 106, 106, + 106, 110, 110, 110, 87, 87, 112, 112, 112, 111, + 111, 113, 113, 114, 114, 114, 109, 109, 80, 80, + 80, 20, 20, 115, 115, 116, 116, 116, 116, 59, + 117, 117, 118, 60, 120, 120, 121, 121, 122, 122, + 84, 123, 123, 123, 123, 123, 123, 128, 128, 129, + 129, 130, 130, 130, 130, 130, 131, 132, 132, 127, + 127, 124, 124, 126, 126, 134, 134, 133, 133, 133, + 133, 133, 133, 133, 125, 135, 135, 137, 136, 136, + 61, 100, 138, 138, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -886,20 +910,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 144, 138, - 138, 143, 143, 146, 147, 147, 148, 149, 149, 149, - 19, 19, 72, 72, 72, 72, 139, 139, 139, 139, - 151, 151, 140, 140, 142, 142, 142, 145, 145, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, - 104, 159, 159, 159, 159, 141, 141, 141, 141, 141, - 141, 141, 141, 58, 58, 154, 154, 154, 154, 160, - 160, 150, 150, 150, 161, 161, 161, 161, 161, 161, - 73, 73, 65, 65, 65, 65, 118, 118, 118, 118, - 164, 163, 153, 153, 153, 153, 153, 153, 153, 152, - 152, 152, 162, 162, 162, 162, 103, 158, 166, 166, - 165, 165, 167, 167, 167, 167, 167, 167, 167, 167, - 155, 155, 155, 155, 169, 170, 168, 168, 168, 168, - 168, 168, 168, 168, 171, 171, 171, 171 + 42, 42, 42, 42, 42, 42, 42, 42, 42, 145, + 139, 139, 144, 144, 147, 148, 148, 149, 150, 150, + 150, 19, 19, 72, 72, 72, 72, 140, 140, 140, + 140, 152, 152, 141, 141, 143, 143, 143, 146, 146, + 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, + 158, 104, 160, 160, 160, 160, 142, 142, 142, 142, + 142, 142, 142, 142, 58, 58, 155, 155, 155, 155, + 161, 161, 151, 151, 151, 162, 162, 162, 162, 162, + 162, 73, 73, 65, 65, 65, 65, 119, 119, 119, + 119, 165, 164, 154, 154, 154, 154, 154, 154, 154, + 153, 153, 153, 163, 163, 163, 163, 103, 159, 167, + 167, 166, 166, 168, 168, 168, 168, 168, 168, 168, + 168, 156, 156, 156, 156, 170, 171, 169, 169, 169, + 169, 169, 169, 169, 169, 172, 172, 172, 172 ); protected $ruleToLength = array( @@ -930,38 +954,38 @@ class Php7 extends \PhpParser\ParserAbstract 2, 4, 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, - 1, 3, 0, 1, 1, 1, 1, 6, 8, 6, - 1, 2, 1, 1, 1, 1, 1, 1, 3, 3, - 3, 3, 1, 2, 1, 0, 1, 0, 2, 2, - 2, 4, 1, 3, 1, 2, 2, 3, 2, 3, - 1, 1, 2, 3, 1, 1, 3, 2, 0, 1, - 5, 5, 10, 3, 5, 1, 1, 3, 0, 2, - 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, - 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 2, 1, 3, 1, 1, 3, 2, - 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, - 1, 1, 2, 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, 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, 2, - 8, 9, 8, 9, 9, 10, 9, 10, 8, 3, - 2, 0, 4, 2, 1, 3, 2, 2, 2, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, - 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, - 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, - 1, 1, 3, 1, 1, 4, 4, 1, 4, 4, - 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, - 1, 3, 1, 4, 4, 3, 3, 3, 3, 1, - 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, - 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, - 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, - 3, 3, 6, 3, 1, 1, 2, 1 + 1, 3, 0, 2, 1, 1, 1, 1, 6, 8, + 6, 1, 2, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 3, 1, 2, 1, 0, 1, 0, 2, + 2, 2, 4, 1, 3, 1, 2, 2, 3, 2, + 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, + 1, 5, 5, 10, 3, 5, 1, 1, 3, 0, + 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, + 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, + 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, + 4, 1, 1, 2, 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, 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, + 2, 8, 9, 8, 9, 9, 10, 9, 10, 8, + 3, 2, 0, 4, 2, 1, 3, 2, 2, 2, + 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 0, 3, 0, 1, 1, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, + 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, + 1, 1, 1, 3, 1, 1, 4, 4, 1, 4, + 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, + 2, 1, 3, 1, 4, 4, 3, 3, 3, 3, + 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, + 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, + 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, + 3, 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks() { @@ -1814,292 +1838,292 @@ protected function initReduceCallbacks() { $this->semValue = 0; }, 273 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 274 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 275 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 276 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 277 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_READONLY; + }, + 278 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, - 278 => function ($stackPos) { + 279 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); $this->checkParam($this->semValue); }, - 279 => function ($stackPos) { + 280 => function ($stackPos) { $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, - 280 => function ($stackPos) { + 281 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 281 => function ($stackPos) { + 282 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 282 => function ($stackPos) { + 283 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 283 => function ($stackPos) { + 284 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 284 => function ($stackPos) { + 285 => function ($stackPos) { $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 285 => function ($stackPos) { + 286 => function ($stackPos) { $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, - 286 => function ($stackPos) { + 287 => function ($stackPos) { $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 287 => function ($stackPos) { + 288 => function ($stackPos) { $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 288 => function ($stackPos) { + 289 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 289 => function ($stackPos) { + 290 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 290 => function ($stackPos) { + 291 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 291 => function ($stackPos) { + 292 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 292 => function ($stackPos) { + 293 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 293 => function ($stackPos) { + 294 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 294 => function ($stackPos) { + 295 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 295 => function ($stackPos) { + 296 => function ($stackPos) { $this->semValue = null; }, - 296 => function ($stackPos) { + 297 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 297 => function ($stackPos) { + 298 => function ($stackPos) { $this->semValue = null; }, - 298 => function ($stackPos) { + 299 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 299 => function ($stackPos) { + 300 => function ($stackPos) { $this->semValue = null; }, - 300 => function ($stackPos) { + 301 => function ($stackPos) { $this->semValue = array(); }, - 301 => function ($stackPos) { + 302 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 302 => function ($stackPos) { + 303 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 303 => function ($stackPos) { + 304 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 304 => function ($stackPos) { + 305 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 305 => function ($stackPos) { + 306 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 306 => function ($stackPos) { + 307 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 307 => function ($stackPos) { + 308 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, - 308 => function ($stackPos) { + 309 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 309 => function ($stackPos) { + 310 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 310 => function ($stackPos) { + 311 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 311 => function ($stackPos) { + 312 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 312 => function ($stackPos) { + 313 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 313 => function ($stackPos) { + 314 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 314 => function ($stackPos) { + 315 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 315 => function ($stackPos) { + 316 => function ($stackPos) { $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 316 => function ($stackPos) { + 317 => function ($stackPos) { $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 317 => function ($stackPos) { + 318 => function ($stackPos) { if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, - 318 => function ($stackPos) { + 319 => function ($stackPos) { $this->semValue = array(); }, - 319 => function ($stackPos) { + 320 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 320 => function ($stackPos) { + 321 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 321 => function ($stackPos) { + 322 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 322 => function ($stackPos) { + 323 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, - 323 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, 324 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 325 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 326 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; /* will be skipped */ }, 327 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = array(); }, 328 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 329 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 330 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 331 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 332 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 333 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 334 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 335 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 336 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 337 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 338 => function ($stackPos) { - $this->semValue = null; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 339 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 340 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 341 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 342 => function ($stackPos) { $this->semValue = 0; }, 343 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 344 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 345 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 346 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 347 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 348 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 349 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 350 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, 351 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 352 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 353 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Stmt\Class_::MODIFIER_READONLY; }, 354 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 355 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 356 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 357 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 358 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 359 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 360 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 361 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 362 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 363 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 364 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 365 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 366 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 367 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); @@ -2108,430 +2132,430 @@ protected function initReduceCallbacks() { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 369 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 370 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 371 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 372 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 373 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 374 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 375 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 379 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 380 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 381 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 382 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 383 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 384 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 385 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 386 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 387 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 388 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 389 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 390 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 391 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 392 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 393 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 394 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 395 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 396 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 397 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 398 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 404 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 405 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 406 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 410 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 411 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 421 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 422 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 423 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 424 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 426 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 427 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 428 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 429 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 430 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 431 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 432 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 433 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 434 => function ($stackPos) { + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 435 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 435 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 441 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 441 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 443 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 444 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 445 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 446 => function ($stackPos) { + 447 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 447 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 448 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 450 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 452 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 452 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 455 => function ($stackPos) { + 456 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 457 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 457 => function ($stackPos) { + 458 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 458 => function ($stackPos) { + 459 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 459 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, 460 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 461 => function ($stackPos) { - $this->semValue = array(); + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 462 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = array(); }, 463 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 464 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 465 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 466 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 467 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 468 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 469 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 470 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 471 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 472 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 473 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 474 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 475 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 476 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 477 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 478 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 479 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 480 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 481 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 482 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 483 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = null; }, 484 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 485 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = array(); }, 486 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 487 => function ($stackPos) { - $this->semValue = array(); + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 488 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 489 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 490 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 491 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 492 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 493 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 494 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 495 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 496 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 497 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 498 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 499 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 500 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + }, + 501 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 501 => function ($stackPos) { + 502 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 502 => function ($stackPos) { + 503 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 503 => function ($stackPos) { + 504 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)]), $attrs); }, - 504 => function ($stackPos) { + 505 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, - 505 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, 506 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 507 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 508 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2540,28 +2564,28 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 510 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 511 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 512 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 513 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 514 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 515 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 517 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 518 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2576,34 +2600,34 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 522 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 523 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 524 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 525 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 526 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 527 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 528 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 529 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 530 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 531 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 532 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2612,165 +2636,168 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 534 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 536 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 537 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 538 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 539 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 540 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 541 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 543 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 544 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 545 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 546 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 547 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 548 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 549 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 551 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 552 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 553 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 554 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 555 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 556 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 557 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 558 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, 559 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + $this->semValue = $this->semStack[$stackPos]; }, 560 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 561 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 562 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 563 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 565 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 566 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 567 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 568 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 569 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 570 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = null; }, 571 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 572 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 573 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 574 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 575 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 576 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 577 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 578 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 579 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 580 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 581 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 582 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 583 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 584 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 585 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 586 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 587 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 588 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/test/code/parser/stmt/class/property_promotion.test b/test/code/parser/stmt/class/property_promotion.test index e75a324c44..92b9a91c54 100644 --- a/test/code/parser/stmt/class/property_promotion.test +++ b/test/code/parser/stmt/class/property_promotion.test @@ -6,7 +6,8 @@ class Point { public function __construct( public float $x = 0.0, protected array $y = [], - private string $z = 'hello' + private string $z = 'hello', + public readonly int $a = 0, ) {} } ----- @@ -81,6 +82,22 @@ array( value: hello ) ) + 3: Param( + attrGroups: array( + ) + flags: MODIFIER_PUBLIC | MODIFIER_READONLY (65) + type: Identifier( + name: int + ) + byRef: false + variadic: false + var: Expr_Variable( + name: a + ) + default: Scalar_LNumber( + value: 0 + ) + ) ) returnType: null stmts: array( diff --git a/test/code/prettyPrinter/stmt/property_promotion.test b/test/code/prettyPrinter/stmt/property_promotion.test index 036cf5e3b0..f5acaa2f4c 100644 --- a/test/code/prettyPrinter/stmt/property_promotion.test +++ b/test/code/prettyPrinter/stmt/property_promotion.test @@ -8,6 +8,7 @@ class Point public float $x = 0.0, protected array $y = [], private string $z = 'hello', + public readonly int $a = 0, ) { } } @@ -15,7 +16,7 @@ class Point !!php7 class Point { - public function __construct(public float $x = 0.0, protected array $y = [], private string $z = 'hello') + public function __construct(public float $x = 0.0, protected array $y = [], private string $z = 'hello', public readonly int $a = 0) { } } From 0483391aca4c9f0acaf8b48cd51945fbc7fa172a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 Sep 2021 18:35:05 +0200 Subject: [PATCH 031/428] Introduce ComplexType base class With the upcoming addition of intersection types, a type can be Identifier|Name|NullableType|UnionType|IntersectionType, which is quite the mouthful. Give NullableType and UnionType a common base class ComplexType, which does not have any behavior, but allows to write these types (and check them in instanceof) more easily. --- lib/PhpParser/Builder/Param.php | 4 ++-- lib/PhpParser/BuilderHelpers.php | 10 +++++----- lib/PhpParser/Node/ComplexType.php | 14 ++++++++++++++ lib/PhpParser/Node/Expr/ArrowFunction.php | 2 +- lib/PhpParser/Node/Expr/Closure.php | 2 +- lib/PhpParser/Node/FunctionLike.php | 2 +- lib/PhpParser/Node/NullableType.php | 4 +--- lib/PhpParser/Node/Param.php | 18 +++++++++--------- lib/PhpParser/Node/Stmt/ClassMethod.php | 2 +- lib/PhpParser/Node/Stmt/Function_.php | 2 +- lib/PhpParser/Node/Stmt/Property.php | 15 +++++++-------- lib/PhpParser/Node/UnionType.php | 4 +--- test/PhpParser/Builder/ParamTest.php | 2 +- test/PhpParser/BuilderHelpersTest.php | 2 +- 14 files changed, 46 insertions(+), 37 deletions(-) create mode 100644 lib/PhpParser/Node/ComplexType.php diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index 0ea91683c0..90bbb6036b 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -47,7 +47,7 @@ public function setDefault($value) { /** * Sets type for the parameter. * - * @param string|Node\Name|Node\NullableType|Node\UnionType $type Parameter type + * @param string|Node\Name|Node\ComplexType $type Parameter type * * @return $this The builder instance (for fluid interface) */ @@ -63,7 +63,7 @@ public function setType($type) { /** * Sets type for the parameter. * - * @param string|Node\Name|Node\NullableType|Node\UnionType $type Parameter type + * @param string|Node\Name|Node\ComplexType $type Parameter type * * @return $this The builder instance (for fluid interface) * diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index 835e929f8a..2f0e912739 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -2,13 +2,13 @@ namespace PhpParser; +use PhpParser\Node\ComplexType; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\NullableType; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; -use PhpParser\Node\UnionType; /** * This class defines helpers used in the implementation of builders. Don't use it directly. @@ -154,18 +154,18 @@ public static function normalizeNameOrExpr($name) { * In particular, builtin types become Identifiers, custom types become Names and nullables * are wrapped in NullableType nodes. * - * @param string|Name|Identifier|NullableType|UnionType $type The type to normalize + * @param string|Name|Identifier|ComplexType $type The type to normalize * - * @return Name|Identifier|NullableType|UnionType The normalized type + * @return Name|Identifier|ComplexType The normalized type */ public static function normalizeType($type) { if (!is_string($type)) { if ( !$type instanceof Name && !$type instanceof Identifier && - !$type instanceof NullableType && !$type instanceof UnionType + !$type instanceof ComplexType ) { throw new \LogicException( - 'Type must be a string, or an instance of Name, Identifier, NullableType or UnionType' + 'Type must be a string, or an instance of Name, Identifier or ComplexType' ); } return $type; diff --git a/lib/PhpParser/Node/ComplexType.php b/lib/PhpParser/Node/ComplexType.php new file mode 100644 index 0000000000..9505532ae9 --- /dev/null +++ b/lib/PhpParser/Node/ComplexType.php @@ -0,0 +1,14 @@ +attributes = $attributes; diff --git a/lib/PhpParser/Node/UnionType.php b/lib/PhpParser/Node/UnionType.php index c8f45235d6..61c2d81062 100644 --- a/lib/PhpParser/Node/UnionType.php +++ b/lib/PhpParser/Node/UnionType.php @@ -2,9 +2,7 @@ namespace PhpParser\Node; -use PhpParser\NodeAbstract; - -class UnionType extends NodeAbstract +class UnionType extends ComplexType { /** @var (Identifier|Name)[] Types */ public $types; diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index 05b3c912ca..9fe8160785 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -177,7 +177,7 @@ public function testVoidTypeError() { public function testInvalidTypeError() { $this->expectException(\LogicException::class); - $this->expectExceptionMessage('Type must be a string, or an instance of Name, Identifier, NullableType or UnionType'); + $this->expectExceptionMessage('Type must be a string, or an instance of Name, Identifier or ComplexType'); $this->createParamBuilder('test')->setType(new \stdClass); } diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index da6348f6db..c848dbb6f1 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -146,7 +146,7 @@ public function testNormalizeType() { $this->assertEquals($intIdentifier, $nullable->type); $this->expectException(\LogicException::class); - $this->expectExceptionMessage('Type must be a string, or an instance of Name, Identifier, NullableType or UnionType'); + $this->expectExceptionMessage('Type must be a string, or an instance of Name, Identifier or ComplexType'); BuilderHelpers::normalizeType(1); } From ace6c67a8a5622f1253f417e99809fe4766597ea Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 2 Sep 2021 18:25:16 +0200 Subject: [PATCH 032/428] Add support for intersection types --- CHANGELOG.md | 4 +- grammar/php7.y | 15 + lib/PhpParser/BuilderHelpers.php | 1 + lib/PhpParser/Node/IntersectionType.php | 30 + lib/PhpParser/NodeVisitor/NameResolver.php | 2 +- lib/PhpParser/Parser/Php7.php | 1569 +++++++++-------- lib/PhpParser/PrettyPrinter/Standard.php | 4 + lib/PhpParser/PrettyPrinterAbstract.php | 1 + test/PhpParser/BuilderHelpersTest.php | 3 + .../NodeVisitor/NameResolverTest.php | 2 + .../formatPreservation/listInsertion.test | 10 + .../stmt/function/intersectionTypes.test | 104 ++ .../stmt/intersection_types.test | 18 + 13 files changed, 977 insertions(+), 786 deletions(-) create mode 100644 lib/PhpParser/Node/IntersectionType.php create mode 100644 test/code/parser/stmt/function/intersectionTypes.test create mode 100644 test/code/prettyPrinter/stmt/intersection_types.test diff --git a/CHANGELOG.md b/CHANGELOG.md index 18b70004e0..b2a06de8dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ Version 4.12.1-dev ------------------ -Nothing yet. +### Added + +* [PHP 8.1] Added support for intersection types using a new `IntersectionType` node. Version 4.12.0 (2021-07-21) --------------------------- diff --git a/grammar/php7.y b/grammar/php7.y index e7030d63b9..f3ea2dece7 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -561,6 +561,7 @@ type_expr: type { $$ = $1; } | '?' type { $$ = Node\NullableType[$2]; } | union_type { $$ = Node\UnionType[$1]; } + | intersection_type { $$ = Node\IntersectionType[$1]; } ; type: @@ -584,10 +585,24 @@ union_type_without_static: | union_type_without_static '|' type_without_static { push($1, $3); } ; +intersection_type: + type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type { init($1, $3); } + | intersection_type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type + { push($1, $3); } +; + +intersection_type_without_static: + type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static + { init($1, $3); } + | intersection_type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static + { push($1, $3); } +; + type_expr_without_static: type_without_static { $$ = $1; } | '?' type_without_static { $$ = Node\NullableType[$2]; } | union_type_without_static { $$ = Node\UnionType[$1]; } + | intersection_type_without_static { $$ = Node\IntersectionType[$1]; } ; optional_type_without_static: diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index 2f0e912739..c0e3fbd764 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -5,6 +5,7 @@ use PhpParser\Node\ComplexType; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; +use PhpParser\Node\IntersectionType; use PhpParser\Node\Name; use PhpParser\Node\NullableType; use PhpParser\Node\Scalar; diff --git a/lib/PhpParser/Node/IntersectionType.php b/lib/PhpParser/Node/IntersectionType.php new file mode 100644 index 0000000000..9208e1392d --- /dev/null +++ b/lib/PhpParser/Node/IntersectionType.php @@ -0,0 +1,30 @@ +attributes = $attributes; + $this->types = $types; + } + + public function getSubNodeNames() : array { + return ['types']; + } + + public function getType() : string { + return 'IntersectionType'; + } +} diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index 79bbc4577a..8e259c57b6 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -189,7 +189,7 @@ private function resolveType($node) { $node->type = $this->resolveType($node->type); return $node; } - if ($node instanceof Node\UnionType) { + if ($node instanceof Node\UnionType || $node instanceof Node\IntersectionType) { foreach ($node->types as &$type) { $type = $this->resolveType($type); } diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 6f5fa20a07..bc8c34c71f 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -18,16 +18,16 @@ class Php7 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1189; - protected $gotoTableSize = 697; + protected $actionTableSize = 1195; + protected $gotoTableSize = 583; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 414; - protected $numNonLeafStates = 702; + protected $YY2TBLSTATE = 418; + protected $numNonLeafStates = 708; protected $symbolToName = array( "EOF", @@ -244,125 +244,126 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $action = array( - 131, 132, 133, 562, 134, 135, 0, 714, 715, 716, - 136, 36, 826, 903, 827, 461,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 100, 101, 102, 103, 104, 1052, 1053, - 1054, 1051, 1050, 1049, 1055, 708, 707,-32766,-32766,-32766, + 131, 132, 133, 568, 134, 135, 0, 720, 721, 722, + 136, 36, 832, 909, 833, 467,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 100, 101, 102, 103, 104, 1064, 1065, + 1066, 1063, 1062, 1061, 1067, 714, 713,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 538, 539,-32766,-32766, 717,-32766,-32766,-32766, 989, - 990, 798, 914, 439, 440, 441, 364, 365, 2, 265, - 137, 390, 721, 722, 723, 724, 408,-32766, 414,-32766, - -32766,-32766,-32766,-32766, 982, 725, 726, 727, 728, 729, - 730, 731, 732, 733, 734, 735, 755, 563, 756, 757, - 758, 759, 747, 748, 330, 331, 750, 751, 736, 737, - 738, 740, 741, 742, 340, 782, 783, 784, 785, 786, - 787, 743, 744, 564, 565, 776, 767, 765, 766, 779, - 762, 763, 279, 414, 566, 567, 761, 568, 569, 570, - 571, 572, 573, 590, -567, 462, 484, 790, 764, 574, - 575, -567, 138,-32766,-32766,-32766, 131, 132, 133, 562, - 134, 135, 1003, 714, 715, 716, 136, 36, 1044,-32766, - -32766,-32766, 1287, 688,-32766, 1288,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 1052, 1053, 1054, 1051, 1050, 1049, 1055, - -32766, 708, 707, 366, 365, 1242,-32766,-32766,-32766, -564, - 105, 106, 107, 408, 268, 883, -564, 238, 1177, 1176, - 1178, 717,-32766,-32766,-32766, 1030, 108,-32766,-32766,-32766, - -32766, 978, 977, 976, 979, 265, 137, 390, 721, 722, - 723, 724, 12,-32766, 414,-32766,-32766,-32766,-32766, 989, - 990, 725, 726, 727, 728, 729, 730, 731, 732, 733, - 734, 735, 755, 563, 756, 757, 758, 759, 747, 748, - 330, 331, 750, 751, 736, 737, 738, 740, 741, 742, - 340, 782, 783, 784, 785, 786, 787, 743, 744, 564, - 565, 776, 767, 765, 766, 779, 762, 763, 873, 315, - 566, 567, 761, 568, 569, 570, 571, 572, 573,-32766, - 81, 82, 83, -567, 764, 574, 575, -567, 138, 739, - 709, 710, 711, 712, 713, 1262, 714, 715, 716, 752, - 753, 35, 1261, 84, 85, 86, 87, 88, 89, 90, + -32767, 544, 545,-32766,-32766, 723,-32766,-32766,-32766, 996, + 997, 804, 920, 445, 446, 447, 368, 369, 2, 265, + 137, 394, 727, 728, 729, 730, 412,-32766, 418,-32766, + -32766,-32766,-32766,-32766, 988, 731, 732, 733, 734, 735, + 736, 737, 738, 739, 740, 741, 761, 569, 762, 763, + 764, 765, 753, 754, 334, 335, 756, 757, 742, 743, + 744, 746, 747, 748, 344, 788, 789, 790, 791, 792, + 793, 749, 750, 570, 571, 782, 773, 771, 772, 785, + 768, 769, 281, 418, 572, 573, 767, 574, 575, 576, + 577, 578, 579, 596, -573, 468, 490, 796, 770, 580, + 581, -573, 138,-32766,-32766,-32766, 131, 132, 133, 568, + 134, 135, 1015, 720, 721, 722, 136, 36, 1056,-32766, + -32766,-32766, 1299, 694,-32766, 1300,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 1064, 1065, 1066, 1063, 1062, 1061, 1067, + -32766, 714, 713, 370, 369, 1254,-32766,-32766,-32766, -570, + 105, 106, 107, 412, 268, 889, -570, 238, 1189, 1188, + 1190, 723,-32766,-32766,-32766, 1042, 108,-32766,-32766,-32766, + -32766, 984, 983, 982, 985, 265, 137, 394, 727, 728, + 729, 730, 12,-32766, 418,-32766,-32766,-32766,-32766, 996, + 997, 731, 732, 733, 734, 735, 736, 737, 738, 739, + 740, 741, 761, 569, 762, 763, 764, 765, 753, 754, + 334, 335, 756, 757, 742, 743, 744, 746, 747, 748, + 344, 788, 789, 790, 791, 792, 793, 749, 750, 570, + 571, 782, 773, 771, 772, 785, 768, 769, 879, 319, + 572, 573, 767, 574, 575, 576, 577, 578, 579,-32766, + 81, 82, 83, -573, 770, 580, 581, -573, 138, 745, + 715, 716, 717, 718, 719, 1274, 720, 721, 722, 758, + 759, 35, 1273, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 987, 268, 148, - -32766,-32766,-32766, 447, 448, 80, 33, -264, -564, 1002, - 108, 314, -564, 885, 717, 674, 795, 127, 989, 990, - 584,-32766, 1028,-32766,-32766,-32766, 801, 149, 718, 719, - 720, 721, 722, 723, 724, -88, 1182, 788, 276, -518, - 279,-32766,-32766,-32766, 725, 726, 727, 728, 729, 730, - 731, 732, 733, 734, 735, 755, 778, 756, 757, 758, - 759, 747, 748, 749, 777, 750, 751, 736, 737, 738, - 740, 741, 742, 781, 782, 783, 784, 785, 786, 787, - 743, 744, 745, 746, 776, 767, 765, 766, 779, 762, - 763, 143, 796, 754, 760, 761, 768, 769, 771, 770, - 772, 773, -306, -518, -518, -193, -192, 764, 775, 774, - 48, 49, 50, 493, 51, 52, 237, 799, -518, -86, - 53, 54, -111, 55, 987, 251,-32766, -111, 792, -111, - -518, 534, -524, -344, 294, -344, 298, -111, -111, -111, - -111, -111, -111, -111, -111, 989, 990, 989, 990, 151, - -32766,-32766,-32766, 1175, 799, 125, 300, 1277, 56, 57, - 102, 103, 104, -111, 58, 1202, 59, 244, 245, 60, - 61, 62, 63, 64, 65, 66, 67, -517, 26, 266, - 68, 428, 494, -320, 800, -86, 1208, 1209, 495, 1173, - 799, 1182, 1214, 287, 1206, 40, 23, 496, 73, 497, - 945, 498, 314, 499, 794, 312, 500, 501, 375, 676, - 11, 42, 43, 429, 361, 360, 883, 44, 502, 34, - 247, -16, -558, 352, 326, 327, -558, 1182, 1177, 1176, - 1178, -519, 503, 504, 505, 328, -516, 1258, 47, 708, - 707, -517, -517, 354, 506, 507, 799, 1196, 1197, 1198, - 1199, 1193, 1194, 286, 358, 826, -517, 827, -306, 1200, - 1195, -193, -192, 1177, 1176, 1178, 287, 883, -517, 373, - -523, 69, 799, 310, 311, 314, 30, 109, 110, 111, + 101, 102, 103, 104, 105, 106, 107, 994, 268, 148, + -32766,-32766,-32766, 453, 454, 80, 33, -264, -570, 1014, + 108, 318, -570, 891, 723, 680, 801, 127, 996, 997, + 590,-32766, 1040,-32766,-32766,-32766, 807, 149, 724, 725, + 726, 727, 728, 729, 730, -88, 1194, 794, 276, -524, + 281,-32766,-32766,-32766, 731, 732, 733, 734, 735, 736, + 737, 738, 739, 740, 741, 761, 784, 762, 763, 764, + 765, 753, 754, 755, 783, 756, 757, 742, 743, 744, + 746, 747, 748, 787, 788, 789, 790, 791, 792, 793, + 749, 750, 751, 752, 782, 773, 771, 772, 785, 768, + 769, 143, 802, 760, 766, 767, 774, 775, 777, 776, + 778, 779, -312, -524, -524, -193, -192, 770, 781, 780, + 48, 49, 50, 499, 51, 52, 237, 805, -524, -86, + 53, 54, -111, 55, 994, 251,-32766, -111, 798, -111, + -524, 540, -530, -350, 298, -350, 302, -111, -111, -111, + -111, -111, -111, -111, -111, 996, 997, 996, 997, 151, + -32766,-32766,-32766, 1187, 805, 125, 304, 1289, 56, 57, + 102, 103, 104, -111, 58, 1214, 59, 244, 245, 60, + 61, 62, 63, 64, 65, 66, 67, -523, 26, 266, + 68, 434, 500, -326, 806, -86, 1220, 1221, 501, 1185, + 805, 1194, 1226, 291, 1218, 40, 23, 502, 73, 503, + 951, 504, 318, 505, 800, 152, 506, 507, 277, 682, + 278, 42, 43, 435, 365, 364, 889, 44, 508, 34, + 247, -16, -564, 356, 330, 316, -564, 1194, 1189, 1188, + 1190, -525, 509, 510, 511, 331, -522, 1270, 47, 714, + 713, -523, -523, 332, 512, 513, 805, 1208, 1209, 1210, + 1211, 1205, 1206, 290, 358, 282, -523, 283, -312, 1212, + 1207, -193, -192, 1189, 1188, 1190, 291, 889, -523, 362, + -529, 69, 805, 314, 315, 318, 30, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - -153, -153, -153, 630, 24, -519, -519, 679, 424, 873, - -516, -516, 290, 291, 883, -153, 425, -153, 799, -153, - -519, -153, 708, 707, 426, -516, 790, 357, -111, 1089, - 1091, 359, -519, 427, 883, 139, 805, -516, 946, 126, - -516, 314, -111, -111, 680, 152, 1029, -521, 700, 646, - 647, 153, 859, -111, -111, -111, -111, 46, 287,-32766, - 873, 147, 393, 73, 681, 1175, 155, 314, 362, 363, - 367, 368,-32766,-32766,-32766, 31,-32766, -79,-32766, 122, - -32766, 708, 707,-32766, 885, 883, 674, -153,-32766,-32766, - -32766, 708, 707, 883,-32766,-32766, 123, 873, 128, 73, - -32766, 405, 129, 314, -516, -516, 142, 140, -75,-32766, - 156, -521, -521, 314, 26, 683, 157, 873, 158, -516, - 159, 288, 289, 690, -73, 899, 799, -72,-32766, -71, - 1206, -516, 622, 623, 1175, 885, -70, 674, -521, 72, - -69,-32766,-32766,-32766, -68,-32766, -67,-32766, 124,-32766, - -66, -47,-32766, -18, 146, 269, -51,-32766,-32766,-32766, - 275, 689, 692,-32766,-32766, 882, 145, 277, 873,-32766, - 405, 278, 885, 280, 674, 281, 873, 320,-32766, 108, - 506, 507, 144, 1196, 1197, 1198, 1199, 1193, 1194, 799, - 130, 654, 931, 1059, 674, 1200, 1195, 790, 268,-32766, - 667, 1289, 636, 637, 620, 1175,-32766, 71, 292, 295, - 311, 314,-32766,-32766,-32766, 542,-32766, 631,-32766, 1213, - -32766, 299, 536,-32766, 1215, 13, 901, 649,-32766,-32766, - -32766, 1203,-32766,-32766,-32766,-32766, -4, 883, 548, 1175, - -32766, 405, 444, 885, 472, 674,-32766,-32766,-32766,-32766, - -32766, 885,-32766, 674,-32766, 650, 798,-32766, 38, 694, - 0, 0,-32766,-32766,-32766,-32766, 0, 423,-32766,-32766, - 0, 1175, 915, 0,-32766, 405, 916, 0,-32766,-32766, - -32766, 0,-32766,-32766,-32766, 293,-32766, 0, 0,-32766, - 0, 0, -482, 467,-32766,-32766,-32766,-32766, -472, 7, - -32766,-32766, 15, 1175, 554, 356,-32766, 405, 860, 883, - -32766,-32766,-32766, 588,-32766,-32766,-32766, 39,-32766, 287, - 873,-32766, 697, 698, 864, 955,-32766,-32766,-32766, 932, - 939, 929,-32766,-32766, 940, 862, 927, 1033,-32766, 405, - 1036, 1037, 359, 1034, 419, 883, 1035,-32766, 1041, 285, - 810, -552, 1228, -111, -111, 1246, 1280, 625, -267, 32, - 309, 355, 675, 818, -111, -111, -111, -111, 678, 682, - -32766, 684, 685, 686, 687, 691, 1175, 677, -550, 1284, - 1286, 821, 820,-32766,-32766,-32766, 9,-32766, 829,-32766, - 908,-32766, 873, 947,-32766, 885, 828, 674, -4,-32766, - -32766,-32766, 1285, 907, 909,-32766,-32766, 906, -242, -242, - -242,-32766, 405, 1161, 359, 26, 892, 902, 890, 937, - -32766, 938, 1283, 1240, 1229, -111, -111, 799, 873, 1247, - 1253, 1206, 1256, -265, -524, 859, -111, -111, -111, -111, - -523, -522, 1, 27, -241, -241, -241, 28, 37, 41, - 359, 45, 70, 74, 75, 76, 77, 78, 79, 0, - 141, -111, -111, 150, 154, 243, 316, 885, 341, 674, - -242, 859, -111, -111, -111, -111, 342, 343, 344, 345, - 346, 347, 507, 348, 1196, 1197, 1198, 1199, 1193, 1194, - 349, 350, 351, 353, 420, 0, 1200, 1195, -264, 17, - 18, 19, 20, 885, 22, 674, -241, 392, 71, 314, - 463, 311, 314, 464, 471, 474, 475, 476, 477, 481, - 482, 483, 491, 661, 1186, 1129, 1204, 1004, 1165, -269, - -103, 16, 21, 25, 284, 391, 581, 585, 612, 666, - 1133, 1181, 1130, 1259, 0, -486, 1146, 0, 1207 + -153, -153, -153, 636, 24, -525, -525, 685, 377, 879, + -522, -522, 294, 295, 889, -153, 430, -153, 805, -153, + -525, -153, 714, 713, 431, -522, 796, 361, -111, 1101, + 1103, 363, -525, 432, 889, 139, 433, -522, 952, 126, + -522, 318, -111, -111, 686, 811, 379, -527, 11, 832, + 153, 833, 865, -111, -111, -111, -111, 46, 291,-32766, + 879, 652, 653, 73, 687, 1187, 1041, 318, 706, 147, + 397, 155,-32766,-32766,-32766, 31,-32766, -79,-32766, 122, + -32766, 714, 713,-32766, 891, 889, 680, -153,-32766,-32766, + -32766, 714, 713, 889,-32766,-32766, 123, 879, 128, 73, + -32766, 409, 129, 318, -522, -522, 142, 140, -75,-32766, + 156, -527, -527, 318, 26, 689, 157, 879, 158, -522, + 159, 292, 293, 696, 366, 367, 805, -73,-32766, -72, + 1218, -522, 371, 372, 1187, 891, -71, 680, -527, 72, + -70,-32766,-32766,-32766, -69,-32766, -68,-32766, 124,-32766, + 628, 629,-32766, -67, -66, -47, -51,-32766,-32766,-32766, + -18, 146, 269,-32766,-32766, 275, 695, 698, 879,-32766, + 409, 888, 891, 145, 680, 280, 879, 905,-32766, 279, + 512, 513, 284, 1208, 1209, 1210, 1211, 1205, 1206, 324, + 130, 144, 937, 285, 680, 1212, 1207, 108, 268,-32766, + 796, 805,-32766, 660, 637, 1187, 655, 71, 673, 1071, + 315, 318,-32766,-32766,-32766, 1301,-32766, 299,-32766, 626, + -32766, 429, 542,-32766,-32766, 921, 554, 922,-32766,-32766, + -32766, 1225, 548,-32766,-32766,-32766, -4, 889, -488, 1187, + -32766, 409, 642, 891, 297, 680,-32766,-32766,-32766,-32766, + -32766, 891,-32766, 680,-32766, 13, 1227,-32766, 450, 478, + 643, 907,-32766,-32766,-32766,-32766, 656, -478,-32766,-32766, + 0, 1187, 0, 0,-32766, 409, 0, 296,-32766,-32766, + -32766, 303,-32766,-32766,-32766, 0,-32766, 0, 804,-32766, + 0, 0, 0, 473,-32766,-32766,-32766,-32766, 0, 7, + -32766,-32766, 15, 1187, 560, 594,-32766, 409, 1215, 889, + -32766,-32766,-32766, 360,-32766,-32766,-32766, 816,-32766, -267, + 879,-32766, 38, 291, 0, 0,-32766,-32766,-32766, 39, + 703, 704,-32766,-32766, 870, 961, 938, 945,-32766, 409, + 935, 946, 363, 868, 425, 889, 933,-32766, 1045, 289, + 1240, 1048, 1049, -111, -111, 1046, 1047, 1053, -558, 1258, + 1292, 631, 0, 824, -111, -111, -111, -111, 32, 313, + -32766, 359, 681, 684, 688, 690, 1187, 691, 692, 693, + 697, 683, 318,-32766,-32766,-32766, 9,-32766, 700,-32766, + 866,-32766, 879, 1296,-32766, 891, 1298, 680, -4,-32766, + -32766,-32766, 827, 826, 835,-32766,-32766, 914, -242, -242, + -242,-32766, 409, 953, 363, 26, 834, 1297, 913, 915, + -32766, 912, 1173, 898, 908, -111, -111, 805, 879, 896, + 943, 1218, 944, 1295, 1252, 865, -111, -111, -111, -111, + 1241, 1259, 1265, 1268, -241, -241, -241, -556, -530, -529, + 363, -528, 1, 27, 28, 37, 41, 45, 70, 0, + 74, -111, -111, 75, 76, 77, 78, 891, 79, 680, + -242, 865, -111, -111, -111, -111, 141, 150, 154, 243, + 320, 345, 513, 346, 1208, 1209, 1210, 1211, 1205, 1206, + 347, 348, 349, 350, 351, 352, 1212, 1207, 353, 354, + 355, 357, 426, 891, -265, 680, -241, -264, 71, 0, + 17, 315, 318, 18, 19, 20, 22, 396, 469, 470, + 477, 480, 481, 482, 483, 487, 488, 489, 497, 667, + 1198, 1141, 1216, 1016, 1177, -269, -103, 16, 21, 25, + 288, 395, 587, 591, 618, 672, 1145, 1193, 1142, 1271, + 0, -492, 1158, 0, 1219 ); protected $actionCheck = array( @@ -421,12 +422,12 @@ class Php7 extends \PhpParser\ParserAbstract 62, 63, 64, 65, 66, 67, 68, 70, 70, 71, 72, 73, 74, 162, 159, 97, 78, 79, 80, 116, 82, 1, 146, 158, 86, 87, 88, 89, 163, 91, - 31, 93, 167, 95, 156, 8, 98, 99, 106, 161, - 108, 103, 104, 105, 106, 107, 1, 109, 110, 147, + 31, 93, 167, 95, 156, 14, 98, 99, 35, 161, + 37, 103, 104, 105, 106, 107, 1, 109, 110, 147, 148, 31, 160, 115, 116, 8, 164, 1, 155, 156, 157, 70, 124, 125, 126, 8, 70, 1, 70, 37, 38, 134, 135, 8, 136, 137, 82, 139, 140, 141, - 142, 143, 144, 145, 8, 106, 149, 108, 164, 151, + 142, 143, 144, 145, 8, 35, 149, 37, 164, 151, 152, 164, 164, 155, 156, 157, 158, 1, 161, 8, 163, 163, 82, 165, 166, 167, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, @@ -434,62 +435,63 @@ class Php7 extends \PhpParser\ParserAbstract 134, 135, 134, 135, 1, 90, 8, 92, 82, 94, 149, 96, 37, 38, 8, 149, 80, 149, 128, 59, 60, 106, 161, 8, 1, 161, 8, 161, 159, 161, - 70, 167, 117, 118, 31, 14, 159, 70, 161, 75, - 76, 14, 127, 128, 129, 130, 131, 70, 158, 74, - 84, 101, 102, 163, 31, 80, 14, 167, 106, 107, - 106, 107, 87, 88, 89, 14, 91, 31, 93, 16, + 70, 167, 117, 118, 31, 8, 106, 70, 108, 106, + 14, 108, 127, 128, 129, 130, 131, 70, 158, 74, + 84, 75, 76, 163, 31, 80, 159, 167, 161, 101, + 102, 14, 87, 88, 89, 14, 91, 31, 93, 16, 95, 37, 38, 98, 159, 1, 161, 162, 103, 104, 105, 37, 38, 1, 109, 110, 16, 84, 16, 163, 115, 116, 16, 167, 134, 135, 16, 161, 31, 124, 16, 134, 135, 167, 70, 31, 16, 84, 16, 149, - 16, 134, 135, 31, 31, 38, 82, 31, 74, 31, - 86, 161, 111, 112, 80, 159, 31, 161, 161, 154, + 16, 134, 135, 31, 106, 107, 82, 31, 74, 31, + 86, 161, 106, 107, 80, 159, 31, 161, 161, 154, 31, 87, 88, 89, 31, 91, 31, 93, 161, 95, - 31, 31, 98, 31, 31, 31, 31, 103, 104, 105, - 31, 31, 31, 109, 110, 31, 31, 35, 84, 115, - 116, 35, 159, 35, 161, 35, 84, 35, 124, 69, - 136, 137, 70, 139, 140, 141, 142, 143, 144, 82, - 31, 77, 159, 82, 161, 151, 152, 80, 57, 74, - 92, 83, 96, 100, 113, 80, 85, 163, 132, 114, - 166, 167, 87, 88, 89, 89, 91, 90, 93, 146, - 95, 132, 85, 98, 146, 97, 154, 94, 103, 104, - 105, 160, 116, 74, 109, 110, 0, 1, 153, 80, - 115, 116, 97, 159, 97, 161, 87, 88, 89, 124, - 91, 159, 93, 161, 95, 100, 155, 98, 159, 162, - -1, -1, 103, 104, 105, 74, -1, 128, 109, 110, - -1, 80, 128, -1, 115, 116, 128, -1, 87, 88, - 89, -1, 91, 124, 93, 133, 95, -1, -1, 98, - -1, -1, 149, 102, 103, 104, 105, 74, 149, 149, - 109, 110, 149, 80, 81, 149, 115, 116, 162, 1, - 87, 88, 89, 153, 91, 124, 93, 159, 95, 158, - 84, 98, 159, 159, 159, 159, 103, 104, 105, 159, + 111, 112, 98, 31, 31, 31, 31, 103, 104, 105, + 31, 31, 31, 109, 110, 31, 31, 31, 84, 115, + 116, 31, 159, 31, 161, 37, 84, 38, 124, 35, + 136, 137, 35, 139, 140, 141, 142, 143, 144, 35, + 31, 70, 159, 37, 161, 151, 152, 69, 57, 74, + 80, 82, 85, 77, 90, 80, 94, 163, 92, 82, + 166, 167, 87, 88, 89, 83, 91, 114, 93, 113, + 95, 128, 85, 98, 116, 128, 153, 128, 103, 104, + 105, 146, 89, 74, 109, 110, 0, 1, 149, 80, + 115, 116, 96, 159, 133, 161, 87, 88, 89, 124, + 91, 159, 93, 161, 95, 97, 146, 98, 97, 97, + 100, 154, 103, 104, 105, 74, 100, 149, 109, 110, + -1, 80, -1, -1, 115, 116, -1, 132, 87, 88, + 89, 132, 91, 124, 93, -1, 95, -1, 155, 98, + -1, -1, -1, 102, 103, 104, 105, 74, -1, 149, + 109, 110, 149, 80, 81, 153, 115, 116, 160, 1, + 87, 88, 89, 149, 91, 124, 93, 160, 95, 164, + 84, 98, 159, 158, -1, -1, 103, 104, 105, 159, 159, 159, 109, 110, 159, 159, 159, 159, 115, 116, 159, 159, 106, 159, 108, 1, 159, 124, 159, 113, - 160, 163, 160, 117, 118, 160, 160, 160, 164, 161, - 161, 161, 161, 127, 128, 129, 130, 131, 161, 161, - 74, 161, 161, 161, 161, 161, 80, 161, 163, 162, - 162, 162, 162, 87, 88, 89, 150, 91, 162, 93, + 160, 159, 159, 117, 118, 159, 159, 159, 163, 160, + 160, 160, -1, 127, 128, 129, 130, 131, 161, 161, + 74, 161, 161, 161, 161, 161, 80, 161, 161, 161, + 161, 161, 167, 87, 88, 89, 150, 91, 162, 93, 162, 95, 84, 162, 98, 159, 162, 161, 162, 103, 104, 105, 162, 162, 162, 109, 110, 162, 100, 101, 102, 115, 116, 162, 106, 70, 162, 162, 162, 162, 124, 162, 162, 162, 162, 117, 118, 82, 84, 162, - 162, 86, 162, 164, 163, 127, 128, 129, 130, 131, - 163, 163, 163, 163, 100, 101, 102, 163, 163, 163, + 162, 86, 162, 162, 162, 127, 128, 129, 130, 131, + 162, 162, 162, 162, 100, 101, 102, 163, 163, 163, 106, 163, 163, 163, 163, 163, 163, 163, 163, -1, 163, 117, 118, 163, 163, 163, 163, 159, 163, 161, 162, 127, 128, 129, 130, 131, 163, 163, 163, 163, 163, 163, 137, 163, 139, 140, 141, 142, 143, 144, - 163, 163, 163, 163, 163, -1, 151, 152, 164, 164, - 164, 164, 164, 159, 164, 161, 162, 164, 163, 167, + 163, 163, 163, 163, 163, 163, 151, 152, 163, 163, + 163, 163, 163, 159, 164, 161, 162, 164, 163, -1, 164, 166, 167, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, -1, 165, 165, -1, 166 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + -1, 165, 165, -1, 166 ); protected $actionBase = array( 0, -2, 154, 565, 876, 948, 984, 514, 53, 398, - 827, 307, 307, 67, 307, 307, 653, 724, 724, 732, + 837, 307, 307, 67, 307, 307, 653, 724, 724, 732, 724, 616, 673, 204, 204, 204, 625, 625, 625, 625, 694, 694, 831, 831, 863, 799, 765, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, @@ -504,9 +506,9 @@ class Php7 extends \PhpParser\ParserAbstract 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 375, 519, 369, 701, 1010, 1016, 1012, 1017, 1008, 1007, - 1011, 1013, 1018, 900, 901, 775, 902, 907, 908, 910, - 1014, 837, 1009, 1015, 291, 291, 291, 291, 291, 291, + 375, 519, 369, 701, 1016, 1022, 1018, 1023, 1014, 1013, + 1017, 1019, 1024, 911, 912, 782, 918, 919, 920, 921, + 1020, 841, 1015, 1021, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 290, 491, 44, 382, 382, 382, 382, 382, 382, 382, @@ -515,52 +517,52 @@ class Php7 extends \PhpParser\ParserAbstract 203, 610, 47, 985, 985, 985, 985, 985, 985, 985, 985, 985, 985, 144, 144, 7, 7, 7, 7, 7, 371, -25, -25, -25, -25, 540, 385, 102, 576, 358, - 45, 377, 460, 460, 360, 231, 231, 231, 231, -78, - -78, -78, -66, 319, 457, -94, 396, 423, 586, 586, - 586, 586, 423, 423, 423, 423, 718, 1022, 423, 423, - 423, 511, 516, 516, 518, 147, 147, 147, 516, 499, - 777, 422, 499, 422, 194, 92, 756, -40, 87, 412, - 756, 617, 627, 198, 143, 741, 602, 741, 1006, 761, - 760, 717, 829, 856, 1019, 743, 897, 795, 899, 219, - 686, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, - 1005, 1005, 982, 552, 1006, 286, 982, 982, 982, 552, - 552, 552, 552, 552, 552, 552, 552, 552, 552, 661, - 286, 568, 614, 286, 782, 552, 375, 789, 375, 375, - 375, 375, 945, 375, 375, 375, 375, 375, 375, 957, - 762, -16, 375, 519, 12, 12, 527, 83, 12, 12, - 12, 12, 375, 375, 375, 602, 781, 725, 604, 800, - 448, 781, 781, 781, 438, 444, 193, 447, 452, 757, - 757, 751, 919, 919, 757, 747, 757, 751, 928, 757, - 919, 801, 359, 640, 567, 596, 648, 919, 478, 757, - 757, 757, 757, 656, 757, 467, 433, 757, 757, 716, - 769, 729, 60, 919, 919, 919, 729, 585, 792, 792, - 792, 803, 804, 731, 764, 547, 498, 668, 348, 727, - 764, 764, 757, 611, 731, 764, 731, 764, 712, 764, - 764, 764, 731, 764, 757, 747, 577, 764, 734, 665, - 224, 764, 6, 929, 930, 354, 931, 925, 932, 971, - 933, 934, 841, 942, 926, 935, 924, 920, 774, 703, - 720, 790, 783, 918, 750, 750, 750, 911, 750, 750, - 750, 750, 750, 750, 750, 750, 703, 711, 796, 779, - 766, 953, 722, 726, 713, 786, 1020, 1021, 784, 788, - 945, 1000, 937, 739, 730, 980, 954, 737, 839, 955, - 956, 983, 1001, 1002, 857, 752, 858, 859, 830, 958, - 847, 750, 929, 934, 926, 935, 924, 920, 759, 755, - 749, 753, 745, 738, 733, 736, 763, 855, 828, 832, - 957, 917, 703, 835, 975, 838, 986, 989, 840, 785, - 758, 836, 860, 960, 967, 968, 848, 1003, 798, 976, - 834, 990, 787, 866, 991, 992, 993, 994, 868, 850, - 851, 852, 805, 767, 909, 746, 871, 335, 778, 780, - 970, 363, 943, 853, 874, 880, 995, 996, 997, 881, - 940, 806, 977, 773, 978, 974, 810, 811, 485, 772, - 776, 671, 677, 882, 885, 891, 941, 770, 754, 812, - 815, 1004, 894, 692, 816, 740, 895, 999, 742, 744, - 748, 854, 793, 735, 768, 969, 771, 817, 896, 818, - 821, 822, 998, 824, 0, 0, 0, 0, 0, 0, + 45, 377, 460, 460, 360, 231, 231, 231, 231, 231, + 231, -78, -78, -78, -78, -78, -66, 319, 457, -94, + 396, 423, 586, 586, 586, 586, 423, 423, 423, 423, + 750, 1028, 423, 423, 423, 511, 516, 516, 518, 147, + 147, 147, 516, 583, 777, 422, 583, 422, 194, 92, + 748, -40, 87, 412, 748, 617, 627, 198, 143, 773, + 658, 773, 1012, 757, 764, 717, 838, 860, 1025, 800, + 908, 806, 910, 219, 686, 1011, 1011, 1011, 1011, 1011, + 1011, 1011, 1011, 1011, 1011, 1011, 855, 552, 1012, 286, + 855, 855, 855, 552, 552, 552, 552, 552, 552, 552, + 552, 552, 552, 679, 286, 568, 626, 286, 794, 552, + 375, 758, 375, 375, 375, 375, 958, 375, 375, 375, + 375, 375, 375, 970, 769, -16, 375, 519, 12, 12, + 547, 83, 12, 12, 12, 12, 375, 375, 375, 658, + 781, 713, 666, 792, 448, 781, 781, 781, 438, 444, + 193, 447, 570, 523, 580, 760, 760, 767, 929, 929, + 760, 759, 760, 767, 934, 760, 929, 805, 359, 648, + 577, 611, 656, 929, 478, 760, 760, 760, 760, 665, + 760, 467, 433, 760, 760, 785, 774, 789, 60, 929, + 929, 929, 789, 596, 751, 751, 751, 811, 812, 746, + 771, 567, 498, 677, 348, 779, 771, 771, 760, 640, + 746, 771, 746, 771, 747, 771, 771, 771, 746, 771, + 760, 759, 585, 771, 734, 668, 224, 771, 6, 935, + 937, 354, 940, 932, 941, 979, 942, 943, 851, 956, + 933, 945, 931, 930, 780, 703, 720, 790, 729, 928, + 768, 768, 768, 925, 768, 768, 768, 768, 768, 768, + 768, 768, 703, 788, 804, 733, 783, 960, 722, 726, + 725, 868, 1026, 1027, 737, 739, 958, 1006, 953, 803, + 730, 992, 967, 866, 848, 968, 969, 993, 1007, 1008, + 871, 761, 874, 880, 797, 971, 852, 768, 935, 943, + 933, 945, 931, 930, 763, 762, 753, 755, 749, 745, + 736, 738, 770, 924, 835, 830, 970, 926, 703, 839, + 986, 847, 994, 995, 850, 801, 772, 840, 881, 972, + 975, 976, 853, 1009, 810, 989, 795, 996, 802, 882, + 997, 998, 999, 1000, 885, 854, 856, 857, 815, 754, + 980, 786, 891, 335, 787, 796, 978, 363, 957, 858, + 894, 895, 1001, 1002, 1003, 896, 954, 816, 990, 752, + 991, 983, 817, 818, 485, 784, 778, 541, 676, 897, + 899, 900, 955, 775, 766, 821, 822, 1010, 901, 697, + 824, 740, 902, 1005, 742, 744, 756, 859, 793, 743, + 798, 977, 776, 827, 907, 829, 832, 833, 1004, 836, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 458, 458, 458, 458, 458, 458, 307, - 307, 307, 307, 0, 0, 307, 0, 0, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 458, + 458, 458, 458, 458, 458, 307, 307, 307, 307, 0, + 0, 307, 0, 0, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, @@ -574,41 +576,42 @@ class Php7 extends \PhpParser\ParserAbstract 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 291, 291, 291, 291, 291, 291, 291, 291, + 458, 458, 458, 458, 458, 458, 458, 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 291, 291, 291, 291, 291, 291, 291, 291, + 0, 0, 0, 0, 0, 0, 0, 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 423, - 423, 291, 291, 0, 291, 423, 423, 423, 423, 423, - 423, 423, 423, 423, 423, 291, 291, 291, 291, 291, - 291, 291, 801, 147, 147, 147, 147, 423, 423, 423, - 423, 423, -88, -88, 147, 147, 423, 423, 423, 423, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 423, 423, 291, 291, 0, + 291, 423, 423, 423, 423, 423, 423, 423, 423, 423, + 423, 291, 291, 291, 291, 291, 291, 291, 805, 147, + 147, 147, 147, 423, 423, 423, 423, 423, -88, -88, + 147, 147, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 0, 0, 0, 286, 422, 0, - 747, 747, 747, 747, 0, 0, 0, 0, 422, 422, + 759, 759, 759, 759, 0, 0, 0, 0, 422, 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 286, 422, 0, 286, 0, 747, 747, 423, 801, - 801, 314, 423, 0, 0, 0, 0, 286, 747, 286, - 552, 422, 552, 552, 12, 375, 314, 600, 600, 600, - 600, 0, 602, 801, 801, 801, 801, 801, 801, 801, - 801, 801, 801, 801, 747, 0, 801, 0, 747, 747, - 747, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 747, 0, 0, 919, - 0, 0, 0, 0, 757, 0, 0, 0, 0, 0, - 0, 757, 928, 0, 0, 0, 0, 0, 0, 747, - 0, 0, 0, 0, 0, 0, 0, 0, 750, 785, - 0, 785, 0, 750, 750, 750 + 0, 286, 422, 0, 286, 0, 759, 759, 423, 805, + 805, 314, 423, 0, 0, 0, 0, 286, 759, 286, + 552, 422, 552, 552, 12, 375, 314, 608, 608, 608, + 608, 0, 658, 805, 805, 805, 805, 805, 805, 805, + 805, 805, 805, 805, 759, 0, 805, 0, 759, 759, + 759, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 759, 0, 0, 929, + 0, 0, 0, 0, 760, 0, 0, 0, 0, 0, + 0, 760, 934, 0, 0, 0, 0, 0, 0, 759, + 0, 0, 0, 0, 0, 0, 0, 0, 768, 801, + 0, 801, 0, 768, 768, 768 ); protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 570, 570, 570, 570, - 32767,32767, 246, 103,32767,32767, 446, 364, 364, 364, - 32767,32767, 514, 514, 514, 514, 514, 514,32767,32767, - 32767,32767,32767,32767, 446,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 576, 576, 576, 576, + 32767,32767, 246, 103,32767,32767, 452, 370, 370, 370, + 32767,32767, 520, 520, 520, 520, 520, 520,32767,32767, + 32767,32767,32767,32767, 452,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, @@ -619,140 +622,129 @@ class Php7 extends \PhpParser\ParserAbstract 32767, 37, 7, 8, 10, 11, 50, 17,32767,32767, 32767,32767,32767, 103,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 563,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 569,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 456, 435, 436, 438, 439, 369, + 521, 575, 311, 572, 368, 146, 323, 313, 234, 314, + 250, 457, 251, 458, 461, 462, 211, 279, 365, 150, + 399, 453, 401, 451, 455, 400, 375, 380, 381, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 373, 374, 454, 432, 431, 430, 397,32767,32767, 398, + 402, 372, 405,32767,32767,32767,32767,32767,32767,32767, + 32767, 103,32767, 403, 404, 421, 422, 419, 420, 423, + 32767, 424, 425, 426, 427,32767,32767, 302,32767,32767, + 349, 347, 412, 413, 302,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 514, 429,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 450, 429, 430, 432, 433, 363, - 515, 569, 305, 566, 362, 146, 317, 307, 234, 308, - 250, 451, 251, 452, 455, 456, 211, 279, 359, 150, - 393, 447, 395, 445, 449, 394, 369, 374, 375, 376, - 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, - 367, 368, 448, 426, 425, 424, 391,32767,32767, 392, - 396, 366, 399,32767,32767,32767,32767,32767,32767,32767, - 32767, 103,32767, 397, 398, 415, 416, 413, 414, 417, - 32767, 418, 419, 420, 421,32767,32767, 296,32767,32767, - 343, 341, 406, 407, 296,32767,32767,32767,32767,32767, - 32767,32767,32767, 508, 423,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 103,32767, - 101, 510, 388, 390, 478, 401, 402, 400, 370,32767, - 485,32767, 103, 487,32767,32767,32767, 112,32767,32767, - 32767, 509,32767, 516, 516,32767, 471, 101, 194,32767, - 194, 194,32767,32767,32767,32767,32767,32767,32767, 577, - 471, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111,32767, 194, 111,32767,32767,32767, 101, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 189, - 32767, 260, 262, 103, 531, 194,32767, 490,32767,32767, + 32767,32767, 103,32767, 101, 516, 394, 396, 484, 407, + 408, 406, 376,32767, 491,32767, 103, 493,32767,32767, + 32767, 112,32767,32767,32767, 515,32767, 522, 522,32767, + 477, 101, 194,32767, 194, 194,32767,32767,32767,32767, + 32767,32767,32767, 583, 477, 111, 111, 111, 111, 111, + 111, 111, 111, 111, 111, 111,32767, 194, 111,32767, + 32767,32767, 101, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 189,32767, 260, 262, 103, 537, 194, + 32767, 496,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 489,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 477, + 417, 139,32767, 139, 522, 409, 410, 411, 479, 522, + 522, 522, 298, 281,32767,32767,32767,32767, 494, 494, + 101, 101, 101, 101, 489,32767,32767, 112, 100, 100, + 100, 100, 100, 104, 102,32767,32767,32767,32767, 100, + 32767, 102, 102,32767,32767, 217, 208, 215, 102,32767, + 541, 542, 215, 102, 219, 219, 219, 239, 239, 468, + 304, 102, 100, 102, 102, 196, 304, 304,32767, 102, + 468, 304, 468, 304, 198, 304, 304, 304, 468, 304, + 32767,32767, 102, 304, 210, 100, 100, 304,32767,32767, + 32767, 479,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 509,32767, 526, 539, + 415, 416, 418, 524, 440, 441, 442, 443, 444, 445, + 446, 448, 571,32767, 483,32767,32767,32767,32767, 322, + 581,32767, 581,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 483,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 471, 411, 139,32767, 139, - 516, 403, 404, 405, 473, 516, 516, 516,32767,32767, - 32767,32767, 488, 488, 101, 101, 101, 101, 483,32767, - 32767, 112, 100, 100, 100, 100, 100, 104, 102,32767, - 32767,32767,32767, 100,32767, 102, 102,32767,32767, 217, - 208, 215, 102,32767, 535, 536, 215, 102, 219, 219, - 219, 239, 239, 462, 298, 102, 100, 102, 102, 196, - 298, 298,32767, 102, 462, 298, 462, 298, 198, 298, - 298, 298, 462, 298,32767,32767, 102, 298, 210, 100, - 100, 298,32767,32767,32767, 473,32767,32767,32767,32767, + 582,32767, 522,32767,32767,32767,32767, 414, 9, 76, + 43, 44, 52, 58, 500, 501, 502, 503, 497, 498, + 504, 499,32767, 505, 547,32767,32767, 523, 574,32767, + 32767,32767,32767,32767,32767, 139,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 509,32767, 137,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 503,32767, 520, 533, 409, 410, 412, 518, 434, 435, - 436, 437, 438, 439, 440, 442, 565,32767, 477,32767, - 32767,32767,32767, 316, 575,32767, 575,32767,32767,32767, + 522,32767,32767,32767, 300, 301,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 576,32767, 516,32767,32767,32767, - 32767, 408, 9, 76, 43, 44, 52, 58, 494, 495, - 496, 497, 491, 492, 498, 493,32767, 499, 541,32767, - 32767, 517, 568,32767,32767,32767,32767,32767,32767, 139, + 32767, 522,32767,32767,32767, 283, 284,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 503,32767, 137,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 516,32767,32767,32767, 293, 295, + 32767, 278,32767,32767, 364,32767,32767,32767,32767, 343, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 516,32767,32767,32767, 281, - 283,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 278,32767,32767, 358,32767, - 32767,32767,32767, 337,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 152, 152, 3, 3, 319, 152, - 152, 152, 319, 152, 319, 319, 319, 152, 152, 152, - 152, 152, 152, 272, 184, 254, 257, 239, 239, 152, - 329, 152 + 152, 152, 3, 3, 325, 152, 152, 152, 325, 152, + 325, 325, 325, 152, 152, 152, 152, 152, 152, 272, + 184, 254, 257, 239, 239, 152, 335, 152 ); protected $goto = array( - 192, 192, 662, 416, 635, 911, 984, 991, 992, 410, - 302, 303, 323, 556, 308, 415, 324, 417, 614, 1006, - 670, 317, 317, 317, 317, 163, 163, 163, 163, 216, + 192, 192, 668, 420, 641, 882, 838, 883, 1018, 414, + 306, 307, 327, 562, 312, 419, 328, 421, 620, 799, + 676, 850, 584, 822, 837, 163, 163, 163, 163, 216, 193, 189, 189, 173, 175, 211, 189, 189, 189, 189, 189, 190, 190, 190, 190, 190, 190, 184, 185, 186, - 187, 188, 213, 211, 214, 514, 515, 406, 516, 518, - 519, 520, 521, 522, 523, 524, 525, 1075, 164, 165, + 187, 188, 213, 211, 214, 520, 521, 410, 522, 524, + 525, 526, 527, 528, 529, 530, 531, 1087, 164, 165, 166, 191, 167, 168, 169, 162, 170, 171, 172, 174, 210, 212, 215, 233, 236, 239, 240, 242, 253, 254, 255, 256, 257, 258, 259, 261, 262, 263, 264, 272, - 273, 305, 306, 307, 411, 412, 413, 561, 217, 218, + 273, 309, 310, 311, 415, 416, 417, 567, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 176, 232, 177, 194, 195, 196, 234, - 184, 185, 186, 187, 188, 213, 1075, 197, 178, 179, + 184, 185, 186, 187, 188, 213, 1087, 197, 178, 179, 180, 198, 194, 181, 235, 199, 161, 200, 201, 182, - 202, 203, 204, 183, 205, 206, 207, 208, 209, 819, - 578, 600, 600, 540, 531, 815, 816, 1205, 1205, 1205, - 1205, 1205, 1205, 1205, 1205, 1205, 1205, 954, 928, 928, - 926, 928, 695, 817, 530, 963, 958, 380, 384, 541, - 579, 583, 382, 531, 540, 549, 550, 389, 559, 580, - 594, 595, 824, 336, 872, 867, 868, 881, 14, 825, - 869, 822, 870, 871, 823, 339, 1274, 1274, 875, 528, - 528, 876, 528, 877, 793, 339, 339, 791, 1027, 1023, - 1024, 1155, 904, 1274, 850, 1156, 1159, 905, 1160, 339, - 339, 437, 339, 479, 1290, 480, 924, 924, 924, 924, - 930, 487, 437, 918, 925, 533, 598, 632, 339, 1174, - 1174, 988, 1174, 988, 282, 282, 282, 282, 988, 988, - 988, 988, 988, 988, 988, 988, 446, 446, 431, 249, - 249, 1174, 553, 431, 431, 446, 1174, 1174, 1174, 1174, - 1047, 1048, 1174, 1174, 1174, 1255, 1255, 1255, 1255, 313, - 297, 812, 812, 1234, 246, 246, 246, 246, 248, 250, - 888, 618, 577, 1040, 889, 673, 659, 659, 618, 665, - 1038, 1223, 1223, 996, 993, 994, 655, 1223, 1223, 1223, - 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1221, 1221, 1250, - 1251, 1273, 1273, 1221, 1221, 1221, 1221, 1221, 1221, 1221, - 1221, 1221, 1221, 629, 533, 643, 644, 645, 1273, 431, - 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, - 517, 517, 431, 409, 1276, 589, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 547, 334, 797, 546, - 696, 613, 615, 5, 633, 6, 593, 1263, 652, 656, - 965, 660, 668, 961, 587, 601, 604, 605, 606, 607, - 626, 627, 628, 672, 1169, 812, 610, 611, 1245, 1245, - 951, 1245, 832, 455, 1248, 1249, 532, 544, 797, 378, - 797, 532, 552, 544, 557, 592, 381, 844, 337, 338, - 831, 1257, 1257, 1257, 1257, 634, 560, 449, 450, 451, - 1124, 842, 394, 395, 1281, 1282, 325, 641, 421, 642, - 1170, 398, 399, 400, 809, 653, 837, 1241, 388, 401, - 922, 396, 669, 332, 834, 1167, 893, 1063, 973, 840, - 699, 1012, 846, 597, 526, 526, 526, 526, 970, 582, - 1016, 488, 845, 833, 1011, 1015, 836, 456, 638, 949, - 1058, 935, 933, 460, 830, 1014, 0, 0, 0, 1243, - 1243, 1014, 0, 1171, 0, 252, 252, 1166, 0, 0, - 807, 270, 0, 0, 0, 923, 529, 529, 0, 0, - 0, 0, 0, 0, 0, 0, 1172, 1231, 1232, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1056, 849, - 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, + 202, 203, 204, 183, 205, 206, 207, 208, 209, 321, + 321, 321, 321, 825, 606, 606, 823, 546, 537, 1182, + 1217, 1217, 1217, 1217, 1217, 1217, 1217, 1217, 1217, 1217, + 1235, 1235, 461, 1260, 1261, 856, 1235, 1235, 1235, 1235, + 1235, 1235, 1235, 1235, 1235, 1235, 386, 537, 546, 555, + 556, 393, 565, 586, 600, 601, 830, 797, 878, 873, + 874, 887, 14, 831, 875, 828, 876, 877, 829, 452, + 452, 936, 881, 340, 1183, 803, 249, 249, 452, 1233, + 1233, 813, 1039, 1035, 1036, 1233, 1233, 1233, 1233, 1233, + 1233, 1233, 1233, 1233, 1233, 818, 818, 1184, 1243, 1244, + 559, 246, 246, 246, 246, 248, 250, 604, 638, 1186, + 1186, 995, 1186, 995, 413, 803, 595, 803, 995, 995, + 995, 995, 995, 995, 995, 995, 995, 995, 995, 995, + 1257, 1257, 5, 1257, 6, 1186, 286, 286, 286, 286, + 1186, 1186, 1186, 1186, 338, 343, 1186, 1186, 1186, 1267, + 1267, 1267, 1267, 1059, 1060, 343, 343, 1269, 1269, 1269, + 1269, 1286, 1286, 635, 894, 649, 650, 651, 895, 343, + 343, 1275, 343, 485, 1302, 486, 534, 534, 1286, 534, + 957, 493, 558, 1253, 382, 539, 523, 523, 343, 928, + 400, 675, 523, 523, 523, 523, 523, 523, 523, 523, + 523, 523, 443, 317, 301, 1262, 1263, 930, 930, 930, + 930, 818, 640, 443, 924, 931, 1136, 532, 532, 532, + 532, 1026, 588, 329, 553, 1255, 1255, 1026, 702, 619, + 621, 427, 639, 1246, 616, 617, 658, 662, 971, 666, + 674, 967, 815, 552, 563, 598, 843, 392, 821, 979, + 599, 384, 388, 547, 585, 589, 661, 840, 1285, 1285, + 960, 934, 934, 932, 934, 701, 437, 536, 969, 964, + 1179, 437, 437, 899, 1075, 1285, 1024, 705, 852, 941, + 603, 462, 538, 550, 1028, 976, 539, 538, 466, 550, + 0, 1288, 385, 842, 0, 644, 955, 1070, 0, 0, + 0, 836, 566, 455, 456, 457, 0, 848, 341, 342, + 1293, 1294, 252, 252, 1178, 398, 399, 0, 0, 0, + 647, 0, 648, 422, 402, 403, 404, 0, 659, 0, + 422, 0, 405, 0, 0, 846, 336, 1007, 1000, 1004, + 1001, 1005, 0, 0, 0, 0, 1181, 494, 0, 0, + 0, 437, 437, 437, 437, 437, 437, 437, 437, 437, + 437, 437, 0, 0, 437, 593, 607, 610, 611, 612, + 613, 632, 633, 634, 678, 851, 839, 1023, 1027, 583, + 1052, 0, 679, 665, 665, 939, 671, 1050, 0, 0, + 1167, 910, 0, 270, 1168, 1171, 911, 1172, 535, 535, + 917, 990, 998, 1002, 999, 1003, 0, 0, 929, 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, 968, 968 + 0, 0, 0, 0, 0, 0, 0, 0, 974, 974, + 0, 1068, 855 ); protected $gotoCheck = array( - 42, 42, 72, 65, 65, 87, 87, 87, 87, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 116, - 9, 23, 23, 23, 23, 42, 42, 42, 42, 42, + 42, 42, 72, 65, 65, 64, 35, 64, 118, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 7, + 9, 35, 121, 26, 35, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -765,103 +757,92 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 15, - 119, 104, 104, 75, 75, 25, 26, 104, 104, 104, - 104, 104, 104, 104, 104, 104, 104, 25, 25, 25, - 25, 25, 25, 27, 25, 25, 25, 58, 58, 58, - 58, 58, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 15, 93, 15, 15, 15, 15, 75, 15, - 15, 15, 15, 15, 15, 14, 170, 170, 15, 19, - 19, 64, 19, 64, 7, 14, 14, 6, 15, 15, - 15, 78, 78, 170, 45, 78, 78, 78, 78, 14, - 14, 19, 14, 144, 14, 144, 19, 19, 19, 19, - 49, 144, 19, 19, 19, 14, 55, 55, 14, 72, - 72, 72, 72, 72, 24, 24, 24, 24, 72, 72, - 72, 72, 72, 72, 72, 72, 138, 138, 23, 5, - 5, 72, 159, 23, 23, 138, 72, 72, 72, 72, - 133, 133, 72, 72, 72, 9, 9, 9, 9, 156, - 156, 22, 22, 14, 5, 5, 5, 5, 5, 5, - 72, 112, 8, 8, 72, 8, 8, 8, 112, 8, - 8, 157, 157, 112, 112, 112, 14, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 158, 158, 165, - 165, 169, 169, 158, 158, 158, 158, 158, 158, 158, - 158, 158, 158, 84, 14, 84, 84, 84, 169, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 160, 160, 23, 13, 169, 13, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 48, 166, 12, 9, - 48, 48, 48, 46, 48, 46, 9, 168, 48, 48, - 48, 48, 48, 48, 79, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 14, 22, 83, 83, 119, 119, - 99, 119, 35, 163, 163, 163, 9, 9, 12, 61, - 12, 9, 100, 9, 2, 2, 9, 35, 93, 93, - 35, 119, 119, 119, 119, 63, 9, 9, 9, 9, - 140, 9, 80, 80, 9, 9, 29, 80, 109, 80, - 20, 80, 80, 80, 18, 80, 39, 119, 28, 80, - 89, 89, 89, 80, 37, 149, 17, 17, 106, 9, - 95, 118, 41, 17, 103, 103, 103, 103, 17, 103, - 121, 9, 16, 16, 16, 16, 17, 146, 17, 17, - 136, 92, 16, 82, 17, 119, -1, -1, -1, 119, - 119, 119, -1, 20, -1, 5, 5, 17, -1, -1, - 20, 24, -1, -1, -1, 16, 24, 24, -1, -1, - -1, -1, -1, -1, -1, -1, 20, 20, 20, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 16, 16, - -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, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 23, + 23, 23, 23, 15, 104, 104, 27, 75, 75, 20, + 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 159, 159, 165, 165, 165, 45, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 159, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 15, 6, 15, 15, + 15, 15, 75, 15, 15, 15, 15, 15, 15, 140, + 140, 49, 15, 93, 20, 12, 5, 5, 140, 160, + 160, 20, 15, 15, 15, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 22, 22, 20, 20, 20, + 161, 5, 5, 5, 5, 5, 5, 55, 55, 72, + 72, 72, 72, 72, 13, 12, 13, 12, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 121, 121, 46, 121, 46, 72, 24, 24, 24, 24, + 72, 72, 72, 72, 168, 14, 72, 72, 72, 9, + 9, 9, 9, 135, 135, 14, 14, 121, 121, 121, + 121, 172, 172, 84, 72, 84, 84, 84, 72, 14, + 14, 170, 14, 146, 14, 146, 19, 19, 172, 19, + 99, 146, 100, 121, 61, 14, 162, 162, 14, 89, + 89, 89, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 19, 158, 158, 167, 167, 19, 19, 19, + 19, 22, 63, 19, 19, 19, 142, 103, 103, 103, + 103, 121, 103, 29, 48, 121, 121, 121, 48, 48, + 48, 109, 48, 14, 83, 83, 48, 48, 48, 48, + 48, 48, 18, 9, 2, 2, 39, 28, 25, 106, + 9, 58, 58, 58, 58, 58, 14, 37, 171, 171, + 25, 25, 25, 25, 25, 25, 23, 25, 25, 25, + 151, 23, 23, 17, 17, 171, 120, 95, 41, 92, + 17, 148, 9, 9, 123, 17, 14, 9, 82, 9, + -1, 171, 9, 17, -1, 17, 17, 138, -1, -1, + -1, 17, 9, 9, 9, 9, -1, 9, 93, 93, + 9, 9, 5, 5, 17, 80, 80, -1, -1, -1, + 80, -1, 80, 113, 80, 80, 80, -1, 80, -1, + 113, -1, 80, -1, -1, 9, 80, 113, 113, 113, + 113, 113, -1, -1, -1, -1, 14, 9, -1, -1, + -1, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, -1, -1, 23, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 16, 16, 16, 16, 8, + 8, -1, 8, 8, 8, 16, 8, 8, -1, -1, + 78, 78, -1, 24, 78, 78, 78, 78, 24, 24, + 87, 87, 87, 87, 87, 87, -1, -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 103, 103 + -1, -1, -1, -1, -1, -1, -1, -1, 103, 103, + -1, 16, 16 ); protected $gotoBase = array( - 0, 0, -242, 0, 0, 278, 214, 215, 305, 7, - 0, 0, 103, 48, -71, -174, 59, 31, 166, -46, - 83, 0, -16, 18, 261, 161, 162, 179, 143, 171, - 0, 0, 0, 0, 0, 67, 0, 147, 0, 154, - 0, 58, -1, 0, 0, 222, -306, 0, -289, 228, - 0, 0, 0, 0, 0, 218, 0, 0, 144, 0, - 0, 389, 0, 207, 203, -234, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -167, 0, 0, -163, 62, - -18, 0, 47, -43, -329, 0, 0, -270, 0, 177, - 0, 0, 75, -259, 0, 87, 0, 0, 0, 387, - 391, 0, 0, 458, -76, 0, 124, 0, 0, 184, - 0, 0, 44, 0, 0, 0, 17, 0, 123, 153, - 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 20, 0, 0, 73, 0, 244, 0, - 182, 0, 0, 0, -231, 0, 74, 0, 0, 122, - 0, 0, 0, 0, 0, 0, -11, 84, 100, 255, - 133, 0, 0, 134, 0, -17, 359, 0, 368, 45, - -80, 0, 0 + 0, 0, -288, 0, 0, 225, 194, 10, 522, 7, + 0, 0, -64, -65, 5, -174, 86, -28, 90, 61, + -212, 0, -76, 156, 283, 394, 19, 162, 68, 84, + 0, 0, 0, 0, 0, -353, 0, 76, 0, 80, + 0, -2, -1, 0, 0, 173, -423, 0, -307, 199, + 0, 0, 0, 0, 0, 219, 0, 0, 358, 0, + 0, 294, 0, 124, -13, -234, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -167, 0, 0, 142, 169, + -11, 0, -24, -81, -375, 0, 0, 275, 0, 42, + 0, 0, -3, -245, 0, 30, 0, 0, 0, 297, + 291, 0, 0, 341, -73, 0, 41, 0, 0, 107, + 0, 0, 0, 206, 0, 0, 0, 0, 6, 0, + 64, 15, 0, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 33, 0, 0, 14, 0, + 187, 0, 98, 0, 0, 0, -157, 0, 2, 0, + 0, 63, 0, 0, 0, 0, 0, 0, 39, -57, + -8, 223, 99, 0, 0, -111, 0, -5, 266, 0, + 292, 108, 11, 0, 0 ); protected $gotoDefault = array( - -32768, 492, 703, 4, 704, 897, 780, 789, 576, 508, - 671, 333, 602, 407, 1239, 874, 1062, 558, 808, 1183, - 1191, 438, 811, 318, 693, 856, 857, 858, 385, 370, - 376, 383, 624, 603, 473, 843, 434, 835, 465, 838, - 433, 847, 160, 404, 490, 851, 3, 853, 535, 884, - 371, 861, 372, 648, 863, 543, 865, 866, 379, 386, - 387, 1067, 551, 599, 878, 241, 545, 879, 369, 880, - 887, 374, 377, 657, 445, 485, 478, 397, 1042, 586, - 621, 442, 459, 609, 608, 596, 458, 639, 402, 920, - 466, 443, 934, 335, 942, 701, 1074, 616, 468, 950, - 617, 957, 960, 509, 510, 457, 972, 267, 975, 469, - 1001, 640, 986, 619, 999, 452, 1005, 435, 1013, 1227, - 436, 1017, 260, 1020, 274, 403, 418, 1025, 1026, 8, - 1032, 663, 664, 10, 271, 489, 1057, 658, 432, 1073, - 422, 1143, 1145, 537, 470, 1163, 1162, 651, 486, 1168, - 1230, 430, 511, 453, 304, 512, 296, 321, 301, 527, - 283, 322, 513, 454, 1236, 1244, 319, 29, 1264, 1275, - 329, 555, 591 + -32768, 498, 709, 4, 710, 903, 786, 795, 582, 514, + 677, 337, 608, 411, 1251, 880, 1074, 564, 814, 1195, + 1203, 444, 817, 322, 699, 862, 863, 864, 389, 374, + 380, 387, 630, 609, 479, 849, 440, 841, 471, 844, + 439, 853, 160, 408, 496, 857, 3, 859, 541, 890, + 375, 867, 376, 654, 869, 549, 871, 872, 383, 390, + 391, 1079, 557, 605, 884, 241, 551, 885, 373, 886, + 893, 378, 381, 663, 451, 491, 484, 401, 1054, 592, + 627, 448, 465, 615, 614, 602, 464, 423, 406, 926, + 472, 449, 940, 339, 948, 707, 1086, 622, 474, 956, + 623, 963, 966, 515, 516, 463, 978, 267, 981, 475, + 1013, 645, 646, 993, 624, 625, 1011, 458, 1017, 441, + 1025, 1239, 442, 1029, 260, 1032, 274, 407, 424, 1037, + 1038, 8, 1044, 669, 670, 10, 271, 495, 1069, 664, + 438, 1085, 428, 1155, 1157, 543, 476, 1175, 1174, 657, + 492, 1180, 1242, 436, 517, 459, 308, 518, 300, 325, + 305, 533, 287, 326, 519, 460, 1248, 1256, 323, 29, + 1276, 1287, 333, 561, 597 ); protected $ruleToNonTerminal = array( @@ -893,15 +874,16 @@ class Php7 extends \PhpParser\ParserAbstract 99, 99, 54, 54, 50, 50, 101, 52, 52, 102, 51, 51, 53, 53, 63, 63, 63, 63, 79, 79, 105, 105, 107, 107, 108, 108, 108, 108, 106, 106, - 106, 110, 110, 110, 87, 87, 112, 112, 112, 111, - 111, 113, 113, 114, 114, 114, 109, 109, 80, 80, - 80, 20, 20, 115, 115, 116, 116, 116, 116, 59, - 117, 117, 118, 60, 120, 120, 121, 121, 122, 122, - 84, 123, 123, 123, 123, 123, 123, 128, 128, 129, - 129, 130, 130, 130, 130, 130, 131, 132, 132, 127, - 127, 124, 124, 126, 126, 134, 134, 133, 133, 133, - 133, 133, 133, 133, 125, 135, 135, 137, 136, 136, - 61, 100, 138, 138, 55, 55, 42, 42, 42, 42, + 106, 110, 110, 110, 110, 87, 87, 113, 113, 113, + 111, 111, 114, 114, 112, 112, 115, 115, 116, 116, + 116, 116, 109, 109, 80, 80, 80, 20, 20, 117, + 117, 118, 118, 118, 118, 59, 119, 119, 120, 60, + 122, 122, 123, 123, 124, 124, 84, 125, 125, 125, + 125, 125, 125, 130, 130, 131, 131, 132, 132, 132, + 132, 132, 133, 134, 134, 129, 129, 126, 126, 128, + 128, 136, 136, 135, 135, 135, 135, 135, 135, 135, + 127, 137, 137, 139, 138, 138, 61, 100, 140, 140, + 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -910,20 +892,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 145, - 139, 139, 144, 144, 147, 148, 148, 149, 150, 150, - 150, 19, 19, 72, 72, 72, 72, 140, 140, 140, - 140, 152, 152, 141, 141, 143, 143, 143, 146, 146, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, - 158, 104, 160, 160, 160, 160, 142, 142, 142, 142, - 142, 142, 142, 142, 58, 58, 155, 155, 155, 155, - 161, 161, 151, 151, 151, 162, 162, 162, 162, 162, - 162, 73, 73, 65, 65, 65, 65, 119, 119, 119, - 119, 165, 164, 154, 154, 154, 154, 154, 154, 154, - 153, 153, 153, 163, 163, 163, 163, 103, 159, 167, - 167, 166, 166, 168, 168, 168, 168, 168, 168, 168, - 168, 156, 156, 156, 156, 170, 171, 169, 169, 169, - 169, 169, 169, 169, 169, 172, 172, 172, 172 + 42, 42, 42, 42, 42, 147, 141, 141, 146, 146, + 149, 150, 150, 151, 152, 152, 152, 19, 19, 72, + 72, 72, 72, 142, 142, 142, 142, 154, 154, 143, + 143, 145, 145, 145, 148, 148, 159, 159, 159, 159, + 159, 159, 159, 159, 159, 160, 160, 104, 162, 162, + 162, 162, 144, 144, 144, 144, 144, 144, 144, 144, + 58, 58, 157, 157, 157, 157, 163, 163, 153, 153, + 153, 164, 164, 164, 164, 164, 164, 73, 73, 65, + 65, 65, 65, 121, 121, 121, 121, 167, 166, 156, + 156, 156, 156, 156, 156, 156, 155, 155, 155, 165, + 165, 165, 165, 103, 161, 169, 169, 168, 168, 170, + 170, 170, 170, 170, 170, 170, 170, 158, 158, 158, + 158, 172, 173, 171, 171, 171, 171, 171, 171, 171, + 171, 174, 174, 174, 174 ); protected $ruleToLength = array( @@ -955,37 +937,38 @@ class Php7 extends \PhpParser\ParserAbstract 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, 2, 1, 1, 1, 1, 6, 8, - 6, 1, 2, 1, 1, 1, 1, 1, 1, 3, - 3, 3, 3, 1, 2, 1, 0, 1, 0, 2, - 2, 2, 4, 1, 3, 1, 2, 2, 3, 2, - 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, - 1, 5, 5, 10, 3, 5, 1, 1, 3, 0, - 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, - 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, - 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, - 4, 1, 1, 2, 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, 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, - 2, 8, 9, 8, 9, 9, 10, 9, 10, 8, - 3, 2, 0, 4, 2, 1, 3, 2, 2, 2, - 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 1, 1, 1, 0, 3, 0, 1, 1, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, - 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, - 1, 1, 1, 3, 1, 1, 4, 4, 1, 4, - 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, - 2, 1, 3, 1, 4, 4, 3, 3, 3, 3, - 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, - 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, - 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, - 3, 3, 3, 6, 3, 1, 1, 2, 1 + 6, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, + 1, 1, 0, 1, 0, 2, 2, 2, 4, 1, + 3, 1, 2, 2, 3, 2, 3, 1, 1, 2, + 3, 1, 1, 3, 2, 0, 1, 5, 5, 10, + 3, 5, 1, 1, 3, 0, 2, 4, 5, 4, + 4, 4, 3, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 2, 1, 3, 1, 1, 3, 2, 2, 3, 1, + 0, 1, 1, 3, 3, 3, 4, 1, 1, 2, + 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, 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, 2, 8, 9, 8, + 9, 9, 10, 9, 10, 8, 3, 2, 0, 4, + 2, 1, 3, 2, 2, 2, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, + 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 3, 3, 4, 1, + 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, + 0, 1, 1, 3, 1, 1, 1, 1, 1, 3, + 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, + 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, + 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, + 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, + 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, + 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, + 3, 1, 1, 2, 1 ); protected function initReduceCallbacks() { @@ -1873,269 +1856,269 @@ protected function initReduceCallbacks() { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 284 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 285 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 286 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 287 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 288 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 289 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 290 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 291 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 292 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 293 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 294 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 295 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 296 => function ($stackPos) { - $this->semValue = null; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 297 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 298 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 299 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 300 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 301 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 302 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = null; }, 303 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 304 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = null; }, 305 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 306 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = null; }, 307 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array(); }, 308 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 309 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 310 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 311 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 312 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 313 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 314 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 315 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 316 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 317 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 318 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 319 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 320 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 321 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); - $this->checkProperty($this->semValue, $stackPos-(5-2)); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 322 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); - $this->checkClassConst($this->semValue, $stackPos-(5-2)); + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 323 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, 325 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = array(); }, 326 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 327 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); + $this->checkProperty($this->semValue, $stackPos-(5-2)); }, 328 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); + $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, 329 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, 330 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 331 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 332 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = null; /* will be skipped */ }, 333 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 334 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 335 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 336 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 337 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 338 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 339 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 340 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 341 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 342 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 343 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 344 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 345 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 346 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 347 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 348 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = 0; }, 349 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = 0; }, 350 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 351 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 352 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 353 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 354 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 355 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 356 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, 357 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 358 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 359 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_READONLY; }, 360 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 361 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 362 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 363 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 364 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 365 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 366 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 367 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 368 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 369 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 370 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 371 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2144,439 +2127,439 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 373 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 374 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 375 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 378 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 379 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 380 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 381 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 382 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 383 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 384 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 385 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 386 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 387 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 388 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 389 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 390 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 391 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 392 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 393 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 394 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 395 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 396 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 397 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 398 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 404 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 405 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 406 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 410 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 411 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 422 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 423 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 424 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 425 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 427 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 428 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 429 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 430 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 431 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 432 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 433 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 434 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 435 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 436 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 437 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 438 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 439 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 440 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 441 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); + $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); + $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, 442 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 443 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 444 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 445 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 446 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 447 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, 448 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 449 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 450 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 451 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 452 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 453 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 454 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 455 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 456 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 457 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 458 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 459 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 460 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 461 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 462 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 463 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 464 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 465 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->checkClass($this->semValue[0], -1); }, 466 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 467 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 468 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array(); }, 469 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 470 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 471 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 472 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 473 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 474 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 475 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 476 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 477 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 478 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 479 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 480 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 481 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 482 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 483 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 484 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 485 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 486 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 487 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 488 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 489 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 490 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 491 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 492 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 493 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 494 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 495 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 496 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 497 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 498 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 499 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 500 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 501 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 502 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 503 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 504 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)]), $attrs); + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 505 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 506 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, 507 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, 508 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, 509 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 510 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)]), $attrs); }, 511 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, 512 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 513 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 514 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 515 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2585,16 +2568,16 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 517 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 518 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 519 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 520 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 521 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2612,192 +2595,210 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 526 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 527 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 528 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 529 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 530 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 531 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 533 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 534 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 536 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 537 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 538 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 539 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 540 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 542 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 543 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 544 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 545 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 546 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 547 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 548 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 549 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 551 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 552 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 553 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 554 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 555 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 556 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 557 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 558 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 559 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 560 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 561 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 562 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 563 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, 565 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 566 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 567 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 568 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 569 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 570 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 571 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 572 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 573 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 574 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 575 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 576 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = null; }, 577 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 578 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 579 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 580 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 581 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 582 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 583 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 584 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 585 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 586 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 587 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 588 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 589 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 590 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 591 => function ($stackPos) { + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 592 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 593 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 594 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 62d1f34c10..ffac9c0997 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -45,6 +45,10 @@ protected function pUnionType(Node\UnionType $node) { return $this->pImplode($node->types, '|'); } + protected function pIntersectionType(Node\IntersectionType $node) { + return $this->pImplode($node->types, '&'); + } + protected function pIdentifier(Node\Identifier $node) { return $node->name; } diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 8a3565f1cf..5fc36531db 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1343,6 +1343,7 @@ protected function initializeListInsertionMap() { //'Scalar_Encapsed->parts' => '', 'Stmt_Catch->types' => '|', 'UnionType->types' => '|', + 'IntersectionType->types' => '&', 'Stmt_If->elseifs' => ' ', 'Stmt_TryCatch->catches' => ' ', diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index c848dbb6f1..94d2d3abea 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -140,6 +140,9 @@ public function testNormalizeType() { $unionType = new Node\UnionType([new Node\Identifier('int'), new Node\Identifier('string')]); $this->assertSame($unionType, BuilderHelpers::normalizeType($unionType)); + $intersectionType = new Node\IntersectionType([new Node\Name('A'), new Node\Name('B')]); + $this->assertSame($intersectionType, BuilderHelpers::normalizeType($intersectionType)); + $expectedNullable = new Node\NullableType($intIdentifier); $nullable = BuilderHelpers::normalizeType('?int'); $this->assertEquals($expectedNullable, $nullable); diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index 5c85c292bd..d14402b9a5 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -204,6 +204,7 @@ class A extends B implements C, D { interface A extends C, D { public function a(A $a) : A; public function b(A|B|int $a): A|B|int; + public function c(A&B $a): A&B; } #[X] @@ -268,6 +269,7 @@ interface A extends \NS\C, \NS\D { public function a(\NS\A $a) : \NS\A; public function b(\NS\A|\NS\B|int $a) : \NS\A|\NS\B|int; + public function c(\NS\A&\NS\B $a) : \NS\A&\NS\B; } #[\NS\X] enum E : int diff --git a/test/code/formatPreservation/listInsertion.test b/test/code/formatPreservation/listInsertion.test index 0795c9d919..6ddd8168ca 100644 --- a/test/code/formatPreservation/listInsertion.test +++ b/test/code/formatPreservation/listInsertion.test @@ -319,6 +319,16 @@ function test(): A |B|C {} ----- returnType->types[] = new Node\Name('C'); +----- + Date: Fri, 3 Sep 2021 15:10:29 +0200 Subject: [PATCH 033/428] Add test for new in initializer This already works because we don't validate initializer contents, everything is accepted from a parser perspective. --- test/code/parser/stmt/newInInitializer.test | 171 ++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 test/code/parser/stmt/newInInitializer.test diff --git a/test/code/parser/stmt/newInInitializer.test b/test/code/parser/stmt/newInInitializer.test new file mode 100644 index 0000000000..7582aa3c23 --- /dev/null +++ b/test/code/parser/stmt/newInInitializer.test @@ -0,0 +1,171 @@ +New in initializers +----- + Date: Fri, 3 Sep 2021 16:29:05 +0200 Subject: [PATCH 034/428] Add support for explicit octal literals --- CHANGELOG.md | 1 + lib/PhpParser/Lexer/Emulative.php | 2 + .../TokenEmulator/ExplicitOctalEmulator.php | 43 +++++++++++++++++++ lib/PhpParser/Node/Scalar/LNumber.php | 5 +++ test/PhpParser/Lexer/EmulativeTest.php | 12 ++++++ test/PhpParser/ParserTest.php | 2 + test/code/parser/scalar/explicitOctal.test | 30 +++++++++++++ 7 files changed, 95 insertions(+) create mode 100644 lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php create mode 100644 test/code/parser/scalar/explicitOctal.test diff --git a/CHANGELOG.md b/CHANGELOG.md index b2a06de8dc..042cb4836f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Version 4.12.1-dev ### Added * [PHP 8.1] Added support for intersection types using a new `IntersectionType` node. +* [PHP 8.1] Added support for explicit octal literals. Version 4.12.0 (2021-07-21) --------------------------- diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index a8f4e334a7..5086f8ce27 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -8,6 +8,7 @@ use PhpParser\Lexer\TokenEmulator\AttributeEmulator; use PhpParser\Lexer\TokenEmulator\EnumTokenEmulator; use PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator; +use PhpParser\Lexer\TokenEmulator\ExplicitOctalEmulator; use PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator; use PhpParser\Lexer\TokenEmulator\FnTokenEmulator; use PhpParser\Lexer\TokenEmulator\MatchTokenEmulator; @@ -55,6 +56,7 @@ public function __construct(array $options = []) new AttributeEmulator(), new EnumTokenEmulator(), new ReadonlyTokenEmulator(), + new ExplicitOctalEmulator(), ]; // Collect emulators that are relevant for the PHP version we're running diff --git a/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php new file mode 100644 index 0000000000..e1eb688699 --- /dev/null +++ b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -0,0 +1,43 @@ +resolveIntegerOrFloatToken($tokens[$i + 1][1]); + array_splice($tokens, $i, 2, [ + [$tokenKind, '0' . $tokens[$i + 1][1], $tokens[$i][2]], + ]); + } + } + return $tokens; + } + + private function resolveIntegerOrFloatToken(string $str): int + { + $str = substr($str, 1); + $str = str_replace('_', '', $str); + $num = octdec($str); + return is_float($num) ? \T_DNUMBER : \T_LNUMBER; + } + + public function reverseEmulate(string $code, array $tokens): array { + // Explicit octals were not legal code previously, don't bother. + return $tokens; + } +} \ No newline at end of file diff --git a/lib/PhpParser/Node/Scalar/LNumber.php b/lib/PhpParser/Node/Scalar/LNumber.php index b33943547e..f17dd1f8a2 100644 --- a/lib/PhpParser/Node/Scalar/LNumber.php +++ b/lib/PhpParser/Node/Scalar/LNumber.php @@ -62,6 +62,11 @@ public static function fromString(string $str, array $attributes = [], bool $all throw new Error('Invalid numeric literal', $attributes); } + // Strip optional explicit octal prefix. + if ('o' === $str[1] || 'O' === $str[1]) { + $str = substr($str, 2); + } + // 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/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index a4eab67a89..17a7bc7894 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -342,6 +342,18 @@ public function provideTestLexNewFeatures() { [ord('{'), '{'], [ord('}'), '}'], ]], + ['0o123', [ + [Tokens::T_LNUMBER, '0o123'], + ]], + ['0O123', [ + [Tokens::T_LNUMBER, '0O123'], + ]], + ['0o1_2_3', [ + [Tokens::T_LNUMBER, '0o1_2_3'], + ]], + ['0o1000000000000000000000', [ + [Tokens::T_DNUMBER, '0o1000000000000000000000'], + ]], ]; } diff --git a/test/PhpParser/ParserTest.php b/test/PhpParser/ParserTest.php index 5080365fbb..6a240da98f 100644 --- a/test/PhpParser/ParserTest.php +++ b/test/PhpParser/ParserTest.php @@ -135,6 +135,8 @@ public function provideTestExtraAttributes() { ['0XF', ['kind' => Scalar\LNumber::KIND_HEX]], ['0b1', ['kind' => Scalar\LNumber::KIND_BIN]], ['0B1', ['kind' => Scalar\LNumber::KIND_BIN]], + ['0o7', ['kind' => Scalar\LNumber::KIND_OCT]], + ['0O7', ['kind' => Scalar\LNumber::KIND_OCT]], ['[]', ['kind' => Expr\Array_::KIND_SHORT]], ['array()', ['kind' => Expr\Array_::KIND_LONG]], ["'foo'", ['kind' => String_::KIND_SINGLE_QUOTED]], diff --git a/test/code/parser/scalar/explicitOctal.test b/test/code/parser/scalar/explicitOctal.test new file mode 100644 index 0000000000..f9bc3a925b --- /dev/null +++ b/test/code/parser/scalar/explicitOctal.test @@ -0,0 +1,30 @@ +Explicit octal syntax +----- + Date: Fri, 3 Sep 2021 16:35:10 +0200 Subject: [PATCH 035/428] Adjust token count in octal emulator --- lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php index e1eb688699..f5f6805b80 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -23,6 +23,7 @@ public function emulate(string $code, array $tokens): array { array_splice($tokens, $i, 2, [ [$tokenKind, '0' . $tokens[$i + 1][1], $tokens[$i][2]], ]); + $c--; } } return $tokens; From 13549aa7949c7c453e297003b70517bf8ddcec95 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 3 Sep 2021 17:18:40 +0200 Subject: [PATCH 036/428] Add support for first-class callables I'm somewhat unsure about the AST structure here. VariadicPlaceholder is not a general expression. Maybe Arg->expr should be Expr|VariadicPlaceholder? Or possibly the call arguments should be an array of Arg|VariadicPlaceholder? --- CHANGELOG.md | 3 + grammar/php7.y | 6 + lib/PhpParser/Node/Arg.php | 1 + .../Node/Expr/VariadicPlaceholder.php | 27 + lib/PhpParser/Parser/Php7.php | 1438 +++++++++-------- lib/PhpParser/PrettyPrinter/Standard.php | 4 + .../code/parser/expr/firstClassCallables.test | 131 ++ .../expr/firstClassCallables.test | 11 + 8 files changed, 905 insertions(+), 716 deletions(-) create mode 100644 lib/PhpParser/Node/Expr/VariadicPlaceholder.php create mode 100644 test/code/parser/expr/firstClassCallables.test create mode 100644 test/code/prettyPrinter/expr/firstClassCallables.test diff --git a/CHANGELOG.md b/CHANGELOG.md index 042cb4836f..05d817b251 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ Version 4.12.1-dev * [PHP 8.1] Added support for intersection types using a new `IntersectionType` node. * [PHP 8.1] Added support for explicit octal literals. +* [PHP 8.1] Added support for first-class callables. These are represented using a call whose first + `Arg->expr` is an `Expr\VariadicPlaceholder`. The representation is intended to be + forward-compatible with partial function application, just like the PHP feature itself. Version 4.12.0 (2021-07-21) --------------------------- diff --git a/grammar/php7.y b/grammar/php7.y index f3ea2dece7..1bae055917 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -619,6 +619,12 @@ optional_return_type: argument_list: '(' ')' { $$ = array(); } | '(' non_empty_argument_list optional_comma ')' { $$ = $2; } + | '(' variadic_placeholder ')' { init($2); } +; + +variadic_placeholder: + T_ELLIPSIS + { $$ = Node\Arg[Node\VariadicPlaceholder[], false, false]; } ; non_empty_argument_list: diff --git a/lib/PhpParser/Node/Arg.php b/lib/PhpParser/Node/Arg.php index b25b0904a2..e70a20e92f 100644 --- a/lib/PhpParser/Node/Arg.php +++ b/lib/PhpParser/Node/Arg.php @@ -2,6 +2,7 @@ namespace PhpParser\Node; +use PhpParser\Node\Expr\VariadicPlaceholder; use PhpParser\NodeAbstract; class Arg extends NodeAbstract diff --git a/lib/PhpParser/Node/Expr/VariadicPlaceholder.php b/lib/PhpParser/Node/Expr/VariadicPlaceholder.php new file mode 100644 index 0000000000..a4e4e5c0e0 --- /dev/null +++ b/lib/PhpParser/Node/Expr/VariadicPlaceholder.php @@ -0,0 +1,27 @@ +attributes = $attributes; + } + + public function getType(): string { + return 'Expr_VariadicPlaceholder'; + } + + public function getSubNodeNames(): array { + return []; + } +} \ No newline at end of file diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index bc8c34c71f..a8cd7a1666 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -18,16 +18,16 @@ class Php7 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1195; - protected $gotoTableSize = 583; + protected $actionTableSize = 1196; + protected $gotoTableSize = 585; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 418; - protected $numNonLeafStates = 708; + protected $YY2TBLSTATE = 419; + protected $numNonLeafStates = 710; protected $symbolToName = array( "EOF", @@ -244,126 +244,126 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $action = array( - 131, 132, 133, 568, 134, 135, 0, 720, 721, 722, - 136, 36, 832, 909, 833, 467,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 100, 101, 102, 103, 104, 1064, 1065, - 1066, 1063, 1062, 1061, 1067, 714, 713,-32766,-32766,-32766, + 131, 132, 133, 569, 134, 135, 0, 722, 723, 724, + 136, 36, 834, 911, 835, 468,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 100, 101, 102, 103, 104, 1068, 1069, + 1070, 1067, 1066, 1065, 1071, 716, 715,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 544, 545,-32766,-32766, 723,-32766,-32766,-32766, 996, - 997, 804, 920, 445, 446, 447, 368, 369, 2, 265, - 137, 394, 727, 728, 729, 730, 412,-32766, 418,-32766, - -32766,-32766,-32766,-32766, 988, 731, 732, 733, 734, 735, - 736, 737, 738, 739, 740, 741, 761, 569, 762, 763, - 764, 765, 753, 754, 334, 335, 756, 757, 742, 743, - 744, 746, 747, 748, 344, 788, 789, 790, 791, 792, - 793, 749, 750, 570, 571, 782, 773, 771, 772, 785, - 768, 769, 281, 418, 572, 573, 767, 574, 575, 576, - 577, 578, 579, 596, -573, 468, 490, 796, 770, 580, - 581, -573, 138,-32766,-32766,-32766, 131, 132, 133, 568, - 134, 135, 1015, 720, 721, 722, 136, 36, 1056,-32766, - -32766,-32766, 1299, 694,-32766, 1300,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 1064, 1065, 1066, 1063, 1062, 1061, 1067, - -32766, 714, 713, 370, 369, 1254,-32766,-32766,-32766, -570, - 105, 106, 107, 412, 268, 889, -570, 238, 1189, 1188, - 1190, 723,-32766,-32766,-32766, 1042, 108,-32766,-32766,-32766, - -32766, 984, 983, 982, 985, 265, 137, 394, 727, 728, - 729, 730, 12,-32766, 418,-32766,-32766,-32766,-32766, 996, - 997, 731, 732, 733, 734, 735, 736, 737, 738, 739, - 740, 741, 761, 569, 762, 763, 764, 765, 753, 754, - 334, 335, 756, 757, 742, 743, 744, 746, 747, 748, - 344, 788, 789, 790, 791, 792, 793, 749, 750, 570, - 571, 782, 773, 771, 772, 785, 768, 769, 879, 319, - 572, 573, 767, 574, 575, 576, 577, 578, 579,-32766, - 81, 82, 83, -573, 770, 580, 581, -573, 138, 745, - 715, 716, 717, 718, 719, 1274, 720, 721, 722, 758, - 759, 35, 1273, 84, 85, 86, 87, 88, 89, 90, + -32767, 545, 546,-32766,-32766, 725,-32766,-32766,-32766, 998, + 999, 806, 922, 446, 447, 448, 369, 370, 2, 266, + 137, 395, 729, 730, 731, 732, 413,-32766, 419,-32766, + -32766,-32766,-32766,-32766, 990, 733, 734, 735, 736, 737, + 738, 739, 740, 741, 742, 743, 763, 570, 764, 765, + 766, 767, 755, 756, 335, 336, 758, 759, 744, 745, + 746, 748, 749, 750, 345, 790, 791, 792, 793, 794, + 795, 751, 752, 571, 572, 784, 775, 773, 774, 787, + 770, 771, 282, 419, 573, 574, 769, 575, 576, 577, + 578, 579, 580, 598, -575, 469, 491, 798, 772, 581, + 582, -575, 138,-32766,-32766,-32766, 131, 132, 133, 569, + 134, 135, 1017, 722, 723, 724, 136, 36, 1060,-32766, + -32766,-32766, 1303, 696,-32766, 1304,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 1068, 1069, 1070, 1067, 1066, 1065, 1071, + -32766, 716, 715, 371, 370, 1258,-32766,-32766,-32766, -572, + 105, 106, 107, 413, 269, 891, -572, 239, 1193, 1192, + 1194, 725,-32766,-32766,-32766, 1046, 108,-32766,-32766,-32766, + -32766, 986, 985, 984, 987, 266, 137, 395, 729, 730, + 731, 732, 12,-32766, 419,-32766,-32766,-32766,-32766, 998, + 999, 733, 734, 735, 736, 737, 738, 739, 740, 741, + 742, 743, 763, 570, 764, 765, 766, 767, 755, 756, + 335, 336, 758, 759, 744, 745, 746, 748, 749, 750, + 345, 790, 791, 792, 793, 794, 795, 751, 752, 571, + 572, 784, 775, 773, 774, 787, 770, 771, 881, 320, + 573, 574, 769, 575, 576, 577, 578, 579, 580,-32766, + 81, 82, 83, -575, 772, 581, 582, -575, 147, 747, + 717, 718, 719, 720, 721, 1278, 722, 723, 724, 760, + 761, 35, 1277, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 994, 268, 148, - -32766,-32766,-32766, 453, 454, 80, 33, -264, -570, 1014, - 108, 318, -570, 891, 723, 680, 801, 127, 996, 997, - 590,-32766, 1040,-32766,-32766,-32766, 807, 149, 724, 725, - 726, 727, 728, 729, 730, -88, 1194, 794, 276, -524, - 281,-32766,-32766,-32766, 731, 732, 733, 734, 735, 736, - 737, 738, 739, 740, 741, 761, 784, 762, 763, 764, - 765, 753, 754, 755, 783, 756, 757, 742, 743, 744, - 746, 747, 748, 787, 788, 789, 790, 791, 792, 793, - 749, 750, 751, 752, 782, 773, 771, 772, 785, 768, - 769, 143, 802, 760, 766, 767, 774, 775, 777, 776, - 778, 779, -312, -524, -524, -193, -192, 770, 781, 780, - 48, 49, 50, 499, 51, 52, 237, 805, -524, -86, - 53, 54, -111, 55, 994, 251,-32766, -111, 798, -111, - -524, 540, -530, -350, 298, -350, 302, -111, -111, -111, - -111, -111, -111, -111, -111, 996, 997, 996, 997, 151, - -32766,-32766,-32766, 1187, 805, 125, 304, 1289, 56, 57, - 102, 103, 104, -111, 58, 1214, 59, 244, 245, 60, - 61, 62, 63, 64, 65, 66, 67, -523, 26, 266, - 68, 434, 500, -326, 806, -86, 1220, 1221, 501, 1185, - 805, 1194, 1226, 291, 1218, 40, 23, 502, 73, 503, - 951, 504, 318, 505, 800, 152, 506, 507, 277, 682, - 278, 42, 43, 435, 365, 364, 889, 44, 508, 34, - 247, -16, -564, 356, 330, 316, -564, 1194, 1189, 1188, - 1190, -525, 509, 510, 511, 331, -522, 1270, 47, 714, - 713, -523, -523, 332, 512, 513, 805, 1208, 1209, 1210, - 1211, 1205, 1206, 290, 358, 282, -523, 283, -312, 1212, - 1207, -193, -192, 1189, 1188, 1190, 291, 889, -523, 362, - -529, 69, 805, 314, 315, 318, 30, 109, 110, 111, + 101, 102, 103, 104, 105, 106, 107, 996, 269, 149, + -32766,-32766,-32766, 454, 455, 80, 33, -264, -572, 1016, + 108, 319, -572, 893, 725, 682, 803, 127, 998, 999, + 592,-32766, 1044,-32766,-32766,-32766, 809, 150, 726, 727, + 728, 729, 730, 731, 732, -88, 1198, 796, 277, -526, + 282,-32766,-32766,-32766, 733, 734, 735, 736, 737, 738, + 739, 740, 741, 742, 743, 763, 786, 764, 765, 766, + 767, 755, 756, 757, 785, 758, 759, 744, 745, 746, + 748, 749, 750, 789, 790, 791, 792, 793, 794, 795, + 751, 752, 753, 754, 784, 775, 773, 774, 787, 770, + 771, 143, 804, 762, 768, 769, 776, 777, 779, 778, + 780, 781, -314, -526, -526, -193, -192, 772, 783, 782, + 48, 49, 50, 500, 51, 52, 238, 807, -526, -86, + 53, 54, -111, 55, 996, 252,-32766, -111, 800, -111, + -526, 541, -532, -352, 299, -352, 303, -111, -111, -111, + -111, -111, -111, -111, -111, 998, 999, 998, 999, 152, + -32766,-32766,-32766, 1191, 807, 125, 305, 1293, 56, 57, + 102, 103, 104, -111, 58, 1218, 59, 245, 246, 60, + 61, 62, 63, 64, 65, 66, 67, -525, 26, 267, + 68, 435, 501, -328, 808, -86, 1224, 1225, 502, 1189, + 807, 1198, 1230, 292, 1222, 40, 23, 503, 73, 504, + 953, 505, 319, 506, 802, 153, 507, 508, 278, 684, + 279, 42, 43, 436, 366, 365, 891, 44, 509, 34, + 248, -16, -566, 357, 331, 317, -566, 1198, 1193, 1192, + 1194, -527, 510, 511, 512, 332, -524, 1274, 47, 716, + 715, -525, -525, 333, 513, 514, 807, 1212, 1213, 1214, + 1215, 1209, 1210, 291, 359, 283, -525, 284, -314, 1216, + 1211, -193, -192, 1193, 1192, 1194, 292, 891, -525, 363, + -531, 69, 807, 315, 316, 319, 30, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - -153, -153, -153, 636, 24, -525, -525, 685, 377, 879, - -522, -522, 294, 295, 889, -153, 430, -153, 805, -153, - -525, -153, 714, 713, 431, -522, 796, 361, -111, 1101, - 1103, 363, -525, 432, 889, 139, 433, -522, 952, 126, - -522, 318, -111, -111, 686, 811, 379, -527, 11, 832, - 153, 833, 865, -111, -111, -111, -111, 46, 291,-32766, - 879, 652, 653, 73, 687, 1187, 1041, 318, 706, 147, - 397, 155,-32766,-32766,-32766, 31,-32766, -79,-32766, 122, - -32766, 714, 713,-32766, 891, 889, 680, -153,-32766,-32766, - -32766, 714, 713, 889,-32766,-32766, 123, 879, 128, 73, - -32766, 409, 129, 318, -522, -522, 142, 140, -75,-32766, - 156, -527, -527, 318, 26, 689, 157, 879, 158, -522, - 159, 292, 293, 696, 366, 367, 805, -73,-32766, -72, - 1218, -522, 371, 372, 1187, 891, -71, 680, -527, 72, + -153, -153, -153, 638, 24, -527, -527, 687, 378, 881, + -524, -524, 295, 296, 891, -153, 431, -153, 807, -153, + -527, -153, 716, 715, 432, -524, 798, 362, -111, 1105, + 1107, 364, -527, 433, 891, 139, 434, -524, 954, 126, + -524, 319, -111, -111, 688, 813, 380, -529, 11, 834, + 154, 835, 867, -111, -111, -111, -111, 46, 292,-32766, + 881, 654, 655, 73, 689, 1191, 1045, 319, 708, 148, + 398, 156,-32766,-32766,-32766, 31,-32766, -79,-32766, 122, + -32766, 716, 715,-32766, 893, 891, 682, -153,-32766,-32766, + -32766, 716, 715, 891,-32766,-32766, 123, 881, 128, 73, + -32766, 410, 129, 319, -524, -524, 142, 140, -75,-32766, + 157, -529, -529, 319, 26, 691, 158, 881, 159, -524, + 160, 293, 294, 698, 367, 368, 807, -73,-32766, -72, + 1222, -524, 372, 373, 1191, 893, -71, 682, -529, 72, -70,-32766,-32766,-32766, -69,-32766, -68,-32766, 124,-32766, - 628, 629,-32766, -67, -66, -47, -51,-32766,-32766,-32766, - -18, 146, 269,-32766,-32766, 275, 695, 698, 879,-32766, - 409, 888, 891, 145, 680, 280, 879, 905,-32766, 279, - 512, 513, 284, 1208, 1209, 1210, 1211, 1205, 1206, 324, - 130, 144, 937, 285, 680, 1212, 1207, 108, 268,-32766, - 796, 805,-32766, 660, 637, 1187, 655, 71, 673, 1071, - 315, 318,-32766,-32766,-32766, 1301,-32766, 299,-32766, 626, - -32766, 429, 542,-32766,-32766, 921, 554, 922,-32766,-32766, - -32766, 1225, 548,-32766,-32766,-32766, -4, 889, -488, 1187, - -32766, 409, 642, 891, 297, 680,-32766,-32766,-32766,-32766, - -32766, 891,-32766, 680,-32766, 13, 1227,-32766, 450, 478, - 643, 907,-32766,-32766,-32766,-32766, 656, -478,-32766,-32766, - 0, 1187, 0, 0,-32766, 409, 0, 296,-32766,-32766, - -32766, 303,-32766,-32766,-32766, 0,-32766, 0, 804,-32766, - 0, 0, 0, 473,-32766,-32766,-32766,-32766, 0, 7, - -32766,-32766, 15, 1187, 560, 594,-32766, 409, 1215, 889, - -32766,-32766,-32766, 360,-32766,-32766,-32766, 816,-32766, -267, - 879,-32766, 38, 291, 0, 0,-32766,-32766,-32766, 39, - 703, 704,-32766,-32766, 870, 961, 938, 945,-32766, 409, - 935, 946, 363, 868, 425, 889, 933,-32766, 1045, 289, - 1240, 1048, 1049, -111, -111, 1046, 1047, 1053, -558, 1258, - 1292, 631, 0, 824, -111, -111, -111, -111, 32, 313, - -32766, 359, 681, 684, 688, 690, 1187, 691, 692, 693, - 697, 683, 318,-32766,-32766,-32766, 9,-32766, 700,-32766, - 866,-32766, 879, 1296,-32766, 891, 1298, 680, -4,-32766, - -32766,-32766, 827, 826, 835,-32766,-32766, 914, -242, -242, - -242,-32766, 409, 953, 363, 26, 834, 1297, 913, 915, - -32766, 912, 1173, 898, 908, -111, -111, 805, 879, 896, - 943, 1218, 944, 1295, 1252, 865, -111, -111, -111, -111, - 1241, 1259, 1265, 1268, -241, -241, -241, -556, -530, -529, - 363, -528, 1, 27, 28, 37, 41, 45, 70, 0, - 74, -111, -111, 75, 76, 77, 78, 891, 79, 680, - -242, 865, -111, -111, -111, -111, 141, 150, 154, 243, - 320, 345, 513, 346, 1208, 1209, 1210, 1211, 1205, 1206, - 347, 348, 349, 350, 351, 352, 1212, 1207, 353, 354, - 355, 357, 426, 891, -265, 680, -241, -264, 71, 0, - 17, 315, 318, 18, 19, 20, 22, 396, 469, 470, - 477, 480, 481, 482, 483, 487, 488, 489, 497, 667, - 1198, 1141, 1216, 1016, 1177, -269, -103, 16, 21, 25, - 288, 395, 587, 591, 618, 672, 1145, 1193, 1142, 1271, - 0, -492, 1158, 0, 1219 + 630, 631,-32766, -67, -66, -47, -51,-32766,-32766,-32766, + -18, 146, 270,-32766,-32766, 276, 697, 700, 881,-32766, + 410, 890, 893, 145, 682, 281, 881, 907,-32766, 280, + 513, 514, 285, 1212, 1213, 1214, 1215, 1209, 1210, 325, + 130, 144, 939, 286, 682, 1216, 1211, 108, 269,-32766, + 798, 807,-32766, 662, 639, 1191, 657, 71, 675, 1075, + 316, 319,-32766,-32766,-32766, 1305,-32766, 300,-32766, 628, + -32766, 430, 543,-32766,-32766, 923, 555, 924,-32766,-32766, + -32766, 1229, 549,-32766,-32766,-32766, -4, 891, -490, 1191, + -32766, 410, 644, 893, 298, 682,-32766,-32766,-32766,-32766, + -32766, 893,-32766, 682,-32766, 13, 1231,-32766, 451, 479, + 645, 909,-32766,-32766,-32766,-32766, 658, -480,-32766,-32766, + 0, 1191, 0, 0,-32766, 410, 0, 297,-32766,-32766, + -32766, 304,-32766,-32766,-32766, 0,-32766, 0, 806,-32766, + 0, 0, 0, 474,-32766,-32766,-32766,-32766, 0, 7, + -32766,-32766, 15, 1191, 561, 596,-32766, 410, 1219, 891, + -32766,-32766,-32766, 361,-32766,-32766,-32766, 818,-32766, -267, + 881,-32766, 38, 292, 0, 0,-32766,-32766,-32766, 39, + 705, 706,-32766,-32766, 872, 963, 940, 947,-32766, 410, + 937, 948, 364, 870, 426, 891, 935,-32766, 1049, 290, + 1244, 1052, 1053, -111, -111, 1050, 1051, 1057, -560, 1262, + 1296, 633, 0, 826, -111, -111, -111, -111, 32, 314, + -32766, 360, 683, 686, 690, 692, 1191, 693, 694, 695, + 699, 685, 319,-32766,-32766,-32766, 9,-32766, 702,-32766, + 868,-32766, 881, 1300,-32766, 893, 1302, 682, -4,-32766, + -32766,-32766, 829, 828, 837,-32766,-32766, 916, -242, -242, + -242,-32766, 410, 955, 364, 26, 836, 1301, 915, 917, + -32766, 914, 1177, 900, 910, -111, -111, 807, 881, 898, + 945, 1222, 946, 1299, 1256, 867, -111, -111, -111, -111, + 1245, 1263, 1269, 1272, -241, -241, -241, -558, -532, -531, + 364, -530, 1, 27, 28, 37, 41, 45, 70, 0, + 74, -111, -111, 75, 76, 77, 78, 893, 79, 682, + -242, 867, -111, -111, -111, -111, 141, 151, 155, 244, + 321, 346, 514, 347, 1212, 1213, 1214, 1215, 1209, 1210, + 348, 349, 350, 351, 352, 353, 1216, 1211, 354, 355, + 356, 358, 427, 893, -265, 682, -241, -264, 71, 0, + 17, 316, 319, 18, 19, 20, 22, 397, 470, 471, + 478, 481, 482, 483, 484, 488, 489, 490, 498, 669, + 1202, 1145, 1220, 1019, 1018, 1181, -269, -103, 16, 21, + 25, 289, 396, 589, 593, 620, 674, 1149, 1197, 1146, + 1275, 0, -494, 1162, 0, 1223 ); protected $actionCheck = array( @@ -486,7 +486,7 @@ class Php7 extends \PhpParser\ParserAbstract 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - -1, 165, 165, -1, 166 + 164, -1, 165, 165, -1, 166 ); protected $actionBase = array( @@ -506,63 +506,63 @@ class Php7 extends \PhpParser\ParserAbstract 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 375, 519, 369, 701, 1016, 1022, 1018, 1023, 1014, 1013, - 1017, 1019, 1024, 911, 912, 782, 918, 919, 920, 921, - 1020, 841, 1015, 1021, 291, 291, 291, 291, 291, 291, + 936, 375, 519, 369, 701, 1017, 1023, 1019, 1024, 1015, + 1014, 1018, 1020, 1025, 911, 912, 782, 918, 919, 920, + 921, 1021, 841, 1016, 1022, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 290, 491, 44, 382, 382, 382, 382, 382, 382, 382, + 291, 290, 491, 44, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, - 382, 382, 382, 160, 160, 160, 187, 684, 684, 341, - 203, 610, 47, 985, 985, 985, 985, 985, 985, 985, - 985, 985, 985, 144, 144, 7, 7, 7, 7, 7, - 371, -25, -25, -25, -25, 540, 385, 102, 576, 358, - 45, 377, 460, 460, 360, 231, 231, 231, 231, 231, - 231, -78, -78, -78, -78, -78, -66, 319, 457, -94, - 396, 423, 586, 586, 586, 586, 423, 423, 423, 423, - 750, 1028, 423, 423, 423, 511, 516, 516, 518, 147, - 147, 147, 516, 583, 777, 422, 583, 422, 194, 92, - 748, -40, 87, 412, 748, 617, 627, 198, 143, 773, - 658, 773, 1012, 757, 764, 717, 838, 860, 1025, 800, - 908, 806, 910, 219, 686, 1011, 1011, 1011, 1011, 1011, - 1011, 1011, 1011, 1011, 1011, 1011, 855, 552, 1012, 286, - 855, 855, 855, 552, 552, 552, 552, 552, 552, 552, - 552, 552, 552, 679, 286, 568, 626, 286, 794, 552, - 375, 758, 375, 375, 375, 375, 958, 375, 375, 375, - 375, 375, 375, 970, 769, -16, 375, 519, 12, 12, - 547, 83, 12, 12, 12, 12, 375, 375, 375, 658, - 781, 713, 666, 792, 448, 781, 781, 781, 438, 444, - 193, 447, 570, 523, 580, 760, 760, 767, 929, 929, - 760, 759, 760, 767, 934, 760, 929, 805, 359, 648, - 577, 611, 656, 929, 478, 760, 760, 760, 760, 665, - 760, 467, 433, 760, 760, 785, 774, 789, 60, 929, - 929, 929, 789, 596, 751, 751, 751, 811, 812, 746, - 771, 567, 498, 677, 348, 779, 771, 771, 760, 640, - 746, 771, 746, 771, 747, 771, 771, 771, 746, 771, - 760, 759, 585, 771, 734, 668, 224, 771, 6, 935, - 937, 354, 940, 932, 941, 979, 942, 943, 851, 956, - 933, 945, 931, 930, 780, 703, 720, 790, 729, 928, - 768, 768, 768, 925, 768, 768, 768, 768, 768, 768, - 768, 768, 703, 788, 804, 733, 783, 960, 722, 726, - 725, 868, 1026, 1027, 737, 739, 958, 1006, 953, 803, - 730, 992, 967, 866, 848, 968, 969, 993, 1007, 1008, - 871, 761, 874, 880, 797, 971, 852, 768, 935, 943, - 933, 945, 931, 930, 763, 762, 753, 755, 749, 745, - 736, 738, 770, 924, 835, 830, 970, 926, 703, 839, - 986, 847, 994, 995, 850, 801, 772, 840, 881, 972, - 975, 976, 853, 1009, 810, 989, 795, 996, 802, 882, - 997, 998, 999, 1000, 885, 854, 856, 857, 815, 754, - 980, 786, 891, 335, 787, 796, 978, 363, 957, 858, - 894, 895, 1001, 1002, 1003, 896, 954, 816, 990, 752, - 991, 983, 817, 818, 485, 784, 778, 541, 676, 897, - 899, 900, 955, 775, 766, 821, 822, 1010, 901, 697, - 824, 740, 902, 1005, 742, 744, 756, 859, 793, 743, - 798, 977, 776, 827, 907, 829, 832, 833, 1004, 836, + 382, 382, 382, 382, 160, 160, 160, 187, 684, 684, + 341, 203, 610, 47, 985, 985, 985, 985, 985, 985, + 985, 985, 985, 985, 144, 144, 7, 7, 7, 7, + 7, 371, -25, -25, -25, -25, 540, 385, 102, 576, + 358, 45, 377, 460, 460, 360, 231, 231, 231, 231, + 231, 231, -78, -78, -78, -78, -78, -66, 319, 457, + -94, 396, 423, 586, 586, 586, 586, 423, 423, 423, + 423, 750, 1029, 423, 423, 423, 511, 516, 516, 518, + 147, 147, 147, 516, 583, 777, 422, 583, 422, 194, + 92, 748, -40, 87, 412, 748, 617, 627, 198, 143, + 773, 658, 773, 1013, 757, 764, 717, 838, 860, 1026, + 800, 908, 806, 910, 219, 686, 1012, 1012, 1012, 1012, + 1012, 1012, 1012, 1012, 1012, 1012, 1012, 855, 552, 1013, + 286, 855, 855, 855, 552, 552, 552, 552, 552, 552, + 552, 552, 552, 552, 679, 286, 568, 626, 286, 794, + 552, 375, 758, 375, 375, 375, 375, 958, 375, 375, + 375, 375, 375, 375, 970, 769, -16, 375, 519, 12, + 12, 547, 83, 12, 12, 12, 12, 375, 375, 375, + 658, 781, 713, 666, 792, 448, 781, 781, 781, 438, + 444, 193, 447, 570, 523, 580, 760, 760, 767, 929, + 929, 760, 759, 760, 767, 934, 760, 929, 805, 359, + 648, 577, 611, 656, 929, 478, 760, 760, 760, 760, + 665, 760, 467, 433, 760, 760, 785, 774, 789, 60, + 929, 929, 929, 789, 596, 751, 751, 751, 811, 812, + 746, 771, 567, 498, 677, 348, 779, 771, 771, 760, + 640, 746, 771, 746, 771, 747, 771, 771, 771, 746, + 771, 760, 759, 585, 771, 734, 668, 224, 771, 6, + 935, 937, 354, 940, 932, 941, 979, 942, 943, 851, + 956, 933, 945, 931, 930, 780, 703, 720, 790, 729, + 928, 768, 768, 768, 925, 768, 768, 768, 768, 768, + 768, 768, 768, 703, 788, 804, 733, 783, 960, 722, + 726, 725, 868, 1027, 1028, 737, 739, 958, 1006, 953, + 803, 730, 992, 967, 866, 848, 968, 969, 993, 1007, + 1008, 871, 761, 874, 880, 797, 971, 852, 768, 935, + 943, 933, 945, 931, 930, 763, 762, 753, 755, 749, + 745, 736, 738, 770, 1009, 924, 835, 830, 970, 926, + 703, 839, 986, 847, 994, 995, 850, 801, 772, 840, + 881, 972, 975, 976, 853, 1010, 810, 989, 795, 996, + 802, 882, 997, 998, 999, 1000, 885, 854, 856, 857, + 815, 754, 980, 786, 891, 335, 787, 796, 978, 363, + 957, 858, 894, 895, 1001, 1002, 1003, 896, 954, 816, + 990, 752, 991, 983, 817, 818, 485, 784, 778, 541, + 676, 897, 899, 900, 955, 775, 766, 821, 822, 1011, + 901, 697, 824, 740, 902, 1005, 742, 744, 756, 859, + 793, 743, 798, 977, 776, 827, 907, 829, 832, 833, + 1004, 836, 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, 458, - 458, 458, 458, 458, 458, 307, 307, 307, 307, 0, - 0, 307, 0, 0, 458, 458, 458, 458, 458, 458, + 0, 458, 458, 458, 458, 458, 458, 307, 307, 307, + 307, 0, 0, 307, 0, 0, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, @@ -576,42 +576,42 @@ class Php7 extends \PhpParser\ParserAbstract 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 0, 0, 0, 0, 0, 0, 0, 0, + 291, 291, 291, 291, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 423, 423, 291, 291, 0, - 291, 423, 423, 423, 423, 423, 423, 423, 423, 423, - 423, 291, 291, 291, 291, 291, 291, 291, 805, 147, - 147, 147, 147, 423, 423, 423, 423, 423, -88, -88, - 147, 147, 423, 423, 423, 423, 423, 423, 423, 423, - 423, 423, 423, 423, 0, 0, 0, 286, 422, 0, - 759, 759, 759, 759, 0, 0, 0, 0, 422, 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 286, 422, 0, 286, 0, 759, 759, 423, 805, - 805, 314, 423, 0, 0, 0, 0, 286, 759, 286, - 552, 422, 552, 552, 12, 375, 314, 608, 608, 608, - 608, 0, 658, 805, 805, 805, 805, 805, 805, 805, - 805, 805, 805, 805, 759, 0, 805, 0, 759, 759, - 759, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 759, 0, 0, 929, - 0, 0, 0, 0, 760, 0, 0, 0, 0, 0, - 0, 760, 934, 0, 0, 0, 0, 0, 0, 759, - 0, 0, 0, 0, 0, 0, 0, 0, 768, 801, - 0, 801, 0, 768, 768, 768 + 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 423, 423, + 291, 291, 0, 291, 423, 423, 423, 423, 423, 423, + 423, 423, 423, 423, 291, 291, 291, 291, 291, 291, + 291, 805, 147, 147, 147, 147, 423, 423, 423, 423, + 423, -88, -88, 147, 147, 423, 423, 423, 423, 423, + 423, 423, 423, 423, 423, 423, 423, 0, 0, 0, + 286, 422, 0, 759, 759, 759, 759, 0, 0, 0, + 0, 422, 422, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 286, 422, 0, 286, 0, 759, + 759, 423, 805, 805, 314, 423, 0, 0, 0, 0, + 286, 759, 286, 552, 422, 552, 552, 12, 375, 314, + 608, 608, 608, 608, 0, 658, 805, 805, 805, 805, + 805, 805, 805, 805, 805, 805, 805, 759, 0, 805, + 0, 759, 759, 759, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 759, + 0, 0, 929, 0, 0, 0, 0, 760, 0, 0, + 0, 0, 0, 0, 760, 934, 0, 0, 0, 0, + 0, 0, 759, 0, 0, 0, 0, 0, 0, 0, + 0, 768, 801, 0, 801, 0, 768, 768, 768 ); protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 576, 576, 576, 576, - 32767,32767, 246, 103,32767,32767, 452, 370, 370, 370, - 32767,32767, 520, 520, 520, 520, 520, 520,32767,32767, - 32767,32767,32767,32767, 452,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 578, 578, 578, 578, + 32767,32767, 246, 103,32767,32767, 454, 372, 372, 372, + 32767,32767, 522, 522, 522, 522, 522, 522,32767,32767, + 32767,32767,32767,32767, 454,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, @@ -619,132 +619,132 @@ class Php7 extends \PhpParser\ParserAbstract 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, 101,32767,32767, - 32767, 37, 7, 8, 10, 11, 50, 17,32767,32767, + 32767, 37, 7, 8, 10, 11, 50, 17, 310,32767, 32767,32767,32767, 103,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 569,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 456, 435, 436, 438, 439, 369, - 521, 575, 311, 572, 368, 146, 323, 313, 234, 314, - 250, 457, 251, 458, 461, 462, 211, 279, 365, 150, - 399, 453, 401, 451, 455, 400, 375, 380, 381, 382, - 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, - 373, 374, 454, 432, 431, 430, 397,32767,32767, 398, - 402, 372, 405,32767,32767,32767,32767,32767,32767,32767, - 32767, 103,32767, 403, 404, 421, 422, 419, 420, 423, - 32767, 424, 425, 426, 427,32767,32767, 302,32767,32767, - 349, 347, 412, 413, 302,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 514, 429,32767, + 32767,32767,32767,32767, 571,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 103,32767, 101, 516, 394, 396, 484, 407, - 408, 406, 376,32767, 491,32767, 103, 493,32767,32767, - 32767, 112,32767,32767,32767, 515,32767, 522, 522,32767, - 477, 101, 194,32767, 194, 194,32767,32767,32767,32767, - 32767,32767,32767, 583, 477, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111,32767, 194, 111,32767, - 32767,32767, 101, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 189,32767, 260, 262, 103, 537, 194, - 32767, 496,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 489,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 477, - 417, 139,32767, 139, 522, 409, 410, 411, 479, 522, - 522, 522, 298, 281,32767,32767,32767,32767, 494, 494, - 101, 101, 101, 101, 489,32767,32767, 112, 100, 100, - 100, 100, 100, 104, 102,32767,32767,32767,32767, 100, - 32767, 102, 102,32767,32767, 217, 208, 215, 102,32767, - 541, 542, 215, 102, 219, 219, 219, 239, 239, 468, - 304, 102, 100, 102, 102, 196, 304, 304,32767, 102, - 468, 304, 468, 304, 198, 304, 304, 304, 468, 304, - 32767,32767, 102, 304, 210, 100, 100, 304,32767,32767, - 32767, 479,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 509,32767, 526, 539, - 415, 416, 418, 524, 440, 441, 442, 443, 444, 445, - 446, 448, 571,32767, 483,32767,32767,32767,32767, 322, - 581,32767, 581,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 458, 437, 438, 440, 441, + 371, 523, 577, 313, 574, 370, 146, 325, 315, 234, + 316, 250, 459, 251, 460, 463, 464, 211, 279, 367, + 150, 401, 455, 403, 453, 457, 402, 377, 382, 383, + 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, + 394, 375, 376, 456, 434, 433, 432, 399,32767,32767, + 400, 404, 374, 407,32767,32767,32767,32767,32767,32767, + 32767,32767, 103,32767, 405, 406, 423, 424, 421, 422, + 425,32767, 426, 427, 428, 429,32767,32767, 302,32767, + 32767, 351, 349, 414, 415, 302,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 516, 431, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 582,32767, 522,32767,32767,32767,32767, 414, 9, 76, - 43, 44, 52, 58, 500, 501, 502, 503, 497, 498, - 504, 499,32767, 505, 547,32767,32767, 523, 574,32767, - 32767,32767,32767,32767,32767, 139,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 509,32767, 137,32767, + 32767,32767,32767, 103,32767, 101, 518, 396, 398, 486, + 409, 410, 408, 378,32767, 493,32767, 103, 495,32767, + 32767,32767, 112,32767,32767,32767, 517,32767, 524, 524, + 32767, 479, 101, 194,32767, 194, 194,32767,32767,32767, + 32767,32767,32767,32767, 585, 479, 111, 111, 111, 111, + 111, 111, 111, 111, 111, 111, 111,32767, 194, 111, + 32767,32767,32767, 101, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 189,32767, 260, 262, 103, 539, + 194,32767, 498,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 491,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 522,32767,32767,32767, 300, 301,32767,32767,32767,32767, + 479, 419, 139,32767, 139, 524, 411, 412, 413, 481, + 524, 524, 524, 298, 281,32767,32767,32767,32767, 496, + 496, 101, 101, 101, 101, 491,32767,32767, 112, 100, + 100, 100, 100, 100, 104, 102,32767,32767,32767,32767, + 100,32767, 102, 102,32767,32767, 217, 208, 215, 102, + 32767, 543, 544, 215, 102, 219, 219, 219, 239, 239, + 470, 304, 102, 100, 102, 102, 196, 304, 304,32767, + 102, 470, 304, 470, 304, 198, 304, 304, 304, 470, + 304,32767,32767, 102, 304, 210, 100, 100, 304,32767, + 32767,32767, 481,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 511,32767, 528, + 541, 417, 418, 420, 526, 442, 443, 444, 445, 446, + 447, 448, 450, 573,32767, 485,32767,32767,32767,32767, + 324, 583,32767, 583,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 522,32767,32767,32767, 283, 284,32767,32767,32767, + 32767, 584,32767, 524,32767,32767,32767,32767, 416, 9, + 76, 43, 44, 52, 58, 502, 503, 504, 505, 499, + 500, 506, 501,32767,32767, 507, 549,32767,32767, 525, + 576,32767,32767,32767,32767,32767,32767, 139,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 511,32767, + 137,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 524,32767,32767,32767, 300, 301,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 278,32767,32767, 364,32767,32767,32767,32767, 343, + 32767,32767,32767, 524,32767,32767,32767, 283, 284,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 152, 152, 3, 3, 325, 152, 152, 152, 325, 152, - 325, 325, 325, 152, 152, 152, 152, 152, 152, 272, - 184, 254, 257, 239, 239, 152, 335, 152 + 32767,32767,32767, 278,32767,32767, 366,32767,32767,32767, + 32767, 345,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 152, 152, 3, 3, 327, 152, 152, 152, + 327, 152, 327, 327, 327, 152, 152, 152, 152, 152, + 152, 272, 184, 254, 257, 239, 239, 152, 337, 152 ); protected $goto = array( - 192, 192, 668, 420, 641, 882, 838, 883, 1018, 414, - 306, 307, 327, 562, 312, 419, 328, 421, 620, 799, - 676, 850, 584, 822, 837, 163, 163, 163, 163, 216, - 193, 189, 189, 173, 175, 211, 189, 189, 189, 189, - 189, 190, 190, 190, 190, 190, 190, 184, 185, 186, - 187, 188, 213, 211, 214, 520, 521, 410, 522, 524, - 525, 526, 527, 528, 529, 530, 531, 1087, 164, 165, - 166, 191, 167, 168, 169, 162, 170, 171, 172, 174, - 210, 212, 215, 233, 236, 239, 240, 242, 253, 254, - 255, 256, 257, 258, 259, 261, 262, 263, 264, 272, - 273, 309, 310, 311, 415, 416, 417, 567, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 176, 232, 177, 194, 195, 196, 234, - 184, 185, 186, 187, 188, 213, 1087, 197, 178, 179, - 180, 198, 194, 181, 235, 199, 161, 200, 201, 182, - 202, 203, 204, 183, 205, 206, 207, 208, 209, 321, - 321, 321, 321, 825, 606, 606, 823, 546, 537, 1182, - 1217, 1217, 1217, 1217, 1217, 1217, 1217, 1217, 1217, 1217, - 1235, 1235, 461, 1260, 1261, 856, 1235, 1235, 1235, 1235, - 1235, 1235, 1235, 1235, 1235, 1235, 386, 537, 546, 555, - 556, 393, 565, 586, 600, 601, 830, 797, 878, 873, - 874, 887, 14, 831, 875, 828, 876, 877, 829, 452, - 452, 936, 881, 340, 1183, 803, 249, 249, 452, 1233, - 1233, 813, 1039, 1035, 1036, 1233, 1233, 1233, 1233, 1233, - 1233, 1233, 1233, 1233, 1233, 818, 818, 1184, 1243, 1244, - 559, 246, 246, 246, 246, 248, 250, 604, 638, 1186, - 1186, 995, 1186, 995, 413, 803, 595, 803, 995, 995, - 995, 995, 995, 995, 995, 995, 995, 995, 995, 995, - 1257, 1257, 5, 1257, 6, 1186, 286, 286, 286, 286, - 1186, 1186, 1186, 1186, 338, 343, 1186, 1186, 1186, 1267, - 1267, 1267, 1267, 1059, 1060, 343, 343, 1269, 1269, 1269, - 1269, 1286, 1286, 635, 894, 649, 650, 651, 895, 343, - 343, 1275, 343, 485, 1302, 486, 534, 534, 1286, 534, - 957, 493, 558, 1253, 382, 539, 523, 523, 343, 928, - 400, 675, 523, 523, 523, 523, 523, 523, 523, 523, - 523, 523, 443, 317, 301, 1262, 1263, 930, 930, 930, - 930, 818, 640, 443, 924, 931, 1136, 532, 532, 532, - 532, 1026, 588, 329, 553, 1255, 1255, 1026, 702, 619, - 621, 427, 639, 1246, 616, 617, 658, 662, 971, 666, - 674, 967, 815, 552, 563, 598, 843, 392, 821, 979, - 599, 384, 388, 547, 585, 589, 661, 840, 1285, 1285, - 960, 934, 934, 932, 934, 701, 437, 536, 969, 964, - 1179, 437, 437, 899, 1075, 1285, 1024, 705, 852, 941, - 603, 462, 538, 550, 1028, 976, 539, 538, 466, 550, - 0, 1288, 385, 842, 0, 644, 955, 1070, 0, 0, - 0, 836, 566, 455, 456, 457, 0, 848, 341, 342, - 1293, 1294, 252, 252, 1178, 398, 399, 0, 0, 0, - 647, 0, 648, 422, 402, 403, 404, 0, 659, 0, - 422, 0, 405, 0, 0, 846, 336, 1007, 1000, 1004, - 1001, 1005, 0, 0, 0, 0, 1181, 494, 0, 0, - 0, 437, 437, 437, 437, 437, 437, 437, 437, 437, - 437, 437, 0, 0, 437, 593, 607, 610, 611, 612, - 613, 632, 633, 634, 678, 851, 839, 1023, 1027, 583, - 1052, 0, 679, 665, 665, 939, 671, 1050, 0, 0, - 1167, 910, 0, 270, 1168, 1171, 911, 1172, 535, 535, - 917, 990, 998, 1002, 999, 1003, 0, 0, 929, 0, + 193, 193, 670, 421, 643, 1022, 1290, 1290, 824, 415, + 307, 308, 328, 563, 313, 420, 329, 422, 622, 801, + 678, 341, 586, 1290, 825, 164, 164, 164, 164, 217, + 194, 190, 190, 174, 176, 212, 190, 190, 190, 190, + 190, 191, 191, 191, 191, 191, 191, 185, 186, 187, + 188, 189, 214, 212, 215, 521, 522, 411, 523, 525, + 526, 527, 528, 529, 530, 531, 532, 1091, 165, 166, + 167, 192, 168, 169, 170, 163, 171, 172, 173, 175, + 211, 213, 216, 234, 237, 240, 241, 243, 254, 255, + 256, 257, 258, 259, 260, 262, 263, 264, 265, 273, + 274, 310, 311, 312, 416, 417, 418, 568, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 177, 233, 178, 195, 196, 197, 235, + 185, 186, 187, 188, 189, 214, 1091, 198, 179, 180, + 181, 199, 195, 182, 236, 200, 198, 162, 201, 202, + 183, 203, 204, 205, 184, 206, 207, 208, 209, 210, + 322, 322, 322, 322, 827, 608, 608, 858, 547, 538, + 1186, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, + 1221, 1239, 1239, 462, 1264, 1265, 799, 1239, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 387, 538, 547, + 556, 557, 394, 566, 588, 602, 603, 832, 938, 880, + 875, 876, 889, 14, 833, 877, 830, 878, 879, 831, + 453, 453, 884, 883, 885, 1187, 250, 250, 560, 453, + 1237, 1237, 815, 1043, 1039, 1040, 1237, 1237, 1237, 1237, + 1237, 1237, 1237, 1237, 1237, 1237, 820, 820, 1188, 1247, + 1248, 247, 247, 247, 247, 249, 251, 342, 343, 339, + 1190, 1190, 997, 1190, 997, 1279, 930, 401, 677, 997, + 997, 997, 997, 997, 997, 997, 997, 997, 997, 997, + 997, 1261, 1261, 414, 1261, 597, 1190, 287, 287, 287, + 287, 1190, 1190, 1190, 1190, 959, 344, 1190, 1190, 1190, + 1271, 1271, 1271, 1271, 606, 640, 344, 344, 1273, 1273, + 1273, 1273, 1063, 1064, 637, 896, 651, 652, 653, 897, + 344, 344, 383, 344, 486, 1306, 487, 535, 535, 5, + 535, 6, 494, 559, 1257, 1140, 540, 524, 524, 344, + 318, 302, 642, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 444, 1266, 1267, 618, 619, 932, 932, + 932, 932, 820, 428, 444, 926, 933, 330, 533, 533, + 533, 533, 1030, 590, 817, 554, 1259, 1259, 1030, 704, + 621, 623, 845, 641, 1250, 805, 393, 660, 664, 973, + 668, 676, 969, 1183, 553, 842, 823, 1289, 1289, 564, + 600, 601, 385, 389, 548, 587, 591, 663, 962, 936, + 936, 934, 936, 703, 1289, 537, 971, 966, 438, 901, + 1079, 981, 1028, 438, 438, 805, 605, 805, 707, 854, + 1292, 978, 463, 539, 551, 1074, 467, 540, 539, 844, + 551, 646, 957, 386, 1171, 912, 1032, 838, 1172, 1175, + 913, 1176, 943, 567, 456, 457, 458, 0, 850, 0, + 1182, 1297, 1298, 253, 253, 0, 399, 400, 0, 0, + 0, 649, 0, 650, 423, 403, 404, 405, 840, 661, + 0, 423, 0, 406, 0, 0, 848, 337, 1009, 1002, + 1006, 1003, 1007, 852, 0, 0, 839, 1185, 495, 0, + 0, 0, 0, 438, 438, 438, 438, 438, 438, 438, + 438, 438, 438, 438, 0, 0, 438, 595, 609, 612, + 613, 614, 615, 634, 635, 636, 680, 853, 841, 1027, + 1031, 585, 1056, 0, 681, 667, 667, 941, 673, 1054, + 0, 0, 0, 0, 0, 271, 0, 0, 0, 0, + 536, 536, 919, 992, 1000, 1004, 1001, 1005, 0, 0, + 931, 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, 974, 974, - 0, 1068, 855 + 976, 976, 0, 1072, 857 ); protected $gotoCheck = array( - 42, 42, 72, 65, 65, 64, 35, 64, 118, 65, + 42, 42, 72, 65, 65, 119, 173, 173, 26, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 7, - 9, 35, 121, 26, 35, 42, 42, 42, 42, 42, + 9, 93, 122, 173, 27, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -757,92 +757,92 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 23, - 23, 23, 23, 15, 104, 104, 27, 75, 75, 20, - 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 159, 159, 165, 165, 165, 45, 159, 159, 159, 159, - 159, 159, 159, 159, 159, 159, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 15, 6, 15, 15, - 15, 15, 75, 15, 15, 15, 15, 15, 15, 140, - 140, 49, 15, 93, 20, 12, 5, 5, 140, 160, - 160, 20, 15, 15, 15, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 22, 22, 20, 20, 20, - 161, 5, 5, 5, 5, 5, 5, 55, 55, 72, - 72, 72, 72, 72, 13, 12, 13, 12, 72, 72, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 23, 23, 23, 23, 15, 104, 104, 45, 75, 75, + 20, 104, 104, 104, 104, 104, 104, 104, 104, 104, + 104, 160, 160, 166, 166, 166, 6, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 15, 49, 15, + 15, 15, 15, 75, 15, 15, 15, 15, 15, 15, + 141, 141, 64, 15, 64, 20, 5, 5, 162, 141, + 161, 161, 20, 15, 15, 15, 161, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 22, 22, 20, 20, + 20, 5, 5, 5, 5, 5, 5, 93, 93, 169, + 72, 72, 72, 72, 72, 171, 89, 89, 89, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, - 121, 121, 46, 121, 46, 72, 24, 24, 24, 24, - 72, 72, 72, 72, 168, 14, 72, 72, 72, 9, - 9, 9, 9, 135, 135, 14, 14, 121, 121, 121, - 121, 172, 172, 84, 72, 84, 84, 84, 72, 14, - 14, 170, 14, 146, 14, 146, 19, 19, 172, 19, - 99, 146, 100, 121, 61, 14, 162, 162, 14, 89, - 89, 89, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 19, 158, 158, 167, 167, 19, 19, 19, - 19, 22, 63, 19, 19, 19, 142, 103, 103, 103, - 103, 121, 103, 29, 48, 121, 121, 121, 48, 48, - 48, 109, 48, 14, 83, 83, 48, 48, 48, 48, - 48, 48, 18, 9, 2, 2, 39, 28, 25, 106, - 9, 58, 58, 58, 58, 58, 14, 37, 171, 171, - 25, 25, 25, 25, 25, 25, 23, 25, 25, 25, - 151, 23, 23, 17, 17, 171, 120, 95, 41, 92, - 17, 148, 9, 9, 123, 17, 14, 9, 82, 9, - -1, 171, 9, 17, -1, 17, 17, 138, -1, -1, - -1, 17, 9, 9, 9, 9, -1, 9, 93, 93, - 9, 9, 5, 5, 17, 80, 80, -1, -1, -1, - 80, -1, 80, 113, 80, 80, 80, -1, 80, -1, - 113, -1, 80, -1, -1, 9, 80, 113, 113, 113, - 113, 113, -1, -1, -1, -1, 14, 9, -1, -1, - -1, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, -1, -1, 23, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 79, 16, 16, 16, 16, 8, - 8, -1, 8, 8, 8, 16, 8, 8, -1, -1, - 78, 78, -1, 24, 78, 78, 78, 78, 24, 24, - 87, 87, 87, 87, 87, 87, -1, -1, 16, -1, + 72, 122, 122, 13, 122, 13, 72, 24, 24, 24, + 24, 72, 72, 72, 72, 99, 14, 72, 72, 72, + 9, 9, 9, 9, 55, 55, 14, 14, 122, 122, + 122, 122, 136, 136, 84, 72, 84, 84, 84, 72, + 14, 14, 61, 14, 147, 14, 147, 19, 19, 46, + 19, 46, 147, 100, 122, 143, 14, 163, 163, 14, + 159, 159, 63, 163, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 19, 168, 168, 83, 83, 19, 19, + 19, 19, 22, 109, 19, 19, 19, 29, 103, 103, + 103, 103, 122, 103, 18, 48, 122, 122, 122, 48, + 48, 48, 39, 48, 14, 12, 28, 48, 48, 48, + 48, 48, 48, 152, 9, 37, 25, 172, 172, 2, + 2, 9, 58, 58, 58, 58, 58, 14, 25, 25, + 25, 25, 25, 25, 172, 25, 25, 25, 23, 17, + 17, 106, 121, 23, 23, 12, 17, 12, 95, 41, + 172, 17, 149, 9, 9, 139, 82, 14, 9, 17, + 9, 17, 17, 9, 78, 78, 124, 17, 78, 78, + 78, 78, 92, 9, 9, 9, 9, -1, 9, -1, + 17, 9, 9, 5, 5, -1, 80, 80, -1, -1, + -1, 80, -1, 80, 113, 80, 80, 80, 35, 80, + -1, 113, -1, 80, -1, -1, 9, 80, 113, 113, + 113, 113, 113, 35, -1, -1, 35, 14, 9, -1, + -1, -1, -1, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, -1, -1, 23, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 16, 16, 16, + 16, 8, 8, -1, 8, 8, 8, 16, 8, 8, + -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, + 24, 24, 87, 87, 87, 87, 87, 87, -1, -1, + 16, -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, 103, 103, - -1, 16, 16 + 103, 103, -1, 16, 16 ); protected $gotoBase = array( - 0, 0, -288, 0, 0, 225, 194, 10, 522, 7, - 0, 0, -64, -65, 5, -174, 86, -28, 90, 61, - -212, 0, -76, 156, 283, 394, 19, 162, 68, 84, - 0, 0, 0, 0, 0, -353, 0, 76, 0, 80, - 0, -2, -1, 0, 0, 173, -423, 0, -307, 199, - 0, 0, 0, 0, 0, 219, 0, 0, 358, 0, - 0, 294, 0, 124, -13, -234, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -167, 0, 0, 142, 169, - -11, 0, -24, -81, -375, 0, 0, 275, 0, 42, - 0, 0, -3, -245, 0, 30, 0, 0, 0, 297, - 291, 0, 0, 341, -73, 0, 41, 0, 0, 107, - 0, 0, 0, 206, 0, 0, 0, 0, 6, 0, - 64, 15, 0, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 33, 0, 0, 14, 0, - 187, 0, 98, 0, 0, 0, -157, 0, 2, 0, - 0, 63, 0, 0, 0, 0, 0, 0, 39, -57, - -8, 223, 99, 0, 0, -111, 0, -5, 266, 0, - 292, 108, 11, 0, 0 + 0, 0, -285, 0, 0, 225, 173, 10, 524, 7, + 0, 0, 95, -47, 5, -174, 87, -33, 71, 61, + -212, 0, -76, 157, 284, 392, 4, 20, 56, 77, + 0, 0, 0, 0, 0, 118, 0, 63, 0, 65, + 0, -2, -1, 0, 0, 155, -378, 0, -308, 186, + 0, 0, 0, 0, 0, 266, 0, 0, 359, 0, + 0, 282, 0, 103, 204, -235, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -167, 0, 0, 45, 170, + -11, 0, -27, -110, -376, 0, 0, 276, 0, -32, + 0, 0, 19, -448, 0, 30, 0, 0, 0, 262, + 292, 0, 0, 342, -73, 0, 62, 0, 0, 88, + 0, 0, 0, 206, 0, 0, 0, 0, 0, 3, + 0, 59, 15, 0, 14, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 41, 0, 0, 1, + 0, 188, 0, 66, 0, 0, 0, -157, 0, 2, + 0, 0, 35, 0, 0, 0, 0, 0, 0, 25, + -57, -8, 201, 99, 0, 0, -111, 0, -7, 231, + 0, 236, 96, -295, 0, 0 ); protected $gotoDefault = array( - -32768, 498, 709, 4, 710, 903, 786, 795, 582, 514, - 677, 337, 608, 411, 1251, 880, 1074, 564, 814, 1195, - 1203, 444, 817, 322, 699, 862, 863, 864, 389, 374, - 380, 387, 630, 609, 479, 849, 440, 841, 471, 844, - 439, 853, 160, 408, 496, 857, 3, 859, 541, 890, - 375, 867, 376, 654, 869, 549, 871, 872, 383, 390, - 391, 1079, 557, 605, 884, 241, 551, 885, 373, 886, - 893, 378, 381, 663, 451, 491, 484, 401, 1054, 592, - 627, 448, 465, 615, 614, 602, 464, 423, 406, 926, - 472, 449, 940, 339, 948, 707, 1086, 622, 474, 956, - 623, 963, 966, 515, 516, 463, 978, 267, 981, 475, - 1013, 645, 646, 993, 624, 625, 1011, 458, 1017, 441, - 1025, 1239, 442, 1029, 260, 1032, 274, 407, 424, 1037, - 1038, 8, 1044, 669, 670, 10, 271, 495, 1069, 664, - 438, 1085, 428, 1155, 1157, 543, 476, 1175, 1174, 657, - 492, 1180, 1242, 436, 517, 459, 308, 518, 300, 325, - 305, 533, 287, 326, 519, 460, 1248, 1256, 323, 29, - 1276, 1287, 333, 561, 597 + -32768, 499, 711, 4, 712, 905, 788, 797, 583, 515, + 679, 338, 610, 412, 1255, 882, 1078, 565, 816, 1199, + 1207, 445, 819, 323, 701, 864, 865, 866, 390, 375, + 381, 388, 632, 611, 480, 851, 441, 843, 472, 846, + 440, 855, 161, 409, 497, 859, 3, 861, 542, 892, + 376, 869, 377, 656, 871, 550, 873, 874, 384, 391, + 392, 1083, 558, 607, 886, 242, 552, 887, 374, 888, + 895, 379, 382, 665, 452, 492, 485, 402, 1058, 594, + 629, 449, 466, 617, 616, 604, 465, 424, 407, 928, + 473, 450, 942, 340, 950, 709, 1090, 624, 475, 958, + 625, 965, 968, 516, 517, 464, 980, 268, 983, 476, + 1015, 647, 648, 995, 626, 627, 1013, 459, 584, 1021, + 442, 1029, 1243, 443, 1033, 261, 1036, 275, 408, 425, + 1041, 1042, 8, 1048, 671, 672, 10, 272, 496, 1073, + 666, 439, 1089, 429, 1159, 1161, 544, 477, 1179, 1178, + 659, 493, 1184, 1246, 437, 518, 460, 309, 519, 301, + 326, 306, 534, 288, 327, 520, 461, 1252, 1260, 324, + 29, 1280, 1291, 334, 562, 599 ); protected $ruleToNonTerminal = array( @@ -876,14 +876,14 @@ class Php7 extends \PhpParser\ParserAbstract 105, 105, 107, 107, 108, 108, 108, 108, 106, 106, 106, 110, 110, 110, 110, 87, 87, 113, 113, 113, 111, 111, 114, 114, 112, 112, 115, 115, 116, 116, - 116, 116, 109, 109, 80, 80, 80, 20, 20, 117, - 117, 118, 118, 118, 118, 59, 119, 119, 120, 60, - 122, 122, 123, 123, 124, 124, 84, 125, 125, 125, - 125, 125, 125, 130, 130, 131, 131, 132, 132, 132, - 132, 132, 133, 134, 134, 129, 129, 126, 126, 128, - 128, 136, 136, 135, 135, 135, 135, 135, 135, 135, - 127, 137, 137, 139, 138, 138, 61, 100, 140, 140, - 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, + 116, 116, 109, 109, 80, 80, 80, 20, 20, 20, + 118, 117, 117, 119, 119, 119, 119, 59, 120, 120, + 121, 60, 123, 123, 124, 124, 125, 125, 84, 126, + 126, 126, 126, 126, 126, 131, 131, 132, 132, 133, + 133, 133, 133, 133, 134, 135, 135, 130, 130, 127, + 127, 129, 129, 137, 137, 136, 136, 136, 136, 136, + 136, 136, 128, 138, 138, 140, 139, 139, 61, 100, + 141, 141, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -892,20 +892,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 147, 141, 141, 146, 146, - 149, 150, 150, 151, 152, 152, 152, 19, 19, 72, - 72, 72, 72, 142, 142, 142, 142, 154, 154, 143, - 143, 145, 145, 145, 148, 148, 159, 159, 159, 159, - 159, 159, 159, 159, 159, 160, 160, 104, 162, 162, - 162, 162, 144, 144, 144, 144, 144, 144, 144, 144, - 58, 58, 157, 157, 157, 157, 163, 163, 153, 153, - 153, 164, 164, 164, 164, 164, 164, 73, 73, 65, - 65, 65, 65, 121, 121, 121, 121, 167, 166, 156, - 156, 156, 156, 156, 156, 156, 155, 155, 155, 165, - 165, 165, 165, 103, 161, 169, 169, 168, 168, 170, - 170, 170, 170, 170, 170, 170, 170, 158, 158, 158, - 158, 172, 173, 171, 171, 171, 171, 171, 171, 171, - 171, 174, 174, 174, 174 + 42, 42, 42, 42, 42, 42, 42, 148, 142, 142, + 147, 147, 150, 151, 151, 152, 153, 153, 153, 19, + 19, 72, 72, 72, 72, 143, 143, 143, 143, 155, + 155, 144, 144, 146, 146, 146, 149, 149, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 161, 161, 104, + 163, 163, 163, 163, 145, 145, 145, 145, 145, 145, + 145, 145, 58, 58, 158, 158, 158, 158, 164, 164, + 154, 154, 154, 165, 165, 165, 165, 165, 165, 73, + 73, 65, 65, 65, 65, 122, 122, 122, 122, 168, + 167, 157, 157, 157, 157, 157, 157, 157, 156, 156, + 156, 166, 166, 166, 166, 103, 162, 170, 170, 169, + 169, 171, 171, 171, 171, 171, 171, 171, 171, 159, + 159, 159, 159, 173, 174, 172, 172, 172, 172, 172, + 172, 172, 172, 175, 175, 175, 175 ); protected $ruleToLength = array( @@ -939,36 +939,36 @@ class Php7 extends \PhpParser\ParserAbstract 1, 3, 0, 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, - 1, 1, 0, 1, 0, 2, 2, 2, 4, 1, - 3, 1, 2, 2, 3, 2, 3, 1, 1, 2, - 3, 1, 1, 3, 2, 0, 1, 5, 5, 10, - 3, 5, 1, 1, 3, 0, 2, 4, 5, 4, - 4, 4, 3, 1, 1, 1, 1, 1, 1, 0, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 2, 1, 3, 1, 1, 3, 2, 2, 3, 1, - 0, 1, 1, 3, 3, 3, 4, 1, 1, 2, - 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, 3, 3, + 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, + 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, + 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, + 5, 10, 3, 5, 1, 1, 3, 0, 2, 4, + 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, + 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 3, 1, 1, 3, 2, 2, + 3, 1, 0, 1, 1, 3, 3, 3, 4, 1, + 1, 2, 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, 2, 8, 9, 8, - 9, 9, 10, 9, 10, 8, 3, 2, 0, 4, - 2, 1, 3, 2, 2, 2, 4, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, - 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 4, 1, - 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, - 0, 1, 1, 3, 1, 1, 1, 1, 1, 3, - 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, - 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, - 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, - 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, - 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, - 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, - 3, 1, 1, 2, 1 + 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, 2, 8, + 9, 8, 9, 9, 10, 9, 10, 8, 3, 2, + 0, 4, 2, 1, 3, 2, 2, 2, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, + 1, 0, 3, 0, 1, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, + 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, + 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, + 1, 3, 1, 1, 4, 4, 1, 4, 4, 0, + 1, 1, 1, 3, 3, 1, 4, 2, 2, 1, + 3, 1, 4, 4, 3, 3, 3, 3, 1, 3, + 1, 1, 3, 1, 1, 4, 1, 1, 1, 3, + 1, 1, 2, 1, 3, 4, 3, 2, 0, 2, + 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, + 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks() { @@ -1931,668 +1931,668 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 309 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, 310 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Arg(new Expr\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes), false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 311 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 312 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 313 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 314 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 315 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 316 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 317 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 318 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 319 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 320 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 321 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 322 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 323 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 324 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 325 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 326 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + }, + 327 => function ($stackPos) { + $this->semValue = array(); + }, + 328 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 327 => function ($stackPos) { + 329 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 328 => function ($stackPos) { + 330 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 329 => function ($stackPos) { + 331 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, - 330 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 331 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, 332 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 333 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 334 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = null; /* will be skipped */ }, 335 => function ($stackPos) { $this->semValue = array(); }, 336 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 337 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 338 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 339 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 340 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 341 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 342 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 343 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 344 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 345 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 346 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 347 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 348 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 349 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 350 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 351 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 352 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 353 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 354 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 355 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 356 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 357 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 358 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, 359 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 360 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 361 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = Stmt\Class_::MODIFIER_READONLY; }, 362 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 363 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 364 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 365 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 366 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 367 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 368 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 369 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 370 => function ($stackPos) { - $this->semValue = array(); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 371 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 372 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 373 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 374 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 375 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 379 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 380 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 381 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 382 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 383 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 384 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 385 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 386 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 387 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 388 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 389 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 390 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 391 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 392 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 393 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 394 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 395 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 396 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 397 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 398 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 404 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 405 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 406 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 410 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 411 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 422 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 423 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 424 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 428 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 429 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 430 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 431 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 432 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 433 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 434 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 435 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 436 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 437 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 438 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 439 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 440 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 441 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 442 => function ($stackPos) { + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 443 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 442 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 443 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 444 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 445 => function ($stackPos) { + 447 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 446 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 447 => function ($stackPos) { + 449 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 448 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 450 => function ($stackPos) { + 452 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 452 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 456 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 455 => function ($stackPos) { + 457 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 458 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 457 => function ($stackPos) { + 459 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 458 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 461 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 462 => function ($stackPos) { + 464 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 463 => function ($stackPos) { + 465 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 464 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 465 => function ($stackPos) { + 467 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 466 => function ($stackPos) { + 468 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 467 => function ($stackPos) { + 469 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 468 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = array(); }, - 469 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 470 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 471 => function ($stackPos) { + 473 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 472 => function ($stackPos) { + 474 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 473 => function ($stackPos) { + 475 => function ($stackPos) { $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 474 => function ($stackPos) { + 476 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 475 => function ($stackPos) { + 477 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 476 => function ($stackPos) { + 478 => function ($stackPos) { $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 477 => function ($stackPos) { + 479 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 478 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 479 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 480 => function ($stackPos) { + 482 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 481 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 482 => function ($stackPos) { + 484 => function ($stackPos) { $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 483 => function ($stackPos) { + 485 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 484 => function ($stackPos) { + 486 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 485 => function ($stackPos) { + 487 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 486 => function ($stackPos) { + 488 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, - 487 => function ($stackPos) { + 489 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 488 => function ($stackPos) { + 490 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 489 => function ($stackPos) { + 491 => function ($stackPos) { $this->semValue = null; }, - 490 => function ($stackPos) { + 492 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 491 => function ($stackPos) { + 493 => function ($stackPos) { $this->semValue = array(); }, - 492 => function ($stackPos) { + 494 => function ($stackPos) { $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 493 => function ($stackPos) { + 495 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 494 => function ($stackPos) { + 496 => function ($stackPos) { $this->semValue = array(); }, - 495 => function ($stackPos) { + 497 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 496 => function ($stackPos) { + 498 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 497 => function ($stackPos) { + 499 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 498 => function ($stackPos) { + 500 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 499 => function ($stackPos) { + 501 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 500 => function ($stackPos) { + 502 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 501 => function ($stackPos) { + 503 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 502 => function ($stackPos) { + 504 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 503 => function ($stackPos) { + 505 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 504 => function ($stackPos) { + 506 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 505 => function ($stackPos) { + 507 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 506 => function ($stackPos) { + 508 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, - 507 => function ($stackPos) { + 509 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 508 => function ($stackPos) { + 510 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 509 => function ($stackPos) { + 511 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 510 => function ($stackPos) { + 512 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)]), $attrs); }, - 511 => function ($stackPos) { + 513 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, - 512 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 513 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, 514 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 515 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 516 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 517 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 518 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 519 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 520 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 521 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 522 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 523 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 524 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 525 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 526 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2604,201 +2604,207 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 530 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 531 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 532 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 533 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 534 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 535 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 536 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 537 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 538 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 539 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 540 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 542 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 543 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 544 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 545 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 546 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 547 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 548 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 549 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 550 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 551 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 552 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 553 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 554 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 555 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 556 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 557 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 558 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 559 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 560 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 561 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 562 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 563 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 564 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 565 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 566 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, 567 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 568 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 569 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 570 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 571 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 572 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 573 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 574 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 575 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 576 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 577 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 578 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = null; }, 579 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 580 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 581 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 582 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 583 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 584 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 585 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 586 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 587 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 588 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 589 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 590 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 591 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 592 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 593 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 594 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 595 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 596 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index ffac9c0997..6a5e16aa0d 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -692,6 +692,10 @@ protected function pExpr_Yield(Expr\Yield_ $node) { } } + protected function pExpr_VariadicPlaceholder(Expr\VariadicPlaceholder $node) { + return '...'; + } + // Declarations protected function pStmt_Namespace(Stmt\Namespace_ $node) { diff --git a/test/code/parser/expr/firstClassCallables.test b/test/code/parser/expr/firstClassCallables.test new file mode 100644 index 0000000000..c02c3d7d4f --- /dev/null +++ b/test/code/parser/expr/firstClassCallables.test @@ -0,0 +1,131 @@ +First-class callables +----- +foo(...); +A::foo(...); + +// These are invalid, but accepted on the parser level. +new Foo(...); + +#[Foo(...)] +function foo() {} +----- +!!php7 +array( + 0: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + parts: array( + 0: foo + ) + ) + args: array( + 0: Arg( + name: null + value: Expr_VariadicPlaceholder( + ) + byRef: false + unpack: false + ) + ) + ) + ) + 1: Stmt_Expression( + expr: Expr_MethodCall( + var: Expr_Variable( + name: this + ) + name: Identifier( + name: foo + ) + args: array( + 0: Arg( + name: null + value: Expr_VariadicPlaceholder( + ) + byRef: false + unpack: false + ) + ) + ) + ) + 2: Stmt_Expression( + expr: Expr_StaticCall( + class: Name( + parts: array( + 0: A + ) + ) + name: Identifier( + name: foo + ) + args: array( + 0: Arg( + name: null + value: Expr_VariadicPlaceholder( + ) + byRef: false + unpack: false + ) + ) + ) + ) + 3: Stmt_Expression( + expr: Expr_New( + class: Name( + parts: array( + 0: Foo + ) + ) + args: array( + 0: Arg( + name: null + value: Expr_VariadicPlaceholder( + ) + byRef: false + unpack: false + ) + ) + comments: array( + 0: // These are invalid, but accepted on the parser level. + ) + ) + comments: array( + 0: // These are invalid, but accepted on the parser level. + ) + ) + 4: Stmt_Function( + attrGroups: array( + 0: AttributeGroup( + attrs: array( + 0: Attribute( + name: Name( + parts: array( + 0: Foo + ) + ) + args: array( + 0: Arg( + name: null + value: Expr_VariadicPlaceholder( + ) + byRef: false + unpack: false + ) + ) + ) + ) + ) + ) + byRef: false + name: Identifier( + name: foo + ) + params: array( + ) + returnType: null + stmts: array( + ) + ) +) \ No newline at end of file diff --git a/test/code/prettyPrinter/expr/firstClassCallables.test b/test/code/prettyPrinter/expr/firstClassCallables.test new file mode 100644 index 0000000000..9edf4b20c4 --- /dev/null +++ b/test/code/prettyPrinter/expr/firstClassCallables.test @@ -0,0 +1,11 @@ +First-class callables +----- +foo(...); +A::foo(...); +----- +!!php7 +foo(...); +$this->foo(...); +A::foo(...); \ No newline at end of file From 632ead3a8254479320c8d54e121d5cd27ca6704f Mon Sep 17 00:00:00 2001 From: Shalvah Date: Sun, 12 Sep 2021 20:51:25 +0100 Subject: [PATCH 037/428] Print comma before comments for new array item (#805) Print comma before rather than after comments. Also switch to multiline mode if inserting an item with comments. Fixes #804. --- lib/PhpParser/PrettyPrinterAbstract.php | 10 +- .../arrayInsertionWithComments.test | 106 ++++++++++++++++++ 2 files changed, 113 insertions(+), 3 deletions(-) create mode 100644 test/code/formatPreservation/arrayInsertionWithComments.test diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 5fc36531db..70873aeeb6 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -824,7 +824,11 @@ protected function pArray( return null; } - if ($insertStr === ', ' && $this->isMultiline($origNodes)) { + // We go multiline if the original code was multiline, + // or if it's an array item with a comment above it. + if ($insertStr === ', ' && ( + $this->isMultiline($origNodes) || !empty($arrItem->getAttribute('comments'))) + ) { $insertStr = ','; $insertNewline = true; } @@ -842,11 +846,11 @@ protected function pArray( $this->setIndentLevel($lastElemIndentLevel); if ($insertNewline) { + $result .= $insertStr . $this->nl; $comments = $arrItem->getComments(); if ($comments) { - $result .= $this->nl . $this->pComments($comments); + $result .= $this->pComments($comments) . $this->nl; } - $result .= $insertStr . $this->nl; } else { $result .= $insertStr; } diff --git a/test/code/formatPreservation/arrayInsertionWithComments.test b/test/code/formatPreservation/arrayInsertionWithComments.test new file mode 100644 index 0000000000..adde6261fb --- /dev/null +++ b/test/code/formatPreservation/arrayInsertionWithComments.test @@ -0,0 +1,106 @@ +Inserting array item with comment +----- + 'foo', + 'b' => 'bar', +]; +----- +$node = new Expr\ArrayItem(new Scalar\String_('baz'), new Scalar\String_('c')); +$node->setAttribute('comments', [new Comment\Doc(<<expr->expr; +$array->items[] = $node; +----- + 'foo', + 'b' => 'bar', + /** + * A doc comment + */ + 'c' => 'baz', +]; +----- + 'foo', + 'b' => 'bar', +]; +----- +$node = new Expr\ArrayItem(new Scalar\String_('baz'), new Scalar\String_('c')); +$node->setAttribute('comments', [new Comment("/* Block comment */")]); +$array = $stmts[0]->expr->expr; +$array->items[] = $node; +----- + 'foo', + 'b' => 'bar', + /* Block comment */ + 'c' => 'baz', +]; +----- + 'foo', + 'b' => 'bar', +]; +----- +$node = new Expr\ArrayItem(new Scalar\String_('baz'), new Scalar\String_('c')); +$node->setAttribute('comments', [new Comment("// Line comment")]); +$array = $stmts[0]->expr->expr; +$array->items[] = $node; +----- + 'foo', + 'b' => 'bar', + // Line comment + 'c' => 'baz', +]; +----- + 'foo', +]; +----- +$node = new Expr\ArrayItem(new Scalar\String_('bar'), new Scalar\String_('b')); +$node->setAttribute('comments', [new Comment("// Line comment")]); +$array = $stmts[0]->expr->expr; +$array->items[] = $node; +----- + 'foo', + // Line comment + 'b' => 'bar', +]; +----- +setAttribute('comments', [new Comment("// Line comment")]); +$array = $stmts[0]->expr->expr; +$array->items[] = $node; +----- + 'foo', +]; \ No newline at end of file From b5234eacd057c71bf880230eb1d2d06b1f099954 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 12 Sep 2021 21:53:48 +0200 Subject: [PATCH 038/428] Tweak coding style --- lib/PhpParser/PrettyPrinterAbstract.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 70873aeeb6..2c7fc3070c 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -826,8 +826,8 @@ protected function pArray( // We go multiline if the original code was multiline, // or if it's an array item with a comment above it. - if ($insertStr === ', ' && ( - $this->isMultiline($origNodes) || !empty($arrItem->getAttribute('comments'))) + if ($insertStr === ', ' && + ($this->isMultiline($origNodes) || $arrItem->getComments()) ) { $insertStr = ','; $insertNewline = true; From 08501991d485648f7a3d7ef541e0cf1e13b8723f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 12 Sep 2021 21:59:26 +0200 Subject: [PATCH 039/428] Don't make VariadicPlaceholder an expression And don't store it in an Arg. --- CHANGELOG.md | 4 +-- grammar/php7.y | 3 +- lib/PhpParser/Node/Arg.php | 2 +- .../Node/{Expr => }/VariadicPlaceholder.php | 8 ++--- lib/PhpParser/Parser/Php7.php | 2 +- lib/PhpParser/PrettyPrinter/Standard.php | 8 ++--- .../code/parser/expr/firstClassCallables.test | 35 +++---------------- 7 files changed, 18 insertions(+), 44 deletions(-) rename lib/PhpParser/Node/{Expr => }/VariadicPlaceholder.php (77%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05d817b251..72d585e62e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,8 @@ Version 4.12.1-dev * [PHP 8.1] Added support for intersection types using a new `IntersectionType` node. * [PHP 8.1] Added support for explicit octal literals. * [PHP 8.1] Added support for first-class callables. These are represented using a call whose first - `Arg->expr` is an `Expr\VariadicPlaceholder`. The representation is intended to be - forward-compatible with partial function application, just like the PHP feature itself. + argument is a `VariadicPlaceholder`. The representation is intended to be forward-compatible with + partial function application, just like the PHP feature itself. Version 4.12.0 (2021-07-21) --------------------------- diff --git a/grammar/php7.y b/grammar/php7.y index 1bae055917..ef0f271c6f 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -623,8 +623,7 @@ argument_list: ; variadic_placeholder: - T_ELLIPSIS - { $$ = Node\Arg[Node\VariadicPlaceholder[], false, false]; } + T_ELLIPSIS { $$ = Node\VariadicPlaceholder[]; } ; non_empty_argument_list: diff --git a/lib/PhpParser/Node/Arg.php b/lib/PhpParser/Node/Arg.php index e70a20e92f..bcf130e68c 100644 --- a/lib/PhpParser/Node/Arg.php +++ b/lib/PhpParser/Node/Arg.php @@ -2,7 +2,7 @@ namespace PhpParser\Node; -use PhpParser\Node\Expr\VariadicPlaceholder; +use PhpParser\Node\VariadicPlaceholder; use PhpParser\NodeAbstract; class Arg extends NodeAbstract diff --git a/lib/PhpParser/Node/Expr/VariadicPlaceholder.php b/lib/PhpParser/Node/VariadicPlaceholder.php similarity index 77% rename from lib/PhpParser/Node/Expr/VariadicPlaceholder.php rename to lib/PhpParser/Node/VariadicPlaceholder.php index a4e4e5c0e0..403a24df2f 100644 --- a/lib/PhpParser/Node/Expr/VariadicPlaceholder.php +++ b/lib/PhpParser/Node/VariadicPlaceholder.php @@ -1,13 +1,13 @@ semValue = array($this->semStack[$stackPos-(3-2)]); }, 310 => function ($stackPos) { - $this->semValue = new Node\Arg(new Expr\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes), false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 311 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 6a5e16aa0d..bb70de6595 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -33,6 +33,10 @@ protected function pArg(Node\Arg $node) { . $this->p($node->value); } + protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node) { + return '...'; + } + protected function pConst(Node\Const_ $node) { return $node->name . ' = ' . $this->p($node->value); } @@ -692,10 +696,6 @@ protected function pExpr_Yield(Expr\Yield_ $node) { } } - protected function pExpr_VariadicPlaceholder(Expr\VariadicPlaceholder $node) { - return '...'; - } - // Declarations protected function pStmt_Namespace(Stmt\Namespace_ $node) { diff --git a/test/code/parser/expr/firstClassCallables.test b/test/code/parser/expr/firstClassCallables.test index c02c3d7d4f..1e15a98cfd 100644 --- a/test/code/parser/expr/firstClassCallables.test +++ b/test/code/parser/expr/firstClassCallables.test @@ -21,12 +21,7 @@ array( ) ) args: array( - 0: Arg( - name: null - value: Expr_VariadicPlaceholder( - ) - byRef: false - unpack: false + 0: VariadicPlaceholder( ) ) ) @@ -40,12 +35,7 @@ array( name: foo ) args: array( - 0: Arg( - name: null - value: Expr_VariadicPlaceholder( - ) - byRef: false - unpack: false + 0: VariadicPlaceholder( ) ) ) @@ -61,12 +51,7 @@ array( name: foo ) args: array( - 0: Arg( - name: null - value: Expr_VariadicPlaceholder( - ) - byRef: false - unpack: false + 0: VariadicPlaceholder( ) ) ) @@ -79,12 +64,7 @@ array( ) ) args: array( - 0: Arg( - name: null - value: Expr_VariadicPlaceholder( - ) - byRef: false - unpack: false + 0: VariadicPlaceholder( ) ) comments: array( @@ -106,12 +86,7 @@ array( ) ) args: array( - 0: Arg( - name: null - value: Expr_VariadicPlaceholder( - ) - byRef: false - unpack: false + 0: VariadicPlaceholder( ) ) ) From a45fb2a6212467f646a56a85b4118e3bd5430772 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 12 Sep 2021 22:29:08 +0200 Subject: [PATCH 040/428] Add CallLike parent class This provides a helper to determine whether a call is a first-class callable, and a way to strip the args type to Arg[] if it isn't. --- CHANGELOG.md | 5 ++- lib/PhpParser/Node/Expr/CallLike.php | 39 +++++++++++++++++++ lib/PhpParser/Node/Expr/FuncCall.php | 14 ++++--- lib/PhpParser/Node/Expr/MethodCall.php | 17 +++++--- lib/PhpParser/Node/Expr/New_.php | 12 ++++-- lib/PhpParser/Node/Expr/StaticCall.php | 18 ++++++--- test/PhpParser/Node/Expr/CallableLikeTest.php | 36 +++++++++++++++++ 7 files changed, 120 insertions(+), 21 deletions(-) create mode 100644 lib/PhpParser/Node/Expr/CallLike.php create mode 100644 test/PhpParser/Node/Expr/CallableLikeTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 72d585e62e..c7c07d5ecc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,10 @@ Version 4.12.1-dev * [PHP 8.1] Added support for explicit octal literals. * [PHP 8.1] Added support for first-class callables. These are represented using a call whose first argument is a `VariadicPlaceholder`. The representation is intended to be forward-compatible with - partial function application, just like the PHP feature itself. + partial function application, just like the PHP feature itself. Call nodes now extend from + `Expr\CallLike`, which provides an `isFirstClassCallable()` method to determine whether a + placeholder id present. `getArgs()` can be used to assert that the call is not a first-class + callable and returns `Arg[]` rather than `array`. Version 4.12.0 (2021-07-21) --------------------------- diff --git a/lib/PhpParser/Node/Expr/CallLike.php b/lib/PhpParser/Node/Expr/CallLike.php new file mode 100644 index 0000000000..78e1cf3494 --- /dev/null +++ b/lib/PhpParser/Node/Expr/CallLike.php @@ -0,0 +1,39 @@ + + */ + abstract public function getRawArgs(): array; + + /** + * Returns whether this call expression is actually a first class callable. + */ + public function isFirstClassCallable(): bool { + foreach ($this->getRawArgs() as $arg) { + if ($arg instanceof VariadicPlaceholder) { + return true; + } + } + return false; + } + + /** + * Assert that this is not a first-class callable and return only ordinary Args. + * + * @return Arg[] + */ + public function getArgs(): array { + assert(!$this->isFirstClassCallable()); + return $this->getRawArgs(); + } +} \ No newline at end of file diff --git a/lib/PhpParser/Node/Expr/FuncCall.php b/lib/PhpParser/Node/Expr/FuncCall.php index 1e8afa5596..2de4d0dd57 100644 --- a/lib/PhpParser/Node/Expr/FuncCall.php +++ b/lib/PhpParser/Node/Expr/FuncCall.php @@ -5,19 +5,19 @@ use PhpParser\Node; use PhpParser\Node\Expr; -class FuncCall extends Expr +class FuncCall extends CallLike { /** @var Node\Name|Expr Function name */ public $name; - /** @var Node\Arg[] Arguments */ + /** @var array 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 + * @param Node\Name|Expr $name Function name + * @param array $args Arguments + * @param array $attributes Additional attributes */ public function __construct($name, array $args = [], array $attributes = []) { $this->attributes = $attributes; @@ -32,4 +32,8 @@ public function getSubNodeNames() : array { public function getType() : string { return 'Expr_FuncCall'; } + + public function getRawArgs(): array { + return $this->args; + } } diff --git a/lib/PhpParser/Node/Expr/MethodCall.php b/lib/PhpParser/Node/Expr/MethodCall.php index bd81bb43f6..49ca483565 100644 --- a/lib/PhpParser/Node/Expr/MethodCall.php +++ b/lib/PhpParser/Node/Expr/MethodCall.php @@ -5,23 +5,24 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; +use PhpParser\Node\VariadicPlaceholder; -class MethodCall extends Expr +class MethodCall extends CallLike { /** @var Expr Variable holding object */ public $var; /** @var Identifier|Expr Method name */ public $name; - /** @var Arg[] Arguments */ + /** @var array Arguments */ public $args; /** * Constructs a function call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param Arg[] $args Arguments - * @param array $attributes Additional attributes + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments + * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; @@ -37,4 +38,8 @@ public function getSubNodeNames() : array { public function getType() : string { return 'Expr_MethodCall'; } + + public function getRawArgs(): array { + return $this->args; + } } diff --git a/lib/PhpParser/Node/Expr/New_.php b/lib/PhpParser/Node/Expr/New_.php index c86f0c6015..e2bb64928d 100644 --- a/lib/PhpParser/Node/Expr/New_.php +++ b/lib/PhpParser/Node/Expr/New_.php @@ -3,20 +3,22 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; +use PhpParser\Node\VariadicPlaceholder; -class New_ extends Expr +class New_ extends CallLike { /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */ public $class; - /** @var Node\Arg[] Arguments */ + /** @var array 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 $args Arguments * @param array $attributes Additional attributes */ public function __construct($class, array $args = [], array $attributes = []) { @@ -32,4 +34,8 @@ public function getSubNodeNames() : array { public function getType() : string { return 'Expr_New'; } + + public function getRawArgs(): array { + return $this->args; + } } diff --git a/lib/PhpParser/Node/Expr/StaticCall.php b/lib/PhpParser/Node/Expr/StaticCall.php index 9883f5af51..d0d099c472 100644 --- a/lib/PhpParser/Node/Expr/StaticCall.php +++ b/lib/PhpParser/Node/Expr/StaticCall.php @@ -3,25 +3,27 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; +use PhpParser\Node\VariadicPlaceholder; -class StaticCall extends Expr +class StaticCall extends CallLike { /** @var Node\Name|Expr Class name */ public $class; /** @var Identifier|Expr Method name */ public $name; - /** @var Node\Arg[] Arguments */ + /** @var array Arguments */ public $args; /** * Constructs a static method call node. * - * @param Node\Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param Node\Arg[] $args Arguments - * @param array $attributes Additional attributes + * @param Node\Name|Expr $class Class name + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments + * @param array $attributes Additional attributes */ public function __construct($class, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; @@ -37,4 +39,8 @@ public function getSubNodeNames() : array { public function getType() : string { return 'Expr_StaticCall'; } + + public function getRawArgs(): array { + return $this->args; + } } diff --git a/test/PhpParser/Node/Expr/CallableLikeTest.php b/test/PhpParser/Node/Expr/CallableLikeTest.php new file mode 100644 index 0000000000..0dfc19a840 --- /dev/null +++ b/test/PhpParser/Node/Expr/CallableLikeTest.php @@ -0,0 +1,36 @@ +assertSame($isFirstClassCallable, $node->isFirstClassCallable()); + if (!$isFirstClassCallable) { + $this->assertSame($node->getRawArgs(), $node->getArgs()); + } + } + + public function provideTestIsFirstClassCallable() { + $normalArgs = [new Arg(new LNumber(1))]; + $callableArgs = [new VariadicPlaceholder()]; + return [ + [new FuncCall(new Name('test'), $normalArgs), false], + [new FuncCall(new Name('test'), $callableArgs), true], + [new MethodCall(new Variable('this'), 'test', $normalArgs), false], + [new MethodCall(new Variable('this'), 'test', $callableArgs), true], + [new StaticCall(new Name('Test'), 'test', $normalArgs), false], + [new StaticCall(new Name('Test'), 'test', $callableArgs), true], + [new New_(new Name('Test'), $normalArgs), false], + // This is not legal code, but accepted by the parser. + [new New_(new Name('Test'), $callableArgs), true], + ]; + } +} \ No newline at end of file From 0a20979a62bc159fa0159ec7a4b5e2360bfa1abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Hansl=C3=ADk?= Date: Tue, 14 Sep 2021 18:02:21 +0200 Subject: [PATCH 041/428] Unified builder methods for setting types --- lib/PhpParser/Builder/FunctionLike.php | 3 +-- lib/PhpParser/Builder/Param.php | 4 ++-- lib/PhpParser/Builder/Property.php | 4 ++-- lib/PhpParser/BuilderHelpers.php | 1 - 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/PhpParser/Builder/FunctionLike.php b/lib/PhpParser/Builder/FunctionLike.php index 8e7db399d3..98ea9d3366 100644 --- a/lib/PhpParser/Builder/FunctionLike.php +++ b/lib/PhpParser/Builder/FunctionLike.php @@ -61,8 +61,7 @@ public function addParams(array $params) { /** * 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. + * @param string|Node\Name|Node\Identifier|Node\ComplexType $type * * @return $this The builder instance (for fluid interface) */ diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index 90bbb6036b..de9aae7e5e 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -47,7 +47,7 @@ public function setDefault($value) { /** * Sets type for the parameter. * - * @param string|Node\Name|Node\ComplexType $type Parameter type + * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type * * @return $this The builder instance (for fluid interface) */ @@ -63,7 +63,7 @@ public function setType($type) { /** * Sets type for the parameter. * - * @param string|Node\Name|Node\ComplexType $type Parameter type + * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type * * @return $this The builder instance (for fluid interface) * diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 90ee4b0ba8..68e318565e 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -7,8 +7,8 @@ use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PhpParser\Node\NullableType; use PhpParser\Node\Stmt; +use PhpParser\Node\ComplexType; class Property implements PhpParser\Builder { @@ -119,7 +119,7 @@ public function setDocComment($docComment) { /** * Sets the property type for PHP 7.4+. * - * @param string|Name|NullableType|Identifier $type + * @param string|Name|Identifier|ComplexType $type * * @return $this */ diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index c0e3fbd764..2f0e912739 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -5,7 +5,6 @@ use PhpParser\Node\ComplexType; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; -use PhpParser\Node\IntersectionType; use PhpParser\Node\Name; use PhpParser\Node\NullableType; use PhpParser\Node\Scalar; From 50953a2691a922aa1769461637869a0a2faa3f53 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 20 Sep 2021 14:20:58 +0200 Subject: [PATCH 042/428] Release PHP-Parser 4.13.0 --- CHANGELOG.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7c07d5ecc..9f357cf48d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,16 @@ -Version 4.12.1-dev +Version 4.13.1-dev ------------------ +Nothing yet. + +Version 4.13.0 (2021-09-20) +--------------------------- + ### Added -* [PHP 8.1] Added support for intersection types using a new `IntersectionType` node. +* [PHP 8.1] Added support for intersection types using a new `IntersectionType` node. Additionally + a `ComplexType` parent class for `NullableType`, `UnionType` and `IntersectionType` has been + added. * [PHP 8.1] Added support for explicit octal literals. * [PHP 8.1] Added support for first-class callables. These are represented using a call whose first argument is a `VariadicPlaceholder`. The representation is intended to be forward-compatible with @@ -12,6 +19,12 @@ Version 4.12.1-dev placeholder id present. `getArgs()` can be used to assert that the call is not a first-class callable and returns `Arg[]` rather than `array`. +### Fixed + +* Multiple modifiers for promoted properties are now accepted. In particular this allows something + like `public readonly` for promoted properties. +* Formatting-preserving pretty printing for comments in array literals has been fixed. + Version 4.12.0 (2021-07-21) --------------------------- From f6e1fbf3a23b4538b2e0bc94e6aafecd847e0bae Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Fri, 8 Oct 2021 19:57:19 +0100 Subject: [PATCH 043/428] Update .gitattributes --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index f0db0ea889..bffa4c6faa 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ /doc export-ignore /test export-ignore /test_old export-ignore +.editorconfig export-ignore .gitattributes export-ignore .gitignore export-ignore CHANGELOG.md export-ignore From 8da6d7ac628064d11ce895fb099cecb78a096939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Hansl=C3=ADk?= Date: Wed, 15 Sep 2021 23:51:33 +0200 Subject: [PATCH 044/428] Fixed ArrowFunction::$expr --- lib/PhpParser/Node/Expr/ArrowFunction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/Node/Expr/ArrowFunction.php b/lib/PhpParser/Node/Expr/ArrowFunction.php index 2eb8213a30..c273fb7ee8 100644 --- a/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -42,7 +42,7 @@ public function __construct(array $subNodes = [], array $attributes = []) { $this->params = $subNodes['params'] ?? []; $returnType = $subNodes['returnType'] ?? null; $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; - $this->expr = $subNodes['expr'] ?? null; + $this->expr = $subNodes['expr']; $this->attrGroups = $subNodes['attrGroups'] ?? []; } From 54f19a0a66f3ddf68896e793d89326ce10c13d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Hansl=C3=ADk?= Date: Mon, 11 Oct 2021 19:35:41 +0200 Subject: [PATCH 045/428] Fixed array value evaluation with unpacked array --- lib/PhpParser/ConstExprEvaluator.php | 3 +++ test/PhpParser/ConstExprEvaluatorTest.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/PhpParser/ConstExprEvaluator.php b/lib/PhpParser/ConstExprEvaluator.php index 7f02e6f245..7131c3d255 100644 --- a/lib/PhpParser/ConstExprEvaluator.php +++ b/lib/PhpParser/ConstExprEvaluator.php @@ -2,6 +2,7 @@ namespace PhpParser; +use function array_merge; use PhpParser\Node\Expr; use PhpParser\Node\Scalar; @@ -150,6 +151,8 @@ private function evaluateArray(Expr\Array_ $expr) { foreach ($expr->items as $item) { if (null !== $item->key) { $array[$this->evaluate($item->key)] = $this->evaluate($item->value); + } elseif ($item->unpack) { + $array = array_merge($array, $this->evaluate($item->value)); } else { $array[] = $this->evaluate($item->value); } diff --git a/test/PhpParser/ConstExprEvaluatorTest.php b/test/PhpParser/ConstExprEvaluatorTest.php index 23ab18d3d1..f73b2629f2 100644 --- a/test/PhpParser/ConstExprEvaluatorTest.php +++ b/test/PhpParser/ConstExprEvaluatorTest.php @@ -22,6 +22,9 @@ public function provideTestEvaluate() { ['"foo"', "foo"], ['[0, 1]', [0, 1]], ['["foo" => "bar"]', ["foo" => "bar"]], + ['[...["bar"]]', ["bar"]], + ['[...["foo" => "bar"]]', ["foo" => "bar"]], + ['["a", "b" => "b", ...["b" => "bb", "c"]]', ["a", "b" => "bb", "c"]], ['NULL', null], ['False', false], ['true', true], From 4bfc4595edb484c55d37a6c6e41368ff23cf29c6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Oct 2021 20:20:35 +0200 Subject: [PATCH 046/428] Support reserved keywords as enum cases Fixes #807. --- grammar/php7.y | 2 +- lib/PhpParser/Parser/Php7.php | 644 +++++++++++++------------- test/code/parser/stmt/class/enum.test | 26 +- 3 files changed, 343 insertions(+), 329 deletions(-) diff --git a/grammar/php7.y b/grammar/php7.y index ef0f271c6f..3202d4dcf3 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -688,7 +688,7 @@ class_statement: { $$ = Stmt\ClassMethod[$5, ['type' => $2, 'byRef' => $4, 'params' => $7, 'returnType' => $9, 'stmts' => $10, 'attrGroups' => $1]]; $this->checkClassMethod($$, #2); } | T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; } - | optional_attributes T_CASE identifier enum_case_expr semi + | optional_attributes T_CASE identifier_ex enum_case_expr semi { $$ = Stmt\EnumCase[$3, $4, $1]; } | error { $$ = null; /* will be skipped */ } ; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 32a3fef4fe..7a0854b306 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -19,14 +19,14 @@ class Php7 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 396; protected $actionTableSize = 1196; - protected $gotoTableSize = 585; + protected $gotoTableSize = 545; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 419; + protected $YY2TBLSTATE = 420; protected $numNonLeafStates = 710; protected $symbolToName = array( @@ -244,125 +244,125 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $action = array( - 131, 132, 133, 569, 134, 135, 0, 722, 723, 724, - 136, 36, 834, 911, 835, 468,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 100, 101, 102, 103, 104, 1068, 1069, + 132, 133, 134, 569, 135, 136, 0, 722, 723, 724, + 137, 37, 834, 911, 835, 469,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 101, 102, 103, 104, 105, 1068, 1069, 1070, 1067, 1066, 1065, 1071, 716, 715,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, -32767, 545, 546,-32766,-32766, 725,-32766,-32766,-32766, 998, - 999, 806, 922, 446, 447, 448, 369, 370, 2, 266, - 137, 395, 729, 730, 731, 732, 413,-32766, 419,-32766, + 999, 806, 922, 447, 448, 449, 370, 371, 2, 267, + 138, 396, 729, 730, 731, 732, 414,-32766, 420,-32766, -32766,-32766,-32766,-32766, 990, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 763, 570, 764, 765, - 766, 767, 755, 756, 335, 336, 758, 759, 744, 745, - 746, 748, 749, 750, 345, 790, 791, 792, 793, 794, + 766, 767, 755, 756, 336, 337, 758, 759, 744, 745, + 746, 748, 749, 750, 346, 790, 791, 792, 793, 794, 795, 751, 752, 571, 572, 784, 775, 773, 774, 787, - 770, 771, 282, 419, 573, 574, 769, 575, 576, 577, - 578, 579, 580, 598, -575, 469, 491, 798, 772, 581, - 582, -575, 138,-32766,-32766,-32766, 131, 132, 133, 569, - 134, 135, 1017, 722, 723, 724, 136, 36, 1060,-32766, + 770, 771, 283, 420, 573, 574, 769, 575, 576, 577, + 578, 579, 580, 598, -575, 470, 14, 798, 772, 581, + 582, -575, 139,-32766,-32766,-32766, 132, 133, 134, 569, + 135, 136, 1017, 722, 723, 724, 137, 37, 1060,-32766, -32766,-32766, 1303, 696,-32766, 1304,-32766,-32766,-32766,-32766, -32766,-32766,-32766, 1068, 1069, 1070, 1067, 1066, 1065, 1071, - -32766, 716, 715, 371, 370, 1258,-32766,-32766,-32766, -572, - 105, 106, 107, 413, 269, 891, -572, 239, 1193, 1192, - 1194, 725,-32766,-32766,-32766, 1046, 108,-32766,-32766,-32766, - -32766, 986, 985, 984, 987, 266, 137, 395, 729, 730, - 731, 732, 12,-32766, 419,-32766,-32766,-32766,-32766, 998, + -32766, 716, 715, 372, 371, 1258,-32766,-32766,-32766, -572, + 106, 107, 108, 414, 270, 891, -572, 240, 1193, 1192, + 1194, 725,-32766,-32766,-32766, 1046, 109,-32766,-32766,-32766, + -32766, 986, 985, 984, 987, 267, 138, 396, 729, 730, + 731, 732, 12,-32766, 420,-32766,-32766,-32766,-32766, 998, 999, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 763, 570, 764, 765, 766, 767, 755, 756, - 335, 336, 758, 759, 744, 745, 746, 748, 749, 750, - 345, 790, 791, 792, 793, 794, 795, 751, 752, 571, - 572, 784, 775, 773, 774, 787, 770, 771, 881, 320, + 336, 337, 758, 759, 744, 745, 746, 748, 749, 750, + 346, 790, 791, 792, 793, 794, 795, 751, 752, 571, + 572, 784, 775, 773, 774, 787, 770, 771, 881, 321, 573, 574, 769, 575, 576, 577, 578, 579, 580,-32766, - 81, 82, 83, -575, 772, 581, 582, -575, 147, 747, + 82, 83, 84, -575, 772, 581, 582, -575, 148, 747, 717, 718, 719, 720, 721, 1278, 722, 723, 724, 760, - 761, 35, 1277, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 996, 269, 149, - -32766,-32766,-32766, 454, 455, 80, 33, -264, -572, 1016, - 108, 319, -572, 893, 725, 682, 803, 127, 998, 999, - 592,-32766, 1044,-32766,-32766,-32766, 809, 150, 726, 727, - 728, 729, 730, 731, 732, -88, 1198, 796, 277, -526, - 282,-32766,-32766,-32766, 733, 734, 735, 736, 737, 738, + 761, 36, 1277, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 996, 270, 150, + -32766,-32766,-32766, 455, 456, 81, 34, -264, -572, 1016, + 109, 320, -572, 893, 725, 682, 803, 128, 998, 999, + 592,-32766, 1044,-32766,-32766,-32766, 809, 151, 726, 727, + 728, 729, 730, 731, 732, -88, 1198, 796, 278, -526, + 283,-32766,-32766,-32766, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 763, 786, 764, 765, 766, 767, 755, 756, 757, 785, 758, 759, 744, 745, 746, 748, 749, 750, 789, 790, 791, 792, 793, 794, 795, 751, 752, 753, 754, 784, 775, 773, 774, 787, 770, - 771, 143, 804, 762, 768, 769, 776, 777, 779, 778, + 771, 144, 804, 762, 768, 769, 776, 777, 779, 778, 780, 781, -314, -526, -526, -193, -192, 772, 783, 782, - 48, 49, 50, 500, 51, 52, 238, 807, -526, -86, - 53, 54, -111, 55, 996, 252,-32766, -111, 800, -111, - -526, 541, -532, -352, 299, -352, 303, -111, -111, -111, - -111, -111, -111, -111, -111, 998, 999, 998, 999, 152, - -32766,-32766,-32766, 1191, 807, 125, 305, 1293, 56, 57, - 102, 103, 104, -111, 58, 1218, 59, 245, 246, 60, - 61, 62, 63, 64, 65, 66, 67, -525, 26, 267, - 68, 435, 501, -328, 808, -86, 1224, 1225, 502, 1189, - 807, 1198, 1230, 292, 1222, 40, 23, 503, 73, 504, - 953, 505, 319, 506, 802, 153, 507, 508, 278, 684, - 279, 42, 43, 436, 366, 365, 891, 44, 509, 34, - 248, -16, -566, 357, 331, 317, -566, 1198, 1193, 1192, - 1194, -527, 510, 511, 512, 332, -524, 1274, 47, 716, - 715, -525, -525, 333, 513, 514, 807, 1212, 1213, 1214, - 1215, 1209, 1210, 291, 359, 283, -525, 284, -314, 1216, - 1211, -193, -192, 1193, 1192, 1194, 292, 891, -525, 363, - -531, 69, 807, 315, 316, 319, 30, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - -153, -153, -153, 638, 24, -527, -527, 687, 378, 881, - -524, -524, 295, 296, 891, -153, 431, -153, 807, -153, - -527, -153, 716, 715, 432, -524, 798, 362, -111, 1105, - 1107, 364, -527, 433, 891, 139, 434, -524, 954, 126, - -524, 319, -111, -111, 688, 813, 380, -529, 11, 834, - 154, 835, 867, -111, -111, -111, -111, 46, 292,-32766, - 881, 654, 655, 73, 689, 1191, 1045, 319, 708, 148, - 398, 156,-32766,-32766,-32766, 31,-32766, -79,-32766, 122, + 49, 50, 51, 500, 52, 53, 239, 807, -526, -86, + 54, 55, -111, 56, 996, 253,-32766, -111, 800, -111, + -526, 541, -532, -352, 300, -352, 304, -111, -111, -111, + -111, -111, -111, -111, -111, 998, 999, 998, 999, 153, + -32766,-32766,-32766, 1191, 807, 126, 306, 1293, 57, 58, + 103, 104, 105, -111, 59, 1218, 60, 246, 247, 61, + 62, 63, 64, 65, 66, 67, 68, -525, 27, 268, + 69, 436, 501, -328, 808, -86, 1224, 1225, 502, 1189, + 807, 1198, 1230, 293, 1222, 41, 24, 503, 74, 504, + 953, 505, 320, 506, 802, 154, 507, 508, 279, 684, + 280, 43, 44, 437, 367, 366, 891, 45, 509, 35, + 249, -16, -566, 358, 332, 318, -566, 1198, 1193, 1192, + 1194, -527, 510, 511, 512, 333, -524, 1274, 48, 716, + 715, -525, -525, 334, 513, 514, 807, 1212, 1213, 1214, + 1215, 1209, 1210, 292, 360, 284, -525, 285, -314, 1216, + 1211, -193, -192, 1193, 1192, 1194, 293, 891, -525, 364, + -531, 70, 807, 316, 317, 320, 31, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + -153, -153, -153, 638, 25, -527, -527, 687, 379, 881, + -524, -524, 296, 297, 891, -153, 432, -153, 807, -153, + -527, -153, 716, 715, 433, -524, 798, 363, -111, 1105, + 1107, 365, -527, 434, 891, 140, 435, -524, 954, 127, + -524, 320, -111, -111, 688, 813, 381, -529, 11, 834, + 155, 835, 867, -111, -111, -111, -111, 47, 293,-32766, + 881, 654, 655, 74, 689, 1191, 1045, 320, 708, 149, + 399, 157,-32766,-32766,-32766, 32,-32766, -79,-32766, 123, -32766, 716, 715,-32766, 893, 891, 682, -153,-32766,-32766, - -32766, 716, 715, 891,-32766,-32766, 123, 881, 128, 73, - -32766, 410, 129, 319, -524, -524, 142, 140, -75,-32766, - 157, -529, -529, 319, 26, 691, 158, 881, 159, -524, - 160, 293, 294, 698, 367, 368, 807, -73,-32766, -72, - 1222, -524, 372, 373, 1191, 893, -71, 682, -529, 72, - -70,-32766,-32766,-32766, -69,-32766, -68,-32766, 124,-32766, + -32766, 716, 715, 891,-32766,-32766, 124, 881, 129, 74, + -32766, 411, 130, 320, -524, -524, 143, 141, -75,-32766, + 158, -529, -529, 320, 27, 691, 159, 881, 160, -524, + 161, 294, 295, 698, 368, 369, 807, -73,-32766, -72, + 1222, -524, 373, 374, 1191, 893, -71, 682, -529, 73, + -70,-32766,-32766,-32766, -69,-32766, -68,-32766, 125,-32766, 630, 631,-32766, -67, -66, -47, -51,-32766,-32766,-32766, - -18, 146, 270,-32766,-32766, 276, 697, 700, 881,-32766, - 410, 890, 893, 145, 682, 281, 881, 907,-32766, 280, - 513, 514, 285, 1212, 1213, 1214, 1215, 1209, 1210, 325, - 130, 144, 939, 286, 682, 1216, 1211, 108, 269,-32766, - 798, 807,-32766, 662, 639, 1191, 657, 71, 675, 1075, - 316, 319,-32766,-32766,-32766, 1305,-32766, 300,-32766, 628, - -32766, 430, 543,-32766,-32766, 923, 555, 924,-32766,-32766, + -18, 147, 271,-32766,-32766, 277, 697, 700, 881,-32766, + 411, 890, 893, 146, 682, 282, 881, 907,-32766, 281, + 513, 514, 286, 1212, 1213, 1214, 1215, 1209, 1210, 326, + 131, 145, 939, 287, 682, 1216, 1211, 109, 270,-32766, + 798, 807,-32766, 662, 639, 1191, 657, 72, 675, 1075, + 317, 320,-32766,-32766,-32766, 1305,-32766, 301,-32766, 628, + -32766, 431, 543,-32766,-32766, 923, 555, 924,-32766,-32766, -32766, 1229, 549,-32766,-32766,-32766, -4, 891, -490, 1191, - -32766, 410, 644, 893, 298, 682,-32766,-32766,-32766,-32766, - -32766, 893,-32766, 682,-32766, 13, 1231,-32766, 451, 479, + -32766, 411, 644, 893, 299, 682,-32766,-32766,-32766,-32766, + -32766, 893,-32766, 682,-32766, 13, 1231,-32766, 452, 480, 645, 909,-32766,-32766,-32766,-32766, 658, -480,-32766,-32766, - 0, 1191, 0, 0,-32766, 410, 0, 297,-32766,-32766, - -32766, 304,-32766,-32766,-32766, 0,-32766, 0, 806,-32766, - 0, 0, 0, 474,-32766,-32766,-32766,-32766, 0, 7, - -32766,-32766, 15, 1191, 561, 596,-32766, 410, 1219, 891, - -32766,-32766,-32766, 361,-32766,-32766,-32766, 818,-32766, -267, - 881,-32766, 38, 292, 0, 0,-32766,-32766,-32766, 39, - 705, 706,-32766,-32766, 872, 963, 940, 947,-32766, 410, - 937, 948, 364, 870, 426, 891, 935,-32766, 1049, 290, + 0, 1191, 0, 0,-32766, 411, 0, 298,-32766,-32766, + -32766, 305,-32766,-32766,-32766, 0,-32766, 0, 806,-32766, + 0, 0, 0, 475,-32766,-32766,-32766,-32766, 0, 7, + -32766,-32766, 16, 1191, 561, 596,-32766, 411, 1219, 891, + -32766,-32766,-32766, 362,-32766,-32766,-32766, 818,-32766, -267, + 881,-32766, 39, 293, 0, 0,-32766,-32766,-32766, 40, + 705, 706,-32766,-32766, 872, 963, 940, 947,-32766, 411, + 937, 948, 365, 870, 427, 891, 935,-32766, 1049, 291, 1244, 1052, 1053, -111, -111, 1050, 1051, 1057, -560, 1262, - 1296, 633, 0, 826, -111, -111, -111, -111, 32, 314, - -32766, 360, 683, 686, 690, 692, 1191, 693, 694, 695, - 699, 685, 319,-32766,-32766,-32766, 9,-32766, 702,-32766, + 1296, 633, 0, 826, -111, -111, -111, -111, 33, 315, + -32766, 361, 683, 686, 690, 692, 1191, 693, 694, 695, + 699, 685, 320,-32766,-32766,-32766, 9,-32766, 702,-32766, 868,-32766, 881, 1300,-32766, 893, 1302, 682, -4,-32766, -32766,-32766, 829, 828, 837,-32766,-32766, 916, -242, -242, - -242,-32766, 410, 955, 364, 26, 836, 1301, 915, 917, + -242,-32766, 411, 955, 365, 27, 836, 1301, 915, 917, -32766, 914, 1177, 900, 910, -111, -111, 807, 881, 898, 945, 1222, 946, 1299, 1256, 867, -111, -111, -111, -111, 1245, 1263, 1269, 1272, -241, -241, -241, -558, -532, -531, - 364, -530, 1, 27, 28, 37, 41, 45, 70, 0, - 74, -111, -111, 75, 76, 77, 78, 893, 79, 682, - -242, 867, -111, -111, -111, -111, 141, 151, 155, 244, - 321, 346, 514, 347, 1212, 1213, 1214, 1215, 1209, 1210, - 348, 349, 350, 351, 352, 353, 1216, 1211, 354, 355, - 356, 358, 427, 893, -265, 682, -241, -264, 71, 0, - 17, 316, 319, 18, 19, 20, 22, 397, 470, 471, - 478, 481, 482, 483, 484, 488, 489, 490, 498, 669, - 1202, 1145, 1220, 1019, 1018, 1181, -269, -103, 16, 21, - 25, 289, 396, 589, 593, 620, 674, 1149, 1197, 1146, + 365, -530, 1, 28, 29, 38, 42, 46, 71, 0, + 75, -111, -111, 76, 77, 78, 79, 893, 80, 682, + -242, 867, -111, -111, -111, -111, 142, 152, 156, 245, + 322, 347, 514, 348, 1212, 1213, 1214, 1215, 1209, 1210, + 349, 350, 351, 352, 353, 354, 1216, 1211, 355, 356, + 357, 359, 428, 893, -265, 682, -241, -264, 72, 0, + 18, 317, 320, 19, 20, 21, 23, 398, 471, 472, + 479, 482, 483, 484, 485, 489, 490, 491, 498, 669, + 1202, 1145, 1220, 1019, 1018, 1181, -269, -103, 17, 22, + 26, 290, 397, 589, 593, 620, 674, 1149, 1197, 1146, 1275, 0, -494, 1162, 0, 1223 ); @@ -491,9 +491,9 @@ class Php7 extends \PhpParser\ParserAbstract protected $actionBase = array( 0, -2, 154, 565, 876, 948, 984, 514, 53, 398, - 837, 307, 307, 67, 307, 307, 653, 724, 724, 732, - 724, 616, 673, 204, 204, 204, 625, 625, 625, 625, - 694, 694, 831, 831, 863, 799, 765, 936, 936, 936, + 837, 307, 307, 67, 307, 307, 307, 653, 724, 724, + 732, 724, 616, 673, 204, 204, 204, 625, 625, 625, + 625, 694, 694, 831, 831, 863, 799, 765, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, @@ -506,40 +506,40 @@ class Php7 extends \PhpParser\ParserAbstract 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 375, 519, 369, 701, 1017, 1023, 1019, 1024, 1015, - 1014, 1018, 1020, 1025, 911, 912, 782, 918, 919, 920, - 921, 1021, 841, 1016, 1022, 291, 291, 291, 291, 291, + 936, 936, 375, 519, 369, 701, 1017, 1023, 1019, 1024, + 1015, 1014, 1018, 1020, 1025, 911, 912, 782, 918, 919, + 920, 921, 1021, 841, 1016, 1022, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 290, 491, 44, 382, 382, 382, 382, 382, 382, + 291, 291, 290, 491, 44, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 160, 160, 160, 187, 684, 684, - 341, 203, 610, 47, 985, 985, 985, 985, 985, 985, - 985, 985, 985, 985, 144, 144, 7, 7, 7, 7, - 7, 371, -25, -25, -25, -25, 540, 385, 102, 576, - 358, 45, 377, 460, 460, 360, 231, 231, 231, 231, - 231, 231, -78, -78, -78, -78, -78, -66, 319, 457, - -94, 396, 423, 586, 586, 586, 586, 423, 423, 423, - 423, 750, 1029, 423, 423, 423, 511, 516, 516, 518, - 147, 147, 147, 516, 583, 777, 422, 583, 422, 194, - 92, 748, -40, 87, 412, 748, 617, 627, 198, 143, - 773, 658, 773, 1013, 757, 764, 717, 838, 860, 1026, - 800, 908, 806, 910, 219, 686, 1012, 1012, 1012, 1012, - 1012, 1012, 1012, 1012, 1012, 1012, 1012, 855, 552, 1013, - 286, 855, 855, 855, 552, 552, 552, 552, 552, 552, - 552, 552, 552, 552, 679, 286, 568, 626, 286, 794, - 552, 375, 758, 375, 375, 375, 375, 958, 375, 375, - 375, 375, 375, 375, 970, 769, -16, 375, 519, 12, - 12, 547, 83, 12, 12, 12, 12, 375, 375, 375, - 658, 781, 713, 666, 792, 448, 781, 781, 781, 438, - 444, 193, 447, 570, 523, 580, 760, 760, 767, 929, - 929, 760, 759, 760, 767, 934, 760, 929, 805, 359, - 648, 577, 611, 656, 929, 478, 760, 760, 760, 760, - 665, 760, 467, 433, 760, 760, 785, 774, 789, 60, - 929, 929, 929, 789, 596, 751, 751, 751, 811, 812, - 746, 771, 567, 498, 677, 348, 779, 771, 771, 760, - 640, 746, 771, 746, 771, 747, 771, 771, 771, 746, - 771, 760, 759, 585, 771, 734, 668, 224, 771, 6, + 382, 382, 382, 382, 382, 160, 160, 160, 187, 684, + 684, 341, 203, 610, 47, 985, 985, 985, 985, 985, + 985, 985, 985, 985, 985, 144, 144, 7, 7, 7, + 7, 7, 371, -25, -25, -25, -25, 540, 385, 102, + 576, 358, 45, 377, 460, 460, 360, 231, 231, 231, + 231, 231, 231, -78, -78, -78, -78, -78, -66, 319, + 457, -94, 396, 423, 586, 586, 586, 586, 423, 423, + 423, 423, 750, 1029, 423, 423, 423, 511, 516, 516, + 518, 147, 147, 147, 516, 583, 777, 422, 583, 422, + 194, 92, 748, -40, 87, 412, 748, 617, 627, 198, + 143, 773, 658, 773, 1013, 757, 764, 717, 838, 860, + 1026, 800, 908, 806, 910, 219, 686, 1012, 1012, 1012, + 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 855, 552, + 1013, 286, 855, 855, 855, 552, 552, 552, 552, 552, + 552, 552, 552, 552, 552, 679, 286, 568, 626, 286, + 794, 552, 375, 758, 375, 375, 375, 375, 958, 375, + 375, 375, 375, 375, 375, 970, 769, -16, 375, 519, + 12, 12, 547, 83, 12, 12, 12, 12, 375, 375, + 375, 658, 781, 713, 666, 792, 448, 781, 781, 781, + 438, 444, 193, 447, 570, 523, 580, 760, 760, 767, + 929, 929, 760, 759, 760, 767, 934, 760, 929, 805, + 359, 648, 577, 611, 656, 929, 478, 760, 760, 760, + 760, 665, 760, 467, 433, 760, 760, 785, 774, 789, + 60, 929, 929, 929, 789, 596, 751, 751, 751, 811, + 812, 746, 771, 567, 498, 677, 348, 779, 771, 771, + 760, 640, 746, 771, 746, 771, 747, 771, 771, 771, + 746, 771, 759, 585, 771, 734, 668, 224, 771, 6, 935, 937, 354, 940, 932, 941, 979, 942, 943, 851, 956, 933, 945, 931, 930, 780, 703, 720, 790, 729, 928, 768, 768, 768, 925, 768, 768, 768, 768, 768, @@ -562,7 +562,7 @@ class Php7 extends \PhpParser\ParserAbstract 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 458, 458, 458, 458, 458, 458, 307, 307, 307, - 307, 0, 0, 307, 0, 0, 458, 458, 458, 458, + 307, 0, 0, 307, 0, 0, 0, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, @@ -577,85 +577,85 @@ class Php7 extends \PhpParser\ParserAbstract 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 458, 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 0, 0, 0, 0, 0, + 291, 291, 291, 291, 291, 291, 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, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 0, 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 423, 423, - 291, 291, 0, 291, 423, 423, 423, 423, 423, 423, - 423, 423, 423, 423, 291, 291, 291, 291, 291, 291, - 291, 805, 147, 147, 147, 147, 423, 423, 423, 423, - 423, -88, -88, 147, 147, 423, 423, 423, 423, 423, - 423, 423, 423, 423, 423, 423, 423, 0, 0, 0, - 286, 422, 0, 759, 759, 759, 759, 0, 0, 0, - 0, 422, 422, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 286, 422, 0, 286, 0, 759, - 759, 423, 805, 805, 314, 423, 0, 0, 0, 0, - 286, 759, 286, 552, 422, 552, 552, 12, 375, 314, - 608, 608, 608, 608, 0, 658, 805, 805, 805, 805, - 805, 805, 805, 805, 805, 805, 805, 759, 0, 805, - 0, 759, 759, 759, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 759, - 0, 0, 929, 0, 0, 0, 0, 760, 0, 0, - 0, 0, 0, 0, 760, 934, 0, 0, 0, 0, - 0, 0, 759, 0, 0, 0, 0, 0, 0, 0, - 0, 768, 801, 0, 801, 0, 768, 768, 768 + 291, 291, 291, 291, 291, 291, 291, 291, 291, 423, + 423, 291, 291, 0, 291, 423, 423, 423, 423, 423, + 423, 423, 423, 423, 423, 291, 291, 291, 291, 291, + 291, 291, 805, 147, 147, 147, 147, 423, 423, 423, + 423, 423, -88, -88, 147, 147, 423, 423, 423, 423, + 423, 423, 423, 423, 423, 423, 423, 423, 0, 0, + 0, 286, 422, 0, 759, 759, 759, 759, 0, 0, + 0, 0, 422, 422, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 286, 422, 0, 286, 0, + 759, 759, 423, 805, 805, 314, 423, 0, 0, 0, + 0, 286, 759, 286, 552, 422, 552, 552, 12, 375, + 314, 608, 608, 608, 608, 0, 658, 805, 805, 805, + 805, 805, 805, 805, 805, 805, 805, 805, 759, 0, + 805, 0, 759, 759, 759, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 759, 0, 0, 929, 0, 0, 0, 0, 760, 0, + 0, 0, 0, 0, 0, 760, 934, 0, 0, 0, + 0, 0, 0, 759, 0, 0, 0, 0, 0, 0, + 0, 0, 768, 801, 0, 801, 0, 768, 768, 768 ); protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 578, 578, 578, 578, - 32767,32767, 246, 103,32767,32767, 454, 372, 372, 372, - 32767,32767, 522, 522, 522, 522, 522, 522,32767,32767, - 32767,32767,32767,32767, 454,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 578, 578, 578, + 578,32767,32767, 246, 103,32767,32767, 454, 372, 372, + 372,32767,32767, 522, 522, 522, 522, 522, 522,32767, + 32767,32767,32767,32767,32767, 454,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, 101,32767,32767, - 32767, 37, 7, 8, 10, 11, 50, 17, 310,32767, - 32767,32767,32767, 103,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 571,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 101,32767, + 32767,32767, 37, 7, 8, 10, 11, 50, 17, 310, + 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 458, 437, 438, 440, 441, - 371, 523, 577, 313, 574, 370, 146, 325, 315, 234, - 316, 250, 459, 251, 460, 463, 464, 211, 279, 367, - 150, 401, 455, 403, 453, 457, 402, 377, 382, 383, - 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, - 394, 375, 376, 456, 434, 433, 432, 399,32767,32767, - 400, 404, 374, 407,32767,32767,32767,32767,32767,32767, - 32767,32767, 103,32767, 405, 406, 423, 424, 421, 422, - 425,32767, 426, 427, 428, 429,32767,32767, 302,32767, - 32767, 351, 349, 414, 415, 302,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 516, 431, + 32767,32767,32767,32767,32767, 571,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 103,32767, 101, 518, 396, 398, 486, - 409, 410, 408, 378,32767, 493,32767, 103, 495,32767, - 32767,32767, 112,32767,32767,32767, 517,32767, 524, 524, - 32767, 479, 101, 194,32767, 194, 194,32767,32767,32767, - 32767,32767,32767,32767, 585, 479, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111,32767, 194, 111, - 32767,32767,32767, 101, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 189,32767, 260, 262, 103, 539, - 194,32767, 498,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 491,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 458, 437, 438, 440, + 441, 371, 523, 577, 313, 574, 370, 146, 325, 315, + 234, 316, 250, 459, 251, 460, 463, 464, 211, 279, + 367, 150, 401, 455, 403, 453, 457, 402, 377, 382, + 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 375, 376, 456, 434, 433, 432, 399,32767, + 32767, 400, 404, 374, 407,32767,32767,32767,32767,32767, + 32767,32767,32767, 103,32767, 405, 406, 423, 424, 421, + 422, 425,32767, 426, 427, 428, 429,32767,32767, 302, + 32767,32767, 351, 349, 414, 415, 302,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 516, + 431,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 103,32767, 101, 518, 396, 398, + 486, 409, 410, 408, 378,32767, 493,32767, 103, 495, + 32767,32767,32767, 112,32767,32767,32767, 517,32767, 524, + 524,32767, 479, 101, 194,32767, 194, 194,32767,32767, + 32767,32767,32767,32767,32767, 585, 479, 111, 111, 111, + 111, 111, 111, 111, 111, 111, 111, 111,32767, 194, + 111,32767,32767,32767, 101, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 189,32767, 260, 262, 103, + 539, 194,32767, 498,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 491,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 479, 419, 139,32767, 139, 524, 411, 412, 413, 481, - 524, 524, 524, 298, 281,32767,32767,32767,32767, 496, - 496, 101, 101, 101, 101, 491,32767,32767, 112, 100, - 100, 100, 100, 100, 104, 102,32767,32767,32767,32767, - 100,32767, 102, 102,32767,32767, 217, 208, 215, 102, - 32767, 543, 544, 215, 102, 219, 219, 219, 239, 239, - 470, 304, 102, 100, 102, 102, 196, 304, 304,32767, - 102, 470, 304, 470, 304, 198, 304, 304, 304, 470, - 304,32767,32767, 102, 304, 210, 100, 100, 304,32767, + 32767, 479, 419, 139,32767, 139, 524, 411, 412, 413, + 481, 524, 524, 524, 298, 281,32767,32767,32767,32767, + 496, 496, 101, 101, 101, 101, 491,32767,32767, 112, + 100, 100, 100, 100, 100, 104, 102,32767,32767,32767, + 32767, 100,32767, 102, 102,32767,32767, 217, 208, 215, + 102,32767, 543, 544, 215, 102, 219, 219, 219, 239, + 239, 470, 304, 102, 100, 102, 102, 196, 304, 304, + 32767, 102, 470, 304, 470, 304, 198, 304, 304, 304, + 470, 304,32767, 102, 304, 210, 100, 100, 304,32767, 32767,32767, 481,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767, 511,32767, 528, 541, 417, 418, 420, 526, 442, 443, 444, 445, 446, @@ -680,71 +680,67 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $goto = array( - 193, 193, 670, 421, 643, 1022, 1290, 1290, 824, 415, - 307, 308, 328, 563, 313, 420, 329, 422, 622, 801, - 678, 341, 586, 1290, 825, 164, 164, 164, 164, 217, - 194, 190, 190, 174, 176, 212, 190, 190, 190, 190, - 190, 191, 191, 191, 191, 191, 191, 185, 186, 187, - 188, 189, 214, 212, 215, 521, 522, 411, 523, 525, - 526, 527, 528, 529, 530, 531, 532, 1091, 165, 166, - 167, 192, 168, 169, 170, 163, 171, 172, 173, 175, - 211, 213, 216, 234, 237, 240, 241, 243, 254, 255, - 256, 257, 258, 259, 260, 262, 263, 264, 265, 273, - 274, 310, 311, 312, 416, 417, 418, 568, 218, 219, + 194, 194, 670, 422, 643, 463, 1264, 1265, 1022, 416, + 308, 309, 329, 563, 314, 421, 330, 423, 622, 801, + 678, 637, 586, 651, 652, 653, 165, 165, 165, 165, + 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, + 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, + 188, 189, 190, 215, 213, 216, 521, 522, 412, 523, + 525, 526, 527, 528, 529, 530, 531, 532, 1091, 166, + 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, + 176, 212, 214, 217, 235, 238, 241, 242, 244, 255, + 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, + 274, 275, 311, 312, 313, 417, 418, 419, 568, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 177, 233, 178, 195, 196, 197, 235, - 185, 186, 187, 188, 189, 214, 1091, 198, 179, 180, - 181, 199, 195, 182, 236, 200, 198, 162, 201, 202, - 183, 203, 204, 205, 184, 206, 207, 208, 209, 210, - 322, 322, 322, 322, 827, 608, 608, 858, 547, 538, - 1186, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, - 1221, 1239, 1239, 462, 1264, 1265, 799, 1239, 1239, 1239, - 1239, 1239, 1239, 1239, 1239, 1239, 1239, 387, 538, 547, - 556, 557, 394, 566, 588, 602, 603, 832, 938, 880, - 875, 876, 889, 14, 833, 877, 830, 878, 879, 831, - 453, 453, 884, 883, 885, 1187, 250, 250, 560, 453, - 1237, 1237, 815, 1043, 1039, 1040, 1237, 1237, 1237, 1237, - 1237, 1237, 1237, 1237, 1237, 1237, 820, 820, 1188, 1247, - 1248, 247, 247, 247, 247, 249, 251, 342, 343, 339, - 1190, 1190, 997, 1190, 997, 1279, 930, 401, 677, 997, + 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, + 236, 186, 187, 188, 189, 190, 215, 1091, 199, 180, + 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, + 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, + 211, 323, 323, 323, 323, 827, 608, 608, 824, 547, + 538, 342, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, + 1221, 1221, 1239, 1239, 288, 288, 288, 288, 1239, 1239, + 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 388, 538, + 547, 556, 557, 395, 566, 588, 602, 603, 832, 825, + 880, 875, 876, 889, 15, 833, 877, 830, 878, 879, + 831, 799, 251, 251, 883, 919, 992, 1000, 1004, 1001, + 1005, 1237, 1237, 938, 1043, 1039, 1040, 1237, 1237, 1237, + 1237, 1237, 1237, 1237, 1237, 1237, 1237, 858, 248, 248, + 248, 248, 250, 252, 533, 533, 533, 533, 487, 590, + 488, 1190, 1190, 997, 1190, 997, 494, 1290, 1290, 560, 997, 997, 997, 997, 997, 997, 997, 997, 997, 997, - 997, 1261, 1261, 414, 1261, 597, 1190, 287, 287, 287, - 287, 1190, 1190, 1190, 1190, 959, 344, 1190, 1190, 1190, - 1271, 1271, 1271, 1271, 606, 640, 344, 344, 1273, 1273, - 1273, 1273, 1063, 1064, 637, 896, 651, 652, 653, 897, - 344, 344, 383, 344, 486, 1306, 487, 535, 535, 5, - 535, 6, 494, 559, 1257, 1140, 540, 524, 524, 344, - 318, 302, 642, 524, 524, 524, 524, 524, 524, 524, - 524, 524, 524, 444, 1266, 1267, 618, 619, 932, 932, - 932, 932, 820, 428, 444, 926, 933, 330, 533, 533, - 533, 533, 1030, 590, 817, 554, 1259, 1259, 1030, 704, - 621, 623, 845, 641, 1250, 805, 393, 660, 664, 973, - 668, 676, 969, 1183, 553, 842, 823, 1289, 1289, 564, - 600, 601, 385, 389, 548, 587, 591, 663, 962, 936, - 936, 934, 936, 703, 1289, 537, 971, 966, 438, 901, - 1079, 981, 1028, 438, 438, 805, 605, 805, 707, 854, - 1292, 978, 463, 539, 551, 1074, 467, 540, 539, 844, - 551, 646, 957, 386, 1171, 912, 1032, 838, 1172, 1175, - 913, 1176, 943, 567, 456, 457, 458, 0, 850, 0, - 1182, 1297, 1298, 253, 253, 0, 399, 400, 0, 0, - 0, 649, 0, 650, 423, 403, 404, 405, 840, 661, - 0, 423, 0, 406, 0, 0, 848, 337, 1009, 1002, - 1006, 1003, 1007, 852, 0, 0, 839, 1185, 495, 0, - 0, 0, 0, 438, 438, 438, 438, 438, 438, 438, - 438, 438, 438, 438, 0, 0, 438, 595, 609, 612, - 613, 614, 615, 634, 635, 636, 680, 853, 841, 1027, - 1031, 585, 1056, 0, 681, 667, 667, 941, 673, 1054, - 0, 0, 0, 0, 0, 271, 0, 0, 0, 0, - 536, 536, 919, 992, 1000, 1004, 1001, 1005, 0, 0, - 931, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 976, 976, 0, 1072, 857 + 997, 997, 1261, 1261, 1290, 1261, 340, 1190, 930, 402, + 677, 1279, 1190, 1190, 1190, 1190, 959, 345, 1190, 1190, + 1190, 1271, 1271, 1271, 1271, 606, 640, 345, 345, 1273, + 1273, 1273, 1273, 820, 820, 805, 896, 884, 840, 885, + 897, 345, 345, 5, 345, 6, 1306, 384, 535, 535, + 559, 535, 415, 852, 597, 1257, 839, 540, 524, 524, + 345, 1289, 1289, 642, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 445, 805, 1140, 805, 1289, 932, + 932, 932, 932, 1063, 1064, 445, 926, 933, 386, 390, + 548, 587, 591, 1030, 1292, 331, 554, 1259, 1259, 1030, + 704, 621, 623, 823, 641, 1250, 319, 303, 660, 664, + 973, 668, 676, 969, 429, 553, 962, 936, 936, 934, + 936, 703, 601, 537, 971, 966, 343, 344, 663, 817, + 595, 609, 612, 613, 614, 615, 634, 635, 636, 680, + 439, 1186, 845, 454, 454, 439, 439, 1266, 1267, 820, + 901, 1079, 454, 394, 539, 551, 1183, 605, 540, 539, + 842, 551, 978, 272, 387, 618, 619, 981, 536, 536, + 844, 707, 646, 957, 567, 457, 458, 459, 838, 850, + 254, 254, 1297, 1298, 400, 401, 976, 976, 464, 649, + 1182, 650, 1028, 404, 405, 406, 1187, 661, 424, 1032, + 407, 564, 600, 815, 338, 424, 854, 848, 853, 841, + 1027, 1031, 1009, 1002, 1006, 1003, 1007, 1185, 941, 1188, + 1247, 1248, 943, 0, 1074, 439, 439, 439, 439, 439, + 439, 439, 439, 439, 439, 439, 0, 468, 439, 585, + 1056, 931, 681, 667, 667, 0, 495, 673, 1054, 1171, + 912, 0, 0, 1172, 1175, 913, 1176, 0, 0, 0, + 0, 0, 0, 1072, 857 ); protected $gotoCheck = array( - 42, 42, 72, 65, 65, 119, 173, 173, 26, 65, + 42, 42, 72, 65, 65, 166, 166, 166, 119, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 7, - 9, 93, 122, 173, 27, 42, 42, 42, 42, 42, + 9, 84, 122, 84, 84, 84, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -758,91 +754,87 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 23, 23, 23, 23, 15, 104, 104, 45, 75, 75, - 20, 104, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 160, 160, 166, 166, 166, 6, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 15, 49, 15, - 15, 15, 15, 75, 15, 15, 15, 15, 15, 15, - 141, 141, 64, 15, 64, 20, 5, 5, 162, 141, - 161, 161, 20, 15, 15, 15, 161, 161, 161, 161, - 161, 161, 161, 161, 161, 161, 22, 22, 20, 20, - 20, 5, 5, 5, 5, 5, 5, 93, 93, 169, - 72, 72, 72, 72, 72, 171, 89, 89, 89, 72, + 42, 23, 23, 23, 23, 15, 104, 104, 26, 75, + 75, 93, 104, 104, 104, 104, 104, 104, 104, 104, + 104, 104, 160, 160, 24, 24, 24, 24, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 15, 27, + 15, 15, 15, 15, 75, 15, 15, 15, 15, 15, + 15, 6, 5, 5, 15, 87, 87, 87, 87, 87, + 87, 161, 161, 49, 15, 15, 15, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 161, 45, 5, 5, + 5, 5, 5, 5, 103, 103, 103, 103, 147, 103, + 147, 72, 72, 72, 72, 72, 147, 173, 173, 162, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, - 72, 122, 122, 13, 122, 13, 72, 24, 24, 24, - 24, 72, 72, 72, 72, 99, 14, 72, 72, 72, - 9, 9, 9, 9, 55, 55, 14, 14, 122, 122, - 122, 122, 136, 136, 84, 72, 84, 84, 84, 72, - 14, 14, 61, 14, 147, 14, 147, 19, 19, 46, - 19, 46, 147, 100, 122, 143, 14, 163, 163, 14, - 159, 159, 63, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 19, 168, 168, 83, 83, 19, 19, - 19, 19, 22, 109, 19, 19, 19, 29, 103, 103, - 103, 103, 122, 103, 18, 48, 122, 122, 122, 48, - 48, 48, 39, 48, 14, 12, 28, 48, 48, 48, - 48, 48, 48, 152, 9, 37, 25, 172, 172, 2, - 2, 9, 58, 58, 58, 58, 58, 14, 25, 25, - 25, 25, 25, 25, 172, 25, 25, 25, 23, 17, - 17, 106, 121, 23, 23, 12, 17, 12, 95, 41, - 172, 17, 149, 9, 9, 139, 82, 14, 9, 17, - 9, 17, 17, 9, 78, 78, 124, 17, 78, 78, - 78, 78, 92, 9, 9, 9, 9, -1, 9, -1, - 17, 9, 9, 5, 5, -1, 80, 80, -1, -1, - -1, 80, -1, 80, 113, 80, 80, 80, 35, 80, - -1, 113, -1, 80, -1, -1, 9, 80, 113, 113, - 113, 113, 113, 35, -1, -1, 35, 14, 9, -1, - -1, -1, -1, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, -1, -1, 23, 79, 79, 79, - 79, 79, 79, 79, 79, 79, 79, 16, 16, 16, - 16, 8, 8, -1, 8, 8, 8, 16, 8, 8, - -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, - 24, 24, 87, 87, 87, 87, 87, 87, -1, -1, - 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 103, 103, -1, 16, 16 + 72, 72, 122, 122, 173, 122, 169, 72, 89, 89, + 89, 171, 72, 72, 72, 72, 99, 14, 72, 72, + 72, 9, 9, 9, 9, 55, 55, 14, 14, 122, + 122, 122, 122, 22, 22, 12, 72, 64, 35, 64, + 72, 14, 14, 46, 14, 46, 14, 61, 19, 19, + 100, 19, 13, 35, 13, 122, 35, 14, 163, 163, + 14, 172, 172, 63, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 19, 12, 143, 12, 172, 19, + 19, 19, 19, 136, 136, 19, 19, 19, 58, 58, + 58, 58, 58, 122, 172, 29, 48, 122, 122, 122, + 48, 48, 48, 25, 48, 14, 159, 159, 48, 48, + 48, 48, 48, 48, 109, 9, 25, 25, 25, 25, + 25, 25, 9, 25, 25, 25, 93, 93, 14, 18, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 23, 20, 39, 141, 141, 23, 23, 168, 168, 22, + 17, 17, 141, 28, 9, 9, 152, 17, 14, 9, + 37, 9, 17, 24, 9, 83, 83, 106, 24, 24, + 17, 95, 17, 17, 9, 9, 9, 9, 17, 9, + 5, 5, 9, 9, 80, 80, 103, 103, 149, 80, + 17, 80, 121, 80, 80, 80, 20, 80, 113, 124, + 80, 2, 2, 20, 80, 113, 41, 9, 16, 16, + 16, 16, 113, 113, 113, 113, 113, 14, 16, 20, + 20, 20, 92, -1, 139, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, -1, 82, 23, 8, + 8, 16, 8, 8, 8, -1, 8, 8, 8, 78, + 78, -1, -1, 78, 78, 78, 78, -1, -1, -1, + -1, -1, -1, 16, 16 ); protected $gotoBase = array( - 0, 0, -285, 0, 0, 225, 173, 10, 524, 7, - 0, 0, 95, -47, 5, -174, 87, -33, 71, 61, - -212, 0, -76, 157, 284, 392, 4, 20, 56, 77, - 0, 0, 0, 0, 0, 118, 0, 63, 0, 65, - 0, -2, -1, 0, 0, 155, -378, 0, -308, 186, - 0, 0, 0, 0, 0, 266, 0, 0, 359, 0, - 0, 282, 0, 103, 204, -235, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -167, 0, 0, 45, 170, - -11, 0, -27, -110, -376, 0, 0, 276, 0, -32, - 0, 0, 19, -448, 0, 30, 0, 0, 0, 262, - 292, 0, 0, 342, -73, 0, 62, 0, 0, 88, - 0, 0, 0, 206, 0, 0, 0, 0, 0, 3, - 0, 59, 15, 0, 14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 41, 0, 0, 1, - 0, 188, 0, 66, 0, 0, 0, -157, 0, 2, - 0, 0, 35, 0, 0, 0, 0, 0, 0, 25, - -57, -8, 201, 99, 0, 0, -111, 0, -7, 231, - 0, 236, 96, -295, 0, 0 + 0, 0, -203, 0, 0, 221, 208, 10, 512, 7, + 0, 0, 24, 1, 5, -174, 47, -23, 105, 61, + 38, 0, -10, 158, 181, 379, 164, 205, 102, 84, + 0, 0, 0, 0, 0, -43, 0, 107, 0, 104, + 0, 54, -1, 0, 0, 235, -384, 0, -307, 210, + 0, 0, 0, 0, 0, 266, 0, 0, 324, 0, + 0, 286, 0, 103, 298, -236, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -167, 0, 0, 129, 62, + -14, 0, 53, -22, -669, 0, 0, -52, 0, -11, + 0, 0, 68, -299, 0, 52, 0, 0, 0, 262, + 288, 0, 0, 227, -73, 0, 87, 0, 0, 118, + 0, 0, 0, 209, 0, 0, 0, 0, 0, 6, + 0, 108, 15, 0, 46, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 91, 0, 0, 69, + 0, 390, 0, 86, 0, 0, 0, -224, 0, 37, + 0, 0, 77, 0, 0, 0, 0, 0, 0, 70, + -57, -8, 241, 99, 0, 0, -290, 0, 65, 257, + 0, 261, 39, -35, 0, 0 ); protected $gotoDefault = array( -32768, 499, 711, 4, 712, 905, 788, 797, 583, 515, - 679, 338, 610, 412, 1255, 882, 1078, 565, 816, 1199, - 1207, 445, 819, 323, 701, 864, 865, 866, 390, 375, - 381, 388, 632, 611, 480, 851, 441, 843, 472, 846, - 440, 855, 161, 409, 497, 859, 3, 861, 542, 892, - 376, 869, 377, 656, 871, 550, 873, 874, 384, 391, - 392, 1083, 558, 607, 886, 242, 552, 887, 374, 888, - 895, 379, 382, 665, 452, 492, 485, 402, 1058, 594, - 629, 449, 466, 617, 616, 604, 465, 424, 407, 928, - 473, 450, 942, 340, 950, 709, 1090, 624, 475, 958, - 625, 965, 968, 516, 517, 464, 980, 268, 983, 476, - 1015, 647, 648, 995, 626, 627, 1013, 459, 584, 1021, - 442, 1029, 1243, 443, 1033, 261, 1036, 275, 408, 425, - 1041, 1042, 8, 1048, 671, 672, 10, 272, 496, 1073, - 666, 439, 1089, 429, 1159, 1161, 544, 477, 1179, 1178, - 659, 493, 1184, 1246, 437, 518, 460, 309, 519, 301, - 326, 306, 534, 288, 327, 520, 461, 1252, 1260, 324, - 29, 1280, 1291, 334, 562, 599 + 679, 339, 610, 413, 1255, 882, 1078, 565, 816, 1199, + 1207, 446, 819, 324, 701, 864, 865, 866, 391, 376, + 382, 389, 632, 611, 481, 851, 442, 843, 473, 846, + 441, 855, 162, 410, 497, 859, 3, 861, 542, 892, + 377, 869, 378, 656, 871, 550, 873, 874, 385, 392, + 393, 1083, 558, 607, 886, 243, 552, 887, 375, 888, + 895, 380, 383, 665, 453, 492, 486, 403, 1058, 594, + 629, 450, 467, 617, 616, 604, 466, 425, 408, 928, + 474, 451, 942, 341, 950, 709, 1090, 624, 476, 958, + 625, 965, 968, 516, 517, 465, 980, 269, 983, 477, + 1015, 647, 648, 995, 626, 627, 1013, 460, 584, 1021, + 443, 1029, 1243, 444, 1033, 262, 1036, 276, 409, 426, + 1041, 1042, 8, 1048, 671, 672, 10, 273, 496, 1073, + 666, 440, 1089, 430, 1159, 1161, 544, 478, 1179, 1178, + 659, 493, 1184, 1246, 438, 518, 461, 310, 519, 302, + 327, 307, 534, 289, 328, 520, 462, 1252, 1260, 325, + 30, 1280, 1291, 335, 562, 599 ); protected $ruleToNonTerminal = array( diff --git a/test/code/parser/stmt/class/enum.test b/test/code/parser/stmt/class/enum.test index eb766adba6..2a79826446 100644 --- a/test/code/parser/stmt/class/enum.test +++ b/test/code/parser/stmt/class/enum.test @@ -2,10 +2,14 @@ Enum ----- Date: Sun, 17 Oct 2021 20:26:06 +0200 Subject: [PATCH 047/428] Rename identifier/identifier_ex productions The names were easy to get wrong, because the corresponding names in zend_language_parser.y are T_STRING/identifier, so just copying identifier from upstream gives the wrong behavior. --- grammar/php7.y | 57 ++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/grammar/php7.y b/grammar/php7.y index 3202d4dcf3..eac68d095a 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -41,12 +41,12 @@ semi_reserved: | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC | T_READONLY ; -identifier_ex: +identifier_maybe_reserved: T_STRING { $$ = Node\Identifier[$1]; } | semi_reserved { $$ = Node\Identifier[$1]; } ; -identifier: +identifier_not_reserved: T_STRING { $$ = Node\Identifier[$1]; } ; @@ -181,14 +181,14 @@ non_empty_inline_use_declarations: unprefixed_use_declaration: namespace_name { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } - | namespace_name T_AS identifier + | namespace_name T_AS identifier_not_reserved { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } ; use_declaration: legacy_namespace_name { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } - | legacy_namespace_name T_AS identifier + | legacy_namespace_name T_AS identifier_not_reserved { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } ; @@ -208,7 +208,7 @@ non_empty_constant_declaration_list: ; constant_declaration: - identifier '=' expr { $$ = Node\Const_[$1, $3]; } + identifier_not_reserved '=' expr { $$ = Node\Const_[$1, $3]; } ; class_const_list: @@ -221,7 +221,7 @@ non_empty_class_const_list: ; class_const: - identifier_ex '=' expr { $$ = Node\Const_[$1, $3]; } + identifier_maybe_reserved '=' expr { $$ = Node\Const_[$1, $3]; } ; inner_statement_list_ex: @@ -289,8 +289,8 @@ non_empty_statement: | 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_GOTO identifier semi { $$ = Stmt\Goto_[$2]; } - | identifier ':' { $$ = Stmt\Label[$1]; } + | T_GOTO identifier_not_reserved semi { $$ = Stmt\Goto_[$2]; } + | identifier_not_reserved ':' { $$ = Stmt\Label[$1]; } | error { $$ = array(); /* means: no statement */ } ; @@ -351,22 +351,22 @@ block_or_error: ; function_declaration_statement: - T_FUNCTION optional_ref identifier '(' parameter_list ')' optional_return_type block_or_error + T_FUNCTION optional_ref identifier_not_reserved '(' parameter_list ')' optional_return_type block_or_error { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $8, 'attrGroups' => []]]; } - | attributes T_FUNCTION optional_ref identifier '(' parameter_list ')' optional_return_type block_or_error + | attributes T_FUNCTION optional_ref identifier_not_reserved '(' parameter_list ')' optional_return_type block_or_error { $$ = Stmt\Function_[$4, ['byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => $1]]; } ; class_declaration_statement: - optional_attributes class_entry_type identifier extends_from implements_list '{' class_statement_list '}' + optional_attributes class_entry_type identifier_not_reserved extends_from implements_list '{' class_statement_list '}' { $$ = Stmt\Class_[$3, ['type' => $2, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]]; $this->checkClass($$, #3); } - | optional_attributes T_INTERFACE identifier interface_extends_list '{' class_statement_list '}' + | optional_attributes T_INTERFACE identifier_not_reserved interface_extends_list '{' class_statement_list '}' { $$ = Stmt\Interface_[$3, ['extends' => $4, 'stmts' => $6, 'attrGroups' => $1]]; $this->checkInterface($$, #3); } - | optional_attributes T_TRAIT identifier '{' class_statement_list '}' + | optional_attributes T_TRAIT identifier_not_reserved '{' class_statement_list '}' { $$ = Stmt\Trait_[$3, ['stmts' => $5, 'attrGroups' => $1]]; } - | optional_attributes T_ENUM identifier enum_scalar_type implements_list '{' class_statement_list '}' + | optional_attributes T_ENUM identifier_not_reserved enum_scalar_type implements_list '{' class_statement_list '}' { $$ = Stmt\Enum_[$3, ['scalarType' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]]; $this->checkEnum($$, #3); } ; @@ -436,7 +436,7 @@ non_empty_declare_list: ; declare_list_element: - identifier '=' expr { $$ = Stmt\DeclareDeclare[$1, $3]; } + identifier_not_reserved '=' expr { $$ = Stmt\DeclareDeclare[$1, $3]; } ; switch_case_list: @@ -635,7 +635,7 @@ argument: expr { $$ = Node\Arg[$1, false, false]; } | ampersand variable { $$ = Node\Arg[$2, true, false]; } | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; } - | identifier_ex ':' expr + | identifier_maybe_reserved ':' expr { $$ = new Node\Arg($3, false, false, attributes(), $1); } ; @@ -684,11 +684,12 @@ class_statement: | optional_attributes method_modifiers T_CONST class_const_list semi { $$ = new Stmt\ClassConst($4, $2, attributes(), $1); $this->checkClassConst($$, #2); } - | optional_attributes method_modifiers T_FUNCTION optional_ref identifier_ex '(' parameter_list ')' optional_return_type method_body + | optional_attributes method_modifiers T_FUNCTION optional_ref identifier_maybe_reserved '(' parameter_list ')' + optional_return_type method_body { $$ = Stmt\ClassMethod[$5, ['type' => $2, 'byRef' => $4, 'params' => $7, 'returnType' => $9, 'stmts' => $10, 'attrGroups' => $1]]; $this->checkClassMethod($$, #2); } | T_USE class_name_list trait_adaptations { $$ = Stmt\TraitUse[$2, $3]; } - | optional_attributes T_CASE identifier_ex enum_case_expr semi + | optional_attributes T_CASE identifier_maybe_reserved enum_case_expr semi { $$ = Stmt\EnumCase[$3, $4, $1]; } | error { $$ = null; /* will be skipped */ } ; @@ -706,22 +707,22 @@ trait_adaptation_list: trait_adaptation: trait_method_reference_fully_qualified T_INSTEADOF class_name_list ';' { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; } - | trait_method_reference T_AS member_modifier identifier_ex ';' + | trait_method_reference T_AS member_modifier identifier_maybe_reserved ';' { $$ = 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 identifier ';' + | trait_method_reference T_AS identifier_not_reserved ';' { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } | trait_method_reference T_AS reserved_non_modifiers_identifier ';' { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } ; trait_method_reference_fully_qualified: - name T_PAAMAYIM_NEKUDOTAYIM identifier_ex { $$ = array($1, $3); } + name T_PAAMAYIM_NEKUDOTAYIM identifier_maybe_reserved { $$ = array($1, $3); } ; trait_method_reference: trait_method_reference_fully_qualified { $$ = $1; } - | identifier_ex { $$ = array(null, $1); } + | identifier_maybe_reserved { $$ = array(null, $1); } ; method_body: @@ -994,7 +995,7 @@ constant: ; class_constant: - class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_ex + class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_maybe_reserved { $$ = Expr\ClassConstFetch[$1, $3]; } /* We interpret an isolated FOO:: as an unfinished class constant fetch. It could also be an unfinished static property fetch or unfinished scoped call. */ @@ -1113,13 +1114,13 @@ new_variable: ; member_name: - identifier_ex { $$ = $1; } + identifier_maybe_reserved { $$ = $1; } | '{' expr '}' { $$ = $2; } | simple_variable { $$ = $1; } ; property_name: - identifier { $$ = $1; } + identifier_not_reserved { $$ = $1; } | '{' expr '}' { $$ = $2; } | simple_variable { $$ = $1; } | error { $$ = Expr\Error[]; $this->errorState = 2; } @@ -1174,8 +1175,10 @@ encaps_str_varname: encaps_var: plain_variable { $$ = $1; } | plain_variable '[' encaps_var_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | plain_variable T_OBJECT_OPERATOR identifier { $$ = Expr\PropertyFetch[$1, $3]; } - | plain_variable T_NULLSAFE_OBJECT_OPERATOR identifier { $$ = Expr\NullsafePropertyFetch[$1, $3]; } + | plain_variable T_OBJECT_OPERATOR identifier_not_reserved + { $$ = Expr\PropertyFetch[$1, $3]; } + | plain_variable T_NULLSAFE_OBJECT_OPERATOR identifier_not_reserved + { $$ = Expr\NullsafePropertyFetch[$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 encaps_str_varname '[' expr ']' '}' From 6a21234e58a65a9254178503f2ee6a26d554e7bf Mon Sep 17 00:00:00 2001 From: Ilhan Yumer Date: Sun, 31 Oct 2021 02:11:22 +0300 Subject: [PATCH 048/428] Code highlighting --- doc/component/Walking_the_AST.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/component/Walking_the_AST.markdown b/doc/component/Walking_the_AST.markdown index 81c4d3c0de..e4d95609ad 100644 --- a/doc/component/Walking_the_AST.markdown +++ b/doc/component/Walking_the_AST.markdown @@ -193,7 +193,7 @@ anonymous classes), you know that once you've seen a class declaration, there is checking all it's child nodes, because PHP does not allow nesting classes. In this case, you can instruct the traverser to not recurse into the class node: -``` +```php private $classes = []; public function enterNode(Node $node) { if ($node instanceof Node\Stmt\Class_) { @@ -211,7 +211,7 @@ after finding it. For example, if you are looking for the node of a class with a discounting exotic cases like conditionally defining a class two times), you can stop traversal once you found it: -``` +```php private $class = null; public function enterNode(Node $node) { if ($node instanceof Node\Stmt\Class_ && @@ -251,7 +251,7 @@ Stmt_Return( the following method calls will be performed: -``` +```php $visitorA->enterNode(Stmt_Return) $visitorB->enterNode(Stmt_Return) $visitorA->enterNode(Expr_Variable) From 63a79e8daa781cac14e5195e63ed8ae231dd10fd Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 3 Nov 2021 21:51:58 +0100 Subject: [PATCH 049/428] Release PHP-Parser 4.13.1 --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f357cf48d..a014c2ea8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,16 @@ -Version 4.13.1-dev +Version 4.13.2-dev ------------------ Nothing yet. +Version 4.13.1 (2021-11-03) +--------------------------- + +### Fixed + +* Support reserved keywords as enum cases. +* Support array unpacking in constant expression evaluator. + Version 4.13.0 (2021-09-20) --------------------------- From 99a24b6a556cb2f85c48f62a5311cbc1f8b6eb92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Hansl=C3=ADk?= Date: Fri, 5 Nov 2021 20:45:10 +0100 Subject: [PATCH 050/428] Added builders for enum and enum case --- lib/PhpParser/Builder/EnumCase.php | 85 +++++++++++++ lib/PhpParser/Builder/Enum_.php | 117 +++++++++++++++++ lib/PhpParser/BuilderFactory.php | 24 +++- test/PhpParser/Builder/EnumCaseTest.php | 84 +++++++++++++ test/PhpParser/Builder/EnumTest.php | 159 ++++++++++++++++++++++++ test/PhpParser/BuilderFactoryTest.php | 2 + 6 files changed, 470 insertions(+), 1 deletion(-) create mode 100644 lib/PhpParser/Builder/EnumCase.php create mode 100644 lib/PhpParser/Builder/Enum_.php create mode 100644 test/PhpParser/Builder/EnumCaseTest.php create mode 100644 test/PhpParser/Builder/EnumTest.php diff --git a/lib/PhpParser/Builder/EnumCase.php b/lib/PhpParser/Builder/EnumCase.php new file mode 100644 index 0000000000..02fa83e624 --- /dev/null +++ b/lib/PhpParser/Builder/EnumCase.php @@ -0,0 +1,85 @@ +name = $name; + } + + /** + * Sets the value. + * + * @param Node\Expr|string|int $value + * + * @return $this + */ + public function setValue($value) { + $this->value = BuilderHelpers::normalizeValue($value); + + return $this; + } + + /** + * Sets doc comment for the constant. + * + * @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' => [BuilderHelpers::normalizeDocComment($docComment)] + ]; + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Returns the built enum case node. + * + * @return Stmt\EnumCase The built constant node + */ + public function getNode(): PhpParser\Node { + return new Stmt\EnumCase( + $this->name, + $this->value, + $this->attributes, + $this->attributeGroups + ); + } +} diff --git a/lib/PhpParser/Builder/Enum_.php b/lib/PhpParser/Builder/Enum_.php new file mode 100644 index 0000000000..be7eef95f5 --- /dev/null +++ b/lib/PhpParser/Builder/Enum_.php @@ -0,0 +1,117 @@ +name = $name; + } + + /** + * Sets the scalar type. + * + * @param string|Identifier $type + * + * @return $this + */ + public function setScalarType($scalarType) { + $this->scalarType = BuilderHelpers::normalizeType($scalarType); + + 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(...$interfaces) { + foreach ($interfaces as $interface) { + $this->implements[] = BuilderHelpers::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 = BuilderHelpers::normalizeNode($stmt); + + $targets = [ + Stmt\TraitUse::class => &$this->uses, + Stmt\EnumCase::class => &$this->enumCases, + Stmt\ClassConst::class => &$this->constants, + Stmt\ClassMethod::class => &$this->methods, + ]; + + $class = \get_class($stmt); + if (!isset($targets[$class])) { + throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); + } + + $targets[$class][] = $stmt; + + return $this; + } + + /** + * Adds an attribute group. + * + * @param Node\Attribute|Node\AttributeGroup $attribute + * + * @return $this The builder instance (for fluid interface) + */ + public function addAttribute($attribute) { + $this->attributeGroups[] = BuilderHelpers::normalizeAttribute($attribute); + + return $this; + } + + /** + * Returns the built class node. + * + * @return Stmt\Enum_ The built enum node + */ + public function getNode() : PhpParser\Node { + return new Stmt\Enum_($this->name, [ + 'scalarType' => $this->scalarType, + 'implements' => $this->implements, + 'stmts' => array_merge($this->uses, $this->enumCases, $this->constants, $this->methods), + 'attrGroups' => $this->attributeGroups, + ], $this->attributes); + } +} diff --git a/lib/PhpParser/BuilderFactory.php b/lib/PhpParser/BuilderFactory.php index 6a6b7b07b5..fef2579b3e 100644 --- a/lib/PhpParser/BuilderFactory.php +++ b/lib/PhpParser/BuilderFactory.php @@ -71,6 +71,17 @@ public function trait(string $name) : Builder\Trait_ { return new Builder\Trait_($name); } + /** + * Creates an enum builder. + * + * @param string $name Name of the enum + * + * @return Builder\Enum_ The created enum builder + */ + public function enum(string $name) : Builder\Enum_ { + return new Builder\Enum_($name); + } + /** * Creates a trait use builder. * @@ -188,6 +199,17 @@ public function classConst($name, $value) : Builder\ClassConst { return new Builder\ClassConst($name, $value); } + /** + * Creates an enum case builder. + * + * @param string|Identifier $name Name + * + * @return Builder\EnumCase The created use const builder + */ + public function enumCase($name) : Builder\EnumCase { + return new Builder\EnumCase($name); + } + /** * Creates node a for a literal value. * @@ -311,7 +333,7 @@ public function new($class, array $args = []) : Expr\New_ { public function constFetch($name) : Expr\ConstFetch { return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); } - + /** * Creates a property fetch node. * diff --git a/test/PhpParser/Builder/EnumCaseTest.php b/test/PhpParser/Builder/EnumCaseTest.php new file mode 100644 index 0000000000..d88343cb77 --- /dev/null +++ b/test/PhpParser/Builder/EnumCaseTest.php @@ -0,0 +1,84 @@ +createEnumCaseBuilder('TEST') + ->setDocComment('/** Test */') + ->getNode(); + + $this->assertEquals( + new Stmt\EnumCase( + "TEST", + null, + [ + 'comments' => [new Comment\Doc('/** Test */')] + ] + ), + $node + ); + } + + public function testAddAttribute() { + $attribute = new Attribute( + new Name('Attr'), + [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + ); + $attributeGroup = new AttributeGroup([$attribute]); + + $node = $this->createEnumCaseBuilder('ATTR_GROUP') + ->addAttribute($attributeGroup) + ->getNode(); + + $this->assertEquals( + new Stmt\EnumCase( + "ATTR_GROUP", + null, + [], + [$attributeGroup] + ), + $node + ); + } + + /** + * @dataProvider provideTestDefaultValues + */ + public function testValues($value, $expectedValueNode) { + $node = $this->createEnumCaseBuilder('TEST') + ->setValue($value) + ->getNode() + ; + + $this->assertEquals($expectedValueNode, $node->expr); + } + + public function provideTestDefaultValues() { + return [ + [ + 31415, + new Scalar\LNumber(31415) + ], + [ + 'Hallo World', + new Scalar\String_('Hallo World') + ], + ]; + } +} diff --git a/test/PhpParser/Builder/EnumTest.php b/test/PhpParser/Builder/EnumTest.php new file mode 100644 index 0000000000..c472b2f47c --- /dev/null +++ b/test/PhpParser/Builder/EnumTest.php @@ -0,0 +1,159 @@ +createEnumBuilder('SomeEnum') + ->implement('Namespaced\SomeInterface', new Name('OtherInterface')) + ->getNode() + ; + + $this->assertEquals( + new Stmt\Enum_('SomeEnum', [ + 'implements' => [ + new Name('Namespaced\SomeInterface'), + new Name('OtherInterface'), + ], + ]), + $node + ); + } + + public function testSetScalarType() { + $node = $this->createEnumBuilder('Test') + ->setScalarType('int') + ->getNode() + ; + + $this->assertEquals( + new Stmt\Enum_('Test', [ + 'scalarType' => new Identifier('int'), + ]), + $node + ); + } + + public function testStatementOrder() { + $method = new Stmt\ClassMethod('testMethod'); + $enumCase = new Stmt\EnumCase( + 'TEST_ENUM_CASE' + ); + $const = new Stmt\ClassConst([ + new Node\Const_('TEST_CONST', new Node\Scalar\String_('ABC')) + ]); + $use = new Stmt\TraitUse([new Name('SomeTrait')]); + + $node = $this->createEnumBuilder('Test') + ->addStmt($method) + ->addStmt($enumCase) + ->addStmts([$const, $use]) + ->getNode() + ; + + $this->assertEquals( + new Stmt\Enum_('Test', [ + 'stmts' => [$use, $enumCase, $const, $method] + ]), + $node + ); + } + + public function testDocComment() { + $docComment = <<<'DOC' +/** + * Test + */ +DOC; + $enum = $this->createEnumBuilder('Test') + ->setDocComment($docComment) + ->getNode(); + + $this->assertEquals( + new Stmt\Enum_('Test', [], [ + 'comments' => [ + new Comment\Doc($docComment) + ] + ]), + $enum + ); + + $enum = $this->createEnumBuilder('Test') + ->setDocComment(new Comment\Doc($docComment)) + ->getNode(); + + $this->assertEquals( + new Stmt\Enum_('Test', [], [ + 'comments' => [ + new Comment\Doc($docComment) + ] + ]), + $enum + ); + } + + public function testAddAttribute() { + $attribute = new Attribute( + new Name('Attr'), + [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + ); + $attributeGroup = new AttributeGroup([$attribute]); + + $enum = $this->createEnumBuilder('ATTR_GROUP') + ->addAttribute($attributeGroup) + ->getNode(); + + $this->assertEquals( + new Stmt\Enum_('ATTR_GROUP', [ + 'attrGroups' => [ + $attributeGroup, + ] + ], []), + $enum + ); + } + + public function testInvalidStmtError() { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Unexpected node of type "Stmt_PropertyProperty"'); + $this->createEnumBuilder('Test') + ->addStmt(new Stmt\PropertyProperty('property')) + ; + } + + public function testInvalidDocComment() { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Doc comment must be a string or an instance of PhpParser\Comment\Doc'); + $this->createEnumBuilder('Test') + ->setDocComment(new Comment('Test')); + } + + public function testEmptyName() { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Name cannot be empty'); + $this->createEnumBuilder('Test') + ->implement(''); + } + + public function testInvalidName() { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Name must be a string or an instance of Node\Name'); + $this->createEnumBuilder('Test') + ->implement(['Foo']); + } +} diff --git a/test/PhpParser/BuilderFactoryTest.php b/test/PhpParser/BuilderFactoryTest.php index 1a57c9ecee..2748c2853f 100644 --- a/test/PhpParser/BuilderFactoryTest.php +++ b/test/PhpParser/BuilderFactoryTest.php @@ -27,6 +27,7 @@ public function provideTestFactory() { ['class', Builder\Class_::class], ['interface', Builder\Interface_::class], ['trait', Builder\Trait_::class], + ['enum', Builder\Enum_::class], ['method', Builder\Method::class], ['function', Builder\Function_::class], ['property', Builder\Property::class], @@ -34,6 +35,7 @@ public function provideTestFactory() { ['use', Builder\Use_::class], ['useFunction', Builder\Use_::class], ['useConst', Builder\Use_::class], + ['enumCase', Builder\EnumCase::class], ]; } From 6f1f206862721b20d8c642a26793f30f6ccc4e66 Mon Sep 17 00:00:00 2001 From: Hassan Tariq Date: Sun, 14 Nov 2021 02:18:12 +0500 Subject: [PATCH 051/428] Fix minor typo --- lib/PhpParser/Lexer/Emulative.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 5086f8ce27..5c56e026bb 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -37,7 +37,7 @@ class Emulative extends Lexer /** * @param mixed[] $options Lexer options. In addition to the usual options, * accepts a 'phpVersion' string that specifies the - * version to emulated. Defaults to newest supported. + * version to emulate. Defaults to newest supported. */ public function __construct(array $options = []) { From 4122ff3a91fe81ad094b7e0cdbf9231cb82e8262 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 14 Nov 2021 17:43:29 +0100 Subject: [PATCH 052/428] Make NullsafeMethodCall extend from CallLike --- lib/PhpParser/Node/Expr/NullsafeMethodCall.php | 17 +++++++++++------ test/code/parser/expr/firstClassCallables.test | 17 ++++++++++++++++- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/lib/PhpParser/Node/Expr/NullsafeMethodCall.php index 361e446227..07a571fd8f 100644 --- a/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +++ b/lib/PhpParser/Node/Expr/NullsafeMethodCall.php @@ -5,23 +5,24 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; +use PhpParser\Node\VariadicPlaceholder; -class NullsafeMethodCall extends Expr +class NullsafeMethodCall extends CallLike { /** @var Expr Variable holding object */ public $var; /** @var Identifier|Expr Method name */ public $name; - /** @var Arg[] Arguments */ + /** @var array Arguments */ public $args; /** * Constructs a nullsafe method call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param Arg[] $args Arguments - * @param array $attributes Additional attributes + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments + * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; @@ -37,4 +38,8 @@ public function getSubNodeNames() : array { public function getType() : string { return 'Expr_NullsafeMethodCall'; } + + public function getRawArgs(): array { + return $this->args; + } } diff --git a/test/code/parser/expr/firstClassCallables.test b/test/code/parser/expr/firstClassCallables.test index 1e15a98cfd..0b2ff3d0ca 100644 --- a/test/code/parser/expr/firstClassCallables.test +++ b/test/code/parser/expr/firstClassCallables.test @@ -7,6 +7,7 @@ A::foo(...); // These are invalid, but accepted on the parser level. new Foo(...); +$this?->foo(...); #[Foo(...)] function foo() {} @@ -75,7 +76,21 @@ array( 0: // These are invalid, but accepted on the parser level. ) ) - 4: Stmt_Function( + 4: Stmt_Expression( + expr: Expr_NullsafeMethodCall( + var: Expr_Variable( + name: this + ) + name: Identifier( + name: foo + ) + args: array( + 0: VariadicPlaceholder( + ) + ) + ) + ) + 5: Stmt_Function( attrGroups: array( 0: AttributeGroup( attrs: array( From 63f8699143326ebdf2f5fff97fa8195bc84dc0f2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 14 Nov 2021 17:44:47 +0100 Subject: [PATCH 053/428] Add CallLike test for NullsafeMethodCall --- test/PhpParser/Node/Expr/CallableLikeTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/PhpParser/Node/Expr/CallableLikeTest.php b/test/PhpParser/Node/Expr/CallableLikeTest.php index 0dfc19a840..43b3e9ecdd 100644 --- a/test/PhpParser/Node/Expr/CallableLikeTest.php +++ b/test/PhpParser/Node/Expr/CallableLikeTest.php @@ -29,8 +29,10 @@ public function provideTestIsFirstClassCallable() { [new StaticCall(new Name('Test'), 'test', $normalArgs), false], [new StaticCall(new Name('Test'), 'test', $callableArgs), true], [new New_(new Name('Test'), $normalArgs), false], + [new NullsafeMethodCall(new Variable('this'), 'test', $normalArgs), false], // This is not legal code, but accepted by the parser. [new New_(new Name('Test'), $callableArgs), true], + [new NullsafeMethodCall(new Variable('this'), 'test', $callableArgs), true], ]; } } \ No newline at end of file From 68d2a52b429fcbab2e041ae22eed3c15513720be Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 27 Nov 2021 20:53:55 +0100 Subject: [PATCH 054/428] Avoid creation of dynamic property in test This test requires a property that is not a subnode -- but it does not need to be dynamic, a declared property works just as well. --- test/PhpParser/NodeAbstractTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index e52479fac8..5fc23c8980 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -6,11 +6,13 @@ class DummyNode extends NodeAbstract { public $subNode1; public $subNode2; + public $notSubNode; - public function __construct($subNode1, $subNode2, $attributes) { + public function __construct($subNode1, $subNode2, $notSubNode, $attributes) { parent::__construct($attributes); $this->subNode1 = $subNode1; $this->subNode2 = $subNode2; + $this->notSubNode = $notSubNode; } public function getSubNodeNames() : array { @@ -40,8 +42,7 @@ public function provideNodes() { ], ]; - $node = new DummyNode('value1', 'value2', $attributes); - $node->notSubNode = 'value3'; + $node = new DummyNode('value1', 'value2', 'value3', $attributes); return [ [$attributes, $node], @@ -90,7 +91,7 @@ public function testGetDocComment(array $attributes, Node $node) { } public function testSetDocComment() { - $node = new DummyNode(null, null, []); + $node = new DummyNode(null, null, null, []); // Add doc comment to node without comments $docComment = new Comment\Doc('/** doc */'); From d4cb98ae381f45f3fa6dd5f01fb8b68c36615521 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 27 Nov 2021 20:57:41 +0100 Subject: [PATCH 055/428] Fix typo in property name This test was working on a dynamic "subNode" property, rather than an actual subnode (either subNode1 or subNode2). This test is generally not very valuable, I think it dates back to a time where __get()/__set() were used. --- test/PhpParser/NodeAbstractTest.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index 5fc23c8980..9057f571fb 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -121,19 +121,19 @@ public function testSetDocComment() { /** * @dataProvider provideNodes */ - public function testChange(array $attributes, Node $node) { + public function testChange(array $attributes, DummyNode $node) { // direct modification - $node->subNode = 'newValue'; - $this->assertSame('newValue', $node->subNode); + $node->subNode1 = 'newValue'; + $this->assertSame('newValue', $node->subNode1); // indirect modification - $subNode =& $node->subNode; + $subNode =& $node->subNode1; $subNode = 'newNewValue'; - $this->assertSame('newNewValue', $node->subNode); + $this->assertSame('newNewValue', $node->subNode1); // removal - unset($node->subNode); - $this->assertObjectNotHasAttribute('subNode', $node); + unset($node->subNode1); + $this->assertFalse(isset($node->subNode1)); } /** From f09f22760ef1b292c3312105532c8e84e80cce19 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 27 Nov 2021 21:02:58 +0100 Subject: [PATCH 056/428] Declare namespacedName property For historical reasons, this property is used by the NameResolver (in default mode). Declare it explicitly, rather than using a doc comment. --- lib/PhpParser/Node/Const_.php | 6 +++--- lib/PhpParser/Node/Stmt/ClassLike.php | 6 +++--- lib/PhpParser/Node/Stmt/Function_.php | 6 +++--- test/PhpParser/NodeAbstractTest.php | 4 +++- test/PhpParser/NodeVisitor/NameResolverTest.php | 4 ++-- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/PhpParser/Node/Const_.php b/lib/PhpParser/Node/Const_.php index 789a426552..b69eb16fa7 100644 --- a/lib/PhpParser/Node/Const_.php +++ b/lib/PhpParser/Node/Const_.php @@ -4,9 +4,6 @@ use PhpParser\NodeAbstract; -/** - * @property Name $namespacedName Namespaced name (for global constants, if using NameResolver) - */ class Const_ extends NodeAbstract { /** @var Identifier Name */ @@ -14,6 +11,9 @@ class Const_ extends NodeAbstract /** @var Expr Value */ public $value; + /** @var Name Namespaced name (if using NameResolver) */ + public $namespacedName; + /** * Constructs a const node for use in class const and const statements. * diff --git a/lib/PhpParser/Node/Stmt/ClassLike.php b/lib/PhpParser/Node/Stmt/ClassLike.php index 840c4f67ec..6c3369172f 100644 --- a/lib/PhpParser/Node/Stmt/ClassLike.php +++ b/lib/PhpParser/Node/Stmt/ClassLike.php @@ -4,9 +4,6 @@ use PhpParser\Node; -/** - * @property Node\Name $namespacedName Namespaced name (if using NameResolver) - */ abstract class ClassLike extends Node\Stmt { /** @var Node\Identifier|null Name */ @@ -16,6 +13,9 @@ abstract class ClassLike extends Node\Stmt /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; + /** @var Node\Name Namespaced name (if using NameResolver) */ + public $namespacedName; + /** * @return TraitUse[] */ diff --git a/lib/PhpParser/Node/Stmt/Function_.php b/lib/PhpParser/Node/Stmt/Function_.php index 3fa24f4931..abb7ee5c8e 100644 --- a/lib/PhpParser/Node/Stmt/Function_.php +++ b/lib/PhpParser/Node/Stmt/Function_.php @@ -5,9 +5,6 @@ use PhpParser\Node; use PhpParser\Node\FunctionLike; -/** - * @property Node\Name $namespacedName Namespaced name (if using NameResolver) - */ class Function_ extends Node\Stmt implements FunctionLike { /** @var bool Whether function returns by reference */ @@ -23,6 +20,9 @@ class Function_ extends Node\Stmt implements FunctionLike /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; + /** @var Node\Name Namespaced name (if using NameResolver) */ + public $namespacedName; + /** * Constructs a function node. * diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index 9057f571fb..3553c4c87b 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -306,6 +306,7 @@ function functionName(&$a = 0, $b = 1.0) { } ], "attrGroups": [], + "namespacedName": null, "attributes": { "startLine": 4, "comments": [ @@ -454,7 +455,8 @@ function functionName(&$a = 0, $b = 1.0) { ] } ], - "attrGroups": [] + "attrGroups": [], + "namespacedName": null } ] JSON; diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index d14402b9a5..b5035ce3fe 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -353,7 +353,7 @@ public function testAddDeclarationNamespacedName() { $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); + $this->assertNull($stmts[0]->stmts[5]->class->namespacedName); $this->assertSame('NS\\F', (string) $stmts[0]->stmts[6]->namespacedName); $stmts = $traverser->traverse([new Stmt\Namespace_(null, $nsStmts)]); @@ -362,7 +362,7 @@ public function testAddDeclarationNamespacedName() { $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); + $this->assertNull($stmts[0]->stmts[5]->class->namespacedName); $this->assertSame('F', (string) $stmts[0]->stmts[6]->namespacedName); } From 210577fe3cf7badcc5814d99455df46564f3c077 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 30 Nov 2021 20:35:08 +0100 Subject: [PATCH 057/428] Release PHP-Parser 4.13.2 --- CHANGELOG.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a014c2ea8c..dd543ab21e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,21 @@ -Version 4.13.2-dev +Version 4.13.3-dev ------------------ Nothing yet. +Version 4.13.2 (2021-11-30) +--------------------------- + +### Added + +* Added builders for enums and enum cases. + +### Fixed + +* NullsafeMethodCall now extends from CallLike. +* The `namespacedName` property populated by the `NameResolver` is now declared on relevant nodes, + to avoid a dynamic property deprecation warning with PHP 8.2. + Version 4.13.1 (2021-11-03) --------------------------- From f4b835f7d858d90b58c6d965a7d0f87d2ba57c43 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Mon, 6 Dec 2021 21:21:44 +0100 Subject: [PATCH 058/428] Fix PHPDoc type of namespacedName properties --- lib/PhpParser/Node/Const_.php | 4 ++-- lib/PhpParser/Node/Stmt/ClassLike.php | 2 +- lib/PhpParser/Node/Stmt/Function_.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/PhpParser/Node/Const_.php b/lib/PhpParser/Node/Const_.php index b69eb16fa7..07a74df80e 100644 --- a/lib/PhpParser/Node/Const_.php +++ b/lib/PhpParser/Node/Const_.php @@ -11,7 +11,7 @@ class Const_ extends NodeAbstract /** @var Expr Value */ public $value; - /** @var Name Namespaced name (if using NameResolver) */ + /** @var Name|null Namespaced name (if using NameResolver) */ public $namespacedName; /** @@ -30,7 +30,7 @@ public function __construct($name, Expr $value, array $attributes = []) { public function getSubNodeNames() : array { return ['name', 'value']; } - + public function getType() : string { return 'Const'; } diff --git a/lib/PhpParser/Node/Stmt/ClassLike.php b/lib/PhpParser/Node/Stmt/ClassLike.php index 6c3369172f..2fa4e861b3 100644 --- a/lib/PhpParser/Node/Stmt/ClassLike.php +++ b/lib/PhpParser/Node/Stmt/ClassLike.php @@ -13,7 +13,7 @@ abstract class ClassLike extends Node\Stmt /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; - /** @var Node\Name Namespaced name (if using NameResolver) */ + /** @var Node\Name|null Namespaced name (if using NameResolver) */ public $namespacedName; /** diff --git a/lib/PhpParser/Node/Stmt/Function_.php b/lib/PhpParser/Node/Stmt/Function_.php index abb7ee5c8e..c2ccae24ee 100644 --- a/lib/PhpParser/Node/Stmt/Function_.php +++ b/lib/PhpParser/Node/Stmt/Function_.php @@ -20,7 +20,7 @@ class Function_ extends Node\Stmt implements FunctionLike /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; - /** @var Node\Name Namespaced name (if using NameResolver) */ + /** @var Node\Name|null Namespaced name (if using NameResolver) */ public $namespacedName; /** From a6e34665fd6a2bcefc924cb5fd73788767ae510e Mon Sep 17 00:00:00 2001 From: Marijn van Wezel <96489967+marijnvanwezel@users.noreply.github.com> Date: Mon, 3 Jan 2022 20:57:41 +0100 Subject: [PATCH 059/428] Reflect support for PHP 8.1 in the README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e5b26bf5c2..708cdfcbd7 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ 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 8.0 parser written in PHP. Its purpose is to simplify static code analysis and +This is a PHP 5.2 to PHP 8.1 parser written in PHP. Its purpose is to simplify static code analysis and manipulation. -[**Documentation for version 4.x**][doc_master] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.0). +[**Documentation for version 4.x**][doc_master] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.1). [Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2). From d3eb10aca133133cd3b422dfc84757e3e513e58c Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 15 May 2022 18:09:05 +0200 Subject: [PATCH 060/428] [LNumber] Add rawValue attribute to LNumber to allow numeric separator etc. (#832) --- lib/PhpParser/Node/Scalar/LNumber.php | 4 +++- test/PhpParser/Node/Scalar/NumberTest.php | 26 +++++++++++++++++++++++ test/PhpParser/NodeAbstractTest.php | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 test/PhpParser/Node/Scalar/NumberTest.php diff --git a/lib/PhpParser/Node/Scalar/LNumber.php b/lib/PhpParser/Node/Scalar/LNumber.php index f17dd1f8a2..2cc2b22c8e 100644 --- a/lib/PhpParser/Node/Scalar/LNumber.php +++ b/lib/PhpParser/Node/Scalar/LNumber.php @@ -41,6 +41,8 @@ public function getSubNodeNames() : array { * @return LNumber The constructed LNumber, including kind attribute */ public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false) : LNumber { + $attributes['rawValue'] = $str; + $str = str_replace('_', '', $str); if ('0' !== $str[0] || '0' === $str) { @@ -71,7 +73,7 @@ public static function fromString(string $str, array $attributes = [], bool $all $attributes['kind'] = LNumber::KIND_OCT; return new LNumber(intval($str, 8), $attributes); } - + public function getType() : string { return 'Scalar_LNumber'; } diff --git a/test/PhpParser/Node/Scalar/NumberTest.php b/test/PhpParser/Node/Scalar/NumberTest.php new file mode 100644 index 0000000000..5e78a53563 --- /dev/null +++ b/test/PhpParser/Node/Scalar/NumberTest.php @@ -0,0 +1,26 @@ +create(ParserFactory::PREFER_PHP7); + $nodes = $parser->parse('assertInstanceOf(Echo_::class, $echo); + + /** @var Echo_ $echo */ + $lLumber = $echo->exprs[0]; + $this->assertInstanceOf(LNumber::class, $lLumber); + + /** @var LNumber $lnumber */ + $this->assertSame(1234, $lLumber->value); + $this->assertSame('1_234', $lLumber->getAttribute('rawValue')); + } +} diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index 3553c4c87b..fbe04c354d 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -245,6 +245,7 @@ function functionName(&$a = 0, $b = 1.0) { "attributes": { "startLine": 4, "endLine": 4, + "rawValue": "0", "kind": 10 } }, @@ -398,6 +399,7 @@ function functionName(&$a = 0, $b = 1.0) { "attributes": { "startLine": 4, "endLine": 4, + "rawValue": "0", "kind": 10 }, "value": 0 From 3bf0082455cd6457453f6caaf25072684131448f Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 15 May 2022 18:12:28 +0200 Subject: [PATCH 061/428] [DNumber] Add rawValue attribute to hold the original value (#833) --- grammar/php5.y | 2 +- grammar/php7.y | 2 +- lib/PhpParser/Node/Scalar/DNumber.php | 13 ++++++++++- lib/PhpParser/Parser/Php5.php | 2 +- lib/PhpParser/Parser/Php7.php | 2 +- test/PhpParser/Node/Scalar/DNumberTest.php | 27 ++++++++++++++++++++++ test/PhpParser/NodeAbstractTest.php | 6 +++-- 7 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 test/PhpParser/Node/Scalar/DNumberTest.php diff --git a/grammar/php5.y b/grammar/php5.y index f9e7e7dd16..927762b450 100644 --- a/grammar/php5.y +++ b/grammar/php5.y @@ -793,7 +793,7 @@ ctor_arguments: common_scalar: T_LNUMBER { $$ = $this->parseLNumber($1, attributes(), true); } - | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; } + | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); } | T_CONSTANT_ENCAPSED_STRING { $attrs = attributes(); $attrs['kind'] = strKind($1); $$ = new Scalar\String_(Scalar\String_::parse($1, false), $attrs); } diff --git a/grammar/php7.y b/grammar/php7.y index eac68d095a..379581f6a0 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -1024,7 +1024,7 @@ dereferencable_scalar: scalar: T_LNUMBER { $$ = $this->parseLNumber($1, attributes()); } - | T_DNUMBER { $$ = Scalar\DNumber[Scalar\DNumber::parse($1)]; } + | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); } | dereferencable_scalar { $$ = $1; } | constant { $$ = $1; } | class_constant { $$ = $1; } diff --git a/lib/PhpParser/Node/Scalar/DNumber.php b/lib/PhpParser/Node/Scalar/DNumber.php index 29ce0dd401..d4796d65bb 100644 --- a/lib/PhpParser/Node/Scalar/DNumber.php +++ b/lib/PhpParser/Node/Scalar/DNumber.php @@ -24,6 +24,17 @@ public function getSubNodeNames() : array { return ['value']; } + /** + * @param mixed[] $attributes + */ + public static function fromString(string $str, array $attributes = []): DNumber + { + $attributes['rawValue'] = $str; + $float = self::parse($str); + + return new DNumber($float, $attributes); + } + /** * @internal * @@ -63,7 +74,7 @@ public static function parse(string $str) : float { // dec return (float) $str; } - + public function getType() : string { return 'Scalar_DNumber'; } diff --git a/lib/PhpParser/Parser/Php5.php b/lib/PhpParser/Parser/Php5.php index c62adfd2ce..9ab8d6b9bd 100644 --- a/lib/PhpParser/Parser/Php5.php +++ b/lib/PhpParser/Parser/Php5.php @@ -2275,7 +2275,7 @@ protected function initReduceCallbacks() { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true); }, 434 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 435 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 7a0854b306..4eb291ea5f 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2554,7 +2554,7 @@ protected function initReduceCallbacks() { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 515 => function ($stackPos) { - $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 516 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; diff --git a/test/PhpParser/Node/Scalar/DNumberTest.php b/test/PhpParser/Node/Scalar/DNumberTest.php new file mode 100644 index 0000000000..b3e7c76a3c --- /dev/null +++ b/test/PhpParser/Node/Scalar/DNumberTest.php @@ -0,0 +1,27 @@ +create(ParserFactory::PREFER_PHP7); + $nodes = $parser->parse('assertInstanceOf(Echo_::class, $echo); + + /** @var Echo_ $echo */ + $lLumber = $echo->exprs[0]; + $this->assertInstanceOf(DNumber::class, $lLumber); + + /** @var DNumber $dnumber */ + $this->assertSame(1234.56, $lLumber->value); + $this->assertSame('1_234.56', $lLumber->getAttribute('rawValue')); + } +} diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index fbe04c354d..902a7436a9 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -274,7 +274,8 @@ function functionName(&$a = 0, $b = 1.0) { "value": 1, "attributes": { "startLine": 4, - "endLine": 4 + "endLine": 4, + "rawValue": "1.0" } }, "flags": 0, @@ -428,7 +429,8 @@ function functionName(&$a = 0, $b = 1.0) { "nodeType": "Scalar_DNumber", "attributes": { "startLine": 4, - "endLine": 4 + "endLine": 4, + "rawValue": "1.0" }, "value": 1 }, From 5d83adcc0ea1084491a6a2028a4a61bfddf946a2 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 15 May 2022 23:04:59 +0200 Subject: [PATCH 062/428] [String_] Add rawValue attribute (#831) --- grammar/php5.y | 8 ++------ grammar/php7.y | 4 +--- grammar/phpyLang.php | 8 -------- lib/PhpParser/Node/Scalar/String_.php | 16 ++++++++++++++++ lib/PhpParser/Parser/Php5.php | 6 ++---- lib/PhpParser/Parser/Php7.php | 3 +-- test/PhpParser/Node/Scalar/StringTest.php | 20 ++++++++++++++++++++ test/PhpParser/NodeAbstractTest.php | 6 ++++-- 8 files changed, 46 insertions(+), 25 deletions(-) diff --git a/grammar/php5.y b/grammar/php5.y index 927762b450..a62e9a310c 100644 --- a/grammar/php5.y +++ b/grammar/php5.y @@ -689,9 +689,7 @@ array_expr: 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]; } + | T_CONSTANT_ENCAPSED_STRING '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[Scalar\String_::fromString($1, attributes()), $3]; } | constant '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } | scalar_dereference '[' dim_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } /* alternative array syntax missing intentionally */ @@ -794,9 +792,7 @@ ctor_arguments: common_scalar: T_LNUMBER { $$ = $this->parseLNumber($1, attributes(), true); } | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); } - | T_CONSTANT_ENCAPSED_STRING - { $attrs = attributes(); $attrs['kind'] = strKind($1); - $$ = new Scalar\String_(Scalar\String_::parse($1, false), $attrs); } + | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes(), false); } | T_LINE { $$ = Scalar\MagicConst\Line[]; } | T_FILE { $$ = Scalar\MagicConst\File[]; } | T_DIR { $$ = Scalar\MagicConst\Dir[]; } diff --git a/grammar/php7.y b/grammar/php7.y index 379581f6a0..665ad5efa7 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -1014,9 +1014,7 @@ dereferencable_scalar: { $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); } + | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes()); } | '"' encaps_list '"' { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); } diff --git a/grammar/phpyLang.php b/grammar/phpyLang.php index 1a9808dcf5..663c2a144c 100644 --- a/grammar/phpyLang.php +++ b/grammar/phpyLang.php @@ -128,14 +128,6 @@ function($matches) { . ' 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 ('prependLeadingComments' === $name) { assertArgs(1, $args, $name); diff --git a/lib/PhpParser/Node/Scalar/String_.php b/lib/PhpParser/Node/Scalar/String_.php index 8a6d93a474..6690a16bfb 100644 --- a/lib/PhpParser/Node/Scalar/String_.php +++ b/lib/PhpParser/Node/Scalar/String_.php @@ -42,6 +42,22 @@ public function getSubNodeNames() : array { return ['value']; } + /** + * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes + */ + public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self + { + $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B'))) + ? Scalar\String_::KIND_SINGLE_QUOTED + : Scalar\String_::KIND_DOUBLE_QUOTED; + + $attributes['rawValue'] = $str; + + $string = self::parse($str, $parseUnicodeEscape); + + return new self($string, $attributes); + } + /** * @internal * diff --git a/lib/PhpParser/Parser/Php5.php b/lib/PhpParser/Parser/Php5.php index 9ab8d6b9bd..d9c8fe0494 100644 --- a/lib/PhpParser/Parser/Php5.php +++ b/lib/PhpParser/Parser/Php5.php @@ -2147,8 +2147,7 @@ protected function initReduceCallbacks() { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 392 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(4-1)][0] === "'" || ($this->semStack[$stackPos-(4-1)][1] === "'" && ($this->semStack[$stackPos-(4-1)][0] === 'b' || $this->semStack[$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[$stackPos-(4-1)]), $attrs), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch(Scalar\String_::fromString($this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 393 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); @@ -2278,8 +2277,7 @@ protected function initReduceCallbacks() { $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 435 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)], false), $attrs); + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, false); }, 436 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 4eb291ea5f..d469fac523 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2543,8 +2543,7 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 512 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$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[$stackPos-(1-1)]), $attrs); + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 513 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; diff --git a/test/PhpParser/Node/Scalar/StringTest.php b/test/PhpParser/Node/Scalar/StringTest.php index 814a7758fc..18ba50c2fa 100644 --- a/test/PhpParser/Node/Scalar/StringTest.php +++ b/test/PhpParser/Node/Scalar/StringTest.php @@ -2,8 +2,28 @@ namespace PhpParser\Node\Scalar; +use PhpParser\Node\Stmt\Echo_; +use PhpParser\ParserFactory; + class StringTest extends \PHPUnit\Framework\TestCase { + public function testRawValue() + { + $parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7); + $nodes = $parser->parse('assertInstanceOf(Echo_::class, $echo); + + /** @var Echo_ $echo */ + $string = $echo->exprs[0]; + $this->assertInstanceOf(String_::class, $string); + + /** @var String_ $string */ + $this->assertSame('sequence A', $string->value); + $this->assertSame('"sequence \\x41"', $string->getAttribute('rawValue')); + } + /** * @dataProvider provideTestParseEscapeSequences */ diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index 902a7436a9..b4d53d8d15 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -297,7 +297,8 @@ function functionName(&$a = 0, $b = 1.0) { "attributes": { "startLine": 5, "endLine": 5, - "kind": 1 + "kind": 1, + "rawValue": "'Foo'" } } ], @@ -452,7 +453,8 @@ function functionName(&$a = 0, $b = 1.0) { "attributes": { "startLine": 5, "endLine": 5, - "kind": 1 + "kind": 1, + "rawValue": "'Foo'" }, "value": "Foo" } From 678ccbe0720549c51d30b76d094a117eac819e9e Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 15 May 2022 23:19:31 +0200 Subject: [PATCH 063/428] [PHP 8.2] Add readonly class support (#834) RFC: https://wiki.php.net/rfc/readonly_classes PHP implementation: php/php-src#7305 --- grammar/php7.y | 14 +- lib/PhpParser/Builder/Class_.php | 10 +- lib/PhpParser/BuilderHelpers.php | 9 + lib/PhpParser/Node/Stmt/Class_.php | 25 + lib/PhpParser/Parser/Php7.php | 1862 +++++++++-------- lib/PhpParser/ParserAbstract.php | 9 + test/PhpParser/Builder/ClassTest.php | 14 + test/code/parser/errorHandling/recovery.test | 2 +- .../stmt/class/constModifierErrors.test | 2 +- test/code/parser/stmt/class/modifier.test | 32 +- test/code/parser/stmt/class/readonly.test | 68 + .../prettyPrinter/stmt/readonly_class.test | 12 + 12 files changed, 1130 insertions(+), 929 deletions(-) create mode 100644 test/code/parser/stmt/class/readonly.test create mode 100644 test/code/prettyPrinter/stmt/readonly_class.test diff --git a/grammar/php7.y b/grammar/php7.y index 665ad5efa7..087bc7392e 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -382,8 +382,18 @@ enum_case_expr: class_entry_type: T_CLASS { $$ = 0; } - | T_ABSTRACT T_CLASS { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } - | T_FINAL T_CLASS { $$ = Stmt\Class_::MODIFIER_FINAL; } + | class_modifiers T_CLASS { $$ = $1; } +; + +class_modifiers: + class_modifier { $$ = $1; } + | class_modifiers class_modifier { $this->checkClassModifier($1, $2, #2); $$ = $1 | $2; } +; + +class_modifier: + T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } + | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; } + | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } ; extends_from: diff --git a/lib/PhpParser/Builder/Class_.php b/lib/PhpParser/Builder/Class_.php index 87e2901a9a..35b54d0418 100644 --- a/lib/PhpParser/Builder/Class_.php +++ b/lib/PhpParser/Builder/Class_.php @@ -67,7 +67,7 @@ public function implement(...$interfaces) { * @return $this The builder instance (for fluid interface) */ public function makeAbstract() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); return $this; } @@ -78,7 +78,13 @@ public function makeAbstract() { * @return $this The builder instance (for fluid interface) */ public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + + return $this; + } + + public function makeReadonly() { + $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_READONLY); return $this; } diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index 2f0e912739..b8839db322 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -310,4 +310,13 @@ public static function addModifier(int $modifiers, int $modifier) : int { Stmt\Class_::verifyModifier($modifiers, $modifier); return $modifiers | $modifier; } + + /** + * Adds a modifier and returns new modifier bitmask. + * @return int New modifiers + */ + public static function addClassModifier(int $existingModifiers, int $modifierToSet) : int { + Stmt\Class_::verifyClassModifier($existingModifiers, $modifierToSet); + return $existingModifiers | $modifierToSet; + } } diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index b290aaf6df..52ed6c6cd6 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -68,6 +68,10 @@ public function isFinal() : bool { return (bool) ($this->flags & self::MODIFIER_FINAL); } + public function isReadonly() : bool { + return (bool) ($this->flags & self::MODIFIER_READONLY); + } + /** * Whether the class is anonymous. * @@ -77,6 +81,27 @@ public function isAnonymous() : bool { return null === $this->name; } + /** + * @internal + */ + public static function verifyClassModifier($a, $b) { + if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) { + throw new Error('Multiple abstract modifiers are not allowed'); + } + + if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) { + throw new Error('Multiple final modifiers are not allowed'); + } + + if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) { + throw new Error('Multiple readonly modifiers are not allowed'); + } + + if ($a & 48 && $b & 48) { + throw new Error('Cannot use the final modifier on an abstract class'); + } + } + /** * @internal */ diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index d469fac523..71ba0187ee 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -18,16 +18,16 @@ class Php7 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1196; - protected $gotoTableSize = 545; + protected $actionTableSize = 1189; + protected $gotoTableSize = 611; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 420; - protected $numNonLeafStates = 710; + protected $YY2TBLSTATE = 421; + protected $numNonLeafStates = 709; protected $symbolToName = array( "EOF", @@ -244,153 +244,152 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $action = array( - 132, 133, 134, 569, 135, 136, 0, 722, 723, 724, - 137, 37, 834, 911, 835, 469,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 101, 102, 103, 104, 105, 1068, 1069, - 1070, 1067, 1066, 1065, 1071, 716, 715,-32766,-32766,-32766, + 132, 133, 134, 568, 135, 136, 0, 721, 722, 723, + 137, 37, 921, 448, 449, 450,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 101, 102, 103, 104, 105, 1071, 1072, + 1073, 1070, 1069, 1068, 1074, 715, 714,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 545, 546,-32766,-32766, 725,-32766,-32766,-32766, 998, - 999, 806, 922, 447, 448, 449, 370, 371, 2, 267, - 138, 396, 729, 730, 731, 732, 414,-32766, 420,-32766, - -32766,-32766,-32766,-32766, 990, 733, 734, 735, 736, 737, - 738, 739, 740, 741, 742, 743, 763, 570, 764, 765, - 766, 767, 755, 756, 336, 337, 758, 759, 744, 745, - 746, 748, 749, 750, 346, 790, 791, 792, 793, 794, - 795, 751, 752, 571, 572, 784, 775, 773, 774, 787, - 770, 771, 283, 420, 573, 574, 769, 575, 576, 577, - 578, 579, 580, 598, -575, 470, 14, 798, 772, 581, - 582, -575, 139,-32766,-32766,-32766, 132, 133, 134, 569, - 135, 136, 1017, 722, 723, 724, 137, 37, 1060,-32766, - -32766,-32766, 1303, 696,-32766, 1304,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 1068, 1069, 1070, 1067, 1066, 1065, 1071, - -32766, 716, 715, 372, 371, 1258,-32766,-32766,-32766, -572, - 106, 107, 108, 414, 270, 891, -572, 240, 1193, 1192, - 1194, 725,-32766,-32766,-32766, 1046, 109,-32766,-32766,-32766, - -32766, 986, 985, 984, 987, 267, 138, 396, 729, 730, - 731, 732, 12,-32766, 420,-32766,-32766,-32766,-32766, 998, - 999, 733, 734, 735, 736, 737, 738, 739, 740, 741, - 742, 743, 763, 570, 764, 765, 766, 767, 755, 756, - 336, 337, 758, 759, 744, 745, 746, 748, 749, 750, - 346, 790, 791, 792, 793, 794, 795, 751, 752, 571, - 572, 784, 775, 773, 774, 787, 770, 771, 881, 321, - 573, 574, 769, 575, 576, 577, 578, 579, 580,-32766, - 82, 83, 84, -575, 772, 581, 582, -575, 148, 747, - 717, 718, 719, 720, 721, 1278, 722, 723, 724, 760, - 761, 36, 1277, 85, 86, 87, 88, 89, 90, 91, + -32767, 371, 372, 240, 2, 724,-32766,-32766,-32766, 1001, + 1002, 415, 956,-32766,-32766,-32766, 373, 372, 12, 267, + 138, 397, 728, 729, 730, 731, 415,-32766, 421,-32766, + -32766,-32766,-32766,-32766,-32766, 732, 733, 734, 735, 736, + 737, 738, 739, 740, 741, 742, 762, 569, 763, 764, + 765, 766, 754, 755, 337, 338, 757, 758, 743, 744, + 745, 747, 748, 749, 347, 789, 790, 791, 792, 793, + 794, 750, 751, 570, 571, 783, 774, 772, 773, 786, + 769, 770, 284, 421, 572, 573, 768, 574, 575, 576, + 577, 578, 579, 597, -579,-32766,-32766, 797, 771, 580, + 581, -579, 139,-32766,-32766,-32766, 132, 133, 134, 568, + 135, 136, 1020, 721, 722, 723, 137, 37,-32766,-32766, + -32766, 542, 1306, 126,-32766, 1307,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 1071, 1072, 1073, 1070, 1069, 1068, 1074, + 957, 715, 714, -318, 993, 1261,-32766,-32766,-32766, -576, + 106, 107, 108, -268, 270, 890, -576, 910, 1196, 1195, + 1197, 724,-32766,-32766,-32766, 1049, 109,-32766,-32766,-32766, + -32766, 989, 988, 987, 990, 267, 138, 397, 728, 729, + 730, 731, 1233,-32766, 421,-32766,-32766,-32766,-32766, 1001, + 1002, 732, 733, 734, 735, 736, 737, 738, 739, 740, + 741, 742, 762, 569, 763, 764, 765, 766, 754, 755, + 337, 338, 757, 758, 743, 744, 745, 747, 748, 749, + 347, 789, 790, 791, 792, 793, 794, 750, 751, 570, + 571, 783, 774, 772, 773, 786, 769, 770, 880, 321, + 572, 573, 768, 574, 575, 576, 577, 578, 579,-32766, + 82, 83, 84, -579, 771, 580, 581, -579, 148, 746, + 716, 717, 718, 719, 720, 1281, 721, 722, 723, 759, + 760, 36, 1280, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 996, 270, 150, - -32766,-32766,-32766, 455, 456, 81, 34, -264, -572, 1016, - 109, 320, -572, 893, 725, 682, 803, 128, 998, 999, - 592,-32766, 1044,-32766,-32766,-32766, 809, 151, 726, 727, - 728, 729, 730, 731, 732, -88, 1198, 796, 278, -526, - 283,-32766,-32766,-32766, 733, 734, 735, 736, 737, 738, - 739, 740, 741, 742, 743, 763, 786, 764, 765, 766, - 767, 755, 756, 757, 785, 758, 759, 744, 745, 746, - 748, 749, 750, 789, 790, 791, 792, 793, 794, 795, - 751, 752, 753, 754, 784, 775, 773, 774, 787, 770, - 771, 144, 804, 762, 768, 769, 776, 777, 779, 778, - 780, 781, -314, -526, -526, -193, -192, 772, 783, 782, - 49, 50, 51, 500, 52, 53, 239, 807, -526, -86, - 54, 55, -111, 56, 996, 253,-32766, -111, 800, -111, - -526, 541, -532, -352, 300, -352, 304, -111, -111, -111, - -111, -111, -111, -111, -111, 998, 999, 998, 999, 153, - -32766,-32766,-32766, 1191, 807, 126, 306, 1293, 57, 58, - 103, 104, 105, -111, 59, 1218, 60, 246, 247, 61, - 62, 63, 64, 65, 66, 67, 68, -525, 27, 268, - 69, 436, 501, -328, 808, -86, 1224, 1225, 502, 1189, - 807, 1198, 1230, 293, 1222, 41, 24, 503, 74, 504, - 953, 505, 320, 506, 802, 154, 507, 508, 279, 684, - 280, 43, 44, 437, 367, 366, 891, 45, 509, 35, - 249, -16, -566, 358, 332, 318, -566, 1198, 1193, 1192, - 1194, -527, 510, 511, 512, 333, -524, 1274, 48, 716, - 715, -525, -525, 334, 513, 514, 807, 1212, 1213, 1214, - 1215, 1209, 1210, 292, 360, 284, -525, 285, -314, 1216, - 1211, -193, -192, 1193, 1192, 1194, 293, 891, -525, 364, - -531, 70, 807, 316, 317, 320, 31, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - -153, -153, -153, 638, 25, -527, -527, 687, 379, 881, - -524, -524, 296, 297, 891, -153, 432, -153, 807, -153, - -527, -153, 716, 715, 433, -524, 798, 363, -111, 1105, - 1107, 365, -527, 434, 891, 140, 435, -524, 954, 127, - -524, 320, -111, -111, 688, 813, 381, -529, 11, 834, - 155, 835, 867, -111, -111, -111, -111, 47, 293,-32766, - 881, 654, 655, 74, 689, 1191, 1045, 320, 708, 149, - 399, 157,-32766,-32766,-32766, 32,-32766, -79,-32766, 123, - -32766, 716, 715,-32766, 893, 891, 682, -153,-32766,-32766, - -32766, 716, 715, 891,-32766,-32766, 124, 881, 129, 74, - -32766, 411, 130, 320, -524, -524, 143, 141, -75,-32766, - 158, -529, -529, 320, 27, 691, 159, 881, 160, -524, - 161, 294, 295, 698, 368, 369, 807, -73,-32766, -72, - 1222, -524, 373, 374, 1191, 893, -71, 682, -529, 73, - -70,-32766,-32766,-32766, -69,-32766, -68,-32766, 125,-32766, - 630, 631,-32766, -67, -66, -47, -51,-32766,-32766,-32766, - -18, 147, 271,-32766,-32766, 277, 697, 700, 881,-32766, - 411, 890, 893, 146, 682, 282, 881, 907,-32766, 281, - 513, 514, 286, 1212, 1213, 1214, 1215, 1209, 1210, 326, - 131, 145, 939, 287, 682, 1216, 1211, 109, 270,-32766, - 798, 807,-32766, 662, 639, 1191, 657, 72, 675, 1075, - 317, 320,-32766,-32766,-32766, 1305,-32766, 301,-32766, 628, - -32766, 431, 543,-32766,-32766, 923, 555, 924,-32766,-32766, - -32766, 1229, 549,-32766,-32766,-32766, -4, 891, -490, 1191, - -32766, 411, 644, 893, 299, 682,-32766,-32766,-32766,-32766, - -32766, 893,-32766, 682,-32766, 13, 1231,-32766, 452, 480, - 645, 909,-32766,-32766,-32766,-32766, 658, -480,-32766,-32766, - 0, 1191, 0, 0,-32766, 411, 0, 298,-32766,-32766, - -32766, 305,-32766,-32766,-32766, 0,-32766, 0, 806,-32766, - 0, 0, 0, 475,-32766,-32766,-32766,-32766, 0, 7, - -32766,-32766, 16, 1191, 561, 596,-32766, 411, 1219, 891, - -32766,-32766,-32766, 362,-32766,-32766,-32766, 818,-32766, -267, - 881,-32766, 39, 293, 0, 0,-32766,-32766,-32766, 40, - 705, 706,-32766,-32766, 872, 963, 940, 947,-32766, 411, - 937, 948, 365, 870, 427, 891, 935,-32766, 1049, 291, - 1244, 1052, 1053, -111, -111, 1050, 1051, 1057, -560, 1262, - 1296, 633, 0, 826, -111, -111, -111, -111, 33, 315, - -32766, 361, 683, 686, 690, 692, 1191, 693, 694, 695, - 699, 685, 320,-32766,-32766,-32766, 9,-32766, 702,-32766, - 868,-32766, 881, 1300,-32766, 893, 1302, 682, -4,-32766, - -32766,-32766, 829, 828, 837,-32766,-32766, 916, -242, -242, - -242,-32766, 411, 955, 365, 27, 836, 1301, 915, 917, - -32766, 914, 1177, 900, 910, -111, -111, 807, 881, 898, - 945, 1222, 946, 1299, 1256, 867, -111, -111, -111, -111, - 1245, 1263, 1269, 1272, -241, -241, -241, -558, -532, -531, - 365, -530, 1, 28, 29, 38, 42, 46, 71, 0, - 75, -111, -111, 76, 77, 78, 79, 893, 80, 682, - -242, 867, -111, -111, -111, -111, 142, 152, 156, 245, - 322, 347, 514, 348, 1212, 1213, 1214, 1215, 1209, 1210, - 349, 350, 351, 352, 353, 354, 1216, 1211, 355, 356, - 357, 359, 428, 893, -265, 682, -241, -264, 72, 0, - 18, 317, 320, 19, 20, 21, 23, 398, 471, 472, - 479, 482, 483, 484, 485, 489, 490, 491, 498, 669, - 1202, 1145, 1220, 1019, 1018, 1181, -269, -103, 17, 22, - 26, 290, 397, 589, 593, 620, 674, 1149, 1197, 1146, - 1275, 0, -494, 1162, 0, 1223 + 102, 103, 104, 105, 106, 107, 108, 999, 270, -318, + -32766,-32766,-32766, 456, 457, 81, -193, 808, -576, 1019, + 109, 320, -576, 892, 724, 681, 802, 695, 1001, 1002, + 591,-32766, 1047,-32766,-32766,-32766, 715, 714, 725, 726, + 727, 728, 729, 730, 731, -192, -86, 795, 279, -530, + 284,-32766,-32766,-32766, 732, 733, 734, 735, 736, 737, + 738, 739, 740, 741, 742, 762, 785, 763, 764, 765, + 766, 754, 755, 756, 784, 757, 758, 743, 744, 745, + 747, 748, 749, 788, 789, 790, 791, 792, 793, 794, + 750, 751, 752, 753, 783, 774, 772, 773, 786, 769, + 770, 470, 803, 761, 767, 768, 775, 776, 778, 777, + 779, 780, -86, -530, -530, 637, 25, 771, 782, 781, + 49, 50, 51, 501, 52, 53, 239, 34, -530, 890, + 54, 55, -111, 56, 999, 128,-32766, -111, 1201, -111, + -530, -570, -536, 890, 300, -570, 144, -111, -111, -111, + -111, -111, -111, -111, -111, 1001, 1002, 1001, 1002, 686, + 1201, 925, 926, 1194, 806, 890, 927, 1296, 57, 58, + 799, 253, -193, 687, 59, 807, 60, 246, 247, 61, + 62, 63, 64, 65, 66, 67, 68, 304, 27, 268, + 69, 437, 502, -332, 306, 688, 1227, 1228, 503, 1192, + 806, -192, 318, 890, 1225, 41, 24, 504, 334, 505, + 14, 506, 880, 507, 653, 654, 508, 509, 280, 806, + 281, 43, 44, 438, 368, 367, 880, 45, 510, 35, + 249, 471, 1063, 359, 333, 103, 104, 105, 1196, 1195, + 1197, 806, 511, 512, 513, 335, 801, 1221, 880, 361, + 285, 683, 286, 365, 514, 515, 380, 1215, 1216, 1217, + 1218, 1212, 1213, 292, 433, -111, 715, 714, 434, 1219, + 1214, 149, 400, 1196, 1195, 1197, 293, -153, -153, -153, + -356, 70, -356, 316, 317, 320, 880, 892, -531, 681, + 435, 1048, -153, 707, -153, 293, -153, 1277, -153, 27, + 74, 892, 436, 681, 320, 369, 370, 833, 366, 834, + -529, 806, 382, 812, 11, 1225, 833, 150, 834, -111, + -111, 151, 74, 942, -111, 681, 320, 153, 806, 866, + -111, -111, -111, -111, 31, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 715, 714, + 374, 375, -531, -531, 890, 154, 805, 155, -4, 890, + 157, 892, -88, 681, -153, 514, 515, -531, 1215, 1216, + 1217, 1218, 1212, 1213, -529, -529, 797, 1108, 1110, -531, + 1219, 1214, 715, 714, 690,-32766, 629, 630, -528, -529, + 32, 1194, 72, 123, 124, 317, 320, 129,-32766,-32766, + -32766, -529,-32766, -535,-32766, 130,-32766, 140, 143,-32766, + 158, 159, 160, 320,-32766,-32766,-32766, 161, -528,-32766, + -32766,-32766, -79, 282, -75, 1194,-32766, 412, -73, 27, + -72, -71,-32766,-32766,-32766,-32766,-32766, 880,-32766, 287, + -32766, 806, 880,-32766, -70, 1225, -69, -68,-32766,-32766, + -32766, -67, -528, -528,-32766,-32766, -66, 141, -47, -18, + -32766, 412, 147, 320, 366, 73, 428, -528, 271,-32766, + 278, 291, -51, 696, 699, -111, -111, 1201, -533, -528, + -111, 889, -528, -528, 48, 825, -111, -111, -111, -111, + 146, 327, 283, 270, 288, 109, 515, -528, 1215, 1216, + 1217, 1218, 1212, 1213, 131, 906, 661, -16, 9, -528, + 1219, 1214, 892, 797, 681,-32766, 145, 892, 1308, 681, + -4, 1194, 72,-32766, 638, 317, 320, 806,-32766,-32766, + -32766, 1078,-32766, 544,-32766, 627,-32766, 13, 656,-32766, + 548, 298, -533, -533,-32766,-32766,-32766,-32766, 296, 297, + -32766,-32766, 674, 1194, 643, 890,-32766, 412, 806, 453, + -32766,-32766,-32766, 364,-32766,-32766,-32766, 481,-32766, -533, + -32766,-32766, 47, -494, 890, 127,-32766,-32766,-32766,-32766, + 644, 657,-32766,-32766, 305, 1194, 890, 805,-32766, 412, + 1222, 301,-32766,-32766,-32766, 0,-32766,-32766,-32766, 432, + -32766, 299, 922,-32766, -111, 293, 554, 476,-32766,-32766, + -32766,-32766, 1232, -484,-32766,-32766, 697, 1194, 560, 908, + -32766, 412, 595, 817,-32766,-32766,-32766, 7,-32766,-32766, + -32766, 1234,-32766, 16, 293,-32766, 294, 295, 880, 74, + -32766,-32766,-32766, 320, 363, 39,-32766,-32766, 40, 704, + 705, 871,-32766, 412, -246, -246, -246, 880, 966, 943, + 366,-32766, 950, 125, 1247, 940, 951, 869, 938, 880, + 1052, -111, -111, -245, -245, -245, -111, 1055, 1056, 366, + 1053, 866, -111, -111, -111, -111, 1054, 1060, 701, 1265, + -111, -111, 1299, 632, -564, -111, 33, 315, -271, 362, + 866, -111, -111, -111, -111, 682, 685, 689, 691, 692, + 693, 694,-32766, 892, 698, 681, -246, 684, 1194, 867, + 1303, 1305, 828, 827, 836,-32766,-32766,-32766, 915,-32766, + 958,-32766, 892,-32766, 681, -245,-32766, 835, 1304, 914, + 916,-32766,-32766,-32766, 892, 913, 681,-32766,-32766, 1180, + 899, 909, 897,-32766, 412, 948, 949, 1302, 1259, 1248, + 1266, 1272,-32766, 1275, -269, -562, -536, -535, -534, 1, + 28, 29, 38, 42, 46, 71, 75, 76, 77, 78, + 79, 80, 142, 152, 156, 245, 322, 348, 349, 350, + 351, 352, 353, 354, 355, 356, 357, 358, 360, 429, + 0, -268, 0, 18, 19, 20, 21, 23, 399, 472, + 473, 480, 483, 484, 485, 486, 490, 491, 492, 499, + 668, 1205, 1148, 1223, 1022, 1021, 1184, -273, -103, 17, + 22, 26, 290, 398, 588, 592, 619, 673, 1152, 1200, + 1149, 1278, 0, -498, 1165, 0, 1226, 0, 320 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 106, 1, 108, 31, 9, 10, 11, 44, + 12, 13, 128, 129, 130, 131, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 117, 118, 9, 10, 57, 9, 10, 11, 137, - 138, 155, 128, 129, 130, 131, 106, 107, 8, 71, + 43, 106, 107, 14, 8, 57, 9, 10, 11, 137, + 138, 116, 31, 9, 10, 11, 106, 107, 8, 71, 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, - 33, 34, 35, 36, 1, 87, 88, 89, 90, 91, + 33, 34, 35, 36, 30, 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, 30, 80, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 51, 1, 161, 101, 80, 150, 151, + 142, 143, 144, 51, 1, 9, 10, 80, 150, 151, 152, 8, 154, 9, 10, 11, 2, 3, 4, 5, - 6, 7, 164, 9, 10, 11, 12, 13, 123, 9, - 10, 11, 80, 161, 30, 83, 32, 33, 34, 35, + 6, 7, 164, 9, 10, 11, 12, 13, 9, 10, + 11, 85, 80, 14, 30, 83, 32, 33, 34, 35, 36, 37, 38, 116, 117, 118, 119, 120, 121, 122, - 30, 37, 38, 106, 107, 1, 9, 10, 11, 1, - 53, 54, 55, 116, 57, 1, 8, 14, 155, 156, + 159, 37, 38, 8, 1, 1, 9, 10, 11, 1, + 53, 54, 55, 164, 57, 1, 8, 1, 155, 156, 157, 57, 9, 10, 11, 162, 69, 30, 116, 32, 33, 119, 120, 121, 122, 71, 72, 73, 74, 75, - 76, 77, 8, 30, 80, 32, 33, 34, 35, 137, + 76, 77, 146, 30, 80, 32, 33, 34, 35, 137, 138, 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, @@ -401,168 +400,167 @@ class Php7 extends \PhpParser\ParserAbstract 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 116, 57, 14, - 9, 10, 11, 134, 135, 161, 8, 164, 160, 1, - 69, 167, 164, 159, 57, 161, 80, 8, 137, 138, - 1, 30, 1, 32, 33, 34, 1, 14, 71, 72, - 73, 74, 75, 76, 77, 31, 1, 80, 30, 70, + 49, 50, 51, 52, 53, 54, 55, 116, 57, 164, + 9, 10, 11, 134, 135, 161, 8, 1, 160, 1, + 69, 167, 164, 159, 57, 161, 80, 161, 137, 138, + 1, 30, 1, 32, 33, 34, 37, 38, 71, 72, + 73, 74, 75, 76, 77, 8, 31, 80, 30, 70, 30, 9, 10, 11, 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, 8, 156, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 8, 134, 135, 8, 8, 150, 151, 152, - 2, 3, 4, 5, 6, 7, 97, 82, 149, 31, - 12, 13, 101, 15, 116, 8, 116, 106, 80, 108, - 161, 85, 163, 106, 113, 108, 8, 116, 117, 118, - 119, 120, 121, 122, 123, 137, 138, 137, 138, 14, - 9, 10, 11, 80, 82, 14, 8, 85, 50, 51, - 50, 51, 52, 128, 56, 1, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 70, 70, 71, - 72, 73, 74, 162, 159, 97, 78, 79, 80, 116, - 82, 1, 146, 158, 86, 87, 88, 89, 163, 91, - 31, 93, 167, 95, 156, 14, 98, 99, 35, 161, - 37, 103, 104, 105, 106, 107, 1, 109, 110, 147, - 148, 31, 160, 115, 116, 8, 164, 1, 155, 156, - 157, 70, 124, 125, 126, 8, 70, 1, 70, 37, - 38, 134, 135, 8, 136, 137, 82, 139, 140, 141, - 142, 143, 144, 145, 8, 35, 149, 37, 164, 151, - 152, 164, 164, 155, 156, 157, 158, 1, 161, 8, - 163, 163, 82, 165, 166, 167, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 75, 76, 77, 75, 76, 134, 135, 31, 8, 84, - 134, 135, 134, 135, 1, 90, 8, 92, 82, 94, - 149, 96, 37, 38, 8, 149, 80, 149, 128, 59, - 60, 106, 161, 8, 1, 161, 8, 161, 159, 161, - 70, 167, 117, 118, 31, 8, 106, 70, 108, 106, - 14, 108, 127, 128, 129, 130, 131, 70, 158, 74, - 84, 75, 76, 163, 31, 80, 159, 167, 161, 101, - 102, 14, 87, 88, 89, 14, 91, 31, 93, 16, - 95, 37, 38, 98, 159, 1, 161, 162, 103, 104, - 105, 37, 38, 1, 109, 110, 16, 84, 16, 163, - 115, 116, 16, 167, 134, 135, 16, 161, 31, 124, - 16, 134, 135, 167, 70, 31, 16, 84, 16, 149, - 16, 134, 135, 31, 106, 107, 82, 31, 74, 31, - 86, 161, 106, 107, 80, 159, 31, 161, 161, 154, - 31, 87, 88, 89, 31, 91, 31, 93, 161, 95, - 111, 112, 98, 31, 31, 31, 31, 103, 104, 105, - 31, 31, 31, 109, 110, 31, 31, 31, 84, 115, - 116, 31, 159, 31, 161, 37, 84, 38, 124, 35, - 136, 137, 35, 139, 140, 141, 142, 143, 144, 35, - 31, 70, 159, 37, 161, 151, 152, 69, 57, 74, - 80, 82, 85, 77, 90, 80, 94, 163, 92, 82, - 166, 167, 87, 88, 89, 83, 91, 114, 93, 113, - 95, 128, 85, 98, 116, 128, 153, 128, 103, 104, - 105, 146, 89, 74, 109, 110, 0, 1, 149, 80, - 115, 116, 96, 159, 133, 161, 87, 88, 89, 124, - 91, 159, 93, 161, 95, 97, 146, 98, 97, 97, - 100, 154, 103, 104, 105, 74, 100, 149, 109, 110, - -1, 80, -1, -1, 115, 116, -1, 132, 87, 88, - 89, 132, 91, 124, 93, -1, 95, -1, 155, 98, - -1, -1, -1, 102, 103, 104, 105, 74, -1, 149, - 109, 110, 149, 80, 81, 153, 115, 116, 160, 1, - 87, 88, 89, 149, 91, 124, 93, 160, 95, 164, - 84, 98, 159, 158, -1, -1, 103, 104, 105, 159, - 159, 159, 109, 110, 159, 159, 159, 159, 115, 116, - 159, 159, 106, 159, 108, 1, 159, 124, 159, 113, - 160, 159, 159, 117, 118, 159, 159, 159, 163, 160, - 160, 160, -1, 127, 128, 129, 130, 131, 161, 161, - 74, 161, 161, 161, 161, 161, 80, 161, 161, 161, - 161, 161, 167, 87, 88, 89, 150, 91, 162, 93, - 162, 95, 84, 162, 98, 159, 162, 161, 162, 103, - 104, 105, 162, 162, 162, 109, 110, 162, 100, 101, - 102, 115, 116, 162, 106, 70, 162, 162, 162, 162, - 124, 162, 162, 162, 162, 117, 118, 82, 84, 162, - 162, 86, 162, 162, 162, 127, 128, 129, 130, 131, - 162, 162, 162, 162, 100, 101, 102, 163, 163, 163, - 106, 163, 163, 163, 163, 163, 163, 163, 163, -1, - 163, 117, 118, 163, 163, 163, 163, 159, 163, 161, - 162, 127, 128, 129, 130, 131, 163, 163, 163, 163, - 163, 163, 137, 163, 139, 140, 141, 142, 143, 144, - 163, 163, 163, 163, 163, 163, 151, 152, 163, 163, - 163, 163, 163, 159, 164, 161, 162, 164, 163, -1, - 164, 166, 167, 164, 164, 164, 164, 164, 164, 164, + 133, 31, 156, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 97, 134, 135, 75, 76, 150, 151, 152, + 2, 3, 4, 5, 6, 7, 97, 8, 149, 1, + 12, 13, 101, 15, 116, 8, 116, 106, 1, 108, + 161, 160, 163, 1, 113, 164, 8, 116, 117, 118, + 119, 120, 121, 122, 123, 137, 138, 137, 138, 31, + 1, 117, 118, 80, 82, 1, 122, 85, 50, 51, + 80, 8, 164, 31, 56, 159, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 8, 70, 71, + 72, 73, 74, 162, 8, 31, 78, 79, 80, 116, + 82, 164, 8, 1, 86, 87, 88, 89, 8, 91, + 101, 93, 84, 95, 75, 76, 98, 99, 35, 82, + 37, 103, 104, 105, 106, 107, 84, 109, 110, 147, + 148, 161, 123, 115, 116, 50, 51, 52, 155, 156, + 157, 82, 124, 125, 126, 8, 156, 1, 84, 8, + 35, 161, 37, 8, 136, 137, 8, 139, 140, 141, + 142, 143, 144, 145, 8, 128, 37, 38, 8, 151, + 152, 101, 102, 155, 156, 157, 158, 75, 76, 77, + 106, 163, 108, 165, 166, 167, 84, 159, 70, 161, + 8, 159, 90, 161, 92, 158, 94, 1, 96, 70, + 163, 159, 8, 161, 167, 106, 107, 106, 106, 108, + 70, 82, 106, 8, 108, 86, 106, 14, 108, 117, + 118, 14, 163, 159, 122, 161, 167, 14, 82, 127, + 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 37, 38, + 106, 107, 134, 135, 1, 14, 155, 14, 0, 1, + 14, 159, 31, 161, 162, 136, 137, 149, 139, 140, + 141, 142, 143, 144, 134, 135, 80, 59, 60, 161, + 151, 152, 37, 38, 31, 74, 111, 112, 70, 149, + 14, 80, 163, 16, 16, 166, 167, 16, 87, 88, + 89, 161, 91, 163, 93, 16, 95, 161, 16, 98, + 16, 16, 16, 167, 103, 104, 105, 16, 70, 74, + 109, 110, 31, 35, 31, 80, 115, 116, 31, 70, + 31, 31, 87, 88, 89, 124, 91, 84, 93, 35, + 95, 82, 84, 98, 31, 86, 31, 31, 103, 104, + 105, 31, 134, 135, 109, 110, 31, 161, 31, 31, + 115, 116, 31, 167, 106, 154, 108, 149, 31, 124, + 31, 113, 31, 31, 31, 117, 118, 1, 70, 161, + 122, 31, 134, 135, 70, 127, 128, 129, 130, 131, + 31, 35, 37, 57, 37, 69, 137, 149, 139, 140, + 141, 142, 143, 144, 31, 38, 77, 31, 150, 161, + 151, 152, 159, 80, 161, 74, 70, 159, 83, 161, + 162, 80, 163, 85, 90, 166, 167, 82, 87, 88, + 89, 82, 91, 85, 93, 113, 95, 97, 94, 98, + 89, 132, 134, 135, 103, 104, 105, 74, 134, 135, + 109, 110, 92, 80, 96, 1, 115, 116, 82, 97, + 87, 88, 89, 149, 91, 124, 93, 97, 95, 161, + 116, 98, 70, 149, 1, 161, 103, 104, 105, 74, + 100, 100, 109, 110, 132, 80, 1, 155, 115, 116, + 160, 114, 87, 88, 89, -1, 91, 124, 93, 128, + 95, 133, 128, 98, 128, 158, 153, 102, 103, 104, + 105, 74, 146, 149, 109, 110, 31, 80, 81, 154, + 115, 116, 153, 160, 87, 88, 89, 149, 91, 124, + 93, 146, 95, 149, 158, 98, 134, 135, 84, 163, + 103, 104, 105, 167, 149, 159, 109, 110, 159, 159, + 159, 159, 115, 116, 100, 101, 102, 84, 159, 159, + 106, 124, 159, 161, 160, 159, 159, 159, 159, 84, + 159, 117, 118, 100, 101, 102, 122, 159, 159, 106, + 159, 127, 128, 129, 130, 131, 159, 159, 162, 160, + 117, 118, 160, 160, 163, 122, 161, 161, 164, 161, + 127, 128, 129, 130, 131, 161, 161, 161, 161, 161, + 161, 161, 74, 159, 161, 161, 162, 161, 80, 162, + 162, 162, 162, 162, 162, 87, 88, 89, 162, 91, + 162, 93, 159, 95, 161, 162, 98, 162, 162, 162, + 162, 103, 104, 105, 159, 162, 161, 109, 110, 162, + 162, 162, 162, 115, 116, 162, 162, 162, 162, 162, + 162, 162, 124, 162, 164, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, + -1, 164, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, -1, 165, 165, -1, 166 + 164, 164, -1, 165, 165, -1, 166, -1, 167 ); protected $actionBase = array( - 0, -2, 154, 565, 876, 948, 984, 514, 53, 398, - 837, 307, 307, 67, 307, 307, 307, 653, 724, 724, - 732, 724, 616, 673, 204, 204, 204, 625, 625, 625, - 625, 694, 694, 831, 831, 863, 799, 765, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 936, 936, 936, 936, 936, 936, 936, 936, - 936, 936, 375, 519, 369, 701, 1017, 1023, 1019, 1024, - 1015, 1014, 1018, 1020, 1025, 911, 912, 782, 918, 919, - 920, 921, 1021, 841, 1016, 1022, 291, 291, 291, 291, + 0, -2, 154, 542, 698, 894, 913, 586, 53, 430, + 867, 307, 307, 67, 307, 307, 307, 482, 693, 693, + 925, 693, 468, 504, 204, 204, 204, 651, 651, 651, + 651, 685, 685, 845, 845, 877, 813, 781, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, + 978, 978, 356, 31, 369, 716, 1008, 1014, 1010, 1015, + 1006, 1005, 1009, 1011, 1016, 935, 936, 799, 937, 938, + 939, 941, 1012, 873, 1007, 1013, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 290, 491, 44, 382, 382, 382, 382, 382, + 291, 291, 290, 159, 136, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 382, 160, 160, 160, 187, 684, - 684, 341, 203, 610, 47, 985, 985, 985, 985, 985, - 985, 985, 985, 985, 985, 144, 144, 7, 7, 7, - 7, 7, 371, -25, -25, -25, -25, 540, 385, 102, - 576, 358, 45, 377, 460, 460, 360, 231, 231, 231, - 231, 231, 231, -78, -78, -78, -78, -78, -66, 319, - 457, -94, 396, 423, 586, 586, 586, 586, 423, 423, - 423, 423, 750, 1029, 423, 423, 423, 511, 516, 516, - 518, 147, 147, 147, 516, 583, 777, 422, 583, 422, - 194, 92, 748, -40, 87, 412, 748, 617, 627, 198, - 143, 773, 658, 773, 1013, 757, 764, 717, 838, 860, - 1026, 800, 908, 806, 910, 219, 686, 1012, 1012, 1012, - 1012, 1012, 1012, 1012, 1012, 1012, 1012, 1012, 855, 552, - 1013, 286, 855, 855, 855, 552, 552, 552, 552, 552, - 552, 552, 552, 552, 552, 679, 286, 568, 626, 286, - 794, 552, 375, 758, 375, 375, 375, 375, 958, 375, - 375, 375, 375, 375, 375, 970, 769, -16, 375, 519, - 12, 12, 547, 83, 12, 12, 12, 12, 375, 375, - 375, 658, 781, 713, 666, 792, 448, 781, 781, 781, - 438, 444, 193, 447, 570, 523, 580, 760, 760, 767, - 929, 929, 760, 759, 760, 767, 934, 760, 929, 805, - 359, 648, 577, 611, 656, 929, 478, 760, 760, 760, - 760, 665, 760, 467, 433, 760, 760, 785, 774, 789, - 60, 929, 929, 929, 789, 596, 751, 751, 751, 811, - 812, 746, 771, 567, 498, 677, 348, 779, 771, 771, - 760, 640, 746, 771, 746, 771, 747, 771, 771, 771, - 746, 771, 759, 585, 771, 734, 668, 224, 771, 6, - 935, 937, 354, 940, 932, 941, 979, 942, 943, 851, - 956, 933, 945, 931, 930, 780, 703, 720, 790, 729, - 928, 768, 768, 768, 925, 768, 768, 768, 768, 768, - 768, 768, 768, 703, 788, 804, 733, 783, 960, 722, - 726, 725, 868, 1027, 1028, 737, 739, 958, 1006, 953, - 803, 730, 992, 967, 866, 848, 968, 969, 993, 1007, - 1008, 871, 761, 874, 880, 797, 971, 852, 768, 935, - 943, 933, 945, 931, 930, 763, 762, 753, 755, 749, - 745, 736, 738, 770, 1009, 924, 835, 830, 970, 926, - 703, 839, 986, 847, 994, 995, 850, 801, 772, 840, - 881, 972, 975, 976, 853, 1010, 810, 989, 795, 996, - 802, 882, 997, 998, 999, 1000, 885, 854, 856, 857, - 815, 754, 980, 786, 891, 335, 787, 796, 978, 363, - 957, 858, 894, 895, 1001, 1002, 1003, 896, 954, 816, - 990, 752, 991, 983, 817, 818, 485, 784, 778, 541, - 676, 897, 899, 900, 955, 775, 766, 821, 822, 1011, - 901, 697, 824, 740, 902, 1005, 742, 744, 756, 859, - 793, 743, 798, 977, 776, 827, 907, 829, 832, 833, - 1004, 836, 0, 0, 0, 0, 0, 0, 0, 0, + 382, 382, 382, 382, 382, 54, 54, 54, 187, 569, + 569, 341, 203, 658, 47, 699, 699, 699, 699, 699, + 699, 699, 699, 699, 699, 144, 144, 7, 7, 7, + 7, 7, 371, -25, -25, -25, -25, 816, 477, 102, + 499, 358, 449, 514, 525, 525, 360, -116, 231, 231, + 231, 231, 231, 231, -78, -78, -78, -78, -78, 319, + 580, 541, 86, 423, 636, 636, 636, 636, 423, 423, + 423, 423, 825, 1020, 423, 423, 423, 558, 688, 688, + 754, 147, 147, 147, 688, 550, 788, 422, 550, 422, + 194, 92, 794, -55, -40, 321, 814, 794, 748, 842, + 198, 143, 772, 539, 772, 1004, 778, 767, 733, 868, + 896, 1017, 820, 933, 821, 934, 219, 731, 1003, 1003, + 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1021, + 339, 1004, 286, 1021, 1021, 1021, 339, 339, 339, 339, + 339, 339, 339, 339, 339, 339, 615, 286, 380, 479, + 286, 796, 339, 356, 804, 356, 356, 356, 356, 964, + 356, 356, 356, 356, 356, 356, 969, 768, 410, 356, + 31, 206, 206, 472, 193, 206, 206, 206, 206, 356, + 356, 356, 539, 776, 793, 584, 809, 377, 776, 776, + 776, 355, 185, 39, 348, 555, 523, 546, 773, 773, + 789, 946, 946, 773, 785, 773, 789, 951, 773, 946, + 787, 467, 596, 540, 585, 600, 946, 519, 773, 773, + 773, 773, 622, 773, 503, 478, 773, 773, 749, 779, + 792, 46, 946, 946, 946, 792, 581, 808, 808, 808, + 830, 831, 762, 777, 534, 526, 645, 459, 807, 777, + 777, 773, 588, 762, 777, 762, 777, 805, 777, 777, + 777, 762, 777, 785, 577, 777, 734, 634, 60, 777, + 6, 952, 953, 671, 954, 949, 955, 976, 956, 957, + 884, 962, 950, 958, 948, 947, 790, 717, 718, 818, + 764, 945, 766, 766, 766, 943, 766, 766, 766, 766, + 766, 766, 766, 766, 717, 770, 835, 811, 791, 965, + 721, 729, 806, 897, 1018, 1019, 964, 997, 959, 826, + 732, 983, 966, 866, 876, 967, 968, 984, 998, 999, + 898, 786, 899, 900, 803, 970, 885, 766, 952, 957, + 950, 958, 948, 947, 765, 760, 755, 756, 753, 740, + 737, 739, 771, 1000, 942, 871, 844, 969, 944, 717, + 869, 979, 875, 985, 986, 878, 802, 775, 872, 901, + 971, 972, 973, 886, 1001, 829, 980, 874, 987, 810, + 902, 988, 989, 990, 991, 906, 887, 888, 889, 832, + 774, 940, 798, 908, 643, 744, 797, 975, 647, 963, + 890, 915, 916, 992, 993, 994, 917, 960, 839, 981, + 784, 982, 977, 840, 843, 653, 728, 795, 681, 683, + 918, 923, 927, 961, 782, 769, 846, 847, 1002, 928, + 686, 848, 735, 929, 996, 736, 741, 800, 893, 824, + 817, 780, 974, 783, 849, 930, 851, 858, 859, 995, + 861, 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, 458, 458, 458, 458, 458, 458, 307, 307, 307, - 307, 0, 0, 307, 0, 0, 0, 458, 458, 458, + 458, 458, 458, 458, 458, 458, 307, 307, 307, 307, + 0, 0, 307, 0, 0, 0, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, @@ -577,41 +575,41 @@ class Php7 extends \PhpParser\ParserAbstract 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 291, 291, 291, 291, 291, 291, 291, 291, + 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 0, 0, 0, 0, + 291, 291, 291, 291, 291, 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, 291, 291, 291, 291, 291, 291, 291, 291, + 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 423, - 423, 291, 291, 0, 291, 423, 423, 423, 423, 423, - 423, 423, 423, 423, 423, 291, 291, 291, 291, 291, - 291, 291, 805, 147, 147, 147, 147, 423, 423, 423, - 423, 423, -88, -88, 147, 147, 423, 423, 423, 423, + 291, 291, 291, 291, 291, 291, 291, 291, 423, 423, + 291, 291, 0, 291, 423, 423, 423, 423, 423, 423, + 423, 423, 423, 423, 291, 291, 291, 291, 291, 291, + 291, 787, 147, 147, 147, 147, 423, 423, 423, 423, + 423, -88, -88, 147, 147, 423, 384, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 0, 0, - 0, 286, 422, 0, 759, 759, 759, 759, 0, 0, - 0, 0, 422, 422, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 286, 422, 0, 286, 0, - 759, 759, 423, 805, 805, 314, 423, 0, 0, 0, - 0, 286, 759, 286, 552, 422, 552, 552, 12, 375, - 314, 608, 608, 608, 608, 0, 658, 805, 805, 805, - 805, 805, 805, 805, 805, 805, 805, 805, 759, 0, - 805, 0, 759, 759, 759, 0, 0, 0, 0, 0, + 286, 422, 0, 785, 785, 785, 785, 0, 0, 0, + 0, 422, 422, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 286, 422, 0, 286, 0, 785, + 785, 423, 787, 787, 314, 384, 423, 0, 0, 0, + 0, 286, 785, 286, 339, 422, 339, 339, 206, 356, + 314, 510, 510, 510, 510, 0, 539, 787, 787, 787, + 787, 787, 787, 787, 787, 787, 787, 787, 785, 0, + 787, 0, 785, 785, 785, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 759, 0, 0, 929, 0, 0, 0, 0, 760, 0, - 0, 0, 0, 0, 0, 760, 934, 0, 0, 0, - 0, 0, 0, 759, 0, 0, 0, 0, 0, 0, - 0, 0, 768, 801, 0, 801, 0, 768, 768, 768 + 785, 0, 0, 946, 0, 0, 0, 0, 773, 0, + 0, 0, 0, 0, 0, 773, 951, 0, 0, 0, + 0, 0, 0, 785, 0, 0, 0, 0, 0, 0, + 0, 0, 766, 802, 0, 802, 0, 766, 766, 766 ); protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 578, 578, 578, - 578,32767,32767, 246, 103,32767,32767, 454, 372, 372, - 372,32767,32767, 522, 522, 522, 522, 522, 522,32767, - 32767,32767,32767,32767,32767, 454,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 582, 582, 582, + 582,32767,32767, 250, 103,32767,32767, 458, 376, 376, + 376,32767,32767, 526, 526, 526, 526, 526, 526,32767, + 32767,32767,32767,32767,32767, 458,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, @@ -619,128 +617,135 @@ class Php7 extends \PhpParser\ParserAbstract 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, 101,32767, - 32767,32767, 37, 7, 8, 10, 11, 50, 17, 310, + 32767,32767, 37, 7, 8, 10, 11, 50, 17, 314, 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 571,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 575,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 462, 441, 442, 444, + 445, 375, 527, 581, 317, 578, 374, 146, 329, 319, + 238, 320, 254, 463, 255, 464, 467, 468, 211, 283, + 371, 150, 405, 459, 407, 457, 461, 406, 381, 386, + 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, + 397, 398, 379, 380, 460, 438, 437, 436, 403,32767, + 32767, 404, 408, 378, 411,32767,32767,32767,32767,32767, + 32767,32767,32767, 103,32767, 409, 410, 427, 428, 425, + 426, 429,32767, 430, 431, 432, 433,32767,32767, 306, + 32767,32767, 355, 353, 418, 419, 306,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 520, + 435,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 103,32767, 101, 522, 400, 402, + 490, 413, 414, 412, 382,32767, 497,32767, 103, 499, + 32767,32767,32767, 112,32767,32767,32767,32767, 521,32767, + 528, 528,32767, 483, 101, 194,32767, 194, 194,32767, + 32767,32767,32767,32767,32767,32767, 589, 483, 111, 111, + 111, 111, 111, 111, 111, 111, 111, 111, 111,32767, + 194, 111,32767,32767,32767, 101, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 189,32767, 264, 266, + 103, 543, 194,32767, 502,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 495,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 458, 437, 438, 440, - 441, 371, 523, 577, 313, 574, 370, 146, 325, 315, - 234, 316, 250, 459, 251, 460, 463, 464, 211, 279, - 367, 150, 401, 455, 403, 453, 457, 402, 377, 382, - 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, - 393, 394, 375, 376, 456, 434, 433, 432, 399,32767, - 32767, 400, 404, 374, 407,32767,32767,32767,32767,32767, - 32767,32767,32767, 103,32767, 405, 406, 423, 424, 421, - 422, 425,32767, 426, 427, 428, 429,32767,32767, 302, - 32767,32767, 351, 349, 414, 415, 302,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 516, - 431,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 103,32767, 101, 518, 396, 398, - 486, 409, 410, 408, 378,32767, 493,32767, 103, 495, - 32767,32767,32767, 112,32767,32767,32767, 517,32767, 524, - 524,32767, 479, 101, 194,32767, 194, 194,32767,32767, - 32767,32767,32767,32767,32767, 585, 479, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111,32767, 194, - 111,32767,32767,32767, 101, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 189,32767, 260, 262, 103, - 539, 194,32767, 498,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 491,32767,32767,32767, + 32767,32767, 483, 423, 139,32767, 139, 528, 415, 416, + 417, 485, 528, 528, 528, 302, 285,32767,32767,32767, + 32767, 500, 500, 101, 101, 101, 101, 495,32767,32767, + 112, 100, 100, 100, 100, 100, 104, 102,32767,32767, + 32767,32767, 100,32767, 102, 102,32767,32767, 221, 208, + 219, 102,32767, 547, 548, 219, 102, 223, 223, 223, + 243, 243, 474, 308, 102, 100, 102, 102, 196, 308, + 308,32767, 102, 474, 308, 474, 308, 198, 308, 308, + 308, 474, 308,32767, 102, 308, 210, 100, 100, 308, + 32767,32767,32767, 485,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 515,32767, + 532, 545, 421, 422, 424, 530, 446, 447, 448, 449, + 450, 451, 452, 454, 577,32767, 489,32767,32767,32767, + 32767, 328, 587,32767, 587,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 479, 419, 139,32767, 139, 524, 411, 412, 413, - 481, 524, 524, 524, 298, 281,32767,32767,32767,32767, - 496, 496, 101, 101, 101, 101, 491,32767,32767, 112, - 100, 100, 100, 100, 100, 104, 102,32767,32767,32767, - 32767, 100,32767, 102, 102,32767,32767, 217, 208, 215, - 102,32767, 543, 544, 215, 102, 219, 219, 219, 239, - 239, 470, 304, 102, 100, 102, 102, 196, 304, 304, - 32767, 102, 470, 304, 470, 304, 198, 304, 304, 304, - 470, 304,32767, 102, 304, 210, 100, 100, 304,32767, - 32767,32767, 481,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 511,32767, 528, - 541, 417, 418, 420, 526, 442, 443, 444, 445, 446, - 447, 448, 450, 573,32767, 485,32767,32767,32767,32767, - 324, 583,32767, 583,32767,32767,32767,32767,32767,32767, + 588,32767, 528,32767,32767,32767,32767, 420, 9, 76, + 43, 44, 52, 58, 506, 507, 508, 509, 503, 504, + 510, 505,32767,32767, 511, 553,32767,32767, 529, 580, + 32767,32767,32767,32767,32767,32767, 139,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 515,32767, 137, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 584,32767, 524,32767,32767,32767,32767, 416, 9, - 76, 43, 44, 52, 58, 502, 503, 504, 505, 499, - 500, 506, 501,32767,32767, 507, 549,32767,32767, 525, - 576,32767,32767,32767,32767,32767,32767, 139,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 511,32767, - 137,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 524,32767,32767,32767, 300, 301,32767,32767, + 32767, 528,32767,32767,32767, 304, 305,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 524,32767,32767,32767, 283, 284,32767, + 32767,32767, 528,32767,32767,32767, 287, 288,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 278,32767,32767, 366,32767,32767,32767, - 32767, 345,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 152, 152, 3, 3, 327, 152, 152, 152, - 327, 152, 327, 327, 327, 152, 152, 152, 152, 152, - 152, 272, 184, 254, 257, 239, 239, 152, 337, 152 + 32767,32767, 282,32767,32767, 370,32767,32767,32767,32767, + 349,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 152, 152, 3, 3, 331, 152, 152, 152, 331, + 152, 331, 331, 331, 152, 152, 152, 152, 152, 152, + 276, 184, 258, 261, 243, 243, 152, 341, 152 ); protected $goto = array( - 194, 194, 670, 422, 643, 463, 1264, 1265, 1022, 416, - 308, 309, 329, 563, 314, 421, 330, 423, 622, 801, - 678, 637, 586, 651, 652, 653, 165, 165, 165, 165, + 194, 194, 669, 423, 642, 883, 839, 884, 1025, 417, + 308, 309, 330, 562, 314, 422, 331, 424, 621, 823, + 677, 851, 824, 585, 838, 857, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 521, 522, 412, 523, - 525, 526, 527, 528, 529, 530, 531, 532, 1091, 166, + 188, 189, 190, 215, 213, 216, 522, 523, 413, 524, + 526, 527, 528, 529, 530, 531, 532, 533, 1094, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, 176, 212, 214, 217, 235, 238, 241, 242, 244, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, - 274, 275, 311, 312, 313, 417, 418, 419, 568, 219, + 274, 275, 311, 312, 313, 418, 419, 420, 567, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1091, 199, 180, + 236, 186, 187, 188, 189, 190, 215, 1094, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 323, 323, 323, 323, 827, 608, 608, 824, 547, - 538, 342, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, - 1221, 1221, 1239, 1239, 288, 288, 288, 288, 1239, 1239, - 1239, 1239, 1239, 1239, 1239, 1239, 1239, 1239, 388, 538, - 547, 556, 557, 395, 566, 588, 602, 603, 832, 825, - 880, 875, 876, 889, 15, 833, 877, 830, 878, 879, - 831, 799, 251, 251, 883, 919, 992, 1000, 1004, 1001, - 1005, 1237, 1237, 938, 1043, 1039, 1040, 1237, 1237, 1237, - 1237, 1237, 1237, 1237, 1237, 1237, 1237, 858, 248, 248, - 248, 248, 250, 252, 533, 533, 533, 533, 487, 590, - 488, 1190, 1190, 997, 1190, 997, 494, 1290, 1290, 560, - 997, 997, 997, 997, 997, 997, 997, 997, 997, 997, - 997, 997, 1261, 1261, 1290, 1261, 340, 1190, 930, 402, - 677, 1279, 1190, 1190, 1190, 1190, 959, 345, 1190, 1190, - 1190, 1271, 1271, 1271, 1271, 606, 640, 345, 345, 1273, - 1273, 1273, 1273, 820, 820, 805, 896, 884, 840, 885, - 897, 345, 345, 5, 345, 6, 1306, 384, 535, 535, - 559, 535, 415, 852, 597, 1257, 839, 540, 524, 524, - 345, 1289, 1289, 642, 524, 524, 524, 524, 524, 524, - 524, 524, 524, 524, 445, 805, 1140, 805, 1289, 932, - 932, 932, 932, 1063, 1064, 445, 926, 933, 386, 390, - 548, 587, 591, 1030, 1292, 331, 554, 1259, 1259, 1030, - 704, 621, 623, 823, 641, 1250, 319, 303, 660, 664, - 973, 668, 676, 969, 429, 553, 962, 936, 936, 934, - 936, 703, 601, 537, 971, 966, 343, 344, 663, 817, - 595, 609, 612, 613, 614, 615, 634, 635, 636, 680, - 439, 1186, 845, 454, 454, 439, 439, 1266, 1267, 820, - 901, 1079, 454, 394, 539, 551, 1183, 605, 540, 539, - 842, 551, 978, 272, 387, 618, 619, 981, 536, 536, - 844, 707, 646, 957, 567, 457, 458, 459, 838, 850, - 254, 254, 1297, 1298, 400, 401, 976, 976, 464, 649, - 1182, 650, 1028, 404, 405, 406, 1187, 661, 424, 1032, - 407, 564, 600, 815, 338, 424, 854, 848, 853, 841, - 1027, 1031, 1009, 1002, 1006, 1003, 1007, 1185, 941, 1188, - 1247, 1248, 943, 0, 1074, 439, 439, 439, 439, 439, - 439, 439, 439, 439, 439, 439, 0, 468, 439, 585, - 1056, 931, 681, 667, 667, 0, 495, 673, 1054, 1171, - 912, 0, 0, 1172, 1175, 913, 1176, 0, 0, 0, - 0, 0, 0, 1072, 857 + 211, 323, 323, 323, 323, 826, 607, 607, 800, 546, + 539, 1189, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, + 1224, 1224, 1242, 1242, 343, 464, 1267, 1268, 1242, 1242, + 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 389, 539, + 546, 555, 556, 396, 565, 587, 601, 602, 831, 798, + 879, 874, 875, 888, 15, 832, 876, 829, 877, 878, + 830, 455, 455, 941, 882, 804, 1190, 251, 251, 559, + 455, 1240, 1240, 814, 1046, 1042, 1043, 1240, 1240, 1240, + 1240, 1240, 1240, 1240, 1240, 1240, 1240, 605, 639, 1191, + 1250, 1251, 341, 248, 248, 248, 248, 250, 252, 819, + 819, 1193, 1193, 1000, 1193, 1000, 804, 416, 804, 596, + 1000, 1282, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, + 1000, 1000, 1000, 1264, 1264, 962, 1264, 1193, 488, 5, + 489, 6, 1193, 1193, 1193, 1193, 495, 385, 1193, 1193, + 1193, 1274, 1274, 1274, 1274, 277, 277, 277, 277, 558, + 1276, 1276, 1276, 1276, 1066, 1067, 895, 346, 553, 319, + 303, 896, 703, 620, 622, 641, 640, 346, 346, 1143, + 659, 663, 976, 667, 675, 972, 1260, 430, 1292, 1292, + 332, 346, 346, 816, 346, 636, 1309, 650, 651, 652, + 844, 536, 536, 924, 536, 1292, 525, 525, 541, 1269, + 1270, 346, 525, 525, 525, 525, 525, 525, 525, 525, + 525, 525, 1295, 617, 618, 1033, 819, 446, 395, 1262, + 1262, 1033, 935, 935, 935, 935, 563, 599, 446, 929, + 936, 933, 403, 676, 822, 1186, 552, 534, 534, 534, + 534, 841, 589, 600, 984, 1031, 1253, 965, 939, 939, + 937, 939, 702, 465, 538, 974, 969, 344, 345, 706, + 440, 900, 1082, 853, 946, 440, 440, 1035, 604, 662, + 469, 1293, 1293, 981, 1077, 540, 550, 0, 0, 0, + 540, 843, 550, 645, 960, 388, 1174, 911, 1293, 837, + 1175, 1178, 912, 1179, 0, 566, 458, 459, 460, 541, + 849, 1185, 0, 1300, 1301, 254, 254, 401, 402, 0, + 0, 0, 648, 0, 649, 0, 405, 406, 407, 0, + 660, 0, 0, 408, 0, 0, 0, 339, 847, 594, + 608, 611, 612, 613, 614, 633, 634, 635, 679, 918, + 995, 1003, 1007, 1004, 1008, 0, 440, 440, 440, 440, + 440, 440, 440, 440, 440, 440, 440, 0, 1188, 440, + 852, 840, 1030, 1034, 584, 1059, 0, 680, 666, 666, + 944, 496, 672, 1057, 387, 391, 547, 586, 590, 425, + 0, 0, 0, 0, 0, 0, 425, 0, 0, 0, + 0, 0, 0, 934, 1012, 1005, 1009, 1006, 1010, 0, + 0, 0, 0, 0, 272, 0, 0, 0, 0, 537, + 537, 0, 0, 0, 0, 1075, 856, 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, 979, + 979 ); protected $gotoCheck = array( - 42, 42, 72, 65, 65, 166, 166, 166, 119, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 7, - 9, 84, 122, 84, 84, 84, 42, 42, 42, 42, + 42, 42, 72, 65, 65, 64, 35, 64, 121, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 26, + 9, 35, 27, 124, 35, 45, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -754,87 +759,94 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 23, 23, 23, 23, 15, 104, 104, 26, 75, - 75, 93, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 104, 160, 160, 24, 24, 24, 24, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 15, 27, + 42, 23, 23, 23, 23, 15, 106, 106, 7, 75, + 75, 20, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 162, 162, 95, 168, 168, 168, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 15, 6, 15, 15, 15, 15, 75, 15, 15, 15, 15, 15, - 15, 6, 5, 5, 15, 87, 87, 87, 87, 87, - 87, 161, 161, 49, 15, 15, 15, 161, 161, 161, - 161, 161, 161, 161, 161, 161, 161, 45, 5, 5, - 5, 5, 5, 5, 103, 103, 103, 103, 147, 103, - 147, 72, 72, 72, 72, 72, 147, 173, 173, 162, - 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 122, 122, 173, 122, 169, 72, 89, 89, - 89, 171, 72, 72, 72, 72, 99, 14, 72, 72, - 72, 9, 9, 9, 9, 55, 55, 14, 14, 122, - 122, 122, 122, 22, 22, 12, 72, 64, 35, 64, - 72, 14, 14, 46, 14, 46, 14, 61, 19, 19, - 100, 19, 13, 35, 13, 122, 35, 14, 163, 163, - 14, 172, 172, 63, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 19, 12, 143, 12, 172, 19, - 19, 19, 19, 136, 136, 19, 19, 19, 58, 58, - 58, 58, 58, 122, 172, 29, 48, 122, 122, 122, - 48, 48, 48, 25, 48, 14, 159, 159, 48, 48, - 48, 48, 48, 48, 109, 9, 25, 25, 25, 25, - 25, 25, 9, 25, 25, 25, 93, 93, 14, 18, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 23, 20, 39, 141, 141, 23, 23, 168, 168, 22, - 17, 17, 141, 28, 9, 9, 152, 17, 14, 9, - 37, 9, 17, 24, 9, 83, 83, 106, 24, 24, - 17, 95, 17, 17, 9, 9, 9, 9, 17, 9, - 5, 5, 9, 9, 80, 80, 103, 103, 149, 80, - 17, 80, 121, 80, 80, 80, 20, 80, 113, 124, - 80, 2, 2, 20, 80, 113, 41, 9, 16, 16, - 16, 16, 113, 113, 113, 113, 113, 14, 16, 20, - 20, 20, 92, -1, 139, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, -1, 82, 23, 8, - 8, 16, 8, 8, 8, -1, 8, 8, 8, 78, - 78, -1, -1, 78, 78, 78, 78, -1, -1, -1, - -1, -1, -1, 16, 16 + 15, 143, 143, 49, 15, 12, 20, 5, 5, 164, + 143, 163, 163, 20, 15, 15, 15, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 55, 55, 20, + 20, 20, 171, 5, 5, 5, 5, 5, 5, 22, + 22, 72, 72, 72, 72, 72, 12, 13, 12, 13, + 72, 173, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 124, 124, 101, 124, 72, 149, 46, + 149, 46, 72, 72, 72, 72, 149, 61, 72, 72, + 72, 9, 9, 9, 9, 24, 24, 24, 24, 102, + 124, 124, 124, 124, 138, 138, 72, 14, 48, 161, + 161, 72, 48, 48, 48, 63, 48, 14, 14, 145, + 48, 48, 48, 48, 48, 48, 124, 111, 174, 174, + 29, 14, 14, 18, 14, 84, 14, 84, 84, 84, + 39, 19, 19, 90, 19, 174, 165, 165, 14, 170, + 170, 14, 165, 165, 165, 165, 165, 165, 165, 165, + 165, 165, 174, 83, 83, 124, 22, 19, 28, 124, + 124, 124, 19, 19, 19, 19, 2, 2, 19, 19, + 19, 91, 91, 91, 25, 154, 9, 105, 105, 105, + 105, 37, 105, 9, 108, 123, 14, 25, 25, 25, + 25, 25, 25, 151, 25, 25, 25, 95, 95, 97, + 23, 17, 17, 41, 94, 23, 23, 126, 17, 14, + 82, 175, 175, 17, 141, 9, 9, -1, -1, -1, + 9, 17, 9, 17, 17, 9, 78, 78, 175, 17, + 78, 78, 78, 78, -1, 9, 9, 9, 9, 14, + 9, 17, -1, 9, 9, 5, 5, 80, 80, -1, + -1, -1, 80, -1, 80, -1, 80, 80, 80, -1, + 80, -1, -1, 80, -1, -1, -1, 80, 9, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 87, + 87, 87, 87, 87, 87, -1, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, -1, 14, 23, + 16, 16, 16, 16, 8, 8, -1, 8, 8, 8, + 16, 8, 8, 8, 58, 58, 58, 58, 58, 115, + -1, -1, -1, -1, -1, -1, 115, -1, -1, -1, + -1, -1, -1, 16, 115, 115, 115, 115, 115, -1, + -1, -1, -1, -1, 24, -1, -1, -1, -1, 24, + 24, -1, -1, -1, -1, 16, 16, -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, 105, + 105 ); protected $gotoBase = array( - 0, 0, -203, 0, 0, 221, 208, 10, 512, 7, - 0, 0, 24, 1, 5, -174, 47, -23, 105, 61, - 38, 0, -10, 158, 181, 379, 164, 205, 102, 84, - 0, 0, 0, 0, 0, -43, 0, 107, 0, 104, - 0, 54, -1, 0, 0, 235, -384, 0, -307, 210, - 0, 0, 0, 0, 0, 266, 0, 0, 324, 0, - 0, 286, 0, 103, 298, -236, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -167, 0, 0, 129, 62, - -14, 0, 53, -22, -669, 0, 0, -52, 0, -11, - 0, 0, 68, -299, 0, 52, 0, 0, 0, 262, - 288, 0, 0, 227, -73, 0, 87, 0, 0, 118, - 0, 0, 0, 209, 0, 0, 0, 0, 0, 6, - 0, 108, 15, 0, 46, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 91, 0, 0, 69, - 0, 390, 0, 86, 0, 0, 0, -224, 0, 37, - 0, 0, 77, 0, 0, 0, 0, 0, 0, 70, - -57, -8, 241, 99, 0, 0, -290, 0, 65, 257, - 0, 261, 39, -35, 0, 0 + 0, 0, -297, 0, 0, 226, 196, 159, 517, 7, + 0, 0, -66, -65, 25, -175, 78, -33, 39, 84, + -213, 0, -64, 158, 302, 390, 15, 18, 46, 49, + 0, 0, 0, 0, 0, -356, 0, 67, 0, 32, + 0, -10, -1, 0, 0, 13, -417, 0, -364, 200, + 0, 0, 0, 0, 0, 208, 0, 0, 490, 0, + 0, 256, 0, 85, -14, -236, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -168, 0, 0, 45, 140, + -12, 0, -35, -95, -344, 0, 0, 221, 0, 0, + 27, 92, 0, 0, -11, -287, 0, 19, 0, 0, + 0, 251, 267, 0, 0, 370, -73, 0, 43, 0, + 0, 61, 0, 0, 0, 270, 0, 0, 0, 0, + 0, 6, 0, 40, 16, 0, -7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, + 0, -2, 0, 188, 0, 59, 0, 0, 0, -195, + 0, -19, 0, 0, 35, 0, 0, 0, 0, 0, + 0, 3, -57, -8, 201, 117, 0, 0, -110, 0, + -4, 223, 0, 241, 36, 129, 0, 0 ); protected $gotoDefault = array( - -32768, 499, 711, 4, 712, 905, 788, 797, 583, 515, - 679, 339, 610, 413, 1255, 882, 1078, 565, 816, 1199, - 1207, 446, 819, 324, 701, 864, 865, 866, 391, 376, - 382, 389, 632, 611, 481, 851, 442, 843, 473, 846, - 441, 855, 162, 410, 497, 859, 3, 861, 542, 892, - 377, 869, 378, 656, 871, 550, 873, 874, 385, 392, - 393, 1083, 558, 607, 886, 243, 552, 887, 375, 888, - 895, 380, 383, 665, 453, 492, 486, 403, 1058, 594, - 629, 450, 467, 617, 616, 604, 466, 425, 408, 928, - 474, 451, 942, 341, 950, 709, 1090, 624, 476, 958, - 625, 965, 968, 516, 517, 465, 980, 269, 983, 477, - 1015, 647, 648, 995, 626, 627, 1013, 460, 584, 1021, - 443, 1029, 1243, 444, 1033, 262, 1036, 276, 409, 426, - 1041, 1042, 8, 1048, 671, 672, 10, 273, 496, 1073, - 666, 440, 1089, 430, 1159, 1161, 544, 478, 1179, 1178, - 659, 493, 1184, 1246, 438, 518, 461, 310, 519, 302, - 327, 307, 534, 289, 328, 520, 462, 1252, 1260, 325, - 30, 1280, 1291, 335, 562, 599 + -32768, 500, 710, 4, 711, 904, 787, 796, 582, 516, + 678, 340, 609, 414, 1258, 881, 1081, 564, 815, 1202, + 1210, 447, 818, 324, 700, 863, 864, 865, 392, 377, + 383, 390, 631, 610, 482, 850, 443, 842, 474, 845, + 442, 854, 162, 411, 498, 858, 3, 860, 543, 891, + 378, 868, 379, 655, 870, 549, 872, 873, 386, 393, + 394, 1086, 557, 606, 885, 243, 551, 886, 376, 887, + 894, 381, 384, 664, 454, 493, 487, 404, 1061, 593, + 628, 451, 468, 616, 615, 603, 467, 426, 409, 326, + 923, 931, 475, 452, 945, 342, 953, 708, 1093, 623, + 477, 961, 624, 968, 971, 517, 518, 466, 983, 269, + 986, 478, 1018, 646, 647, 998, 625, 626, 1016, 461, + 583, 1024, 444, 1032, 1246, 445, 1036, 262, 1039, 276, + 410, 427, 1044, 1045, 8, 1051, 670, 671, 10, 273, + 497, 1076, 665, 441, 1092, 431, 1162, 1164, 545, 479, + 1182, 1181, 658, 494, 1187, 1249, 439, 519, 462, 310, + 520, 302, 328, 307, 535, 289, 329, 521, 463, 1255, + 1263, 325, 30, 1283, 1294, 336, 561, 598 ); protected $ruleToNonTerminal = array( @@ -859,23 +871,23 @@ class Php7 extends \PhpParser\ParserAbstract 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 26, 26, 27, 27, 27, 27, 86, 86, - 88, 88, 81, 81, 81, 82, 82, 85, 85, 83, - 83, 89, 90, 90, 56, 56, 64, 64, 67, 67, - 67, 66, 91, 91, 92, 57, 57, 57, 57, 93, - 93, 94, 94, 95, 95, 96, 97, 97, 98, 98, - 99, 99, 54, 54, 50, 50, 101, 52, 52, 102, - 51, 51, 53, 53, 63, 63, 63, 63, 79, 79, - 105, 105, 107, 107, 108, 108, 108, 108, 106, 106, - 106, 110, 110, 110, 110, 87, 87, 113, 113, 113, - 111, 111, 114, 114, 112, 112, 115, 115, 116, 116, - 116, 116, 109, 109, 80, 80, 80, 20, 20, 20, - 118, 117, 117, 119, 119, 119, 119, 59, 120, 120, - 121, 60, 123, 123, 124, 124, 125, 125, 84, 126, - 126, 126, 126, 126, 126, 131, 131, 132, 132, 133, - 133, 133, 133, 133, 134, 135, 135, 130, 130, 127, - 127, 129, 129, 137, 137, 136, 136, 136, 136, 136, - 136, 136, 128, 138, 138, 140, 139, 139, 61, 100, - 141, 141, 55, 55, 42, 42, 42, 42, 42, 42, + 88, 88, 81, 81, 89, 89, 90, 90, 90, 82, + 82, 85, 85, 83, 83, 91, 92, 92, 56, 56, + 64, 64, 67, 67, 67, 66, 93, 93, 94, 57, + 57, 57, 57, 95, 95, 96, 96, 97, 97, 98, + 99, 99, 100, 100, 101, 101, 54, 54, 50, 50, + 103, 52, 52, 104, 51, 51, 53, 53, 63, 63, + 63, 63, 79, 79, 107, 107, 109, 109, 110, 110, + 110, 110, 108, 108, 108, 112, 112, 112, 112, 87, + 87, 115, 115, 115, 113, 113, 116, 116, 114, 114, + 117, 117, 118, 118, 118, 118, 111, 111, 80, 80, + 80, 20, 20, 20, 120, 119, 119, 121, 121, 121, + 121, 59, 122, 122, 123, 60, 125, 125, 126, 126, + 127, 127, 84, 128, 128, 128, 128, 128, 128, 133, + 133, 134, 134, 135, 135, 135, 135, 135, 136, 137, + 137, 132, 132, 129, 129, 131, 131, 139, 139, 138, + 138, 138, 138, 138, 138, 138, 130, 140, 140, 142, + 141, 141, 61, 102, 143, 143, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -884,20 +896,21 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 148, 142, 142, - 147, 147, 150, 151, 151, 152, 153, 153, 153, 19, - 19, 72, 72, 72, 72, 143, 143, 143, 143, 155, - 155, 144, 144, 146, 146, 146, 149, 149, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 161, 161, 104, - 163, 163, 163, 163, 145, 145, 145, 145, 145, 145, - 145, 145, 58, 58, 158, 158, 158, 158, 164, 164, - 154, 154, 154, 165, 165, 165, 165, 165, 165, 73, - 73, 65, 65, 65, 65, 122, 122, 122, 122, 168, - 167, 157, 157, 157, 157, 157, 157, 157, 156, 156, - 156, 166, 166, 166, 166, 103, 162, 170, 170, 169, - 169, 171, 171, 171, 171, 171, 171, 171, 171, 159, - 159, 159, 159, 173, 174, 172, 172, 172, 172, 172, - 172, 172, 172, 175, 175, 175, 175 + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 150, 144, 144, 149, 149, 152, 153, 153, 154, + 155, 155, 155, 19, 19, 72, 72, 72, 72, 145, + 145, 145, 145, 157, 157, 146, 146, 148, 148, 148, + 151, 151, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 163, 163, 106, 165, 165, 165, 165, 147, 147, + 147, 147, 147, 147, 147, 147, 58, 58, 160, 160, + 160, 160, 166, 166, 156, 156, 156, 167, 167, 167, + 167, 167, 167, 73, 73, 65, 65, 65, 65, 124, + 124, 124, 124, 170, 169, 159, 159, 159, 159, 159, + 159, 159, 158, 158, 158, 168, 168, 168, 168, 105, + 164, 172, 172, 171, 171, 173, 173, 173, 173, 173, + 173, 173, 173, 161, 161, 161, 161, 175, 176, 174, + 174, 174, 174, 174, 174, 174, 174, 177, 177, 177, + 177 ); protected $ruleToLength = array( @@ -922,45 +935,46 @@ class Php7 extends \PhpParser\ParserAbstract 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, 1, 8, 9, 8, 7, 6, 8, 0, 2, - 0, 2, 1, 2, 2, 0, 2, 0, 2, 0, - 2, 2, 1, 3, 1, 4, 1, 4, 1, 1, - 4, 2, 1, 3, 3, 3, 4, 4, 5, 0, - 2, 4, 3, 1, 1, 7, 0, 2, 1, 3, - 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, - 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, - 1, 3, 0, 2, 1, 1, 1, 1, 6, 8, - 6, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, - 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, - 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, - 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, - 5, 10, 3, 5, 1, 1, 3, 0, 2, 4, - 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 2, 1, 3, 1, 1, 3, 2, 2, - 3, 1, 0, 1, 1, 3, 3, 3, 4, 1, - 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, + 0, 2, 1, 2, 1, 2, 1, 1, 1, 0, + 2, 0, 2, 0, 2, 2, 1, 3, 1, 4, + 1, 4, 1, 1, 4, 2, 1, 3, 3, 3, + 4, 4, 5, 0, 2, 4, 3, 1, 1, 7, + 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, + 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, + 1, 1, 2, 0, 1, 3, 0, 2, 1, 1, + 1, 1, 6, 8, 6, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, + 3, 3, 1, 2, 1, 1, 0, 1, 0, 2, + 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, + 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, + 2, 0, 1, 5, 5, 10, 3, 5, 1, 1, + 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, + 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, + 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, + 3, 3, 4, 1, 1, 2, 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, 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, 2, 8, - 9, 8, 9, 9, 10, 9, 10, 8, 3, 2, - 0, 4, 2, 1, 3, 2, 2, 2, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, - 1, 0, 3, 0, 1, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, - 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, - 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, - 1, 3, 1, 1, 4, 4, 1, 4, 4, 0, - 1, 1, 1, 3, 3, 1, 4, 2, 2, 1, - 3, 1, 4, 4, 3, 3, 3, 3, 1, 3, - 1, 1, 3, 1, 1, 4, 1, 1, 1, 3, - 1, 1, 2, 1, 3, 4, 3, 2, 0, 2, - 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, - 3, 6, 3, 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, 10, 9, + 10, 8, 3, 2, 0, 4, 2, 1, 3, 2, + 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 0, 3, 0, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 3, 3, 4, 1, 1, 3, 1, 1, + 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, + 1, 1, 1, 1, 1, 3, 1, 1, 4, 4, + 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, + 4, 2, 2, 1, 3, 1, 4, 4, 3, 3, + 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, + 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, + 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, + 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, + 1 ); protected function initReduceCallbacks() { @@ -1633,249 +1647,249 @@ protected function initReduceCallbacks() { $this->semValue = 0; }, 213 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 214 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 215 => function ($stackPos) { - $this->semValue = null; + $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 216 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 217 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 218 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = Stmt\Class_::MODIFIER_READONLY; }, 219 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 220 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 221 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 222 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 223 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array(); }, 224 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 225 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 226 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 227 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 228 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 229 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 230 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 231 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 232 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 233 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = null; }, 234 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 236 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 237 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 238 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 239 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 240 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 241 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 242 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(5-3)]; }, 243 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = array(); }, 244 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 245 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 246 => function ($stackPos) { - $this->semValue = []; + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 247 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 248 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos]; }, 249 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 250 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = []; }, 251 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 252 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 253 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 254 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 255 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 256 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 257 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 258 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 259 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 260 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 261 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array(); }, 262 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 263 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 264 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = null; }, 265 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 266 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = null; }, 267 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 268 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 269 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 270 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 271 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 272 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 273 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 274 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 275 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 276 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = 0; }, 277 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 278 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 279 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); - $this->checkParam($this->semValue); + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 280 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 281 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = Stmt\Class_::MODIFIER_READONLY; }, 282 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->checkParam($this->semValue); }, 283 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->checkParam($this->semValue); }, 284 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, 285 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 286 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 287 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 288 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 289 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 290 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 291 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 292 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 293 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 294 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -1890,73 +1904,73 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 298 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 299 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 300 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 301 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 302 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 303 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 304 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 305 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 306 => function ($stackPos) { $this->semValue = null; }, 307 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 308 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = null; }, 309 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 310 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = null; }, 311 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 312 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 313 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, 314 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 315 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 316 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 317 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 318 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 319 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 320 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 321 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; @@ -1968,625 +1982,625 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 324 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 325 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 326 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 327 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 328 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 329 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 330 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + }, + 331 => function ($stackPos) { + $this->semValue = array(); + }, + 332 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 329 => function ($stackPos) { + 333 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 330 => function ($stackPos) { + 334 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 331 => function ($stackPos) { + 335 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, - 332 => function ($stackPos) { + 336 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 333 => function ($stackPos) { + 337 => function ($stackPos) { $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 334 => function ($stackPos) { + 338 => function ($stackPos) { $this->semValue = null; /* will be skipped */ }, - 335 => function ($stackPos) { + 339 => function ($stackPos) { $this->semValue = array(); }, - 336 => function ($stackPos) { + 340 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 337 => function ($stackPos) { + 341 => function ($stackPos) { $this->semValue = array(); }, - 338 => function ($stackPos) { + 342 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 339 => function ($stackPos) { + 343 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 340 => function ($stackPos) { + 344 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 341 => function ($stackPos) { + 345 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 342 => function ($stackPos) { + 346 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 343 => function ($stackPos) { + 347 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 344 => function ($stackPos) { + 348 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 345 => function ($stackPos) { + 349 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 346 => function ($stackPos) { + 350 => function ($stackPos) { $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, - 347 => function ($stackPos) { + 351 => function ($stackPos) { $this->semValue = null; }, - 348 => function ($stackPos) { + 352 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 349 => function ($stackPos) { + 353 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 350 => function ($stackPos) { + 354 => function ($stackPos) { $this->semValue = 0; }, - 351 => function ($stackPos) { + 355 => function ($stackPos) { $this->semValue = 0; }, - 352 => function ($stackPos) { + 356 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 353 => function ($stackPos) { + 357 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 354 => function ($stackPos) { + 358 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 355 => function ($stackPos) { + 359 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, - 356 => function ($stackPos) { + 360 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, - 357 => function ($stackPos) { + 361 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, - 358 => function ($stackPos) { + 362 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, - 359 => function ($stackPos) { + 363 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, - 360 => function ($stackPos) { + 364 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, - 361 => function ($stackPos) { + 365 => function ($stackPos) { $this->semValue = Stmt\Class_::MODIFIER_READONLY; }, - 362 => function ($stackPos) { + 366 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 363 => function ($stackPos) { + 367 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 364 => function ($stackPos) { + 368 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 365 => function ($stackPos) { + 369 => function ($stackPos) { $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 366 => function ($stackPos) { + 370 => function ($stackPos) { $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 367 => function ($stackPos) { + 371 => function ($stackPos) { $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 368 => function ($stackPos) { + 372 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 369 => function ($stackPos) { + 373 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 370 => function ($stackPos) { + 374 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 371 => function ($stackPos) { + 375 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 372 => function ($stackPos) { + 376 => function ($stackPos) { $this->semValue = array(); }, - 373 => function ($stackPos) { + 377 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 374 => function ($stackPos) { + 378 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 375 => function ($stackPos) { + 379 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 376 => function ($stackPos) { + 380 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 377 => function ($stackPos) { + 381 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 378 => function ($stackPos) { + 382 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 379 => function ($stackPos) { + 383 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 380 => function ($stackPos) { + 384 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 381 => function ($stackPos) { + 385 => function ($stackPos) { $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 382 => function ($stackPos) { + 386 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 383 => function ($stackPos) { + 387 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 384 => function ($stackPos) { + 388 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 385 => function ($stackPos) { + 389 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 386 => function ($stackPos) { + 390 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 387 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 388 => function ($stackPos) { + 392 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 389 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 390 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 391 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 392 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 393 => function ($stackPos) { + 397 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 394 => function ($stackPos) { + 398 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 395 => function ($stackPos) { + 399 => function ($stackPos) { $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { + 400 => function ($stackPos) { $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 397 => function ($stackPos) { + 401 => function ($stackPos) { $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 398 => function ($stackPos) { + 402 => function ($stackPos) { $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 399 => function ($stackPos) { + 403 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 400 => function ($stackPos) { + 404 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 401 => function ($stackPos) { + 405 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 402 => function ($stackPos) { + 406 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 403 => function ($stackPos) { + 407 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 404 => function ($stackPos) { + 408 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 405 => function ($stackPos) { + 409 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 406 => function ($stackPos) { + 410 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 407 => function ($stackPos) { + 411 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 408 => function ($stackPos) { + 412 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 409 => function ($stackPos) { + 413 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 410 => function ($stackPos) { + 414 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 411 => function ($stackPos) { + 415 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 412 => function ($stackPos) { + 416 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 413 => function ($stackPos) { + 417 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 414 => function ($stackPos) { + 418 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 415 => function ($stackPos) { + 419 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 416 => function ($stackPos) { + 420 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 417 => function ($stackPos) { + 421 => function ($stackPos) { $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 418 => function ($stackPos) { + 422 => function ($stackPos) { $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 419 => function ($stackPos) { + 423 => function ($stackPos) { $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 420 => function ($stackPos) { + 424 => function ($stackPos) { $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 421 => function ($stackPos) { + 425 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 422 => function ($stackPos) { + 426 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 423 => function ($stackPos) { + 427 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 424 => function ($stackPos) { + 428 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 425 => function ($stackPos) { + 429 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 426 => function ($stackPos) { + 430 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 427 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 428 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 429 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 431 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 432 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 441 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 443 => function ($stackPos) { + 447 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 444 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 445 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 446 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 447 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 448 => function ($stackPos) { + 452 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 453 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 450 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 452 => function ($stackPos) { + 456 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 457 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 458 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 455 => function ($stackPos) { + 459 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 457 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 458 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 464 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 461 => function ($stackPos) { + 465 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 462 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 463 => function ($stackPos) { + 467 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 464 => function ($stackPos) { + 468 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 465 => function ($stackPos) { + 469 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 466 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 467 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 468 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 469 => function ($stackPos) { + 473 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 470 => function ($stackPos) { + 474 => function ($stackPos) { $this->semValue = array(); }, - 471 => function ($stackPos) { + 475 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 472 => function ($stackPos) { + 476 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 473 => function ($stackPos) { + 477 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 474 => function ($stackPos) { + 478 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 475 => function ($stackPos) { + 479 => function ($stackPos) { $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 476 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 477 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 478 => function ($stackPos) { + 482 => function ($stackPos) { $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 479 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 480 => function ($stackPos) { + 484 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 481 => function ($stackPos) { + 485 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 482 => function ($stackPos) { + 486 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 483 => function ($stackPos) { + 487 => function ($stackPos) { $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 484 => function ($stackPos) { + 488 => function ($stackPos) { $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 485 => function ($stackPos) { + 489 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 486 => function ($stackPos) { + 490 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 487 => function ($stackPos) { + 491 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 488 => function ($stackPos) { + 492 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, - 489 => function ($stackPos) { + 493 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 490 => function ($stackPos) { + 494 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 491 => function ($stackPos) { + 495 => function ($stackPos) { $this->semValue = null; }, - 492 => function ($stackPos) { + 496 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 493 => function ($stackPos) { + 497 => function ($stackPos) { $this->semValue = array(); }, - 494 => function ($stackPos) { + 498 => function ($stackPos) { $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 495 => function ($stackPos) { + 499 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 496 => function ($stackPos) { + 500 => function ($stackPos) { $this->semValue = array(); }, - 497 => function ($stackPos) { + 501 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 498 => function ($stackPos) { + 502 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 499 => function ($stackPos) { + 503 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 500 => function ($stackPos) { + 504 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 501 => function ($stackPos) { + 505 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 502 => function ($stackPos) { + 506 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 503 => function ($stackPos) { + 507 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 504 => function ($stackPos) { + 508 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 505 => function ($stackPos) { + 509 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 506 => function ($stackPos) { + 510 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 507 => function ($stackPos) { + 511 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 508 => function ($stackPos) { + 512 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, - 509 => function ($stackPos) { + 513 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 510 => function ($stackPos) { + 514 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 511 => function ($stackPos) { + 515 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 512 => function ($stackPos) { + 516 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 513 => function ($stackPos) { + 517 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, - 514 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 515 => function ($stackPos) { - $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 517 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, 518 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 519 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 520 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 521 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 522 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 523 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 524 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 525 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 526 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 527 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2595,13 +2609,13 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 530 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 531 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 532 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2610,192 +2624,204 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 534 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 536 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 537 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 538 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 539 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 540 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 543 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = null; }, 544 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 545 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 546 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 548 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 549 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 550 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 551 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 552 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 553 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 554 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 555 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 556 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 557 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 558 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 559 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 560 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 561 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 562 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 563 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 564 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 565 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 566 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 567 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 568 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 569 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 570 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, 571 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 572 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 573 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 574 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 575 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 576 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 577 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 578 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 579 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 580 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 581 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 582 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = null; }, 583 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 584 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 585 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 586 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 587 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 588 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 589 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 590 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 591 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 592 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 593 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 594 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 595 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 596 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 597 => function ($stackPos) { + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 598 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 599 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 600 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 5ee5a64bbd..d485d78de4 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -875,6 +875,15 @@ protected function createCommentNopAttributes(array $comments) { return $attributes; } + protected function checkClassModifier($a, $b, $modifierPos) { + try { + Class_::verifyClassModifier($a, $b); + } catch (Error $error) { + $error->setAttributes($this->getAttributesAt($modifierPos)); + $this->emitError($error); + } + } + protected function checkModifier($a, $b, $modifierPos) { // Jumping through some hoops here because verifyModifier() is also used elsewhere try { diff --git a/test/PhpParser/Builder/ClassTest.php b/test/PhpParser/Builder/ClassTest.php index cc362b09eb..67cae5d843 100644 --- a/test/PhpParser/Builder/ClassTest.php +++ b/test/PhpParser/Builder/ClassTest.php @@ -68,6 +68,20 @@ public function testFinal() { ); } + public function testReadonly() { + $node = $this->createClassBuilder('Test') + ->makeReadonly() + ->getNode() + ; + + $this->assertEquals( + new Stmt\Class_('Test', [ + 'flags' => Stmt\Class_::MODIFIER_READONLY + ]), + $node + ); + } + public function testStatementOrder() { $method = new Stmt\ClassMethod('testMethod'); $property = new Stmt\Property( diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index 461bb71eb2..7754f8c3fc 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -1521,4 +1521,4 @@ array( ) ) ) -) +) \ No newline at end of file diff --git a/test/code/parser/stmt/class/constModifierErrors.test b/test/code/parser/stmt/class/constModifierErrors.test index 8b6abec291..09e5404821 100644 --- a/test/code/parser/stmt/class/constModifierErrors.test +++ b/test/code/parser/stmt/class/constModifierErrors.test @@ -150,4 +150,4 @@ array( ) ) ) -) +) \ No newline at end of file diff --git a/test/code/parser/stmt/class/modifier.test b/test/code/parser/stmt/class/modifier.test index 258f2c279e..0d26cb1674 100644 --- a/test/code/parser/stmt/class/modifier.test +++ b/test/code/parser/stmt/class/modifier.test @@ -66,7 +66,7 @@ array( ) ) ----- - Date: Tue, 31 May 2022 22:59:12 +0200 Subject: [PATCH 064/428] Release PHP-Parser 4.14.0 --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd543ab21e..ce80520cfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,17 @@ -Version 4.13.3-dev +Version 4.14.1-dev ------------------ Nothing yet. +Version 4.14.0 (2022-05-31) +--------------------------- + +### Added + +* Added support for readonly classes. +* Added `rawValue` attribute to `LNumber`, `DNumber` and `String_` nodes, which stores the unparsed + value of the literal (e.g. `"1_000"` rather than `1000`). + Version 4.13.2 (2021-11-30) --------------------------- From e727475d082c6956b7e9858849173a98aaba21b5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 31 May 2022 23:18:32 +0200 Subject: [PATCH 065/428] Support readonly as function name This special case was added after the PHP 8.1 release. --- .../Lexer/TokenEmulator/ReadonlyTokenEmulator.php | 15 ++++++++++++++- test/PhpParser/Lexer/EmulativeTest.php | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php index b97f8d1126..539a2bcfb8 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php @@ -20,4 +20,17 @@ public function getKeywordToken(): int { return \T_READONLY; } -} \ No newline at end of file + + protected function isKeywordContext(array $tokens, int $pos): bool + { + if (!parent::isKeywordContext($tokens, $pos)) { + return false; + } + // Support "function readonly(" + return !(isset($tokens[$pos + 1]) && + ($tokens[$pos + 1][0] === '(' || + ($tokens[$pos + 1][0] === \T_WHITESPACE && + isset($tokens[$pos + 2]) && + $tokens[$pos + 2][0] === '('))); + } +} diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index 17a7bc7894..384061402e 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -354,6 +354,20 @@ public function provideTestLexNewFeatures() { ['0o1000000000000000000000', [ [Tokens::T_DNUMBER, '0o1000000000000000000000'], ]], + ['readonly class', [ + [Tokens::T_READONLY, 'readonly'], + [Tokens::T_CLASS, 'class'], + ]], + ['function readonly(', [ + [Tokens::T_FUNCTION, 'function'], + [Tokens::T_STRING, 'readonly'], + [ord('('), '('], + ]], + ['function readonly (', [ + [Tokens::T_FUNCTION, 'function'], + [Tokens::T_STRING, 'readonly'], + [ord('('), '('], + ]], ]; } From cdb731fa8b8967e4d28c5622aa1b0fd704a5c893 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 31 May 2022 23:06:22 +0200 Subject: [PATCH 066/428] Update integration test target to 8.1 --- .github/workflows/main.yml | 4 ++-- test_old/run.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7eedbce017..b55f4c6850 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,7 +74,7 @@ jobs: run: "test_old/run-php-src.sh 7.3.21" test_old_80_70: runs-on: "ubuntu-latest" - name: "PHP 8.0 Code on PHP 7.0 Integration Tests" + name: "PHP 8.1 Code on PHP 7.0 Integration Tests" steps: - name: "Checkout" uses: "actions/checkout@v2" @@ -87,4 +87,4 @@ jobs: - name: "Install PHP 8 dependencies" run: "composer update --no-progress --prefer-dist" - name: "Tests" - run: "test_old/run-php-src.sh 8.0.0" + run: "test_old/run-php-src.sh 8.1.6" diff --git a/test_old/run.php b/test_old/run.php index 8dac907874..bcacab3826 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -98,7 +98,9 @@ function showHelp($error) { # pretty print difference due to INF vs 1e1000 | ext.standard.tests.general_functions.bug27678 | tests.lang.bug24640 +| tests.lang.integer_literals.(binary|octal|hexadecimal)_(32|64)bit | Zend.tests.bug74947 +| Zend.tests.float_to_int.union_int_string_type_arg # pretty print differences due to negative LNumbers | Zend.tests.neg_num_string | Zend.tests.numeric_strings.neg_num_string From 1f416d90527c49ac54d4c1be2283964872ac004c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 4 Jun 2022 12:20:20 +0200 Subject: [PATCH 067/428] Target PHP-Parser 5.0 --- CHANGELOG.md | 5 +++++ UPGRADE-5.0.md | 3 +++ composer.json | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 UPGRADE-5.0.md diff --git a/CHANGELOG.md b/CHANGELOG.md index ce80520cfb..97e9051e0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +Version 5.0.0-dev +----------------- + +Nothing yet. + Version 4.14.1-dev ------------------ diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md new file mode 100644 index 0000000000..8405030a9b --- /dev/null +++ b/UPGRADE-5.0.md @@ -0,0 +1,3 @@ +Upgrading from PHP-Parser 4.x to 5.0 +==================================== + diff --git a/composer.json b/composer.json index 2fd064a212..d8099d5d56 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ }, "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { From 5466ee365f8a04beb956331295d88e4ef1267eeb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 4 Jun 2022 12:27:41 +0200 Subject: [PATCH 068/428] Drop support for running on PHP 7.0 --- .github/workflows/main.yml | 14 +++++--------- CHANGELOG.md | 4 +++- UPGRADE-5.0.md | 3 +++ composer.json | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b55f4c6850..3ce2132935 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,9 +5,9 @@ on: pull_request: jobs: - tests_70: + tests_coverage: runs-on: "ubuntu-latest" - name: "PHP 7.0 Unit Tests" + name: "PHP 7.1 Unit Tests (with coverage)" steps: - name: "Checkout" uses: "actions/checkout@v2" @@ -15,7 +15,7 @@ jobs: uses: "shivammathur/setup-php@v2" with: coverage: "xdebug" - php-version: "7.0" + php-version: "7.1" tools: composer:v2 - name: "Install dependencies" run: | @@ -34,15 +34,11 @@ jobs: strategy: matrix: php-version: - - "7.1" - "7.2" - "7.3" - "7.4" - "8.0" - "8.1" - include: - - php-version: "8.1" - flags: "--ignore-platform-req=php" steps: - name: "Checkout" uses: "actions/checkout@v2" @@ -74,7 +70,7 @@ jobs: run: "test_old/run-php-src.sh 7.3.21" test_old_80_70: runs-on: "ubuntu-latest" - name: "PHP 8.1 Code on PHP 7.0 Integration Tests" + name: "PHP 8.1 Code on PHP 7.1 Integration Tests" steps: - name: "Checkout" uses: "actions/checkout@v2" @@ -82,7 +78,7 @@ jobs: uses: "shivammathur/setup-php@v2" with: coverage: "none" - php-version: "7.0" + php-version: "7.1" tools: composer:v2 - name: "Install PHP 8 dependencies" run: "composer update --no-progress --prefer-dist" diff --git a/CHANGELOG.md b/CHANGELOG.md index 97e9051e0f..81c7f120f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ Version 5.0.0-dev ----------------- -Nothing yet. +### Changed + +* PHP 7.1 is now required to run PHP-Parser (however, older versions can still be parsed). Version 4.14.1-dev ------------------ diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 8405030a9b..85ad39baf1 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -1,3 +1,6 @@ Upgrading from PHP-Parser 4.x to 5.0 ==================================== +### PHP version requirements + +PHP-Parser now requires PHP 7.1 or newer to run. It is however still possible to *parse* code for older versions, while running on a newer version. diff --git a/composer.json b/composer.json index d8099d5d56..c73602859d 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ } ], "require": { - "php": ">=7.0", + "php": ">=7.1", "ext-tokenizer": "*" }, "require-dev": { From 2d589921f23d869846a52c541247e0bafca61ab3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 4 Jun 2022 12:44:36 +0200 Subject: [PATCH 069/428] Fix incorrect doc type --- lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php index ea261cc178..f8e8362909 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php @@ -33,7 +33,7 @@ public function emulate(string $code, array $tokens): array /** * @param mixed[] $tokens - * @return mixed[]|null + * @return array|string|null */ private function getPreviousNonSpaceToken(array $tokens, int $start) { From 9c5eb3ccba9b1b2b92a8fecc0a7cd9af6ee3a597 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 4 Jun 2022 12:48:12 +0200 Subject: [PATCH 070/428] Add some missing type annotations --- lib/PhpParser/ConstExprEvaluationException.php | 2 +- lib/PhpParser/ConstExprEvaluator.php | 2 +- lib/PhpParser/Internal/Differ.php | 6 +++--- lib/PhpParser/Internal/TokenStream.php | 8 ++++---- lib/PhpParser/NameContext.php | 4 ++-- lib/PhpParser/Node.php | 2 +- lib/PhpParser/Node/Expr/Ternary.php | 2 +- lib/PhpParser/Node/FunctionLike.php | 2 +- lib/PhpParser/Node/MatchArm.php | 2 +- lib/PhpParser/Node/Scalar/String_.php | 2 +- lib/PhpParser/Node/Stmt/Case_.php | 2 +- lib/PhpParser/Node/Stmt/ClassLike.php | 4 ++-- lib/PhpParser/Node/Stmt/ClassMethod.php | 2 +- lib/PhpParser/Node/Stmt/Namespace_.php | 2 +- lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php | 2 +- lib/PhpParser/NodeAbstract.php | 2 +- lib/PhpParser/NodeDumper.php | 2 +- lib/PhpParser/NodeFinder.php | 4 ++-- lib/PhpParser/NodeVisitor/FindingVisitor.php | 2 +- lib/PhpParser/NodeVisitor/FirstFindingVisitor.php | 4 ++-- lib/PhpParser/NodeVisitor/NameResolver.php | 2 +- lib/PhpParser/Parser.php | 2 +- lib/PhpParser/Parser/Multiple.php | 2 +- lib/PhpParser/ParserAbstract.php | 6 +++--- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- lib/PhpParser/PrettyPrinterAbstract.php | 10 +++++----- test/PhpParser/NodeVisitorForTesting.php | 6 +++--- test/PhpParser/Parser/MultipleTest.php | 4 ++-- test/bootstrap.php | 2 +- test/updateTests.php | 2 +- 30 files changed, 48 insertions(+), 48 deletions(-) diff --git a/lib/PhpParser/ConstExprEvaluationException.php b/lib/PhpParser/ConstExprEvaluationException.php index 49c92d5950..ce5f9b2b71 100644 --- a/lib/PhpParser/ConstExprEvaluationException.php +++ b/lib/PhpParser/ConstExprEvaluationException.php @@ -1,4 +1,4 @@ -calculateTrace($old, $new); return $this->extractDiff($trace, $x, $y, $old, $new); } @@ -47,7 +47,7 @@ public function diff(array $old, array $new) { * * @return DiffElem[] Diff (edit script), including replace operations */ - public function diffWithReplacements(array $old, array $new) { + public function diffWithReplacements(array $old, array $new): array { return $this->coalesceReplacements($this->diff($old, $new)); } @@ -125,7 +125,7 @@ private function extractDiff(array $trace, int $x, int $y, array $a, array $b) { * @param DiffElem[] $diff * @return DiffElem[] */ - private function coalesceReplacements(array $diff) { + private function coalesceReplacements(array $diff): array { $newDiff = []; $c = \count($diff); for ($i = 0; $i < $c; $i++) { diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index 84c0175ec5..d504aa2858 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -143,7 +143,7 @@ public function skipRight(int $pos, $skipTokenType) { * @param int $pos Token position * @return int Non-whitespace token position */ - public function skipLeftWhitespace(int $pos) { + public function skipLeftWhitespace(int $pos): int { $tokens = $this->tokens; for (; $pos >= 0; $pos--) { $type = $tokens[$pos][0]; @@ -160,7 +160,7 @@ public function skipLeftWhitespace(int $pos) { * @param int $pos Token position * @return int Non-whitespace token position */ - public function skipRightWhitespace(int $pos) { + public function skipRightWhitespace(int $pos): int { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { $type = $tokens[$pos][0]; @@ -190,7 +190,7 @@ public function findRight(int $pos, $findTokenType) { * @param int|string $tokenType Token type to look for * @return bool Whether the token occurs in the given range */ - public function haveTokenInRange(int $startPos, int $endPos, $tokenType) { + public function haveTokenInRange(int $startPos, int $endPos, $tokenType): bool { $tokens = $this->tokens; for ($pos = $startPos; $pos < $endPos; $pos++) { if ($tokens[$pos][0] === $tokenType) { @@ -258,7 +258,7 @@ public function getTokenCode(int $from, int $to, int $indent) : string { * * @return int[] Token position to indentation map */ - private function calcIndentMap() { + private function calcIndentMap(): array { $indentMap = []; $indent = 0; foreach ($this->tokens as $token) { diff --git a/lib/PhpParser/NameContext.php b/lib/PhpParser/NameContext.php index 777a4afdee..07c76a493e 100644 --- a/lib/PhpParser/NameContext.php +++ b/lib/PhpParser/NameContext.php @@ -87,7 +87,7 @@ public function addAlias(Name $name, string $aliasName, int $type, array $errorA * * @return null|Name Namespace (or null if global namespace) */ - public function getNamespace() { + public function getNamespace(): ?Name { return $this->namespace; } @@ -99,7 +99,7 @@ public function getNamespace() { * * @return null|Name Resolved name, or null if static resolution is not possible */ - public function getResolvedName(Name $name, int $type) { + public function getResolvedName(Name $name, int $type): ?Name { // don't resolve special class names if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) { if (!$name->isUnqualified()) { diff --git a/lib/PhpParser/Node.php b/lib/PhpParser/Node.php index befb256504..0e7683380c 100644 --- a/lib/PhpParser/Node.php +++ b/lib/PhpParser/Node.php @@ -97,7 +97,7 @@ public function getComments() : array; * * @return null|Comment\Doc Doc comment object or null */ - public function getDocComment(); + public function getDocComment(): ?Comment\Doc; /** * Sets the doc comment of the node. diff --git a/lib/PhpParser/Node/Expr/Ternary.php b/lib/PhpParser/Node/Expr/Ternary.php index 9316f47d4d..b3bec472e3 100644 --- a/lib/PhpParser/Node/Expr/Ternary.php +++ b/lib/PhpParser/Node/Expr/Ternary.php @@ -21,7 +21,7 @@ class Ternary extends Expr * @param Expr $else Expression for false * @param array $attributes Additional attributes */ - public function __construct(Expr $cond, $if, Expr $else, array $attributes = []) { + public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->if = $if; diff --git a/lib/PhpParser/Node/FunctionLike.php b/lib/PhpParser/Node/FunctionLike.php index 5a825e7311..f75ad3bd24 100644 --- a/lib/PhpParser/Node/FunctionLike.php +++ b/lib/PhpParser/Node/FunctionLike.php @@ -32,7 +32,7 @@ public function getReturnType(); * * @return Stmt[]|null */ - public function getStmts(); + public function getStmts(): ?array; /** * Get PHP attribute groups. diff --git a/lib/PhpParser/Node/MatchArm.php b/lib/PhpParser/Node/MatchArm.php index 2ae1c86b85..b0d4bab6e8 100644 --- a/lib/PhpParser/Node/MatchArm.php +++ b/lib/PhpParser/Node/MatchArm.php @@ -15,7 +15,7 @@ class MatchArm extends NodeAbstract /** * @param null|Node\Expr[] $conds */ - public function __construct($conds, Node\Expr $body, array $attributes = []) { + public function __construct(?array $conds, Node\Expr $body, array $attributes = []) { $this->conds = $conds; $this->body = $body; $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Scalar/String_.php b/lib/PhpParser/Node/Scalar/String_.php index 6690a16bfb..5c27a27ef9 100644 --- a/lib/PhpParser/Node/Scalar/String_.php +++ b/lib/PhpParser/Node/Scalar/String_.php @@ -98,7 +98,7 @@ public static function parse(string $str, bool $parseUnicodeEscape = true) : str * * @return string String with escape sequences parsed */ - public static function parseEscapeSequences(string $str, $quote, bool $parseUnicodeEscape = true) : string { + public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = true) : string { if (null !== $quote) { $str = str_replace('\\' . $quote, $quote, $str); } diff --git a/lib/PhpParser/Node/Stmt/Case_.php b/lib/PhpParser/Node/Stmt/Case_.php index 2bf044c900..8c1ea685a2 100644 --- a/lib/PhpParser/Node/Stmt/Case_.php +++ b/lib/PhpParser/Node/Stmt/Case_.php @@ -18,7 +18,7 @@ class Case_ extends Node\Stmt * @param Node\Stmt[] $stmts Statements * @param array $attributes Additional attributes */ - public function __construct($cond, array $stmts = [], array $attributes = []) { + public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; diff --git a/lib/PhpParser/Node/Stmt/ClassLike.php b/lib/PhpParser/Node/Stmt/ClassLike.php index 2fa4e861b3..2a6e5b3f93 100644 --- a/lib/PhpParser/Node/Stmt/ClassLike.php +++ b/lib/PhpParser/Node/Stmt/ClassLike.php @@ -62,7 +62,7 @@ public function getProperties() : array { * * @return Property|null Property node or null if the property does not exist */ - public function getProperty(string $name) { + public function getProperty(string $name): ?Property { foreach ($this->stmts as $stmt) { if ($stmt instanceof Property) { foreach ($stmt->props as $prop) { @@ -97,7 +97,7 @@ public function getMethods() : array { * * @return ClassMethod|null Method node or null if the method does not exist */ - public function getMethod(string $name) { + public function getMethod(string $name): ?ClassMethod { $lowerName = strtolower($name); foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) { diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index 09b877a929..e2064286eb 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -81,7 +81,7 @@ public function getReturnType() { return $this->returnType; } - public function getStmts() { + public function getStmts(): ?array { return $this->stmts; } diff --git a/lib/PhpParser/Node/Stmt/Namespace_.php b/lib/PhpParser/Node/Stmt/Namespace_.php index c63204577c..c93aa4c332 100644 --- a/lib/PhpParser/Node/Stmt/Namespace_.php +++ b/lib/PhpParser/Node/Stmt/Namespace_.php @@ -22,7 +22,7 @@ class Namespace_ extends Node\Stmt * @param null|Node\Stmt[] $stmts Statements * @param array $attributes Additional attributes */ - public function __construct(Node\Name $name = null, $stmts = [], array $attributes = []) { + public function __construct(Node\Name $name = null, ?array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->name = $name; $this->stmts = $stmts; diff --git a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php index a3bccbd10c..f285640a82 100644 --- a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +++ b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php @@ -20,7 +20,7 @@ class Alias extends Node\Stmt\TraitUseAdaptation * @param null|string|Node\Identifier $newName New name * @param array $attributes Additional attributes */ - public function __construct($trait, $method, $newModifier, $newName, array $attributes = []) { + public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) { $this->attributes = $attributes; $this->trait = $trait; $this->method = \is_string($method) ? new Node\Identifier($method) : $method; diff --git a/lib/PhpParser/NodeAbstract.php b/lib/PhpParser/NodeAbstract.php index 04514da116..02ef56eb52 100644 --- a/lib/PhpParser/NodeAbstract.php +++ b/lib/PhpParser/NodeAbstract.php @@ -110,7 +110,7 @@ public function getComments() : array { * * @return null|Comment\Doc Doc comment object or null */ - public function getDocComment() { + public function getDocComment(): ?Comment\Doc { $comments = $this->getComments(); for ($i = count($comments) - 1; $i >= 0; $i--) { $comment = $comments[$i]; diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index ba622efd12..c5b980d3f9 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -174,7 +174,7 @@ protected function dumpUseType($type) { * * @return string|null Dump of position, or null if position information not available */ - protected function dumpPosition(Node $node) { + protected function dumpPosition(Node $node): ?string { if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) { return null; } diff --git a/lib/PhpParser/NodeFinder.php b/lib/PhpParser/NodeFinder.php index 2e7cfdad4d..2bb96ed504 100644 --- a/lib/PhpParser/NodeFinder.php +++ b/lib/PhpParser/NodeFinder.php @@ -51,7 +51,7 @@ public function findInstanceOf($nodes, string $class) : array { * * @return null|Node Found node (or null if none found) */ - public function findFirst($nodes, callable $filter) { + public function findFirst($nodes, callable $filter): ?Node { if (!is_array($nodes)) { $nodes = [$nodes]; } @@ -73,7 +73,7 @@ public function findFirst($nodes, callable $filter) { * * @return null|Node Found node, which is an instance of $class (or null if none found) */ - public function findFirstInstanceOf($nodes, string $class) { + public function findFirstInstanceOf($nodes, string $class): ?Node { return $this->findFirst($nodes, function ($node) use ($class) { return $node instanceof $class; }); diff --git a/lib/PhpParser/NodeVisitor/FindingVisitor.php b/lib/PhpParser/NodeVisitor/FindingVisitor.php index 9531edbce7..38abbdb7f5 100644 --- a/lib/PhpParser/NodeVisitor/FindingVisitor.php +++ b/lib/PhpParser/NodeVisitor/FindingVisitor.php @@ -31,7 +31,7 @@ public function getFoundNodes() : array { return $this->foundNodes; } - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes): ?array { $this->foundNodes = []; return null; diff --git a/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php index 596a7d7fd5..19d6247a1b 100644 --- a/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ b/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php @@ -28,11 +28,11 @@ public function __construct(callable $filterCallback) { * * @return null|Node Found node (or null if not found) */ - public function getFoundNode() { + public function getFoundNode(): ?Node { return $this->foundNode; } - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes): ?array { $this->foundNode = null; return null; diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index 8e259c57b6..b4abbe1cd5 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -50,7 +50,7 @@ public function getNameContext() : NameContext { return $this->nameContext; } - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes): ?array { $this->nameContext->startNamespace(); return null; } diff --git a/lib/PhpParser/Parser.php b/lib/PhpParser/Parser.php index 8956c76718..6a1117af8c 100644 --- a/lib/PhpParser/Parser.php +++ b/lib/PhpParser/Parser.php @@ -14,5 +14,5 @@ interface Parser * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * the parser was unable to recover from an error). */ - public function parse(string $code, ErrorHandler $errorHandler = null); + public function parse(string $code, ErrorHandler $errorHandler = null): ?array; } diff --git a/lib/PhpParser/Parser/Multiple.php b/lib/PhpParser/Parser/Multiple.php index 77fd1f3fbb..be4c5bea19 100644 --- a/lib/PhpParser/Parser/Multiple.php +++ b/lib/PhpParser/Parser/Multiple.php @@ -24,7 +24,7 @@ public function __construct(array $parsers) { $this->parsers = $parsers; } - public function parse(string $code, ErrorHandler $errorHandler = null) { + public function parse(string $code, ErrorHandler $errorHandler = null): ?array { if (null === $errorHandler) { $errorHandler = new ErrorHandler\Throwing; } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index d485d78de4..e07a0e3cfc 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -152,7 +152,7 @@ public function __construct(Lexer $lexer, array $options = []) { * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * the parser was unable to recover from an error). */ - public function parse(string $code, ErrorHandler $errorHandler = null) { + public function parse(string $code, ErrorHandler $errorHandler = null): ?array { $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing; $this->lexer->startLexing($code, $this->errorHandler); @@ -553,7 +553,7 @@ private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt) { * * @return null|string One of "semicolon", "brace" or null (no namespaces) */ - private function getNamespacingStyle(array $stmts) { + private function getNamespacingStyle(array $stmts): ?string { $style = null; $hasNotAllowedStmts = false; foreach ($stmts as $i => $stmt) { @@ -853,7 +853,7 @@ protected function parseDocString( * @param Comment[] $comments * @return array */ - protected function createCommentNopAttributes(array $comments) { + protected function createCommentNopAttributes(array $comments): array { $comment = $comments[count($comments) - 1]; $commentEndLine = $comment->getEndLine(); $commentEndFilePos = $comment->getEndFilePos(); diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index bb70de6595..d8aedc9498 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -1076,7 +1076,7 @@ protected function pNewVariable(Node $node) { * @param Node[] $nodes * @return bool */ - protected function hasNodeWithComments(array $nodes) { + protected function hasNodeWithComments(array $nodes): bool { foreach ($nodes as $node) { if ($node && $node->getComments()) { return true; diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 2c7fc3070c..590bcb405e 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -515,7 +515,7 @@ protected function pFallback(Node $node) { * * @return string Pretty printed node */ - protected function p(Node $node, $parentFormatPreserved = false) : string { + protected function p(Node $node, bool $parentFormatPreserved = false) : string { // No orig tokens means this is a normal pretty print without preservation of formatting if (!$this->origTokens) { return $this->{'p' . $node->getType()}($node); @@ -698,8 +698,8 @@ protected function p(Node $node, $parentFormatPreserved = false) : string { */ protected function pArray( array $nodes, array $origNodes, int &$pos, int $indentAdjustment, - string $parentNodeType, string $subNodeName, $fixup - ) { + string $parentNodeType, string $subNodeName, ?int $fixup + ): ?string { $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); $mapKey = $parentNodeType . '->' . $subNodeName; @@ -948,7 +948,7 @@ protected function pArray( * * @return string Result of fixed-up print of subnode */ - protected function pFixup(int $fixup, Node $subNode, $parentClass, int $subStartPos, int $subEndPos) : string { + protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos) : string { switch ($fixup) { case self::FIXUP_PREC_LEFT: case self::FIXUP_PREC_RIGHT: @@ -1072,7 +1072,7 @@ protected function dereferenceLhsRequiresParens(Node $node) : bool { * * @return string Printed modifiers */ - protected function pModifiers(int $modifiers) { + protected function pModifiers(int $modifiers): string { return ($modifiers & Stmt\Class_::MODIFIER_PUBLIC ? 'public ' : '') . ($modifiers & Stmt\Class_::MODIFIER_PROTECTED ? 'protected ' : '') . ($modifiers & Stmt\Class_::MODIFIER_PRIVATE ? 'private ' : '') diff --git a/test/PhpParser/NodeVisitorForTesting.php b/test/PhpParser/NodeVisitorForTesting.php index 1383aa34c3..ef27814cc2 100644 --- a/test/PhpParser/NodeVisitorForTesting.php +++ b/test/PhpParser/NodeVisitorForTesting.php @@ -1,4 +1,4 @@ -returnsPos = 0; } - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes): ?array { return $this->traceEvent('beforeTraverse', $nodes); } @@ -24,7 +24,7 @@ public function leaveNode(Node $node) { return $this->traceEvent('leaveNode', $node); } - public function afterTraverse(array $nodes) { + public function afterTraverse(array $nodes): ?array { return $this->traceEvent('afterTraverse', $nodes); } diff --git a/test/PhpParser/Parser/MultipleTest.php b/test/PhpParser/Parser/MultipleTest.php index 46d1b35dff..a65f0294a8 100644 --- a/test/PhpParser/Parser/MultipleTest.php +++ b/test/PhpParser/Parser/MultipleTest.php @@ -83,12 +83,12 @@ public function testThrownError() { $this->expectExceptionMessage('FAIL A'); $parserA = new class implements \PhpParser\Parser { - public function parse(string $code, ErrorHandler $errorHandler = null) { + public function parse(string $code, ErrorHandler $errorHandler = null): ?array { throw new Error('FAIL A'); } }; $parserB = new class implements \PhpParser\Parser { - public function parse(string $code, ErrorHandler $errorHandler = null) { + public function parse(string $code, ErrorHandler $errorHandler = null): ?array { throw new Error('FAIL B'); } }; diff --git a/test/bootstrap.php b/test/bootstrap.php index 0bfa9d0ad7..a45a1ed06a 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -1,4 +1,4 @@ - Date: Sat, 4 Jun 2022 13:01:02 +0200 Subject: [PATCH 071/428] Remove space before return type in pretty printer --- UPGRADE-5.0.md | 18 ++++++++++++++++++ lib/PhpParser/PrettyPrinter/Standard.php | 6 +++--- .../PhpParser/NodeVisitor/NameResolverTest.php | 16 ++++++++-------- .../stmt/function_signatures.test | 6 +++--- .../prettyPrinter/stmt/intersection_types.test | 2 +- .../prettyPrinter/stmt/nullable_types.test | 2 +- test/code/prettyPrinter/stmt/staticType.test | 2 +- test/code/prettyPrinter/stmt/union_types.test | 2 +- 8 files changed, 36 insertions(+), 18 deletions(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 85ad39baf1..fa07714ea1 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -4,3 +4,21 @@ Upgrading from PHP-Parser 4.x to 5.0 ### PHP version requirements PHP-Parser now requires PHP 7.1 or newer to run. It is however still possible to *parse* code for older versions, while running on a newer version. + +### Changes to the default pretty printer + +A number of changes to the standard pretty printer have been made, to make it match contemporary coding style conventions (and in particular PSR-12). Options to restore the previous behavior are not provided, but it is possible to extend the override the formatting methods (such as `pStmt_ClassMethod`) with your preferred formatting. + +Return types are now formatted without a space before the `:`: + +```php +# Before +function test() : Type +{ +} + +# After +function test(): Type +{ +} +``` diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index d8aedc9498..5739c4acae 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -623,7 +623,7 @@ protected function pExpr_Closure(Expr\Closure $node) { . 'function ' . ($node->byRef ? '&' : '') . '(' . $this->pCommaSeparated($node->params) . ')' . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')' : '') - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; } @@ -797,7 +797,7 @@ protected function pStmt_ClassMethod(Stmt\ClassMethod $node) { . $this->pModifiers($node->flags) . 'function ' . ($node->byRef ? '&' : '') . $node->name . '(' . $this->pMaybeMultiline($node->params) . ')' - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . (null !== $node->stmts ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); @@ -813,7 +813,7 @@ protected function pStmt_Function(Stmt\Function_ $node) { return $this->pAttrGroups($node->attrGroups) . 'function ' . ($node->byRef ? '&' : '') . $node->name . '(' . $this->pCommaSeparated($node->params) . ')' - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index b5035ce3fe..58f558f2bf 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -267,9 +267,9 @@ class A extends \NS\B implements \NS\C, \NS\D #[\NS\X] interface A extends \NS\C, \NS\D { - public function a(\NS\A $a) : \NS\A; - public function b(\NS\A|\NS\B|int $a) : \NS\A|\NS\B|int; - public function c(\NS\A&\NS\B $a) : \NS\A&\NS\B; + public function a(\NS\A $a): \NS\A; + public function b(\NS\A|\NS\B|int $a): \NS\A|\NS\B|int; + public function c(\NS\A&\NS\B $a): \NS\A&\NS\B; } #[\NS\X] enum E : int @@ -282,19 +282,19 @@ trait A { } #[\NS\X] -function f(#[\NS\X] \NS\A $a) : \NS\A +function f(#[\NS\X] \NS\A $a): \NS\A { } -function f2(array $a) : array +function f2(array $a): array { } -function fn3(?\NS\A $a) : ?\NS\A +function fn3(?\NS\A $a): ?\NS\A { } -function fn4(?array $a) : ?array +function fn4(?array $a): ?array { } -#[\NS\X] function (\NS\A $a) : \NS\A { +#[\NS\X] function (\NS\A $a): \NS\A { }; #[\NS\X] fn(array $a): array => $a; fn(\NS\A $a): \NS\A => $a; diff --git a/test/code/prettyPrinter/stmt/function_signatures.test b/test/code/prettyPrinter/stmt/function_signatures.test index af1088a051..d322486221 100644 --- a/test/code/prettyPrinter/stmt/function_signatures.test +++ b/test/code/prettyPrinter/stmt/function_signatures.test @@ -37,7 +37,7 @@ interface 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; + function f13($a): array; + function f14($a): callable; + function f15($a): B\C; } diff --git a/test/code/prettyPrinter/stmt/intersection_types.test b/test/code/prettyPrinter/stmt/intersection_types.test index fcb18c20f4..9a53c10c5f 100644 --- a/test/code/prettyPrinter/stmt/intersection_types.test +++ b/test/code/prettyPrinter/stmt/intersection_types.test @@ -13,6 +13,6 @@ class Test { public A&B $prop; } -function test(A&B $a) : A&B +function test(A&B $a): A&B { } \ No newline at end of file diff --git a/test/code/prettyPrinter/stmt/nullable_types.test b/test/code/prettyPrinter/stmt/nullable_types.test index 6a40e2019a..1490db995c 100644 --- a/test/code/prettyPrinter/stmt/nullable_types.test +++ b/test/code/prettyPrinter/stmt/nullable_types.test @@ -6,6 +6,6 @@ function test(?Foo $bar, ?string $foo, ?\Xyz $zyx) : ?Baz } ----- !!php7 -function test(?Foo $bar, ?string $foo, ?\Xyz $zyx) : ?Baz +function test(?Foo $bar, ?string $foo, ?\Xyz $zyx): ?Baz { } \ No newline at end of file diff --git a/test/code/prettyPrinter/stmt/staticType.test b/test/code/prettyPrinter/stmt/staticType.test index 105be272fd..b8fa489b9d 100644 --- a/test/code/prettyPrinter/stmt/staticType.test +++ b/test/code/prettyPrinter/stmt/staticType.test @@ -8,7 +8,7 @@ class Test { !!php7 class Test { - public static function create() : static + public static function create(): static { } } \ No newline at end of file diff --git a/test/code/prettyPrinter/stmt/union_types.test b/test/code/prettyPrinter/stmt/union_types.test index a8ac791806..fe214f694f 100644 --- a/test/code/prettyPrinter/stmt/union_types.test +++ b/test/code/prettyPrinter/stmt/union_types.test @@ -13,6 +13,6 @@ class Test { public A|iterable|null $prop; } -function test(A|B $a) : int|false +function test(A|B $a): int|false { } \ No newline at end of file From 6c0b63d9afde4d3fe761101acff531b444bb5f60 Mon Sep 17 00:00:00 2001 From: Dominik Peters Date: Wed, 26 Jan 2022 00:06:20 +0100 Subject: [PATCH 072/428] Change print order of modifiers Print abstract/final before visibility modifiers, in line with PSR-12. Closes #826. --- UPGRADE-5.0.md | 12 +++++++++++- lib/PhpParser/PrettyPrinterAbstract.php | 6 +++--- test/PhpParser/BuilderFactoryTest.php | 2 +- test/code/formatPreservation/modifierChange.test | 4 ++-- test/code/parser/stmt/class/simple.test | 4 ++-- test/code/prettyPrinter/stmt/class.test | 4 ++-- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index fa07714ea1..ee04557dc6 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -7,7 +7,7 @@ PHP-Parser now requires PHP 7.1 or newer to run. It is however still possible to ### Changes to the default pretty printer -A number of changes to the standard pretty printer have been made, to make it match contemporary coding style conventions (and in particular PSR-12). Options to restore the previous behavior are not provided, but it is possible to extend the override the formatting methods (such as `pStmt_ClassMethod`) with your preferred formatting. +A number of changes to the standard pretty printer have been made, to make it match contemporary coding style conventions (and in particular PSR-12). Options to restore the previous behavior are not provided, but it is possible to override the formatting methods (such as `pStmt_ClassMethod`) with your preferred formatting. Return types are now formatted without a space before the `:`: @@ -22,3 +22,13 @@ function test(): Type { } ``` + +`abstract` and `final` are now printed before visibility modifiers: + +```php +# Before +public abstract function test(); + +# After +abstract public function test(); +``` diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 590bcb405e..801723802d 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1073,12 +1073,12 @@ protected function dereferenceLhsRequiresParens(Node $node) : bool { * @return string Printed modifiers */ protected function pModifiers(int $modifiers): string { - return ($modifiers & Stmt\Class_::MODIFIER_PUBLIC ? 'public ' : '') + return ($modifiers & Stmt\Class_::MODIFIER_FINAL ? 'final ' : '') + . ($modifiers & Stmt\Class_::MODIFIER_ABSTRACT ? 'abstract ' : '') + . ($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 ' : '') . ($modifiers & Stmt\Class_::MODIFIER_READONLY ? 'readonly ' : ''); } diff --git a/test/PhpParser/BuilderFactoryTest.php b/test/PhpParser/BuilderFactoryTest.php index 2748c2853f..408d25c927 100644 --- a/test/PhpParser/BuilderFactoryTest.php +++ b/test/PhpParser/BuilderFactoryTest.php @@ -361,7 +361,7 @@ function firstMethod() * * @param SomeClass And takes a parameter */ - public abstract function someMethod(SomeClass $someParam); + abstract public function someMethod(SomeClass $someParam); protected function anotherMethod(#[TaggedIterator('app.handlers')] $someParam = 'test') { print $someParam; diff --git a/test/code/formatPreservation/modifierChange.test b/test/code/formatPreservation/modifierChange.test index 08005bc738..0c4f6cc497 100644 --- a/test/code/formatPreservation/modifierChange.test +++ b/test/code/formatPreservation/modifierChange.test @@ -28,7 +28,7 @@ class Bar { protected $foo = 24; - public final function + final public function foo() {} } ----- @@ -54,4 +54,4 @@ function test( = 'z', public T3 $z = 'x', -) {} \ No newline at end of file +) {} diff --git a/test/code/parser/stmt/class/simple.test b/test/code/parser/stmt/class/simple.test index 3beaccada3..321b6b4b00 100644 --- a/test/code/parser/stmt/class/simple.test +++ b/test/code/parser/stmt/class/simple.test @@ -11,7 +11,7 @@ class A extends B implements C, D { public function a() {} public static function b($a) {} - public final function c() : B {} + final public function c() : B {} protected function d() {} private function e() {} } @@ -205,4 +205,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/prettyPrinter/stmt/class.test b/test/code/prettyPrinter/stmt/class.test index 5225d2a6ec..09ccaf56a6 100644 --- a/test/code/prettyPrinter/stmt/class.test +++ b/test/code/prettyPrinter/stmt/class.test @@ -41,7 +41,7 @@ class Foo extends Bar implements ABC, \DEF, namespace\GHI public function foo() { } - static abstract function bar() + abstract static function bar() { } } @@ -50,4 +50,4 @@ trait Bar function test() { } -} \ No newline at end of file +} From 27fe7a68c03909c87728ec3a10761c9352ea35ba Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 4 Jun 2022 13:22:58 +0200 Subject: [PATCH 073/428] Include space after closure use --- UPGRADE-5.0.md | 12 ++++++++++++ lib/PhpParser/PrettyPrinter/Standard.php | 2 +- test/code/prettyPrinter/expr/closure.test | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index ee04557dc6..dd3846a03e 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -32,3 +32,15 @@ public abstract function test(); # After abstract public function test(); ``` + +A space is now printed between `use` and the following `(` for closures: + +```php +# Before +function () use($var) { +}; + +# After +function () use ($var) { +}; +``` diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 5739c4acae..6045d66592 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -622,7 +622,7 @@ protected function pExpr_Closure(Expr\Closure $node) { . ($node->static ? 'static ' : '') . 'function ' . ($node->byRef ? '&' : '') . '(' . $this->pCommaSeparated($node->params) . ')' - . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')' : '') + . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; } diff --git a/test/code/prettyPrinter/expr/closure.test b/test/code/prettyPrinter/expr/closure.test index 385e4326ef..f3ade3084c 100644 --- a/test/code/prettyPrinter/expr/closure.test +++ b/test/code/prettyPrinter/expr/closure.test @@ -16,6 +16,6 @@ $closureWithArgsAndVars = function ($arg1, $arg2) use($var1, $var2) { $closureWithArgs = function ($arg1, $arg2) { $comment = 'closure body'; }; -$closureWithArgsAndVars = function ($arg1, $arg2) use($var1, $var2) { +$closureWithArgsAndVars = function ($arg1, $arg2) use ($var1, $var2) { $comment = 'closure body'; }; \ No newline at end of file From 5af93eee528a5514c8736fc9f8f86db89b58a8c7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 4 Jun 2022 16:50:19 +0200 Subject: [PATCH 074/428] Use nullable type instead of null default Fixes #752. --- lib/PhpParser/Internal/PrintableNewAnonClassNode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index 3eeac04a41..bc84b880b9 100644 --- a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -29,7 +29,7 @@ class PrintableNewAnonClassNode extends Expr public $stmts; public function __construct( - array $attrGroups, array $args, Node\Name $extends = null, array $implements, + array $attrGroups, array $args, ?Node\Name $extends, array $implements, array $stmts, array $attributes ) { parent::__construct($attributes); From 7c445bb60816da94f77fa787d8c2bd9190134904 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sat, 4 Jun 2022 23:23:07 +0200 Subject: [PATCH 075/428] Remove space before return type in insertionMap (#841) * remove space before colon in PrettyPrinterAbstract * update tests --- lib/PhpParser/PrettyPrinterAbstract.php | 8 ++++---- test/code/formatPreservation/insertionOfNullable.test | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 801723802d..669bf44716 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1304,8 +1304,8 @@ protected function initializeInsertionMap() { $this->insertionMap = [ 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], 'Expr_ArrayItem->key' => [null, false, null, ' => '], - 'Expr_ArrowFunction->returnType' => [')', false, ' : ', null], - 'Expr_Closure->returnType' => [')', false, ' : ', null], + 'Expr_ArrowFunction->returnType' => [')', false, ': ', null], + 'Expr_Closure->returnType' => [')', false, ': ', null], 'Expr_Ternary->if' => ['?', false, ' ', ' '], 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], @@ -1313,14 +1313,14 @@ protected function initializeInsertionMap() { 'Param->default' => [null, false, ' = ', null], 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], 'Stmt_Catch->var' => [null, false, ' ', null], - 'Stmt_ClassMethod->returnType' => [')', false, ' : ', null], + 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], 'Stmt_Class->extends' => [null, false, ' extends ', null], 'Stmt_Enum->scalarType' => [null, false, ' : ', null], 'Stmt_EnumCase->expr' => [null, false, ' = ', null], 'Expr_PrintableNewAnonClass->extends' => [null, ' extends ', null], 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], - 'Stmt_Function->returnType' => [')', false, ' : ', null], + 'Stmt_Function->returnType' => [')', false, ': ', null], 'Stmt_If->else' => [null, false, ' ', null], 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], diff --git a/test/code/formatPreservation/insertionOfNullable.test b/test/code/formatPreservation/insertionOfNullable.test index 8d768a3a28..921de02d4a 100644 --- a/test/code/formatPreservation/insertionOfNullable.test +++ b/test/code/formatPreservation/insertionOfNullable.test @@ -99,7 +99,7 @@ function foo( int $x, array &$y = null -) : Foo +): Foo {} $foo @@ -111,7 +111,7 @@ $foo ]; function -() : Bar +(): Bar {}; $x @@ -134,7 +134,7 @@ class X extends \Bar { public - function y() : Y + function y(): Y {} private From aff98bbf16d8a08f955f84c26af77226ad58b56f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 4 Jun 2022 17:34:48 +0200 Subject: [PATCH 076/428] Use PHP 8.0 token representation Migrate everything to use PhpToken-compatible token representation, rather than the legacy array/string representation. --- UPGRADE-5.0.md | 20 + grammar/php5.y | 2 +- grammar/php7.y | 2 +- lib/PhpParser/Internal/TokenPolyfill.php | 271 ++++++ lib/PhpParser/Internal/TokenStream.php | 65 +- lib/PhpParser/Lexer.php | 379 ++------ lib/PhpParser/Lexer/Emulative.php | 37 +- .../Lexer/TokenEmulator/AttributeEmulator.php | 10 +- .../CoaleseEqualTokenEmulator.php | 10 +- .../Lexer/TokenEmulator/EnumTokenEmulator.php | 4 +- .../TokenEmulator/ExplicitOctalEmulator.php | 12 +- .../Lexer/TokenEmulator/KeywordEmulator.php | 22 +- .../TokenEmulator/NullsafeTokenEmulator.php | 32 +- .../NumericLiteralSeparatorEmulator.php | 18 +- .../TokenEmulator/ReadonlyTokenEmulator.php | 6 +- .../Lexer/TokenEmulator/TokenEmulator.php | 7 +- lib/PhpParser/Parser/Php5.php | 820 ++++++++-------- lib/PhpParser/Parser/Php7.php | 890 +++++++++--------- lib/PhpParser/PrettyPrinterAbstract.php | 2 +- lib/PhpParser/Token.php | 18 + test/PhpParser/LexerTest.php | 41 +- .../stmt/haltCompilerInvalidSyntax.test | 4 +- 22 files changed, 1385 insertions(+), 1287 deletions(-) create mode 100644 lib/PhpParser/Internal/TokenPolyfill.php create mode 100644 lib/PhpParser/Token.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index dd3846a03e..f069df7b24 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -44,3 +44,23 @@ function () use($var) { function () use ($var) { }; ``` + +### Changes to token representation + +Tokens are now internally represented using the `PhpParser\Token` class, which exposes the same base interface as +the `PhpToken` class introduced in PHP 8.0. On PHP 8.0 or newer, `PhpParser\Token` extends from `PhpToken`, otherwise +it extends from a polyfill implementation. The most important parts of the interface may be summarized as follows: + +```php +class Token { + public int $id; + public string $text; + public int $line; + public int $pos; + + public function is(int|string|array $kind): bool; +} +``` + +The `Lexer::getTokens()` method will now return an array of `Token`s, rather than an array of arrays and strings. +Additionally, the token array is now terminated by a sentinel token with ID 0. \ No newline at end of file diff --git a/grammar/php5.y b/grammar/php5.y index a62e9a310c..655bb12b34 100644 --- a/grammar/php5.y +++ b/grammar/php5.y @@ -72,7 +72,7 @@ top_statement: statement { $$ = $1; } | function_declaration_statement { $$ = $1; } | class_declaration_statement { $$ = $1; } - | T_HALT_COMPILER + | T_HALT_COMPILER '(' ')' ';' { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; } | T_NAMESPACE namespace_name ';' { $$ = Stmt\Namespace_[$2, null]; diff --git a/grammar/php7.y b/grammar/php7.y index 087bc7392e..8c33e19f19 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -117,7 +117,7 @@ top_statement: statement { $$ = $1; } | function_declaration_statement { $$ = $1; } | class_declaration_statement { $$ = $1; } - | T_HALT_COMPILER + | T_HALT_COMPILER '(' ')' ';' { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; } | T_NAMESPACE namespace_declaration_name semi { $$ = Stmt\Namespace_[$2, null]; diff --git a/lib/PhpParser/Internal/TokenPolyfill.php b/lib/PhpParser/Internal/TokenPolyfill.php new file mode 100644 index 0000000000..a5a4cfc602 --- /dev/null +++ b/lib/PhpParser/Internal/TokenPolyfill.php @@ -0,0 +1,271 @@ += 80000) { + \class_alias('PhpToken', 'PhpParser\TokenPolyfill'); + return; +} + +/** + * This is a polyfill for the PhpToken class introduced in PHP 8.0. We do not actually polyfill + * PhpToken, because composer might end up picking a different polyfill implementation, which does + * not meet our requirements. + * + * @internal + */ +class TokenPolyfill { + /** @var int The ID of the token. Either a T_* constant of a character code < 256. */ + public $id; + /** @var string The textual content of the token. */ + public $text; + /** @var int The 1-based starting line of the token (or -1 if unknown). */ + public $line; + /** @var int The 0-based starting position of the token (or -1 if unknown). */ + public $pos; + + /** @var bool[] Tokens ignored by the PHP parser. */ + private const IGNORABLE_TOKENS = [ + \T_WHITESPACE => true, + \T_COMMENT => true, + \T_DOC_COMMENT => true, + \T_OPEN_TAG => true, + ]; + + /** @var bool[] Tokens that may be part of a T_NAME_* identifier. */ + private static $identifierTokens; + + /** + * Create a Token with the given ID and text, as well optional line and position information. + */ + final public function __construct(int $id, string $text, int $line = -1, int $pos = -1) { + $this->id = $id; + $this->text = $text; + $this->line = $line; + $this->pos = $pos; + } + + /** + * Get the name of the token. For single-char tokens this will be the token character. + * Otherwise it will be a T_* style name, or null if the token ID is unknown. + */ + public function getTokenName(): ?string { + if ($this->id < 256) { + return \chr($this->id); + } + + $name = token_name($this->id); + return $name === 'UNKNOWN' ? null : $name; + } + + /** + * Check whether the token is of the given kind. The kind may be either an integer that matches + * the token ID, a string that matches the token text, or an array of integers/strings. In the + * latter case, the function returns true if any of the kinds in the array match. + * + * @param int|string|array $kind + */ + public function is($kind): bool { + if (\is_int($kind)) { + return $this->id === $kind; + } + if (\is_string($kind)) { + return $this->text === $kind; + } + if (\is_array($kind)) { + foreach ($kind as $entry) { + if (\is_int($entry)) { + if ($this->id === $entry) { + return true; + } + } else if (\is_string($entry)) { + if ($this->text === $entry) { + return true; + } + } else { + throw new \TypeError( + 'Argument #1 ($kind) must only have elements of type string|int, ' . + gettype($entry) . ' given'); + } + } + return false; + } + throw new \TypeError( + 'Argument #1 ($kind) must be of type string|int|array, ' .gettype($kind) . ' given'); + } + + /** + * Check whether this token would be ignored by the PHP parser. Returns true for T_WHITESPACE, + * T_COMMENT, T_DOC_COMMENT and T_OPEN_TAG, and false for everything else. + */ + public function isIgnorable(): bool { + return isset(self::IGNORABLE_TOKENS[$this->id]); + } + + /** + * Return the textual content of the token. + */ + public function __toString(): string { + return $this->text; + } + + /** + * Tokenize the given source code and return an array of tokens. + * + * This performs certain canonicalizations to match the PHP 8.0 token format: + * * Bad characters are represented using T_BAD_CHARACTER rather than omitted. + * * T_COMMENT does not include trailing newlines, instead the newline is part of a following + * T_WHITESPACE token. + * * Namespaced names are represented using T_NAME_* tokens. + * + * @returns static[] + */ + public static function tokenize(string $code, int $flags = 0): array { + self::init(); + + $tokens = []; + $line = 1; + $pos = 0; + $origTokens = \token_get_all($code, $flags); + if (\PHP_VERSION_ID < 70400) { + $origTokens = self::fixupBadCharacters($code, $origTokens); + } + + $numTokens = \count($origTokens); + for ($i = 0; $i < $numTokens; $i++) { + $token = $origTokens[$i]; + if (\is_string($token)) { + if (\strlen($token) === 2) { + // b" and B" are tokenized as single-char tokens, even though they aren't. + $tokens[] = new static(\ord('"'), $token, $line, $pos); + $pos += 2; + } else { + $tokens[] = new static(\ord($token), $token, $line, $pos); + $pos++; + } + } else { + $id = $token[0]; + $text = $token[1]; + + // Emulate PHP 8.0 comment format, which does not include trailing whitespace anymore. + if ($id === \T_COMMENT && \substr($text, 0, 2) !== '/*' && + \preg_match('/(\r\n|\n|\r)$/D', $text, $matches) + ) { + $trailingNewline = $matches[0]; + $text = \substr($text, 0, -\strlen($trailingNewline)); + $tokens[] = new static($id, $text, $line, $pos); + $pos += \strlen($text); + + if ($i + 1 < $numTokens && $origTokens[$i + 1][0] === \T_WHITESPACE) { + // Move trailing newline into following T_WHITESPACE token, if it already exists. + $origTokens[$i + 1][1] = $trailingNewline . $origTokens[$i + 1][1]; + $origTokens[$i + 1][2]--; + } else { + // Otherwise, we need to create a new T_WHITESPACE token. + $tokens[] = new static(\T_WHITESPACE, $trailingNewline, $line, $pos); + $line++; + $pos += \strlen($trailingNewline); + } + continue; + } + + // Emulate PHP 8.0 T_NAME_* tokens, by combining sequences of T_NS_SEPARATOR and + // T_STRING into a single token. + if (($id === \T_NS_SEPARATOR || isset(self::$identifierTokens[$id]))) { + $newText = $text; + $lastWasSeparator = $id === \T_NS_SEPARATOR; + for ($j = $i + 1; $j < $numTokens; $j++) { + if ($lastWasSeparator) { + if (!isset(self::$identifierTokens[$origTokens[$j][0]])) { + break; + } + $lastWasSeparator = false; + } else { + if ($origTokens[$j][0] !== \T_NS_SEPARATOR) { + break; + } + $lastWasSeparator = true; + } + $newText .= $origTokens[$j][1]; + } + if ($lastWasSeparator) { + // Trailing separator is not part of the name. + $j--; + $newText = \substr($newText, 0, -1); + } + if ($j > $i + 1) { + if ($id === \T_NS_SEPARATOR) { + $id = \T_NAME_FULLY_QUALIFIED; + } else if ($id === \T_NAMESPACE) { + $id = \T_NAME_RELATIVE; + } else { + $id = \T_NAME_QUALIFIED; + } + $tokens[] = new static($id, $newText, $line, $pos); + $pos += \strlen($newText); + $i = $j - 1; + continue; + } + } + + $tokens[] = new static($id, $text, $line, $pos); + $line += \substr_count($text, "\n"); + $pos += \strlen($text); + } + } + return $tokens; + } + + /** + * Prior to PHP 7.4, token_get_all() simply dropped invalid characters from the token stream. + * Detect such cases and replace them with T_BAD_CHARACTER. + */ + private static function fixupBadCharacters(string $code, array $origTokens): array { + $newTokens = []; + $pos = 0; + foreach ($origTokens as $token) { + $text = \is_string($token) ? $token : $token[1]; + $len = \strlen($text); + if (substr($code, $pos, $len) !== $text) { + $nextPos = strpos($code, $text, $pos); + for ($i = $pos; $i < $nextPos; $i++) { + // Don't bother including the line, we're not going to use it anyway. + $newTokens[] = [\T_BAD_CHARACTER, $code[$i]]; + } + $pos = $nextPos; + } + $pos += $len; + $newTokens[] = $token; + } + + // Handle trailing invalid characters. + $codeLen = \strlen($code); + if ($pos !== $codeLen) { + for ($i = $pos; $i < $codeLen; $i++) { + $newTokens[] = [\T_BAD_CHARACTER, $code[$i]]; + } + } + return $newTokens; + } + + /** Initialize private static state needed by tokenize(). */ + private static function init(): void { + if (isset(self::$identifierTokens)) { + return; + } + + // Based on semi_reserved production. + self::$identifierTokens = \array_fill_keys([ + \T_STRING, + \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, + \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, \T_FN, + \T_MATCH, + ], true); + } +} diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index d504aa2858..b57a7c6d77 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -2,6 +2,8 @@ namespace PhpParser\Internal; +use PhpParser\Token; + /** * Provides operations on token streams, for use by pretty printer. * @@ -9,7 +11,7 @@ */ class TokenStream { - /** @var array Tokens (in token_get_all format) */ + /** @var Token[] Tokens (in PhpToken::tokenize() format) */ private $tokens; /** @var int[] Map from position to indentation */ private $indentMap; @@ -17,7 +19,7 @@ class TokenStream /** * Create token stream instance. * - * @param array $tokens Tokens in token_get_all() format + * @param Token[] $tokens Tokens in PhpToken::tokenize() format */ public function __construct(array $tokens) { $this->tokens = $tokens; @@ -65,12 +67,11 @@ public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool $tokens = $this->tokens; $pos--; for (; $pos >= 0; $pos--) { - $tokenType = $tokens[$pos][0]; - if ($tokenType === $expectedTokenType) { + $token = $tokens[$pos]; + if ($token->is($expectedTokenType)) { return true; } - if ($tokenType !== \T_WHITESPACE - && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) { + if (!$token->isIgnorable()) { break; } } @@ -91,12 +92,11 @@ public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType) : bool { $tokens = $this->tokens; $pos++; for (; $pos < \count($tokens); $pos++) { - $tokenType = $tokens[$pos][0]; - if ($tokenType === $expectedTokenType) { + $token = $tokens[$pos]; + if ($token->is($expectedTokenType)) { return true; } - if ($tokenType !== \T_WHITESPACE - && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) { + if (!$token->isIgnorable()) { break; } } @@ -111,7 +111,7 @@ public function skipLeft(int $pos, $skipTokenType) { return $pos; } - if ($tokens[$pos][0] !== $skipTokenType) { + if (!$tokens[$pos]->is($skipTokenType)) { // Shouldn't happen. The skip token MUST be there throw new \Exception('Encountered unexpected token'); } @@ -128,7 +128,7 @@ public function skipRight(int $pos, $skipTokenType) { return $pos; } - if ($tokens[$pos][0] !== $skipTokenType) { + if (!$tokens[$pos]->is($skipTokenType)) { // Shouldn't happen. The skip token MUST be there throw new \Exception('Encountered unexpected token'); } @@ -146,8 +146,7 @@ public function skipRight(int $pos, $skipTokenType) { public function skipLeftWhitespace(int $pos): int { $tokens = $this->tokens; for (; $pos >= 0; $pos--) { - $type = $tokens[$pos][0]; - if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) { + if (!$tokens[$pos]->isIgnorable()) { break; } } @@ -163,8 +162,7 @@ public function skipLeftWhitespace(int $pos): int { public function skipRightWhitespace(int $pos): int { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { - $type = $tokens[$pos][0]; - if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) { + if (!$tokens[$pos]->isIgnorable()) { break; } } @@ -174,8 +172,7 @@ public function skipRightWhitespace(int $pos): int { public function findRight(int $pos, $findTokenType) { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { - $type = $tokens[$pos][0]; - if ($type === $findTokenType) { + if ($tokens[$pos]->is($findTokenType)) { return $pos; } } @@ -193,7 +190,7 @@ public function findRight(int $pos, $findTokenType) { public function haveTokenInRange(int $startPos, int $endPos, $tokenType): bool { $tokens = $this->tokens; for ($pos = $startPos; $pos < $endPos; $pos++) { - if ($tokens[$pos][0] === $tokenType) { + if ($tokens[$pos]->is($tokenType)) { return true; } } @@ -231,23 +228,19 @@ public function getTokenCode(int $from, int $to, int $indent) : string { $result = ''; for ($pos = $from; $pos < $to; $pos++) { $token = $tokens[$pos]; - if (\is_array($token)) { - $type = $token[0]; - $content = $token[1]; - if ($type === \T_CONSTANT_ENCAPSED_STRING || $type === \T_ENCAPSED_AND_WHITESPACE) { - $result .= $content; + $id = $token->id; + $text = $token->text; + if ($id === \T_CONSTANT_ENCAPSED_STRING || $id === \T_ENCAPSED_AND_WHITESPACE) { + $result .= $text; + } else { + // TODO Handle non-space indentation + if ($indent < 0) { + $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $text); + } elseif ($indent > 0) { + $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $text); } else { - // TODO Handle non-space indentation - if ($indent < 0) { - $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $content); - } elseif ($indent > 0) { - $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $content); - } else { - $result .= $content; - } + $result .= $text; } - } else { - $result .= $token; } } return $result; @@ -264,8 +257,8 @@ private function calcIndentMap(): array { foreach ($this->tokens as $token) { $indentMap[] = $indent; - if ($token[0] === \T_WHITESPACE) { - $content = $token[1]; + if ($token->id === \T_WHITESPACE) { + $content = $token->text; $newlinePos = \strrpos($content, "\n"); if (false !== $newlinePos) { $indent = \strlen($content) - $newlinePos - 1; diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index e15dd0a5d2..3891483054 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -2,20 +2,21 @@ namespace PhpParser; +use PhpParser\Internal\TokenPolyfill; use PhpParser\Parser\Tokens; class Lexer { + /** @var string Code being tokenized */ protected $code; + /** @var Token[] Array of tokens */ protected $tokens; + /** @var int Current position in the token array */ protected $pos; - protected $line; - protected $filePos; protected $prevCloseTagHasNewline; protected $tokenMap; protected $dropTokens; - protected $identifierTokens; private $attributeStartLineUsed; private $attributeEndLineUsed; @@ -38,7 +39,6 @@ public function __construct(array $options = []) { // Create Map from internal tokens to PhpParser tokens. $this->defineCompatibilityTokens(); $this->tokenMap = $this->createTokenMap(); - $this->identifierTokens = $this->createIdentifierTokenMap(); // 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.) @@ -75,9 +75,7 @@ public function startLexing(string $code, ErrorHandler $errorHandler = null) { } $this->code = $code; // keep the code around for __halt_compiler() handling - $this->pos = -1; - $this->line = 1; - $this->filePos = 0; + $this->pos = -1; // 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. @@ -85,7 +83,7 @@ public function startLexing(string $code, ErrorHandler $errorHandler = null) { $scream = ini_set('xdebug.scream', '0'); - $this->tokens = @token_get_all($code); + $this->tokens = @Token::tokenize($code); $this->postprocessTokens($errorHandler); if (false !== $scream) { @@ -93,192 +91,77 @@ public function startLexing(string $code, ErrorHandler $errorHandler = null) { } } - private function handleInvalidCharacterRange($start, $end, $line, ErrorHandler $errorHandler) { - $tokens = []; - for ($i = $start; $i < $end; $i++) { - $chr = $this->code[$i]; - 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) - ); - } - - $tokens[] = [\T_BAD_CHARACTER, $chr, $line]; - $errorHandler->handleError(new Error($errorMsg, [ - 'startLine' => $line, - 'endLine' => $line, - 'startFilePos' => $i, - 'endFilePos' => $i, - ])); + private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler): void { + $chr = $token->text; + 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) + ); } - return $tokens; + + $errorHandler->handleError(new Error($errorMsg, [ + 'startLine' => $token->line, + 'endLine' => $token->line, + 'startFilePos' => $token->pos, + 'endFilePos' => $token->pos, + ])); } - /** - * Check whether comment token is unterminated. - * - * @return bool - */ - private function isUnterminatedComment($token) : bool { - return ($token[0] === \T_COMMENT || $token[0] === \T_DOC_COMMENT) - && substr($token[1], 0, 2) === '/*' - && substr($token[1], -2) !== '*/'; + private function isUnterminatedComment(Token $token): bool { + return $token->is([\T_COMMENT, \T_DOC_COMMENT]) + && substr($token->text, 0, 2) === '/*' + && substr($token->text, -2) !== '*/'; } protected function postprocessTokens(ErrorHandler $errorHandler) { - // 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. - // - // Additionally, we perform a number of canonicalizations here: - // * Use the PHP 8.0 comment format, which does not include trailing whitespace anymore. - // * Use PHP 8.0 T_NAME_* tokens. + // This function reports errors (bad characters and unterminated comments) in the token + // array, and performs certain canonicalizations: // * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and // T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types. + // * Add a sentinel token with ID 0. - $filePos = 0; - $line = 1; $numTokens = \count($this->tokens); + if ($numTokens === 0) { + // Empty input edge case: Just add the sentinel token. + $this->tokens[] = new Token(0, "\0", 1, 0); + return; + } + for ($i = 0; $i < $numTokens; $i++) { $token = $this->tokens[$i]; - - // Since PHP 7.4 invalid characters are represented by a T_BAD_CHARACTER token. - // In this case we only need to emit an error. - if ($token[0] === \T_BAD_CHARACTER) { - $this->handleInvalidCharacterRange($filePos, $filePos + 1, $line, $errorHandler); - } - - if ($token[0] === \T_COMMENT && substr($token[1], 0, 2) !== '/*' - && preg_match('/(\r\n|\n|\r)$/D', $token[1], $matches)) { - $trailingNewline = $matches[0]; - $token[1] = substr($token[1], 0, -strlen($trailingNewline)); - $this->tokens[$i] = $token; - if (isset($this->tokens[$i + 1]) && $this->tokens[$i + 1][0] === \T_WHITESPACE) { - // Move trailing newline into following T_WHITESPACE token, if it already exists. - $this->tokens[$i + 1][1] = $trailingNewline . $this->tokens[$i + 1][1]; - $this->tokens[$i + 1][2]--; - } else { - // Otherwise, we need to create a new T_WHITESPACE token. - array_splice($this->tokens, $i + 1, 0, [ - [\T_WHITESPACE, $trailingNewline, $line], - ]); - $numTokens++; - } - } - - // Emulate PHP 8 T_NAME_* tokens, by combining sequences of T_NS_SEPARATOR and T_STRING - // into a single token. - if (\is_array($token) - && ($token[0] === \T_NS_SEPARATOR || isset($this->identifierTokens[$token[0]]))) { - $lastWasSeparator = $token[0] === \T_NS_SEPARATOR; - $text = $token[1]; - for ($j = $i + 1; isset($this->tokens[$j]); $j++) { - if ($lastWasSeparator) { - if (!isset($this->identifierTokens[$this->tokens[$j][0]])) { - break; - } - $lastWasSeparator = false; - } else { - if ($this->tokens[$j][0] !== \T_NS_SEPARATOR) { - break; - } - $lastWasSeparator = true; - } - $text .= $this->tokens[$j][1]; - } - if ($lastWasSeparator) { - // Trailing separator is not part of the name. - $j--; - $text = substr($text, 0, -1); - } - if ($j > $i + 1) { - if ($token[0] === \T_NS_SEPARATOR) { - $type = \T_NAME_FULLY_QUALIFIED; - } else if ($token[0] === \T_NAMESPACE) { - $type = \T_NAME_RELATIVE; - } else { - $type = \T_NAME_QUALIFIED; - } - $token = [$type, $text, $line]; - array_splice($this->tokens, $i, $j - $i, [$token]); - $numTokens -= $j - $i - 1; - } + if ($token->id === \T_BAD_CHARACTER) { + $this->handleInvalidCharacter($token, $errorHandler); } - if ($token === '&') { + if ($token->id === \ord('&')) { $next = $i + 1; - while (isset($this->tokens[$next]) && $this->tokens[$next][0] === \T_WHITESPACE) { + while (isset($this->tokens[$next]) && $this->tokens[$next]->id === \T_WHITESPACE) { $next++; } $followedByVarOrVarArg = isset($this->tokens[$next]) && - ($this->tokens[$next][0] === \T_VARIABLE || $this->tokens[$next][0] === \T_ELLIPSIS); - $this->tokens[$i] = $token = [ - $followedByVarOrVarArg - ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG, - '&', - $line, - ]; + $this->tokens[$next]->is([\T_VARIABLE, \T_ELLIPSIS]); + $token->id = $followedByVarOrVarArg + ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG + : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; } - - $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); - $badCharTokens = $this->handleInvalidCharacterRange( - $filePos, $nextFilePos, $line, $errorHandler); - $filePos = (int) $nextFilePos; - - array_splice($this->tokens, $i, 0, $badCharTokens); - $numTokens += \count($badCharTokens); - $i += \count($badCharTokens); - } - - $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 - $badCharTokens = $this->handleInvalidCharacterRange( - $filePos, \strlen($this->code), $line, $errorHandler); - $this->tokens = array_merge($this->tokens, $badCharTokens); - } - return; + // Check for unterminated comment + $lastToken = $this->tokens[$numTokens - 1]; + if ($this->isUnterminatedComment($lastToken)) { + $errorHandler->handleError(new Error('Unterminated comment', [ + 'startLine' => $lastToken->line, + 'endLine' => $lastToken->getEndLine(), + 'startFilePos' => $lastToken->pos, + 'endFilePos' => $lastToken->getEndPos(), + ])); } - if (count($this->tokens) > 0) { - // 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, - ])); - } - } + // Add sentinel token. + $this->tokens[] = new Token(0, "\0", $lastToken->getEndLine(), $lastToken->getEndPos()); } /** @@ -303,98 +186,76 @@ protected function postprocessTokens(ErrorHandler $errorHandler) { * * @return int Token id */ - public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) : int { + public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null): int { $startAttributes = []; $endAttributes = []; while (1) { - if (isset($this->tokens[++$this->pos])) { - $token = $this->tokens[$this->pos]; - } else { - // EOF token with ID 0 - $token = "\0"; - } + $token = $this->tokens[++$this->pos]; if ($this->attributeStartLineUsed) { - $startAttributes['startLine'] = $this->line; + $startAttributes['startLine'] = $token->line; } if ($this->attributeStartTokenPosUsed) { $startAttributes['startTokenPos'] = $this->pos; } if ($this->attributeStartFilePosUsed) { - $startAttributes['startFilePos'] = $this->filePos; + $startAttributes['startFilePos'] = $token->pos; } - 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") - || false !== strpos($token[1], "\r"); - } elseif (\T_INLINE_HTML === $token[0]) { - $startAttributes['hasLeadingNewline'] = $this->prevCloseTagHasNewline; - } - - $this->line += substr_count($value, "\n"); - $this->filePos += \strlen($value); - } else { - $origLine = $this->line; - $origFilePos = $this->filePos; - $this->line += substr_count($token[1], "\n"); - $this->filePos += \strlen($token[1]); - - if (\T_COMMENT === $token[0] || \T_DOC_COMMENT === $token[0]) { + $id = $token->id; + if (isset($this->dropTokens[$id])) { + if (\T_COMMENT === $id || \T_DOC_COMMENT === $id) { if ($this->attributeCommentsUsed) { - $comment = \T_DOC_COMMENT === $token[0] - ? new Comment\Doc($token[1], - $origLine, $origFilePos, $this->pos, - $this->line, $this->filePos - 1, $this->pos) - : new Comment($token[1], - $origLine, $origFilePos, $this->pos, - $this->line, $this->filePos - 1, $this->pos); + $comment = \T_DOC_COMMENT === $id + ? new Comment\Doc($token->text, $token->line, $token->pos, $this->pos, + $token->getEndLine(), $token->getEndPos() - 1, $this->pos) + : new Comment($token->text, $token->line, $token->pos, $this->pos, + $token->getEndLine(), $token->getEndPos() - 1, $this->pos); $startAttributes['comments'][] = $comment; } } continue; } + $value = $token->text; + if (\T_CLOSE_TAG === $token->id) { + $this->prevCloseTagHasNewline = false !== strpos($value, "\n") + || false !== strpos($value, "\r"); + } elseif (\T_INLINE_HTML === $token->id) { + $startAttributes['hasLeadingNewline'] = $this->prevCloseTagHasNewline; + } + + // Fetch the end line/pos from the next token (if available) instead of recomputing it. + $nextToken = $this->tokens[$this->pos + 1] ?? null; if ($this->attributeEndLineUsed) { - $endAttributes['endLine'] = $this->line; + $endAttributes['endLine'] = $nextToken ? $nextToken->line : $token->getEndLine(); } if ($this->attributeEndTokenPosUsed) { $endAttributes['endTokenPos'] = $this->pos; } if ($this->attributeEndFilePosUsed) { - $endAttributes['endFilePos'] = $this->filePos - 1; + $endAttributes['endFilePos'] = ($nextToken ? $nextToken->pos : $token->getEndPos()) - 1; } - return $id; + return $this->tokenMap[$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. + * The token array is in the same format as provided by the PhpToken::tokenize() method in + * PHP 8.0. The tokens are instances of PhpParser\Token, to abstract over a polyfill + * implementation in earlier PHP version. * - * @return array Array of tokens in token_get_all() format + * The token array is terminated by a sentinel token with token ID 0. + * The token array does not discard any tokens (i.e. whitespace and comments are included). + * The token position attributes are against this token array. + * + * @return Token[] Array of tokens */ - public function getTokens() : array { + public function getTokens(): array { return $this->tokens; } @@ -403,25 +264,16 @@ public function getTokens() : array { * * @return string Remaining text */ - public function handleHaltCompiler() : string { - // 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); + public function handleHaltCompiler(): string { + // Prevent the lexer from returning any further tokens. + $nextToken = $this->tokens[$this->pos + 1]; + $this->pos = \count($this->tokens) - 2; - // return with (); removed - return substr($textAfter, strlen($matches[0])); + // Return text after __halt_compiler. + return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; } - private function defineCompatibilityTokens() { + private function defineCompatibilityTokens(): void { static $compatTokensDefined = false; if ($compatTokensDefined) { return; @@ -490,13 +342,14 @@ private function defineCompatibilityTokens() { * * @return array The token map */ - protected function createTokenMap() : array { + protected function createTokenMap(): array { $tokenMap = []; - // 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) { + for ($i = 0; $i < 1000; ++$i) { + if ($i < 256) { + // Single-char tokens use an identity mapping. + $tokenMap[$i] = $i; + } else 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) { @@ -506,25 +359,13 @@ protected function createTokenMap() : array { // 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; - } elseif (defined($name = Tokens::class . '::' . $name)) { + if (defined($name = Tokens::class . '::' . $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; - } - // Assign tokens for which we define compatibility constants, as token_name() does not know them. $tokenMap[\T_FN] = Tokens::T_FN; $tokenMap[\T_COALESCE_EQUAL] = Tokens::T_COALESCE_EQUAL; @@ -541,20 +382,4 @@ protected function createTokenMap() : array { return $tokenMap; } - - private function createIdentifierTokenMap(): array { - // Based on semi_reserved production. - return array_fill_keys([ - \T_STRING, - \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, - \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, \T_FN, - \T_MATCH, - ], true); - } } diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 5c56e026bb..120eac90eb 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -139,26 +139,7 @@ private function fixupTokens() $pos = 0; for ($i = 0, $c = \count($this->tokens); $i < $c; $i++) { $token = $this->tokens[$i]; - if (\is_string($token)) { - if ($patchPos === $pos) { - // Only support replacement for string tokens. - assert($patchType === 'replace'); - $this->tokens[$i] = $patchText; - - // Fetch the next patch - $patchIdx++; - if ($patchIdx >= \count($this->patches)) { - // No more patches, we're done - return; - } - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - } - - $pos += \strlen($token); - continue; - } - - $len = \strlen($token[1]); + $len = \strlen($token->text); $posDelta = 0; while ($patchPos >= $pos && $patchPos < $pos + $len) { $patchTextLen = \strlen($patchText); @@ -170,21 +151,21 @@ private function fixupTokens() $c--; } else { // Remove from token string - $this->tokens[$i][1] = substr_replace( - $token[1], '', $patchPos - $pos + $posDelta, $patchTextLen + $token->text = substr_replace( + $token->text, '', $patchPos - $pos + $posDelta, $patchTextLen ); $posDelta -= $patchTextLen; } } elseif ($patchType === 'add') { // Insert into the token string - $this->tokens[$i][1] = substr_replace( - $token[1], $patchText, $patchPos - $pos + $posDelta, 0 + $token->text = substr_replace( + $token->text, $patchText, $patchPos - $pos + $posDelta, 0 ); $posDelta += $patchTextLen; } else if ($patchType === 'replace') { // Replace inside the token string - $this->tokens[$i][1] = substr_replace( - $token[1], $patchText, $patchPos - $pos + $posDelta, $patchTextLen + $token->text = substr_replace( + $token->text, $patchText, $patchPos - $pos + $posDelta, $patchTextLen ); } else { assert(false); @@ -198,10 +179,6 @@ private function fixupTokens() } list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - - // Multiple patches may apply to the same token. Reload the current one to check - // If the new patch applies - $token = $this->tokens[$i]; } $pos += $len; diff --git a/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php index 6776a51975..8a4420cacd 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php @@ -3,6 +3,7 @@ namespace PhpParser\Lexer\TokenEmulator; use PhpParser\Lexer\Emulative; +use PhpParser\Token; final class AttributeEmulator extends TokenEmulator { @@ -20,18 +21,15 @@ public function emulate(string $code, array $tokens): array { // 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($tokens); $i < $c; ++$i) { - if ($tokens[$i] === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1] === '[') { + $token = $tokens[$i]; + if ($token->text === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '[') { array_splice($tokens, $i, 2, [ - [\T_ATTRIBUTE, '#[', $line] + new Token(\T_ATTRIBUTE, '#[', $token->line, $token->pos), ]); $c--; continue; } - if (\is_array($tokens[$i])) { - $line += substr_count($tokens[$i][1], "\n"); - } } return $tokens; diff --git a/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php index d91da92143..962ce0d650 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php @@ -3,6 +3,7 @@ namespace PhpParser\Lexer\TokenEmulator; use PhpParser\Lexer\Emulative; +use PhpParser\Token; final class CoaleseEqualTokenEmulator extends TokenEmulator { @@ -20,20 +21,17 @@ public function emulate(string $code, array $tokens): array { // 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($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; if (isset($tokens[$i + 1])) { - if ($tokens[$i][0] === T_COALESCE && $tokens[$i + 1] === '=') { + if ($token->id === T_COALESCE && $tokens[$i + 1]->text === '=') { array_splice($tokens, $i, 2, [ - [\T_COALESCE_EQUAL, '??=', $line] + new Token(\T_COALESCE_EQUAL, '??=', $token->line, $token->pos), ]); $c--; continue; } } - if (\is_array($tokens[$i])) { - $line += substr_count($tokens[$i][1], "\n"); - } } return $tokens; diff --git a/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php index 4ddc0b17e3..480b68d199 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php @@ -25,7 +25,7 @@ protected function isKeywordContext(array $tokens, int $pos): bool { return parent::isKeywordContext($tokens, $pos) && isset($tokens[$pos + 2]) - && $tokens[$pos + 1][0] === \T_WHITESPACE - && $tokens[$pos + 2][0] === \T_STRING; + && $tokens[$pos + 1]->id === \T_WHITESPACE + && $tokens[$pos + 2]->id === \T_STRING; } } \ No newline at end of file diff --git a/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php index f5f6805b80..977309a258 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -3,6 +3,7 @@ namespace PhpParser\Lexer\TokenEmulator; use PhpParser\Lexer\Emulative; +use PhpParser\Token; class ExplicitOctalEmulator extends TokenEmulator { public function getPhpVersion(): string { @@ -15,13 +16,14 @@ public function isEmulationNeeded(string $code): bool { public function emulate(string $code, array $tokens): array { for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - if ($tokens[$i][0] == \T_LNUMBER && $tokens[$i][1] === '0' && - isset($tokens[$i + 1]) && $tokens[$i + 1][0] == \T_STRING && - preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1][1]) + $token = $tokens[$i]; + if ($token->id == \T_LNUMBER && $token->text === '0' && + isset($tokens[$i + 1]) && $tokens[$i + 1]->id == \T_STRING && + preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1]->text) ) { - $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1][1]); + $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1]->text); array_splice($tokens, $i, 2, [ - [$tokenKind, '0' . $tokens[$i + 1][1], $tokens[$i][2]], + new Token($tokenKind, '0' . $tokens[$i + 1]->text, $token->line, $token->pos), ]); $c--; } diff --git a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php index f8e8362909..b113161f26 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php @@ -2,6 +2,8 @@ namespace PhpParser\Lexer\TokenEmulator; +use PhpParser\Token; + abstract class KeywordEmulator extends TokenEmulator { abstract function getKeywordString(): string; @@ -12,33 +14,31 @@ public function isEmulationNeeded(string $code): bool return strpos(strtolower($code), $this->getKeywordString()) !== false; } + /** @param Token[] $tokens */ protected function isKeywordContext(array $tokens, int $pos): bool { $previousNonSpaceToken = $this->getPreviousNonSpaceToken($tokens, $pos); - return $previousNonSpaceToken === null || $previousNonSpaceToken[0] !== \T_OBJECT_OPERATOR; + return $previousNonSpaceToken === null || $previousNonSpaceToken->id !== \T_OBJECT_OPERATOR; } public function emulate(string $code, array $tokens): array { $keywordString = $this->getKeywordString(); foreach ($tokens as $i => $token) { - if ($token[0] === T_STRING && strtolower($token[1]) === $keywordString + if ($token->id === T_STRING && strtolower($token->text) === $keywordString && $this->isKeywordContext($tokens, $i)) { - $tokens[$i][0] = $this->getKeywordToken(); + $token->id = $this->getKeywordToken(); } } return $tokens; } - /** - * @param mixed[] $tokens - * @return array|string|null - */ - private function getPreviousNonSpaceToken(array $tokens, int $start) + /** @param Token[] $tokens */ + private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { for ($i = $start - 1; $i >= 0; --$i) { - if ($tokens[$i][0] === T_WHITESPACE) { + if ($tokens[$i]->id === T_WHITESPACE) { continue; } @@ -52,8 +52,8 @@ public function reverseEmulate(string $code, array $tokens): array { $keywordToken = $this->getKeywordToken(); foreach ($tokens as $i => $token) { - if ($token[0] === $keywordToken) { - $tokens[$i][0] = \T_STRING; + if ($token->id === $keywordToken) { + $token->id = \T_STRING; } } diff --git a/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php index 1a29c676e4..5c1aec9c18 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php @@ -3,6 +3,7 @@ namespace PhpParser\Lexer\TokenEmulator; use PhpParser\Lexer\Emulative; +use PhpParser\Token; final class NullsafeTokenEmulator extends TokenEmulator { @@ -20,40 +21,37 @@ public function emulate(string $code, array $tokens): array { // 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($tokens); $i < $c; ++$i) { - if ($tokens[$i] === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1][0] === \T_OBJECT_OPERATOR) { + $token = $tokens[$i]; + if ($token->text === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id === \T_OBJECT_OPERATOR) { array_splice($tokens, $i, 2, [ - [\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line] + new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), ]); $c--; continue; } // Handle ?-> inside encapsed string. - if ($tokens[$i][0] === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) - && $tokens[$i - 1][0] === \T_VARIABLE - && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $tokens[$i][1], $matches) + if ($token->id === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) + && $tokens[$i - 1]->id === \T_VARIABLE + && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $token->text, $matches) ) { $replacement = [ - [\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line], - [\T_STRING, $matches[1], $line], + new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), + new Token(\T_STRING, $matches[1], $token->line, $token->pos + 3), ]; - if (\strlen($matches[0]) !== \strlen($tokens[$i][1])) { - $replacement[] = [ + $matchLen = \strlen($matches[0]); + if ($matchLen !== \strlen($token->text)) { + $replacement[] = new Token( \T_ENCAPSED_AND_WHITESPACE, - \substr($tokens[$i][1], \strlen($matches[0])), - $line - ]; + \substr($token->text, $matchLen), + $token->line, $token->pos + $matchLen + ); } array_splice($tokens, $i, 1, $replacement); $c += \count($replacement) - 1; continue; } - - if (\is_array($tokens[$i])) { - $line += substr_count($tokens[$i][1], "\n"); - } } return $tokens; diff --git a/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php index cdf793e46e..b4d02cf445 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php @@ -3,6 +3,7 @@ namespace PhpParser\Lexer\TokenEmulator; use PhpParser\Lexer\Emulative; +use PhpParser\Token; final class NumericLiteralSeparatorEmulator extends TokenEmulator { @@ -29,43 +30,39 @@ public function emulate(string $code, array $tokens): array { // We need to manually iterate and manage a count because we'll change // the tokens array on the way - $codeOffset = 0; for ($i = 0, $c = count($tokens); $i < $c; ++$i) { $token = $tokens[$i]; - $tokenLen = \strlen(\is_array($token) ? $token[1] : $token); + $tokenLen = \strlen($token->text); - if ($token[0] !== T_LNUMBER && $token[0] !== T_DNUMBER) { - $codeOffset += $tokenLen; + if ($token->id !== \T_LNUMBER && $token->id !== \T_DNUMBER) { continue; } - $res = preg_match(self::NUMBER, $code, $matches, 0, $codeOffset); + $res = preg_match(self::NUMBER, $code, $matches, 0, $token->pos); assert($res, "No number at number token position"); $match = $matches[0]; $matchLen = \strlen($match); if ($matchLen === $tokenLen) { // Original token already holds the full number. - $codeOffset += $tokenLen; continue; } $tokenKind = $this->resolveIntegerOrFloatToken($match); - $newTokens = [[$tokenKind, $match, $token[2]]]; + $newTokens = [new Token($tokenKind, $match, $token->line, $token->pos)]; $numTokens = 1; $len = $tokenLen; while ($matchLen > $len) { $nextToken = $tokens[$i + $numTokens]; - $nextTokenText = \is_array($nextToken) ? $nextToken[1] : $nextToken; + $nextTokenText = $nextToken->text; $nextTokenLen = \strlen($nextTokenText); $numTokens++; if ($matchLen < $len + $nextTokenLen) { // Split trailing characters into a partial token. - assert(is_array($nextToken), "Partial token should be an array token"); $partialText = substr($nextTokenText, $matchLen - $len); - $newTokens[] = [$nextToken[0], $partialText, $nextToken[2]]; + $newTokens[] = new Token($nextToken->id, $partialText, $nextToken->line, $nextToken->pos); break; } @@ -74,7 +71,6 @@ public function emulate(string $code, array $tokens): array array_splice($tokens, $i, $numTokens, $newTokens); $c -= $numTokens - \count($newTokens); - $codeOffset += $matchLen; } return $tokens; diff --git a/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php index 539a2bcfb8..dfd350a869 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php @@ -28,9 +28,9 @@ protected function isKeywordContext(array $tokens, int $pos): bool } // Support "function readonly(" return !(isset($tokens[$pos + 1]) && - ($tokens[$pos + 1][0] === '(' || - ($tokens[$pos + 1][0] === \T_WHITESPACE && + ($tokens[$pos + 1]->text === '(' || + ($tokens[$pos + 1]->id === \T_WHITESPACE && isset($tokens[$pos + 2]) && - $tokens[$pos + 2][0] === '('))); + $tokens[$pos + 2]->text === '('))); } } diff --git a/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php index a020bc0ff4..d43bd183b6 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php @@ -2,6 +2,8 @@ namespace PhpParser\Lexer\TokenEmulator; +use PhpParser\Token; + /** @internal */ abstract class TokenEmulator { @@ -10,12 +12,13 @@ abstract public function getPhpVersion(): string; abstract public function isEmulationNeeded(string $code): bool; /** - * @return array Modified Tokens + * @param Token[] Original tokens + * @return Token[] Modified Tokens */ abstract public function emulate(string $code, array $tokens): array; /** - * @return array Modified Tokens + * @return Token[] Modified Tokens */ abstract public function reverseEmulate(string $code, array $tokens): array; diff --git a/lib/PhpParser/Parser/Php5.php b/lib/PhpParser/Parser/Php5.php index d9c8fe0494..a21dc268ca 100644 --- a/lib/PhpParser/Parser/Php5.php +++ b/lib/PhpParser/Parser/Php5.php @@ -18,7 +18,7 @@ class Php5 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1093; + protected $actionTableSize = 1084; protected $gotoTableSize = 643; protected $invalidSymbol = 168; @@ -27,7 +27,7 @@ class Php5 extends \PhpParser\ParserAbstract protected $unexpectedTokenRule = 32767; protected $YY2TBLSTATE = 415; - protected $numNonLeafStates = 662; + protected $numNonLeafStates = 665; protected $symbolToName = array( "EOF", @@ -185,11 +185,11 @@ class Php5 extends \PhpParser\ParserAbstract "T_NAME_FULLY_QUALIFIED", "T_NAME_QUALIFIED", "T_NAME_RELATIVE", + "'('", + "')'", "';'", "'{'", "'}'", - "'('", - "')'", "'$'", "'`'", "']'", @@ -205,15 +205,15 @@ class Php5 extends \PhpParser\ParserAbstract 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 56, 163, 168, 160, 55, 168, 168, - 158, 159, 53, 50, 8, 51, 52, 54, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 31, 155, + 155, 156, 53, 50, 8, 51, 52, 54, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 31, 157, 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 70, 168, 162, 36, 168, 161, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 156, 35, 157, 58, 168, 168, 168, + 168, 168, 168, 158, 35, 159, 58, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, @@ -244,116 +244,115 @@ class Php5 extends \PhpParser\ParserAbstract ); protected $action = array( - 699, 669, 670, 671, 672, 673, 286, 674, 675, 676, - 712, 713, 223, 224, 225, 226, 227, 228, 229, 230, + 702, 672, 673, 674, 675, 676, 286, 677, 678, 679, + 715, 716, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 0, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,-32766,-32766,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, 245, 246, - 242, 243, 244,-32766,-32766, 677,-32766, 750,-32766,-32766, - -32766,-32766,-32766,-32766,-32766, 1224, 245, 246, 1225, 678, - 679, 680, 681, 682, 683, 684,-32766, 48, 746,-32766, - -32766,-32766,-32766,-32766,-32766, 685, 686, 687, 688, 689, - 690, 691, 692, 693, 694, 695, 715, 738, 716, 717, - 718, 719, 707, 708, 709, 737, 710, 711, 696, 697, - 698, 700, 701, 702, 740, 741, 742, 743, 744, 745, - 703, 704, 705, 706, 736, 727, 725, 726, 722, 723, - 751, 714, 720, 721, 728, 729, 731, 730, 732, 733, - 55, 56, 425, 57, 58, 724, 735, 734, 1073, 59, - 60, -224, 61,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 121,-32767,-32767,-32767,-32767, 29, 107, + 242, 243, 244,-32766,-32766, 680,-32766, 10,-32766,-32766, + -32766,-32766,-32766,-32766,-32766, 1227, 245, 246, 1228, 681, + 682, 683, 684, 685, 686, 687,-32766,-32766, 749,-32766, + -32766,-32766,-32766,-32766,-32766, 688, 689, 690, 691, 692, + 693, 694, 695, 696, 697, 698, 718, 741, 719, 720, + 721, 722, 710, 711, 712, 740, 713, 714, 699, 700, + 701, 703, 704, 705, 743, 744, 745, 746, 747, 748, + 706, 707, 708, 709, 739, 730, 728, 729, 725, 726, + 27, 717, 723, 724, 731, 732, 734, 733, 735, 736, + 55, 56, 425, 57, 58, 727, 738, 737, -224, 59, + 60, 126, 61,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 211,-32767,-32767,-32767,-32767, 29, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 1043, 766, 1071, 767, 580, 62, 63,-32766, - -32766,-32766,-32766, 64, 516, 65, 294, 295, 66, 67, - 68, 69, 70, 71, 72, 73, 822, 25, 302, 74, - 418, 981, 983, 1043, 1181, 1095, 1096, 1073, 748, 754, - 1075, 1074, 1076, 469,-32766,-32766,-32766, 337, 823, 54, - -32767,-32767,-32767,-32767, 98, 99, 100, 101, 102, 220, - 221, 222, 78, 361, 1107,-32766, 341,-32766,-32766,-32766, - -32766,-32766, 1107, 492, 949, 950, 951, 948, 947, 946, - 207, 477, 478, 949, 950, 951, 948, 947, 946, 1043, - 479, 480, 52, 1101, 1102, 1103, 1104, 1098, 1099, 319, - 872, 668, 667, 27, -511, 1105, 1100,-32766, 130, 1075, - 1074, 1076, 345, 668, 667, 41, 126, 341, 334, 369, - 336, 426, -128, -128, -128, 896, 897, 468, 220, 221, - 222, 811, 1195, 619, 40, 21, 427, -128, 470, -128, - 471, -128, 472, -128, 802, 428, -4, 823, 54, 207, - 33, 34, 429, 360, 317, 28, 35, 473,-32766,-32766, - -32766, 211, 356, 357, 474, 475,-32766,-32766,-32766, 754, - 476, 49, 313, 794, 843, 430, 431, 289, 125,-32766, - 813,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, - -32767,-32767,-32767,-32766,-32766,-32766, 769, 103, 104, 105, - 327, 307, 825, 633, -128, 1075, 1074, 1076, 221, 222, - 927, 748, 1146, 106,-32766, 129,-32766,-32766,-32766,-32766, - 426, 823, 54, 902, 873, 302, 468, 75, 207, 359, - 811, 668, 667, 40, 21, 427, 754, 470, 754, 471, - 423, 472, 1043, 127, 428, 435, 1043, 341, 1043, 33, - 34, 429, 360, 1181, 415, 35, 473, 122, 10, 315, - 128, 356, 357, 474, 475,-32766,-32766,-32766, 768, 476, - 668, 667, 758, 843, 430, 431, 754, 1043, 1147,-32766, - -32766,-32766, 754, 419, 342, 1215,-32766, 131,-32766,-32766, - -32766, 341, 363, 346, 426, 823, 54, 100, 101, 102, - 468, 825, 633, -4, 811, 442, 903, 40, 21, 427, - 754, 470, 435, 471, 341, 472, 341, 766, 428, 767, - -209, -209, -209, 33, 34, 429, 360, 479, 1196, 35, - 473, 345,-32766,-32766,-32766, 356, 357, 474, 475, 220, - 221, 222, 421, 476, 32, 297, 794, 843, 430, 431, - 754, 754, 435,-32766, 341,-32766,-32766, 9, 300, 51, - 207, 249, 324, 753, 120, 220, 221, 222, 426, 30, - 247, 941, 422, 424, 468, 825, 633, -209, 811, 1043, - 1061, 40, 21, 427, 129, 470, 207, 471, 341, 472, - 804, 20, 428, 124, -208, -208, -208, 33, 34, 429, - 360, 479, 212, 35, 473, 923, -259, 823, 54, 356, - 357, 474, 475,-32766,-32766,-32766, 1043, 476, 213, 806, - 794, 843, 430, 431,-32766,-32766, 435, 435, 341, 341, - 443, 79, 80, 81,-32766, 668, 667, 636, 344, 808, - 668, 667, 239, 240, 241, 123, 214, 538, 250, 825, - 633, -208, 36, 251, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 252, 307, - 426, 220, 221, 222, 823, 54, 468,-32766, 222, 765, - 811, 106, 134, 40, 21, 427, 571, 470, 207, 471, - 445, 472, 207,-32766, 428, 896, 897, 207, 307, 33, - 34, 429, 245, 246, 637, 35, 473, 452, 22, 809, - 922, 356, 357, 457, 588, 135, 374, 595, 596, 476, - -228, 759, 639, 938, 653, 926, 661, -86, 823, 54, - 314, 644, 647, 821, 133, 836, 43, 106, 603, 44, - 45, 46, 47, 748, 50, 53, 132, 426, 302,-32766, - 520, 825, 633, 468, -84, 607, 577, 811, 641, 362, - 40, 21, 427, -278, 470, 754, 471, 954, 472, 441, - 627, 428, 823, 54, 574, 844, 33, 34, 429, 11, - 615, 845, 35, 473, 444, 461, 285, -511, 356, 357, - 592, -419, 593, 1106, 1153, -410, 476, 368, 838, 38, - 658, 426, 645, 795, 1052, 0, 325, 468, 0,-32766, - 0, 811, 0, 0, 40, 21, 427, 0, 470, 0, - 471, 0, 472, 0, 322, 428, 823, 54, 825, 633, - 33, 34, 429, 0, 326, 0, 35, 473, 323, 0, - 316, 318, 356, 357, -512, 426, 0, 753, 531, 0, - 476, 468, 6, 0, 0, 811, 650, 7, 40, 21, - 427, 12, 470, 14, 471, 373, 472, -420, 562, 428, - 823, 54, 78, -225, 33, 34, 429, 39, 656, 657, - 35, 473, 859, 633, 764, 812, 356, 357, 820, 799, - 814, 875, 866, 867, 476, 797, 860, 857, 855, 426, - 933, 934, 931, 819, 803, 468, 805, 807, 810, 811, - 930, 762, 40, 21, 427, 763, 470, 932, 471, 335, - 472, 358, 634, 428, 638, 640, 825, 633, 33, 34, - 429, 642, 643, 646, 35, 473, 648, 649, 651, 652, - 356, 357, 635, 426, 1221, 1223, 761, 842, 476, 468, - 248, 760, 841, 811, 1222, 840, 40, 21, 427, 1057, - 470, 830, 471, 1045, 472, 839, 1046, 428, 828, 215, - 216, 939, 33, 34, 429, 217, 864, 218, 35, 473, - 825, 633, 24, 865, 356, 357, 456, 1220, 1189, 209, - 1187, 1172, 476, 1185, 215, 216, 1086, 1095, 1096, 914, - 217, 1193, 218, 1183, -224, 1097, 26, 31, 37, 42, - 76, 77, 210, 288, 209, 292, 293, 308, 309, 310, - 311, 339, 1095, 1096, 825, 633, 355, 291, 416, 1152, - 1097, 16, 17, 18, 393, 453, 460, 462, 466, 552, - 624, 1048, 1051, 904, 1111, 1047, 1023, 563, 1022, 1088, - 0, 0, -429, 558, 1041, 1101, 1102, 1103, 1104, 1098, - 1099, 398, 1054, 1053, 1056, 1055, 1070, 1105, 1100, 1186, - 1171, 1167, 1184, 1085, 1218, 1112, 1166, 219, 558, 599, - 1101, 1102, 1103, 1104, 1098, 1099, 398, 0, 0, 0, - 0, 0, 1105, 1100, 0, 0, 0, 0, 0, 0, - 0, 0, 219 + 118, 119,-32766,-32766,-32766,-32766, 583, 62, 63, 1046, + 769, 757, 770, 64, 363, 65, 294, 295, 66, 67, + 68, 69, 70, 71, 72, 73, 926, 25, 302, 74, + 418, 984, 986, 671, 670, 1098, 1099, 1076, 751, 757, + 826, 54, 1198, 469,-32766,-32766,-32766,-32767,-32767,-32767, + -32767, 98, 99, 100, 101, 102, 756, 952, 953, 954, + 951, 950, 949, 361, 1110,-32766, 337,-32766,-32766,-32766, + -32766,-32766, 313, 493, 952, 953, 954, 951, 950, 949, + 442, 477, 478, 369, 435, 753, 220, 221, 222, 341, + 480, 481, 327, 1104, 1105, 1106, 1107, 1101, 1102, 319, + -32766,-32766,-32766,-32766, -511, 1108, 1103, 207, 1046, 1078, + 1077, 1079, 41, 426, -128, -128, -128, 341, 334, 468, + 336, 751,-32766, 814,-32766,-32766, 40, 21, 427, -128, + 470, -128, 471, -128, 472, -128, 342, 428, -4, 826, + 54,-32766, 33, 34, 429, 360, 1046, 75, 35, 473, + -32766,-32766,-32766, 300, 356, 357, 474, 475, 754, 899, + 900, 302, 476, 811, 128, 797, 846, 430, 431, 1046, + 1046,-32766, 757,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32767,-32767,-32767,-32767,-32767, 215, 216, 220, 221, 222, + 757, 217,-32766, 218, 671, 670, 828, 636, -128, 131, + 825, 341, 220, 221, 222, 209, 28, 443, 207, 1184, + 899, 900, 426, 1098, 1099, 826, 54, 772, 468, 671, + 670, 1100, 814, 207, 249, 40, 21, 427, 1184, 470, + 222, 471, -228, 472, 771, 419, 428, 757, 1046, 1149, + 1218, 33, 34, 429, 360, 435, 415, 35, 473, 207, + 341, 315, 805, 356, 357, 474, 475,-32766,-32766,-32766, + 1046, 476, 671, 670, 479, 846, 430, 431, 341, 561, + 30, 1104, 1105, 1106, 1107, 1101, 1102, 398,-32766, 757, + -32766,-32766,-32766, 1108, 1103, 346, 622, 345, 426, 421, + 219, 826, 54, 289, 468, 828, 636, -4, 814, 32, + 297, 40, 21, 427, 130, 470, 345, 471, 129, 472, + 124, 875, 428, 52, -209, -209, -209, 33, 34, 429, + 360, 120, 344, 35, 473,-32766,-32766,-32766, 541, 356, + 357, 474, 475, 129, 1150, 671, 670, 476, 905, 359, + 797, 846, 430, 431, 212, 422,-32766, 1046,-32766,-32766, + -32766,-32766, 435, 1076, 906, 127, 816, 341, 1078, 1077, + 1079, 220, 221, 222, 426, 930, 247, 221, 222, 213, + 468, 828, 636, -209, 814, 317, 207, 40, 21, 427, + 424, 470, 207, 471, 445, 472, 1046, 207, 428, 1074, + -208, -208, -208, 33, 34, 429, 360, 671, 670, 35, + 473, 125,-32766,-32766,-32766, 356, 357, 474, 475, 826, + 54, -86, 48, 476, 423, 214, 797, 846, 430, 431, + 103, 104, 105,-32766, 307, 1078, 1077, 1079, 49, 79, + 80, 81, 757,-32766,-32766,-32766, 106, 876, 768, 639, + 518, 1199, 757,-32766,-32766,-32766, 250, 828, 636, -208, + 36, 51, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 9, 307, 100, 101, + 102, 324, 426, 480, 826, 54, 757, 1064, 468, 106, + 944, 807, 814, 480, 812, 40, 21, 427, 1110, 470, + 121, 471, 769, 472, 770, 435, 428, 220, 221, 222, + 341, 33, 34, 429, 640, 435, 122, 35, 473, 251, + 341, 826, 54, 356, 357, 245, 246, -259, 207, 925, + 809, 476, 239, 240, 241, 78, 134, 341, 574, 123, + 452, 22, 457, 591, 135, 374, 598, 599, 762, 642, + 252, 644, 941, 656, 929, 664, 314, 426, 647, 826, + 54, 650, 20, 468, 341, 828, 636, 814, 824, 133, + 40, 21, 427,-32766, 470, 307, 471, 839, 472, 106, + 302, 428, 43, 44, 45, 46, 33, 34, 429, 648, + -278, 47, 35, 473, 426, 441, 826, 54, 356, 357, + 468, 50, 53, 132, 814, 606, 476, 40, 21, 427, + 618, 470, 577, 471,-32766, 472, 751, 757, 428, 610, + 596, -84, 847, 33, 34, 429, 653, 957, 522, 35, + 473, 325, 426, 630, 322, 356, 357, -511, 468, 11, + 828, 636, 814, 476, 444, 40, 21, 427, 461, 470, + 285, 471, 580, 472, 826, 54, 428, 595, 316, 38, + 362, 33, 34, 429,-32766, 368, 24, 35, 473, 426, + 841, 848, 0, 356, 357, 468, 326, 862, 636, 814, + 323, 476, 40, 21, 427, 0, 470, 318, 471, 0, + 472, 0, -512, 428, 0, 0, -419, 0, 33, 34, + 429, 0, -410, 0, 35, 473, 1109, 1156, 6, 0, + 356, 357, 7, 12, 14, 828, 636, 373, 476, -420, + 533, 756, 565, 78, 1155, 0, 0, 426, 0, 26, + 31, 37, 42, 468, 76, 77, 210, 814, 288, 292, + 40, 21, 427, 293, 470, 248, 471, 308, 472, 309, + 39, 428, 828, 636, 310, 311, 33, 34, 429, 339, + 355, 416, 35, 473, 215, 216, 516, 659, 356, 357, + 217, -225, 218, -224, 16, 17, 476, 18, 393, 453, + 460, 462, 466, 537, 209, 555, 627, 1051, 1054, 907, + 1114, 1050, 1098, 1099, 1026, 566, 1025, 1091, -429, 660, + 1100, 767, 815, 823, 761, 802, 817, 878, 869, 870, + 828, 636, 800, 863, 860, 858, 936, 937, 934, 822, + 806, 808, 810, 813, 933, 765, 766, 935, 0, 335, + 358, 637, 641, 643, 645, 646, 649, 651, 652, 654, + 655, 638, 0, 661, 798, 1224, 1226, 764, 561, 845, + 1104, 1105, 1106, 1107, 1101, 1102, 398, 763, 844, 1225, + 843, 1060, 1108, 1103, 833, 1048, 842, 1049, 831, 219, + 942, 867, 868, 0, 456, 1223, 1192, 1190, 1175, 1188, + 1089, 917, 1196, 1186, 0, 291, 0, 1044, 0, 1055, + 1057, 1056, 1059, 1058, 1073, 1189, 1174, 1170, 1187, 1088, + 1221, 1115, 1169, 602 ); protected $actionCheck = array( @@ -362,185 +361,184 @@ class Php5 extends \PhpParser\ParserAbstract 41, 42, 0, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 9, 10, 11, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 69, 70, - 53, 54, 55, 9, 10, 57, 30, 80, 32, 33, + 53, 54, 55, 9, 10, 57, 30, 8, 32, 33, 34, 35, 36, 37, 38, 80, 69, 70, 83, 71, - 72, 73, 74, 75, 76, 77, 9, 70, 80, 33, + 72, 73, 74, 75, 76, 77, 33, 34, 80, 33, 34, 35, 36, 37, 38, 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, - 153, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 3, 4, 5, 6, 7, 147, 148, 149, 80, 12, - 13, 159, 15, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 156, 44, 45, 46, 47, 16, 17, + 8, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 3, 4, 5, 6, 7, 147, 148, 149, 156, 12, + 13, 8, 15, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 8, 44, 45, 46, 47, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 13, 106, 116, 108, 85, 50, 51, 33, - 34, 35, 36, 56, 85, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 1, 70, 71, 72, - 73, 59, 60, 13, 82, 78, 79, 80, 80, 82, - 152, 153, 154, 86, 9, 10, 11, 8, 1, 2, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 9, - 10, 11, 156, 106, 143, 30, 160, 32, 33, 34, - 35, 36, 143, 116, 116, 117, 118, 119, 120, 121, - 30, 124, 125, 116, 117, 118, 119, 120, 121, 13, - 133, 134, 70, 136, 137, 138, 139, 140, 141, 142, - 31, 37, 38, 8, 132, 148, 149, 116, 156, 152, - 153, 154, 160, 37, 38, 158, 8, 160, 161, 8, - 163, 74, 75, 76, 77, 134, 135, 80, 9, 10, - 11, 84, 1, 80, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 155, 98, 0, 1, 2, 30, - 103, 104, 105, 106, 132, 8, 109, 110, 9, 10, - 11, 8, 115, 116, 117, 118, 9, 10, 11, 82, - 123, 70, 8, 126, 127, 128, 129, 8, 156, 30, - 155, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 9, 10, 11, 157, 53, 54, 55, - 8, 57, 155, 156, 157, 152, 153, 154, 10, 11, - 157, 80, 162, 69, 30, 151, 32, 33, 34, 35, - 74, 1, 2, 159, 155, 71, 80, 151, 30, 8, - 84, 37, 38, 87, 88, 89, 82, 91, 82, 93, - 8, 95, 13, 156, 98, 158, 13, 160, 13, 103, - 104, 105, 106, 82, 108, 109, 110, 156, 8, 113, - 31, 115, 116, 117, 118, 9, 10, 11, 157, 123, - 37, 38, 126, 127, 128, 129, 82, 13, 159, 33, - 34, 35, 82, 127, 8, 85, 30, 156, 32, 33, - 34, 160, 8, 147, 74, 1, 2, 50, 51, 52, - 80, 155, 156, 157, 84, 31, 159, 87, 88, 89, - 82, 91, 158, 93, 160, 95, 160, 106, 98, 108, - 100, 101, 102, 103, 104, 105, 106, 133, 159, 109, - 110, 160, 9, 10, 11, 115, 116, 117, 118, 9, - 10, 11, 8, 123, 144, 145, 126, 127, 128, 129, - 82, 82, 158, 30, 160, 32, 33, 108, 8, 70, - 30, 31, 113, 152, 16, 9, 10, 11, 74, 14, - 14, 122, 8, 8, 80, 155, 156, 157, 84, 13, - 159, 87, 88, 89, 151, 91, 30, 93, 160, 95, - 155, 159, 98, 14, 100, 101, 102, 103, 104, 105, - 106, 133, 16, 109, 110, 155, 157, 1, 2, 115, - 116, 117, 118, 9, 10, 11, 13, 123, 16, 155, - 126, 127, 128, 129, 33, 34, 158, 158, 160, 160, - 156, 9, 10, 11, 30, 37, 38, 31, 70, 155, - 37, 38, 50, 51, 52, 156, 16, 81, 16, 155, - 156, 157, 30, 16, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 16, 57, - 74, 9, 10, 11, 1, 2, 80, 116, 11, 155, - 84, 69, 156, 87, 88, 89, 160, 91, 30, 93, - 132, 95, 30, 33, 98, 134, 135, 30, 57, 103, - 104, 105, 69, 70, 31, 109, 110, 75, 76, 155, - 155, 115, 116, 75, 76, 101, 102, 111, 112, 123, - 159, 155, 156, 155, 156, 155, 156, 31, 1, 2, - 31, 31, 31, 31, 31, 38, 70, 69, 77, 70, - 70, 70, 70, 80, 70, 70, 70, 74, 71, 85, - 85, 155, 156, 80, 97, 96, 100, 84, 31, 106, - 87, 88, 89, 82, 91, 82, 93, 82, 95, 89, - 92, 98, 1, 2, 90, 127, 103, 104, 105, 97, - 94, 127, 109, 110, 97, 97, 97, 132, 115, 116, - 100, 146, 113, 143, 143, 146, 123, 106, 151, 155, - 157, 74, 31, 157, 162, -1, 114, 80, -1, 116, - -1, 84, -1, -1, 87, 88, 89, -1, 91, -1, - 93, -1, 95, -1, 130, 98, 1, 2, 155, 156, - 103, 104, 105, -1, 130, -1, 109, 110, 131, -1, - 132, 132, 115, 116, 132, 74, -1, 152, 150, -1, - 123, 80, 146, -1, -1, 84, 31, 146, 87, 88, - 89, 146, 91, 146, 93, 146, 95, 146, 150, 98, - 1, 2, 156, 159, 103, 104, 105, 155, 155, 155, - 109, 110, 155, 156, 155, 155, 115, 116, 155, 155, - 155, 155, 155, 155, 123, 155, 155, 155, 155, 74, - 155, 155, 155, 155, 155, 80, 155, 155, 155, 84, - 155, 155, 87, 88, 89, 155, 91, 155, 93, 156, - 95, 156, 156, 98, 156, 156, 155, 156, 103, 104, - 105, 156, 156, 156, 109, 110, 156, 156, 156, 156, - 115, 116, 156, 74, 157, 157, 157, 157, 123, 80, - 31, 157, 157, 84, 157, 157, 87, 88, 89, 157, - 91, 157, 93, 157, 95, 157, 157, 98, 157, 50, - 51, 157, 103, 104, 105, 56, 157, 58, 109, 110, - 155, 156, 158, 157, 115, 116, 157, 157, 157, 70, - 157, 157, 123, 157, 50, 51, 157, 78, 79, 157, - 56, 157, 58, 157, 159, 86, 158, 158, 158, 158, - 158, 158, 158, 158, 70, 158, 158, 158, 158, 158, - 158, 158, 78, 79, 155, 156, 158, 160, 158, 163, - 86, 159, 159, 159, 159, 159, 159, 159, 159, 159, - 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, - -1, -1, 161, 134, 161, 136, 137, 138, 139, 140, - 141, 142, 162, 162, 162, 162, 162, 148, 149, 162, - 162, 162, 162, 162, 162, 162, 162, 158, 134, 162, - 136, 137, 138, 139, 140, 141, 142, -1, -1, -1, - -1, -1, 148, 149, -1, -1, -1, -1, -1, -1, - -1, -1, 158 + 28, 29, 33, 34, 35, 36, 85, 50, 51, 13, + 106, 82, 108, 56, 8, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 157, 70, 71, 72, + 73, 59, 60, 37, 38, 78, 79, 80, 80, 82, + 1, 2, 1, 86, 9, 10, 11, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 152, 116, 117, 118, + 119, 120, 121, 106, 143, 30, 8, 32, 33, 34, + 35, 36, 8, 116, 116, 117, 118, 119, 120, 121, + 31, 124, 125, 8, 155, 80, 9, 10, 11, 160, + 133, 134, 8, 136, 137, 138, 139, 140, 141, 142, + 9, 9, 10, 11, 132, 148, 149, 30, 13, 152, + 153, 154, 155, 74, 75, 76, 77, 160, 161, 80, + 163, 80, 30, 84, 32, 33, 87, 88, 89, 90, + 91, 92, 93, 94, 95, 96, 8, 98, 0, 1, + 2, 116, 103, 104, 105, 106, 13, 151, 109, 110, + 9, 10, 11, 8, 115, 116, 117, 118, 153, 134, + 135, 71, 123, 157, 31, 126, 127, 128, 129, 13, + 13, 30, 82, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 50, 51, 9, 10, 11, + 82, 56, 116, 58, 37, 38, 157, 158, 159, 158, + 1, 160, 9, 10, 11, 70, 8, 158, 30, 82, + 134, 135, 74, 78, 79, 1, 2, 159, 80, 37, + 38, 86, 84, 30, 31, 87, 88, 89, 82, 91, + 11, 93, 156, 95, 159, 127, 98, 82, 13, 162, + 85, 103, 104, 105, 106, 155, 108, 109, 110, 30, + 160, 113, 157, 115, 116, 117, 118, 9, 10, 11, + 13, 123, 37, 38, 126, 127, 128, 129, 160, 134, + 14, 136, 137, 138, 139, 140, 141, 142, 30, 82, + 32, 33, 34, 148, 149, 147, 80, 160, 74, 8, + 155, 1, 2, 8, 80, 157, 158, 159, 84, 144, + 145, 87, 88, 89, 158, 91, 160, 93, 151, 95, + 14, 31, 98, 70, 100, 101, 102, 103, 104, 105, + 106, 16, 70, 109, 110, 9, 10, 11, 81, 115, + 116, 117, 118, 151, 156, 37, 38, 123, 156, 8, + 126, 127, 128, 129, 16, 8, 30, 13, 32, 33, + 34, 35, 155, 80, 156, 158, 157, 160, 152, 153, + 154, 9, 10, 11, 74, 159, 14, 10, 11, 16, + 80, 157, 158, 159, 84, 132, 30, 87, 88, 89, + 8, 91, 30, 93, 132, 95, 13, 30, 98, 116, + 100, 101, 102, 103, 104, 105, 106, 37, 38, 109, + 110, 158, 9, 10, 11, 115, 116, 117, 118, 1, + 2, 31, 70, 123, 8, 16, 126, 127, 128, 129, + 53, 54, 55, 30, 57, 152, 153, 154, 70, 9, + 10, 11, 82, 9, 10, 11, 69, 157, 157, 31, + 85, 156, 82, 33, 34, 35, 16, 157, 158, 159, + 30, 70, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 108, 57, 50, 51, + 52, 113, 74, 133, 1, 2, 82, 156, 80, 69, + 122, 157, 84, 133, 157, 87, 88, 89, 143, 91, + 158, 93, 106, 95, 108, 155, 98, 9, 10, 11, + 160, 103, 104, 105, 31, 155, 158, 109, 110, 16, + 160, 1, 2, 115, 116, 69, 70, 159, 30, 157, + 157, 123, 50, 51, 52, 158, 158, 160, 160, 158, + 75, 76, 75, 76, 101, 102, 111, 112, 157, 158, + 16, 31, 157, 158, 157, 158, 31, 74, 31, 1, + 2, 31, 156, 80, 160, 157, 158, 84, 31, 31, + 87, 88, 89, 33, 91, 57, 93, 38, 95, 69, + 71, 98, 70, 70, 70, 70, 103, 104, 105, 31, + 82, 70, 109, 110, 74, 89, 1, 2, 115, 116, + 80, 70, 70, 70, 84, 77, 123, 87, 88, 89, + 94, 91, 90, 93, 85, 95, 80, 82, 98, 96, + 113, 97, 127, 103, 104, 105, 31, 82, 85, 109, + 110, 114, 74, 92, 130, 115, 116, 132, 80, 97, + 157, 158, 84, 123, 97, 87, 88, 89, 97, 91, + 97, 93, 100, 95, 1, 2, 98, 100, 132, 157, + 106, 103, 104, 105, 116, 106, 155, 109, 110, 74, + 151, 127, -1, 115, 116, 80, 130, 157, 158, 84, + 131, 123, 87, 88, 89, -1, 91, 132, 93, -1, + 95, -1, 132, 98, -1, -1, 146, -1, 103, 104, + 105, -1, 146, -1, 109, 110, 143, 143, 146, -1, + 115, 116, 146, 146, 146, 157, 158, 146, 123, 146, + 150, 152, 150, 158, 163, -1, -1, 74, -1, 155, + 155, 155, 155, 80, 155, 155, 155, 84, 155, 155, + 87, 88, 89, 155, 91, 31, 93, 155, 95, 155, + 157, 98, 157, 158, 155, 155, 103, 104, 105, 155, + 155, 155, 109, 110, 50, 51, 155, 157, 115, 116, + 56, 156, 58, 156, 156, 156, 123, 156, 156, 156, + 156, 156, 156, 156, 70, 156, 156, 156, 156, 156, + 156, 156, 78, 79, 156, 156, 156, 156, 161, 157, + 86, 157, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 158, 157, 157, 157, 157, 157, 157, 157, 157, + 157, 157, 157, 157, 157, 157, 157, 157, -1, 158, + 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, + 158, 158, -1, 159, 159, 159, 159, 159, 134, 159, + 136, 137, 138, 139, 140, 141, 142, 159, 159, 159, + 159, 159, 148, 149, 159, 159, 159, 159, 159, 155, + 159, 159, 159, -1, 159, 159, 159, 159, 159, 159, + 159, 159, 159, 159, -1, 160, -1, 161, -1, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 162 ); protected $actionBase = array( - 0, 227, 326, 400, 474, 233, 132, 132, 752, -2, - -2, 138, -2, -2, -2, 663, 761, 815, 761, 586, - 717, 859, 859, 859, 244, 256, 256, 256, 413, 583, - 583, 880, 546, 169, 415, 444, 409, 200, 200, 200, - 200, 137, 137, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 249, 205, 738, 559, - 535, 739, 741, 742, 876, 679, 877, 820, 821, 693, - 823, 824, 826, 829, 832, 819, 834, 907, 836, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 67, 536, 299, 510, 230, 44, 652, 652, 652, - 652, 652, 652, 652, 337, 337, 337, 337, 337, 337, - 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, - 337, 337, 378, 584, 584, 584, 657, 909, 648, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 934, 934, 934, 934, 934, 934, 934, - 934, 934, 934, 503, -21, -21, 436, 650, 364, 571, - 215, 426, 156, 26, 26, 329, 329, 329, 329, 329, - 46, 46, 5, 5, 5, 5, 152, 186, 186, 186, - 186, 120, 120, 120, 120, 374, 374, 429, 448, 448, - 334, 267, 449, 449, 449, 449, 449, 449, 449, 449, - 449, 449, 336, 427, 427, 572, 572, 408, 551, 551, - 551, 551, 671, 171, 171, 391, 311, 311, 311, 109, - 641, 856, 68, 68, 68, 68, 68, 68, 324, 324, - 324, -3, -3, -3, 655, 77, 380, 77, 380, 683, - 685, 86, 685, 654, -15, 516, 776, 281, 646, 809, - 680, 816, 560, 711, 202, 578, 857, 643, -23, 578, - 578, 578, 578, 857, 622, 628, 596, -23, 578, -23, - 639, 454, 849, 351, 249, 558, 469, 631, 743, 514, - 688, 746, 464, 544, 548, 556, 7, 412, 708, 750, - 878, 879, 349, 702, 631, 631, 631, 327, 101, 7, - -8, 623, 623, 623, 623, 219, 623, 623, 623, 623, - 291, 430, 545, 401, 745, 653, 653, 675, 839, 814, - 814, 653, 673, 653, 675, 841, 841, 841, 841, 653, - 653, 653, 653, 814, 814, 667, 814, 275, 684, 694, - 694, 841, 713, 714, 653, 653, 697, 814, 814, 814, - 697, 687, 841, 669, 637, 333, 814, 841, 689, 673, - 689, 653, 669, 689, 673, 673, 689, 22, 686, 656, - 840, 842, 860, 756, 638, 644, 847, 848, 843, 845, - 838, 692, 719, 720, 528, 659, 660, 661, 662, 696, - 664, 698, 643, 658, 658, 658, 645, 701, 645, 658, - 658, 658, 658, 658, 658, 658, 658, 632, 635, 709, - 699, 670, 723, 566, 582, 758, 640, 636, 872, 865, - 881, 883, 849, 870, 645, 890, 634, 288, 610, 850, - 633, 753, 645, 851, 645, 759, 645, 873, 777, 666, - 778, 779, 658, 874, 891, 892, 893, 894, 897, 898, - 899, 900, 665, 901, 724, 674, 866, 344, 844, 639, - 705, 677, 755, 725, 780, 372, 902, 784, 645, 645, - 765, 706, 645, 766, 726, 712, 862, 727, 867, 903, - 640, 678, 868, 645, 681, 785, 904, 372, 690, 651, - 704, 649, 728, 858, 875, 853, 767, 612, 617, 787, - 788, 792, 691, 730, 863, 864, 835, 731, 770, 642, - 771, 676, 794, 772, 852, 732, 796, 798, 871, 647, - 707, 682, 672, 668, 773, 799, 869, 733, 735, 736, - 801, 737, 804, 0, 0, 0, 0, 0, 0, 0, + 0, 219, 318, 394, 470, 386, 326, 326, 850, -2, + -2, 138, -2, -2, -2, 663, 738, 775, 738, 588, + 700, 833, 833, 833, 362, 176, 176, 176, 337, 405, + 405, 821, 427, 275, 514, 553, 313, 336, 336, 336, + 336, 137, 137, 336, 336, 336, 336, 336, 336, 336, + 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, + 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, + 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, + 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, + 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, + 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, + 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, + 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, + 336, 336, 336, 336, 336, 336, 460, 379, 842, 476, + 436, 843, 844, 845, 815, 733, 818, 896, 897, 718, + 898, 899, 900, 901, 902, 895, 903, 921, 904, 600, + 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, + 600, 271, 532, 358, 373, 257, 44, 678, 678, 678, + 678, 678, 678, 678, 604, 604, 604, 604, 604, 604, + 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, + 604, 604, 537, 573, 573, 573, 399, 894, 526, 315, + 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, + 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, + 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, + 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, + 315, 315, 315, 272, -21, -21, 428, 720, 496, 43, + 215, 590, 149, 26, 26, 321, 321, 321, 321, 321, + 46, 46, 5, 5, 5, 5, 152, 183, 183, 183, + 183, 120, 120, 120, 120, 540, 540, 548, 530, 530, + 270, 377, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 288, 608, 608, 662, 662, 584, 256, 256, + 256, 256, 688, 205, 205, 84, 221, 221, 221, 535, + 744, 741, 453, 453, 453, 453, 453, 453, 547, 547, + 547, -3, -3, -3, 723, 576, 335, 576, 335, 728, + 749, 557, 749, 709, -15, 558, 863, 538, 732, 892, + 737, 893, 577, 753, 423, 478, 905, 734, 185, 478, + 478, 478, 478, 905, 645, 647, 615, 185, 478, 185, + 736, 229, 772, 307, 460, 575, 561, 698, 846, 461, + 750, 848, 186, 517, 432, 571, 522, 586, 752, 849, + 819, 820, 465, 740, 698, 698, 698, 378, 101, 522, + -8, 636, 636, 636, 636, 238, 636, 636, 636, 636, + 255, 49, 552, 511, 847, 716, 716, 725, 755, 691, + 691, 716, 715, 716, 725, 757, 757, 757, 757, 716, + 716, 716, 716, 691, 691, 689, 691, 122, 684, 726, + 726, 757, 790, 822, 716, 716, 729, 691, 691, 691, + 729, 719, 757, 687, 699, 155, 691, 757, 705, 715, + 705, 716, 687, 705, 715, 715, 705, 22, 560, 692, + 756, 759, 786, 853, 675, 724, 764, 768, 760, 791, + 763, 754, 717, 824, 825, 485, 693, 694, 695, 701, + 742, 711, 706, 734, 690, 690, 690, 685, 746, 685, + 690, 690, 690, 690, 690, 690, 690, 690, 907, 730, + 751, 735, 686, 826, 508, 533, 807, 854, 743, 811, + 802, 865, 817, 906, 772, 809, 685, 908, 682, 143, + 579, 774, 864, 851, 685, 779, 685, 827, 855, 685, + 812, 866, 713, 867, 868, 690, 813, 909, 910, 911, + 912, 913, 914, 915, 916, 712, 917, 828, 702, 803, + 244, 761, 736, 747, 727, 852, 829, 870, 264, 918, + 878, 685, 685, 856, 745, 685, 857, 830, 773, 798, + 831, 804, 919, 743, 731, 805, 685, 739, 879, 920, + 264, 707, 708, 795, 703, 832, 785, 814, 784, 858, + 610, 683, 880, 881, 882, 710, 835, 799, 801, 797, + 836, 859, 714, 860, 696, 885, 861, 780, 837, 886, + 887, 810, 704, 748, 697, 722, 721, 862, 888, 806, + 838, 839, 840, 889, 841, 891, 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, 137, 137, 137, 137, -2, -2, -2, - -2, 0, 0, -2, 0, 0, 0, 137, 137, 137, + 0, 0, 0, 0, 0, 0, 137, 137, 137, 137, + -2, -2, -2, -2, 0, 0, -2, 0, 0, 0, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 0, 0, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 0, 0, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, @@ -549,35 +547,35 @@ class Php5 extends \PhpParser\ParserAbstract 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 602, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 602, -21, -21, -21, -21, 602, -21, - -21, -21, -21, -21, -21, -21, 602, 602, 602, 602, - 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, - 602, 602, 602, 602, -21, 602, 602, 602, -21, 68, - -21, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 602, 0, 0, 602, -21, - 602, -21, 602, -21, -21, 602, 602, 602, 602, 602, - 602, 602, -21, -21, -21, -21, -21, -21, 0, 324, - 324, 324, 324, -21, -21, -21, -21, 68, 68, 147, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 324, 324, -3, -3, 68, - 68, 68, 68, 68, 147, 68, 68, -23, 673, 673, - 673, 380, 380, 380, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 380, -23, 0, -23, - 0, 68, -23, 673, -23, 380, 673, 673, -23, 814, - 604, 604, 604, 604, 372, 7, 0, 0, 673, 673, - 0, 0, 0, 0, 0, 673, 0, 0, 0, 0, - 0, 0, 814, 0, 653, 0, 0, 0, 0, 658, - 288, 0, 677, 456, 0, 0, 0, 0, 0, 0, - 677, 456, 530, 530, 0, 665, 658, 658, 658, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 372 + 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + 137, 600, 600, 600, 600, 600, 600, 600, 600, 600, + 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, + 600, 600, 600, 600, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 600, -21, -21, -21, + -21, 600, -21, -21, -21, -21, -21, -21, -21, 600, + 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, + 600, 600, 600, 600, 600, 600, 600, -21, 600, 600, + 600, -21, 453, -21, 453, 453, 453, 453, 453, 453, + 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, + 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, + 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, + 453, 453, 453, 453, 453, 453, 453, 453, 600, 0, + 0, 600, -21, 600, -21, 600, -21, -21, 600, 600, + 600, 600, 600, 600, 600, -21, -21, -21, -21, -21, + -21, 0, 547, 547, 547, 547, -21, -21, -21, -21, + 453, 453, 121, 453, 453, 453, 453, 453, 453, 453, + 453, 453, 453, 453, 453, 453, 453, 453, 547, 547, + -3, -3, 453, 453, 453, 453, 453, 121, 453, 453, + 185, 715, 715, 715, 335, 335, 335, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 335, + 185, 0, 185, 0, 453, 185, 715, 185, 335, 715, + 715, 185, 691, 623, 623, 623, 623, 264, 522, 0, + 0, 715, 715, 0, 0, 0, 0, 0, 715, 0, + 0, 0, 0, 0, 0, 691, 0, 716, 0, 0, + 0, 0, 690, 143, 0, 727, 308, 0, 0, 0, + 0, 0, 0, 727, 308, 325, 325, 0, 712, 690, + 690, 690, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 264 ); protected $actionDefault = array( @@ -629,92 +627,92 @@ class Php5 extends \PhpParser\ParserAbstract 188, 173,32767, 398, 175, 494,32767,32767, 238,32767, 238,32767, 398, 238,32767,32767, 238,32767, 411, 435, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 377, 378, 489, 502,32767, - 503,32767, 409, 341, 342, 344, 320,32767, 322, 367, - 368, 369, 370, 371, 372, 373, 375,32767, 415,32767, - 418,32767,32767,32767, 255,32767, 553,32767,32767, 304, - 553,32767,32767,32767, 547,32767,32767, 298,32767,32767, - 32767,32767, 251,32767, 169,32767, 537,32767, 554,32767, - 511,32767, 340,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 512,32767,32767,32767,32767, 227,32767, 448, - 32767, 116,32767,32767,32767, 187,32767,32767, 302, 246, - 32767,32767, 546,32767,32767,32767,32767,32767,32767,32767, - 32767, 114,32767, 170,32767,32767,32767, 189,32767,32767, - 511,32767,32767,32767,32767,32767,32767,32767, 293,32767, - 32767,32767,32767,32767,32767,32767, 511,32767,32767, 231, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 411, - 32767, 274,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 127, 127, 3, 127, 127, 258, 3, - 258, 127, 258, 258, 127, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 214, 217, 206, 206, 164, 127, - 127, 266 + 32767,32767,32767,32767,32767,32767, 377, 378, 489, 502, + 32767, 503,32767, 409, 341, 342, 344, 320,32767, 322, + 367, 368, 369, 370, 371, 372, 373, 375,32767, 415, + 32767, 418,32767,32767,32767, 255,32767,32767, 553,32767, + 304,32767, 553,32767,32767,32767, 547,32767,32767, 298, + 32767,32767,32767,32767, 251,32767, 169,32767,32767, 537, + 32767, 554,32767, 511,32767, 340,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 512,32767,32767,32767,32767, + 227,32767, 448,32767, 116,32767,32767,32767, 187,32767, + 32767, 302, 246,32767,32767, 546,32767,32767,32767,32767, + 32767,32767,32767,32767, 114,32767, 170,32767,32767,32767, + 189,32767,32767, 511,32767,32767,32767,32767,32767,32767, + 32767, 293,32767,32767,32767,32767,32767,32767,32767, 511, + 32767,32767, 231,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 411,32767, 274,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 127, 127, 3, 127, + 127, 258, 3, 258, 127, 258, 258, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 214, 217, 206, + 206, 164, 127, 127, 266 ); protected $goto = array( 166, 140, 140, 140, 166, 187, 168, 144, 147, 141, 142, 143, 149, 163, 163, 163, 163, 144, 144, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, - 138, 159, 160, 161, 162, 184, 139, 185, 493, 494, - 377, 495, 499, 500, 501, 502, 503, 504, 505, 506, - 967, 164, 145, 146, 148, 171, 176, 186, 203, 253, + 138, 159, 160, 161, 162, 184, 139, 185, 494, 495, + 377, 496, 500, 501, 502, 503, 504, 505, 506, 507, + 970, 164, 145, 146, 148, 171, 176, 186, 203, 253, 256, 258, 260, 263, 264, 265, 266, 267, 268, 269, 277, 278, 279, 280, 303, 304, 328, 329, 330, 394, - 395, 396, 542, 188, 189, 190, 191, 192, 193, 194, + 395, 396, 545, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 150, 151, 152, 167, 153, 169, 154, 204, 170, 155, 156, 157, 205, - 158, 136, 620, 560, 756, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 1108, - 628, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, 1108, - 1108, 1108, 1108, 1108, 1108, 757, 888, 888, 508, 1200, - 1200, 400, 606, 508, 536, 536, 568, 532, 534, 534, - 496, 498, 524, 540, 569, 572, 583, 590, 852, 852, - 852, 852, 847, 853, 174, 585, 519, 600, 601, 177, + 158, 136, 623, 563, 759, 563, 563, 563, 563, 563, + 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, + 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, + 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, + 563, 563, 563, 563, 563, 563, 563, 563, 563, 1111, + 631, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, + 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, + 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, + 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, + 1111, 1111, 1111, 1111, 1111, 760, 891, 891, 509, 1203, + 1203, 400, 609, 509, 539, 539, 571, 534, 536, 536, + 497, 499, 526, 543, 572, 575, 586, 593, 855, 855, + 855, 855, 850, 856, 174, 588, 520, 603, 604, 177, 178, 179, 401, 402, 403, 404, 173, 202, 206, 208, 257, 259, 261, 262, 270, 271, 272, 273, 274, 275, 281, 282, 283, 284, 305, 306, 331, 332, 333, 406, 407, 408, 409, 175, 180, 254, 255, 181, 182, 183, - 497, 497, 785, 497, 497, 497, 497, 497, 497, 497, - 497, 497, 497, 497, 497, 497, 497, 509, 578, 582, - 626, 749, 509, 544, 545, 546, 547, 548, 549, 550, - 551, 553, 586, 338, 559, 321, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 530, 349, 655, 555, 587, 352, 414, 591, 575, 604, - 885, 611, 612, 881, 616, 617, 623, 625, 630, 632, - 298, 296, 296, 296, 298, 290, 299, 944, 610, 816, - 1170, 613, 436, 436, 375, 436, 436, 436, 436, 436, - 436, 436, 436, 436, 436, 436, 436, 436, 436, 1072, - 1084, 1083, 945, 1065, 1072, 895, 895, 895, 895, 1178, - 895, 895, 1212, 1212, 1178, 388, 858, 561, 755, 1072, - 1072, 1072, 1072, 1072, 1072, 3, 4, 384, 384, 384, - 1212, 874, 856, 854, 856, 654, 465, 511, 883, 878, - 1089, 541, 384, 537, 384, 567, 384, 1026, 19, 15, - 371, 384, 1226, 510, 1204, 1192, 1192, 1192, 510, 906, - 372, 522, 533, 554, 912, 514, 1068, 1069, 13, 1065, - 378, 912, 1158, 594, 23, 965, 386, 386, 386, 602, - 1066, 1169, 1066, 937, 447, 449, 631, 752, 1177, 1067, - 1109, 614, 935, 1177, 605, 1197, 391, 1211, 1211, 543, - 892, 386, 1194, 1194, 1194, 399, 518, 1016, 901, 389, - 771, 529, 752, 340, 752, 1211, 518, 518, 385, 781, - 1214, 770, 772, 1063, 910, 774, 1058, 1176, 659, 953, - 514, 782, 862, 915, 450, 573, 1155, 0, 463, 0, + 498, 498, 788, 498, 498, 498, 498, 498, 498, 498, + 498, 498, 498, 498, 498, 498, 498, 510, 581, 585, + 629, 349, 510, 547, 548, 549, 550, 551, 552, 553, + 554, 556, 589, 338, 562, 321, 562, 562, 562, 562, + 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, + 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, + 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, + 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, + 532, 752, 658, 558, 590, 352, 414, 594, 578, 607, + 888, 614, 615, 884, 619, 620, 626, 628, 633, 635, + 298, 296, 296, 296, 298, 290, 299, 947, 613, 819, + 1173, 616, 436, 436, 375, 436, 436, 436, 436, 436, + 436, 436, 436, 436, 436, 436, 436, 436, 436, 1075, + 1087, 1086, 948, 1068, 1075, 898, 898, 898, 898, 1181, + 898, 898, 1215, 1215, 1181, 388, 861, 564, 758, 1075, + 1075, 1075, 1075, 1075, 1075, 3, 4, 384, 384, 384, + 1215, 877, 859, 857, 859, 657, 465, 512, 886, 881, + 1092, 544, 384, 540, 384, 570, 384, 1029, 19, 15, + 371, 384, 1229, 511, 1207, 1195, 1195, 1195, 511, 909, + 372, 524, 535, 557, 915, 515, 1071, 1072, 13, 1068, + 378, 915, 1161, 597, 23, 968, 386, 386, 386, 605, + 1069, 1172, 1069, 940, 447, 449, 634, 755, 1180, 1070, + 1112, 617, 938, 1180, 608, 1200, 391, 1214, 1214, 546, + 895, 386, 1197, 1197, 1197, 399, 519, 350, 351, 1019, + 774, 531, 755, 904, 755, 1214, 519, 519, 385, 784, + 1217, 773, 340, 389, 775, 777, 1066, 1179, 913, 662, + 515, 1061, 918, 785, 450, 576, 865, 1158, 956, 463, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 513, 528, 0, 0, 0, 0, - 513, 0, 528, 0, 350, 351, 0, 609, 512, 515, - 438, 439, 1064, 618, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 779, 1219, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 514, 530, 0, 0, 0, 0, + 514, 0, 530, 0, 0, 0, 0, 612, 513, 517, + 438, 439, 1067, 621, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 782, 1222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 777, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 780, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 523, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 525, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 301 ); @@ -749,13 +747,13 @@ class Php5 extends \PhpParser\ParserAbstract 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 117, 117, 29, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 61, 61, - 61, 6, 117, 110, 110, 110, 110, 110, 110, 110, + 61, 71, 117, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 125, 57, 125, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 32, 71, 32, 32, 69, 69, 69, 32, 40, 40, + 32, 6, 32, 32, 69, 69, 69, 32, 40, 40, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 5, 5, 5, 5, 5, 5, 5, 97, 62, 50, 81, 62, 57, 57, 62, 57, 57, 57, 57, 57, @@ -770,13 +768,13 @@ class Php5 extends \PhpParser\ParserAbstract 46, 13, 131, 127, 34, 101, 123, 123, 123, 34, 81, 81, 81, 8, 8, 8, 8, 11, 119, 81, 8, 8, 8, 119, 49, 138, 48, 141, 141, 47, - 78, 123, 119, 119, 119, 123, 47, 102, 80, 17, - 23, 9, 11, 18, 11, 141, 47, 47, 11, 23, - 141, 23, 24, 115, 84, 25, 113, 119, 73, 99, - 13, 26, 70, 85, 64, 65, 130, -1, 108, -1, + 78, 123, 119, 119, 119, 123, 47, 71, 71, 102, + 23, 9, 11, 80, 11, 141, 47, 47, 11, 23, + 141, 23, 18, 17, 24, 25, 115, 119, 84, 73, + 13, 113, 85, 26, 64, 65, 70, 130, 99, 108, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, - 9, -1, 9, -1, 71, 71, -1, 13, 9, 9, + 9, -1, 9, -1, -1, -1, -1, 13, 9, 9, 9, 9, 13, 13, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -787,39 +785,39 @@ class Php5 extends \PhpParser\ParserAbstract ); protected $gotoBase = array( - 0, 0, -184, 0, 0, 356, 290, 0, 488, 149, - 0, 182, 85, 118, 426, 112, 203, 179, 208, 0, - 0, 0, 0, 162, 190, 198, 120, 27, 0, 272, - -224, 0, -274, 406, 32, 0, 0, 0, 0, 0, + 0, 0, -187, 0, 0, 356, 350, 0, 488, 149, + 0, 182, 85, 118, 426, 112, 203, 193, 217, 0, + 0, 0, 0, 162, 192, 198, 122, 27, 0, 272, + -227, 0, -277, 406, 32, 0, 0, 0, 0, 0, 330, 0, 0, -24, 0, 0, 440, 485, 213, 218, 371, -74, 0, 0, 0, 0, 0, 107, 110, 0, - 0, -11, -72, 0, 104, 95, -405, 0, -94, 41, - 119, -82, 0, 164, 0, 0, -79, 0, 197, 0, - 204, 43, 0, 441, 171, 121, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 100, 0, 115, - 0, 195, 210, 0, 0, 0, 0, 0, 86, 427, - 259, 0, 0, 116, 0, 174, 0, -5, 117, 196, + 0, -11, -72, 0, 104, 95, -408, 0, -94, 41, + 123, -142, 0, 165, 0, 0, -79, 0, 197, 0, + 209, 43, 0, 441, 175, 120, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 100, 0, 124, + 0, 195, 212, 0, 0, 0, 0, 0, 87, 427, + 259, 0, 0, 121, 0, 177, 0, -5, 117, 196, 0, 0, 161, 170, 93, -21, -48, 273, 0, 0, - 91, 271, 0, 0, 0, 0, 0, 0, 216, 0, + 92, 271, 0, 0, 0, 0, 0, 0, 216, 0, 437, 187, 102, 0, 0 ); protected $gotoDefault = array( - -32768, 467, 663, 2, 664, 834, 739, 747, 597, 481, - 629, 581, 380, 1188, 791, 792, 793, 381, 367, 482, - 379, 410, 405, 780, 773, 775, 783, 172, 411, 786, - 1, 788, 517, 824, 1017, 364, 796, 365, 589, 798, - 526, 800, 801, 137, 382, 383, 527, 483, 390, 576, - 815, 276, 387, 817, 366, 818, 827, 370, 464, 454, - 459, 556, 608, 432, 446, 570, 564, 535, 1081, 565, - 861, 348, 869, 660, 877, 880, 484, 557, 891, 451, - 899, 1094, 397, 905, 911, 916, 287, 919, 417, 412, - 584, 924, 925, 5, 929, 621, 622, 8, 312, 952, - 598, 966, 420, 1036, 1038, 485, 486, 521, 458, 507, - 525, 487, 1059, 440, 413, 1062, 488, 489, 433, 434, - 1078, 354, 1163, 353, 448, 320, 1150, 579, 1113, 455, - 1203, 1159, 347, 490, 491, 376, 1182, 392, 1198, 437, - 1205, 1213, 343, 539, 566 + -32768, 467, 666, 2, 667, 837, 742, 750, 600, 482, + 632, 584, 380, 1191, 794, 795, 796, 381, 367, 483, + 379, 410, 405, 783, 776, 778, 786, 172, 411, 789, + 1, 791, 521, 827, 1020, 364, 799, 365, 592, 801, + 528, 803, 804, 137, 382, 383, 529, 484, 390, 579, + 818, 276, 387, 820, 366, 821, 830, 370, 464, 454, + 459, 559, 611, 432, 446, 573, 567, 538, 1084, 568, + 864, 348, 872, 663, 880, 883, 485, 560, 894, 451, + 902, 1097, 397, 908, 914, 919, 287, 922, 417, 412, + 587, 927, 928, 5, 932, 624, 625, 8, 312, 955, + 601, 969, 420, 1039, 1041, 486, 487, 523, 458, 508, + 527, 488, 1062, 440, 413, 1065, 489, 490, 433, 434, + 1081, 354, 1166, 353, 448, 320, 1153, 582, 1116, 455, + 1206, 1162, 347, 491, 492, 376, 1185, 392, 1201, 437, + 1208, 1216, 343, 542, 569 ); protected $ruleToNonTerminal = array( @@ -892,7 +890,7 @@ class Php5 extends \PhpParser\ParserAbstract 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, 5, 4, + 1, 1, 1, 1, 1, 1, 4, 3, 5, 4, 3, 4, 2, 3, 1, 1, 7, 6, 3, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1, 2, 3, 1, 3, 3, 1, 3, 2, 0, 1, 1, @@ -1234,7 +1232,7 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 96 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 97 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 71ba0187ee..ec308cdee9 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -18,7 +18,7 @@ class Php7 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1189; + protected $actionTableSize = 1199; protected $gotoTableSize = 611; protected $invalidSymbol = 168; @@ -27,7 +27,7 @@ class Php7 extends \PhpParser\ParserAbstract protected $unexpectedTokenRule = 32767; protected $YY2TBLSTATE = 421; - protected $numNonLeafStates = 709; + protected $numNonLeafStates = 712; protected $symbolToName = array( "EOF", @@ -191,10 +191,10 @@ class Php7 extends \PhpParser\ParserAbstract "T_ATTRIBUTE", "';'", "']'", - "'{'", - "'}'", "'('", "')'", + "'{'", + "'}'", "'`'", "'\"'", "'$'" @@ -205,7 +205,7 @@ class Php7 extends \PhpParser\ParserAbstract 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 56, 166, 168, 167, 55, 168, 168, - 163, 164, 53, 50, 8, 51, 52, 54, 168, 168, + 161, 162, 53, 50, 8, 51, 52, 54, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 31, 159, 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, @@ -213,7 +213,7 @@ class Php7 extends \PhpParser\ParserAbstract 168, 70, 168, 160, 36, 168, 165, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 161, 35, 162, 58, 168, 168, 168, + 168, 168, 168, 163, 35, 164, 58, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, @@ -244,125 +244,126 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $action = array( - 132, 133, 134, 568, 135, 136, 0, 721, 722, 723, - 137, 37, 921, 448, 449, 450,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 101, 102, 103, 104, 105, 1071, 1072, - 1073, 1070, 1069, 1068, 1074, 715, 714,-32766,-32766,-32766, + 132, 133, 134, 571, 135, 136, 0, 724, 725, 726, + 137, 37, 924, 448, 449, 450,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 101, 102, 103, 104, 105, 1074, 1075, + 1076, 1073, 1072, 1071, 1077, 718, 717,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 371, 372, 240, 2, 724,-32766,-32766,-32766, 1001, - 1002, 415, 956,-32766,-32766,-32766, 373, 372, 12, 267, - 138, 397, 728, 729, 730, 731, 415,-32766, 421,-32766, - -32766,-32766,-32766,-32766,-32766, 732, 733, 734, 735, 736, - 737, 738, 739, 740, 741, 742, 762, 569, 763, 764, - 765, 766, 754, 755, 337, 338, 757, 758, 743, 744, - 745, 747, 748, 749, 347, 789, 790, 791, 792, 793, - 794, 750, 751, 570, 571, 783, 774, 772, 773, 786, - 769, 770, 284, 421, 572, 573, 768, 574, 575, 576, - 577, 578, 579, 597, -579,-32766,-32766, 797, 771, 580, - 581, -579, 139,-32766,-32766,-32766, 132, 133, 134, 568, - 135, 136, 1020, 721, 722, 723, 137, 37,-32766,-32766, - -32766, 542, 1306, 126,-32766, 1307,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 1071, 1072, 1073, 1070, 1069, 1068, 1074, - 957, 715, 714, -318, 993, 1261,-32766,-32766,-32766, -576, - 106, 107, 108, -268, 270, 890, -576, 910, 1196, 1195, - 1197, 724,-32766,-32766,-32766, 1049, 109,-32766,-32766,-32766, - -32766, 989, 988, 987, 990, 267, 138, 397, 728, 729, - 730, 731, 1233,-32766, 421,-32766,-32766,-32766,-32766, 1001, - 1002, 732, 733, 734, 735, 736, 737, 738, 739, 740, - 741, 742, 762, 569, 763, 764, 765, 766, 754, 755, - 337, 338, 757, 758, 743, 744, 745, 747, 748, 749, - 347, 789, 790, 791, 792, 793, 794, 750, 751, 570, - 571, 783, 774, 772, 773, 786, 769, 770, 880, 321, - 572, 573, 768, 574, 575, 576, 577, 578, 579,-32766, - 82, 83, 84, -579, 771, 580, 581, -579, 148, 746, - 716, 717, 718, 719, 720, 1281, 721, 722, 723, 759, - 760, 36, 1280, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 999, 270, -318, - -32766,-32766,-32766, 456, 457, 81, -193, 808, -576, 1019, - 109, 320, -576, 892, 724, 681, 802, 695, 1001, 1002, - 591,-32766, 1047,-32766,-32766,-32766, 715, 714, 725, 726, - 727, 728, 729, 730, 731, -192, -86, 795, 279, -530, - 284,-32766,-32766,-32766, 732, 733, 734, 735, 736, 737, - 738, 739, 740, 741, 742, 762, 785, 763, 764, 765, - 766, 754, 755, 756, 784, 757, 758, 743, 744, 745, - 747, 748, 749, 788, 789, 790, 791, 792, 793, 794, - 750, 751, 752, 753, 783, 774, 772, 773, 786, 769, - 770, 470, 803, 761, 767, 768, 775, 776, 778, 777, - 779, 780, -86, -530, -530, 637, 25, 771, 782, 781, - 49, 50, 51, 501, 52, 53, 239, 34, -530, 890, - 54, 55, -111, 56, 999, 128,-32766, -111, 1201, -111, - -530, -570, -536, 890, 300, -570, 144, -111, -111, -111, - -111, -111, -111, -111, -111, 1001, 1002, 1001, 1002, 686, - 1201, 925, 926, 1194, 806, 890, 927, 1296, 57, 58, - 799, 253, -193, 687, 59, 807, 60, 246, 247, 61, - 62, 63, 64, 65, 66, 67, 68, 304, 27, 268, - 69, 437, 502, -332, 306, 688, 1227, 1228, 503, 1192, - 806, -192, 318, 890, 1225, 41, 24, 504, 334, 505, - 14, 506, 880, 507, 653, 654, 508, 509, 280, 806, - 281, 43, 44, 438, 368, 367, 880, 45, 510, 35, - 249, 471, 1063, 359, 333, 103, 104, 105, 1196, 1195, - 1197, 806, 511, 512, 513, 335, 801, 1221, 880, 361, - 285, 683, 286, 365, 514, 515, 380, 1215, 1216, 1217, - 1218, 1212, 1213, 292, 433, -111, 715, 714, 434, 1219, - 1214, 149, 400, 1196, 1195, 1197, 293, -153, -153, -153, - -356, 70, -356, 316, 317, 320, 880, 892, -531, 681, - 435, 1048, -153, 707, -153, 293, -153, 1277, -153, 27, - 74, 892, 436, 681, 320, 369, 370, 833, 366, 834, - -529, 806, 382, 812, 11, 1225, 833, 150, 834, -111, - -111, 151, 74, 942, -111, 681, 320, 153, 806, 866, - -111, -111, -111, -111, 31, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 715, 714, - 374, 375, -531, -531, 890, 154, 805, 155, -4, 890, - 157, 892, -88, 681, -153, 514, 515, -531, 1215, 1216, - 1217, 1218, 1212, 1213, -529, -529, 797, 1108, 1110, -531, - 1219, 1214, 715, 714, 690,-32766, 629, 630, -528, -529, - 32, 1194, 72, 123, 124, 317, 320, 129,-32766,-32766, - -32766, -529,-32766, -535,-32766, 130,-32766, 140, 143,-32766, - 158, 159, 160, 320,-32766,-32766,-32766, 161, -528,-32766, - -32766,-32766, -79, 282, -75, 1194,-32766, 412, -73, 27, - -72, -71,-32766,-32766,-32766,-32766,-32766, 880,-32766, 287, - -32766, 806, 880,-32766, -70, 1225, -69, -68,-32766,-32766, - -32766, -67, -528, -528,-32766,-32766, -66, 141, -47, -18, - -32766, 412, 147, 320, 366, 73, 428, -528, 271,-32766, - 278, 291, -51, 696, 699, -111, -111, 1201, -533, -528, - -111, 889, -528, -528, 48, 825, -111, -111, -111, -111, - 146, 327, 283, 270, 288, 109, 515, -528, 1215, 1216, - 1217, 1218, 1212, 1213, 131, 906, 661, -16, 9, -528, - 1219, 1214, 892, 797, 681,-32766, 145, 892, 1308, 681, - -4, 1194, 72,-32766, 638, 317, 320, 806,-32766,-32766, - -32766, 1078,-32766, 544,-32766, 627,-32766, 13, 656,-32766, - 548, 298, -533, -533,-32766,-32766,-32766,-32766, 296, 297, - -32766,-32766, 674, 1194, 643, 890,-32766, 412, 806, 453, - -32766,-32766,-32766, 364,-32766,-32766,-32766, 481,-32766, -533, - -32766,-32766, 47, -494, 890, 127,-32766,-32766,-32766,-32766, - 644, 657,-32766,-32766, 305, 1194, 890, 805,-32766, 412, - 1222, 301,-32766,-32766,-32766, 0,-32766,-32766,-32766, 432, - -32766, 299, 922,-32766, -111, 293, 554, 476,-32766,-32766, - -32766,-32766, 1232, -484,-32766,-32766, 697, 1194, 560, 908, - -32766, 412, 595, 817,-32766,-32766,-32766, 7,-32766,-32766, - -32766, 1234,-32766, 16, 293,-32766, 294, 295, 880, 74, - -32766,-32766,-32766, 320, 363, 39,-32766,-32766, 40, 704, - 705, 871,-32766, 412, -246, -246, -246, 880, 966, 943, - 366,-32766, 950, 125, 1247, 940, 951, 869, 938, 880, - 1052, -111, -111, -245, -245, -245, -111, 1055, 1056, 366, - 1053, 866, -111, -111, -111, -111, 1054, 1060, 701, 1265, - -111, -111, 1299, 632, -564, -111, 33, 315, -271, 362, - 866, -111, -111, -111, -111, 682, 685, 689, 691, 692, - 693, 694,-32766, 892, 698, 681, -246, 684, 1194, 867, - 1303, 1305, 828, 827, 836,-32766,-32766,-32766, 915,-32766, - 958,-32766, 892,-32766, 681, -245,-32766, 835, 1304, 914, - 916,-32766,-32766,-32766, 892, 913, 681,-32766,-32766, 1180, - 899, 909, 897,-32766, 412, 948, 949, 1302, 1259, 1248, - 1266, 1272,-32766, 1275, -269, -562, -536, -535, -534, 1, - 28, 29, 38, 42, 46, 71, 75, 76, 77, 78, - 79, 80, 142, 152, 156, 245, 322, 348, 349, 350, - 351, 352, 353, 354, 355, 356, 357, 358, 360, 429, - 0, -268, 0, 18, 19, 20, 21, 23, 399, 472, - 473, 480, 483, 484, 485, 486, 490, 491, 492, 499, - 668, 1205, 1148, 1223, 1022, 1021, 1184, -273, -103, 17, - 22, 26, 290, 398, 588, 592, 619, 673, 1152, 1200, - 1149, 1278, 0, -498, 1165, 0, 1226, 0, 320 + -32767, 1204, 371, 372, 1284, 727,-32766,-32766,-32766, 1004, + 1005, 1283, 415,-32766,-32766,-32766, 373, 372, 802, 267, + 138, 397, 731, 732, 733, 734, 415,-32766, 421,-32766, + -32766,-32766,-32766,-32766,-32766, 735, 736, 737, 738, 739, + 740, 741, 742, 743, 744, 745, 765, 572, 766, 767, + 768, 769, 757, 758, 337, 338, 760, 761, 746, 747, + 748, 750, 751, 752, 347, 792, 793, 794, 795, 796, + 797, 753, 754, 573, 574, 786, 777, 775, 776, 789, + 772, 773, 809, 544, 575, 576, 771, 577, 578, 579, + 580, 581, 582, 800, 804,-32766,-32766,-32766, 774, 583, + 584, 686, 139, 240, 132, 133, 134, 571, 135, 136, + 1023, 724, 725, 726, 137, 37,-32766, 2,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 1074, + 1075, 1076, 1073, 1072, 1071, 1077, 836, 811, 837, 718, + 717,-32766,-32766,-32766, 1236, -579,-32766, 12,-32766,-32766, + -32766,-32766, -579, 893, 996,-32766,-32766,-32766, 293, 727, + 126, 74,-32766, 34,-32766,-32766,-32766, 320, 106, 107, + 108, 1264, 270, 267, 138, 397, 731, 732, 733, 734, + -576, 470, 421, 689, 109, 808, 280, -576, 281, 735, + 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, + 765, 572, 766, 767, 768, 769, 757, 758, 337, 338, + 760, 761, 746, 747, 748, 750, 751, 752, 347, 792, + 793, 794, 795, 796, 797, 753, 754, 573, 574, 786, + 777, 775, 776, 789, 772, 773, 883, 321, 575, 576, + 771, 577, 578, 579, 580, 581, 582,-32766, 82, 83, + 84, -268, 774, 583, 584, 128, 148, 749, 719, 720, + 721, 722, 723, 150, 724, 725, 726, 762, 763, 36, + 144, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 810, 270, 913,-32766,-32766, + -32766, 456, 457, 1002, -579, 253, -579, 1022, 109, 928, + 929, 895, 727, 471, 930, 684,-32766,-32766,-32766,-32766, + 1050,-32766,-32766, 959, 1004, 1005, 728, 729, 730, 731, + 732, 733, 734, 81, 304, 798, 279, 320, -530, -576, + 284, -576, 735, 736, 737, 738, 739, 740, 741, 742, + 743, 744, 745, 765, 788, 766, 767, 768, 769, 757, + 758, 759, 787, 760, 761, 746, 747, 748, 750, 751, + 752, 791, 792, 793, 794, 795, 796, 797, 753, 754, + 755, 756, 786, 777, 775, 776, 789, 772, 773, -86, + -318, 764, 770, 771, 778, 779, 781, 780, 782, 783, + 1204, 600, -530, -530, 306, 774, 785, 784, 49, 50, + 51, 501, 52, 53, 103, 104, 105, -530, 54, 55, + -111, 56, 1002, 893, 893, -111,-32766, -111, 284, -536, + 1309, -530, 300, 1310, -193, -111, -111, -111, -111, -111, + -111, -111, -111, 1004, 1005, 893, 893, 1004, 1005,-32766, + -32766, 960, 1204, 690, 691, -86, 57, 58, 1224, 698, + 318, -529, 59, 334, 60, 246, 247, 61, 62, 63, + 64, 65, 66, 67, 68, 693, 27, 268, 69, 437, + 502, 809, -16, -332, 1230, 1231, 503, 335, 809, 805, + 361, -531, 1228, 41, 24, 504, 594, 505, 1280, 506, + 893, 507, 718, 717, 508, 509, 883, 883, 365, 43, + 44, 438, 368, 367,-32766, 45, 510, 992, 991, 990, + 993, 359, 333, 1197, -192, -529, -529, 380, 883, 883, + 511, 512, 513, 809, 151, 1004, 1005, 1051, 421, 809, + -529, 710, 515, 516, -318, 1218, 1219, 1220, 1221, 1215, + 1216, 292, -535, 433, -529, -531, -531, 1222, 1217, 1195, + 74, 1199, 1198, 1200, 293, 806, 320, 70, 14, 153, + -531, 316, 317, 320, -153, -153, -153, 800, 285, -111, + 286, 895, 945, 883, -531, 684, 684, 434, -193, -153, + 1066, -153, 239, -153, -356, -153, -356, 435, 1199, 1198, + 1200, 640, 25, 895, 895, 366, 436, 684, 684, 293, + 656, 657, 74, 1199, 1198, 1200, -111, -111, 320, 815, + 140, -111, 1052, 382, 320, 11, 869, -111, -111, -111, + -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 718, 717, 836, 154, 837, + -533, 149, 400, 893, 809, -4, 893, 1299, 895, 155, + 141, 157, 684, -153, 320, -570, 123, -570, 369, 370, + 374, 375, 632, 633, 1111, 1113, 32, 124, -192, 718, + 717, 129,-32766, 700, 130, -528, 143, 158, 1197, 159, + 160, 161, 282, 718, 717,-32766,-32766,-32766, -88,-32766, + -79,-32766, 909,-32766, 109, 270,-32766, -75, -73, -72, + -528,-32766,-32766,-32766, -533, -533,-32766,-32766,-32766, 35, + 249, -71, 1197,-32766, 412, -70, 27, -69, -68,-32766, + -32766,-32766,-32766,-32766, -67,-32766, 883,-32766, 809, 883, + -32766, -66, 1228, -533, -47,-32766,-32766,-32766, -18, -528, + -528,-32766,-32766, 147, 271, 278, 48,-32766, 412, 699, + 702, 366, 73, 428, -528, 892,-32766, 146, 291, 283, + 287, 145, -111, -111, -528, -528, 327, -111, -528, 288, + 800, -51, 514, -111, -111, -111, -111, 809, 664, -528, + 1081,-32766, 515, 516, 546, 1218, 1219, 1220, 1221, 1215, + 1216, 1311, 641, -528, 550, 9, 677, 1222, 1217, 301, + 659, 895, 630, 131, 895, 684, 646, 72, 684, -4, + 296, 297, 317, 320,-32766, 647, 660, 13, 453, 1235, + 1197, 299, 432, 1237, 481, 364, 911,-32766,-32766,-32766, + -494,-32766, -484,-32766, 808,-32766, 293, 925,-32766, 127, + 47, 7, 1225,-32766,-32766,-32766,-32766, 0, 0,-32766, + -32766,-32766, 1197, 0, 893,-32766, 412, 820, 0,-32766, + -32766,-32766, 298,-32766,-32766,-32766, 305,-32766, 0, 0, + -32766, 1250, 16, 893, 0,-32766,-32766,-32766,-32766, -271, + 0,-32766,-32766, 0, 1197, 363, 556,-32766, 412, 1268, + 598,-32766,-32766,-32766, 1229,-32766,-32766,-32766, 39,-32766, + 40, 707,-32766, 708, 294, 295, 476,-32766,-32766,-32766, + -32766, 828, 874,-32766,-32766, 969, 1197, 563, 946,-32766, + 412, 953, 943,-32766,-32766,-32766, 954,-32766,-32766,-32766, + 872,-32766, 941, 125,-32766, 1055, 1058, 883, 1059,-32766, + -32766,-32766, 1056, 1057, 1063,-32766,-32766, 1302, 635, 33, + -564,-32766, 412, -246, -246, -246, 883, -562, -536, 366, + -32766, -535, -534, 1, 28, 320, 29, 38, 42, 46, + -111, -111, -245, -245, -245, -111, 71, 75, 366, 76, + 869, -111, -111, -111, -111, 77, 78, 79, 80, -111, + -111, 142, 152, 27, -111, 156, 245, 704, 322, 869, + -111, -111, -111, -111, 348, 809, 349, 350,-32766, 1228, + 351, 352, 895, 353, 1197, 354, 684, -246, 355, 356, + 357,-32766,-32766,-32766, 358,-32766, 360,-32766, 429,-32766, + 543, 895,-32766, -269, 870, 684, -245,-32766,-32766,-32766, + -268, 18, 19,-32766,-32766, 20, 21, 23, 399,-32766, + 412, 472, 473, 480, 483, 484, 485, 486,-32766, 490, + 516, 491, 1218, 1219, 1220, 1221, 1215, 1216, 492, 499, + 561, 671, 1208, 1151, 1222, 1217, 1226, 1025, 1024, 1187, + -273, -103, 17, 22, 72, 315, 26, 290, 398, 317, + 320, 591, 595, 622, 676, 1155, 0, 1203, 1152, 1281, + 0, 362, 685, 688, 692, 694, 695, 696, 697, 701, + 687, 0, 1306, 1308, 831, 830, 839, 918, 961, 838, + 1307, 917, 919, 916, 1183, 902, 912, 900, 951, 952, + 1305, 1262, 1251, 1269, 1275, 1278, 0, -498, 1168 ); protected $actionCheck = array( @@ -371,236 +372,238 @@ class Php7 extends \PhpParser\ParserAbstract 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 106, 107, 14, 8, 57, 9, 10, 11, 137, - 138, 116, 31, 9, 10, 11, 106, 107, 8, 71, + 43, 1, 106, 107, 1, 57, 9, 10, 11, 137, + 138, 8, 116, 9, 10, 11, 106, 107, 80, 71, 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, 33, 34, 35, 36, 30, 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, 30, 80, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 51, 1, 9, 10, 80, 150, 151, - 152, 8, 154, 9, 10, 11, 2, 3, 4, 5, - 6, 7, 164, 9, 10, 11, 12, 13, 9, 10, - 11, 85, 80, 14, 30, 83, 32, 33, 34, 35, - 36, 37, 38, 116, 117, 118, 119, 120, 121, 122, - 159, 37, 38, 8, 1, 1, 9, 10, 11, 1, - 53, 54, 55, 164, 57, 1, 8, 1, 155, 156, - 157, 57, 9, 10, 11, 162, 69, 30, 116, 32, - 33, 119, 120, 121, 122, 71, 72, 73, 74, 75, - 76, 77, 146, 30, 80, 32, 33, 34, 35, 137, - 138, 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, 84, 70, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 9, - 9, 10, 11, 160, 150, 151, 152, 164, 154, 2, - 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, - 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 116, 57, 164, - 9, 10, 11, 134, 135, 161, 8, 1, 160, 1, - 69, 167, 164, 159, 57, 161, 80, 161, 137, 138, - 1, 30, 1, 32, 33, 34, 37, 38, 71, 72, - 73, 74, 75, 76, 77, 8, 31, 80, 30, 70, - 30, 9, 10, 11, 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, 31, 156, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 97, 134, 135, 75, 76, 150, 151, 152, - 2, 3, 4, 5, 6, 7, 97, 8, 149, 1, - 12, 13, 101, 15, 116, 8, 116, 106, 1, 108, - 161, 160, 163, 1, 113, 164, 8, 116, 117, 118, - 119, 120, 121, 122, 123, 137, 138, 137, 138, 31, - 1, 117, 118, 80, 82, 1, 122, 85, 50, 51, - 80, 8, 164, 31, 56, 159, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 8, 70, 71, - 72, 73, 74, 162, 8, 31, 78, 79, 80, 116, - 82, 164, 8, 1, 86, 87, 88, 89, 8, 91, - 101, 93, 84, 95, 75, 76, 98, 99, 35, 82, - 37, 103, 104, 105, 106, 107, 84, 109, 110, 147, - 148, 161, 123, 115, 116, 50, 51, 52, 155, 156, - 157, 82, 124, 125, 126, 8, 156, 1, 84, 8, - 35, 161, 37, 8, 136, 137, 8, 139, 140, 141, - 142, 143, 144, 145, 8, 128, 37, 38, 8, 151, - 152, 101, 102, 155, 156, 157, 158, 75, 76, 77, - 106, 163, 108, 165, 166, 167, 84, 159, 70, 161, - 8, 159, 90, 161, 92, 158, 94, 1, 96, 70, - 163, 159, 8, 161, 167, 106, 107, 106, 106, 108, - 70, 82, 106, 8, 108, 86, 106, 14, 108, 117, - 118, 14, 163, 159, 122, 161, 167, 14, 82, 127, - 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 37, 38, - 106, 107, 134, 135, 1, 14, 155, 14, 0, 1, - 14, 159, 31, 161, 162, 136, 137, 149, 139, 140, - 141, 142, 143, 144, 134, 135, 80, 59, 60, 161, - 151, 152, 37, 38, 31, 74, 111, 112, 70, 149, - 14, 80, 163, 16, 16, 166, 167, 16, 87, 88, - 89, 161, 91, 163, 93, 16, 95, 161, 16, 98, - 16, 16, 16, 167, 103, 104, 105, 16, 70, 74, - 109, 110, 31, 35, 31, 80, 115, 116, 31, 70, - 31, 31, 87, 88, 89, 124, 91, 84, 93, 35, - 95, 82, 84, 98, 31, 86, 31, 31, 103, 104, - 105, 31, 134, 135, 109, 110, 31, 161, 31, 31, - 115, 116, 31, 167, 106, 154, 108, 149, 31, 124, - 31, 113, 31, 31, 31, 117, 118, 1, 70, 161, - 122, 31, 134, 135, 70, 127, 128, 129, 130, 131, - 31, 35, 37, 57, 37, 69, 137, 149, 139, 140, - 141, 142, 143, 144, 31, 38, 77, 31, 150, 161, - 151, 152, 159, 80, 161, 74, 70, 159, 83, 161, - 162, 80, 163, 85, 90, 166, 167, 82, 87, 88, - 89, 82, 91, 85, 93, 113, 95, 97, 94, 98, - 89, 132, 134, 135, 103, 104, 105, 74, 134, 135, - 109, 110, 92, 80, 96, 1, 115, 116, 82, 97, - 87, 88, 89, 149, 91, 124, 93, 97, 95, 161, - 116, 98, 70, 149, 1, 161, 103, 104, 105, 74, - 100, 100, 109, 110, 132, 80, 1, 155, 115, 116, - 160, 114, 87, 88, 89, -1, 91, 124, 93, 128, - 95, 133, 128, 98, 128, 158, 153, 102, 103, 104, - 105, 74, 146, 149, 109, 110, 31, 80, 81, 154, - 115, 116, 153, 160, 87, 88, 89, 149, 91, 124, - 93, 146, 95, 149, 158, 98, 134, 135, 84, 163, - 103, 104, 105, 167, 149, 159, 109, 110, 159, 159, - 159, 159, 115, 116, 100, 101, 102, 84, 159, 159, - 106, 124, 159, 161, 160, 159, 159, 159, 159, 84, - 159, 117, 118, 100, 101, 102, 122, 159, 159, 106, - 159, 127, 128, 129, 130, 131, 159, 159, 162, 160, - 117, 118, 160, 160, 163, 122, 161, 161, 164, 161, - 127, 128, 129, 130, 131, 161, 161, 161, 161, 161, - 161, 161, 74, 159, 161, 161, 162, 161, 80, 162, - 162, 162, 162, 162, 162, 87, 88, 89, 162, 91, - 162, 93, 159, 95, 161, 162, 98, 162, 162, 162, - 162, 103, 104, 105, 159, 162, 161, 109, 110, 162, - 162, 162, 162, 115, 116, 162, 162, 162, 162, 162, - 162, 162, 124, 162, 164, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - -1, 164, -1, 164, 164, 164, 164, 164, 164, 164, + 132, 133, 82, 85, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 80, 156, 9, 10, 11, 150, 151, + 152, 163, 154, 14, 2, 3, 4, 5, 6, 7, + 162, 9, 10, 11, 12, 13, 30, 8, 32, 33, + 34, 35, 36, 37, 38, 9, 10, 11, 128, 116, + 117, 118, 119, 120, 121, 122, 106, 1, 108, 37, + 38, 9, 10, 11, 146, 1, 30, 8, 32, 33, + 34, 35, 8, 1, 1, 9, 10, 11, 158, 57, + 14, 161, 30, 8, 32, 33, 34, 167, 53, 54, + 55, 1, 57, 71, 72, 73, 74, 75, 76, 77, + 1, 31, 80, 31, 69, 155, 35, 8, 37, 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, 84, 70, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 9, 9, 10, + 11, 162, 150, 151, 152, 8, 154, 2, 3, 4, + 5, 6, 7, 14, 9, 10, 11, 12, 13, 30, + 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 159, 57, 1, 9, 10, + 11, 134, 135, 116, 160, 8, 162, 1, 69, 117, + 118, 159, 57, 163, 122, 163, 9, 10, 11, 30, + 1, 32, 33, 31, 137, 138, 71, 72, 73, 74, + 75, 76, 77, 163, 8, 80, 30, 167, 70, 160, + 30, 162, 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, 31, + 8, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 1, 51, 134, 135, 8, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 50, 51, 52, 149, 12, 13, + 101, 15, 116, 1, 1, 106, 116, 108, 30, 161, + 80, 163, 113, 83, 8, 116, 117, 118, 119, 120, + 121, 122, 123, 137, 138, 1, 1, 137, 138, 9, + 10, 159, 1, 31, 31, 97, 50, 51, 1, 163, + 8, 70, 56, 8, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 31, 70, 71, 72, 73, + 74, 82, 31, 164, 78, 79, 80, 8, 82, 80, + 8, 70, 86, 87, 88, 89, 1, 91, 1, 93, + 1, 95, 37, 38, 98, 99, 84, 84, 8, 103, + 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, + 122, 115, 116, 80, 8, 134, 135, 8, 84, 84, + 124, 125, 126, 82, 14, 137, 138, 159, 80, 82, + 149, 163, 136, 137, 162, 139, 140, 141, 142, 143, + 144, 145, 161, 8, 163, 134, 135, 151, 152, 116, + 161, 155, 156, 157, 158, 156, 167, 161, 101, 14, + 149, 165, 166, 167, 75, 76, 77, 80, 35, 128, + 37, 159, 159, 84, 163, 163, 163, 8, 162, 90, + 123, 92, 97, 94, 106, 96, 108, 8, 155, 156, + 157, 75, 76, 159, 159, 106, 8, 163, 163, 158, + 75, 76, 161, 155, 156, 157, 117, 118, 167, 8, + 163, 122, 164, 106, 167, 108, 127, 128, 129, 130, + 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 37, 38, 106, 14, 108, + 70, 101, 102, 1, 82, 0, 1, 85, 159, 14, + 163, 14, 163, 164, 167, 160, 16, 162, 106, 107, + 106, 107, 111, 112, 59, 60, 14, 16, 162, 37, + 38, 16, 74, 31, 16, 70, 16, 16, 80, 16, + 16, 16, 35, 37, 38, 87, 88, 89, 31, 91, + 31, 93, 38, 95, 69, 57, 98, 31, 31, 31, + 70, 103, 104, 105, 134, 135, 74, 109, 110, 147, + 148, 31, 80, 115, 116, 31, 70, 31, 31, 87, + 88, 89, 124, 91, 31, 93, 84, 95, 82, 84, + 98, 31, 86, 163, 31, 103, 104, 105, 31, 134, + 135, 109, 110, 31, 31, 31, 70, 115, 116, 31, + 31, 106, 154, 108, 149, 31, 124, 31, 113, 37, + 35, 70, 117, 118, 134, 135, 35, 122, 163, 37, + 80, 31, 127, 128, 129, 130, 131, 82, 77, 149, + 82, 85, 136, 137, 85, 139, 140, 141, 142, 143, + 144, 83, 90, 163, 89, 150, 92, 151, 152, 114, + 94, 159, 113, 31, 159, 163, 96, 161, 163, 164, + 134, 135, 166, 167, 74, 100, 100, 97, 97, 146, + 80, 133, 128, 146, 97, 149, 154, 87, 88, 89, + 149, 91, 149, 93, 155, 95, 158, 128, 98, 163, + 70, 149, 160, 103, 104, 105, 74, -1, -1, 109, + 110, 116, 80, -1, 1, 115, 116, 160, -1, 87, + 88, 89, 132, 91, 124, 93, 132, 95, -1, -1, + 98, 160, 149, 1, -1, 103, 104, 105, 74, 162, + -1, 109, 110, -1, 80, 149, 153, 115, 116, 160, + 153, 87, 88, 89, 166, 91, 124, 93, 159, 95, + 159, 159, 98, 159, 134, 135, 102, 103, 104, 105, + 74, 159, 159, 109, 110, 159, 80, 81, 159, 115, + 116, 159, 159, 87, 88, 89, 159, 91, 124, 93, + 159, 95, 159, 163, 98, 159, 159, 84, 159, 103, + 104, 105, 159, 159, 159, 109, 110, 160, 160, 163, + 161, 115, 116, 100, 101, 102, 84, 161, 161, 106, + 124, 161, 161, 161, 161, 167, 161, 161, 161, 161, + 117, 118, 100, 101, 102, 122, 161, 161, 106, 161, + 127, 128, 129, 130, 131, 161, 161, 161, 161, 117, + 118, 161, 161, 70, 122, 161, 161, 164, 161, 127, + 128, 129, 130, 131, 161, 82, 161, 161, 74, 86, + 161, 161, 159, 161, 80, 161, 163, 164, 161, 161, + 161, 87, 88, 89, 161, 91, 161, 93, 161, 95, + 161, 159, 98, 162, 164, 163, 164, 103, 104, 105, + 162, 162, 162, 109, 110, 162, 162, 162, 162, 115, + 116, 162, 162, 162, 162, 162, 162, 162, 124, 162, + 137, 162, 139, 140, 141, 142, 143, 144, 162, 162, + 162, 162, 162, 162, 151, 152, 162, 162, 162, 162, + 162, 162, 162, 162, 161, 163, 162, 162, 162, 166, + 167, 162, 162, 162, 162, 162, -1, 162, 162, 162, + -1, 163, 163, 163, 163, 163, 163, 163, 163, 163, + 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, -1, 165, 165, -1, 166, -1, 167 + 164, 164, 164, 164, 164, 164, -1, 165, 165 ); protected $actionBase = array( - 0, -2, 154, 542, 698, 894, 913, 586, 53, 430, - 867, 307, 307, 67, 307, 307, 307, 482, 693, 693, - 925, 693, 468, 504, 204, 204, 204, 651, 651, 651, - 651, 685, 685, 845, 845, 877, 813, 781, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 978, - 978, 978, 356, 31, 369, 716, 1008, 1014, 1010, 1015, - 1006, 1005, 1009, 1011, 1016, 935, 936, 799, 937, 938, - 939, 941, 1012, 873, 1007, 1013, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 290, 159, 136, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 382, 54, 54, 54, 187, 569, - 569, 341, 203, 658, 47, 699, 699, 699, 699, 699, - 699, 699, 699, 699, 699, 144, 144, 7, 7, 7, - 7, 7, 371, -25, -25, -25, -25, 816, 477, 102, - 499, 358, 449, 514, 525, 525, 360, -116, 231, 231, - 231, 231, 231, 231, -78, -78, -78, -78, -78, 319, - 580, 541, 86, 423, 636, 636, 636, 636, 423, 423, - 423, 423, 825, 1020, 423, 423, 423, 558, 688, 688, - 754, 147, 147, 147, 688, 550, 788, 422, 550, 422, - 194, 92, 794, -55, -40, 321, 814, 794, 748, 842, - 198, 143, 772, 539, 772, 1004, 778, 767, 733, 868, - 896, 1017, 820, 933, 821, 934, 219, 731, 1003, 1003, - 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1021, - 339, 1004, 286, 1021, 1021, 1021, 339, 339, 339, 339, - 339, 339, 339, 339, 339, 339, 615, 286, 380, 479, - 286, 796, 339, 356, 804, 356, 356, 356, 356, 964, - 356, 356, 356, 356, 356, 356, 969, 768, 410, 356, - 31, 206, 206, 472, 193, 206, 206, 206, 206, 356, - 356, 356, 539, 776, 793, 584, 809, 377, 776, 776, - 776, 355, 185, 39, 348, 555, 523, 546, 773, 773, - 789, 946, 946, 773, 785, 773, 789, 951, 773, 946, - 787, 467, 596, 540, 585, 600, 946, 519, 773, 773, - 773, 773, 622, 773, 503, 478, 773, 773, 749, 779, - 792, 46, 946, 946, 946, 792, 581, 808, 808, 808, - 830, 831, 762, 777, 534, 526, 645, 459, 807, 777, - 777, 773, 588, 762, 777, 762, 777, 805, 777, 777, - 777, 762, 777, 785, 577, 777, 734, 634, 60, 777, - 6, 952, 953, 671, 954, 949, 955, 976, 956, 957, - 884, 962, 950, 958, 948, 947, 790, 717, 718, 818, - 764, 945, 766, 766, 766, 943, 766, 766, 766, 766, - 766, 766, 766, 766, 717, 770, 835, 811, 791, 965, - 721, 729, 806, 897, 1018, 1019, 964, 997, 959, 826, - 732, 983, 966, 866, 876, 967, 968, 984, 998, 999, - 898, 786, 899, 900, 803, 970, 885, 766, 952, 957, - 950, 958, 948, 947, 765, 760, 755, 756, 753, 740, - 737, 739, 771, 1000, 942, 871, 844, 969, 944, 717, - 869, 979, 875, 985, 986, 878, 802, 775, 872, 901, - 971, 972, 973, 886, 1001, 829, 980, 874, 987, 810, - 902, 988, 989, 990, 991, 906, 887, 888, 889, 832, - 774, 940, 798, 908, 643, 744, 797, 975, 647, 963, - 890, 915, 916, 992, 993, 994, 917, 960, 839, 981, - 784, 982, 977, 840, 843, 653, 728, 795, 681, 683, - 918, 923, 927, 961, 782, 769, 846, 847, 1002, 928, - 686, 848, 735, 929, 996, 736, 741, 800, 893, 824, - 817, 780, 974, 783, 849, 930, 851, 858, 859, 995, - 861, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -2, 152, 549, 705, 913, 932, 507, 508, -12, + 844, 305, 305, 63, 305, 305, 305, 472, 494, 494, + 702, 494, 202, 473, 495, 495, 495, 658, 658, 658, + 658, 692, 692, 864, 864, 896, 832, 800, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 186, 342, 545, 712, 985, 993, 989, 995, + 981, 980, 986, 990, 996, 1026, 1027, 786, 1028, 1029, + 1030, 1031, 991, 848, 984, 992, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 288, 196, 490, 357, 357, 357, 357, 357, + 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, + 357, 357, 357, 357, 357, 54, 54, 54, 339, 706, + 706, 182, 166, 665, 47, 983, 983, 983, 983, 983, + 983, 983, 983, 983, 983, 136, 136, 7, 7, 7, + 7, 7, 369, -25, -25, -25, -25, 501, 50, 448, + 449, 356, 517, 538, 414, 414, 360, -116, 237, 237, + 237, 237, 237, 237, -78, -78, -78, -78, -78, 318, + 441, 80, 48, 493, 547, 547, 547, 547, 493, 493, + 493, 493, 737, 788, 493, 493, 493, 471, 690, 690, + 736, 165, 165, 165, 690, 591, 759, 622, 591, 622, + 220, 400, 795, -54, -40, 555, 769, 795, 630, 830, + 229, 194, 739, 612, 739, 979, 756, 763, 726, 845, + 1007, 997, 775, 1024, 776, 1025, 217, 719, 978, 978, + 978, 978, 978, 978, 978, 978, 978, 978, 978, 858, + 515, 979, 459, 858, 858, 858, 515, 515, 515, 515, + 515, 515, 515, 515, 515, 515, 611, 459, 576, 585, + 459, 791, 515, 186, 743, 186, 186, 186, 186, 903, + 186, 186, 186, 186, 186, 186, 912, 767, 200, 186, + 342, 346, 346, 428, 203, 346, 346, 346, 346, 186, + 186, 186, 612, 698, 793, 614, 797, 566, 698, 698, + 698, 408, 432, 139, 476, 593, 201, 567, 750, 750, + 758, 862, 862, 750, 755, 750, 758, 868, 750, 862, + 738, 297, 595, 505, 550, 629, 862, 376, 750, 750, + 750, 750, 639, 750, 347, 312, 750, 750, 790, 774, + 794, 159, 862, 862, 862, 794, 532, 748, 748, 748, + 802, 804, 749, 773, 502, 446, 661, 205, 714, 773, + 773, 750, 569, 749, 773, 749, 773, 732, 773, 773, + 773, 749, 773, 755, 529, 773, 721, 648, 189, 773, + 6, 875, 876, 717, 878, 866, 884, 927, 885, 886, + 999, 895, 867, 887, 929, 865, 863, 784, 700, 711, + 752, 741, 861, 685, 685, 685, 857, 685, 685, 685, + 685, 685, 685, 685, 685, 700, 742, 796, 754, 765, + 905, 715, 718, 968, 733, 930, 1032, 1033, 903, 970, + 890, 799, 720, 945, 906, 893, 982, 909, 910, 946, + 971, 812, 974, 1008, 751, 1009, 1010, 757, 914, 1000, + 685, 875, 886, 867, 887, 865, 863, 760, 753, 746, + 747, 744, 740, 727, 728, 772, 975, 856, 849, 771, + 912, 860, 700, 789, 939, 846, 949, 950, 998, 781, + 768, 847, 1011, 917, 918, 919, 1001, 976, 801, 940, + 777, 951, 787, 1012, 952, 953, 954, 955, 1013, 1002, + 1003, 1004, 813, 762, 931, 770, 1014, 299, 785, 792, + 925, 570, 897, 1005, 1015, 1016, 957, 959, 966, 1017, + 891, 816, 943, 766, 944, 938, 819, 822, 605, 707, + 782, 684, 695, 1018, 1019, 1020, 894, 778, 761, 823, + 827, 977, 1021, 697, 831, 723, 1022, 969, 724, 725, + 764, 1006, 783, 745, 780, 923, 779, 833, 1023, 836, + 837, 839, 967, 843, 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, - 458, 458, 458, 458, 458, 458, 307, 307, 307, 307, - 0, 0, 307, 0, 0, 0, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 0, 0, 0, 0, 0, + 0, 0, 0, 456, 456, 456, 456, 456, 456, 305, + 305, 305, 305, 0, 0, 305, 0, 0, 0, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 423, 423, - 291, 291, 0, 291, 423, 423, 423, 423, 423, 423, - 423, 423, 423, 423, 291, 291, 291, 291, 291, 291, - 291, 787, 147, 147, 147, 147, 423, 423, 423, 423, - 423, -88, -88, 147, 147, 423, 384, 423, 423, 423, - 423, 423, 423, 423, 423, 423, 423, 423, 0, 0, - 286, 422, 0, 785, 785, 785, 785, 0, 0, 0, - 0, 422, 422, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 286, 422, 0, 286, 0, 785, - 785, 423, 787, 787, 314, 384, 423, 0, 0, 0, - 0, 286, 785, 286, 339, 422, 339, 339, 206, 356, - 314, 510, 510, 510, 510, 0, 539, 787, 787, 787, - 787, 787, 787, 787, 787, 787, 787, 787, 785, 0, - 787, 0, 785, 785, 785, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 493, 493, 289, 289, 0, 289, 493, 493, 493, + 493, 493, 493, 493, 493, 493, 493, 289, 289, 289, + 289, 289, 289, 289, 738, 165, 165, 165, 165, 493, + 493, 493, 493, 493, -88, -88, 165, 165, 493, 242, + 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, + 493, 0, 0, 459, 622, 0, 755, 755, 755, 755, + 0, 0, 0, 0, 622, 622, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 459, 622, 0, + 459, 0, 755, 755, 493, 738, 738, 53, 242, 493, + 0, 0, 0, 0, 459, 755, 459, 515, 622, 515, + 515, 346, 186, 53, 600, 600, 600, 600, 0, 612, + 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, + 738, 755, 0, 738, 0, 755, 755, 755, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 785, 0, 0, 946, 0, 0, 0, 0, 773, 0, - 0, 0, 0, 0, 0, 773, 951, 0, 0, 0, - 0, 0, 0, 785, 0, 0, 0, 0, 0, 0, - 0, 0, 766, 802, 0, 802, 0, 766, 766, 766 + 0, 0, 0, 755, 0, 0, 862, 0, 0, 0, + 0, 750, 0, 0, 0, 0, 0, 0, 750, 868, + 0, 0, 0, 0, 0, 0, 755, 0, 0, 0, + 0, 0, 0, 0, 0, 685, 781, 0, 781, 0, + 685, 685, 685 ); protected $actionDefault = array( @@ -655,91 +658,92 @@ class Php7 extends \PhpParser\ParserAbstract 308,32767, 102, 474, 308, 474, 308, 198, 308, 308, 308, 474, 308,32767, 102, 308, 210, 100, 100, 308, 32767,32767,32767, 485,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 515,32767, - 532, 545, 421, 422, 424, 530, 446, 447, 448, 449, - 450, 451, 452, 454, 577,32767, 489,32767,32767,32767, - 32767, 328, 587,32767, 587,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 588,32767, 528,32767,32767,32767,32767, 420, 9, 76, - 43, 44, 52, 58, 506, 507, 508, 509, 503, 504, - 510, 505,32767,32767, 511, 553,32767,32767, 529, 580, - 32767,32767,32767,32767,32767,32767, 139,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 515,32767, 137, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 515, + 32767, 532, 545, 421, 422, 424, 530, 446, 447, 448, + 449, 450, 451, 452, 454, 577,32767, 489,32767,32767, + 32767,32767, 328,32767, 587,32767, 587,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 528,32767,32767,32767, 304, 305,32767,32767,32767, + 32767,32767,32767, 588,32767, 528,32767,32767,32767,32767, + 420, 9, 76, 43, 44, 52, 58, 506, 507, 508, + 509, 503, 504, 510, 505,32767,32767, 511, 553,32767, + 32767, 529, 580,32767,32767,32767,32767,32767,32767, 139, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 528,32767,32767,32767, 287, 288,32767,32767, + 515,32767, 137,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 528,32767,32767,32767, 304, 305, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 282,32767,32767, 370,32767,32767,32767,32767, - 349,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 152, 152, 3, 3, 331, 152, 152, 152, 331, - 152, 331, 331, 331, 152, 152, 152, 152, 152, 152, - 276, 184, 258, 261, 243, 243, 152, 341, 152 + 32767,32767,32767,32767,32767, 528,32767,32767,32767, 287, + 288,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 282,32767,32767, 370,32767, + 32767,32767,32767, 349,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 152, 152, 3, 3, 331, 152, + 152, 152, 331, 152, 331, 331, 331, 152, 152, 152, + 152, 152, 152, 276, 184, 258, 261, 243, 243, 152, + 341, 152 ); protected $goto = array( - 194, 194, 669, 423, 642, 883, 839, 884, 1025, 417, - 308, 309, 330, 562, 314, 422, 331, 424, 621, 823, - 677, 851, 824, 585, 838, 857, 165, 165, 165, 165, + 194, 194, 672, 423, 645, 886, 842, 887, 1028, 417, + 308, 309, 330, 565, 314, 422, 331, 424, 624, 826, + 680, 854, 827, 588, 841, 860, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 522, 523, 413, 524, - 526, 527, 528, 529, 530, 531, 532, 533, 1094, 166, + 188, 189, 190, 215, 213, 216, 523, 524, 413, 525, + 527, 528, 529, 530, 531, 532, 533, 534, 1097, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, 176, 212, 214, 217, 235, 238, 241, 242, 244, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, - 274, 275, 311, 312, 313, 418, 419, 420, 567, 219, + 274, 275, 311, 312, 313, 418, 419, 420, 570, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1094, 199, 180, + 236, 186, 187, 188, 189, 190, 215, 1097, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 323, 323, 323, 323, 826, 607, 607, 800, 546, - 539, 1189, 1224, 1224, 1224, 1224, 1224, 1224, 1224, 1224, - 1224, 1224, 1242, 1242, 343, 464, 1267, 1268, 1242, 1242, - 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 389, 539, - 546, 555, 556, 396, 565, 587, 601, 602, 831, 798, - 879, 874, 875, 888, 15, 832, 876, 829, 877, 878, - 830, 455, 455, 941, 882, 804, 1190, 251, 251, 559, - 455, 1240, 1240, 814, 1046, 1042, 1043, 1240, 1240, 1240, - 1240, 1240, 1240, 1240, 1240, 1240, 1240, 605, 639, 1191, - 1250, 1251, 341, 248, 248, 248, 248, 250, 252, 819, - 819, 1193, 1193, 1000, 1193, 1000, 804, 416, 804, 596, - 1000, 1282, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, - 1000, 1000, 1000, 1264, 1264, 962, 1264, 1193, 488, 5, - 489, 6, 1193, 1193, 1193, 1193, 495, 385, 1193, 1193, - 1193, 1274, 1274, 1274, 1274, 277, 277, 277, 277, 558, - 1276, 1276, 1276, 1276, 1066, 1067, 895, 346, 553, 319, - 303, 896, 703, 620, 622, 641, 640, 346, 346, 1143, - 659, 663, 976, 667, 675, 972, 1260, 430, 1292, 1292, - 332, 346, 346, 816, 346, 636, 1309, 650, 651, 652, - 844, 536, 536, 924, 536, 1292, 525, 525, 541, 1269, - 1270, 346, 525, 525, 525, 525, 525, 525, 525, 525, - 525, 525, 1295, 617, 618, 1033, 819, 446, 395, 1262, - 1262, 1033, 935, 935, 935, 935, 563, 599, 446, 929, - 936, 933, 403, 676, 822, 1186, 552, 534, 534, 534, - 534, 841, 589, 600, 984, 1031, 1253, 965, 939, 939, - 937, 939, 702, 465, 538, 974, 969, 344, 345, 706, - 440, 900, 1082, 853, 946, 440, 440, 1035, 604, 662, - 469, 1293, 1293, 981, 1077, 540, 550, 0, 0, 0, - 540, 843, 550, 645, 960, 388, 1174, 911, 1293, 837, - 1175, 1178, 912, 1179, 0, 566, 458, 459, 460, 541, - 849, 1185, 0, 1300, 1301, 254, 254, 401, 402, 0, - 0, 0, 648, 0, 649, 0, 405, 406, 407, 0, - 660, 0, 0, 408, 0, 0, 0, 339, 847, 594, - 608, 611, 612, 613, 614, 633, 634, 635, 679, 918, - 995, 1003, 1007, 1004, 1008, 0, 440, 440, 440, 440, - 440, 440, 440, 440, 440, 440, 440, 0, 1188, 440, - 852, 840, 1030, 1034, 584, 1059, 0, 680, 666, 666, - 944, 496, 672, 1057, 387, 391, 547, 586, 590, 425, + 211, 323, 323, 323, 323, 829, 610, 610, 343, 548, + 540, 1192, 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227, + 1227, 1227, 1245, 1245, 464, 1270, 1271, 803, 1245, 1245, + 1245, 1245, 1245, 1245, 1245, 1245, 1245, 1245, 389, 540, + 548, 557, 558, 396, 568, 590, 604, 605, 834, 801, + 882, 877, 878, 891, 15, 835, 879, 832, 880, 881, + 833, 455, 455, 944, 885, 807, 1193, 251, 251, 562, + 455, 1243, 1243, 817, 1049, 1045, 1046, 1243, 1243, 1243, + 1243, 1243, 1243, 1243, 1243, 1243, 1243, 608, 642, 1194, + 1253, 1254, 341, 248, 248, 248, 248, 250, 252, 822, + 822, 1196, 1196, 1003, 1196, 1003, 807, 416, 807, 599, + 1003, 1285, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, + 1003, 1003, 1003, 1267, 1267, 965, 1267, 1196, 488, 5, + 489, 6, 1196, 1196, 1196, 1196, 495, 385, 1196, 1196, + 1196, 1277, 1277, 1277, 1277, 277, 277, 277, 277, 560, + 1279, 1279, 1279, 1279, 1069, 1070, 898, 346, 555, 319, + 303, 899, 706, 623, 625, 644, 643, 346, 346, 1146, + 662, 666, 979, 670, 678, 975, 1263, 430, 1295, 1295, + 332, 346, 346, 819, 346, 639, 1312, 653, 654, 655, + 847, 537, 537, 927, 537, 1295, 526, 526, 542, 1272, + 1273, 346, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 1298, 620, 621, 1036, 822, 446, 395, 1265, + 1265, 1036, 938, 938, 938, 938, 566, 602, 446, 932, + 939, 936, 403, 679, 825, 1189, 554, 535, 535, 535, + 535, 844, 592, 603, 344, 345, 1256, 968, 942, 942, + 940, 942, 705, 987, 539, 977, 972, 1296, 1296, 1034, + 440, 903, 1085, 709, 856, 440, 440, 465, 607, 665, + 469, 1038, 0, 984, 1296, 541, 552, 949, 0, 0, + 541, 846, 552, 648, 963, 388, 1177, 914, 1080, 840, + 1178, 1181, 915, 1182, 0, 569, 458, 459, 460, 542, + 852, 1188, 0, 1303, 1304, 254, 254, 401, 402, 0, + 0, 0, 651, 0, 652, 0, 405, 406, 407, 0, + 663, 0, 0, 408, 0, 0, 0, 339, 850, 597, + 611, 614, 615, 616, 617, 636, 637, 638, 682, 921, + 998, 1006, 1010, 1007, 1011, 0, 440, 440, 440, 440, + 440, 440, 440, 440, 440, 440, 440, 0, 1191, 440, + 855, 843, 1033, 1037, 587, 1062, 0, 683, 669, 669, + 947, 496, 675, 1060, 387, 391, 549, 589, 593, 425, 0, 0, 0, 0, 0, 0, 425, 0, 0, 0, - 0, 0, 0, 934, 1012, 1005, 1009, 1006, 1010, 0, - 0, 0, 0, 0, 272, 0, 0, 0, 0, 537, - 537, 0, 0, 0, 0, 1075, 856, 0, 0, 0, + 0, 0, 0, 937, 1015, 1008, 1012, 1009, 1013, 0, + 0, 0, 0, 0, 272, 0, 0, 0, 0, 538, + 538, 0, 0, 0, 0, 1078, 859, 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, 979, - 979 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 982, + 982 ); protected $gotoCheck = array( @@ -759,9 +763,9 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 23, 23, 23, 23, 15, 106, 106, 7, 75, + 42, 23, 23, 23, 23, 15, 106, 106, 95, 75, 75, 20, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 106, 162, 162, 95, 168, 168, 168, 162, 162, + 106, 106, 162, 162, 168, 168, 168, 7, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 15, 6, 15, 15, 15, 15, 75, 15, 15, 15, 15, 15, @@ -783,11 +787,11 @@ class Php7 extends \PhpParser\ParserAbstract 165, 165, 174, 83, 83, 124, 22, 19, 28, 124, 124, 124, 19, 19, 19, 19, 2, 2, 19, 19, 19, 91, 91, 91, 25, 154, 9, 105, 105, 105, - 105, 37, 105, 9, 108, 123, 14, 25, 25, 25, - 25, 25, 25, 151, 25, 25, 25, 95, 95, 97, - 23, 17, 17, 41, 94, 23, 23, 126, 17, 14, - 82, 175, 175, 17, 141, 9, 9, -1, -1, -1, - 9, 17, 9, 17, 17, 9, 78, 78, 175, 17, + 105, 37, 105, 9, 95, 95, 14, 25, 25, 25, + 25, 25, 25, 108, 25, 25, 25, 175, 175, 123, + 23, 17, 17, 97, 41, 23, 23, 151, 17, 14, + 82, 126, -1, 17, 175, 9, 9, 94, -1, -1, + 9, 17, 9, 17, 17, 9, 78, 78, 141, 17, 78, 78, 78, 78, -1, 9, 9, 9, 9, 14, 9, 17, -1, 9, 9, 5, 5, 80, 80, -1, -1, -1, 80, -1, 80, -1, 80, 80, 80, -1, @@ -808,45 +812,45 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $gotoBase = array( - 0, 0, -297, 0, 0, 226, 196, 159, 517, 7, + 0, 0, -300, 0, 0, 226, 196, 178, 517, 7, 0, 0, -66, -65, 25, -175, 78, -33, 39, 84, -213, 0, -64, 158, 302, 390, 15, 18, 46, 49, 0, 0, 0, 0, 0, -356, 0, 67, 0, 32, - 0, -10, -1, 0, 0, 13, -417, 0, -364, 200, + 0, -9, -1, 0, 0, 13, -420, 0, -367, 200, 0, 0, 0, 0, 0, 208, 0, 0, 490, 0, 0, 256, 0, 85, -14, -236, 0, 0, 0, 0, 0, 0, -6, 0, 0, -168, 0, 0, 45, 140, - -12, 0, -35, -95, -344, 0, 0, 221, 0, 0, - 27, 92, 0, 0, -11, -287, 0, 19, 0, 0, - 0, 251, 267, 0, 0, 370, -73, 0, 43, 0, + -12, 0, -35, -95, -347, 0, 0, 221, 0, 0, + 27, 92, 0, 0, 2, -303, 0, 23, 0, 0, + 0, 251, 267, 0, 0, 370, -73, 0, 52, 0, 0, 61, 0, 0, 0, 270, 0, 0, 0, 0, - 0, 6, 0, 40, 16, 0, -7, 0, 0, 0, + 0, 6, 0, 54, 16, 0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, - 0, -2, 0, 188, 0, 59, 0, 0, 0, -195, - 0, -19, 0, 0, 35, 0, 0, 0, 0, 0, - 0, 3, -57, -8, 201, 117, 0, 0, -110, 0, - -4, 223, 0, 241, 36, 129, 0, 0 + 0, 12, 0, 188, 0, 59, 0, 0, 0, -195, + 0, -5, 0, 0, 35, 0, 0, 0, 0, 0, + 0, 3, -57, -8, 201, 117, 0, 0, -111, 0, + -4, 223, 0, 241, 36, 115, 0, 0 ); protected $gotoDefault = array( - -32768, 500, 710, 4, 711, 904, 787, 796, 582, 516, - 678, 340, 609, 414, 1258, 881, 1081, 564, 815, 1202, - 1210, 447, 818, 324, 700, 863, 864, 865, 392, 377, - 383, 390, 631, 610, 482, 850, 443, 842, 474, 845, - 442, 854, 162, 411, 498, 858, 3, 860, 543, 891, - 378, 868, 379, 655, 870, 549, 872, 873, 386, 393, - 394, 1086, 557, 606, 885, 243, 551, 886, 376, 887, - 894, 381, 384, 664, 454, 493, 487, 404, 1061, 593, - 628, 451, 468, 616, 615, 603, 467, 426, 409, 326, - 923, 931, 475, 452, 945, 342, 953, 708, 1093, 623, - 477, 961, 624, 968, 971, 517, 518, 466, 983, 269, - 986, 478, 1018, 646, 647, 998, 625, 626, 1016, 461, - 583, 1024, 444, 1032, 1246, 445, 1036, 262, 1039, 276, - 410, 427, 1044, 1045, 8, 1051, 670, 671, 10, 273, - 497, 1076, 665, 441, 1092, 431, 1162, 1164, 545, 479, - 1182, 1181, 658, 494, 1187, 1249, 439, 519, 462, 310, - 520, 302, 328, 307, 535, 289, 329, 521, 463, 1255, - 1263, 325, 30, 1283, 1294, 336, 561, 598 + -32768, 500, 713, 4, 714, 907, 790, 799, 585, 517, + 681, 340, 612, 414, 1261, 884, 1084, 567, 818, 1205, + 1213, 447, 821, 324, 703, 866, 867, 868, 392, 377, + 383, 390, 634, 613, 482, 853, 443, 845, 474, 848, + 442, 857, 162, 411, 498, 861, 3, 863, 545, 894, + 378, 871, 379, 658, 873, 551, 875, 876, 386, 393, + 394, 1089, 559, 609, 888, 243, 553, 889, 376, 890, + 897, 381, 384, 667, 454, 493, 487, 404, 1064, 596, + 631, 451, 468, 619, 618, 606, 467, 426, 409, 326, + 926, 934, 475, 452, 948, 342, 956, 711, 1096, 626, + 477, 964, 627, 971, 974, 518, 519, 466, 986, 269, + 989, 478, 1021, 649, 650, 1001, 628, 629, 1019, 461, + 586, 1027, 444, 1035, 1249, 445, 1039, 262, 1042, 276, + 410, 427, 1047, 1048, 8, 1054, 673, 674, 10, 273, + 497, 1079, 668, 441, 1095, 431, 1165, 1167, 547, 479, + 1185, 1184, 661, 494, 1190, 1252, 439, 520, 462, 310, + 521, 302, 328, 307, 536, 289, 329, 522, 463, 1258, + 1266, 325, 30, 1286, 1297, 336, 564, 601 ); protected $ruleToNonTerminal = array( @@ -925,7 +929,7 @@ class Php7 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, - 2, 0, 1, 1, 1, 1, 1, 3, 5, 4, + 2, 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, @@ -1329,7 +1333,7 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 116 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 117 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 669bf44716..83476c742b 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -491,7 +491,7 @@ public function printFormatPreserving(array $stmts, array $origStmts, array $ori $pos = 0; $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); if (null !== $result) { - $result .= $this->origTokens->getTokenCode($pos, count($origTokens), 0); + $result .= $this->origTokens->getTokenCode($pos, count($origTokens) - 1, 0); } else { // Fallback // TODO Add pos + \strlen($this->text); + } + + /** Get 1-based end line number of the token. */ + public function getEndLine(): int { + return $this->line + \substr_count($this->text, "\n"); + } +} \ No newline at end of file diff --git a/test/PhpParser/LexerTest.php b/test/PhpParser/LexerTest.php index c15179646d..b9b1b5d367 100644 --- a/test/PhpParser/LexerTest.php +++ b/test/PhpParser/LexerTest.php @@ -250,6 +250,9 @@ public function testHandleHaltCompiler($code, $remaining) { $lexer->startLexing($code); while (Tokens::T_HALT_COMPILER !== $lexer->getNextToken()); + $lexer->getNextToken(); + $lexer->getNextToken(); + $lexer->getNextToken(); $this->assertSame($remaining, $lexer->handleHaltCompiler()); $this->assertSame(0, $lexer->getNextToken()); @@ -257,41 +260,33 @@ public function testHandleHaltCompiler($code, $remaining) { public function provideTestHaltCompiler() { return [ + ['Remaining Text', 'Remaining Text'], - //array('expectException(Error::class); - $this->expectExceptionMessage('__HALT_COMPILER must be followed by "();"'); - $lexer = $this->getLexer(); - $lexer->startLexing('getNextToken()); - $lexer->handleHaltCompiler(); - } - public function testGetTokens() { $code = 'getLexer(); $lexer->startLexing($code); - $this->assertSame($expectedTokens, $lexer->getTokens()); + $this->assertEquals($expectedTokens, $lexer->getTokens()); } } diff --git a/test/code/parser/stmt/haltCompilerInvalidSyntax.test b/test/code/parser/stmt/haltCompilerInvalidSyntax.test index 381019a9bf..2884737d2e 100644 --- a/test/code/parser/stmt/haltCompilerInvalidSyntax.test +++ b/test/code/parser/stmt/haltCompilerInvalidSyntax.test @@ -3,4 +3,6 @@ Invalid __halt_compiler() syntax Date: Sun, 5 Jun 2022 18:20:24 +0200 Subject: [PATCH 077/428] Perform token position adjustment during emulator patching --- lib/PhpParser/Lexer/Emulative.php | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 120eac90eb..77db38a118 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -132,15 +132,16 @@ private function fixupTokens() // Load first patch $patchIdx = 0; - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; // We use a manual loop over the tokens, because we modify the array on the fly - $pos = 0; + $posDelta = 0; for ($i = 0, $c = \count($this->tokens); $i < $c; $i++) { $token = $this->tokens[$i]; + $pos = $token->pos; + $token->pos += $posDelta; + $localPosDelta = 0; $len = \strlen($token->text); - $posDelta = 0; while ($patchPos >= $pos && $patchPos < $pos + $len) { $patchTextLen = \strlen($patchText); if ($patchType === 'remove') { @@ -152,20 +153,20 @@ private function fixupTokens() } else { // Remove from token string $token->text = substr_replace( - $token->text, '', $patchPos - $pos + $posDelta, $patchTextLen + $token->text, '', $patchPos - $pos + $localPosDelta, $patchTextLen ); - $posDelta -= $patchTextLen; + $localPosDelta -= $patchTextLen; } } elseif ($patchType === 'add') { // Insert into the token string $token->text = substr_replace( - $token->text, $patchText, $patchPos - $pos + $posDelta, 0 + $token->text, $patchText, $patchPos - $pos + $localPosDelta, 0 ); - $posDelta += $patchTextLen; + $localPosDelta += $patchTextLen; } else if ($patchType === 'replace') { // Replace inside the token string $token->text = substr_replace( - $token->text, $patchText, $patchPos - $pos + $posDelta, $patchTextLen + $token->text, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen ); } else { assert(false); @@ -174,18 +175,16 @@ private function fixupTokens() // Fetch the next patch $patchIdx++; if ($patchIdx >= \count($this->patches)) { - // No more patches, we're done - return; + // No more patches. However, we still need to adjust position. + $patchPos = \PHP_INT_MAX; + break; } list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; } - $pos += $len; + $posDelta += $localPosDelta; } - - // A patch did not apply - assert(false); } /** From 472e163ffa761dcf8ad74a7333bc6090a791ba09 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 5 Jun 2022 18:23:27 +0200 Subject: [PATCH 078/428] Use extends instead of class_alias Apparently we can't alias an internal class. --- lib/PhpParser/Internal/TokenPolyfill.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/Internal/TokenPolyfill.php b/lib/PhpParser/Internal/TokenPolyfill.php index a5a4cfc602..ba414dc807 100644 --- a/lib/PhpParser/Internal/TokenPolyfill.php +++ b/lib/PhpParser/Internal/TokenPolyfill.php @@ -3,7 +3,7 @@ namespace PhpParser\Internal; if (\PHP_VERSION_ID >= 80000) { - \class_alias('PhpToken', 'PhpParser\TokenPolyfill'); + class TokenPolyfill extends \PhpToken {} return; } From bdd131d3ec48eb18bbf1ca5decc7f45f23b535b3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 5 Jun 2022 22:51:45 +0200 Subject: [PATCH 079/428] Add missing strict_types=1 directive to parser --- grammar/parser.template | 2 +- lib/PhpParser/Parser/Php5.php | 2 +- lib/PhpParser/Parser/Php7.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/grammar/parser.template b/grammar/parser.template index 6166607c9e..938ab88040 100644 --- a/grammar/parser.template +++ b/grammar/parser.template @@ -1,4 +1,4 @@ -semValue #semval($,%t) $this->semValue diff --git a/lib/PhpParser/Parser/Php5.php b/lib/PhpParser/Parser/Php5.php index a21dc268ca..960a0a8c7a 100644 --- a/lib/PhpParser/Parser/Php5.php +++ b/lib/PhpParser/Parser/Php5.php @@ -1,4 +1,4 @@ - Date: Sun, 5 Jun 2022 22:59:08 +0200 Subject: [PATCH 080/428] Add space after "use" during empty list insertion as well --- lib/PhpParser/PrettyPrinterAbstract.php | 2 +- test/code/formatPreservation/emptyListInsertion.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 83476c742b..e3ec0fe7c4 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1440,7 +1440,7 @@ protected function initializeEmptyListInsertionMap() { // [$find, $extraLeft, $extraRight] $this->emptyListInsertionMap = [ 'Expr_ArrowFunction->params' => ['(', '', ''], - 'Expr_Closure->uses' => [')', ' use(', ')'], + 'Expr_Closure->uses' => [')', ' use (', ')'], 'Expr_Closure->params' => ['(', '', ''], 'Expr_FuncCall->args' => ['(', '', ''], 'Expr_MethodCall->args' => ['(', '', ''], diff --git a/test/code/formatPreservation/emptyListInsertion.test b/test/code/formatPreservation/emptyListInsertion.test index ad3137bf68..82564fa8a8 100644 --- a/test/code/formatPreservation/emptyListInsertion.test +++ b/test/code/formatPreservation/emptyListInsertion.test @@ -57,7 +57,7 @@ class Test { } function -($a, $b) use($c, $d) {}; +($a, $b) use ($c, $d) {}; fn($a, $b) => 42; From b4902cefe4b6330f1253d1f9dbfecd693566eb8c Mon Sep 17 00:00:00 2001 From: Romain Date: Fri, 10 Jun 2022 14:33:50 +0200 Subject: [PATCH 081/428] optimization haveTokenImmediatelyAfter performance --- lib/PhpParser/Internal/TokenStream.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index b57a7c6d77..87d0773d82 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -91,7 +91,7 @@ public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType) : bool { $tokens = $this->tokens; $pos++; - for (; $pos < \count($tokens); $pos++) { + for ($c = \count($tokens); $pos < $c; $pos++) { $token = $tokens[$pos]; if ($token->is($expectedTokenType)) { return true; From d3d1297c0dd4803585b305014f4df4c1d47ee801 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 6 Jun 2022 16:45:02 +0200 Subject: [PATCH 082/428] Remove PHP 5 parser --- UPGRADE-5.0.md | 19 +- grammar/php5.y | 1036 ------- grammar/php7.y | 9 +- grammar/rebuildParsers.php | 1 - lib/PhpParser/Parser/Multiple.php | 55 - lib/PhpParser/Parser/Php5.php | 2670 ----------------- lib/PhpParser/Parser/Php7.php | 1003 ++++--- lib/PhpParser/ParserAbstract.php | 106 +- lib/PhpParser/ParserFactory.php | 15 +- test/PhpParser/CodeParsingTest.php | 43 +- test/PhpParser/CodeTestParser.php | 2 +- test/PhpParser/Parser/MultipleTest.php | 99 - test/PhpParser/Parser/Php5Test.php | 13 - test/PhpParser/ParserFactoryTest.php | 10 +- test/PhpParser/PrettyPrinterTest.php | 42 +- test/code/parser/errorHandling/recovery.test | 17 +- test/code/parser/expr/arrayDestructuring.test | 1 - test/code/parser/expr/arrow_function.test | 1 - test/code/parser/expr/assignNewByRef.test | 23 +- .../expr/closure_use_trailing_comma.test | 1 - test/code/parser/expr/exprInIsset.test | 1 - test/code/parser/expr/exprInList.test | 1 - .../parser/expr/fetchAndCall/namedArgs.test | 1 - .../expr/fetchAndCall/objectAccess.test | 22 +- .../parser/expr/fetchAndCall/staticCall.test | 37 +- .../code/parser/expr/firstClassCallables.test | 1 - .../parser/expr/keywordsInNamespacedName.test | 1 - test/code/parser/expr/listReferences.test | 1 - test/code/parser/expr/listWithKeys.test | 1 - test/code/parser/expr/match.test | 5 - test/code/parser/expr/newWithoutClass.test | 9 - test/code/parser/expr/nullsafe.test | 1 - test/code/parser/expr/throw.test | 1 - test/code/parser/expr/trailingCommas.test | 1 - test/code/parser/expr/uvs/constDeref.test | 1 - .../expr/uvs/globalNonSimpleVarError.test | 1 - test/code/parser/expr/uvs/indirectCall.test | 1 - test/code/parser/expr/uvs/isset.test | 1 - test/code/parser/expr/uvs/misc.test | 1 - test/code/parser/expr/uvs/new.test | 1 - .../parser/expr/uvs/newInstanceofExpr.test | 1 - test/code/parser/expr/uvs/staticProperty.test | 1 - test/code/parser/expr/variable.test | 13 +- .../parser/scalar/encapsedNegVarOffset.test | 1 - test/code/parser/scalar/invalidOctal.test | 4 +- test/code/parser/scalar/unicodeEscape.test | 1 - test/code/parser/stmt/attributes.test | 1 - .../stmt/class/constModifierErrors.test | 4 - .../parser/stmt/class/constModifiers.test | 1 - test/code/parser/stmt/class/enum.test | 1 - .../parser/stmt/class/enum_with_string.test | 1 - test/code/parser/stmt/class/modifier.test | 54 - .../code/parser/stmt/class/propertyTypes.test | 1 - .../parser/stmt/class/property_promotion.test | 1 - test/code/parser/stmt/class/readonly.test | 25 - .../parser/stmt/class/readonlyMethod.test | 1 - test/code/parser/stmt/class/staticType.test | 1 - .../function/builtinTypeDeclarations.test | 1 - .../stmt/function/intersectionTypes.test | 1 - test/code/parser/stmt/function/neverType.test | 1 - .../parser/stmt/function/nullableTypes.test | 1 - .../function/parameters_trailing_comma.test | 3 - .../parser/stmt/function/typeVersions.test | 1311 ++++++++ .../code/parser/stmt/function/unionTypes.test | 1 - .../stmt/generator/yieldPrecedence.test | 1 - test/code/parser/stmt/multiCatch.test | 1 - .../parser/stmt/namespace/groupUseErrors.test | 2 - .../stmt/namespace/groupUseTrailingComma.test | 1 - test/code/parser/stmt/newInInitializer.test | 1 - .../stmt/tryCatch_without_variable.test | 1 - .../prettyPrinter/commentsInCommaList.test | 1 - .../expr/arrayDestructuring.test | 1 - test/code/prettyPrinter/expr/arraySpread.test | 1 - .../prettyPrinter/expr/arrow_function.test | 1 - .../expr/firstClassCallables.test | 1 - test/code/prettyPrinter/expr/match.test | 1 - test/code/prettyPrinter/expr/namedArgs.test | 1 - test/code/prettyPrinter/expr/newVariable.test | 1 - test/code/prettyPrinter/expr/nullsafe.test | 1 - test/code/prettyPrinter/expr/throw.test | 1 - test/code/prettyPrinter/expr/uvs.test | 1 - test/code/prettyPrinter/expr/variables.test | 13 +- test/code/prettyPrinter/expr/yield.test | 1 - test/code/prettyPrinter/stmt/attributes.test | 1 - test/code/prettyPrinter/stmt/class_const.test | 1 - test/code/prettyPrinter/stmt/enum.test | 1 - .../stmt/intersection_types.test | 1 - test/code/prettyPrinter/stmt/multiCatch.test | 1 - .../prettyPrinter/stmt/nullable_types.test | 1 - test/code/prettyPrinter/stmt/properties.test | 1 - .../stmt/property_promotion.test | 2 - .../prettyPrinter/stmt/readonly_class.test | 1 - test/code/prettyPrinter/stmt/staticType.test | 1 - .../stmt/tryCatch_without_variable.test | 1 - test/code/prettyPrinter/stmt/union_types.test | 1 - 95 files changed, 1963 insertions(+), 4768 deletions(-) delete mode 100644 grammar/php5.y delete mode 100644 lib/PhpParser/Parser/Multiple.php delete mode 100644 lib/PhpParser/Parser/Php5.php delete mode 100644 test/PhpParser/Parser/MultipleTest.php delete mode 100644 test/PhpParser/Parser/Php5Test.php create mode 100644 test/code/parser/stmt/function/typeVersions.test diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index f069df7b24..135a41a62d 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -5,6 +5,23 @@ Upgrading from PHP-Parser 4.x to 5.0 PHP-Parser now requires PHP 7.1 or newer to run. It is however still possible to *parse* code for older versions, while running on a newer version. +### PHP 5 parsing support + +The dedicated parser for PHP 5 has been removed (including the `ONLY_PHP5` and `PREFER_PHP5` ParserFactory options). The PHP 7 parser now supports a `phpVersion` option, which can be used to improve compatibility with older PHP versions. + +In particular, if an older `phpVersion` is specified, then: + + * For versions before PHP 7.0, `$foo =& new Bar()` assignments are allowed without error. + * For versions before PHP 7.0, invalid octal literals `089` are allowed without error. + * Type hints are interpreted as a class `Name` or as a built-in `Identifier` depending on PHP + version, for example `int` is treated as a class name on PHP 5.6 and as a built-in on PHP 7.0. + +However, some aspects of PHP 5 parsing are no longer supported: + + * Some variables like `$$foo[0]` are valid in both PHP 5 and PHP 7, but have different interpretation. In that case, the PHP 7 AST will always be constructed (`($$foo)[0]` rather than `${$foo[0]}`). + * Declarations of the form `global $$var[0]` are not supported in PHP 7 and will cause a parse error. In error recovery mode, it is possible to continue parsing after such declarations. + * The PHP 7 parser will accept many constructs that are not valid in PHP 5. However, this was also true of the dedicated PHP 5 parser. + ### Changes to the default pretty printer A number of changes to the standard pretty printer have been made, to make it match contemporary coding style conventions (and in particular PSR-12). Options to restore the previous behavior are not provided, but it is possible to override the formatting methods (such as `pStmt_ClassMethod`) with your preferred formatting. @@ -63,4 +80,4 @@ class Token { ``` The `Lexer::getTokens()` method will now return an array of `Token`s, rather than an array of arrays and strings. -Additionally, the token array is now terminated by a sentinel token with ID 0. \ No newline at end of file +Additionally, the token array is now terminated by a sentinel token with ID 0. diff --git a/grammar/php5.y b/grammar/php5.y deleted file mode 100644 index 655bb12b34..0000000000 --- a/grammar/php5.y +++ /dev/null @@ -1,1036 +0,0 @@ -%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 - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -ampersand: - T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - | T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG -; - -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 | T_FN - | T_MATCH -; - -semi_reserved: - reserved_non_modifiers - | T_STATIC | T_ABSTRACT | T_FINAL | T_PRIVATE | T_PROTECTED | T_PUBLIC -; - -identifier_ex: - T_STRING { $$ = Node\Identifier[$1]; } - | semi_reserved { $$ = Node\Identifier[$1]; } -; - -identifier: - T_STRING { $$ = Node\Identifier[$1]; } -; - -reserved_non_modifiers_identifier: - reserved_non_modifiers { $$ = Node\Identifier[$1]; } -; - -namespace_name: - T_STRING { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } -; - -legacy_namespace_name: - namespace_name { $$ = $1; } - | T_NAME_FULLY_QUALIFIED { $$ = Name[substr($1, 1)]; } -; - -plain_variable: - T_VARIABLE { $$ = Expr\Variable[parseVar($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]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($$); } - | T_NAMESPACE namespace_name '{' top_statement_list '}' - { $$ = Stmt\Namespace_[$2, $4]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($$); } - | T_NAMESPACE '{' top_statement_list '}' - { $$ = Stmt\Namespace_[null, $3]; - $$->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $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; } -; - -group_use_declaration: - T_USE use_type legacy_namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations '}' - { $$ = Stmt\GroupUse[$3, $6, $2]; } - | T_USE legacy_namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}' - { $$ = Stmt\GroupUse[$2, $5, 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 identifier - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } -; - -use_declaration: - legacy_namespace_name - { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } - | legacy_namespace_name T_AS identifier - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } -; - -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: - identifier '=' static_scalar { $$ = Node\Const_[$1, $3]; } -; - -class_const_list: - class_const_list ',' class_const { push($1, $3); } - | class_const { init($1); } -; - -class_const: - identifier_ex '=' 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 - { makeZeroLengthNop($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 '}' - { - if ($2) { - $$ = $2; prependLeadingComments($$); - } else { - makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); - if (null === $$) { $$ = array(); } - } - } - | 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]; } - | 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]; } - | yield_expr ';' { $$ = Stmt\Expression[$1]; } - | expr ';' { $$ = Stmt\Expression[$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 identifier ';' { $$ = Stmt\Goto_[$2]; } - | identifier ':' { $$ = Stmt\Label[$1]; } - | expr error { $$ = Stmt\Expression[$1]; } - | error { $$ = array(); /* means: no statement */ } -; - -statement: - non_empty_statement { $$ = $1; } - | ';' - { makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); - if ($$ === null) $$ = array(); /* means: no statement */ } -; - -catches: - /* empty */ { init(); } - | catches catch { push($1, $2); } -; - -catch: - T_CATCH '(' name plain_variable ')' '{' inner_statement_list '}' - { $$ = Stmt\Catch_[array($3), $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; } - | ampersand { $$ = true; } -; - -optional_arg_ref: - /* empty */ { $$ = false; } - | T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG { $$ = true; } -; - -optional_ellipsis: - /* empty */ { $$ = false; } - | T_ELLIPSIS { $$ = true; } -; - -function_declaration_statement: - T_FUNCTION optional_ref identifier '(' 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 identifier extends_from implements_list '{' class_statement_list '}' - { $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6]]; - $this->checkClass($$, #2); } - | T_INTERFACE identifier interface_extends_list '{' class_statement_list '}' - { $$ = Stmt\Interface_[$2, ['extends' => $3, 'stmts' => $5]]; - $this->checkInterface($$, #2); } - | T_TRAIT identifier '{' 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 class_name { $$ = $2; } -; - -interface_extends_list: - /* empty */ { $$ = array(); } - | T_EXTENDS class_name_list { $$ = $2; } -; - -implements_list: - /* empty */ { $$ = array(); } - | T_IMPLEMENTS class_name_list { $$ = $2; } -; - -class_name_list: - class_name { init($1); } - | class_name_list ',' class_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: - identifier '=' 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_ex { $$ = Stmt\Case_[$2, $4]; } - | T_DEFAULT case_separator inner_statement_list_ex { $$ = 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); } - | ampersand 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_arg_ref optional_ellipsis plain_variable - { $$ = Node\Param[$4, null, $1, $2, $3]; $this->checkParam($$); } - | optional_param_type optional_arg_ref optional_ellipsis plain_variable '=' static_scalar - { $$ = Node\Param[$4, $6, $1, $2, $3]; $this->checkParam($$); } -; - -type: - name { $$ = $1; } - | T_ARRAY { $$ = Node\Identifier['array']; } - | T_CALLABLE { $$ = Node\Identifier['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]; } - | ampersand 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: - plain_variable { $$ = $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: - plain_variable { $$ = Stmt\StaticVar[$1, null]; } - | plain_variable '=' static_scalar { $$ = Stmt\StaticVar[$1, $3]; } -; - -class_statement_list_ex: - class_statement_list_ex class_statement { if ($2 !== null) { push($1, $2); } } - | /* empty */ { init(); } -; - -class_statement_list: - class_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); - if ($nop !== null) { $1[] = $nop; } $$ = $1; } -; - -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_ex '(' 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 class_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 class_name_list ';' - { $$ = Stmt\TraitUseAdaptation\Precedence[$1[0], $1[1], $3]; } - | trait_method_reference T_AS member_modifier identifier_ex ';' - { $$ = 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 identifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } - | trait_method_reference T_AS reserved_non_modifiers_identifier ';' - { $$ = Stmt\TraitUseAdaptation\Alias[$1[0], $1[1], null, $3]; } -; - -trait_method_reference_fully_qualified: - name T_PAAMAYIM_NEKUDOTAYIM identifier_ex { $$ = array($1, $3); } -; -trait_method_reference: - trait_method_reference_fully_qualified { $$ = $1; } - | identifier_ex { $$ = 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_decl_name: - T_VARIABLE { $$ = Node\VarLikeIdentifier[parseVar($1)]; } -; - -property_declaration: - property_decl_name { $$ = Stmt\PropertyProperty[$1, null]; } - | property_decl_name '=' static_scalar { $$ = Stmt\PropertyProperty[$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 '=' ampersand variable { $$ = Expr\AssignRef[$1, $4]; } - | variable '=' ampersand 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_COALESCE_EQUAL expr { $$ = Expr\AssignOp\Coalesce [$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 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG expr { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | expr T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 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 - { $attrs = attributes(); - $attrs['kind'] = $this->getFloatCastKind($1); - $$ = new Expr\Cast\Double($2, $attrs); } - | 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 ']' { $$ = Expr\ArrayDimFetch[Scalar\String_::fromString($1, attributes()), $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 plain_variable { $$ = Expr\ClosureUse[$2, $1]; } -; - -function_call: - name argument_list { $$ = Expr\FuncCall[$1, $2]; } - | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_ex 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 - { $$ = $this->fixupPhp5StaticPropCall($1, $2, attributes()); } - | 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: - T_STRING { $$ = Name[$1]; } - | T_NAME_QUALIFIED { $$ = Name[$1]; } - | T_NAME_FULLY_QUALIFIED { $$ = Name\FullyQualified[substr($1, 1)]; } - | T_NAME_RELATIVE { $$ = Name\Relative[substr($1, 10)]; } -; - -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::fromString($1, attributes()); } - | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes(), false); } - | 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 - { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), false); } - | T_START_HEREDOC T_END_HEREDOC - { $$ = $this->parseDocString($1, '', $2, attributes(), stackAttributes(#2), false); } -; - -static_scalar: - common_scalar { $$ = $1; } - | class_name T_PAAMAYIM_NEKUDOTAYIM identifier_ex { $$ = 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 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG static_scalar - { $$ = Expr\BinaryOp\BitwiseAnd[$1, $3]; } - | static_scalar T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG 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_ex - { $$ = 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 - { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), true); } -; - -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_simple_name: - T_VARIABLE - { $var = parseVar($1); $$ = \is_string($var) ? Node\VarLikeIdentifier[$var] : $var; } -; - -static_property_with_arrays: - class_name_or_var T_PAAMAYIM_NEKUDOTAYIM static_property_simple_name - { $$ = Expr\StaticPropertyFetch[$1, $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]; } - | plain_variable { $$ = $1; } - | '$' '{' expr '}' { $$ = Expr\Variable[$3]; } -; - -dim_offset: - /* empty */ { $$ = null; } - | expr { $$ = $1; } -; - -object_property: - identifier { $$ = $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 ampersand variable { $$ = Expr\ArrayItem[$4, $1, true]; } - | ampersand variable { $$ = Expr\ArrayItem[$2, null, true]; } - | T_ELLIPSIS expr { $$ = Expr\ArrayItem[$2, null, false, attributes(), 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_str_varname: - T_STRING_VARNAME { $$ = Expr\Variable[$1]; } -; - -encaps_var: - plain_variable { $$ = $1; } - | plain_variable '[' encaps_var_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | plain_variable T_OBJECT_OPERATOR identifier { $$ = 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 encaps_str_varname '[' expr ']' '}' - { $$ = Expr\ArrayDimFetch[$2, $4]; } - | T_CURLY_OPEN variable '}' { $$ = $2; } -; - -encaps_var_offset: - T_STRING { $$ = Scalar\String_[$1]; } - | T_NUM_STRING { $$ = $this->parseNumString($1, attributes()); } - | plain_variable { $$ = $1; } -; - -%% diff --git a/grammar/php7.y b/grammar/php7.y index 8c33e19f19..ebac020340 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -808,6 +808,12 @@ expr: | array_short_syntax '=' expr { $$ = Expr\Assign[$1, $3]; } | variable '=' expr { $$ = Expr\Assign[$1, $3]; } | variable '=' ampersand variable { $$ = Expr\AssignRef[$1, $4]; } + | variable '=' ampersand new_expr + { $$ = Expr\AssignRef[$1, $4]; + if ($this->phpVersion >= 70000) { + $this->emitError(new Error('Cannot assign new by reference', attributes())); + } + } | new_expr { $$ = $1; } | match { $$ = $1; } | T_CLONE expr { $$ = Expr\Clone_[$2]; } @@ -1031,7 +1037,8 @@ dereferencable_scalar: ; scalar: - T_LNUMBER { $$ = $this->parseLNumber($1, attributes()); } + T_LNUMBER + { $$ = $this->parseLNumber($1, attributes(), $this->phpVersion < 70000); } | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); } | dereferencable_scalar { $$ = $1; } | constant { $$ = $1; } diff --git a/grammar/rebuildParsers.php b/grammar/rebuildParsers.php index 2d0c6b14d3..6493539848 100644 --- a/grammar/rebuildParsers.php +++ b/grammar/rebuildParsers.php @@ -3,7 +3,6 @@ require __DIR__ . '/phpyLang.php'; $grammarFileToName = [ - __DIR__ . '/php5.y' => 'Php5', __DIR__ . '/php7.y' => 'Php7', ]; diff --git a/lib/PhpParser/Parser/Multiple.php b/lib/PhpParser/Parser/Multiple.php deleted file mode 100644 index be4c5bea19..0000000000 --- a/lib/PhpParser/Parser/Multiple.php +++ /dev/null @@ -1,55 +0,0 @@ -parsers = $parsers; - } - - public function parse(string $code, ErrorHandler $errorHandler = null): ?array { - 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/lib/PhpParser/Parser/Php5.php b/lib/PhpParser/Parser/Php5.php deleted file mode 100644 index 960a0a8c7a..0000000000 --- a/lib/PhpParser/Parser/Php5.php +++ /dev/null @@ -1,2670 +0,0 @@ -'", - "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_MATCH", - "T_ENDSWITCH", - "T_CASE", - "T_DEFAULT", - "T_BREAK", - "T_CONTINUE", - "T_GOTO", - "T_FUNCTION", - "T_FN", - "T_CONST", - "T_RETURN", - "T_TRY", - "T_CATCH", - "T_FINALLY", - "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", - "T_NAME_FULLY_QUALIFIED", - "T_NAME_QUALIFIED", - "T_NAME_RELATIVE", - "'('", - "')'", - "';'", - "'{'", - "'}'", - "'$'", - "'`'", - "']'", - "'\"'", - "T_READONLY", - "T_ENUM", - "T_NULLSAFE_OBJECT_OPERATOR", - "T_ATTRIBUTE" - ); - - protected $tokenToSymbol = array( - 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 56, 163, 168, 160, 55, 168, 168, - 155, 156, 53, 50, 8, 51, 52, 54, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 31, 157, - 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 70, 168, 162, 36, 168, 161, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 158, 35, 159, 58, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, - 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, - 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 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, 164, - 122, 123, 124, 125, 126, 127, 128, 129, 165, 130, - 131, 132, 166, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 167 - ); - - protected $action = array( - 702, 672, 673, 674, 675, 676, 286, 677, 678, 679, - 715, 716, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 0, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, 245, 246, - 242, 243, 244,-32766,-32766, 680,-32766, 10,-32766,-32766, - -32766,-32766,-32766,-32766,-32766, 1227, 245, 246, 1228, 681, - 682, 683, 684, 685, 686, 687,-32766,-32766, 749,-32766, - -32766,-32766,-32766,-32766,-32766, 688, 689, 690, 691, 692, - 693, 694, 695, 696, 697, 698, 718, 741, 719, 720, - 721, 722, 710, 711, 712, 740, 713, 714, 699, 700, - 701, 703, 704, 705, 743, 744, 745, 746, 747, 748, - 706, 707, 708, 709, 739, 730, 728, 729, 725, 726, - 27, 717, 723, 724, 731, 732, 734, 733, 735, 736, - 55, 56, 425, 57, 58, 727, 738, 737, -224, 59, - 60, 126, 61,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 211,-32767,-32767,-32767,-32767, 29, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119,-32766,-32766,-32766,-32766, 583, 62, 63, 1046, - 769, 757, 770, 64, 363, 65, 294, 295, 66, 67, - 68, 69, 70, 71, 72, 73, 926, 25, 302, 74, - 418, 984, 986, 671, 670, 1098, 1099, 1076, 751, 757, - 826, 54, 1198, 469,-32766,-32766,-32766,-32767,-32767,-32767, - -32767, 98, 99, 100, 101, 102, 756, 952, 953, 954, - 951, 950, 949, 361, 1110,-32766, 337,-32766,-32766,-32766, - -32766,-32766, 313, 493, 952, 953, 954, 951, 950, 949, - 442, 477, 478, 369, 435, 753, 220, 221, 222, 341, - 480, 481, 327, 1104, 1105, 1106, 1107, 1101, 1102, 319, - -32766,-32766,-32766,-32766, -511, 1108, 1103, 207, 1046, 1078, - 1077, 1079, 41, 426, -128, -128, -128, 341, 334, 468, - 336, 751,-32766, 814,-32766,-32766, 40, 21, 427, -128, - 470, -128, 471, -128, 472, -128, 342, 428, -4, 826, - 54,-32766, 33, 34, 429, 360, 1046, 75, 35, 473, - -32766,-32766,-32766, 300, 356, 357, 474, 475, 754, 899, - 900, 302, 476, 811, 128, 797, 846, 430, 431, 1046, - 1046,-32766, 757,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32767,-32767,-32767,-32767,-32767, 215, 216, 220, 221, 222, - 757, 217,-32766, 218, 671, 670, 828, 636, -128, 131, - 825, 341, 220, 221, 222, 209, 28, 443, 207, 1184, - 899, 900, 426, 1098, 1099, 826, 54, 772, 468, 671, - 670, 1100, 814, 207, 249, 40, 21, 427, 1184, 470, - 222, 471, -228, 472, 771, 419, 428, 757, 1046, 1149, - 1218, 33, 34, 429, 360, 435, 415, 35, 473, 207, - 341, 315, 805, 356, 357, 474, 475,-32766,-32766,-32766, - 1046, 476, 671, 670, 479, 846, 430, 431, 341, 561, - 30, 1104, 1105, 1106, 1107, 1101, 1102, 398,-32766, 757, - -32766,-32766,-32766, 1108, 1103, 346, 622, 345, 426, 421, - 219, 826, 54, 289, 468, 828, 636, -4, 814, 32, - 297, 40, 21, 427, 130, 470, 345, 471, 129, 472, - 124, 875, 428, 52, -209, -209, -209, 33, 34, 429, - 360, 120, 344, 35, 473,-32766,-32766,-32766, 541, 356, - 357, 474, 475, 129, 1150, 671, 670, 476, 905, 359, - 797, 846, 430, 431, 212, 422,-32766, 1046,-32766,-32766, - -32766,-32766, 435, 1076, 906, 127, 816, 341, 1078, 1077, - 1079, 220, 221, 222, 426, 930, 247, 221, 222, 213, - 468, 828, 636, -209, 814, 317, 207, 40, 21, 427, - 424, 470, 207, 471, 445, 472, 1046, 207, 428, 1074, - -208, -208, -208, 33, 34, 429, 360, 671, 670, 35, - 473, 125,-32766,-32766,-32766, 356, 357, 474, 475, 826, - 54, -86, 48, 476, 423, 214, 797, 846, 430, 431, - 103, 104, 105,-32766, 307, 1078, 1077, 1079, 49, 79, - 80, 81, 757,-32766,-32766,-32766, 106, 876, 768, 639, - 518, 1199, 757,-32766,-32766,-32766, 250, 828, 636, -208, - 36, 51, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 9, 307, 100, 101, - 102, 324, 426, 480, 826, 54, 757, 1064, 468, 106, - 944, 807, 814, 480, 812, 40, 21, 427, 1110, 470, - 121, 471, 769, 472, 770, 435, 428, 220, 221, 222, - 341, 33, 34, 429, 640, 435, 122, 35, 473, 251, - 341, 826, 54, 356, 357, 245, 246, -259, 207, 925, - 809, 476, 239, 240, 241, 78, 134, 341, 574, 123, - 452, 22, 457, 591, 135, 374, 598, 599, 762, 642, - 252, 644, 941, 656, 929, 664, 314, 426, 647, 826, - 54, 650, 20, 468, 341, 828, 636, 814, 824, 133, - 40, 21, 427,-32766, 470, 307, 471, 839, 472, 106, - 302, 428, 43, 44, 45, 46, 33, 34, 429, 648, - -278, 47, 35, 473, 426, 441, 826, 54, 356, 357, - 468, 50, 53, 132, 814, 606, 476, 40, 21, 427, - 618, 470, 577, 471,-32766, 472, 751, 757, 428, 610, - 596, -84, 847, 33, 34, 429, 653, 957, 522, 35, - 473, 325, 426, 630, 322, 356, 357, -511, 468, 11, - 828, 636, 814, 476, 444, 40, 21, 427, 461, 470, - 285, 471, 580, 472, 826, 54, 428, 595, 316, 38, - 362, 33, 34, 429,-32766, 368, 24, 35, 473, 426, - 841, 848, 0, 356, 357, 468, 326, 862, 636, 814, - 323, 476, 40, 21, 427, 0, 470, 318, 471, 0, - 472, 0, -512, 428, 0, 0, -419, 0, 33, 34, - 429, 0, -410, 0, 35, 473, 1109, 1156, 6, 0, - 356, 357, 7, 12, 14, 828, 636, 373, 476, -420, - 533, 756, 565, 78, 1155, 0, 0, 426, 0, 26, - 31, 37, 42, 468, 76, 77, 210, 814, 288, 292, - 40, 21, 427, 293, 470, 248, 471, 308, 472, 309, - 39, 428, 828, 636, 310, 311, 33, 34, 429, 339, - 355, 416, 35, 473, 215, 216, 516, 659, 356, 357, - 217, -225, 218, -224, 16, 17, 476, 18, 393, 453, - 460, 462, 466, 537, 209, 555, 627, 1051, 1054, 907, - 1114, 1050, 1098, 1099, 1026, 566, 1025, 1091, -429, 660, - 1100, 767, 815, 823, 761, 802, 817, 878, 869, 870, - 828, 636, 800, 863, 860, 858, 936, 937, 934, 822, - 806, 808, 810, 813, 933, 765, 766, 935, 0, 335, - 358, 637, 641, 643, 645, 646, 649, 651, 652, 654, - 655, 638, 0, 661, 798, 1224, 1226, 764, 561, 845, - 1104, 1105, 1106, 1107, 1101, 1102, 398, 763, 844, 1225, - 843, 1060, 1108, 1103, 833, 1048, 842, 1049, 831, 219, - 942, 867, 868, 0, 456, 1223, 1192, 1190, 1175, 1188, - 1089, 917, 1196, 1186, 0, 291, 0, 1044, 0, 1055, - 1057, 1056, 1059, 1058, 1073, 1189, 1174, 1170, 1187, 1088, - 1221, 1115, 1169, 602 - ); - - protected $actionCheck = array( - 2, 3, 4, 5, 6, 7, 14, 9, 10, 11, - 12, 13, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 0, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 9, 10, 11, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 69, 70, - 53, 54, 55, 9, 10, 57, 30, 8, 32, 33, - 34, 35, 36, 37, 38, 80, 69, 70, 83, 71, - 72, 73, 74, 75, 76, 77, 33, 34, 80, 33, - 34, 35, 36, 37, 38, 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, - 8, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 3, 4, 5, 6, 7, 147, 148, 149, 156, 12, - 13, 8, 15, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 8, 44, 45, 46, 47, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 33, 34, 35, 36, 85, 50, 51, 13, - 106, 82, 108, 56, 8, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 157, 70, 71, 72, - 73, 59, 60, 37, 38, 78, 79, 80, 80, 82, - 1, 2, 1, 86, 9, 10, 11, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 152, 116, 117, 118, - 119, 120, 121, 106, 143, 30, 8, 32, 33, 34, - 35, 36, 8, 116, 116, 117, 118, 119, 120, 121, - 31, 124, 125, 8, 155, 80, 9, 10, 11, 160, - 133, 134, 8, 136, 137, 138, 139, 140, 141, 142, - 9, 9, 10, 11, 132, 148, 149, 30, 13, 152, - 153, 154, 155, 74, 75, 76, 77, 160, 161, 80, - 163, 80, 30, 84, 32, 33, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 8, 98, 0, 1, - 2, 116, 103, 104, 105, 106, 13, 151, 109, 110, - 9, 10, 11, 8, 115, 116, 117, 118, 153, 134, - 135, 71, 123, 157, 31, 126, 127, 128, 129, 13, - 13, 30, 82, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 50, 51, 9, 10, 11, - 82, 56, 116, 58, 37, 38, 157, 158, 159, 158, - 1, 160, 9, 10, 11, 70, 8, 158, 30, 82, - 134, 135, 74, 78, 79, 1, 2, 159, 80, 37, - 38, 86, 84, 30, 31, 87, 88, 89, 82, 91, - 11, 93, 156, 95, 159, 127, 98, 82, 13, 162, - 85, 103, 104, 105, 106, 155, 108, 109, 110, 30, - 160, 113, 157, 115, 116, 117, 118, 9, 10, 11, - 13, 123, 37, 38, 126, 127, 128, 129, 160, 134, - 14, 136, 137, 138, 139, 140, 141, 142, 30, 82, - 32, 33, 34, 148, 149, 147, 80, 160, 74, 8, - 155, 1, 2, 8, 80, 157, 158, 159, 84, 144, - 145, 87, 88, 89, 158, 91, 160, 93, 151, 95, - 14, 31, 98, 70, 100, 101, 102, 103, 104, 105, - 106, 16, 70, 109, 110, 9, 10, 11, 81, 115, - 116, 117, 118, 151, 156, 37, 38, 123, 156, 8, - 126, 127, 128, 129, 16, 8, 30, 13, 32, 33, - 34, 35, 155, 80, 156, 158, 157, 160, 152, 153, - 154, 9, 10, 11, 74, 159, 14, 10, 11, 16, - 80, 157, 158, 159, 84, 132, 30, 87, 88, 89, - 8, 91, 30, 93, 132, 95, 13, 30, 98, 116, - 100, 101, 102, 103, 104, 105, 106, 37, 38, 109, - 110, 158, 9, 10, 11, 115, 116, 117, 118, 1, - 2, 31, 70, 123, 8, 16, 126, 127, 128, 129, - 53, 54, 55, 30, 57, 152, 153, 154, 70, 9, - 10, 11, 82, 9, 10, 11, 69, 157, 157, 31, - 85, 156, 82, 33, 34, 35, 16, 157, 158, 159, - 30, 70, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 108, 57, 50, 51, - 52, 113, 74, 133, 1, 2, 82, 156, 80, 69, - 122, 157, 84, 133, 157, 87, 88, 89, 143, 91, - 158, 93, 106, 95, 108, 155, 98, 9, 10, 11, - 160, 103, 104, 105, 31, 155, 158, 109, 110, 16, - 160, 1, 2, 115, 116, 69, 70, 159, 30, 157, - 157, 123, 50, 51, 52, 158, 158, 160, 160, 158, - 75, 76, 75, 76, 101, 102, 111, 112, 157, 158, - 16, 31, 157, 158, 157, 158, 31, 74, 31, 1, - 2, 31, 156, 80, 160, 157, 158, 84, 31, 31, - 87, 88, 89, 33, 91, 57, 93, 38, 95, 69, - 71, 98, 70, 70, 70, 70, 103, 104, 105, 31, - 82, 70, 109, 110, 74, 89, 1, 2, 115, 116, - 80, 70, 70, 70, 84, 77, 123, 87, 88, 89, - 94, 91, 90, 93, 85, 95, 80, 82, 98, 96, - 113, 97, 127, 103, 104, 105, 31, 82, 85, 109, - 110, 114, 74, 92, 130, 115, 116, 132, 80, 97, - 157, 158, 84, 123, 97, 87, 88, 89, 97, 91, - 97, 93, 100, 95, 1, 2, 98, 100, 132, 157, - 106, 103, 104, 105, 116, 106, 155, 109, 110, 74, - 151, 127, -1, 115, 116, 80, 130, 157, 158, 84, - 131, 123, 87, 88, 89, -1, 91, 132, 93, -1, - 95, -1, 132, 98, -1, -1, 146, -1, 103, 104, - 105, -1, 146, -1, 109, 110, 143, 143, 146, -1, - 115, 116, 146, 146, 146, 157, 158, 146, 123, 146, - 150, 152, 150, 158, 163, -1, -1, 74, -1, 155, - 155, 155, 155, 80, 155, 155, 155, 84, 155, 155, - 87, 88, 89, 155, 91, 31, 93, 155, 95, 155, - 157, 98, 157, 158, 155, 155, 103, 104, 105, 155, - 155, 155, 109, 110, 50, 51, 155, 157, 115, 116, - 56, 156, 58, 156, 156, 156, 123, 156, 156, 156, - 156, 156, 156, 156, 70, 156, 156, 156, 156, 156, - 156, 156, 78, 79, 156, 156, 156, 156, 161, 157, - 86, 157, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 158, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, -1, 158, - 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 158, -1, 159, 159, 159, 159, 159, 134, 159, - 136, 137, 138, 139, 140, 141, 142, 159, 159, 159, - 159, 159, 148, 149, 159, 159, 159, 159, 159, 155, - 159, 159, 159, -1, 159, 159, 159, 159, 159, 159, - 159, 159, 159, 159, -1, 160, -1, 161, -1, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162 - ); - - protected $actionBase = array( - 0, 219, 318, 394, 470, 386, 326, 326, 850, -2, - -2, 138, -2, -2, -2, 663, 738, 775, 738, 588, - 700, 833, 833, 833, 362, 176, 176, 176, 337, 405, - 405, 821, 427, 275, 514, 553, 313, 336, 336, 336, - 336, 137, 137, 336, 336, 336, 336, 336, 336, 336, - 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, - 336, 336, 336, 336, 336, 336, 460, 379, 842, 476, - 436, 843, 844, 845, 815, 733, 818, 896, 897, 718, - 898, 899, 900, 901, 902, 895, 903, 921, 904, 600, - 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, - 600, 271, 532, 358, 373, 257, 44, 678, 678, 678, - 678, 678, 678, 678, 604, 604, 604, 604, 604, 604, - 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, - 604, 604, 537, 573, 573, 573, 399, 894, 526, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 272, -21, -21, 428, 720, 496, 43, - 215, 590, 149, 26, 26, 321, 321, 321, 321, 321, - 46, 46, 5, 5, 5, 5, 152, 183, 183, 183, - 183, 120, 120, 120, 120, 540, 540, 548, 530, 530, - 270, 377, 109, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 288, 608, 608, 662, 662, 584, 256, 256, - 256, 256, 688, 205, 205, 84, 221, 221, 221, 535, - 744, 741, 453, 453, 453, 453, 453, 453, 547, 547, - 547, -3, -3, -3, 723, 576, 335, 576, 335, 728, - 749, 557, 749, 709, -15, 558, 863, 538, 732, 892, - 737, 893, 577, 753, 423, 478, 905, 734, 185, 478, - 478, 478, 478, 905, 645, 647, 615, 185, 478, 185, - 736, 229, 772, 307, 460, 575, 561, 698, 846, 461, - 750, 848, 186, 517, 432, 571, 522, 586, 752, 849, - 819, 820, 465, 740, 698, 698, 698, 378, 101, 522, - -8, 636, 636, 636, 636, 238, 636, 636, 636, 636, - 255, 49, 552, 511, 847, 716, 716, 725, 755, 691, - 691, 716, 715, 716, 725, 757, 757, 757, 757, 716, - 716, 716, 716, 691, 691, 689, 691, 122, 684, 726, - 726, 757, 790, 822, 716, 716, 729, 691, 691, 691, - 729, 719, 757, 687, 699, 155, 691, 757, 705, 715, - 705, 716, 687, 705, 715, 715, 705, 22, 560, 692, - 756, 759, 786, 853, 675, 724, 764, 768, 760, 791, - 763, 754, 717, 824, 825, 485, 693, 694, 695, 701, - 742, 711, 706, 734, 690, 690, 690, 685, 746, 685, - 690, 690, 690, 690, 690, 690, 690, 690, 907, 730, - 751, 735, 686, 826, 508, 533, 807, 854, 743, 811, - 802, 865, 817, 906, 772, 809, 685, 908, 682, 143, - 579, 774, 864, 851, 685, 779, 685, 827, 855, 685, - 812, 866, 713, 867, 868, 690, 813, 909, 910, 911, - 912, 913, 914, 915, 916, 712, 917, 828, 702, 803, - 244, 761, 736, 747, 727, 852, 829, 870, 264, 918, - 878, 685, 685, 856, 745, 685, 857, 830, 773, 798, - 831, 804, 919, 743, 731, 805, 685, 739, 879, 920, - 264, 707, 708, 795, 703, 832, 785, 814, 784, 858, - 610, 683, 880, 881, 882, 710, 835, 799, 801, 797, - 836, 859, 714, 860, 696, 885, 861, 780, 837, 886, - 887, 810, 704, 748, 697, 722, 721, 862, 888, 806, - 838, 839, 840, 889, 841, 891, 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, 137, 137, 137, 137, - -2, -2, -2, -2, 0, 0, -2, 0, 0, 0, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 0, 0, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 600, 600, 600, 600, 600, 600, 600, 600, 600, - 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, - 600, 600, 600, 600, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 600, -21, -21, -21, - -21, 600, -21, -21, -21, -21, -21, -21, -21, 600, - 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, - 600, 600, 600, 600, 600, 600, 600, -21, 600, 600, - 600, -21, 453, -21, 453, 453, 453, 453, 453, 453, - 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, - 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, - 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, - 453, 453, 453, 453, 453, 453, 453, 453, 600, 0, - 0, 600, -21, 600, -21, 600, -21, -21, 600, 600, - 600, 600, 600, 600, 600, -21, -21, -21, -21, -21, - -21, 0, 547, 547, 547, 547, -21, -21, -21, -21, - 453, 453, 121, 453, 453, 453, 453, 453, 453, 453, - 453, 453, 453, 453, 453, 453, 453, 453, 547, 547, - -3, -3, 453, 453, 453, 453, 453, 121, 453, 453, - 185, 715, 715, 715, 335, 335, 335, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 335, - 185, 0, 185, 0, 453, 185, 715, 185, 335, 715, - 715, 185, 691, 623, 623, 623, 623, 264, 522, 0, - 0, 715, 715, 0, 0, 0, 0, 0, 715, 0, - 0, 0, 0, 0, 0, 691, 0, 716, 0, 0, - 0, 0, 690, 143, 0, 727, 308, 0, 0, 0, - 0, 0, 0, 727, 308, 325, 325, 0, 712, 690, - 690, 690, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 264 - ); - - 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,32767, 540, 540, 495,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 297, 297, 297, - 32767,32767,32767, 528, 528, 528, 528, 528, 528, 528, - 528, 528, 528, 528,32767,32767,32767,32767,32767,32767, - 381,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, 387, - 545,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 362, - 363, 365, 366, 296, 548, 529, 245, 388, 544, 295, - 247, 325, 499,32767,32767,32767, 327, 122, 256, 201, - 498, 125, 294, 232, 380, 382, 326, 301, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 300, 454, 359, 358, 357, 456,32767, 455, 492, - 492, 495,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, 323, 483, 482, 324, 452, 328, 453, - 331, 457, 460, 329, 330, 347, 348, 345, 346, 349, - 458, 459, 476, 477, 474, 475, 299, 350, 351, 352, - 353, 478, 479, 480, 481,32767,32767, 280, 539, 539, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 338, 339, 467, 468,32767, 236, 236, - 236, 236, 281, 236,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 333, 334, - 332, 462, 463, 461, 428,32767,32767,32767, 430,32767, - 32767,32767,32767,32767,32767,32767,32767, 500,32767,32767, - 32767,32767,32767, 513, 417, 171,32767, 409,32767, 171, - 171, 171, 171,32767, 220, 222, 167,32767, 171,32767, - 486,32767,32767,32767,32767,32767, 518, 343,32767,32767, - 116,32767,32767,32767, 555,32767, 513,32767, 116,32767, - 32767,32767,32767, 356, 335, 336, 337,32767,32767, 517, - 511, 470, 471, 472, 473,32767, 464, 465, 466, 469, - 32767,32767,32767,32767,32767,32767,32767,32767, 425, 431, - 431,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 516, 515,32767, 410, 494, 186, 184, - 184,32767, 206, 206,32767,32767, 188, 487, 506,32767, - 188, 173,32767, 398, 175, 494,32767,32767, 238,32767, - 238,32767, 398, 238,32767,32767, 238,32767, 411, 435, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 377, 378, 489, 502, - 32767, 503,32767, 409, 341, 342, 344, 320,32767, 322, - 367, 368, 369, 370, 371, 372, 373, 375,32767, 415, - 32767, 418,32767,32767,32767, 255,32767,32767, 553,32767, - 304,32767, 553,32767,32767,32767, 547,32767,32767, 298, - 32767,32767,32767,32767, 251,32767, 169,32767,32767, 537, - 32767, 554,32767, 511,32767, 340,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 512,32767,32767,32767,32767, - 227,32767, 448,32767, 116,32767,32767,32767, 187,32767, - 32767, 302, 246,32767,32767, 546,32767,32767,32767,32767, - 32767,32767,32767,32767, 114,32767, 170,32767,32767,32767, - 189,32767,32767, 511,32767,32767,32767,32767,32767,32767, - 32767, 293,32767,32767,32767,32767,32767,32767,32767, 511, - 32767,32767, 231,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 411,32767, 274,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 127, 127, 3, 127, - 127, 258, 3, 258, 127, 258, 258, 127, 127, 127, - 127, 127, 127, 127, 127, 127, 127, 214, 217, 206, - 206, 164, 127, 127, 266 - ); - - protected $goto = array( - 166, 140, 140, 140, 166, 187, 168, 144, 147, 141, - 142, 143, 149, 163, 163, 163, 163, 144, 144, 165, - 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, - 138, 159, 160, 161, 162, 184, 139, 185, 494, 495, - 377, 496, 500, 501, 502, 503, 504, 505, 506, 507, - 970, 164, 145, 146, 148, 171, 176, 186, 203, 253, - 256, 258, 260, 263, 264, 265, 266, 267, 268, 269, - 277, 278, 279, 280, 303, 304, 328, 329, 330, 394, - 395, 396, 545, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 150, 151, 152, - 167, 153, 169, 154, 204, 170, 155, 156, 157, 205, - 158, 136, 623, 563, 759, 563, 563, 563, 563, 563, - 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, - 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, - 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, - 563, 563, 563, 563, 563, 563, 563, 563, 563, 1111, - 631, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, - 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, - 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, - 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, - 1111, 1111, 1111, 1111, 1111, 760, 891, 891, 509, 1203, - 1203, 400, 609, 509, 539, 539, 571, 534, 536, 536, - 497, 499, 526, 543, 572, 575, 586, 593, 855, 855, - 855, 855, 850, 856, 174, 588, 520, 603, 604, 177, - 178, 179, 401, 402, 403, 404, 173, 202, 206, 208, - 257, 259, 261, 262, 270, 271, 272, 273, 274, 275, - 281, 282, 283, 284, 305, 306, 331, 332, 333, 406, - 407, 408, 409, 175, 180, 254, 255, 181, 182, 183, - 498, 498, 788, 498, 498, 498, 498, 498, 498, 498, - 498, 498, 498, 498, 498, 498, 498, 510, 581, 585, - 629, 349, 510, 547, 548, 549, 550, 551, 552, 553, - 554, 556, 589, 338, 562, 321, 562, 562, 562, 562, - 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, - 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, - 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, - 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, - 532, 752, 658, 558, 590, 352, 414, 594, 578, 607, - 888, 614, 615, 884, 619, 620, 626, 628, 633, 635, - 298, 296, 296, 296, 298, 290, 299, 947, 613, 819, - 1173, 616, 436, 436, 375, 436, 436, 436, 436, 436, - 436, 436, 436, 436, 436, 436, 436, 436, 436, 1075, - 1087, 1086, 948, 1068, 1075, 898, 898, 898, 898, 1181, - 898, 898, 1215, 1215, 1181, 388, 861, 564, 758, 1075, - 1075, 1075, 1075, 1075, 1075, 3, 4, 384, 384, 384, - 1215, 877, 859, 857, 859, 657, 465, 512, 886, 881, - 1092, 544, 384, 540, 384, 570, 384, 1029, 19, 15, - 371, 384, 1229, 511, 1207, 1195, 1195, 1195, 511, 909, - 372, 524, 535, 557, 915, 515, 1071, 1072, 13, 1068, - 378, 915, 1161, 597, 23, 968, 386, 386, 386, 605, - 1069, 1172, 1069, 940, 447, 449, 634, 755, 1180, 1070, - 1112, 617, 938, 1180, 608, 1200, 391, 1214, 1214, 546, - 895, 386, 1197, 1197, 1197, 399, 519, 350, 351, 1019, - 774, 531, 755, 904, 755, 1214, 519, 519, 385, 784, - 1217, 773, 340, 389, 775, 777, 1066, 1179, 913, 662, - 515, 1061, 918, 785, 450, 576, 865, 1158, 956, 463, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 514, 530, 0, 0, 0, 0, - 514, 0, 530, 0, 0, 0, 0, 612, 513, 517, - 438, 439, 1067, 621, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 782, 1222, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 780, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 525, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 301, 301 - ); - - protected $gotoCheck = array( - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 57, 68, 15, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 68, 126, - 9, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 16, 76, 76, 68, 76, - 76, 51, 51, 68, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 68, 68, - 68, 68, 68, 68, 27, 66, 101, 66, 66, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 117, 117, 29, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 61, 61, - 61, 71, 117, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 125, 57, 125, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 32, 6, 32, 32, 69, 69, 69, 32, 40, 40, - 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, - 5, 5, 5, 5, 5, 5, 5, 97, 62, 50, - 81, 62, 57, 57, 62, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 124, 124, 97, 81, 57, 57, 57, 57, 57, 118, - 57, 57, 142, 142, 118, 12, 33, 12, 14, 57, - 57, 57, 57, 57, 57, 30, 30, 13, 13, 13, - 142, 14, 14, 14, 14, 14, 57, 14, 14, 14, - 34, 2, 13, 109, 13, 2, 13, 34, 34, 34, - 34, 13, 13, 122, 140, 9, 9, 9, 122, 83, - 58, 58, 58, 34, 13, 13, 81, 81, 58, 81, - 46, 13, 131, 127, 34, 101, 123, 123, 123, 34, - 81, 81, 81, 8, 8, 8, 8, 11, 119, 81, - 8, 8, 8, 119, 49, 138, 48, 141, 141, 47, - 78, 123, 119, 119, 119, 123, 47, 71, 71, 102, - 23, 9, 11, 80, 11, 141, 47, 47, 11, 23, - 141, 23, 18, 17, 24, 25, 115, 119, 84, 73, - 13, 113, 85, 26, 64, 65, 70, 130, 99, 108, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, - 9, -1, 9, -1, -1, -1, -1, 13, 9, 9, - 9, 9, 13, 13, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 9, 9, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 101, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 5, 5 - ); - - protected $gotoBase = array( - 0, 0, -187, 0, 0, 356, 350, 0, 488, 149, - 0, 182, 85, 118, 426, 112, 203, 193, 217, 0, - 0, 0, 0, 162, 192, 198, 122, 27, 0, 272, - -227, 0, -277, 406, 32, 0, 0, 0, 0, 0, - 330, 0, 0, -24, 0, 0, 440, 485, 213, 218, - 371, -74, 0, 0, 0, 0, 0, 107, 110, 0, - 0, -11, -72, 0, 104, 95, -408, 0, -94, 41, - 123, -142, 0, 165, 0, 0, -79, 0, 197, 0, - 209, 43, 0, 441, 175, 120, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 100, 0, 124, - 0, 195, 212, 0, 0, 0, 0, 0, 87, 427, - 259, 0, 0, 121, 0, 177, 0, -5, 117, 196, - 0, 0, 161, 170, 93, -21, -48, 273, 0, 0, - 92, 271, 0, 0, 0, 0, 0, 0, 216, 0, - 437, 187, 102, 0, 0 - ); - - protected $gotoDefault = array( - -32768, 467, 666, 2, 667, 837, 742, 750, 600, 482, - 632, 584, 380, 1191, 794, 795, 796, 381, 367, 483, - 379, 410, 405, 783, 776, 778, 786, 172, 411, 789, - 1, 791, 521, 827, 1020, 364, 799, 365, 592, 801, - 528, 803, 804, 137, 382, 383, 529, 484, 390, 579, - 818, 276, 387, 820, 366, 821, 830, 370, 464, 454, - 459, 559, 611, 432, 446, 573, 567, 538, 1084, 568, - 864, 348, 872, 663, 880, 883, 485, 560, 894, 451, - 902, 1097, 397, 908, 914, 919, 287, 922, 417, 412, - 587, 927, 928, 5, 932, 624, 625, 8, 312, 955, - 601, 969, 420, 1039, 1041, 486, 487, 523, 458, 508, - 527, 488, 1062, 440, 413, 1065, 489, 490, 433, 434, - 1081, 354, 1166, 353, 448, 320, 1153, 582, 1116, 455, - 1206, 1162, 347, 491, 492, 376, 1185, 392, 1201, 437, - 1208, 1216, 343, 542, 569 - ); - - protected $ruleToNonTerminal = array( - 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, - 7, 7, 7, 7, 8, 8, 9, 10, 11, 11, - 12, 12, 13, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 18, 18, 19, 19, 21, 21, - 17, 17, 22, 22, 23, 23, 24, 24, 25, 25, - 20, 20, 26, 28, 28, 29, 30, 30, 32, 31, - 31, 31, 31, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 14, 14, 54, 54, 56, 55, 55, 48, - 48, 58, 58, 59, 59, 60, 60, 15, 16, 16, - 16, 63, 63, 63, 64, 64, 67, 67, 65, 65, - 69, 69, 41, 41, 50, 50, 53, 53, 53, 52, - 52, 70, 42, 42, 42, 42, 71, 71, 72, 72, - 73, 73, 39, 39, 35, 35, 74, 37, 37, 75, - 36, 36, 38, 38, 49, 49, 49, 61, 61, 77, - 77, 78, 78, 80, 80, 80, 79, 79, 62, 62, - 81, 81, 81, 82, 82, 83, 83, 83, 44, 44, - 84, 84, 84, 45, 45, 85, 85, 86, 86, 66, - 87, 87, 87, 87, 92, 92, 93, 93, 94, 94, - 94, 94, 94, 95, 96, 96, 91, 91, 88, 88, - 90, 90, 98, 98, 97, 97, 97, 97, 97, 97, - 89, 89, 100, 99, 99, 46, 46, 40, 40, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 34, 34, 47, 47, 105, - 105, 106, 106, 106, 106, 112, 101, 101, 108, 108, - 114, 114, 115, 116, 116, 116, 116, 116, 116, 68, - 68, 57, 57, 57, 57, 102, 102, 120, 120, 117, - 117, 121, 121, 121, 121, 103, 103, 103, 107, 107, - 107, 113, 113, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 126, 126, 126, 27, 27, 27, 27, - 27, 27, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 111, 111, 104, 104, - 104, 104, 127, 127, 130, 130, 129, 129, 131, 131, - 51, 51, 51, 51, 133, 133, 132, 132, 132, 132, - 132, 134, 134, 119, 119, 122, 122, 118, 118, 136, - 135, 135, 135, 135, 123, 123, 123, 123, 110, 110, - 124, 124, 124, 124, 76, 137, 137, 138, 138, 138, - 109, 109, 139, 139, 140, 140, 140, 140, 140, 125, - 125, 125, 125, 142, 143, 141, 141, 141, 141, 141, - 141, 141, 144, 144, 144 - ); - - 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, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 4, 3, 5, 4, - 3, 4, 2, 3, 1, 1, 7, 6, 3, 1, - 3, 1, 3, 1, 1, 3, 1, 3, 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, 3, 3, 3, 1, - 2, 2, 5, 7, 9, 5, 6, 3, 3, 2, - 2, 1, 1, 1, 0, 2, 8, 0, 4, 1, - 3, 0, 1, 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, 1, - 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, 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, 3, 2, - 2, 2, 2, 3, 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, 1, 1, 1, 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, 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, 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, - 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, - 6, 3, 1, 1, 1 - ); - - protected function initReduceCallbacks() { - $this->reduceCallbacks = [ - 0 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 1 => function ($stackPos) { - $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); - }, - 2 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 3 => function ($stackPos) { - $this->semValue = array(); - }, - 4 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 5 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 6 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 7 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 8 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 9 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 10 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 11 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 12 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 13 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 14 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 15 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 16 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 17 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 18 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 19 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 20 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 21 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 22 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 23 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 24 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 25 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 26 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 27 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 28 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 29 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 30 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 31 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 32 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 33 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 34 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 35 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 36 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 37 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 38 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 39 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 40 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 41 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 42 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 43 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 44 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 45 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 46 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 47 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 48 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 49 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 50 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 51 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 52 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 53 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 54 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 55 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 56 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 57 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 58 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 59 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 60 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 61 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 62 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 63 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 64 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 65 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 66 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 67 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 68 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 69 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 70 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 71 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 72 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 73 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 74 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 75 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 77 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 78 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 79 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 80 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 81 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 82 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 83 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 84 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 85 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 88 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 89 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 90 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 91 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 92 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 93 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 94 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 95 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 96 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 97 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($this->semValue); - }, - 98 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 99 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 100 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 101 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 102 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 103 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 104 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_FUNCTION; - }, - 105 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_CONSTANT; - }, - 106 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 107 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 108 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 109 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 110 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 111 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 112 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 113 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 114 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 115 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 116 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 117 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 118 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; - }, - 119 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; - }, - 120 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 121 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 122 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 123 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 124 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 125 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 126 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 127 => function ($stackPos) { - $this->semValue = array(); - }, - 128 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 129 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 130 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 131 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 132 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 133 => function ($stackPos) { - - if ($this->semStack[$stackPos-(3-2)]) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; - } else { - $startAttributes = $this->startAttributeStack[$stackPos-(3-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if (null === $this->semValue) { $this->semValue = array(); } - } - - }, - 134 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(5-2)], ['stmts' => is_array($this->semStack[$stackPos-(5-3)]) ? $this->semStack[$stackPos-(5-3)] : array($this->semStack[$stackPos-(5-3)]), 'elseifs' => $this->semStack[$stackPos-(5-4)], 'else' => $this->semStack[$stackPos-(5-5)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 135 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(8-2)], ['stmts' => $this->semStack[$stackPos-(8-4)], 'elseifs' => $this->semStack[$stackPos-(8-5)], 'else' => $this->semStack[$stackPos-(8-6)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 136 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 137 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(5-4)], is_array($this->semStack[$stackPos-(5-2)]) ? $this->semStack[$stackPos-(5-2)] : array($this->semStack[$stackPos-(5-2)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 138 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 139 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 140 => function ($stackPos) { - $this->semValue = new Stmt\Break_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 141 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 142 => function ($stackPos) { - $this->semValue = new Stmt\Continue_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 143 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 144 => function ($stackPos) { - $this->semValue = new Stmt\Return_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 145 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 146 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 147 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 148 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 149 => function ($stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 150 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 151 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 152 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 153 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 154 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 155 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 156 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); - }, - 157 => function ($stackPos) { - $this->semValue = new Stmt\Throw_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 158 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 159 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 160 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 161 => function ($stackPos) { - $this->semValue = array(); /* means: no statement */ - }, - 162 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 163 => function ($stackPos) { - $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ - }, - 164 => function ($stackPos) { - $this->semValue = array(); - }, - 165 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 166 => function ($stackPos) { - $this->semValue = new Stmt\Catch_(array($this->semStack[$stackPos-(8-3)]), $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 167 => function ($stackPos) { - $this->semValue = null; - }, - 168 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 169 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 170 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 171 => function ($stackPos) { - $this->semValue = false; - }, - 172 => function ($stackPos) { - $this->semValue = true; - }, - 173 => function ($stackPos) { - $this->semValue = false; - }, - 174 => function ($stackPos) { - $this->semValue = true; - }, - 175 => function ($stackPos) { - $this->semValue = false; - }, - 176 => function ($stackPos) { - $this->semValue = true; - }, - 177 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(10-3)], ['byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-5)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 178 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - $this->checkClass($this->semValue, $stackPos-(7-2)); - }, - 179 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(6-2)], ['extends' => $this->semStack[$stackPos-(6-3)], 'stmts' => $this->semStack[$stackPos-(6-5)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - $this->checkInterface($this->semValue, $stackPos-(6-2)); - }, - 180 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(5-2)], ['stmts' => $this->semStack[$stackPos-(5-4)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 181 => function ($stackPos) { - $this->semValue = 0; - }, - 182 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 183 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 184 => function ($stackPos) { - $this->semValue = null; - }, - 185 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 186 => function ($stackPos) { - $this->semValue = array(); - }, - 187 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 188 => function ($stackPos) { - $this->semValue = array(); - }, - 189 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 190 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 191 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 192 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 193 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 194 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 195 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 196 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 197 => function ($stackPos) { - $this->semValue = null; - }, - 198 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 199 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 200 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 201 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 202 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 203 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 204 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 205 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; - }, - 206 => function ($stackPos) { - $this->semValue = array(); - }, - 207 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 208 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 209 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 210 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 211 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 212 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 214 => function ($stackPos) { - $this->semValue = array(); - }, - 215 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 216 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(3-2)], is_array($this->semStack[$stackPos-(3-3)]) ? $this->semStack[$stackPos-(3-3)] : array($this->semStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 217 => function ($stackPos) { - $this->semValue = array(); - }, - 218 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 219 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 220 => function ($stackPos) { - $this->semValue = null; - }, - 221 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 222 => function ($stackPos) { - $this->semValue = null; - }, - 223 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 224 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 225 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); - }, - 226 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 227 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 228 => function ($stackPos) { - $this->semValue = array(); - }, - 229 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 230 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 231 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(4-4)], null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); - }, - 232 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-3)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); - }, - 233 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 234 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 235 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 236 => function ($stackPos) { - $this->semValue = null; - }, - 237 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 238 => function ($stackPos) { - $this->semValue = null; - }, - 239 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 240 => function ($stackPos) { - $this->semValue = array(); - }, - 241 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 242 => function ($stackPos) { - $this->semValue = array(new Node\Arg($this->semStack[$stackPos-(3-2)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes)); - }, - 243 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 244 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 245 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 246 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 247 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 248 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 249 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 250 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 251 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 252 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 253 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 254 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 255 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 256 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 257 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } - }, - 258 => function ($stackPos) { - $this->semValue = array(); - }, - 259 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 260 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $stackPos-(3-1)); - }, - 261 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(3-2)], 0, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 262 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(9-4)], ['type' => $this->semStack[$stackPos-(9-1)], 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(9-1)); - }, - 263 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 264 => function ($stackPos) { - $this->semValue = array(); - }, - 265 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 266 => function ($stackPos) { - $this->semValue = array(); - }, - 267 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 268 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 269 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 270 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 271 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 272 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 273 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 274 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 275 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); - }, - 276 => function ($stackPos) { - $this->semValue = null; - }, - 277 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 278 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 279 => function ($stackPos) { - $this->semValue = 0; - }, - 280 => function ($stackPos) { - $this->semValue = 0; - }, - 281 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 282 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 283 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; - }, - 284 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; - }, - 285 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; - }, - 286 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; - }, - 287 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; - }, - 288 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 289 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 290 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 291 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 292 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 293 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 294 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 295 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 296 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 297 => function ($stackPos) { - $this->semValue = array(); - }, - 298 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 299 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 300 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 301 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 302 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 303 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 304 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 305 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 306 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 307 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 308 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 309 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 310 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 311 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 312 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 313 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 314 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 315 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 316 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 317 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 318 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 319 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 320 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 321 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 322 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 323 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 324 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 325 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 326 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 327 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 328 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 329 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 330 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 331 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 332 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 333 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 334 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 335 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 336 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 337 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 338 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 339 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 340 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 341 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 342 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 343 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 344 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 345 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 346 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 347 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 348 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 349 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 350 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 351 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 352 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 353 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 354 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 355 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 356 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 357 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 358 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 359 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 360 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 361 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 362 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 363 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 364 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 365 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 366 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 367 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 368 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); - }, - 369 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 370 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 371 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 372 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 373 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 374 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); - }, - 375 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 376 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 377 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 378 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 379 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 380 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 381 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 382 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 383 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-4)], 'uses' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 384 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(11-3)], 'params' => $this->semStack[$stackPos-(11-5)], 'uses' => $this->semStack[$stackPos-(11-7)], 'returnType' => $this->semStack[$stackPos-(11-8)], 'stmts' => $this->semStack[$stackPos-(11-10)]], $this->startAttributeStack[$stackPos-(11-1)] + $this->endAttributes); - }, - 385 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 386 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 387 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 388 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 389 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - }, - 390 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); - }, - 391 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 392 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch(Scalar\String_::fromString($this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 393 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 394 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 395 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes), $this->semStack[$stackPos-(7-2)]); - $this->checkClass($this->semValue[0], -1); - }, - 396 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 397 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 398 => function ($stackPos) { - $this->semValue = array(); - }, - 399 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 400 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 401 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 402 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 403 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 404 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 405 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 406 => function ($stackPos) { - $this->semValue = $this->fixupPhp5StaticPropCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 407 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 408 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 409 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 410 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 411 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 412 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 413 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 414 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 415 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 416 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 417 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 418 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 419 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 420 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 421 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 422 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 423 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 424 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 425 => function ($stackPos) { - $this->semValue = null; - }, - 426 => function ($stackPos) { - $this->semValue = null; - }, - 427 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 428 => function ($stackPos) { - $this->semValue = array(); - }, - 429 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', false), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 430 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', false); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 431 => function ($stackPos) { - $this->semValue = array(); - }, - 432 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 433 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true); - }, - 434 => function ($stackPos) { - $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 435 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, false); - }, - 436 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 437 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 438 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 439 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 440 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 441 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 442 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 443 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 444 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], false); - }, - 445 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], false); - }, - 446 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 447 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 448 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 449 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 450 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 451 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 452 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 453 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 454 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 455 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 456 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 457 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 458 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 459 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 460 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 461 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 462 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 463 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 464 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 465 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 466 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 467 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 468 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 469 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 470 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 471 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 472 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 473 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 474 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 475 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 476 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 477 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 478 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 479 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 480 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 481 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 482 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 483 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 484 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 485 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 486 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 487 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 488 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 489 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 490 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); - }, - 491 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 492 => function ($stackPos) { - $this->semValue = array(); - }, - 493 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 494 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 495 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 496 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 497 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 498 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 499 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 500 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 501 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 502 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 503 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 504 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 505 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 506 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 507 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 508 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 509 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 510 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 511 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 512 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 513 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 514 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 515 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 517 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 518 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 519 => function ($stackPos) { - $var = substr($this->semStack[$stackPos-(1-1)], 1); $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; - }, - 520 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 521 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 522 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 523 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 524 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 525 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 526 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 527 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 528 => function ($stackPos) { - $this->semValue = null; - }, - 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 531 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 533 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 534 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 535 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 536 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 537 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 538 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 539 => function ($stackPos) { - $this->semValue = null; - }, - 540 => function ($stackPos) { - $this->semValue = array(); - }, - 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 542 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 543 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 544 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 545 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 546 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 547 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 548 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 549 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 550 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 551 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 552 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); - }, - 553 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 554 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 555 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 556 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 557 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 558 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 559 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 560 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 561 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 562 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 563 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 564 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - ]; - } -} diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index f1f46f4adc..ce82af21af 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -18,8 +18,8 @@ class Php7 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1199; - protected $gotoTableSize = 611; + protected $actionTableSize = 1215; + protected $gotoTableSize = 585; protected $invalidSymbol = 168; protected $errorSymbol = 1; @@ -249,8 +249,8 @@ class Php7 extends \PhpParser\ParserAbstract -32767,-32767,-32767, 101, 102, 103, 104, 105, 1074, 1075, 1076, 1073, 1072, 1071, 1077, 718, 717,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1204, 371, 372, 1284, 727,-32766,-32766,-32766, 1004, - 1005, 1283, 415,-32766,-32766,-32766, 373, 372, 802, 267, + -32767, 1205, 371, 372, 1285, 727,-32766,-32766,-32766, 1004, + 1005, 1284, 415,-32766,-32766,-32766, 373, 372, 802, 267, 138, 397, 731, 732, 733, 734, 415,-32766, 421,-32766, -32766,-32766,-32766,-32766,-32766, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 765, 572, 766, 767, @@ -263,11 +263,11 @@ class Php7 extends \PhpParser\ParserAbstract 1023, 724, 725, 726, 137, 37,-32766, 2,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 1074, 1075, 1076, 1073, 1072, 1071, 1077, 836, 811, 837, 718, - 717,-32766,-32766,-32766, 1236, -579,-32766, 12,-32766,-32766, - -32766,-32766, -579, 893, 996,-32766,-32766,-32766, 293, 727, + 717,-32766,-32766,-32766, 1237, -580,-32766, 12,-32766,-32766, + -32766,-32766, -580, 893, 996,-32766,-32766,-32766, 293, 727, 126, 74,-32766, 34,-32766,-32766,-32766, 320, 106, 107, - 108, 1264, 270, 267, 138, 397, 731, 732, 733, 734, - -576, 470, 421, 689, 109, 808, 280, -576, 281, 735, + 108, 1265, 270, 267, 138, 397, 731, 732, 733, 734, + -577, 470, 421, 689, 109, 808, 280, -577, 281, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 765, 572, 766, 767, 768, 769, 757, 758, 337, 338, 760, 761, 746, 747, 748, 750, 751, 752, 347, 792, @@ -279,91 +279,93 @@ class Php7 extends \PhpParser\ParserAbstract 144, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 810, 270, 913,-32766,-32766, - -32766, 456, 457, 1002, -579, 253, -579, 1022, 109, 928, + -32766, 456, 457, 1002, -580, 253, -580, 1022, 109, 928, 929, 895, 727, 471, 930, 684,-32766,-32766,-32766,-32766, 1050,-32766,-32766, 959, 1004, 1005, 728, 729, 730, 731, - 732, 733, 734, 81, 304, 798, 279, 320, -530, -576, - 284, -576, 735, 736, 737, 738, 739, 740, 741, 742, + 732, 733, 734, 81, 304, 798, 279, 320, -531, -577, + 284, -577, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 765, 788, 766, 767, 768, 769, 757, 758, 759, 787, 760, 761, 746, 747, 748, 750, 751, 752, 791, 792, 793, 794, 795, 796, 797, 753, 754, 755, 756, 786, 777, 775, 776, 789, 772, 773, -86, -318, 764, 770, 771, 778, 779, 781, 780, 782, 783, - 1204, 600, -530, -530, 306, 774, 785, 784, 49, 50, - 51, 501, 52, 53, 103, 104, 105, -530, 54, 55, - -111, 56, 1002, 893, 893, -111,-32766, -111, 284, -536, - 1309, -530, 300, 1310, -193, -111, -111, -111, -111, -111, + 1205, 600, -531, -531, 306, 774, 785, 784, 49, 50, + 51, 501, 52, 53, 103, 104, 105, -531, 54, 55, + -111, 56, 1002, 893, 893, -111,-32766, -111, 284, -537, + 1310, -531, 300, 1311, -193, -111, -111, -111, -111, -111, -111, -111, -111, 1004, 1005, 893, 893, 1004, 1005,-32766, - -32766, 960, 1204, 690, 691, -86, 57, 58, 1224, 698, - 318, -529, 59, 334, 60, 246, 247, 61, 62, 63, + -32766, 960, 1205, 690, 691, -86, 57, 58, 1225, 698, + 318, -530, 59, 334, 60, 247, 248, 61, 62, 63, 64, 65, 66, 67, 68, 693, 27, 268, 69, 437, - 502, 809, -16, -332, 1230, 1231, 503, 335, 809, 805, - 361, -531, 1228, 41, 24, 504, 594, 505, 1280, 506, + 502, 809, -16, -332, 1231, 1232, 503, 335, 809, 805, + 361, -532, 1229, 41, 24, 504, 594, 505, 1281, 506, 893, 507, 718, 717, 508, 509, 883, 883, 365, 43, 44, 438, 368, 367,-32766, 45, 510, 992, 991, 990, - 993, 359, 333, 1197, -192, -529, -529, 380, 883, 883, + 993, 359, 333, 1198, -192, -530, -530, 380, 883, 883, 511, 512, 513, 809, 151, 1004, 1005, 1051, 421, 809, - -529, 710, 515, 516, -318, 1218, 1219, 1220, 1221, 1215, - 1216, 292, -535, 433, -529, -531, -531, 1222, 1217, 1195, - 74, 1199, 1198, 1200, 293, 806, 320, 70, 14, 153, - -531, 316, 317, 320, -153, -153, -153, 800, 285, -111, - 286, 895, 945, 883, -531, 684, 684, 434, -193, -153, - 1066, -153, 239, -153, -356, -153, -356, 435, 1199, 1198, - 1200, 640, 25, 895, 895, 366, 436, 684, 684, 293, - 656, 657, 74, 1199, 1198, 1200, -111, -111, 320, 815, + -530, 710, 515, 516, -318, 1219, 1220, 1221, 1222, 1216, + 1217, 292, -536, 433, -530, -532, -532, 1223, 1218, 1196, + 74, 1200, 1199, 1201, 293, 806, 320, 70, 14, 153, + -532, 316, 317, 320, -153, -153, -153, 800, 285, -111, + 286, 895, 945, 883, -532, 684, 684, 434, -193, -153, + 1066, -153, 239, -153, -356, -153, -356, 435, 1200, 1199, + 1201, 640, 25, 895, 895, 366, 436, 684, 684, 293, + 656, 657, 74, 1200, 1199, 1201, -111, -111, 320, 815, 140, -111, 1052, 382, 320, 11, 869, -111, -111, -111, -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 718, 717, 836, 154, 837, - -533, 149, 400, 893, 809, -4, 893, 1299, 895, 155, - 141, 157, 684, -153, 320, -570, 123, -570, 369, 370, - 374, 375, 632, 633, 1111, 1113, 32, 124, -192, 718, - 717, 129,-32766, 700, 130, -528, 143, 158, 1197, 159, + -534, 149, 400, 893, 809, -4, 893, 1300, 895, 155, + 141, 157, 684, -153, 320, -571, 123, -571, 369, 370, + 374, 375, 632, 633, 1112, 1114, 32, 124, -192, 718, + 717, 129,-32766, 700, 130, -529, 143, 158, 1198, 159, 160, 161, 282, 718, 717,-32766,-32766,-32766, -88,-32766, -79,-32766, 909,-32766, 109, 270,-32766, -75, -73, -72, - -528,-32766,-32766,-32766, -533, -533,-32766,-32766,-32766, 35, - 249, -71, 1197,-32766, 412, -70, 27, -69, -68,-32766, + -529,-32766,-32766,-32766, -534, -534,-32766,-32766,-32766, 35, + 250, -71, 1198,-32766, 412, -70, 27, -69, -68,-32766, -32766,-32766,-32766,-32766, -67,-32766, 883,-32766, 809, 883, - -32766, -66, 1228, -533, -47,-32766,-32766,-32766, -18, -528, - -528,-32766,-32766, 147, 271, 278, 48,-32766, 412, 699, - 702, 366, 73, 428, -528, 892,-32766, 146, 291, 283, - 287, 145, -111, -111, -528, -528, 327, -111, -528, 288, - 800, -51, 514, -111, -111, -111, -111, 809, 664, -528, - 1081,-32766, 515, 516, 546, 1218, 1219, 1220, 1221, 1215, - 1216, 1311, 641, -528, 550, 9, 677, 1222, 1217, 301, + -32766, -66, 1229, -534, -47,-32766,-32766,-32766, -18, -529, + -529,-32766,-32766, 147, 271, 278, 48,-32766, 412, 699, + 702, 366, 73, 428, -529, 892,-32766, 146, 291, 283, + 287, 145, -111, -111, -529, -529, 327, -111, -529, 288, + 800, -51, 514, -111, -111, -111, -111, 809, 664, -529, + 1081,-32766, 515, 516, 546, 1219, 1220, 1221, 1222, 1216, + 1217, 1312, 641, -529, 550, 9, 677, 1223, 1218, 301, 659, 895, 630, 131, 895, 684, 646, 72, 684, -4, - 296, 297, 317, 320,-32766, 647, 660, 13, 453, 1235, - 1197, 299, 432, 1237, 481, 364, 911,-32766,-32766,-32766, - -494,-32766, -484,-32766, 808,-32766, 293, 925,-32766, 127, - 47, 7, 1225,-32766,-32766,-32766,-32766, 0, 0,-32766, - -32766,-32766, 1197, 0, 893,-32766, 412, 820, 0,-32766, + 296, 297, 317, 320,-32766, 647, 660, 13, 453, 1236, + 1198, 299, 432, 1238, 481, 364, 911,-32766,-32766,-32766, + -495,-32766, -485,-32766, 808,-32766, 293, 925,-32766, 127, + 47, 7, 1226,-32766,-32766,-32766,-32766, 0, 0,-32766, + -32766,-32766, 1198, 0, 893,-32766, 412, 820, 0,-32766, -32766,-32766, 298,-32766,-32766,-32766, 305,-32766, 0, 0, - -32766, 1250, 16, 893, 0,-32766,-32766,-32766,-32766, -271, - 0,-32766,-32766, 0, 1197, 363, 556,-32766, 412, 1268, - 598,-32766,-32766,-32766, 1229,-32766,-32766,-32766, 39,-32766, + -32766, 1251, 16, 893, 0,-32766,-32766,-32766,-32766, -271, + 0,-32766,-32766, 0, 1198, 363, 556,-32766, 412, 1269, + 598,-32766,-32766,-32766, 1230,-32766,-32766,-32766, 39,-32766, 40, 707,-32766, 708, 294, 295, 476,-32766,-32766,-32766, - -32766, 828, 874,-32766,-32766, 969, 1197, 563, 946,-32766, + -32766, 828, 874,-32766,-32766, 969, 1198, 563, 946,-32766, 412, 953, 943,-32766,-32766,-32766, 954,-32766,-32766,-32766, 872,-32766, 941, 125,-32766, 1055, 1058, 883, 1059,-32766, - -32766,-32766, 1056, 1057, 1063,-32766,-32766, 1302, 635, 33, - -564,-32766, 412, -246, -246, -246, 883, -562, -536, 366, - -32766, -535, -534, 1, 28, 320, 29, 38, 42, 46, + -32766,-32766, 1056, 1057, 1063,-32766,-32766, 1303, 635, 33, + -565,-32766, 412, -246, -246, -246, 883, -563, -537, 366, + -32766, -536, -535, 1, 28, 320, 29, 38, 42, 46, -111, -111, -245, -245, -245, -111, 71, 75, 366, 76, 869, -111, -111, -111, -111, 77, 78, 79, 80, -111, - -111, 142, 152, 27, -111, 156, 245, 704, 322, 869, - -111, -111, -111, -111, 348, 809, 349, 350,-32766, 1228, - 351, 352, 895, 353, 1197, 354, 684, -246, 355, 356, - 357,-32766,-32766,-32766, 358,-32766, 360,-32766, 429,-32766, - 543, 895,-32766, -269, 870, 684, -245,-32766,-32766,-32766, - -268, 18, 19,-32766,-32766, 20, 21, 23, 399,-32766, - 412, 472, 473, 480, 483, 484, 485, 486,-32766, 490, - 516, 491, 1218, 1219, 1220, 1221, 1215, 1216, 492, 499, - 561, 671, 1208, 1151, 1222, 1217, 1226, 1025, 1024, 1187, - -273, -103, 17, 22, 72, 315, 26, 290, 398, 317, - 320, 591, 595, 622, 676, 1155, 0, 1203, 1152, 1281, - 0, 362, 685, 688, 692, 694, 695, 696, 697, 701, - 687, 0, 1306, 1308, 831, 830, 839, 918, 961, 838, - 1307, 917, 919, 916, 1183, 902, 912, 900, 951, 952, - 1305, 1262, 1251, 1269, 1275, 1278, 0, -498, 1168 + -111, 142, 152, 156, -111, 27, 268, -269, 246, 869, + -111, -111, -111, -111, 322, 348, 349, 809,-32766, 350, + 351, 1229, 895, 352, 1198, 353, 684, -246, 354, 355, + 356,-32766,-32766,-32766, 357,-32766, 358,-32766, 360,-32766, + 27, 895,-32766, -268, 429, 684, -245,-32766,-32766,-32766, + 543, 315, 809,-32766,-32766, 18, 1229, 19, 20,-32766, + 412, 21, 23, 399, 472, 473, 480, 483,-32766, 484, + 485, 486, 516, 490, 1219, 1220, 1221, 1222, 1216, 1217, + 491, 492, 499, 561, 671, 1209, 1223, 1218, 1152, 1227, + 1025, 1024, 1188, -273, -103, 17, 72, 362, 22, 26, + 290, 317, 320, 398, 591, 595, 0, 516, 622, 1219, + 1220, 1221, 1222, 1216, 1217, 676, 1156, 1204, 1153, 1282, + 0, 1223, 1218, 685, 688, 692, 694, 695, 696, 697, + 701, 72, 687, -499, 0, 704, 317, 320, 870, 1307, + 1309, 831, 830, 839, 918, 961, 838, 1308, 917, 919, + 916, 1184, 902, 912, 900, 951, 952, 1306, 1263, 1252, + 1270, 1276, 1279, 0, 1169 ); protected $actionCheck = array( @@ -472,21 +474,23 @@ class Php7 extends \PhpParser\ParserAbstract 124, 161, 161, 161, 161, 167, 161, 161, 161, 161, 117, 118, 100, 101, 102, 122, 161, 161, 106, 161, 127, 128, 129, 130, 131, 161, 161, 161, 161, 117, - 118, 161, 161, 70, 122, 161, 161, 164, 161, 127, - 128, 129, 130, 131, 161, 82, 161, 161, 74, 86, - 161, 161, 159, 161, 80, 161, 163, 164, 161, 161, + 118, 161, 161, 161, 122, 70, 71, 162, 161, 127, + 128, 129, 130, 131, 161, 161, 161, 82, 74, 161, + 161, 86, 159, 161, 80, 161, 163, 164, 161, 161, 161, 87, 88, 89, 161, 91, 161, 93, 161, 95, - 161, 159, 98, 162, 164, 163, 164, 103, 104, 105, - 162, 162, 162, 109, 110, 162, 162, 162, 162, 115, + 70, 159, 98, 162, 161, 163, 164, 103, 104, 105, + 161, 163, 82, 109, 110, 162, 86, 162, 162, 115, 116, 162, 162, 162, 162, 162, 162, 162, 124, 162, - 137, 162, 139, 140, 141, 142, 143, 144, 162, 162, - 162, 162, 162, 162, 151, 152, 162, 162, 162, 162, - 162, 162, 162, 162, 161, 163, 162, 162, 162, 166, - 167, 162, 162, 162, 162, 162, -1, 162, 162, 162, - -1, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, + 162, 162, 137, 162, 139, 140, 141, 142, 143, 144, + 162, 162, 162, 162, 162, 162, 151, 152, 162, 162, + 162, 162, 162, 162, 162, 162, 161, 163, 162, 162, + 162, 166, 167, 162, 162, 162, -1, 137, 162, 139, + 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, + -1, 151, 152, 163, 163, 163, 163, 163, 163, 163, + 163, 161, 163, 165, -1, 164, 166, 167, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, -1, 165, 165 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, -1, 165 ); protected $actionBase = array( @@ -506,16 +510,16 @@ class Php7 extends \PhpParser\ParserAbstract 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 186, 342, 545, 712, 985, 993, 989, 995, - 981, 980, 986, 990, 996, 1026, 1027, 786, 1028, 1029, - 1030, 1031, 991, 848, 984, 992, 289, 289, 289, 289, + 994, 994, 186, 342, 545, 712, 988, 1004, 992, 1005, + 986, 983, 991, 993, 1006, 1043, 1044, 786, 1045, 1046, + 1047, 1048, 996, 848, 987, 1003, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 288, 196, 490, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 54, 54, 54, 339, 706, - 706, 182, 166, 665, 47, 983, 983, 983, 983, 983, - 983, 983, 983, 983, 983, 136, 136, 7, 7, 7, + 706, 182, 166, 985, 665, 47, 1020, 1020, 1020, 1020, + 1020, 1020, 1020, 1020, 1020, 136, 136, 7, 7, 7, 7, 7, 369, -25, -25, -25, -25, 501, 50, 448, 449, 356, 517, 538, 414, 414, 360, -116, 237, 237, 237, 237, 237, 237, -78, -78, -78, -78, -78, 318, @@ -523,13 +527,13 @@ class Php7 extends \PhpParser\ParserAbstract 493, 493, 737, 788, 493, 493, 493, 471, 690, 690, 736, 165, 165, 165, 690, 591, 759, 622, 591, 622, 220, 400, 795, -54, -40, 555, 769, 795, 630, 830, - 229, 194, 739, 612, 739, 979, 756, 763, 726, 845, - 1007, 997, 775, 1024, 776, 1025, 217, 719, 978, 978, - 978, 978, 978, 978, 978, 978, 978, 978, 978, 858, - 515, 979, 459, 858, 858, 858, 515, 515, 515, 515, + 229, 194, 739, 612, 739, 982, 756, 763, 726, 845, + 1019, 1007, 775, 1041, 776, 1042, 217, 719, 981, 981, + 981, 981, 981, 981, 981, 981, 981, 981, 981, 858, + 515, 982, 459, 858, 858, 858, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 611, 459, 576, 585, - 459, 791, 515, 186, 743, 186, 186, 186, 186, 903, - 186, 186, 186, 186, 186, 186, 912, 767, 200, 186, + 459, 791, 515, 186, 743, 186, 186, 186, 186, 904, + 186, 186, 186, 186, 186, 186, 914, 767, 200, 186, 342, 346, 346, 428, 203, 346, 346, 346, 346, 186, 186, 186, 612, 698, 793, 614, 797, 566, 698, 698, 698, 408, 432, 139, 476, 593, 201, 567, 750, 750, @@ -540,25 +544,25 @@ class Php7 extends \PhpParser\ParserAbstract 802, 804, 749, 773, 502, 446, 661, 205, 714, 773, 773, 750, 569, 749, 773, 749, 773, 732, 773, 773, 773, 749, 773, 755, 529, 773, 721, 648, 189, 773, - 6, 875, 876, 717, 878, 866, 884, 927, 885, 886, - 999, 895, 867, 887, 929, 865, 863, 784, 700, 711, + 6, 875, 876, 717, 878, 866, 884, 933, 885, 886, + 1010, 897, 867, 887, 939, 865, 863, 784, 700, 711, 752, 741, 861, 685, 685, 685, 857, 685, 685, 685, 685, 685, 685, 685, 685, 700, 742, 796, 754, 765, - 905, 715, 718, 968, 733, 930, 1032, 1033, 903, 970, - 890, 799, 720, 945, 906, 893, 982, 909, 910, 946, - 971, 812, 974, 1008, 751, 1009, 1010, 757, 914, 1000, + 905, 715, 718, 971, 733, 1024, 1018, 1049, 904, 973, + 890, 799, 720, 950, 908, 1021, 938, 909, 912, 951, + 976, 812, 977, 1025, 751, 1026, 1027, 757, 917, 1011, 685, 875, 886, 867, 887, 865, 863, 760, 753, 746, - 747, 744, 740, 727, 728, 772, 975, 856, 849, 771, - 912, 860, 700, 789, 939, 846, 949, 950, 998, 781, - 768, 847, 1011, 917, 918, 919, 1001, 976, 801, 940, - 777, 951, 787, 1012, 952, 953, 954, 955, 1013, 1002, - 1003, 1004, 813, 762, 931, 770, 1014, 299, 785, 792, - 925, 570, 897, 1005, 1015, 1016, 957, 959, 966, 1017, - 891, 816, 943, 766, 944, 938, 819, 822, 605, 707, - 782, 684, 695, 1018, 1019, 1020, 894, 778, 761, 823, - 827, 977, 1021, 697, 831, 723, 1022, 969, 724, 725, - 764, 1006, 783, 745, 780, 923, 779, 833, 1023, 836, - 837, 839, 967, 843, 0, 0, 0, 0, 0, 0, + 747, 744, 740, 727, 728, 772, 978, 856, 849, 771, + 914, 860, 700, 789, 943, 846, 952, 953, 984, 781, + 768, 847, 1028, 918, 919, 923, 1012, 979, 801, 945, + 777, 954, 787, 1029, 955, 957, 958, 959, 1030, 1013, + 1014, 1015, 813, 762, 895, 770, 1031, 299, 785, 792, + 927, 570, 903, 1016, 1032, 1033, 961, 968, 969, 1034, + 891, 816, 946, 766, 949, 931, 819, 822, 605, 707, + 782, 684, 695, 1035, 1036, 1037, 892, 778, 761, 823, + 827, 980, 1038, 697, 831, 723, 1039, 972, 724, 725, + 764, 1017, 783, 745, 780, 925, 779, 833, 1040, 836, + 837, 839, 970, 843, 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, 456, 456, 456, 456, 456, 456, 305, @@ -585,7 +589,7 @@ class Php7 extends \PhpParser\ParserAbstract 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 493, 493, 289, 289, 0, 289, 493, 493, 493, + 289, 493, 493, 289, 289, 493, 0, 289, 493, 493, 493, 493, 493, 493, 493, 493, 493, 289, 289, 289, 289, 289, 289, 289, 738, 165, 165, 165, 165, 493, 493, 493, 493, 493, -88, -88, 165, 165, 493, 242, @@ -609,10 +613,10 @@ class Php7 extends \PhpParser\ParserAbstract protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 582, 582, 582, - 582,32767,32767, 250, 103,32767,32767, 458, 376, 376, - 376,32767,32767, 526, 526, 526, 526, 526, 526,32767, - 32767,32767,32767,32767,32767, 458,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 583, 583, 583, + 583,32767,32767, 250, 103,32767,32767, 459, 376, 376, + 376,32767,32767, 527, 527, 527, 527, 527, 527,32767, + 32767,32767,32767,32767,32767, 459,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, @@ -623,55 +627,55 @@ class Php7 extends \PhpParser\ParserAbstract 32767,32767, 37, 7, 8, 10, 11, 50, 17, 314, 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 575,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 576,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 462, 441, 442, 444, - 445, 375, 527, 581, 317, 578, 374, 146, 329, 319, - 238, 320, 254, 463, 255, 464, 467, 468, 211, 283, - 371, 150, 405, 459, 407, 457, 461, 406, 381, 386, - 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, - 397, 398, 379, 380, 460, 438, 437, 436, 403,32767, - 32767, 404, 408, 378, 411,32767,32767,32767,32767,32767, - 32767,32767,32767, 103,32767, 409, 410, 427, 428, 425, - 426, 429,32767, 430, 431, 432, 433,32767,32767, 306, - 32767,32767, 355, 353, 418, 419, 306,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 520, - 435,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 103,32767, 101, 522, 400, 402, - 490, 413, 414, 412, 382,32767, 497,32767, 103, 499, - 32767,32767,32767, 112,32767,32767,32767,32767, 521,32767, - 528, 528,32767, 483, 101, 194,32767, 194, 194,32767, - 32767,32767,32767,32767,32767,32767, 589, 483, 111, 111, + 32767,32767,32767,32767,32767,32767, 463, 442, 443, 445, + 446, 375, 528, 582, 317, 579, 374, 146, 329, 319, + 238, 320, 254, 464, 255, 465, 468, 469, 211, 283, + 371, 150, 406, 460, 408, 458, 462, 407, 381, 387, + 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, + 398, 399, 379, 380, 461, 439, 438, 437, 404,32767, + 32767, 405, 409,32767, 378, 412,32767,32767,32767,32767, + 32767,32767,32767, 103,32767, 410, 411, 428, 429, 426, + 427, 430,32767, 431, 432, 433, 434,32767,32767, 306, + 32767,32767, 355, 353, 419, 420, 306,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 521, + 436,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 103,32767, 101, 523, 401, 403, + 491, 414, 415, 413, 382,32767, 498,32767, 103, 500, + 32767,32767,32767, 112,32767,32767,32767,32767, 522,32767, + 529, 529,32767, 484, 101, 194,32767, 194, 194,32767, + 32767,32767,32767,32767,32767,32767, 590, 484, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,32767, 194, 111,32767,32767,32767, 101, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 189,32767, 264, 266, - 103, 543, 194,32767, 502,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 495,32767,32767, + 103, 544, 194,32767, 503,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 496,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 483, 423, 139,32767, 139, 528, 415, 416, - 417, 485, 528, 528, 528, 302, 285,32767,32767,32767, - 32767, 500, 500, 101, 101, 101, 101, 495,32767,32767, + 32767,32767, 484, 424, 139,32767, 139, 529, 416, 417, + 418, 486, 529, 529, 529, 302, 285,32767,32767,32767, + 32767, 501, 501, 101, 101, 101, 101, 496,32767,32767, 112, 100, 100, 100, 100, 100, 104, 102,32767,32767, 32767,32767, 100,32767, 102, 102,32767,32767, 221, 208, - 219, 102,32767, 547, 548, 219, 102, 223, 223, 223, - 243, 243, 474, 308, 102, 100, 102, 102, 196, 308, - 308,32767, 102, 474, 308, 474, 308, 198, 308, 308, - 308, 474, 308,32767, 102, 308, 210, 100, 100, 308, - 32767,32767,32767, 485,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 515, - 32767, 532, 545, 421, 422, 424, 530, 446, 447, 448, - 449, 450, 451, 452, 454, 577,32767, 489,32767,32767, - 32767,32767, 328,32767, 587,32767, 587,32767,32767,32767, + 219, 102,32767, 548, 549, 219, 102, 223, 223, 223, + 243, 243, 475, 308, 102, 100, 102, 102, 196, 308, + 308,32767, 102, 475, 308, 475, 308, 198, 308, 308, + 308, 475, 308,32767, 102, 308, 210, 100, 100, 308, + 32767,32767,32767, 486,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 516, + 32767, 533, 546, 422, 423, 425, 531, 447, 448, 449, + 450, 451, 452, 453, 455, 578,32767, 490,32767,32767, + 32767,32767, 328,32767, 588,32767, 588,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 588,32767, 528,32767,32767,32767,32767, - 420, 9, 76, 43, 44, 52, 58, 506, 507, 508, - 509, 503, 504, 510, 505,32767,32767, 511, 553,32767, - 32767, 529, 580,32767,32767,32767,32767,32767,32767, 139, + 32767,32767,32767, 589,32767, 529,32767,32767,32767,32767, + 421, 9, 76, 43, 44, 52, 58, 507, 508, 509, + 510, 504, 505, 511, 506,32767,32767, 512, 554,32767, + 32767, 530, 581,32767,32767,32767,32767,32767,32767, 139, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 515,32767, 137,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 528,32767,32767,32767, 304, 305, + 516,32767, 137,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 529,32767,32767,32767, 304, 305, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 528,32767,32767,32767, 287, + 32767,32767,32767,32767,32767, 529,32767,32767,32767, 287, 288,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767, 282,32767,32767, 370,32767, 32767,32767,32767, 349,32767,32767,32767,32767,32767,32767, @@ -682,74 +686,71 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $goto = array( - 194, 194, 672, 423, 645, 886, 842, 887, 1028, 417, - 308, 309, 330, 565, 314, 422, 331, 424, 624, 826, - 680, 854, 827, 588, 841, 860, 165, 165, 165, 165, + 194, 194, 672, 423, 645, 826, 343, 314, 1297, 1297, + 417, 308, 309, 330, 565, 422, 331, 424, 624, 416, + 680, 599, 886, 588, 887, 1297, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, 188, 189, 190, 215, 213, 216, 523, 524, 413, 525, - 527, 528, 529, 530, 531, 532, 533, 534, 1097, 166, + 527, 528, 529, 530, 531, 532, 533, 534, 1098, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, - 176, 212, 214, 217, 235, 238, 241, 242, 244, 255, + 176, 212, 214, 217, 235, 238, 241, 242, 245, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, 274, 275, 311, 312, 313, 418, 419, 420, 570, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1097, 199, 180, + 236, 186, 187, 188, 189, 190, 215, 1098, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 323, 323, 323, 323, 829, 610, 610, 343, 548, - 540, 1192, 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227, - 1227, 1227, 1245, 1245, 464, 1270, 1271, 803, 1245, 1245, - 1245, 1245, 1245, 1245, 1245, 1245, 1245, 1245, 389, 540, - 548, 557, 558, 396, 568, 590, 604, 605, 834, 801, + 211, 323, 323, 323, 323, 829, 1028, 610, 610, 548, + 540, 1228, 825, 827, 1228, 1228, 1228, 1228, 1228, 1228, + 1228, 1228, 1228, 608, 642, 968, 942, 942, 940, 942, + 705, 803, 539, 977, 972, 464, 1271, 1272, 389, 540, + 548, 557, 558, 396, 568, 590, 604, 605, 834, 860, 882, 877, 878, 891, 15, 835, 879, 832, 880, 881, - 833, 455, 455, 944, 885, 807, 1193, 251, 251, 562, - 455, 1243, 1243, 817, 1049, 1045, 1046, 1243, 1243, 1243, - 1243, 1243, 1243, 1243, 1243, 1243, 1243, 608, 642, 1194, - 1253, 1254, 341, 248, 248, 248, 248, 250, 252, 822, - 822, 1196, 1196, 1003, 1196, 1003, 807, 416, 807, 599, - 1003, 1285, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, - 1003, 1003, 1003, 1267, 1267, 965, 1267, 1196, 488, 5, - 489, 6, 1196, 1196, 1196, 1196, 495, 385, 1196, 1196, - 1196, 1277, 1277, 1277, 1277, 277, 277, 277, 277, 560, - 1279, 1279, 1279, 1279, 1069, 1070, 898, 346, 555, 319, - 303, 899, 706, 623, 625, 644, 643, 346, 346, 1146, - 662, 666, 979, 670, 678, 975, 1263, 430, 1295, 1295, - 332, 346, 346, 819, 346, 639, 1312, 653, 654, 655, - 847, 537, 537, 927, 537, 1295, 526, 526, 542, 1272, - 1273, 346, 526, 526, 526, 526, 526, 526, 526, 526, - 526, 526, 1298, 620, 621, 1036, 822, 446, 395, 1265, - 1265, 1036, 938, 938, 938, 938, 566, 602, 446, 932, - 939, 936, 403, 679, 825, 1189, 554, 535, 535, 535, - 535, 844, 592, 603, 344, 345, 1256, 968, 942, 942, - 940, 942, 705, 987, 539, 977, 972, 1296, 1296, 1034, - 440, 903, 1085, 709, 856, 440, 440, 465, 607, 665, - 469, 1038, 0, 984, 1296, 541, 552, 949, 0, 0, - 541, 846, 552, 648, 963, 388, 1177, 914, 1080, 840, - 1178, 1181, 915, 1182, 0, 569, 458, 459, 460, 542, - 852, 1188, 0, 1303, 1304, 254, 254, 401, 402, 0, - 0, 0, 651, 0, 652, 0, 405, 406, 407, 0, - 663, 0, 0, 408, 0, 0, 0, 339, 850, 597, - 611, 614, 615, 616, 617, 636, 637, 638, 682, 921, - 998, 1006, 1010, 1007, 1011, 0, 440, 440, 440, 440, - 440, 440, 440, 440, 440, 440, 440, 0, 1191, 440, + 833, 822, 822, 801, 885, 1178, 914, 251, 251, 1179, + 1182, 915, 1183, 562, 1049, 1045, 1046, 1246, 1246, 319, + 303, 1246, 344, 345, 1246, 1246, 1246, 1246, 1246, 1246, + 1246, 1246, 1246, 249, 249, 249, 249, 243, 252, 1069, + 1070, 1197, 1197, 1003, 1197, 1003, 944, 936, 403, 679, + 1003, 341, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, + 1003, 1003, 1003, 1268, 1268, 965, 1268, 1197, 455, 455, + 1273, 1274, 1197, 1197, 1197, 1197, 807, 455, 1197, 1197, + 1197, 1278, 1278, 1278, 1278, 277, 277, 277, 277, 1286, + 1280, 1280, 1280, 1280, 620, 621, 898, 346, 555, 385, + 644, 899, 706, 623, 625, 842, 643, 346, 346, 560, + 662, 666, 979, 670, 678, 975, 1264, 807, 822, 807, + 854, 346, 346, 841, 346, 639, 1313, 653, 654, 655, + 1095, 537, 537, 1147, 537, 1244, 1244, 430, 542, 1244, + 332, 346, 1244, 1244, 1244, 1244, 1244, 1244, 1244, 1244, + 1244, 535, 535, 535, 535, 1036, 592, 446, 819, 1266, + 1266, 1036, 938, 938, 938, 938, 566, 602, 446, 932, + 939, 387, 391, 549, 589, 593, 554, 488, 927, 489, + 526, 526, 395, 603, 526, 495, 1257, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 847, 1296, 1296, 844, + 440, 903, 1085, 1190, 1193, 440, 440, 987, 607, 665, + 5, 709, 6, 984, 1296, 541, 552, 856, 1034, 469, + 541, 846, 552, 648, 963, 388, 465, 1038, 1080, 840, + 949, 1299, 0, 0, 0, 569, 458, 459, 460, 542, + 852, 1189, 0, 1304, 1305, 254, 254, 401, 402, 0, + 0, 0, 651, 0, 652, 0, 405, 406, 407, 1194, + 663, 0, 0, 408, 0, 0, 817, 339, 850, 597, + 611, 614, 615, 616, 617, 636, 637, 638, 682, 0, + 0, 0, 1195, 1254, 1255, 0, 440, 440, 440, 440, + 440, 440, 440, 440, 440, 440, 440, 0, 1192, 440, 855, 843, 1033, 1037, 587, 1062, 0, 683, 669, 669, - 947, 496, 675, 1060, 387, 391, 549, 589, 593, 425, - 0, 0, 0, 0, 0, 0, 425, 0, 0, 0, + 947, 496, 675, 1060, 0, 0, 0, 0, 0, 425, + 921, 998, 1006, 1010, 1007, 1011, 425, 0, 0, 0, 0, 0, 0, 937, 1015, 1008, 1012, 1009, 1013, 0, 0, 0, 0, 0, 272, 0, 0, 0, 0, 538, 538, 0, 0, 0, 0, 1078, 859, 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, 982, - 982 + 0, 0, 0, 982, 982 ); protected $gotoCheck = array( - 42, 42, 72, 65, 65, 64, 35, 64, 121, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 26, - 9, 35, 27, 124, 35, 45, 42, 42, 42, 42, + 42, 42, 72, 65, 65, 26, 95, 65, 175, 175, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 13, + 9, 13, 64, 124, 64, 175, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -763,94 +764,91 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 23, 23, 23, 23, 15, 106, 106, 95, 75, - 75, 20, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 106, 162, 162, 168, 168, 168, 7, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 15, 6, + 42, 23, 23, 23, 23, 15, 121, 106, 106, 75, + 75, 106, 25, 27, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 55, 55, 25, 25, 25, 25, 25, + 25, 7, 25, 25, 25, 168, 168, 168, 75, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 15, 45, 15, 15, 15, 15, 75, 15, 15, 15, 15, 15, - 15, 143, 143, 49, 15, 12, 20, 5, 5, 164, - 143, 163, 163, 20, 15, 15, 15, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 55, 55, 20, - 20, 20, 171, 5, 5, 5, 5, 5, 5, 22, - 22, 72, 72, 72, 72, 72, 12, 13, 12, 13, - 72, 173, 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 124, 124, 101, 124, 72, 149, 46, - 149, 46, 72, 72, 72, 72, 149, 61, 72, 72, - 72, 9, 9, 9, 9, 24, 24, 24, 24, 102, - 124, 124, 124, 124, 138, 138, 72, 14, 48, 161, - 161, 72, 48, 48, 48, 63, 48, 14, 14, 145, - 48, 48, 48, 48, 48, 48, 124, 111, 174, 174, - 29, 14, 14, 18, 14, 84, 14, 84, 84, 84, - 39, 19, 19, 90, 19, 174, 165, 165, 14, 170, - 170, 14, 165, 165, 165, 165, 165, 165, 165, 165, - 165, 165, 174, 83, 83, 124, 22, 19, 28, 124, + 15, 22, 22, 6, 15, 78, 78, 5, 5, 78, + 78, 78, 78, 164, 15, 15, 15, 162, 162, 161, + 161, 162, 95, 95, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 5, 5, 5, 5, 5, 5, 138, + 138, 72, 72, 72, 72, 72, 49, 91, 91, 91, + 72, 171, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 124, 124, 101, 124, 72, 143, 143, + 170, 170, 72, 72, 72, 72, 12, 143, 72, 72, + 72, 9, 9, 9, 9, 24, 24, 24, 24, 173, + 124, 124, 124, 124, 83, 83, 72, 14, 48, 61, + 63, 72, 48, 48, 48, 35, 48, 14, 14, 102, + 48, 48, 48, 48, 48, 48, 124, 12, 22, 12, + 35, 14, 14, 35, 14, 84, 14, 84, 84, 84, + 144, 19, 19, 145, 19, 163, 163, 111, 14, 163, + 29, 14, 163, 163, 163, 163, 163, 163, 163, 163, + 163, 105, 105, 105, 105, 124, 105, 19, 18, 124, 124, 124, 19, 19, 19, 19, 2, 2, 19, 19, - 19, 91, 91, 91, 25, 154, 9, 105, 105, 105, - 105, 37, 105, 9, 95, 95, 14, 25, 25, 25, - 25, 25, 25, 108, 25, 25, 25, 175, 175, 123, - 23, 17, 17, 97, 41, 23, 23, 151, 17, 14, - 82, 126, -1, 17, 175, 9, 9, 94, -1, -1, - 9, 17, 9, 17, 17, 9, 78, 78, 141, 17, - 78, 78, 78, 78, -1, 9, 9, 9, 9, 14, + 19, 58, 58, 58, 58, 58, 9, 149, 90, 149, + 165, 165, 28, 9, 165, 149, 14, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 39, 174, 174, 37, + 23, 17, 17, 154, 20, 23, 23, 108, 17, 14, + 46, 97, 46, 17, 174, 9, 9, 41, 123, 82, + 9, 17, 9, 17, 17, 9, 151, 126, 141, 17, + 94, 174, -1, -1, -1, 9, 9, 9, 9, 14, 9, 17, -1, 9, 9, 5, 5, 80, 80, -1, - -1, -1, 80, -1, 80, -1, 80, 80, 80, -1, - 80, -1, -1, 80, -1, -1, -1, 80, 9, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 87, - 87, 87, 87, 87, 87, -1, 23, 23, 23, 23, + -1, -1, 80, -1, 80, -1, 80, 80, 80, 20, + 80, -1, -1, 80, -1, -1, 20, 80, 9, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, -1, + -1, -1, 20, 20, 20, -1, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, -1, 14, 23, 16, 16, 16, 16, 8, 8, -1, 8, 8, 8, - 16, 8, 8, 8, 58, 58, 58, 58, 58, 115, - -1, -1, -1, -1, -1, -1, 115, -1, -1, -1, + 16, 8, 8, 8, -1, -1, -1, -1, -1, 115, + 87, 87, 87, 87, 87, 87, 115, -1, -1, -1, -1, -1, -1, 16, 115, 115, 115, 115, 115, -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, 24, 24, -1, -1, -1, -1, 16, 16, -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, 105, - 105 + -1, -1, -1, 105, 105 ); protected $gotoBase = array( - 0, 0, -300, 0, 0, 226, 196, 178, 517, 7, - 0, 0, -66, -65, 25, -175, 78, -33, 39, 84, - -213, 0, -64, 158, 302, 390, 15, 18, 46, 49, - 0, 0, 0, 0, 0, -356, 0, 67, 0, 32, - 0, -9, -1, 0, 0, 13, -420, 0, -367, 200, - 0, 0, 0, 0, 0, 208, 0, 0, 490, 0, - 0, 256, 0, 85, -14, -236, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -168, 0, 0, 45, 140, - -12, 0, -35, -95, -347, 0, 0, 221, 0, 0, - 27, 92, 0, 0, 2, -303, 0, 23, 0, 0, - 0, 251, 267, 0, 0, 370, -73, 0, 52, 0, - 0, 61, 0, 0, 0, 270, 0, 0, 0, 0, - 0, 6, 0, 54, 16, 0, -3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, - 0, 12, 0, 188, 0, 59, 0, 0, 0, -195, - 0, -5, 0, 0, 35, 0, 0, 0, 0, 0, - 0, 3, -57, -8, 201, 117, 0, 0, -111, 0, - -4, 223, 0, 241, 36, 115, 0, 0 + 0, 0, -300, 0, 0, 226, 210, 182, 517, 7, + 0, 0, 5, -313, 25, -175, 78, -33, 74, 84, + 40, 0, -102, 158, 302, 168, 1, 169, 70, 69, + 0, 0, 0, 0, 0, -37, 0, 85, 0, 98, + 0, 4, -1, 0, 0, 197, -279, 0, -367, 243, + 0, 0, 0, 0, 0, 144, 0, 0, 347, 0, + 0, 278, 0, 80, 3, -236, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -168, 0, 0, -176, 140, + -12, 0, -26, -154, -347, 0, 0, 262, 0, 0, + 72, -32, 0, 0, 15, -465, 0, 31, 0, 0, + 0, 251, 287, 0, 0, 344, -72, 0, 66, 0, + 0, 81, 0, 0, 0, 270, 0, 0, 0, 0, + 0, 164, 0, 73, 16, 0, 13, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -13, 0, + 0, 12, 0, 255, 107, 83, 0, 0, 0, -86, + 0, 14, 0, 0, 63, 0, 0, 0, 0, 0, + 0, -77, -2, 116, 205, 161, 0, 0, -100, 0, + -73, 242, 0, 279, 115, -294, 0, 0 ); protected $gotoDefault = array( -32768, 500, 713, 4, 714, 907, 790, 799, 585, 517, - 681, 340, 612, 414, 1261, 884, 1084, 567, 818, 1205, - 1213, 447, 821, 324, 703, 866, 867, 868, 392, 377, + 681, 340, 612, 414, 1262, 884, 1084, 567, 818, 1206, + 1214, 447, 821, 324, 703, 866, 867, 868, 392, 377, 383, 390, 634, 613, 482, 853, 443, 845, 474, 848, 442, 857, 162, 411, 498, 861, 3, 863, 545, 894, 378, 871, 379, 658, 873, 551, 875, 876, 386, 393, - 394, 1089, 559, 609, 888, 243, 553, 889, 376, 890, + 394, 1089, 559, 609, 888, 244, 553, 889, 376, 890, 897, 381, 384, 667, 454, 493, 487, 404, 1064, 596, 631, 451, 468, 619, 618, 606, 467, 426, 409, 326, - 926, 934, 475, 452, 948, 342, 956, 711, 1096, 626, + 926, 934, 475, 452, 948, 342, 956, 711, 1097, 626, 477, 964, 627, 971, 974, 518, 519, 466, 986, 269, 989, 478, 1021, 649, 650, 1001, 628, 629, 1019, 461, - 586, 1027, 444, 1035, 1249, 445, 1039, 262, 1042, 276, + 586, 1027, 444, 1035, 1250, 445, 1039, 262, 1042, 276, 410, 427, 1047, 1048, 8, 1054, 673, 674, 10, 273, - 497, 1079, 668, 441, 1095, 431, 1165, 1167, 547, 479, - 1185, 1184, 661, 494, 1190, 1252, 439, 520, 462, 310, - 521, 302, 328, 307, 536, 289, 329, 522, 463, 1258, - 1266, 325, 30, 1286, 1297, 336, 564, 601 + 497, 1079, 668, 441, 1096, 431, 1166, 1168, 547, 479, + 1186, 1185, 661, 494, 1191, 1253, 439, 520, 462, 310, + 521, 302, 328, 307, 536, 289, 329, 522, 463, 1259, + 1267, 325, 30, 1287, 1298, 336, 564, 601 ); protected $ruleToNonTerminal = array( @@ -901,20 +899,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 150, 144, 144, 149, 149, 152, 153, 153, 154, - 155, 155, 155, 19, 19, 72, 72, 72, 72, 145, - 145, 145, 145, 157, 157, 146, 146, 148, 148, 148, - 151, 151, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 163, 163, 106, 165, 165, 165, 165, 147, 147, - 147, 147, 147, 147, 147, 147, 58, 58, 160, 160, - 160, 160, 166, 166, 156, 156, 156, 167, 167, 167, - 167, 167, 167, 73, 73, 65, 65, 65, 65, 124, - 124, 124, 124, 170, 169, 159, 159, 159, 159, 159, - 159, 159, 158, 158, 158, 168, 168, 168, 168, 105, - 164, 172, 172, 171, 171, 173, 173, 173, 173, 173, - 173, 173, 173, 161, 161, 161, 161, 175, 176, 174, - 174, 174, 174, 174, 174, 174, 174, 177, 177, 177, - 177 + 42, 42, 150, 144, 144, 149, 149, 152, 153, 153, + 154, 155, 155, 155, 19, 19, 72, 72, 72, 72, + 145, 145, 145, 145, 157, 157, 146, 146, 148, 148, + 148, 151, 151, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 163, 163, 106, 165, 165, 165, 165, 147, + 147, 147, 147, 147, 147, 147, 147, 58, 58, 160, + 160, 160, 160, 166, 166, 156, 156, 156, 167, 167, + 167, 167, 167, 167, 73, 73, 65, 65, 65, 65, + 124, 124, 124, 124, 170, 169, 159, 159, 159, 159, + 159, 159, 159, 158, 158, 158, 168, 168, 168, 168, + 105, 164, 172, 172, 171, 171, 173, 173, 173, 173, + 173, 173, 173, 173, 161, 161, 161, 161, 175, 176, + 174, 174, 174, 174, 174, 174, 174, 174, 177, 177, + 177, 177 ); protected $ruleToLength = array( @@ -956,29 +954,29 @@ class Php7 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, - 3, 3, 4, 1, 1, 2, 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, 4, 4, 1, 1, 2, 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, 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, 2, 8, 9, 8, 9, 9, 10, 9, - 10, 8, 3, 2, 0, 4, 2, 1, 3, 2, - 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 0, 3, 0, 1, 1, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 3, 3, 4, 1, 1, 3, 1, 1, - 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, - 1, 1, 1, 1, 1, 3, 1, 1, 4, 4, - 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, - 4, 2, 2, 1, 3, 1, 4, 4, 3, 3, - 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, - 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, - 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, - 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, - 1 + 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, 2, 8, 9, 8, 9, 9, 10, + 9, 10, 8, 3, 2, 0, 4, 2, 1, 3, + 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, + 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 3, 3, 4, 1, 1, 3, 1, + 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, + 3, 1, 1, 1, 1, 1, 3, 1, 1, 4, + 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, + 1, 4, 2, 2, 1, 3, 1, 4, 4, 3, + 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, + 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, + 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, + 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, + 2, 1 ); protected function initReduceCallbacks() { @@ -2167,426 +2165,430 @@ protected function initReduceCallbacks() { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 383 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + if ($this->phpVersion >= 70000) { + $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); + } + }, 384 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 385 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 386 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 387 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 388 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 389 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 390 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 391 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 392 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 393 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 394 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 395 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 396 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 397 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 404 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 405 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 406 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 410 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 411 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 421 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 422 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 423 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 424 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 432 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 433 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 434 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 435 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 436 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 437 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 438 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 439 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 440 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 441 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 442 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 443 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 444 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 445 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 446 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 447 => function ($stackPos) { + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 448 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 448 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 450 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 452 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 452 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 454 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 454 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 455 => function ($stackPos) { + 456 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 456 => function ($stackPos) { + 457 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 457 => function ($stackPos) { + 458 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 458 => function ($stackPos) { + 459 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 461 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 462 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 463 => function ($stackPos) { + 464 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 464 => function ($stackPos) { + 465 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 465 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 466 => function ($stackPos) { + 467 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 467 => function ($stackPos) { + 468 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 468 => function ($stackPos) { + 469 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 469 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 470 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 471 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 472 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, 473 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 474 => function ($stackPos) { - $this->semValue = array(); + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 475 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = array(); }, 476 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 477 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 478 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 479 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 480 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 481 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 482 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 483 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 484 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 485 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 486 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 487 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 488 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 489 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 490 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 491 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 492 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 493 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 494 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 495 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 496 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = null; }, 497 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 498 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = array(); }, 499 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 500 => function ($stackPos) { - $this->semValue = array(); + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 501 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 502 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 503 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 504 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 505 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 506 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 507 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 508 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 509 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 510 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 511 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 512 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 513 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + }, + 514 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 514 => function ($stackPos) { + 515 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 515 => function ($stackPos) { + 516 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 516 => function ($stackPos) { + 517 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 517 => function ($stackPos) { + 518 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, - 518 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, 519 => function ($stackPos) { - $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion < 70000); }, 520 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 521 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2595,28 +2597,28 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 523 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 524 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 525 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 526 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 527 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 528 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 531 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2631,34 +2633,34 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 536 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 537 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 538 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 539 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 540 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 541 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 542 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 543 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 544 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 545 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2667,165 +2669,168 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 548 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 549 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 550 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 551 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 552 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 553 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 554 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 555 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 556 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 557 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 558 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 559 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 560 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 561 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 562 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 563 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 564 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 565 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 566 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 567 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 568 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 569 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 570 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 571 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, 572 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + $this->semValue = $this->semStack[$stackPos]; }, 573 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 574 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 575 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 576 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 577 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 578 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 579 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 580 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 581 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 582 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 583 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = null; }, 584 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 585 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 586 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 587 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 588 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 589 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 590 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 591 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 592 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 593 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 594 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 595 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 596 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 597 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 598 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 599 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 600 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 601 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index e07a0e3cfc..d967d0355b 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -28,6 +28,11 @@ abstract class ParserAbstract implements Parser { const SYMBOL_NONE = -1; + /** @var Lexer Lexer that is used when parsing */ + protected $lexer; + /** @var int PHP version ID to target on a best-effort basis (e.g. 80100) */ + protected $phpVersion; + /* * The following members will be filled with generated parsing data: */ @@ -95,8 +100,6 @@ abstract class ParserAbstract implements Parser * 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 array Semantic value stack (contains values of tokens and semantic action results) */ @@ -123,20 +126,29 @@ abstract protected function initReduceCallbacks(); /** * Creates a parser instance. * - * Options: Currently none. + * Options: + * * phpVersion: ?string, defaults to latest supported. This option is best-effort: Even if + * specified, parsing will generally assume the latest supported version and only adjust + * behavior in minor ways, for example by omitting errors in older versions and + * interpreting type hints as a name or identifier depending on version. * * @param Lexer $lexer A lexer * @param array $options Options array. */ public function __construct(Lexer $lexer, array $options = []) { $this->lexer = $lexer; + $phpVersion = $options['phpVersion'] ?? null; + $this->phpVersion = $phpVersion ? $this->parseVersion($phpVersion) : 80200; + + $this->initReduceCallbacks(); + } - if (isset($options['throwOnError'])) { - throw new \LogicException( - '"throwOnError" is no longer supported, use "errorHandler" instead'); + private function parseVersion(string $version): int { + if (!preg_match('/^(\d+)\.(\d+)/', $version, $matches)) { + throw new \LogicException("Invalid PHP version \"$version\""); } - $this->initReduceCallbacks(); + return $matches[1] * 10000 + $matches[2] * 100; } /** @@ -596,74 +608,19 @@ private function getNamespacingStyle(array $stmts): ?string { return $style; } - /** - * Fix up parsing of static property calls in PHP 5. - * - * In PHP 5 A::$b[c][d] and A::$b[c][d]() have very different interpretation. The former is - * interpreted as (A::$b)[c][d], while the latter is the same as A::{$b[c][d]}(). We parse the - * latter as the former initially and this method fixes the AST into the correct form when we - * encounter the "()". - * - * @param Node\Expr\StaticPropertyFetch|Node\Expr\ArrayDimFetch $prop - * @param Node\Arg[] $args - * @param array $attributes - * - * @return Expr\StaticCall - */ - protected function fixupPhp5StaticPropCall($prop, array $args, array $attributes) : Expr\StaticCall { - if ($prop instanceof Node\Expr\StaticPropertyFetch) { - $name = $prop->name instanceof VarLikeIdentifier - ? $prop->name->toString() : $prop->name; - $var = new Expr\Variable($name, $prop->name->getAttributes()); - return new Expr\StaticCall($prop->class, $var, $args, $attributes); - } elseif ($prop instanceof Node\Expr\ArrayDimFetch) { - $tmp = $prop; - while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { - $tmp = $tmp->var; - } - - /** @var Expr\StaticPropertyFetch $staticProp */ - $staticProp = $tmp->var; - - // Set start attributes to attributes of innermost node - $tmp = $prop; - $this->fixupStartAttributes($tmp, $staticProp->name); - while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { - $tmp = $tmp->var; - $this->fixupStartAttributes($tmp, $staticProp->name); - } - - $name = $staticProp->name instanceof VarLikeIdentifier - ? $staticProp->name->toString() : $staticProp->name; - $tmp->var = new Expr\Variable($name, $staticProp->name->getAttributes()); - return new Expr\StaticCall($staticProp->class, $prop, $args, $attributes); - } else { - throw new \Exception; - } - } - - protected function fixupStartAttributes(Node $to, Node $from) { - $startAttributes = ['startLine', 'startFilePos', 'startTokenPos']; - foreach ($startAttributes as $startAttribute) { - if ($from->hasAttribute($startAttribute)) { - $to->setAttribute($startAttribute, $from->getAttribute($startAttribute)); - } - } - } - protected function handleBuiltinTypes(Name $name) { $builtinTypes = [ - 'bool' => true, - 'int' => true, - 'float' => true, - 'string' => true, - 'iterable' => true, - 'void' => true, - 'object' => true, - 'null' => true, - 'false' => true, - 'mixed' => true, - 'never' => true, + 'bool' => 70000, + 'int' => 70000, + 'float' => 70000, + 'string' => 70000, + 'iterable' => 70100, + 'void' => 70100, + 'object' => 70200, + 'null' => 80000, + 'false' => 80000, + 'mixed' => 80000, + 'never' => 80100, ]; if (!$name->isUnqualified()) { @@ -671,7 +628,8 @@ protected function handleBuiltinTypes(Name $name) { } $lowerName = $name->toLowerString(); - if (!isset($builtinTypes[$lowerName])) { + $minVersion = $builtinTypes[$lowerName] ?? null; + if ($minVersion === null || $this->phpVersion < $minVersion) { return $name; } diff --git a/lib/PhpParser/ParserFactory.php b/lib/PhpParser/ParserFactory.php index f041e7ffe3..dae38d1b80 100644 --- a/lib/PhpParser/ParserFactory.php +++ b/lib/PhpParser/ParserFactory.php @@ -5,14 +5,12 @@ 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 int $kind One of ::PREFER_PHP7 or ::ONLY_PHP7 * @param Lexer|null $lexer Lexer to use. Defaults to emulative lexer when not specified * @param array $parserOptions Parser options. See ParserAbstract::__construct() argument * @@ -24,20 +22,11 @@ public function create(int $kind, Lexer $lexer = null, array $parserOptions = [] } 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' + 'Kind must be one of ::PREFER_PHP7 or ::ONLY_PHP7' ); } } diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php index 08640ff6ab..abe5b7f660 100644 --- a/test/PhpParser/CodeParsingTest.php +++ b/test/PhpParser/CodeParsingTest.php @@ -12,42 +12,41 @@ class CodeParsingTest extends CodeTestAbstract */ public function testParse($name, $code, $expected, $modeLine) { if (null !== $modeLine) { - $modes = array_fill_keys(explode(',', $modeLine), true); + $modes = $this->parseModeLine($modeLine); } else { $modes = []; } - list($parser5, $parser7) = $this->createParsers($modes); - list($stmts5, $output5) = $this->getParseOutput($parser5, $code, $modes); - list($stmts7, $output7) = $this->getParseOutput($parser7, $code, $modes); + $parser = $this->createParser($modes['version'] ?? null); + list($stmts, $output) = $this->getParseOutput($parser, $code, $modes); - if (isset($modes['php5'])) { - $this->assertSame($expected, $output5, $name); - $this->assertNotSame($expected, $output7, $name); - } elseif (isset($modes['php7'])) { - $this->assertNotSame($expected, $output5, $name); - $this->assertSame($expected, $output7, $name); - } else { - $this->assertSame($expected, $output5, $name); - $this->assertSame($expected, $output7, $name); - } + $this->assertSame($expected, $output, $name); + $this->checkAttributes($stmts); + } - $this->checkAttributes($stmts5); - $this->checkAttributes($stmts7); + private function parseModeLine(string $modeLine): array { + $modes = []; + foreach (explode(',', $modeLine) as $mode) { + $kv = explode('=', $mode, 2); + if (isset($kv[1])) { + $modes[$kv[0]] = $kv[1]; + } else { + $modes[$kv[0]] = true; + } + } + return $modes; } - public function createParsers(array $modes) { + public function createParser(?string $version): Parser { $lexer = new Lexer\Emulative(['usedAttributes' => [ 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'startTokenPos', 'endTokenPos', 'comments' ]]); - - return [ - new Parser\Php5($lexer), - new Parser\Php7($lexer), - ]; + return new Parser\Php7($lexer, [ + 'phpVersion' => $version, + ]); } // Must be public for updateTests.php diff --git a/test/PhpParser/CodeTestParser.php b/test/PhpParser/CodeTestParser.php index f63dc92653..d8bca64fc5 100644 --- a/test/PhpParser/CodeTestParser.php +++ b/test/PhpParser/CodeTestParser.php @@ -51,7 +51,7 @@ public function reconstructTest($name, array $tests) { return $result; } - private function extractMode($expected) { + private function extractMode(string $expected): array { $firstNewLine = strpos($expected, "\n"); if (false === $firstNewLine) { $firstNewLine = strlen($expected); diff --git a/test/PhpParser/Parser/MultipleTest.php b/test/PhpParser/Parser/MultipleTest.php deleted file mode 100644 index a65f0294a8..0000000000 --- a/test/PhpParser/Parser/MultipleTest.php +++ /dev/null @@ -1,99 +0,0 @@ - []]); - 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 - 'getPrefer5(), - [ - new Stmt\Class_('Test', ['stmts' => [ - new Stmt\ClassMethod('function') - ]]), - ] - ], - [ - // PHP 5 only code - 'b;', - $this->getPrefer7(), - [ - new Stmt\Global_([ - new Expr\Variable(new Expr\PropertyFetch(new Expr\Variable('a'), 'b')) - ]) - ] - ], - [ - // Different meaning (PHP 5) - 'getPrefer5(), - [ - new Stmt\Expression(new Expr\Variable( - new Expr\ArrayDimFetch(new Expr\Variable('a'), LNumber::fromString('0')) - )) - ] - ], - [ - // Different meaning (PHP 7) - 'getPrefer7(), - [ - new Stmt\Expression(new Expr\ArrayDimFetch( - new Expr\Variable(new Expr\Variable('a')), LNumber::fromString('0') - )) - ] - ], - ]; - } - - public function testThrownError() { - $this->expectException(Error::class); - $this->expectExceptionMessage('FAIL A'); - - $parserA = new class implements \PhpParser\Parser { - public function parse(string $code, ErrorHandler $errorHandler = null): ?array { - throw new Error('FAIL A'); - } - }; - $parserB = new class implements \PhpParser\Parser { - public function parse(string $code, ErrorHandler $errorHandler = null): ?array { - throw new Error('FAIL B'); - } - }; - - $parser = new Multiple([$parserA, $parserB]); - $parser->parse('dummy'); - } -} diff --git a/test/PhpParser/Parser/Php5Test.php b/test/PhpParser/Parser/Php5Test.php deleted file mode 100644 index 4386b5129a..0000000000 --- a/test/PhpParser/Parser/Php5Test.php +++ /dev/null @@ -1,13 +0,0 @@ -parseModeLine($modeLine); + list(, $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); - } elseif ('php7' === $version) { - $this->assertSame($expected, $output7, $name); - $this->assertNotSame($expected, $output5, $name); - } else { - $this->assertSame($expected, $output5, $name); - $this->assertSame($expected, $output7, $name); - } + $output = canonicalize($prettyPrinter->$method($parser->parse($code))); + $this->assertSame($expected, $output, $name); } /** @@ -264,8 +238,6 @@ public function testRoundTripPrint($name, $code, $expected, $modeLine) { * the pretty printer tests (i.e. returns the input if no changes occurred). */ - list($version) = $this->parseModeLine($modeLine); - $lexer = new Lexer\Emulative([ 'usedAttributes' => [ 'comments', @@ -274,9 +246,7 @@ public function testRoundTripPrint($name, $code, $expected, $modeLine) { ], ]); - $parserClass = $version === 'php5' ? Parser\Php5::class : Parser\Php7::class; - /** @var Parser $parser */ - $parser = new $parserClass($lexer); + $parser = new Php7($lexer); $traverser = new NodeTraverser(); $traverser->addVisitor(new NodeVisitor\CloningVisitor()); diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index 7754f8c3fc..1fe34735ec 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -352,7 +352,7 @@ array( $value $oopsAnotherValue ]; ----- -!!php7 Syntax error, unexpected T_VARIABLE, expecting ',' or ']' or ')' from 3:18 to 3:34 Syntax error, unexpected T_VARIABLE, expecting ',' or ']' or ')' from 6:12 to 6:28 Syntax error, unexpected T_VARIABLE, expecting ',' or ']' or ')' from 9:21 to 9:37 @@ -1374,7 +1364,6 @@ function foo() : return $a; } ----- -!!php7 Syntax error, unexpected '{' from 3:1 to 3:1 array( 0: Stmt_Function( @@ -1400,7 +1389,6 @@ array( $b, 'b' => $a] = $baz; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_Assign( diff --git a/test/code/parser/expr/arrow_function.test b/test/code/parser/expr/arrow_function.test index 6b1cf36e31..5b727a622a 100644 --- a/test/code/parser/expr/arrow_function.test +++ b/test/code/parser/expr/arrow_function.test @@ -11,7 +11,6 @@ fn(): int => $x; fn($a, $b) => $a and $b; fn($a, $b) => $a && $b; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_ArrowFunction( diff --git a/test/code/parser/expr/assignNewByRef.test b/test/code/parser/expr/assignNewByRef.test index a66d943a42..8ed227bd81 100644 --- a/test/code/parser/expr/assignNewByRef.test +++ b/test/code/parser/expr/assignNewByRef.test @@ -3,7 +3,7 @@ Assigning new by reference (PHP 5 only) $b['c'](); // array dereferencing $a->b()['c']; -$a->b(){'c'}; // invalid PHP: drop Support? +$a->b(){'c'}; ----- -!!php5 array( 0: Stmt_Expression( expr: Expr_PropertyFetch( @@ -114,13 +113,15 @@ array( ) ) 6: Stmt_Expression( - expr: Expr_MethodCall( - var: Expr_Variable( - name: a - ) + expr: Expr_FuncCall( name: Expr_ArrayDimFetch( - var: Expr_Variable( - name: b + var: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: Expr_Variable( + name: b + ) ) dim: Scalar_String( value: c @@ -176,9 +177,4 @@ array( ) ) ) - 9: Stmt_Nop( - comments: array( - 0: // invalid PHP: drop Support? - ) - ) ) \ No newline at end of file diff --git a/test/code/parser/expr/fetchAndCall/staticCall.test b/test/code/parser/expr/fetchAndCall/staticCall.test index a34a3e4bcd..47df8f5fd5 100644 --- a/test/code/parser/expr/fetchAndCall/staticCall.test +++ b/test/code/parser/expr/fetchAndCall/staticCall.test @@ -18,7 +18,6 @@ $a::b(); ${'a'}::b(); $a['b']::c(); ----- -!!php5 array( 0: Stmt_Expression( expr: Expr_StaticCall( @@ -72,15 +71,17 @@ array( ) ) 3: Stmt_Expression( - expr: Expr_StaticCall( - class: Name( - parts: array( - 0: A - ) - ) + expr: Expr_FuncCall( name: Expr_ArrayDimFetch( - var: Expr_Variable( - name: b + var: Expr_StaticPropertyFetch( + class: Name( + parts: array( + 0: A + ) + ) + name: VarLikeIdentifier( + name: b + ) ) dim: Scalar_String( value: c @@ -91,16 +92,18 @@ array( ) ) 4: Stmt_Expression( - expr: Expr_StaticCall( - class: Name( - parts: array( - 0: A - ) - ) + expr: Expr_FuncCall( name: Expr_ArrayDimFetch( var: Expr_ArrayDimFetch( - var: Expr_Variable( - name: b + var: Expr_StaticPropertyFetch( + class: Name( + parts: array( + 0: A + ) + ) + name: VarLikeIdentifier( + name: b + ) ) dim: Scalar_String( value: c diff --git a/test/code/parser/expr/firstClassCallables.test b/test/code/parser/expr/firstClassCallables.test index 0b2ff3d0ca..73ec2ce6c5 100644 --- a/test/code/parser/expr/firstClassCallables.test +++ b/test/code/parser/expr/firstClassCallables.test @@ -12,7 +12,6 @@ $this?->foo(...); #[Foo(...)] function foo() {} ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_FuncCall( diff --git a/test/code/parser/expr/keywordsInNamespacedName.test b/test/code/parser/expr/keywordsInNamespacedName.test index 6ff1bdbb39..742beb8133 100644 --- a/test/code/parser/expr/keywordsInNamespacedName.test +++ b/test/code/parser/expr/keywordsInNamespacedName.test @@ -11,7 +11,6 @@ fn\use(); namespace\fn\use(); private\protected\public\static\abstract\final(); ----- -!!php7 array( 0: Stmt_Namespace( name: Name( diff --git a/test/code/parser/expr/listReferences.test b/test/code/parser/expr/listReferences.test index 436d45ffa3..1753b7bf8d 100644 --- a/test/code/parser/expr/listReferences.test +++ b/test/code/parser/expr/listReferences.test @@ -7,7 +7,6 @@ list('k' => &$v) = $x; [&$v] = $x; ['k' => &$v] = $x; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_Assign( diff --git a/test/code/parser/expr/listWithKeys.test b/test/code/parser/expr/listWithKeys.test index e2eeedf0d9..c64e96c57a 100644 --- a/test/code/parser/expr/listWithKeys.test +++ b/test/code/parser/expr/listWithKeys.test @@ -5,7 +5,6 @@ List destructing with keys list('a' => $b) = ['a' => 'b']; list('a' => list($b => $c), 'd' => $e) = $x; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_Assign( diff --git a/test/code/parser/expr/match.test b/test/code/parser/expr/match.test index 3d1ef58d6d..1d513629b9 100644 --- a/test/code/parser/expr/match.test +++ b/test/code/parser/expr/match.test @@ -7,7 +7,6 @@ echo match (1) { 1 => 'Bar', }; ----- -!!php7 array( 0: Stmt_Echo( exprs: array( @@ -49,7 +48,6 @@ $value = match (1) { 0, 1 => 'Foo', }; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_Assign( @@ -92,7 +90,6 @@ $result = match ($operator) { BinaryOperator::ADD => $lhs + $rhs, }; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_Assign( @@ -139,7 +136,6 @@ $value = match ($char) { default => 'default' }; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_Assign( @@ -180,7 +176,6 @@ $value = match (1) { default, => 'Bar', }; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_Assign( diff --git a/test/code/parser/expr/newWithoutClass.test b/test/code/parser/expr/newWithoutClass.test index 318f9301f9..2ad0af0068 100644 --- a/test/code/parser/expr/newWithoutClass.test +++ b/test/code/parser/expr/newWithoutClass.test @@ -3,15 +3,6 @@ New without a class b; "{$a?->b}"; "$a?->b"; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_NullsafePropertyFetch( diff --git a/test/code/parser/expr/throw.test b/test/code/parser/expr/throw.test index f098461d13..2b54521d6e 100644 --- a/test/code/parser/expr/throw.test +++ b/test/code/parser/expr/throw.test @@ -4,7 +4,6 @@ Throw expression test(throw $x); $a ?? throw new Exception; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_FuncCall( diff --git a/test/code/parser/expr/trailingCommas.test b/test/code/parser/expr/trailingCommas.test index 4b15a13a6e..4a7a343794 100644 --- a/test/code/parser/expr/trailingCommas.test +++ b/test/code/parser/expr/trailingCommas.test @@ -9,7 +9,6 @@ new Foo($a, $b, ); unset($a, $b, ); isset($a, $b, ); ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_FuncCall( diff --git a/test/code/parser/expr/uvs/constDeref.test b/test/code/parser/expr/uvs/constDeref.test index 996e846854..6d2ca32dce 100644 --- a/test/code/parser/expr/uvs/constDeref.test +++ b/test/code/parser/expr/uvs/constDeref.test @@ -21,7 +21,6 @@ __FUNCTION__[0]; __FUNCTION__->length; __FUNCIONT__->length(); ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_PropertyFetch( diff --git a/test/code/parser/expr/uvs/globalNonSimpleVarError.test b/test/code/parser/expr/uvs/globalNonSimpleVarError.test index 5ae4f958e2..54dd467d64 100644 --- a/test/code/parser/expr/uvs/globalNonSimpleVarError.test +++ b/test/code/parser/expr/uvs/globalNonSimpleVarError.test @@ -3,7 +3,6 @@ Non-simple variables are forbidden in PHP 7 bar; ----- -!!php7 Syntax error, unexpected T_OBJECT_OPERATOR, expecting ';' from 2:13 to 2:14 array( 0: Stmt_Global( diff --git a/test/code/parser/expr/uvs/indirectCall.test b/test/code/parser/expr/uvs/indirectCall.test index 776e5c5289..a940c2be36 100644 --- a/test/code/parser/expr/uvs/indirectCall.test +++ b/test/code/parser/expr/uvs/indirectCall.test @@ -15,7 +15,6 @@ id(['udef', 'id'])[1]()('var_dump')(5); ('i' . 'd')()('var_dump')(13); '\id'('var_dump')(14); ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_FuncCall( diff --git a/test/code/parser/expr/uvs/isset.test b/test/code/parser/expr/uvs/isset.test index 828fd9b1f5..531767882b 100644 --- a/test/code/parser/expr/uvs/isset.test +++ b/test/code/parser/expr/uvs/isset.test @@ -6,7 +6,6 @@ isset(([0, 1] + [])[0]); isset(['a' => 'b']->a); isset("str"->a); ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_Isset( diff --git a/test/code/parser/expr/uvs/misc.test b/test/code/parser/expr/uvs/misc.test index f56c096310..913526353a 100644 --- a/test/code/parser/expr/uvs/misc.test +++ b/test/code/parser/expr/uvs/misc.test @@ -8,7 +8,6 @@ Uniform variable syntax in PHP 7 (misc) (clone $obj)->b[0](1); [0, 1][0] = 1; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_MethodCall( diff --git a/test/code/parser/expr/uvs/new.test b/test/code/parser/expr/uvs/new.test index 5e1caf2fc2..ba2325bae7 100644 --- a/test/code/parser/expr/uvs/new.test +++ b/test/code/parser/expr/uvs/new.test @@ -9,7 +9,6 @@ new Test::$className; new $test::$className; new $weird[0]->foo::$className; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_New( diff --git a/test/code/parser/expr/uvs/newInstanceofExpr.test b/test/code/parser/expr/uvs/newInstanceofExpr.test index b778e4335f..2908c9e3ee 100644 --- a/test/code/parser/expr/uvs/newInstanceofExpr.test +++ b/test/code/parser/expr/uvs/newInstanceofExpr.test @@ -6,7 +6,6 @@ new ('Foo' . $bar); new ('Foo' . $bar)($arg); $obj instanceof ('Foo' . $bar); ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_New( diff --git a/test/code/parser/expr/uvs/staticProperty.test b/test/code/parser/expr/uvs/staticProperty.test index bf3547ca76..97e7e28ee9 100644 --- a/test/code/parser/expr/uvs/staticProperty.test +++ b/test/code/parser/expr/uvs/staticProperty.test @@ -10,7 +10,6 @@ A::$$b; A::$$c[1]; A::$A::$b; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_StaticPropertyFetch( diff --git a/test/code/parser/expr/variable.test b/test/code/parser/expr/variable.test index c30326cc5e..b28a93214b 100644 --- a/test/code/parser/expr/variable.test +++ b/test/code/parser/expr/variable.test @@ -9,7 +9,6 @@ $$a; $$$a; $$a['b']; ----- -!!php5 array( 0: Stmt_Expression( expr: Expr_Variable( @@ -53,14 +52,14 @@ array( ) ) 5: Stmt_Expression( - expr: Expr_Variable( - name: Expr_ArrayDimFetch( - var: Expr_Variable( + expr: Expr_ArrayDimFetch( + var: Expr_Variable( + name: Expr_Variable( name: a ) - dim: Scalar_String( - value: b - ) + ) + dim: Scalar_String( + value: b ) ) ) diff --git a/test/code/parser/scalar/encapsedNegVarOffset.test b/test/code/parser/scalar/encapsedNegVarOffset.test index 27a9056fcf..b5be51d547 100644 --- a/test/code/parser/scalar/encapsedNegVarOffset.test +++ b/test/code/parser/scalar/encapsedNegVarOffset.test @@ -7,7 +7,6 @@ Encapsed string negative var offsets "$a[-00]"; "$a[@@{ -PHP_INT_MAX - 1 }@@]"; ----- -!!php7 array( 0: Stmt_Expression( expr: Scalar_Encapsed( diff --git a/test/code/parser/scalar/invalidOctal.test b/test/code/parser/scalar/invalidOctal.test index cd0cbfba0f..291c13f352 100644 --- a/test/code/parser/scalar/invalidOctal.test +++ b/test/code/parser/scalar/invalidOctal.test @@ -3,7 +3,7 @@ Invalid octal literals 0; $a = #[A12] static function() {}; $b = #[A13] static fn() => 0; ----- -!!php7 array( 0: Stmt_Function( attrGroups: array( diff --git a/test/code/parser/stmt/class/constModifierErrors.test b/test/code/parser/stmt/class/constModifierErrors.test index 09e5404821..e4714f40fc 100644 --- a/test/code/parser/stmt/class/constModifierErrors.test +++ b/test/code/parser/stmt/class/constModifierErrors.test @@ -5,7 +5,6 @@ class A { static const X = 1; } ----- -!!php7 Cannot use 'static' as constant modifier from 3:5 to 3:10 array( 0: Stmt_Class( @@ -43,7 +42,6 @@ class A { abstract const X = 1; } ----- -!!php7 Cannot use 'abstract' as constant modifier from 3:5 to 3:12 array( 0: Stmt_Class( @@ -81,7 +79,6 @@ class A { readonly const X = 1; } ----- -!!php7 Cannot use 'readonly' as constant modifier from 3:5 to 3:12 array( 0: Stmt_Class( @@ -119,7 +116,6 @@ 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( diff --git a/test/code/parser/stmt/class/constModifiers.test b/test/code/parser/stmt/class/constModifiers.test index 33d3d5ba6f..1640729ed8 100644 --- a/test/code/parser/stmt/class/constModifiers.test +++ b/test/code/parser/stmt/class/constModifiers.test @@ -10,7 +10,6 @@ class Foo { final const E = 5; } ----- -!!php7 array( 0: Stmt_Class( attrGroups: array( diff --git a/test/code/parser/stmt/class/enum.test b/test/code/parser/stmt/class/enum.test index 2a79826446..731da9697b 100644 --- a/test/code/parser/stmt/class/enum.test +++ b/test/code/parser/stmt/class/enum.test @@ -11,7 +11,6 @@ enum C: int implements Bar { case Foo = 1; } ----- -!!php7 array( 0: Stmt_Enum( attrGroups: array( diff --git a/test/code/parser/stmt/class/enum_with_string.test b/test/code/parser/stmt/class/enum_with_string.test index 79a29343be..a8f8655ad8 100644 --- a/test/code/parser/stmt/class/enum_with_string.test +++ b/test/code/parser/stmt/class/enum_with_string.test @@ -10,7 +10,6 @@ enum Suit: string case Spades = 'S'; } ----- -!!php7 array( 0: Stmt_Enum( attrGroups: array( diff --git a/test/code/parser/stmt/class/modifier.test b/test/code/parser/stmt/class/modifier.test index 0d26cb1674..ecdce0a787 100644 --- a/test/code/parser/stmt/class/modifier.test +++ b/test/code/parser/stmt/class/modifier.test @@ -68,7 +68,6 @@ array( ----- $bar; ----- -!!php7 array( 0: Stmt_Expression( expr: Expr_ArrowFunction( diff --git a/test/code/parser/stmt/function/typeVersions.test b/test/code/parser/stmt/function/typeVersions.test new file mode 100644 index 0000000000..6f8b4b47d0 --- /dev/null +++ b/test/code/parser/stmt/function/typeVersions.test @@ -0,0 +1,1311 @@ +Types by version +----- + (yield "k2") => "a" . "b"]); } ----- -!!php7 array( 0: Stmt_Function( attrGroups: array( diff --git a/test/code/parser/stmt/multiCatch.test b/test/code/parser/stmt/multiCatch.test index f7cfb3c6b8..4d8fcabd81 100644 --- a/test/code/parser/stmt/multiCatch.test +++ b/test/code/parser/stmt/multiCatch.test @@ -9,7 +9,6 @@ try { $z; } ----- -!!php7 array( 0: Stmt_TryCatch( stmts: array( diff --git a/test/code/parser/stmt/namespace/groupUseErrors.test b/test/code/parser/stmt/namespace/groupUseErrors.test index 2a89984854..da4cc32a41 100644 --- a/test/code/parser/stmt/namespace/groupUseErrors.test +++ b/test/code/parser/stmt/namespace/groupUseErrors.test @@ -5,7 +5,6 @@ Invalid group use syntax use Foo\{Bar} use Bar\{Foo}; ----- -!!php7 Syntax error, unexpected T_USE, expecting ';' from 4:1 to 4:3 array( 0: Stmt_GroupUse( @@ -55,7 +54,6 @@ array( // Missing NS separator use Foo {Bar, Baz}; ----- -!!php7 Syntax error, unexpected '{', expecting ';' from 3:9 to 3:9 array( 0: Stmt_Use( diff --git a/test/code/parser/stmt/namespace/groupUseTrailingComma.test b/test/code/parser/stmt/namespace/groupUseTrailingComma.test index 0327a9b39a..8f698a0617 100644 --- a/test/code/parser/stmt/namespace/groupUseTrailingComma.test +++ b/test/code/parser/stmt/namespace/groupUseTrailingComma.test @@ -4,7 +4,6 @@ Group use can have trailing comma use A\{B,}; use function A\{b,}; ----- -!!php7 array( 0: Stmt_GroupUse( type: TYPE_UNKNOWN (0) diff --git a/test/code/parser/stmt/newInInitializer.test b/test/code/parser/stmt/newInInitializer.test index 7582aa3c23..a813ff7dc8 100644 --- a/test/code/parser/stmt/newInInitializer.test +++ b/test/code/parser/stmt/newInInitializer.test @@ -14,7 +14,6 @@ class Bar { public $prop = new Foo; } ----- -!!php7 array( 0: Stmt_Const( consts: array( diff --git a/test/code/parser/stmt/tryCatch_without_variable.test b/test/code/parser/stmt/tryCatch_without_variable.test index f8831f847e..2efd8e1ab2 100644 --- a/test/code/parser/stmt/tryCatch_without_variable.test +++ b/test/code/parser/stmt/tryCatch_without_variable.test @@ -8,7 +8,6 @@ try { } ----- -!!php7 array( 0: Stmt_TryCatch( stmts: array( diff --git a/test/code/prettyPrinter/commentsInCommaList.test b/test/code/prettyPrinter/commentsInCommaList.test index d0e42ef68a..9b230de72d 100644 --- a/test/code/prettyPrinter/commentsInCommaList.test +++ b/test/code/prettyPrinter/commentsInCommaList.test @@ -27,7 +27,6 @@ new Foo( $foo ); ----- -!!php7 $arr = [ // Foo $foo, diff --git a/test/code/prettyPrinter/expr/arrayDestructuring.test b/test/code/prettyPrinter/expr/arrayDestructuring.test index bff1999e4e..56d23bb65c 100644 --- a/test/code/prettyPrinter/expr/arrayDestructuring.test +++ b/test/code/prettyPrinter/expr/arrayDestructuring.test @@ -7,7 +7,6 @@ Array destructuring [, [[$a]], $b] = $bar; ['a' => $b, 'b' => $a] = $baz; ----- -!!php7 [$a, $b] = [$c, $d]; [, $a, , , $b, ] = $foo; [, [[$a]], $b] = $bar; diff --git a/test/code/prettyPrinter/expr/arraySpread.test b/test/code/prettyPrinter/expr/arraySpread.test index 5e8393ff27..a3a1c121c8 100644 --- a/test/code/prettyPrinter/expr/arraySpread.test +++ b/test/code/prettyPrinter/expr/arraySpread.test @@ -4,5 +4,4 @@ Array spread [$a, $b] = [...$c, ...$d]; ----- -!!php7 [$a, $b] = [...$c, ...$d]; diff --git a/test/code/prettyPrinter/expr/arrow_function.test b/test/code/prettyPrinter/expr/arrow_function.test index 78a684c81e..8b2656158a 100644 --- a/test/code/prettyPrinter/expr/arrow_function.test +++ b/test/code/prettyPrinter/expr/arrow_function.test @@ -11,7 +11,6 @@ fn(): int => $x; fn($a, $b) => $a and $b; fn($a, $b) => $a && $b; ----- -!!php7 fn($a) => $a; fn($x = 42) => $x; fn(&$x) => $x; diff --git a/test/code/prettyPrinter/expr/firstClassCallables.test b/test/code/prettyPrinter/expr/firstClassCallables.test index 9edf4b20c4..8053685554 100644 --- a/test/code/prettyPrinter/expr/firstClassCallables.test +++ b/test/code/prettyPrinter/expr/firstClassCallables.test @@ -5,7 +5,6 @@ foo(...); $this->foo(...); A::foo(...); ----- -!!php7 foo(...); $this->foo(...); A::foo(...); \ No newline at end of file diff --git a/test/code/prettyPrinter/expr/match.test b/test/code/prettyPrinter/expr/match.test index f5f87a110f..0583d2356f 100644 --- a/test/code/prettyPrinter/expr/match.test +++ b/test/code/prettyPrinter/expr/match.test @@ -9,7 +9,6 @@ echo match (1) { default => 'Foo', }; ----- -!!php7 echo match (1) { 0, 1 => 'Foo', // Comment diff --git a/test/code/prettyPrinter/expr/namedArgs.test b/test/code/prettyPrinter/expr/namedArgs.test index 2e20d9b5c4..a2a021d4f1 100644 --- a/test/code/prettyPrinter/expr/namedArgs.test +++ b/test/code/prettyPrinter/expr/namedArgs.test @@ -4,6 +4,5 @@ Named arguments foo(a: $b, c: $d); bar(class: 0); ----- -!!php7 foo(a: $b, c: $d); bar(class: 0); \ No newline at end of file diff --git a/test/code/prettyPrinter/expr/newVariable.test b/test/code/prettyPrinter/expr/newVariable.test index d5283b3316..81176a4c16 100644 --- a/test/code/prettyPrinter/expr/newVariable.test +++ b/test/code/prettyPrinter/expr/newVariable.test @@ -5,7 +5,6 @@ new ('a' . 'b'); $x instanceof ('a' . 'b'); $x instanceof ($y++); ----- -!!php7 new ('a' . 'b')(); $x instanceof ('a' . 'b'); $x instanceof ($y++); \ No newline at end of file diff --git a/test/code/prettyPrinter/expr/nullsafe.test b/test/code/prettyPrinter/expr/nullsafe.test index de9adc9884..4487479b37 100644 --- a/test/code/prettyPrinter/expr/nullsafe.test +++ b/test/code/prettyPrinter/expr/nullsafe.test @@ -11,7 +11,6 @@ new $a?->b; "{$a?->b}"; "$a?->b"; ----- -!!php7 $a?->b; $a?->b($c); $a?->b?->c; diff --git a/test/code/prettyPrinter/expr/throw.test b/test/code/prettyPrinter/expr/throw.test index 19dfe0f325..f6dd7177a8 100644 --- a/test/code/prettyPrinter/expr/throw.test +++ b/test/code/prettyPrinter/expr/throw.test @@ -4,6 +4,5 @@ Throw expression test(throw $x); $a ?? throw new Exception; ----- -!!php7 test(throw $x); $a ?? throw new Exception(); \ No newline at end of file diff --git a/test/code/prettyPrinter/expr/uvs.test b/test/code/prettyPrinter/expr/uvs.test index 087e7129a3..a351e8a683 100644 --- a/test/code/prettyPrinter/expr/uvs.test +++ b/test/code/prettyPrinter/expr/uvs.test @@ -12,7 +12,6 @@ A::$$b[$c](); (A::$b)(); ('a' . 'b')::X; ----- -!!php7 (function () { })(); array('a', 'b')()(); diff --git a/test/code/prettyPrinter/expr/variables.test b/test/code/prettyPrinter/expr/variables.test index 4e0fa2e123..2b444b236c 100644 --- a/test/code/prettyPrinter/expr/variables.test +++ b/test/code/prettyPrinter/expr/variables.test @@ -35,9 +35,8 @@ $a::$b()[$c]; (new $$a)[$b]; (new $a->b)->c; -global $a, $$a, $$a[$b], $$a->b; +global $a, $$a; ----- -!!php5 $a; ${$a}; ${$a}; @@ -46,21 +45,21 @@ $a->b(); $a->b($c); $a->{$b}(); $a->{$b}(); -$a->{$b[$c]}(); +$a->{$b}[$c](); ${$a}->b; $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]}($d); $a::{$b->c}(); -A::${$b[$c]}(); +A::${$b}[$c](); a(); $a(); $a()[$b]; @@ -70,4 +69,4 @@ $a::$b()[$c]; (new A())->b(); (new ${$a}())[$b]; (new $a->b())->c; -global $a, ${$a}, ${$a[$b]}, ${$a->b}; +global $a, ${$a}; \ No newline at end of file diff --git a/test/code/prettyPrinter/expr/yield.test b/test/code/prettyPrinter/expr/yield.test index 12ab7dec1c..64dc902ffb 100644 --- a/test/code/prettyPrinter/expr/yield.test +++ b/test/code/prettyPrinter/expr/yield.test @@ -35,7 +35,6 @@ function gen() } // TODO Get rid of parens for last case ----- -!!php7 function gen() { $a = (yield $b); diff --git a/test/code/prettyPrinter/stmt/attributes.test b/test/code/prettyPrinter/stmt/attributes.test index c55f7c3e38..f727f6f706 100644 --- a/test/code/prettyPrinter/stmt/attributes.test +++ b/test/code/prettyPrinter/stmt/attributes.test @@ -30,7 +30,6 @@ $x = #[A10] function() {}; $y = #[A11] fn() => 0; new #[A13] class {}; ----- -!!php7 #[A1, A2, A3(0), A4(x: 1)] function a() { diff --git a/test/code/prettyPrinter/stmt/class_const.test b/test/code/prettyPrinter/stmt/class_const.test index e73ad4304b..c14ed9efa8 100644 --- a/test/code/prettyPrinter/stmt/class_const.test +++ b/test/code/prettyPrinter/stmt/class_const.test @@ -10,7 +10,6 @@ class Foo private const G = 7, H = 8; } ----- -!!php7 class Foo { const A = 1, B = 2; diff --git a/test/code/prettyPrinter/stmt/enum.test b/test/code/prettyPrinter/stmt/enum.test index 407c371e4b..262d9b744b 100644 --- a/test/code/prettyPrinter/stmt/enum.test +++ b/test/code/prettyPrinter/stmt/enum.test @@ -19,7 +19,6 @@ enum C: string implements D { case Z = 'A'; } ----- -!!php7 enum A implements B { case X; diff --git a/test/code/prettyPrinter/stmt/intersection_types.test b/test/code/prettyPrinter/stmt/intersection_types.test index 9a53c10c5f..13f414b326 100644 --- a/test/code/prettyPrinter/stmt/intersection_types.test +++ b/test/code/prettyPrinter/stmt/intersection_types.test @@ -8,7 +8,6 @@ class Test { function test(A&B $a): A&B {} ----- -!!php7 class Test { public A&B $prop; diff --git a/test/code/prettyPrinter/stmt/multiCatch.test b/test/code/prettyPrinter/stmt/multiCatch.test index 8e3f12b4d8..af8afb9192 100644 --- a/test/code/prettyPrinter/stmt/multiCatch.test +++ b/test/code/prettyPrinter/stmt/multiCatch.test @@ -9,7 +9,6 @@ try { $z; } ----- -!!php7 try { $x; } catch (X|Y $e1) { diff --git a/test/code/prettyPrinter/stmt/nullable_types.test b/test/code/prettyPrinter/stmt/nullable_types.test index 1490db995c..ef5bc5a01a 100644 --- a/test/code/prettyPrinter/stmt/nullable_types.test +++ b/test/code/prettyPrinter/stmt/nullable_types.test @@ -5,7 +5,6 @@ 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/test/code/prettyPrinter/stmt/properties.test b/test/code/prettyPrinter/stmt/properties.test index 53903dba45..ee073df70d 100644 --- a/test/code/prettyPrinter/stmt/properties.test +++ b/test/code/prettyPrinter/stmt/properties.test @@ -11,7 +11,6 @@ class A public readonly int|float $e; } ----- -!!php7 class A { public $a; diff --git a/test/code/prettyPrinter/stmt/property_promotion.test b/test/code/prettyPrinter/stmt/property_promotion.test index f5acaa2f4c..8606b5bdba 100644 --- a/test/code/prettyPrinter/stmt/property_promotion.test +++ b/test/code/prettyPrinter/stmt/property_promotion.test @@ -13,7 +13,6 @@ class Point } } ----- -!!php7 class Point { public function __construct(public float $x = 0.0, protected array $y = [], private string $z = 'hello', public readonly int $a = 0) @@ -35,7 +34,6 @@ class Test } } ----- -!!php7 class Test { public $z; diff --git a/test/code/prettyPrinter/stmt/readonly_class.test b/test/code/prettyPrinter/stmt/readonly_class.test index e2dcb249f6..8768ae73cd 100644 --- a/test/code/prettyPrinter/stmt/readonly_class.test +++ b/test/code/prettyPrinter/stmt/readonly_class.test @@ -6,7 +6,6 @@ readonly class Foo { } ----- -!!php7 readonly class Foo { } \ No newline at end of file diff --git a/test/code/prettyPrinter/stmt/staticType.test b/test/code/prettyPrinter/stmt/staticType.test index b8fa489b9d..a013fc9c49 100644 --- a/test/code/prettyPrinter/stmt/staticType.test +++ b/test/code/prettyPrinter/stmt/staticType.test @@ -5,7 +5,6 @@ class Test { public static function create(): static {} } ----- -!!php7 class Test { public static function create(): static diff --git a/test/code/prettyPrinter/stmt/tryCatch_without_variable.test b/test/code/prettyPrinter/stmt/tryCatch_without_variable.test index f268c0b4bd..d56735c4d7 100644 --- a/test/code/prettyPrinter/stmt/tryCatch_without_variable.test +++ b/test/code/prettyPrinter/stmt/tryCatch_without_variable.test @@ -10,7 +10,6 @@ try { } ----- -!!php7 try { } catch (Exception) { } finally { diff --git a/test/code/prettyPrinter/stmt/union_types.test b/test/code/prettyPrinter/stmt/union_types.test index fe214f694f..5d9f7009f9 100644 --- a/test/code/prettyPrinter/stmt/union_types.test +++ b/test/code/prettyPrinter/stmt/union_types.test @@ -8,7 +8,6 @@ class Test { function test(A|B $a): int|false {} ----- -!!php7 class Test { public A|iterable|null $prop; From 55f29b152c2a7c3dce8ba4ff72d084f93ccebfff Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 12 Jun 2022 18:54:51 +0200 Subject: [PATCH 083/428] Improve ParserFactory version targeting Most users will want to pick createForNewestSupportedVersion() or getForHostVersion(). The currently default is the former, which can lead to unwanted surprised due to PHP BC breaks for users that actually want the latter. Make this choice more explicit. --- UPGRADE-5.0.md | 30 +++++++++++ lib/PhpParser/ParserFactory.php | 52 ++++++++++++++++++- test/PhpParser/CodeParsingTest.php | 18 +++---- .../stmt/class/readonlyAsClassName.test | 28 ++++++++++ 4 files changed, 118 insertions(+), 10 deletions(-) create mode 100644 test/code/parser/stmt/class/readonlyAsClassName.test diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 135a41a62d..004bceedc3 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -22,6 +22,36 @@ However, some aspects of PHP 5 parsing are no longer supported: * Declarations of the form `global $$var[0]` are not supported in PHP 7 and will cause a parse error. In error recovery mode, it is possible to continue parsing after such declarations. * The PHP 7 parser will accept many constructs that are not valid in PHP 5. However, this was also true of the dedicated PHP 5 parser. +### Changes to the parser factory + +The `ParserFactory::create()` method is deprecated in favor of three new methods that provide more fine-grained control over the PHP version being targeted: + + * `createForNewestSupportedVersion()`: Use this if you don't know the PHP version of the code you're parsing. It's better to assume a too new version than a too old one. + * `createForHostVersion()`: Use this if you're parsing code for the PHP version you're running on. + * `createForVersion()`: Use this if you know the PHP version of the code you want to parse. + +In all cases, the PHP version is a fairly weak hint that is only used on a best-effort basis. The parser will usually accept code for newer versions if it does not have any backwards-compatibility implications. + +For example, if you specify version `"8.0"`, then `class ReadOnly {}` is treated as a valid class declaration, while using `public readonly int $prop` will lead to a parse error. However, `final public const X = Y;` will be accepted in both cases. + +``` +use PhpParser\ParserFactory; +$factory = new ParserFactory; + +# Before +$parser = $factory->create(ParserFactory::PREFER_PHP7); + +# After (this is roughly equivalent to PREFER_PHP7 behavior) +$parser = $factory->createForNewestSupportedVersion(); +# Or +$parser = $factory->createForHostVersion(); + +# Before +$parser = $factory->create(ParserFactory::ONLY_PHP5); +# After (supported on a best-effort basis) +$parser = $factory->createForVersion("5.6"); +``` + ### Changes to the default pretty printer A number of changes to the standard pretty printer have been made, to make it match contemporary coding style conventions (and in particular PSR-12). Options to restore the previous behavior are not provided, but it is possible to override the formatting methods (such as `pStmt_ClassMethod`) with your preferred formatting. diff --git a/lib/PhpParser/ParserFactory.php b/lib/PhpParser/ParserFactory.php index dae38d1b80..788a944d75 100644 --- a/lib/PhpParser/ParserFactory.php +++ b/lib/PhpParser/ParserFactory.php @@ -2,6 +2,8 @@ namespace PhpParser; +use PhpParser\Parser\Php7; + class ParserFactory { const PREFER_PHP7 = 1; @@ -15,8 +17,10 @@ class ParserFactory * @param array $parserOptions Parser options. See ParserAbstract::__construct() argument * * @return Parser The parser instance + * + * @deprecated Use createForVersion(), createForNewestSupportedVersion() or createForHostVersion() instead. */ - public function create(int $kind, Lexer $lexer = null, array $parserOptions = []) : Parser { + public function create(int $kind, Lexer $lexer = null, array $parserOptions = []): Parser { if (null === $lexer) { $lexer = new Lexer\Emulative(); } @@ -30,4 +34,50 @@ public function create(int $kind, Lexer $lexer = null, array $parserOptions = [] ); } } + + /** + * Create a parser targeting the given version on a best-effort basis. The parser will generally + * accept code for the newest supported version, but will try to accommodate code that becomes + * invalid in newer versions or changes in interpretation. + */ + public function createForVersion(string $version, array $lexerOptions = [], array $parserOptions = []): Parser { + if ($version === $this->getHostVersion()) { + $lexer = new Lexer($lexerOptions); + } else { + $lexer = new Lexer\Emulative($lexerOptions + ['phpVersion' => $version]); + } + return new Php7($lexer, $parserOptions + ['phpVersion' => $version]); + } + + /** + * Create a parser targeting the newest version supported by this library. Code for older + * versions will be accepted if there have been no relevant backwards-compatibility breaks in + * PHP. + */ + public function createForNewestSupportedVersion(array $lexerOptions = [], array $parserOptions = []): Parser { + return $this->createForVersion($this->getNewestSupportedVersion(), $lexerOptions, $parserOptions); + } + + /** + * Create a parser targeting the host PHP version, that is the PHP version we're currently + * running on. This parser will not use any token emulation. + */ + public function createForHostVersion(array $lexerOptions = [], array $parserOptions = []): Parser { + return $this->createForVersion($this->getHostVersion(), $lexerOptions, $parserOptions); + } + + /** + * Get the newest PHP version supported by this library. Support for this version may be partial, + * if it is still under development. + */ + public function getNewestSupportedVersion(): string { + return '8.2'; + } + + /** + * Get the host PHP version, that is the PHP version we're currently running on. + */ + public function getHostVersion(): string { + return \PHP_MAJOR_VERSION . '.' . \PHP_MINOR_VERSION; + } } diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php index abe5b7f660..63effd9807 100644 --- a/test/PhpParser/CodeParsingTest.php +++ b/test/PhpParser/CodeParsingTest.php @@ -38,15 +38,15 @@ private function parseModeLine(string $modeLine): array { } public function createParser(?string $version): Parser { - $lexer = new Lexer\Emulative(['usedAttributes' => [ - 'startLine', 'endLine', - 'startFilePos', 'endFilePos', - 'startTokenPos', 'endTokenPos', - 'comments' - ]]); - return new Parser\Php7($lexer, [ - 'phpVersion' => $version, - ]); + $factory = new ParserFactory(); + return $factory->createForVersion( + $version ?? $factory->getNewestSupportedVersion(), + ['usedAttributes' => [ + 'startLine', 'endLine', + 'startFilePos', 'endFilePos', + 'startTokenPos', 'endTokenPos', + 'comments' + ]]); } // Must be public for updateTests.php diff --git a/test/code/parser/stmt/class/readonlyAsClassName.test b/test/code/parser/stmt/class/readonlyAsClassName.test new file mode 100644 index 0000000000..7d3010dd48 --- /dev/null +++ b/test/code/parser/stmt/class/readonlyAsClassName.test @@ -0,0 +1,28 @@ +Readonly as class name +----- + Date: Sun, 12 Jun 2022 21:14:22 +0200 Subject: [PATCH 084/428] Remove deprecated param builder method --- UPGRADE-5.0.md | 13 ++++++++++++- lib/PhpParser/Builder/Param.php | 13 ------------- test/PhpParser/Builder/ParamTest.php | 2 +- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 004bceedc3..d4698c3325 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -7,7 +7,7 @@ PHP-Parser now requires PHP 7.1 or newer to run. It is however still possible to ### PHP 5 parsing support -The dedicated parser for PHP 5 has been removed (including the `ONLY_PHP5` and `PREFER_PHP5` ParserFactory options). The PHP 7 parser now supports a `phpVersion` option, which can be used to improve compatibility with older PHP versions. +The dedicated parser for PHP 5 has been removed. The PHP 7 parser now supports a `phpVersion` option, which can be used to improve compatibility with older PHP versions. In particular, if an older `phpVersion` is specified, then: @@ -22,6 +22,13 @@ However, some aspects of PHP 5 parsing are no longer supported: * Declarations of the form `global $$var[0]` are not supported in PHP 7 and will cause a parse error. In error recovery mode, it is possible to continue parsing after such declarations. * The PHP 7 parser will accept many constructs that are not valid in PHP 5. However, this was also true of the dedicated PHP 5 parser. +The following symbols are affected by this removal: + + * The `PhpParser\Parser\Php5` class has been removed. + * The `PhpParser\Parser\Multiple` class has been removed. While not strictly related to PHP 5 support, this functionality is no longer useful without it. + * The `PhpParser\ParserFactory::ONLY_PHP5` and `PREFER_PHP5` options have been removed. + * The `PhpParser\ParserFactory::PREFER_PHP7` option is now equivalent to `ONLY_PHP7`. + ### Changes to the parser factory The `ParserFactory::create()` method is deprecated in favor of three new methods that provide more fine-grained control over the PHP version being targeted: @@ -111,3 +118,7 @@ class Token { The `Lexer::getTokens()` method will now return an array of `Token`s, rather than an array of arrays and strings. Additionally, the token array is now terminated by a sentinel token with ID 0. + +### Other removed functionality + + * The deprecated `Builder\Param::setTypeHint()` method has been removed in favor of `Builder\Param::setType()`. diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index de9aae7e5e..793fc93337 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -60,19 +60,6 @@ public function setType($type) { return $this; } - /** - * Sets type for the parameter. - * - * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type - * - * @return $this The builder instance (for fluid interface) - * - * @deprecated Use setType() instead - */ - public function setTypeHint($type) { - return $this->setType($type); - } - /** * Make the parameter accept the value by reference. * diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index 9fe8160785..3f83023df3 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -91,7 +91,7 @@ public function provideTestDefaultValues() { */ public function testTypes($typeHint, $expectedType) { $node = $this->createParamBuilder('test') - ->setTypeHint($typeHint) + ->setType($typeHint) ->getNode() ; $type = $node->type; From 23be1f9bd17885efe914c4592ef4d599c8966113 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 12 Jun 2022 21:18:11 +0200 Subject: [PATCH 085/428] Update doc references --- README.md | 5 ++++- UPGRADE-5.0.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 708cdfcbd7..e1426da3cb 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ PHP Parser This is a PHP 5.2 to PHP 8.1 parser written in PHP. Its purpose is to simplify static code analysis and manipulation. -[**Documentation for version 4.x**][doc_master] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.1). +[Documentation for version 5.x][doc_master] (in development; for running on PHP >= 7.1; for parsing PHP 7.0 to PHP 8.2, with limited support for parsing PHP 5.x). + +[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.1). [Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2). @@ -222,4 +224,5 @@ Component documentation: * Parent and sibling references [doc_3_x]: https://github.com/nikic/PHP-Parser/tree/3.x/doc + [doc_4_x]: https://github.com/nikic/PHP-Parser/tree/4.x/doc [doc_master]: https://github.com/nikic/PHP-Parser/tree/master/doc diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index d4698c3325..086b25b67e 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -41,7 +41,7 @@ In all cases, the PHP version is a fairly weak hint that is only used on a best- For example, if you specify version `"8.0"`, then `class ReadOnly {}` is treated as a valid class declaration, while using `public readonly int $prop` will lead to a parse error. However, `final public const X = Y;` will be accepted in both cases. -``` +```php use PhpParser\ParserFactory; $factory = new ParserFactory; From b0469d127e2c1bd3645fbc757ef5e10a5f920c29 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 12 Jun 2022 21:55:56 +0200 Subject: [PATCH 086/428] Rename Expr\ClosureUse -> ClosureUse This is not a real expression, treat it similarly to Node\Arg or Node\Param. The old name is retained as an alias for compatibility. --- UPGRADE-5.0.md | 8 ++++ lib/PhpParser/Node/ClosureUse.php | 37 +++++++++++++++++++ lib/PhpParser/Node/Expr/Closure.php | 1 + lib/PhpParser/Node/Expr/ClosureUse.php | 33 +---------------- lib/PhpParser/Parser/Php7.php | 2 +- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- test/PhpParser/CompatibilityTest.php | 18 +++++++++ test/code/parser/expr/closure.test | 8 ++-- .../expr/closure_use_trailing_comma.test | 2 +- test/code/parser/expr/uvs/indirectCall.test | 2 +- 10 files changed, 73 insertions(+), 40 deletions(-) create mode 100644 lib/PhpParser/Node/ClosureUse.php create mode 100644 test/PhpParser/CompatibilityTest.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 086b25b67e..0c03d7d4ce 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -59,6 +59,14 @@ $parser = $factory->create(ParserFactory::ONLY_PHP5); $parser = $factory->createForVersion("5.6"); ``` +### Renamed nodes + +A number of AST nodes have been renamed or moved in the AST hierarchy: + + * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. The `ClosureUse` node can only occur inside closure use lists, not as a general expression. + +The old class names have been retained as aliases for backwards compatibility. However, the `Node::getType()` method will now always return the new name (e.g. `ClosureUse` instead of `Expr_ClosureUse`). + ### Changes to the default pretty printer A number of changes to the standard pretty printer have been made, to make it match contemporary coding style conventions (and in particular PSR-12). Options to restore the previous behavior are not provided, but it is possible to override the formatting methods (such as `pStmt_ClassMethod`) with your preferred formatting. diff --git a/lib/PhpParser/Node/ClosureUse.php b/lib/PhpParser/Node/ClosureUse.php new file mode 100644 index 0000000000..cd4dede33a --- /dev/null +++ b/lib/PhpParser/Node/ClosureUse.php @@ -0,0 +1,37 @@ +attributes = $attributes; + $this->var = $var; + $this->byRef = $byRef; + } + + public function getSubNodeNames() : array { + return ['var', 'byRef']; + } + + public function getType() : string { + return 'ClosureUse'; + } +} + +// @deprecated compatibility alias +class_alias(ClosureUse::class, Expr\ClosureUse::class); \ No newline at end of file diff --git a/lib/PhpParser/Node/Expr/Closure.php b/lib/PhpParser/Node/Expr/Closure.php index 56ddea6aa5..548d760816 100644 --- a/lib/PhpParser/Node/Expr/Closure.php +++ b/lib/PhpParser/Node/Expr/Closure.php @@ -3,6 +3,7 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; +use PhpParser\Node\ClosureUse; use PhpParser\Node\Expr; use PhpParser\Node\FunctionLike; diff --git a/lib/PhpParser/Node/Expr/ClosureUse.php b/lib/PhpParser/Node/Expr/ClosureUse.php index 2b8a096666..d30a615589 100644 --- a/lib/PhpParser/Node/Expr/ClosureUse.php +++ b/lib/PhpParser/Node/Expr/ClosureUse.php @@ -1,34 +1,3 @@ attributes = $attributes; - $this->var = $var; - $this->byRef = $byRef; - } - - public function getSubNodeNames() : array { - return ['var', 'byRef']; - } - - public function getType() : string { - return 'Expr_ClosureUse'; - } -} +require __DIR__ . '/../ClosureUse.php'; \ No newline at end of file diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index ce82af21af..8e7935bf64 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2465,7 +2465,7 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 480 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 481 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 6045d66592..1c74107270 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -649,7 +649,7 @@ protected function pExpr_ArrowFunction(Expr\ArrowFunction $node) { . $this->p($node->expr); } - protected function pExpr_ClosureUse(Expr\ClosureUse $node) { + protected function pClosureUse(Node\ClosureUse $node) { return ($node->byRef ? '&' : '') . $this->p($node->var); } diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php new file mode 100644 index 0000000000..4ab7c803f5 --- /dev/null +++ b/test/PhpParser/CompatibilityTest.php @@ -0,0 +1,18 @@ +assertTrue($node instanceof Expr\ClosureUse); + } + + public function testAliases2() { + $node = new Node\Expr\ClosureUse(new Expr\Variable('x')); + $this->assertTrue($node instanceof Node\ClosureUse); + } +} diff --git a/test/code/parser/expr/closure.test b/test/code/parser/expr/closure.test index bd02d389fd..e87d6a354a 100644 --- a/test/code/parser/expr/closure.test +++ b/test/code/parser/expr/closure.test @@ -63,7 +63,7 @@ array( ) ) uses: array( - 0: Expr_ClosureUse( + 0: ClosureUse( var: Expr_Variable( name: b ) @@ -84,13 +84,13 @@ array( params: array( ) uses: array( - 0: Expr_ClosureUse( + 0: ClosureUse( var: Expr_Variable( name: a ) byRef: false ) - 1: Expr_ClosureUse( + 1: ClosureUse( var: Expr_Variable( name: b ) @@ -182,7 +182,7 @@ array( params: array( ) uses: array( - 0: Expr_ClosureUse( + 0: ClosureUse( var: Expr_Variable( name: a ) diff --git a/test/code/parser/expr/closure_use_trailing_comma.test b/test/code/parser/expr/closure_use_trailing_comma.test index 30d4610915..a7fd0e12a9 100644 --- a/test/code/parser/expr/closure_use_trailing_comma.test +++ b/test/code/parser/expr/closure_use_trailing_comma.test @@ -13,7 +13,7 @@ array( params: array( ) uses: array( - 0: Expr_ClosureUse( + 0: ClosureUse( var: Expr_Variable( name: a ) diff --git a/test/code/parser/expr/uvs/indirectCall.test b/test/code/parser/expr/uvs/indirectCall.test index a940c2be36..bb4e3e85e9 100644 --- a/test/code/parser/expr/uvs/indirectCall.test +++ b/test/code/parser/expr/uvs/indirectCall.test @@ -302,7 +302,7 @@ array( ) ) uses: array( - 0: Expr_ClosureUse( + 0: ClosureUse( var: Expr_Variable( name: f ) From e3ff8cf035a45d5d7a67520cbedbef280b4d1437 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 19 Jun 2022 11:06:39 +0200 Subject: [PATCH 087/428] Add support for true type The null/false types were alread accepted previously, even though they are only legal as standalone types since PHP 8.2. --- lib/PhpParser/ParserAbstract.php | 1 + .../stmt/function/nullFalseTrueTypes.test | 113 ++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 test/code/parser/stmt/function/nullFalseTrueTypes.test diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index d967d0355b..470095d870 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -621,6 +621,7 @@ protected function handleBuiltinTypes(Name $name) { 'false' => 80000, 'mixed' => 80000, 'never' => 80100, + 'true' => 80200, ]; if (!$name->isUnqualified()) { diff --git a/test/code/parser/stmt/function/nullFalseTrueTypes.test b/test/code/parser/stmt/function/nullFalseTrueTypes.test new file mode 100644 index 0000000000..45e18ec64e --- /dev/null +++ b/test/code/parser/stmt/function/nullFalseTrueTypes.test @@ -0,0 +1,113 @@ +standalone null, false and true types +----- + Date: Sun, 19 Jun 2022 11:10:43 +0200 Subject: [PATCH 088/428] Handle true/false/null types in builder APIs --- lib/PhpParser/BuilderHelpers.php | 15 ++++++++++++++- test/PhpParser/BuilderHelpersTest.php | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index b8839db322..af6ceb9968 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -178,7 +178,20 @@ public static function normalizeType($type) { } $builtinTypes = [ - 'array', 'callable', 'string', 'int', 'float', 'bool', 'iterable', 'void', 'object', 'mixed', 'never', + 'array', + 'callable', + 'bool', + 'int', + 'float', + 'string', + 'iterable', + 'void', + 'object', + 'null', + 'false', + 'mixed', + 'never', + 'true', ]; $lowerType = strtolower($type); diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index 94d2d3abea..531da05c34 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -125,8 +125,11 @@ public function testNormalizeType() { $this->assertEquals(new Node\Identifier('iterable'), BuilderHelpers::normalizeType('iterable')); $this->assertEquals(new Node\Identifier('void'), BuilderHelpers::normalizeType('void')); $this->assertEquals(new Node\Identifier('object'), BuilderHelpers::normalizeType('object')); + $this->assertEquals(new Node\Identifier('null'), BuilderHelpers::normalizeType('null')); + $this->assertEquals(new Node\Identifier('false'), BuilderHelpers::normalizeType('false')); $this->assertEquals(new Node\Identifier('mixed'), BuilderHelpers::normalizeType('mixed')); $this->assertEquals(new Node\Identifier('never'), BuilderHelpers::normalizeType('never')); + $this->assertEquals(new Node\Identifier('true'), BuilderHelpers::normalizeType('true')); $intIdentifier = new Node\Identifier('int'); $this->assertSame($intIdentifier, BuilderHelpers::normalizeType($intIdentifier)); From 6e0eec807e85d7fe23ae8755d7f845166ba2f54b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 19 Jun 2022 17:29:24 +0200 Subject: [PATCH 089/428] Move definition of compatibility tokens into separate file --- lib/PhpParser/Lexer.php | 64 +------------------------- lib/PhpParser/compatibility_tokens.php | 60 ++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 62 deletions(-) create mode 100644 lib/PhpParser/compatibility_tokens.php diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 3891483054..35840eb06f 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -2,9 +2,10 @@ namespace PhpParser; -use PhpParser\Internal\TokenPolyfill; use PhpParser\Parser\Tokens; +require __DIR__ . '/compatibility_tokens.php'; + class Lexer { /** @var string Code being tokenized */ @@ -37,7 +38,6 @@ class Lexer */ public function __construct(array $options = []) { // Create Map from internal tokens to PhpParser tokens. - $this->defineCompatibilityTokens(); $this->tokenMap = $this->createTokenMap(); // map of tokens to drop while lexing (the map is only used for isset lookup, @@ -273,66 +273,6 @@ public function handleHaltCompiler(): string { return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; } - private function defineCompatibilityTokens(): void { - static $compatTokensDefined = false; - if ($compatTokensDefined) { - return; - } - - $compatTokens = [ - // PHP 7.4 - 'T_BAD_CHARACTER', - 'T_FN', - 'T_COALESCE_EQUAL', - // PHP 8.0 - 'T_NAME_QUALIFIED', - 'T_NAME_FULLY_QUALIFIED', - 'T_NAME_RELATIVE', - 'T_MATCH', - 'T_NULLSAFE_OBJECT_OPERATOR', - 'T_ATTRIBUTE', - // PHP 8.1 - 'T_ENUM', - 'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', - 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', - 'T_READONLY', - ]; - - // PHP-Parser might be used together with another library that also emulates some or all - // of these tokens. Perform a sanity-check that all already defined tokens have been - // assigned a unique ID. - $usedTokenIds = []; - foreach ($compatTokens as $token) { - if (\defined($token)) { - $tokenId = \constant($token); - $clashingToken = $usedTokenIds[$tokenId] ?? null; - if ($clashingToken !== null) { - throw new \Error(sprintf( - 'Token %s has same ID as token %s, ' . - 'you may be using a library with broken token emulation', - $token, $clashingToken - )); - } - $usedTokenIds[$tokenId] = $token; - } - } - - // Now define any tokens that have not yet been emulated. Try to assign IDs from -1 - // downwards, but skip any IDs that may already be in use. - $newTokenId = -1; - foreach ($compatTokens as $token) { - if (!\defined($token)) { - while (isset($usedTokenIds[$newTokenId])) { - $newTokenId--; - } - \define($token, $newTokenId); - $newTokenId--; - } - } - - $compatTokensDefined = true; - } - /** * Creates the token map. * diff --git a/lib/PhpParser/compatibility_tokens.php b/lib/PhpParser/compatibility_tokens.php new file mode 100644 index 0000000000..2b2249be36 --- /dev/null +++ b/lib/PhpParser/compatibility_tokens.php @@ -0,0 +1,60 @@ + Date: Sun, 19 Jun 2022 18:05:52 +0200 Subject: [PATCH 090/428] Move token mapping from lexer to parser This allows a different token mapping per parser. --- lib/PhpParser/Lexer.php | 55 +----- lib/PhpParser/ParserAbstract.php | 76 +++++++- test/PhpParser/Lexer/EmulativeTest.php | 235 +++++++++++++------------ test/PhpParser/LexerTest.php | 46 ++--- 4 files changed, 211 insertions(+), 201 deletions(-) diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 35840eb06f..d885bd9f2c 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -37,9 +37,6 @@ class Lexer * first three. For more info see getNextToken() docs. */ public function __construct(array $options = []) { - // Create 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( @@ -238,7 +235,7 @@ public function getNextToken(&$value = null, &$startAttributes = null, &$endAttr $endAttributes['endFilePos'] = ($nextToken ? $nextToken->pos : $token->getEndPos()) - 1; } - return $this->tokenMap[$id]; + return $id; } } @@ -272,54 +269,4 @@ public function handleHaltCompiler(): string { // Return text after __halt_compiler. return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; } - - /** - * 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(): array { - $tokenMap = []; - - for ($i = 0; $i < 1000; ++$i) { - if ($i < 256) { - // Single-char tokens use an identity mapping. - $tokenMap[$i] = $i; - } else 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 (defined($name = Tokens::class . '::' . $name)) { - // Other tokens can be mapped directly - $tokenMap[$i] = constant($name); - } - } - } - - // Assign tokens for which we define compatibility constants, as token_name() does not know them. - $tokenMap[\T_FN] = Tokens::T_FN; - $tokenMap[\T_COALESCE_EQUAL] = Tokens::T_COALESCE_EQUAL; - $tokenMap[\T_NAME_QUALIFIED] = Tokens::T_NAME_QUALIFIED; - $tokenMap[\T_NAME_FULLY_QUALIFIED] = Tokens::T_NAME_FULLY_QUALIFIED; - $tokenMap[\T_NAME_RELATIVE] = Tokens::T_NAME_RELATIVE; - $tokenMap[\T_MATCH] = Tokens::T_MATCH; - $tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = Tokens::T_NULLSAFE_OBJECT_OPERATOR; - $tokenMap[\T_ATTRIBUTE] = Tokens::T_ATTRIBUTE; - $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_ENUM] = Tokens::T_ENUM; - $tokenMap[\T_READONLY] = Tokens::T_READONLY; - - return $tokenMap; - } } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 470095d870..42d99fbfb6 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -23,6 +23,7 @@ use PhpParser\Node\Stmt\TryCatch; use PhpParser\Node\Stmt\UseUse; use PhpParser\Node\VarLikeIdentifier; +use PhpParser\Parser\Tokens; abstract class ParserAbstract implements Parser { @@ -57,7 +58,9 @@ abstract class ParserAbstract implements Parser /** @var int Number of non-leaf states */ protected $numNonLeafStates; - /** @var int[] Map of lexer tokens to internal symbols */ + /** @var int[] Map of PHP token IDs to internal symbols */ + protected $phpTokenToSymbol; + /** @var int[] Map of external symbols (Tokens::T_*) to internal symbols */ protected $tokenToSymbol; /** @var string[] Map of symbols to their names */ protected $symbolToName; @@ -141,6 +144,7 @@ public function __construct(Lexer $lexer, array $options = []) { $this->phpVersion = $phpVersion ? $this->parseVersion($phpVersion) : 80200; $this->initReduceCallbacks(); + $this->phpTokenToSymbol = $this->createTokenMap(); } private function parseVersion(string $version): int { @@ -220,17 +224,14 @@ protected function doParse() { // 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) { + // Map the lexer token id to the internally used symbols. + if (!isset($this->phpTokenToSymbol[$tokenId])) { throw new \RangeException(sprintf( 'The lexer returned an invalid token (id=%d, value=%s)', $tokenId, $tokenValue )); } + $symbol = $this->phpTokenToSymbol[$tokenId]; // Allow productions to access the start attributes of the lookahead token. $this->lookaheadStartAttributes = $startAttributes; @@ -994,4 +995,65 @@ protected function checkUseUse(UseUse $node, $namePos) { )); } } + + /** + * 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(): array { + $tokenMap = []; + + for ($i = 0; $i < 1000; ++$i) { + if ($i < 256) { + // Single-char tokens use an identity mapping. + $tokenMap[$i] = $i; + } else 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 (defined($name = Tokens::class . '::' . $name)) { + // Other tokens can be mapped directly + $tokenMap[$i] = constant($name); + } + } + } + + // Assign tokens for which we define compatibility constants, as token_name() does not know them. + $tokenMap[\T_FN] = Tokens::T_FN; + $tokenMap[\T_COALESCE_EQUAL] = Tokens::T_COALESCE_EQUAL; + $tokenMap[\T_NAME_QUALIFIED] = Tokens::T_NAME_QUALIFIED; + $tokenMap[\T_NAME_FULLY_QUALIFIED] = Tokens::T_NAME_FULLY_QUALIFIED; + $tokenMap[\T_NAME_RELATIVE] = Tokens::T_NAME_RELATIVE; + $tokenMap[\T_MATCH] = Tokens::T_MATCH; + $tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = Tokens::T_NULLSAFE_OBJECT_OPERATOR; + $tokenMap[\T_ATTRIBUTE] = Tokens::T_ATTRIBUTE; + $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; + $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; + $tokenMap[\T_ENUM] = Tokens::T_ENUM; + $tokenMap[\T_READONLY] = Tokens::T_READONLY; + + // We have create a map from PHP token IDs to external symbol IDs. + // Now map them to the internal symbol ID. + $fullTokenMap = []; + foreach ($tokenMap as $phpToken => $extSymbol) { + $intSymbol = $this->tokenToSymbol[$extSymbol]; + if ($intSymbol === $this->invalidSymbol) { + continue; + } + $fullTokenMap[$phpToken] = $intSymbol; + } + + return $fullTokenMap; + } } diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index 384061402e..2f8d221258 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -5,7 +5,8 @@ use PhpParser\ErrorHandler; use PhpParser\Lexer; use PhpParser\LexerTest; -use PhpParser\Parser\Tokens; + +require __DIR__ . '/../../../lib/PhpParser/compatibility_tokens.php'; class EmulativeTest extends LexerTest { @@ -42,8 +43,8 @@ public function testNoReplaceKeywordsAfterObjectOperator(string $keyword) { $lexer = $this->getLexer(); $lexer->startLexing('' . $keyword); - $this->assertSame(Tokens::T_OBJECT_OPERATOR, $lexer->getNextToken()); - $this->assertSame(Tokens::T_STRING, $lexer->getNextToken()); + $this->assertSame(\T_OBJECT_OPERATOR, $lexer->getNextToken()); + $this->assertSame(\T_STRING, $lexer->getNextToken()); $this->assertSame(0, $lexer->getNextToken()); } @@ -54,8 +55,8 @@ public function testNoReplaceKeywordsAfterObjectOperatorWithSpaces(string $keywo $lexer = $this->getLexer(); $lexer->startLexing(' ' . $keyword); - $this->assertSame(Tokens::T_OBJECT_OPERATOR, $lexer->getNextToken()); - $this->assertSame(Tokens::T_STRING, $lexer->getNextToken()); + $this->assertSame(\T_OBJECT_OPERATOR, $lexer->getNextToken()); + $this->assertSame(\T_STRING, $lexer->getNextToken()); $this->assertSame(0, $lexer->getNextToken()); } @@ -66,34 +67,34 @@ public function testNoReplaceKeywordsAfterNullsafeObjectOperator(string $keyword $lexer = $this->getLexer(); $lexer->startLexing('' . $keyword); - $this->assertSame(Tokens::T_NULLSAFE_OBJECT_OPERATOR, $lexer->getNextToken()); - $this->assertSame(Tokens::T_STRING, $lexer->getNextToken()); + $this->assertSame(\T_NULLSAFE_OBJECT_OPERATOR, $lexer->getNextToken()); + $this->assertSame(\T_STRING, $lexer->getNextToken()); $this->assertSame(0, $lexer->getNextToken()); } public function provideTestReplaceKeywords() { return [ // PHP 8.0 - ['match', Tokens::T_MATCH], + ['match', \T_MATCH], // PHP 7.4 - ['fn', Tokens::T_FN], + ['fn', \T_FN], // PHP 5.5 - ['finally', Tokens::T_FINALLY], - ['yield', Tokens::T_YIELD], + ['finally', \T_FINALLY], + ['yield', \T_YIELD], // PHP 5.4 - ['callable', Tokens::T_CALLABLE], - ['insteadof', Tokens::T_INSTEADOF], - ['trait', Tokens::T_TRAIT], - ['__TRAIT__', Tokens::T_TRAIT_C], + ['callable', \T_CALLABLE], + ['insteadof', \T_INSTEADOF], + ['trait', \T_TRAIT], + ['__TRAIT__', \T_TRAIT_C], // PHP 5.3 - ['__DIR__', Tokens::T_DIR], - ['goto', Tokens::T_GOTO], - ['namespace', Tokens::T_NAMESPACE], - ['__NAMESPACE__', Tokens::T_NS_C], + ['__DIR__', \T_DIR], + ['goto', \T_GOTO], + ['namespace', \T_NAMESPACE], + ['__NAMESPACE__', \T_NS_C], ]; } @@ -123,7 +124,7 @@ public function testLeaveStuffAloneInStrings($code) { $lexer = $this->getLexer(); $lexer->startLexing('assertSame(Tokens::T_CONSTANT_ENCAPSED_STRING, $lexer->getNextToken($text)); + $this->assertSame(\T_CONSTANT_ENCAPSED_STRING, $lexer->getNextToken($text)); $this->assertSame($stringifiedToken, $text); $this->assertSame(0, $lexer->getNextToken()); } @@ -154,218 +155,218 @@ public function testErrorAfterEmulation($code) { public function provideTestLexNewFeatures() { return [ ['yield from', [ - [Tokens::T_YIELD_FROM, 'yield from'], + [\T_YIELD_FROM, 'yield from'], ]], ["yield\r\nfrom", [ - [Tokens::T_YIELD_FROM, "yield\r\nfrom"], + [\T_YIELD_FROM, "yield\r\nfrom"], ]], ['...', [ - [Tokens::T_ELLIPSIS, '...'], + [\T_ELLIPSIS, '...'], ]], ['**', [ - [Tokens::T_POW, '**'], + [\T_POW, '**'], ]], ['**=', [ - [Tokens::T_POW_EQUAL, '**='], + [\T_POW_EQUAL, '**='], ]], ['??', [ - [Tokens::T_COALESCE, '??'], + [\T_COALESCE, '??'], ]], ['<=>', [ - [Tokens::T_SPACESHIP, '<=>'], + [\T_SPACESHIP, '<=>'], ]], ['0b1010110', [ - [Tokens::T_LNUMBER, '0b1010110'], + [\T_LNUMBER, '0b1010110'], ]], ['0b1011010101001010110101010010101011010101010101101011001110111100', [ - [Tokens::T_DNUMBER, '0b1011010101001010110101010010101011010101010101101011001110111100'], + [\T_DNUMBER, '0b1011010101001010110101010010101011010101010101101011001110111100'], ]], ['\\', [ - [Tokens::T_NS_SEPARATOR, '\\'], + [\T_NS_SEPARATOR, '\\'], ]], ["<<<'NOWDOC'\nNOWDOC;\n", [ - [Tokens::T_START_HEREDOC, "<<<'NOWDOC'\n"], - [Tokens::T_END_HEREDOC, 'NOWDOC'], + [\T_START_HEREDOC, "<<<'NOWDOC'\n"], + [\T_END_HEREDOC, 'NOWDOC'], [ord(';'), ';'], ]], ["<<<'NOWDOC'\nFoobar\nNOWDOC;\n", [ - [Tokens::T_START_HEREDOC, "<<<'NOWDOC'\n"], - [Tokens::T_ENCAPSED_AND_WHITESPACE, "Foobar\n"], - [Tokens::T_END_HEREDOC, 'NOWDOC'], + [\T_START_HEREDOC, "<<<'NOWDOC'\n"], + [\T_ENCAPSED_AND_WHITESPACE, "Foobar\n"], + [\T_END_HEREDOC, 'NOWDOC'], [ord(';'), ';'], ]], // PHP 7.3: Flexible heredoc/nowdoc ["<<', [ - [Tokens::T_NULLSAFE_OBJECT_OPERATOR, '?->'], + [\T_NULLSAFE_OBJECT_OPERATOR, '?->'], ]], ['#[Attr]', [ - [Tokens::T_ATTRIBUTE, '#['], - [Tokens::T_STRING, 'Attr'], + [\T_ATTRIBUTE, '#['], + [\T_STRING, 'Attr'], [ord(']'), ']'], ]], ["#[\nAttr\n]", [ - [Tokens::T_ATTRIBUTE, '#['], - [Tokens::T_STRING, 'Attr'], + [\T_ATTRIBUTE, '#['], + [\T_STRING, 'Attr'], [ord(']'), ']'], ]], // Test interaction of two patch-based emulators ["<<bar"', [ [ord('"'), '"'], - [Tokens::T_VARIABLE, '$foo'], - [Tokens::T_NULLSAFE_OBJECT_OPERATOR, '?->'], - [Tokens::T_STRING, 'bar'], + [\T_VARIABLE, '$foo'], + [\T_NULLSAFE_OBJECT_OPERATOR, '?->'], + [\T_STRING, 'bar'], [ord('"'), '"'], ]], ['8.0', '"$foo?->bar baz"', [ [ord('"'), '"'], - [Tokens::T_VARIABLE, '$foo'], - [Tokens::T_NULLSAFE_OBJECT_OPERATOR, '?->'], - [Tokens::T_STRING, 'bar'], - [Tokens::T_ENCAPSED_AND_WHITESPACE, ' baz'], + [\T_VARIABLE, '$foo'], + [\T_NULLSAFE_OBJECT_OPERATOR, '?->'], + [\T_STRING, 'bar'], + [\T_ENCAPSED_AND_WHITESPACE, ' baz'], [ord('"'), '"'], ]], ]; diff --git a/test/PhpParser/LexerTest.php b/test/PhpParser/LexerTest.php index b9b1b5d367..529a6eac8f 100644 --- a/test/PhpParser/LexerTest.php +++ b/test/PhpParser/LexerTest.php @@ -2,7 +2,7 @@ namespace PhpParser; -use PhpParser\Parser\Tokens; +require __DIR__ . '/../../lib/PhpParser/compatibility_tokens.php'; class LexerTest extends \PHPUnit\Framework\TestCase { @@ -72,15 +72,15 @@ public function provideTestLex() { [], [ [ - Tokens::T_STRING, 'tokens', + \T_STRING, 'tokens', ['startLine' => 1], ['endLine' => 1] ], [ - ord(';'), '?>', + \T_CLOSE_TAG, '?>', ['startLine' => 1], ['endLine' => 1] ], [ - Tokens::T_INLINE_HTML, 'plaintext', + \T_INLINE_HTML, 'plaintext', ['startLine' => 1, 'hasLeadingNewline' => false], ['endLine' => 1] ], @@ -96,7 +96,7 @@ public function provideTestLex() { ['startLine' => 2], ['endLine' => 2] ], [ - Tokens::T_STRING, 'token', + \T_STRING, 'token', ['startLine' => 2], ['endLine' => 2] ], [ @@ -119,7 +119,7 @@ public function provideTestLex() { [], [ [ - Tokens::T_STRING, 'token', + \T_STRING, 'token', [ 'startLine' => 2, 'comments' => [ @@ -143,7 +143,7 @@ public function provideTestLex() { [], [ [ - Tokens::T_CONSTANT_ENCAPSED_STRING, '"foo' . "\n" . 'bar"', + \T_CONSTANT_ENCAPSED_STRING, '"foo' . "\n" . 'bar"', ['startLine' => 1], ['endLine' => 2] ], ] @@ -154,7 +154,7 @@ public function provideTestLex() { ['usedAttributes' => ['startFilePos', 'endFilePos']], [ [ - Tokens::T_CONSTANT_ENCAPSED_STRING, '"a"', + \T_CONSTANT_ENCAPSED_STRING, '"a"', ['startFilePos' => 6], ['endFilePos' => 8] ], [ @@ -162,7 +162,7 @@ public function provideTestLex() { ['startFilePos' => 9], ['endFilePos' => 9] ], [ - Tokens::T_CONSTANT_ENCAPSED_STRING, '"b"', + \T_CONSTANT_ENCAPSED_STRING, '"b"', ['startFilePos' => 18], ['endFilePos' => 20] ], [ @@ -177,7 +177,7 @@ public function provideTestLex() { ['usedAttributes' => ['startTokenPos', 'endTokenPos']], [ [ - Tokens::T_CONSTANT_ENCAPSED_STRING, '"a"', + \T_CONSTANT_ENCAPSED_STRING, '"a"', ['startTokenPos' => 1], ['endTokenPos' => 1] ], [ @@ -185,7 +185,7 @@ public function provideTestLex() { ['startTokenPos' => 2], ['endTokenPos' => 2] ], [ - Tokens::T_CONSTANT_ENCAPSED_STRING, '"b"', + \T_CONSTANT_ENCAPSED_STRING, '"b"', ['startTokenPos' => 6], ['endTokenPos' => 6] ], [ @@ -200,7 +200,7 @@ public function provideTestLex() { ['usedAttributes' => []], [ [ - Tokens::T_VARIABLE, '$bar', + \T_VARIABLE, '$bar', [], [] ], [ @@ -220,11 +220,11 @@ public function provideTestLex() { ' []], [ - [Tokens::T_NAME_QUALIFIED, 'Foo\Bar', [], []], - [Tokens::T_NAME_FULLY_QUALIFIED, '\Foo\Bar', [], []], - [Tokens::T_NAME_RELATIVE, 'namespace\Foo\Bar', [], []], - [Tokens::T_NAME_QUALIFIED, 'Foo\Bar', [], []], - [Tokens::T_NS_SEPARATOR, '\\', [], []], + [\T_NAME_QUALIFIED, 'Foo\Bar', [], []], + [\T_NAME_FULLY_QUALIFIED, '\Foo\Bar', [], []], + [\T_NAME_RELATIVE, 'namespace\Foo\Bar', [], []], + [\T_NAME_QUALIFIED, 'Foo\Bar', [], []], + [\T_NS_SEPARATOR, '\\', [], []], ] ], // tests PHP 8 T_NAME_* emulation with reserved keywords @@ -232,11 +232,11 @@ public function provideTestLex() { ' []], [ - [Tokens::T_NAME_QUALIFIED, 'fn\use', [], []], - [Tokens::T_NAME_FULLY_QUALIFIED, '\fn\use', [], []], - [Tokens::T_NAME_RELATIVE, 'namespace\fn\use', [], []], - [Tokens::T_NAME_QUALIFIED, 'fn\use', [], []], - [Tokens::T_NS_SEPARATOR, '\\', [], []], + [\T_NAME_QUALIFIED, 'fn\use', [], []], + [\T_NAME_FULLY_QUALIFIED, '\fn\use', [], []], + [\T_NAME_RELATIVE, 'namespace\fn\use', [], []], + [\T_NAME_QUALIFIED, 'fn\use', [], []], + [\T_NS_SEPARATOR, '\\', [], []], ] ], ]; @@ -249,7 +249,7 @@ public function testHandleHaltCompiler($code, $remaining) { $lexer = $this->getLexer(); $lexer->startLexing($code); - while (Tokens::T_HALT_COMPILER !== $lexer->getNextToken()); + while (\T_HALT_COMPILER !== $lexer->getNextToken()); $lexer->getNextToken(); $lexer->getNextToken(); $lexer->getNextToken(); From a38a60b7dd6a167565b271fea480ab48ae2e8a13 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 19 Jun 2022 18:12:20 +0200 Subject: [PATCH 091/428] Move Tokens::T_* to Php7::T_* Drop the separate tokens class, move them into the parser. --- grammar/parser.template | 4 + grammar/php7.y | 113 ++++++++++++++++++++++- grammar/rebuildParsers.php | 10 --- grammar/tokens.template | 17 ---- grammar/tokens.y | 115 ------------------------ lib/PhpParser/Parser/Php7.php | 143 ++++++++++++++++++++++++++++- lib/PhpParser/Parser/Tokens.php | 148 ------------------------------- lib/PhpParser/ParserAbstract.php | 32 +++---- 8 files changed, 274 insertions(+), 308 deletions(-) delete mode 100644 grammar/tokens.template delete mode 100644 grammar/tokens.y delete mode 100644 lib/PhpParser/Parser/Tokens.php diff --git a/grammar/parser.template b/grammar/parser.template index 938ab88040..0bdb56d930 100644 --- a/grammar/parser.template +++ b/grammar/parser.template @@ -23,6 +23,10 @@ use PhpParser\Node\Stmt; */ class #(-p) extends \PhpParser\ParserAbstract { +#tokenval + const %s = %n; +#endtokenval + protected $tokenToSymbolMapSize = #(YYMAXLEX); protected $actionTableSize = #(YYLAST); protected $gotoTableSize = #(YYGLAST); diff --git a/grammar/php7.y b/grammar/php7.y index ebac020340..09372ea96b 100644 --- a/grammar/php7.y +++ b/grammar/php7.y @@ -1,7 +1,118 @@ %pure_parser %expect 2 -%tokens +%right T_THROW +%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 T_COALESCE_EQUAL +%left '?' ':' +%right T_COALESCE +%left T_BOOLEAN_OR +%left T_BOOLEAN_AND +%left '|' +%left '^' +%left T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG +%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_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_MATCH +%token T_ENDSWITCH +%token T_CASE +%token T_DEFAULT +%token T_BREAK +%token T_CONTINUE +%token T_GOTO +%token T_FUNCTION +%token T_FN +%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 T_READONLY +%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_ENUM +%token T_EXTENDS +%token T_IMPLEMENTS +%token T_OBJECT_OPERATOR +%token T_NULLSAFE_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_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 +%token T_NAME_FULLY_QUALIFIED +%token T_NAME_QUALIFIED +%token T_NAME_RELATIVE +%token T_ATTRIBUTE +%token T_ENUM %% diff --git a/grammar/rebuildParsers.php b/grammar/rebuildParsers.php index 6493539848..ad04deb8e8 100644 --- a/grammar/rebuildParsers.php +++ b/grammar/rebuildParsers.php @@ -6,13 +6,10 @@ __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'; $kmyacc = getenv('KMYACC'); if (!$kmyacc) { @@ -28,13 +25,10 @@ /// 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 = preprocessGrammar($grammarCode); file_put_contents($tmpGrammarFile, $grammarCode); @@ -51,10 +45,6 @@ file_put_contents("$resultDir/$name.php", $resultCode); unlink($tmpResultFile); - echo "Building token definition.\n"; - $output = execCmd("$kmyacc -m $tokensTemplate $tmpGrammarFile"); - rename($tmpResultFile, $tokensResultsFile); - if (!$optionKeepTmpGrammar) { unlink($tmpGrammarFile); } diff --git a/grammar/tokens.template b/grammar/tokens.template deleted file mode 100644 index ba4e4901c0..0000000000 --- a/grammar/tokens.template +++ /dev/null @@ -1,17 +0,0 @@ -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/grammar/tokens.y b/grammar/tokens.y deleted file mode 100644 index 8f0b217254..0000000000 --- a/grammar/tokens.y +++ /dev/null @@ -1,115 +0,0 @@ -/* 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. */ - -%right T_THROW -%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 T_COALESCE_EQUAL -%left '?' ':' -%right T_COALESCE -%left T_BOOLEAN_OR -%left T_BOOLEAN_AND -%left '|' -%left '^' -%left T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG -%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_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_MATCH -%token T_ENDSWITCH -%token T_CASE -%token T_DEFAULT -%token T_BREAK -%token T_CONTINUE -%token T_GOTO -%token T_FUNCTION -%token T_FN -%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 T_READONLY -%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_ENUM -%token T_EXTENDS -%token T_IMPLEMENTS -%token T_OBJECT_OPERATOR -%token T_NULLSAFE_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_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 -%token T_NAME_FULLY_QUALIFIED -%token T_NAME_QUALIFIED -%token T_NAME_RELATIVE -%token T_ATTRIBUTE -%token T_ENUM diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 8e7935bf64..fb2a94b785 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -17,6 +17,147 @@ */ class Php7 extends \PhpParser\ParserAbstract { + const YYERRTOK = 256; + const T_THROW = 257; + const T_INCLUDE = 258; + const T_INCLUDE_ONCE = 259; + const T_EVAL = 260; + const T_REQUIRE = 261; + const T_REQUIRE_ONCE = 262; + const T_LOGICAL_OR = 263; + const T_LOGICAL_XOR = 264; + const T_LOGICAL_AND = 265; + const T_PRINT = 266; + const T_YIELD = 267; + const T_DOUBLE_ARROW = 268; + const T_YIELD_FROM = 269; + const T_PLUS_EQUAL = 270; + const T_MINUS_EQUAL = 271; + const T_MUL_EQUAL = 272; + const T_DIV_EQUAL = 273; + const T_CONCAT_EQUAL = 274; + const T_MOD_EQUAL = 275; + const T_AND_EQUAL = 276; + const T_OR_EQUAL = 277; + const T_XOR_EQUAL = 278; + const T_SL_EQUAL = 279; + const T_SR_EQUAL = 280; + const T_POW_EQUAL = 281; + const T_COALESCE_EQUAL = 282; + const T_COALESCE = 283; + const T_BOOLEAN_OR = 284; + const T_BOOLEAN_AND = 285; + const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286; + const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287; + const T_IS_EQUAL = 288; + const T_IS_NOT_EQUAL = 289; + const T_IS_IDENTICAL = 290; + const T_IS_NOT_IDENTICAL = 291; + const T_SPACESHIP = 292; + const T_IS_SMALLER_OR_EQUAL = 293; + const T_IS_GREATER_OR_EQUAL = 294; + const T_SL = 295; + const T_SR = 296; + const T_INSTANCEOF = 297; + const T_INC = 298; + const T_DEC = 299; + const T_INT_CAST = 300; + const T_DOUBLE_CAST = 301; + const T_STRING_CAST = 302; + const T_ARRAY_CAST = 303; + const T_OBJECT_CAST = 304; + const T_BOOL_CAST = 305; + const T_UNSET_CAST = 306; + const T_POW = 307; + const T_NEW = 308; + const T_CLONE = 309; + const T_EXIT = 310; + const T_IF = 311; + const T_ELSEIF = 312; + const T_ELSE = 313; + const T_ENDIF = 314; + const T_LNUMBER = 315; + const T_DNUMBER = 316; + const T_STRING = 317; + const T_STRING_VARNAME = 318; + const T_VARIABLE = 319; + const T_NUM_STRING = 320; + const T_INLINE_HTML = 321; + const T_ENCAPSED_AND_WHITESPACE = 322; + const T_CONSTANT_ENCAPSED_STRING = 323; + const T_ECHO = 324; + const T_DO = 325; + const T_WHILE = 326; + const T_ENDWHILE = 327; + const T_FOR = 328; + const T_ENDFOR = 329; + const T_FOREACH = 330; + const T_ENDFOREACH = 331; + const T_DECLARE = 332; + const T_ENDDECLARE = 333; + const T_AS = 334; + const T_SWITCH = 335; + const T_MATCH = 336; + const T_ENDSWITCH = 337; + const T_CASE = 338; + const T_DEFAULT = 339; + const T_BREAK = 340; + const T_CONTINUE = 341; + const T_GOTO = 342; + const T_FUNCTION = 343; + const T_FN = 344; + const T_CONST = 345; + const T_RETURN = 346; + const T_TRY = 347; + const T_CATCH = 348; + const T_FINALLY = 349; + const T_USE = 350; + const T_INSTEADOF = 351; + const T_GLOBAL = 352; + const T_STATIC = 353; + const T_ABSTRACT = 354; + const T_FINAL = 355; + const T_PRIVATE = 356; + const T_PROTECTED = 357; + const T_PUBLIC = 358; + const T_READONLY = 359; + const T_VAR = 360; + const T_UNSET = 361; + const T_ISSET = 362; + const T_EMPTY = 363; + const T_HALT_COMPILER = 364; + const T_CLASS = 365; + const T_TRAIT = 366; + const T_INTERFACE = 367; + const T_ENUM = 368; + const T_EXTENDS = 369; + const T_IMPLEMENTS = 370; + const T_OBJECT_OPERATOR = 371; + const T_NULLSAFE_OBJECT_OPERATOR = 372; + const T_LIST = 373; + const T_ARRAY = 374; + const T_CALLABLE = 375; + const T_CLASS_C = 376; + const T_TRAIT_C = 377; + const T_METHOD_C = 378; + const T_FUNC_C = 379; + const T_LINE = 380; + const T_FILE = 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; + const T_NAME_FULLY_QUALIFIED = 392; + const T_NAME_QUALIFIED = 393; + const T_NAME_RELATIVE = 394; + const T_ATTRIBUTE = 395; + protected $tokenToSymbolMapSize = 396; protected $actionTableSize = 1215; protected $gotoTableSize = 585; @@ -2465,7 +2606,7 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 480 => function ($stackPos) { - $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 481 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); diff --git a/lib/PhpParser/Parser/Tokens.php b/lib/PhpParser/Parser/Tokens.php deleted file mode 100644 index b76a5d94c8..0000000000 --- a/lib/PhpParser/Parser/Tokens.php +++ /dev/null @@ -1,148 +0,0 @@ - Date: Sun, 19 Jun 2022 20:07:17 +0200 Subject: [PATCH 092/428] Add PHP 8 parser with correct concatenation precedence The PHP 7 and PHP 8 parsers use the same grammar file and only differ in token precedence. --- grammar/parser.template | 2 +- grammar/{php7.y => php.y} | 7 + grammar/rebuildParsers.php | 16 +- lib/PhpParser/Parser/Php7.php | 2 +- lib/PhpParser/Parser/Php8.php | 3005 +++++++++++++++++++ lib/PhpParser/ParserFactory.php | 4 + test/PhpParser/Parser/Php8Test.php | 13 + test/code/parser/expr/concatPrecedence.test | 97 + 8 files changed, 3141 insertions(+), 5 deletions(-) rename grammar/{php7.y => php.y} (99%) create mode 100644 lib/PhpParser/Parser/Php8.php create mode 100644 test/PhpParser/Parser/Php8Test.php create mode 100644 test/code/parser/expr/concatPrecedence.test diff --git a/grammar/parser.template b/grammar/parser.template index 0bdb56d930..95e8b7fa69 100644 --- a/grammar/parser.template +++ b/grammar/parser.template @@ -17,7 +17,7 @@ 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 grammar file grammar/php.y * * the skeleton file grammar/parser.template * * the preprocessing script grammar/rebuildParsers.php */ diff --git a/grammar/php7.y b/grammar/php.y similarity index 99% rename from grammar/php7.y rename to grammar/php.y index 09372ea96b..41ca103162 100644 --- a/grammar/php7.y +++ b/grammar/php.y @@ -21,8 +21,15 @@ %left T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG %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 +#if PHP7 %left T_SL T_SR %left '+' '-' '.' +#endif +#if PHP8 +%left '.' +%left T_SL T_SR +%left '+' '-' +#endif %left '*' '/' '%' %right '!' %nonassoc T_INSTANCEOF diff --git a/grammar/rebuildParsers.php b/grammar/rebuildParsers.php index ad04deb8e8..431f2703e0 100644 --- a/grammar/rebuildParsers.php +++ b/grammar/rebuildParsers.php @@ -2,10 +2,12 @@ require __DIR__ . '/phpyLang.php'; -$grammarFileToName = [ - __DIR__ . '/php7.y' => 'Php7', +$parserToDefines = [ + 'Php7' => ['PHP7' => true], + 'Php8' => ['PHP8' => true], ]; +$grammarFile = __DIR__ . '/php.y'; $skeletonFile = __DIR__ . '/parser.template'; $tmpGrammarFile = __DIR__ . '/tmp_parser.phpy'; $tmpResultFile = __DIR__ . '/tmp_parser.php'; @@ -25,10 +27,11 @@ /// Main script /// /////////////////// -foreach ($grammarFileToName as $grammarFile => $name) { +foreach ($parserToDefines as $name => $defines) { echo "Building temporary $name grammar file.\n"; $grammarCode = file_get_contents($grammarFile); + $grammarCode = replaceIfBlocks($grammarCode, $defines); $grammarCode = preprocessGrammar($grammarCode); file_put_contents($tmpGrammarFile, $grammarCode); @@ -68,3 +71,10 @@ function execCmd($cmd) { } return $output; } + +function replaceIfBlocks(string $code, array $defines): string { + return preg_replace_callback('/\n#if\s+(\w+)\n(.*?)\n#endif/s', function ($matches) use ($defines) { + $value = $defines[$matches[1]] ?? false; + return $value ? $matches[2] : ''; + }, $code); +} \ No newline at end of file diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index fb2a94b785..de23a489ed 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -11,7 +11,7 @@ /* 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 grammar file grammar/php.y * * the skeleton file grammar/parser.template * * the preprocessing script grammar/rebuildParsers.php */ diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php new file mode 100644 index 0000000000..8a97ec5e85 --- /dev/null +++ b/lib/PhpParser/Parser/Php8.php @@ -0,0 +1,3005 @@ +'", + "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_MATCH", + "T_ENDSWITCH", + "T_CASE", + "T_DEFAULT", + "T_BREAK", + "T_CONTINUE", + "T_GOTO", + "T_FUNCTION", + "T_FN", + "T_CONST", + "T_RETURN", + "T_TRY", + "T_CATCH", + "T_FINALLY", + "T_USE", + "T_INSTEADOF", + "T_GLOBAL", + "T_STATIC", + "T_ABSTRACT", + "T_FINAL", + "T_PRIVATE", + "T_PROTECTED", + "T_PUBLIC", + "T_READONLY", + "T_VAR", + "T_UNSET", + "T_ISSET", + "T_EMPTY", + "T_HALT_COMPILER", + "T_CLASS", + "T_TRAIT", + "T_INTERFACE", + "T_ENUM", + "T_EXTENDS", + "T_IMPLEMENTS", + "T_OBJECT_OPERATOR", + "T_NULLSAFE_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", + "T_NAME_FULLY_QUALIFIED", + "T_NAME_QUALIFIED", + "T_NAME_RELATIVE", + "T_ATTRIBUTE", + "';'", + "']'", + "'('", + "')'", + "'{'", + "'}'", + "'`'", + "'\"'", + "'$'" + ); + + protected $tokenToSymbol = array( + 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 56, 166, 168, 167, 55, 168, 168, + 161, 162, 53, 51, 8, 52, 48, 54, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 31, 159, + 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 70, 168, 160, 36, 168, 165, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 163, 35, 164, 58, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, + 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, + 41, 42, 43, 45, 47, 49, 50, 57, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 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, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158 + ); + + protected $action = array( + 132, 133, 134, 571, 135, 136, 0, 724, 725, 726, + 137, 37,-32766,-32766,-32766, 996,-32766,-32766,-32766, 924, + 448, 449, 450, 800,-32767,-32767,-32767,-32767, 101, 102, + 103, 1265,-32766,-32766, 811, 718, 717,-32766,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, + -32767, 1205, 2, 1004, 1005, 727,-32766,-32766,-32766, 1074, + 1075, 1076, 1073, 1072, 1071, 1077, 371, 372, -318, 267, + 138, 397, 731, 732, 733, 734, 415,-32766, 421,-32766, + -32766,-32766,-32766,-32766, -193, 735, 736, 737, 738, 739, + 740, 741, 742, 743, 744, 745, 765, 572, 766, 767, + 768, 769, 757, 758, 337, 338, 760, 761, 746, 747, + 748, 750, 751, 752, 347, 792, 793, 794, 795, 796, + 797, 753, 754, 573, 574, 786, 777, 775, 776, 789, + 772, 773, 809, -192, 575, 576, 771, 577, 578, 579, + 580, 581, 582, 913, 1198,-32766,-32766,-32766, 774, 583, + 584, 12, 139, 240, 132, 133, 134, 571, 135, 136, + 1023, 724, 725, 726, 137, 37,-32766, 34,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 128, + 1196,-32766,-32766,-32766, 373, 372,-32766,-32766,-32766, 718, + 717, 126, 810, 81, 415, 144,-32766, 320,-32766,-32766, + -32766,-32766,-32766, 600,-32766,-32766,-32766, 1281, 294, 727, + 253, 74, 104, 105, 106, 107, 108, 320, 270, 1200, + 1199, 1201, -318, 267, 138, 397, 731, 732, 733, 734, + 109, 1310, 421, 279, 1311, 280, 470, 802, -193, 735, + 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, + 765, 572, 766, 767, 768, 769, 757, 758, 337, 338, + 760, 761, 746, 747, 748, 750, 751, 752, 347, 792, + 793, 794, 795, 796, 797, 753, 754, 573, 574, 786, + 777, 775, 776, 789, 772, 773, 800, -192, 575, 576, + 771, 577, 578, 579, 580, 581, 582, 123, 82, 83, + 84, -268, 774, 583, 584, 698, 148, 749, 719, 720, + 721, 722, 723, 804, 724, 725, 726, 762, 763, 36, + 686, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 1002, 270, 1074, 1075, 1076, + 1073, 1072, 1071, 1077, 928, 929, 959, 305, 109, 930, + 307, 1022, 727,-32766,-32766,-32766, 1004, 1005, 471, 141, + 1050,-32766,-32766, 320, -86, 805, 728, 729, 730, 731, + 732, 733, 734, 318,-32766, 798,-32766,-32766, -531, -356, + 278, -356, 735, 736, 737, 738, 739, 740, 741, 742, + 743, 744, 745, 765, 788, 766, 767, 768, 769, 757, + 758, 759, 787, 760, 761, 746, 747, 748, 750, 751, + 752, 791, 792, 793, 794, 795, 796, 797, 753, 754, + 755, 756, 786, 777, 775, 776, 789, 772, 773, 334, + -86, 764, 770, 771, 778, 779, 781, 780, 782, 783, + 1205, 806, -531, -531, 335, 774, 785, 784, 49, 50, + 51, 501, 52, 53, 150, 1285, 285, -531, 54, 55, + -111, 56, 1284, 893, 893, -111, 1002, -111, 285, -537, + 151, -531, 301, 594, 960, -111, -111, -111, -111, -111, + -111, -111, -111, 361, 893, 893, 1051, 1004, 1005, -580, + 710, 153, 1205, 689, 690, 365, -580, 57, 58, 102, + 103, -530, 59, 380, 60, 247, 248, 61, 62, 63, + 64, 65, 66, 67, 68, 691, 27, 268, 69, 437, + 502, 809, -16, -332, 1231, 1232, 503, 433, 809, -577, + 434, -532, 1229, 41, 24, 504, -577, 505, 435, 506, + 893, 507,-32766, 436, 508, 509, 883, 883, 815, 43, + 44, 438, 368, 367,-32766, 45, 510, 992, 991, 990, + 993, 359, 333, 1004, 1005, -530, -530, 883, 883, 239, + 511, 512, 513, 809, 809, 1004, 1005, 1300, 421, 836, + -530, 837, 515, 516, 154, 1219, 1220, 1221, 1222, 1216, + 1217, 293, -536, 155, -530, -532, -532, 1223, 1218, -534, + 74, 1200, 1199, 1201, 294, 14, 320, 70,-32766,-32766, + -532, 316, 317, 320, -153, -153, -153, 157, 286, -111, + 287, 895, 895, 883, -532, 684, 684, 1066, 808, -153, + 544, -153, 382, -153, 11, -153, 47, 718, 717, 35, + 250, 321, 895, 945, 32, 366, 684, 684, -580, 294, + -580, 124, 74, 1200, 1199, 1201, -111, -111, 320, 640, + 25, -111, 1052, -534, -534, 129, 869, -111, -111, -111, + -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 718, 717, 836, -577, 837, + -577, 1237, -534, 893, 130, -4, 893, -571, 895, -571, + 295, 296, 684, -153, 143, 456, 457, 1225, 656, 657, + 893,-32766,-32766,-32766, 1112, 1114, 149, 400, -88, 718, + 717, 158,-32766, 693, 159, -529, 369, 370, 1198, 125, + 374, 375, 160, 718, 717,-32766,-32766,-32766, 161,-32766, + 700,-32766, -79,-32766, -75, -73,-32766, 632, 633, -72, + -529,-32766,-32766,-32766, -71, -70,-32766,-32766,-32766, -69, + -68, -67, 1198,-32766, 412, -66, 27, -47, -18,-32766, + -32766,-32766,-32766,-32766, 147,-32766, 883,-32766, 809, 883, + -32766, 271, 1229, 277, 699,-32766,-32766,-32766, 809, -529, + -529,-32766,-32766, 883, 702, 892, 48,-32766, 412, 146, + 281, 366, 73, 428, -529, 288,-32766, 327, 292, 909, + 282, 289, -111, -111, -529, -529, 270, -111, -529, 145, + 109, -51, 514, -111, -111, -111, -111, 800, 809, -529, + 1081, 664, 515, 516, 550, 1219, 1220, 1221, 1222, 1216, + 1217, 1312,-32766, -529, 647, 9, 546, 1223, 1218, 659, + 641, 895, 646, 131, 895, 684, 302, 72, 684, -4, + 297, 298, 317, 320,-32766, 299, 13, 677, 895, 140, + 1198, 306, 684, 320, 453, 364, 481,-32766,-32766,-32766, + 660,-32766,-32766,-32766, 1236,-32766, 1238, 808,-32766, 127, + 432, 630, -565,-32766,-32766,-32766,-32766, -271, 0,-32766, + -32766, 1226, 1198, 0, 893,-32766, 412, 0, 0,-32766, + -32766,-32766, 925,-32766,-32766,-32766, 300,-32766, 0, 0, + -32766, 911, 0, 893, 0,-32766,-32766,-32766,-32766, 556, + -495,-32766,-32766, 0, 1198, -485, 7,-32766, 412, 0, + 16,-32766,-32766,-32766, 363,-32766,-32766,-32766, 39,-32766, + 598, 294,-32766, 40, -269, 707, 476,-32766,-32766,-32766, + -32766, 708, 828,-32766,-32766, 874, 1198, 563, 969,-32766, + 412, 946, 953,-32766,-32766,-32766, 943,-32766,-32766,-32766, + 954,-32766, 872, 941,-32766, 1055, 1058, 883, 1059,-32766, + -32766,-32766, 1056, 1057, 1063,-32766,-32766, 820, 1251, 1269, + 1303,-32766, 412, -246, -246, -246, 883, 635, -268, 366, + -32766, -563, -537, -536, -535, 1230, 1, 28, 29, 38, + -111, -111, -245, -245, -245, -111, 42, 46, 366, 71, + 869, -111, -111, -111, -111, 75, 76, 77, 78, -111, + -111, 79, 80, 142, -111, 27, 268, 18, 152, 869, + -111, -111, -111, -111, 156, 246, 322, 809,-32766, 348, + 349, 1229, 895, 350, 1198, 351, 684, -246, 352, 353, + 354,-32766,-32766,-32766, 355,-32766, 356,-32766, 357,-32766, + 27, 895,-32766, 19, 358, 684, -245,-32766,-32766,-32766, + 360, 429, 809,-32766,-32766, 543, 1229, 20, 21,-32766, + 412, 23, 399, 472, 473, 480, 483, 484,-32766, 485, + 486, 490, 516, 491, 1219, 1220, 1221, 1222, 1216, 1217, + 492, 499, 561, 671, 1209, 1152, 1223, 1218, 1227, 1025, + 1024, 1188, -273, -103, 17, 22, 72, 33, 26, 291, + 398, 317, 320, 591, 595, 622, 320, 516, 676, 1219, + 1220, 1221, 1222, 1216, 1217, 1156, 1204, 1153, 1282, 0, + 315, 1223, 1218, 362, 685, 688, 692, 694, 695, 696, + 697, 72, 701, -499, 687, 0, 317, 320, 704, 870, + 1307, 1309, 831, 830, 839, 918, 961, 838, 1308, 917, + 919, 916, 1184, 902, 912, 900, 951, 952, 1306, 1263, + 1252, 1270, 1276, 1279, 0, 1169 + ); + + protected $actionCheck = array( + 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, + 12, 13, 9, 10, 11, 1, 9, 10, 11, 128, + 129, 130, 131, 80, 44, 45, 46, 47, 48, 49, + 50, 1, 116, 30, 1, 37, 38, 30, 9, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 1, 8, 137, 138, 57, 9, 10, 11, 116, + 117, 118, 119, 120, 121, 122, 106, 107, 8, 71, + 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, + 33, 34, 35, 36, 8, 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, 82, 8, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 1, 80, 9, 10, 11, 150, 151, + 152, 8, 154, 14, 2, 3, 4, 5, 6, 7, + 162, 9, 10, 11, 12, 13, 30, 8, 32, 33, + 34, 35, 36, 37, 38, 9, 10, 11, 128, 8, + 116, 9, 10, 11, 106, 107, 9, 10, 11, 37, + 38, 14, 159, 163, 116, 8, 30, 167, 32, 33, + 34, 35, 30, 52, 32, 33, 34, 1, 158, 57, + 8, 161, 51, 52, 53, 54, 55, 167, 57, 155, + 156, 157, 162, 71, 72, 73, 74, 75, 76, 77, + 69, 80, 80, 35, 83, 37, 31, 80, 162, 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, 80, 162, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 16, 9, 10, + 11, 162, 150, 151, 152, 163, 154, 2, 3, 4, + 5, 6, 7, 156, 9, 10, 11, 12, 13, 30, + 163, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 116, 57, 116, 117, 118, + 119, 120, 121, 122, 117, 118, 31, 8, 69, 122, + 8, 1, 57, 9, 10, 11, 137, 138, 163, 163, + 1, 9, 10, 167, 31, 80, 71, 72, 73, 74, + 75, 76, 77, 8, 30, 80, 32, 33, 70, 106, + 30, 108, 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, 8, + 97, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 1, 156, 134, 135, 8, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 14, 1, 30, 149, 12, 13, + 101, 15, 8, 1, 1, 106, 116, 108, 30, 161, + 14, 163, 113, 1, 159, 116, 117, 118, 119, 120, + 121, 122, 123, 8, 1, 1, 159, 137, 138, 1, + 163, 14, 1, 31, 31, 8, 8, 51, 52, 49, + 50, 70, 56, 8, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 31, 70, 71, 72, 73, + 74, 82, 31, 164, 78, 79, 80, 8, 82, 1, + 8, 70, 86, 87, 88, 89, 8, 91, 8, 93, + 1, 95, 116, 8, 98, 99, 84, 84, 8, 103, + 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, + 122, 115, 116, 137, 138, 134, 135, 84, 84, 97, + 124, 125, 126, 82, 82, 137, 138, 85, 80, 106, + 149, 108, 136, 137, 14, 139, 140, 141, 142, 143, + 144, 145, 161, 14, 163, 134, 135, 151, 152, 70, + 161, 155, 156, 157, 158, 101, 167, 161, 51, 52, + 149, 165, 166, 167, 75, 76, 77, 14, 35, 128, + 37, 159, 159, 84, 163, 163, 163, 123, 155, 90, + 85, 92, 106, 94, 108, 96, 70, 37, 38, 147, + 148, 70, 159, 159, 14, 106, 163, 163, 160, 158, + 162, 16, 161, 155, 156, 157, 117, 118, 167, 75, + 76, 122, 164, 134, 135, 16, 127, 128, 129, 130, + 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 37, 38, 106, 160, 108, + 162, 146, 163, 1, 16, 0, 1, 160, 159, 162, + 134, 135, 163, 164, 16, 134, 135, 1, 75, 76, + 1, 9, 10, 11, 59, 60, 101, 102, 31, 37, + 38, 16, 74, 31, 16, 70, 106, 107, 80, 163, + 106, 107, 16, 37, 38, 87, 88, 89, 16, 91, + 31, 93, 31, 95, 31, 31, 98, 111, 112, 31, + 70, 103, 104, 105, 31, 31, 74, 109, 110, 31, + 31, 31, 80, 115, 116, 31, 70, 31, 31, 87, + 88, 89, 124, 91, 31, 93, 84, 95, 82, 84, + 98, 31, 86, 31, 31, 103, 104, 105, 82, 134, + 135, 109, 110, 84, 31, 31, 70, 115, 116, 31, + 35, 106, 154, 108, 149, 35, 124, 35, 113, 38, + 37, 37, 117, 118, 134, 135, 57, 122, 163, 70, + 69, 31, 127, 128, 129, 130, 131, 80, 82, 149, + 82, 77, 136, 137, 89, 139, 140, 141, 142, 143, + 144, 83, 85, 163, 100, 150, 85, 151, 152, 94, + 90, 159, 96, 31, 159, 163, 114, 161, 163, 164, + 134, 135, 166, 167, 74, 132, 97, 92, 159, 163, + 80, 132, 163, 167, 97, 149, 97, 87, 88, 89, + 100, 91, 116, 93, 146, 95, 146, 155, 98, 163, + 128, 113, 161, 103, 104, 105, 74, 162, -1, 109, + 110, 160, 80, -1, 1, 115, 116, -1, -1, 87, + 88, 89, 128, 91, 124, 93, 133, 95, -1, -1, + 98, 154, -1, 1, -1, 103, 104, 105, 74, 153, + 149, 109, 110, -1, 80, 149, 149, 115, 116, -1, + 149, 87, 88, 89, 149, 91, 124, 93, 159, 95, + 153, 158, 98, 159, 162, 159, 102, 103, 104, 105, + 74, 159, 159, 109, 110, 159, 80, 81, 159, 115, + 116, 159, 159, 87, 88, 89, 159, 91, 124, 93, + 159, 95, 159, 159, 98, 159, 159, 84, 159, 103, + 104, 105, 159, 159, 159, 109, 110, 160, 160, 160, + 160, 115, 116, 100, 101, 102, 84, 160, 162, 106, + 124, 161, 161, 161, 161, 166, 161, 161, 161, 161, + 117, 118, 100, 101, 102, 122, 161, 161, 106, 161, + 127, 128, 129, 130, 131, 161, 161, 161, 161, 117, + 118, 161, 161, 161, 122, 70, 71, 162, 161, 127, + 128, 129, 130, 131, 161, 161, 161, 82, 74, 161, + 161, 86, 159, 161, 80, 161, 163, 164, 161, 161, + 161, 87, 88, 89, 161, 91, 161, 93, 161, 95, + 70, 159, 98, 162, 161, 163, 164, 103, 104, 105, + 161, 161, 82, 109, 110, 161, 86, 162, 162, 115, + 116, 162, 162, 162, 162, 162, 162, 162, 124, 162, + 162, 162, 137, 162, 139, 140, 141, 142, 143, 144, + 162, 162, 162, 162, 162, 162, 151, 152, 162, 162, + 162, 162, 162, 162, 162, 162, 161, 163, 162, 162, + 162, 166, 167, 162, 162, 162, 167, 137, 162, 139, + 140, 141, 142, 143, 144, 162, 162, 162, 162, -1, + 163, 151, 152, 163, 163, 163, 163, 163, 163, 163, + 163, 161, 163, 165, 163, -1, 166, 167, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, -1, 165 + ); + + protected $actionBase = array( + 0, -2, 152, 549, 705, 913, 932, 716, 508, 157, + 844, 305, 305, -57, 305, 305, 305, 473, 702, 702, + 719, 702, 472, 494, 493, 493, 493, 658, 658, 658, + 658, 692, 692, 864, 864, 896, 832, 800, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, + 994, 994, 33, 325, 482, 640, 987, 1003, 991, 1004, + 983, 982, 988, 992, 1005, 1044, 1045, 778, 1046, 1047, + 1048, 1049, 993, 857, 986, 996, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 29, 177, 362, 712, 712, 712, 712, 712, + 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, + 712, 712, 712, 712, 712, 3, 3, 3, 354, 706, + 706, 172, 166, 985, 665, 47, 1020, 1020, 1020, 1020, + 1020, 1020, 1020, 1020, 1020, 136, 136, 7, 7, 7, + 7, 7, 369, -20, -20, -20, -20, 501, 50, 448, + 449, 360, 514, 283, 460, 436, -109, 229, 229, 229, + 229, 229, 229, 161, 161, -84, -84, -84, -84, -84, + 318, 441, 483, 555, 64, 206, 206, 206, 206, 64, + 64, 64, 64, 750, 859, 64, 64, 64, 471, 690, + 690, 736, 567, 567, 690, 591, 771, 502, 591, 502, + 30, 151, 776, -40, 78, 547, 794, 776, 539, 576, + 538, 498, 742, 630, 742, 981, 767, 746, 723, 845, + 1021, 1006, 754, 1042, 790, 1043, 581, 721, 980, 980, + 980, 980, 980, 980, 980, 980, 980, 980, 980, 989, + 610, 981, 295, 989, 989, 989, 610, 610, 610, 610, + 610, 610, 610, 610, 610, 610, 646, 295, 594, 643, + 295, 782, 610, 33, 796, 33, 33, 33, 33, 908, + 33, 33, 33, 33, 33, 33, 918, 747, 205, 33, + 325, 142, 142, 337, 14, 142, 142, 142, 142, 33, + 33, 33, 630, 769, 786, 634, 807, 125, 769, 769, + 769, 343, 60, 139, 76, 593, 198, 536, 757, 757, + 758, 865, 865, 757, 756, 757, 758, 876, 757, 865, + 803, 171, 529, 431, 497, 532, 865, 349, 757, 757, + 757, 757, 540, 757, 202, 187, 757, 757, 743, 762, + 749, 44, 865, 865, 865, 749, 485, 793, 793, 793, + 806, 812, 788, 760, 375, 352, 550, 159, 781, 760, + 760, 757, 505, 788, 760, 788, 760, 777, 760, 760, + 760, 788, 760, 756, 446, 760, 715, 545, 143, 760, + 6, 878, 884, 697, 885, 868, 886, 940, 887, 890, + 1011, 904, 875, 891, 944, 867, 866, 774, 281, 645, + 797, 791, 863, 761, 761, 761, 861, 761, 761, 761, + 761, 761, 761, 761, 761, 281, 751, 805, 772, 755, + 909, 659, 688, 970, 748, 1025, 1018, 1050, 908, 972, + 892, 799, 698, 949, 912, 1024, 1007, 914, 917, 950, + 973, 813, 976, 1026, 759, 1027, 1028, 847, 919, 1012, + 761, 878, 890, 875, 891, 867, 866, 744, 740, 738, + 739, 734, 733, 724, 728, 753, 977, 860, 741, 848, + 918, 862, 281, 849, 895, 984, 951, 952, 1010, 787, + 768, 850, 1029, 923, 925, 927, 1013, 978, 804, 931, + 745, 953, 789, 1030, 954, 955, 957, 958, 1031, 1014, + 1015, 1016, 816, 770, 802, 766, 1032, 450, 780, 784, + 939, 466, 905, 1017, 1033, 1034, 959, 961, 968, 1035, + 897, 819, 945, 765, 946, 856, 822, 823, 487, 775, + 783, 580, 589, 1036, 1037, 1038, 903, 763, 764, 827, + 831, 979, 1039, 613, 833, 718, 1040, 971, 726, 732, + 785, 1019, 801, 752, 779, 933, 773, 834, 1041, 836, + 837, 839, 969, 843, 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, 456, 456, 456, 456, 456, 456, 305, + 305, 305, 305, 0, 0, 305, 0, 0, 0, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 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, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 64, 64, 289, 289, 64, 0, 289, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 289, 289, 289, + 289, 289, 289, 289, 803, 161, 161, 161, 161, 64, + 64, 64, 64, 64, 231, 231, 161, 64, 237, 64, + 64, 64, 64, 64, 64, 0, 0, 64, 64, 64, + 64, 64, 0, 0, 295, 502, 0, 756, 756, 756, + 756, 0, 0, 0, 0, 502, 502, 0, 0, 0, + 0, 0, 0, 0, 161, 161, 0, 295, 502, 0, + 295, 0, 756, 756, 64, 803, 803, 464, 237, 64, + 0, 0, 0, 0, 295, 756, 295, 610, 502, 610, + 610, 142, 33, 464, 625, 625, 625, 625, 0, 630, + 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + 803, 756, 0, 803, 0, 756, 756, 756, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 756, 0, 0, 865, 0, 0, 0, + 0, 757, 0, 0, 0, 0, 0, 0, 757, 876, + 0, 0, 0, 0, 0, 0, 756, 0, 0, 0, + 0, 0, 0, 0, 0, 761, 787, 0, 787, 0, + 761, 761, 761 + ); + + protected $actionDefault = array( + 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 583, 583, 583, + 583,32767,32767, 250, 103,32767,32767, 459, 376, 376, + 376,32767,32767, 527, 527, 527, 527, 527, 527,32767, + 32767,32767,32767,32767,32767, 459,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, 101,32767, + 32767,32767, 37, 7, 8, 10, 11, 50, 17, 314, + 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 576,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 463, 442, 443, 445, + 446, 375, 528, 582, 317, 579, 374, 146, 329, 319, + 238, 320, 254, 464, 255, 465, 468, 469, 211, 283, + 371, 150, 406, 460, 408, 458, 462, 407, 381, 387, + 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, + 398, 399, 379, 380, 461, 439, 438, 437, 404,32767, + 32767, 405, 409,32767, 378, 412,32767,32767,32767,32767, + 32767,32767,32767, 103,32767, 410, 411, 428, 429, 426, + 427, 430,32767, 431, 432, 433, 434,32767,32767, 306, + 32767,32767, 355, 353, 413, 306,32767,32767,32767,32767, + 32767,32767,32767, 419, 420,32767,32767,32767,32767,32767, + 521, 436,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 103,32767, 101, 523, 401, + 403, 491, 414, 415, 382,32767, 498,32767, 103, 500, + 32767,32767,32767, 112,32767,32767,32767,32767, 522,32767, + 529, 529,32767, 484, 101, 194,32767, 194, 194,32767, + 32767,32767,32767,32767,32767,32767, 590, 484, 111, 111, + 111, 111, 111, 111, 111, 111, 111, 111, 111,32767, + 194, 111,32767,32767,32767, 101, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 194, 189,32767, 264, 266, + 103, 544, 194,32767, 503,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 496,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 484, 424, 139,32767, 139, 529, 416, 417, + 418, 486, 529, 529, 529, 302, 285,32767,32767,32767, + 32767, 501, 501, 101, 101, 101, 101, 496,32767,32767, + 112, 100, 100, 100, 100, 100, 104, 102,32767,32767, + 32767,32767, 100,32767, 102, 102,32767,32767, 221, 208, + 219, 102,32767, 548, 549, 219, 102, 223, 223, 223, + 243, 243, 475, 308, 102, 100, 102, 102, 196, 308, + 308,32767, 102, 475, 308, 475, 308, 198, 308, 308, + 308, 475, 308,32767, 102, 308, 210, 100, 100, 308, + 32767,32767,32767, 486,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 516, + 32767, 533, 546, 422, 423, 425, 531, 447, 448, 449, + 450, 451, 452, 453, 455, 578,32767, 490,32767,32767, + 32767,32767, 328,32767, 588,32767, 588,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 589,32767, 529,32767,32767,32767,32767, + 421, 9, 76, 43, 44, 52, 58, 507, 508, 509, + 510, 504, 505, 511, 506,32767,32767, 512, 554,32767, + 32767, 530, 581,32767,32767,32767,32767,32767,32767, 139, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 516,32767, 137,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 529,32767,32767,32767, 304, 305, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 529,32767,32767,32767, 287, + 288,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 282,32767,32767, 370,32767, + 32767,32767,32767, 349,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 152, 152, 3, 3, 331, 152, + 152, 152, 331, 152, 331, 331, 331, 152, 152, 152, + 152, 152, 152, 276, 184, 258, 261, 243, 243, 152, + 341, 152 + ); + + protected $goto = array( + 194, 194, 672, 423, 645, 1028, 343, 314, 608, 642, + 417, 309, 310, 330, 565, 422, 331, 424, 624, 639, + 680, 653, 654, 655, 588, 826, 165, 165, 165, 165, + 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, + 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, + 188, 189, 190, 215, 213, 216, 523, 524, 413, 525, + 527, 528, 529, 530, 531, 532, 533, 534, 1098, 166, + 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, + 176, 212, 214, 217, 235, 238, 241, 242, 245, 255, + 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, + 274, 283, 284, 312, 313, 418, 419, 420, 570, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, + 236, 186, 187, 188, 189, 190, 215, 1098, 199, 180, + 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, + 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, + 211, 323, 323, 323, 323, 829, 346, 1069, 1070, 251, + 251, 610, 610, 842, 827, 1228, 346, 346, 1228, 1228, + 1228, 1228, 1228, 1228, 1228, 1228, 1228, 803, 854, 346, + 346, 841, 346, 860, 1313, 249, 249, 249, 249, 243, + 252, 387, 391, 549, 589, 593, 542, 801, 834, 346, + 882, 877, 878, 891, 944, 835, 879, 832, 880, 881, + 833, 562, 587, 1062, 885, 683, 669, 669, 807, 496, + 675, 1060, 1273, 1274, 1049, 1045, 1046, 1246, 1246, 822, + 822, 1246, 344, 345, 1246, 1246, 1246, 1246, 1246, 1246, + 1246, 1246, 1246, 341, 1257, 921, 998, 1006, 1010, 1007, + 1011, 1197, 1197, 1003, 1197, 1003, 319, 304, 807, 1003, + 807, 1003, 1003, 1003, 1003, 1003, 1003, 665, 1286, 1003, + 1003, 1003, 1003, 1003, 1268, 1268, 965, 1268, 1197, 276, + 276, 276, 276, 1197, 1197, 1197, 1197, 548, 540, 1197, + 1197, 1197, 1278, 1278, 1278, 1278, 385, 542, 455, 455, + 620, 621, 1280, 1280, 1280, 1280, 898, 455, 1178, 914, + 560, 899, 1179, 1182, 915, 1183, 389, 540, 548, 557, + 558, 396, 568, 590, 604, 605, 488, 1264, 489, 1244, + 1244, 644, 15, 1244, 495, 1095, 1244, 1244, 1244, 1244, + 1244, 1244, 1244, 1244, 1244, 1147, 822, 464, 1271, 1272, + 526, 526, 1296, 1296, 526, 430, 1192, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 1036, 886, 1296, 887, + 1266, 1266, 1036, 537, 537, 555, 537, 566, 602, 706, + 623, 625, 416, 643, 599, 1299, 554, 662, 666, 979, + 670, 678, 975, 603, 936, 403, 679, 254, 254, 332, + 446, 1297, 1297, 847, 819, 938, 938, 938, 938, 927, + 440, 446, 932, 939, 395, 440, 440, 1297, 5, 1190, + 6, 903, 1085, 844, 987, 541, 552, 1034, 607, 709, + 541, 465, 552, 984, 856, 388, 1038, 469, 949, 0, + 1080, 846, 825, 648, 963, 569, 458, 459, 460, 840, + 852, 0, 0, 1304, 1305, 968, 942, 942, 940, 942, + 705, 1189, 539, 977, 972, 0, 401, 402, 0, 0, + 0, 651, 1193, 652, 0, 405, 406, 407, 850, 663, + 0, 0, 408, 0, 0, 0, 339, 535, 535, 535, + 535, 0, 592, 0, 0, 0, 440, 440, 440, 440, + 440, 440, 440, 440, 440, 440, 440, 0, 0, 440, + 597, 611, 614, 615, 616, 617, 636, 637, 638, 682, + 855, 843, 1033, 1037, 0, 0, 0, 1194, 0, 425, + 947, 0, 0, 0, 817, 425, 0, 0, 272, 0, + 0, 0, 0, 538, 538, 1015, 1008, 1012, 1009, 1013, + 1195, 1254, 1255, 937, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1078, 859, 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, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 982, + 982 + ); + + protected $gotoCheck = array( + 42, 42, 72, 65, 65, 121, 95, 65, 55, 55, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 84, + 9, 84, 84, 84, 124, 26, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 23, 23, 23, 23, 15, 14, 138, 138, 5, + 5, 106, 106, 35, 27, 106, 14, 14, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 7, 35, 14, + 14, 35, 14, 45, 14, 5, 5, 5, 5, 5, + 5, 58, 58, 58, 58, 58, 14, 6, 15, 14, + 15, 15, 15, 15, 49, 15, 15, 15, 15, 15, + 15, 164, 8, 8, 15, 8, 8, 8, 12, 8, + 8, 8, 170, 170, 15, 15, 15, 162, 162, 22, + 22, 162, 95, 95, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 171, 14, 87, 87, 87, 87, 87, + 87, 72, 72, 72, 72, 72, 161, 161, 12, 72, + 12, 72, 72, 72, 72, 72, 72, 14, 173, 72, + 72, 72, 72, 72, 124, 124, 101, 124, 72, 24, + 24, 24, 24, 72, 72, 72, 72, 75, 75, 72, + 72, 72, 9, 9, 9, 9, 61, 14, 143, 143, + 83, 83, 124, 124, 124, 124, 72, 143, 78, 78, + 102, 72, 78, 78, 78, 78, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 75, 149, 124, 149, 163, + 163, 63, 75, 163, 149, 144, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 145, 22, 168, 168, 168, + 165, 165, 174, 174, 165, 111, 14, 165, 165, 165, + 165, 165, 165, 165, 165, 165, 124, 64, 174, 64, + 124, 124, 124, 19, 19, 48, 19, 2, 2, 48, + 48, 48, 13, 48, 13, 174, 9, 48, 48, 48, + 48, 48, 48, 9, 91, 91, 91, 5, 5, 29, + 19, 175, 175, 39, 18, 19, 19, 19, 19, 90, + 23, 19, 19, 19, 28, 23, 23, 175, 46, 154, + 46, 17, 17, 37, 108, 9, 9, 123, 17, 97, + 9, 151, 9, 17, 41, 9, 126, 82, 94, -1, + 141, 17, 25, 17, 17, 9, 9, 9, 9, 17, + 9, -1, -1, 9, 9, 25, 25, 25, 25, 25, + 25, 17, 25, 25, 25, -1, 80, 80, -1, -1, + -1, 80, 20, 80, -1, 80, 80, 80, 9, 80, + -1, -1, 80, -1, -1, -1, 80, 105, 105, 105, + 105, -1, 105, -1, -1, -1, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, -1, -1, 23, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 16, 16, 16, 16, -1, -1, -1, 20, -1, 115, + 16, -1, -1, -1, 20, 115, -1, -1, 24, -1, + -1, -1, -1, 24, 24, 115, 115, 115, 115, 115, + 20, 20, 20, 16, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 16, 16, -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, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 105, + 105 + ); + + protected $gotoBase = array( + 0, 0, -299, 0, 0, 168, 194, 178, 215, 7, + 0, 0, -64, 60, -127, -175, 88, -23, 109, 116, + 98, 0, -84, 158, 286, 448, 21, 170, 92, 117, + 0, 0, 0, 0, 0, -189, 0, 99, 0, 95, + 0, 11, -1, 0, 0, 181, -281, 0, -300, 191, + 0, 0, 0, 0, 0, -31, 0, 0, 157, 0, + 0, 265, 0, 101, 358, -236, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -40, 0, 0, -83, 171, + -3, 0, -18, -158, -673, 0, 0, -22, 0, 0, + 93, 104, 0, 0, 13, -465, 0, 39, 0, 0, + 0, 252, 278, 0, 0, 470, -68, 0, 73, 0, + 0, 90, 0, 0, 0, 270, 0, 0, 0, 0, + 0, 3, 0, 72, 17, 0, 12, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, -105, 0, + 0, 14, 0, 275, 102, 85, 0, 0, 0, -147, + 0, 9, 0, 0, 69, 0, 0, 0, 0, 0, + 0, -50, -2, 100, 193, 121, 0, 0, 61, 0, + -131, 224, 0, 248, 59, 108, 0, 0 + ); + + protected $gotoDefault = array( + -32768, 500, 713, 4, 714, 907, 790, 799, 585, 517, + 681, 340, 612, 414, 1262, 884, 1084, 567, 818, 1206, + 1214, 447, 821, 324, 703, 866, 867, 868, 392, 377, + 383, 390, 634, 613, 482, 853, 443, 845, 474, 848, + 442, 857, 162, 411, 498, 861, 3, 863, 545, 894, + 378, 871, 379, 658, 873, 551, 875, 876, 386, 393, + 394, 1089, 559, 609, 888, 244, 553, 889, 376, 890, + 897, 381, 384, 667, 454, 493, 487, 404, 1064, 596, + 631, 451, 468, 619, 618, 606, 467, 426, 409, 326, + 926, 934, 475, 452, 948, 342, 956, 711, 1097, 626, + 477, 964, 627, 971, 974, 518, 519, 466, 986, 269, + 989, 478, 1021, 649, 650, 1001, 628, 629, 1019, 461, + 586, 1027, 444, 1035, 1250, 445, 1039, 262, 1042, 275, + 410, 427, 1047, 1048, 8, 1054, 673, 674, 10, 273, + 497, 1079, 668, 441, 1096, 431, 1166, 1168, 547, 479, + 1186, 1185, 661, 494, 1191, 1253, 439, 520, 462, 311, + 521, 303, 328, 308, 536, 290, 329, 522, 463, 1259, + 1267, 325, 30, 1287, 1298, 336, 564, 601 + ); + + protected $ruleToNonTerminal = array( + 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, + 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, + 11, 11, 11, 12, 12, 13, 13, 14, 15, 15, + 16, 16, 17, 17, 18, 18, 21, 21, 22, 23, + 23, 24, 24, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, + 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, + 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, + 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, + 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, + 78, 78, 26, 26, 27, 27, 27, 27, 86, 86, + 88, 88, 81, 81, 89, 89, 90, 90, 90, 82, + 82, 85, 85, 83, 83, 91, 92, 92, 56, 56, + 64, 64, 67, 67, 67, 66, 93, 93, 94, 57, + 57, 57, 57, 95, 95, 96, 96, 97, 97, 98, + 99, 99, 100, 100, 101, 101, 54, 54, 50, 50, + 103, 52, 52, 104, 51, 51, 53, 53, 63, 63, + 63, 63, 79, 79, 107, 107, 109, 109, 110, 110, + 110, 110, 108, 108, 108, 112, 112, 112, 112, 87, + 87, 115, 115, 115, 113, 113, 116, 116, 114, 114, + 117, 117, 118, 118, 118, 118, 111, 111, 80, 80, + 80, 20, 20, 20, 120, 119, 119, 121, 121, 121, + 121, 59, 122, 122, 123, 60, 125, 125, 126, 126, + 127, 127, 84, 128, 128, 128, 128, 128, 128, 133, + 133, 134, 134, 135, 135, 135, 135, 135, 136, 137, + 137, 132, 132, 129, 129, 131, 131, 139, 139, 138, + 138, 138, 138, 138, 138, 138, 130, 140, 140, 142, + 141, 141, 61, 102, 143, 143, 55, 55, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 150, 144, 144, 149, 149, 152, 153, 153, + 154, 155, 155, 155, 19, 19, 72, 72, 72, 72, + 145, 145, 145, 145, 157, 157, 146, 146, 148, 148, + 148, 151, 151, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 163, 163, 106, 165, 165, 165, 165, 147, + 147, 147, 147, 147, 147, 147, 147, 58, 58, 160, + 160, 160, 160, 166, 166, 156, 156, 156, 167, 167, + 167, 167, 167, 167, 73, 73, 65, 65, 65, 65, + 124, 124, 124, 124, 170, 169, 159, 159, 159, 159, + 159, 159, 159, 158, 158, 158, 168, 168, 168, 168, + 105, 164, 172, 172, 171, 171, 173, 173, 173, 173, + 173, 173, 173, 173, 161, 161, 161, 161, 175, 176, + 174, 174, 174, 174, 174, 174, 174, 174, 177, 177, + 177, 177 + ); + + 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, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, + 2, 0, 1, 1, 1, 1, 4, 3, 5, 4, + 3, 4, 2, 3, 1, 1, 7, 6, 2, 3, + 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, + 3, 1, 2, 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, + 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, + 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, + 3, 1, 8, 9, 8, 7, 6, 8, 0, 2, + 0, 2, 1, 2, 1, 2, 1, 1, 1, 0, + 2, 0, 2, 0, 2, 2, 1, 3, 1, 4, + 1, 4, 1, 1, 4, 2, 1, 3, 3, 3, + 4, 4, 5, 0, 2, 4, 3, 1, 1, 7, + 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, + 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, + 1, 1, 2, 0, 1, 3, 0, 2, 1, 1, + 1, 1, 6, 8, 6, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, + 3, 3, 1, 2, 1, 1, 0, 1, 0, 2, + 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, + 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, + 2, 0, 1, 5, 5, 10, 3, 5, 1, 1, + 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, + 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, + 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, + 3, 3, 4, 4, 1, 1, 2, 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, 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, 2, 8, 9, 8, 9, 9, 10, + 9, 10, 8, 3, 2, 0, 4, 2, 1, 3, + 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, + 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 3, 3, 4, 1, 1, 3, 1, + 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, + 3, 1, 1, 1, 1, 1, 3, 1, 1, 4, + 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, + 1, 4, 2, 2, 1, 3, 1, 4, 4, 3, + 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, + 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, + 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, + 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, + 2, 1 + ); + + protected function initReduceCallbacks() { + $this->reduceCallbacks = [ + 0 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 1 => function ($stackPos) { + $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); + }, + 2 => function ($stackPos) { + if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + }, + 3 => function ($stackPos) { + $this->semValue = array(); + }, + 4 => function ($stackPos) { + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 5 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 6 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 7 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 8 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 9 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 10 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 11 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 12 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 13 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 14 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 15 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 16 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 17 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 18 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 19 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 20 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 21 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 22 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 23 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 24 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 25 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 26 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 27 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 28 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 29 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 30 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 31 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 32 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 33 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 34 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 35 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 36 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 37 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 38 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 39 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 40 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 41 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 42 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 43 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 44 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 45 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 46 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 47 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 48 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 49 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 50 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 51 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 52 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 53 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 54 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 55 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 56 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 57 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 58 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 59 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 60 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 61 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 62 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 63 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 64 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 65 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 66 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 67 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 68 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 69 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 70 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 71 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 72 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 73 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 74 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 75 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 76 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 77 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 78 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 79 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 80 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 81 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 82 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 83 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 84 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 85 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 86 => function ($stackPos) { + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 87 => function ($stackPos) { + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 88 => function ($stackPos) { + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 89 => function ($stackPos) { + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 90 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 91 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 92 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 93 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 94 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 95 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 96 => function ($stackPos) { + $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 97 => function ($stackPos) { + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 98 => function ($stackPos) { + /* nothing */ + }, + 99 => function ($stackPos) { + /* nothing */ + }, + 100 => function ($stackPos) { + /* nothing */ + }, + 101 => function ($stackPos) { + $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + }, + 102 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 103 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 104 => function ($stackPos) { + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 105 => function ($stackPos) { + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 106 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 107 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 108 => function ($stackPos) { + $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 109 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 110 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 111 => function ($stackPos) { + $this->semValue = []; + }, + 112 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 113 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 114 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 115 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 116 => function ($stackPos) { + $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 117 => function ($stackPos) { + $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); + $this->checkNamespace($this->semValue); + }, + 118 => function ($stackPos) { + $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $this->checkNamespace($this->semValue); + }, + 119 => function ($stackPos) { + $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $this->checkNamespace($this->semValue); + }, + 120 => function ($stackPos) { + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 121 => function ($stackPos) { + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 122 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 123 => function ($stackPos) { + $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 124 => function ($stackPos) { + $this->semValue = Stmt\Use_::TYPE_FUNCTION; + }, + 125 => function ($stackPos) { + $this->semValue = Stmt\Use_::TYPE_CONSTANT; + }, + 126 => function ($stackPos) { + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + }, + 127 => function ($stackPos) { + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 128 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 129 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 130 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 131 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 132 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 133 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 134 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 135 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 136 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 137 => function ($stackPos) { + $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + }, + 138 => function ($stackPos) { + $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + }, + 139 => function ($stackPos) { + $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + }, + 140 => function ($stackPos) { + $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + }, + 141 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; + }, + 142 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; + }, + 143 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 144 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 145 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 146 => function ($stackPos) { + $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 147 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 148 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 149 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 150 => function ($stackPos) { + $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 151 => function ($stackPos) { + if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + }, + 152 => function ($stackPos) { + $this->semValue = array(); + }, + 153 => function ($stackPos) { + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 154 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 155 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 156 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 157 => function ($stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 158 => function ($stackPos) { + + if ($this->semStack[$stackPos-(3-2)]) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; + } else { + $startAttributes = $this->startAttributeStack[$stackPos-(3-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; + if (null === $this->semValue) { $this->semValue = array(); } + } + + }, + 159 => function ($stackPos) { + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + }, + 160 => function ($stackPos) { + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + }, + 161 => function ($stackPos) { + $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 162 => function ($stackPos) { + $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + }, + 163 => function ($stackPos) { + $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + }, + 164 => function ($stackPos) { + $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 165 => function ($stackPos) { + $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 166 => function ($stackPos) { + $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 167 => function ($stackPos) { + $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 168 => function ($stackPos) { + $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 169 => function ($stackPos) { + $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 170 => function ($stackPos) { + $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 171 => function ($stackPos) { + $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 172 => function ($stackPos) { + + $e = $this->semStack[$stackPos-(2-1)]; + if ($e instanceof Expr\Throw_) { + // For backwards-compatibility reasons, convert throw in statement position into + // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_). + $this->semValue = new Stmt\Throw_($e->expr, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + } else { + $this->semValue = new Stmt\Expression($e, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + } + + }, + 173 => function ($stackPos) { + $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 174 => function ($stackPos) { + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + }, + 175 => function ($stackPos) { + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + }, + 176 => function ($stackPos) { + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 177 => function ($stackPos) { + $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 178 => function ($stackPos) { + $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); + }, + 179 => function ($stackPos) { + $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 180 => function ($stackPos) { + $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 181 => function ($stackPos) { + $this->semValue = array(); /* means: no statement */ + }, + 182 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 183 => function ($stackPos) { + $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; + if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ + }, + 184 => function ($stackPos) { + $this->semValue = array(); + }, + 185 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 186 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 187 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 188 => function ($stackPos) { + $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + }, + 189 => function ($stackPos) { + $this->semValue = null; + }, + 190 => function ($stackPos) { + $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 191 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 192 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 193 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 194 => function ($stackPos) { + $this->semValue = false; + }, + 195 => function ($stackPos) { + $this->semValue = true; + }, + 196 => function ($stackPos) { + $this->semValue = false; + }, + 197 => function ($stackPos) { + $this->semValue = true; + }, + 198 => function ($stackPos) { + $this->semValue = false; + }, + 199 => function ($stackPos) { + $this->semValue = true; + }, + 200 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 201 => function ($stackPos) { + $this->semValue = []; + }, + 202 => function ($stackPos) { + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + }, + 203 => function ($stackPos) { + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + }, + 204 => function ($stackPos) { + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->checkClass($this->semValue, $stackPos-(8-3)); + }, + 205 => function ($stackPos) { + $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->checkInterface($this->semValue, $stackPos-(7-3)); + }, + 206 => function ($stackPos) { + $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 207 => function ($stackPos) { + $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->checkEnum($this->semValue, $stackPos-(8-3)); + }, + 208 => function ($stackPos) { + $this->semValue = null; + }, + 209 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 210 => function ($stackPos) { + $this->semValue = null; + }, + 211 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 212 => function ($stackPos) { + $this->semValue = 0; + }, + 213 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 214 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 215 => function ($stackPos) { + $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + }, + 216 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + }, + 217 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_FINAL; + }, + 218 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_READONLY; + }, + 219 => function ($stackPos) { + $this->semValue = null; + }, + 220 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 221 => function ($stackPos) { + $this->semValue = array(); + }, + 222 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 223 => function ($stackPos) { + $this->semValue = array(); + }, + 224 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 225 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 226 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 227 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 228 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + }, + 229 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 230 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + }, + 231 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 232 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + }, + 233 => function ($stackPos) { + $this->semValue = null; + }, + 234 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 235 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 236 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 237 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 238 => function ($stackPos) { + $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 239 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 240 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-3)]; + }, + 241 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 242 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(5-3)]; + }, + 243 => function ($stackPos) { + $this->semValue = array(); + }, + 244 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 245 => function ($stackPos) { + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 246 => function ($stackPos) { + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 247 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 248 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 249 => function ($stackPos) { + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + }, + 250 => function ($stackPos) { + $this->semValue = []; + }, + 251 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 252 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 253 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 254 => function ($stackPos) { + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 255 => function ($stackPos) { + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 256 => function ($stackPos) { + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + }, + 257 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 258 => function ($stackPos) { + $this->semValue = array(); + }, + 259 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 260 => function ($stackPos) { + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 261 => function ($stackPos) { + $this->semValue = array(); + }, + 262 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 263 => function ($stackPos) { + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 264 => function ($stackPos) { + $this->semValue = null; + }, + 265 => function ($stackPos) { + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 266 => function ($stackPos) { + $this->semValue = null; + }, + 267 => function ($stackPos) { + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 268 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + }, + 269 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + }, + 270 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + }, + 271 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + }, + 272 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 273 => function ($stackPos) { + $this->semValue = array(); + }, + 274 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 275 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 276 => function ($stackPos) { + $this->semValue = 0; + }, + 277 => function ($stackPos) { + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + }, + 278 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + }, + 279 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + }, + 280 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + }, + 281 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_READONLY; + }, + 282 => function ($stackPos) { + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->checkParam($this->semValue); + }, + 283 => function ($stackPos) { + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->checkParam($this->semValue); + }, + 284 => function ($stackPos) { + $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + }, + 285 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 286 => function ($stackPos) { + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 287 => function ($stackPos) { + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 288 => function ($stackPos) { + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 289 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 290 => function ($stackPos) { + $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 291 => function ($stackPos) { + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + }, + 292 => function ($stackPos) { + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 293 => function ($stackPos) { + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 294 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + }, + 295 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 296 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + }, + 297 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 298 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + }, + 299 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 300 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + }, + 301 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 302 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 303 => function ($stackPos) { + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 304 => function ($stackPos) { + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 305 => function ($stackPos) { + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 306 => function ($stackPos) { + $this->semValue = null; + }, + 307 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 308 => function ($stackPos) { + $this->semValue = null; + }, + 309 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 310 => function ($stackPos) { + $this->semValue = null; + }, + 311 => function ($stackPos) { + $this->semValue = array(); + }, + 312 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 313 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-2)]); + }, + 314 => function ($stackPos) { + $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 315 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 316 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 317 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 318 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 319 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 320 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + }, + 321 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 322 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 323 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 324 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 325 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 326 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 327 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 328 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 329 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 330 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + }, + 331 => function ($stackPos) { + $this->semValue = array(); + }, + 332 => function ($stackPos) { + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 333 => function ($stackPos) { + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); + $this->checkProperty($this->semValue, $stackPos-(5-2)); + }, + 334 => function ($stackPos) { + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); + $this->checkClassConst($this->semValue, $stackPos-(5-2)); + }, + 335 => function ($stackPos) { + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->checkClassMethod($this->semValue, $stackPos-(10-2)); + }, + 336 => function ($stackPos) { + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 337 => function ($stackPos) { + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 338 => function ($stackPos) { + $this->semValue = null; /* will be skipped */ + }, + 339 => function ($stackPos) { + $this->semValue = array(); + }, + 340 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 341 => function ($stackPos) { + $this->semValue = array(); + }, + 342 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 343 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 344 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 345 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 346 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 347 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 348 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + }, + 349 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 350 => function ($stackPos) { + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + }, + 351 => function ($stackPos) { + $this->semValue = null; + }, + 352 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 353 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 354 => function ($stackPos) { + $this->semValue = 0; + }, + 355 => function ($stackPos) { + $this->semValue = 0; + }, + 356 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 357 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 358 => function ($stackPos) { + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + }, + 359 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + }, + 360 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + }, + 361 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + }, + 362 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_STATIC; + }, + 363 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + }, + 364 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_FINAL; + }, + 365 => function ($stackPos) { + $this->semValue = Stmt\Class_::MODIFIER_READONLY; + }, + 366 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 367 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 368 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 369 => function ($stackPos) { + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 370 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 371 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 372 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 373 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 374 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 375 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 376 => function ($stackPos) { + $this->semValue = array(); + }, + 377 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 378 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 379 => function ($stackPos) { + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 380 => function ($stackPos) { + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 381 => function ($stackPos) { + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 382 => function ($stackPos) { + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 383 => function ($stackPos) { + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + if ($this->phpVersion >= 70000) { + $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); + } + + }, + 384 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 385 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 386 => function ($stackPos) { + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 387 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 388 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 389 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 390 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 391 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 392 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 393 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 394 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 395 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 396 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 397 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 398 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 399 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 400 => function ($stackPos) { + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 401 => function ($stackPos) { + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 402 => function ($stackPos) { + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 403 => function ($stackPos) { + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 404 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 405 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 406 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 407 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 408 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 409 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 410 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 411 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 412 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 413 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 414 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 415 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 416 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 417 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 418 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 419 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 420 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 421 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 422 => function ($stackPos) { + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 423 => function ($stackPos) { + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 424 => function ($stackPos) { + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 425 => function ($stackPos) { + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 426 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 427 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 428 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 429 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 430 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 431 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 432 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 433 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 434 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 435 => function ($stackPos) { + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 436 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 437 => function ($stackPos) { + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + }, + 438 => function ($stackPos) { + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 439 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 440 => function ($stackPos) { + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 441 => function ($stackPos) { + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 442 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 443 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 444 => function ($stackPos) { + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 445 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 446 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 447 => function ($stackPos) { + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 448 => function ($stackPos) { + $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); + $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); + }, + 449 => function ($stackPos) { + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 450 => function ($stackPos) { + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 451 => function ($stackPos) { + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 452 => function ($stackPos) { + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 453 => function ($stackPos) { + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 454 => function ($stackPos) { + $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); + }, + 455 => function ($stackPos) { + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 456 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 457 => function ($stackPos) { + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 458 => function ($stackPos) { + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 459 => function ($stackPos) { + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 460 => function ($stackPos) { + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 461 => function ($stackPos) { + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 462 => function ($stackPos) { + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 463 => function ($stackPos) { + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 464 => function ($stackPos) { + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + }, + 465 => function ($stackPos) { + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + }, + 466 => function ($stackPos) { + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + }, + 467 => function ($stackPos) { + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + }, + 468 => function ($stackPos) { + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + }, + 469 => function ($stackPos) { + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + }, + 470 => function ($stackPos) { + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + }, + 471 => function ($stackPos) { + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + }, + 472 => function ($stackPos) { + $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->checkClass($this->semValue[0], -1); + }, + 473 => function ($stackPos) { + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 474 => function ($stackPos) { + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 475 => function ($stackPos) { + $this->semValue = array(); + }, + 476 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-3)]; + }, + 477 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 478 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 479 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 480 => function ($stackPos) { + $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 481 => function ($stackPos) { + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 482 => function ($stackPos) { + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 483 => function ($stackPos) { + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 484 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 485 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 486 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 487 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 488 => function ($stackPos) { + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 489 => function ($stackPos) { + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 490 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 491 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 492 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 493 => function ($stackPos) { + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + }, + 494 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 495 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 496 => function ($stackPos) { + $this->semValue = null; + }, + 497 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 498 => function ($stackPos) { + $this->semValue = array(); + }, + 499 => function ($stackPos) { + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + }, + 500 => function ($stackPos) { + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 501 => function ($stackPos) { + $this->semValue = array(); + }, + 502 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 503 => function ($stackPos) { + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 504 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 505 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 506 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 507 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 508 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 509 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 510 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 511 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 512 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 513 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + }, + 514 => function ($stackPos) { + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + }, + 515 => function ($stackPos) { + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + }, + 516 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 517 => function ($stackPos) { + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 518 => function ($stackPos) { + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); + }, + 519 => function ($stackPos) { + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion < 70000); + }, + 520 => function ($stackPos) { + $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 521 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 522 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 523 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 524 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + }, + 525 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + }, + 526 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + }, + 527 => function ($stackPos) { + $this->semValue = null; + }, + 528 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 529 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 530 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 531 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 532 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 533 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 534 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 535 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 536 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 537 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 538 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 539 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 540 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 541 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 542 => function ($stackPos) { + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 543 => function ($stackPos) { + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 544 => function ($stackPos) { + $this->semValue = null; + }, + 545 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 546 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 547 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 548 => function ($stackPos) { + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 549 => function ($stackPos) { + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 550 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 551 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 552 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 553 => function ($stackPos) { + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + }, + 554 => function ($stackPos) { + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + }, + 555 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 556 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 557 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 558 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 559 => function ($stackPos) { + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 560 => function ($stackPos) { + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 561 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 562 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 563 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 564 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 565 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 566 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 567 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 568 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 569 => function ($stackPos) { + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + }, + 570 => function ($stackPos) { + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 571 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + }, + 572 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos]; + }, + 573 => function ($stackPos) { + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + }, + 574 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 575 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 576 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 577 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 578 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 579 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 580 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 581 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 582 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 583 => function ($stackPos) { + $this->semValue = null; + }, + 584 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 585 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 586 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 587 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + }, + 588 => function ($stackPos) { + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 589 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 590 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 591 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 592 => function ($stackPos) { + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 593 => function ($stackPos) { + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 594 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 595 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 596 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 597 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 598 => function ($stackPos) { + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 599 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 600 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 601 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + ]; + } +} diff --git a/lib/PhpParser/ParserFactory.php b/lib/PhpParser/ParserFactory.php index 788a944d75..7698f3535a 100644 --- a/lib/PhpParser/ParserFactory.php +++ b/lib/PhpParser/ParserFactory.php @@ -3,6 +3,7 @@ namespace PhpParser; use PhpParser\Parser\Php7; +use PhpParser\Parser\Php8; class ParserFactory { @@ -46,6 +47,9 @@ public function createForVersion(string $version, array $lexerOptions = [], arra } else { $lexer = new Lexer\Emulative($lexerOptions + ['phpVersion' => $version]); } + if (version_compare($version, '8.0', '>=')) { + return new Php8($lexer, $parserOptions + ['phpVersion' => $version]); + } return new Php7($lexer, $parserOptions + ['phpVersion' => $version]); } diff --git a/test/PhpParser/Parser/Php8Test.php b/test/PhpParser/Parser/Php8Test.php new file mode 100644 index 0000000000..f771672daf --- /dev/null +++ b/test/PhpParser/Parser/Php8Test.php @@ -0,0 +1,13 @@ + Date: Sun, 19 Jun 2022 21:05:31 +0200 Subject: [PATCH 093/428] Add Parser::getLexer() method Not sure if this is going to stick, but for now this makes it easier to obtain the Lexer instance when creating the parser via ParserFactory. --- lib/PhpParser/Parser.php | 7 +++++++ lib/PhpParser/ParserAbstract.php | 4 ++++ test/PhpParser/ParserTest.php | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/lib/PhpParser/Parser.php b/lib/PhpParser/Parser.php index 6a1117af8c..353c80628b 100644 --- a/lib/PhpParser/Parser.php +++ b/lib/PhpParser/Parser.php @@ -15,4 +15,11 @@ interface Parser * the parser was unable to recover from an error). */ public function parse(string $code, ErrorHandler $errorHandler = null): ?array; + + /** + * Return the lexer used by this parser instance. + * + * @return Lexer + */ + public function getLexer(): Lexer; } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 14b5ef2be7..cdd005070b 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -184,6 +184,10 @@ public function parse(string $code, ErrorHandler $errorHandler = null): ?array { return $result; } + public function getLexer(): Lexer { + return $this->lexer; + } + protected function doParse() { // We start off with no lookahead-token $symbol = self::SYMBOL_NONE; diff --git a/test/PhpParser/ParserTest.php b/test/PhpParser/ParserTest.php index 6a240da98f..e54c67f190 100644 --- a/test/PhpParser/ParserTest.php +++ b/test/PhpParser/ParserTest.php @@ -177,6 +177,12 @@ public function provideTestExtraAttributes() { [" ( REAL ) 5.0", ['kind' => Expr\Cast\Double::KIND_REAL]], ]; } + + public function testGetLexer() { + $lexer = new Lexer; + $parser = $this->getParser($lexer); + $this->assertSame($lexer, $parser->getLexer()); + } } class InvalidTokenLexer extends Lexer From 0086a261d016117f666436b15d33ee1ddaea0699 Mon Sep 17 00:00:00 2001 From: MathiasReker Date: Mon, 4 Jul 2022 17:10:29 +0200 Subject: [PATCH 094/428] Short scalar cast Cast (boolean) and (integer) should be written as (bool) and (int), (double) and (real) as (float), (binary) as (string). --- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 1c74107270..21cb18e074 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -215,7 +215,7 @@ protected function pScalar_DNumber(Scalar\DNumber $node) { // Try to find a short full-precision representation $stringValue = sprintf('%.16G', $node->value); - if ($node->value !== (double) $stringValue) { + if ($node->value !== (float) $stringValue) { $stringValue = sprintf('%.17G', $node->value); } From 572af7fff21aa5e2f4a391e5b9f2942929a0eee7 Mon Sep 17 00:00:00 2001 From: MathiasReker Date: Mon, 4 Jul 2022 17:23:06 +0200 Subject: [PATCH 095/428] No unused imports Unused use statements must be removed. --- lib/PhpParser/Node/Arg.php | 1 - lib/PhpParser/Node/IntersectionType.php | 1 - lib/PhpParser/ParserAbstract.php | 2 -- 3 files changed, 4 deletions(-) diff --git a/lib/PhpParser/Node/Arg.php b/lib/PhpParser/Node/Arg.php index bcf130e68c..b25b0904a2 100644 --- a/lib/PhpParser/Node/Arg.php +++ b/lib/PhpParser/Node/Arg.php @@ -2,7 +2,6 @@ namespace PhpParser\Node; -use PhpParser\Node\VariadicPlaceholder; use PhpParser\NodeAbstract; class Arg extends NodeAbstract diff --git a/lib/PhpParser/Node/IntersectionType.php b/lib/PhpParser/Node/IntersectionType.php index 9208e1392d..da7a3a85c5 100644 --- a/lib/PhpParser/Node/IntersectionType.php +++ b/lib/PhpParser/Node/IntersectionType.php @@ -2,7 +2,6 @@ namespace PhpParser\Node; -use PhpParser\NodeAbstract; class IntersectionType extends ComplexType { diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index cdd005070b..ec4cef6e10 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -6,7 +6,6 @@ * This parser is based on a skeleton written by Moriyoshi Koizumi, which in * turn is based on work by Masato Bito. */ -use PhpParser\Node\Expr; use PhpParser\Node\Expr\Cast\Double; use PhpParser\Node\Name; use PhpParser\Node\Param; @@ -22,7 +21,6 @@ use PhpParser\Node\Stmt\Property; use PhpParser\Node\Stmt\TryCatch; use PhpParser\Node\Stmt\UseUse; -use PhpParser\Node\VarLikeIdentifier; use PhpParser\Parser\Tokens; abstract class ParserAbstract implements Parser From 653757bec67388a3579e491bcd51dd6080bdfbc5 Mon Sep 17 00:00:00 2001 From: MathiasReker Date: Mon, 4 Jul 2022 17:08:08 +0200 Subject: [PATCH 096/428] Nullable type declaration for default null value Adds ? before type declarations for parameters with a default null value --- lib/PhpParser/ConstExprEvaluator.php | 2 +- lib/PhpParser/Lexer.php | 2 +- lib/PhpParser/Lexer/Emulative.php | 2 +- lib/PhpParser/NameContext.php | 2 +- lib/PhpParser/Node/Arg.php | 2 +- lib/PhpParser/Node/Expr/ArrayDimFetch.php | 2 +- lib/PhpParser/Node/Expr/ArrayItem.php | 2 +- lib/PhpParser/Node/Expr/Exit_.php | 2 +- lib/PhpParser/Node/Expr/Yield_.php | 2 +- lib/PhpParser/Node/Name.php | 2 +- lib/PhpParser/Node/Param.php | 2 +- lib/PhpParser/Node/Stmt/Break_.php | 2 +- lib/PhpParser/Node/Stmt/Catch_.php | 2 +- lib/PhpParser/Node/Stmt/Continue_.php | 2 +- lib/PhpParser/Node/Stmt/Declare_.php | 2 +- lib/PhpParser/Node/Stmt/EnumCase.php | 2 +- lib/PhpParser/Node/Stmt/Namespace_.php | 2 +- lib/PhpParser/Node/Stmt/PropertyProperty.php | 2 +- lib/PhpParser/Node/Stmt/Return_.php | 2 +- lib/PhpParser/Node/Stmt/StaticVar.php | 2 +- lib/PhpParser/Node/Stmt/TryCatch.php | 2 +- lib/PhpParser/NodeDumper.php | 2 +- lib/PhpParser/NodeVisitor/NameResolver.php | 4 ++-- lib/PhpParser/Parser.php | 2 +- lib/PhpParser/ParserAbstract.php | 2 +- lib/PhpParser/ParserFactory.php | 2 +- 26 files changed, 27 insertions(+), 27 deletions(-) diff --git a/lib/PhpParser/ConstExprEvaluator.php b/lib/PhpParser/ConstExprEvaluator.php index 2c82cc0565..06b73cc80d 100644 --- a/lib/PhpParser/ConstExprEvaluator.php +++ b/lib/PhpParser/ConstExprEvaluator.php @@ -37,7 +37,7 @@ class ConstExprEvaluator * * @param callable|null $fallbackEvaluator To call if subexpression cannot be evaluated */ - public function __construct(callable $fallbackEvaluator = null) { + public function __construct(?callable $fallbackEvaluator = null) { $this->fallbackEvaluator = $fallbackEvaluator ?? function(Expr $expr) { throw new ConstExprEvaluationException( "Expression of type {$expr->getType()} cannot be evaluated" diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index d885bd9f2c..3c28bafc77 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -66,7 +66,7 @@ public function __construct(array $options = []) { * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to * ErrorHandler\Throwing */ - public function startLexing(string $code, ErrorHandler $errorHandler = null) { + public function startLexing(string $code, ?ErrorHandler $errorHandler = null) { if (null === $errorHandler) { $errorHandler = new ErrorHandler\Throwing(); } diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 77db38a118..894ac45e55 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -71,7 +71,7 @@ public function __construct(array $options = []) } } - public function startLexing(string $code, ErrorHandler $errorHandler = null) { + public function startLexing(string $code, ?ErrorHandler $errorHandler = null) { $emulators = array_filter($this->emulators, function($emulator) use($code) { return $emulator->isEmulationNeeded($code); }); diff --git a/lib/PhpParser/NameContext.php b/lib/PhpParser/NameContext.php index 07c76a493e..600c73128f 100644 --- a/lib/PhpParser/NameContext.php +++ b/lib/PhpParser/NameContext.php @@ -36,7 +36,7 @@ public function __construct(ErrorHandler $errorHandler) { * * @param Name|null $namespace Null is the global namespace */ - public function startNamespace(Name $namespace = null) { + public function startNamespace(?Name $namespace = null) { $this->namespace = $namespace; $this->origAliases = $this->aliases = [ Stmt\Use_::TYPE_NORMAL => [], diff --git a/lib/PhpParser/Node/Arg.php b/lib/PhpParser/Node/Arg.php index b25b0904a2..c6009f0cde 100644 --- a/lib/PhpParser/Node/Arg.php +++ b/lib/PhpParser/Node/Arg.php @@ -26,7 +26,7 @@ class Arg extends NodeAbstract */ public function __construct( Expr $value, bool $byRef = false, bool $unpack = false, array $attributes = [], - Identifier $name = null + ?Identifier $name = null ) { $this->attributes = $attributes; $this->name = $name; diff --git a/lib/PhpParser/Node/Expr/ArrayDimFetch.php b/lib/PhpParser/Node/Expr/ArrayDimFetch.php index 71694478e9..46db975c4c 100644 --- a/lib/PhpParser/Node/Expr/ArrayDimFetch.php +++ b/lib/PhpParser/Node/Expr/ArrayDimFetch.php @@ -18,7 +18,7 @@ class ArrayDimFetch extends Expr * @param null|Expr $dim Array index / dim * @param array $attributes Additional attributes */ - public function __construct(Expr $var, Expr $dim = null, array $attributes = []) { + public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->dim = $dim; diff --git a/lib/PhpParser/Node/Expr/ArrayItem.php b/lib/PhpParser/Node/Expr/ArrayItem.php index 1b078f8218..5aaa9867ee 100644 --- a/lib/PhpParser/Node/Expr/ArrayItem.php +++ b/lib/PhpParser/Node/Expr/ArrayItem.php @@ -23,7 +23,7 @@ class ArrayItem extends Expr * @param bool $byRef Whether to assign by reference * @param array $attributes Additional attributes */ - public function __construct(Expr $value, Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) { + public function __construct(Expr $value, ?Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) { $this->attributes = $attributes; $this->key = $key; $this->value = $value; diff --git a/lib/PhpParser/Node/Expr/Exit_.php b/lib/PhpParser/Node/Expr/Exit_.php index b88a8f7e6f..5469b8e4ca 100644 --- a/lib/PhpParser/Node/Expr/Exit_.php +++ b/lib/PhpParser/Node/Expr/Exit_.php @@ -19,7 +19,7 @@ class Exit_ extends Expr * @param null|Expr $expr Expression * @param array $attributes Additional attributes */ - public function __construct(Expr $expr = null, array $attributes = []) { + public function __construct(?Expr $expr = null, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } diff --git a/lib/PhpParser/Node/Expr/Yield_.php b/lib/PhpParser/Node/Expr/Yield_.php index aef8fc333d..f15336edeb 100644 --- a/lib/PhpParser/Node/Expr/Yield_.php +++ b/lib/PhpParser/Node/Expr/Yield_.php @@ -18,7 +18,7 @@ class Yield_ extends Expr * @param null|Expr $key Key expression * @param array $attributes Additional attributes */ - public function __construct(Expr $value = null, Expr $key = null, array $attributes = []) { + public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) { $this->attributes = $attributes; $this->key = $key; $this->value = $value; diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index 6b1cc9f8ed..55a783ed65 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -150,7 +150,7 @@ public function __toString() : string { * * @return static|null Sliced name */ - public function slice(int $offset, int $length = null) { + public function slice(int $offset, ?int $length = null) { $numParts = count($this->parts); $realOffset = $offset < 0 ? $offset + $numParts : $offset; diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index 1e90b79441..dfb77f6290 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -34,7 +34,7 @@ class Param extends NodeAbstract * @param AttributeGroup[] $attrGroups PHP attribute groups */ public function __construct( - $var, Expr $default = null, $type = null, + $var, ?Expr $default = null, $type = null, bool $byRef = false, bool $variadic = false, array $attributes = [], int $flags = 0, diff --git a/lib/PhpParser/Node/Stmt/Break_.php b/lib/PhpParser/Node/Stmt/Break_.php index 6adc5a6c6f..d9464a1ae8 100644 --- a/lib/PhpParser/Node/Stmt/Break_.php +++ b/lib/PhpParser/Node/Stmt/Break_.php @@ -15,7 +15,7 @@ class Break_ extends Node\Stmt * @param null|Node\Expr $num Number of loops to break * @param array $attributes Additional attributes */ - public function __construct(Node\Expr $num = null, array $attributes = []) { + public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->attributes = $attributes; $this->num = $num; } diff --git a/lib/PhpParser/Node/Stmt/Catch_.php b/lib/PhpParser/Node/Stmt/Catch_.php index 9b9c094782..5d7b5c0168 100644 --- a/lib/PhpParser/Node/Stmt/Catch_.php +++ b/lib/PhpParser/Node/Stmt/Catch_.php @@ -23,7 +23,7 @@ class Catch_ extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct( - array $types, Expr\Variable $var = null, array $stmts = [], array $attributes = [] + array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = [] ) { $this->attributes = $attributes; $this->types = $types; diff --git a/lib/PhpParser/Node/Stmt/Continue_.php b/lib/PhpParser/Node/Stmt/Continue_.php index 24882683b3..f2b30d79f5 100644 --- a/lib/PhpParser/Node/Stmt/Continue_.php +++ b/lib/PhpParser/Node/Stmt/Continue_.php @@ -15,7 +15,7 @@ class Continue_ extends Node\Stmt * @param null|Node\Expr $num Number of loops to continue * @param array $attributes Additional attributes */ - public function __construct(Node\Expr $num = null, array $attributes = []) { + public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->attributes = $attributes; $this->num = $num; } diff --git a/lib/PhpParser/Node/Stmt/Declare_.php b/lib/PhpParser/Node/Stmt/Declare_.php index f46ff0bafd..a3a5bfaa59 100644 --- a/lib/PhpParser/Node/Stmt/Declare_.php +++ b/lib/PhpParser/Node/Stmt/Declare_.php @@ -18,7 +18,7 @@ class Declare_ extends Node\Stmt * @param Node\Stmt[]|null $stmts Statements * @param array $attributes Additional attributes */ - public function __construct(array $declares, array $stmts = null, array $attributes = []) { + public function __construct(array $declares, ?array $stmts = null, array $attributes = []) { $this->attributes = $attributes; $this->declares = $declares; $this->stmts = $stmts; diff --git a/lib/PhpParser/Node/Stmt/EnumCase.php b/lib/PhpParser/Node/Stmt/EnumCase.php index 5beff8b39f..4b1079bcd7 100644 --- a/lib/PhpParser/Node/Stmt/EnumCase.php +++ b/lib/PhpParser/Node/Stmt/EnumCase.php @@ -20,7 +20,7 @@ class EnumCase extends Node\Stmt * @param AttributeGroup[] $attrGroups PHP attribute groups * @param array $attributes Additional attributes */ - public function __construct($name, Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { + public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { parent::__construct($attributes); $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->expr = $expr; diff --git a/lib/PhpParser/Node/Stmt/Namespace_.php b/lib/PhpParser/Node/Stmt/Namespace_.php index c93aa4c332..bbcb1c4b10 100644 --- a/lib/PhpParser/Node/Stmt/Namespace_.php +++ b/lib/PhpParser/Node/Stmt/Namespace_.php @@ -22,7 +22,7 @@ class Namespace_ extends Node\Stmt * @param null|Node\Stmt[] $stmts Statements * @param array $attributes Additional attributes */ - public function __construct(Node\Name $name = null, ?array $stmts = [], array $attributes = []) { + public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->name = $name; $this->stmts = $stmts; diff --git a/lib/PhpParser/Node/Stmt/PropertyProperty.php b/lib/PhpParser/Node/Stmt/PropertyProperty.php index 205731e20e..286b42961c 100644 --- a/lib/PhpParser/Node/Stmt/PropertyProperty.php +++ b/lib/PhpParser/Node/Stmt/PropertyProperty.php @@ -18,7 +18,7 @@ class PropertyProperty extends Node\Stmt * @param null|Node\Expr $default Default value * @param array $attributes Additional attributes */ - public function __construct($name, Node\Expr $default = null, array $attributes = []) { + public function __construct($name, ?Node\Expr $default = null, array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; $this->default = $default; diff --git a/lib/PhpParser/Node/Stmt/Return_.php b/lib/PhpParser/Node/Stmt/Return_.php index efc578c58f..53731254c0 100644 --- a/lib/PhpParser/Node/Stmt/Return_.php +++ b/lib/PhpParser/Node/Stmt/Return_.php @@ -15,7 +15,7 @@ class Return_ extends Node\Stmt * @param null|Node\Expr $expr Expression * @param array $attributes Additional attributes */ - public function __construct(Node\Expr $expr = null, array $attributes = []) { + public function __construct(?Node\Expr $expr = null, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } diff --git a/lib/PhpParser/Node/Stmt/StaticVar.php b/lib/PhpParser/Node/Stmt/StaticVar.php index 29584560d3..0cc47b4122 100644 --- a/lib/PhpParser/Node/Stmt/StaticVar.php +++ b/lib/PhpParser/Node/Stmt/StaticVar.php @@ -20,7 +20,7 @@ class StaticVar extends Node\Stmt * @param array $attributes Additional attributes */ public function __construct( - Expr\Variable $var, Node\Expr $default = null, array $attributes = [] + Expr\Variable $var, ?Node\Expr $default = null, array $attributes = [] ) { $this->attributes = $attributes; $this->var = $var; diff --git a/lib/PhpParser/Node/Stmt/TryCatch.php b/lib/PhpParser/Node/Stmt/TryCatch.php index 7fc158c570..74e004380b 100644 --- a/lib/PhpParser/Node/Stmt/TryCatch.php +++ b/lib/PhpParser/Node/Stmt/TryCatch.php @@ -21,7 +21,7 @@ class TryCatch extends Node\Stmt * @param null|Finally_ $finally Optional finally node * @param array $attributes Additional attributes */ - public function __construct(array $stmts, array $catches, Finally_ $finally = null, array $attributes = []) { + public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) { $this->attributes = $attributes; $this->stmts = $stmts; $this->catches = $catches; diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index c5b980d3f9..a0840d2fed 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -39,7 +39,7 @@ public function __construct(array $options = []) { * * @return string Dumped value */ - public function dump($node, string $code = null) : string { + public function dump($node, ?string $code = null) : string { $this->code = $code; return $this->dumpRecursive($node); } diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index b4abbe1cd5..063f972b2a 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -35,7 +35,7 @@ class NameResolver extends NodeVisitorAbstract * @param ErrorHandler|null $errorHandler Error handler * @param array $options Options */ - public function __construct(ErrorHandler $errorHandler = null, array $options = []) { + public function __construct(?ErrorHandler $errorHandler = null, array $options = []) { $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing); $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? false; $this->replaceNodes = $options['replaceNodes'] ?? true; @@ -161,7 +161,7 @@ public function enterNode(Node $node) { return null; } - private function addAlias(Stmt\UseUse $use, $type, Name $prefix = null) { + private 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 diff --git a/lib/PhpParser/Parser.php b/lib/PhpParser/Parser.php index 353c80628b..31d99e96ef 100644 --- a/lib/PhpParser/Parser.php +++ b/lib/PhpParser/Parser.php @@ -14,7 +14,7 @@ interface Parser * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * the parser was unable to recover from an error). */ - public function parse(string $code, ErrorHandler $errorHandler = null): ?array; + public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array; /** * Return the lexer used by this parser instance. diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index ec4cef6e10..b8616575df 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -166,7 +166,7 @@ private function parseVersion(string $version): int { * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * the parser was unable to recover from an error). */ - public function parse(string $code, ErrorHandler $errorHandler = null): ?array { + public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array { $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing; $this->lexer->startLexing($code, $this->errorHandler); diff --git a/lib/PhpParser/ParserFactory.php b/lib/PhpParser/ParserFactory.php index 7698f3535a..1a8bd22adc 100644 --- a/lib/PhpParser/ParserFactory.php +++ b/lib/PhpParser/ParserFactory.php @@ -21,7 +21,7 @@ class ParserFactory * * @deprecated Use createForVersion(), createForNewestSupportedVersion() or createForHostVersion() instead. */ - public function create(int $kind, Lexer $lexer = null, array $parserOptions = []): Parser { + public function create(int $kind, ?Lexer $lexer = null, array $parserOptions = []): Parser { if (null === $lexer) { $lexer = new Lexer\Emulative(); } From 4021a63cef9358bdb3bf3c980b49d27a287782d4 Mon Sep 17 00:00:00 2001 From: MathiasReker Date: Mon, 4 Jul 2022 17:22:32 +0200 Subject: [PATCH 097/428] No superfluous elseif Replaces superfluous elseif with if. --- lib/PhpParser/Comment.php | 9 ++++++--- lib/PhpParser/Node/Name.php | 12 ++++++++---- lib/PhpParser/Node/Scalar/String_.php | 6 ++++-- lib/PhpParser/ParserAbstract.php | 6 ++++-- lib/PhpParser/PrettyPrinter/Standard.php | 3 ++- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index 61e98d3dca..2c604c2f91 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -155,7 +155,8 @@ public function getReformattedText() { if (false === $newlinePos) { // Single line comments don't need further processing return $text; - } elseif (preg_match('((*BSR_ANYCRLF)(*ANYCRLF)^.*(?:\R\s+\*.*)+$)', $text)) { + } + if (preg_match('((*BSR_ANYCRLF)(*ANYCRLF)^.*(?:\R\s+\*.*)+$)', $text)) { // Multi line comment of the type // // /* @@ -165,7 +166,8 @@ public function getReformattedText() { // // 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)) { + } + if (preg_match('(^/\*\*?\s*[\r\n])', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { // Multi line comment of the type // // /* @@ -177,7 +179,8 @@ public function getReformattedText() { // */ 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)) { + } + if (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) { // Multi line comment of the type // // /* Some text. diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index 55a783ed65..6f23b12e00 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -195,9 +195,11 @@ public function slice(int $offset, ?int $length = null) { public static function concat($name1, $name2, array $attributes = []) { if (null === $name1 && null === $name2) { return null; - } elseif (null === $name1) { + } + if (null === $name1) { return new static(self::prepareName($name2), $attributes); - } elseif (null === $name2) { + } + if (null === $name2) { return new static(self::prepareName($name1), $attributes); } else { return new static( @@ -221,13 +223,15 @@ private static function prepareName($name) : array { } return explode('\\', $name); - } elseif (\is_array($name)) { + } + if (\is_array($name)) { if (empty($name)) { throw new \InvalidArgumentException('Name cannot be empty'); } return $name; - } elseif ($name instanceof self) { + } + if ($name instanceof self) { return $name->parts; } diff --git a/lib/PhpParser/Node/Scalar/String_.php b/lib/PhpParser/Node/Scalar/String_.php index 5c27a27ef9..ce4565b8e2 100644 --- a/lib/PhpParser/Node/Scalar/String_.php +++ b/lib/PhpParser/Node/Scalar/String_.php @@ -115,9 +115,11 @@ function($matches) { if (isset(self::$replacements[$str])) { return self::$replacements[$str]; - } elseif ('x' === $str[0] || 'X' === $str[0]) { + } + if ('x' === $str[0] || 'X' === $str[0]) { return chr(hexdec(substr($str, 1))); - } elseif ('u' === $str[0]) { + } + if ('u' === $str[0]) { return self::codePointToUtf8(hexdec($matches[2])); } else { return chr(octdec($str)); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index b8616575df..cf3a3755c7 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -289,7 +289,8 @@ protected function doParse() { /* accept */ //$this->traceAccept(); return $this->semValue; - } elseif ($rule !== $this->unexpectedTokenRule) { + } + if ($rule !== $this->unexpectedTokenRule) { /* reduce */ //$this->traceReduce($rule); @@ -494,7 +495,8 @@ protected function handleNamespaces(array $stmts) : array { if (null === $style) { // not namespaced, nothing to do return $stmts; - } elseif ('brace' === $style) { + } + if ('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) { diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 21cb18e074..3469ce96f1 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -206,7 +206,8 @@ protected function pScalar_DNumber(Scalar\DNumber $node) { if (!is_finite($node->value)) { if ($node->value === \INF) { return '\INF'; - } elseif ($node->value === -\INF) { + } + if ($node->value === -\INF) { return '-\INF'; } else { return '\NAN'; From de4ac93023427c778eecc5ce14d194f1b33c8cd6 Mon Sep 17 00:00:00 2001 From: MathiasReker Date: Mon, 4 Jul 2022 17:17:01 +0200 Subject: [PATCH 098/428] Single blank line at eof A PHP file without end tag must always end with a single empty line feed. --- lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php | 2 +- lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php | 2 +- lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php | 2 +- lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php | 2 +- lib/PhpParser/Node/ClosureUse.php | 2 +- lib/PhpParser/Node/Expr/CallLike.php | 2 +- lib/PhpParser/Node/Expr/ClosureUse.php | 2 +- lib/PhpParser/Node/VariadicPlaceholder.php | 2 +- lib/PhpParser/Token.php | 2 +- lib/PhpParser/compatibility_tokens.php | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php index 480b68d199..f8d6655f36 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php @@ -28,4 +28,4 @@ protected function isKeywordContext(array $tokens, int $pos): bool && $tokens[$pos + 1]->id === \T_WHITESPACE && $tokens[$pos + 2]->id === \T_STRING; } -} \ No newline at end of file +} diff --git a/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php index 977309a258..3b8ba4cb7f 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -43,4 +43,4 @@ public function reverseEmulate(string $code, array $tokens): array { // Explicit octals were not legal code previously, don't bother. return $tokens; } -} \ No newline at end of file +} diff --git a/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php index eb7e49634a..57d3081383 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php @@ -20,4 +20,4 @@ public function getKeywordToken(): int { return \T_FN; } -} \ No newline at end of file +} diff --git a/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php index 90093f66b2..f587115e61 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php @@ -33,4 +33,4 @@ public function reverseEmulate(string $code, array $tokens): array { public function preprocessCode(string $code, array &$patches): string { return $code; } -} \ No newline at end of file +} diff --git a/lib/PhpParser/Node/ClosureUse.php b/lib/PhpParser/Node/ClosureUse.php index cd4dede33a..26348daa9e 100644 --- a/lib/PhpParser/Node/ClosureUse.php +++ b/lib/PhpParser/Node/ClosureUse.php @@ -34,4 +34,4 @@ public function getType() : string { } // @deprecated compatibility alias -class_alias(ClosureUse::class, Expr\ClosureUse::class); \ No newline at end of file +class_alias(ClosureUse::class, Expr\ClosureUse::class); diff --git a/lib/PhpParser/Node/Expr/CallLike.php b/lib/PhpParser/Node/Expr/CallLike.php index 78e1cf3494..7042f5f4d9 100644 --- a/lib/PhpParser/Node/Expr/CallLike.php +++ b/lib/PhpParser/Node/Expr/CallLike.php @@ -36,4 +36,4 @@ public function getArgs(): array { assert(!$this->isFirstClassCallable()); return $this->getRawArgs(); } -} \ No newline at end of file +} diff --git a/lib/PhpParser/Node/Expr/ClosureUse.php b/lib/PhpParser/Node/Expr/ClosureUse.php index d30a615589..681ff317be 100644 --- a/lib/PhpParser/Node/Expr/ClosureUse.php +++ b/lib/PhpParser/Node/Expr/ClosureUse.php @@ -1,3 +1,3 @@ line + \substr_count($this->text, "\n"); } -} \ No newline at end of file +} diff --git a/lib/PhpParser/compatibility_tokens.php b/lib/PhpParser/compatibility_tokens.php index 2b2249be36..4ca8b7f474 100644 --- a/lib/PhpParser/compatibility_tokens.php +++ b/lib/PhpParser/compatibility_tokens.php @@ -57,4 +57,4 @@ function defineCompatibilityTokens(): void { } defineCompatibilityTokens(); -} \ No newline at end of file +} From a3f2bb634d7d675e7036d06e3e18aa2c606559b6 Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 21 Jul 2022 03:27:18 +0300 Subject: [PATCH 099/428] Add __serialize/__unserialize to ClassMethod::$magicNames --- lib/PhpParser/Node/Stmt/ClassMethod.php | 32 +++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index e2064286eb..f0ac6b62bc 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -23,21 +23,23 @@ class ClassMethod extends Node\Stmt implements FunctionLike public $attrGroups; private static $magicNames = [ - '__construct' => true, - '__destruct' => true, - '__call' => true, - '__callstatic' => true, - '__get' => true, - '__set' => true, - '__isset' => true, - '__unset' => true, - '__sleep' => true, - '__wakeup' => true, - '__tostring' => true, - '__set_state' => true, - '__clone' => true, - '__invoke' => true, - '__debuginfo' => true, + '__construct' => true, + '__destruct' => true, + '__call' => true, + '__callstatic' => true, + '__get' => true, + '__set' => true, + '__isset' => true, + '__unset' => true, + '__sleep' => true, + '__wakeup' => true, + '__tostring' => true, + '__set_state' => true, + '__clone' => true, + '__invoke' => true, + '__debuginfo' => true, + '__serialize' => true, + '__unserialize' => true, ]; /** From 050342b5df38de0bf5db439895b2f1791444bafa Mon Sep 17 00:00:00 2001 From: MathiasReker Date: Mon, 4 Jul 2022 17:11:08 +0200 Subject: [PATCH 100/428] Add visibility modifiers to constants Closes GH-848. --- grammar/parser.template | 2 +- lib/PhpParser/Builder/TraitUseAdaptation.php | 6 +- lib/PhpParser/Internal/DiffElem.php | 8 +- lib/PhpParser/Lexer/Emulative.php | 8 +- .../FlexibleDocStringEmulator.php | 2 +- .../Lexer/TokenEmulator/KeywordEmulator.php | 4 +- .../NumericLiteralSeparatorEmulator.php | 14 +- lib/PhpParser/Node/Expr/Array_.php | 4 +- lib/PhpParser/Node/Expr/Cast/Double.php | 6 +- lib/PhpParser/Node/Expr/Exit_.php | 4 +- lib/PhpParser/Node/Expr/Include_.php | 8 +- lib/PhpParser/Node/Scalar/LNumber.php | 8 +- lib/PhpParser/Node/Scalar/String_.php | 8 +- lib/PhpParser/Node/Stmt/Class_.php | 18 +- lib/PhpParser/Node/Stmt/Namespace_.php | 4 +- lib/PhpParser/Node/Stmt/Use_.php | 8 +- lib/PhpParser/NodeTraverser.php | 8 +- lib/PhpParser/Parser/Php7.php | 280 +++++++++--------- lib/PhpParser/Parser/Php8.php | 280 +++++++++--------- lib/PhpParser/ParserAbstract.php | 2 +- lib/PhpParser/ParserFactory.php | 4 +- lib/PhpParser/PrettyPrinterAbstract.php | 14 +- 22 files changed, 350 insertions(+), 350 deletions(-) diff --git a/grammar/parser.template b/grammar/parser.template index 95e8b7fa69..f9c172f391 100644 --- a/grammar/parser.template +++ b/grammar/parser.template @@ -24,7 +24,7 @@ use PhpParser\Node\Stmt; class #(-p) extends \PhpParser\ParserAbstract { #tokenval - const %s = %n; + public const %s = %n; #endtokenval protected $tokenToSymbolMapSize = #(YYMAXLEX); diff --git a/lib/PhpParser/Builder/TraitUseAdaptation.php b/lib/PhpParser/Builder/TraitUseAdaptation.php index eb6c0b622d..c9e7237238 100644 --- a/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -9,9 +9,9 @@ class TraitUseAdaptation implements Builder { - const TYPE_UNDEFINED = 0; - const TYPE_ALIAS = 1; - const TYPE_PRECEDENCE = 2; + public const TYPE_UNDEFINED = 0; + public const TYPE_ALIAS = 1; + public const TYPE_PRECEDENCE = 2; /** @var int Type of building adaptation */ protected $type; diff --git a/lib/PhpParser/Internal/DiffElem.php b/lib/PhpParser/Internal/DiffElem.php index a38b57ba93..a26d557a02 100644 --- a/lib/PhpParser/Internal/DiffElem.php +++ b/lib/PhpParser/Internal/DiffElem.php @@ -7,10 +7,10 @@ */ class DiffElem { - const TYPE_KEEP = 0; - const TYPE_REMOVE = 1; - const TYPE_ADD = 2; - const TYPE_REPLACE = 3; + public const TYPE_KEEP = 0; + public const TYPE_REMOVE = 1; + public const TYPE_ADD = 2; + public const TYPE_REPLACE = 3; /** @var int One of the TYPE_* constants */ public $type; diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 894ac45e55..1fc6533934 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -20,10 +20,10 @@ class Emulative extends Lexer { - const PHP_7_3 = '7.3dev'; - const PHP_7_4 = '7.4dev'; - const PHP_8_0 = '8.0dev'; - const PHP_8_1 = '8.1dev'; + public const PHP_7_3 = '7.3dev'; + public const PHP_7_4 = '7.4dev'; + public const PHP_8_0 = '8.0dev'; + public const PHP_8_1 = '8.1dev'; /** @var mixed[] Patches used to reverse changes introduced in the code */ private $patches = []; diff --git a/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php index c15d6271fc..b7cc090551 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php @@ -6,7 +6,7 @@ final class FlexibleDocStringEmulator extends TokenEmulator { - const FLEXIBLE_DOC_STRING_REGEX = <<<'REGEX' + private const FLEXIBLE_DOC_STRING_REGEX = <<<'REGEX' /<<<[ \t]*(['"]?)([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)\1\r?\n (?:.*\r?\n)*? (?\h*)\2(?![a-zA-Z0-9_\x80-\xff])(?(?:;?[\r\n])?)/x diff --git a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php index b113161f26..3aa3b8ec55 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php @@ -6,8 +6,8 @@ abstract class KeywordEmulator extends TokenEmulator { - abstract function getKeywordString(): string; - abstract function getKeywordToken(): int; + abstract public function getKeywordString(): string; + abstract public function getKeywordToken(): int; public function isEmulationNeeded(string $code): bool { diff --git a/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php index b4d02cf445..3a806312e1 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php @@ -7,13 +7,13 @@ final class NumericLiteralSeparatorEmulator extends TokenEmulator { - const BIN = '(?:0b[01]+(?:_[01]+)*)'; - const HEX = '(?:0x[0-9a-f]+(?:_[0-9a-f]+)*)'; - const DEC = '(?:[0-9]+(?:_[0-9]+)*)'; - const SIMPLE_FLOAT = '(?:' . self::DEC . '\.' . self::DEC . '?|\.' . self::DEC . ')'; - const EXP = '(?:e[+-]?' . self::DEC . ')'; - const FLOAT = '(?:' . self::SIMPLE_FLOAT . self::EXP . '?|' . self::DEC . self::EXP . ')'; - const NUMBER = '~' . self::FLOAT . '|' . self::BIN . '|' . self::HEX . '|' . self::DEC . '~iA'; + private const BIN = '(?:0b[01]+(?:_[01]+)*)'; + private const HEX = '(?:0x[0-9a-f]+(?:_[0-9a-f]+)*)'; + private const DEC = '(?:[0-9]+(?:_[0-9]+)*)'; + private const SIMPLE_FLOAT = '(?:' . self::DEC . '\.' . self::DEC . '?|\.' . self::DEC . ')'; + private const EXP = '(?:e[+-]?' . self::DEC . ')'; + private const FLOAT = '(?:' . self::SIMPLE_FLOAT . self::EXP . '?|' . self::DEC . self::EXP . ')'; + private const NUMBER = '~' . self::FLOAT . '|' . self::BIN . '|' . self::HEX . '|' . self::DEC . '~iA'; public function getPhpVersion(): string { diff --git a/lib/PhpParser/Node/Expr/Array_.php b/lib/PhpParser/Node/Expr/Array_.php index e6eaa2834d..a922bd9ba9 100644 --- a/lib/PhpParser/Node/Expr/Array_.php +++ b/lib/PhpParser/Node/Expr/Array_.php @@ -7,8 +7,8 @@ class Array_ extends Expr { // For use in "kind" attribute - const KIND_LONG = 1; // array() syntax - const KIND_SHORT = 2; // [] syntax + public const KIND_LONG = 1; // array() syntax + public const KIND_SHORT = 2; // [] syntax /** @var (ArrayItem|null)[] Items */ public $items; diff --git a/lib/PhpParser/Node/Expr/Cast/Double.php b/lib/PhpParser/Node/Expr/Cast/Double.php index 891ba5f870..b71220fb37 100644 --- a/lib/PhpParser/Node/Expr/Cast/Double.php +++ b/lib/PhpParser/Node/Expr/Cast/Double.php @@ -7,9 +7,9 @@ class Double extends Cast { // For use in "kind" attribute - const KIND_DOUBLE = 1; // "double" syntax - const KIND_FLOAT = 2; // "float" syntax - const KIND_REAL = 3; // "real" syntax + public const KIND_DOUBLE = 1; // "double" syntax + public const KIND_FLOAT = 2; // "float" syntax + public const KIND_REAL = 3; // "real" syntax public function getType() : string { return 'Expr_Cast_Double'; diff --git a/lib/PhpParser/Node/Expr/Exit_.php b/lib/PhpParser/Node/Expr/Exit_.php index 5469b8e4ca..50bbf0f063 100644 --- a/lib/PhpParser/Node/Expr/Exit_.php +++ b/lib/PhpParser/Node/Expr/Exit_.php @@ -7,8 +7,8 @@ class Exit_ extends Expr { /* For use in "kind" attribute */ - const KIND_EXIT = 1; - const KIND_DIE = 2; + public const KIND_EXIT = 1; + public const KIND_DIE = 2; /** @var null|Expr Expression */ public $expr; diff --git a/lib/PhpParser/Node/Expr/Include_.php b/lib/PhpParser/Node/Expr/Include_.php index 07ce5968e4..01b3bb6df4 100644 --- a/lib/PhpParser/Node/Expr/Include_.php +++ b/lib/PhpParser/Node/Expr/Include_.php @@ -6,10 +6,10 @@ class Include_ extends Expr { - const TYPE_INCLUDE = 1; - const TYPE_INCLUDE_ONCE = 2; - const TYPE_REQUIRE = 3; - const TYPE_REQUIRE_ONCE = 4; + public const TYPE_INCLUDE = 1; + public const TYPE_INCLUDE_ONCE = 2; + public const TYPE_REQUIRE = 3; + public const TYPE_REQUIRE_ONCE = 4; /** @var Expr Expression */ public $expr; diff --git a/lib/PhpParser/Node/Scalar/LNumber.php b/lib/PhpParser/Node/Scalar/LNumber.php index 2cc2b22c8e..db55ecf3af 100644 --- a/lib/PhpParser/Node/Scalar/LNumber.php +++ b/lib/PhpParser/Node/Scalar/LNumber.php @@ -8,10 +8,10 @@ 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; + public const KIND_BIN = 2; + public const KIND_OCT = 8; + public const KIND_DEC = 10; + public const KIND_HEX = 16; /** @var int Number value */ public $value; diff --git a/lib/PhpParser/Node/Scalar/String_.php b/lib/PhpParser/Node/Scalar/String_.php index ce4565b8e2..2c3b8823fb 100644 --- a/lib/PhpParser/Node/Scalar/String_.php +++ b/lib/PhpParser/Node/Scalar/String_.php @@ -8,10 +8,10 @@ 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; + public const KIND_SINGLE_QUOTED = 1; + public const KIND_DOUBLE_QUOTED = 2; + public const KIND_HEREDOC = 3; + public const KIND_NOWDOC = 4; /** @var string String value */ public $value; diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 52ed6c6cd6..5e2c9eac9d 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -7,15 +7,15 @@ 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 MODIFIER_READONLY = 64; - - const VISIBILITY_MODIFIER_MASK = 7; // 1 | 2 | 4 + public const MODIFIER_PUBLIC = 1; + public const MODIFIER_PROTECTED = 2; + public const MODIFIER_PRIVATE = 4; + public const MODIFIER_STATIC = 8; + public const MODIFIER_ABSTRACT = 16; + public const MODIFIER_FINAL = 32; + public const MODIFIER_READONLY = 64; + + public const VISIBILITY_MODIFIER_MASK = 7; // 1 | 2 | 4 /** @var int Type */ public $flags; diff --git a/lib/PhpParser/Node/Stmt/Namespace_.php b/lib/PhpParser/Node/Stmt/Namespace_.php index bbcb1c4b10..a7e9ee104c 100644 --- a/lib/PhpParser/Node/Stmt/Namespace_.php +++ b/lib/PhpParser/Node/Stmt/Namespace_.php @@ -7,8 +7,8 @@ class Namespace_ extends Node\Stmt { /* For use in the "kind" attribute */ - const KIND_SEMICOLON = 1; - const KIND_BRACED = 2; + public const KIND_SEMICOLON = 1; + public const KIND_BRACED = 2; /** @var null|Node\Name Name */ public $name; diff --git a/lib/PhpParser/Node/Stmt/Use_.php b/lib/PhpParser/Node/Stmt/Use_.php index 8753da313d..4b25be1a2c 100644 --- a/lib/PhpParser/Node/Stmt/Use_.php +++ b/lib/PhpParser/Node/Stmt/Use_.php @@ -11,13 +11,13 @@ class Use_ extends Stmt * 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; + public const TYPE_UNKNOWN = 0; /** Class or namespace import */ - const TYPE_NORMAL = 1; + public const TYPE_NORMAL = 1; /** Function import */ - const TYPE_FUNCTION = 2; + public const TYPE_FUNCTION = 2; /** Constant import */ - const TYPE_CONSTANT = 3; + public const TYPE_CONSTANT = 3; /** @var int Type of alias */ public $type; diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 97d45bdaaa..7f886f21ad 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -11,7 +11,7 @@ class NodeTraverser implements NodeTraverserInterface * 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; + public const DONT_TRAVERSE_CHILDREN = 1; /** * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns @@ -19,7 +19,7 @@ class NodeTraverser implements NodeTraverserInterface * * The afterTraverse() method will still be invoked. */ - const STOP_TRAVERSAL = 2; + public const STOP_TRAVERSAL = 2; /** * If NodeVisitor::leaveNode() returns REMOVE_NODE for a node that occurs @@ -28,7 +28,7 @@ class NodeTraverser implements NodeTraverserInterface * For subsequent visitors leaveNode() will still be invoked for the * removed node. */ - const REMOVE_NODE = 3; + public const REMOVE_NODE = 3; /** * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CURRENT_AND_CHILDREN, child nodes @@ -37,7 +37,7 @@ class NodeTraverser implements NodeTraverserInterface * For subsequent visitors enterNode() will not be called as well. * leaveNode() will be invoked for visitors that has enterNode() method invoked. */ - const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4; + public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4; /** @var NodeVisitor[] Visitors */ protected $visitors = []; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index de23a489ed..76addb2851 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -17,146 +17,146 @@ */ class Php7 extends \PhpParser\ParserAbstract { - const YYERRTOK = 256; - const T_THROW = 257; - const T_INCLUDE = 258; - const T_INCLUDE_ONCE = 259; - const T_EVAL = 260; - const T_REQUIRE = 261; - const T_REQUIRE_ONCE = 262; - const T_LOGICAL_OR = 263; - const T_LOGICAL_XOR = 264; - const T_LOGICAL_AND = 265; - const T_PRINT = 266; - const T_YIELD = 267; - const T_DOUBLE_ARROW = 268; - const T_YIELD_FROM = 269; - const T_PLUS_EQUAL = 270; - const T_MINUS_EQUAL = 271; - const T_MUL_EQUAL = 272; - const T_DIV_EQUAL = 273; - const T_CONCAT_EQUAL = 274; - const T_MOD_EQUAL = 275; - const T_AND_EQUAL = 276; - const T_OR_EQUAL = 277; - const T_XOR_EQUAL = 278; - const T_SL_EQUAL = 279; - const T_SR_EQUAL = 280; - const T_POW_EQUAL = 281; - const T_COALESCE_EQUAL = 282; - const T_COALESCE = 283; - const T_BOOLEAN_OR = 284; - const T_BOOLEAN_AND = 285; - const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286; - const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287; - const T_IS_EQUAL = 288; - const T_IS_NOT_EQUAL = 289; - const T_IS_IDENTICAL = 290; - const T_IS_NOT_IDENTICAL = 291; - const T_SPACESHIP = 292; - const T_IS_SMALLER_OR_EQUAL = 293; - const T_IS_GREATER_OR_EQUAL = 294; - const T_SL = 295; - const T_SR = 296; - const T_INSTANCEOF = 297; - const T_INC = 298; - const T_DEC = 299; - const T_INT_CAST = 300; - const T_DOUBLE_CAST = 301; - const T_STRING_CAST = 302; - const T_ARRAY_CAST = 303; - const T_OBJECT_CAST = 304; - const T_BOOL_CAST = 305; - const T_UNSET_CAST = 306; - const T_POW = 307; - const T_NEW = 308; - const T_CLONE = 309; - const T_EXIT = 310; - const T_IF = 311; - const T_ELSEIF = 312; - const T_ELSE = 313; - const T_ENDIF = 314; - const T_LNUMBER = 315; - const T_DNUMBER = 316; - const T_STRING = 317; - const T_STRING_VARNAME = 318; - const T_VARIABLE = 319; - const T_NUM_STRING = 320; - const T_INLINE_HTML = 321; - const T_ENCAPSED_AND_WHITESPACE = 322; - const T_CONSTANT_ENCAPSED_STRING = 323; - const T_ECHO = 324; - const T_DO = 325; - const T_WHILE = 326; - const T_ENDWHILE = 327; - const T_FOR = 328; - const T_ENDFOR = 329; - const T_FOREACH = 330; - const T_ENDFOREACH = 331; - const T_DECLARE = 332; - const T_ENDDECLARE = 333; - const T_AS = 334; - const T_SWITCH = 335; - const T_MATCH = 336; - const T_ENDSWITCH = 337; - const T_CASE = 338; - const T_DEFAULT = 339; - const T_BREAK = 340; - const T_CONTINUE = 341; - const T_GOTO = 342; - const T_FUNCTION = 343; - const T_FN = 344; - const T_CONST = 345; - const T_RETURN = 346; - const T_TRY = 347; - const T_CATCH = 348; - const T_FINALLY = 349; - const T_USE = 350; - const T_INSTEADOF = 351; - const T_GLOBAL = 352; - const T_STATIC = 353; - const T_ABSTRACT = 354; - const T_FINAL = 355; - const T_PRIVATE = 356; - const T_PROTECTED = 357; - const T_PUBLIC = 358; - const T_READONLY = 359; - const T_VAR = 360; - const T_UNSET = 361; - const T_ISSET = 362; - const T_EMPTY = 363; - const T_HALT_COMPILER = 364; - const T_CLASS = 365; - const T_TRAIT = 366; - const T_INTERFACE = 367; - const T_ENUM = 368; - const T_EXTENDS = 369; - const T_IMPLEMENTS = 370; - const T_OBJECT_OPERATOR = 371; - const T_NULLSAFE_OBJECT_OPERATOR = 372; - const T_LIST = 373; - const T_ARRAY = 374; - const T_CALLABLE = 375; - const T_CLASS_C = 376; - const T_TRAIT_C = 377; - const T_METHOD_C = 378; - const T_FUNC_C = 379; - const T_LINE = 380; - const T_FILE = 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; - const T_NAME_FULLY_QUALIFIED = 392; - const T_NAME_QUALIFIED = 393; - const T_NAME_RELATIVE = 394; - const T_ATTRIBUTE = 395; + public const YYERRTOK = 256; + public const T_THROW = 257; + public const T_INCLUDE = 258; + public const T_INCLUDE_ONCE = 259; + public const T_EVAL = 260; + public const T_REQUIRE = 261; + public const T_REQUIRE_ONCE = 262; + public const T_LOGICAL_OR = 263; + public const T_LOGICAL_XOR = 264; + public const T_LOGICAL_AND = 265; + public const T_PRINT = 266; + public const T_YIELD = 267; + public const T_DOUBLE_ARROW = 268; + public const T_YIELD_FROM = 269; + public const T_PLUS_EQUAL = 270; + public const T_MINUS_EQUAL = 271; + public const T_MUL_EQUAL = 272; + public const T_DIV_EQUAL = 273; + public const T_CONCAT_EQUAL = 274; + public const T_MOD_EQUAL = 275; + public const T_AND_EQUAL = 276; + public const T_OR_EQUAL = 277; + public const T_XOR_EQUAL = 278; + public const T_SL_EQUAL = 279; + public const T_SR_EQUAL = 280; + public const T_POW_EQUAL = 281; + public const T_COALESCE_EQUAL = 282; + public const T_COALESCE = 283; + public const T_BOOLEAN_OR = 284; + public const T_BOOLEAN_AND = 285; + public const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286; + public const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287; + public const T_IS_EQUAL = 288; + public const T_IS_NOT_EQUAL = 289; + public const T_IS_IDENTICAL = 290; + public const T_IS_NOT_IDENTICAL = 291; + public const T_SPACESHIP = 292; + public const T_IS_SMALLER_OR_EQUAL = 293; + public const T_IS_GREATER_OR_EQUAL = 294; + public const T_SL = 295; + public const T_SR = 296; + public const T_INSTANCEOF = 297; + public const T_INC = 298; + public const T_DEC = 299; + public const T_INT_CAST = 300; + public const T_DOUBLE_CAST = 301; + public const T_STRING_CAST = 302; + public const T_ARRAY_CAST = 303; + public const T_OBJECT_CAST = 304; + public const T_BOOL_CAST = 305; + public const T_UNSET_CAST = 306; + public const T_POW = 307; + public const T_NEW = 308; + public const T_CLONE = 309; + public const T_EXIT = 310; + public const T_IF = 311; + public const T_ELSEIF = 312; + public const T_ELSE = 313; + public const T_ENDIF = 314; + public const T_LNUMBER = 315; + public const T_DNUMBER = 316; + public const T_STRING = 317; + public const T_STRING_VARNAME = 318; + public const T_VARIABLE = 319; + public const T_NUM_STRING = 320; + public const T_INLINE_HTML = 321; + public const T_ENCAPSED_AND_WHITESPACE = 322; + public const T_CONSTANT_ENCAPSED_STRING = 323; + public const T_ECHO = 324; + public const T_DO = 325; + public const T_WHILE = 326; + public const T_ENDWHILE = 327; + public const T_FOR = 328; + public const T_ENDFOR = 329; + public const T_FOREACH = 330; + public const T_ENDFOREACH = 331; + public const T_DECLARE = 332; + public const T_ENDDECLARE = 333; + public const T_AS = 334; + public const T_SWITCH = 335; + public const T_MATCH = 336; + public const T_ENDSWITCH = 337; + public const T_CASE = 338; + public const T_DEFAULT = 339; + public const T_BREAK = 340; + public const T_CONTINUE = 341; + public const T_GOTO = 342; + public const T_FUNCTION = 343; + public const T_FN = 344; + public const T_CONST = 345; + public const T_RETURN = 346; + public const T_TRY = 347; + public const T_CATCH = 348; + public const T_FINALLY = 349; + public const T_USE = 350; + public const T_INSTEADOF = 351; + public const T_GLOBAL = 352; + public const T_STATIC = 353; + public const T_ABSTRACT = 354; + public const T_FINAL = 355; + public const T_PRIVATE = 356; + public const T_PROTECTED = 357; + public const T_PUBLIC = 358; + public const T_READONLY = 359; + public const T_VAR = 360; + public const T_UNSET = 361; + public const T_ISSET = 362; + public const T_EMPTY = 363; + public const T_HALT_COMPILER = 364; + public const T_CLASS = 365; + public const T_TRAIT = 366; + public const T_INTERFACE = 367; + public const T_ENUM = 368; + public const T_EXTENDS = 369; + public const T_IMPLEMENTS = 370; + public const T_OBJECT_OPERATOR = 371; + public const T_NULLSAFE_OBJECT_OPERATOR = 372; + public const T_LIST = 373; + public const T_ARRAY = 374; + public const T_CALLABLE = 375; + public const T_CLASS_C = 376; + public const T_TRAIT_C = 377; + public const T_METHOD_C = 378; + public const T_FUNC_C = 379; + public const T_LINE = 380; + public const T_FILE = 381; + public const T_START_HEREDOC = 382; + public const T_END_HEREDOC = 383; + public const T_DOLLAR_OPEN_CURLY_BRACES = 384; + public const T_CURLY_OPEN = 385; + public const T_PAAMAYIM_NEKUDOTAYIM = 386; + public const T_NAMESPACE = 387; + public const T_NS_C = 388; + public const T_DIR = 389; + public const T_NS_SEPARATOR = 390; + public const T_ELLIPSIS = 391; + public const T_NAME_FULLY_QUALIFIED = 392; + public const T_NAME_QUALIFIED = 393; + public const T_NAME_RELATIVE = 394; + public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; protected $actionTableSize = 1215; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 8a97ec5e85..6579c35e76 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -17,146 +17,146 @@ */ class Php8 extends \PhpParser\ParserAbstract { - const YYERRTOK = 256; - const T_THROW = 257; - const T_INCLUDE = 258; - const T_INCLUDE_ONCE = 259; - const T_EVAL = 260; - const T_REQUIRE = 261; - const T_REQUIRE_ONCE = 262; - const T_LOGICAL_OR = 263; - const T_LOGICAL_XOR = 264; - const T_LOGICAL_AND = 265; - const T_PRINT = 266; - const T_YIELD = 267; - const T_DOUBLE_ARROW = 268; - const T_YIELD_FROM = 269; - const T_PLUS_EQUAL = 270; - const T_MINUS_EQUAL = 271; - const T_MUL_EQUAL = 272; - const T_DIV_EQUAL = 273; - const T_CONCAT_EQUAL = 274; - const T_MOD_EQUAL = 275; - const T_AND_EQUAL = 276; - const T_OR_EQUAL = 277; - const T_XOR_EQUAL = 278; - const T_SL_EQUAL = 279; - const T_SR_EQUAL = 280; - const T_POW_EQUAL = 281; - const T_COALESCE_EQUAL = 282; - const T_COALESCE = 283; - const T_BOOLEAN_OR = 284; - const T_BOOLEAN_AND = 285; - const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286; - const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287; - const T_IS_EQUAL = 288; - const T_IS_NOT_EQUAL = 289; - const T_IS_IDENTICAL = 290; - const T_IS_NOT_IDENTICAL = 291; - const T_SPACESHIP = 292; - const T_IS_SMALLER_OR_EQUAL = 293; - const T_IS_GREATER_OR_EQUAL = 294; - const T_SL = 295; - const T_SR = 296; - const T_INSTANCEOF = 297; - const T_INC = 298; - const T_DEC = 299; - const T_INT_CAST = 300; - const T_DOUBLE_CAST = 301; - const T_STRING_CAST = 302; - const T_ARRAY_CAST = 303; - const T_OBJECT_CAST = 304; - const T_BOOL_CAST = 305; - const T_UNSET_CAST = 306; - const T_POW = 307; - const T_NEW = 308; - const T_CLONE = 309; - const T_EXIT = 310; - const T_IF = 311; - const T_ELSEIF = 312; - const T_ELSE = 313; - const T_ENDIF = 314; - const T_LNUMBER = 315; - const T_DNUMBER = 316; - const T_STRING = 317; - const T_STRING_VARNAME = 318; - const T_VARIABLE = 319; - const T_NUM_STRING = 320; - const T_INLINE_HTML = 321; - const T_ENCAPSED_AND_WHITESPACE = 322; - const T_CONSTANT_ENCAPSED_STRING = 323; - const T_ECHO = 324; - const T_DO = 325; - const T_WHILE = 326; - const T_ENDWHILE = 327; - const T_FOR = 328; - const T_ENDFOR = 329; - const T_FOREACH = 330; - const T_ENDFOREACH = 331; - const T_DECLARE = 332; - const T_ENDDECLARE = 333; - const T_AS = 334; - const T_SWITCH = 335; - const T_MATCH = 336; - const T_ENDSWITCH = 337; - const T_CASE = 338; - const T_DEFAULT = 339; - const T_BREAK = 340; - const T_CONTINUE = 341; - const T_GOTO = 342; - const T_FUNCTION = 343; - const T_FN = 344; - const T_CONST = 345; - const T_RETURN = 346; - const T_TRY = 347; - const T_CATCH = 348; - const T_FINALLY = 349; - const T_USE = 350; - const T_INSTEADOF = 351; - const T_GLOBAL = 352; - const T_STATIC = 353; - const T_ABSTRACT = 354; - const T_FINAL = 355; - const T_PRIVATE = 356; - const T_PROTECTED = 357; - const T_PUBLIC = 358; - const T_READONLY = 359; - const T_VAR = 360; - const T_UNSET = 361; - const T_ISSET = 362; - const T_EMPTY = 363; - const T_HALT_COMPILER = 364; - const T_CLASS = 365; - const T_TRAIT = 366; - const T_INTERFACE = 367; - const T_ENUM = 368; - const T_EXTENDS = 369; - const T_IMPLEMENTS = 370; - const T_OBJECT_OPERATOR = 371; - const T_NULLSAFE_OBJECT_OPERATOR = 372; - const T_LIST = 373; - const T_ARRAY = 374; - const T_CALLABLE = 375; - const T_CLASS_C = 376; - const T_TRAIT_C = 377; - const T_METHOD_C = 378; - const T_FUNC_C = 379; - const T_LINE = 380; - const T_FILE = 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; - const T_NAME_FULLY_QUALIFIED = 392; - const T_NAME_QUALIFIED = 393; - const T_NAME_RELATIVE = 394; - const T_ATTRIBUTE = 395; + public const YYERRTOK = 256; + public const T_THROW = 257; + public const T_INCLUDE = 258; + public const T_INCLUDE_ONCE = 259; + public const T_EVAL = 260; + public const T_REQUIRE = 261; + public const T_REQUIRE_ONCE = 262; + public const T_LOGICAL_OR = 263; + public const T_LOGICAL_XOR = 264; + public const T_LOGICAL_AND = 265; + public const T_PRINT = 266; + public const T_YIELD = 267; + public const T_DOUBLE_ARROW = 268; + public const T_YIELD_FROM = 269; + public const T_PLUS_EQUAL = 270; + public const T_MINUS_EQUAL = 271; + public const T_MUL_EQUAL = 272; + public const T_DIV_EQUAL = 273; + public const T_CONCAT_EQUAL = 274; + public const T_MOD_EQUAL = 275; + public const T_AND_EQUAL = 276; + public const T_OR_EQUAL = 277; + public const T_XOR_EQUAL = 278; + public const T_SL_EQUAL = 279; + public const T_SR_EQUAL = 280; + public const T_POW_EQUAL = 281; + public const T_COALESCE_EQUAL = 282; + public const T_COALESCE = 283; + public const T_BOOLEAN_OR = 284; + public const T_BOOLEAN_AND = 285; + public const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286; + public const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287; + public const T_IS_EQUAL = 288; + public const T_IS_NOT_EQUAL = 289; + public const T_IS_IDENTICAL = 290; + public const T_IS_NOT_IDENTICAL = 291; + public const T_SPACESHIP = 292; + public const T_IS_SMALLER_OR_EQUAL = 293; + public const T_IS_GREATER_OR_EQUAL = 294; + public const T_SL = 295; + public const T_SR = 296; + public const T_INSTANCEOF = 297; + public const T_INC = 298; + public const T_DEC = 299; + public const T_INT_CAST = 300; + public const T_DOUBLE_CAST = 301; + public const T_STRING_CAST = 302; + public const T_ARRAY_CAST = 303; + public const T_OBJECT_CAST = 304; + public const T_BOOL_CAST = 305; + public const T_UNSET_CAST = 306; + public const T_POW = 307; + public const T_NEW = 308; + public const T_CLONE = 309; + public const T_EXIT = 310; + public const T_IF = 311; + public const T_ELSEIF = 312; + public const T_ELSE = 313; + public const T_ENDIF = 314; + public const T_LNUMBER = 315; + public const T_DNUMBER = 316; + public const T_STRING = 317; + public const T_STRING_VARNAME = 318; + public const T_VARIABLE = 319; + public const T_NUM_STRING = 320; + public const T_INLINE_HTML = 321; + public const T_ENCAPSED_AND_WHITESPACE = 322; + public const T_CONSTANT_ENCAPSED_STRING = 323; + public const T_ECHO = 324; + public const T_DO = 325; + public const T_WHILE = 326; + public const T_ENDWHILE = 327; + public const T_FOR = 328; + public const T_ENDFOR = 329; + public const T_FOREACH = 330; + public const T_ENDFOREACH = 331; + public const T_DECLARE = 332; + public const T_ENDDECLARE = 333; + public const T_AS = 334; + public const T_SWITCH = 335; + public const T_MATCH = 336; + public const T_ENDSWITCH = 337; + public const T_CASE = 338; + public const T_DEFAULT = 339; + public const T_BREAK = 340; + public const T_CONTINUE = 341; + public const T_GOTO = 342; + public const T_FUNCTION = 343; + public const T_FN = 344; + public const T_CONST = 345; + public const T_RETURN = 346; + public const T_TRY = 347; + public const T_CATCH = 348; + public const T_FINALLY = 349; + public const T_USE = 350; + public const T_INSTEADOF = 351; + public const T_GLOBAL = 352; + public const T_STATIC = 353; + public const T_ABSTRACT = 354; + public const T_FINAL = 355; + public const T_PRIVATE = 356; + public const T_PROTECTED = 357; + public const T_PUBLIC = 358; + public const T_READONLY = 359; + public const T_VAR = 360; + public const T_UNSET = 361; + public const T_ISSET = 362; + public const T_EMPTY = 363; + public const T_HALT_COMPILER = 364; + public const T_CLASS = 365; + public const T_TRAIT = 366; + public const T_INTERFACE = 367; + public const T_ENUM = 368; + public const T_EXTENDS = 369; + public const T_IMPLEMENTS = 370; + public const T_OBJECT_OPERATOR = 371; + public const T_NULLSAFE_OBJECT_OPERATOR = 372; + public const T_LIST = 373; + public const T_ARRAY = 374; + public const T_CALLABLE = 375; + public const T_CLASS_C = 376; + public const T_TRAIT_C = 377; + public const T_METHOD_C = 378; + public const T_FUNC_C = 379; + public const T_LINE = 380; + public const T_FILE = 381; + public const T_START_HEREDOC = 382; + public const T_END_HEREDOC = 383; + public const T_DOLLAR_OPEN_CURLY_BRACES = 384; + public const T_CURLY_OPEN = 385; + public const T_PAAMAYIM_NEKUDOTAYIM = 386; + public const T_NAMESPACE = 387; + public const T_NS_C = 388; + public const T_DIR = 389; + public const T_NS_SEPARATOR = 390; + public const T_ELLIPSIS = 391; + public const T_NAME_FULLY_QUALIFIED = 392; + public const T_NAME_QUALIFIED = 393; + public const T_NAME_RELATIVE = 394; + public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; protected $actionTableSize = 1216; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index cf3a3755c7..083b84d69f 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -25,7 +25,7 @@ abstract class ParserAbstract implements Parser { - const SYMBOL_NONE = -1; + private const SYMBOL_NONE = -1; /** @var Lexer Lexer that is used when parsing */ protected $lexer; diff --git a/lib/PhpParser/ParserFactory.php b/lib/PhpParser/ParserFactory.php index 1a8bd22adc..bc55e5ac82 100644 --- a/lib/PhpParser/ParserFactory.php +++ b/lib/PhpParser/ParserFactory.php @@ -7,8 +7,8 @@ class ParserFactory { - const PREFER_PHP7 = 1; - const ONLY_PHP7 = 3; + public const PREFER_PHP7 = 1; + public const ONLY_PHP7 = 3; /** * Creates a Parser instance, according to the provided kind. diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index e3ec0fe7c4..a67b9b3144 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -14,13 +14,13 @@ abstract class PrettyPrinterAbstract { - const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence - const FIXUP_PREC_RIGHT = 1; // RHS operand affected by precedence - const FIXUP_CALL_LHS = 2; // LHS of call - const FIXUP_DEREF_LHS = 3; // LHS of dereferencing operation - const FIXUP_BRACED_NAME = 4; // Name operand that may require bracing - const FIXUP_VAR_BRACED_NAME = 5; // Name operand that may require ${} bracing - const FIXUP_ENCAPSED = 6; // Encapsed string part + protected const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence + protected const FIXUP_PREC_RIGHT = 1; // RHS operand affected by precedence + protected const FIXUP_CALL_LHS = 2; // LHS of call + protected const FIXUP_DEREF_LHS = 3; // LHS of dereferencing operation + protected const FIXUP_BRACED_NAME = 4; // Name operand that may require bracing + protected const FIXUP_VAR_BRACED_NAME = 5; // Name operand that may require ${} bracing + protected const FIXUP_ENCAPSED = 6; // Encapsed string part protected $precedenceMap = [ // [precedence, associativity] From 1e89658cae084787058561355c9bba11fb17c075 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 23 Jul 2022 16:35:21 +0200 Subject: [PATCH 101/428] Add PhpVersion class --- UPGRADE-5.0.md | 8 +- grammar/php.y | 4 +- lib/PhpParser/Lexer/Emulative.php | 33 ++--- .../Lexer/TokenEmulator/AttributeEmulator.php | 6 +- .../CoaleseEqualTokenEmulator.php | 6 +- .../Lexer/TokenEmulator/EnumTokenEmulator.php | 6 +- .../TokenEmulator/ExplicitOctalEmulator.php | 6 +- .../FlexibleDocStringEmulator.php | 6 +- .../Lexer/TokenEmulator/FnTokenEmulator.php | 6 +- .../TokenEmulator/MatchTokenEmulator.php | 6 +- .../TokenEmulator/NullsafeTokenEmulator.php | 6 +- .../NumericLiteralSeparatorEmulator.php | 6 +- .../TokenEmulator/ReadonlyTokenEmulator.php | 6 +- .../Lexer/TokenEmulator/ReverseEmulator.php | 4 +- .../Lexer/TokenEmulator/TokenEmulator.php | 3 +- lib/PhpParser/Node/AttributeGroup.php | 1 - lib/PhpParser/Parser/Php7.php | 4 +- lib/PhpParser/Parser/Php8.php | 4 +- lib/PhpParser/ParserAbstract.php | 44 ++----- lib/PhpParser/ParserFactory.php | 38 ++---- lib/PhpParser/PhpVersion.php | 113 ++++++++++++++++++ test/PhpParser/CodeParsingTest.php | 4 +- 22 files changed, 201 insertions(+), 119 deletions(-) create mode 100644 lib/PhpParser/PhpVersion.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 0c03d7d4ce..0267d55cc6 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -7,9 +7,9 @@ PHP-Parser now requires PHP 7.1 or newer to run. It is however still possible to ### PHP 5 parsing support -The dedicated parser for PHP 5 has been removed. The PHP 7 parser now supports a `phpVersion` option, which can be used to improve compatibility with older PHP versions. +The dedicated parser for PHP 5 has been removed. The PHP 7 parser now accepts a `PhpVersion` argument, which can be used to improve compatibility with older PHP versions. -In particular, if an older `phpVersion` is specified, then: +In particular, if an older `PhpVersion` is specified, then: * For versions before PHP 7.0, `$foo =& new Bar()` assignments are allowed without error. * For versions before PHP 7.0, invalid octal literals `089` are allowed without error. @@ -43,6 +43,8 @@ For example, if you specify version `"8.0"`, then `class ReadOnly {}` is treated ```php use PhpParser\ParserFactory; +use PhpParser\PhpVersion; + $factory = new ParserFactory; # Before @@ -56,7 +58,7 @@ $parser = $factory->createForHostVersion(); # Before $parser = $factory->create(ParserFactory::ONLY_PHP5); # After (supported on a best-effort basis) -$parser = $factory->createForVersion("5.6"); +$parser = $factory->createForVersion(PhpVersion::fromString("5.6")); ``` ### Renamed nodes diff --git a/grammar/php.y b/grammar/php.y index 41ca103162..56f779598c 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -928,7 +928,7 @@ expr: | variable '=' ampersand variable { $$ = Expr\AssignRef[$1, $4]; } | variable '=' ampersand new_expr { $$ = Expr\AssignRef[$1, $4]; - if ($this->phpVersion >= 70000) { + if (!$this->phpVersion->allowsAssignNewByReference()) { $this->emitError(new Error('Cannot assign new by reference', attributes())); } } @@ -1156,7 +1156,7 @@ dereferencable_scalar: scalar: T_LNUMBER - { $$ = $this->parseLNumber($1, attributes(), $this->phpVersion < 70000); } + { $$ = $this->parseLNumber($1, attributes(), $this->phpVersion->allowsInvalidOctals()); } | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); } | dereferencable_scalar { $$ = $1; } | constant { $$ = $1; } diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 1fc6533934..c1bc947ad4 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -17,31 +17,34 @@ use PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReverseEmulator; use PhpParser\Lexer\TokenEmulator\TokenEmulator; +use PhpParser\PhpVersion; class Emulative extends Lexer { - public const PHP_7_3 = '7.3dev'; - public const PHP_7_4 = '7.4dev'; - public const PHP_8_0 = '8.0dev'; - public const PHP_8_1 = '8.1dev'; - /** @var mixed[] Patches used to reverse changes introduced in the code */ private $patches = []; /** @var TokenEmulator[] */ private $emulators = []; - /** @var string */ + /** @var PhpVersion */ private $targetPhpVersion; + /** @var PhpVersion */ + private $hostPhpVersion; /** - * @param mixed[] $options Lexer options. In addition to the usual options, - * accepts a 'phpVersion' string that specifies the + * @param mixed[] $options Lexer options. In addition to the usual options, accepts a + * 'phpVersion' (PhpVersion object or string) that specifies the * version to emulate. Defaults to newest supported. */ public function __construct(array $options = []) { - $this->targetPhpVersion = $options['phpVersion'] ?? Emulative::PHP_8_1; + $version = $options['phpVersion'] ?? PhpVersion::getNewestSupported(); + if (!$version instanceof PhpVersion) { + $version = PhpVersion::fromString($version); + } + $this->targetPhpVersion = $version; + $this->hostPhpVersion = PhpVersion::getHostVersion(); unset($options['phpVersion']); parent::__construct($options); @@ -105,14 +108,14 @@ public function startLexing(string $code, ?ErrorHandler $errorHandler = null) { } } - private function isForwardEmulationNeeded(string $emulatorPhpVersion): bool { - return version_compare(\PHP_VERSION, $emulatorPhpVersion, '<') - && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '>='); + private function isForwardEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { + return $this->hostPhpVersion->older($emulatorPhpVersion) + && $this->targetPhpVersion->newerOrEqual($emulatorPhpVersion); } - private function isReverseEmulationNeeded(string $emulatorPhpVersion): bool { - return version_compare(\PHP_VERSION, $emulatorPhpVersion, '>=') - && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '<'); + private function isReverseEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { + return $this->hostPhpVersion->newerOrEqual($emulatorPhpVersion) + && $this->targetPhpVersion->older($emulatorPhpVersion); } private function sortPatches() diff --git a/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php index 8a4420cacd..b24387bb51 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php @@ -2,14 +2,14 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; use PhpParser\Token; final class AttributeEmulator extends TokenEmulator { - public function getPhpVersion(): string + public function getPhpVersion(): PhpVersion { - return Emulative::PHP_8_0; + return PhpVersion::fromComponents(8, 0); } public function isEmulationNeeded(string $code) : bool diff --git a/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php index 962ce0d650..6b754a5bbb 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php @@ -2,14 +2,14 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; use PhpParser\Token; final class CoaleseEqualTokenEmulator extends TokenEmulator { - public function getPhpVersion(): string + public function getPhpVersion(): PhpVersion { - return Emulative::PHP_7_4; + return PhpVersion::fromComponents(7, 4); } public function isEmulationNeeded(string $code): bool diff --git a/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php index f8d6655f36..79f37024ef 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php @@ -2,13 +2,13 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; final class EnumTokenEmulator extends KeywordEmulator { - public function getPhpVersion(): string + public function getPhpVersion(): PhpVersion { - return Emulative::PHP_8_1; + return PhpVersion::fromComponents(8, 1); } public function getKeywordString(): string diff --git a/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php index 3b8ba4cb7f..95ea3bd152 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -2,12 +2,12 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; use PhpParser\Token; class ExplicitOctalEmulator extends TokenEmulator { - public function getPhpVersion(): string { - return Emulative::PHP_8_1; + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 1); } public function isEmulationNeeded(string $code): bool { diff --git a/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php index b7cc090551..2c06bcd837 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php @@ -2,7 +2,7 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; final class FlexibleDocStringEmulator extends TokenEmulator { @@ -12,9 +12,9 @@ final class FlexibleDocStringEmulator extends TokenEmulator (?\h*)\2(?![a-zA-Z0-9_\x80-\xff])(?(?:;?[\r\n])?)/x REGEX; - public function getPhpVersion(): string + public function getPhpVersion(): PhpVersion { - return Emulative::PHP_7_3; + return PhpVersion::fromComponents(7, 3); } public function isEmulationNeeded(string $code) : bool diff --git a/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php index 57d3081383..db3b1cadbb 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php @@ -2,13 +2,13 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; final class FnTokenEmulator extends KeywordEmulator { - public function getPhpVersion(): string + public function getPhpVersion(): PhpVersion { - return Emulative::PHP_7_4; + return PhpVersion::fromComponents(7, 4); } public function getKeywordString(): string diff --git a/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php index 902a46dfcb..c0116247c3 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php @@ -2,13 +2,13 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; final class MatchTokenEmulator extends KeywordEmulator { - public function getPhpVersion(): string + public function getPhpVersion(): PhpVersion { - return Emulative::PHP_8_0; + return PhpVersion::fromComponents(8, 0); } public function getKeywordString(): string diff --git a/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php index 5c1aec9c18..f157fcff27 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php @@ -2,14 +2,14 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; use PhpParser\Token; final class NullsafeTokenEmulator extends TokenEmulator { - public function getPhpVersion(): string + public function getPhpVersion(): PhpVersion { - return Emulative::PHP_8_0; + return PhpVersion::fromComponents(8, 0); } public function isEmulationNeeded(string $code): bool diff --git a/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php index 3a806312e1..c007bab6ce 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php @@ -2,7 +2,7 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; use PhpParser\Token; final class NumericLiteralSeparatorEmulator extends TokenEmulator @@ -15,9 +15,9 @@ final class NumericLiteralSeparatorEmulator extends TokenEmulator private const FLOAT = '(?:' . self::SIMPLE_FLOAT . self::EXP . '?|' . self::DEC . self::EXP . ')'; private const NUMBER = '~' . self::FLOAT . '|' . self::BIN . '|' . self::HEX . '|' . self::DEC . '~iA'; - public function getPhpVersion(): string + public function getPhpVersion(): PhpVersion { - return Emulative::PHP_7_4; + return PhpVersion::fromComponents(7, 4); } public function isEmulationNeeded(string $code) : bool diff --git a/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php index dfd350a869..a5526edccd 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php @@ -2,13 +2,13 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; final class ReadonlyTokenEmulator extends KeywordEmulator { - public function getPhpVersion(): string + public function getPhpVersion(): PhpVersion { - return Emulative::PHP_8_1; + return PhpVersion::fromComponents(8, 1); } public function getKeywordString(): string diff --git a/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php index f587115e61..e63581bab9 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php @@ -2,6 +2,8 @@ namespace PhpParser\Lexer\TokenEmulator; +use PhpParser\PhpVersion; + /** * Reverses emulation direction of the inner emulator. */ @@ -14,7 +16,7 @@ public function __construct(TokenEmulator $emulator) { $this->emulator = $emulator; } - public function getPhpVersion(): string { + public function getPhpVersion(): PhpVersion { return $this->emulator->getPhpVersion(); } diff --git a/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php index d43bd183b6..ffc7b28564 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php @@ -2,12 +2,13 @@ namespace PhpParser\Lexer\TokenEmulator; +use PhpParser\PhpVersion; use PhpParser\Token; /** @internal */ abstract class TokenEmulator { - abstract public function getPhpVersion(): string; + abstract public function getPhpVersion(): PhpVersion; abstract public function isEmulationNeeded(string $code): bool; diff --git a/lib/PhpParser/Node/AttributeGroup.php b/lib/PhpParser/Node/AttributeGroup.php index 613bfc4134..4a131f9884 100644 --- a/lib/PhpParser/Node/AttributeGroup.php +++ b/lib/PhpParser/Node/AttributeGroup.php @@ -2,7 +2,6 @@ namespace PhpParser\Node; -use PhpParser\Node; use PhpParser\NodeAbstract; class AttributeGroup extends NodeAbstract diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 76addb2851..1f9b31a3a7 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2307,7 +2307,7 @@ protected function initReduceCallbacks() { }, 383 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - if ($this->phpVersion >= 70000) { + if (!$this->phpVersion->allowsAssignNewByReference()) { $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); } @@ -2726,7 +2726,7 @@ protected function initReduceCallbacks() { foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, 519 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion < 70000); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 520 => function ($stackPos) { $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 6579c35e76..e87ebf930e 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2333,7 +2333,7 @@ protected function initReduceCallbacks() { }, 383 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - if ($this->phpVersion >= 70000) { + if (!$this->phpVersion->allowsAssignNewByReference()) { $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); } @@ -2752,7 +2752,7 @@ protected function initReduceCallbacks() { foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, 519 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion < 70000); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 520 => function ($stackPos) { $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 083b84d69f..c71b75a740 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -29,7 +29,7 @@ abstract class ParserAbstract implements Parser /** @var Lexer Lexer that is used when parsing */ protected $lexer; - /** @var int PHP version ID to target on a best-effort basis (e.g. 80100) */ + /** @var PhpVersion PHP version to target on a best-effort basis */ protected $phpVersion; /* @@ -128,31 +128,23 @@ abstract protected function initReduceCallbacks(); * Creates a parser instance. * * Options: - * * phpVersion: ?string, defaults to latest supported. This option is best-effort: Even if - * specified, parsing will generally assume the latest supported version and only adjust - * behavior in minor ways, for example by omitting errors in older versions and - * interpreting type hints as a name or identifier depending on version. + * * phpVersion: ?PhpVersion, * * @param Lexer $lexer A lexer - * @param array $options Options array. + * @param PhpVersion $phpVersion PHP version to target, defaults to latest supported. This + * option is best-effort: Even if specified, parsing will generally assume the latest + * supported version and only adjust behavior in minor ways, for example by omitting + * errors in older versions and interpreting type hints as a name or identifier depending + * on version. */ - public function __construct(Lexer $lexer, array $options = []) { + public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { $this->lexer = $lexer; - $phpVersion = $options['phpVersion'] ?? null; - $this->phpVersion = $phpVersion ? $this->parseVersion($phpVersion) : 80200; + $this->phpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); $this->initReduceCallbacks(); $this->phpTokenToSymbol = $this->createTokenMap(); } - private function parseVersion(string $version): int { - if (!preg_match('/^(\d+)\.(\d+)/', $version, $matches)) { - throw new \LogicException("Invalid PHP version \"$version\""); - } - - return $matches[1] * 10000 + $matches[2] * 100; - } - /** * Parses PHP code into a node tree. * @@ -614,28 +606,12 @@ private function getNamespacingStyle(array $stmts): ?string { } protected function handleBuiltinTypes(Name $name) { - $builtinTypes = [ - 'bool' => 70000, - 'int' => 70000, - 'float' => 70000, - 'string' => 70000, - 'iterable' => 70100, - 'void' => 70100, - 'object' => 70200, - 'null' => 80000, - 'false' => 80000, - 'mixed' => 80000, - 'never' => 80100, - 'true' => 80200, - ]; - if (!$name->isUnqualified()) { return $name; } $lowerName = $name->toLowerString(); - $minVersion = $builtinTypes[$lowerName] ?? null; - if ($minVersion === null || $this->phpVersion < $minVersion) { + if (!$this->phpVersion->supportsBuiltinType($lowerName)) { return $name; } diff --git a/lib/PhpParser/ParserFactory.php b/lib/PhpParser/ParserFactory.php index bc55e5ac82..d461eb4f23 100644 --- a/lib/PhpParser/ParserFactory.php +++ b/lib/PhpParser/ParserFactory.php @@ -15,20 +15,19 @@ class ParserFactory * * @param int $kind One of ::PREFER_PHP7 or ::ONLY_PHP7 * @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 * * @deprecated Use createForVersion(), createForNewestSupportedVersion() or createForHostVersion() instead. */ - public function create(int $kind, ?Lexer $lexer = null, array $parserOptions = []): Parser { + public function create(int $kind, ?Lexer $lexer = null): Parser { if (null === $lexer) { $lexer = new Lexer\Emulative(); } switch ($kind) { case self::PREFER_PHP7: case self::ONLY_PHP7: - return new Parser\Php7($lexer, $parserOptions); + return new Parser\Php7($lexer); default: throw new \LogicException( 'Kind must be one of ::PREFER_PHP7 or ::ONLY_PHP7' @@ -41,16 +40,16 @@ public function create(int $kind, ?Lexer $lexer = null, array $parserOptions = [ * accept code for the newest supported version, but will try to accommodate code that becomes * invalid in newer versions or changes in interpretation. */ - public function createForVersion(string $version, array $lexerOptions = [], array $parserOptions = []): Parser { - if ($version === $this->getHostVersion()) { + public function createForVersion(PhpVersion $version, array $lexerOptions = []): Parser { + if ($version->isHostVersion()) { $lexer = new Lexer($lexerOptions); } else { $lexer = new Lexer\Emulative($lexerOptions + ['phpVersion' => $version]); } - if (version_compare($version, '8.0', '>=')) { - return new Php8($lexer, $parserOptions + ['phpVersion' => $version]); + if ($version->id >= 80000) { + return new Php8($lexer, $version); } - return new Php7($lexer, $parserOptions + ['phpVersion' => $version]); + return new Php7($lexer, $version); } /** @@ -58,30 +57,15 @@ public function createForVersion(string $version, array $lexerOptions = [], arra * versions will be accepted if there have been no relevant backwards-compatibility breaks in * PHP. */ - public function createForNewestSupportedVersion(array $lexerOptions = [], array $parserOptions = []): Parser { - return $this->createForVersion($this->getNewestSupportedVersion(), $lexerOptions, $parserOptions); + public function createForNewestSupportedVersion(array $lexerOptions = []): Parser { + return $this->createForVersion(PhpVersion::getNewestSupported(), $lexerOptions); } /** * Create a parser targeting the host PHP version, that is the PHP version we're currently * running on. This parser will not use any token emulation. */ - public function createForHostVersion(array $lexerOptions = [], array $parserOptions = []): Parser { - return $this->createForVersion($this->getHostVersion(), $lexerOptions, $parserOptions); - } - - /** - * Get the newest PHP version supported by this library. Support for this version may be partial, - * if it is still under development. - */ - public function getNewestSupportedVersion(): string { - return '8.2'; - } - - /** - * Get the host PHP version, that is the PHP version we're currently running on. - */ - public function getHostVersion(): string { - return \PHP_MAJOR_VERSION . '.' . \PHP_MINOR_VERSION; + public function createForHostVersion(array $lexerOptions = []): Parser { + return $this->createForVersion(PhpVersion::getHostVersion(), $lexerOptions); } } diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php new file mode 100644 index 0000000000..06091bca65 --- /dev/null +++ b/lib/PhpParser/PhpVersion.php @@ -0,0 +1,113 @@ + 70000, + 'int' => 70000, + 'float' => 70000, + 'string' => 70000, + 'iterable' => 70100, + 'void' => 70100, + 'object' => 70200, + 'null' => 80000, + 'false' => 80000, + 'mixed' => 80000, + 'never' => 80100, + 'true' => 80200, + ]; + + private function __construct(int $id) { + $this->id = $id; + } + + /** + * Create a PhpVersion object from major and minor version components. + */ + public static function fromComponents(int $major, int $minor): self { + return new self($major * 10000 + $minor * 100); + } + + /** + * Get the newest PHP version supported by this library. Support for this version may be partial, + * if it is still under development. + */ + public static function getNewestSupported(): self { + return self::fromComponents(8, 2); + } + + /** + * Get the host PHP version, that is the PHP version we're currently running on. + */ + public static function getHostVersion(): self { + return self::fromComponents(\PHP_MAJOR_VERSION, \PHP_MINOR_VERSION); + } + + /** + * Parse the version from a string like "8.1". + */ + public static function fromString(string $version): self { + if (!preg_match('/^(\d+)\.(\d+)/', $version, $matches)) { + throw new \LogicException("Invalid PHP version \"$version\""); + } + return self::fromComponents((int) $matches[1], (int) $matches[2]); + } + + /** + * Check whether two versions are the same. + */ + public function equals(PhpVersion $other): bool { + return $this->id === $other->id; + } + + /** + * Check whether this version is greater than or equal to the argument. + */ + public function newerOrEqual(PhpVersion $other): bool { + return $this->id >= $other->id; + } + + /** + * Check whether this version is older than the argument. + */ + public function older(PhpVersion $other): bool { + return $this->id < $other->id; + } + + /** + * Check whether this is the host PHP version. + */ + public function isHostVersion(): bool { + return $this->equals(self::getHostVersion()); + } + + /** + * Check whether this PHP version supports the given builtin type. Type name must be lowercase. + */ + public function supportsBuiltinType(string $type): bool { + $minVersion = self::BUILTIN_TYPE_VERSIONS[$type] ?? null; + return $minVersion !== null && $this->id >= $minVersion; + } + + /** + * Whether this version allows "$var =& new Obj". + */ + public function allowsAssignNewByReference(): bool { + return $this->id < 70000; + } + + /** + * Whether this version allows invalid octals like "08". + */ + public function allowsInvalidOctals(): bool { + return $this->id < 70000; + } +} diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php index 63effd9807..bc5f336d61 100644 --- a/test/PhpParser/CodeParsingTest.php +++ b/test/PhpParser/CodeParsingTest.php @@ -39,8 +39,10 @@ private function parseModeLine(string $modeLine): array { public function createParser(?string $version): Parser { $factory = new ParserFactory(); + $version = $version === null + ? PhpVersion::getNewestSupported() : PhpVersion::fromString($version); return $factory->createForVersion( - $version ?? $factory->getNewestSupportedVersion(), + $version, ['usedAttributes' => [ 'startLine', 'endLine', 'startFilePos', 'endFilePos', From a73c8ee03b71a02639491b83437892b0c3039e1a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 23 Jul 2022 18:23:39 +0200 Subject: [PATCH 102/428] Add a phpVersion option to the pretty printer This is currently just used to initialize the default for short array syntax. The default target version in 7.0, which also means that the default for short arrays is flipped to on. --- lib/PhpParser/PhpVersion.php | 7 +++++++ lib/PhpParser/PrettyPrinter/Standard.php | 2 +- lib/PhpParser/PrettyPrinterAbstract.php | 23 ++++++++++++++++------- test/PhpParser/BuilderFactoryTest.php | 4 ++-- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index 06091bca65..4bc6f4c3da 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -97,6 +97,13 @@ public function supportsBuiltinType(string $type): bool { return $minVersion !== null && $this->id >= $minVersion; } + /** + * Whether this version supports [] array literals. + */ + public function supportsShortArraySyntax(): bool { + return $this->id >= 50400; + } + /** * Whether this version allows "$var =& new Obj". */ diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 3469ce96f1..09c6c79dbc 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -574,7 +574,7 @@ protected function pExpr_Variable(Expr\Variable $node) { protected function pExpr_Array(Expr\Array_ $node) { $syntax = $node->getAttribute('kind', - $this->options['shortArraySyntax'] ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); + $this->shortArraySyntax ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); if ($syntax === Expr\Array_::KIND_SHORT) { return '[' . $this->pMaybeMultiline($node->items, true) . ']'; } else { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index a67b9b3144..6660842518 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -99,8 +99,10 @@ abstract class PrettyPrinterAbstract protected $docStringEndToken; /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ protected $canUseSemicolonNamespaces; - /** @var array Pretty printer options */ - protected $options; + /** @var bool Whether to use short array syntax if the node specifies no preference */ + protected $shortArraySyntax; + /** @var PhpVersion PHP version to target */ + protected $phpVersion; /** @var TokenStream Original tokens for use in format-preserving pretty print */ protected $origTokens; @@ -139,16 +141,23 @@ abstract class PrettyPrinterAbstract * 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. + * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.0). This option + * controls compatibility of the generated code with older PHP + * versions in cases where a simple stylistic choice exists (e.g. + * array() vs []). It is safe to pretty-print an AST for a newer + * PHP version while specifying an older target (but the result will + * of course not be compatible with the older version in that case). + * * bool $shortArraySyntax: Whether to use [] instead of array() as the default array + * syntax, if the node does not specify a format. Defaults to whether + * the phpVersion support short array syntax. * * @param array $options Dictionary of formatting options */ public function __construct(array $options = []) { $this->docStringEndToken = '_DOC_STRING_END_' . mt_rand(); - - $defaultOptions = ['shortArraySyntax' => false]; - $this->options = $options + $defaultOptions; + $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 0); + $this->shortArraySyntax = + $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); } /** diff --git a/test/PhpParser/BuilderFactoryTest.php b/test/PhpParser/BuilderFactoryTest.php index 408d25c927..2886a03135 100644 --- a/test/PhpParser/BuilderFactoryTest.php +++ b/test/PhpParser/BuilderFactoryTest.php @@ -349,8 +349,8 @@ abstract class SomeClass extends SomeOtherClass implements A\Few, \Interfaces public const CONST_WITH_ATTRIBUTE = 1; private const FIRST_CLASS_CONST = 1, SECOND_CLASS_CONST = 2; protected $someProperty; - private $anotherProperty = array(1, 2, 3); - #[Column(options: array('unsigned' => true))] + private $anotherProperty = [1, 2, 3]; + #[Column(options: ['unsigned' => true])] public int $integerProperty = 1; #[Route('/index', name: 'homepage')] function firstMethod() From 7bf6348240ece3f581f0e790c6441df49f0d39d0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 23 Jul 2022 21:48:10 +0200 Subject: [PATCH 103/428] Remove inc/dec from precedence map Inc/dec are primitive expressions that only accept a variable operand, rather than a general expression operand. --- lib/PhpParser/PrettyPrinter/Standard.php | 8 ++++---- lib/PhpParser/PrettyPrinterAbstract.php | 8 -------- test/code/prettyPrinter/expr/parentheses.test | 8 ++++---- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 09c6c79dbc..9d7d8f59fe 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -439,19 +439,19 @@ protected function pExpr_UnaryPlus(Expr\UnaryPlus $node) { } protected function pExpr_PreInc(Expr\PreInc $node) { - return $this->pPrefixOp(Expr\PreInc::class, '++', $node->var); + return '++' . $this->p($node->var); } protected function pExpr_PreDec(Expr\PreDec $node) { - return $this->pPrefixOp(Expr\PreDec::class, '--', $node->var); + return '--' . $this->p($node->var); } protected function pExpr_PostInc(Expr\PostInc $node) { - return $this->pPostfixOp(Expr\PostInc::class, $node->var, '++'); + return $this->p($node->var) . '++'; } protected function pExpr_PostDec(Expr\PostDec $node) { - return $this->pPostfixOp(Expr\PostDec::class, $node->var, '--'); + return $this->p($node->var) . '--'; } protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node) { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 6660842518..354c23244d 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -27,10 +27,6 @@ abstract class PrettyPrinterAbstract // where for precedence -1 is %left, 0 is %nonassoc and 1 is %right BinaryOp\Pow::class => [ 0, 1], Expr\BitwiseNot::class => [ 10, 1], - Expr\PreInc::class => [ 10, 1], - Expr\PreDec::class => [ 10, 1], - Expr\PostInc::class => [ 10, -1], - Expr\PostDec::class => [ 10, -1], Expr\UnaryPlus::class => [ 10, 1], Expr\UnaryMinus::class => [ 10, 1], Cast\Int_::class => [ 10, 1], @@ -1169,10 +1165,6 @@ protected function initializeFixupMap() { if ($this->fixupMap) return; $this->fixupMap = [ - Expr\PreInc::class => ['var' => self::FIXUP_PREC_RIGHT], - Expr\PreDec::class => ['var' => self::FIXUP_PREC_RIGHT], - Expr\PostInc::class => ['var' => self::FIXUP_PREC_LEFT], - Expr\PostDec::class => ['var' => self::FIXUP_PREC_LEFT], Expr\Instanceof_::class => [ 'expr' => self::FIXUP_PREC_LEFT, 'class' => self::FIXUP_PREC_RIGHT, // TODO: FIXUP_NEW_VARIABLE diff --git a/test/code/prettyPrinter/expr/parentheses.test b/test/code/prettyPrinter/expr/parentheses.test index bda956e3d5..e422d9fb2f 100644 --- a/test/code/prettyPrinter/expr/parentheses.test +++ b/test/code/prettyPrinter/expr/parentheses.test @@ -44,7 +44,7 @@ print ($a and print $b); +(++$a); // The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment -// and incdec only work on variables. +// only works on variables. !$a = $b; ++$a ** $b; $a ** $b++; @@ -80,7 +80,7 @@ print ($a and print $b); -(--$a); +(++$a); // The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment -// and incdec only work on variables. +// only works on variables. !($a = $b); -(++$a) ** $b; -$a ** ($b++); +++$a ** $b; +$a ** $b++; From 59145a444347418e445fd99484d546a58ccdb156 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 23 Jul 2022 21:53:48 +0200 Subject: [PATCH 104/428] Treat assignments as unary operators Assignment expressions can be viewed as unary operators where the whole "$x =" part is the operator. --- lib/PhpParser/PrettyPrinter/Standard.php | 30 +++++++++++----------- lib/PhpParser/PrettyPrinterAbstract.php | 32 +++--------------------- 2 files changed, 19 insertions(+), 43 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 9d7d8f59fe..1e9aa4b17f 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -236,63 +236,63 @@ protected function pScalar_EncapsedStringPart(Scalar\EncapsedStringPart $node) { // Assignments protected function pExpr_Assign(Expr\Assign $node) { - return $this->pInfixOp(Expr\Assign::class, $node->var, ' = ', $node->expr); + return $this->pPrefixOp(Expr\Assign::class, $this->p($node->var) . ' = ', $node->expr); } protected function pExpr_AssignRef(Expr\AssignRef $node) { - return $this->pInfixOp(Expr\AssignRef::class, $node->var, ' =& ', $node->expr); + return $this->pPrefixOp(Expr\AssignRef::class, $this->p($node->var) . ' =& ', $node->expr); } protected function pExpr_AssignOp_Plus(AssignOp\Plus $node) { - return $this->pInfixOp(AssignOp\Plus::class, $node->var, ' += ', $node->expr); + return $this->pPrefixOp(AssignOp\Plus::class, $this->p($node->var) . ' += ', $node->expr); } protected function pExpr_AssignOp_Minus(AssignOp\Minus $node) { - return $this->pInfixOp(AssignOp\Minus::class, $node->var, ' -= ', $node->expr); + return $this->pPrefixOp(AssignOp\Minus::class, $this->p($node->var) . ' -= ', $node->expr); } protected function pExpr_AssignOp_Mul(AssignOp\Mul $node) { - return $this->pInfixOp(AssignOp\Mul::class, $node->var, ' *= ', $node->expr); + return $this->pPrefixOp(AssignOp\Mul::class, $this->p($node->var) . ' *= ', $node->expr); } protected function pExpr_AssignOp_Div(AssignOp\Div $node) { - return $this->pInfixOp(AssignOp\Div::class, $node->var, ' /= ', $node->expr); + return $this->pPrefixOp(AssignOp\Div::class, $this->p($node->var) . ' /= ', $node->expr); } protected function pExpr_AssignOp_Concat(AssignOp\Concat $node) { - return $this->pInfixOp(AssignOp\Concat::class, $node->var, ' .= ', $node->expr); + return $this->pPrefixOp(AssignOp\Concat::class, $this->p($node->var) . ' .= ', $node->expr); } protected function pExpr_AssignOp_Mod(AssignOp\Mod $node) { - return $this->pInfixOp(AssignOp\Mod::class, $node->var, ' %= ', $node->expr); + return $this->pPrefixOp(AssignOp\Mod::class, $this->p($node->var) . ' %= ', $node->expr); } protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node) { - return $this->pInfixOp(AssignOp\BitwiseAnd::class, $node->var, ' &= ', $node->expr); + return $this->pPrefixOp(AssignOp\BitwiseAnd::class, $this->p($node->var) . ' &= ', $node->expr); } protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node) { - return $this->pInfixOp(AssignOp\BitwiseOr::class, $node->var, ' |= ', $node->expr); + return $this->pPrefixOp(AssignOp\BitwiseOr::class, $this->p($node->var) . ' |= ', $node->expr); } protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node) { - return $this->pInfixOp(AssignOp\BitwiseXor::class, $node->var, ' ^= ', $node->expr); + return $this->pPrefixOp(AssignOp\BitwiseXor::class, $this->p($node->var) . ' ^= ', $node->expr); } protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node) { - return $this->pInfixOp(AssignOp\ShiftLeft::class, $node->var, ' <<= ', $node->expr); + return $this->pPrefixOp(AssignOp\ShiftLeft::class, $this->p($node->var) . ' <<= ', $node->expr); } protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node) { - return $this->pInfixOp(AssignOp\ShiftRight::class, $node->var, ' >>= ', $node->expr); + return $this->pPrefixOp(AssignOp\ShiftRight::class, $this->p($node->var) . ' >>= ', $node->expr); } protected function pExpr_AssignOp_Pow(AssignOp\Pow $node) { - return $this->pInfixOp(AssignOp\Pow::class, $node->var, ' **= ', $node->expr); + return $this->pPrefixOp(AssignOp\Pow::class, $this->p($node->var) . ' **= ', $node->expr); } protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node) { - return $this->pInfixOp(AssignOp\Coalesce::class, $node->var, ' ??= ', $node->expr); + return $this->pPrefixOp(AssignOp\Coalesce::class, $this->p($node->var) . ' ??= ', $node->expr); } // Binary expressions diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 354c23244d..edc1cffa6c 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -63,7 +63,6 @@ abstract class PrettyPrinterAbstract BinaryOp\BooleanOr::class => [130, -1], BinaryOp\Coalesce::class => [140, 1], Expr\Ternary::class => [150, 0], - // parser uses %left for assignments, but they really behave as %right Expr\Assign::class => [160, 1], Expr\AssignRef::class => [160, 1], AssignOp\Plus::class => [160, 1], @@ -337,20 +336,6 @@ protected function pPrefixOp(string $class, string $operatorString, Node $node) return $operatorString . $this->pPrec($node, $precedence, $associativity, 1); } - /** - * Pretty-print a postfix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param string $operatorString String representation of the operator - * @param Node $node Node - * - * @return string Pretty printed postfix operation - */ - protected function pPostfixOp(string $class, Node $node, string $operatorString) : string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - return $this->pPrec($node, $precedence, $associativity, -1) . $operatorString; - } - /** * Prints an expression node with the least amount of parentheses necessary to preserve the meaning. * @@ -1222,24 +1207,15 @@ protected function initializeFixupMap() { ]; } - $assignOps = [ - Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, - AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, - AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class - ]; - foreach ($assignOps as $assignOp) { - $this->fixupMap[$assignOp] = [ - 'var' => self::FIXUP_PREC_LEFT, - 'expr' => self::FIXUP_PREC_RIGHT, - ]; - } - $prefixOps = [ Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, + Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, + AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, + AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, + AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class ]; foreach ($prefixOps as $prefixOp) { $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_RIGHT]; From 84813dc1e4fcefedf08b3a09671fb3afad27be19 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 23 Jul 2022 22:17:33 +0200 Subject: [PATCH 105/428] Avoid repeatedly downloading archive in run-php-src.sh When doing local testing, chances are that the archive is already present. --- test_old/run-php-src.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test_old/run-php-src.sh b/test_old/run-php-src.sh index bc1a3d698e..16d89cc13d 100755 --- a/test_old/run-php-src.sh +++ b/test_old/run-php-src.sh @@ -1,5 +1,8 @@ VERSION=$1 -wget -q https://github.com/php/php-src/archive/php-$VERSION.tar.gz +if [[ ! -f php-$VERSION.tar.gz ]]; then + wget -q https://github.com/php/php-src/archive/php-$VERSION.tar.gz +fi +rm -rf ./data/php-src mkdir -p ./data/php-src tar -xzf ./php-$VERSION.tar.gz -C ./data/php-src --strip-components=1 php test_old/run.php --verbose --no-progress --php-version=$VERSION PHP ./data/php-src From c218db3e16695848d6fba1deb7de408b12c2e994 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 23 Jul 2022 22:18:37 +0200 Subject: [PATCH 106/428] Add additional test case for assignment precedence This is a case where the parentheses around the assignment *are* important. --- test/code/prettyPrinter/expr/parentheses.test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/code/prettyPrinter/expr/parentheses.test b/test/code/prettyPrinter/expr/parentheses.test index e422d9fb2f..9e351fab7b 100644 --- a/test/code/prettyPrinter/expr/parentheses.test +++ b/test/code/prettyPrinter/expr/parentheses.test @@ -48,6 +48,7 @@ print ($a and print $b); !$a = $b; ++$a ** $b; $a ** $b++; +$a . ($b = $c) . $d; ----- echo 'abc' . 'cde' . 'fgh'; echo 'abc' . ('cde' . 'fgh'); @@ -84,3 +85,4 @@ print ($a and print $b); !($a = $b); ++$a ** $b; $a ** $b++; +$a . ($b = $c) . $d; From 646b490735ac02d7f42081ff8b8674651456ce17 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 24 Jul 2022 22:15:42 +0200 Subject: [PATCH 107/428] Don't force newline after doc string when targeting PHP >= 7.3 --- lib/PhpParser/PhpVersion.php | 7 +++++++ lib/PhpParser/PrettyPrinterAbstract.php | 16 ++++++++++------ test/PhpParser/CodeParsingTest.php | 20 +------------------- test/PhpParser/CodeTestAbstract.php | 17 +++++++++++++++++ test/PhpParser/PrettyPrinterTest.php | 12 +++--------- test/code/prettyPrinter/expr/docStrings.test | 12 +++++++++++- 6 files changed, 49 insertions(+), 35 deletions(-) diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index 4bc6f4c3da..9e40bb373b 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -104,6 +104,13 @@ public function supportsShortArraySyntax(): bool { return $this->id >= 50400; } + /** + * Whether this version supports flexible heredoc/nowdoc. + */ + public function supportsFlexibleHeredoc(): bool { + return $this->id >= 70300; + } + /** * Whether this version allows "$var =& new Obj". */ diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index edc1cffa6c..394e93a0b3 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -90,7 +90,8 @@ abstract class PrettyPrinterAbstract protected $indentLevel; /** @var string Newline including current indentation. */ protected $nl; - /** @var string Token placed at end of doc string to ensure it is followed by a newline. */ + /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. + * Null if flexible doc strings are used. */ protected $docStringEndToken; /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ protected $canUseSemicolonNamespaces; @@ -149,10 +150,11 @@ abstract class PrettyPrinterAbstract * @param array $options Dictionary of formatting options */ public function __construct(array $options = []) { - $this->docStringEndToken = '_DOC_STRING_END_' . mt_rand(); $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 0); $this->shortArraySyntax = $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); + $this->docStringEndToken = + $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); } /** @@ -263,10 +265,12 @@ protected function preprocessNodes(array $nodes) { * @param string $str * @return string */ - protected function handleMagicTokens(string $str) : string { - // 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); + protected function handleMagicTokens(string $str): string { + if ($this->docStringEndToken !== null) { + // 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; } diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php index bc5f336d61..c329ff4031 100644 --- a/test/PhpParser/CodeParsingTest.php +++ b/test/PhpParser/CodeParsingTest.php @@ -11,12 +11,7 @@ class CodeParsingTest extends CodeTestAbstract * @dataProvider provideTestParse */ public function testParse($name, $code, $expected, $modeLine) { - if (null !== $modeLine) { - $modes = $this->parseModeLine($modeLine); - } else { - $modes = []; - } - + $modes = $this->parseModeLine($modeLine); $parser = $this->createParser($modes['version'] ?? null); list($stmts, $output) = $this->getParseOutput($parser, $code, $modes); @@ -24,19 +19,6 @@ public function testParse($name, $code, $expected, $modeLine) { $this->checkAttributes($stmts); } - private function parseModeLine(string $modeLine): array { - $modes = []; - foreach (explode(',', $modeLine) as $mode) { - $kv = explode('=', $mode, 2); - if (isset($kv[1])) { - $modes[$kv[0]] = $kv[1]; - } else { - $modes[$kv[0]] = true; - } - } - return $modes; - } - public function createParser(?string $version): Parser { $factory = new ParserFactory(); $version = $version === null diff --git a/test/PhpParser/CodeTestAbstract.php b/test/PhpParser/CodeTestAbstract.php index f5f408755c..a77d0b7fc9 100644 --- a/test/PhpParser/CodeTestAbstract.php +++ b/test/PhpParser/CodeTestAbstract.php @@ -23,4 +23,21 @@ protected function getTests($directory, $fileExtension, $chunksPerTest = 2) { return $allTests; } + + protected function parseModeLine(?string $modeLine): array { + if ($modeLine === null) { + return []; + } + + $modes = []; + foreach (explode(',', $modeLine) as $mode) { + $kv = explode('=', $mode, 2); + if (isset($kv[1])) { + $modes[$kv[0]] = $kv[1]; + } else { + $modes[$kv[0]] = true; + } + } + return $modes; + } } diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 93aade6b5f..e84569d10f 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -19,8 +19,9 @@ protected function doTestPrettyPrintMethod($method, $name, $code, $expected, $mo $lexer = new Lexer\Emulative; $parser = new Parser\Php7($lexer); - list(, $options) = $this->parseModeLine($modeLine); - $prettyPrinter = new Standard($options); + $options = $this->parseModeLine($modeLine); + $version = isset($options['version']) ? PhpVersion::fromString($options['version']) : null; + $prettyPrinter = new Standard(['phpVersion' => $version]); $output = canonicalize($prettyPrinter->$method($parser->parse($code))); $this->assertSame($expected, $output, $name); @@ -72,13 +73,6 @@ public function testCommentBeforeInlineHTML() { $this->assertSame($expected, $prettyPrinter->prettyPrintFile($stmts)); } - private function parseModeLine($modeLine) { - $parts = explode(' ', (string) $modeLine, 2); - $version = $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_([ diff --git a/test/code/prettyPrinter/expr/docStrings.test b/test/code/prettyPrinter/expr/docStrings.test index a4a60acead..68ae472869 100644 --- a/test/code/prettyPrinter/expr/docStrings.test +++ b/test/code/prettyPrinter/expr/docStrings.test @@ -83,4 +83,14 @@ STR; << Date: Sun, 24 Jul 2022 22:56:44 +0200 Subject: [PATCH 108/428] Improve heuristic for escaping in single quoted strings It is idiomatic to not escape backslashes if they are followed by a non-special character. --- lib/PhpParser/PrettyPrinter/Standard.php | 7 ++++++- test/code/prettyPrinter/expr/literals.test | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 1e9aa4b17f..99cfd17cc9 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -997,7 +997,12 @@ protected function pEncapsList(array $encapsList, $quote) { } protected function pSingleQuotedString(string $string) { - return '\'' . addcslashes($string, '\'\\') . '\''; + // It is idiomatic to only escape backslashes when necessary, i.e. when followed by ', \ or + // the end of the string ('Foo\Bar' instead of 'Foo\\Bar'). However, we also don't want to + // produce an odd number of backslashes, so '\\\\a' should not get rendered as '\\\a', even + // though that would be legal. + $regex = '/\'|\\\\(?=[\'\\\\]|$)|(?<=\\\\)\\\\/'; + return '\'' . preg_replace($regex, '\\\\$0', $string) . '\''; } protected function escapeString($string, $quote) { diff --git a/test/code/prettyPrinter/expr/literals.test b/test/code/prettyPrinter/expr/literals.test index f649b5d0cc..0d92b38884 100644 --- a/test/code/prettyPrinter/expr/literals.test +++ b/test/code/prettyPrinter/expr/literals.test @@ -47,6 +47,8 @@ b'; 'a\'b'; 'a\b'; 'a\\'; +'a\\\\b'; +'a\\\'b'; // strings (double quoted) "a"; @@ -122,8 +124,10 @@ FALSE; 'a b'; 'a\'b'; -'a\\b'; +'a\b'; 'a\\'; +'a\\\\b'; +'a\\\'b'; // strings (double quoted) "a"; "a\nb"; @@ -155,4 +159,4 @@ b'; `foo`; `foo{$a}`; `foo{$a}bar`; -`\`\\'\\"`; \ No newline at end of file +`\`\\'\\"`; From e61bb11989111f2f9d71e530acb3162b02d6feab Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 24 Jul 2022 23:06:20 +0200 Subject: [PATCH 109/428] Add additional upgrading notes for pretty printer --- UPGRADE-5.0.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 0267d55cc6..bc18c4859e 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -109,6 +109,23 @@ function () use ($var) { }; ``` +Backslashes in single-quoted strings are now only printed if they are necessary: + +```php +# Before +'Foo\\Bar'; +'\\\\'; + +# After +'Foo\Bar'; +'\\\\'; +``` + +The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defaults to PHP 7.0. The pretty printer will make formatting choices to make the code valid for that version. It currently controls the following behavior: + +* For PHP >= 7.0 (default), short array syntax `[]` will be used by default. This does not affect nodes that specify an explicit array syntax using the `kind` attribute. +* For PHP >= 7.3, a newline is no longer forced after heredoc/nowdoc strings, as the requirement for this has been removed with the introduction of flexible heredoc/nowdoc strings. + ### Changes to token representation Tokens are now internally represented using the `PhpParser\Token` class, which exposes the same base interface as From 9ef528f3f563bc51c8e18ac122b87ebe16bcda10 Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 7 Aug 2022 13:33:38 +0300 Subject: [PATCH 110/428] ParserAbstract: remove undefined class in `use` Class `PhpParser\Parser\Tokens` not exists in current version --- lib/PhpParser/ParserAbstract.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index c71b75a740..2dfa31090d 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -21,7 +21,6 @@ use PhpParser\Node\Stmt\Property; use PhpParser\Node\Stmt\TryCatch; use PhpParser\Node\Stmt\UseUse; -use PhpParser\Parser\Tokens; abstract class ParserAbstract implements Parser { From c55c7a2ac305fdc543f37614982e8e8d3cdec447 Mon Sep 17 00:00:00 2001 From: Anton Date: Sun, 7 Aug 2022 17:00:03 +0300 Subject: [PATCH 111/428] Add json and ctype as required extensions in composer.json (#864) --- composer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c73602859d..158152c55f 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,9 @@ ], "require": { "php": ">=7.1", - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "ext-json": "*", + "ext-ctype": "*" }, "require-dev": { "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0", From 1f504d2c7da6020d56144cdb8443a3ba681f6183 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 7 Aug 2022 16:19:39 +0200 Subject: [PATCH 112/428] Don't trim in Comment::getReformattedText() In the past, single-line comments were stored together with the trailing newline. Later we switched to the PHP8 comment representation, where the trailing newline is not part of the comment anymore. As such, there is also no need to trim here. This is split out from GH-867. --- lib/PhpParser/Comment.php | 2 +- test/PhpParser/CommentTest.php | 2 +- test/code/formatPreservation/classMethodNop.test | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index 2c604c2f91..7e6e41a526 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -150,7 +150,7 @@ public function __toString() : string { * @return mixed|string */ public function getReformattedText() { - $text = trim($this->text); + $text = $this->text; $newlinePos = strpos($text, "\n"); if (false === $newlinePos) { // Single line comments don't need further processing diff --git a/test/PhpParser/CommentTest.php b/test/PhpParser/CommentTest.php index c51a26be8f..23174c7e08 100644 --- a/test/PhpParser/CommentTest.php +++ b/test/PhpParser/CommentTest.php @@ -31,7 +31,7 @@ public function testReformatting($commentText, $reformattedText) { public function provideTestReformatting() { return [ - ['// Some text' . "\n", '// Some text'], + ['// Some text', '// Some text'], ['/* Some text */', '/* Some text */'], [ '/** diff --git a/test/code/formatPreservation/classMethodNop.test b/test/code/formatPreservation/classMethodNop.test index e2ad5ae13e..61010210f5 100644 --- a/test/code/formatPreservation/classMethodNop.test +++ b/test/code/formatPreservation/classMethodNop.test @@ -65,7 +65,7 @@ class Foo { } } ----- -$stmts[0]->stmts[0]->stmts[0]->setAttribute('comments', [new Comment("// I'm a new comment\n")]); +$stmts[0]->stmts[0]->stmts[0]->setAttribute('comments', [new Comment("// I'm a new comment")]); ----- Date: Sun, 7 Aug 2022 16:30:12 +0200 Subject: [PATCH 113/428] Mark NodeVisitorAbstract as abstract class It doesn't actually have any abstract methods, but doesn't do anything by itself and is intended for extension only. Fixes #865. --- lib/PhpParser/NodeVisitorAbstract.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/NodeVisitorAbstract.php b/lib/PhpParser/NodeVisitorAbstract.php index d378d67096..0fc7f81378 100644 --- a/lib/PhpParser/NodeVisitorAbstract.php +++ b/lib/PhpParser/NodeVisitorAbstract.php @@ -5,7 +5,7 @@ /** * @codeCoverageIgnore */ -class NodeVisitorAbstract implements NodeVisitor +abstract class NodeVisitorAbstract implements NodeVisitor { public function beforeTraverse(array $nodes) { return null; From ea9d6b223869ae121b51a19fa0549d6ab20c640d Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 21 Jul 2022 08:18:46 +0300 Subject: [PATCH 114/428] Always use pMaybeMultiline() for function parameters Closes GH-861. --- lib/PhpParser/PrettyPrinter/Standard.php | 6 +-- .../prettyPrinter/stmt/param_comments.test | 53 +++++++++++++++++++ 2 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 test/code/prettyPrinter/stmt/param_comments.test diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 99cfd17cc9..941bab445c 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -622,7 +622,7 @@ protected function pExpr_Closure(Expr\Closure $node) { return $this->pAttrGroups($node->attrGroups, true) . ($node->static ? 'static ' : '') . 'function ' . ($node->byRef ? '&' : '') - . '(' . $this->pCommaSeparated($node->params) . ')' + . '(' . $this->pMaybeMultiline($node->params) . ')' . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; @@ -644,7 +644,7 @@ protected function pExpr_ArrowFunction(Expr\ArrowFunction $node) { return $this->pAttrGroups($node->attrGroups, true) . ($node->static ? 'static ' : '') . 'fn' . ($node->byRef ? '&' : '') - . '(' . $this->pCommaSeparated($node->params) . ')' + . '(' . $this->pMaybeMultiline($node->params) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' => ' . $this->p($node->expr); @@ -813,7 +813,7 @@ protected function pStmt_ClassConst(Stmt\ClassConst $node) { protected function pStmt_Function(Stmt\Function_ $node) { return $this->pAttrGroups($node->attrGroups) . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pCommaSeparated($node->params) . ')' + . '(' . $this->pMaybeMultiline($node->params) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } diff --git a/test/code/prettyPrinter/stmt/param_comments.test b/test/code/prettyPrinter/stmt/param_comments.test new file mode 100644 index 0000000000..23f809ea04 --- /dev/null +++ b/test/code/prettyPrinter/stmt/param_comments.test @@ -0,0 +1,53 @@ +Comments on function parameters +----- + 42; +----- +class Test +{ + function test( + // Comment + $param + ) + { + } +} +function test( + // Comment + $param +) +{ +} +function ( + // Comment + $param +) { +}; +fn( + // Comment + $param +) => 42; From 652fb0c6c168527cc1573f5ae466fa6df6e12115 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 7 Aug 2022 16:43:53 +0200 Subject: [PATCH 115/428] Print trailing comma in param list if supported --- lib/PhpParser/PhpVersion.php | 7 +++ lib/PhpParser/PrettyPrinter/Standard.php | 8 +-- .../prettyPrinter/stmt/param_comments.test | 53 +++++++++++++++++++ 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index 9e40bb373b..d495626d8c 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -111,6 +111,13 @@ public function supportsFlexibleHeredoc(): bool { return $this->id >= 70300; } + /** + * Whether this version supports trailing commas in parameter lists. + */ + public function supportsTrailingCommaInParamList(): bool { + return $this->id >= 80000; + } + /** * Whether this version allows "$var =& new Obj". */ diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 941bab445c..9be63b795a 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -622,7 +622,7 @@ protected function pExpr_Closure(Expr\Closure $node) { return $this->pAttrGroups($node->attrGroups, true) . ($node->static ? 'static ' : '') . 'function ' . ($node->byRef ? '&' : '') - . '(' . $this->pMaybeMultiline($node->params) . ')' + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; @@ -644,7 +644,7 @@ protected function pExpr_ArrowFunction(Expr\ArrowFunction $node) { return $this->pAttrGroups($node->attrGroups, true) . ($node->static ? 'static ' : '') . 'fn' . ($node->byRef ? '&' : '') - . '(' . $this->pMaybeMultiline($node->params) . ')' + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' => ' . $this->p($node->expr); @@ -797,7 +797,7 @@ protected function pStmt_ClassMethod(Stmt\ClassMethod $node) { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pMaybeMultiline($node->params) . ')' + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . (null !== $node->stmts ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' @@ -813,7 +813,7 @@ protected function pStmt_ClassConst(Stmt\ClassConst $node) { protected function pStmt_Function(Stmt\Function_ $node) { return $this->pAttrGroups($node->attrGroups) . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pMaybeMultiline($node->params) . ')' + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } diff --git a/test/code/prettyPrinter/stmt/param_comments.test b/test/code/prettyPrinter/stmt/param_comments.test index 23f809ea04..5efc70d43c 100644 --- a/test/code/prettyPrinter/stmt/param_comments.test +++ b/test/code/prettyPrinter/stmt/param_comments.test @@ -51,3 +51,56 @@ fn( // Comment $param ) => 42; +----- + 42; +----- +!!version=8.0 +class Test +{ + function test( + // Comment + $param, + ) + { + } +} +function test( + // Comment + $param, +) +{ +} +function ( + // Comment + $param, +) { +}; +fn( + // Comment + $param, +) => 42; From 9b2a01aa0cd0f97cd2d10ec5e17a1bf8b3fe142a Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sun, 7 Aug 2022 16:10:11 +0100 Subject: [PATCH 116/428] Add support for DNF types (#862) --- grammar/php.y | 38 +- lib/PhpParser/Node/UnionType.php | 2 +- lib/PhpParser/Parser/Php7.php | 1679 ++++++++-------- lib/PhpParser/Parser/Php8.php | 1697 +++++++++-------- lib/PhpParser/PrettyPrinter/Standard.php | 10 +- .../function/disjointNormalFormTypes.test | 157 ++ .../stmt/disjointNormalFormTypes.test | 17 + 7 files changed, 1939 insertions(+), 1661 deletions(-) create mode 100644 test/code/parser/stmt/function/disjointNormalFormTypes.test create mode 100644 test/code/prettyPrinter/stmt/disjointNormalFormTypes.test diff --git a/grammar/php.y b/grammar/php.y index 56f779598c..357d05dfbe 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -689,7 +689,7 @@ type_expr: type { $$ = $1; } | '?' type { $$ = Node\NullableType[$2]; } | union_type { $$ = Node\UnionType[$1]; } - | intersection_type { $$ = Node\IntersectionType[$1]; } + | intersection_type { $$ = $1; } ; type: @@ -703,34 +703,52 @@ type_without_static: | T_CALLABLE { $$ = Node\Identifier['callable']; } ; +union_type_element: + type { $$ = $1; } + | '(' intersection_type ')' { $$ = $2; } +; + union_type: - type '|' type { init($1, $3); } - | union_type '|' type { push($1, $3); } + union_type_element '|' union_type_element { init($1, $3); } + | union_type '|' union_type_element { push($1, $3); } +; + +union_type_without_static_element: + type_without_static { $$ = $1; } + | '(' intersection_type_without_static ')' { $$ = $2; } ; union_type_without_static: - type_without_static '|' type_without_static { init($1, $3); } - | union_type_without_static '|' type_without_static { push($1, $3); } + union_type_without_static_element '|' union_type_without_static_element { init($1, $3); } + | union_type_without_static '|' union_type_without_static_element { push($1, $3); } ; -intersection_type: +intersection_type_list: type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type { init($1, $3); } - | intersection_type T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type + | intersection_type_list T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type { push($1, $3); } ; -intersection_type_without_static: +intersection_type: + intersection_type_list { $$ = Node\IntersectionType[$1]; } +; + +intersection_type_without_static_list: type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static { init($1, $3); } - | intersection_type_without_static T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static + | intersection_type_without_static_list T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG type_without_static { push($1, $3); } ; +intersection_type_without_static: + intersection_type_without_static_list { $$ = Node\IntersectionType[$1]; } +; + type_expr_without_static: type_without_static { $$ = $1; } | '?' type_without_static { $$ = Node\NullableType[$2]; } | union_type_without_static { $$ = Node\UnionType[$1]; } - | intersection_type_without_static { $$ = Node\IntersectionType[$1]; } + | intersection_type_without_static { $$ = $1; } ; optional_type_without_static: diff --git a/lib/PhpParser/Node/UnionType.php b/lib/PhpParser/Node/UnionType.php index 61c2d81062..51ecec2a32 100644 --- a/lib/PhpParser/Node/UnionType.php +++ b/lib/PhpParser/Node/UnionType.php @@ -10,7 +10,7 @@ class UnionType extends ComplexType /** * Constructs a union type. * - * @param (Identifier|Name)[] $types Types + * @param (Identifier|Name|IntersectionType)[] $types Types * @param array $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 1f9b31a3a7..12eb6f4313 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -159,16 +159,16 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1215; - protected $gotoTableSize = 585; + protected $actionTableSize = 1230; + protected $gotoTableSize = 684; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 421; - protected $numNonLeafStates = 712; + protected $YY2TBLSTATE = 429; + protected $numNonLeafStates = 720; protected $symbolToName = array( "EOF", @@ -385,138 +385,139 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $action = array( - 132, 133, 134, 571, 135, 136, 0, 724, 725, 726, - 137, 37, 924, 448, 449, 450,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 101, 102, 103, 104, 105, 1074, 1075, - 1076, 1073, 1072, 1071, 1077, 718, 717,-32766,-32766,-32766, + 132, 133, 134, 573, 135, 136, 0, 732, 733, 734, + 137, 37, 932, 450, 451, 452,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 101, 102, 103, 104, 105, 1088, 1089, + 1090, 1087, 1086, 1085, 1091, 726, 725,-32766, 1004,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1205, 371, 372, 1285, 727,-32766,-32766,-32766, 1004, - 1005, 1284, 415,-32766,-32766,-32766, 373, 372, 802, 267, - 138, 397, 731, 732, 733, 734, 415,-32766, 421,-32766, - -32766,-32766,-32766,-32766,-32766, 735, 736, 737, 738, 739, - 740, 741, 742, 743, 744, 745, 765, 572, 766, 767, - 768, 769, 757, 758, 337, 338, 760, 761, 746, 747, - 748, 750, 751, 752, 347, 792, 793, 794, 795, 796, - 797, 753, 754, 573, 574, 786, 777, 775, 776, 789, - 772, 773, 809, 544, 575, 576, 771, 577, 578, 579, - 580, 581, 582, 800, 804,-32766,-32766,-32766, 774, 583, - 584, 686, 139, 240, 132, 133, 134, 571, 135, 136, - 1023, 724, 725, 726, 137, 37,-32766, 2,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 1074, - 1075, 1076, 1073, 1072, 1071, 1077, 836, 811, 837, 718, - 717,-32766,-32766,-32766, 1237, -580,-32766, 12,-32766,-32766, - -32766,-32766, -580, 893, 996,-32766,-32766,-32766, 293, 727, - 126, 74,-32766, 34,-32766,-32766,-32766, 320, 106, 107, - 108, 1265, 270, 267, 138, 397, 731, 732, 733, 734, - -577, 470, 421, 689, 109, 808, 280, -577, 281, 735, - 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, - 765, 572, 766, 767, 768, 769, 757, 758, 337, 338, - 760, 761, 746, 747, 748, 750, 751, 752, 347, 792, - 793, 794, 795, 796, 797, 753, 754, 573, 574, 786, - 777, 775, 776, 789, 772, 773, 883, 321, 575, 576, - 771, 577, 578, 579, 580, 581, 582,-32766, 82, 83, - 84, -268, 774, 583, 584, 128, 148, 749, 719, 720, - 721, 722, 723, 150, 724, 725, 726, 762, 763, 36, - 144, 85, 86, 87, 88, 89, 90, 91, 92, 93, + -32767, 1219, 373, 374, 2, 735,-32766,-32766,-32766, 103, + 104, 105, 417,-32766,-32766,-32766, 375, 374, 810, 267, + 138, 399, 739, 740, 741, 742, 417,-32766, 423,-32766, + -32766,-32766,-32766,-32766,-32766, 743, 744, 745, 746, 747, + 748, 749, 750, 751, 752, 753, 773, 574, 774, 775, + 776, 777, 765, 766, 339, 340, 768, 769, 754, 755, + 756, 758, 759, 760, 349, 800, 801, 802, 803, 804, + 805, 761, 762, 575, 576, 794, 785, 783, 784, 797, + 780, 781, 817, 546, 577, 578, 779, 579, 580, 581, + 582, 583, 584, 808, 812,-32766,-32766,-32766, 782, 585, + 586, 694, 139, 240, 132, 133, 134, 573, 135, 136, + 1037, 732, 733, 734, 137, 37,-32766, 12,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 1088, + 1089, 1090, 1087, 1086, 1085, 1091, 844,-32766, 845, 726, + 725,-32766,-32766,-32766, 1251, -586,-32766, 34,-32766,-32766, + -32766,-32766, -586, 901, 921,-32766,-32766,-32766, 295, 735, + 126, 74,-32766, 128,-32766,-32766,-32766, 322, 106, 107, + 108, 1279, 271, 267, 138, 399, 739, 740, 741, 742, + -324, 472, 423, 697, 109, 816,-32766,-32766,-32766, 743, + 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, + 773, 574, 774, 775, 776, 777, 765, 766, 339, 340, + 768, 769, 754, 755, 756, 758, 759, 760, 349, 800, + 801, 802, 803, 804, 805, 761, 762, 575, 576, 794, + 785, 783, 784, 797, 780, 781, 891, 323, 577, 578, + 779, 579, 580, 581, 582, 583, 584,-32766, 82, 83, + 84, -268, 782, 585, 586, 144, 148, 757, 727, 728, + 729, 730, 731, 1299, 732, 733, 734, 770, 771, 36, + 1298, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 810, 270, 913,-32766,-32766, - -32766, 456, 457, 1002, -580, 253, -580, 1022, 109, 928, - 929, 895, 727, 471, 930, 684,-32766,-32766,-32766,-32766, - 1050,-32766,-32766, 959, 1004, 1005, 728, 729, 730, 731, - 732, 733, 734, 81, 304, 798, 279, 320, -531, -577, - 284, -577, 735, 736, 737, 738, 739, 740, 741, 742, - 743, 744, 745, 765, 788, 766, 767, 768, 769, 757, - 758, 759, 787, 760, 761, 746, 747, 748, 750, 751, - 752, 791, 792, 793, 794, 795, 796, 797, 753, 754, - 755, 756, 786, 777, 775, 776, 789, 772, 773, -86, - -318, 764, 770, 771, 778, 779, 781, 780, 782, 783, - 1205, 600, -531, -531, 306, 774, 785, 784, 49, 50, - 51, 501, 52, 53, 103, 104, 105, -531, 54, 55, - -111, 56, 1002, 893, 893, -111,-32766, -111, 284, -537, - 1310, -531, 300, 1311, -193, -111, -111, -111, -111, -111, - -111, -111, -111, 1004, 1005, 893, 893, 1004, 1005,-32766, - -32766, 960, 1205, 690, 691, -86, 57, 58, 1225, 698, - 318, -530, 59, 334, 60, 247, 248, 61, 62, 63, - 64, 65, 66, 67, 68, 693, 27, 268, 69, 437, - 502, 809, -16, -332, 1231, 1232, 503, 335, 809, 805, - 361, -532, 1229, 41, 24, 504, 594, 505, 1281, 506, - 893, 507, 718, 717, 508, 509, 883, 883, 365, 43, - 44, 438, 368, 367,-32766, 45, 510, 992, 991, 990, - 993, 359, 333, 1198, -192, -530, -530, 380, 883, 883, - 511, 512, 513, 809, 151, 1004, 1005, 1051, 421, 809, - -530, 710, 515, 516, -318, 1219, 1220, 1221, 1222, 1216, - 1217, 292, -536, 433, -530, -532, -532, 1223, 1218, 1196, - 74, 1200, 1199, 1201, 293, 806, 320, 70, 14, 153, - -532, 316, 317, 320, -153, -153, -153, 800, 285, -111, - 286, 895, 945, 883, -532, 684, 684, 434, -193, -153, - 1066, -153, 239, -153, -356, -153, -356, 435, 1200, 1199, - 1201, 640, 25, 895, 895, 366, 436, 684, 684, 293, - 656, 657, 74, 1200, 1199, 1201, -111, -111, 320, 815, - 140, -111, 1052, 382, 320, 11, 869, -111, -111, -111, + 104, 105, 106, 107, 108,-32766, 271, 819,-32766,-32766, + -32766, 458, 459,-32766, -586, -193, -586, 253, 109, -192, + 306, 903, 735, 473, 288, 692, 706, 1013, 308,-32766, + 1064,-32766,-32766, -86,-32766, 1295, 736, 737, 738, 739, + 740, 741, 742, 81, -324, 806, 320, 322, -537, 423, + 287, 336, 743, 744, 745, 746, 747, 748, 749, 750, + 751, 752, 753, 773, 796, 774, 775, 776, 777, 765, + 766, 767, 795, 768, 769, 754, 755, 756, 758, 759, + 760, 799, 800, 801, 802, 803, 804, 805, 761, 762, + 763, 764, 794, 785, 783, 784, 797, 780, 781, -86, + 337, 772, 778, 779, 786, 787, 789, 788, 790, 791, + -32766, 602, -537, -537, 808, 782, 793, 792, 49, 50, + 51, 503, 52, 53, 1214, 1213, 1215, -537, 54, 55, + -111, 56, 1013, 1066, 901, -111, 813, -111, 288, -543, + 1324, -537, 302, 1325, 363, -111, -111, -111, -111, -111, + -111, -111, -111, 367, 901, 287, 936, 937, 1219, 967, + 382, 938, 1219, 1010, 698, 818, 57, 58, 1239, -193, + 596, -536, 59, -192, 60, 247, 248, 61, 62, 63, + 64, 65, 66, 67, 68, 1013, 27, 269, 69, 439, + 504, 435, -16, -338, 1245, 1246, 505, 141, 817,-32766, + -32766, 322, 1243, 41, 24, 506, 150, 507, 279, 508, + 901, 509, 814, 817, 510, 511, 1314, 891, 436, 43, + 44, 440, 370, 369,-32766, 45, 512, 1000, 999, 998, + 1001, 361, 335, 151, 1212, -536, -536, 891, -583, 817, + 513, 514, 515, 817, 1065, -583, 1013, 437, 718, 817, + -536, 438, 517, 518,-32766, 1233, 1234, 1235, 1236, 1230, + 1231, 294, -542, -577, -536, -577, 239, 1237, 1232, 287, + 1210, 1214, 1213, 1215, 295, 14, 1013, 70, 35, 250, + 1010, 318, 319, 322, -153, -153, -153, 968, -362, -111, + -362, 1012, 903, 891,-32766, -538, 692, 1080,-32766, -153, + 823, -153, 1013, -153, 384, -153, 11, 726, 725, 1214, + 1213, 1215, 903, 643, 25, 368, 692, 153, 74, 295, + 154, 844, 74, 845, 322, 155, -111, -111, 322, 1036, + 140, -111, 662, 663, 322, 157, 877, -111, -111, -111, -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 718, 717, 836, 154, 837, - -534, 149, 400, 893, 809, -4, 893, 1300, 895, 155, - 141, 157, 684, -153, 320, -571, 123, -571, 369, 370, - 374, 375, 632, 633, 1112, 1114, 32, 124, -192, 718, - 717, 129,-32766, 700, 130, -529, 143, 158, 1198, 159, - 160, 161, 282, 718, 717,-32766,-32766,-32766, -88,-32766, - -79,-32766, 909,-32766, 109, 270,-32766, -75, -73, -72, - -529,-32766,-32766,-32766, -534, -534,-32766,-32766,-32766, 35, - 250, -71, 1198,-32766, 412, -70, 27, -69, -68,-32766, - -32766,-32766,-32766,-32766, -67,-32766, 883,-32766, 809, 883, - -32766, -66, 1229, -534, -47,-32766,-32766,-32766, -18, -529, - -529,-32766,-32766, 147, 271, 278, 48,-32766, 412, 699, - 702, 366, 73, 428, -529, 892,-32766, 146, 291, 283, - 287, 145, -111, -111, -529, -529, 327, -111, -529, 288, - 800, -51, 514, -111, -111, -111, -111, 809, 664, -529, - 1081,-32766, 515, 516, 546, 1219, 1220, 1221, 1222, 1216, - 1217, 1312, 641, -529, 550, 9, 677, 1223, 1218, 301, - 659, 895, 630, 131, 895, 684, 646, 72, 684, -4, - 296, 297, 317, 320,-32766, 647, 660, 13, 453, 1236, - 1198, 299, 432, 1238, 481, 364, 911,-32766,-32766,-32766, - -495,-32766, -485,-32766, 808,-32766, 293, 925,-32766, 127, - 47, 7, 1226,-32766,-32766,-32766,-32766, 0, 0,-32766, - -32766,-32766, 1198, 0, 893,-32766, 412, 820, 0,-32766, - -32766,-32766, 298,-32766,-32766,-32766, 305,-32766, 0, 0, - -32766, 1251, 16, 893, 0,-32766,-32766,-32766,-32766, -271, - 0,-32766,-32766, 0, 1198, 363, 556,-32766, 412, 1269, - 598,-32766,-32766,-32766, 1230,-32766,-32766,-32766, 39,-32766, - 40, 707,-32766, 708, 294, 295, 476,-32766,-32766,-32766, - -32766, 828, 874,-32766,-32766, 969, 1198, 563, 946,-32766, - 412, 953, 943,-32766,-32766,-32766, 954,-32766,-32766,-32766, - 872,-32766, 941, 125,-32766, 1055, 1058, 883, 1059,-32766, - -32766,-32766, 1056, 1057, 1063,-32766,-32766, 1303, 635, 33, - -565,-32766, 412, -246, -246, -246, 883, -563, -537, 366, - -32766, -536, -535, 1, 28, 320, 29, 38, 42, 46, - -111, -111, -245, -245, -245, -111, 71, 75, 366, 76, - 869, -111, -111, -111, -111, 77, 78, 79, 80, -111, - -111, 142, 152, 156, -111, 27, 268, -269, 246, 869, - -111, -111, -111, -111, 322, 348, 349, 809,-32766, 350, - 351, 1229, 895, 352, 1198, 353, 684, -246, 354, 355, - 356,-32766,-32766,-32766, 357,-32766, 358,-32766, 360,-32766, - 27, 895,-32766, -268, 429, 684, -245,-32766,-32766,-32766, - 543, 315, 809,-32766,-32766, 18, 1229, 19, 20,-32766, - 412, 21, 23, 399, 472, 473, 480, 483,-32766, 484, - 485, 486, 516, 490, 1219, 1220, 1221, 1222, 1216, 1217, - 491, 492, 499, 561, 671, 1209, 1223, 1218, 1152, 1227, - 1025, 1024, 1188, -273, -103, 17, 72, 362, 22, 26, - 290, 317, 320, 398, 591, 595, 0, 516, 622, 1219, - 1220, 1221, 1222, 1216, 1217, 676, 1156, 1204, 1153, 1282, - 0, 1223, 1218, 685, 688, 692, 694, 695, 696, 697, - 701, 72, 687, -499, 0, 704, 317, 320, 870, 1307, - 1309, 831, 830, 839, 918, 961, 838, 1308, 917, 919, - 916, 1184, 902, 912, 900, 951, 952, 1306, 1263, 1252, - 1270, 1276, 1279, 0, 1169 + 118, 119, 120, 121, 122, 726, 725, 32, 284, -538, + -538, 149, 402, 901, 123, -4, 901, 124, 903, 371, + 372, 129, 692, -153, -538, 376, 377, 635, 636, 130, + 901, -298, -294, 143, 1126, 1128, 158, 159, -538, 726, + 725, 160,-32766, 699, 901, -535, 161, -583, 1212, -583, + -88, 285, 271, 726, 725,-32766,-32766,-32766, -79,-32766, + 701,-32766, -75,-32766, -73, -72,-32766, -71, -70, -69, + -535,-32766,-32766,-32766, 708, -68,-32766,-32766,-32766, -67, + -66, -47, 1212,-32766, 414, -18, 27, 147, 270,-32766, + -32766,-32766,-32766,-32766, 1010,-32766, 891,-32766, 817, 891, + -32766, 281, 1243, 707, 710,-32766,-32766,-32766, 900, -535, + -535,-32766,-32766, 891, 146, 275, 1013,-32766, 414, 276, + 282, 368, 73, 430, -535, 283,-32766, 891, 293, 329, + 48, 917, -111, -111, -535, -535, 286, -111, -535, 279, + 289, -51, 516, -111, -111, -111, -111, 109, 290, -535, + 817, 145, 517, 518, 808, 1233, 1234, 1235, 1236, 1230, + 1231, 1095, 649, -535, 672, 9, 644, 1237, 1232, 1326, + 434, 953, 13, 131, 903, 692,-32766, 72, 692, -4, + 548, 552, 319, 322,-32766, 455, 483, 933, 903, 685, + 1212, 301, 692, 300, 298, 299, 665,-32766,-32766,-32766, + 650,-32766, 903,-32766, 666,-32766, 692, 919,-32766, 366, + -540, 633, -501,-32766,-32766,-32766,-32766, 1250, -491,-32766, + -32766, 303, 1212, 127, 901,-32766, 414, 47, 307,-32766, + -32766,-32766, -505,-32766,-32766,-32766, 0,-32766,-32766, 0, + -32766, 39, 0, 901, 0,-32766,-32766,-32766,-32766, 0, + 0,-32766,-32766, 0, 1212, 1252, 0,-32766, 414, 558, + 816,-32766,-32766,-32766, 7,-32766,-32766,-32766, 16,-32766, + 365, 600,-32766, 40, -540, -540, 478,-32766,-32766,-32766, + -32766, 295, 1240,-32766,-32766, 715, 1212, 565, 716,-32766, + 414, 296, 297,-32766,-32766,-32766, 836,-32766,-32766,-32766, + 882,-32766, 977, -540,-32766, 954, 961, 891, 951,-32766, + -32766,-32766, 962, 880, 949,-32766,-32766, 1069, 1072, 1073, + 125,-32766, 414, -246, -246, -246, 891, 1070, 1071, 368, + -32766, 1077, -571, 828, 712, 1265, 1283, 1317, 638, 0, + -111, -111, -245, -245, -245, -111, -569, -543, 368, -542, + 877, -111, -111, -111, -111, -541, 1, 28, 29, -111, + -111, 38, 42, 46, -111, 27, 269, -271, 71, 877, + -111, -111, -111, -111, 75, 76, 77, 817,-32766, 78, + 79, 1243, 903, 80, 1212, 142, 692, -246, 152, 156, + 246,-32766,-32766,-32766, 324,-32766, 350,-32766, 351,-32766, + 27, 903,-32766, -269, 352, 692, -245,-32766,-32766,-32766, + 353, 354, 817,-32766,-32766, 355, 1243, 356, 357,-32766, + 414, 358, 359, 360, 362, 431, 545, 0,-32766, -268, + 18, 19, 518, 20, 1233, 1234, 1235, 1236, 1230, 1231, + 21, 23, 401, 474, 475, 482, 1237, 1232, 485, 486, + 487, 488, 492, 493, 494, 501, 72, 33, 563, 679, + 1223, 319, 322, 1166, 1241, 1039, 1244, 518, 1038, 1233, + 1234, 1235, 1236, 1230, 1231, 1019, 1202, 1015, -273, -103, + 17, 1237, 1232, 22, 26, 292, 400, 593, 597, 624, + 684, 72, 317, 1170, 1218, 1167, 319, 322, 1296, 878, + 364, 693, 696, 700, 702, 703, 704, 705, 709, 695, + 0, 1321, 1323, 839, 838, 847, 926, 969, 846, 1322, + 925, 927, 924, 1198, 910, 920, 908, 959, 960, 1320, + 1277, 1266, 1284, 1290, 1293, 0, 1183, 0, 0, 322 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 128, 129, 130, 131, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, - 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, + 118, 119, 120, 121, 122, 37, 38, 30, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 1, 106, 107, 1, 57, 9, 10, 11, 137, - 138, 8, 116, 9, 10, 11, 106, 107, 80, 71, + 43, 1, 106, 107, 8, 57, 9, 10, 11, 50, + 51, 52, 116, 9, 10, 11, 106, 107, 80, 71, 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, 33, 34, 35, 36, 30, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, @@ -528,12 +529,12 @@ class Php7 extends \PhpParser\ParserAbstract 152, 163, 154, 14, 2, 3, 4, 5, 6, 7, 162, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 9, 10, 11, 128, 116, - 117, 118, 119, 120, 121, 122, 106, 1, 108, 37, + 117, 118, 119, 120, 121, 122, 106, 137, 108, 37, 38, 9, 10, 11, 146, 1, 30, 8, 32, 33, 34, 35, 8, 1, 1, 9, 10, 11, 158, 57, 14, 161, 30, 8, 32, 33, 34, 167, 53, 54, 55, 1, 57, 71, 72, 73, 74, 75, 76, 77, - 1, 31, 80, 31, 69, 155, 35, 8, 37, 87, + 8, 31, 80, 31, 69, 155, 9, 10, 11, 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, @@ -541,78 +542,78 @@ class Php7 extends \PhpParser\ParserAbstract 128, 129, 130, 131, 132, 133, 84, 70, 136, 137, 138, 139, 140, 141, 142, 143, 144, 9, 9, 10, 11, 162, 150, 151, 152, 8, 154, 2, 3, 4, - 5, 6, 7, 14, 9, 10, 11, 12, 13, 30, + 5, 6, 7, 1, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 159, 57, 1, 9, 10, - 11, 134, 135, 116, 160, 8, 162, 1, 69, 117, - 118, 159, 57, 163, 122, 163, 9, 10, 11, 30, - 1, 32, 33, 31, 137, 138, 71, 72, 73, 74, - 75, 76, 77, 163, 8, 80, 30, 167, 70, 160, - 30, 162, 87, 88, 89, 90, 91, 92, 93, 94, + 51, 52, 53, 54, 55, 116, 57, 1, 9, 10, + 11, 134, 135, 116, 160, 8, 162, 8, 69, 8, + 8, 159, 57, 163, 30, 163, 163, 138, 8, 30, + 1, 32, 33, 31, 137, 1, 71, 72, 73, 74, + 75, 76, 77, 163, 162, 80, 8, 167, 70, 80, + 161, 8, 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, 31, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 97, 8, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 1, 51, 134, 135, 8, 150, 151, 152, 2, 3, - 4, 5, 6, 7, 50, 51, 52, 149, 12, 13, - 101, 15, 116, 1, 1, 106, 116, 108, 30, 161, + 116, 51, 134, 135, 80, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 155, 156, 157, 149, 12, 13, + 101, 15, 138, 164, 1, 106, 80, 108, 30, 161, 80, 163, 113, 83, 8, 116, 117, 118, 119, 120, - 121, 122, 123, 137, 138, 1, 1, 137, 138, 9, - 10, 159, 1, 31, 31, 97, 50, 51, 1, 163, - 8, 70, 56, 8, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 31, 70, 71, 72, 73, - 74, 82, 31, 164, 78, 79, 80, 8, 82, 80, - 8, 70, 86, 87, 88, 89, 1, 91, 1, 93, - 1, 95, 37, 38, 98, 99, 84, 84, 8, 103, + 121, 122, 123, 8, 1, 161, 117, 118, 1, 31, + 8, 122, 1, 116, 31, 159, 50, 51, 1, 162, + 1, 70, 56, 162, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 138, 70, 71, 72, 73, + 74, 8, 31, 164, 78, 79, 80, 163, 82, 9, + 10, 167, 86, 87, 88, 89, 14, 91, 161, 93, + 1, 95, 156, 82, 98, 99, 85, 84, 8, 103, 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 80, 8, 134, 135, 8, 84, 84, - 124, 125, 126, 82, 14, 137, 138, 159, 80, 82, - 149, 163, 136, 137, 162, 139, 140, 141, 142, 143, - 144, 145, 161, 8, 163, 134, 135, 151, 152, 116, - 161, 155, 156, 157, 158, 156, 167, 161, 101, 14, - 149, 165, 166, 167, 75, 76, 77, 80, 35, 128, - 37, 159, 159, 84, 163, 163, 163, 8, 162, 90, - 123, 92, 97, 94, 106, 96, 108, 8, 155, 156, - 157, 75, 76, 159, 159, 106, 8, 163, 163, 158, - 75, 76, 161, 155, 156, 157, 117, 118, 167, 8, - 163, 122, 164, 106, 167, 108, 127, 128, 129, 130, + 122, 115, 116, 14, 80, 134, 135, 84, 1, 82, + 124, 125, 126, 82, 159, 8, 138, 8, 163, 82, + 149, 8, 136, 137, 116, 139, 140, 141, 142, 143, + 144, 145, 161, 160, 163, 162, 97, 151, 152, 161, + 116, 155, 156, 157, 158, 101, 138, 161, 147, 148, + 116, 165, 166, 167, 75, 76, 77, 159, 106, 128, + 108, 137, 159, 84, 137, 70, 163, 123, 137, 90, + 8, 92, 138, 94, 106, 96, 108, 37, 38, 155, + 156, 157, 159, 75, 76, 106, 163, 14, 161, 158, + 14, 106, 161, 108, 167, 14, 117, 118, 167, 1, + 163, 122, 75, 76, 167, 14, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 37, 38, 106, 14, 108, - 70, 101, 102, 1, 82, 0, 1, 85, 159, 14, - 163, 14, 163, 164, 167, 160, 16, 162, 106, 107, - 106, 107, 111, 112, 59, 60, 14, 16, 162, 37, - 38, 16, 74, 31, 16, 70, 16, 16, 80, 16, - 16, 16, 35, 37, 38, 87, 88, 89, 31, 91, - 31, 93, 38, 95, 69, 57, 98, 31, 31, 31, - 70, 103, 104, 105, 134, 135, 74, 109, 110, 147, - 148, 31, 80, 115, 116, 31, 70, 31, 31, 87, - 88, 89, 124, 91, 31, 93, 84, 95, 82, 84, - 98, 31, 86, 163, 31, 103, 104, 105, 31, 134, - 135, 109, 110, 31, 31, 31, 70, 115, 116, 31, - 31, 106, 154, 108, 149, 31, 124, 31, 113, 37, - 35, 70, 117, 118, 134, 135, 35, 122, 163, 37, - 80, 31, 127, 128, 129, 130, 131, 82, 77, 149, - 82, 85, 136, 137, 85, 139, 140, 141, 142, 143, - 144, 83, 90, 163, 89, 150, 92, 151, 152, 114, - 94, 159, 113, 31, 159, 163, 96, 161, 163, 164, - 134, 135, 166, 167, 74, 100, 100, 97, 97, 146, - 80, 133, 128, 146, 97, 149, 154, 87, 88, 89, - 149, 91, 149, 93, 155, 95, 158, 128, 98, 163, - 70, 149, 160, 103, 104, 105, 74, -1, -1, 109, - 110, 116, 80, -1, 1, 115, 116, 160, -1, 87, - 88, 89, 132, 91, 124, 93, 132, 95, -1, -1, - 98, 160, 149, 1, -1, 103, 104, 105, 74, 162, - -1, 109, 110, -1, 80, 149, 153, 115, 116, 160, - 153, 87, 88, 89, 166, 91, 124, 93, 159, 95, - 159, 159, 98, 159, 134, 135, 102, 103, 104, 105, - 74, 159, 159, 109, 110, 159, 80, 81, 159, 115, - 116, 159, 159, 87, 88, 89, 159, 91, 124, 93, + 25, 26, 27, 28, 29, 37, 38, 14, 30, 134, + 135, 101, 102, 1, 16, 0, 1, 16, 159, 106, + 107, 16, 163, 164, 149, 106, 107, 111, 112, 16, + 1, 35, 35, 16, 59, 60, 16, 16, 163, 37, + 38, 16, 74, 31, 1, 70, 16, 160, 80, 162, + 31, 37, 57, 37, 38, 87, 88, 89, 31, 91, + 31, 93, 31, 95, 31, 31, 98, 31, 31, 31, + 70, 103, 104, 105, 31, 31, 74, 109, 110, 31, + 31, 31, 80, 115, 116, 31, 70, 31, 31, 87, + 88, 89, 124, 91, 116, 93, 84, 95, 82, 84, + 98, 31, 86, 31, 31, 103, 104, 105, 31, 134, + 135, 109, 110, 84, 31, 35, 138, 115, 116, 35, + 35, 106, 154, 108, 149, 35, 124, 84, 113, 35, + 70, 38, 117, 118, 134, 135, 37, 122, 163, 161, + 37, 31, 127, 128, 129, 130, 131, 69, 37, 149, + 82, 70, 136, 137, 80, 139, 140, 141, 142, 143, + 144, 82, 96, 163, 77, 150, 90, 151, 152, 83, + 128, 159, 97, 31, 159, 163, 85, 161, 163, 164, + 85, 89, 166, 167, 74, 97, 97, 128, 159, 92, + 80, 133, 163, 132, 134, 135, 94, 87, 88, 89, + 100, 91, 159, 93, 100, 95, 163, 154, 98, 149, + 70, 113, 149, 103, 104, 105, 74, 146, 149, 109, + 110, 114, 80, 163, 1, 115, 116, 70, 132, 87, + 88, 89, 165, 91, 124, 93, -1, 95, 137, -1, + 98, 159, -1, 1, -1, 103, 104, 105, 74, -1, + -1, 109, 110, -1, 80, 146, -1, 115, 116, 153, + 155, 87, 88, 89, 149, 91, 124, 93, 149, 95, + 149, 153, 98, 159, 134, 135, 102, 103, 104, 105, + 74, 158, 160, 109, 110, 159, 80, 81, 159, 115, + 116, 134, 135, 87, 88, 89, 159, 91, 124, 93, 159, 95, 159, 163, 98, 159, 159, 84, 159, 103, - 104, 105, 159, 159, 159, 109, 110, 160, 160, 163, - 161, 115, 116, 100, 101, 102, 84, 161, 161, 106, - 124, 161, 161, 161, 161, 167, 161, 161, 161, 161, + 104, 105, 159, 159, 159, 109, 110, 159, 159, 159, + 163, 115, 116, 100, 101, 102, 84, 159, 159, 106, + 124, 159, 161, 160, 164, 160, 160, 160, 160, -1, 117, 118, 100, 101, 102, 122, 161, 161, 106, 161, 127, 128, 129, 130, 131, 161, 161, 161, 161, 117, 118, 161, 161, 161, 122, 70, 71, 162, 161, 127, @@ -620,24 +621,25 @@ class Php7 extends \PhpParser\ParserAbstract 161, 86, 159, 161, 80, 161, 163, 164, 161, 161, 161, 87, 88, 89, 161, 91, 161, 93, 161, 95, 70, 159, 98, 162, 161, 163, 164, 103, 104, 105, - 161, 163, 82, 109, 110, 162, 86, 162, 162, 115, - 116, 162, 162, 162, 162, 162, 162, 162, 124, 162, + 161, 161, 82, 109, 110, 161, 86, 161, 161, 115, + 116, 161, 161, 161, 161, 161, 161, -1, 124, 162, 162, 162, 137, 162, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, 163, 162, 162, - 162, 166, 167, 162, 162, 162, -1, 137, 162, 139, + 162, 166, 167, 162, 162, 162, 166, 137, 162, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, - -1, 151, 152, 163, 163, 163, 163, 163, 163, 163, - 163, 161, 163, 165, -1, 164, 166, 167, 164, 164, + 162, 151, 152, 162, 162, 162, 162, 162, 162, 162, + 162, 161, 163, 162, 162, 162, 166, 167, 162, 164, + 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, + -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, -1, 165 + 164, 164, 164, 164, 164, -1, 165, -1, -1, 167 ); protected $actionBase = array( - 0, -2, 152, 549, 705, 913, 932, 507, 508, -12, - 844, 305, 305, 63, 305, 305, 305, 472, 494, 494, - 702, 494, 202, 473, 495, 495, 495, 658, 658, 658, + 0, -2, 152, 549, 705, 913, 932, 507, 309, -12, + 859, 305, 305, 63, 305, 305, 305, 473, 719, 719, + 733, 719, 202, 702, 493, 493, 493, 658, 658, 658, 658, 692, 692, 864, 864, 896, 832, 800, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, @@ -651,63 +653,64 @@ class Php7 extends \PhpParser\ParserAbstract 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 186, 342, 545, 712, 988, 1004, 992, 1005, - 986, 983, 991, 993, 1006, 1043, 1044, 786, 1045, 1046, - 1047, 1048, 996, 848, 987, 1003, 289, 289, 289, 289, + 994, 994, 346, 468, 509, 683, 1013, 1021, 1015, 1022, + 1011, 1008, 1014, 1016, 1023, 1055, 1056, 773, 1057, 1058, + 1059, 1060, 1017, 868, 1012, 1018, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 288, 196, 490, 357, 357, 357, 357, 357, - 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, - 357, 357, 357, 357, 357, 54, 54, 54, 339, 706, + 289, 289, 288, 196, 530, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 227, + 227, 227, 227, 227, 227, 54, 54, 54, 339, 706, 706, 182, 166, 985, 665, 47, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 136, 136, 7, 7, 7, - 7, 7, 369, -25, -25, -25, -25, 501, 50, 448, - 449, 356, 517, 538, 414, 414, 360, -116, 237, 237, - 237, 237, 237, 237, -78, -78, -78, -78, -78, 318, - 441, 80, 48, 493, 547, 547, 547, 547, 493, 493, - 493, 493, 737, 788, 493, 493, 493, 471, 690, 690, - 736, 165, 165, 165, 690, 591, 759, 622, 591, 622, - 220, 400, 795, -54, -40, 555, 769, 795, 630, 830, - 229, 194, 739, 612, 739, 982, 756, 763, 726, 845, - 1019, 1007, 775, 1041, 776, 1042, 217, 719, 981, 981, - 981, 981, 981, 981, 981, 981, 981, 981, 981, 858, - 515, 982, 459, 858, 858, 858, 515, 515, 515, 515, - 515, 515, 515, 515, 515, 515, 611, 459, 576, 585, - 459, 791, 515, 186, 743, 186, 186, 186, 186, 904, - 186, 186, 186, 186, 186, 186, 914, 767, 200, 186, - 342, 346, 346, 428, 203, 346, 346, 346, 346, 186, - 186, 186, 612, 698, 793, 614, 797, 566, 698, 698, - 698, 408, 432, 139, 476, 593, 201, 567, 750, 750, - 758, 862, 862, 750, 755, 750, 758, 868, 750, 862, - 738, 297, 595, 505, 550, 629, 862, 376, 750, 750, - 750, 750, 639, 750, 347, 312, 750, 750, 790, 774, - 794, 159, 862, 862, 862, 794, 532, 748, 748, 748, - 802, 804, 749, 773, 502, 446, 661, 205, 714, 773, - 773, 750, 569, 749, 773, 749, 773, 732, 773, 773, - 773, 749, 773, 755, 529, 773, 721, 648, 189, 773, - 6, 875, 876, 717, 878, 866, 884, 933, 885, 886, - 1010, 897, 867, 887, 939, 865, 863, 784, 700, 711, - 752, 741, 861, 685, 685, 685, 857, 685, 685, 685, - 685, 685, 685, 685, 685, 700, 742, 796, 754, 765, - 905, 715, 718, 971, 733, 1024, 1018, 1049, 904, 973, - 890, 799, 720, 950, 908, 1021, 938, 909, 912, 951, - 976, 812, 977, 1025, 751, 1026, 1027, 757, 917, 1011, - 685, 875, 886, 867, 887, 865, 863, 760, 753, 746, - 747, 744, 740, 727, 728, 772, 978, 856, 849, 771, - 914, 860, 700, 789, 943, 846, 952, 953, 984, 781, - 768, 847, 1028, 918, 919, 923, 1012, 979, 801, 945, - 777, 954, 787, 1029, 955, 957, 958, 959, 1030, 1013, - 1014, 1015, 813, 762, 895, 770, 1031, 299, 785, 792, - 927, 570, 903, 1016, 1032, 1033, 961, 968, 969, 1034, - 891, 816, 946, 766, 949, 931, 819, 822, 605, 707, - 782, 684, 695, 1035, 1036, 1037, 892, 778, 761, 823, - 827, 980, 1038, 697, 831, 723, 1039, 972, 724, 725, - 764, 1017, 783, 745, 780, 925, 779, 833, 1040, 836, - 837, 839, 970, 843, 0, 0, 0, 0, 0, 0, + 7, 7, 369, -25, -25, -25, -25, 501, 448, 50, + 668, 497, 514, 522, 334, 387, 387, 9, 9, 504, + -116, 504, 229, 229, 504, 504, 504, 478, 478, 478, + 478, 318, 441, 80, 48, 791, 374, 374, 374, 374, + 791, 791, 791, 791, 799, 990, 791, 791, 791, 565, + 690, 690, 750, 165, 165, 165, 690, 555, 785, 471, + 555, 471, 220, 400, 237, -54, -40, 443, 749, 237, + 830, 847, 577, 194, 795, 603, 795, 1007, 781, 740, + 721, 862, 1036, 1026, 790, 1053, 794, 1054, 217, 717, + 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, 1006, + 1006, 1062, 610, 1007, 396, 1062, 1062, 1062, 610, 610, + 610, 610, 610, 610, 610, 610, 610, 610, 606, 396, + 578, 597, 396, 784, 610, 346, 759, 346, 346, 346, + 346, 925, 346, 346, 346, 346, 346, 346, 944, 744, + 200, 346, 468, 203, 203, 425, 37, 203, 203, 203, + 203, 346, 346, 346, 603, 685, 796, 609, 808, 351, + 685, 685, 685, 342, 222, 139, 347, 686, 687, 538, + 764, 764, 769, 885, 885, 764, 758, 764, 769, 892, + 764, 885, 813, 205, 523, 383, 485, 550, 885, 352, + 764, 764, 764, 764, 579, 764, 349, 297, 764, 764, + 751, 760, 786, 46, 885, 885, 885, 786, 476, 748, + 748, 748, 816, 819, 788, 747, 378, 360, 632, 189, + 783, 747, 747, 764, 492, 788, 747, 788, 747, 743, + 747, 747, 747, 788, 747, 758, 432, 747, 710, 583, + 159, 747, 6, 897, 903, 709, 904, 890, 905, 954, + 908, 909, 1028, 919, 891, 912, 955, 887, 886, 767, + 688, 691, 805, 753, 884, 768, 768, 768, 876, 768, + 768, 768, 768, 768, 768, 768, 768, 688, 812, 811, + 732, 782, 927, 695, 703, 986, 761, 1025, 757, 1061, + 925, 988, 914, 772, 707, 969, 933, 860, 1019, 939, + 940, 970, 991, 827, 992, 1037, 771, 1038, 1039, 863, + 946, 1029, 768, 897, 909, 891, 912, 887, 886, 739, + 738, 728, 734, 727, 726, 723, 724, 746, 993, 875, + 861, 865, 944, 878, 688, 866, 958, 984, 971, 972, + 1027, 778, 776, 867, 1040, 947, 950, 951, 1030, 996, + 804, 959, 895, 973, 779, 1041, 976, 977, 978, 979, + 1042, 1031, 1032, 1033, 831, 766, 931, 756, 1043, 532, + 775, 780, 801, 953, 559, 923, 1034, 1044, 1045, 980, + 981, 982, 1046, 917, 833, 961, 792, 968, 957, 836, + 837, 643, 793, 1003, 770, 774, 789, 646, 651, 1047, + 1048, 1049, 918, 762, 777, 839, 843, 1004, 704, 1005, + 1050, 661, 844, 711, 1051, 987, 715, 720, 787, 1035, + 809, 797, 765, 952, 763, 845, 1052, 848, 849, 850, + 983, 858, 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, 456, 456, 456, 456, 456, 456, 305, - 305, 305, 305, 0, 0, 305, 0, 0, 0, 456, + 0, 456, 456, 456, 456, 456, 456, 305, 305, 305, + 305, 0, 0, 305, 0, 0, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, @@ -722,42 +725,42 @@ class Php7 extends \PhpParser\ParserAbstract 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 289, 289, 289, 289, 289, 289, + 456, 456, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 0, 0, + 289, 289, 289, 289, 289, 289, 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, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 0, 0, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 493, 493, 289, 289, 493, 0, 289, 493, 493, - 493, 493, 493, 493, 493, 493, 493, 289, 289, 289, - 289, 289, 289, 289, 738, 165, 165, 165, 165, 493, - 493, 493, 493, 493, -88, -88, 165, 165, 493, 242, - 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, - 493, 0, 0, 459, 622, 0, 755, 755, 755, 755, - 0, 0, 0, 0, 622, 622, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 459, 622, 0, - 459, 0, 755, 755, 493, 738, 738, 53, 242, 493, - 0, 0, 0, 0, 459, 755, 459, 515, 622, 515, - 515, 346, 186, 53, 600, 600, 600, 600, 0, 612, - 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, - 738, 755, 0, 738, 0, 755, 755, 755, 0, 0, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 494, + 494, 289, 289, 494, 0, 289, 494, 494, 494, 494, + 494, 494, 494, 494, 494, 289, 289, 289, 289, 289, + 289, 289, 813, 165, 165, 165, 165, 494, 494, 494, + 494, 494, -88, -88, 494, 494, 494, 165, 165, 494, + 379, 494, 494, 494, 494, 494, 494, 494, 494, 494, + 494, 0, 0, 396, 471, 494, 758, 758, 758, 758, + 494, 494, 494, 494, 471, 471, 494, 494, 494, 0, + 0, 0, 0, 0, 0, 0, 0, 396, 471, 0, + 396, 0, 758, 758, 494, 813, 813, 312, 379, 494, + 0, 0, 0, 0, 396, 758, 396, 610, 471, 610, + 610, 203, 346, 312, 600, 600, 600, 600, 0, 603, + 813, 813, 813, 813, 813, 813, 813, 813, 813, 813, + 813, 758, 0, 813, 0, 758, 758, 758, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 755, 0, 0, 862, 0, 0, 0, - 0, 750, 0, 0, 0, 0, 0, 0, 750, 868, - 0, 0, 0, 0, 0, 0, 755, 0, 0, 0, - 0, 0, 0, 0, 0, 685, 781, 0, 781, 0, - 685, 685, 685 + 0, 0, 0, 758, 0, 0, 885, 0, 0, 0, + 0, 764, 0, 0, 0, 0, 0, 0, 764, 892, + 0, 0, 0, 0, 0, 0, 758, 0, 0, 0, + 0, 0, 0, 0, 0, 768, 778, 0, 778, 0, + 768, 768, 768, 0, 0, 0, 0, 793, 704 ); protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 583, 583, 583, - 583,32767,32767, 250, 103,32767,32767, 459, 376, 376, - 376,32767,32767, 527, 527, 527, 527, 527, 527,32767, - 32767,32767,32767,32767,32767, 459,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 589, 589, 589, + 589,32767,32767, 250, 103,32767,32767, 465, 382, 382, + 382,32767,32767, 533, 533, 533, 533, 533, 533,32767, + 32767,32767,32767,32767,32767, 465,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, @@ -765,133 +768,143 @@ class Php7 extends \PhpParser\ParserAbstract 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, 101,32767, - 32767,32767, 37, 7, 8, 10, 11, 50, 17, 314, + 32767,32767, 37, 7, 8, 10, 11, 50, 17, 320, 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 576,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 582,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 463, 442, 443, 445, - 446, 375, 528, 582, 317, 579, 374, 146, 329, 319, - 238, 320, 254, 464, 255, 465, 468, 469, 211, 283, - 371, 150, 406, 460, 408, 458, 462, 407, 381, 387, - 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, - 398, 399, 379, 380, 461, 439, 438, 437, 404,32767, - 32767, 405, 409,32767, 378, 412,32767,32767,32767,32767, - 32767,32767,32767, 103,32767, 410, 411, 428, 429, 426, - 427, 430,32767, 431, 432, 433, 434,32767,32767, 306, - 32767,32767, 355, 353, 419, 420, 306,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 521, - 436,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 103,32767, 101, 523, 401, 403, - 491, 414, 415, 413, 382,32767, 498,32767, 103, 500, - 32767,32767,32767, 112,32767,32767,32767,32767, 522,32767, - 529, 529,32767, 484, 101, 194,32767, 194, 194,32767, - 32767,32767,32767,32767,32767,32767, 590, 484, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111,32767, - 194, 111,32767,32767,32767, 101, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 189,32767, 264, 266, - 103, 544, 194,32767, 503,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 496,32767,32767, + 32767,32767,32767,32767,32767,32767, 469, 448, 449, 451, + 452, 381, 534, 588, 323, 585, 380, 146, 335, 325, + 238, 326, 254, 470, 255, 471, 474, 475, 211, 283, + 377, 150, 412, 466, 414, 464, 468, 413, 387, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, + 404, 405, 385, 386, 467, 445, 444, 443, 410,32767, + 32767, 411, 415,32767, 384, 418,32767,32767,32767,32767, + 32767,32767,32767, 103,32767, 416, 417, 434, 435, 432, + 433, 436,32767, 437, 438, 439, 440,32767, 312,32767, + 32767,32767, 361, 359, 312,32767,32767, 425, 426,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 484, 424, 139,32767, 139, 529, 416, 417, - 418, 486, 529, 529, 529, 302, 285,32767,32767,32767, - 32767, 501, 501, 101, 101, 101, 101, 496,32767,32767, - 112, 100, 100, 100, 100, 100, 104, 102,32767,32767, - 32767,32767, 100,32767, 102, 102,32767,32767, 221, 208, - 219, 102,32767, 548, 549, 219, 102, 223, 223, 223, - 243, 243, 475, 308, 102, 100, 102, 102, 196, 308, - 308,32767, 102, 475, 308, 475, 308, 198, 308, 308, - 308, 475, 308,32767, 102, 308, 210, 100, 100, 308, - 32767,32767,32767, 486,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 516, - 32767, 533, 546, 422, 423, 425, 531, 447, 448, 449, - 450, 451, 452, 453, 455, 578,32767, 490,32767,32767, - 32767,32767, 328,32767, 588,32767, 588,32767,32767,32767, + 32767, 527, 442,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 103,32767, 101, 529, + 407, 409, 497, 420, 421, 419, 388,32767, 504,32767, + 103, 506,32767,32767,32767, 112,32767,32767,32767,32767, + 528,32767, 535, 535,32767, 490, 101, 194,32767, 194, + 194,32767,32767,32767,32767,32767,32767,32767, 596, 490, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, + 111,32767, 194, 111,32767,32767,32767, 101, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 189,32767, + 264, 266, 103, 550, 194,32767, 509,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 502, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 589,32767, 529,32767,32767,32767,32767, - 421, 9, 76, 43, 44, 52, 58, 507, 508, 509, - 510, 504, 505, 511, 506,32767,32767, 512, 554,32767, - 32767, 530, 581,32767,32767,32767,32767,32767,32767, 139, + 32767,32767,32767,32767, 490, 430, 139,32767, 139, 535, + 422, 423, 424, 492, 535, 535, 535, 308, 285,32767, + 32767,32767,32767, 507, 507, 101, 101, 101, 101, 502, + 32767,32767, 112, 100, 100, 100, 100, 100, 104, 102, + 32767,32767,32767,32767, 100,32767, 102, 102,32767,32767, + 221, 208, 219, 102,32767, 554, 555, 219, 102, 223, + 223, 223, 243, 243, 481, 314, 102, 100, 102, 102, + 196, 314, 314,32767, 102, 481, 314, 481, 314, 198, + 314, 314, 314, 481, 314,32767, 102, 314, 210, 100, + 100, 314,32767,32767,32767, 492,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 516,32767, 137,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 529,32767,32767,32767, 304, 305, + 32767, 522,32767, 539, 552, 428, 429, 431, 537, 453, + 454, 455, 456, 457, 458, 459, 461, 584,32767, 496, + 32767,32767,32767,32767, 334,32767, 594,32767, 594,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 529,32767,32767,32767, 287, - 288,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 282,32767,32767, 370,32767, - 32767,32767,32767, 349,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 152, 152, 3, 3, 331, 152, - 152, 152, 331, 152, 331, 331, 331, 152, 152, 152, - 152, 152, 152, 276, 184, 258, 261, 243, 243, 152, - 341, 152 + 32767,32767,32767,32767,32767, 595,32767, 535,32767,32767, + 32767,32767, 427, 9, 76, 43, 44, 52, 58, 513, + 514, 515, 516, 510, 511, 517, 512,32767,32767, 518, + 560,32767,32767, 536, 587,32767,32767,32767,32767,32767, + 32767, 139,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 522,32767, 137,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 535,32767,32767,32767, + 32767, 310, 307,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 535,32767, + 32767,32767,32767,32767, 287,32767, 304,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 282,32767,32767, 376,32767,32767,32767, + 32767, 355,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 152, 152, 3, 3, 337, 152, 152, 152, + 337, 152, 337, 337, 337, 152, 152, 152, 152, 152, + 152, 276, 184, 258, 261, 243, 243, 152, 347, 152 ); protected $goto = array( - 194, 194, 672, 423, 645, 826, 343, 314, 1297, 1297, - 417, 308, 309, 330, 565, 422, 331, 424, 624, 416, - 680, 599, 886, 588, 887, 1297, 165, 165, 165, 165, + 194, 194, 680, 389, 393, 551, 591, 595, 325, 325, + 325, 325, 834, 457, 457, 345, 537, 537, 537, 537, + 688, 594, 457, 466, 1285, 1286, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 523, 524, 413, 525, - 527, 528, 529, 530, 531, 532, 533, 534, 1098, 166, + 188, 189, 190, 215, 213, 216, 525, 526, 415, 527, + 529, 530, 531, 532, 533, 534, 535, 536, 1112, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, 176, 212, 214, 217, 235, 238, 241, 242, 245, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, - 274, 275, 311, 312, 313, 418, 419, 420, 570, 219, + 277, 278, 313, 314, 315, 420, 421, 422, 572, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1098, 199, 180, + 236, 186, 187, 188, 189, 190, 215, 1112, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 323, 323, 323, 323, 829, 1028, 610, 610, 548, - 540, 1228, 825, 827, 1228, 1228, 1228, 1228, 1228, 1228, - 1228, 1228, 1228, 608, 642, 968, 942, 942, 940, 942, - 705, 803, 539, 977, 972, 464, 1271, 1272, 389, 540, - 548, 557, 558, 396, 568, 590, 604, 605, 834, 860, - 882, 877, 878, 891, 15, 835, 879, 832, 880, 881, - 833, 822, 822, 801, 885, 1178, 914, 251, 251, 1179, - 1182, 915, 1183, 562, 1049, 1045, 1046, 1246, 1246, 319, - 303, 1246, 344, 345, 1246, 1246, 1246, 1246, 1246, 1246, - 1246, 1246, 1246, 249, 249, 249, 249, 243, 252, 1069, - 1070, 1197, 1197, 1003, 1197, 1003, 944, 936, 403, 679, - 1003, 341, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, - 1003, 1003, 1003, 1268, 1268, 965, 1268, 1197, 455, 455, - 1273, 1274, 1197, 1197, 1197, 1197, 807, 455, 1197, 1197, - 1197, 1278, 1278, 1278, 1278, 277, 277, 277, 277, 1286, - 1280, 1280, 1280, 1280, 620, 621, 898, 346, 555, 385, - 644, 899, 706, 623, 625, 842, 643, 346, 346, 560, - 662, 666, 979, 670, 678, 975, 1264, 807, 822, 807, - 854, 346, 346, 841, 346, 639, 1313, 653, 654, 655, - 1095, 537, 537, 1147, 537, 1244, 1244, 430, 542, 1244, - 332, 346, 1244, 1244, 1244, 1244, 1244, 1244, 1244, 1244, - 1244, 535, 535, 535, 535, 1036, 592, 446, 819, 1266, - 1266, 1036, 938, 938, 938, 938, 566, 602, 446, 932, - 939, 387, 391, 549, 589, 593, 554, 488, 927, 489, - 526, 526, 395, 603, 526, 495, 1257, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 847, 1296, 1296, 844, - 440, 903, 1085, 1190, 1193, 440, 440, 987, 607, 665, - 5, 709, 6, 984, 1296, 541, 552, 856, 1034, 469, - 541, 846, 552, 648, 963, 388, 465, 1038, 1080, 840, - 949, 1299, 0, 0, 0, 569, 458, 459, 460, 542, - 852, 1189, 0, 1304, 1305, 254, 254, 401, 402, 0, - 0, 0, 651, 0, 652, 0, 405, 406, 407, 1194, - 663, 0, 0, 408, 0, 0, 817, 339, 850, 597, - 611, 614, 615, 616, 617, 636, 637, 638, 682, 0, - 0, 0, 1195, 1254, 1255, 0, 440, 440, 440, 440, - 440, 440, 440, 440, 440, 440, 440, 0, 1192, 440, - 855, 843, 1033, 1037, 587, 1062, 0, 683, 669, 669, - 947, 496, 675, 1060, 0, 0, 0, 0, 0, 425, - 921, 998, 1006, 1010, 1007, 1011, 425, 0, 0, 0, - 0, 0, 0, 937, 1015, 1008, 1012, 1009, 1013, 0, - 0, 0, 0, 0, 272, 0, 0, 0, 0, 538, - 538, 0, 0, 0, 0, 1078, 859, 0, 0, 0, - 0, 0, 0, 982, 982 + 211, 837, 590, 425, 648, 550, 542, 316, 833, 1042, + 419, 310, 311, 332, 567, 424, 333, 426, 626, 610, + 645, 976, 950, 950, 948, 950, 713, 835, 541, 985, + 980, 944, 405, 687, 391, 542, 550, 559, 560, 398, + 570, 592, 606, 607, 842, 811, 890, 885, 886, 899, + 15, 843, 887, 840, 888, 889, 841, 1192, 922, 868, + 893, 1193, 1196, 923, 1197, 251, 251, 809, 990, 990, + 1063, 1059, 1060, 952, 612, 612, 830, 830, 1242, 1083, + 1084, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, + 564, 249, 249, 249, 249, 243, 252, 346, 347, 1020, + 1021, 1211, 1011, 1211, 1011, 1211, 343, 442, 1011, 1011, + 1011, 1300, 442, 1011, 442, 1011, 1011, 1011, 1011, 1011, + 1011, 1011, 1011, 1011, 1011, 490, 973, 491, 642, 1211, + 659, 660, 661, 497, 1211, 1211, 1211, 1211, 1017, 1016, + 1211, 1211, 1211, 1292, 1292, 1292, 1292, 599, 613, 616, + 617, 618, 619, 639, 640, 641, 690, 894, 906, 895, + 1260, 1260, 387, 907, 1260, 562, 815, 1260, 1260, 1260, + 1260, 1260, 1260, 1260, 1260, 1260, 1258, 1258, 647, 5, + 1258, 6, 1109, 1258, 1258, 1258, 1258, 1258, 1258, 1258, + 1258, 1258, 418, 830, 601, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 442, 348, 815, 442, 815, + 1207, 528, 528, 1161, 850, 528, 348, 348, 528, 528, + 528, 528, 528, 528, 528, 528, 528, 321, 305, 862, + 348, 348, 849, 348, 432, 1327, 1287, 1288, 556, 653, + 539, 669, 539, 334, 539, 605, 827, 544, 622, 623, + 348, 568, 604, 863, 851, 1047, 1051, 280, 280, 280, + 280, 855, 1282, 955, 1282, 1208, 1282, 397, 448, 1204, + 852, 935, 825, 946, 946, 946, 946, 543, 554, 448, + 940, 947, 543, 995, 554, 1048, 945, 390, 1209, 1268, + 1269, 1294, 1294, 1294, 1294, 1271, 717, 571, 460, 461, + 462, 467, 860, 254, 254, 1318, 1319, 557, 1092, 867, + 864, 714, 625, 627, 1052, 646, 957, 1278, 673, 670, + 674, 987, 678, 686, 983, 1310, 1310, 403, 404, 1094, + 858, 471, 657, 0, 658, 0, 407, 408, 409, 0, + 671, 0, 1310, 410, 0, 911, 1099, 341, 544, 1311, + 1311, 0, 609, 0, 0, 0, 1050, 992, 0, 1313, + 1280, 1280, 1050, 428, 0, 854, 1311, 651, 971, 427, + 0, 0, 668, 848, 929, 427, 0, 1006, 1022, 1023, + 0, 0, 0, 1018, 1018, 1203, 0, 0, 652, 1029, + 1025, 1026, 589, 1076, 0, 691, 677, 677, 0, 498, + 683, 1074, 0, 0, 0, 0, 0, 1206, 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, 272, 0, 0, 0, + 0, 540, 0, 540 ); protected $gotoCheck = array( - 42, 42, 72, 65, 65, 26, 95, 65, 175, 175, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 13, - 9, 13, 64, 124, 64, 175, 42, 42, 42, 42, + 42, 42, 72, 58, 58, 58, 58, 58, 23, 23, + 23, 23, 26, 147, 147, 95, 105, 105, 105, 105, + 9, 105, 147, 172, 172, 172, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -905,91 +918,103 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 23, 23, 23, 23, 15, 121, 106, 106, 75, - 75, 106, 25, 27, 106, 106, 106, 106, 106, 106, - 106, 106, 106, 55, 55, 25, 25, 25, 25, 25, - 25, 7, 25, 25, 25, 168, 168, 168, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 15, 45, - 15, 15, 15, 15, 75, 15, 15, 15, 15, 15, - 15, 22, 22, 6, 15, 78, 78, 5, 5, 78, - 78, 78, 78, 164, 15, 15, 15, 162, 162, 161, - 161, 162, 95, 95, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 5, 5, 5, 5, 5, 5, 138, - 138, 72, 72, 72, 72, 72, 49, 91, 91, 91, - 72, 171, 72, 72, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 124, 124, 101, 124, 72, 143, 143, - 170, 170, 72, 72, 72, 72, 12, 143, 72, 72, - 72, 9, 9, 9, 9, 24, 24, 24, 24, 173, - 124, 124, 124, 124, 83, 83, 72, 14, 48, 61, - 63, 72, 48, 48, 48, 35, 48, 14, 14, 102, - 48, 48, 48, 48, 48, 48, 124, 12, 22, 12, - 35, 14, 14, 35, 14, 84, 14, 84, 84, 84, - 144, 19, 19, 145, 19, 163, 163, 111, 14, 163, - 29, 14, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 105, 105, 105, 105, 124, 105, 19, 18, 124, - 124, 124, 19, 19, 19, 19, 2, 2, 19, 19, - 19, 58, 58, 58, 58, 58, 9, 149, 90, 149, - 165, 165, 28, 9, 165, 149, 14, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 39, 174, 174, 37, - 23, 17, 17, 154, 20, 23, 23, 108, 17, 14, - 46, 97, 46, 17, 174, 9, 9, 41, 123, 82, - 9, 17, 9, 17, 17, 9, 151, 126, 141, 17, - 94, 174, -1, -1, -1, 9, 9, 9, 9, 14, - 9, 17, -1, 9, 9, 5, 5, 80, 80, -1, - -1, -1, 80, -1, 80, -1, 80, 80, 80, 20, - 80, -1, -1, 80, -1, -1, 20, 80, 9, 79, - 79, 79, 79, 79, 79, 79, 79, 79, 79, -1, - -1, -1, 20, 20, 20, -1, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, -1, 14, 23, - 16, 16, 16, 16, 8, 8, -1, 8, 8, 8, - 16, 8, 8, 8, -1, -1, -1, -1, -1, 115, - 87, 87, 87, 87, 87, 87, 115, -1, -1, -1, - -1, -1, -1, 16, 115, 115, 115, 115, 115, -1, - -1, -1, -1, -1, 24, -1, -1, -1, -1, 24, - 24, -1, -1, -1, -1, 16, 16, -1, -1, -1, - -1, -1, -1, 105, 105 + 42, 15, 128, 65, 65, 75, 75, 65, 25, 125, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 55, + 55, 25, 25, 25, 25, 25, 25, 27, 25, 25, + 25, 91, 91, 91, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 15, 7, 15, 15, 15, 15, + 75, 15, 15, 15, 15, 15, 15, 78, 78, 45, + 15, 78, 78, 78, 78, 5, 5, 6, 105, 105, + 15, 15, 15, 49, 106, 106, 22, 22, 106, 142, + 142, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 168, 5, 5, 5, 5, 5, 5, 95, 95, 117, + 117, 72, 72, 72, 72, 72, 175, 23, 72, 72, + 72, 177, 23, 72, 23, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 153, 101, 153, 84, 72, + 84, 84, 84, 153, 72, 72, 72, 72, 116, 116, + 72, 72, 72, 9, 9, 9, 9, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 64, 72, 64, + 166, 166, 61, 72, 166, 102, 12, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 167, 167, 63, 46, + 167, 46, 148, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 13, 22, 13, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 14, 12, 23, 12, + 20, 169, 169, 149, 35, 169, 14, 14, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 165, 165, 35, + 14, 14, 35, 14, 111, 14, 174, 174, 9, 118, + 19, 114, 19, 29, 19, 9, 18, 14, 83, 83, + 14, 2, 2, 16, 16, 16, 16, 24, 24, 24, + 24, 39, 128, 16, 128, 20, 128, 28, 19, 158, + 37, 90, 20, 19, 19, 19, 19, 9, 9, 19, + 19, 19, 9, 108, 9, 127, 16, 9, 20, 20, + 20, 128, 128, 128, 128, 14, 97, 9, 9, 9, + 9, 155, 9, 5, 5, 9, 9, 48, 16, 16, + 41, 48, 48, 48, 130, 48, 94, 128, 14, 48, + 48, 48, 48, 48, 48, 178, 178, 80, 80, 145, + 9, 82, 80, -1, 80, -1, 80, 80, 80, -1, + 80, -1, 178, 80, -1, 17, 17, 80, 14, 179, + 179, -1, 17, -1, -1, -1, 128, 17, -1, 178, + 128, 128, 128, 87, -1, 17, 179, 17, 17, 115, + -1, -1, 87, 17, 87, 115, -1, 87, 87, 87, + -1, -1, -1, 115, 115, 17, -1, -1, 115, 115, + 115, 115, 8, 8, -1, 8, 8, 8, -1, 8, + 8, 8, -1, -1, -1, -1, -1, 14, -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, 24, -1, -1, -1, + -1, 24, -1, 24 ); protected $gotoBase = array( - 0, 0, -300, 0, 0, 226, 210, 182, 517, 7, - 0, 0, 5, -313, 25, -175, 78, -33, 74, 84, - 40, 0, -102, 158, 302, 168, 1, 169, 70, 69, - 0, 0, 0, 0, 0, -37, 0, 85, 0, 98, - 0, 4, -1, 0, 0, 197, -279, 0, -367, 243, - 0, 0, 0, 0, 0, 144, 0, 0, 347, 0, - 0, 278, 0, 80, 3, -236, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -168, 0, 0, -176, 140, - -12, 0, -26, -154, -347, 0, 0, 262, 0, 0, - 72, -32, 0, 0, 15, -465, 0, 31, 0, 0, - 0, 251, 287, 0, 0, 344, -72, 0, 66, 0, - 0, 81, 0, 0, 0, 270, 0, 0, 0, 0, - 0, 164, 0, 73, 16, 0, 13, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -13, 0, - 0, 12, 0, 255, 107, 83, 0, 0, 0, -86, - 0, 14, 0, 0, 63, 0, 0, 0, 0, 0, - 0, -77, -2, 116, 205, 161, 0, 0, -100, 0, - -73, 242, 0, 279, 115, -294, 0, 0 + 0, 0, -283, 0, 0, 224, 214, 196, 545, 7, + 0, 0, 33, 18, 72, -181, -31, 49, 100, 133, + -16, 0, -89, 5, 414, 164, 8, 183, 93, 110, + 0, 0, 0, 0, 0, 10, 0, 94, 0, 101, + 0, 35, -1, 0, 0, 207, -378, 0, -226, 210, + 0, 0, 0, 0, 0, 140, 0, 0, -41, 0, + 0, 281, 0, 98, 298, -76, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -174, 0, 0, -186, -44, + 6, 0, 24, -62, -412, 0, 0, 253, 0, 0, + 103, -110, 0, 0, 39, -458, 0, 54, 0, 0, + 0, 252, 283, 0, 0, -11, -5, 0, 80, 0, + 0, 120, 0, 0, 122, 261, 23, -23, 112, 0, + 0, 0, 0, 0, 0, 167, 0, 78, 155, 0, + 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -33, 0, 0, 51, 0, -20, 99, 102, + 0, 0, 0, -200, 0, 27, 0, 0, 67, 0, + 0, 0, 0, 0, 0, 69, 81, 97, 222, 132, + 0, 0, -274, 0, 31, 237, 0, 241, 181, 205, + 0, 0 ); protected $gotoDefault = array( - -32768, 500, 713, 4, 714, 907, 790, 799, 585, 517, - 681, 340, 612, 414, 1262, 884, 1084, 567, 818, 1206, - 1214, 447, 821, 324, 703, 866, 867, 868, 392, 377, - 383, 390, 634, 613, 482, 853, 443, 845, 474, 848, - 442, 857, 162, 411, 498, 861, 3, 863, 545, 894, - 378, 871, 379, 658, 873, 551, 875, 876, 386, 393, - 394, 1089, 559, 609, 888, 244, 553, 889, 376, 890, - 897, 381, 384, 667, 454, 493, 487, 404, 1064, 596, - 631, 451, 468, 619, 618, 606, 467, 426, 409, 326, - 926, 934, 475, 452, 948, 342, 956, 711, 1097, 626, - 477, 964, 627, 971, 974, 518, 519, 466, 986, 269, - 989, 478, 1021, 649, 650, 1001, 628, 629, 1019, 461, - 586, 1027, 444, 1035, 1250, 445, 1039, 262, 1042, 276, - 410, 427, 1047, 1048, 8, 1054, 673, 674, 10, 273, - 497, 1079, 668, 441, 1096, 431, 1166, 1168, 547, 479, - 1186, 1185, 661, 494, 1191, 1253, 439, 520, 462, 310, - 521, 302, 328, 307, 536, 289, 329, 522, 463, 1259, - 1267, 325, 30, 1287, 1298, 336, 564, 601 + -32768, 502, 721, 4, 722, 915, 798, 807, 587, 519, + 689, 342, 614, 416, 1276, 892, 1098, 569, 826, 1220, + 1228, 449, 829, 326, 711, 874, 875, 876, 394, 379, + 385, 392, 637, 615, 484, 861, 445, 853, 476, 856, + 444, 865, 162, 413, 500, 869, 3, 871, 547, 902, + 380, 879, 381, 664, 881, 553, 883, 884, 388, 395, + 396, 1103, 561, 611, 896, 244, 555, 897, 378, 898, + 905, 383, 386, 675, 456, 495, 489, 406, 1078, 598, + 634, 453, 470, 621, 620, 608, 469, 1014, 411, 328, + 934, 942, 477, 454, 956, 344, 964, 719, 1111, 628, + 479, 972, 629, 979, 982, 520, 521, 468, 994, 268, + 997, 480, 1035, 654, 1008, 1009, 655, 630, 1031, 631, + 656, 632, 1033, 463, 588, 1041, 446, 1049, 1264, 447, + 1053, 262, 1056, 274, 412, 429, 1061, 1062, 8, 1068, + 681, 682, 10, 273, 499, 1093, 676, 443, 1110, 433, + 1180, 1182, 549, 481, 1200, 1199, 667, 496, 1205, 1267, + 441, 522, 464, 312, 523, 304, 330, 309, 538, 291, + 331, 524, 465, 1273, 1281, 327, 30, 1301, 1312, 338, + 566, 603 ); protected $ruleToNonTerminal = array( @@ -1022,16 +1047,16 @@ class Php7 extends \PhpParser\ParserAbstract 103, 52, 52, 104, 51, 51, 53, 53, 63, 63, 63, 63, 79, 79, 107, 107, 109, 109, 110, 110, 110, 110, 108, 108, 108, 112, 112, 112, 112, 87, - 87, 115, 115, 115, 113, 113, 116, 116, 114, 114, - 117, 117, 118, 118, 118, 118, 111, 111, 80, 80, - 80, 20, 20, 20, 120, 119, 119, 121, 121, 121, - 121, 59, 122, 122, 123, 60, 125, 125, 126, 126, - 127, 127, 84, 128, 128, 128, 128, 128, 128, 133, - 133, 134, 134, 135, 135, 135, 135, 135, 136, 137, - 137, 132, 132, 129, 129, 131, 131, 139, 139, 138, - 138, 138, 138, 138, 138, 138, 130, 140, 140, 142, - 141, 141, 61, 102, 143, 143, 55, 55, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 87, 115, 115, 115, 116, 116, 113, 113, 117, 117, + 119, 119, 120, 120, 114, 121, 121, 118, 122, 122, + 122, 122, 111, 111, 80, 80, 80, 20, 20, 20, + 124, 123, 123, 125, 125, 125, 125, 59, 126, 126, + 127, 60, 129, 129, 130, 130, 131, 131, 84, 132, + 132, 132, 132, 132, 132, 137, 137, 138, 138, 139, + 139, 139, 139, 139, 140, 141, 141, 136, 136, 133, + 133, 135, 135, 143, 143, 142, 142, 142, 142, 142, + 142, 142, 134, 144, 144, 146, 145, 145, 61, 102, + 147, 147, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1040,20 +1065,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 150, 144, 144, 149, 149, 152, 153, 153, - 154, 155, 155, 155, 19, 19, 72, 72, 72, 72, - 145, 145, 145, 145, 157, 157, 146, 146, 148, 148, - 148, 151, 151, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 163, 163, 106, 165, 165, 165, 165, 147, - 147, 147, 147, 147, 147, 147, 147, 58, 58, 160, - 160, 160, 160, 166, 166, 156, 156, 156, 167, 167, - 167, 167, 167, 167, 73, 73, 65, 65, 65, 65, - 124, 124, 124, 124, 170, 169, 159, 159, 159, 159, - 159, 159, 159, 158, 158, 158, 168, 168, 168, 168, - 105, 164, 172, 172, 171, 171, 173, 173, 173, 173, - 173, 173, 173, 173, 161, 161, 161, 161, 175, 176, - 174, 174, 174, 174, 174, 174, 174, 174, 177, 177, - 177, 177 + 42, 42, 42, 42, 42, 42, 42, 42, 154, 148, + 148, 153, 153, 156, 157, 157, 158, 159, 159, 159, + 19, 19, 72, 72, 72, 72, 149, 149, 149, 149, + 161, 161, 150, 150, 152, 152, 152, 155, 155, 166, + 166, 166, 166, 166, 166, 166, 166, 166, 167, 167, + 106, 169, 169, 169, 169, 151, 151, 151, 151, 151, + 151, 151, 151, 58, 58, 164, 164, 164, 164, 170, + 170, 160, 160, 160, 171, 171, 171, 171, 171, 171, + 73, 73, 65, 65, 65, 65, 128, 128, 128, 128, + 174, 173, 163, 163, 163, 163, 163, 163, 163, 162, + 162, 162, 172, 172, 172, 172, 105, 168, 176, 176, + 175, 175, 177, 177, 177, 177, 177, 177, 177, 177, + 165, 165, 165, 165, 179, 180, 178, 178, 178, 178, + 178, 178, 178, 178, 181, 181, 181, 181 ); protected $ruleToLength = array( @@ -1086,38 +1111,38 @@ class Php7 extends \PhpParser\ParserAbstract 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 2, 1, 1, 0, 1, 0, 2, - 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, - 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, - 2, 0, 1, 5, 5, 10, 3, 5, 1, 1, - 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, - 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, - 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, - 3, 3, 4, 4, 1, 1, 2, 3, 3, 3, + 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, + 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, + 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, + 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, + 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, + 5, 10, 3, 5, 1, 1, 3, 0, 2, 4, + 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, + 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 3, 1, 1, 3, 2, 2, + 3, 1, 0, 1, 1, 3, 3, 3, 4, 4, + 1, 1, 2, 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, - 2, 2, 2, 2, 3, 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, 2, 8, 9, 8, 9, 9, 10, - 9, 10, 8, 3, 2, 0, 4, 2, 1, 3, - 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 3, 3, 4, 1, 1, 3, 1, - 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, - 3, 1, 1, 1, 1, 1, 3, 1, 1, 4, - 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, - 1, 4, 2, 2, 1, 3, 1, 4, 4, 3, - 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, - 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, - 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, - 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, - 2, 1 + 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, 2, + 8, 9, 8, 9, 9, 10, 9, 10, 8, 3, + 2, 0, 4, 2, 1, 3, 2, 2, 2, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, + 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, + 1, 1, 3, 1, 1, 4, 4, 1, 4, 4, + 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, + 1, 3, 1, 4, 4, 3, 3, 3, 3, 1, + 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, + 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, + 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, + 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks() { @@ -2017,7 +2042,7 @@ protected function initReduceCallbacks() { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 288 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 289 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2035,10 +2060,10 @@ protected function initReduceCallbacks() { $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 294 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 295 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 296 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -2047,10 +2072,10 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 298 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 299 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 300 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -2059,698 +2084,698 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 302 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 303 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 304 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 305 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 306 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 307 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 308 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 309 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 310 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 311 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 312 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = null; }, 313 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 314 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = null; }, 315 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 316 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = null; }, 317 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 318 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 319 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, 320 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 321 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 322 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 323 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 325 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 326 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 327 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 328 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 329 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 330 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 331 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 332 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 333 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); - $this->checkProperty($this->semValue, $stackPos-(5-2)); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 334 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); - $this->checkClassConst($this->semValue, $stackPos-(5-2)); + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 335 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 336 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, 337 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = array(); }, 338 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 339 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); + $this->checkProperty($this->semValue, $stackPos-(5-2)); }, 340 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); + $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, 341 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, 342 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 343 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 344 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = null; /* will be skipped */ }, 345 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 346 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 347 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 348 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 349 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 350 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 351 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 352 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 353 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 354 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 355 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 356 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 357 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 358 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 359 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 360 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = 0; }, 361 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = 0; }, 362 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 363 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 364 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 365 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 366 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 367 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 368 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, 369 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 370 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 371 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_READONLY; }, 372 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 373 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 374 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 375 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 379 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 380 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 381 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 382 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 383 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - if (!$this->phpVersion->allowsAssignNewByReference()) { - $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); - } - + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 384 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 385 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 386 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 387 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 388 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 389 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + if (!$this->phpVersion->allowsAssignNewByReference()) { + $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); + } + }, 390 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 391 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 392 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 393 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 394 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 395 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 396 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 397 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 404 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 405 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 406 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 410 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 411 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 422 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 423 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 424 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 425 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 432 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 433 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 434 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 435 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 436 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 437 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 438 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 439 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 440 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 441 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 442 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 443 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 444 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 445 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 446 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 447 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 448 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 449 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 450 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 451 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 452 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 453 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 454 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); + $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); + $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, 455 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 456 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 457 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 458 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 459 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 460 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, 461 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 462 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 463 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 464 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 465 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 466 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 467 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 468 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 469 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 470 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 471 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 472 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 473 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 474 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 475 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 476 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 477 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 478 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->checkClass($this->semValue[0], -1); }, 479 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 480 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 481 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array(); }, 482 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 483 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 484 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 485 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 486 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 487 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 488 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 489 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 490 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 491 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 492 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 493 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 494 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 495 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 496 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 497 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 498 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 499 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 500 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 501 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 502 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 503 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 504 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 505 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 506 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 507 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 508 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 509 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 510 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 511 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 512 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 513 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 514 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 515 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 517 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 518 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 519 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, 520 => function ($stackPos) { - $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, 521 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, 522 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 523 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 524 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, 525 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 526 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 527 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 528 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2759,16 +2784,16 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 531 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 533 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 534 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2786,192 +2811,210 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 539 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 540 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 542 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 543 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 544 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 545 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 546 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 547 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 548 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 549 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 551 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 552 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 553 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 554 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 555 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 556 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 557 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 558 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 559 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 560 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 561 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 562 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 563 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 565 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 566 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 567 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 568 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 569 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 570 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 571 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 572 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 573 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 574 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 575 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 576 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 577 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, 578 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 579 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 580 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 581 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 582 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 583 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 584 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 585 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 586 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 587 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 588 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 589 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = null; }, 590 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 591 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 592 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 593 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 594 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 595 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 596 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 597 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 598 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 599 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 600 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 601 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 602 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 603 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 604 => function ($stackPos) { + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 605 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 606 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 607 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index e87ebf930e..9aeccdbb83 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -159,16 +159,16 @@ class Php8 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1216; - protected $gotoTableSize = 711; + protected $actionTableSize = 1221; + protected $gotoTableSize = 775; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 421; - protected $numNonLeafStates = 712; + protected $YY2TBLSTATE = 429; + protected $numNonLeafStates = 720; protected $symbolToName = array( "EOF", @@ -385,234 +385,235 @@ class Php8 extends \PhpParser\ParserAbstract ); protected $action = array( - 132, 133, 134, 571, 135, 136, 0, 724, 725, 726, - 137, 37,-32766,-32766,-32766, 996,-32766,-32766,-32766, 924, - 448, 449, 450, 800,-32767,-32767,-32767,-32767, 101, 102, - 103, 1265,-32766,-32766, 811, 718, 717,-32766,-32766,-32766, + 132, 133, 134, 573, 135, 136, 0, 732, 733, 734, + 137, 37,-32766,-32766,-32766, 1004,-32766,-32766,-32766, 932, + 450, 451, 452, 808,-32767,-32767,-32767,-32767, 101, 102, + 103,-32766, 240,-32766, -324, 726, 725,-32766, 2,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1205, 2, 1004, 1005, 727,-32766,-32766,-32766, 1074, - 1075, 1076, 1073, 1072, 1071, 1077, 371, 372, -318, 267, - 138, 397, 731, 732, 733, 734, 415,-32766, 421,-32766, - -32766,-32766,-32766,-32766, -193, 735, 736, 737, 738, 739, - 740, 741, 742, 743, 744, 745, 765, 572, 766, 767, - 768, 769, 757, 758, 337, 338, 760, 761, 746, 747, - 748, 750, 751, 752, 347, 792, 793, 794, 795, 796, - 797, 753, 754, 573, 574, 786, 777, 775, 776, 789, - 772, 773, 809, -192, 575, 576, 771, 577, 578, 579, - 580, 581, 582, 913, 1198,-32766,-32766,-32766, 774, 583, - 584, 12, 139, 240, 132, 133, 134, 571, 135, 136, - 1023, 724, 725, 726, 137, 37,-32766, 34,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 128, - 1196,-32766,-32766,-32766, 373, 372,-32766,-32766,-32766, 718, - 717, 126, 810, 81, 415, 144,-32766, 320,-32766,-32766, - -32766,-32766,-32766, 600,-32766,-32766,-32766, 1281, 294, 727, - 253, 74, 104, 105, 106, 107, 108, 320, 270, 1200, - 1199, 1201, -318, 267, 138, 397, 731, 732, 733, 734, - 109, 1310, 421, 279, 1311, 280, 470, 802, -193, 735, - 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, - 765, 572, 766, 767, 768, 769, 757, 758, 337, 338, - 760, 761, 746, 747, 748, 750, 751, 752, 347, 792, - 793, 794, 795, 796, 797, 753, 754, 573, 574, 786, - 777, 775, 776, 789, 772, 773, 800, -192, 575, 576, - 771, 577, 578, 579, 580, 581, 582, 123, 82, 83, - 84, -268, 774, 583, 584, 698, 148, 749, 719, 720, - 721, 722, 723, 804, 724, 725, 726, 762, 763, 36, - 686, 85, 86, 87, 88, 89, 90, 91, 92, 93, + -32767, 1219, 819, 1013, 12, 735,-32766,-32766,-32766, 1088, + 1089, 1090, 1087, 1086, 1085, 1091, -193, -192, 810, 267, + 138, 399, 739, 740, 741, 742, 288,-32766, 423,-32766, + -32766,-32766,-32766,-32766, 34, 743, 744, 745, 746, 747, + 748, 749, 750, 751, 752, 753, 773, 574, 774, 775, + 776, 777, 765, 766, 339, 340, 768, 769, 754, 755, + 756, 758, 759, 760, 349, 800, 801, 802, 803, 804, + 805, 761, 762, 575, 576, 794, 785, 783, 784, 797, + 780, 781, 817, 128, 577, 578, 779, 579, 580, 581, + 582, 583, 584, 921, 812,-32766,-32766,-32766, 782, 585, + 586, 694, 139, 144, 132, 133, 134, 573, 135, 136, + 1037, 732, 733, 734, 137, 37,-32766, 253,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 307, + -268,-32766,-32766,-32766, 844, 967, 845,-32766, -324, 726, + 725, 602,-32766,-32766,-32766, 1279,-32766, 126,-32766,-32766, + -32766,-32766,-32766, 309,-32766,-32766,-32766, 1295, 296, 735, + 818, 74, 104, 105, 106, 107, 108, 322, 271, 1324, + -193, -192, 1325, 267, 138, 399, 739, 740, 741, 742, + 109, -86, 423, 816,-32766,-32766,-32766,-32766,-32766, 743, + 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, + 773, 574, 774, 775, 776, 777, 765, 766, 339, 340, + 768, 769, 754, 755, 756, 758, 759, 760, 349, 800, + 801, 802, 803, 804, 805, 761, 762, 575, 576, 794, + 785, 783, 784, 797, 780, 781, 808, 596, 577, 578, + 779, 579, 580, 581, 582, 583, 584, -86, 82, 83, + 84, 320, 782, 585, 586, 706, 148, 757, 727, 728, + 729, 730, 731, 968, 732, 733, 734, 770, 771, 36, + 336, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 1002, 270, 1074, 1075, 1076, - 1073, 1072, 1071, 1077, 928, 929, 959, 305, 109, 930, - 307, 1022, 727,-32766,-32766,-32766, 1004, 1005, 471, 141, - 1050,-32766,-32766, 320, -86, 805, 728, 729, 730, 731, - 732, 733, 734, 318,-32766, 798,-32766,-32766, -531, -356, - 278, -356, 735, 736, 737, 738, 739, 740, 741, 742, - 743, 744, 745, 765, 788, 766, 767, 768, 769, 757, - 758, 759, 787, 760, 761, 746, 747, 748, 750, 751, - 752, 791, 792, 793, 794, 795, 796, 797, 753, 754, - 755, 756, 786, 777, 775, 776, 789, 772, 773, 334, - -86, 764, 770, 771, 778, 779, 781, 780, 782, 783, - 1205, 806, -531, -531, 335, 774, 785, 784, 49, 50, - 51, 501, 52, 53, 150, 1285, 285, -531, 54, 55, - -111, 56, 1284, 893, 893, -111, 1002, -111, 285, -537, - 151, -531, 301, 594, 960, -111, -111, -111, -111, -111, - -111, -111, -111, 361, 893, 893, 1051, 1004, 1005, -580, - 710, 153, 1205, 689, 690, 365, -580, 57, 58, 102, - 103, -530, 59, 380, 60, 247, 248, 61, 62, 63, - 64, 65, 66, 67, 68, 691, 27, 268, 69, 437, - 502, 809, -16, -332, 1231, 1232, 503, 433, 809, -577, - 434, -532, 1229, 41, 24, 504, -577, 505, 435, 506, - 893, 507,-32766, 436, 508, 509, 883, 883, 815, 43, - 44, 438, 368, 367,-32766, 45, 510, 992, 991, 990, - 993, 359, 333, 1004, 1005, -530, -530, 883, 883, 239, - 511, 512, 513, 809, 809, 1004, 1005, 1300, 421, 836, - -530, 837, 515, 516, 154, 1219, 1220, 1221, 1222, 1216, - 1217, 293, -536, 155, -530, -532, -532, 1223, 1218, -534, - 74, 1200, 1199, 1201, 294, 14, 320, 70,-32766,-32766, - -532, 316, 317, 320, -153, -153, -153, 157, 286, -111, - 287, 895, 895, 883, -532, 684, 684, 1066, 808, -153, - 544, -153, 382, -153, 11, -153, 47, 718, 717, 35, - 250, 321, 895, 945, 32, 366, 684, 684, -580, 294, - -580, 124, 74, 1200, 1199, 1201, -111, -111, 320, 640, - 25, -111, 1052, -534, -534, 129, 869, -111, -111, -111, + 104, 105, 106, 107, 108, 1010, 271, 1088, 1089, 1090, + 1087, 1086, 1085, 1091, 936, 937, 1065, 81, 109, 938, + 718, 322, 735,-32766,-32766,-32766, 337, 1013, 289, 141, + 1064, 472, 363, 322, 813, 367, 736, 737, 738, 739, + 740, 741, 742, 239,-32766, 806,-32766,-32766, -537, 423, + 278, 382, 743, 744, 745, 746, 747, 748, 749, 750, + 751, 752, 753, 773, 796, 774, 775, 776, 777, 765, + 766, 767, 795, 768, 769, 754, 755, 756, 758, 759, + 760, 799, 800, 801, 802, 803, 804, 805, 761, 762, + 763, 764, 794, 785, 783, 784, 797, 780, 781,-32766, + 546, 772, 778, 779, 786, 787, 789, 788, 790, 791, + 814,-32766, -537, -537,-32766, 782, 793, 792, 49, 50, + 51, 503, 52, 53, 1214, 1213, 1215, -537, 54, 55, + -111, 56,-32766, 1066, 901, -111, 1013, -111, 289, -543, + 435, -537, 303, 373, 374, -111, -111, -111, -111, -111, + -111, -111, -111, 417, 901, 375, 374, 436, 1219, 288, + 437, 1251, 1219, 473, 697, 417, 1299, 57, 58, 14, + 150, -536, 59, 1298, 60, 247, 248, 61, 62, 63, + 64, 65, 66, 67, 68, 438, 27, 269, 69, 439, + 504, 1080, -16, -338, 1245, 1246, 505, -362, 817, -362, + 823, 323, 1243, 41, 24, 506, 384, 507, 11, 508, + 901, 509, 726, 725, 510, 511, 1239, 891, 151, 43, + 44, 440, 370, 369,-32766, 45, 512, 1000, 999, 998, + 1001, 361, 335, 153, 1212, -536, -536, 891, -586, 817, + 513, 514, 515, 817, 123, -586, 1013, 844, 817, 845, + -536, 1314, 517, 518,-32766, 1233, 1234, 1235, 1236, 1230, + 1231, 295, -542, 154, -536, 458, 459, 1237, 1232, 288, + 1210, 1214, 1213, 1215, 296, 155, 1013, 70, 1010, 102, + 103, 318, 319, 322, -153, -153, -153, 157, -577, -111, + -577, 1012, 903, 891,-32766, -538, 692, 817,-32766, -153, + 1013, -153, 32, -153, -298, -153,-32766,-32766, 124, 1214, + 1213, 1215, 903, 35, 250, 368, 692, 129, 74, 296, + 643, 25, 74, 130, 322, 143, -111, -111, 322, 1036, + 158, -111, 662, 663, 149, 402, 877, -111, -111, -111, -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 718, 717, 836, -577, 837, - -577, 1237, -534, 893, 130, -4, 893, -571, 895, -571, - 295, 296, 684, -153, 143, 456, 457, 1225, 656, 657, - 893,-32766,-32766,-32766, 1112, 1114, 149, 400, -88, 718, - 717, 158,-32766, 693, 159, -529, 369, 370, 1198, 125, - 374, 375, 160, 718, 717,-32766,-32766,-32766, 161,-32766, - 700,-32766, -79,-32766, -75, -73,-32766, 632, 633, -72, - -529,-32766,-32766,-32766, -71, -70,-32766,-32766,-32766, -69, - -68, -67, 1198,-32766, 412, -66, 27, -47, -18,-32766, - -32766,-32766,-32766,-32766, 147,-32766, 883,-32766, 809, 883, - -32766, 271, 1229, 277, 699,-32766,-32766,-32766, 809, -529, - -529,-32766,-32766, 883, 702, 892, 48,-32766, 412, 146, - 281, 366, 73, 428, -529, 288,-32766, 327, 292, 909, - 282, 289, -111, -111, -529, -529, 270, -111, -529, 145, - 109, -51, 514, -111, -111, -111, -111, 800, 809, -529, - 1081, 664, 515, 516, 550, 1219, 1220, 1221, 1222, 1216, - 1217, 1312,-32766, -529, 647, 9, 546, 1223, 1218, 659, - 641, 895, 646, 131, 895, 684, 302, 72, 684, -4, - 297, 298, 317, 320,-32766, 299, 13, 677, 895, 140, - 1198, 306, 684, 320, 453, 364, 481,-32766,-32766,-32766, - 660,-32766,-32766,-32766, 1236,-32766, 1238, 808,-32766, 127, - 432, 630, -565,-32766,-32766,-32766,-32766, -271, 0,-32766, - -32766, 1226, 1198, 0, 893,-32766, 412, 0, 0,-32766, - -32766,-32766, 925,-32766,-32766,-32766, 300,-32766, 0, 0, - -32766, 911, 0, 893, 0,-32766,-32766,-32766,-32766, 556, - -495,-32766,-32766, 0, 1198, -485, 7,-32766, 412, 0, - 16,-32766,-32766,-32766, 363,-32766,-32766,-32766, 39,-32766, - 598, 294,-32766, 40, -269, 707, 476,-32766,-32766,-32766, - -32766, 708, 828,-32766,-32766, 874, 1198, 563, 969,-32766, - 412, 946, 953,-32766,-32766,-32766, 943,-32766,-32766,-32766, - 954,-32766, 872, 941,-32766, 1055, 1058, 883, 1059,-32766, - -32766,-32766, 1056, 1057, 1063,-32766,-32766, 820, 1251, 1269, - 1303,-32766, 412, -246, -246, -246, 883, 635, -268, 366, - -32766, -563, -537, -536, -535, 1230, 1, 28, 29, 38, - -111, -111, -245, -245, -245, -111, 42, 46, 366, 71, - 869, -111, -111, -111, -111, 75, 76, 77, 78, -111, - -111, 79, 80, 142, -111, 27, 268, 18, 152, 869, - -111, -111, -111, -111, 156, 246, 322, 809,-32766, 348, - 349, 1229, 895, 350, 1198, 351, 684, -246, 352, 353, - 354,-32766,-32766,-32766, 355,-32766, 356,-32766, 357,-32766, - 27, 895,-32766, 19, 358, 684, -245,-32766,-32766,-32766, - 360, 429, 809,-32766,-32766, 543, 1229, 20, 21,-32766, - 412, 23, 399, 472, 473, 480, 483, 484,-32766, 485, - 486, 490, 516, 491, 1219, 1220, 1221, 1222, 1216, 1217, - 492, 499, 561, 671, 1209, 1152, 1223, 1218, 1227, 1025, - 1024, 1188, -273, -103, 17, 22, 72, 33, 26, 291, - 398, 317, 320, 591, 595, 622, 320, 516, 676, 1219, - 1220, 1221, 1222, 1216, 1217, 1156, 1204, 1153, 1282, 0, - 315, 1223, 1218, 362, 685, 688, 692, 694, 695, 696, - 697, 72, 701, -499, 687, 0, 317, 320, 704, 870, - 1307, 1309, 831, 830, 839, 918, 961, 838, 1308, 917, - 919, 916, 1184, 902, 912, 900, 951, 952, 1306, 1263, - 1252, 1270, 1276, 1279, 0, 1169 + 118, 119, 120, 121, 122, 726, 725, 159, 283, -538, + -538, 635, 636, 901, 160, -4, 901, 161, 903, 371, + 372, -88, 692, -153, -538, -79, -583, -75, 140, 284, + 901, -73, 322, -583, 1126, 1128, 376, 377, -538, 726, + 725, -72,-32766, 698, 901, -535, -294, -586, 1212, -586, + -71, -70, -69, 726, 725,-32766,-32766,-32766, -68,-32766, + 699,-32766, -67,-32766, -66, -47,-32766, -18, 147, 270, + 280,-32766,-32766,-32766, 701, 707,-32766,-32766,-32766, 710, + 900, 146, 1212,-32766, 414, 917, 27, 276, 277,-32766, + -32766,-32766,-32766,-32766, 1010,-32766, 891,-32766, 817, 891, + -32766, 281, 1243, 282, 329,-32766,-32766,-32766, 285, -535, + -535,-32766,-32766, 891, 290, 291, 1013,-32766, 414, 271, + 109, 368, 73, 430, -535, 145,-32766, 891, 294, 1326, + -535, 672, -111, -111, 901, 644, 808, -111, -535, 278, + 817, -51, 516, -111, -111, -111, -111, 1095,-32766, 548, + 552, 685, 517, 518, 13, 1233, 1234, 1235, 1236, 1230, + 1231, 665, 301, 48, 708, 9, 649, 1237, 1232, 455, + 483, 903, 308, 131, 903, 692, 650, 72, 692, -4, + 666, 1250, 319, 322,-32766, -583, 919, -583, 953, 304, + 1212, -501, 692, -505, -535, -535, 633,-32766,-32766,-32766, + 39,-32766, 903,-32766, 0,-32766, 692, 434,-32766, -535, + -540,-32766, 933,-32766,-32766,-32766,-32766, 891, 302,-32766, + -32766, 0, 1212, -535, 901,-32766, 414, 299, 300,-32766, + -32766,-32766, 1252,-32766,-32766,-32766, -491,-32766, 7, 16, + -32766, 47, 366, 901, 365,-32766,-32766,-32766,-32766, 558, + 600,-32766,-32766, 816, 1212, -571, 127,-32766, 414, 296, + 1240,-32766,-32766,-32766, 40,-32766,-32766,-32766, 715,-32766, + 716, 836,-32766, 882, -540, -540, 478,-32766,-32766,-32766, + -32766, 977, 954,-32766,-32766, 961, 1212, 565, 951,-32766, + 414, 962, 903,-32766,-32766,-32766, 692,-32766,-32766,-32766, + 880,-32766, 949, -540,-32766, 297, 298, 891, 1069,-32766, + -32766,-32766, 1072, 1073, 1070,-32766,-32766, 1071, 1077, -271, + 828,-32766, 414, -246, -246, -246, 891, 1265, 1283, 368, + -32766, -569, 1317, 638, 125, 1244, -543, -542, -541, 1, + -111, -111, -245, -245, -245, -111, 28, 29, 368, 38, + 877, -111, -111, -111, -111, 42, 46, 71, 75, -111, + -111, 76, 77, 78, -111, 27, 269, -269, 79, 877, + -111, -111, -111, -111, 80, 142, 152, 817,-32766, 156, + 246, 1243, 903, 324, 1212, 350, 692, -246, 351, 352, + 353,-32766,-32766,-32766, 354,-32766, 355,-32766, 356,-32766, + 27, 903,-32766, -268, 357, 692, -245,-32766,-32766,-32766, + 358, 359, 817,-32766,-32766, 360, 1243, 362, 431,-32766, + 414, 545, 33, 18, 19, 20, 21, 23,-32766, 401, + 474, 475, 518, 482, 1233, 1234, 1235, 1236, 1230, 1231, + 485, 486, 487, 488, 492, 493, 1237, 1232, 494, 501, + 563, 679, 1223, 1166, 1241, 1039, 72, 317, 1038, 1019, + 1202, 319, 322, 1015, -273, -103, 322, 518, 17, 1233, + 1234, 1235, 1236, 1230, 1231, 22, 26, 293, 400, 593, + 597, 1237, 1232, 624, 684, 1170, 1218, 1167, 1296, 0, + 364, 72, 693, 1183, 696, 700, 319, 322, 702, 703, + 704, 705, 709, 695, 0, 712, 878, 1321, 1323, 839, + 838, 847, 926, 969, 846, 1322, 925, 927, 924, 1198, + 910, 920, 908, 959, 960, 1320, 1277, 1266, 1284, 1290, + 1293 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 9, 10, 11, 1, 9, 10, 11, 128, 129, 130, 131, 80, 44, 45, 46, 47, 48, 49, - 50, 1, 116, 30, 1, 37, 38, 30, 9, 32, + 50, 116, 14, 30, 8, 37, 38, 30, 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 1, 8, 137, 138, 57, 9, 10, 11, 116, - 117, 118, 119, 120, 121, 122, 106, 107, 8, 71, - 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, + 43, 1, 1, 138, 8, 57, 9, 10, 11, 116, + 117, 118, 119, 120, 121, 122, 8, 8, 80, 71, + 72, 73, 74, 75, 76, 77, 161, 30, 80, 32, 33, 34, 35, 36, 8, 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, 82, 8, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 1, 80, 9, 10, 11, 150, 151, - 152, 8, 154, 14, 2, 3, 4, 5, 6, 7, + 142, 143, 144, 1, 156, 9, 10, 11, 150, 151, + 152, 163, 154, 8, 2, 3, 4, 5, 6, 7, 162, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 9, 10, 11, 128, 8, - 116, 9, 10, 11, 106, 107, 9, 10, 11, 37, - 38, 14, 159, 163, 116, 8, 30, 167, 32, 33, - 34, 35, 30, 52, 32, 33, 34, 1, 158, 57, - 8, 161, 51, 52, 53, 54, 55, 167, 57, 155, - 156, 157, 162, 71, 72, 73, 74, 75, 76, 77, - 69, 80, 80, 35, 83, 37, 31, 80, 162, 87, + 162, 9, 10, 11, 106, 31, 108, 137, 162, 37, + 38, 52, 9, 10, 11, 1, 30, 14, 32, 33, + 34, 35, 30, 8, 32, 33, 34, 1, 158, 57, + 159, 161, 51, 52, 53, 54, 55, 167, 57, 80, + 162, 162, 83, 71, 72, 73, 74, 75, 76, 77, + 69, 31, 80, 155, 9, 10, 11, 9, 10, 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, 80, 162, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 16, 9, 10, - 11, 162, 150, 151, 152, 163, 154, 2, 3, 4, - 5, 6, 7, 156, 9, 10, 11, 12, 13, 30, - 163, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 128, 129, 130, 131, 132, 133, 80, 1, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 97, 9, 10, + 11, 8, 150, 151, 152, 163, 154, 2, 3, 4, + 5, 6, 7, 159, 9, 10, 11, 12, 13, 30, + 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 116, 57, 116, 117, 118, - 119, 120, 121, 122, 117, 118, 31, 8, 69, 122, - 8, 1, 57, 9, 10, 11, 137, 138, 163, 163, - 1, 9, 10, 167, 31, 80, 71, 72, 73, 74, - 75, 76, 77, 8, 30, 80, 32, 33, 70, 106, - 30, 108, 87, 88, 89, 90, 91, 92, 93, 94, + 119, 120, 121, 122, 117, 118, 159, 163, 69, 122, + 163, 167, 57, 9, 10, 11, 8, 138, 30, 163, + 1, 31, 8, 167, 80, 8, 71, 72, 73, 74, + 75, 76, 77, 97, 30, 80, 32, 33, 70, 80, + 161, 8, 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, 8, - 97, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 1, 156, 134, 135, 8, 150, 151, 152, 2, 3, - 4, 5, 6, 7, 14, 1, 30, 149, 12, 13, - 101, 15, 8, 1, 1, 106, 116, 108, 30, 161, - 14, 163, 113, 1, 159, 116, 117, 118, 119, 120, - 121, 122, 123, 8, 1, 1, 159, 137, 138, 1, - 163, 14, 1, 31, 31, 8, 8, 51, 52, 49, - 50, 70, 56, 8, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 31, 70, 71, 72, 73, - 74, 82, 31, 164, 78, 79, 80, 8, 82, 1, - 8, 70, 86, 87, 88, 89, 8, 91, 8, 93, - 1, 95, 116, 8, 98, 99, 84, 84, 8, 103, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 9, + 85, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 156, 116, 134, 135, 116, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 155, 156, 157, 149, 12, 13, + 101, 15, 137, 164, 1, 106, 138, 108, 30, 161, + 8, 163, 113, 106, 107, 116, 117, 118, 119, 120, + 121, 122, 123, 116, 1, 106, 107, 8, 1, 161, + 8, 146, 1, 163, 31, 116, 1, 51, 52, 101, + 14, 70, 56, 8, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 8, 70, 71, 72, 73, + 74, 123, 31, 164, 78, 79, 80, 106, 82, 108, + 8, 70, 86, 87, 88, 89, 106, 91, 108, 93, + 1, 95, 37, 38, 98, 99, 1, 84, 14, 103, 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 137, 138, 134, 135, 84, 84, 97, - 124, 125, 126, 82, 82, 137, 138, 85, 80, 106, - 149, 108, 136, 137, 14, 139, 140, 141, 142, 143, - 144, 145, 161, 14, 163, 134, 135, 151, 152, 70, - 161, 155, 156, 157, 158, 101, 167, 161, 51, 52, - 149, 165, 166, 167, 75, 76, 77, 14, 35, 128, - 37, 159, 159, 84, 163, 163, 163, 123, 155, 90, - 85, 92, 106, 94, 108, 96, 70, 37, 38, 147, - 148, 70, 159, 159, 14, 106, 163, 163, 160, 158, - 162, 16, 161, 155, 156, 157, 117, 118, 167, 75, - 76, 122, 164, 134, 135, 16, 127, 128, 129, 130, + 122, 115, 116, 14, 80, 134, 135, 84, 1, 82, + 124, 125, 126, 82, 16, 8, 138, 106, 82, 108, + 149, 85, 136, 137, 116, 139, 140, 141, 142, 143, + 144, 145, 161, 14, 163, 134, 135, 151, 152, 161, + 116, 155, 156, 157, 158, 14, 138, 161, 116, 49, + 50, 165, 166, 167, 75, 76, 77, 14, 160, 128, + 162, 137, 159, 84, 137, 70, 163, 82, 137, 90, + 138, 92, 14, 94, 35, 96, 51, 52, 16, 155, + 156, 157, 159, 147, 148, 106, 163, 16, 161, 158, + 75, 76, 161, 16, 167, 16, 117, 118, 167, 1, + 16, 122, 75, 76, 101, 102, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 37, 38, 106, 160, 108, - 162, 146, 163, 1, 16, 0, 1, 160, 159, 162, - 134, 135, 163, 164, 16, 134, 135, 1, 75, 76, - 1, 9, 10, 11, 59, 60, 101, 102, 31, 37, - 38, 16, 74, 31, 16, 70, 106, 107, 80, 163, - 106, 107, 16, 37, 38, 87, 88, 89, 16, 91, - 31, 93, 31, 95, 31, 31, 98, 111, 112, 31, - 70, 103, 104, 105, 31, 31, 74, 109, 110, 31, - 31, 31, 80, 115, 116, 31, 70, 31, 31, 87, - 88, 89, 124, 91, 31, 93, 84, 95, 82, 84, - 98, 31, 86, 31, 31, 103, 104, 105, 82, 134, - 135, 109, 110, 84, 31, 31, 70, 115, 116, 31, - 35, 106, 154, 108, 149, 35, 124, 35, 113, 38, - 37, 37, 117, 118, 134, 135, 57, 122, 163, 70, - 69, 31, 127, 128, 129, 130, 131, 80, 82, 149, - 82, 77, 136, 137, 89, 139, 140, 141, 142, 143, - 144, 83, 85, 163, 100, 150, 85, 151, 152, 94, - 90, 159, 96, 31, 159, 163, 114, 161, 163, 164, - 134, 135, 166, 167, 74, 132, 97, 92, 159, 163, - 80, 132, 163, 167, 97, 149, 97, 87, 88, 89, - 100, 91, 116, 93, 146, 95, 146, 155, 98, 163, - 128, 113, 161, 103, 104, 105, 74, 162, -1, 109, - 110, 160, 80, -1, 1, 115, 116, -1, -1, 87, - 88, 89, 128, 91, 124, 93, 133, 95, -1, -1, - 98, 154, -1, 1, -1, 103, 104, 105, 74, 153, - 149, 109, 110, -1, 80, 149, 149, 115, 116, -1, - 149, 87, 88, 89, 149, 91, 124, 93, 159, 95, - 153, 158, 98, 159, 162, 159, 102, 103, 104, 105, + 25, 26, 27, 28, 29, 37, 38, 16, 30, 134, + 135, 111, 112, 1, 16, 0, 1, 16, 159, 106, + 107, 31, 163, 164, 149, 31, 1, 31, 163, 37, + 1, 31, 167, 8, 59, 60, 106, 107, 163, 37, + 38, 31, 74, 31, 1, 70, 35, 160, 80, 162, + 31, 31, 31, 37, 38, 87, 88, 89, 31, 91, + 31, 93, 31, 95, 31, 31, 98, 31, 31, 31, + 31, 103, 104, 105, 31, 31, 74, 109, 110, 31, + 31, 31, 80, 115, 116, 38, 70, 35, 35, 87, + 88, 89, 124, 91, 116, 93, 84, 95, 82, 84, + 98, 35, 86, 35, 35, 103, 104, 105, 37, 134, + 135, 109, 110, 84, 37, 37, 138, 115, 116, 57, + 69, 106, 154, 108, 149, 70, 124, 84, 113, 83, + 70, 77, 117, 118, 1, 90, 80, 122, 163, 161, + 82, 31, 127, 128, 129, 130, 131, 82, 85, 85, + 89, 92, 136, 137, 97, 139, 140, 141, 142, 143, + 144, 94, 132, 70, 31, 150, 96, 151, 152, 97, + 97, 159, 132, 31, 159, 163, 100, 161, 163, 164, + 100, 146, 166, 167, 74, 160, 154, 162, 159, 114, + 80, 149, 163, 165, 134, 135, 113, 87, 88, 89, + 159, 91, 159, 93, -1, 95, 163, 128, 98, 149, + 70, 137, 128, 103, 104, 105, 74, 84, 133, 109, + 110, -1, 80, 163, 1, 115, 116, 134, 135, 87, + 88, 89, 146, 91, 124, 93, 149, 95, 149, 149, + 98, 70, 149, 1, 149, 103, 104, 105, 74, 153, + 153, 109, 110, 155, 80, 161, 163, 115, 116, 158, + 160, 87, 88, 89, 159, 91, 124, 93, 159, 95, + 159, 159, 98, 159, 134, 135, 102, 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, 81, 159, 115, - 116, 159, 159, 87, 88, 89, 159, 91, 124, 93, - 159, 95, 159, 159, 98, 159, 159, 84, 159, 103, - 104, 105, 159, 159, 159, 109, 110, 160, 160, 160, - 160, 115, 116, 100, 101, 102, 84, 160, 162, 106, - 124, 161, 161, 161, 161, 166, 161, 161, 161, 161, + 116, 159, 159, 87, 88, 89, 163, 91, 124, 93, + 159, 95, 159, 163, 98, 134, 135, 84, 159, 103, + 104, 105, 159, 159, 159, 109, 110, 159, 159, 162, + 160, 115, 116, 100, 101, 102, 84, 160, 160, 106, + 124, 161, 160, 160, 163, 166, 161, 161, 161, 161, 117, 118, 100, 101, 102, 122, 161, 161, 106, 161, 127, 128, 129, 130, 131, 161, 161, 161, 161, 117, 118, 161, 161, 161, 122, 70, 71, 162, 161, 127, @@ -620,24 +621,25 @@ class Php8 extends \PhpParser\ParserAbstract 161, 86, 159, 161, 80, 161, 163, 164, 161, 161, 161, 87, 88, 89, 161, 91, 161, 93, 161, 95, 70, 159, 98, 162, 161, 163, 164, 103, 104, 105, - 161, 161, 82, 109, 110, 161, 86, 162, 162, 115, - 116, 162, 162, 162, 162, 162, 162, 162, 124, 162, + 161, 161, 82, 109, 110, 161, 86, 161, 161, 115, + 116, 161, 163, 162, 162, 162, 162, 162, 124, 162, 162, 162, 137, 162, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, 163, 162, 162, 162, 166, 167, 162, 162, 162, 167, 137, 162, 139, - 140, 141, 142, 143, 144, 162, 162, 162, 162, -1, - 163, 151, 152, 163, 163, 163, 163, 163, 163, 163, - 163, 161, 163, 165, 163, -1, 166, 167, 164, 164, + 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, + 162, 151, 152, 162, 162, 162, 162, 162, 162, -1, + 163, 161, 163, 165, 163, 163, 166, 167, 163, 163, + 163, 163, 163, 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, -1, 165 + 164 ); protected $actionBase = array( - 0, -2, 152, 549, 705, 913, 932, 716, 508, 157, - 844, 305, 305, -57, 305, 305, 305, 473, 702, 702, - 719, 702, 472, 494, 493, 493, 493, 658, 658, 658, + 0, -2, 152, 549, 705, 913, 932, 555, 309, -12, + 848, 305, 305, -57, 305, 305, 305, 702, 733, 733, + 823, 733, 473, 719, 493, 493, 493, 658, 658, 658, 658, 692, 692, 864, 864, 896, 832, 800, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, @@ -651,63 +653,64 @@ class Php8 extends \PhpParser\ParserAbstract 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 33, 325, 482, 640, 987, 1003, 991, 1004, - 983, 982, 988, 992, 1005, 1044, 1045, 778, 1046, 1047, - 1048, 1049, 993, 857, 986, 996, 289, 289, 289, 289, + 994, 994, 51, 154, 286, 628, 1005, 1013, 1007, 1014, + 1003, 996, 1006, 1008, 1015, 1051, 1052, 740, 1053, 1054, + 1055, 1056, 1011, 863, 1004, 1012, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 29, 177, 362, 712, 712, 712, 712, 712, - 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, - 712, 712, 712, 712, 712, 3, 3, 3, 354, 706, + 289, 289, 430, 183, 228, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, + 225, 225, 225, 225, 225, 3, 3, 3, 354, 706, 706, 172, 166, 985, 665, 47, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 136, 136, 7, 7, 7, - 7, 7, 369, -20, -20, -20, -20, 501, 50, 448, - 449, 360, 514, 283, 460, 436, -109, 229, 229, 229, - 229, 229, 229, 161, 161, -84, -84, -84, -84, -84, - 318, 441, 483, 555, 64, 206, 206, 206, 206, 64, - 64, 64, 64, 750, 859, 64, 64, 64, 471, 690, - 690, 736, 567, 567, 690, 591, 771, 502, 591, 502, - 30, 151, 776, -40, 78, 547, 794, 776, 539, 576, - 538, 498, 742, 630, 742, 981, 767, 746, 723, 845, - 1021, 1006, 754, 1042, 790, 1043, 581, 721, 980, 980, - 980, 980, 980, 980, 980, 980, 980, 980, 980, 989, - 610, 981, 295, 989, 989, 989, 610, 610, 610, 610, - 610, 610, 610, 610, 610, 610, 646, 295, 594, 643, - 295, 782, 610, 33, 796, 33, 33, 33, 33, 908, - 33, 33, 33, 33, 33, 33, 918, 747, 205, 33, - 325, 142, 142, 337, 14, 142, 142, 142, 142, 33, - 33, 33, 630, 769, 786, 634, 807, 125, 769, 769, - 769, 343, 60, 139, 76, 593, 198, 536, 757, 757, - 758, 865, 865, 757, 756, 757, 758, 876, 757, 865, - 803, 171, 529, 431, 497, 532, 865, 349, 757, 757, - 757, 757, 540, 757, 202, 187, 757, 757, 743, 762, - 749, 44, 865, 865, 865, 749, 485, 793, 793, 793, - 806, 812, 788, 760, 375, 352, 550, 159, 781, 760, - 760, 757, 505, 788, 760, 788, 760, 777, 760, 760, - 760, 788, 760, 756, 446, 760, 715, 545, 143, 760, - 6, 878, 884, 697, 885, 868, 886, 940, 887, 890, - 1011, 904, 875, 891, 944, 867, 866, 774, 281, 645, - 797, 791, 863, 761, 761, 761, 861, 761, 761, 761, - 761, 761, 761, 761, 761, 281, 751, 805, 772, 755, - 909, 659, 688, 970, 748, 1025, 1018, 1050, 908, 972, - 892, 799, 698, 949, 912, 1024, 1007, 914, 917, 950, - 973, 813, 976, 1026, 759, 1027, 1028, 847, 919, 1012, - 761, 878, 890, 875, 891, 867, 866, 744, 740, 738, - 739, 734, 733, 724, 728, 753, 977, 860, 741, 848, - 918, 862, 281, 849, 895, 984, 951, 952, 1010, 787, - 768, 850, 1029, 923, 925, 927, 1013, 978, 804, 931, - 745, 953, 789, 1030, 954, 955, 957, 958, 1031, 1014, - 1015, 1016, 816, 770, 802, 766, 1032, 450, 780, 784, - 939, 466, 905, 1017, 1033, 1034, 959, 961, 968, 1035, - 897, 819, 945, 765, 946, 856, 822, 823, 487, 775, - 783, 580, 589, 1036, 1037, 1038, 903, 763, 764, 827, - 831, 979, 1039, 613, 833, 718, 1040, 971, 726, 732, - 785, 1019, 801, 752, 779, 933, 773, 834, 1041, 836, - 837, 839, 969, 843, 0, 0, 0, 0, 0, 0, + 7, 7, 369, -20, -20, -20, -20, 501, 448, 50, + 668, 497, 408, 431, 570, 338, 229, 229, 502, -109, + 502, -85, -85, 502, 502, 502, 161, 161, 478, 478, + 478, 478, 318, 441, 78, 355, 764, 206, 206, 206, + 206, 764, 764, 764, 764, 776, 859, 764, 764, 764, + 565, 750, 750, 783, 595, 595, 750, 481, 754, 506, + 481, 506, 194, 139, 335, 377, 389, 468, 774, 335, + 830, 861, 715, 577, 788, 603, 788, 993, 753, 724, + 686, 849, 1030, 1016, 766, 1049, 770, 1050, 471, 684, + 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, + 992, 989, 515, 993, 294, 989, 989, 989, 515, 515, + 515, 515, 515, 515, 515, 515, 515, 515, 590, 294, + 585, 597, 294, 759, 515, 51, 777, 51, 51, 51, + 51, 914, 51, 51, 51, 51, 51, 51, 925, 726, + 340, 51, 154, 142, 142, 197, 14, 142, 142, 142, + 142, 51, 51, 51, 603, 752, 786, 620, 787, 59, + 752, 752, 752, 200, 26, 18, 58, 609, 701, 440, + 746, 746, 755, 868, 868, 746, 748, 746, 755, 885, + 746, 868, 791, 125, 472, 312, 367, 489, 868, 171, + 746, 746, 746, 746, 492, 746, 159, 145, 746, 746, + 720, 729, 730, 30, 868, 868, 868, 730, 364, 775, + 775, 775, 799, 801, 773, 728, 293, 195, 532, 76, + 737, 728, 728, 746, 383, 773, 728, 773, 728, 722, + 728, 728, 728, 773, 728, 748, 358, 728, 654, 517, + 46, 728, 6, 886, 887, 680, 890, 878, 891, 947, + 892, 897, 1019, 909, 884, 903, 950, 876, 875, 739, + 568, 632, 779, 732, 867, 741, 741, 741, 865, 741, + 741, 741, 741, 741, 741, 741, 741, 568, 790, 785, + 769, 751, 917, 641, 647, 978, 725, 1032, 718, 1018, + 914, 980, 904, 731, 649, 955, 918, 1031, 984, 919, + 923, 957, 981, 802, 982, 1033, 745, 1034, 1035, 850, + 927, 1021, 741, 886, 897, 884, 903, 876, 875, 723, + 721, 711, 717, 710, 709, 690, 700, 727, 983, 860, + 784, 857, 925, 866, 568, 858, 951, 949, 958, 959, + 1017, 762, 736, 862, 1036, 933, 939, 940, 1022, 986, + 795, 952, 847, 961, 763, 1037, 968, 969, 970, 971, + 1038, 1025, 1026, 1027, 804, 735, 895, 760, 1039, 496, + 756, 758, 768, 946, 544, 912, 1028, 1040, 1041, 972, + 973, 976, 1042, 905, 812, 953, 757, 954, 931, 813, + 816, 559, 767, 987, 742, 743, 761, 589, 601, 1043, + 1044, 1045, 908, 734, 744, 819, 822, 988, 682, 991, + 1046, 613, 831, 681, 1047, 979, 688, 691, 749, 1029, + 780, 765, 747, 944, 738, 833, 1048, 839, 843, 844, + 977, 845, 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, 456, 456, 456, 456, 456, 456, 305, - 305, 305, 305, 0, 0, 305, 0, 0, 0, 456, + 0, 456, 456, 456, 456, 456, 456, 305, 305, 305, + 305, 0, 0, 305, 0, 0, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, @@ -722,42 +725,42 @@ class Php8 extends \PhpParser\ParserAbstract 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 289, 289, 289, 289, 289, 289, + 456, 456, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 0, 0, + 289, 289, 289, 289, 289, 289, 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, 289, 289, 289, 289, 289, 289, + 0, 0, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 64, 64, 289, 289, 64, 0, 289, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 289, 289, 289, - 289, 289, 289, 289, 803, 161, 161, 161, 161, 64, - 64, 64, 64, 64, 231, 231, 161, 64, 237, 64, - 64, 64, 64, 64, 64, 0, 0, 64, 64, 64, - 64, 64, 0, 0, 295, 502, 0, 756, 756, 756, - 756, 0, 0, 0, 0, 502, 502, 0, 0, 0, - 0, 0, 0, 0, 161, 161, 0, 295, 502, 0, - 295, 0, 756, 756, 64, 803, 803, 464, 237, 64, - 0, 0, 0, 0, 295, 756, 295, 610, 502, 610, - 610, 142, 33, 464, 625, 625, 625, 625, 0, 630, - 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, - 803, 756, 0, 803, 0, 756, 756, 756, 0, 0, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 494, + 494, 289, 289, 494, 0, 289, 494, 494, 494, 494, + 494, 494, 494, 494, 494, 289, 289, 289, 289, 289, + 289, 289, 791, 161, 161, 161, 161, 494, 494, 494, + 494, 494, 231, 231, 161, 494, 494, 494, 494, 237, + 494, 494, 494, 494, 494, 494, 0, 0, 494, 494, + 494, 494, 0, 0, 294, 506, 494, 748, 748, 748, + 748, 494, 494, 494, 494, 506, 506, 494, 494, 494, + 0, 0, 0, 0, 161, 161, 0, 294, 506, 0, + 294, 0, 748, 748, 494, 791, 791, 505, 237, 494, + 0, 0, 0, 0, 294, 748, 294, 515, 506, 515, + 515, 142, 51, 505, 573, 573, 573, 573, 0, 603, + 791, 791, 791, 791, 791, 791, 791, 791, 791, 791, + 791, 748, 0, 791, 0, 748, 748, 748, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 756, 0, 0, 865, 0, 0, 0, - 0, 757, 0, 0, 0, 0, 0, 0, 757, 876, - 0, 0, 0, 0, 0, 0, 756, 0, 0, 0, - 0, 0, 0, 0, 0, 761, 787, 0, 787, 0, - 761, 761, 761 + 0, 0, 0, 748, 0, 0, 868, 0, 0, 0, + 0, 746, 0, 0, 0, 0, 0, 0, 746, 885, + 0, 0, 0, 0, 0, 0, 748, 0, 0, 0, + 0, 0, 0, 0, 0, 741, 762, 0, 762, 0, + 741, 741, 741, 0, 0, 0, 0, 767, 682 ); protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 583, 583, 583, - 583,32767,32767, 250, 103,32767,32767, 459, 376, 376, - 376,32767,32767, 527, 527, 527, 527, 527, 527,32767, - 32767,32767,32767,32767,32767, 459,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 589, 589, 589, + 589,32767,32767, 250, 103,32767,32767, 465, 382, 382, + 382,32767,32767, 533, 533, 533, 533, 533, 533,32767, + 32767,32767,32767,32767,32767, 465,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, @@ -765,127 +768,131 @@ class Php8 extends \PhpParser\ParserAbstract 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, 101,32767, - 32767,32767, 37, 7, 8, 10, 11, 50, 17, 314, + 32767,32767, 37, 7, 8, 10, 11, 50, 17, 320, 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 576,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 582,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 463, 442, 443, 445, - 446, 375, 528, 582, 317, 579, 374, 146, 329, 319, - 238, 320, 254, 464, 255, 465, 468, 469, 211, 283, - 371, 150, 406, 460, 408, 458, 462, 407, 381, 387, - 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, - 398, 399, 379, 380, 461, 439, 438, 437, 404,32767, - 32767, 405, 409,32767, 378, 412,32767,32767,32767,32767, - 32767,32767,32767, 103,32767, 410, 411, 428, 429, 426, - 427, 430,32767, 431, 432, 433, 434,32767,32767, 306, - 32767,32767, 355, 353, 413, 306,32767,32767,32767,32767, - 32767,32767,32767, 419, 420,32767,32767,32767,32767,32767, - 521, 436,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 103,32767, 101, 523, 401, - 403, 491, 414, 415, 382,32767, 498,32767, 103, 500, - 32767,32767,32767, 112,32767,32767,32767,32767, 522,32767, - 529, 529,32767, 484, 101, 194,32767, 194, 194,32767, - 32767,32767,32767,32767,32767,32767, 590, 484, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111,32767, - 194, 111,32767,32767,32767, 101, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 189,32767, 264, 266, - 103, 544, 194,32767, 503,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 496,32767,32767, + 32767,32767,32767,32767,32767,32767, 469, 448, 449, 451, + 452, 381, 534, 588, 323, 585, 380, 146, 335, 325, + 238, 326, 254, 470, 255, 471, 474, 475, 211, 283, + 377, 150, 412, 466, 414, 464, 468, 413, 387, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, + 404, 405, 385, 386, 467, 445, 444, 443, 410,32767, + 32767, 411, 415,32767, 384, 418,32767,32767,32767,32767, + 32767,32767,32767, 103,32767, 416, 417, 434, 435, 432, + 433, 436,32767, 437, 438, 439, 440,32767, 312,32767, + 32767,32767, 361, 359, 419, 312,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 425, 426,32767,32767, + 32767,32767, 527, 442,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 103,32767, 101, + 529, 407, 409, 497, 420, 421, 388,32767, 504,32767, + 103, 506,32767,32767,32767, 112,32767,32767,32767,32767, + 528,32767, 535, 535,32767, 490, 101, 194,32767, 194, + 194,32767,32767,32767,32767,32767,32767,32767, 596, 490, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, + 111,32767, 194, 111,32767,32767,32767, 101, 194, 194, + 194, 194, 194, 194, 194, 194, 194, 194, 189,32767, + 264, 266, 103, 550, 194,32767, 509,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 502, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 484, 424, 139,32767, 139, 529, 416, 417, - 418, 486, 529, 529, 529, 302, 285,32767,32767,32767, - 32767, 501, 501, 101, 101, 101, 101, 496,32767,32767, - 112, 100, 100, 100, 100, 100, 104, 102,32767,32767, - 32767,32767, 100,32767, 102, 102,32767,32767, 221, 208, - 219, 102,32767, 548, 549, 219, 102, 223, 223, 223, - 243, 243, 475, 308, 102, 100, 102, 102, 196, 308, - 308,32767, 102, 475, 308, 475, 308, 198, 308, 308, - 308, 475, 308,32767, 102, 308, 210, 100, 100, 308, - 32767,32767,32767, 486,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 516, - 32767, 533, 546, 422, 423, 425, 531, 447, 448, 449, - 450, 451, 452, 453, 455, 578,32767, 490,32767,32767, - 32767,32767, 328,32767, 588,32767, 588,32767,32767,32767, + 32767,32767,32767,32767, 490, 430, 139,32767, 139, 535, + 422, 423, 424, 492, 535, 535, 535, 308, 285,32767, + 32767,32767,32767, 507, 507, 101, 101, 101, 101, 502, + 32767,32767, 112, 100, 100, 100, 100, 100, 104, 102, + 32767,32767,32767,32767, 100,32767, 102, 102,32767,32767, + 221, 208, 219, 102,32767, 554, 555, 219, 102, 223, + 223, 223, 243, 243, 481, 314, 102, 100, 102, 102, + 196, 314, 314,32767, 102, 481, 314, 481, 314, 198, + 314, 314, 314, 481, 314,32767, 102, 314, 210, 100, + 100, 314,32767,32767,32767, 492,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 589,32767, 529,32767,32767,32767,32767, - 421, 9, 76, 43, 44, 52, 58, 507, 508, 509, - 510, 504, 505, 511, 506,32767,32767, 512, 554,32767, - 32767, 530, 581,32767,32767,32767,32767,32767,32767, 139, + 32767, 522,32767, 539, 552, 428, 429, 431, 537, 453, + 454, 455, 456, 457, 458, 459, 461, 584,32767, 496, + 32767,32767,32767,32767, 334,32767, 594,32767, 594,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 516,32767, 137,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 529,32767,32767,32767, 304, 305, + 32767,32767,32767,32767,32767, 595,32767, 535,32767,32767, + 32767,32767, 427, 9, 76, 43, 44, 52, 58, 513, + 514, 515, 516, 510, 511, 517, 512,32767,32767, 518, + 560,32767,32767, 536, 587,32767,32767,32767,32767,32767, + 32767, 139,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 522,32767, 137,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 535,32767,32767,32767, + 32767, 310, 307,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 535,32767, + 32767,32767,32767,32767, 287,32767, 304,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 529,32767,32767,32767, 287, - 288,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 282,32767,32767, 370,32767, - 32767,32767,32767, 349,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 152, 152, 3, 3, 331, 152, - 152, 152, 331, 152, 331, 331, 331, 152, 152, 152, - 152, 152, 152, 276, 184, 258, 261, 243, 243, 152, - 341, 152 + 32767,32767,32767, 282,32767,32767, 376,32767,32767,32767, + 32767, 355,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 152, 152, 3, 3, 337, 152, 152, 152, + 337, 152, 337, 337, 337, 152, 152, 152, 152, 152, + 152, 276, 184, 258, 261, 243, 243, 152, 347, 152 ); protected $goto = array( - 194, 194, 672, 423, 645, 1028, 343, 314, 608, 642, - 417, 309, 310, 330, 565, 422, 331, 424, 624, 639, - 680, 653, 654, 655, 588, 826, 165, 165, 165, 165, + 194, 194, 680, 425, 648, 1311, 1311, 316, 610, 645, + 419, 311, 312, 332, 567, 424, 333, 426, 626, 1042, + 688, 1311, 325, 325, 325, 325, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 523, 524, 413, 525, - 527, 528, 529, 530, 531, 532, 533, 534, 1098, 166, + 188, 189, 190, 215, 213, 216, 525, 526, 415, 527, + 529, 530, 531, 532, 533, 534, 535, 536, 1112, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, 176, 212, 214, 217, 235, 238, 241, 242, 245, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, - 274, 283, 284, 312, 313, 418, 419, 420, 570, 219, + 274, 286, 287, 314, 315, 420, 421, 422, 572, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1098, 199, 180, + 236, 186, 187, 188, 189, 190, 215, 1112, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 323, 323, 323, 323, 829, 346, 1069, 1070, 251, - 251, 610, 610, 842, 827, 1228, 346, 346, 1228, 1228, - 1228, 1228, 1228, 1228, 1228, 1228, 1228, 803, 854, 346, - 346, 841, 346, 860, 1313, 249, 249, 249, 249, 243, - 252, 387, 391, 549, 589, 593, 542, 801, 834, 346, - 882, 877, 878, 891, 944, 835, 879, 832, 880, 881, - 833, 562, 587, 1062, 885, 683, 669, 669, 807, 496, - 675, 1060, 1273, 1274, 1049, 1045, 1046, 1246, 1246, 822, - 822, 1246, 344, 345, 1246, 1246, 1246, 1246, 1246, 1246, - 1246, 1246, 1246, 341, 1257, 921, 998, 1006, 1010, 1007, - 1011, 1197, 1197, 1003, 1197, 1003, 319, 304, 807, 1003, - 807, 1003, 1003, 1003, 1003, 1003, 1003, 665, 1286, 1003, - 1003, 1003, 1003, 1003, 1268, 1268, 965, 1268, 1197, 276, - 276, 276, 276, 1197, 1197, 1197, 1197, 548, 540, 1197, - 1197, 1197, 1278, 1278, 1278, 1278, 385, 542, 455, 455, - 620, 621, 1280, 1280, 1280, 1280, 898, 455, 1178, 914, - 560, 899, 1179, 1182, 915, 1183, 389, 540, 548, 557, - 558, 396, 568, 590, 604, 605, 488, 1264, 489, 1244, - 1244, 644, 15, 1244, 495, 1095, 1244, 1244, 1244, 1244, - 1244, 1244, 1244, 1244, 1244, 1147, 822, 464, 1271, 1272, - 526, 526, 1296, 1296, 526, 430, 1192, 526, 526, 526, - 526, 526, 526, 526, 526, 526, 1036, 886, 1296, 887, - 1266, 1266, 1036, 537, 537, 555, 537, 566, 602, 706, - 623, 625, 416, 643, 599, 1299, 554, 662, 666, 979, - 670, 678, 975, 603, 936, 403, 679, 254, 254, 332, - 446, 1297, 1297, 847, 819, 938, 938, 938, 938, 927, - 440, 446, 932, 939, 395, 440, 440, 1297, 5, 1190, - 6, 903, 1085, 844, 987, 541, 552, 1034, 607, 709, - 541, 465, 552, 984, 856, 388, 1038, 469, 949, 0, - 1080, 846, 825, 648, 963, 569, 458, 459, 460, 840, - 852, 0, 0, 1304, 1305, 968, 942, 942, 940, 942, - 705, 1189, 539, 977, 972, 0, 401, 402, 0, 0, - 0, 651, 1193, 652, 0, 405, 406, 407, 850, 663, - 0, 0, 408, 0, 0, 0, 339, 535, 535, 535, - 535, 0, 592, 0, 0, 0, 440, 440, 440, 440, - 440, 440, 440, 440, 440, 440, 440, 0, 0, 440, - 597, 611, 614, 615, 616, 617, 636, 637, 638, 682, - 855, 843, 1033, 1037, 0, 0, 0, 1194, 0, 425, - 947, 0, 0, 0, 817, 425, 0, 0, 272, 0, - 0, 0, 0, 538, 538, 1015, 1008, 1012, 1009, 1013, - 1195, 1254, 1255, 937, 0, 0, 0, 0, 0, 0, + 211, 837, 590, 612, 612, 550, 542, 1242, 833, 345, + 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1083, + 1084, 976, 950, 950, 948, 950, 713, 815, 541, 985, + 980, 830, 830, 834, 391, 542, 550, 559, 560, 398, + 570, 592, 606, 607, 842, 835, 890, 885, 886, 899, + 15, 843, 887, 840, 888, 889, 841, 1192, 922, 811, + 893, 1193, 1196, 923, 1197, 251, 251, 815, 868, 815, + 1063, 1059, 1060, 809, 1260, 1260, 952, 1207, 1260, 1017, + 1016, 1260, 1260, 1260, 1260, 1260, 1260, 1260, 1260, 1260, + 564, 249, 249, 249, 249, 243, 252, 343, 457, 457, + 1300, 1211, 1011, 1211, 1011, 1211, 894, 457, 895, 1011, + 1011, 1011, 1011, 973, 1011, 1011, 1011, 1011, 1011, 1011, + 562, 442, 1011, 1011, 1011, 1011, 442, 418, 442, 601, + 1211, 5, 1208, 6, 387, 1211, 1211, 1211, 1211, 825, + 647, 1211, 1211, 1211, 1292, 1292, 1292, 1292, 830, 348, + 1109, 863, 851, 1047, 1051, 1209, 1268, 1269, 906, 348, + 348, 955, 1161, 907, 279, 279, 279, 279, 428, 1310, + 1310, 432, 348, 348, 653, 348, 668, 1327, 929, 321, + 306, 1006, 1022, 1023, 945, 1310, 1258, 1258, 669, 544, + 1258, 334, 348, 1258, 1258, 1258, 1258, 1258, 1258, 1258, + 1258, 1258, 1313, 466, 1285, 1286, 1092, 867, 850, 442, + 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, + 528, 528, 442, 862, 528, 827, 849, 528, 528, 528, + 528, 528, 528, 528, 528, 528, 855, 1271, 556, 539, + 935, 539, 557, 539, 852, 605, 714, 625, 627, 397, + 646, 346, 347, 995, 670, 674, 987, 678, 686, 983, + 673, 1204, 1282, 467, 1282, 717, 1282, 642, 448, 659, + 660, 661, 864, 946, 946, 946, 946, 543, 554, 448, + 940, 947, 543, 490, 554, 491, 1048, 390, 1020, 1021, + 544, 497, 1294, 1294, 1294, 1294, 1052, 571, 460, 461, + 462, 0, 860, 254, 254, 1318, 1319, 1287, 1288, 403, + 404, 944, 405, 687, 657, 957, 658, 1278, 407, 408, + 409, 1094, 671, 622, 623, 410, 568, 604, 0, 341, + 858, 599, 613, 616, 617, 618, 619, 639, 640, 641, + 690, 471, 0, 911, 1099, 0, 0, 0, 0, 1206, + 609, 0, 0, 0, 0, 992, 1050, 0, 0, 0, + 1280, 1280, 1050, 854, 0, 651, 971, 427, 0, 0, + 0, 848, 0, 0, 427, 389, 393, 551, 591, 595, + 1018, 1018, 0, 1203, 0, 0, 0, 652, 1029, 1025, + 1026, 589, 1076, 0, 691, 677, 677, 0, 498, 683, + 1074, 537, 537, 537, 537, 0, 594, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 272, 0, 0, 0, 0, 540, 0, + 540, 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, 1078, 859, 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, @@ -897,14 +904,16 @@ class Php8 extends \PhpParser\ParserAbstract 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, 982, - 982 + 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, 990, 990 ); protected $gotoCheck = array( - 42, 42, 72, 65, 65, 121, 95, 65, 55, 55, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 84, - 9, 84, 84, 84, 124, 26, 42, 42, 42, 42, + 42, 42, 72, 65, 65, 179, 179, 65, 55, 55, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 125, + 9, 179, 23, 23, 23, 23, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -918,49 +927,51 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 23, 23, 23, 23, 15, 14, 138, 138, 5, - 5, 106, 106, 35, 27, 106, 14, 14, 106, 106, - 106, 106, 106, 106, 106, 106, 106, 7, 35, 14, - 14, 35, 14, 45, 14, 5, 5, 5, 5, 5, - 5, 58, 58, 58, 58, 58, 14, 6, 15, 14, - 15, 15, 15, 15, 49, 15, 15, 15, 15, 15, - 15, 164, 8, 8, 15, 8, 8, 8, 12, 8, - 8, 8, 170, 170, 15, 15, 15, 162, 162, 22, - 22, 162, 95, 95, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 171, 14, 87, 87, 87, 87, 87, - 87, 72, 72, 72, 72, 72, 161, 161, 12, 72, - 12, 72, 72, 72, 72, 72, 72, 14, 173, 72, - 72, 72, 72, 72, 124, 124, 101, 124, 72, 24, - 24, 24, 24, 72, 72, 72, 72, 75, 75, 72, - 72, 72, 9, 9, 9, 9, 61, 14, 143, 143, - 83, 83, 124, 124, 124, 124, 72, 143, 78, 78, - 102, 72, 78, 78, 78, 78, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 149, 124, 149, 163, - 163, 63, 75, 163, 149, 144, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 145, 22, 168, 168, 168, - 165, 165, 174, 174, 165, 111, 14, 165, 165, 165, - 165, 165, 165, 165, 165, 165, 124, 64, 174, 64, - 124, 124, 124, 19, 19, 48, 19, 2, 2, 48, - 48, 48, 13, 48, 13, 174, 9, 48, 48, 48, - 48, 48, 48, 9, 91, 91, 91, 5, 5, 29, - 19, 175, 175, 39, 18, 19, 19, 19, 19, 90, - 23, 19, 19, 19, 28, 23, 23, 175, 46, 154, - 46, 17, 17, 37, 108, 9, 9, 123, 17, 97, - 9, 151, 9, 17, 41, 9, 126, 82, 94, -1, - 141, 17, 25, 17, 17, 9, 9, 9, 9, 17, - 9, -1, -1, 9, 9, 25, 25, 25, 25, 25, - 25, 17, 25, 25, 25, -1, 80, 80, -1, -1, - -1, 80, 20, 80, -1, 80, 80, 80, 9, 80, - -1, -1, 80, -1, -1, -1, 80, 105, 105, 105, - 105, -1, 105, -1, -1, -1, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, -1, -1, 23, - 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 16, 16, 16, 16, -1, -1, -1, 20, -1, 115, - 16, -1, -1, -1, 20, 115, -1, -1, 24, -1, - -1, -1, -1, 24, 24, 115, 115, 115, 115, 115, - 20, 20, 20, 16, -1, -1, -1, -1, -1, -1, + 42, 15, 128, 106, 106, 75, 75, 106, 25, 95, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 142, + 142, 25, 25, 25, 25, 25, 25, 12, 25, 25, + 25, 22, 22, 26, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 15, 27, 15, 15, 15, 15, + 75, 15, 15, 15, 15, 15, 15, 78, 78, 7, + 15, 78, 78, 78, 78, 5, 5, 12, 45, 12, + 15, 15, 15, 6, 166, 166, 49, 20, 166, 116, + 116, 166, 166, 166, 166, 166, 166, 166, 166, 166, + 168, 5, 5, 5, 5, 5, 5, 175, 147, 147, + 177, 72, 72, 72, 72, 72, 64, 147, 64, 72, + 72, 72, 72, 101, 72, 72, 72, 72, 72, 72, + 102, 23, 72, 72, 72, 72, 23, 13, 23, 13, + 72, 46, 20, 46, 61, 72, 72, 72, 72, 20, + 63, 72, 72, 72, 9, 9, 9, 9, 22, 14, + 148, 16, 16, 16, 16, 20, 20, 20, 72, 14, + 14, 16, 149, 72, 24, 24, 24, 24, 87, 178, + 178, 111, 14, 14, 118, 14, 87, 14, 87, 165, + 165, 87, 87, 87, 16, 178, 167, 167, 114, 14, + 167, 29, 14, 167, 167, 167, 167, 167, 167, 167, + 167, 167, 178, 172, 172, 172, 16, 16, 35, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 169, 169, 23, 35, 169, 18, 35, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 39, 14, 9, 19, + 90, 19, 48, 19, 37, 9, 48, 48, 48, 28, + 48, 95, 95, 108, 48, 48, 48, 48, 48, 48, + 14, 158, 128, 155, 128, 97, 128, 84, 19, 84, + 84, 84, 41, 19, 19, 19, 19, 9, 9, 19, + 19, 19, 9, 153, 9, 153, 127, 9, 117, 117, + 14, 153, 128, 128, 128, 128, 130, 9, 9, 9, + 9, -1, 9, 5, 5, 9, 9, 174, 174, 80, + 80, 91, 91, 91, 80, 94, 80, 128, 80, 80, + 80, 145, 80, 83, 83, 80, 2, 2, -1, 80, + 9, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 82, -1, 17, 17, -1, -1, -1, -1, 14, + 17, -1, -1, -1, -1, 17, 128, -1, -1, -1, + 128, 128, 128, 17, -1, 17, 17, 115, -1, -1, + -1, 17, -1, -1, 115, 58, 58, 58, 58, 58, + 115, 115, -1, 17, -1, -1, -1, 115, 115, 115, + 115, 8, 8, -1, 8, 8, 8, -1, 8, 8, + 8, 105, 105, 105, 105, -1, 105, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 24, -1, -1, -1, -1, 24, -1, + 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 16, 16, -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, @@ -972,50 +983,56 @@ class Php8 extends \PhpParser\ParserAbstract -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, 105, - 105 + -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, 105, 105 ); protected $gotoBase = array( - 0, 0, -299, 0, 0, 168, 194, 178, 215, 7, - 0, 0, -64, 60, -127, -175, 88, -23, 109, 116, - 98, 0, -84, 158, 286, 448, 21, 170, 92, 117, - 0, 0, 0, 0, 0, -189, 0, 99, 0, 95, - 0, 11, -1, 0, 0, 181, -281, 0, -300, 191, - 0, 0, 0, 0, 0, -31, 0, 0, 157, 0, - 0, 265, 0, 101, 358, -236, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -40, 0, 0, -83, 171, - -3, 0, -18, -158, -673, 0, 0, -22, 0, 0, - 93, 104, 0, 0, 13, -465, 0, 39, 0, 0, - 0, 252, 278, 0, 0, 470, -68, 0, 73, 0, - 0, 90, 0, 0, 0, 270, 0, 0, 0, 0, - 0, 3, 0, 72, 17, 0, 12, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -105, 0, - 0, 14, 0, 275, 102, 85, 0, 0, 0, -147, - 0, 9, 0, 0, 69, 0, 0, 0, 0, 0, - 0, -50, -2, 100, 193, 121, 0, 0, 61, 0, - -131, 224, 0, 248, 59, 108, 0, 0 + 0, 0, -208, 0, 0, 224, 220, 210, 544, 7, + 0, 0, -107, -47, 14, -181, -133, 47, 78, 132, + -149, 0, -134, 19, 321, 164, 189, 201, 75, 57, + 0, 0, 0, 0, 0, 4, 0, 68, 0, 76, + 0, -3, -1, 0, 0, 216, -426, 0, -291, 213, + 0, 0, 0, 0, 0, -31, 0, 0, 491, 0, + 0, 253, 0, 60, 247, -236, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -174, 0, 0, -186, 140, + -12, 0, 34, 13, -273, 0, 0, 58, 0, 0, + 72, 169, 0, 0, 38, -304, 0, 23, 0, 0, + 0, 239, 238, 0, 0, 534, -76, 0, 50, 0, + 0, 56, 0, 0, 70, 259, -37, 167, 46, 0, + 0, 0, 0, 0, 0, 17, 0, 79, 155, 0, + 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, -93, 0, 0, 43, 0, 225, 67, 51, + 0, 0, 0, -42, 0, -11, 0, 0, 59, 0, + 0, 0, 0, 0, 0, 21, -5, 107, 222, 141, + 0, 0, 65, 0, 102, 228, 0, 230, 24, -300, + 0, 0 ); protected $gotoDefault = array( - -32768, 500, 713, 4, 714, 907, 790, 799, 585, 517, - 681, 340, 612, 414, 1262, 884, 1084, 567, 818, 1206, - 1214, 447, 821, 324, 703, 866, 867, 868, 392, 377, - 383, 390, 634, 613, 482, 853, 443, 845, 474, 848, - 442, 857, 162, 411, 498, 861, 3, 863, 545, 894, - 378, 871, 379, 658, 873, 551, 875, 876, 386, 393, - 394, 1089, 559, 609, 888, 244, 553, 889, 376, 890, - 897, 381, 384, 667, 454, 493, 487, 404, 1064, 596, - 631, 451, 468, 619, 618, 606, 467, 426, 409, 326, - 926, 934, 475, 452, 948, 342, 956, 711, 1097, 626, - 477, 964, 627, 971, 974, 518, 519, 466, 986, 269, - 989, 478, 1021, 649, 650, 1001, 628, 629, 1019, 461, - 586, 1027, 444, 1035, 1250, 445, 1039, 262, 1042, 275, - 410, 427, 1047, 1048, 8, 1054, 673, 674, 10, 273, - 497, 1079, 668, 441, 1096, 431, 1166, 1168, 547, 479, - 1186, 1185, 661, 494, 1191, 1253, 439, 520, 462, 311, - 521, 303, 328, 308, 536, 290, 329, 522, 463, 1259, - 1267, 325, 30, 1287, 1298, 336, 564, 601 + -32768, 502, 721, 4, 722, 915, 798, 807, 587, 519, + 689, 342, 614, 416, 1276, 892, 1098, 569, 826, 1220, + 1228, 449, 829, 326, 711, 874, 875, 876, 394, 379, + 385, 392, 637, 615, 484, 861, 445, 853, 476, 856, + 444, 865, 162, 413, 500, 869, 3, 871, 547, 902, + 380, 879, 381, 664, 881, 553, 883, 884, 388, 395, + 396, 1103, 561, 611, 896, 244, 555, 897, 378, 898, + 905, 383, 386, 675, 456, 495, 489, 406, 1078, 598, + 634, 453, 470, 621, 620, 608, 469, 1014, 411, 328, + 934, 942, 477, 454, 956, 344, 964, 719, 1111, 628, + 479, 972, 629, 979, 982, 520, 521, 468, 994, 268, + 997, 480, 1035, 654, 1008, 1009, 655, 630, 1031, 631, + 656, 632, 1033, 463, 588, 1041, 446, 1049, 1264, 447, + 1053, 262, 1056, 275, 412, 429, 1061, 1062, 8, 1068, + 681, 682, 10, 273, 499, 1093, 676, 443, 1110, 433, + 1180, 1182, 549, 481, 1200, 1199, 667, 496, 1205, 1267, + 441, 522, 464, 313, 523, 305, 330, 310, 538, 292, + 331, 524, 465, 1273, 1281, 327, 30, 1301, 1312, 338, + 566, 603 ); protected $ruleToNonTerminal = array( @@ -1048,16 +1065,16 @@ class Php8 extends \PhpParser\ParserAbstract 103, 52, 52, 104, 51, 51, 53, 53, 63, 63, 63, 63, 79, 79, 107, 107, 109, 109, 110, 110, 110, 110, 108, 108, 108, 112, 112, 112, 112, 87, - 87, 115, 115, 115, 113, 113, 116, 116, 114, 114, - 117, 117, 118, 118, 118, 118, 111, 111, 80, 80, - 80, 20, 20, 20, 120, 119, 119, 121, 121, 121, - 121, 59, 122, 122, 123, 60, 125, 125, 126, 126, - 127, 127, 84, 128, 128, 128, 128, 128, 128, 133, - 133, 134, 134, 135, 135, 135, 135, 135, 136, 137, - 137, 132, 132, 129, 129, 131, 131, 139, 139, 138, - 138, 138, 138, 138, 138, 138, 130, 140, 140, 142, - 141, 141, 61, 102, 143, 143, 55, 55, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 87, 115, 115, 115, 116, 116, 113, 113, 117, 117, + 119, 119, 120, 120, 114, 121, 121, 118, 122, 122, + 122, 122, 111, 111, 80, 80, 80, 20, 20, 20, + 124, 123, 123, 125, 125, 125, 125, 59, 126, 126, + 127, 60, 129, 129, 130, 130, 131, 131, 84, 132, + 132, 132, 132, 132, 132, 137, 137, 138, 138, 139, + 139, 139, 139, 139, 140, 141, 141, 136, 136, 133, + 133, 135, 135, 143, 143, 142, 142, 142, 142, 142, + 142, 142, 134, 144, 144, 146, 145, 145, 61, 102, + 147, 147, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1066,20 +1083,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 150, 144, 144, 149, 149, 152, 153, 153, - 154, 155, 155, 155, 19, 19, 72, 72, 72, 72, - 145, 145, 145, 145, 157, 157, 146, 146, 148, 148, - 148, 151, 151, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 163, 163, 106, 165, 165, 165, 165, 147, - 147, 147, 147, 147, 147, 147, 147, 58, 58, 160, - 160, 160, 160, 166, 166, 156, 156, 156, 167, 167, - 167, 167, 167, 167, 73, 73, 65, 65, 65, 65, - 124, 124, 124, 124, 170, 169, 159, 159, 159, 159, - 159, 159, 159, 158, 158, 158, 168, 168, 168, 168, - 105, 164, 172, 172, 171, 171, 173, 173, 173, 173, - 173, 173, 173, 173, 161, 161, 161, 161, 175, 176, - 174, 174, 174, 174, 174, 174, 174, 174, 177, 177, - 177, 177 + 42, 42, 42, 42, 42, 42, 42, 42, 154, 148, + 148, 153, 153, 156, 157, 157, 158, 159, 159, 159, + 19, 19, 72, 72, 72, 72, 149, 149, 149, 149, + 161, 161, 150, 150, 152, 152, 152, 155, 155, 166, + 166, 166, 166, 166, 166, 166, 166, 166, 167, 167, + 106, 169, 169, 169, 169, 151, 151, 151, 151, 151, + 151, 151, 151, 58, 58, 164, 164, 164, 164, 170, + 170, 160, 160, 160, 171, 171, 171, 171, 171, 171, + 73, 73, 65, 65, 65, 65, 128, 128, 128, 128, + 174, 173, 163, 163, 163, 163, 163, 163, 163, 162, + 162, 162, 172, 172, 172, 172, 105, 168, 176, 176, + 175, 175, 177, 177, 177, 177, 177, 177, 177, 177, + 165, 165, 165, 165, 179, 180, 178, 178, 178, 178, + 178, 178, 178, 178, 181, 181, 181, 181 ); protected $ruleToLength = array( @@ -1112,38 +1129,38 @@ class Php8 extends \PhpParser\ParserAbstract 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, - 3, 3, 1, 2, 1, 1, 0, 1, 0, 2, - 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, - 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, - 2, 0, 1, 5, 5, 10, 3, 5, 1, 1, - 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, - 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, - 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, - 3, 3, 4, 4, 1, 1, 2, 3, 3, 3, + 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, + 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, + 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, + 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, + 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, + 5, 10, 3, 5, 1, 1, 3, 0, 2, 4, + 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, + 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 2, 1, 3, 1, 1, 3, 2, 2, + 3, 1, 0, 1, 1, 3, 3, 3, 4, 4, + 1, 1, 2, 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, - 2, 2, 2, 2, 3, 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, 2, 8, 9, 8, 9, 9, 10, - 9, 10, 8, 3, 2, 0, 4, 2, 1, 3, - 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 3, 3, 4, 1, 1, 3, 1, - 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, - 3, 1, 1, 1, 1, 1, 3, 1, 1, 4, - 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, - 1, 4, 2, 2, 1, 3, 1, 4, 4, 3, - 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, - 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, - 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, - 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, - 2, 1 + 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, 2, + 8, 9, 8, 9, 9, 10, 9, 10, 8, 3, + 2, 0, 4, 2, 1, 3, 2, 2, 2, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, + 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, + 1, 1, 3, 1, 1, 4, 4, 1, 4, 4, + 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, + 1, 3, 1, 4, 4, 3, 3, 3, 3, 1, + 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, + 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, + 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, + 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks() { @@ -2043,7 +2060,7 @@ protected function initReduceCallbacks() { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 288 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 289 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2061,10 +2078,10 @@ protected function initReduceCallbacks() { $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 294 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 295 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 296 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -2073,10 +2090,10 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 298 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 299 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 300 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -2085,698 +2102,698 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 302 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 303 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 304 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 305 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 306 => function ($stackPos) { - $this->semValue = null; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 307 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 308 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 309 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 310 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 311 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 312 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = null; }, 313 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 314 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = null; }, 315 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 316 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = null; }, 317 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 318 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 319 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, 320 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 321 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 322 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 323 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 325 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 326 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 327 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 328 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 329 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 330 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 331 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 332 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 333 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); - $this->checkProperty($this->semValue, $stackPos-(5-2)); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 334 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); - $this->checkClassConst($this->semValue, $stackPos-(5-2)); + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 335 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 336 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, 337 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = array(); }, 338 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 339 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); + $this->checkProperty($this->semValue, $stackPos-(5-2)); }, 340 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); + $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, 341 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, 342 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 343 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 344 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = null; /* will be skipped */ }, 345 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 346 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 347 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 348 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 349 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 350 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 351 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 352 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 353 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 354 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 355 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 356 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 357 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 358 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 359 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 360 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = 0; }, 361 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = 0; }, 362 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 363 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 364 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 365 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 366 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 367 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 368 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, 369 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 370 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 371 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = Stmt\Class_::MODIFIER_READONLY; }, 372 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 373 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 374 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 375 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 379 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 380 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 381 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 382 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 383 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - if (!$this->phpVersion->allowsAssignNewByReference()) { - $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); - } - + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 384 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 385 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 386 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 387 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 388 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 389 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + if (!$this->phpVersion->allowsAssignNewByReference()) { + $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); + } + }, 390 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 391 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 392 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 393 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 394 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 395 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 396 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 397 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 404 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 405 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 406 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 410 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 411 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 422 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 423 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 424 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 425 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 432 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 433 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 434 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 435 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 436 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 437 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 438 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 439 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 440 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 441 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 442 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 443 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 444 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 445 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 446 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 447 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 448 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 449 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 450 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 451 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 452 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 453 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 454 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); + $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); + $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, 455 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 456 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 457 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 458 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 459 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 460 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, 461 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 462 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 463 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 464 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 465 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 466 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 467 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 468 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 469 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 470 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 471 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 472 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 473 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 474 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 475 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 476 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 477 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 478 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->checkClass($this->semValue[0], -1); }, 479 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 480 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 481 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array(); }, 482 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 483 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 484 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 485 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 486 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 487 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 488 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 489 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 490 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 491 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 492 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 493 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 494 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 495 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 496 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 497 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 498 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 499 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 500 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 501 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 502 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 503 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 504 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 505 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 506 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 507 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 508 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 509 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 510 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 511 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 512 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 513 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 514 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 515 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 517 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 518 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 519 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, 520 => function ($stackPos) { - $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, 521 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, 522 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 523 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 524 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); }, 525 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 526 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 527 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 528 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2785,16 +2802,16 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 531 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 533 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 534 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2812,192 +2829,210 @@ protected function initReduceCallbacks() { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 539 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 540 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 542 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 543 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 544 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 545 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 546 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 547 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 548 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 549 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 551 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 552 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 553 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 554 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 555 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 556 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 557 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 558 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 559 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 560 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 561 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 562 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 563 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 565 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 566 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 567 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 568 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 569 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 570 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 571 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 572 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 573 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 574 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 575 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 576 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 577 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, 578 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 579 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 580 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 581 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 582 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 583 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 584 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 585 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 586 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 587 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 588 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 589 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = null; }, 590 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 591 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 592 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 593 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 594 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 595 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 596 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 597 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 598 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 599 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 600 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 601 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 602 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + }, + 603 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 604 => function ($stackPos) { + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 605 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 606 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 607 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 9be63b795a..c193fdd9a4 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -46,7 +46,15 @@ protected function pNullableType(Node\NullableType $node) { } protected function pUnionType(Node\UnionType $node) { - return $this->pImplode($node->types, '|'); + $types = []; + foreach ($node->types as $typeNode) { + if ($typeNode instanceof Node\IntersectionType) { + $types[] = '('. $this->p($typeNode) . ')'; + continue; + } + $types[] = $this->p($typeNode); + } + return implode('|', $types); } protected function pIntersectionType(Node\IntersectionType $node) { diff --git a/test/code/parser/stmt/function/disjointNormalFormTypes.test b/test/code/parser/stmt/function/disjointNormalFormTypes.test new file mode 100644 index 0000000000..a84906cf40 --- /dev/null +++ b/test/code/parser/stmt/function/disjointNormalFormTypes.test @@ -0,0 +1,157 @@ +DNF types +----- + Date: Mon, 8 Aug 2022 21:53:49 +0200 Subject: [PATCH 117/428] [docs] Add generic types to NodeFinder to allow returning exact type in static analysis (#869) --- lib/PhpParser/NodeFinder.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/PhpParser/NodeFinder.php b/lib/PhpParser/NodeFinder.php index 2bb96ed504..fa0c0fa139 100644 --- a/lib/PhpParser/NodeFinder.php +++ b/lib/PhpParser/NodeFinder.php @@ -31,11 +31,13 @@ public function find($nodes, callable $filter) : array { /** * Find all nodes that are instances of a certain class. + + * @template TNode as Node * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param string $class Class name + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param class-string $class Class name * - * @return Node[] Found nodes (all instances of $class) + * @return TNode[] Found nodes (all instances of $class) */ public function findInstanceOf($nodes, string $class) : array { return $this->find($nodes, function ($node) use ($class) { @@ -68,10 +70,12 @@ public function findFirst($nodes, callable $filter): ?Node { /** * Find first node that is an instance of a certain class. * + * @template TNode as Node + * * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param string $class Class name + * @param class-string $class Class name * - * @return null|Node Found node, which is an instance of $class (or null if none found) + * @return null|TNode Found node, which is an instance of $class (or null if none found) */ public function findFirstInstanceOf($nodes, string $class): ?Node { return $this->findFirst($nodes, function ($node) use ($class) { From f828b769726b4e13f1f8a90bc26a86931f563590 Mon Sep 17 00:00:00 2001 From: Daniel Schmelz Date: Sat, 20 Aug 2022 17:14:50 +0200 Subject: [PATCH 118/428] Fix typo --- doc/0_Introduction.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/0_Introduction.markdown b/doc/0_Introduction.markdown index b300e733bc..85b22f980a 100644 --- a/doc/0_Introduction.markdown +++ b/doc/0_Introduction.markdown @@ -29,7 +29,7 @@ What can it parse? The parser supports parsing PHP 5.2-8.0, with the following exceptions: * Namespaced names containing whitespace (e.g. `Foo \ Bar` instead of `Foo\Bar`) are not supported. - These are illegal in PHP 8, but are legal in earlier version. However, PHP-Parser does not + These are illegal in PHP 8, but are legal in earlier versions. However, PHP-Parser does not support them for any version. As the parser is based on the tokens returned by `token_get_all` (which is only able to lex the PHP From 53b907d40533c27535a0cf60cc9c38305700ff0e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 28 Aug 2022 14:55:57 +0200 Subject: [PATCH 119/428] Fix length bounds check in Name::slice() The length check did not take into account that there may be a non-zero offset at this point. Fixes #875. --- lib/PhpParser/Node/Name.php | 2 +- test/PhpParser/Node/NameTest.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index 6f23b12e00..cec304eb0d 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -162,7 +162,7 @@ public function slice(int $offset, ?int $length = null) { $realLength = $numParts - $realOffset; } else { $realLength = $length < 0 ? $length + $numParts - $realOffset : $length; - if ($realLength < 0 || $realLength > $numParts) { + if ($realLength < 0 || $realLength > $numParts - $realOffset) { throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length)); } } diff --git a/test/PhpParser/Node/NameTest.php b/test/PhpParser/Node/NameTest.php index 5e69ebba3c..5329e2fb1a 100644 --- a/test/PhpParser/Node/NameTest.php +++ b/test/PhpParser/Node/NameTest.php @@ -73,6 +73,12 @@ public function testSliceLengthTooSmall() { (new Name('foo\bar\baz'))->slice(0, -4); } + public function testSliceLengthTooLargeWithOffset() { + $this->expectException(\OutOfBoundsException::class); + $this->expectExceptionMessage('Length 3 is out of bounds'); + (new Name('foo\bar\baz'))->slice(1, 3); + } + public function testConcat() { $this->assertEquals(new Name('foo\bar\baz'), Name::concat('foo', 'bar\baz')); $this->assertEquals( From 68fc1ba4cb7b0aef9decc4e9d8f3b61eecdd3883 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 28 Aug 2022 18:48:26 +0200 Subject: [PATCH 120/428] Always use List_ node for array destructuring Fixes #471. --- UPGRADE-5.0.md | 12 ++++++++++++ grammar/php.y | 9 ++++++--- lib/PhpParser/Node/Expr/List_.php | 4 ++++ lib/PhpParser/Parser/Php7.php | 6 +++--- lib/PhpParser/Parser/Php8.php | 6 +++--- lib/PhpParser/ParserAbstract.php | 14 ++++++++++++++ lib/PhpParser/PhpVersion.php | 7 +++++++ lib/PhpParser/PrettyPrinter/Standard.php | 8 +++++++- test/PhpParser/ParserTest.php | 9 +++++++++ test/code/parser/expr/arrayDestructuring.test | 14 +++++++------- test/code/parser/expr/listReferences.test | 6 +++--- 11 files changed, 75 insertions(+), 20 deletions(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index bc18c4859e..5bbd524d5f 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -61,6 +61,16 @@ $parser = $factory->create(ParserFactory::ONLY_PHP5); $parser = $factory->createForVersion(PhpVersion::fromString("5.6")); ``` +### Changes to the array destructuring representation + +Previously, the `list($x) = $y` destructuring syntax was represented using a `Node\Expr\List_` +node, while `[$x] = $y` used a `Node\Expr\Array_` node, the same used for the creation (rather than +destructuring) of arrays. + +Now, destructuring is always represented using `Node\Expr\List_`. The `kind` attribute with value +`Node\Expr\List_::KIND_LIST` or `Node\Expr\List_::KIND_ARRAY` specifies which syntax was actually +used. + ### Renamed nodes A number of AST nodes have been renamed or moved in the AST hierarchy: @@ -124,6 +134,8 @@ Backslashes in single-quoted strings are now only printed if they are necessary: The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defaults to PHP 7.0. The pretty printer will make formatting choices to make the code valid for that version. It currently controls the following behavior: * For PHP >= 7.0 (default), short array syntax `[]` will be used by default. This does not affect nodes that specify an explicit array syntax using the `kind` attribute. +* For PHP >= 7.1, the short array syntax `[]` will be used for destructuring by default (instead of + `list()`). This does not affect nodes that specify and explicit syntax using the `kind` attribute. * For PHP >= 7.3, a newline is no longer forced after heredoc/nowdoc strings, as the requirement for this has been removed with the introduction of flexible heredoc/nowdoc strings. ### Changes to token representation diff --git a/grammar/php.y b/grammar/php.y index 357d05dfbe..b7ccbf8354 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -645,7 +645,8 @@ foreach_variable: variable { $$ = array($1, false); } | ampersand variable { $$ = array($2, true); } | list_expr { $$ = array($1, false); } - | array_short_syntax { $$ = array($1, false); } + | array_short_syntax + { $$ = array($this->fixupArrayDestructuring($1), false); } ; parameter_list: @@ -941,7 +942,8 @@ for_expr: expr: variable { $$ = $1; } | list_expr '=' expr { $$ = Expr\Assign[$1, $3]; } - | array_short_syntax '=' expr { $$ = Expr\Assign[$1, $3]; } + | array_short_syntax '=' expr + { $$ = Expr\Assign[$this->fixupArrayDestructuring($1), $3]; } | variable '=' expr { $$ = Expr\Assign[$1, $3]; } | variable '=' ampersand variable { $$ = Expr\AssignRef[$1, $4]; } | variable '=' ampersand new_expr @@ -1278,7 +1280,8 @@ property_name: ; list_expr: - T_LIST '(' inner_array_pair_list ')' { $$ = Expr\List_[$3]; } + T_LIST '(' inner_array_pair_list ')' + { $$ = Expr\List_[$3]; $$->setAttribute('kind', Expr\List_::KIND_LIST); } ; array_pair_list: diff --git a/lib/PhpParser/Node/Expr/List_.php b/lib/PhpParser/Node/Expr/List_.php index c27a27b957..f899b4ceeb 100644 --- a/lib/PhpParser/Node/Expr/List_.php +++ b/lib/PhpParser/Node/Expr/List_.php @@ -6,6 +6,10 @@ class List_ extends Expr { + // For use in "kind" attribute + public const KIND_LIST = 1; // list() syntax + public const KIND_ARRAY = 2; // [] syntax + /** @var (ArrayItem|null)[] List of items to assign to */ public $items; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 12eb6f4313..ba8273a2da 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1989,7 +1989,7 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 271 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, 272 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; @@ -2340,7 +2340,7 @@ protected function initReduceCallbacks() { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 386 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 387 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); @@ -2922,7 +2922,7 @@ protected function initReduceCallbacks() { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 576 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); }, 577 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 9aeccdbb83..b769ca6929 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2007,7 +2007,7 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 271 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, 272 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; @@ -2358,7 +2358,7 @@ protected function initReduceCallbacks() { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 386 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 387 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); @@ -2940,7 +2940,7 @@ protected function initReduceCallbacks() { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 576 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); }, 577 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 2dfa31090d..1c50968ba8 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -6,6 +6,9 @@ * This parser is based on a skeleton written by Moriyoshi Koizumi, which in * turn is based on work by Masato Bito. */ + +use PhpParser\Node\Expr; +use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\Cast\Double; use PhpParser\Node\Name; use PhpParser\Node\Param; @@ -814,6 +817,17 @@ protected function createCommentNopAttributes(array $comments): array { return $attributes; } + protected function fixupArrayDestructuring(Array_ $node) { + return new Expr\List_(array_map(function(?Expr\ArrayItem $item) { + if ($item !== null && $item->value instanceof Array_) { + return new Expr\ArrayItem( + $this->fixupArrayDestructuring($item->value), + $item->key, $item->byRef, $item->getAttributes()); + } + return $item; + }, $node->items), ['kind' => Expr\List_::KIND_ARRAY] + $node->getAttributes()); + } + protected function checkClassModifier($a, $b, $modifierPos) { try { Class_::verifyClassModifier($a, $b); diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index d495626d8c..2a2baf7f4e 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -104,6 +104,13 @@ public function supportsShortArraySyntax(): bool { return $this->id >= 50400; } + /** + * Whether this version supports [] for destructuring. + */ + public function supportsShortArrayDestructuring(): bool { + return $this->id >= 70100; + } + /** * Whether this version supports flexible heredoc/nowdoc. */ diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index c193fdd9a4..6f5d296aa8 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -563,7 +563,13 @@ protected function pExpr_Include(Expr\Include_ $node) { } protected function pExpr_List(Expr\List_ $node) { - return 'list(' . $this->pCommaSeparated($node->items) . ')'; + $syntax = $node->getAttribute('kind', + $this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_LIST); + if ($syntax === Expr\List_::KIND_ARRAY) { + return '[' . $this->pMaybeMultiline($node->items, true) . ']'; + } else { + return 'list(' . $this->pMaybeMultiline($node->items, true) . ')'; + } } // Other diff --git a/test/PhpParser/ParserTest.php b/test/PhpParser/ParserTest.php index e54c67f190..9432b08c26 100644 --- a/test/PhpParser/ParserTest.php +++ b/test/PhpParser/ParserTest.php @@ -178,6 +178,15 @@ public function provideTestExtraAttributes() { ]; } + public function testListKindAttribute() { + $parser = $this->getParser(new Lexer\Emulative); + $stmts = $parser->parse('assertSame($stmts[0]->expr->var->getAttribute('kind'), Expr\List_::KIND_LIST); + $this->assertSame($stmts[0]->expr->var->items[0]->value->getAttribute('kind'), Expr\List_::KIND_LIST); + $this->assertSame($stmts[1]->expr->var->getAttribute('kind'), Expr\List_::KIND_ARRAY); + $this->assertSame($stmts[1]->expr->var->items[0]->value->getAttribute('kind'), Expr\List_::KIND_ARRAY); + } + public function testGetLexer() { $lexer = new Lexer; $parser = $this->getParser($lexer); diff --git a/test/code/parser/expr/arrayDestructuring.test b/test/code/parser/expr/arrayDestructuring.test index 3ed4e96eb7..cc83ff0894 100644 --- a/test/code/parser/expr/arrayDestructuring.test +++ b/test/code/parser/expr/arrayDestructuring.test @@ -10,7 +10,7 @@ Array destructuring array( 0: Stmt_Expression( expr: Expr_Assign( - var: Expr_Array( + var: Expr_List( items: array( 0: Expr_ArrayItem( key: null @@ -54,7 +54,7 @@ array( ) 1: Stmt_Expression( expr: Expr_Assign( - var: Expr_Array( + var: Expr_List( items: array( 0: null 1: Expr_ArrayItem( @@ -85,16 +85,16 @@ array( ) 2: Stmt_Expression( expr: Expr_Assign( - var: Expr_Array( + var: Expr_List( items: array( 0: null 1: Expr_ArrayItem( key: null - value: Expr_Array( + value: Expr_List( items: array( 0: Expr_ArrayItem( key: null - value: Expr_Array( + value: Expr_List( items: array( 0: Expr_ArrayItem( key: null @@ -131,7 +131,7 @@ array( ) 3: Stmt_Expression( expr: Expr_Assign( - var: Expr_Array( + var: Expr_List( items: array( 0: Expr_ArrayItem( key: Scalar_String( @@ -160,4 +160,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/listReferences.test b/test/code/parser/expr/listReferences.test index 1753b7bf8d..fd42907b37 100644 --- a/test/code/parser/expr/listReferences.test +++ b/test/code/parser/expr/listReferences.test @@ -50,7 +50,7 @@ array( ) 2: Stmt_Expression( expr: Expr_Assign( - var: Expr_Array( + var: Expr_List( items: array( 0: Expr_ArrayItem( key: null @@ -69,7 +69,7 @@ array( ) 3: Stmt_Expression( expr: Expr_Assign( - var: Expr_Array( + var: Expr_List( items: array( 0: Expr_ArrayItem( key: Scalar_String( @@ -88,4 +88,4 @@ array( ) ) ) -) \ No newline at end of file +) From f62b2bfdec4e1a6b0d50dbea48ddeebfe1a98be8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 28 Aug 2022 21:09:00 +0200 Subject: [PATCH 121/428] Introduce separate Modifiers class Use PhpParser\Modifiers::PUBLIC instead of PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC, etc. Old constants of course remain available. Fixes #476. --- UPGRADE-5.0.md | 15 +++++++++ grammar/parser.template | 1 + grammar/php.y | 28 ++++++++-------- lib/PhpParser/Builder/ClassConst.php | 9 ++--- lib/PhpParser/Builder/Class_.php | 7 ++-- lib/PhpParser/Builder/Method.php | 13 ++++---- lib/PhpParser/Builder/Property.php | 13 ++++---- lib/PhpParser/Builder/TraitUseAdaptation.php | 7 ++-- lib/PhpParser/Modifiers.php | 19 +++++++++++ lib/PhpParser/Node/Stmt/ClassConst.php | 11 ++++--- lib/PhpParser/Node/Stmt/ClassMethod.php | 15 +++++---- lib/PhpParser/Node/Stmt/Class_.php | 33 ++++++++++++------- lib/PhpParser/Node/Stmt/Property.php | 13 ++++---- lib/PhpParser/NodeDumper.php | 14 ++++---- lib/PhpParser/Parser/Php7.php | 29 ++++++++-------- lib/PhpParser/Parser/Php8.php | 29 ++++++++-------- lib/PhpParser/ParserAbstract.php | 15 +++++---- lib/PhpParser/PrettyPrinterAbstract.php | 14 ++++---- test/PhpParser/Builder/ClassConstTest.php | 11 ++++--- test/PhpParser/Builder/ClassTest.php | 9 ++--- test/PhpParser/Builder/MethodTest.php | 10 +++--- test/PhpParser/Builder/PropertyTest.php | 14 ++++---- test/PhpParser/Builder/TraitTest.php | 7 ++-- .../Builder/TraitUseAdaptationTest.php | 7 ++-- test/PhpParser/Node/Stmt/ClassConstTest.php | 4 ++- test/PhpParser/Node/Stmt/ClassMethodTest.php | 5 +-- test/PhpParser/Node/Stmt/ClassTest.php | 15 +++++---- test/PhpParser/Node/Stmt/PropertyTest.php | 8 +++-- 28 files changed, 219 insertions(+), 156 deletions(-) create mode 100644 lib/PhpParser/Modifiers.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 5bbd524d5f..1986a845c2 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -79,6 +79,21 @@ A number of AST nodes have been renamed or moved in the AST hierarchy: The old class names have been retained as aliases for backwards compatibility. However, the `Node::getType()` method will now always return the new name (e.g. `ClosureUse` instead of `Expr_ClosureUse`). +### Modifiers + +Modifier flags (as used by the `$flags` subnode of `Class_`, `ClassMethod`, `Property`, etc.) are now available as class constants on a separate `PhpParser\Modifiers` class, instead of being part of `PhpParser\Node\Stmt\Class_`, to make it clearer that these are used by many different nodes. The old constants are deprecated, but are still available. + +``` +PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC -> PhpParser\Modifiers::PUBLIC +PhpParser\Node\Stmt\Class_::MODIFIER_PROTECTED -> PhpParser\Modifiers::PROTECTED +PhpParser\Node\Stmt\Class_::MODIFIER_PRIVATE -> PhpParser\Modifiers::PRIVATE +PhpParser\Node\Stmt\Class_::MODIFIER_STATIC -> PhpParser\Modifiers::STATIC +PhpParser\Node\Stmt\Class_::MODIFIER_ABSTRACT -> PhpParser\Modifiers::ABSTRACT +PhpParser\Node\Stmt\Class_::MODIFIER_FINAL -> PhpParser\Modifiers::FINAL +PhpParser\Node\Stmt\Class_::MODIFIER_READONLY -> PhpParser\Modifiers::READONLY +PhpParser\Node\Stmt\Class_::VISIBILITY_MODIFIER_MASK -> PhpParser\Modifiers::VISIBILITY_MASK +``` + ### Changes to the default pretty printer A number of changes to the standard pretty printer have been made, to make it match contemporary coding style conventions (and in particular PSR-12). Options to restore the previous behavior are not provided, but it is possible to override the formatting methods (such as `pStmt_ClassMethod`) with your preferred formatting. diff --git a/grammar/parser.template b/grammar/parser.template index f9c172f391..2633d255e8 100644 --- a/grammar/parser.template +++ b/grammar/parser.template @@ -8,6 +8,7 @@ $meta # namespace PhpParser\Parser; use PhpParser\Error; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; diff --git a/grammar/php.y b/grammar/php.y index b7ccbf8354..27b8d2b125 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -509,9 +509,9 @@ class_modifiers: ; class_modifier: - T_ABSTRACT { $$ = Stmt\Class_::MODIFIER_ABSTRACT; } - | T_FINAL { $$ = Stmt\Class_::MODIFIER_FINAL; } - | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } + T_ABSTRACT { $$ = Modifiers::ABSTRACT; } + | T_FINAL { $$ = Modifiers::FINAL; } + | T_READONLY { $$ = Modifiers::READONLY; } ; extends_from: @@ -666,10 +666,10 @@ optional_property_modifiers: ; property_modifier: - T_PUBLIC { $$ = Stmt\Class_::MODIFIER_PUBLIC; } - | T_PROTECTED { $$ = Stmt\Class_::MODIFIER_PROTECTED; } - | T_PRIVATE { $$ = Stmt\Class_::MODIFIER_PRIVATE; } - | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } + T_PUBLIC { $$ = Modifiers::PUBLIC; } + | T_PROTECTED { $$ = Modifiers::PROTECTED; } + | T_PRIVATE { $$ = Modifiers::PRIVATE; } + | T_READONLY { $$ = Modifiers::READONLY; } ; parameter: @@ -893,13 +893,13 @@ non_empty_member_modifiers: ; 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; } - | T_READONLY { $$ = Stmt\Class_::MODIFIER_READONLY; } + T_PUBLIC { $$ = Modifiers::PUBLIC; } + | T_PROTECTED { $$ = Modifiers::PROTECTED; } + | T_PRIVATE { $$ = Modifiers::PRIVATE; } + | T_STATIC { $$ = Modifiers::STATIC; } + | T_ABSTRACT { $$ = Modifiers::ABSTRACT; } + | T_FINAL { $$ = Modifiers::FINAL; } + | T_READONLY { $$ = Modifiers::READONLY; } ; property_declaration_list: diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index f616c62701..058cb23c4d 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -6,6 +6,7 @@ use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Const_; use PhpParser\Node\Identifier; @@ -50,7 +51,7 @@ public function addConst($name, $value) { * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); return $this; } @@ -61,7 +62,7 @@ public function makePublic() { * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); return $this; } @@ -72,7 +73,7 @@ public function makeProtected() { * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); return $this; } @@ -83,7 +84,7 @@ public function makePrivate() { * @return $this The builder instance (for fluid interface) */ public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); return $this; } diff --git a/lib/PhpParser/Builder/Class_.php b/lib/PhpParser/Builder/Class_.php index 35b54d0418..38103eb972 100644 --- a/lib/PhpParser/Builder/Class_.php +++ b/lib/PhpParser/Builder/Class_.php @@ -4,6 +4,7 @@ use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; @@ -67,7 +68,7 @@ public function implement(...$interfaces) { * @return $this The builder instance (for fluid interface) */ public function makeAbstract() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::ABSTRACT); return $this; } @@ -78,13 +79,13 @@ public function makeAbstract() { * @return $this The builder instance (for fluid interface) */ public function makeFinal() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::FINAL); return $this; } public function makeReadonly() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_READONLY); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::READONLY); return $this; } diff --git a/lib/PhpParser/Builder/Method.php b/lib/PhpParser/Builder/Method.php index 232d7cb874..68e7023e04 100644 --- a/lib/PhpParser/Builder/Method.php +++ b/lib/PhpParser/Builder/Method.php @@ -4,6 +4,7 @@ use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Stmt; @@ -33,7 +34,7 @@ public function __construct(string $name) { * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); return $this; } @@ -44,7 +45,7 @@ public function makePublic() { * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); return $this; } @@ -55,7 +56,7 @@ public function makeProtected() { * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); return $this; } @@ -66,7 +67,7 @@ public function makePrivate() { * @return $this The builder instance (for fluid interface) */ public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); return $this; } @@ -81,7 +82,7 @@ public function makeAbstract() { throw new \LogicException('Cannot make method with statements abstract'); } - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT); $this->stmts = null; // abstract methods don't have statements return $this; @@ -93,7 +94,7 @@ public function makeAbstract() { * @return $this The builder instance (for fluid interface) */ public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); return $this; } diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 68e318565e..f8c352ad07 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -4,6 +4,7 @@ use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Name; @@ -39,7 +40,7 @@ public function __construct(string $name) { * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); return $this; } @@ -50,7 +51,7 @@ public function makePublic() { * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); return $this; } @@ -61,7 +62,7 @@ public function makeProtected() { * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); return $this; } @@ -72,7 +73,7 @@ public function makePrivate() { * @return $this The builder instance (for fluid interface) */ public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); return $this; } @@ -83,7 +84,7 @@ public function makeStatic() { * @return $this The builder instance (for fluid interface) */ public function makeReadonly() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_READONLY); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); return $this; } @@ -149,7 +150,7 @@ public function addAttribute($attribute) { */ public function getNode() : PhpParser\Node { return new Stmt\Property( - $this->flags !== 0 ? $this->flags : Stmt\Class_::MODIFIER_PUBLIC, + $this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, [ new Stmt\PropertyProperty($this->name, $this->default) ], diff --git a/lib/PhpParser/Builder/TraitUseAdaptation.php b/lib/PhpParser/Builder/TraitUseAdaptation.php index c9e7237238..d6d7262428 100644 --- a/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -4,6 +4,7 @@ use PhpParser\Builder; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Stmt; @@ -63,7 +64,7 @@ public function as($alias) { * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC); + $this->setModifier(Modifiers::PUBLIC); return $this; } @@ -73,7 +74,7 @@ public function makePublic() { * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED); + $this->setModifier(Modifiers::PROTECTED); return $this; } @@ -83,7 +84,7 @@ public function makeProtected() { * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE); + $this->setModifier(Modifiers::PRIVATE); return $this; } diff --git a/lib/PhpParser/Modifiers.php b/lib/PhpParser/Modifiers.php new file mode 100644 index 0000000000..871aae72be --- /dev/null +++ b/lib/PhpParser/Modifiers.php @@ -0,0 +1,19 @@ +flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** @@ -53,7 +54,7 @@ public function isPublic() : bool { * @return bool */ public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + return (bool) ($this->flags & Modifiers::PROTECTED); } /** @@ -62,7 +63,7 @@ public function isProtected() : bool { * @return bool */ public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + return (bool) ($this->flags & Modifiers::PRIVATE); } /** @@ -71,7 +72,7 @@ public function isPrivate() : bool { * @return bool */ public function isFinal() : bool { - return (bool) ($this->flags & Class_::MODIFIER_FINAL); + return (bool) ($this->flags & Modifiers::FINAL); } public function getType() : string { diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index f0ac6b62bc..69c2f31d53 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -2,6 +2,7 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\FunctionLike; @@ -97,8 +98,8 @@ public function getAttrGroups() : array { * @return bool */ public function isPublic() : bool { - return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** @@ -107,7 +108,7 @@ public function isPublic() : bool { * @return bool */ public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + return (bool) ($this->flags & Modifiers::PROTECTED); } /** @@ -116,7 +117,7 @@ public function isProtected() : bool { * @return bool */ public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + return (bool) ($this->flags & Modifiers::PRIVATE); } /** @@ -125,7 +126,7 @@ public function isPrivate() : bool { * @return bool */ public function isAbstract() : bool { - return (bool) ($this->flags & Class_::MODIFIER_ABSTRACT); + return (bool) ($this->flags & Modifiers::ABSTRACT); } /** @@ -134,7 +135,7 @@ public function isAbstract() : bool { * @return bool */ public function isFinal() : bool { - return (bool) ($this->flags & Class_::MODIFIER_FINAL); + return (bool) ($this->flags & Modifiers::FINAL); } /** @@ -143,7 +144,7 @@ public function isFinal() : bool { * @return bool */ public function isStatic() : bool { - return (bool) ($this->flags & Class_::MODIFIER_STATIC); + return (bool) ($this->flags & Modifiers::STATIC); } /** diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 5e2c9eac9d..0faf2d2314 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -3,21 +3,30 @@ namespace PhpParser\Node\Stmt; use PhpParser\Error; +use PhpParser\Modifiers; use PhpParser\Node; class Class_ extends ClassLike { + /** @deprecated Use Modifiers::PUBLIC instead */ public const MODIFIER_PUBLIC = 1; + /** @deprecated Use Modifiers::PROTECTED instead */ public const MODIFIER_PROTECTED = 2; + /** @deprecated Use Modifiers::PRIVATE instead */ public const MODIFIER_PRIVATE = 4; + /** @deprecated Use Modifiers::STATIC instead */ public const MODIFIER_STATIC = 8; + /** @deprecated Use Modifiers::ABSTRACT instead */ public const MODIFIER_ABSTRACT = 16; + /** @deprecated Use Modifiers::FINAL instead */ public const MODIFIER_FINAL = 32; + /** @deprecated Use Modifiers::READONLY instead */ public const MODIFIER_READONLY = 64; + /** @deprecated Use Modifiers::VISIBILITY_MASK instead */ public const VISIBILITY_MODIFIER_MASK = 7; // 1 | 2 | 4 - /** @var int Type */ + /** @var int Modifiers */ public $flags; /** @var null|Node\Name Name of extended class */ public $extends; @@ -56,7 +65,7 @@ public function getSubNodeNames() : array { * @return bool */ public function isAbstract() : bool { - return (bool) ($this->flags & self::MODIFIER_ABSTRACT); + return (bool) ($this->flags & Modifiers::ABSTRACT); } /** @@ -65,11 +74,11 @@ public function isAbstract() : bool { * @return bool */ public function isFinal() : bool { - return (bool) ($this->flags & self::MODIFIER_FINAL); + return (bool) ($this->flags & Modifiers::FINAL); } public function isReadonly() : bool { - return (bool) ($this->flags & self::MODIFIER_READONLY); + return (bool) ($this->flags & Modifiers::READONLY); } /** @@ -85,15 +94,15 @@ public function isAnonymous() : bool { * @internal */ public static function verifyClassModifier($a, $b) { - if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) { + if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { throw new Error('Multiple abstract modifiers are not allowed'); } - if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) { + if ($a & Modifiers::FINAL && $b & Modifiers::FINAL) { throw new Error('Multiple final modifiers are not allowed'); } - if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) { + if ($a & Modifiers::READONLY && $b & Modifiers::READONLY) { throw new Error('Multiple readonly modifiers are not allowed'); } @@ -106,23 +115,23 @@ public static function verifyClassModifier($a, $b) { * @internal */ public static function verifyModifier($a, $b) { - if ($a & self::VISIBILITY_MODIFIER_MASK && $b & self::VISIBILITY_MODIFIER_MASK) { + if ($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK) { throw new Error('Multiple access type modifiers are not allowed'); } - if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) { + if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { throw new Error('Multiple abstract modifiers are not allowed'); } - if ($a & self::MODIFIER_STATIC && $b & self::MODIFIER_STATIC) { + if ($a & Modifiers::STATIC && $b & Modifiers::STATIC) { throw new Error('Multiple static modifiers are not allowed'); } - if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) { + if ($a & Modifiers::FINAL && $b & Modifiers::FINAL) { throw new Error('Multiple final modifiers are not allowed'); } - if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) { + if ($a & Modifiers::READONLY && $b & Modifiers::READONLY) { throw new Error('Multiple readonly modifiers are not allowed'); } diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index bc781bbffc..fb8a38f576 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -2,6 +2,7 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\ComplexType; use PhpParser\Node\Identifier; @@ -45,8 +46,8 @@ public function getSubNodeNames() : array { * @return bool */ public function isPublic() : bool { - return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** @@ -55,7 +56,7 @@ public function isPublic() : bool { * @return bool */ public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + return (bool) ($this->flags & Modifiers::PROTECTED); } /** @@ -64,7 +65,7 @@ public function isProtected() : bool { * @return bool */ public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + return (bool) ($this->flags & Modifiers::PRIVATE); } /** @@ -73,7 +74,7 @@ public function isPrivate() : bool { * @return bool */ public function isStatic() : bool { - return (bool) ($this->flags & Class_::MODIFIER_STATIC); + return (bool) ($this->flags & Modifiers::STATIC); } /** @@ -82,7 +83,7 @@ public function isStatic() : bool { * @return bool */ public function isReadonly() : bool { - return (bool) ($this->flags & Class_::MODIFIER_READONLY); + return (bool) ($this->flags & Modifiers::READONLY); } public function getType() : string { diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index a0840d2fed..ab834cbf41 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -110,25 +110,25 @@ protected function dumpRecursive($node) { protected function dumpFlags($flags) { $strs = []; - if ($flags & Class_::MODIFIER_PUBLIC) { + if ($flags & Modifiers::PUBLIC) { $strs[] = 'MODIFIER_PUBLIC'; } - if ($flags & Class_::MODIFIER_PROTECTED) { + if ($flags & Modifiers::PROTECTED) { $strs[] = 'MODIFIER_PROTECTED'; } - if ($flags & Class_::MODIFIER_PRIVATE) { + if ($flags & Modifiers::PRIVATE) { $strs[] = 'MODIFIER_PRIVATE'; } - if ($flags & Class_::MODIFIER_ABSTRACT) { + if ($flags & Modifiers::ABSTRACT) { $strs[] = 'MODIFIER_ABSTRACT'; } - if ($flags & Class_::MODIFIER_STATIC) { + if ($flags & Modifiers::STATIC) { $strs[] = 'MODIFIER_STATIC'; } - if ($flags & Class_::MODIFIER_FINAL) { + if ($flags & Modifiers::FINAL) { $strs[] = 'MODIFIER_FINAL'; } - if ($flags & Class_::MODIFIER_READONLY) { + if ($flags & Modifiers::READONLY) { $strs[] = 'MODIFIER_READONLY'; } diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index ba8273a2da..cc38ed56b4 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -3,6 +3,7 @@ namespace PhpParser\Parser; use PhpParser\Error; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; @@ -1824,13 +1825,13 @@ protected function initReduceCallbacks() { $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 216 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Modifiers::ABSTRACT; }, 217 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Modifiers::FINAL; }, 218 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Modifiers::READONLY; }, 219 => function ($stackPos) { $this->semValue = null; @@ -2010,16 +2011,16 @@ protected function initReduceCallbacks() { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 278 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = Modifiers::PUBLIC; }, 279 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Modifiers::PROTECTED; }, 280 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Modifiers::PRIVATE; }, 281 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Modifiers::READONLY; }, 282 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); @@ -2277,25 +2278,25 @@ protected function initReduceCallbacks() { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 365 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = Modifiers::PUBLIC; }, 366 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Modifiers::PROTECTED; }, 367 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Modifiers::PRIVATE; }, 368 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = Modifiers::STATIC; }, 369 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Modifiers::ABSTRACT; }, 370 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Modifiers::FINAL; }, 371 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Modifiers::READONLY; }, 372 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index b769ca6929..097cde7725 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -3,6 +3,7 @@ namespace PhpParser\Parser; use PhpParser\Error; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; @@ -1842,13 +1843,13 @@ protected function initReduceCallbacks() { $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 216 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Modifiers::ABSTRACT; }, 217 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Modifiers::FINAL; }, 218 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Modifiers::READONLY; }, 219 => function ($stackPos) { $this->semValue = null; @@ -2028,16 +2029,16 @@ protected function initReduceCallbacks() { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 278 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = Modifiers::PUBLIC; }, 279 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Modifiers::PROTECTED; }, 280 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Modifiers::PRIVATE; }, 281 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Modifiers::READONLY; }, 282 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); @@ -2295,25 +2296,25 @@ protected function initReduceCallbacks() { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 365 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = Modifiers::PUBLIC; }, 366 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Modifiers::PROTECTED; }, 367 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Modifiers::PRIVATE; }, 368 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = Modifiers::STATIC; }, 369 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Modifiers::ABSTRACT; }, 370 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Modifiers::FINAL; }, 371 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Modifiers::READONLY; }, 372 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 1c50968ba8..d5c01ac3af 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -7,6 +7,7 @@ * turn is based on work by Masato Bito. */ +use PhpParser\Modifiers; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\Cast\Double; @@ -920,7 +921,7 @@ protected function checkEnum(Enum_ $node, $namePos) { } protected function checkClassMethod(ClassMethod $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_STATIC) { + if ($node->flags & Modifiers::STATIC) { switch ($node->name->toLowerString()) { case '__construct': $this->emitError(new Error( @@ -940,7 +941,7 @@ protected function checkClassMethod(ClassMethod $node, $modifierPos) { } } - if ($node->flags & Class_::MODIFIER_READONLY) { + if ($node->flags & Modifiers::READONLY) { $this->emitError(new Error( sprintf('Method %s() cannot be readonly', $node->name), $this->getAttributesAt($modifierPos))); @@ -948,17 +949,17 @@ protected function checkClassMethod(ClassMethod $node, $modifierPos) { } protected function checkClassConst(ClassConst $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_STATIC) { + if ($node->flags & Modifiers::STATIC) { $this->emitError(new Error( "Cannot use 'static' as constant modifier", $this->getAttributesAt($modifierPos))); } - if ($node->flags & Class_::MODIFIER_ABSTRACT) { + if ($node->flags & Modifiers::ABSTRACT) { $this->emitError(new Error( "Cannot use 'abstract' as constant modifier", $this->getAttributesAt($modifierPos))); } - if ($node->flags & Class_::MODIFIER_READONLY) { + if ($node->flags & Modifiers::READONLY) { $this->emitError(new Error( "Cannot use 'readonly' as constant modifier", $this->getAttributesAt($modifierPos))); @@ -966,12 +967,12 @@ protected function checkClassConst(ClassConst $node, $modifierPos) { } protected function checkProperty(Property $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_ABSTRACT) { + if ($node->flags & Modifiers::ABSTRACT) { $this->emitError(new Error('Properties cannot be declared abstract', $this->getAttributesAt($modifierPos))); } - if ($node->flags & Class_::MODIFIER_FINAL) { + if ($node->flags & Modifiers::FINAL) { $this->emitError(new Error('Properties cannot be declared final', $this->getAttributesAt($modifierPos))); } diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 394e93a0b3..791e6527c3 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1067,13 +1067,13 @@ protected function dereferenceLhsRequiresParens(Node $node) : bool { * @return string Printed modifiers */ protected function pModifiers(int $modifiers): string { - return ($modifiers & Stmt\Class_::MODIFIER_FINAL ? 'final ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_ABSTRACT ? 'abstract ' : '') - . ($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_READONLY ? 'readonly ' : ''); + return ($modifiers & Modifiers::FINAL ? 'final ' : '') + . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') + . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') + . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') + . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') + . ($modifiers & Modifiers::STATIC ? 'static ' : '') + . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); } /** diff --git a/test/PhpParser/Builder/ClassConstTest.php b/test/PhpParser/Builder/ClassConstTest.php index ba3edcd40e..21a8638b09 100644 --- a/test/PhpParser/Builder/ClassConstTest.php +++ b/test/PhpParser/Builder/ClassConstTest.php @@ -3,6 +3,7 @@ namespace PhpParser\Builder; use PhpParser\Comment; +use PhpParser\Modifiers; use PhpParser\Node\Arg; use PhpParser\Node\Attribute; use PhpParser\Node\AttributeGroup; @@ -31,7 +32,7 @@ public function testModifiers() { [ new Const_("TEST", new LNumber(1)) ], - Stmt\Class_::MODIFIER_PRIVATE + Modifiers::PRIVATE ), $node ); @@ -46,7 +47,7 @@ public function testModifiers() { [ new Const_("TEST", new LNumber(1) ) ], - Stmt\Class_::MODIFIER_PROTECTED + Modifiers::PROTECTED ), $node ); @@ -61,7 +62,7 @@ public function testModifiers() { [ new Const_("TEST", new LNumber(1) ) ], - Stmt\Class_::MODIFIER_PUBLIC + Modifiers::PUBLIC ), $node ); @@ -76,7 +77,7 @@ public function testModifiers() { [ new Const_("TEST", new LNumber(1) ) ], - Stmt\Class_::MODIFIER_FINAL + Modifiers::FINAL ), $node ); @@ -93,7 +94,7 @@ public function testDocComment() { [ new Const_("TEST", new LNumber(1) ) ], - Stmt\Class_::MODIFIER_PUBLIC, + Modifiers::PUBLIC, [ 'comments' => [new Comment\Doc('/** Test */')] ] diff --git a/test/PhpParser/Builder/ClassTest.php b/test/PhpParser/Builder/ClassTest.php index 67cae5d843..b1c591660d 100644 --- a/test/PhpParser/Builder/ClassTest.php +++ b/test/PhpParser/Builder/ClassTest.php @@ -3,6 +3,7 @@ namespace PhpParser\Builder; use PhpParser\Comment; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Attribute; @@ -48,7 +49,7 @@ public function testAbstract() { $this->assertEquals( new Stmt\Class_('Test', [ - 'flags' => Stmt\Class_::MODIFIER_ABSTRACT + 'flags' => Modifiers::ABSTRACT ]), $node ); @@ -62,7 +63,7 @@ public function testFinal() { $this->assertEquals( new Stmt\Class_('Test', [ - 'flags' => Stmt\Class_::MODIFIER_FINAL + 'flags' => Modifiers::FINAL ]), $node ); @@ -76,7 +77,7 @@ public function testReadonly() { $this->assertEquals( new Stmt\Class_('Test', [ - 'flags' => Stmt\Class_::MODIFIER_READONLY + 'flags' => Modifiers::READONLY ]), $node ); @@ -85,7 +86,7 @@ public function testReadonly() { public function testStatementOrder() { $method = new Stmt\ClassMethod('testMethod'); $property = new Stmt\Property( - Stmt\Class_::MODIFIER_PUBLIC, + Modifiers::PUBLIC, [new Stmt\PropertyProperty('testProperty')] ); $const = new Stmt\ClassConst([ diff --git a/test/PhpParser/Builder/MethodTest.php b/test/PhpParser/Builder/MethodTest.php index c73e28a087..d49bda9614 100644 --- a/test/PhpParser/Builder/MethodTest.php +++ b/test/PhpParser/Builder/MethodTest.php @@ -3,6 +3,7 @@ namespace PhpParser\Builder; use PhpParser\Comment; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Attribute; @@ -31,9 +32,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\ClassMethod('test', [ - 'flags' => Stmt\Class_::MODIFIER_PUBLIC - | Stmt\Class_::MODIFIER_ABSTRACT - | Stmt\Class_::MODIFIER_STATIC, + 'flags' => Modifiers::PUBLIC | Modifiers::ABSTRACT | Modifiers::STATIC, 'stmts' => null, ]), $node @@ -47,8 +46,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\ClassMethod('test', [ - 'flags' => Stmt\Class_::MODIFIER_PROTECTED - | Stmt\Class_::MODIFIER_FINAL + 'flags' => Modifiers::PROTECTED | Modifiers::FINAL ]), $node ); @@ -60,7 +58,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\ClassMethod('test', [ - 'type' => Stmt\Class_::MODIFIER_PRIVATE + 'type' => Modifiers::PRIVATE ]), $node ); diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index 5e6c17d53f..e3ddcb6968 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -3,6 +3,7 @@ namespace PhpParser\Builder; use PhpParser\Comment; +use PhpParser\Modifiers; use PhpParser\Node\Arg; use PhpParser\Node\Attribute; use PhpParser\Node\AttributeGroup; @@ -28,8 +29,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\Property( - Stmt\Class_::MODIFIER_PRIVATE - | Stmt\Class_::MODIFIER_STATIC, + Modifiers::PRIVATE | Modifiers::STATIC, [ new Stmt\PropertyProperty('test') ] @@ -44,7 +44,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\Property( - Stmt\Class_::MODIFIER_PROTECTED, + Modifiers::PROTECTED, [ new Stmt\PropertyProperty('test') ] @@ -59,7 +59,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\Property( - Stmt\Class_::MODIFIER_PUBLIC, + Modifiers::PUBLIC, [ new Stmt\PropertyProperty('test') ] @@ -74,7 +74,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\Property( - Stmt\Class_::MODIFIER_READONLY, + Modifiers::READONLY, [ new Stmt\PropertyProperty('test') ] @@ -89,7 +89,7 @@ public function testDocComment() { ->getNode(); $this->assertEquals(new Stmt\Property( - Stmt\Class_::MODIFIER_PUBLIC, + Modifiers::PUBLIC, [ new Stmt\PropertyProperty('test') ], @@ -125,7 +125,7 @@ public function testAddAttribute() { $this->assertEquals( new Stmt\Property( - Stmt\Class_::MODIFIER_PUBLIC, + Modifiers::PUBLIC, [ new Stmt\PropertyProperty('test') ], diff --git a/test/PhpParser/Builder/TraitTest.php b/test/PhpParser/Builder/TraitTest.php index 6b27b492cb..467032636a 100644 --- a/test/PhpParser/Builder/TraitTest.php +++ b/test/PhpParser/Builder/TraitTest.php @@ -3,6 +3,7 @@ namespace PhpParser\Builder; use PhpParser\Comment; +use PhpParser\Modifiers; use PhpParser\Node\Arg; use PhpParser\Node\Attribute; use PhpParser\Node\AttributeGroup; @@ -27,7 +28,7 @@ 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, [ + $prop = new Stmt\Property(Modifiers::PUBLIC, [ new Stmt\PropertyProperty('test') ]); $use = new Stmt\TraitUse([new Name('OtherTrait')]); @@ -78,8 +79,8 @@ public function testGetMethods() { public function testGetProperties() { $properties = [ - new Property(Class_::MODIFIER_PUBLIC, [new PropertyProperty('foo')]), - new Property(Class_::MODIFIER_PUBLIC, [new PropertyProperty('bar')]), + new Property(Modifiers::PUBLIC, [new PropertyProperty('foo')]), + new Property(Modifiers::PUBLIC, [new PropertyProperty('bar')]), ]; $trait = new Stmt\Trait_('Foo', [ 'stmts' => [ diff --git a/test/PhpParser/Builder/TraitUseAdaptationTest.php b/test/PhpParser/Builder/TraitUseAdaptationTest.php index 4961ccfac9..78fcb90006 100644 --- a/test/PhpParser/Builder/TraitUseAdaptationTest.php +++ b/test/PhpParser/Builder/TraitUseAdaptationTest.php @@ -2,6 +2,7 @@ namespace PhpParser\Builder; +use PhpParser\Modifiers; use PhpParser\Node\Name; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Class_; @@ -21,17 +22,17 @@ public function testAsMake() { ); $this->assertEquals( - new Stmt\TraitUseAdaptation\Alias(null, 'foo', Class_::MODIFIER_PUBLIC, null), + new Stmt\TraitUseAdaptation\Alias(null, 'foo', Modifiers::PUBLIC, null), (clone $builder)->makePublic()->getNode() ); $this->assertEquals( - new Stmt\TraitUseAdaptation\Alias(null, 'foo', Class_::MODIFIER_PROTECTED, null), + new Stmt\TraitUseAdaptation\Alias(null, 'foo', Modifiers::PROTECTED, null), (clone $builder)->makeProtected()->getNode() ); $this->assertEquals( - new Stmt\TraitUseAdaptation\Alias(null, 'foo', Class_::MODIFIER_PRIVATE, null), + new Stmt\TraitUseAdaptation\Alias(null, 'foo', Modifiers::PRIVATE, null), (clone $builder)->makePrivate()->getNode() ); } diff --git a/test/PhpParser/Node/Stmt/ClassConstTest.php b/test/PhpParser/Node/Stmt/ClassConstTest.php index 1685c0bff2..ee2713dabd 100644 --- a/test/PhpParser/Node/Stmt/ClassConstTest.php +++ b/test/PhpParser/Node/Stmt/ClassConstTest.php @@ -2,6 +2,8 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; + class ClassConstTest extends \PHPUnit\Framework\TestCase { /** @@ -10,7 +12,7 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase public function testModifiers($modifier) { $node = new ClassConst( [], // invalid - constant('PhpParser\Node\Stmt\Class_::MODIFIER_' . strtoupper($modifier)) + constant(Modifiers::class . '::' . strtoupper($modifier)) ); $this->assertTrue($node->{'is' . $modifier}()); diff --git a/test/PhpParser/Node/Stmt/ClassMethodTest.php b/test/PhpParser/Node/Stmt/ClassMethodTest.php index 51c5f1c2cf..a48aa8b64c 100644 --- a/test/PhpParser/Node/Stmt/ClassMethodTest.php +++ b/test/PhpParser/Node/Stmt/ClassMethodTest.php @@ -2,6 +2,7 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Name; use PhpParser\Node\Param; @@ -13,7 +14,7 @@ class ClassMethodTest extends \PHPUnit\Framework\TestCase */ public function testModifiers($modifier) { $node = new ClassMethod('foo', [ - 'type' => constant('PhpParser\Node\Stmt\Class_::MODIFIER_' . strtoupper($modifier)) + 'type' => constant(Modifiers::class . '::' . strtoupper($modifier)) ]); $this->assertTrue($node->{'is' . $modifier}()); @@ -52,7 +53,7 @@ public function provideModifiers() { public function testImplicitPublic(string $modifier) { $node = new ClassMethod('foo', [ - 'type' => constant('PhpParser\Node\Stmt\Class_::MODIFIER_' . strtoupper($modifier)) + 'type' => constant(Modifiers::class . '::' . strtoupper($modifier)) ]); $this->assertTrue($node->isPublic(), 'Node should be implicitly public'); diff --git a/test/PhpParser/Node/Stmt/ClassTest.php b/test/PhpParser/Node/Stmt/ClassTest.php index da85e5b90d..8d6f3e0775 100644 --- a/test/PhpParser/Node/Stmt/ClassTest.php +++ b/test/PhpParser/Node/Stmt/ClassTest.php @@ -2,12 +2,13 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; use PhpParser\Node\Scalar\String_; class ClassTest extends \PHPUnit\Framework\TestCase { public function testIsAbstract() { - $class = new Class_('Foo', ['type' => Class_::MODIFIER_ABSTRACT]); + $class = new Class_('Foo', ['type' => Modifiers::ABSTRACT]); $this->assertTrue($class->isAbstract()); $class = new Class_('Foo'); @@ -15,7 +16,7 @@ public function testIsAbstract() { } public function testIsFinal() { - $class = new Class_('Foo', ['type' => Class_::MODIFIER_FINAL]); + $class = new Class_('Foo', ['type' => Modifiers::FINAL]); $this->assertTrue($class->isFinal()); $class = new Class_('Foo'); @@ -78,8 +79,8 @@ public function testGetConstants() { public function testGetProperties() { $properties = [ - new Property(Class_::MODIFIER_PUBLIC, [new PropertyProperty('foo')]), - new Property(Class_::MODIFIER_PUBLIC, [new PropertyProperty('bar')]), + new Property(Modifiers::PUBLIC, [new PropertyProperty('foo')]), + new Property(Modifiers::PUBLIC, [new PropertyProperty('bar')]), ]; $class = new Class_('Foo', [ 'stmts' => [ @@ -96,9 +97,9 @@ public function testGetProperties() public function testGetProperty() { $properties = [ - $fooProp = new Property(Class_::MODIFIER_PUBLIC, [new PropertyProperty('foo1')]), - $barProp = new Property(Class_::MODIFIER_PUBLIC, [new PropertyProperty('BAR1')]), - $fooBarProp = new Property(Class_::MODIFIER_PUBLIC, [new PropertyProperty('foo2'), new PropertyProperty('bar2')]), + $fooProp = new Property(Modifiers::PUBLIC, [new PropertyProperty('foo1')]), + $barProp = new Property(Modifiers::PUBLIC, [new PropertyProperty('BAR1')]), + $fooBarProp = new Property(Modifiers::PUBLIC, [new PropertyProperty('foo2'), new PropertyProperty('bar2')]), ]; $class = new Class_('Foo', [ 'stmts' => [ diff --git a/test/PhpParser/Node/Stmt/PropertyTest.php b/test/PhpParser/Node/Stmt/PropertyTest.php index ea99d250cf..c4fbf0a011 100644 --- a/test/PhpParser/Node/Stmt/PropertyTest.php +++ b/test/PhpParser/Node/Stmt/PropertyTest.php @@ -2,6 +2,8 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; + class PropertyTest extends \PHPUnit\Framework\TestCase { /** @@ -9,7 +11,7 @@ class PropertyTest extends \PHPUnit\Framework\TestCase */ public function testModifiers($modifier) { $node = new Property( - constant('PhpParser\Node\Stmt\Class_::MODIFIER_' . strtoupper($modifier)), + constant(Modifiers::class . '::' . strtoupper($modifier)), [] // invalid ); @@ -27,7 +29,7 @@ public function testNoModifiers() { } public function testStaticImplicitlyPublic() { - $node = new Property(Class_::MODIFIER_STATIC, []); + $node = new Property(Modifiers::STATIC, []); $this->assertTrue($node->isPublic()); $this->assertFalse($node->isProtected()); $this->assertFalse($node->isPrivate()); @@ -36,7 +38,7 @@ public function testStaticImplicitlyPublic() { } public function testReadonly() { - $node = new Property(Class_::MODIFIER_READONLY, []); + $node = new Property(Modifiers::READONLY, []); $this->assertTrue($node->isReadonly()); } From dd63ddbc248e069660a1ce477d8597e363e55ced Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 28 Aug 2022 22:57:06 +0200 Subject: [PATCH 122/428] Add php-cs-fixer config and reformat The formatting in this project has become something of a mess, because it changed over time. Add a CS fixer config and reformat to the desired style, which is PSR-12, but with sane brace placement. --- .php-cs-fixer.dist.php | 22 +++++ lib/PhpParser/Builder.php | 5 +- lib/PhpParser/Builder/ClassConst.php | 3 +- lib/PhpParser/Builder/Class_.php | 5 +- lib/PhpParser/Builder/Declaration.php | 3 +- lib/PhpParser/Builder/EnumCase.php | 3 +- lib/PhpParser/Builder/Enum_.php | 5 +- lib/PhpParser/Builder/FunctionLike.php | 3 +- lib/PhpParser/Builder/Function_.php | 5 +- lib/PhpParser/Builder/Interface_.php | 5 +- lib/PhpParser/Builder/Method.php | 5 +- lib/PhpParser/Builder/Namespace_.php | 5 +- lib/PhpParser/Builder/Param.php | 5 +- lib/PhpParser/Builder/Property.php | 5 +- lib/PhpParser/Builder/TraitUse.php | 5 +- lib/PhpParser/Builder/TraitUseAdaptation.php | 7 +- lib/PhpParser/Builder/Trait_.php | 5 +- lib/PhpParser/Builder/Use_.php | 5 +- lib/PhpParser/BuilderFactory.php | 59 +++++++------- lib/PhpParser/BuilderHelpers.php | 22 +++-- lib/PhpParser/Comment.php | 29 ++++--- lib/PhpParser/Comment/Doc.php | 3 +- .../ConstExprEvaluationException.php | 4 +- lib/PhpParser/ConstExprEvaluator.php | 10 +-- lib/PhpParser/Error.php | 21 +++-- lib/PhpParser/ErrorHandler.php | 3 +- lib/PhpParser/ErrorHandler/Collecting.php | 7 +- lib/PhpParser/ErrorHandler/Throwing.php | 3 +- lib/PhpParser/Internal/DiffElem.php | 3 +- lib/PhpParser/Internal/Differ.php | 3 +- .../Internal/PrintableNewAnonClassNode.php | 7 +- lib/PhpParser/Internal/TokenPolyfill.php | 7 +- lib/PhpParser/Internal/TokenStream.php | 15 ++-- lib/PhpParser/JsonDecoder.php | 13 ++- lib/PhpParser/Lexer.php | 3 +- lib/PhpParser/Lexer/Emulative.php | 22 +++-- .../Lexer/TokenEmulator/AttributeEmulator.php | 15 ++-- .../CoaleseEqualTokenEmulator.php | 15 ++-- .../Lexer/TokenEmulator/EnumTokenEmulator.php | 15 ++-- .../TokenEmulator/ExplicitOctalEmulator.php | 3 +- .../FlexibleDocStringEmulator.php | 15 ++-- .../Lexer/TokenEmulator/FnTokenEmulator.php | 12 +-- .../Lexer/TokenEmulator/KeywordEmulator.php | 18 ++--- .../TokenEmulator/MatchTokenEmulator.php | 12 +-- .../TokenEmulator/NullsafeTokenEmulator.php | 15 ++-- .../NumericLiteralSeparatorEmulator.php | 18 ++--- .../TokenEmulator/ReadonlyTokenEmulator.php | 15 ++-- .../Lexer/TokenEmulator/ReverseEmulator.php | 3 +- .../Lexer/TokenEmulator/TokenEmulator.php | 3 +- lib/PhpParser/NameContext.php | 11 ++- lib/PhpParser/Node.php | 27 +++---- lib/PhpParser/Node/Arg.php | 9 +-- lib/PhpParser/Node/Attribute.php | 7 +- lib/PhpParser/Node/AttributeGroup.php | 7 +- lib/PhpParser/Node/ClosureUse.php | 9 +-- lib/PhpParser/Node/ComplexType.php | 3 +- lib/PhpParser/Node/Const_.php | 7 +- lib/PhpParser/Node/Expr.php | 3 +- lib/PhpParser/Node/Expr/ArrayDimFetch.php | 9 +-- lib/PhpParser/Node/Expr/ArrayItem.php | 7 +- lib/PhpParser/Node/Expr/Array_.php | 9 +-- lib/PhpParser/Node/Expr/ArrowFunction.php | 15 ++-- lib/PhpParser/Node/Expr/Assign.php | 9 +-- lib/PhpParser/Node/Expr/AssignOp.php | 5 +- .../Node/Expr/AssignOp/BitwiseAnd.php | 5 +- .../Node/Expr/AssignOp/BitwiseOr.php | 5 +- .../Node/Expr/AssignOp/BitwiseXor.php | 5 +- lib/PhpParser/Node/Expr/AssignOp/Coalesce.php | 5 +- lib/PhpParser/Node/Expr/AssignOp/Concat.php | 5 +- lib/PhpParser/Node/Expr/AssignOp/Div.php | 5 +- lib/PhpParser/Node/Expr/AssignOp/Minus.php | 5 +- lib/PhpParser/Node/Expr/AssignOp/Mod.php | 5 +- lib/PhpParser/Node/Expr/AssignOp/Mul.php | 5 +- lib/PhpParser/Node/Expr/AssignOp/Plus.php | 5 +- lib/PhpParser/Node/Expr/AssignOp/Pow.php | 5 +- .../Node/Expr/AssignOp/ShiftLeft.php | 5 +- .../Node/Expr/AssignOp/ShiftRight.php | 5 +- lib/PhpParser/Node/Expr/AssignRef.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp.php | 7 +- .../Node/Expr/BinaryOp/BitwiseAnd.php | 9 +-- .../Node/Expr/BinaryOp/BitwiseOr.php | 9 +-- .../Node/Expr/BinaryOp/BitwiseXor.php | 9 +-- .../Node/Expr/BinaryOp/BooleanAnd.php | 9 +-- .../Node/Expr/BinaryOp/BooleanOr.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/Concat.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/Div.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/Equal.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/Greater.php | 9 +-- .../Node/Expr/BinaryOp/GreaterOrEqual.php | 9 +-- .../Node/Expr/BinaryOp/Identical.php | 9 +-- .../Node/Expr/BinaryOp/LogicalAnd.php | 9 +-- .../Node/Expr/BinaryOp/LogicalOr.php | 9 +-- .../Node/Expr/BinaryOp/LogicalXor.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/Minus.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/Mod.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/Mul.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php | 9 +-- .../Node/Expr/BinaryOp/NotIdentical.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/Plus.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/Pow.php | 9 +-- .../Node/Expr/BinaryOp/ShiftLeft.php | 9 +-- .../Node/Expr/BinaryOp/ShiftRight.php | 9 +-- lib/PhpParser/Node/Expr/BinaryOp/Smaller.php | 9 +-- .../Node/Expr/BinaryOp/SmallerOrEqual.php | 9 +-- .../Node/Expr/BinaryOp/Spaceship.php | 9 +-- lib/PhpParser/Node/Expr/BitwiseNot.php | 9 +-- lib/PhpParser/Node/Expr/BooleanNot.php | 9 +-- lib/PhpParser/Node/Expr/Cast.php | 5 +- lib/PhpParser/Node/Expr/Cast/Array_.php | 5 +- lib/PhpParser/Node/Expr/Cast/Bool_.php | 5 +- lib/PhpParser/Node/Expr/Cast/Double.php | 5 +- lib/PhpParser/Node/Expr/Cast/Int_.php | 5 +- lib/PhpParser/Node/Expr/Cast/Object_.php | 5 +- lib/PhpParser/Node/Expr/Cast/String_.php | 5 +- lib/PhpParser/Node/Expr/Cast/Unset_.php | 5 +- lib/PhpParser/Node/Expr/ClassConstFetch.php | 9 +-- lib/PhpParser/Node/Expr/Clone_.php | 9 +-- lib/PhpParser/Node/Expr/Closure.php | 15 ++-- lib/PhpParser/Node/Expr/ConstFetch.php | 9 +-- lib/PhpParser/Node/Expr/Empty_.php | 9 +-- lib/PhpParser/Node/Expr/Error.php | 9 +-- lib/PhpParser/Node/Expr/ErrorSuppress.php | 9 +-- lib/PhpParser/Node/Expr/Eval_.php | 9 +-- lib/PhpParser/Node/Expr/Exit_.php | 9 +-- lib/PhpParser/Node/Expr/FuncCall.php | 9 +-- lib/PhpParser/Node/Expr/Include_.php | 9 +-- lib/PhpParser/Node/Expr/Instanceof_.php | 9 +-- lib/PhpParser/Node/Expr/Isset_.php | 9 +-- lib/PhpParser/Node/Expr/List_.php | 9 +-- lib/PhpParser/Node/Expr/Match_.php | 7 +- lib/PhpParser/Node/Expr/MethodCall.php | 9 +-- lib/PhpParser/Node/Expr/New_.php | 9 +-- .../Node/Expr/NullsafeMethodCall.php | 9 +-- .../Node/Expr/NullsafePropertyFetch.php | 9 +-- lib/PhpParser/Node/Expr/PostDec.php | 9 +-- lib/PhpParser/Node/Expr/PostInc.php | 9 +-- lib/PhpParser/Node/Expr/PreDec.php | 7 +- lib/PhpParser/Node/Expr/PreInc.php | 9 +-- lib/PhpParser/Node/Expr/Print_.php | 9 +-- lib/PhpParser/Node/Expr/PropertyFetch.php | 9 +-- lib/PhpParser/Node/Expr/ShellExec.php | 9 +-- lib/PhpParser/Node/Expr/StaticCall.php | 9 +-- .../Node/Expr/StaticPropertyFetch.php | 9 +-- lib/PhpParser/Node/Expr/Ternary.php | 9 +-- lib/PhpParser/Node/Expr/Throw_.php | 7 +- lib/PhpParser/Node/Expr/UnaryMinus.php | 9 +-- lib/PhpParser/Node/Expr/UnaryPlus.php | 9 +-- lib/PhpParser/Node/Expr/Variable.php | 9 +-- lib/PhpParser/Node/Expr/YieldFrom.php | 9 +-- lib/PhpParser/Node/Expr/Yield_.php | 9 +-- lib/PhpParser/Node/FunctionLike.php | 9 +-- lib/PhpParser/Node/Identifier.php | 17 ++-- lib/PhpParser/Node/IntersectionType.php | 8 +- lib/PhpParser/Node/MatchArm.php | 7 +- lib/PhpParser/Node/Name.php | 31 ++++--- lib/PhpParser/Node/Name/FullyQualified.php | 17 ++-- lib/PhpParser/Node/Name/Relative.php | 17 ++-- lib/PhpParser/Node/NullableType.php | 9 +-- lib/PhpParser/Node/Param.php | 7 +- lib/PhpParser/Node/Scalar.php | 3 +- lib/PhpParser/Node/Scalar/DNumber.php | 12 ++- lib/PhpParser/Node/Scalar/Encapsed.php | 9 +-- .../Node/Scalar/EncapsedStringPart.php | 9 +-- lib/PhpParser/Node/Scalar/LNumber.php | 9 +-- lib/PhpParser/Node/Scalar/MagicConst.php | 7 +- .../Node/Scalar/MagicConst/Class_.php | 9 +-- lib/PhpParser/Node/Scalar/MagicConst/Dir.php | 9 +-- lib/PhpParser/Node/Scalar/MagicConst/File.php | 9 +-- .../Node/Scalar/MagicConst/Function_.php | 9 +-- lib/PhpParser/Node/Scalar/MagicConst/Line.php | 9 +-- .../Node/Scalar/MagicConst/Method.php | 9 +-- .../Node/Scalar/MagicConst/Namespace_.php | 9 +-- .../Node/Scalar/MagicConst/Trait_.php | 9 +-- lib/PhpParser/Node/Scalar/String_.php | 18 ++--- lib/PhpParser/Node/Stmt.php | 3 +- lib/PhpParser/Node/Stmt/Break_.php | 9 +-- lib/PhpParser/Node/Stmt/Case_.php | 9 +-- lib/PhpParser/Node/Stmt/Catch_.php | 7 +- lib/PhpParser/Node/Stmt/ClassConst.php | 15 ++-- lib/PhpParser/Node/Stmt/ClassLike.php | 11 ++- lib/PhpParser/Node/Stmt/ClassMethod.php | 27 +++---- lib/PhpParser/Node/Stmt/Class_.php | 15 ++-- lib/PhpParser/Node/Stmt/Const_.php | 9 +-- lib/PhpParser/Node/Stmt/Continue_.php | 9 +-- lib/PhpParser/Node/Stmt/DeclareDeclare.php | 9 +-- lib/PhpParser/Node/Stmt/Declare_.php | 9 +-- lib/PhpParser/Node/Stmt/Do_.php | 9 +-- lib/PhpParser/Node/Stmt/Echo_.php | 9 +-- lib/PhpParser/Node/Stmt/ElseIf_.php | 9 +-- lib/PhpParser/Node/Stmt/Else_.php | 9 +-- lib/PhpParser/Node/Stmt/EnumCase.php | 7 +- lib/PhpParser/Node/Stmt/Enum_.php | 7 +- lib/PhpParser/Node/Stmt/Expression.php | 9 +-- lib/PhpParser/Node/Stmt/Finally_.php | 9 +-- lib/PhpParser/Node/Stmt/For_.php | 9 +-- lib/PhpParser/Node/Stmt/Foreach_.php | 9 +-- lib/PhpParser/Node/Stmt/Function_.php | 15 ++-- lib/PhpParser/Node/Stmt/Global_.php | 9 +-- lib/PhpParser/Node/Stmt/Goto_.php | 9 +-- lib/PhpParser/Node/Stmt/GroupUse.php | 9 +-- lib/PhpParser/Node/Stmt/HaltCompiler.php | 9 +-- lib/PhpParser/Node/Stmt/If_.php | 9 +-- lib/PhpParser/Node/Stmt/InlineHTML.php | 9 +-- lib/PhpParser/Node/Stmt/Interface_.php | 7 +- lib/PhpParser/Node/Stmt/Label.php | 9 +-- lib/PhpParser/Node/Stmt/Namespace_.php | 9 +-- lib/PhpParser/Node/Stmt/Nop.php | 9 +-- lib/PhpParser/Node/Stmt/Property.php | 17 ++-- lib/PhpParser/Node/Stmt/PropertyProperty.php | 9 +-- lib/PhpParser/Node/Stmt/Return_.php | 9 +-- lib/PhpParser/Node/Stmt/StaticVar.php | 9 +-- lib/PhpParser/Node/Stmt/Static_.php | 9 +-- lib/PhpParser/Node/Stmt/Switch_.php | 9 +-- lib/PhpParser/Node/Stmt/Throw_.php | 9 +-- lib/PhpParser/Node/Stmt/TraitUse.php | 9 +-- .../Node/Stmt/TraitUseAdaptation.php | 3 +- .../Node/Stmt/TraitUseAdaptation/Alias.php | 9 +-- .../Stmt/TraitUseAdaptation/Precedence.php | 9 +-- lib/PhpParser/Node/Stmt/Trait_.php | 7 +- lib/PhpParser/Node/Stmt/TryCatch.php | 7 +- lib/PhpParser/Node/Stmt/Unset_.php | 9 +-- lib/PhpParser/Node/Stmt/UseUse.php | 11 ++- lib/PhpParser/Node/Stmt/Use_.php | 9 +-- lib/PhpParser/Node/Stmt/While_.php | 9 +-- lib/PhpParser/Node/UnionType.php | 9 +-- lib/PhpParser/Node/VarLikeIdentifier.php | 5 +- lib/PhpParser/NodeAbstract.php | 25 +++--- lib/PhpParser/NodeDumper.php | 5 +- lib/PhpParser/NodeFinder.php | 11 ++- lib/PhpParser/NodeTraverser.php | 9 +-- lib/PhpParser/NodeTraverserInterface.php | 5 +- lib/PhpParser/NodeVisitor.php | 3 +- lib/PhpParser/NodeVisitor/CloningVisitor.php | 3 +- lib/PhpParser/NodeVisitor/FindingVisitor.php | 5 +- .../NodeVisitor/FirstFindingVisitor.php | 3 +- lib/PhpParser/NodeVisitor/NameResolver.php | 18 ++--- .../NodeVisitor/NodeConnectingVisitor.php | 3 +- .../NodeVisitor/ParentConnectingVisitor.php | 17 ++-- lib/PhpParser/NodeVisitorAbstract.php | 3 +- lib/PhpParser/Parser.php | 3 +- lib/PhpParser/ParserAbstract.php | 25 +++--- lib/PhpParser/ParserFactory.php | 3 +- lib/PhpParser/PrettyPrinter/Standard.php | 16 ++-- lib/PhpParser/PrettyPrinterAbstract.php | 81 +++++++++++-------- 245 files changed, 1033 insertions(+), 1282 deletions(-) create mode 100644 .php-cs-fixer.dist.php diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000000..19efd86641 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,22 @@ +exclude('PhpParser/Parser') + ->in(__DIR__ . '/lib') +; + +$config = new PhpCsFixer\Config(); +return $config->setRules([ + '@PSR12' => true, + // We use PSR12 with consistent brace placement. + 'curly_braces_position' => [ + 'functions_opening_brace' => 'same_line', + 'classes_opening_brace' => 'same_line', + ], + // declare(strict_types=1) on the same line as false, + // Keep argument formatting for now. + 'method_argument_space' => ['on_multiline' => 'ignore'], + ]) + ->setFinder($finder) +; diff --git a/lib/PhpParser/Builder.php b/lib/PhpParser/Builder.php index 26d8921efc..d6aa124c02 100644 --- a/lib/PhpParser/Builder.php +++ b/lib/PhpParser/Builder.php @@ -2,12 +2,11 @@ namespace PhpParser; -interface Builder -{ +interface Builder { /** * Returns the built node. * * @return Node The built node */ - public function getNode() : Node; + public function getNode(): Node; } diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index 058cb23c4d..fc31cd93cf 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -12,8 +12,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class ClassConst implements PhpParser\Builder -{ +class ClassConst implements PhpParser\Builder { protected $flags = 0; protected $attributes = []; protected $constants = []; diff --git a/lib/PhpParser/Builder/Class_.php b/lib/PhpParser/Builder/Class_.php index 38103eb972..6c58b54247 100644 --- a/lib/PhpParser/Builder/Class_.php +++ b/lib/PhpParser/Builder/Class_.php @@ -9,8 +9,7 @@ use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class Class_ extends Declaration -{ +class Class_ extends Declaration { protected $name; protected $extends = null; @@ -135,7 +134,7 @@ public function addAttribute($attribute) { * * @return Stmt\Class_ The built class node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Class_($this->name, [ 'flags' => $this->flags, 'extends' => $this->extends, diff --git a/lib/PhpParser/Builder/Declaration.php b/lib/PhpParser/Builder/Declaration.php index 830949928a..df50cfb676 100644 --- a/lib/PhpParser/Builder/Declaration.php +++ b/lib/PhpParser/Builder/Declaration.php @@ -5,8 +5,7 @@ use PhpParser; use PhpParser\BuilderHelpers; -abstract class Declaration implements PhpParser\Builder -{ +abstract class Declaration implements PhpParser\Builder { protected $attributes = []; abstract public function addStmt($stmt); diff --git a/lib/PhpParser/Builder/EnumCase.php b/lib/PhpParser/Builder/EnumCase.php index 02fa83e624..7856bcc2be 100644 --- a/lib/PhpParser/Builder/EnumCase.php +++ b/lib/PhpParser/Builder/EnumCase.php @@ -10,8 +10,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class EnumCase implements PhpParser\Builder -{ +class EnumCase implements PhpParser\Builder { protected $name; protected $value = null; protected $attributes = []; diff --git a/lib/PhpParser/Builder/Enum_.php b/lib/PhpParser/Builder/Enum_.php index be7eef95f5..1b486943cd 100644 --- a/lib/PhpParser/Builder/Enum_.php +++ b/lib/PhpParser/Builder/Enum_.php @@ -9,8 +9,7 @@ use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class Enum_ extends Declaration -{ +class Enum_ extends Declaration { protected $name; protected $scalarType = null; @@ -106,7 +105,7 @@ public function addAttribute($attribute) { * * @return Stmt\Enum_ The built enum node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Enum_($this->name, [ 'scalarType' => $this->scalarType, 'implements' => $this->implements, diff --git a/lib/PhpParser/Builder/FunctionLike.php b/lib/PhpParser/Builder/FunctionLike.php index 98ea9d3366..1cb92fe0c4 100644 --- a/lib/PhpParser/Builder/FunctionLike.php +++ b/lib/PhpParser/Builder/FunctionLike.php @@ -5,8 +5,7 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; -abstract class FunctionLike extends Declaration -{ +abstract class FunctionLike extends Declaration { protected $returnByRef = false; protected $params = []; diff --git a/lib/PhpParser/Builder/Function_.php b/lib/PhpParser/Builder/Function_.php index 1cd73c0d3b..c7555160c2 100644 --- a/lib/PhpParser/Builder/Function_.php +++ b/lib/PhpParser/Builder/Function_.php @@ -7,8 +7,7 @@ use PhpParser\Node; use PhpParser\Node\Stmt; -class Function_ extends FunctionLike -{ +class Function_ extends FunctionLike { protected $name; protected $stmts = []; @@ -55,7 +54,7 @@ public function addAttribute($attribute) { * * @return Stmt\Function_ The built function node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\Function_($this->name, [ 'byRef' => $this->returnByRef, 'params' => $this->params, diff --git a/lib/PhpParser/Builder/Interface_.php b/lib/PhpParser/Builder/Interface_.php index 7806e85fce..585550d72c 100644 --- a/lib/PhpParser/Builder/Interface_.php +++ b/lib/PhpParser/Builder/Interface_.php @@ -8,8 +8,7 @@ use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class Interface_ extends Declaration -{ +class Interface_ extends Declaration { protected $name; protected $extends = []; protected $constants = []; @@ -83,7 +82,7 @@ public function addAttribute($attribute) { * * @return Stmt\Interface_ The built interface node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Interface_($this->name, [ 'extends' => $this->extends, 'stmts' => array_merge($this->constants, $this->methods), diff --git a/lib/PhpParser/Builder/Method.php b/lib/PhpParser/Builder/Method.php index 68e7023e04..fb4a155387 100644 --- a/lib/PhpParser/Builder/Method.php +++ b/lib/PhpParser/Builder/Method.php @@ -8,8 +8,7 @@ use PhpParser\Node; use PhpParser\Node\Stmt; -class Method extends FunctionLike -{ +class Method extends FunctionLike { protected $name; protected $flags = 0; @@ -134,7 +133,7 @@ public function addAttribute($attribute) { * * @return Stmt\ClassMethod The built method node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\ClassMethod($this->name, [ 'flags' => $this->flags, 'byRef' => $this->returnByRef, diff --git a/lib/PhpParser/Builder/Namespace_.php b/lib/PhpParser/Builder/Namespace_.php index 1c751e163a..ec7dc3ea34 100644 --- a/lib/PhpParser/Builder/Namespace_.php +++ b/lib/PhpParser/Builder/Namespace_.php @@ -7,8 +7,7 @@ use PhpParser\Node; use PhpParser\Node\Stmt; -class Namespace_ extends Declaration -{ +class Namespace_ extends Declaration { private $name; private $stmts = []; @@ -39,7 +38,7 @@ public function addStmt($stmt) { * * @return Stmt\Namespace_ The built node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\Namespace_($this->name, $this->stmts, $this->attributes); } } diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index 793fc93337..7f2a41d2db 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -6,8 +6,7 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; -class Param implements PhpParser\Builder -{ +class Param implements PhpParser\Builder { protected $name; protected $default = null; @@ -100,7 +99,7 @@ public function addAttribute($attribute) { * * @return Node\Param The built parameter node */ - public function getNode() : Node { + public function getNode(): Node { return new Node\Param( new Node\Expr\Variable($this->name), $this->default, $this->type, $this->byRef, $this->variadic, [], 0, $this->attributeGroups diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index f8c352ad07..2fd67a88cb 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -11,8 +11,7 @@ use PhpParser\Node\Stmt; use PhpParser\Node\ComplexType; -class Property implements PhpParser\Builder -{ +class Property implements PhpParser\Builder { protected $name; protected $flags = 0; @@ -148,7 +147,7 @@ public function addAttribute($attribute) { * * @return Stmt\Property The built property node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Property( $this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, [ diff --git a/lib/PhpParser/Builder/TraitUse.php b/lib/PhpParser/Builder/TraitUse.php index 311e8cd7b6..17e8a447f5 100644 --- a/lib/PhpParser/Builder/TraitUse.php +++ b/lib/PhpParser/Builder/TraitUse.php @@ -7,8 +7,7 @@ use PhpParser\Node; use PhpParser\Node\Stmt; -class TraitUse implements Builder -{ +class TraitUse implements Builder { protected $traits = []; protected $adaptations = []; @@ -58,7 +57,7 @@ public function with($adaptation) { * * @return Node The built node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\TraitUse($this->traits, $this->adaptations); } } diff --git a/lib/PhpParser/Builder/TraitUseAdaptation.php b/lib/PhpParser/Builder/TraitUseAdaptation.php index d6d7262428..b416429e77 100644 --- a/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -8,8 +8,7 @@ use PhpParser\Node; use PhpParser\Node\Stmt; -class TraitUseAdaptation implements Builder -{ +class TraitUseAdaptation implements Builder { public const TYPE_UNDEFINED = 0; public const TYPE_ALIAS = 1; public const TYPE_PRECEDENCE = 2; @@ -34,7 +33,7 @@ class TraitUseAdaptation implements Builder public function __construct($trait, $method) { $this->type = self::TYPE_UNDEFINED; - $this->trait = is_null($trait)? null: BuilderHelpers::normalizeName($trait); + $this->trait = is_null($trait) ? null : BuilderHelpers::normalizeName($trait); $this->method = BuilderHelpers::normalizeIdentifier($method); } @@ -136,7 +135,7 @@ protected function setModifier(int $modifier) { * * @return Node The built node */ - public function getNode() : Node { + public function getNode(): Node { switch ($this->type) { case self::TYPE_ALIAS: return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias); diff --git a/lib/PhpParser/Builder/Trait_.php b/lib/PhpParser/Builder/Trait_.php index 97f32f98d6..92d66949c1 100644 --- a/lib/PhpParser/Builder/Trait_.php +++ b/lib/PhpParser/Builder/Trait_.php @@ -7,8 +7,7 @@ use PhpParser\Node; use PhpParser\Node\Stmt; -class Trait_ extends Declaration -{ +class Trait_ extends Declaration { protected $name; protected $uses = []; protected $properties = []; @@ -67,7 +66,7 @@ public function addAttribute($attribute) { * * @return Stmt\Trait_ The built interface node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Trait_( $this->name, [ 'stmts' => array_merge($this->uses, $this->properties, $this->methods), diff --git a/lib/PhpParser/Builder/Use_.php b/lib/PhpParser/Builder/Use_.php index 4bd3d12df0..7caed263d4 100644 --- a/lib/PhpParser/Builder/Use_.php +++ b/lib/PhpParser/Builder/Use_.php @@ -7,8 +7,7 @@ use PhpParser\Node; use PhpParser\Node\Stmt; -class Use_ implements Builder -{ +class Use_ implements Builder { protected $name; protected $type; protected $alias = null; @@ -41,7 +40,7 @@ public function as(string $alias) { * * @return Stmt\Use_ The built node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\Use_([ new Stmt\UseUse($this->name, $this->alias) ], $this->type); diff --git a/lib/PhpParser/BuilderFactory.php b/lib/PhpParser/BuilderFactory.php index fef2579b3e..4e77f857a9 100644 --- a/lib/PhpParser/BuilderFactory.php +++ b/lib/PhpParser/BuilderFactory.php @@ -10,8 +10,7 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Use_; -class BuilderFactory -{ +class BuilderFactory { /** * Creates an attribute node. * @@ -20,7 +19,7 @@ class BuilderFactory * * @return Node\Attribute */ - public function attribute($name, array $args = []) : Node\Attribute { + public function attribute($name, array $args = []): Node\Attribute { return new Node\Attribute( BuilderHelpers::normalizeName($name), $this->args($args) @@ -34,7 +33,7 @@ public function attribute($name, array $args = []) : Node\Attribute { * * @return Builder\Namespace_ The created namespace builder */ - public function namespace($name) : Builder\Namespace_ { + public function namespace($name): Builder\Namespace_ { return new Builder\Namespace_($name); } @@ -45,7 +44,7 @@ public function namespace($name) : Builder\Namespace_ { * * @return Builder\Class_ The created class builder */ - public function class(string $name) : Builder\Class_ { + public function class(string $name): Builder\Class_ { return new Builder\Class_($name); } @@ -56,7 +55,7 @@ public function class(string $name) : Builder\Class_ { * * @return Builder\Interface_ The created interface builder */ - public function interface(string $name) : Builder\Interface_ { + public function interface(string $name): Builder\Interface_ { return new Builder\Interface_($name); } @@ -67,7 +66,7 @@ public function interface(string $name) : Builder\Interface_ { * * @return Builder\Trait_ The created trait builder */ - public function trait(string $name) : Builder\Trait_ { + public function trait(string $name): Builder\Trait_ { return new Builder\Trait_($name); } @@ -78,7 +77,7 @@ public function trait(string $name) : Builder\Trait_ { * * @return Builder\Enum_ The created enum builder */ - public function enum(string $name) : Builder\Enum_ { + public function enum(string $name): Builder\Enum_ { return new Builder\Enum_($name); } @@ -89,7 +88,7 @@ public function enum(string $name) : Builder\Enum_ { * * @return Builder\TraitUse The create trait use builder */ - public function useTrait(...$traits) : Builder\TraitUse { + public function useTrait(...$traits): Builder\TraitUse { return new Builder\TraitUse(...$traits); } @@ -101,7 +100,7 @@ public function useTrait(...$traits) : Builder\TraitUse { * * @return Builder\TraitUseAdaptation The create trait use adaptation builder */ - public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAdaptation { + public function traitUseAdaptation($trait, $method = null): Builder\TraitUseAdaptation { if ($method === null) { $method = $trait; $trait = null; @@ -117,7 +116,7 @@ public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAda * * @return Builder\Method The created method builder */ - public function method(string $name) : Builder\Method { + public function method(string $name): Builder\Method { return new Builder\Method($name); } @@ -128,7 +127,7 @@ public function method(string $name) : Builder\Method { * * @return Builder\Param The created parameter builder */ - public function param(string $name) : Builder\Param { + public function param(string $name): Builder\Param { return new Builder\Param($name); } @@ -139,7 +138,7 @@ public function param(string $name) : Builder\Param { * * @return Builder\Property The created property builder */ - public function property(string $name) : Builder\Property { + public function property(string $name): Builder\Property { return new Builder\Property($name); } @@ -150,7 +149,7 @@ public function property(string $name) : Builder\Property { * * @return Builder\Function_ The created function builder */ - public function function(string $name) : Builder\Function_ { + public function function(string $name): Builder\Function_ { return new Builder\Function_($name); } @@ -161,7 +160,7 @@ public function function(string $name) : Builder\Function_ { * * @return Builder\Use_ The created use builder */ - public function use($name) : Builder\Use_ { + public function use($name): Builder\Use_ { return new Builder\Use_($name, Use_::TYPE_NORMAL); } @@ -172,7 +171,7 @@ public function use($name) : Builder\Use_ { * * @return Builder\Use_ The created use function builder */ - public function useFunction($name) : Builder\Use_ { + public function useFunction($name): Builder\Use_ { return new Builder\Use_($name, Use_::TYPE_FUNCTION); } @@ -183,7 +182,7 @@ public function useFunction($name) : Builder\Use_ { * * @return Builder\Use_ The created use const builder */ - public function useConst($name) : Builder\Use_ { + public function useConst($name): Builder\Use_ { return new Builder\Use_($name, Use_::TYPE_CONSTANT); } @@ -195,7 +194,7 @@ public function useConst($name) : Builder\Use_ { * * @return Builder\ClassConst The created use const builder */ - public function classConst($name, $value) : Builder\ClassConst { + public function classConst($name, $value): Builder\ClassConst { return new Builder\ClassConst($name, $value); } @@ -206,7 +205,7 @@ public function classConst($name, $value) : Builder\ClassConst { * * @return Builder\EnumCase The created use const builder */ - public function enumCase($name) : Builder\EnumCase { + public function enumCase($name): Builder\EnumCase { return new Builder\EnumCase($name); } @@ -217,7 +216,7 @@ public function enumCase($name) : Builder\EnumCase { * * @return Expr */ - public function val($value) : Expr { + public function val($value): Expr { return BuilderHelpers::normalizeValue($value); } @@ -228,7 +227,7 @@ public function val($value) : Expr { * * @return Expr\Variable */ - public function var($name) : Expr\Variable { + public function var($name): Expr\Variable { if (!\is_string($name) && !$name instanceof Expr) { throw new \LogicException('Variable name must be string or Expr'); } @@ -245,7 +244,7 @@ public function var($name) : Expr\Variable { * * @return Arg[] */ - public function args(array $args) : array { + public function args(array $args): array { $normalizedArgs = []; foreach ($args as $key => $arg) { if (!($arg instanceof Arg)) { @@ -267,7 +266,7 @@ public function args(array $args) : array { * * @return Expr\FuncCall */ - public function funcCall($name, array $args = []) : Expr\FuncCall { + public function funcCall($name, array $args = []): Expr\FuncCall { return new Expr\FuncCall( BuilderHelpers::normalizeNameOrExpr($name), $this->args($args) @@ -283,7 +282,7 @@ public function funcCall($name, array $args = []) : Expr\FuncCall { * * @return Expr\MethodCall */ - public function methodCall(Expr $var, $name, array $args = []) : Expr\MethodCall { + public function methodCall(Expr $var, $name, array $args = []): Expr\MethodCall { return new Expr\MethodCall( $var, BuilderHelpers::normalizeIdentifierOrExpr($name), @@ -300,7 +299,7 @@ public function methodCall(Expr $var, $name, array $args = []) : Expr\MethodCall * * @return Expr\StaticCall */ - public function staticCall($class, $name, array $args = []) : Expr\StaticCall { + public function staticCall($class, $name, array $args = []): Expr\StaticCall { return new Expr\StaticCall( BuilderHelpers::normalizeNameOrExpr($class), BuilderHelpers::normalizeIdentifierOrExpr($name), @@ -316,7 +315,7 @@ public function staticCall($class, $name, array $args = []) : Expr\StaticCall { * * @return Expr\New_ */ - public function new($class, array $args = []) : Expr\New_ { + public function new($class, array $args = []): Expr\New_ { return new Expr\New_( BuilderHelpers::normalizeNameOrExpr($class), $this->args($args) @@ -330,7 +329,7 @@ public function new($class, array $args = []) : Expr\New_ { * * @return Expr\ConstFetch */ - public function constFetch($name) : Expr\ConstFetch { + public function constFetch($name): Expr\ConstFetch { return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); } @@ -342,7 +341,7 @@ public function constFetch($name) : Expr\ConstFetch { * * @return Expr\PropertyFetch */ - public function propertyFetch(Expr $var, $name) : Expr\PropertyFetch { + public function propertyFetch(Expr $var, $name): Expr\PropertyFetch { return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name)); } @@ -368,7 +367,7 @@ public function classConstFetch($class, $name): Expr\ClassConstFetch { * * @return Concat */ - public function concat(...$exprs) : Concat { + public function concat(...$exprs): Concat { $numExprs = count($exprs); if ($numExprs < 2) { throw new \LogicException('Expected at least two expressions'); @@ -385,7 +384,7 @@ public function concat(...$exprs) : Concat { * @param string|Expr $expr * @return Expr */ - private function normalizeStringExpr($expr) : Expr { + private function normalizeStringExpr($expr): Expr { if ($expr instanceof Expr) { return $expr; } diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index af6ceb9968..069def81e6 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -15,8 +15,7 @@ * * @internal */ -final class BuilderHelpers -{ +final class BuilderHelpers { /** * Normalizes a node: Converts builder objects to nodes. * @@ -24,7 +23,7 @@ final class BuilderHelpers * * @return Node The normalized node */ - public static function normalizeNode($node) : Node { + public static function normalizeNode($node): Node { if ($node instanceof Builder) { return $node->getNode(); } @@ -45,7 +44,7 @@ public static function normalizeNode($node) : Node { * * @return Stmt The normalized statement node */ - public static function normalizeStmt($node) : Stmt { + public static function normalizeStmt($node): Stmt { $node = self::normalizeNode($node); if ($node instanceof Stmt) { return $node; @@ -65,7 +64,7 @@ public static function normalizeStmt($node) : Stmt { * * @return Identifier The normalized identifier */ - public static function normalizeIdentifier($name) : Identifier { + public static function normalizeIdentifier($name): Identifier { if ($name instanceof Identifier) { return $name; } @@ -103,7 +102,7 @@ public static function normalizeIdentifierOrExpr($name) { * * @return Name The normalized name */ - public static function normalizeName($name) : Name { + public static function normalizeName($name): Name { if ($name instanceof Name) { return $name; } @@ -219,7 +218,7 @@ public static function normalizeType($type) { * * @return Expr The normalized value */ - public static function normalizeValue($value) : Expr { + public static function normalizeValue($value): Expr { if ($value instanceof Node\Expr) { return $value; } @@ -279,7 +278,7 @@ public static function normalizeValue($value) : Expr { * * @return Comment\Doc The normalized doc comment */ - public static function normalizeDocComment($docComment) : Comment\Doc { + public static function normalizeDocComment($docComment): Comment\Doc { if ($docComment instanceof Comment\Doc) { return $docComment; } @@ -298,8 +297,7 @@ public static function normalizeDocComment($docComment) : Comment\Doc { * * @return Node\AttributeGroup The Attribute Group */ - public static function normalizeAttribute($attribute) : Node\AttributeGroup - { + public static function normalizeAttribute($attribute): Node\AttributeGroup { if ($attribute instanceof Node\AttributeGroup) { return $attribute; } @@ -319,7 +317,7 @@ public static function normalizeAttribute($attribute) : Node\AttributeGroup * * @return int New modifiers */ - public static function addModifier(int $modifiers, int $modifier) : int { + public static function addModifier(int $modifiers, int $modifier): int { Stmt\Class_::verifyModifier($modifiers, $modifier); return $modifiers | $modifier; } @@ -328,7 +326,7 @@ public static function addModifier(int $modifiers, int $modifier) : int { * Adds a modifier and returns new modifier bitmask. * @return int New modifiers */ - public static function addClassModifier(int $existingModifiers, int $modifierToSet) : int { + public static function addClassModifier(int $existingModifiers, int $modifierToSet): int { Stmt\Class_::verifyClassModifier($existingModifiers, $modifierToSet); return $existingModifiers | $modifierToSet; } diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index 7e6e41a526..2cc491b853 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -2,8 +2,7 @@ namespace PhpParser; -class Comment implements \JsonSerializable -{ +class Comment implements \JsonSerializable { protected $text; protected $startLine; protected $startFilePos; @@ -39,7 +38,7 @@ public function __construct( * * @return string The comment text (including comment delimiters like /*) */ - public function getText() : string { + public function getText(): string { return $this->text; } @@ -48,7 +47,7 @@ public function getText() : string { * * @return int Line number (or -1 if not available) */ - public function getStartLine() : int { + public function getStartLine(): int { return $this->startLine; } @@ -57,7 +56,7 @@ public function getStartLine() : int { * * @return int File offset (or -1 if not available) */ - public function getStartFilePos() : int { + public function getStartFilePos(): int { return $this->startFilePos; } @@ -66,7 +65,7 @@ public function getStartFilePos() : int { * * @return int Token offset (or -1 if not available) */ - public function getStartTokenPos() : int { + public function getStartTokenPos(): int { return $this->startTokenPos; } @@ -75,7 +74,7 @@ public function getStartTokenPos() : int { * * @return int Line number (or -1 if not available) */ - public function getEndLine() : int { + public function getEndLine(): int { return $this->endLine; } @@ -84,7 +83,7 @@ public function getEndLine() : int { * * @return int File offset (or -1 if not available) */ - public function getEndFilePos() : int { + public function getEndFilePos(): int { return $this->endFilePos; } @@ -93,7 +92,7 @@ public function getEndFilePos() : int { * * @return int Token offset (or -1 if not available) */ - public function getEndTokenPos() : int { + public function getEndTokenPos(): int { return $this->endTokenPos; } @@ -104,7 +103,7 @@ public function getEndTokenPos() : int { * * @return int Line number */ - public function getLine() : int { + public function getLine(): int { return $this->startLine; } @@ -115,7 +114,7 @@ public function getLine() : int { * * @return int File offset */ - public function getFilePos() : int { + public function getFilePos(): int { return $this->startFilePos; } @@ -126,7 +125,7 @@ public function getFilePos() : int { * * @return int Token offset */ - public function getTokenPos() : int { + public function getTokenPos(): int { return $this->startTokenPos; } @@ -135,7 +134,7 @@ public function getTokenPos() : int { * * @return string The comment text (including comment delimiters like /*) */ - public function __toString() : string { + public function __toString(): string { return $this->text; } @@ -207,7 +206,7 @@ public function getReformattedText() { * @param string $str String to check * @return int Length in characters. Tabs count as single characters. */ - private function getShortestWhitespacePrefixLen(string $str) : int { + private function getShortestWhitespacePrefixLen(string $str): int { $lines = explode("\n", $str); $shortestPrefixLen = \INF; foreach ($lines as $line) { @@ -224,7 +223,7 @@ private function getShortestWhitespacePrefixLen(string $str) : int { * @return array * @psalm-return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} */ - public function jsonSerialize() : array { + public function jsonSerialize(): array { // Technically not a node, but we make it look like one anyway $type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment'; return [ diff --git a/lib/PhpParser/Comment/Doc.php b/lib/PhpParser/Comment/Doc.php index a9db6128f4..bb3e9146af 100644 --- a/lib/PhpParser/Comment/Doc.php +++ b/lib/PhpParser/Comment/Doc.php @@ -2,6 +2,5 @@ namespace PhpParser\Comment; -class Doc extends \PhpParser\Comment -{ +class Doc extends \PhpParser\Comment { } diff --git a/lib/PhpParser/ConstExprEvaluationException.php b/lib/PhpParser/ConstExprEvaluationException.php index ce5f9b2b71..7964058a6e 100644 --- a/lib/PhpParser/ConstExprEvaluationException.php +++ b/lib/PhpParser/ConstExprEvaluationException.php @@ -2,5 +2,5 @@ namespace PhpParser; -class ConstExprEvaluationException extends \Exception -{} +class ConstExprEvaluationException extends \Exception { +} diff --git a/lib/PhpParser/ConstExprEvaluator.php b/lib/PhpParser/ConstExprEvaluator.php index 06b73cc80d..09328880fd 100644 --- a/lib/PhpParser/ConstExprEvaluator.php +++ b/lib/PhpParser/ConstExprEvaluator.php @@ -2,10 +2,11 @@ namespace PhpParser; -use function array_merge; use PhpParser\Node\Expr; use PhpParser\Node\Scalar; +use function array_merge; + /** * Evaluates constant expressions. * @@ -25,8 +26,7 @@ * point to string conversions are affected by the precision ini setting. Secondly, they are also * affected by the LC_NUMERIC locale. */ -class ConstExprEvaluator -{ +class ConstExprEvaluator { private $fallbackEvaluator; /** @@ -38,7 +38,7 @@ class ConstExprEvaluator * @param callable|null $fallbackEvaluator To call if subexpression cannot be evaluated */ public function __construct(?callable $fallbackEvaluator = null) { - $this->fallbackEvaluator = $fallbackEvaluator ?? function(Expr $expr) { + $this->fallbackEvaluator = $fallbackEvaluator ?? function (Expr $expr) { throw new ConstExprEvaluationException( "Expression of type {$expr->getType()} cannot be evaluated" ); @@ -63,7 +63,7 @@ public function __construct(?callable $fallbackEvaluator = null) { * @throws ConstExprEvaluationException if the expression cannot be evaluated or an error occurred */ public function evaluateSilently(Expr $expr) { - set_error_handler(function($num, $str, $file, $line) { + set_error_handler(function ($num, $str, $file, $line) { throw new \ErrorException($str, 0, $num, $file, $line); }); diff --git a/lib/PhpParser/Error.php b/lib/PhpParser/Error.php index d1fb959d19..12a7724dc0 100644 --- a/lib/PhpParser/Error.php +++ b/lib/PhpParser/Error.php @@ -2,8 +2,7 @@ namespace PhpParser; -class Error extends \RuntimeException -{ +class Error extends \RuntimeException { protected $rawMessage; protected $attributes; @@ -29,7 +28,7 @@ public function __construct(string $message, $attributes = []) { * * @return string Error message */ - public function getRawMessage() : string { + public function getRawMessage(): string { return $this->rawMessage; } @@ -38,7 +37,7 @@ public function getRawMessage() : string { * * @return int Error start line */ - public function getStartLine() : int { + public function getStartLine(): int { return $this->attributes['startLine'] ?? -1; } @@ -47,7 +46,7 @@ public function getStartLine() : int { * * @return int Error end line */ - public function getEndLine() : int { + public function getEndLine(): int { return $this->attributes['endLine'] ?? -1; } @@ -56,7 +55,7 @@ public function getEndLine() : int { * * @return array */ - public function getAttributes() : array { + public function getAttributes(): array { return $this->attributes; } @@ -97,7 +96,7 @@ public function setStartLine(int $line) { * * @return bool */ - public function hasColumnInfo() : bool { + public function hasColumnInfo(): bool { return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']); } @@ -107,7 +106,7 @@ public function hasColumnInfo() : bool { * @param string $code Source code of the file * @return int */ - public function getStartColumn(string $code) : int { + public function getStartColumn(string $code): int { if (!$this->hasColumnInfo()) { throw new \RuntimeException('Error does not have column information'); } @@ -121,7 +120,7 @@ public function getStartColumn(string $code) : int { * @param string $code Source code of the file * @return int */ - public function getEndColumn(string $code) : int { + public function getEndColumn(string $code): int { if (!$this->hasColumnInfo()) { throw new \RuntimeException('Error does not have column information'); } @@ -136,7 +135,7 @@ public function getEndColumn(string $code) : int { * * @return string Formatted message */ - public function getMessageWithColumnInfo(string $code) : string { + public function getMessageWithColumnInfo(string $code): string { return sprintf( '%s from %d:%d to %d:%d', $this->getRawMessage(), $this->getStartLine(), $this->getStartColumn($code), @@ -152,7 +151,7 @@ public function getMessageWithColumnInfo(string $code) : string { * * @return int 1-based column (relative to start of line) */ - private function toColumn(string $code, int $pos) : int { + private function toColumn(string $code, int $pos): int { if ($pos > strlen($code)) { throw new \RuntimeException('Invalid position information'); } diff --git a/lib/PhpParser/ErrorHandler.php b/lib/PhpParser/ErrorHandler.php index d620e74536..96d587063c 100644 --- a/lib/PhpParser/ErrorHandler.php +++ b/lib/PhpParser/ErrorHandler.php @@ -2,8 +2,7 @@ namespace PhpParser; -interface ErrorHandler -{ +interface ErrorHandler { /** * Handle an error generated during lexing, parsing or some other operation. * diff --git a/lib/PhpParser/ErrorHandler/Collecting.php b/lib/PhpParser/ErrorHandler/Collecting.php index 784b61b143..5eff5fac9f 100644 --- a/lib/PhpParser/ErrorHandler/Collecting.php +++ b/lib/PhpParser/ErrorHandler/Collecting.php @@ -10,8 +10,7 @@ * * This allows graceful handling of errors. */ -class Collecting implements ErrorHandler -{ +class Collecting implements ErrorHandler { /** @var Error[] Collected errors */ private $errors = []; @@ -24,7 +23,7 @@ public function handleError(Error $error) { * * @return Error[] */ - public function getErrors() : array { + public function getErrors(): array { return $this->errors; } @@ -33,7 +32,7 @@ public function getErrors() : array { * * @return bool */ - public function hasErrors() : bool { + public function hasErrors(): bool { return !empty($this->errors); } diff --git a/lib/PhpParser/ErrorHandler/Throwing.php b/lib/PhpParser/ErrorHandler/Throwing.php index aeee989b1a..da6cb25f40 100644 --- a/lib/PhpParser/ErrorHandler/Throwing.php +++ b/lib/PhpParser/ErrorHandler/Throwing.php @@ -10,8 +10,7 @@ * * This is the default strategy used by all components. */ -class Throwing implements ErrorHandler -{ +class Throwing implements ErrorHandler { public function handleError(Error $error) { throw $error; } diff --git a/lib/PhpParser/Internal/DiffElem.php b/lib/PhpParser/Internal/DiffElem.php index a26d557a02..d10409f400 100644 --- a/lib/PhpParser/Internal/DiffElem.php +++ b/lib/PhpParser/Internal/DiffElem.php @@ -5,8 +5,7 @@ /** * @internal */ -class DiffElem -{ +class DiffElem { public const TYPE_KEEP = 0; public const TYPE_REMOVE = 1; public const TYPE_ADD = 2; diff --git a/lib/PhpParser/Internal/Differ.php b/lib/PhpParser/Internal/Differ.php index 8c919699fe..dff5977332 100644 --- a/lib/PhpParser/Internal/Differ.php +++ b/lib/PhpParser/Internal/Differ.php @@ -10,8 +10,7 @@ * * @internal */ -class Differ -{ +class Differ { private $isEqual; /** diff --git a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index bc84b880b9..d4b31c1581 100644 --- a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -15,8 +15,7 @@ * * @internal */ -class PrintableNewAnonClassNode extends Expr -{ +class PrintableNewAnonClassNode extends Expr { /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; /** @var Node\Arg[] Arguments */ @@ -51,11 +50,11 @@ public static function fromNewNode(Expr\New_ $newNode) { ); } - public function getType() : string { + public function getType(): string { return 'Expr_PrintableNewAnonClass'; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'args', 'extends', 'implements', 'stmts']; } } diff --git a/lib/PhpParser/Internal/TokenPolyfill.php b/lib/PhpParser/Internal/TokenPolyfill.php index ba414dc807..f854fb9261 100644 --- a/lib/PhpParser/Internal/TokenPolyfill.php +++ b/lib/PhpParser/Internal/TokenPolyfill.php @@ -3,7 +3,8 @@ namespace PhpParser\Internal; if (\PHP_VERSION_ID >= 80000) { - class TokenPolyfill extends \PhpToken {} + class TokenPolyfill extends \PhpToken { + } return; } @@ -78,7 +79,7 @@ public function is($kind): bool { if ($this->id === $entry) { return true; } - } else if (\is_string($entry)) { + } elseif (\is_string($entry)) { if ($this->text === $entry) { return true; } @@ -196,7 +197,7 @@ public static function tokenize(string $code, int $flags = 0): array { if ($j > $i + 1) { if ($id === \T_NS_SEPARATOR) { $id = \T_NAME_FULLY_QUALIFIED; - } else if ($id === \T_NAMESPACE) { + } elseif ($id === \T_NAMESPACE) { $id = \T_NAME_RELATIVE; } else { $id = \T_NAME_QUALIFIED; diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index 87d0773d82..72a28dcae9 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -9,8 +9,7 @@ * * @internal */ -class TokenStream -{ +class TokenStream { /** @var Token[] Tokens (in PhpToken::tokenize() format) */ private $tokens; /** @var int[] Map from position to indentation */ @@ -34,7 +33,7 @@ public function __construct(array $tokens) { * * @return bool */ - public function haveParens(int $startPos, int $endPos) : bool { + public function haveParens(int $startPos, int $endPos): bool { return $this->haveTokenImmediatelyBefore($startPos, '(') && $this->haveTokenImmediatelyAfter($endPos, ')'); } @@ -47,7 +46,7 @@ public function haveParens(int $startPos, int $endPos) : bool { * * @return bool */ - public function haveBraces(int $startPos, int $endPos) : bool { + public function haveBraces(int $startPos, int $endPos): bool { return ($this->haveTokenImmediatelyBefore($startPos, '{') || $this->haveTokenImmediatelyBefore($startPos, T_CURLY_OPEN)) && $this->haveTokenImmediatelyAfter($endPos, '}'); @@ -63,7 +62,7 @@ public function haveBraces(int $startPos, int $endPos) : bool { * * @return bool Whether the expected token was found */ - public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool { + public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType): bool { $tokens = $this->tokens; $pos--; for (; $pos >= 0; $pos--) { @@ -88,7 +87,7 @@ public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool * * @return bool Whether the expected token was found */ - public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType) : bool { + public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType): bool { $tokens = $this->tokens; $pos++; for ($c = \count($tokens); $pos < $c; $pos++) { @@ -210,7 +209,7 @@ public function haveBracesInRange(int $startPos, int $endPos) { * * @return int Indentation depth (in spaces) */ - public function getIndentationBefore(int $pos) : int { + public function getIndentationBefore(int $pos): int { return $this->indentMap[$pos]; } @@ -223,7 +222,7 @@ public function getIndentationBefore(int $pos) : int { * * @return string Code corresponding to token range, adjusted for indentation */ - public function getTokenCode(int $from, int $to, int $indent) : string { + public function getTokenCode(int $from, int $to, int $indent): string { $tokens = $this->tokens; $result = ''; for ($pos = $from; $pos < $to; $pos++) { diff --git a/lib/PhpParser/JsonDecoder.php b/lib/PhpParser/JsonDecoder.php index 47d2003d4b..fa9d661977 100644 --- a/lib/PhpParser/JsonDecoder.php +++ b/lib/PhpParser/JsonDecoder.php @@ -2,8 +2,7 @@ namespace PhpParser; -class JsonDecoder -{ +class JsonDecoder { /** @var \ReflectionClass[] Node type to reflection class map */ private $reflectionClassCache; @@ -29,7 +28,7 @@ private function decodeRecursive($value) { return $value; } - private function decodeArray(array $array) : array { + private function decodeArray(array $array): array { $decodedArray = []; foreach ($array as $key => $value) { $decodedArray[$key] = $this->decodeRecursive($value); @@ -37,7 +36,7 @@ private function decodeArray(array $array) : array { return $decodedArray; } - private function decodeNode(array $value) : Node { + private function decodeNode(array $value): Node { $nodeType = $value['nodeType']; if (!\is_string($nodeType)) { throw new \RuntimeException('Node type must be a string'); @@ -66,7 +65,7 @@ private function decodeNode(array $value) : Node { return $node; } - private function decodeComment(array $value) : Comment { + private function decodeComment(array $value): Comment { $className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class; if (!isset($value['text'])) { throw new \RuntimeException('Comment must have text'); @@ -79,7 +78,7 @@ private function decodeComment(array $value) : Comment { ); } - private function reflectionClassFromNodeType(string $nodeType) : \ReflectionClass { + private function reflectionClassFromNodeType(string $nodeType): \ReflectionClass { if (!isset($this->reflectionClassCache[$nodeType])) { $className = $this->classNameFromNodeType($nodeType); $this->reflectionClassCache[$nodeType] = new \ReflectionClass($className); @@ -87,7 +86,7 @@ private function reflectionClassFromNodeType(string $nodeType) : \ReflectionClas return $this->reflectionClassCache[$nodeType]; } - private function classNameFromNodeType(string $nodeType) : string { + private function classNameFromNodeType(string $nodeType): string { $className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\'); if (class_exists($className)) { return $className; diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 3c28bafc77..842852af0e 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -6,8 +6,7 @@ require __DIR__ . '/compatibility_tokens.php'; -class Lexer -{ +class Lexer { /** @var string Code being tokenized */ protected $code; /** @var Token[] Array of tokens */ diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index c1bc947ad4..39d8d26474 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -19,8 +19,7 @@ use PhpParser\Lexer\TokenEmulator\TokenEmulator; use PhpParser\PhpVersion; -class Emulative extends Lexer -{ +class Emulative extends Lexer { /** @var mixed[] Patches used to reverse changes introduced in the code */ private $patches = []; @@ -37,8 +36,7 @@ class Emulative extends Lexer * 'phpVersion' (PhpVersion object or string) that specifies the * version to emulate. Defaults to newest supported. */ - public function __construct(array $options = []) - { + public function __construct(array $options = []) { $version = $options['phpVersion'] ?? PhpVersion::getNewestSupported(); if (!$version instanceof PhpVersion) { $version = PhpVersion::fromString($version); @@ -68,14 +66,14 @@ public function __construct(array $options = []) $emulatorPhpVersion = $emulator->getPhpVersion(); if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) { $this->emulators[] = $emulator; - } else if ($this->isReverseEmulationNeeded($emulatorPhpVersion)) { + } elseif ($this->isReverseEmulationNeeded($emulatorPhpVersion)) { $this->emulators[] = new ReverseEmulator($emulator); } } } public function startLexing(string $code, ?ErrorHandler $errorHandler = null) { - $emulators = array_filter($this->emulators, function($emulator) use($code) { + $emulators = array_filter($this->emulators, function ($emulator) use ($code) { return $emulator->isEmulationNeeded($code); }); @@ -118,17 +116,15 @@ private function isReverseEmulationNeeded(PhpVersion $emulatorPhpVersion): bool && $this->targetPhpVersion->older($emulatorPhpVersion); } - private function sortPatches() - { + private function sortPatches() { // Patches may be contributed by different emulators. // Make sure they are sorted by increasing patch position. - usort($this->patches, function($p1, $p2) { + usort($this->patches, function ($p1, $p2) { return $p1[0] <=> $p2[0]; }); } - private function fixupTokens() - { + private function fixupTokens() { if (\count($this->patches) === 0) { return; } @@ -166,7 +162,7 @@ private function fixupTokens() $token->text, $patchText, $patchPos - $pos + $localPosDelta, 0 ); $localPosDelta += $patchTextLen; - } else if ($patchType === 'replace') { + } elseif ($patchType === 'replace') { // Replace inside the token string $token->text = substr_replace( $token->text, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen @@ -211,7 +207,7 @@ private function fixupErrors(array $errors) { if ($patchType === 'add') { $posDelta += strlen($patchText); $lineDelta += substr_count($patchText, "\n"); - } else if ($patchType === 'remove') { + } elseif ($patchType === 'remove') { $posDelta -= strlen($patchText); $lineDelta -= substr_count($patchText, "\n"); } diff --git a/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php index b24387bb51..2c12f33ae6 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php @@ -5,20 +5,16 @@ use PhpParser\PhpVersion; use PhpParser\Token; -final class AttributeEmulator extends TokenEmulator -{ - public function getPhpVersion(): PhpVersion - { +final class AttributeEmulator extends TokenEmulator { + public function getPhpVersion(): PhpVersion { return PhpVersion::fromComponents(8, 0); } - public function isEmulationNeeded(string $code) : bool - { + public function isEmulationNeeded(string $code): bool { return strpos($code, '#[') !== false; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { // We need to manually iterate and manage a count because we'll change // the tokens array on the way. for ($i = 0, $c = count($tokens); $i < $c; ++$i) { @@ -35,8 +31,7 @@ public function emulate(string $code, array $tokens): array return $tokens; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { // TODO return $tokens; } diff --git a/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php index 6b754a5bbb..99c988767d 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php @@ -5,20 +5,16 @@ use PhpParser\PhpVersion; use PhpParser\Token; -final class CoaleseEqualTokenEmulator extends TokenEmulator -{ - public function getPhpVersion(): PhpVersion - { +final class CoaleseEqualTokenEmulator extends TokenEmulator { + public function getPhpVersion(): PhpVersion { return PhpVersion::fromComponents(7, 4); } - public function isEmulationNeeded(string $code): bool - { + public function isEmulationNeeded(string $code): bool { return strpos($code, '??=') !== false; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { // We need to manually iterate and manage a count because we'll change // the tokens array on the way for ($i = 0, $c = count($tokens); $i < $c; ++$i) { @@ -37,8 +33,7 @@ public function emulate(string $code, array $tokens): array return $tokens; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { // ??= was not valid code previously, don't bother. return $tokens; } diff --git a/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php index 79f37024ef..5418f52c08 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php @@ -4,25 +4,20 @@ use PhpParser\PhpVersion; -final class EnumTokenEmulator extends KeywordEmulator -{ - public function getPhpVersion(): PhpVersion - { +final class EnumTokenEmulator extends KeywordEmulator { + public function getPhpVersion(): PhpVersion { return PhpVersion::fromComponents(8, 1); } - public function getKeywordString(): string - { + public function getKeywordString(): string { return 'enum'; } - public function getKeywordToken(): int - { + public function getKeywordToken(): int { return \T_ENUM; } - protected function isKeywordContext(array $tokens, int $pos): bool - { + protected function isKeywordContext(array $tokens, int $pos): bool { return parent::isKeywordContext($tokens, $pos) && isset($tokens[$pos + 2]) && $tokens[$pos + 1]->id === \T_WHITESPACE diff --git a/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php index 95ea3bd152..9cadf420c0 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -31,8 +31,7 @@ public function emulate(string $code, array $tokens): array { return $tokens; } - private function resolveIntegerOrFloatToken(string $str): int - { + private function resolveIntegerOrFloatToken(string $str): int { $str = substr($str, 1); $str = str_replace('_', '', $str); $num = octdec($str); diff --git a/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php index 2c06bcd837..52e9897ffe 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php @@ -4,32 +4,27 @@ use PhpParser\PhpVersion; -final class FlexibleDocStringEmulator extends TokenEmulator -{ +final class FlexibleDocStringEmulator extends TokenEmulator { private const FLEXIBLE_DOC_STRING_REGEX = <<<'REGEX' /<<<[ \t]*(['"]?)([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)\1\r?\n (?:.*\r?\n)*? (?\h*)\2(?![a-zA-Z0-9_\x80-\xff])(?(?:;?[\r\n])?)/x REGEX; - public function getPhpVersion(): PhpVersion - { + public function getPhpVersion(): PhpVersion { return PhpVersion::fromComponents(7, 3); } - public function isEmulationNeeded(string $code) : bool - { + public function isEmulationNeeded(string $code): bool { return strpos($code, '<<<') !== false; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { // Handled by preprocessing + fixup. return $tokens; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { // Not supported. return $tokens; } diff --git a/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php index db3b1cadbb..55b99f150e 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php @@ -4,20 +4,16 @@ use PhpParser\PhpVersion; -final class FnTokenEmulator extends KeywordEmulator -{ - public function getPhpVersion(): PhpVersion - { +final class FnTokenEmulator extends KeywordEmulator { + public function getPhpVersion(): PhpVersion { return PhpVersion::fromComponents(7, 4); } - public function getKeywordString(): string - { + public function getKeywordString(): string { return 'fn'; } - public function getKeywordToken(): int - { + public function getKeywordToken(): int { return \T_FN; } } diff --git a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php index 3aa3b8ec55..197f505280 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php @@ -4,25 +4,21 @@ use PhpParser\Token; -abstract class KeywordEmulator extends TokenEmulator -{ +abstract class KeywordEmulator extends TokenEmulator { abstract public function getKeywordString(): string; abstract public function getKeywordToken(): int; - public function isEmulationNeeded(string $code): bool - { + public function isEmulationNeeded(string $code): bool { return strpos(strtolower($code), $this->getKeywordString()) !== false; } /** @param Token[] $tokens */ - protected function isKeywordContext(array $tokens, int $pos): bool - { + protected function isKeywordContext(array $tokens, int $pos): bool { $previousNonSpaceToken = $this->getPreviousNonSpaceToken($tokens, $pos); return $previousNonSpaceToken === null || $previousNonSpaceToken->id !== \T_OBJECT_OPERATOR; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { $keywordString = $this->getKeywordString(); foreach ($tokens as $i => $token) { if ($token->id === T_STRING && strtolower($token->text) === $keywordString @@ -35,8 +31,7 @@ public function emulate(string $code, array $tokens): array } /** @param Token[] $tokens */ - private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token - { + private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { for ($i = $start - 1; $i >= 0; --$i) { if ($tokens[$i]->id === T_WHITESPACE) { continue; @@ -48,8 +43,7 @@ private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token return null; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { $keywordToken = $this->getKeywordToken(); foreach ($tokens as $i => $token) { if ($token->id === $keywordToken) { diff --git a/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php index c0116247c3..0fa5fbc2f2 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php @@ -4,20 +4,16 @@ use PhpParser\PhpVersion; -final class MatchTokenEmulator extends KeywordEmulator -{ - public function getPhpVersion(): PhpVersion - { +final class MatchTokenEmulator extends KeywordEmulator { + public function getPhpVersion(): PhpVersion { return PhpVersion::fromComponents(8, 0); } - public function getKeywordString(): string - { + public function getKeywordString(): string { return 'match'; } - public function getKeywordToken(): int - { + public function getKeywordToken(): int { return \T_MATCH; } } diff --git a/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php index f157fcff27..cede96f0f7 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php @@ -5,20 +5,16 @@ use PhpParser\PhpVersion; use PhpParser\Token; -final class NullsafeTokenEmulator extends TokenEmulator -{ - public function getPhpVersion(): PhpVersion - { +final class NullsafeTokenEmulator extends TokenEmulator { + public function getPhpVersion(): PhpVersion { return PhpVersion::fromComponents(8, 0); } - public function isEmulationNeeded(string $code): bool - { + public function isEmulationNeeded(string $code): bool { return strpos($code, '?->') !== false; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { // We need to manually iterate and manage a count because we'll change // the tokens array on the way for ($i = 0, $c = count($tokens); $i < $c; ++$i) { @@ -57,8 +53,7 @@ public function emulate(string $code, array $tokens): array return $tokens; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { // ?-> was not valid code previously, don't bother. return $tokens; } diff --git a/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php index c007bab6ce..905b65f1c5 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php @@ -5,8 +5,7 @@ use PhpParser\PhpVersion; use PhpParser\Token; -final class NumericLiteralSeparatorEmulator extends TokenEmulator -{ +final class NumericLiteralSeparatorEmulator extends TokenEmulator { private const BIN = '(?:0b[01]+(?:_[01]+)*)'; private const HEX = '(?:0x[0-9a-f]+(?:_[0-9a-f]+)*)'; private const DEC = '(?:[0-9]+(?:_[0-9]+)*)'; @@ -15,19 +14,16 @@ final class NumericLiteralSeparatorEmulator extends TokenEmulator private const FLOAT = '(?:' . self::SIMPLE_FLOAT . self::EXP . '?|' . self::DEC . self::EXP . ')'; private const NUMBER = '~' . self::FLOAT . '|' . self::BIN . '|' . self::HEX . '|' . self::DEC . '~iA'; - public function getPhpVersion(): PhpVersion - { + public function getPhpVersion(): PhpVersion { return PhpVersion::fromComponents(7, 4); } - public function isEmulationNeeded(string $code) : bool - { + public function isEmulationNeeded(string $code): bool { return preg_match('~[0-9]_[0-9]~', $code) || preg_match('~0x[0-9a-f]+_[0-9a-f]~i', $code); } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { // We need to manually iterate and manage a count because we'll change // the tokens array on the way for ($i = 0, $c = count($tokens); $i < $c; ++$i) { @@ -76,8 +72,7 @@ public function emulate(string $code, array $tokens): array return $tokens; } - private function resolveIntegerOrFloatToken(string $str): int - { + private function resolveIntegerOrFloatToken(string $str): int { $str = str_replace('_', '', $str); if (stripos($str, '0b') === 0) { @@ -93,8 +88,7 @@ private function resolveIntegerOrFloatToken(string $str): int return is_float($num) ? T_DNUMBER : T_LNUMBER; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { // Numeric separators were not legal code previously, don't bother. return $tokens; } diff --git a/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php index a5526edccd..37240f79f4 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php @@ -4,25 +4,20 @@ use PhpParser\PhpVersion; -final class ReadonlyTokenEmulator extends KeywordEmulator -{ - public function getPhpVersion(): PhpVersion - { +final class ReadonlyTokenEmulator extends KeywordEmulator { + public function getPhpVersion(): PhpVersion { return PhpVersion::fromComponents(8, 1); } - public function getKeywordString(): string - { + public function getKeywordString(): string { return 'readonly'; } - public function getKeywordToken(): int - { + public function getKeywordToken(): int { return \T_READONLY; } - protected function isKeywordContext(array $tokens, int $pos): bool - { + protected function isKeywordContext(array $tokens, int $pos): bool { if (!parent::isKeywordContext($tokens, $pos)) { return false; } diff --git a/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php index e63581bab9..e73c87d4ec 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php @@ -7,8 +7,7 @@ /** * Reverses emulation direction of the inner emulator. */ -final class ReverseEmulator extends TokenEmulator -{ +final class ReverseEmulator extends TokenEmulator { /** @var TokenEmulator Inner emulator */ private $emulator; diff --git a/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php index ffc7b28564..d06d4436c7 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php @@ -6,8 +6,7 @@ use PhpParser\Token; /** @internal */ -abstract class TokenEmulator -{ +abstract class TokenEmulator { abstract public function getPhpVersion(): PhpVersion; abstract public function isEmulationNeeded(string $code): bool; diff --git a/lib/PhpParser/NameContext.php b/lib/PhpParser/NameContext.php index 600c73128f..9aa50f438e 100644 --- a/lib/PhpParser/NameContext.php +++ b/lib/PhpParser/NameContext.php @@ -6,8 +6,7 @@ use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt; -class NameContext -{ +class NameContext { /** @var null|Name Current namespace */ protected $namespace; @@ -142,7 +141,7 @@ public function getResolvedName(Name $name, int $type): ?Name { * * @return Name Resolved name */ - public function getResolvedClassName(Name $name) : Name { + public function getResolvedClassName(Name $name): Name { return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL); } @@ -154,7 +153,7 @@ public function getResolvedClassName(Name $name) : Name { * * @return Name[] Possible representations of the name */ - public function getPossibleNames(string $name, int $type) : array { + public function getPossibleNames(string $name, int $type): array { $lcName = strtolower($name); if ($type === Stmt\Use_::TYPE_NORMAL) { @@ -210,7 +209,7 @@ public function getPossibleNames(string $name, int $type) : array { * * @return Name Shortest representation */ - public function getShortName(string $name, int $type) : Name { + public function getShortName(string $name, int $type): Name { $possibleNames = $this->getPossibleNames($name, $type); // Find shortest name @@ -224,7 +223,7 @@ public function getShortName(string $name, int $type) : Name { } } - return $shortestName; + return $shortestName; } private function resolveAlias(Name $name, $type) { diff --git a/lib/PhpParser/Node.php b/lib/PhpParser/Node.php index 0e7683380c..df18c2841c 100644 --- a/lib/PhpParser/Node.php +++ b/lib/PhpParser/Node.php @@ -2,28 +2,27 @@ namespace PhpParser; -interface Node -{ +interface Node { /** * Gets the type of the node. * * @return string Type of the node */ - public function getType() : string; + public function getType(): string; /** * Gets the names of the sub nodes. * * @return array Names of sub nodes */ - public function getSubNodeNames() : array; + public function getSubNodeNames(): array; /** * Gets line the node started in (alias of getStartLine). * * @return int Start line (or -1 if not available) */ - public function getLine() : int; + public function getLine(): int; /** * Gets line the node started in. @@ -32,7 +31,7 @@ public function getLine() : int; * * @return int Start line (or -1 if not available) */ - public function getStartLine() : int; + public function getStartLine(): int; /** * Gets the line the node ended in. @@ -41,7 +40,7 @@ public function getStartLine() : int; * * @return int End line (or -1 if not available) */ - public function getEndLine() : int; + public function getEndLine(): int; /** * Gets the token offset of the first token that is part of this node. @@ -52,7 +51,7 @@ public function getEndLine() : int; * * @return int Token start position (or -1 if not available) */ - public function getStartTokenPos() : int; + public function getStartTokenPos(): int; /** * Gets the token offset of the last token that is part of this node. @@ -63,7 +62,7 @@ public function getStartTokenPos() : int; * * @return int Token end position (or -1 if not available) */ - public function getEndTokenPos() : int; + public function getEndTokenPos(): int; /** * Gets the file offset of the first character that is part of this node. @@ -72,7 +71,7 @@ public function getEndTokenPos() : int; * * @return int File start position (or -1 if not available) */ - public function getStartFilePos() : int; + public function getStartFilePos(): int; /** * Gets the file offset of the last character that is part of this node. @@ -81,7 +80,7 @@ public function getStartFilePos() : int; * * @return int File end position (or -1 if not available) */ - public function getEndFilePos() : int; + public function getEndFilePos(): int; /** * Gets all comments directly preceding this node. @@ -90,7 +89,7 @@ public function getEndFilePos() : int; * * @return Comment[] */ - public function getComments() : array; + public function getComments(): array; /** * Gets the doc comment of the node. @@ -123,7 +122,7 @@ public function setAttribute(string $key, $value); * * @return bool */ - public function hasAttribute(string $key) : bool; + public function hasAttribute(string $key): bool; /** * Returns the value of an attribute. @@ -140,7 +139,7 @@ public function getAttribute(string $key, $default = null); * * @return array */ - public function getAttributes() : array; + public function getAttributes(): array; /** * Replaces all the attributes of this node. diff --git a/lib/PhpParser/Node/Arg.php b/lib/PhpParser/Node/Arg.php index c6009f0cde..fa70f8ec28 100644 --- a/lib/PhpParser/Node/Arg.php +++ b/lib/PhpParser/Node/Arg.php @@ -4,8 +4,7 @@ use PhpParser\NodeAbstract; -class Arg extends NodeAbstract -{ +class Arg extends NodeAbstract { /** @var Identifier|null Parameter name (for named parameters) */ public $name; /** @var Expr Value to pass */ @@ -35,11 +34,11 @@ public function __construct( $this->unpack = $unpack; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'value', 'byRef', 'unpack']; } - - public function getType() : string { + + public function getType(): string { return 'Arg'; } } diff --git a/lib/PhpParser/Node/Attribute.php b/lib/PhpParser/Node/Attribute.php index c96f66e514..6635bd87e3 100644 --- a/lib/PhpParser/Node/Attribute.php +++ b/lib/PhpParser/Node/Attribute.php @@ -5,8 +5,7 @@ use PhpParser\Node; use PhpParser\NodeAbstract; -class Attribute extends NodeAbstract -{ +class Attribute extends NodeAbstract { /** @var Name Attribute name */ public $name; @@ -24,11 +23,11 @@ public function __construct(Name $name, array $args = [], array $attributes = [] $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'args']; } - public function getType() : string { + public function getType(): string { return 'Attribute'; } } diff --git a/lib/PhpParser/Node/AttributeGroup.php b/lib/PhpParser/Node/AttributeGroup.php index 4a131f9884..487a996c7a 100644 --- a/lib/PhpParser/Node/AttributeGroup.php +++ b/lib/PhpParser/Node/AttributeGroup.php @@ -4,8 +4,7 @@ use PhpParser\NodeAbstract; -class AttributeGroup extends NodeAbstract -{ +class AttributeGroup extends NodeAbstract { /** @var Attribute[] Attributes */ public $attrs; @@ -18,11 +17,11 @@ public function __construct(array $attrs, array $attributes = []) { $this->attrs = $attrs; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrs']; } - public function getType() : string { + public function getType(): string { return 'AttributeGroup'; } } diff --git a/lib/PhpParser/Node/ClosureUse.php b/lib/PhpParser/Node/ClosureUse.php index 26348daa9e..1eba69db1f 100644 --- a/lib/PhpParser/Node/ClosureUse.php +++ b/lib/PhpParser/Node/ClosureUse.php @@ -4,8 +4,7 @@ use PhpParser\NodeAbstract; -class ClosureUse extends NodeAbstract -{ +class ClosureUse extends NodeAbstract { /** @var Expr\Variable Variable to use */ public $var; /** @var bool Whether to use by reference */ @@ -24,11 +23,11 @@ public function __construct(Expr\Variable $var, bool $byRef = false, array $attr $this->byRef = $byRef; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'byRef']; } - - public function getType() : string { + + public function getType(): string { return 'ClosureUse'; } } diff --git a/lib/PhpParser/Node/ComplexType.php b/lib/PhpParser/Node/ComplexType.php index 9505532ae9..05a5e5eef4 100644 --- a/lib/PhpParser/Node/ComplexType.php +++ b/lib/PhpParser/Node/ComplexType.php @@ -9,6 +9,5 @@ * * It does not provide any shared behavior and exists only for type-checking purposes. */ -abstract class ComplexType extends NodeAbstract -{ +abstract class ComplexType extends NodeAbstract { } diff --git a/lib/PhpParser/Node/Const_.php b/lib/PhpParser/Node/Const_.php index 07a74df80e..a65db401af 100644 --- a/lib/PhpParser/Node/Const_.php +++ b/lib/PhpParser/Node/Const_.php @@ -4,8 +4,7 @@ use PhpParser\NodeAbstract; -class Const_ extends NodeAbstract -{ +class Const_ extends NodeAbstract { /** @var Identifier Name */ public $name; /** @var Expr Value */ @@ -27,11 +26,11 @@ public function __construct($name, Expr $value, array $attributes = []) { $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'value']; } - public function getType() : string { + public function getType(): string { return 'Const'; } } diff --git a/lib/PhpParser/Node/Expr.php b/lib/PhpParser/Node/Expr.php index 6cf4df2233..8b7dbb6ca8 100644 --- a/lib/PhpParser/Node/Expr.php +++ b/lib/PhpParser/Node/Expr.php @@ -4,6 +4,5 @@ use PhpParser\NodeAbstract; -abstract class Expr extends NodeAbstract -{ +abstract class Expr extends NodeAbstract { } diff --git a/lib/PhpParser/Node/Expr/ArrayDimFetch.php b/lib/PhpParser/Node/Expr/ArrayDimFetch.php index 46db975c4c..99e3ebe2b8 100644 --- a/lib/PhpParser/Node/Expr/ArrayDimFetch.php +++ b/lib/PhpParser/Node/Expr/ArrayDimFetch.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class ArrayDimFetch extends Expr -{ +class ArrayDimFetch extends Expr { /** @var Expr Variable */ public $var; /** @var null|Expr Array index / dim */ @@ -24,11 +23,11 @@ public function __construct(Expr $var, ?Expr $dim = null, array $attributes = [] $this->dim = $dim; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'dim']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ArrayDimFetch'; } } diff --git a/lib/PhpParser/Node/Expr/ArrayItem.php b/lib/PhpParser/Node/Expr/ArrayItem.php index 5aaa9867ee..7d6cdefe8b 100644 --- a/lib/PhpParser/Node/Expr/ArrayItem.php +++ b/lib/PhpParser/Node/Expr/ArrayItem.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class ArrayItem extends Expr -{ +class ArrayItem extends Expr { /** @var null|Expr Key */ public $key; /** @var Expr Value */ @@ -31,11 +30,11 @@ public function __construct(Expr $value, ?Expr $key = null, bool $byRef = false, $this->unpack = $unpack; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['key', 'value', 'byRef', 'unpack']; } - public function getType() : string { + public function getType(): string { return 'Expr_ArrayItem'; } } diff --git a/lib/PhpParser/Node/Expr/Array_.php b/lib/PhpParser/Node/Expr/Array_.php index a922bd9ba9..5fd78928a5 100644 --- a/lib/PhpParser/Node/Expr/Array_.php +++ b/lib/PhpParser/Node/Expr/Array_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Array_ extends Expr -{ +class Array_ extends Expr { // For use in "kind" attribute public const KIND_LONG = 1; // array() syntax public const KIND_SHORT = 2; // [] syntax @@ -24,11 +23,11 @@ public function __construct(array $items = [], array $attributes = []) { $this->items = $items; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['items']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Array'; } } diff --git a/lib/PhpParser/Node/Expr/ArrowFunction.php b/lib/PhpParser/Node/Expr/ArrowFunction.php index c273fb7ee8..969dc745bd 100644 --- a/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -6,8 +6,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\FunctionLike; -class ArrowFunction extends Expr implements FunctionLike -{ +class ArrowFunction extends Expr implements FunctionLike { /** @var bool */ public $static; @@ -46,15 +45,15 @@ public function __construct(array $subNodes = [], array $attributes = []) { $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -62,18 +61,18 @@ public function getReturnType() { return $this->returnType; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } /** * @return Node\Stmt\Return_[] */ - public function getStmts() : array { + public function getStmts(): array { return [new Node\Stmt\Return_($this->expr)]; } - public function getType() : string { + public function getType(): string { return 'Expr_ArrowFunction'; } } diff --git a/lib/PhpParser/Node/Expr/Assign.php b/lib/PhpParser/Node/Expr/Assign.php index cf9e6e82b4..0fadbfc42e 100644 --- a/lib/PhpParser/Node/Expr/Assign.php +++ b/lib/PhpParser/Node/Expr/Assign.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Assign extends Expr -{ +class Assign extends Expr { /** @var Expr Variable */ public $var; /** @var Expr Expression */ @@ -24,11 +23,11 @@ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Assign'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp.php b/lib/PhpParser/Node/Expr/AssignOp.php index bce8604f14..77cb661c05 100644 --- a/lib/PhpParser/Node/Expr/AssignOp.php +++ b/lib/PhpParser/Node/Expr/AssignOp.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -abstract class AssignOp extends Expr -{ +abstract class AssignOp extends Expr { /** @var Expr Variable */ public $var; /** @var Expr Expression */ @@ -24,7 +23,7 @@ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'expr']; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php b/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php index 420284cdc1..4f3623fb6d 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +++ b/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class BitwiseAnd extends AssignOp -{ - public function getType() : string { +class BitwiseAnd extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_BitwiseAnd'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php b/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php index 481ad3bbce..23efe10716 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php +++ b/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class BitwiseOr extends AssignOp -{ - public function getType() : string { +class BitwiseOr extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_BitwiseOr'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php b/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php index f41d4c8e73..24be7303f6 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php +++ b/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class BitwiseXor extends AssignOp -{ - public function getType() : string { +class BitwiseXor extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_BitwiseXor'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php b/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php index c0e9b316cf..b78ea901ab 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php +++ b/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class Coalesce extends AssignOp -{ - public function getType() : string { +class Coalesce extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Coalesce'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/Concat.php b/lib/PhpParser/Node/Expr/AssignOp/Concat.php index ac16820785..f419e2ea06 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/Concat.php +++ b/lib/PhpParser/Node/Expr/AssignOp/Concat.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class Concat extends AssignOp -{ - public function getType() : string { +class Concat extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Concat'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/Div.php b/lib/PhpParser/Node/Expr/AssignOp/Div.php index f1fcfc09ad..98b0472745 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/Div.php +++ b/lib/PhpParser/Node/Expr/AssignOp/Div.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class Div extends AssignOp -{ - public function getType() : string { +class Div extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Div'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/Minus.php b/lib/PhpParser/Node/Expr/AssignOp/Minus.php index 82ef4517b7..2076599304 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/Minus.php +++ b/lib/PhpParser/Node/Expr/AssignOp/Minus.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class Minus extends AssignOp -{ - public function getType() : string { +class Minus extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Minus'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/Mod.php b/lib/PhpParser/Node/Expr/AssignOp/Mod.php index be3b4a0adb..526430e2ff 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/Mod.php +++ b/lib/PhpParser/Node/Expr/AssignOp/Mod.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class Mod extends AssignOp -{ - public function getType() : string { +class Mod extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Mod'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/Mul.php b/lib/PhpParser/Node/Expr/AssignOp/Mul.php index 5c196c3bcb..81241ac9af 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/Mul.php +++ b/lib/PhpParser/Node/Expr/AssignOp/Mul.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class Mul extends AssignOp -{ - public function getType() : string { +class Mul extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Mul'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/Plus.php b/lib/PhpParser/Node/Expr/AssignOp/Plus.php index dd101c61cb..0bca8cc17f 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/Plus.php +++ b/lib/PhpParser/Node/Expr/AssignOp/Plus.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class Plus extends AssignOp -{ - public function getType() : string { +class Plus extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Plus'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/Pow.php b/lib/PhpParser/Node/Expr/AssignOp/Pow.php index 5e1307d1da..4e3279c428 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/Pow.php +++ b/lib/PhpParser/Node/Expr/AssignOp/Pow.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class Pow extends AssignOp -{ - public function getType() : string { +class Pow extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Pow'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php b/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php index b8f88269b6..7a5dd60c66 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php +++ b/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class ShiftLeft extends AssignOp -{ - public function getType() : string { +class ShiftLeft extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_ShiftLeft'; } } diff --git a/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php b/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php index e0cc67b7ff..4f270864dd 100644 --- a/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php +++ b/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\AssignOp; -class ShiftRight extends AssignOp -{ - public function getType() : string { +class ShiftRight extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_ShiftRight'; } } diff --git a/lib/PhpParser/Node/Expr/AssignRef.php b/lib/PhpParser/Node/Expr/AssignRef.php index de3c644c3c..407debd9d8 100644 --- a/lib/PhpParser/Node/Expr/AssignRef.php +++ b/lib/PhpParser/Node/Expr/AssignRef.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class AssignRef extends Expr -{ +class AssignRef extends Expr { /** @var Expr Variable reference is assigned to */ public $var; /** @var Expr Variable which is referenced */ @@ -24,11 +23,11 @@ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_AssignRef'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp.php b/lib/PhpParser/Node/Expr/BinaryOp.php index d9c582b0d2..e72f62ed0e 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp.php +++ b/lib/PhpParser/Node/Expr/BinaryOp.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -abstract class BinaryOp extends Expr -{ +abstract class BinaryOp extends Expr { /** @var Expr The left hand side expression */ public $left; /** @var Expr The right hand side expression */ @@ -24,7 +23,7 @@ public function __construct(Expr $left, Expr $right, array $attributes = []) { $this->right = $right; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['left', 'right']; } @@ -36,5 +35,5 @@ public function getSubNodeNames() : array { * * @return string */ - abstract public function getOperatorSigil() : string; + abstract public function getOperatorSigil(): string; } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php b/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php index d907393bfa..5930c5413c 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class BitwiseAnd extends BinaryOp -{ - public function getOperatorSigil() : string { +class BitwiseAnd extends BinaryOp { + public function getOperatorSigil(): string { return '&'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BitwiseAnd'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php b/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php index d92069f321..adcefd0e2c 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class BitwiseOr extends BinaryOp -{ - public function getOperatorSigil() : string { +class BitwiseOr extends BinaryOp { + public function getOperatorSigil(): string { return '|'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BitwiseOr'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php b/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php index 40fa94f887..92bca60946 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class BitwiseXor extends BinaryOp -{ - public function getOperatorSigil() : string { +class BitwiseXor extends BinaryOp { + public function getOperatorSigil(): string { return '^'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BitwiseXor'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php b/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php index 4c3c9e9b1e..82a6b5a270 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class BooleanAnd extends BinaryOp -{ - public function getOperatorSigil() : string { +class BooleanAnd extends BinaryOp { + public function getOperatorSigil(): string { return '&&'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BooleanAnd'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php b/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php index 5ad417279a..739edafafc 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class BooleanOr extends BinaryOp -{ - public function getOperatorSigil() : string { +class BooleanOr extends BinaryOp { + public function getOperatorSigil(): string { return '||'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BooleanOr'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php b/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php index b8cf6f4599..ab75a23e48 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Coalesce extends BinaryOp -{ - public function getOperatorSigil() : string { +class Coalesce extends BinaryOp { + public function getOperatorSigil(): string { return '??'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Coalesce'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Concat.php b/lib/PhpParser/Node/Expr/BinaryOp/Concat.php index 9a8d9873c0..a730f57604 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Concat.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Concat.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Concat extends BinaryOp -{ - public function getOperatorSigil() : string { +class Concat extends BinaryOp { + public function getOperatorSigil(): string { return '.'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Concat'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Div.php b/lib/PhpParser/Node/Expr/BinaryOp/Div.php index d38df0db4d..ba1f629d30 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Div.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Div.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Div extends BinaryOp -{ - public function getOperatorSigil() : string { +class Div extends BinaryOp { + public function getOperatorSigil(): string { return '/'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Div'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Equal.php b/lib/PhpParser/Node/Expr/BinaryOp/Equal.php index e7b11dc824..28bde8122d 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Equal.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Equal.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Equal extends BinaryOp -{ - public function getOperatorSigil() : string { +class Equal extends BinaryOp { + public function getOperatorSigil(): string { return '=='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Equal'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Greater.php b/lib/PhpParser/Node/Expr/BinaryOp/Greater.php index da01f7a100..6215c50b82 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Greater.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Greater.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Greater extends BinaryOp -{ - public function getOperatorSigil() : string { +class Greater extends BinaryOp { + public function getOperatorSigil(): string { return '>'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Greater'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php b/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php index d677502cf5..4d440b100c 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class GreaterOrEqual extends BinaryOp -{ - public function getOperatorSigil() : string { +class GreaterOrEqual extends BinaryOp { + public function getOperatorSigil(): string { return '>='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_GreaterOrEqual'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Identical.php b/lib/PhpParser/Node/Expr/BinaryOp/Identical.php index 3d96285c64..e25d17cd99 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Identical.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Identical extends BinaryOp -{ - public function getOperatorSigil() : string { +class Identical extends BinaryOp { + public function getOperatorSigil(): string { return '==='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Identical'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php b/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php index 2a3afd548f..9b9ea1f6e4 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class LogicalAnd extends BinaryOp -{ - public function getOperatorSigil() : string { +class LogicalAnd extends BinaryOp { + public function getOperatorSigil(): string { return 'and'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_LogicalAnd'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php b/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php index 21507dba63..a6235ee76d 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class LogicalOr extends BinaryOp -{ - public function getOperatorSigil() : string { +class LogicalOr extends BinaryOp { + public function getOperatorSigil(): string { return 'or'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_LogicalOr'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php b/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php index 261c6a9100..7ff2fdb0a1 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class LogicalXor extends BinaryOp -{ - public function getOperatorSigil() : string { +class LogicalXor extends BinaryOp { + public function getOperatorSigil(): string { return 'xor'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_LogicalXor'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Minus.php b/lib/PhpParser/Node/Expr/BinaryOp/Minus.php index 54b3c6e905..8924c55e1e 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Minus.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Minus.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Minus extends BinaryOp -{ - public function getOperatorSigil() : string { +class Minus extends BinaryOp { + public function getOperatorSigil(): string { return '-'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Minus'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Mod.php b/lib/PhpParser/Node/Expr/BinaryOp/Mod.php index 1034040401..56619de1bd 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Mod.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Mod.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Mod extends BinaryOp -{ - public function getOperatorSigil() : string { +class Mod extends BinaryOp { + public function getOperatorSigil(): string { return '%'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Mod'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Mul.php b/lib/PhpParser/Node/Expr/BinaryOp/Mul.php index b82d0b2fcb..98745fbe2f 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Mul.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Mul.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Mul extends BinaryOp -{ - public function getOperatorSigil() : string { +class Mul extends BinaryOp { + public function getOperatorSigil(): string { return '*'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Mul'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php b/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php index 51075da563..72d03c4590 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class NotEqual extends BinaryOp -{ - public function getOperatorSigil() : string { +class NotEqual extends BinaryOp { + public function getOperatorSigil(): string { return '!='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_NotEqual'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php b/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php index fa4050e058..e9befd80f3 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class NotIdentical extends BinaryOp -{ - public function getOperatorSigil() : string { +class NotIdentical extends BinaryOp { + public function getOperatorSigil(): string { return '!=='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_NotIdentical'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Plus.php b/lib/PhpParser/Node/Expr/BinaryOp/Plus.php index 62f0229985..fe34b84c9a 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Plus.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Plus extends BinaryOp -{ - public function getOperatorSigil() : string { +class Plus extends BinaryOp { + public function getOperatorSigil(): string { return '+'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Plus'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Pow.php b/lib/PhpParser/Node/Expr/BinaryOp/Pow.php index 572a1e8e43..e4e641cb72 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Pow.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Pow.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Pow extends BinaryOp -{ - public function getOperatorSigil() : string { +class Pow extends BinaryOp { + public function getOperatorSigil(): string { return '**'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Pow'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php b/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php index 4e70b4ef0b..22c6260f55 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class ShiftLeft extends BinaryOp -{ - public function getOperatorSigil() : string { +class ShiftLeft extends BinaryOp { + public function getOperatorSigil(): string { return '<<'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_ShiftLeft'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php b/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php index 45acbd0461..cd42644af2 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class ShiftRight extends BinaryOp -{ - public function getOperatorSigil() : string { +class ShiftRight extends BinaryOp { + public function getOperatorSigil(): string { return '>>'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_ShiftRight'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php b/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php index 3cb8e7e0d1..01e9b2310d 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Smaller extends BinaryOp -{ - public function getOperatorSigil() : string { +class Smaller extends BinaryOp { + public function getOperatorSigil(): string { return '<'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Smaller'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php b/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php index 83e8e214d0..2c88f3836d 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class SmallerOrEqual extends BinaryOp -{ - public function getOperatorSigil() : string { +class SmallerOrEqual extends BinaryOp { + public function getOperatorSigil(): string { return '<='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_SmallerOrEqual'; } } diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php b/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php index 8c6d787f6a..974ec7dd37 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php +++ b/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php @@ -4,13 +4,12 @@ use PhpParser\Node\Expr\BinaryOp; -class Spaceship extends BinaryOp -{ - public function getOperatorSigil() : string { +class Spaceship extends BinaryOp { + public function getOperatorSigil(): string { return '<=>'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Spaceship'; } } diff --git a/lib/PhpParser/Node/Expr/BitwiseNot.php b/lib/PhpParser/Node/Expr/BitwiseNot.php index ed44984bea..6499bf98ed 100644 --- a/lib/PhpParser/Node/Expr/BitwiseNot.php +++ b/lib/PhpParser/Node/Expr/BitwiseNot.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class BitwiseNot extends Expr -{ +class BitwiseNot extends Expr { /** @var Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BitwiseNot'; } } diff --git a/lib/PhpParser/Node/Expr/BooleanNot.php b/lib/PhpParser/Node/Expr/BooleanNot.php index bf27e9f657..c00fd71c3a 100644 --- a/lib/PhpParser/Node/Expr/BooleanNot.php +++ b/lib/PhpParser/Node/Expr/BooleanNot.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class BooleanNot extends Expr -{ +class BooleanNot extends Expr { /** @var Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BooleanNot'; } } diff --git a/lib/PhpParser/Node/Expr/Cast.php b/lib/PhpParser/Node/Expr/Cast.php index 36769d4fc6..3a1e8c94b5 100644 --- a/lib/PhpParser/Node/Expr/Cast.php +++ b/lib/PhpParser/Node/Expr/Cast.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -abstract class Cast extends Expr -{ +abstract class Cast extends Expr { /** @var Expr Expression */ public $expr; @@ -20,7 +19,7 @@ public function __construct(Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } } diff --git a/lib/PhpParser/Node/Expr/Cast/Array_.php b/lib/PhpParser/Node/Expr/Cast/Array_.php index 57cc473b62..471cb824a0 100644 --- a/lib/PhpParser/Node/Expr/Cast/Array_.php +++ b/lib/PhpParser/Node/Expr/Cast/Array_.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\Cast; -class Array_ extends Cast -{ - public function getType() : string { +class Array_ extends Cast { + public function getType(): string { return 'Expr_Cast_Array'; } } diff --git a/lib/PhpParser/Node/Expr/Cast/Bool_.php b/lib/PhpParser/Node/Expr/Cast/Bool_.php index 04eb4af584..3aed497c71 100644 --- a/lib/PhpParser/Node/Expr/Cast/Bool_.php +++ b/lib/PhpParser/Node/Expr/Cast/Bool_.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\Cast; -class Bool_ extends Cast -{ - public function getType() : string { +class Bool_ extends Cast { + public function getType(): string { return 'Expr_Cast_Bool'; } } diff --git a/lib/PhpParser/Node/Expr/Cast/Double.php b/lib/PhpParser/Node/Expr/Cast/Double.php index b71220fb37..e7f5cd9b92 100644 --- a/lib/PhpParser/Node/Expr/Cast/Double.php +++ b/lib/PhpParser/Node/Expr/Cast/Double.php @@ -4,14 +4,13 @@ use PhpParser\Node\Expr\Cast; -class Double extends Cast -{ +class Double extends Cast { // For use in "kind" attribute public const KIND_DOUBLE = 1; // "double" syntax public const KIND_FLOAT = 2; // "float" syntax public const KIND_REAL = 3; // "real" syntax - public function getType() : string { + public function getType(): string { return 'Expr_Cast_Double'; } } diff --git a/lib/PhpParser/Node/Expr/Cast/Int_.php b/lib/PhpParser/Node/Expr/Cast/Int_.php index 01ed594bd0..20744b9b0f 100644 --- a/lib/PhpParser/Node/Expr/Cast/Int_.php +++ b/lib/PhpParser/Node/Expr/Cast/Int_.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\Cast; -class Int_ extends Cast -{ - public function getType() : string { +class Int_ extends Cast { + public function getType(): string { return 'Expr_Cast_Int'; } } diff --git a/lib/PhpParser/Node/Expr/Cast/Object_.php b/lib/PhpParser/Node/Expr/Cast/Object_.php index 163752be89..dffa9e54ad 100644 --- a/lib/PhpParser/Node/Expr/Cast/Object_.php +++ b/lib/PhpParser/Node/Expr/Cast/Object_.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\Cast; -class Object_ extends Cast -{ - public function getType() : string { +class Object_ extends Cast { + public function getType(): string { return 'Expr_Cast_Object'; } } diff --git a/lib/PhpParser/Node/Expr/Cast/String_.php b/lib/PhpParser/Node/Expr/Cast/String_.php index b3d99270ac..c7605ab82c 100644 --- a/lib/PhpParser/Node/Expr/Cast/String_.php +++ b/lib/PhpParser/Node/Expr/Cast/String_.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\Cast; -class String_ extends Cast -{ - public function getType() : string { +class String_ extends Cast { + public function getType(): string { return 'Expr_Cast_String'; } } diff --git a/lib/PhpParser/Node/Expr/Cast/Unset_.php b/lib/PhpParser/Node/Expr/Cast/Unset_.php index accda3e4ff..cb709a43e3 100644 --- a/lib/PhpParser/Node/Expr/Cast/Unset_.php +++ b/lib/PhpParser/Node/Expr/Cast/Unset_.php @@ -4,9 +4,8 @@ use PhpParser\Node\Expr\Cast; -class Unset_ extends Cast -{ - public function getType() : string { +class Unset_ extends Cast { + public function getType(): string { return 'Expr_Cast_Unset'; } } diff --git a/lib/PhpParser/Node/Expr/ClassConstFetch.php b/lib/PhpParser/Node/Expr/ClassConstFetch.php index faf832f938..c3bbc731f4 100644 --- a/lib/PhpParser/Node/Expr/ClassConstFetch.php +++ b/lib/PhpParser/Node/Expr/ClassConstFetch.php @@ -6,8 +6,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Name; -class ClassConstFetch extends Expr -{ +class ClassConstFetch extends Expr { /** @var Name|Expr Class name */ public $class; /** @var Identifier|Error Constant name */ @@ -26,11 +25,11 @@ public function __construct($class, $name, array $attributes = []) { $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ClassConstFetch'; } } diff --git a/lib/PhpParser/Node/Expr/Clone_.php b/lib/PhpParser/Node/Expr/Clone_.php index db216b8f84..2564ae47de 100644 --- a/lib/PhpParser/Node/Expr/Clone_.php +++ b/lib/PhpParser/Node/Expr/Clone_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Clone_ extends Expr -{ +class Clone_ extends Expr { /** @var Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Clone'; } } diff --git a/lib/PhpParser/Node/Expr/Closure.php b/lib/PhpParser/Node/Expr/Closure.php index 548d760816..2d40fa55f1 100644 --- a/lib/PhpParser/Node/Expr/Closure.php +++ b/lib/PhpParser/Node/Expr/Closure.php @@ -7,8 +7,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\FunctionLike; -class Closure extends Expr implements FunctionLike -{ +class Closure extends Expr implements FunctionLike { /** @var bool Whether the closure is static */ public $static; /** @var bool Whether to return by reference */ @@ -49,15 +48,15 @@ public function __construct(array $subNodes = [], array $attributes = []) { $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -66,15 +65,15 @@ public function getReturnType() { } /** @return Node\Stmt[] */ - public function getStmts() : array { + public function getStmts(): array { return $this->stmts; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } - public function getType() : string { + public function getType(): string { return 'Expr_Closure'; } } diff --git a/lib/PhpParser/Node/Expr/ConstFetch.php b/lib/PhpParser/Node/Expr/ConstFetch.php index 14ebd16bd8..bb3bd00627 100644 --- a/lib/PhpParser/Node/Expr/ConstFetch.php +++ b/lib/PhpParser/Node/Expr/ConstFetch.php @@ -5,8 +5,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Name; -class ConstFetch extends Expr -{ +class ConstFetch extends Expr { /** @var Name Constant name */ public $name; @@ -21,11 +20,11 @@ public function __construct(Name $name, array $attributes = []) { $this->name = $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ConstFetch'; } } diff --git a/lib/PhpParser/Node/Expr/Empty_.php b/lib/PhpParser/Node/Expr/Empty_.php index 4042ec93ca..5977018628 100644 --- a/lib/PhpParser/Node/Expr/Empty_.php +++ b/lib/PhpParser/Node/Expr/Empty_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Empty_ extends Expr -{ +class Empty_ extends Expr { /** @var Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Empty'; } } diff --git a/lib/PhpParser/Node/Expr/Error.php b/lib/PhpParser/Node/Expr/Error.php index 1637f3aeae..a4cb84868a 100644 --- a/lib/PhpParser/Node/Expr/Error.php +++ b/lib/PhpParser/Node/Expr/Error.php @@ -10,8 +10,7 @@ * 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 -{ +class Error extends Expr { /** * Constructs an error node. * @@ -21,11 +20,11 @@ public function __construct(array $attributes = []) { $this->attributes = $attributes; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return []; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Error'; } } diff --git a/lib/PhpParser/Node/Expr/ErrorSuppress.php b/lib/PhpParser/Node/Expr/ErrorSuppress.php index c44ff6f931..a47dd02f0c 100644 --- a/lib/PhpParser/Node/Expr/ErrorSuppress.php +++ b/lib/PhpParser/Node/Expr/ErrorSuppress.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class ErrorSuppress extends Expr -{ +class ErrorSuppress extends Expr { /** @var Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ErrorSuppress'; } } diff --git a/lib/PhpParser/Node/Expr/Eval_.php b/lib/PhpParser/Node/Expr/Eval_.php index 8568547438..2d254bfdcc 100644 --- a/lib/PhpParser/Node/Expr/Eval_.php +++ b/lib/PhpParser/Node/Expr/Eval_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Eval_ extends Expr -{ +class Eval_ extends Expr { /** @var Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Eval'; } } diff --git a/lib/PhpParser/Node/Expr/Exit_.php b/lib/PhpParser/Node/Expr/Exit_.php index 50bbf0f063..55b934998a 100644 --- a/lib/PhpParser/Node/Expr/Exit_.php +++ b/lib/PhpParser/Node/Expr/Exit_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Exit_ extends Expr -{ +class Exit_ extends Expr { /* For use in "kind" attribute */ public const KIND_EXIT = 1; public const KIND_DIE = 2; @@ -24,11 +23,11 @@ public function __construct(?Expr $expr = null, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Exit'; } } diff --git a/lib/PhpParser/Node/Expr/FuncCall.php b/lib/PhpParser/Node/Expr/FuncCall.php index 2de4d0dd57..dd63f1b084 100644 --- a/lib/PhpParser/Node/Expr/FuncCall.php +++ b/lib/PhpParser/Node/Expr/FuncCall.php @@ -5,8 +5,7 @@ use PhpParser\Node; use PhpParser\Node\Expr; -class FuncCall extends CallLike -{ +class FuncCall extends CallLike { /** @var Node\Name|Expr Function name */ public $name; /** @var array Arguments */ @@ -25,11 +24,11 @@ public function __construct($name, array $args = [], array $attributes = []) { $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_FuncCall'; } diff --git a/lib/PhpParser/Node/Expr/Include_.php b/lib/PhpParser/Node/Expr/Include_.php index 01b3bb6df4..894d32a59f 100644 --- a/lib/PhpParser/Node/Expr/Include_.php +++ b/lib/PhpParser/Node/Expr/Include_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Include_ extends Expr -{ +class Include_ extends Expr { public const TYPE_INCLUDE = 1; public const TYPE_INCLUDE_ONCE = 2; public const TYPE_REQUIRE = 3; @@ -29,11 +28,11 @@ public function __construct(Expr $expr, int $type, array $attributes = []) { $this->type = $type; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr', 'type']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Include'; } } diff --git a/lib/PhpParser/Node/Expr/Instanceof_.php b/lib/PhpParser/Node/Expr/Instanceof_.php index 9000d47bb1..800d187f6f 100644 --- a/lib/PhpParser/Node/Expr/Instanceof_.php +++ b/lib/PhpParser/Node/Expr/Instanceof_.php @@ -5,8 +5,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Name; -class Instanceof_ extends Expr -{ +class Instanceof_ extends Expr { /** @var Expr Expression */ public $expr; /** @var Name|Expr Class name */ @@ -25,11 +24,11 @@ public function __construct(Expr $expr, $class, array $attributes = []) { $this->class = $class; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr', 'class']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Instanceof'; } } diff --git a/lib/PhpParser/Node/Expr/Isset_.php b/lib/PhpParser/Node/Expr/Isset_.php index 76b7387587..e43a859f99 100644 --- a/lib/PhpParser/Node/Expr/Isset_.php +++ b/lib/PhpParser/Node/Expr/Isset_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Isset_ extends Expr -{ +class Isset_ extends Expr { /** @var Expr[] Variables */ public $vars; @@ -20,11 +19,11 @@ public function __construct(array $vars, array $attributes = []) { $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Isset'; } } diff --git a/lib/PhpParser/Node/Expr/List_.php b/lib/PhpParser/Node/Expr/List_.php index f899b4ceeb..4cc52a3f32 100644 --- a/lib/PhpParser/Node/Expr/List_.php +++ b/lib/PhpParser/Node/Expr/List_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class List_ extends Expr -{ +class List_ extends Expr { // For use in "kind" attribute public const KIND_LIST = 1; // list() syntax public const KIND_ARRAY = 2; // [] syntax @@ -24,11 +23,11 @@ public function __construct(array $items, array $attributes = []) { $this->items = $items; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['items']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_List'; } } diff --git a/lib/PhpParser/Node/Expr/Match_.php b/lib/PhpParser/Node/Expr/Match_.php index 2455a30264..3b5ce48ede 100644 --- a/lib/PhpParser/Node/Expr/Match_.php +++ b/lib/PhpParser/Node/Expr/Match_.php @@ -5,8 +5,7 @@ use PhpParser\Node; use PhpParser\Node\MatchArm; -class Match_ extends Node\Expr -{ +class Match_ extends Node\Expr { /** @var Node\Expr */ public $cond; /** @var MatchArm[] */ @@ -21,11 +20,11 @@ public function __construct(Node\Expr $cond, array $arms = [], array $attributes $this->arms = $arms; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'arms']; } - public function getType() : string { + public function getType(): string { return 'Expr_Match'; } } diff --git a/lib/PhpParser/Node/Expr/MethodCall.php b/lib/PhpParser/Node/Expr/MethodCall.php index 49ca483565..0e42ab7ce6 100644 --- a/lib/PhpParser/Node/Expr/MethodCall.php +++ b/lib/PhpParser/Node/Expr/MethodCall.php @@ -7,8 +7,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\VariadicPlaceholder; -class MethodCall extends CallLike -{ +class MethodCall extends CallLike { /** @var Expr Variable holding object */ public $var; /** @var Identifier|Expr Method name */ @@ -31,11 +30,11 @@ public function __construct(Expr $var, $name, array $args = [], array $attribute $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_MethodCall'; } diff --git a/lib/PhpParser/Node/Expr/New_.php b/lib/PhpParser/Node/Expr/New_.php index e2bb64928d..2356183787 100644 --- a/lib/PhpParser/Node/Expr/New_.php +++ b/lib/PhpParser/Node/Expr/New_.php @@ -7,8 +7,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\VariadicPlaceholder; -class New_ extends CallLike -{ +class New_ extends CallLike { /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */ public $class; /** @var array Arguments */ @@ -27,11 +26,11 @@ public function __construct($class, array $args = [], array $attributes = []) { $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_New'; } diff --git a/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/lib/PhpParser/Node/Expr/NullsafeMethodCall.php index 07a571fd8f..6acd9795a2 100644 --- a/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +++ b/lib/PhpParser/Node/Expr/NullsafeMethodCall.php @@ -7,8 +7,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\VariadicPlaceholder; -class NullsafeMethodCall extends CallLike -{ +class NullsafeMethodCall extends CallLike { /** @var Expr Variable holding object */ public $var; /** @var Identifier|Expr Method name */ @@ -31,11 +30,11 @@ public function __construct(Expr $var, $name, array $args = [], array $attribute $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_NullsafeMethodCall'; } diff --git a/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php index 9317eb3b91..9b4e8752a2 100644 --- a/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +++ b/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php @@ -5,8 +5,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Identifier; -class NullsafePropertyFetch extends Expr -{ +class NullsafePropertyFetch extends Expr { /** @var Expr Variable holding object */ public $var; /** @var Identifier|Expr Property name */ @@ -25,11 +24,11 @@ public function __construct(Expr $var, $name, array $attributes = []) { $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_NullsafePropertyFetch'; } } diff --git a/lib/PhpParser/Node/Expr/PostDec.php b/lib/PhpParser/Node/Expr/PostDec.php index 94d6c296d8..325403409b 100644 --- a/lib/PhpParser/Node/Expr/PostDec.php +++ b/lib/PhpParser/Node/Expr/PostDec.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class PostDec extends Expr -{ +class PostDec extends Expr { /** @var Expr Variable */ public $var; @@ -20,11 +19,11 @@ public function __construct(Expr $var, array $attributes = []) { $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PostDec'; } } diff --git a/lib/PhpParser/Node/Expr/PostInc.php b/lib/PhpParser/Node/Expr/PostInc.php index 005c443a2d..df07727aba 100644 --- a/lib/PhpParser/Node/Expr/PostInc.php +++ b/lib/PhpParser/Node/Expr/PostInc.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class PostInc extends Expr -{ +class PostInc extends Expr { /** @var Expr Variable */ public $var; @@ -20,11 +19,11 @@ public function __construct(Expr $var, array $attributes = []) { $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PostInc'; } } diff --git a/lib/PhpParser/Node/Expr/PreDec.php b/lib/PhpParser/Node/Expr/PreDec.php index a5ca685a8a..0aee17fce4 100644 --- a/lib/PhpParser/Node/Expr/PreDec.php +++ b/lib/PhpParser/Node/Expr/PreDec.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class PreDec extends Expr -{ +class PreDec extends Expr { /** @var Expr Variable */ public $var; @@ -20,11 +19,11 @@ public function __construct(Expr $var, array $attributes = []) { $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - public function getType() : string { + public function getType(): string { return 'Expr_PreDec'; } } diff --git a/lib/PhpParser/Node/Expr/PreInc.php b/lib/PhpParser/Node/Expr/PreInc.php index 0986c44748..f8958a8ad9 100644 --- a/lib/PhpParser/Node/Expr/PreInc.php +++ b/lib/PhpParser/Node/Expr/PreInc.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class PreInc extends Expr -{ +class PreInc extends Expr { /** @var Expr Variable */ public $var; @@ -20,11 +19,11 @@ public function __construct(Expr $var, array $attributes = []) { $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PreInc'; } } diff --git a/lib/PhpParser/Node/Expr/Print_.php b/lib/PhpParser/Node/Expr/Print_.php index 2d43c2ac82..e68568d6d6 100644 --- a/lib/PhpParser/Node/Expr/Print_.php +++ b/lib/PhpParser/Node/Expr/Print_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Print_ extends Expr -{ +class Print_ extends Expr { /** @var Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Print'; } } diff --git a/lib/PhpParser/Node/Expr/PropertyFetch.php b/lib/PhpParser/Node/Expr/PropertyFetch.php index 4281f31ccf..6cbe1762f6 100644 --- a/lib/PhpParser/Node/Expr/PropertyFetch.php +++ b/lib/PhpParser/Node/Expr/PropertyFetch.php @@ -5,8 +5,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Identifier; -class PropertyFetch extends Expr -{ +class PropertyFetch extends Expr { /** @var Expr Variable holding object */ public $var; /** @var Identifier|Expr Property name */ @@ -25,11 +24,11 @@ public function __construct(Expr $var, $name, array $attributes = []) { $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PropertyFetch'; } } diff --git a/lib/PhpParser/Node/Expr/ShellExec.php b/lib/PhpParser/Node/Expr/ShellExec.php index 537a7cc809..c9c5ade0e4 100644 --- a/lib/PhpParser/Node/Expr/ShellExec.php +++ b/lib/PhpParser/Node/Expr/ShellExec.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class ShellExec extends Expr -{ +class ShellExec extends Expr { /** @var array Encapsed string array */ public $parts; @@ -20,11 +19,11 @@ public function __construct(array $parts, array $attributes = []) { $this->parts = $parts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['parts']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ShellExec'; } } diff --git a/lib/PhpParser/Node/Expr/StaticCall.php b/lib/PhpParser/Node/Expr/StaticCall.php index d0d099c472..bb60013d02 100644 --- a/lib/PhpParser/Node/Expr/StaticCall.php +++ b/lib/PhpParser/Node/Expr/StaticCall.php @@ -8,8 +8,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\VariadicPlaceholder; -class StaticCall extends CallLike -{ +class StaticCall extends CallLike { /** @var Node\Name|Expr Class name */ public $class; /** @var Identifier|Expr Method name */ @@ -32,11 +31,11 @@ public function __construct($class, $name, array $args = [], array $attributes = $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_StaticCall'; } diff --git a/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/lib/PhpParser/Node/Expr/StaticPropertyFetch.php index 1ee1a25e50..dc1afa13e9 100644 --- a/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +++ b/lib/PhpParser/Node/Expr/StaticPropertyFetch.php @@ -6,8 +6,7 @@ use PhpParser\Node\Name; use PhpParser\Node\VarLikeIdentifier; -class StaticPropertyFetch extends Expr -{ +class StaticPropertyFetch extends Expr { /** @var Name|Expr Class name */ public $class; /** @var VarLikeIdentifier|Expr Property name */ @@ -26,11 +25,11 @@ public function __construct($class, $name, array $attributes = []) { $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_StaticPropertyFetch'; } } diff --git a/lib/PhpParser/Node/Expr/Ternary.php b/lib/PhpParser/Node/Expr/Ternary.php index b3bec472e3..c72e9af757 100644 --- a/lib/PhpParser/Node/Expr/Ternary.php +++ b/lib/PhpParser/Node/Expr/Ternary.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Ternary extends Expr -{ +class Ternary extends Expr { /** @var Expr Condition */ public $cond; /** @var null|Expr Expression for true */ @@ -28,11 +27,11 @@ public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes $this->else = $else; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'if', 'else']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Ternary'; } } diff --git a/lib/PhpParser/Node/Expr/Throw_.php b/lib/PhpParser/Node/Expr/Throw_.php index 5c97f0e2b4..120a0f5ed7 100644 --- a/lib/PhpParser/Node/Expr/Throw_.php +++ b/lib/PhpParser/Node/Expr/Throw_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Throw_ extends Node\Expr -{ +class Throw_ extends Node\Expr { /** @var Node\Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Node\Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - public function getType() : string { + public function getType(): string { return 'Expr_Throw'; } } diff --git a/lib/PhpParser/Node/Expr/UnaryMinus.php b/lib/PhpParser/Node/Expr/UnaryMinus.php index ce8808bc64..38e5795136 100644 --- a/lib/PhpParser/Node/Expr/UnaryMinus.php +++ b/lib/PhpParser/Node/Expr/UnaryMinus.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class UnaryMinus extends Expr -{ +class UnaryMinus extends Expr { /** @var Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_UnaryMinus'; } } diff --git a/lib/PhpParser/Node/Expr/UnaryPlus.php b/lib/PhpParser/Node/Expr/UnaryPlus.php index d23047e54e..c6298fae32 100644 --- a/lib/PhpParser/Node/Expr/UnaryPlus.php +++ b/lib/PhpParser/Node/Expr/UnaryPlus.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class UnaryPlus extends Expr -{ +class UnaryPlus extends Expr { /** @var Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_UnaryPlus'; } } diff --git a/lib/PhpParser/Node/Expr/Variable.php b/lib/PhpParser/Node/Expr/Variable.php index b47d38e934..8ae09a16c7 100644 --- a/lib/PhpParser/Node/Expr/Variable.php +++ b/lib/PhpParser/Node/Expr/Variable.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Variable extends Expr -{ +class Variable extends Expr { /** @var string|Expr Name */ public $name; @@ -20,11 +19,11 @@ public function __construct($name, array $attributes = []) { $this->name = $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Variable'; } } diff --git a/lib/PhpParser/Node/Expr/YieldFrom.php b/lib/PhpParser/Node/Expr/YieldFrom.php index a3efce618c..a88fdeb350 100644 --- a/lib/PhpParser/Node/Expr/YieldFrom.php +++ b/lib/PhpParser/Node/Expr/YieldFrom.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class YieldFrom extends Expr -{ +class YieldFrom extends Expr { /** @var Expr Expression to yield from */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_YieldFrom'; } } diff --git a/lib/PhpParser/Node/Expr/Yield_.php b/lib/PhpParser/Node/Expr/Yield_.php index f15336edeb..cd214a8abb 100644 --- a/lib/PhpParser/Node/Expr/Yield_.php +++ b/lib/PhpParser/Node/Expr/Yield_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class Yield_ extends Expr -{ +class Yield_ extends Expr { /** @var null|Expr Key expression */ public $key; /** @var null|Expr Value expression */ @@ -24,11 +23,11 @@ public function __construct(?Expr $value = null, ?Expr $key = null, array $attri $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['key', 'value']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Yield'; } } diff --git a/lib/PhpParser/Node/FunctionLike.php b/lib/PhpParser/Node/FunctionLike.php index f75ad3bd24..0b211d1175 100644 --- a/lib/PhpParser/Node/FunctionLike.php +++ b/lib/PhpParser/Node/FunctionLike.php @@ -4,21 +4,20 @@ use PhpParser\Node; -interface FunctionLike extends Node -{ +interface FunctionLike extends Node { /** * Whether to return by reference * * @return bool */ - public function returnsByRef() : bool; + public function returnsByRef(): bool; /** * List of parameters * * @return Param[] */ - public function getParams() : array; + public function getParams(): array; /** * Get the declared return type or null @@ -39,5 +38,5 @@ public function getStmts(): ?array; * * @return AttributeGroup[] */ - public function getAttrGroups() : array; + public function getAttrGroups(): array; } diff --git a/lib/PhpParser/Node/Identifier.php b/lib/PhpParser/Node/Identifier.php index 2f262db0aa..2695855d1d 100644 --- a/lib/PhpParser/Node/Identifier.php +++ b/lib/PhpParser/Node/Identifier.php @@ -7,8 +7,7 @@ /** * Represents a non-namespaced name. Namespaced names are represented using Name nodes. */ -class Identifier extends NodeAbstract -{ +class Identifier extends NodeAbstract { /** @var string Identifier as string */ public $name; @@ -29,7 +28,7 @@ public function __construct(string $name, array $attributes = []) { $this->name = $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } @@ -38,7 +37,7 @@ public function getSubNodeNames() : array { * * @return string Identifier as string. */ - public function toString() : string { + public function toString(): string { return $this->name; } @@ -47,7 +46,7 @@ public function toString() : string { * * @return string Lowercased identifier as string */ - public function toLowerString() : string { + public function toLowerString(): string { return strtolower($this->name); } @@ -56,7 +55,7 @@ public function toLowerString() : string { * * @return bool Whether identifier is a special class name */ - public function isSpecialClassName() : bool { + public function isSpecialClassName(): bool { return isset(self::$specialClassNames[strtolower($this->name)]); } @@ -65,11 +64,11 @@ public function isSpecialClassName() : bool { * * @return string Identifier as string */ - public function __toString() : string { + public function __toString(): string { return $this->name; } - - public function getType() : string { + + public function getType(): string { return 'Identifier'; } } diff --git a/lib/PhpParser/Node/IntersectionType.php b/lib/PhpParser/Node/IntersectionType.php index da7a3a85c5..5b6198b71b 100644 --- a/lib/PhpParser/Node/IntersectionType.php +++ b/lib/PhpParser/Node/IntersectionType.php @@ -2,9 +2,7 @@ namespace PhpParser\Node; - -class IntersectionType extends ComplexType -{ +class IntersectionType extends ComplexType { /** @var (Identifier|Name)[] Types */ public $types; @@ -19,11 +17,11 @@ public function __construct(array $types, array $attributes = []) { $this->types = $types; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['types']; } - public function getType() : string { + public function getType(): string { return 'IntersectionType'; } } diff --git a/lib/PhpParser/Node/MatchArm.php b/lib/PhpParser/Node/MatchArm.php index b0d4bab6e8..55a7eacef4 100644 --- a/lib/PhpParser/Node/MatchArm.php +++ b/lib/PhpParser/Node/MatchArm.php @@ -5,8 +5,7 @@ use PhpParser\Node; use PhpParser\NodeAbstract; -class MatchArm extends NodeAbstract -{ +class MatchArm extends NodeAbstract { /** @var null|Node\Expr[] */ public $conds; /** @var Node\Expr */ @@ -21,11 +20,11 @@ public function __construct(?array $conds, Node\Expr $body, array $attributes = $this->attributes = $attributes; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['conds', 'body']; } - public function getType() : string { + public function getType(): string { return 'MatchArm'; } } diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index cec304eb0d..f50e975221 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -4,8 +4,7 @@ use PhpParser\NodeAbstract; -class Name extends NodeAbstract -{ +class Name extends NodeAbstract { /** @var string[] Parts of the name */ public $parts; @@ -26,7 +25,7 @@ public function __construct($name, array $attributes = []) { $this->parts = self::prepareName($name); } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['parts']; } @@ -35,7 +34,7 @@ public function getSubNodeNames() : array { * * @return string First part of the name */ - public function getFirst() : string { + public function getFirst(): string { return $this->parts[0]; } @@ -44,7 +43,7 @@ public function getFirst() : string { * * @return string Last part of the name */ - public function getLast() : string { + public function getLast(): string { return $this->parts[count($this->parts) - 1]; } @@ -53,7 +52,7 @@ public function getLast() : string { * * @return bool Whether the name is unqualified */ - public function isUnqualified() : bool { + public function isUnqualified(): bool { return 1 === count($this->parts); } @@ -62,7 +61,7 @@ public function isUnqualified() : bool { * * @return bool Whether the name is qualified */ - public function isQualified() : bool { + public function isQualified(): bool { return 1 < count($this->parts); } @@ -71,7 +70,7 @@ public function isQualified() : bool { * * @return bool Whether the name is fully qualified */ - public function isFullyQualified() : bool { + public function isFullyQualified(): bool { return false; } @@ -80,7 +79,7 @@ public function isFullyQualified() : bool { * * @return bool Whether the name is relative */ - public function isRelative() : bool { + public function isRelative(): bool { return false; } @@ -90,7 +89,7 @@ public function isRelative() : bool { * * @return string String representation */ - public function toString() : string { + public function toString(): string { return implode('\\', $this->parts); } @@ -100,7 +99,7 @@ public function toString() : string { * * @return string String representation */ - public function toCodeString() : string { + public function toCodeString(): string { return $this->toString(); } @@ -110,7 +109,7 @@ public function toCodeString() : string { * * @return string Lowercased string representation */ - public function toLowerString() : string { + public function toLowerString(): string { return strtolower(implode('\\', $this->parts)); } @@ -119,7 +118,7 @@ public function toLowerString() : string { * * @return bool Whether identifier is a special class name */ - public function isSpecialClassName() : bool { + public function isSpecialClassName(): bool { return count($this->parts) === 1 && isset(self::$specialClassNames[strtolower($this->parts[0])]); } @@ -130,7 +129,7 @@ public function isSpecialClassName() : bool { * * @return string String representation */ - public function __toString() : string { + public function __toString(): string { return implode('\\', $this->parts); } @@ -216,7 +215,7 @@ public static function concat($name1, $name2, array $attributes = []) { * * @return string[] Prepared name */ - private static function prepareName($name) : array { + private static function prepareName($name): array { if (\is_string($name)) { if ('' === $name) { throw new \InvalidArgumentException('Name cannot be empty'); @@ -240,7 +239,7 @@ private static function prepareName($name) : array { ); } - public function getType() : string { + public function getType(): string { return 'Name'; } } diff --git a/lib/PhpParser/Node/Name/FullyQualified.php b/lib/PhpParser/Node/Name/FullyQualified.php index 1df93a56b6..21183786ba 100644 --- a/lib/PhpParser/Node/Name/FullyQualified.php +++ b/lib/PhpParser/Node/Name/FullyQualified.php @@ -2,14 +2,13 @@ namespace PhpParser\Node\Name; -class FullyQualified extends \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() : bool { + public function isUnqualified(): bool { return false; } @@ -18,7 +17,7 @@ public function isUnqualified() : bool { * * @return bool Whether the name is qualified */ - public function isQualified() : bool { + public function isQualified(): bool { return false; } @@ -27,7 +26,7 @@ public function isQualified() : bool { * * @return bool Whether the name is fully qualified */ - public function isFullyQualified() : bool { + public function isFullyQualified(): bool { return true; } @@ -36,15 +35,15 @@ public function isFullyQualified() : bool { * * @return bool Whether the name is relative */ - public function isRelative() : bool { + public function isRelative(): bool { return false; } - public function toCodeString() : string { + public function toCodeString(): string { return '\\' . $this->toString(); } - - public function getType() : string { + + public function getType(): string { return 'Name_FullyQualified'; } } diff --git a/lib/PhpParser/Node/Name/Relative.php b/lib/PhpParser/Node/Name/Relative.php index 57bf7af2b2..0226a4e485 100644 --- a/lib/PhpParser/Node/Name/Relative.php +++ b/lib/PhpParser/Node/Name/Relative.php @@ -2,14 +2,13 @@ namespace PhpParser\Node\Name; -class Relative extends \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() : bool { + public function isUnqualified(): bool { return false; } @@ -18,7 +17,7 @@ public function isUnqualified() : bool { * * @return bool Whether the name is qualified */ - public function isQualified() : bool { + public function isQualified(): bool { return false; } @@ -27,7 +26,7 @@ public function isQualified() : bool { * * @return bool Whether the name is fully qualified */ - public function isFullyQualified() : bool { + public function isFullyQualified(): bool { return false; } @@ -36,15 +35,15 @@ public function isFullyQualified() : bool { * * @return bool Whether the name is relative */ - public function isRelative() : bool { + public function isRelative(): bool { return true; } - public function toCodeString() : string { + public function toCodeString(): string { return 'namespace\\' . $this->toString(); } - - public function getType() : string { + + public function getType(): string { return 'Name_Relative'; } } diff --git a/lib/PhpParser/Node/NullableType.php b/lib/PhpParser/Node/NullableType.php index d68e26a38f..1b8f6bd319 100644 --- a/lib/PhpParser/Node/NullableType.php +++ b/lib/PhpParser/Node/NullableType.php @@ -2,8 +2,7 @@ namespace PhpParser\Node; -class NullableType extends ComplexType -{ +class NullableType extends ComplexType { /** @var Identifier|Name Type */ public $type; @@ -18,11 +17,11 @@ public function __construct($type, array $attributes = []) { $this->type = \is_string($type) ? new Identifier($type) : $type; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['type']; } - - public function getType() : string { + + public function getType(): string { return 'NullableType'; } } diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index dfb77f6290..fe4200a8fd 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -4,8 +4,7 @@ use PhpParser\NodeAbstract; -class Param extends NodeAbstract -{ +class Param extends NodeAbstract { /** @var null|Identifier|Name|ComplexType Type declaration */ public $type; /** @var bool Whether parameter is passed by reference */ @@ -50,11 +49,11 @@ public function __construct( $this->attrGroups = $attrGroups; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default']; } - public function getType() : string { + public function getType(): string { return 'Param'; } } diff --git a/lib/PhpParser/Node/Scalar.php b/lib/PhpParser/Node/Scalar.php index 8117909b65..3df2572169 100644 --- a/lib/PhpParser/Node/Scalar.php +++ b/lib/PhpParser/Node/Scalar.php @@ -2,6 +2,5 @@ namespace PhpParser\Node; -abstract class Scalar extends Expr -{ +abstract class Scalar extends Expr { } diff --git a/lib/PhpParser/Node/Scalar/DNumber.php b/lib/PhpParser/Node/Scalar/DNumber.php index d4796d65bb..6a524e56d5 100644 --- a/lib/PhpParser/Node/Scalar/DNumber.php +++ b/lib/PhpParser/Node/Scalar/DNumber.php @@ -4,8 +4,7 @@ use PhpParser\Node\Scalar; -class DNumber extends Scalar -{ +class DNumber extends Scalar { /** @var float Number value */ public $value; @@ -20,15 +19,14 @@ public function __construct(float $value, array $attributes = []) { $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['value']; } /** * @param mixed[] $attributes */ - public static function fromString(string $str, array $attributes = []): DNumber - { + public static function fromString(string $str, array $attributes = []): DNumber { $attributes['rawValue'] = $str; $float = self::parse($str); @@ -44,7 +42,7 @@ public static function fromString(string $str, array $attributes = []): DNumber * * @return float The parsed number */ - public static function parse(string $str) : float { + public static function parse(string $str): float { $str = str_replace('_', '', $str); // if string contains any of .eE just cast it to float @@ -75,7 +73,7 @@ public static function parse(string $str) : float { return (float) $str; } - public function getType() : string { + public function getType(): string { return 'Scalar_DNumber'; } } diff --git a/lib/PhpParser/Node/Scalar/Encapsed.php b/lib/PhpParser/Node/Scalar/Encapsed.php index fa5d2e2681..3ef656d209 100644 --- a/lib/PhpParser/Node/Scalar/Encapsed.php +++ b/lib/PhpParser/Node/Scalar/Encapsed.php @@ -5,8 +5,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Scalar; -class Encapsed extends Scalar -{ +class Encapsed extends Scalar { /** @var Expr[] list of string parts */ public $parts; @@ -21,11 +20,11 @@ public function __construct(array $parts, array $attributes = []) { $this->parts = $parts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['parts']; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_Encapsed'; } } diff --git a/lib/PhpParser/Node/Scalar/EncapsedStringPart.php b/lib/PhpParser/Node/Scalar/EncapsedStringPart.php index bb3194c1d7..46530b06f4 100644 --- a/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +++ b/lib/PhpParser/Node/Scalar/EncapsedStringPart.php @@ -4,8 +4,7 @@ use PhpParser\Node\Scalar; -class EncapsedStringPart extends Scalar -{ +class EncapsedStringPart extends Scalar { /** @var string String value */ public $value; @@ -20,11 +19,11 @@ public function __construct(string $value, array $attributes = []) { $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['value']; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_EncapsedStringPart'; } } diff --git a/lib/PhpParser/Node/Scalar/LNumber.php b/lib/PhpParser/Node/Scalar/LNumber.php index db55ecf3af..0991a53647 100644 --- a/lib/PhpParser/Node/Scalar/LNumber.php +++ b/lib/PhpParser/Node/Scalar/LNumber.php @@ -5,8 +5,7 @@ use PhpParser\Error; use PhpParser\Node\Scalar; -class LNumber extends Scalar -{ +class LNumber extends Scalar { /* For use in "kind" attribute */ public const KIND_BIN = 2; public const KIND_OCT = 8; @@ -27,7 +26,7 @@ public function __construct(int $value, array $attributes = []) { $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['value']; } @@ -40,7 +39,7 @@ public function getSubNodeNames() : array { * * @return LNumber The constructed LNumber, including kind attribute */ - public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false) : LNumber { + public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false): LNumber { $attributes['rawValue'] = $str; $str = str_replace('_', '', $str); @@ -74,7 +73,7 @@ public static function fromString(string $str, array $attributes = [], bool $all return new LNumber(intval($str, 8), $attributes); } - public function getType() : string { + public function getType(): string { return 'Scalar_LNumber'; } } diff --git a/lib/PhpParser/Node/Scalar/MagicConst.php b/lib/PhpParser/Node/Scalar/MagicConst.php index 941f0c7620..c539487054 100644 --- a/lib/PhpParser/Node/Scalar/MagicConst.php +++ b/lib/PhpParser/Node/Scalar/MagicConst.php @@ -4,8 +4,7 @@ use PhpParser\Node\Scalar; -abstract class MagicConst extends Scalar -{ +abstract class MagicConst extends Scalar { /** * Constructs a magic constant node. * @@ -15,7 +14,7 @@ public function __construct(array $attributes = []) { $this->attributes = $attributes; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return []; } @@ -24,5 +23,5 @@ public function getSubNodeNames() : array { * * @return string Name of magic constant */ - abstract public function getName() : string; + abstract public function getName(): string; } diff --git a/lib/PhpParser/Node/Scalar/MagicConst/Class_.php b/lib/PhpParser/Node/Scalar/MagicConst/Class_.php index 244328476d..732ed140f1 100644 --- a/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +++ b/lib/PhpParser/Node/Scalar/MagicConst/Class_.php @@ -4,13 +4,12 @@ use PhpParser\Node\Scalar\MagicConst; -class Class_ extends MagicConst -{ - public function getName() : string { +class Class_ extends MagicConst { + public function getName(): string { return '__CLASS__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Class'; } } diff --git a/lib/PhpParser/Node/Scalar/MagicConst/Dir.php b/lib/PhpParser/Node/Scalar/MagicConst/Dir.php index 2b618473e3..64daa713bb 100644 --- a/lib/PhpParser/Node/Scalar/MagicConst/Dir.php +++ b/lib/PhpParser/Node/Scalar/MagicConst/Dir.php @@ -4,13 +4,12 @@ use PhpParser\Node\Scalar\MagicConst; -class Dir extends MagicConst -{ - public function getName() : string { +class Dir extends MagicConst { + public function getName(): string { return '__DIR__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Dir'; } } diff --git a/lib/PhpParser/Node/Scalar/MagicConst/File.php b/lib/PhpParser/Node/Scalar/MagicConst/File.php index 3422db0692..91041f0f99 100644 --- a/lib/PhpParser/Node/Scalar/MagicConst/File.php +++ b/lib/PhpParser/Node/Scalar/MagicConst/File.php @@ -4,13 +4,12 @@ use PhpParser\Node\Scalar\MagicConst; -class File extends MagicConst -{ - public function getName() : string { +class File extends MagicConst { + public function getName(): string { return '__FILE__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_File'; } } diff --git a/lib/PhpParser/Node/Scalar/MagicConst/Function_.php b/lib/PhpParser/Node/Scalar/MagicConst/Function_.php index 1db65a1513..c242d2d95d 100644 --- a/lib/PhpParser/Node/Scalar/MagicConst/Function_.php +++ b/lib/PhpParser/Node/Scalar/MagicConst/Function_.php @@ -4,13 +4,12 @@ use PhpParser\Node\Scalar\MagicConst; -class Function_ extends MagicConst -{ - public function getName() : string { +class Function_ extends MagicConst { + public function getName(): string { return '__FUNCTION__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Function'; } } diff --git a/lib/PhpParser/Node/Scalar/MagicConst/Line.php b/lib/PhpParser/Node/Scalar/MagicConst/Line.php index 25d3de57c1..58d8ce39da 100644 --- a/lib/PhpParser/Node/Scalar/MagicConst/Line.php +++ b/lib/PhpParser/Node/Scalar/MagicConst/Line.php @@ -4,13 +4,12 @@ use PhpParser\Node\Scalar\MagicConst; -class Line extends MagicConst -{ - public function getName() : string { +class Line extends MagicConst { + public function getName(): string { return '__LINE__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Line'; } } diff --git a/lib/PhpParser/Node/Scalar/MagicConst/Method.php b/lib/PhpParser/Node/Scalar/MagicConst/Method.php index d168d56f10..47f341f10a 100644 --- a/lib/PhpParser/Node/Scalar/MagicConst/Method.php +++ b/lib/PhpParser/Node/Scalar/MagicConst/Method.php @@ -4,13 +4,12 @@ use PhpParser\Node\Scalar\MagicConst; -class Method extends MagicConst -{ - public function getName() : string { +class Method extends MagicConst { + public function getName(): string { return '__METHOD__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Method'; } } diff --git a/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php b/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php index 4fabb751af..e9f8c0eae4 100644 --- a/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php +++ b/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php @@ -4,13 +4,12 @@ use PhpParser\Node\Scalar\MagicConst; -class Namespace_ extends MagicConst -{ - public function getName() : string { +class Namespace_ extends MagicConst { + public function getName(): string { return '__NAMESPACE__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Namespace'; } } diff --git a/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php b/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php index 5ee7e40a3c..25f49731c1 100644 --- a/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php +++ b/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php @@ -4,13 +4,12 @@ use PhpParser\Node\Scalar\MagicConst; -class Trait_ extends MagicConst -{ - public function getName() : string { +class Trait_ extends MagicConst { + public function getName(): string { return '__TRAIT__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Trait'; } } diff --git a/lib/PhpParser/Node/Scalar/String_.php b/lib/PhpParser/Node/Scalar/String_.php index 2c3b8823fb..d25090119c 100644 --- a/lib/PhpParser/Node/Scalar/String_.php +++ b/lib/PhpParser/Node/Scalar/String_.php @@ -5,8 +5,7 @@ use PhpParser\Error; use PhpParser\Node\Scalar; -class String_ extends Scalar -{ +class String_ extends Scalar { /* For use in "kind" attribute */ public const KIND_SINGLE_QUOTED = 1; public const KIND_DOUBLE_QUOTED = 2; @@ -38,15 +37,14 @@ public function __construct(string $value, array $attributes = []) { $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['value']; } /** * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes */ - public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self - { + public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self { $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B'))) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED; @@ -68,7 +66,7 @@ public static function fromString(string $str, array $attributes = [], bool $par * * @return string The parsed string */ - public static function parse(string $str, bool $parseUnicodeEscape = true) : string { + public static function parse(string $str, bool $parseUnicodeEscape = true): string { $bLength = 0; if ('b' === $str[0] || 'B' === $str[0]) { $bLength = 1; @@ -98,7 +96,7 @@ public static function parse(string $str, bool $parseUnicodeEscape = true) : str * * @return string String with escape sequences parsed */ - public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = true) : string { + public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = true): string { if (null !== $quote) { $str = str_replace('\\' . $quote, $quote, $str); } @@ -110,7 +108,7 @@ public static function parseEscapeSequences(string $str, ?string $quote, bool $p return preg_replace_callback( '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', - function($matches) { + function ($matches) { $str = $matches[1]; if (isset(self::$replacements[$str])) { @@ -136,7 +134,7 @@ function($matches) { * * @return string UTF-8 representation of code point */ - private static function codePointToUtf8(int $num) : string { + private static function codePointToUtf8(int $num): string { if ($num <= 0x7F) { return chr($num); } @@ -153,7 +151,7 @@ private static function codePointToUtf8(int $num) : string { throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); } - public function getType() : string { + public function getType(): string { return 'Scalar_String'; } } diff --git a/lib/PhpParser/Node/Stmt.php b/lib/PhpParser/Node/Stmt.php index 69d33e5796..481d31a939 100644 --- a/lib/PhpParser/Node/Stmt.php +++ b/lib/PhpParser/Node/Stmt.php @@ -4,6 +4,5 @@ use PhpParser\NodeAbstract; -abstract class Stmt extends NodeAbstract -{ +abstract class Stmt extends NodeAbstract { } diff --git a/lib/PhpParser/Node/Stmt/Break_.php b/lib/PhpParser/Node/Stmt/Break_.php index d9464a1ae8..d76c7dd610 100644 --- a/lib/PhpParser/Node/Stmt/Break_.php +++ b/lib/PhpParser/Node/Stmt/Break_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Break_ extends Node\Stmt -{ +class Break_ extends Node\Stmt { /** @var null|Node\Expr Number of loops to break */ public $num; @@ -20,11 +19,11 @@ public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->num = $num; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['num']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Break'; } } diff --git a/lib/PhpParser/Node/Stmt/Case_.php b/lib/PhpParser/Node/Stmt/Case_.php index 8c1ea685a2..fe825e4192 100644 --- a/lib/PhpParser/Node/Stmt/Case_.php +++ b/lib/PhpParser/Node/Stmt/Case_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Case_ extends Node\Stmt -{ +class Case_ extends Node\Stmt { /** @var null|Node\Expr Condition (null for default) */ public $cond; /** @var Node\Stmt[] Statements */ @@ -24,11 +23,11 @@ public function __construct(?Node\Expr $cond, array $stmts = [], array $attribut $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Case'; } } diff --git a/lib/PhpParser/Node/Stmt/Catch_.php b/lib/PhpParser/Node/Stmt/Catch_.php index 5d7b5c0168..bbd1f523ad 100644 --- a/lib/PhpParser/Node/Stmt/Catch_.php +++ b/lib/PhpParser/Node/Stmt/Catch_.php @@ -5,8 +5,7 @@ use PhpParser\Node; use PhpParser\Node\Expr; -class Catch_ extends Node\Stmt -{ +class Catch_ extends Node\Stmt { /** @var Node\Name[] Types of exceptions to catch */ public $types; /** @var Expr\Variable|null Variable for exception */ @@ -31,11 +30,11 @@ public function __construct( $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['types', 'var', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Catch'; } } diff --git a/lib/PhpParser/Node/Stmt/ClassConst.php b/lib/PhpParser/Node/Stmt/ClassConst.php index 308df73154..c35f072460 100644 --- a/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/lib/PhpParser/Node/Stmt/ClassConst.php @@ -5,8 +5,7 @@ use PhpParser\Modifiers; use PhpParser\Node; -class ClassConst extends Node\Stmt -{ +class ClassConst extends Node\Stmt { /** @var int Modifiers */ public $flags; /** @var Node\Const_[] Constant declarations */ @@ -34,7 +33,7 @@ public function __construct( $this->attrGroups = $attrGroups; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'consts']; } @@ -43,7 +42,7 @@ public function getSubNodeNames() : array { * * @return bool */ - public function isPublic() : bool { + public function isPublic(): bool { return ($this->flags & Modifiers::PUBLIC) !== 0 || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } @@ -53,7 +52,7 @@ public function isPublic() : bool { * * @return bool */ - public function isProtected() : bool { + public function isProtected(): bool { return (bool) ($this->flags & Modifiers::PROTECTED); } @@ -62,7 +61,7 @@ public function isProtected() : bool { * * @return bool */ - public function isPrivate() : bool { + public function isPrivate(): bool { return (bool) ($this->flags & Modifiers::PRIVATE); } @@ -71,11 +70,11 @@ public function isPrivate() : bool { * * @return bool */ - public function isFinal() : bool { + public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); } - public function getType() : string { + public function getType(): string { return 'Stmt_ClassConst'; } } diff --git a/lib/PhpParser/Node/Stmt/ClassLike.php b/lib/PhpParser/Node/Stmt/ClassLike.php index 2a6e5b3f93..75814705ae 100644 --- a/lib/PhpParser/Node/Stmt/ClassLike.php +++ b/lib/PhpParser/Node/Stmt/ClassLike.php @@ -4,8 +4,7 @@ use PhpParser\Node; -abstract class ClassLike extends Node\Stmt -{ +abstract class ClassLike extends Node\Stmt { /** @var Node\Identifier|null Name */ public $name; /** @var Node\Stmt[] Statements */ @@ -19,7 +18,7 @@ abstract class ClassLike extends Node\Stmt /** * @return TraitUse[] */ - public function getTraitUses() : array { + public function getTraitUses(): array { $traitUses = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof TraitUse) { @@ -32,7 +31,7 @@ public function getTraitUses() : array { /** * @return ClassConst[] */ - public function getConstants() : array { + public function getConstants(): array { $constants = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassConst) { @@ -45,7 +44,7 @@ public function getConstants() : array { /** * @return Property[] */ - public function getProperties() : array { + public function getProperties(): array { $properties = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof Property) { @@ -80,7 +79,7 @@ public function getProperty(string $name): ?Property { * * @return ClassMethod[] */ - public function getMethods() : array { + public function getMethods(): array { $methods = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassMethod) { diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index 69c2f31d53..12e44615fd 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -6,8 +6,7 @@ use PhpParser\Node; use PhpParser\Node\FunctionLike; -class ClassMethod extends Node\Stmt implements FunctionLike -{ +class ClassMethod extends Node\Stmt implements FunctionLike { /** @var int Flags */ public $flags; /** @var bool Whether to return by reference */ @@ -68,15 +67,15 @@ public function __construct($name, array $subNodes = [], array $attributes = []) $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -88,7 +87,7 @@ public function getStmts(): ?array { return $this->stmts; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } @@ -97,7 +96,7 @@ public function getAttrGroups() : array { * * @return bool */ - public function isPublic() : bool { + public function isPublic(): bool { return ($this->flags & Modifiers::PUBLIC) !== 0 || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } @@ -107,7 +106,7 @@ public function isPublic() : bool { * * @return bool */ - public function isProtected() : bool { + public function isProtected(): bool { return (bool) ($this->flags & Modifiers::PROTECTED); } @@ -116,7 +115,7 @@ public function isProtected() : bool { * * @return bool */ - public function isPrivate() : bool { + public function isPrivate(): bool { return (bool) ($this->flags & Modifiers::PRIVATE); } @@ -125,7 +124,7 @@ public function isPrivate() : bool { * * @return bool */ - public function isAbstract() : bool { + public function isAbstract(): bool { return (bool) ($this->flags & Modifiers::ABSTRACT); } @@ -134,7 +133,7 @@ public function isAbstract() : bool { * * @return bool */ - public function isFinal() : bool { + public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); } @@ -143,7 +142,7 @@ public function isFinal() : bool { * * @return bool */ - public function isStatic() : bool { + public function isStatic(): bool { return (bool) ($this->flags & Modifiers::STATIC); } @@ -152,11 +151,11 @@ public function isStatic() : bool { * * @return bool */ - public function isMagic() : bool { + public function isMagic(): bool { return isset(self::$magicNames[$this->name->toLowerString()]); } - public function getType() : string { + public function getType(): string { return 'Stmt_ClassMethod'; } } diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 0faf2d2314..453cffe472 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -6,8 +6,7 @@ use PhpParser\Modifiers; use PhpParser\Node; -class Class_ extends ClassLike -{ +class Class_ extends ClassLike { /** @deprecated Use Modifiers::PUBLIC instead */ public const MODIFIER_PUBLIC = 1; /** @deprecated Use Modifiers::PROTECTED instead */ @@ -55,7 +54,7 @@ public function __construct($name, array $subNodes = [], array $attributes = []) $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'name', 'extends', 'implements', 'stmts']; } @@ -64,7 +63,7 @@ public function getSubNodeNames() : array { * * @return bool */ - public function isAbstract() : bool { + public function isAbstract(): bool { return (bool) ($this->flags & Modifiers::ABSTRACT); } @@ -73,11 +72,11 @@ public function isAbstract() : bool { * * @return bool */ - public function isFinal() : bool { + public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); } - public function isReadonly() : bool { + public function isReadonly(): bool { return (bool) ($this->flags & Modifiers::READONLY); } @@ -86,7 +85,7 @@ public function isReadonly() : bool { * * @return bool */ - public function isAnonymous() : bool { + public function isAnonymous(): bool { return null === $this->name; } @@ -140,7 +139,7 @@ public static function verifyModifier($a, $b) { } } - public function getType() : string { + public function getType(): string { return 'Stmt_Class'; } } diff --git a/lib/PhpParser/Node/Stmt/Const_.php b/lib/PhpParser/Node/Stmt/Const_.php index e6316345ee..1f97f32796 100644 --- a/lib/PhpParser/Node/Stmt/Const_.php +++ b/lib/PhpParser/Node/Stmt/Const_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Const_ extends Node\Stmt -{ +class Const_ extends Node\Stmt { /** @var Node\Const_[] Constant declarations */ public $consts; @@ -20,11 +19,11 @@ public function __construct(array $consts, array $attributes = []) { $this->consts = $consts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['consts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Const'; } } diff --git a/lib/PhpParser/Node/Stmt/Continue_.php b/lib/PhpParser/Node/Stmt/Continue_.php index f2b30d79f5..4311fb1c83 100644 --- a/lib/PhpParser/Node/Stmt/Continue_.php +++ b/lib/PhpParser/Node/Stmt/Continue_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Continue_ extends Node\Stmt -{ +class Continue_ extends Node\Stmt { /** @var null|Node\Expr Number of loops to continue */ public $num; @@ -20,11 +19,11 @@ public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->num = $num; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['num']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Continue'; } } diff --git a/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/lib/PhpParser/Node/Stmt/DeclareDeclare.php index ac07f30c78..39df6dae1c 100644 --- a/lib/PhpParser/Node/Stmt/DeclareDeclare.php +++ b/lib/PhpParser/Node/Stmt/DeclareDeclare.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class DeclareDeclare extends Node\Stmt -{ +class DeclareDeclare extends Node\Stmt { /** @var Node\Identifier Key */ public $key; /** @var Node\Expr Value */ @@ -24,11 +23,11 @@ public function __construct($key, Node\Expr $value, array $attributes = []) { $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['key', 'value']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_DeclareDeclare'; } } diff --git a/lib/PhpParser/Node/Stmt/Declare_.php b/lib/PhpParser/Node/Stmt/Declare_.php index a3a5bfaa59..5a209cf243 100644 --- a/lib/PhpParser/Node/Stmt/Declare_.php +++ b/lib/PhpParser/Node/Stmt/Declare_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Declare_ extends Node\Stmt -{ +class Declare_ extends Node\Stmt { /** @var DeclareDeclare[] List of declares */ public $declares; /** @var Node\Stmt[]|null Statements */ @@ -24,11 +23,11 @@ public function __construct(array $declares, ?array $stmts = null, array $attrib $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['declares', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Declare'; } } diff --git a/lib/PhpParser/Node/Stmt/Do_.php b/lib/PhpParser/Node/Stmt/Do_.php index 78e90da03a..f8328101ef 100644 --- a/lib/PhpParser/Node/Stmt/Do_.php +++ b/lib/PhpParser/Node/Stmt/Do_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Do_ extends Node\Stmt -{ +class Do_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ public $stmts; /** @var Node\Expr Condition */ @@ -24,11 +23,11 @@ public function __construct(Node\Expr $cond, array $stmts = [], array $attribute $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts', 'cond']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Do'; } } diff --git a/lib/PhpParser/Node/Stmt/Echo_.php b/lib/PhpParser/Node/Stmt/Echo_.php index 7cc50d5d6e..040f398ad5 100644 --- a/lib/PhpParser/Node/Stmt/Echo_.php +++ b/lib/PhpParser/Node/Stmt/Echo_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Echo_ extends Node\Stmt -{ +class Echo_ extends Node\Stmt { /** @var Node\Expr[] Expressions */ public $exprs; @@ -20,11 +19,11 @@ public function __construct(array $exprs, array $attributes = []) { $this->exprs = $exprs; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['exprs']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Echo'; } } diff --git a/lib/PhpParser/Node/Stmt/ElseIf_.php b/lib/PhpParser/Node/Stmt/ElseIf_.php index eef1ece324..5d95169515 100644 --- a/lib/PhpParser/Node/Stmt/ElseIf_.php +++ b/lib/PhpParser/Node/Stmt/ElseIf_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class ElseIf_ extends Node\Stmt -{ +class ElseIf_ extends Node\Stmt { /** @var Node\Expr Condition */ public $cond; /** @var Node\Stmt[] Statements */ @@ -24,11 +23,11 @@ public function __construct(Node\Expr $cond, array $stmts = [], array $attribute $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_ElseIf'; } } diff --git a/lib/PhpParser/Node/Stmt/Else_.php b/lib/PhpParser/Node/Stmt/Else_.php index 0e61778e26..03cf37a869 100644 --- a/lib/PhpParser/Node/Stmt/Else_.php +++ b/lib/PhpParser/Node/Stmt/Else_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Else_ extends Node\Stmt -{ +class Else_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ public $stmts; @@ -20,11 +19,11 @@ public function __construct(array $stmts = [], array $attributes = []) { $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Else'; } } diff --git a/lib/PhpParser/Node/Stmt/EnumCase.php b/lib/PhpParser/Node/Stmt/EnumCase.php index 4b1079bcd7..e1fa971135 100644 --- a/lib/PhpParser/Node/Stmt/EnumCase.php +++ b/lib/PhpParser/Node/Stmt/EnumCase.php @@ -5,8 +5,7 @@ use PhpParser\Node; use PhpParser\Node\AttributeGroup; -class EnumCase extends Node\Stmt -{ +class EnumCase extends Node\Stmt { /** @var Node\Identifier Enum case name */ public $name; /** @var Node\Expr|null Enum case expression */ @@ -27,11 +26,11 @@ public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = $this->attrGroups = $attrGroups; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'expr']; } - public function getType() : string { + public function getType(): string { return 'Stmt_EnumCase'; } } diff --git a/lib/PhpParser/Node/Stmt/Enum_.php b/lib/PhpParser/Node/Stmt/Enum_.php index 3a50c225db..640745bdec 100644 --- a/lib/PhpParser/Node/Stmt/Enum_.php +++ b/lib/PhpParser/Node/Stmt/Enum_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Enum_ extends ClassLike -{ +class Enum_ extends ClassLike { /** @var null|Node\Identifier Scalar Type */ public $scalarType; /** @var Node\Name[] Names of implemented interfaces */ @@ -30,11 +29,11 @@ public function __construct($name, array $subNodes = [], array $attributes = []) parent::__construct($attributes); } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Enum'; } } diff --git a/lib/PhpParser/Node/Stmt/Expression.php b/lib/PhpParser/Node/Stmt/Expression.php index 99d1687ded..df9ad71ff0 100644 --- a/lib/PhpParser/Node/Stmt/Expression.php +++ b/lib/PhpParser/Node/Stmt/Expression.php @@ -7,8 +7,7 @@ /** * Represents statements of type "expr;" */ -class Expression extends Node\Stmt -{ +class Expression extends Node\Stmt { /** @var Node\Expr Expression */ public $expr; @@ -23,11 +22,11 @@ public function __construct(Node\Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Expression'; } } diff --git a/lib/PhpParser/Node/Stmt/Finally_.php b/lib/PhpParser/Node/Stmt/Finally_.php index d55b8b6872..351550e79a 100644 --- a/lib/PhpParser/Node/Stmt/Finally_.php +++ b/lib/PhpParser/Node/Stmt/Finally_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Finally_ extends Node\Stmt -{ +class Finally_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ public $stmts; @@ -20,11 +19,11 @@ public function __construct(array $stmts = [], array $attributes = []) { $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Finally'; } } diff --git a/lib/PhpParser/Node/Stmt/For_.php b/lib/PhpParser/Node/Stmt/For_.php index 1323d37cf3..7afd2e25eb 100644 --- a/lib/PhpParser/Node/Stmt/For_.php +++ b/lib/PhpParser/Node/Stmt/For_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class For_ extends Node\Stmt -{ +class For_ extends Node\Stmt { /** @var Node\Expr[] Init expressions */ public $init; /** @var Node\Expr[] Loop conditions */ @@ -33,11 +32,11 @@ public function __construct(array $subNodes = [], array $attributes = []) { $this->stmts = $subNodes['stmts'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['init', 'cond', 'loop', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_For'; } } diff --git a/lib/PhpParser/Node/Stmt/Foreach_.php b/lib/PhpParser/Node/Stmt/Foreach_.php index 0556a7ce5f..b0230cfe69 100644 --- a/lib/PhpParser/Node/Stmt/Foreach_.php +++ b/lib/PhpParser/Node/Stmt/Foreach_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Foreach_ extends Node\Stmt -{ +class Foreach_ extends Node\Stmt { /** @var Node\Expr Expression to iterate */ public $expr; /** @var null|Node\Expr Variable to assign key to */ @@ -37,11 +36,11 @@ public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNode $this->stmts = $subNodes['stmts'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Foreach'; } } diff --git a/lib/PhpParser/Node/Stmt/Function_.php b/lib/PhpParser/Node/Stmt/Function_.php index c2ccae24ee..e47554a389 100644 --- a/lib/PhpParser/Node/Stmt/Function_.php +++ b/lib/PhpParser/Node/Stmt/Function_.php @@ -5,8 +5,7 @@ use PhpParser\Node; use PhpParser\Node\FunctionLike; -class Function_ extends Node\Stmt implements FunctionLike -{ +class Function_ extends Node\Stmt implements FunctionLike { /** @var bool Whether function returns by reference */ public $byRef; /** @var Node\Identifier Name */ @@ -46,15 +45,15 @@ public function __construct($name, array $subNodes = [], array $attributes = []) $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -62,16 +61,16 @@ public function getReturnType() { return $this->returnType; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } /** @return Node\Stmt[] */ - public function getStmts() : array { + public function getStmts(): array { return $this->stmts; } - public function getType() : string { + public function getType(): string { return 'Stmt_Function'; } } diff --git a/lib/PhpParser/Node/Stmt/Global_.php b/lib/PhpParser/Node/Stmt/Global_.php index a0022ad932..e46b3a8092 100644 --- a/lib/PhpParser/Node/Stmt/Global_.php +++ b/lib/PhpParser/Node/Stmt/Global_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Global_ extends Node\Stmt -{ +class Global_ extends Node\Stmt { /** @var Node\Expr[] Variables */ public $vars; @@ -20,11 +19,11 @@ public function __construct(array $vars, array $attributes = []) { $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Global'; } } diff --git a/lib/PhpParser/Node/Stmt/Goto_.php b/lib/PhpParser/Node/Stmt/Goto_.php index 24a57f7807..b846faaa4c 100644 --- a/lib/PhpParser/Node/Stmt/Goto_.php +++ b/lib/PhpParser/Node/Stmt/Goto_.php @@ -5,8 +5,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class Goto_ extends Stmt -{ +class Goto_ extends Stmt { /** @var Identifier Name of label to jump to */ public $name; @@ -21,11 +20,11 @@ public function __construct($name, array $attributes = []) { $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Goto'; } } diff --git a/lib/PhpParser/Node/Stmt/GroupUse.php b/lib/PhpParser/Node/Stmt/GroupUse.php index 24520d2233..0a04139550 100644 --- a/lib/PhpParser/Node/Stmt/GroupUse.php +++ b/lib/PhpParser/Node/Stmt/GroupUse.php @@ -5,8 +5,7 @@ use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class GroupUse extends Stmt -{ +class GroupUse extends Stmt { /** @var int Type of group use */ public $type; /** @var Name Prefix for uses */ @@ -29,11 +28,11 @@ public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NO $this->uses = $uses; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['type', 'prefix', 'uses']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_GroupUse'; } } diff --git a/lib/PhpParser/Node/Stmt/HaltCompiler.php b/lib/PhpParser/Node/Stmt/HaltCompiler.php index 8e624e0f1f..43163750c4 100644 --- a/lib/PhpParser/Node/Stmt/HaltCompiler.php +++ b/lib/PhpParser/Node/Stmt/HaltCompiler.php @@ -4,8 +4,7 @@ use PhpParser\Node\Stmt; -class HaltCompiler extends Stmt -{ +class HaltCompiler extends Stmt { /** @var string Remaining text after halt compiler statement. */ public $remaining; @@ -20,11 +19,11 @@ public function __construct(string $remaining, array $attributes = []) { $this->remaining = $remaining; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['remaining']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_HaltCompiler'; } } diff --git a/lib/PhpParser/Node/Stmt/If_.php b/lib/PhpParser/Node/Stmt/If_.php index a1bae4bf89..57c9290eda 100644 --- a/lib/PhpParser/Node/Stmt/If_.php +++ b/lib/PhpParser/Node/Stmt/If_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class If_ extends Node\Stmt -{ +class If_ extends Node\Stmt { /** @var Node\Expr Condition expression */ public $cond; /** @var Node\Stmt[] Statements */ @@ -33,11 +32,11 @@ public function __construct(Node\Expr $cond, array $subNodes = [], array $attrib $this->else = $subNodes['else'] ?? null; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts', 'elseifs', 'else']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_If'; } } diff --git a/lib/PhpParser/Node/Stmt/InlineHTML.php b/lib/PhpParser/Node/Stmt/InlineHTML.php index 0711d2842c..f27ce0fc5e 100644 --- a/lib/PhpParser/Node/Stmt/InlineHTML.php +++ b/lib/PhpParser/Node/Stmt/InlineHTML.php @@ -4,8 +4,7 @@ use PhpParser\Node\Stmt; -class InlineHTML extends Stmt -{ +class InlineHTML extends Stmt { /** @var string String */ public $value; @@ -20,11 +19,11 @@ public function __construct(string $value, array $attributes = []) { $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['value']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_InlineHTML'; } } diff --git a/lib/PhpParser/Node/Stmt/Interface_.php b/lib/PhpParser/Node/Stmt/Interface_.php index 4d587dd484..175d2a51eb 100644 --- a/lib/PhpParser/Node/Stmt/Interface_.php +++ b/lib/PhpParser/Node/Stmt/Interface_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Interface_ extends ClassLike -{ +class Interface_ extends ClassLike { /** @var Node\Name[] Extended interfaces */ public $extends; @@ -27,11 +26,11 @@ public function __construct($name, array $subNodes = [], array $attributes = []) $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'extends', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Interface'; } } diff --git a/lib/PhpParser/Node/Stmt/Label.php b/lib/PhpParser/Node/Stmt/Label.php index 3edcb3be7e..e4a103b0c3 100644 --- a/lib/PhpParser/Node/Stmt/Label.php +++ b/lib/PhpParser/Node/Stmt/Label.php @@ -5,8 +5,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class Label extends Stmt -{ +class Label extends Stmt { /** @var Identifier Name */ public $name; @@ -21,11 +20,11 @@ public function __construct($name, array $attributes = []) { $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Label'; } } diff --git a/lib/PhpParser/Node/Stmt/Namespace_.php b/lib/PhpParser/Node/Stmt/Namespace_.php index a7e9ee104c..7ae38f4b22 100644 --- a/lib/PhpParser/Node/Stmt/Namespace_.php +++ b/lib/PhpParser/Node/Stmt/Namespace_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Namespace_ extends Node\Stmt -{ +class Namespace_ extends Node\Stmt { /* For use in the "kind" attribute */ public const KIND_SEMICOLON = 1; public const KIND_BRACED = 2; @@ -28,11 +27,11 @@ public function __construct(?Node\Name $name = null, ?array $stmts = [], array $ $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Namespace'; } } diff --git a/lib/PhpParser/Node/Stmt/Nop.php b/lib/PhpParser/Node/Stmt/Nop.php index f86f8df7d3..3acfa46fb0 100644 --- a/lib/PhpParser/Node/Stmt/Nop.php +++ b/lib/PhpParser/Node/Stmt/Nop.php @@ -5,13 +5,12 @@ use PhpParser\Node; /** Nop/empty statement (;). */ -class Nop extends Node\Stmt -{ - public function getSubNodeNames() : array { +class Nop extends Node\Stmt { + public function getSubNodeNames(): array { return []; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Nop'; } } diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index fb8a38f576..304db47f3b 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -8,8 +8,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Name; -class Property extends Node\Stmt -{ +class Property extends Node\Stmt { /** @var int Modifiers */ public $flags; /** @var PropertyProperty[] Properties */ @@ -36,7 +35,7 @@ public function __construct(int $flags, array $props, array $attributes = [], $t $this->attrGroups = $attrGroups; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'type', 'props']; } @@ -45,7 +44,7 @@ public function getSubNodeNames() : array { * * @return bool */ - public function isPublic() : bool { + public function isPublic(): bool { return ($this->flags & Modifiers::PUBLIC) !== 0 || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } @@ -55,7 +54,7 @@ public function isPublic() : bool { * * @return bool */ - public function isProtected() : bool { + public function isProtected(): bool { return (bool) ($this->flags & Modifiers::PROTECTED); } @@ -64,7 +63,7 @@ public function isProtected() : bool { * * @return bool */ - public function isPrivate() : bool { + public function isPrivate(): bool { return (bool) ($this->flags & Modifiers::PRIVATE); } @@ -73,7 +72,7 @@ public function isPrivate() : bool { * * @return bool */ - public function isStatic() : bool { + public function isStatic(): bool { return (bool) ($this->flags & Modifiers::STATIC); } @@ -82,11 +81,11 @@ public function isStatic() : bool { * * @return bool */ - public function isReadonly() : bool { + public function isReadonly(): bool { return (bool) ($this->flags & Modifiers::READONLY); } - public function getType() : string { + public function getType(): string { return 'Stmt_Property'; } } diff --git a/lib/PhpParser/Node/Stmt/PropertyProperty.php b/lib/PhpParser/Node/Stmt/PropertyProperty.php index 286b42961c..69fb3b9934 100644 --- a/lib/PhpParser/Node/Stmt/PropertyProperty.php +++ b/lib/PhpParser/Node/Stmt/PropertyProperty.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class PropertyProperty extends Node\Stmt -{ +class PropertyProperty extends Node\Stmt { /** @var Node\VarLikeIdentifier Name */ public $name; /** @var null|Node\Expr Default */ @@ -24,11 +23,11 @@ public function __construct($name, ?Node\Expr $default = null, array $attributes $this->default = $default; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'default']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_PropertyProperty'; } } diff --git a/lib/PhpParser/Node/Stmt/Return_.php b/lib/PhpParser/Node/Stmt/Return_.php index 53731254c0..726220ab09 100644 --- a/lib/PhpParser/Node/Stmt/Return_.php +++ b/lib/PhpParser/Node/Stmt/Return_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Return_ extends Node\Stmt -{ +class Return_ extends Node\Stmt { /** @var null|Node\Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(?Node\Expr $expr = null, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Return'; } } diff --git a/lib/PhpParser/Node/Stmt/StaticVar.php b/lib/PhpParser/Node/Stmt/StaticVar.php index 0cc47b4122..cb5f507de2 100644 --- a/lib/PhpParser/Node/Stmt/StaticVar.php +++ b/lib/PhpParser/Node/Stmt/StaticVar.php @@ -5,8 +5,7 @@ use PhpParser\Node; use PhpParser\Node\Expr; -class StaticVar extends Node\Stmt -{ +class StaticVar extends Node\Stmt { /** @var Expr\Variable Variable */ public $var; /** @var null|Node\Expr Default value */ @@ -27,11 +26,11 @@ public function __construct( $this->default = $default; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'default']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_StaticVar'; } } diff --git a/lib/PhpParser/Node/Stmt/Static_.php b/lib/PhpParser/Node/Stmt/Static_.php index 464898ffa6..f53665fe54 100644 --- a/lib/PhpParser/Node/Stmt/Static_.php +++ b/lib/PhpParser/Node/Stmt/Static_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Stmt; -class Static_ extends Stmt -{ +class Static_ extends Stmt { /** @var StaticVar[] Variable definitions */ public $vars; @@ -20,11 +19,11 @@ public function __construct(array $vars, array $attributes = []) { $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Static'; } } diff --git a/lib/PhpParser/Node/Stmt/Switch_.php b/lib/PhpParser/Node/Stmt/Switch_.php index 2c8dae0221..b5c560ec78 100644 --- a/lib/PhpParser/Node/Stmt/Switch_.php +++ b/lib/PhpParser/Node/Stmt/Switch_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Switch_ extends Node\Stmt -{ +class Switch_ extends Node\Stmt { /** @var Node\Expr Condition */ public $cond; /** @var Case_[] Case list */ @@ -24,11 +23,11 @@ public function __construct(Node\Expr $cond, array $cases, array $attributes = [ $this->cases = $cases; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'cases']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Switch'; } } diff --git a/lib/PhpParser/Node/Stmt/Throw_.php b/lib/PhpParser/Node/Stmt/Throw_.php index a34e2b3624..a22d40963c 100644 --- a/lib/PhpParser/Node/Stmt/Throw_.php +++ b/lib/PhpParser/Node/Stmt/Throw_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Throw_ extends Node\Stmt -{ +class Throw_ extends Node\Stmt { /** @var Node\Expr Expression */ public $expr; @@ -20,11 +19,11 @@ public function __construct(Node\Expr $expr, array $attributes = []) { $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Throw'; } } diff --git a/lib/PhpParser/Node/Stmt/TraitUse.php b/lib/PhpParser/Node/Stmt/TraitUse.php index 9e97053b40..7f6d318190 100644 --- a/lib/PhpParser/Node/Stmt/TraitUse.php +++ b/lib/PhpParser/Node/Stmt/TraitUse.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class TraitUse extends Node\Stmt -{ +class TraitUse extends Node\Stmt { /** @var Node\Name[] Traits */ public $traits; /** @var TraitUseAdaptation[] Adaptations */ @@ -24,11 +23,11 @@ public function __construct(array $traits, array $adaptations = [], array $attri $this->adaptations = $adaptations; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['traits', 'adaptations']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_TraitUse'; } } diff --git a/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php b/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php index 8bdd2c041f..601a265659 100644 --- a/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +++ b/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php @@ -4,8 +4,7 @@ use PhpParser\Node; -abstract class TraitUseAdaptation extends Node\Stmt -{ +abstract class TraitUseAdaptation extends Node\Stmt { /** @var Node\Name|null Trait name */ public $trait; /** @var Node\Identifier Method name */ diff --git a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php index f285640a82..a4ef555c35 100644 --- a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +++ b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Alias extends Node\Stmt\TraitUseAdaptation -{ +class Alias extends Node\Stmt\TraitUseAdaptation { /** @var null|int New modifier */ public $newModifier; /** @var null|Node\Identifier New name */ @@ -28,11 +27,11 @@ public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newN $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['trait', 'method', 'newModifier', 'newName']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_TraitUseAdaptation_Alias'; } } diff --git a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php index 80385f64e3..258386afa7 100644 --- a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +++ b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Precedence extends Node\Stmt\TraitUseAdaptation -{ +class Precedence extends Node\Stmt\TraitUseAdaptation { /** @var Node\Name[] Overwritten traits */ public $insteadof; @@ -24,11 +23,11 @@ public function __construct(Node\Name $trait, $method, array $insteadof, array $ $this->insteadof = $insteadof; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['trait', 'method', 'insteadof']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_TraitUseAdaptation_Precedence'; } } diff --git a/lib/PhpParser/Node/Stmt/Trait_.php b/lib/PhpParser/Node/Stmt/Trait_.php index 0cec203ac7..a1c208cada 100644 --- a/lib/PhpParser/Node/Stmt/Trait_.php +++ b/lib/PhpParser/Node/Stmt/Trait_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Trait_ extends ClassLike -{ +class Trait_ extends ClassLike { /** * Constructs a trait node. * @@ -22,11 +21,11 @@ public function __construct($name, array $subNodes = [], array $attributes = []) $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Trait'; } } diff --git a/lib/PhpParser/Node/Stmt/TryCatch.php b/lib/PhpParser/Node/Stmt/TryCatch.php index 74e004380b..3587d6ba14 100644 --- a/lib/PhpParser/Node/Stmt/TryCatch.php +++ b/lib/PhpParser/Node/Stmt/TryCatch.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class TryCatch extends Node\Stmt -{ +class TryCatch extends Node\Stmt { /** @var Node\Stmt[] Statements */ public $stmts; /** @var Catch_[] Catches */ @@ -28,11 +27,11 @@ public function __construct(array $stmts, array $catches, ?Finally_ $finally = n $this->finally = $finally; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts', 'catches', 'finally']; } - public function getType() : string { + public function getType(): string { return 'Stmt_TryCatch'; } } diff --git a/lib/PhpParser/Node/Stmt/Unset_.php b/lib/PhpParser/Node/Stmt/Unset_.php index 310e427aa2..74ae166433 100644 --- a/lib/PhpParser/Node/Stmt/Unset_.php +++ b/lib/PhpParser/Node/Stmt/Unset_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class Unset_ extends Node\Stmt -{ +class Unset_ extends Node\Stmt { /** @var Node\Expr[] Variables to unset */ public $vars; @@ -20,11 +19,11 @@ public function __construct(array $vars, array $attributes = []) { $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Unset'; } } diff --git a/lib/PhpParser/Node/Stmt/UseUse.php b/lib/PhpParser/Node/Stmt/UseUse.php index 32bd7847da..b6a3bfdcf8 100644 --- a/lib/PhpParser/Node/Stmt/UseUse.php +++ b/lib/PhpParser/Node/Stmt/UseUse.php @@ -5,8 +5,7 @@ use PhpParser\Node; use PhpParser\Node\Identifier; -class UseUse extends Node\Stmt -{ +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 */ @@ -29,7 +28,7 @@ public function __construct(Node\Name $name, $alias = null, int $type = Use_::TY $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['type', 'name', 'alias']; } @@ -38,15 +37,15 @@ public function getSubNodeNames() : array { * * @return Identifier */ - public function getAlias() : Identifier { + public function getAlias(): Identifier { if (null !== $this->alias) { return $this->alias; } return new Identifier($this->name->getLast()); } - - public function getType() : string { + + public function getType(): string { return 'Stmt_UseUse'; } } diff --git a/lib/PhpParser/Node/Stmt/Use_.php b/lib/PhpParser/Node/Stmt/Use_.php index 4b25be1a2c..150ee57e53 100644 --- a/lib/PhpParser/Node/Stmt/Use_.php +++ b/lib/PhpParser/Node/Stmt/Use_.php @@ -4,8 +4,7 @@ use PhpParser\Node\Stmt; -class Use_ extends 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 @@ -37,11 +36,11 @@ public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $a $this->uses = $uses; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['type', 'uses']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Use'; } } diff --git a/lib/PhpParser/Node/Stmt/While_.php b/lib/PhpParser/Node/Stmt/While_.php index f41034f8c2..f13b7e7a6e 100644 --- a/lib/PhpParser/Node/Stmt/While_.php +++ b/lib/PhpParser/Node/Stmt/While_.php @@ -4,8 +4,7 @@ use PhpParser\Node; -class While_ extends Node\Stmt -{ +class While_ extends Node\Stmt { /** @var Node\Expr Condition */ public $cond; /** @var Node\Stmt[] Statements */ @@ -24,11 +23,11 @@ public function __construct(Node\Expr $cond, array $stmts = [], array $attribute $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_While'; } } diff --git a/lib/PhpParser/Node/UnionType.php b/lib/PhpParser/Node/UnionType.php index 51ecec2a32..24f4597307 100644 --- a/lib/PhpParser/Node/UnionType.php +++ b/lib/PhpParser/Node/UnionType.php @@ -2,8 +2,7 @@ namespace PhpParser\Node; -class UnionType extends ComplexType -{ +class UnionType extends ComplexType { /** @var (Identifier|Name)[] Types */ public $types; @@ -18,11 +17,11 @@ public function __construct(array $types, array $attributes = []) { $this->types = $types; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['types']; } - - public function getType() : string { + + public function getType(): string { return 'UnionType'; } } diff --git a/lib/PhpParser/Node/VarLikeIdentifier.php b/lib/PhpParser/Node/VarLikeIdentifier.php index a30807a6d5..9baa6fe0bb 100644 --- a/lib/PhpParser/Node/VarLikeIdentifier.php +++ b/lib/PhpParser/Node/VarLikeIdentifier.php @@ -9,9 +9,8 @@ * Examples: Names in property declarations are formatted as variables. Names in static property * lookups are also formatted as variables. */ -class VarLikeIdentifier extends Identifier -{ - public function getType() : string { +class VarLikeIdentifier extends Identifier { + public function getType(): string { return 'VarLikeIdentifier'; } } diff --git a/lib/PhpParser/NodeAbstract.php b/lib/PhpParser/NodeAbstract.php index 02ef56eb52..358b62ec45 100644 --- a/lib/PhpParser/NodeAbstract.php +++ b/lib/PhpParser/NodeAbstract.php @@ -2,8 +2,7 @@ namespace PhpParser; -abstract class NodeAbstract implements Node, \JsonSerializable -{ +abstract class NodeAbstract implements Node, \JsonSerializable { protected $attributes; /** @@ -20,7 +19,7 @@ public function __construct(array $attributes = []) { * * @return int Start line (or -1 if not available) */ - public function getLine() : int { + public function getLine(): int { return $this->attributes['startLine'] ?? -1; } @@ -31,7 +30,7 @@ public function getLine() : int { * * @return int Start line (or -1 if not available) */ - public function getStartLine() : int { + public function getStartLine(): int { return $this->attributes['startLine'] ?? -1; } @@ -42,7 +41,7 @@ public function getStartLine() : int { * * @return int End line (or -1 if not available) */ - public function getEndLine() : int { + public function getEndLine(): int { return $this->attributes['endLine'] ?? -1; } @@ -55,7 +54,7 @@ public function getEndLine() : int { * * @return int Token start position (or -1 if not available) */ - public function getStartTokenPos() : int { + public function getStartTokenPos(): int { return $this->attributes['startTokenPos'] ?? -1; } @@ -68,7 +67,7 @@ public function getStartTokenPos() : int { * * @return int Token end position (or -1 if not available) */ - public function getEndTokenPos() : int { + public function getEndTokenPos(): int { return $this->attributes['endTokenPos'] ?? -1; } @@ -79,7 +78,7 @@ public function getEndTokenPos() : int { * * @return int File start position (or -1 if not available) */ - public function getStartFilePos() : int { + public function getStartFilePos(): int { return $this->attributes['startFilePos'] ?? -1; } @@ -90,7 +89,7 @@ public function getStartFilePos() : int { * * @return int File end position (or -1 if not available) */ - public function getEndFilePos() : int { + public function getEndFilePos(): int { return $this->attributes['endFilePos'] ?? -1; } @@ -101,7 +100,7 @@ public function getEndFilePos() : int { * * @return Comment[] */ - public function getComments() : array { + public function getComments(): array { return $this->attributes['comments'] ?? []; } @@ -149,7 +148,7 @@ public function setAttribute(string $key, $value) { $this->attributes[$key] = $value; } - public function hasAttribute(string $key) : bool { + public function hasAttribute(string $key): bool { return array_key_exists($key, $this->attributes); } @@ -161,7 +160,7 @@ public function getAttribute(string $key, $default = null) { return $default; } - public function getAttributes() : array { + public function getAttributes(): array { return $this->attributes; } @@ -172,7 +171,7 @@ public function setAttributes(array $attributes) { /** * @return array */ - public function jsonSerialize() : array { + public function jsonSerialize(): array { return ['nodeType' => $this->getType()] + get_object_vars($this); } } diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index ab834cbf41..56a6ac82fb 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -8,8 +8,7 @@ use PhpParser\Node\Stmt\Use_; use PhpParser\Node\Stmt\UseUse; -class NodeDumper -{ +class NodeDumper { private $dumpComments; private $dumpPositions; private $code; @@ -39,7 +38,7 @@ public function __construct(array $options = []) { * * @return string Dumped value */ - public function dump($node, ?string $code = null) : string { + public function dump($node, ?string $code = null): string { $this->code = $code; return $this->dumpRecursive($node); } diff --git a/lib/PhpParser/NodeFinder.php b/lib/PhpParser/NodeFinder.php index fa0c0fa139..079c4c1c25 100644 --- a/lib/PhpParser/NodeFinder.php +++ b/lib/PhpParser/NodeFinder.php @@ -5,8 +5,7 @@ use PhpParser\NodeVisitor\FindingVisitor; use PhpParser\NodeVisitor\FirstFindingVisitor; -class NodeFinder -{ +class NodeFinder { /** * Find all nodes satisfying a filter callback. * @@ -15,14 +14,14 @@ class NodeFinder * * @return Node[] Found nodes satisfying the filter callback */ - public function find($nodes, callable $filter) : array { + public function find($nodes, callable $filter): array { if (!is_array($nodes)) { $nodes = [$nodes]; } $visitor = new FindingVisitor($filter); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); $traverser->traverse($nodes); @@ -39,7 +38,7 @@ public function find($nodes, callable $filter) : array { * * @return TNode[] Found nodes (all instances of $class) */ - public function findInstanceOf($nodes, string $class) : array { + public function findInstanceOf($nodes, string $class): array { return $this->find($nodes, function ($node) use ($class) { return $node instanceof $class; }); @@ -60,7 +59,7 @@ public function findFirst($nodes, callable $filter): ?Node { $visitor = new FirstFindingVisitor($filter); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); $traverser->traverse($nodes); diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 7f886f21ad..781caa584f 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -2,8 +2,7 @@ namespace PhpParser; -class NodeTraverser implements NodeTraverserInterface -{ +class NodeTraverser implements NodeTraverserInterface { /** * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CHILDREN, child nodes * of the current node will not be traversed for any visitors. @@ -79,7 +78,7 @@ public function removeVisitor(NodeVisitor $visitor) { * * @return Node[] Traversed array of nodes */ - public function traverse(array $nodes) : array { + public function traverse(array $nodes): array { $this->stopTraversal = false; foreach ($this->visitors as $visitor) { @@ -106,7 +105,7 @@ public function traverse(array $nodes) : array { * * @return Node Result of traversal (may be original node or new one) */ - protected function traverseNode(Node $node) : Node { + protected function traverseNode(Node $node): Node { foreach ($node->getSubNodeNames() as $name) { $subNode =& $node->$name; @@ -188,7 +187,7 @@ protected function traverseNode(Node $node) : Node { * * @return array Result of traversal (may be original array or changed one) */ - protected function traverseArray(array $nodes) : array { + protected function traverseArray(array $nodes): array { $doNodes = []; foreach ($nodes as $i => &$node) { diff --git a/lib/PhpParser/NodeTraverserInterface.php b/lib/PhpParser/NodeTraverserInterface.php index 77ff3d27f6..383103e381 100644 --- a/lib/PhpParser/NodeTraverserInterface.php +++ b/lib/PhpParser/NodeTraverserInterface.php @@ -2,8 +2,7 @@ namespace PhpParser; -interface NodeTraverserInterface -{ +interface NodeTraverserInterface { /** * Adds a visitor. * @@ -25,5 +24,5 @@ public function removeVisitor(NodeVisitor $visitor); * * @return Node[] Traversed array of nodes */ - public function traverse(array $nodes) : array; + public function traverse(array $nodes): array; } diff --git a/lib/PhpParser/NodeVisitor.php b/lib/PhpParser/NodeVisitor.php index f1f7f3e3e3..5cd9234123 100644 --- a/lib/PhpParser/NodeVisitor.php +++ b/lib/PhpParser/NodeVisitor.php @@ -2,8 +2,7 @@ namespace PhpParser; -interface NodeVisitor -{ +interface NodeVisitor { /** * Called once before traversal. * diff --git a/lib/PhpParser/NodeVisitor/CloningVisitor.php b/lib/PhpParser/NodeVisitor/CloningVisitor.php index a85fa493b0..cba924998a 100644 --- a/lib/PhpParser/NodeVisitor/CloningVisitor.php +++ b/lib/PhpParser/NodeVisitor/CloningVisitor.php @@ -10,8 +10,7 @@ * * This visitor is required to perform format-preserving pretty prints. */ -class CloningVisitor extends NodeVisitorAbstract -{ +class CloningVisitor extends NodeVisitorAbstract { public function enterNode(Node $origNode) { $node = clone $origNode; $node->setAttribute('origNode', $origNode); diff --git a/lib/PhpParser/NodeVisitor/FindingVisitor.php b/lib/PhpParser/NodeVisitor/FindingVisitor.php index 38abbdb7f5..db137f2fec 100644 --- a/lib/PhpParser/NodeVisitor/FindingVisitor.php +++ b/lib/PhpParser/NodeVisitor/FindingVisitor.php @@ -9,8 +9,7 @@ * This visitor can be used to find and collect all nodes satisfying some criterion determined by * a filter callback. */ -class FindingVisitor extends NodeVisitorAbstract -{ +class FindingVisitor extends NodeVisitorAbstract { /** @var callable Filter callback */ protected $filterCallback; /** @var Node[] Found nodes */ @@ -27,7 +26,7 @@ public function __construct(callable $filterCallback) { * * @return Node[] Found nodes */ - public function getFoundNodes() : array { + public function getFoundNodes(): array { return $this->foundNodes; } diff --git a/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php index 19d6247a1b..2f7c101bed 100644 --- a/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ b/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php @@ -10,8 +10,7 @@ * This visitor can be used to find the first node satisfying some criterion determined by * a filter callback. */ -class FirstFindingVisitor extends NodeVisitorAbstract -{ +class FirstFindingVisitor extends NodeVisitorAbstract { /** @var callable Filter callback */ protected $filterCallback; /** @var null|Node Found node */ diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index 063f972b2a..eacbb05d20 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -11,8 +11,7 @@ use PhpParser\Node\Stmt; use PhpParser\NodeVisitorAbstract; -class NameResolver extends NodeVisitorAbstract -{ +class NameResolver extends NodeVisitorAbstract { /** @var NameContext Naming context */ protected $nameContext; @@ -36,7 +35,7 @@ class NameResolver extends NodeVisitorAbstract * @param array $options Options */ public function __construct(?ErrorHandler $errorHandler = null, array $options = []) { - $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing); + $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing()); $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? false; $this->replaceNodes = $options['replaceNodes'] ?? true; } @@ -46,7 +45,7 @@ public function __construct(?ErrorHandler $errorHandler = null, array $options = * * @return NameContext */ - public function getNameContext() : NameContext { + public function getNameContext(): NameContext { return $this->nameContext; } @@ -86,7 +85,7 @@ public function enterNode(Node $node) { $this->resolveAttrGroups($node); $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\Enum_) { + } elseif ($node instanceof Stmt\Enum_) { foreach ($node->implements as &$interface) { $interface = $this->resolveClassName($interface); } @@ -117,9 +116,9 @@ public function enterNode(Node $node) { foreach ($node->consts as $const) { $this->addNamespacedName($const); } - } else if ($node instanceof Stmt\ClassConst) { + } elseif ($node instanceof Stmt\ClassConst) { $this->resolveAttrGroups($node); - } else if ($node instanceof Stmt\EnumCase) { + } elseif ($node instanceof Stmt\EnumCase) { $this->resolveAttrGroups($node); } elseif ($node instanceof Expr\StaticCall || $node instanceof Expr\StaticPropertyFetch @@ -206,7 +205,7 @@ private function resolveType($node) { * * @return Name Resolved name, or original name with attribute */ - protected function resolveName(Name $name, int $type) : Name { + protected function resolveName(Name $name, int $type): Name { if (!$this->replaceNodes) { $resolvedName = $this->nameContext->getResolvedName($name, $type); if (null !== $resolvedName) { @@ -246,8 +245,7 @@ protected function addNamespacedName(Node $node) { $this->nameContext->getNamespace(), (string) $node->name); } - protected function resolveAttrGroups(Node $node) - { + protected function resolveAttrGroups(Node $node) { foreach ($node->attrGroups as $attrGroup) { foreach ($attrGroup->attrs as $attr) { $attr->name = $this->resolveClassName($attr->name); diff --git a/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php index ea372e5b99..6ccc9f085a 100644 --- a/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +++ b/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php @@ -14,8 +14,7 @@ * node can be accessed through $node->getAttribute('previous'), * and the next node can be accessed through $node->getAttribute('next'). */ -final class NodeConnectingVisitor extends NodeVisitorAbstract -{ +final class NodeConnectingVisitor extends NodeVisitorAbstract { /** * @var Node[] */ diff --git a/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php index b98d2bfa6f..c890094d2d 100644 --- a/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +++ b/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php @@ -2,31 +2,29 @@ namespace PhpParser\NodeVisitor; -use function array_pop; -use function count; use PhpParser\Node; use PhpParser\NodeVisitorAbstract; +use function array_pop; +use function count; + /** * Visitor that connects a child node to its parent node. * * On the child node, the parent node can be accessed through * $node->getAttribute('parent'). */ -final class ParentConnectingVisitor extends NodeVisitorAbstract -{ +final class ParentConnectingVisitor extends NodeVisitorAbstract { /** * @var Node[] */ private $stack = []; - public function beforeTraverse(array $nodes) - { + public function beforeTraverse(array $nodes) { $this->stack = []; } - public function enterNode(Node $node) - { + public function enterNode(Node $node) { if (!empty($this->stack)) { $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); } @@ -34,8 +32,7 @@ public function enterNode(Node $node) $this->stack[] = $node; } - public function leaveNode(Node $node) - { + public function leaveNode(Node $node) { array_pop($this->stack); } } diff --git a/lib/PhpParser/NodeVisitorAbstract.php b/lib/PhpParser/NodeVisitorAbstract.php index 0fc7f81378..6fb15cca4d 100644 --- a/lib/PhpParser/NodeVisitorAbstract.php +++ b/lib/PhpParser/NodeVisitorAbstract.php @@ -5,8 +5,7 @@ /** * @codeCoverageIgnore */ -abstract class NodeVisitorAbstract implements NodeVisitor -{ +abstract class NodeVisitorAbstract implements NodeVisitor { public function beforeTraverse(array $nodes) { return null; } diff --git a/lib/PhpParser/Parser.php b/lib/PhpParser/Parser.php index 31d99e96ef..3d6e1be6c2 100644 --- a/lib/PhpParser/Parser.php +++ b/lib/PhpParser/Parser.php @@ -2,8 +2,7 @@ namespace PhpParser; -interface Parser -{ +interface Parser { /** * Parses PHP code into a node tree. * diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index d5c01ac3af..7ab23597f8 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -26,8 +26,7 @@ use PhpParser\Node\Stmt\TryCatch; use PhpParser\Node\Stmt\UseUse; -abstract class ParserAbstract implements Parser -{ +abstract class ParserAbstract implements Parser { private const SYMBOL_NONE = -1; /** @var Lexer Lexer that is used when parsing */ @@ -162,7 +161,7 @@ public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { * the parser was unable to recover from an error). */ public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array { - $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing; + $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing(); $this->lexer->startLexing($code, $this->errorHandler); $result = $this->doParse(); @@ -328,6 +327,7 @@ protected function doParse() { $msg = $this->getErrorMessage($symbol, $state); $this->emitError(new Error($msg, $startAttributes + $endAttributes)); // Break missing intentionally + // no break case 1: case 2: $this->errorState = 3; @@ -395,7 +395,7 @@ protected function emitError(Error $error) { * * @return string Formatted error message */ - protected function getErrorMessage(int $symbol, int $state) : string { + protected function getErrorMessage(int $symbol, int $state): string { $expectedString = ''; if ($expected = $this->getExpectedTokens($state)) { $expectedString = ', expecting ' . implode(' or ', $expected); @@ -411,7 +411,7 @@ protected function getErrorMessage(int $symbol, int $state) : string { * * @return string[] Expected tokens. If too many, an empty array is returned. */ - protected function getExpectedTokens(int $state) : array { + protected function getExpectedTokens(int $state): array { $expected = []; $base = $this->actionBase[$state]; @@ -484,7 +484,7 @@ protected function traceDiscard($symbol) { * @param Node\Stmt[] $stmts * @return Node\Stmt[] */ - protected function handleNamespaces(array $stmts) : array { + protected function handleNamespaces(array $stmts): array { $hasErrored = false; $style = $this->getNamespacingStyle($stmts); if (null === $style) { @@ -628,12 +628,11 @@ protected function handleBuiltinTypes(Name $name) { * * @return array Combined start and end attributes */ - protected function getAttributesAt(int $pos) : array { + protected function getAttributesAt(int $pos): array { return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; } - protected function getFloatCastKind(string $cast): int - { + protected function getFloatCastKind(string $cast): int { $cast = strtolower($cast); if (strpos($cast, 'float') !== false) { return Double::KIND_FLOAT; @@ -819,7 +818,7 @@ protected function createCommentNopAttributes(array $comments): array { } protected function fixupArrayDestructuring(Array_ $node) { - return new Expr\List_(array_map(function(?Expr\ArrayItem $item) { + return new Expr\List_(array_map(function (?Expr\ArrayItem $item) { if ($item !== null && $item->value instanceof Array_) { return new Expr\ArrayItem( $this->fixupArrayDestructuring($item->value), @@ -1006,13 +1005,13 @@ protected function createTokenMap(): array { if ($i < 256) { // Single-char tokens use an identity mapping. $tokenMap[$i] = $i; - } else if (\T_DOUBLE_COLON === $i) { + } elseif (\T_DOUBLE_COLON === $i) { // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM $tokenMap[$i] = static::T_PAAMAYIM_NEKUDOTAYIM; - } elseif(\T_OPEN_TAG_WITH_ECHO === $i) { + } elseif (\T_OPEN_TAG_WITH_ECHO === $i) { // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO $tokenMap[$i] = static::T_ECHO; - } elseif(\T_CLOSE_TAG === $i) { + } elseif (\T_CLOSE_TAG === $i) { // T_CLOSE_TAG is equivalent to ';' $tokenMap[$i] = ord(';'); } elseif ('UNKNOWN' !== $name = token_name($i)) { diff --git a/lib/PhpParser/ParserFactory.php b/lib/PhpParser/ParserFactory.php index d461eb4f23..307981e1bb 100644 --- a/lib/PhpParser/ParserFactory.php +++ b/lib/PhpParser/ParserFactory.php @@ -5,8 +5,7 @@ use PhpParser\Parser\Php7; use PhpParser\Parser\Php8; -class ParserFactory -{ +class ParserFactory { public const PREFER_PHP7 = 1; public const ONLY_PHP7 = 3; diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 6f5d296aa8..79c0b5b9b1 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -13,8 +13,7 @@ use PhpParser\Node\Stmt; use PhpParser\PrettyPrinterAbstract; -class Standard extends PrettyPrinterAbstract -{ +class Standard extends PrettyPrinterAbstract { // Special nodes protected function pParam(Node\Param $node) { @@ -142,6 +141,7 @@ protected function pScalar_String(Scalar\String_ $node) { . $this->docStringEndToken; } /* break missing intentionally */ + // no break case Scalar\String_::KIND_SINGLE_QUOTED: return $this->pSingleQuotedString($node->value); case Scalar\String_::KIND_HEREDOC: @@ -155,7 +155,8 @@ protected function pScalar_String(Scalar\String_ $node) { return "<<<$label\n" . $escaped . "\n$label" . $this->docStringEndToken; } - /* break missing intentionally */ + /* break missing intentionally */ + // no break case Scalar\String_::KIND_DOUBLE_QUOTED: return '"' . $this->escapeString($node->value, '"') . '"'; } @@ -791,7 +792,7 @@ protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias return (null !== $node->trait ? $this->p($node->trait) . '::' : '') . $node->method . ' as' . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '') - . (null !== $node->newName ? ' ' . $node->newName : '') + . (null !== $node->newName ? ' ' . $node->newName : '') . ';'; } @@ -1046,7 +1047,8 @@ protected function escapeString($string, $quote) { )/x'; return preg_replace_callback($regex, function ($matches) { assert(strlen($matches[0]) === 1); - $hex = dechex(ord($matches[0]));; + $hex = dechex(ord($matches[0])); + ; return '\\x' . str_pad($hex, 2, '0', \STR_PAD_LEFT); }, $escaped); } @@ -1074,7 +1076,7 @@ protected function encapsedContainsEndLabel(array $parts, $label) { protected function pDereferenceLhs(Node $node) { if (!$this->dereferenceLhsRequiresParens($node)) { return $this->p($node); - } else { + } else { return '(' . $this->p($node) . ')'; } } @@ -1082,7 +1084,7 @@ protected function pDereferenceLhs(Node $node) { protected function pCallLhs(Node $node) { if (!$this->callLhsRequiresParens($node)) { return $this->p($node); - } else { + } else { return '(' . $this->p($node) . ')'; } } diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 791e6527c3..ae5da868ee 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -12,8 +12,7 @@ use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; -abstract class PrettyPrinterAbstract -{ +abstract class PrettyPrinterAbstract { protected const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence protected const FIXUP_PREC_RIGHT = 1; // RHS operand affected by precedence protected const FIXUP_CALL_LHS = 2; // LHS of call @@ -200,7 +199,7 @@ protected function outdent() { * * @return string Pretty printed statements */ - public function prettyPrint(array $stmts) : string { + public function prettyPrint(array $stmts): string { $this->resetState(); $this->preprocessNodes($stmts); @@ -214,7 +213,7 @@ public function prettyPrint(array $stmts) : string { * * @return string Pretty printed node */ - public function prettyPrintExpr(Expr $node) : string { + public function prettyPrintExpr(Expr $node): string { $this->resetState(); return $this->handleMagicTokens($this->p($node)); } @@ -226,7 +225,7 @@ public function prettyPrintExpr(Expr $node) : string { * * @return string Pretty printed statements */ - public function prettyPrintFile(array $stmts) : string { + public function prettyPrintFile(array $stmts): string { if (!$stmts) { return "indent(); } @@ -318,7 +317,7 @@ protected function pStmts(array $nodes, bool $indent = true) : string { * * @return string Pretty printed infix operation */ - protected function pInfixOp(string $class, Node $leftNode, string $operatorString, Node $rightNode) : string { + protected function pInfixOp(string $class, Node $leftNode, string $operatorString, Node $rightNode): string { list($precedence, $associativity) = $this->precedenceMap[$class]; return $this->pPrec($leftNode, $precedence, $associativity, -1) @@ -335,7 +334,7 @@ protected function pInfixOp(string $class, Node $leftNode, string $operatorStrin * * @return string Pretty printed prefix operation */ - protected function pPrefixOp(string $class, string $operatorString, Node $node) : string { + protected function pPrefixOp(string $class, string $operatorString, Node $node): string { list($precedence, $associativity) = $this->precedenceMap[$class]; return $operatorString . $this->pPrec($node, $precedence, $associativity, 1); } @@ -352,7 +351,7 @@ protected function pPrefixOp(string $class, string $operatorString, Node $node) * * @return string The pretty printed node */ - protected function pPrec(Node $node, int $parentPrecedence, int $parentAssociativity, int $childPosition) : string { + protected function pPrec(Node $node, int $parentPrecedence, int $parentAssociativity, int $childPosition): string { $class = \get_class($node); if (isset($this->precedenceMap[$class])) { $childPrecedence = $this->precedenceMap[$class][0]; @@ -374,7 +373,7 @@ protected function pPrec(Node $node, int $parentPrecedence, int $parentAssociati * * @return string Imploded pretty printed nodes */ - protected function pImplode(array $nodes, string $glue = '') : string { + protected function pImplode(array $nodes, string $glue = ''): string { $pNodes = []; foreach ($nodes as $node) { if (null === $node) { @@ -394,7 +393,7 @@ protected function pImplode(array $nodes, string $glue = '') : string { * * @return string Comma separated pretty printed nodes */ - protected function pCommaSeparated(array $nodes) : string { + protected function pCommaSeparated(array $nodes): string { return $this->pImplode($nodes, ', '); } @@ -408,7 +407,7 @@ protected function pCommaSeparated(array $nodes) : string { * * @return string Comma separated pretty printed nodes in multiline style */ - protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma) : string { + protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string { $this->indent(); $result = ''; @@ -440,7 +439,7 @@ protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma) : * * @return string Reformatted text of comments */ - protected function pComments(array $comments) : string { + protected function pComments(array $comments): string { $formattedComments = []; foreach ($comments as $comment) { @@ -467,7 +466,7 @@ protected function pComments(array $comments) : string { * * @return string */ - public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens) : string { + public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { $this->initializeNodeListDiffer(); $this->initializeLabelCharMap(); $this->initializeFixupMap(); @@ -509,7 +508,7 @@ protected function pFallback(Node $node) { * * @return string Pretty printed node */ - protected function p(Node $node, bool $parentFormatPreserved = false) : string { + protected function p(Node $node, bool $parentFormatPreserved = false): string { // No orig tokens means this is a normal pretty print without preservation of formatting if (!$this->origTokens) { return $this->{'p' . $node->getType()}($node); @@ -942,7 +941,7 @@ protected function pArray( * * @return string Result of fixed-up print of subnode */ - protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos) : string { + protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { switch ($fixup) { case self::FIXUP_PREC_LEFT: case self::FIXUP_PREC_RIGHT: @@ -1024,7 +1023,7 @@ protected function safeAppend(string &$str, string $append) { * * @return bool Whether parentheses are required */ - protected function callLhsRequiresParens(Node $node) : bool { + protected function callLhsRequiresParens(Node $node): bool { return !($node instanceof Node\Name || $node instanceof Expr\Variable || $node instanceof Expr\ArrayDimFetch @@ -1042,7 +1041,7 @@ protected function callLhsRequiresParens(Node $node) : bool { * * @return bool Whether parentheses are required */ - protected function dereferenceLhsRequiresParens(Node $node) : bool { + protected function dereferenceLhsRequiresParens(Node $node): bool { return !($node instanceof Expr\Variable || $node instanceof Node\Name || $node instanceof Expr\ArrayDimFetch @@ -1067,13 +1066,13 @@ protected function dereferenceLhsRequiresParens(Node $node) : bool { * @return string Printed modifiers */ protected function pModifiers(int $modifiers): string { - return ($modifiers & Modifiers::FINAL ? 'final ' : '') - . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') - . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') + return ($modifiers & Modifiers::FINAL ? 'final ' : '') + . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') + . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') - . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') - . ($modifiers & Modifiers::STATIC ? 'static ' : '') - . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); + . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') + . ($modifiers & Modifiers::STATIC ? 'static ' : '') + . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); } /** @@ -1083,7 +1082,7 @@ protected function pModifiers(int $modifiers): string { * * @return bool Whether multiline formatting is used */ - protected function isMultiline(array $nodes) : bool { + protected function isMultiline(array $nodes): bool { if (\count($nodes) < 2) { return false; } @@ -1116,7 +1115,9 @@ protected function isMultiline(array $nodes) : bool { * The label char map determines whether a certain character may occur in a label. */ protected function initializeLabelCharMap() { - if ($this->labelCharMap) return; + if ($this->labelCharMap) { + return; + } $this->labelCharMap = []; for ($i = 0; $i < 256; $i++) { @@ -1133,7 +1134,9 @@ protected function initializeLabelCharMap() { * The node list differ is used to determine differences between two array subnodes. */ protected function initializeNodeListDiffer() { - if ($this->nodeListDiffer) return; + if ($this->nodeListDiffer) { + return; + } $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { if ($a instanceof Node && $b instanceof Node) { @@ -1151,7 +1154,9 @@ protected function initializeNodeListDiffer() { * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. */ protected function initializeFixupMap() { - if ($this->fixupMap) return; + if ($this->fixupMap) { + return; + } $this->fixupMap = [ Expr\Instanceof_::class => [ @@ -1233,7 +1238,9 @@ protected function initializeFixupMap() { * certain node is replaced by null. */ protected function initializeRemovalMap() { - if ($this->removalMap) return; + if ($this->removalMap) { + return; + } $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; $stripLeft = ['left' => \T_WHITESPACE]; @@ -1278,7 +1285,9 @@ protected function initializeRemovalMap() { } protected function initializeInsertionMap() { - if ($this->insertionMap) return; + if ($this->insertionMap) { + return; + } // TODO: "yield" where both key and value are inserted doesn't work // [$find, $beforeToken, $extraLeft, $extraRight] @@ -1320,7 +1329,9 @@ protected function initializeInsertionMap() { } protected function initializeListInsertionMap() { - if ($this->listInsertionMap) return; + if ($this->listInsertionMap) { + return; + } $this->listInsertionMap = [ // special @@ -1414,7 +1425,9 @@ protected function initializeListInsertionMap() { } protected function initializeEmptyListInsertionMap() { - if ($this->emptyListInsertionMap) return; + if ($this->emptyListInsertionMap) { + return; + } // TODO Insertion into empty statement lists. @@ -1467,7 +1480,9 @@ protected function initializeEmptyListInsertionMap() { } protected function initializeModifierChangeMap() { - if ($this->modifierChangeMap) return; + if ($this->modifierChangeMap) { + return; + } $this->modifierChangeMap = [ 'Stmt_ClassConst->flags' => \T_CONST, From a2753c8218dc5e3afe179e8adecd3d605770137b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 28 Aug 2022 23:02:46 +0200 Subject: [PATCH 123/428] Require strict_types in php-cs-fixer config --- .php-cs-fixer.dist.php | 4 +++- lib/PhpParser/Modifiers.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 19efd86641..71a0eb6236 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -6,7 +6,8 @@ ; $config = new PhpCsFixer\Config(); -return $config->setRules([ +return $config->setRiskyAllowed(true) + ->setRules([ '@PSR12' => true, // We use PSR12 with consistent brace placement. 'curly_braces_position' => [ @@ -15,6 +16,7 @@ ], // declare(strict_types=1) on the same line as false, + 'declare_strict_types' => true, // Keep argument formatting for now. 'method_argument_space' => ['on_multiline' => 'ignore'], ]) diff --git a/lib/PhpParser/Modifiers.php b/lib/PhpParser/Modifiers.php index 871aae72be..a13822714e 100644 --- a/lib/PhpParser/Modifiers.php +++ b/lib/PhpParser/Modifiers.php @@ -1,4 +1,4 @@ - Date: Mon, 29 Aug 2022 21:52:53 +0200 Subject: [PATCH 124/428] Format tests as well The unnecessary parentheses for "new" are a bit annoying, but I can live with it... --- .php-cs-fixer.dist.php | 1 + test/PhpParser/Builder/ClassConstTest.php | 23 ++++--- test/PhpParser/Builder/ClassTest.php | 3 +- test/PhpParser/Builder/EnumCaseTest.php | 3 +- test/PhpParser/Builder/EnumTest.php | 3 +- test/PhpParser/Builder/FunctionTest.php | 3 +- test/PhpParser/Builder/InterfaceTest.php | 5 +- test/PhpParser/Builder/MethodTest.php | 3 +- test/PhpParser/Builder/NamespaceTest.php | 3 +- test/PhpParser/Builder/ParamTest.php | 9 ++- test/PhpParser/Builder/PropertyTest.php | 7 +-- test/PhpParser/Builder/TraitTest.php | 6 +- .../Builder/TraitUseAdaptationTest.php | 3 +- test/PhpParser/Builder/TraitUseTest.php | 3 +- test/PhpParser/Builder/UseTest.php | 3 +- test/PhpParser/BuilderFactoryTest.php | 13 ++-- test/PhpParser/BuilderHelpersTest.php | 3 +- test/PhpParser/CodeParsingTest.php | 7 +-- test/PhpParser/CodeTestAbstract.php | 5 +- test/PhpParser/CodeTestParser.php | 5 +- test/PhpParser/CommentTest.php | 3 +- test/PhpParser/CompatibilityTest.php | 3 +- test/PhpParser/ConstExprEvaluatorTest.php | 5 +- .../PhpParser/ErrorHandler/CollectingTest.php | 3 +- test/PhpParser/ErrorHandler/ThrowingTest.php | 3 +- test/PhpParser/ErrorTest.php | 4 +- test/PhpParser/Internal/DifferTest.php | 11 ++-- test/PhpParser/JsonDecoderTest.php | 3 +- test/PhpParser/Lexer/EmulativeTest.php | 5 +- test/PhpParser/LexerTest.php | 3 +- test/PhpParser/NameContextTest.php | 3 +- test/PhpParser/Node/Expr/CallableLikeTest.php | 2 +- test/PhpParser/Node/IdentifierTest.php | 3 +- test/PhpParser/Node/NameTest.php | 5 +- test/PhpParser/Node/Scalar/DNumberTest.php | 6 +- test/PhpParser/Node/Scalar/MagicConstTest.php | 19 +++--- test/PhpParser/Node/Scalar/NumberTest.php | 6 +- test/PhpParser/Node/Scalar/StringTest.php | 6 +- test/PhpParser/Node/Stmt/ClassConstTest.php | 3 +- test/PhpParser/Node/Stmt/ClassMethodTest.php | 6 +- test/PhpParser/Node/Stmt/ClassTest.php | 6 +- test/PhpParser/Node/Stmt/InterfaceTest.php | 3 +- test/PhpParser/Node/Stmt/PropertyTest.php | 3 +- test/PhpParser/NodeAbstractTest.php | 12 ++-- test/PhpParser/NodeDumperTest.php | 11 ++-- test/PhpParser/NodeFinderTest.php | 23 ++++--- test/PhpParser/NodeTraverserTest.php | 37 ++++++----- .../NodeVisitor/FindingVisitorTest.php | 7 +-- .../NodeVisitor/FirstFindingVisitorTest.php | 7 +-- .../NodeVisitor/NameResolverTest.php | 63 +++++++++---------- .../NodeVisitor/NodeConnectingVisitorTest.php | 16 +++-- .../ParentConnectingVisitorTest.php | 14 ++--- test/PhpParser/NodeVisitorForTesting.php | 2 +- test/PhpParser/ParserFactoryTest.php | 5 +- test/PhpParser/ParserTest.php | 16 +++-- test/PhpParser/PrettyPrinterTest.php | 19 +++--- test/bootstrap.php | 2 +- test/updateTests.php | 4 +- 58 files changed, 203 insertions(+), 260 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 71a0eb6236..d05bad1c61 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -3,6 +3,7 @@ $finder = PhpCsFixer\Finder::create() ->exclude('PhpParser/Parser') ->in(__DIR__ . '/lib') + ->in(__DIR__ . '/test') ; $config = new PhpCsFixer\Config(); diff --git a/test/PhpParser/Builder/ClassConstTest.php b/test/PhpParser/Builder/ClassConstTest.php index 21a8638b09..0d4811e088 100644 --- a/test/PhpParser/Builder/ClassConstTest.php +++ b/test/PhpParser/Builder/ClassConstTest.php @@ -15,8 +15,7 @@ use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; -class ClassConstTest extends \PHPUnit\Framework\TestCase -{ +class ClassConstTest extends \PHPUnit\Framework\TestCase { public function createClassConstBuilder($name, $value) { return new ClassConst($name, $value); } @@ -45,7 +44,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("TEST", new LNumber(1) ) + new Const_("TEST", new LNumber(1)) ], Modifiers::PROTECTED ), @@ -60,7 +59,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("TEST", new LNumber(1) ) + new Const_("TEST", new LNumber(1)) ], Modifiers::PUBLIC ), @@ -75,7 +74,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("TEST", new LNumber(1) ) + new Const_("TEST", new LNumber(1)) ], Modifiers::FINAL ), @@ -84,7 +83,7 @@ public function testModifiers() { } public function testDocComment() { - $node = $this->createClassConstBuilder('TEST',1) + $node = $this->createClassConstBuilder('TEST', 1) ->setDocComment('/** Test */') ->makePublic() ->getNode(); @@ -92,7 +91,7 @@ public function testDocComment() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("TEST", new LNumber(1) ) + new Const_("TEST", new LNumber(1)) ], Modifiers::PUBLIC, [ @@ -104,8 +103,8 @@ public function testDocComment() { } public function testAddConst() { - $node = $this->createClassConstBuilder('FIRST_TEST',1) - ->addConst("SECOND_TEST",2) + $node = $this->createClassConstBuilder('FIRST_TEST', 1) + ->addConst("SECOND_TEST", 2) ->getNode(); $this->assertEquals( @@ -133,7 +132,7 @@ public function testAddAttribute() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("ATTR_GROUP", new LNumber(1) ) + new Const_("ATTR_GROUP", new LNumber(1)) ], 0, [], @@ -202,8 +201,8 @@ public function provideTestDefaultValues() { ]) ], [ - new Scalar\MagicConst\Dir, - new Scalar\MagicConst\Dir + new Scalar\MagicConst\Dir(), + new Scalar\MagicConst\Dir() ] ]; } diff --git a/test/PhpParser/Builder/ClassTest.php b/test/PhpParser/Builder/ClassTest.php index b1c591660d..160de91337 100644 --- a/test/PhpParser/Builder/ClassTest.php +++ b/test/PhpParser/Builder/ClassTest.php @@ -13,8 +13,7 @@ use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; -class ClassTest extends \PHPUnit\Framework\TestCase -{ +class ClassTest extends \PHPUnit\Framework\TestCase { protected function createClassBuilder($class) { return new Class_($class); } diff --git a/test/PhpParser/Builder/EnumCaseTest.php b/test/PhpParser/Builder/EnumCaseTest.php index d88343cb77..be3a863537 100644 --- a/test/PhpParser/Builder/EnumCaseTest.php +++ b/test/PhpParser/Builder/EnumCaseTest.php @@ -12,8 +12,7 @@ use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; -class EnumCaseTest extends \PHPUnit\Framework\TestCase -{ +class EnumCaseTest extends \PHPUnit\Framework\TestCase { public function createEnumCaseBuilder($name) { return new EnumCase($name); } diff --git a/test/PhpParser/Builder/EnumTest.php b/test/PhpParser/Builder/EnumTest.php index c472b2f47c..f4ab3b9042 100644 --- a/test/PhpParser/Builder/EnumTest.php +++ b/test/PhpParser/Builder/EnumTest.php @@ -12,8 +12,7 @@ use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; -class EnumTest extends \PHPUnit\Framework\TestCase -{ +class EnumTest extends \PHPUnit\Framework\TestCase { protected function createEnumBuilder($class) { return new Enum_($class); } diff --git a/test/PhpParser/Builder/FunctionTest.php b/test/PhpParser/Builder/FunctionTest.php index 937fa8ec15..175ff6d478 100644 --- a/test/PhpParser/Builder/FunctionTest.php +++ b/test/PhpParser/Builder/FunctionTest.php @@ -15,8 +15,7 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -class FunctionTest extends \PHPUnit\Framework\TestCase -{ +class FunctionTest extends \PHPUnit\Framework\TestCase { public function createFunctionBuilder($name) { return new Function_($name); } diff --git a/test/PhpParser/Builder/InterfaceTest.php b/test/PhpParser/Builder/InterfaceTest.php index 5eaf5ff9f1..79e956dd88 100644 --- a/test/PhpParser/Builder/InterfaceTest.php +++ b/test/PhpParser/Builder/InterfaceTest.php @@ -13,14 +13,13 @@ use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; -class InterfaceTest extends \PHPUnit\Framework\TestCase -{ +class InterfaceTest extends \PHPUnit\Framework\TestCase { protected function createInterfaceBuilder() { return new Interface_('Contract'); } private function dump($node) { - $pp = new \PhpParser\PrettyPrinter\Standard; + $pp = new \PhpParser\PrettyPrinter\Standard(); return $pp->prettyPrint([$node]); } diff --git a/test/PhpParser/Builder/MethodTest.php b/test/PhpParser/Builder/MethodTest.php index d49bda9614..ee0ea49292 100644 --- a/test/PhpParser/Builder/MethodTest.php +++ b/test/PhpParser/Builder/MethodTest.php @@ -16,8 +16,7 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -class MethodTest extends \PHPUnit\Framework\TestCase -{ +class MethodTest extends \PHPUnit\Framework\TestCase { public function createMethodBuilder($name) { return new Method($name); } diff --git a/test/PhpParser/Builder/NamespaceTest.php b/test/PhpParser/Builder/NamespaceTest.php index 689001bcbe..10a3870a83 100644 --- a/test/PhpParser/Builder/NamespaceTest.php +++ b/test/PhpParser/Builder/NamespaceTest.php @@ -6,8 +6,7 @@ use PhpParser\Node; use PhpParser\Node\Stmt; -class NamespaceTest extends \PHPUnit\Framework\TestCase -{ +class NamespaceTest extends \PHPUnit\Framework\TestCase { protected function createNamespaceBuilder($fqn) { return new Namespace_($fqn); } diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index 3f83023df3..98fae53251 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -12,8 +12,7 @@ use PhpParser\Node\Scalar; use PhpParser\Node\Scalar\LNumber; -class ParamTest extends \PHPUnit\Framework\TestCase -{ +class ParamTest extends \PHPUnit\Framework\TestCase { public function createParamBuilder($name) { return new Param($name); } @@ -78,8 +77,8 @@ public function provideTestDefaultValues() { ]) ], [ - new Scalar\MagicConst\Dir, - new Scalar\MagicConst\Dir + new Scalar\MagicConst\Dir(), + new Scalar\MagicConst\Dir() ] ]; } @@ -178,7 +177,7 @@ public function testVoidTypeError() { public function testInvalidTypeError() { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Type must be a string, or an instance of Name, Identifier or ComplexType'); - $this->createParamBuilder('test')->setType(new \stdClass); + $this->createParamBuilder('test')->setType(new \stdClass()); } public function testByRef() { diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index e3ddcb6968..0e48ec2613 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -14,8 +14,7 @@ use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; -class PropertyTest extends \PHPUnit\Framework\TestCase -{ +class PropertyTest extends \PHPUnit\Framework\TestCase { public function createPropertyBuilder($name) { return new Property($name); } @@ -185,8 +184,8 @@ public function provideTestDefaultValues() { ]) ], [ - new Scalar\MagicConst\Dir, - new Scalar\MagicConst\Dir + new Scalar\MagicConst\Dir(), + new Scalar\MagicConst\Dir() ] ]; } diff --git a/test/PhpParser/Builder/TraitTest.php b/test/PhpParser/Builder/TraitTest.php index 467032636a..3285d19c8b 100644 --- a/test/PhpParser/Builder/TraitTest.php +++ b/test/PhpParser/Builder/TraitTest.php @@ -18,8 +18,7 @@ use PhpParser\Node\Stmt\PropertyProperty; use PhpParser\Node\Stmt\TraitUse; -class TraitTest extends \PHPUnit\Framework\TestCase -{ +class TraitTest extends \PHPUnit\Framework\TestCase { protected function createTraitBuilder($class) { return new Trait_($class); } @@ -76,8 +75,7 @@ public function testGetMethods() { $this->assertSame($methods, $trait->getMethods()); } - public function testGetProperties() - { + public function testGetProperties() { $properties = [ new Property(Modifiers::PUBLIC, [new PropertyProperty('foo')]), new Property(Modifiers::PUBLIC, [new PropertyProperty('bar')]), diff --git a/test/PhpParser/Builder/TraitUseAdaptationTest.php b/test/PhpParser/Builder/TraitUseAdaptationTest.php index 78fcb90006..d08850bd1f 100644 --- a/test/PhpParser/Builder/TraitUseAdaptationTest.php +++ b/test/PhpParser/Builder/TraitUseAdaptationTest.php @@ -7,8 +7,7 @@ use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Class_; -class TraitUseAdaptationTest extends \PHPUnit\Framework\TestCase -{ +class TraitUseAdaptationTest extends \PHPUnit\Framework\TestCase { protected function createTraitUseAdaptationBuilder($trait, $method) { return new TraitUseAdaptation($trait, $method); } diff --git a/test/PhpParser/Builder/TraitUseTest.php b/test/PhpParser/Builder/TraitUseTest.php index 8d20dfbd7c..b7bb527302 100644 --- a/test/PhpParser/Builder/TraitUseTest.php +++ b/test/PhpParser/Builder/TraitUseTest.php @@ -5,8 +5,7 @@ use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class TraitUseTest extends \PHPUnit\Framework\TestCase -{ +class TraitUseTest extends \PHPUnit\Framework\TestCase { protected function createTraitUseBuilder(...$traits) { return new TraitUse(...$traits); } diff --git a/test/PhpParser/Builder/UseTest.php b/test/PhpParser/Builder/UseTest.php index f17da59b42..97f240efaf 100644 --- a/test/PhpParser/Builder/UseTest.php +++ b/test/PhpParser/Builder/UseTest.php @@ -6,8 +6,7 @@ use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class UseTest extends \PHPUnit\Framework\TestCase -{ +class UseTest extends \PHPUnit\Framework\TestCase { protected function createUseBuilder($name, $type = Stmt\Use_::TYPE_NORMAL) { return new Builder\Use_($name, $type); } diff --git a/test/PhpParser/BuilderFactoryTest.php b/test/PhpParser/BuilderFactoryTest.php index 2886a03135..74a917c39d 100644 --- a/test/PhpParser/BuilderFactoryTest.php +++ b/test/PhpParser/BuilderFactoryTest.php @@ -11,13 +11,12 @@ use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Scalar\String_; -class BuilderFactoryTest extends \PHPUnit\Framework\TestCase -{ +class BuilderFactoryTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideTestFactory */ public function testFactory($methodName, $className) { - $factory = new BuilderFactory; + $factory = new BuilderFactory(); $this->assertInstanceOf($className, $factory->$methodName('test')); } @@ -40,8 +39,8 @@ public function provideTestFactory() { } public function testFactoryClassConst() { - $factory = new BuilderFactory; - $this->assertInstanceOf(Builder\ClassConst::class, $factory->classConst('TEST',1)); + $factory = new BuilderFactory(); + $this->assertInstanceOf(Builder\ClassConst::class, $factory->classConst('TEST', 1)); } public function testAttribute() { @@ -265,7 +264,7 @@ public function testInvalidVar() { } public function testIntegration() { - $factory = new BuilderFactory; + $factory = new BuilderFactory(); $node = $factory->namespace('Name\Space') ->addStmt($factory->use('Foo\Bar\SomeOtherClass')) ->addStmt($factory->use('Foo\Bar')->as('A')) @@ -322,7 +321,7 @@ public function testIntegration() { ) ->addStmt($factory->classConst("FIRST_CLASS_CONST", 1) - ->addConst("SECOND_CLASS_CONST",2) + ->addConst("SECOND_CLASS_CONST", 2) ->makePrivate())) ->getNode() ; diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index 531da05c34..b836156d6c 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -7,8 +7,7 @@ use PhpParser\Node\Stmt; use PhpParser\Node\Expr; -class BuilderHelpersTest extends \PHPUnit\Framework\TestCase -{ +class BuilderHelpersTest extends \PHPUnit\Framework\TestCase { public function testNormalizeNode() { $builder = new Class_('SomeClass'); $this->assertEquals($builder->getNode(), BuilderHelpers::normalizeNode($builder)); diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php index c329ff4031..076f536cf7 100644 --- a/test/PhpParser/CodeParsingTest.php +++ b/test/PhpParser/CodeParsingTest.php @@ -5,8 +5,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Stmt; -class CodeParsingTest extends CodeTestAbstract -{ +class CodeParsingTest extends CodeTestAbstract { /** * @dataProvider provideTestParse */ @@ -37,7 +36,7 @@ public function createParser(?string $version): Parser { public function getParseOutput(Parser $parser, $code, array $modes) { $dumpPositions = isset($modes['positions']); - $errors = new ErrorHandler\Collecting; + $errors = new ErrorHandler\Collecting(); $stmts = $parser->parse($code, $errors); $output = ''; @@ -71,7 +70,7 @@ private function checkAttributes($stmts) { } $traverser = new NodeTraverser(); - $traverser->addVisitor(new class extends NodeVisitorAbstract { + $traverser->addVisitor(new class () extends NodeVisitorAbstract { public function enterNode(Node $node) { $startLine = $node->getStartLine(); $endLine = $node->getEndLine(); diff --git a/test/PhpParser/CodeTestAbstract.php b/test/PhpParser/CodeTestAbstract.php index a77d0b7fc9..bf73f6e7a9 100644 --- a/test/PhpParser/CodeTestAbstract.php +++ b/test/PhpParser/CodeTestAbstract.php @@ -2,10 +2,9 @@ namespace PhpParser; -abstract class CodeTestAbstract extends \PHPUnit\Framework\TestCase -{ +abstract class CodeTestAbstract extends \PHPUnit\Framework\TestCase { protected function getTests($directory, $fileExtension, $chunksPerTest = 2) { - $parser = new CodeTestParser; + $parser = new CodeTestParser(); $allTests = []; foreach (filesInDir($directory, $fileExtension) as $fileName => $fileContents) { list($name, $tests) = $parser->parseTest($fileContents, $chunksPerTest); diff --git a/test/PhpParser/CodeTestParser.php b/test/PhpParser/CodeTestParser.php index d8bca64fc5..d77a50f0ce 100644 --- a/test/PhpParser/CodeTestParser.php +++ b/test/PhpParser/CodeTestParser.php @@ -2,15 +2,14 @@ namespace PhpParser; -class CodeTestParser -{ +class CodeTestParser { public function parseTest($code, $chunksPerTest) { $code = canonicalize($code); // evaluate @@{expr}@@ expressions $code = preg_replace_callback( '/@@\{(.*?)\}@@/', - function($matches) { + function ($matches) { return eval('return ' . $matches[1] . ';'); }, $code diff --git a/test/PhpParser/CommentTest.php b/test/PhpParser/CommentTest.php index 23174c7e08..49cf631ae4 100644 --- a/test/PhpParser/CommentTest.php +++ b/test/PhpParser/CommentTest.php @@ -2,8 +2,7 @@ namespace PhpParser; -class CommentTest extends \PHPUnit\Framework\TestCase -{ +class CommentTest extends \PHPUnit\Framework\TestCase { public function testGetters() { $comment = new Comment('/* Some comment */', 1, 10, 2, 1, 27, 2); diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index 4ab7c803f5..c64f79f135 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class CompatibilityTest extends \PHPUnit\Framework\TestCase -{ +class CompatibilityTest extends \PHPUnit\Framework\TestCase { public function testAliases1() { $node = new Node\ClosureUse(new Expr\Variable('x')); $this->assertTrue($node instanceof Expr\ClosureUse); diff --git a/test/PhpParser/ConstExprEvaluatorTest.php b/test/PhpParser/ConstExprEvaluatorTest.php index f73b2629f2..2d2cfc296f 100644 --- a/test/PhpParser/ConstExprEvaluatorTest.php +++ b/test/PhpParser/ConstExprEvaluatorTest.php @@ -5,8 +5,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Scalar; -class ConstExprEvaluatorTest extends \PHPUnit\Framework\TestCase -{ +class ConstExprEvaluatorTest extends \PHPUnit\Framework\TestCase { /** @dataProvider provideTestEvaluate */ public function testEvaluate($exprString, $expected) { $parser = new Parser\Php7(new Lexer()); @@ -83,7 +82,7 @@ public function testEvaluateFails() { } public function testEvaluateFallback() { - $evaluator = new ConstExprEvaluator(function(Expr $expr) { + $evaluator = new ConstExprEvaluator(function (Expr $expr) { if ($expr instanceof Scalar\MagicConst\Line) { return 42; } diff --git a/test/PhpParser/ErrorHandler/CollectingTest.php b/test/PhpParser/ErrorHandler/CollectingTest.php index a20101a8b6..83b1cbd0ac 100644 --- a/test/PhpParser/ErrorHandler/CollectingTest.php +++ b/test/PhpParser/ErrorHandler/CollectingTest.php @@ -4,8 +4,7 @@ use PhpParser\Error; -class CollectingTest extends \PHPUnit\Framework\TestCase -{ +class CollectingTest extends \PHPUnit\Framework\TestCase { public function testHandleError() { $errorHandler = new Collecting(); $this->assertFalse($errorHandler->hasErrors()); diff --git a/test/PhpParser/ErrorHandler/ThrowingTest.php b/test/PhpParser/ErrorHandler/ThrowingTest.php index be641ec7a9..61efd7bcfd 100644 --- a/test/PhpParser/ErrorHandler/ThrowingTest.php +++ b/test/PhpParser/ErrorHandler/ThrowingTest.php @@ -4,8 +4,7 @@ use PhpParser\Error; -class ThrowingTest extends \PHPUnit\Framework\TestCase -{ +class ThrowingTest extends \PHPUnit\Framework\TestCase { public function testHandleError() { $this->expectException(Error::class); $this->expectExceptionMessage('Test'); diff --git a/test/PhpParser/ErrorTest.php b/test/PhpParser/ErrorTest.php index cc2d3fa5c8..03e825441e 100644 --- a/test/PhpParser/ErrorTest.php +++ b/test/PhpParser/ErrorTest.php @@ -2,8 +2,7 @@ namespace PhpParser; -class ErrorTest extends \PHPUnit\Framework\TestCase -{ +class ErrorTest extends \PHPUnit\Framework\TestCase { public function testConstruct() { $attributes = [ 'startLine' => 10, @@ -50,7 +49,6 @@ public function testColumnInfo($code, $startPos, $endPos, $startColumn, $endColu $this->assertTrue($error->hasColumnInfo()); $this->assertSame($startColumn, $error->getStartColumn($code)); $this->assertSame($endColumn, $error->getEndColumn($code)); - } public function provideTestColumnInfo() { diff --git a/test/PhpParser/Internal/DifferTest.php b/test/PhpParser/Internal/DifferTest.php index 6fac3fd365..8ff3cb5c2e 100644 --- a/test/PhpParser/Internal/DifferTest.php +++ b/test/PhpParser/Internal/DifferTest.php @@ -2,8 +2,7 @@ namespace PhpParser\Internal; -class DifferTest extends \PHPUnit\Framework\TestCase -{ +class DifferTest extends \PHPUnit\Framework\TestCase { private function formatDiffString(array $diff) { $diffStr = ''; foreach ($diff as $diffElem) { @@ -30,7 +29,9 @@ private function formatDiffString(array $diff) { /** @dataProvider provideTestDiff */ public function testDiff($oldStr, $newStr, $expectedDiffStr) { - $differ = new Differ(function($a, $b) { return $a === $b; }); + $differ = new Differ(function ($a, $b) { + return $a === $b; + }); $diff = $differ->diff(str_split($oldStr), str_split($newStr)); $this->assertSame($expectedDiffStr, $this->formatDiffString($diff)); } @@ -49,7 +50,9 @@ public function provideTestDiff() { /** @dataProvider provideTestDiffWithReplacements */ public function testDiffWithReplacements($oldStr, $newStr, $expectedDiffStr) { - $differ = new Differ(function($a, $b) { return $a === $b; }); + $differ = new Differ(function ($a, $b) { + return $a === $b; + }); $diff = $differ->diffWithReplacements(str_split($oldStr), str_split($newStr)); $this->assertSame($expectedDiffStr, $this->formatDiffString($diff)); } diff --git a/test/PhpParser/JsonDecoderTest.php b/test/PhpParser/JsonDecoderTest.php index d5cb05973e..28fa4ed28b 100644 --- a/test/PhpParser/JsonDecoderTest.php +++ b/test/PhpParser/JsonDecoderTest.php @@ -2,8 +2,7 @@ namespace PhpParser; -class JsonDecoderTest extends \PHPUnit\Framework\TestCase -{ +class JsonDecoderTest extends \PHPUnit\Framework\TestCase { public function testRoundTrip() { $code = <<<'PHP' getLexer(); $lexer->startLexing('assertSame(['foo', 'bar'], $name->parts); @@ -130,7 +129,7 @@ public function testNameTypes() { public function testInvalidArg() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Expected string, array of parts or Name instance'); - Name::concat('foo', new \stdClass); + Name::concat('foo', new \stdClass()); } public function testInvalidEmptyString() { diff --git a/test/PhpParser/Node/Scalar/DNumberTest.php b/test/PhpParser/Node/Scalar/DNumberTest.php index b3e7c76a3c..32bcfefc5f 100644 --- a/test/PhpParser/Node/Scalar/DNumberTest.php +++ b/test/PhpParser/Node/Scalar/DNumberTest.php @@ -6,10 +6,8 @@ use PhpParser\Node\Stmt\Echo_; use PhpParser\ParserFactory; -class DNumberTest extends \PHPUnit\Framework\TestCase -{ - public function testRawValue() - { +class DNumberTest extends \PHPUnit\Framework\TestCase { + public function testRawValue() { $parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7); $nodes = $parser->parse('create(ParserFactory::PREFER_PHP7); $nodes = $parser->parse('create(ParserFactory::PREFER_PHP7); $nodes = $parser->parse(' constant(Modifiers::class . '::' . strtoupper($modifier)) ]); diff --git a/test/PhpParser/Node/Stmt/ClassTest.php b/test/PhpParser/Node/Stmt/ClassTest.php index 8d6f3e0775..f77e310c42 100644 --- a/test/PhpParser/Node/Stmt/ClassTest.php +++ b/test/PhpParser/Node/Stmt/ClassTest.php @@ -5,8 +5,7 @@ use PhpParser\Modifiers; use PhpParser\Node\Scalar\String_; -class ClassTest extends \PHPUnit\Framework\TestCase -{ +class ClassTest extends \PHPUnit\Framework\TestCase { public function testIsAbstract() { $class = new Class_('Foo', ['type' => Modifiers::ABSTRACT]); $this->assertTrue($class->isAbstract()); @@ -76,8 +75,7 @@ public function testGetConstants() { $this->assertSame($constants, $class->getConstants()); } - public function testGetProperties() - { + public function testGetProperties() { $properties = [ new Property(Modifiers::PUBLIC, [new PropertyProperty('foo')]), new Property(Modifiers::PUBLIC, [new PropertyProperty('bar')]), diff --git a/test/PhpParser/Node/Stmt/InterfaceTest.php b/test/PhpParser/Node/Stmt/InterfaceTest.php index 48c8e2bbeb..8d45e53add 100644 --- a/test/PhpParser/Node/Stmt/InterfaceTest.php +++ b/test/PhpParser/Node/Stmt/InterfaceTest.php @@ -5,8 +5,7 @@ use PhpParser\Node; use PhpParser\Node\Scalar\String_; -class InterfaceTest extends \PHPUnit\Framework\TestCase -{ +class InterfaceTest extends \PHPUnit\Framework\TestCase { public function testGetMethods() { $methods = [ new ClassMethod('foo'), diff --git a/test/PhpParser/Node/Stmt/PropertyTest.php b/test/PhpParser/Node/Stmt/PropertyTest.php index c4fbf0a011..02b0d004a6 100644 --- a/test/PhpParser/Node/Stmt/PropertyTest.php +++ b/test/PhpParser/Node/Stmt/PropertyTest.php @@ -4,8 +4,7 @@ use PhpParser\Modifiers; -class PropertyTest extends \PHPUnit\Framework\TestCase -{ +class PropertyTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideModifiers */ diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index b4d53d8d15..b2237a397b 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -2,8 +2,7 @@ namespace PhpParser; -class DummyNode extends NodeAbstract -{ +class DummyNode extends NodeAbstract { public $subNode1; public $subNode2; public $notSubNode; @@ -15,18 +14,17 @@ public function __construct($subNode1, $subNode2, $notSubNode, $attributes) { $this->notSubNode = $notSubNode; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['subNode1', 'subNode2']; } // This method is only overwritten because the node is located in an unusual namespace - public function getType() : string { + public function getType(): string { return 'Dummy'; } } -class NodeAbstractTest extends \PHPUnit\Framework\TestCase -{ +class NodeAbstractTest extends \PHPUnit\Framework\TestCase { public function provideNodes() { $attributes = [ 'startLine' => 10, @@ -154,7 +152,7 @@ public function testIteration(array $attributes, Node $node) { $this->assertSame('notSubNode', $key); $this->assertSame('value3', $value); } else { - throw new \Exception; + throw new \Exception(); } $i++; } diff --git a/test/PhpParser/NodeDumperTest.php b/test/PhpParser/NodeDumperTest.php index 036c3d1ee5..d44d7c9cc3 100644 --- a/test/PhpParser/NodeDumperTest.php +++ b/test/PhpParser/NodeDumperTest.php @@ -2,8 +2,7 @@ namespace PhpParser; -class NodeDumperTest extends \PHPUnit\Framework\TestCase -{ +class NodeDumperTest extends \PHPUnit\Framework\TestCase { private function canonicalize($string) { return str_replace("\r\n", "\n", $string); } @@ -12,7 +11,7 @@ private function canonicalize($string) { * @dataProvider provideTestDump */ public function testDump($node, $dump) { - $dumper = new NodeDumper; + $dumper = new NodeDumper(); $this->assertSame($this->canonicalize($dump), $this->canonicalize($dumper->dump($node))); } @@ -62,7 +61,7 @@ public function provideTestDump() { } public function testDumpWithPositions() { - $parser = (new ParserFactory)->create( + $parser = (new ParserFactory())->create( ParserFactory::ONLY_PHP7, new Lexer(['usedAttributes' => ['startLine', 'endLine', 'startFilePos', 'endFilePos']]) ); @@ -100,7 +99,7 @@ public function testDumpWithPositions() { public function testError() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Can only dump nodes and arrays.'); - $dumper = new NodeDumper; - $dumper->dump(new \stdClass); + $dumper = new NodeDumper(); + $dumper->dump(new \stdClass()); } } diff --git a/test/PhpParser/NodeFinderTest.php b/test/PhpParser/NodeFinderTest.php index 909738a738..dd0641edbd 100644 --- a/test/PhpParser/NodeFinderTest.php +++ b/test/PhpParser/NodeFinderTest.php @@ -4,8 +4,7 @@ use PhpParser\Node\Expr; -class NodeFinderTest extends \PHPUnit\Framework\TestCase -{ +class NodeFinderTest extends \PHPUnit\Framework\TestCase { private function getStmtsAndVars() { $assign = new Expr\Assign(new Expr\Variable('a'), new Expr\BinaryOp\Concat( new Expr\Variable('b'), new Expr\Variable('c') @@ -16,20 +15,22 @@ private function getStmtsAndVars() { } public function testFind() { - $finder = new NodeFinder; + $finder = new NodeFinder(); list($stmts, $vars) = $this->getStmtsAndVars(); - $varFilter = function(Node $node) { + $varFilter = function (Node $node) { return $node instanceof Expr\Variable; }; $this->assertSame($vars, $finder->find($stmts, $varFilter)); $this->assertSame($vars, $finder->find($stmts[0], $varFilter)); - $noneFilter = function () { return false; }; + $noneFilter = function () { + return false; + }; $this->assertSame([], $finder->find($stmts, $noneFilter)); } public function testFindInstanceOf() { - $finder = new NodeFinder; + $finder = new NodeFinder(); list($stmts, $vars) = $this->getStmtsAndVars(); $this->assertSame($vars, $finder->findInstanceOf($stmts, Expr\Variable::class)); $this->assertSame($vars, $finder->findInstanceOf($stmts[0], Expr\Variable::class)); @@ -37,20 +38,22 @@ public function testFindInstanceOf() { } public function testFindFirst() { - $finder = new NodeFinder; + $finder = new NodeFinder(); list($stmts, $vars) = $this->getStmtsAndVars(); - $varFilter = function(Node $node) { + $varFilter = function (Node $node) { return $node instanceof Expr\Variable; }; $this->assertSame($vars[0], $finder->findFirst($stmts, $varFilter)); $this->assertSame($vars[0], $finder->findFirst($stmts[0], $varFilter)); - $noneFilter = function () { return false; }; + $noneFilter = function () { + return false; + }; $this->assertNull($finder->findFirst($stmts, $noneFilter)); } public function testFindFirstInstanceOf() { - $finder = new NodeFinder; + $finder = new NodeFinder(); list($stmts, $vars) = $this->getStmtsAndVars(); $this->assertSame($vars[0], $finder->findFirstInstanceOf($stmts, Expr\Variable::class)); $this->assertSame($vars[0], $finder->findFirstInstanceOf($stmts[0], Expr\Variable::class)); diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index 9880ae9de8..3a63298bff 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -5,8 +5,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Scalar\String_; -class NodeTraverserTest extends \PHPUnit\Framework\TestCase -{ +class NodeTraverserTest extends \PHPUnit\Framework\TestCase { public function testNonModifying() { $str1Node = new String_('Foo'); $str2Node = new String_('Bar'); @@ -14,7 +13,7 @@ public function testNonModifying() { $stmts = [$echoNode]; $visitor = new NodeVisitorForTesting(); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); $this->assertEquals($stmts, $traverser->traverse($stmts)); @@ -46,7 +45,7 @@ public function testModifying() { ]); $visitor2 = new NodeVisitorForTesting(); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor1); $traverser->addVisitor($visitor2); @@ -70,7 +69,7 @@ public function testRemove() { ['leaveNode', $str1Node, NodeTraverser::REMOVE_NODE], ]); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); $this->assertEquals([$str2Node], $traverser->traverse([$str1Node, $str2Node])); @@ -87,7 +86,7 @@ public function testMerge() { ['leaveNode', $strMiddle, [$strR1, $strR2]], ]); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); $this->assertEquals( @@ -102,7 +101,7 @@ public function testInvalidDeepArray() { $strNode = new String_('Foo'); $stmts = [[[$strNode]]]; - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $this->assertEquals($stmts, $traverser->traverse($stmts)); } @@ -132,7 +131,7 @@ public function testDontTraverseChildren() { ['afterTraverse', $stmts], ]; - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor1); $traverser->addVisitor($visitor2); @@ -158,7 +157,7 @@ public function testDontTraverseCurrentAndChildren() { ]); $visitor2 = new NodeVisitorForTesting(); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor1); $traverser->addVisitor($visitor2); @@ -195,7 +194,7 @@ public function testStopTraversal() { $visitor = new NodeVisitorForTesting([ ['enterNode', $mulNode, NodeTraverser::STOP_TRAVERSAL], ]); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); $this->assertEquals($stmts, $traverser->traverse($stmts)); $this->assertEquals([ @@ -208,7 +207,7 @@ public function testStopTraversal() { $visitor = new NodeVisitorForTesting([ ['enterNode', $varNode1, NodeTraverser::STOP_TRAVERSAL], ]); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); $this->assertEquals($stmts, $traverser->traverse($stmts)); $this->assertEquals([ @@ -222,7 +221,7 @@ public function testStopTraversal() { $visitor = new NodeVisitorForTesting([ ['leaveNode', $varNode1, NodeTraverser::STOP_TRAVERSAL], ]); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); $this->assertEquals($stmts, $traverser->traverse($stmts)); $this->assertEquals([ @@ -237,7 +236,7 @@ public function testStopTraversal() { $visitor = new NodeVisitorForTesting([ ['leaveNode', $mulNode, NodeTraverser::STOP_TRAVERSAL], ]); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); $this->assertEquals($stmts, $traverser->traverse($stmts)); $this->assertEquals([ @@ -256,7 +255,7 @@ public function testStopTraversal() { ['leaveNode', $mulNode, NodeTraverser::REMOVE_NODE], ['enterNode', $printNode, NodeTraverser::STOP_TRAVERSAL], ]); - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); $this->assertEquals([$printNode], $traverser->traverse($stmts)); $this->assertEquals([ @@ -273,11 +272,11 @@ public function testStopTraversal() { } public function testRemovingVisitor() { - $visitor1 = new class extends NodeVisitorAbstract {}; - $visitor2 = new class extends NodeVisitorAbstract {}; - $visitor3 = new class extends NodeVisitorAbstract {}; + $visitor1 = new class () extends NodeVisitorAbstract {}; + $visitor2 = new class () extends NodeVisitorAbstract {}; + $visitor3 = new class () extends NodeVisitorAbstract {}; - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $traverser->addVisitor($visitor1); $traverser->addVisitor($visitor2); $traverser->addVisitor($visitor3); @@ -298,7 +297,7 @@ public function testRemovingVisitor() { public function testNoCloneNodes() { $stmts = [new Node\Stmt\Echo_([new String_('Foo'), new String_('Bar')])]; - $traverser = new NodeTraverser; + $traverser = new NodeTraverser(); $this->assertSame($stmts, $traverser->traverse($stmts)); } diff --git a/test/PhpParser/NodeVisitor/FindingVisitorTest.php b/test/PhpParser/NodeVisitor/FindingVisitorTest.php index 27cb6dd480..4295249c9d 100644 --- a/test/PhpParser/NodeVisitor/FindingVisitorTest.php +++ b/test/PhpParser/NodeVisitor/FindingVisitorTest.php @@ -6,11 +6,10 @@ use PhpParser\Node\Expr; use PhpParser\NodeTraverser; -class FindingVisitorTest extends \PHPUnit\Framework\TestCase -{ +class FindingVisitorTest extends \PHPUnit\Framework\TestCase { public function testFindVariables() { $traverser = new NodeTraverser(); - $visitor = new FindingVisitor(function(Node $node) { + $visitor = new FindingVisitor(function (Node $node) { return $node instanceof Node\Expr\Variable; }); $traverser->addVisitor($visitor); @@ -30,7 +29,7 @@ public function testFindVariables() { public function testFindAll() { $traverser = new NodeTraverser(); - $visitor = new FindingVisitor(function(Node $node) { + $visitor = new FindingVisitor(function (Node $node) { return true; // All nodes }); $traverser->addVisitor($visitor); diff --git a/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php b/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php index 9ae8932f92..b79e270f42 100644 --- a/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php +++ b/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php @@ -6,11 +6,10 @@ use PhpParser\Node\Expr; use PhpParser\NodeTraverser; -class FirstFindingVisitorTest extends \PHPUnit\Framework\TestCase -{ +class FirstFindingVisitorTest extends \PHPUnit\Framework\TestCase { public function testFindFirstVariable() { $traverser = new NodeTraverser(); - $visitor = new FirstFindingVisitor(function(Node $node) { + $visitor = new FirstFindingVisitor(function (Node $node) { return $node instanceof Node\Expr\Variable; }); $traverser->addVisitor($visitor); @@ -24,7 +23,7 @@ public function testFindFirstVariable() { public function testFindNone() { $traverser = new NodeTraverser(); - $visitor = new FirstFindingVisitor(function(Node $node) { + $visitor = new FirstFindingVisitor(function (Node $node) { return $node instanceof Node\Expr\BinaryOp; }); $traverser->addVisitor($visitor); diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index 58f558f2bf..32372a8067 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -8,8 +8,7 @@ use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class NameResolverTest extends \PHPUnit\Framework\TestCase -{ +class NameResolverTest extends \PHPUnit\Framework\TestCase { private function canonicalize($string) { return str_replace("\r\n", "\n", $string); } @@ -165,7 +164,7 @@ public function testResolveNames() { } EOC; - $prettyPrinter = new PhpParser\PrettyPrinter\Standard; + $prettyPrinter = new PhpParser\PrettyPrinter\Standard(); $stmts = $this->parseAndResolve($code); $this->assertSame( @@ -313,7 +312,7 @@ function fn4(?array $a): ?array } EOC; - $prettyPrinter = new PhpParser\PrettyPrinter\Standard; + $prettyPrinter = new PhpParser\PrettyPrinter\Standard(); $stmts = $this->parseAndResolve($code); $this->assertSame( @@ -325,8 +324,8 @@ function fn4(?array $a): ?array public function testNoResolveSpecialName() { $stmts = [new Node\Expr\New_(new Name('self'))]; - $traverser = new PhpParser\NodeTraverser; - $traverser->addVisitor(new NameResolver); + $traverser = new PhpParser\NodeTraverser(); + $traverser->addVisitor(new NameResolver()); $this->assertEquals($stmts, $traverser->traverse($stmts)); } @@ -344,8 +343,8 @@ public function testAddDeclarationNamespacedName() { new Stmt\Enum_('F'), ]; - $traverser = new PhpParser\NodeTraverser; - $traverser->addVisitor(new NameResolver); + $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); @@ -357,13 +356,13 @@ public function testAddDeclarationNamespacedName() { $this->assertSame('NS\\F', (string) $stmts[0]->stmts[6]->namespacedName); $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->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->assertNull($stmts[0]->stmts[5]->class->namespacedName); - $this->assertSame('F', (string) $stmts[0]->stmts[6]->namespacedName); + $this->assertSame('F', (string) $stmts[0]->stmts[6]->namespacedName); } public function testAddRuntimeResolvedNamespacedName() { @@ -378,8 +377,8 @@ public function testAddRuntimeResolvedNamespacedName() { ]), ]; - $traverser = new PhpParser\NodeTraverser; - $traverser->addVisitor(new NameResolver); + $traverser = new PhpParser\NodeTraverser(); + $traverser->addVisitor(new NameResolver()); $stmts = $traverser->traverse($stmts); $this->assertSame('NS\\foo', (string) $stmts[0]->stmts[0]->name->getAttribute('namespacedName')); @@ -396,8 +395,8 @@ public function testError(Node $stmt, $errorMsg) { $this->expectException(\PhpParser\Error::class); $this->expectExceptionMessage($errorMsg); - $traverser = new PhpParser\NodeTraverser; - $traverser->addVisitor(new NameResolver); + $traverser = new PhpParser\NodeTraverser(); + $traverser->addVisitor(new NameResolver()); $traverser->traverse([$stmt]); } @@ -443,8 +442,7 @@ public function provideTestError() { ]; } - public function testClassNameIsCaseInsensitive() - { + public function testClassNameIsCaseInsensitive() { $source = <<<'EOC' parse($source); - $traverser = new PhpParser\NodeTraverser; - $traverser->addVisitor(new NameResolver); + $traverser = new PhpParser\NodeTraverser(); + $traverser->addVisitor(new NameResolver()); $stmts = $traverser->traverse($stmts); $stmt = $stmts[0]; @@ -481,11 +479,11 @@ public static function method() } EOC; - $parser = new PhpParser\Parser\Php7(new PhpParser\Lexer\Emulative); + $parser = new PhpParser\Parser\Php7(new PhpParser\Lexer\Emulative()); $stmts = $parser->parse($source); - $traverser = new PhpParser\NodeTraverser; - $traverser->addVisitor(new NameResolver); + $traverser = new PhpParser\NodeTraverser(); + $traverser->addVisitor(new NameResolver()); $stmts = $traverser->traverse($stmts); $classStmt = $stmts[0]; @@ -497,7 +495,7 @@ public static function method() } public function testAddOriginalNames() { - $traverser = new PhpParser\NodeTraverser; + $traverser = new PhpParser\NodeTraverser(); $traverser->addVisitor(new NameResolver(null, ['preserveOriginalNames' => true])); $n1 = new Name('Bar'); @@ -516,7 +514,7 @@ public function testAddOriginalNames() { } public function testAttributeOnlyMode() { - $traverser = new PhpParser\NodeTraverser; + $traverser = new PhpParser\NodeTraverser(); $traverser->addVisitor(new NameResolver(null, ['replaceNodes' => false])); $n1 = new Name('Bar'); @@ -537,11 +535,10 @@ public function testAttributeOnlyMode() { new Name\FullyQualified('Foo\bar'), $n2->getAttribute('namespacedName')); } - private function parseAndResolve(string $code): array - { - $parser = new PhpParser\Parser\Php7(new PhpParser\Lexer\Emulative); - $traverser = new PhpParser\NodeTraverser; - $traverser->addVisitor(new NameResolver); + private function parseAndResolve(string $code): array { + $parser = new PhpParser\Parser\Php7(new PhpParser\Lexer\Emulative()); + $traverser = new PhpParser\NodeTraverser(); + $traverser->addVisitor(new NameResolver()); $stmts = $parser->parse($code); return $traverser->traverse($stmts); diff --git a/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php b/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php index b9b1bffe6e..59656690b2 100644 --- a/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php +++ b/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php @@ -9,26 +9,24 @@ use PhpParser\NodeTraverser; use PhpParser\ParserFactory; -final class NodeConnectingVisitorTest extends \PHPUnit\Framework\TestCase -{ - public function testConnectsNodeToItsParentNodeAndItsSiblingNodes() - { - $ast = (new ParserFactory)->create(ParserFactory::PREFER_PHP7)->parse( +final class NodeConnectingVisitorTest extends \PHPUnit\Framework\TestCase { + public function testConnectsNodeToItsParentNodeAndItsSiblingNodes() { + $ast = (new ParserFactory())->create(ParserFactory::PREFER_PHP7)->parse( 'addVisitor(new NodeConnectingVisitor); + $traverser->addVisitor(new NodeConnectingVisitor()); $ast = $traverser->traverse($ast); - $node = (new NodeFinder)->findFirstInstanceof($ast, Else_::class); + $node = (new NodeFinder())->findFirstInstanceof($ast, Else_::class); $this->assertSame(If_::class, get_class($node->getAttribute('parent'))); $this->assertSame(ConstFetch::class, get_class($node->getAttribute('previous'))); - $node = (new NodeFinder)->findFirstInstanceof($ast, ConstFetch::class); + $node = (new NodeFinder())->findFirstInstanceof($ast, ConstFetch::class); $this->assertSame(Else_::class, get_class($node->getAttribute('next'))); } diff --git a/test/PhpParser/NodeVisitor/ParentConnectingVisitorTest.php b/test/PhpParser/NodeVisitor/ParentConnectingVisitorTest.php index d1cc482013..b42bbce320 100644 --- a/test/PhpParser/NodeVisitor/ParentConnectingVisitorTest.php +++ b/test/PhpParser/NodeVisitor/ParentConnectingVisitorTest.php @@ -7,21 +7,19 @@ use PhpParser\NodeTraverser; use PhpParser\ParserFactory; -final class ParentConnectingVisitorTest extends \PHPUnit\Framework\TestCase -{ - public function testConnectsChildNodeToParentNode() - { - $ast = (new ParserFactory)->create(ParserFactory::PREFER_PHP7)->parse( +final class ParentConnectingVisitorTest extends \PHPUnit\Framework\TestCase { + public function testConnectsChildNodeToParentNode() { + $ast = (new ParserFactory())->create(ParserFactory::PREFER_PHP7)->parse( 'addVisitor(new ParentConnectingVisitor); + $traverser->addVisitor(new ParentConnectingVisitor()); $ast = $traverser->traverse($ast); - $node = (new NodeFinder)->findFirstInstanceof($ast, ClassMethod::class); + $node = (new NodeFinder())->findFirstInstanceof($ast, ClassMethod::class); $this->assertSame('C', $node->getAttribute('parent')->name->toString()); } diff --git a/test/PhpParser/NodeVisitorForTesting.php b/test/PhpParser/NodeVisitorForTesting.php index ef27814cc2..4a30c59e64 100644 --- a/test/PhpParser/NodeVisitorForTesting.php +++ b/test/PhpParser/NodeVisitorForTesting.php @@ -45,4 +45,4 @@ public function __destruct() { throw new \Exception("Expected event did not occur"); } } -} \ No newline at end of file +} diff --git a/test/PhpParser/ParserFactoryTest.php b/test/PhpParser/ParserFactoryTest.php index 0463714c43..33cb65d986 100644 --- a/test/PhpParser/ParserFactoryTest.php +++ b/test/PhpParser/ParserFactoryTest.php @@ -5,11 +5,10 @@ /* 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 -{ +class ParserFactoryTest extends \PHPUnit\Framework\TestCase { /** @dataProvider provideTestCreate */ public function testCreate($kind, $lexer, $expected) { - $this->assertInstanceOf($expected, (new ParserFactory)->create($kind, $lexer)); + $this->assertInstanceOf($expected, (new ParserFactory())->create($kind, $lexer)); } public function provideTestCreate() { diff --git a/test/PhpParser/ParserTest.php b/test/PhpParser/ParserTest.php index 9432b08c26..91b41257c8 100644 --- a/test/PhpParser/ParserTest.php +++ b/test/PhpParser/ParserTest.php @@ -7,8 +7,7 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -abstract class ParserTest extends \PHPUnit\Framework\TestCase -{ +abstract class ParserTest extends \PHPUnit\Framework\TestCase { /** @returns Parser */ abstract protected function getParser(Lexer $lexer); @@ -108,7 +107,7 @@ function test($a) { public function testInvalidToken() { $this->expectException(\RangeException::class); $this->expectExceptionMessage('The lexer returned an invalid token (id=999, value=foobar)'); - $lexer = new InvalidTokenLexer; + $lexer = new InvalidTokenLexer(); $parser = $this->getParser($lexer); $parser->parse('dummy'); } @@ -117,7 +116,7 @@ public function testInvalidToken() { * @dataProvider provideTestExtraAttributes */ public function testExtraAttributes($code, $expectedAttributes) { - $parser = $this->getParser(new Lexer\Emulative); + $parser = $this->getParser(new Lexer\Emulative()); $stmts = $parser->parse("expr : $stmts[0]; $attributes = $node->getAttributes(); @@ -179,7 +178,7 @@ public function provideTestExtraAttributes() { } public function testListKindAttribute() { - $parser = $this->getParser(new Lexer\Emulative); + $parser = $this->getParser(new Lexer\Emulative()); $stmts = $parser->parse('assertSame($stmts[0]->expr->var->getAttribute('kind'), Expr\List_::KIND_LIST); $this->assertSame($stmts[0]->expr->var->items[0]->value->getAttribute('kind'), Expr\List_::KIND_LIST); @@ -188,15 +187,14 @@ public function testListKindAttribute() { } public function testGetLexer() { - $lexer = new Lexer; + $lexer = new Lexer(); $parser = $this->getParser($lexer); $this->assertSame($lexer, $parser->getLexer()); } } -class InvalidTokenLexer extends Lexer -{ - public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) : int { +class InvalidTokenLexer extends Lexer { + public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null): int { $value = 'foobar'; return 999; } diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index e84569d10f..0bce4c0cfe 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -13,10 +13,9 @@ use PhpParser\Parser\Php7; use PhpParser\PrettyPrinter\Standard; -class PrettyPrinterTest extends CodeTestAbstract -{ +class PrettyPrinterTest extends CodeTestAbstract { protected function doTestPrettyPrintMethod($method, $name, $code, $expected, $modeLine) { - $lexer = new Lexer\Emulative; + $lexer = new Lexer\Emulative(); $parser = new Parser\Php7($lexer); $options = $this->parseModeLine($modeLine); @@ -52,7 +51,7 @@ public function provideTestPrettyPrintFile() { } public function testPrettyPrintExpr() { - $prettyPrinter = new Standard; + $prettyPrinter = new Standard(); $expr = new Expr\BinaryOp\Mul( new Expr\BinaryOp\Plus(new Expr\Variable('a'), new Expr\Variable('b')), new Expr\Variable('c') @@ -66,7 +65,7 @@ public function testPrettyPrintExpr() { } public function testCommentBeforeInlineHTML() { - $prettyPrinter = new PrettyPrinter\Standard; + $prettyPrinter = new PrettyPrinter\Standard(); $comment = new Comment\Doc("/**\n * This is a comment\n */"); $stmts = [new Stmt\InlineHTML('Hello World!', ['comments' => [$comment]])]; $expected = "\nHello World!"; @@ -86,7 +85,7 @@ public function testArraySyntaxDefault() { * @dataProvider provideTestKindAttributes */ public function testKindAttributes($node, $expected) { - $prttyPrinter = new PrettyPrinter\Standard; + $prttyPrinter = new PrettyPrinter\Standard(); $result = $prttyPrinter->prettyPrintExpr($node); $this->assertSame($expected, $result); } @@ -132,7 +131,7 @@ public function provideTestKindAttributes() { /** @dataProvider provideTestUnnaturalLiterals */ public function testUnnaturalLiterals($node, $expected) { - $prttyPrinter = new PrettyPrinter\Standard; + $prttyPrinter = new PrettyPrinter\Standard(); $result = $prttyPrinter->prettyPrintExpr($node); $this->assertSame($expected, $result); } @@ -156,7 +155,7 @@ public function testPrettyPrintWithError() { $stmts = [new Stmt\Expression( new Expr\PropertyFetch(new Expr\Variable('a'), new Expr\Error()) )]; - $prettyPrinter = new PrettyPrinter\Standard; + $prettyPrinter = new PrettyPrinter\Standard(); $prettyPrinter->prettyPrint($stmts); } @@ -166,7 +165,7 @@ public function testPrettyPrintWithErrorInClassConstFetch() { $stmts = [new Stmt\Expression( new Expr\ClassConstFetch(new Name('Foo'), new Expr\Error()) )]; - $prettyPrinter = new PrettyPrinter\Standard; + $prettyPrinter = new PrettyPrinter\Standard(); $prettyPrinter->prettyPrint($stmts); } @@ -174,7 +173,7 @@ public function testPrettyPrintEncapsedStringPart() { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Cannot directly print EncapsedStringPart'); $expr = new Node\Scalar\EncapsedStringPart('foo'); - $prettyPrinter = new PrettyPrinter\Standard; + $prettyPrinter = new PrettyPrinter\Standard(); $prettyPrinter->prettyPrintExpr($expr); } diff --git a/test/bootstrap.php b/test/bootstrap.php index a45a1ed06a..b6ef839653 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -13,7 +13,7 @@ function canonicalize($str) { // remove trailing whitespace on all lines $lines = explode("\n", $str); - $lines = array_map(function($line) { + $lines = array_map(function ($line) { return rtrim($line, " \t"); }, $lines); return implode("\n", $lines); diff --git a/test/updateTests.php b/test/updateTests.php index 78cf801d3e..d777cc7f16 100644 --- a/test/updateTests.php +++ b/test/updateTests.php @@ -8,8 +8,8 @@ $dir = __DIR__ . '/code/parser'; -$testParser = new CodeTestParser; -$codeParsingTest = new CodeParsingTest; +$testParser = new CodeTestParser(); +$codeParsingTest = new CodeParsingTest(); foreach (filesInDir($dir, 'test') as $fileName => $code) { if (false !== strpos($code, '@@{')) { // Skip tests with evaluate segments From 3c3bcd3125d96c8669ead8790a163ff39c496c4d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 29 Aug 2022 21:56:41 +0200 Subject: [PATCH 125/428] Also format the grammar directory --- .php-cs-fixer.dist.php | 1 + grammar/phpyLang.php | 6 +++--- grammar/rebuildParsers.php | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index d05bad1c61..909c4561cb 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -4,6 +4,7 @@ ->exclude('PhpParser/Parser') ->in(__DIR__ . '/lib') ->in(__DIR__ . '/test') + ->in(__DIR__ . '/grammar') ; $config = new PhpCsFixer\Config(); diff --git a/grammar/phpyLang.php b/grammar/phpyLang.php index 663c2a144c..4c4382e227 100644 --- a/grammar/phpyLang.php +++ b/grammar/phpyLang.php @@ -1,4 +1,4 @@ -[A-Z][a-zA-Z_\\\\]++)\s*' . PARAMS . '~', - function($matches) { + function ($matches) { // recurse $matches['params'] = resolveNodes($matches['params']); @@ -53,7 +53,7 @@ function($matches) { function resolveMacros($code) { return preg_replace_callback( '~\b(?)(?!array\()(?[a-z][A-Za-z]++)' . ARGS . '~', - function($matches) { + function ($matches) { // recurse $matches['args'] = resolveMacros($matches['args']); diff --git a/grammar/rebuildParsers.php b/grammar/rebuildParsers.php index 431f2703e0..a3ff9249c3 100644 --- a/grammar/rebuildParsers.php +++ b/grammar/rebuildParsers.php @@ -1,4 +1,4 @@ -&1")); + $output = trim(shell_exec("$cmd 2>&1") ?? ''); if ($output !== "") { echo "> " . $cmd . "\n"; echo $output; @@ -77,4 +77,4 @@ function replaceIfBlocks(string $code, array $defines): string { $value = $defines[$matches[1]] ?? false; return $value ? $matches[2] : ''; }, $code); -} \ No newline at end of file +} From 09c6048df12ff141578876a401cd38094afd90b7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 29 Aug 2022 21:58:08 +0200 Subject: [PATCH 126/428] Add CONTRIBUTING.md For now just a mention of the non-standard coding style. --- .gitattributes | 1 + CONTRIBUTING.md | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/.gitattributes b/.gitattributes index bffa4c6faa..08e3180c11 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,5 +6,6 @@ .gitattributes export-ignore .gitignore export-ignore CHANGELOG.md export-ignore +CONTRIBUTING.md export-ignore phpunit.xml.dist export-ignore UPGRADE-*.md export-ignore diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..bf558b7736 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,4 @@ +## Coding Style + +This project uses PSR-12 with consistent brace placement. This means that the opening brace is +always on the same line, even for class and method declarations. From 9857581ee88ea9de05c8ff9d62740a26e2fc3a2a Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 29 Aug 2022 22:09:29 +0200 Subject: [PATCH 127/428] Add array/callable to BUILTIN_TYPE_VERSIONS Listing these is not strictly necessary, in that array/callable are keywords, and as such don't use the relevant code path. We can still include them for the sake of completeness. Closes #872. --- lib/PhpParser/PhpVersion.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index 2a2baf7f4e..f8e05e7712 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -11,6 +11,8 @@ class PhpVersion { /** @var int[] Minimum versions for builtin types */ private const BUILTIN_TYPE_VERSIONS = [ + 'array' => 50100, + 'callable' => 50400, 'bool' => 70000, 'int' => 70000, 'float' => 70000, From 892b07c428c939e6cbe8e9a1e2161f8be4fea16a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 29 Aug 2022 22:21:28 +0200 Subject: [PATCH 128/428] Add some test coverage for Token class --- test/PhpParser/TokenTest.php | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 test/PhpParser/TokenTest.php diff --git a/test/PhpParser/TokenTest.php b/test/PhpParser/TokenTest.php new file mode 100644 index 0000000000..30787e686d --- /dev/null +++ b/test/PhpParser/TokenTest.php @@ -0,0 +1,47 @@ +assertSame(',', $token->getTokenName()); + $token = new Token(\T_WHITESPACE, ' '); + $this->assertSame('T_WHITESPACE', $token->getTokenName()); + } + + public function testIs() { + $token = new Token(\ord(','), ','); + $this->assertTrue($token->is(\ord(','))); + $this->assertFalse($token->is(\ord(';'))); + $this->assertTrue($token->is(',')); + $this->assertFalse($token->is(';')); + $this->assertTrue($token->is([\ord(','), \ord(';')])); + $this->assertFalse($token->is([\ord('!'), \ord(';')])); + $this->assertTrue($token->is([',', ';'])); + $this->assertFalse($token->is(['!', ';'])); + } + + /** @dataProvider provideTestIsIgnorable */ + public function testIsIgnorable(int $id, string $text, bool $isIgnorable) { + $token = new Token($id, $text); + $this->assertSame($isIgnorable, $token->isIgnorable()); + } + + public function provideTestIsIgnorable() { + return [ + [\T_STRING, 'foo', false], + [\T_WHITESPACE, ' ', true], + [\T_COMMENT, '// foo', true], + [\T_DOC_COMMENT, '/** foo */', true], + [\T_OPEN_TAG, 'assertSame(',', (string) $token); + $token = new Token(\T_STRING, 'foo'); + $this->assertSame('foo', (string) $token); + } +} From bf39f6a4e0953c6e71439e4ad1cc9d8a7bb6522e Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 30 Aug 2022 21:54:07 +0300 Subject: [PATCH 129/428] Update grammar/README.md (#877) --- grammar/README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/grammar/README.md b/grammar/README.md index 4bae11d826..bbb9bb4078 100644 --- a/grammar/README.md +++ b/grammar/README.md @@ -1,11 +1,8 @@ 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 + * `php.y`: PHP 5-8 grammar written in a pseudo language * `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 From 09339862936e56fbac5f7b0640689c098d520b56 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Sep 2022 21:23:14 +0200 Subject: [PATCH 130/428] Make sure Array nodes can not contain null Now that destructuring is always represented using List nodes, make sure that Array nodes can no longer contain null elements, so well-typed code doesn't have to deal with them unnecessarily. If an array does contain empty elements, these are now result in an error and are represented as a ArrayItem with Error value if error recovery is used. The implementation is a bit tricky because at the time the Array node is created, we cannot tell whether it will be used in a creation or destructuring context. For this reason the error reporting is delayed parsing has finished. Closes #876. --- grammar/php.y | 16 +++-- lib/PhpParser/Node/Expr/Array_.php | 4 +- lib/PhpParser/Parser/Php7.php | 11 ++- lib/PhpParser/Parser/Php8.php | 11 ++- lib/PhpParser/ParserAbstract.php | 50 ++++++++++++- test/code/parser/expr/arrayDestructuring.test | 11 ++- test/code/parser/expr/arrayEmptyElemens.test | 70 +++++++++++++++++++ 7 files changed, 156 insertions(+), 17 deletions(-) create mode 100644 test/code/parser/expr/arrayEmptyElemens.test diff --git a/grammar/php.y b/grammar/php.y index 27b8d2b125..73b284b2ea 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1166,8 +1166,9 @@ array_short_syntax: dereferencable_scalar: T_ARRAY '(' array_pair_list ')' { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG; - $$ = new Expr\Array_($3, $attrs); } - | array_short_syntax { $$ = $1; } + $$ = new Expr\Array_($3, $attrs); + $this->createdArrays->attach($$); } + | array_short_syntax { $$ = $1; $this->createdArrays->attach($$); } | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes()); } | '"' encaps_list '"' { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; @@ -1281,12 +1282,13 @@ property_name: list_expr: T_LIST '(' inner_array_pair_list ')' - { $$ = Expr\List_[$3]; $$->setAttribute('kind', Expr\List_::KIND_LIST); } + { $$ = Expr\List_[$3]; $$->setAttribute('kind', Expr\List_::KIND_LIST); + $this->postprocessList($$); } ; array_pair_list: inner_array_pair_list - { $$ = $1; $end = count($$)-1; if ($$[$end] === null) array_pop($$); } + { $$ = $1; $end = count($$)-1; if ($$[$end]->value instanceof Expr\Error) array_pop($$); } ; comma_or_error: @@ -1308,7 +1310,11 @@ array_pair: | expr T_DOUBLE_ARROW ampersand variable { $$ = Expr\ArrayItem[$4, $1, true]; } | expr T_DOUBLE_ARROW list_expr { $$ = Expr\ArrayItem[$3, $1, false]; } | T_ELLIPSIS expr { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; } - | /* empty */ { $$ = null; } + | /* empty */ + { /* Create an Error node now to remember the position. We'll later either report an error, + or convert this into a null element, depending on whether this is a creation or destructuring context. */ + $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); + $$ = new Expr\ArrayItem(new Expr\Error($attrs), null, false, $attrs); } ; encaps_list: diff --git a/lib/PhpParser/Node/Expr/Array_.php b/lib/PhpParser/Node/Expr/Array_.php index 5fd78928a5..3217f2feed 100644 --- a/lib/PhpParser/Node/Expr/Array_.php +++ b/lib/PhpParser/Node/Expr/Array_.php @@ -9,13 +9,13 @@ class Array_ extends Expr { public const KIND_LONG = 1; // array() syntax public const KIND_SHORT = 2; // [] syntax - /** @var (ArrayItem|null)[] Items */ + /** @var ArrayItem[] Items */ public $items; /** * Constructs an array node. * - * @param (ArrayItem|null)[] $items Items of the array + * @param ArrayItem[] $items Items of the array * @param array $attributes Additional attributes */ public function __construct(array $items = [], array $attributes = []) { diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index cc38ed56b4..d808c8e8af 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2758,9 +2758,10 @@ protected function initReduceCallbacks() { 521 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + $this->createdArrays->attach($this->semValue); }, 522 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, 523 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -2924,9 +2925,10 @@ protected function initReduceCallbacks() { }, 576 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $this->postprocessList($this->semValue); }, 577 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, 578 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; @@ -2962,7 +2964,10 @@ protected function initReduceCallbacks() { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 589 => function ($stackPos) { - $this->semValue = null; + /* Create an Error node now to remember the position. We'll later either report an error, + or convert this into a null element, depending on whether this is a creation or destructuring context. */ + $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); + $this->semValue = new Expr\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, 590 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 097cde7725..1658ceed1e 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2776,9 +2776,10 @@ protected function initReduceCallbacks() { 521 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + $this->createdArrays->attach($this->semValue); }, 522 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, 523 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -2942,9 +2943,10 @@ protected function initReduceCallbacks() { }, 576 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $this->postprocessList($this->semValue); }, 577 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, 578 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; @@ -2980,7 +2982,10 @@ protected function initReduceCallbacks() { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 589 => function ($stackPos) { - $this->semValue = null; + /* Create an Error node now to remember the position. We'll later either report an error, + or convert this into a null element, depending on whether this is a creation or destructuring context. */ + $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); + $this->semValue = new Expr\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, 590 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 7ab23597f8..7ad5f7348a 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -121,6 +121,9 @@ abstract class ParserAbstract implements Parser { /** @var int Error state, used to avoid error floods */ protected $errorState; + /** @var \SplObjectStorage Array nodes created during parsing, for postprocessing of empty elements. */ + protected $createdArrays; + /** * Initialize $reduceCallbacks map. */ @@ -162,16 +165,30 @@ public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { */ public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array { $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing(); + $this->createdArrays = new \SplObjectStorage(); $this->lexer->startLexing($code, $this->errorHandler); $result = $this->doParse(); + // Report errors for any empty elements used inside arrays. This is delayed until after the main parse, + // because we don't know a priori whether a given array expression will be used in a destructuring context + // or not. + foreach ($this->createdArrays as $node) { + foreach ($node->items as $item) { + if ($item->value instanceof Expr\Error) { + $this->errorHandler->handleError( + new Error('Cannot use empty array elements in arrays', $item->getAttributes())); + } + } + } + // Clear out some of the interior state, so we don't hold onto unnecessary // memory between uses of the parser $this->startAttributeStack = []; $this->endAttributeStack = []; $this->semStack = []; $this->semValue = null; + $this->createdArrays = null; return $result; } @@ -817,9 +834,27 @@ protected function createCommentNopAttributes(array $comments): array { return $attributes; } - protected function fixupArrayDestructuring(Array_ $node) { - return new Expr\List_(array_map(function (?Expr\ArrayItem $item) { - if ($item !== null && $item->value instanceof Array_) { + protected function createEmptyElemAttributes(array $attrs): array { + if (isset($attrs['startLine'])) { + $attrs['endLine'] = $attrs['startLine']; + } + if (isset($attrs['startFilePos'])) { + $attrs['endFilePos'] = $attrs['startFilePos']; + } + if (isset($attrs['startTokenPos'])) { + $attrs['endTokenPos'] = $attrs['startTokenPos']; + } + return $attrs; + } + + protected function fixupArrayDestructuring(Array_ $node): Expr\List_ { + $this->createdArrays->detach($node); + return new Expr\List_(array_map(function (Expr\ArrayItem $item) { + if ($item->value instanceof Expr\Error) { + // We used Error as a placeholder for empty elements, which are legal for destructuring. + return null; + } + if ($item->value instanceof Array_) { return new Expr\ArrayItem( $this->fixupArrayDestructuring($item->value), $item->key, $item->byRef, $item->getAttributes()); @@ -828,6 +863,15 @@ protected function fixupArrayDestructuring(Array_ $node) { }, $node->items), ['kind' => Expr\List_::KIND_ARRAY] + $node->getAttributes()); } + protected function postprocessList(Expr\List_ $node): void { + foreach ($node->items as $i => $item) { + if ($item->value instanceof Expr\Error) { + // We used Error as a placeholder for empty elements, which are legal for destructuring. + $node->items[$i] = null; + } + } + } + protected function checkClassModifier($a, $b, $modifierPos) { try { Class_::verifyClassModifier($a, $b); diff --git a/test/code/parser/expr/arrayDestructuring.test b/test/code/parser/expr/arrayDestructuring.test index cc83ff0894..73999a6b0c 100644 --- a/test/code/parser/expr/arrayDestructuring.test +++ b/test/code/parser/expr/arrayDestructuring.test @@ -4,7 +4,7 @@ Array destructuring [$a, $b] = [$c, $d]; [, $a, , , $b, ,] = $foo; -[, [[$a]], $b] = $bar; +[, [[$a, , $x]], $b] = $bar; ['a' => $b, 'b' => $a] = $baz; ----- array( @@ -104,6 +104,15 @@ array( byRef: false unpack: false ) + 1: null + 2: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) ) ) byRef: false diff --git a/test/code/parser/expr/arrayEmptyElemens.test b/test/code/parser/expr/arrayEmptyElemens.test new file mode 100644 index 0000000000..7dfd3c70b4 --- /dev/null +++ b/test/code/parser/expr/arrayEmptyElemens.test @@ -0,0 +1,70 @@ +Array with empty elements +----- + Date: Fri, 2 Sep 2022 22:34:15 +0200 Subject: [PATCH 131/428] Rename Expr\ArrayItem to ArrayItem Array items are not expressions by themselves. --- UPGRADE-5.0.md | 1 + grammar/php.y | 16 ++--- lib/PhpParser/BuilderHelpers.php | 4 +- lib/PhpParser/Node/ArrayItem.php | 43 +++++++++++++ lib/PhpParser/Node/Expr/ArrayItem.php | 39 +----------- lib/PhpParser/Node/Expr/Array_.php | 1 + lib/PhpParser/Node/Expr/List_.php | 1 + lib/PhpParser/Parser/Php7.php | 16 ++--- lib/PhpParser/Parser/Php8.php | 16 ++--- lib/PhpParser/ParserAbstract.php | 4 +- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- test/PhpParser/Builder/ClassConstTest.php | 10 ++-- test/PhpParser/Builder/ParamTest.php | 10 ++-- test/PhpParser/Builder/PropertyTest.php | 10 ++-- test/PhpParser/BuilderHelpersTest.php | 4 +- test/PhpParser/CodeTestAbstract.php | 2 +- test/PhpParser/CompatibilityTest.php | 10 +++- test/PhpParser/NodeDumperTest.php | 4 +- test/PhpParser/PrettyPrinterTest.php | 2 +- test/code/parser/errorHandling/recovery.test | 12 ++-- test/code/parser/expr/arrayDef.test | 24 ++++---- test/code/parser/expr/arrayDestructuring.test | 28 ++++----- test/code/parser/expr/arrayEmptyElemens.test | 14 ++--- test/code/parser/expr/arraySpread.test | 60 +++++++++---------- test/code/parser/expr/assign.test | 14 ++--- test/code/parser/expr/constant_expr.test | 6 +- test/code/parser/expr/exprInList.test | 6 +- .../expr/fetchAndCall/constantDeref.test | 24 ++++---- test/code/parser/expr/issetAndEmpty.test | 6 +- test/code/parser/expr/listReferences.test | 10 ++-- test/code/parser/expr/listWithKeys.test | 10 ++-- test/code/parser/expr/uvs/indirectCall.test | 8 +-- test/code/parser/expr/uvs/isset.test | 6 +- test/code/parser/expr/uvs/misc.test | 4 +- .../code/parser/scalar/flexibleDocString.test | 6 +- .../parser/stmt/class/readonlyMethod.test | 2 +- test/code/parser/stmt/class/simple.test | 2 +- .../parser/stmt/function/defaultValues.test | 6 +- .../stmt/generator/yieldPrecedence.test | 6 +- test/code/parser/stmt/loop/foreach.test | 8 +-- test/updateTests.php | 8 +-- 41 files changed, 239 insertions(+), 226 deletions(-) create mode 100644 lib/PhpParser/Node/ArrayItem.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 1986a845c2..14c4ec7649 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -76,6 +76,7 @@ used. A number of AST nodes have been renamed or moved in the AST hierarchy: * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. The `ClosureUse` node can only occur inside closure use lists, not as a general expression. + * `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`. The `ArrayItem` node can only occur inside array/list constructs, not as a general expression. The old class names have been retained as aliases for backwards compatibility. However, the `Node::getType()` method will now always return the new name (e.g. `ClosureUse` instead of `Expr_ClosureUse`). diff --git a/grammar/php.y b/grammar/php.y index 73b284b2ea..28f5c2f1ad 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1303,18 +1303,18 @@ inner_array_pair_list: ; array_pair: - expr { $$ = Expr\ArrayItem[$1, null, false]; } - | ampersand variable { $$ = Expr\ArrayItem[$2, null, true]; } - | list_expr { $$ = Expr\ArrayItem[$1, null, false]; } - | expr T_DOUBLE_ARROW expr { $$ = Expr\ArrayItem[$3, $1, false]; } - | expr T_DOUBLE_ARROW ampersand variable { $$ = Expr\ArrayItem[$4, $1, true]; } - | expr T_DOUBLE_ARROW list_expr { $$ = Expr\ArrayItem[$3, $1, false]; } - | T_ELLIPSIS expr { $$ = Expr\ArrayItem[$2, null, false, attributes(), true]; } + expr { $$ = Node\ArrayItem[$1, null, false]; } + | ampersand variable { $$ = Node\ArrayItem[$2, null, true]; } + | list_expr { $$ = Node\ArrayItem[$1, null, false]; } + | expr T_DOUBLE_ARROW expr { $$ = Node\ArrayItem[$3, $1, false]; } + | expr T_DOUBLE_ARROW ampersand variable { $$ = Node\ArrayItem[$4, $1, true]; } + | expr T_DOUBLE_ARROW list_expr { $$ = Node\ArrayItem[$3, $1, false]; } + | T_ELLIPSIS expr { $$ = Node\ArrayItem[$2, null, false, attributes(), true]; } | /* empty */ { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); - $$ = new Expr\ArrayItem(new Expr\Error($attrs), null, false, $attrs); } + $$ = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); } ; encaps_list: diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index 069def81e6..a53fe2574f 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -253,12 +253,12 @@ public static function normalizeValue($value): Expr { foreach ($value as $itemKey => $itemValue) { // for consecutive, numeric keys don't generate keys if (null !== $lastKey && ++$lastKey === $itemKey) { - $items[] = new Expr\ArrayItem( + $items[] = new Node\ArrayItem( self::normalizeValue($itemValue) ); } else { $lastKey = null; - $items[] = new Expr\ArrayItem( + $items[] = new Node\ArrayItem( self::normalizeValue($itemValue), self::normalizeValue($itemKey) ); diff --git a/lib/PhpParser/Node/ArrayItem.php b/lib/PhpParser/Node/ArrayItem.php new file mode 100644 index 0000000000..8bcce332eb --- /dev/null +++ b/lib/PhpParser/Node/ArrayItem.php @@ -0,0 +1,43 @@ +attributes = $attributes; + $this->key = $key; + $this->value = $value; + $this->byRef = $byRef; + $this->unpack = $unpack; + } + + public function getSubNodeNames(): array { + return ['key', 'value', 'byRef', 'unpack']; + } + + public function getType(): string { + return 'ArrayItem'; + } +} + +// @deprecated compatibility alias +class_alias(ArrayItem::class, Expr\ArrayItem::class); diff --git a/lib/PhpParser/Node/Expr/ArrayItem.php b/lib/PhpParser/Node/Expr/ArrayItem.php index 7d6cdefe8b..490ac93793 100644 --- a/lib/PhpParser/Node/Expr/ArrayItem.php +++ b/lib/PhpParser/Node/Expr/ArrayItem.php @@ -1,40 +1,3 @@ attributes = $attributes; - $this->key = $key; - $this->value = $value; - $this->byRef = $byRef; - $this->unpack = $unpack; - } - - public function getSubNodeNames(): array { - return ['key', 'value', 'byRef', 'unpack']; - } - - public function getType(): string { - return 'Expr_ArrayItem'; - } -} +require __DIR__ . '/../ArrayItem.php'; diff --git a/lib/PhpParser/Node/Expr/Array_.php b/lib/PhpParser/Node/Expr/Array_.php index 3217f2feed..5b85417065 100644 --- a/lib/PhpParser/Node/Expr/Array_.php +++ b/lib/PhpParser/Node/Expr/Array_.php @@ -2,6 +2,7 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node\ArrayItem; use PhpParser\Node\Expr; class Array_ extends Expr { diff --git a/lib/PhpParser/Node/Expr/List_.php b/lib/PhpParser/Node/Expr/List_.php index 4cc52a3f32..f9d9697ef7 100644 --- a/lib/PhpParser/Node/Expr/List_.php +++ b/lib/PhpParser/Node/Expr/List_.php @@ -2,6 +2,7 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node\ArrayItem; use PhpParser\Node\Expr; class List_ extends Expr { diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index d808c8e8af..c1c19e4aba 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2943,31 +2943,31 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 582 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 583 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 584 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 585 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 586 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 587 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 588 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 589 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); - $this->semValue = new Expr\ArrayItem(new Expr\Error($attrs), null, false, $attrs); + $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, 590 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 1658ceed1e..e32314019f 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2961,31 +2961,31 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 582 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 583 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 584 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 585 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 586 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 587 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 588 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 589 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); - $this->semValue = new Expr\ArrayItem(new Expr\Error($attrs), null, false, $attrs); + $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, 590 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 7ad5f7348a..f1cc8d0e3e 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -849,13 +849,13 @@ protected function createEmptyElemAttributes(array $attrs): array { protected function fixupArrayDestructuring(Array_ $node): Expr\List_ { $this->createdArrays->detach($node); - return new Expr\List_(array_map(function (Expr\ArrayItem $item) { + return new Expr\List_(array_map(function (Node\ArrayItem $item) { if ($item->value instanceof Expr\Error) { // We used Error as a placeholder for empty elements, which are legal for destructuring. return null; } if ($item->value instanceof Array_) { - return new Expr\ArrayItem( + return new Node\ArrayItem( $this->fixupArrayDestructuring($item->value), $item->key, $item->byRef, $item->getAttributes()); } diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 79c0b5b9b1..1b5fa3ea20 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -597,7 +597,7 @@ protected function pExpr_Array(Expr\Array_ $node) { } } - protected function pExpr_ArrayItem(Expr\ArrayItem $node) { + protected function pArrayItem(Node\ArrayItem $node) { return (null !== $node->key ? $this->p($node->key) . ' => ' : '') . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') diff --git a/test/PhpParser/Builder/ClassConstTest.php b/test/PhpParser/Builder/ClassConstTest.php index 0d4811e088..4697cb8cd7 100644 --- a/test/PhpParser/Builder/ClassConstTest.php +++ b/test/PhpParser/Builder/ClassConstTest.php @@ -182,19 +182,19 @@ public function provideTestDefaultValues() { [ [1, 2, 3], new Expr\Array_([ - new Expr\ArrayItem(new Scalar\LNumber(1)), - new Expr\ArrayItem(new Scalar\LNumber(2)), - new Expr\ArrayItem(new Scalar\LNumber(3)), + new \PhpParser\Node\ArrayItem(new Scalar\LNumber(1)), + new \PhpParser\Node\ArrayItem(new Scalar\LNumber(2)), + new \PhpParser\Node\ArrayItem(new Scalar\LNumber(3)), ]) ], [ ['foo' => 'bar', 'bar' => 'foo'], new Expr\Array_([ - new Expr\ArrayItem( + new \PhpParser\Node\ArrayItem( new Scalar\String_('bar'), new Scalar\String_('foo') ), - new Expr\ArrayItem( + new \PhpParser\Node\ArrayItem( new Scalar\String_('foo'), new Scalar\String_('bar') ), diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index 98fae53251..9e6fd74c9e 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -58,19 +58,19 @@ public function provideTestDefaultValues() { [ [1, 2, 3], new Expr\Array_([ - new Expr\ArrayItem(new Scalar\LNumber(1)), - new Expr\ArrayItem(new Scalar\LNumber(2)), - new Expr\ArrayItem(new Scalar\LNumber(3)), + new Node\ArrayItem(new Scalar\LNumber(1)), + new Node\ArrayItem(new Scalar\LNumber(2)), + new Node\ArrayItem(new Scalar\LNumber(3)), ]) ], [ ['foo' => 'bar', 'bar' => 'foo'], new Expr\Array_([ - new Expr\ArrayItem( + new Node\ArrayItem( new Scalar\String_('bar'), new Scalar\String_('foo') ), - new Expr\ArrayItem( + new Node\ArrayItem( new Scalar\String_('foo'), new Scalar\String_('bar') ), diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index 0e48ec2613..597fdf5871 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -165,19 +165,19 @@ public function provideTestDefaultValues() { [ [1, 2, 3], new Expr\Array_([ - new Expr\ArrayItem(new Scalar\LNumber(1)), - new Expr\ArrayItem(new Scalar\LNumber(2)), - new Expr\ArrayItem(new Scalar\LNumber(3)), + new \PhpParser\Node\ArrayItem(new Scalar\LNumber(1)), + new \PhpParser\Node\ArrayItem(new Scalar\LNumber(2)), + new \PhpParser\Node\ArrayItem(new Scalar\LNumber(3)), ]) ], [ ['foo' => 'bar', 'bar' => 'foo'], new Expr\Array_([ - new Expr\ArrayItem( + new \PhpParser\Node\ArrayItem( new Scalar\String_('bar'), new Scalar\String_('foo') ), - new Expr\ArrayItem( + new \PhpParser\Node\ArrayItem( new Scalar\String_('foo'), new Scalar\String_('bar') ), diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index b836156d6c..6baae9a853 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -185,8 +185,8 @@ public function testNormalizeValue() { $this->assertEquals(new Scalar\String_('text'), BuilderHelpers::normalizeValue('text')); $this->assertEquals( new Expr\Array_([ - new Expr\ArrayItem(new Scalar\LNumber(0)), - new Expr\ArrayItem(new Scalar\LNumber(1), new Scalar\String_('test')), + new Node\ArrayItem(new Scalar\LNumber(0)), + new Node\ArrayItem(new Scalar\LNumber(1), new Scalar\String_('test')), ]), BuilderHelpers::normalizeValue([ 0, diff --git a/test/PhpParser/CodeTestAbstract.php b/test/PhpParser/CodeTestAbstract.php index bf73f6e7a9..f11c11bae0 100644 --- a/test/PhpParser/CodeTestAbstract.php +++ b/test/PhpParser/CodeTestAbstract.php @@ -23,7 +23,7 @@ protected function getTests($directory, $fileExtension, $chunksPerTest = 2) { return $allTests; } - protected function parseModeLine(?string $modeLine): array { + public function parseModeLine(?string $modeLine): array { if ($modeLine === null) { return []; } diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index c64f79f135..dcd59a186a 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -6,12 +6,18 @@ class CompatibilityTest extends \PHPUnit\Framework\TestCase { public function testAliases1() { - $node = new Node\ClosureUse(new Expr\Variable('x')); + $var = new Expr\Variable('x'); + $node = new Node\ClosureUse($var); $this->assertTrue($node instanceof Expr\ClosureUse); + $node = new Node\ArrayItem($var); + $this->assertTrue($node instanceof Expr\ArrayItem); } public function testAliases2() { - $node = new Node\Expr\ClosureUse(new Expr\Variable('x')); + $var = new Expr\Variable('x'); + $node = new Node\Expr\ClosureUse($var); $this->assertTrue($node instanceof Node\ClosureUse); + $node = new Node\Expr\ArrayItem($var); + $this->assertTrue($node instanceof Node\ArrayItem); } } diff --git a/test/PhpParser/NodeDumperTest.php b/test/PhpParser/NodeDumperTest.php index d44d7c9cc3..812c8f2fc6 100644 --- a/test/PhpParser/NodeDumperTest.php +++ b/test/PhpParser/NodeDumperTest.php @@ -42,11 +42,11 @@ public function provideTestDump() { ], [ new Node\Expr\Array_([ - new Node\Expr\ArrayItem(new Node\Scalar\String_('Foo')) + new Node\ArrayItem(new Node\Scalar\String_('Foo')) ]), 'Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_String( value: Foo diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 0bce4c0cfe..834c5466f0 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -75,7 +75,7 @@ public function testCommentBeforeInlineHTML() { public function testArraySyntaxDefault() { $prettyPrinter = new Standard(['shortArraySyntax' => true]); $expr = new Expr\Array_([ - new Expr\ArrayItem(new String_('val'), new String_('key')) + new Node\ArrayItem(new String_('val'), new String_('key')) ]); $expected = "['key' => 'val']"; $this->assertSame($expected, $prettyPrinter->prettyPrintExpr($expr)); diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index 1fe34735ec..4496aad82e 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -1268,7 +1268,7 @@ array( ) expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_PropertyFetch( var: Expr_Variable( @@ -1281,7 +1281,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_MethodCall( var: Expr_Variable( @@ -1307,7 +1307,7 @@ array( ) expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: value @@ -1315,7 +1315,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_Variable( name: oopsAnotherValue @@ -1334,7 +1334,7 @@ array( ) expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: Scalar_String( value: key ) @@ -1344,7 +1344,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_Variable( name: oopsAnotherValue diff --git a/test/code/parser/expr/arrayDef.test b/test/code/parser/expr/arrayDef.test index 0339a56761..98c5adddee 100644 --- a/test/code/parser/expr/arrayDef.test +++ b/test/code/parser/expr/arrayDef.test @@ -23,7 +23,7 @@ array( 1: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_String( value: a @@ -37,7 +37,7 @@ array( 2: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_String( value: a @@ -51,7 +51,7 @@ array( 3: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_String( value: a @@ -59,7 +59,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_String( value: b @@ -73,7 +73,7 @@ array( 4: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_String( value: a @@ -81,7 +81,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_Variable( name: b @@ -89,7 +89,7 @@ array( byRef: true unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: Scalar_String( value: c ) @@ -99,7 +99,7 @@ array( byRef: false unpack: false ) - 3: Expr_ArrayItem( + 3: ArrayItem( key: Scalar_String( value: e ) @@ -127,7 +127,7 @@ array( 6: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 1 @@ -135,7 +135,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 2 @@ -143,7 +143,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Scalar_LNumber( value: 3 @@ -157,7 +157,7 @@ array( 7: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: Scalar_String( value: a ) diff --git a/test/code/parser/expr/arrayDestructuring.test b/test/code/parser/expr/arrayDestructuring.test index 73999a6b0c..148019ba31 100644 --- a/test/code/parser/expr/arrayDestructuring.test +++ b/test/code/parser/expr/arrayDestructuring.test @@ -12,7 +12,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: a @@ -20,7 +20,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_Variable( name: b @@ -32,7 +32,7 @@ array( ) expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: c @@ -40,7 +40,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_Variable( name: d @@ -57,7 +57,7 @@ array( var: Expr_List( items: array( 0: null - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_Variable( name: a @@ -67,7 +67,7 @@ array( ) 2: null 3: null - 4: Expr_ArrayItem( + 4: ArrayItem( key: null value: Expr_Variable( name: b @@ -88,15 +88,15 @@ array( var: Expr_List( items: array( 0: null - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: a @@ -105,7 +105,7 @@ array( unpack: false ) 1: null - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Expr_Variable( name: x @@ -123,7 +123,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Expr_Variable( name: b @@ -142,7 +142,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: Scalar_String( value: a ) @@ -152,7 +152,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: Scalar_String( value: b ) @@ -169,4 +169,4 @@ array( ) ) ) -) +) \ No newline at end of file diff --git a/test/code/parser/expr/arrayEmptyElemens.test b/test/code/parser/expr/arrayEmptyElemens.test index 7dfd3c70b4..150f4039ee 100644 --- a/test/code/parser/expr/arrayEmptyElemens.test +++ b/test/code/parser/expr/arrayEmptyElemens.test @@ -12,7 +12,7 @@ array( 0: Stmt_Expression[3:1 - 3:9]( expr: Expr_Array[3:1 - 3:8]( items: array( - 0: Expr_ArrayItem[3:2 - 3:2]( + 0: ArrayItem[3:2 - 3:2]( key: null value: Scalar_LNumber[3:2 - 3:2]( value: 1 @@ -20,14 +20,14 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem[3:5 - 3:5]( + 1: ArrayItem[3:5 - 3:5]( key: null value: Expr_Error[3:5 - 3:5]( ) byRef: false unpack: false ) - 2: Expr_ArrayItem[3:7 - 3:7]( + 2: ArrayItem[3:7 - 3:7]( key: null value: Scalar_LNumber[3:7 - 3:7]( value: 2 @@ -41,7 +41,7 @@ array( 1: Stmt_Expression[4:1 - 4:14]( expr: Expr_Array[4:1 - 4:13]( items: array( - 0: Expr_ArrayItem[4:7 - 4:7]( + 0: ArrayItem[4:7 - 4:7]( key: null value: Scalar_LNumber[4:7 - 4:7]( value: 1 @@ -49,14 +49,14 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem[4:10 - 4:10]( + 1: ArrayItem[4:10 - 4:10]( key: null value: Expr_Error[4:10 - 4:10]( ) byRef: false unpack: false ) - 2: Expr_ArrayItem[4:12 - 4:12]( + 2: ArrayItem[4:12 - 4:12]( key: null value: Scalar_LNumber[4:12 - 4:12]( value: 2 @@ -67,4 +67,4 @@ array( ) ) ) -) +) \ No newline at end of file diff --git a/test/code/parser/expr/arraySpread.test b/test/code/parser/expr/arraySpread.test index b6ee60237c..e5aa67782f 100644 --- a/test/code/parser/expr/arraySpread.test +++ b/test/code/parser/expr/arraySpread.test @@ -30,7 +30,7 @@ array( ) expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 1 @@ -38,7 +38,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 2 @@ -46,7 +46,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Scalar_LNumber( value: 3 @@ -72,7 +72,7 @@ array( 0: Stmt_Return( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 4 @@ -80,7 +80,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 5 @@ -148,7 +148,7 @@ array( 3: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Array( items: array( @@ -163,11 +163,11 @@ array( 4: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 1 @@ -175,7 +175,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 2 @@ -183,7 +183,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Scalar_LNumber( value: 3 @@ -202,7 +202,7 @@ array( 5: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: array @@ -216,7 +216,7 @@ array( 6: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_FuncCall( name: Name( @@ -236,7 +236,7 @@ array( 7: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_FuncCall( name: Name( @@ -256,7 +256,7 @@ array( 8: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_New( class: Name( @@ -269,7 +269,7 @@ array( name: null value: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_String( value: a @@ -277,7 +277,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_String( value: b @@ -285,7 +285,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Scalar_String( value: c @@ -309,7 +309,7 @@ array( 9: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 0 @@ -317,7 +317,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_Variable( name: array @@ -325,7 +325,7 @@ array( byRef: false unpack: true ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Expr_FuncCall( name: Name( @@ -339,7 +339,7 @@ array( byRef: false unpack: true ) - 3: Expr_ArrayItem( + 3: ArrayItem( key: null value: Scalar_LNumber( value: 6 @@ -347,7 +347,7 @@ array( byRef: false unpack: false ) - 4: Expr_ArrayItem( + 4: ArrayItem( key: null value: Scalar_LNumber( value: 7 @@ -355,7 +355,7 @@ array( byRef: false unpack: false ) - 5: Expr_ArrayItem( + 5: ArrayItem( key: null value: Scalar_LNumber( value: 8 @@ -363,7 +363,7 @@ array( byRef: false unpack: false ) - 6: Expr_ArrayItem( + 6: ArrayItem( key: null value: Scalar_LNumber( value: 9 @@ -371,7 +371,7 @@ array( byRef: false unpack: false ) - 7: Expr_ArrayItem( + 7: ArrayItem( key: null value: Scalar_LNumber( value: 10 @@ -379,7 +379,7 @@ array( byRef: false unpack: false ) - 8: Expr_ArrayItem( + 8: ArrayItem( key: null value: Expr_FuncCall( name: Name( @@ -399,7 +399,7 @@ array( 10: Stmt_Expression( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 0 @@ -407,7 +407,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_Variable( name: array @@ -415,7 +415,7 @@ array( byRef: false unpack: true ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Expr_Variable( name: array @@ -423,7 +423,7 @@ array( byRef: false unpack: true ) - 3: Expr_ArrayItem( + 3: ArrayItem( key: null value: Scalar_String( value: end diff --git a/test/code/parser/expr/assign.test b/test/code/parser/expr/assign.test index 423f48af2f..9066ac8a58 100644 --- a/test/code/parser/expr/assign.test +++ b/test/code/parser/expr/assign.test @@ -247,7 +247,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: a @@ -275,7 +275,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: a @@ -284,7 +284,7 @@ array( unpack: false ) 1: null - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Expr_Variable( name: b @@ -303,7 +303,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: a @@ -311,12 +311,12 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_List( items: array( 0: null - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_Variable( name: c @@ -329,7 +329,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Expr_Variable( name: d diff --git a/test/code/parser/expr/constant_expr.test b/test/code/parser/expr/constant_expr.test index 0f9815f94e..31ddab4ada 100644 --- a/test/code/parser/expr/constant_expr.test +++ b/test/code/parser/expr/constant_expr.test @@ -538,7 +538,7 @@ array( value: Expr_ArrayDimFetch( var: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 1 @@ -546,7 +546,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 2 @@ -554,7 +554,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Scalar_LNumber( value: 3 diff --git a/test/code/parser/expr/exprInList.test b/test/code/parser/expr/exprInList.test index c4358ff1eb..682b0972a7 100644 --- a/test/code/parser/expr/exprInList.test +++ b/test/code/parser/expr/exprInList.test @@ -12,7 +12,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: a @@ -20,7 +20,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_Variable( name: b @@ -48,7 +48,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_BinaryOp_Plus( left: Scalar_LNumber( diff --git a/test/code/parser/expr/fetchAndCall/constantDeref.test b/test/code/parser/expr/fetchAndCall/constantDeref.test index 557532f1b7..5959726da9 100644 --- a/test/code/parser/expr/fetchAndCall/constantDeref.test +++ b/test/code/parser/expr/fetchAndCall/constantDeref.test @@ -50,7 +50,7 @@ array( expr: Expr_ArrayDimFetch( var: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 1 @@ -58,7 +58,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 2 @@ -66,7 +66,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Scalar_LNumber( value: 3 @@ -87,7 +87,7 @@ array( var: Expr_ArrayDimFetch( var: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 1 @@ -95,7 +95,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 2 @@ -103,7 +103,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Scalar_LNumber( value: 3 @@ -130,7 +130,7 @@ array( expr: Expr_ArrayDimFetch( var: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 1 @@ -138,7 +138,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 2 @@ -146,7 +146,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Scalar_LNumber( value: 3 @@ -167,7 +167,7 @@ array( var: Expr_ArrayDimFetch( var: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 1 @@ -175,7 +175,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 2 @@ -183,7 +183,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Scalar_LNumber( value: 3 diff --git a/test/code/parser/expr/issetAndEmpty.test b/test/code/parser/expr/issetAndEmpty.test index 989b3a5547..cd0e869c79 100644 --- a/test/code/parser/expr/issetAndEmpty.test +++ b/test/code/parser/expr/issetAndEmpty.test @@ -57,7 +57,7 @@ array( expr: Expr_Empty( expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 1 @@ -65,7 +65,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 2 @@ -73,7 +73,7 @@ array( byRef: false unpack: false ) - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Scalar_LNumber( value: 3 diff --git a/test/code/parser/expr/listReferences.test b/test/code/parser/expr/listReferences.test index fd42907b37..0e02d36898 100644 --- a/test/code/parser/expr/listReferences.test +++ b/test/code/parser/expr/listReferences.test @@ -12,7 +12,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: v @@ -31,7 +31,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: Scalar_String( value: k ) @@ -52,7 +52,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: v @@ -71,7 +71,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: Scalar_String( value: k ) @@ -88,4 +88,4 @@ array( ) ) ) -) +) \ No newline at end of file diff --git a/test/code/parser/expr/listWithKeys.test b/test/code/parser/expr/listWithKeys.test index c64e96c57a..e800236d61 100644 --- a/test/code/parser/expr/listWithKeys.test +++ b/test/code/parser/expr/listWithKeys.test @@ -10,7 +10,7 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: Scalar_String( value: a ) @@ -24,7 +24,7 @@ array( ) expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: Scalar_String( value: a ) @@ -42,13 +42,13 @@ array( expr: Expr_Assign( var: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: Scalar_String( value: a ) value: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: Expr_Variable( name: b ) @@ -63,7 +63,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: Scalar_String( value: d ) diff --git a/test/code/parser/expr/uvs/indirectCall.test b/test/code/parser/expr/uvs/indirectCall.test index bb4e3e85e9..5515cfdd66 100644 --- a/test/code/parser/expr/uvs/indirectCall.test +++ b/test/code/parser/expr/uvs/indirectCall.test @@ -145,7 +145,7 @@ array( name: null value: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_String( value: udef @@ -153,7 +153,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_String( value: id @@ -365,7 +365,7 @@ array( name: Expr_FuncCall( name: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: obj @@ -373,7 +373,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_String( value: id diff --git a/test/code/parser/expr/uvs/isset.test b/test/code/parser/expr/uvs/isset.test index 531767882b..e198de0b0c 100644 --- a/test/code/parser/expr/uvs/isset.test +++ b/test/code/parser/expr/uvs/isset.test @@ -14,7 +14,7 @@ array( var: Expr_BinaryOp_Plus( left: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 0 @@ -22,7 +22,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 1 @@ -50,7 +50,7 @@ array( 0: Expr_PropertyFetch( var: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: Scalar_String( value: a ) diff --git a/test/code/parser/expr/uvs/misc.test b/test/code/parser/expr/uvs/misc.test index 913526353a..c31925cdd9 100644 --- a/test/code/parser/expr/uvs/misc.test +++ b/test/code/parser/expr/uvs/misc.test @@ -91,7 +91,7 @@ array( var: Expr_ArrayDimFetch( var: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_LNumber( value: 0 @@ -99,7 +99,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_LNumber( value: 1 diff --git a/test/code/parser/scalar/flexibleDocString.test b/test/code/parser/scalar/flexibleDocString.test index 17d728dd0e..251308d31e 100644 --- a/test/code/parser/scalar/flexibleDocString.test +++ b/test/code/parser/scalar/flexibleDocString.test @@ -117,7 +117,7 @@ array( ) expr: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_String( value: Test @@ -125,7 +125,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Scalar_String( value: Test @@ -358,4 +358,4 @@ array( value: - ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/readonlyMethod.test b/test/code/parser/stmt/class/readonlyMethod.test index 4f375eac95..ebfe9cb990 100644 --- a/test/code/parser/stmt/class/readonlyMethod.test +++ b/test/code/parser/stmt/class/readonlyMethod.test @@ -31,4 +31,4 @@ array( ) ) ) -) +) \ No newline at end of file diff --git a/test/code/parser/stmt/class/simple.test b/test/code/parser/stmt/class/simple.test index 321b6b4b00..9a4e6b436c 100644 --- a/test/code/parser/stmt/class/simple.test +++ b/test/code/parser/stmt/class/simple.test @@ -205,4 +205,4 @@ array( ) ) ) -) +) \ No newline at end of file diff --git a/test/code/parser/stmt/function/defaultValues.test b/test/code/parser/stmt/function/defaultValues.test index 3db4208be0..2bd34cc069 100644 --- a/test/code/parser/stmt/function/defaultValues.test +++ b/test/code/parser/stmt/function/defaultValues.test @@ -150,7 +150,7 @@ array( ) default: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_String( value: foo @@ -173,7 +173,7 @@ array( ) default: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Scalar_String( value: foo @@ -181,7 +181,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: Scalar_String( value: bar ) diff --git a/test/code/parser/stmt/generator/yieldPrecedence.test b/test/code/parser/stmt/generator/yieldPrecedence.test index aa4a88194d..8d8746d4de 100644 --- a/test/code/parser/stmt/generator/yieldPrecedence.test +++ b/test/code/parser/stmt/generator/yieldPrecedence.test @@ -94,7 +94,7 @@ array( name: null value: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Yield( key: Scalar_String( @@ -178,7 +178,7 @@ array( name: null value: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Yield( key: Scalar_String( @@ -221,7 +221,7 @@ array( name: null value: Expr_Array( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: Expr_Yield( key: Scalar_String( value: k1 diff --git a/test/code/parser/stmt/loop/foreach.test b/test/code/parser/stmt/loop/foreach.test index 2dc802fc0c..504002526a 100644 --- a/test/code/parser/stmt/loop/foreach.test +++ b/test/code/parser/stmt/loop/foreach.test @@ -81,7 +81,7 @@ array( byRef: false valueVar: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: a @@ -89,7 +89,7 @@ array( byRef: false unpack: false ) - 1: Expr_ArrayItem( + 1: ArrayItem( key: null value: Expr_Variable( name: b @@ -112,7 +112,7 @@ array( byRef: false valueVar: Expr_List( items: array( - 0: Expr_ArrayItem( + 0: ArrayItem( key: null value: Expr_Variable( name: b @@ -121,7 +121,7 @@ array( unpack: false ) 1: null - 2: Expr_ArrayItem( + 2: ArrayItem( key: null value: Expr_Variable( name: c diff --git a/test/updateTests.php b/test/updateTests.php index d777cc7f16..0fd482e313 100644 --- a/test/updateTests.php +++ b/test/updateTests.php @@ -19,11 +19,9 @@ list($name, $tests) = $testParser->parseTest($code, 2); $newTests = []; foreach ($tests as list($modeLine, list($input, $expected))) { - $modes = null !== $modeLine ? array_fill_keys(explode(',', $modeLine), true) : []; - list($parser5, $parser7) = $codeParsingTest->createParsers($modes); - list(, $output) = isset($modes['php5']) - ? $codeParsingTest->getParseOutput($parser5, $input, $modes) - : $codeParsingTest->getParseOutput($parser7, $input, $modes); + $modes = $codeParsingTest->parseModeLine($modeLine); + $parser = $codeParsingTest->createParser($modes['version'] ?? null); + list(, $output) = $codeParsingTest->getParseOutput($parser, $input, $modes); $newTests[] = [$modeLine, [$input, $output]]; } From 035c1c7cd201698829b9be237de47ecd958a45b7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 2 Sep 2022 22:48:40 +0200 Subject: [PATCH 132/428] Rename Stmt\StaticVar to StaticVar This is part of a statement, not a statement by itself. --- UPGRADE-5.0.md | 5 ++- grammar/php.y | 4 +- lib/PhpParser/Node/StaticVar.php | 39 +++++++++++++++++++ lib/PhpParser/Node/Stmt/StaticVar.php | 35 +---------------- lib/PhpParser/Node/Stmt/Static_.php | 1 + lib/PhpParser/Parser/Php7.php | 4 +- lib/PhpParser/Parser/Php8.php | 4 +- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- test/code/parser/errorHandling/recovery.test | 2 +- .../parser/stmt/function/specialVars.test | 4 +- test/code/parser/stmt/newInInitializer.test | 2 +- 11 files changed, 55 insertions(+), 47 deletions(-) create mode 100644 lib/PhpParser/Node/StaticVar.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 14c4ec7649..eaaa0ef2b9 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -75,8 +75,9 @@ used. A number of AST nodes have been renamed or moved in the AST hierarchy: - * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. The `ClosureUse` node can only occur inside closure use lists, not as a general expression. - * `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`. The `ArrayItem` node can only occur inside array/list constructs, not as a general expression. + * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. + * `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`. + * `Node\Stmt\StaticVar` is now `Node\StaticVar` and no longer extends `Node\Stmt`. The old class names have been retained as aliases for backwards compatibility. However, the `Node::getType()` method will now always return the new name (e.g. `ClosureUse` instead of `Expr_ClosureUse`). diff --git a/grammar/php.y b/grammar/php.y index 28f5c2f1ad..31412c79bd 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -809,8 +809,8 @@ non_empty_static_var_list: ; static_var: - plain_variable { $$ = Stmt\StaticVar[$1, null]; } - | plain_variable '=' expr { $$ = Stmt\StaticVar[$1, $3]; } + plain_variable { $$ = Node\StaticVar[$1, null]; } + | plain_variable '=' expr { $$ = Node\StaticVar[$1, $3]; } ; class_statement_list_ex: diff --git a/lib/PhpParser/Node/StaticVar.php b/lib/PhpParser/Node/StaticVar.php new file mode 100644 index 0000000000..a85374334a --- /dev/null +++ b/lib/PhpParser/Node/StaticVar.php @@ -0,0 +1,39 @@ +attributes = $attributes; + $this->var = $var; + $this->default = $default; + } + + public function getSubNodeNames(): array { + return ['var', 'default']; + } + + public function getType(): string { + return 'StaticVar'; + } +} + +// @deprecated compatibility alias +class_alias(StaticVar::class, Stmt\StaticVar::class); diff --git a/lib/PhpParser/Node/Stmt/StaticVar.php b/lib/PhpParser/Node/Stmt/StaticVar.php index cb5f507de2..88452e7f9c 100644 --- a/lib/PhpParser/Node/Stmt/StaticVar.php +++ b/lib/PhpParser/Node/Stmt/StaticVar.php @@ -1,36 +1,3 @@ attributes = $attributes; - $this->var = $var; - $this->default = $default; - } - - public function getSubNodeNames(): array { - return ['var', 'default']; - } - - public function getType(): string { - return 'Stmt_StaticVar'; - } -} +require __DIR__ . '/../StaticVar.php'; diff --git a/lib/PhpParser/Node/Stmt/Static_.php b/lib/PhpParser/Node/Stmt/Static_.php index f53665fe54..6d0cd97798 100644 --- a/lib/PhpParser/Node/Stmt/Static_.php +++ b/lib/PhpParser/Node/Stmt/Static_.php @@ -2,6 +2,7 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Node\StaticVar; use PhpParser\Node\Stmt; class Static_ extends Stmt { diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index c1c19e4aba..19226852ee 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2181,10 +2181,10 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 334 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 335 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 336 => function ($stackPos) { if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index e32314019f..433ed39eb3 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2199,10 +2199,10 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 334 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 335 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 336 => function ($stackPos) { if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 1b5fa3ea20..f7229be1d6 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -957,7 +957,7 @@ protected function pStmt_Global(Stmt\Global_ $node) { return 'global ' . $this->pCommaSeparated($node->vars) . ';'; } - protected function pStmt_StaticVar(Stmt\StaticVar $node) { + protected function pStaticVar(Node\StaticVar $node) { return $this->p($node->var) . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index 4496aad82e..913d4e4760 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -820,7 +820,7 @@ array( ) 10: Stmt_Static( vars: array( - 0: Stmt_StaticVar( + 0: StaticVar( var: Expr_Variable( name: a ) diff --git a/test/code/parser/stmt/function/specialVars.test b/test/code/parser/stmt/function/specialVars.test index c26a825f30..79b204c5a9 100644 --- a/test/code/parser/stmt/function/specialVars.test +++ b/test/code/parser/stmt/function/specialVars.test @@ -38,13 +38,13 @@ array( ) 1: Stmt_Static( vars: array( - 0: Stmt_StaticVar( + 0: StaticVar( var: Expr_Variable( name: c ) default: null ) - 1: Stmt_StaticVar( + 1: StaticVar( var: Expr_Variable( name: d ) diff --git a/test/code/parser/stmt/newInInitializer.test b/test/code/parser/stmt/newInInitializer.test index a813ff7dc8..5f660ef402 100644 --- a/test/code/parser/stmt/newInInitializer.test +++ b/test/code/parser/stmt/newInInitializer.test @@ -66,7 +66,7 @@ array( stmts: array( 0: Stmt_Static( vars: array( - 0: Stmt_StaticVar( + 0: StaticVar( var: Expr_Variable( name: y ) From 9dca6f1d3719b9c81b579f1d95ea2c0be9624f08 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 2 Sep 2022 22:54:29 +0200 Subject: [PATCH 133/428] Add test for StaticVar rename Also run these in separate processes, they're not really meaningful if the classes are already loaded. --- test/PhpParser/CompatibilityTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index dcd59a186a..62aa869938 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -3,21 +3,28 @@ namespace PhpParser; use PhpParser\Node\Expr; +use PhpParser\Node\Stmt; class CompatibilityTest extends \PHPUnit\Framework\TestCase { + /** @runInSeparateProcess */ public function testAliases1() { $var = new Expr\Variable('x'); $node = new Node\ClosureUse($var); $this->assertTrue($node instanceof Expr\ClosureUse); $node = new Node\ArrayItem($var); $this->assertTrue($node instanceof Expr\ArrayItem); + $node = new Node\StaticVar($var); + $this->assertTrue($node instanceof Stmt\StaticVar); } + /** @runInSeparateProcess */ public function testAliases2() { $var = new Expr\Variable('x'); $node = new Node\Expr\ClosureUse($var); $this->assertTrue($node instanceof Node\ClosureUse); $node = new Node\Expr\ArrayItem($var); $this->assertTrue($node instanceof Node\ArrayItem); + $node = new Node\Stmt\StaticVar($var); + $this->assertTrue($node instanceof Node\StaticVar); } } From a2608f0b742b711d24de914d41c0162e37494ea6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 10:52:01 +0200 Subject: [PATCH 134/428] Support empty list insertion for attributes --- lib/PhpParser/PrettyPrinterAbstract.php | 12 +++++- test/code/formatPreservation/attributes.test | 40 ++++++++----------- .../emptyListInsertion.test | 2 +- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index ae5da868ee..9721155024 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -920,7 +920,7 @@ protected function pArray( $result .= $this->p($delayedAddNode, true); $first = false; } - $result .= $extraRight; + $result .= $extraRight === "\n" ? $this->nl : $extraRight; } return $result; @@ -1448,6 +1448,16 @@ protected function initializeEmptyListInsertionMap() { 'Stmt_ClassMethod->params' => ['(', '', ''], 'Stmt_Interface->extends' => [null, ' extends ', ''], 'Stmt_Function->params' => ['(', '', ''], + 'Stmt_Interface->attrGroups' => [null, '', "\n"], + 'Stmt_Class->attrGroups' => [null, '', "\n"], + 'Stmt_ClassConst->attrGroups' => [null, '', "\n"], + 'Stmt_ClassMethod->attrGroups' => [null, '', "\n"], + 'Stmt_Function->attrGroups' => [null, '', "\n"], + 'Stmt_Property->attrGroups' => [null, '', "\n"], + 'Stmt_Trait->attrGroups' => [null, '', "\n"], + 'Expr_ArrowFunction->attrGroups' => [null, '', ' '], + 'Expr_Closure->attrGroups' => [null, '', ' '], + 'Expr_PrintableNewAnonClass->attrGroups' => [\T_NEW, ' ', ''], /* These cannot be empty to start with: * Expr_Isset->vars diff --git a/test/code/formatPreservation/attributes.test b/test/code/formatPreservation/attributes.test index 0b87c03357..bc448e7d04 100644 --- a/test/code/formatPreservation/attributes.test +++ b/test/code/formatPreservation/attributes.test @@ -102,7 +102,6 @@ function() {}; fn() => 42; ----- -// TODO: Currently we lose formatting for this case. $attrGroup = new Node\AttributeGroup([ new Node\Attribute(new Node\Name('A'), []), ]); @@ -119,39 +118,32 @@ $stmts[6]->expr->attrGroups[] = $attrGroup; ----- 42; +new #[A] class {}; +#[A] function() {}; +#[A] fn() + => 42; ----- Date: Sat, 3 Sep 2022 11:00:13 +0200 Subject: [PATCH 135/428] Remove MODIFIER_ prefix from node dumps These constants are now called Modifiers::PUBLIC rather than Class_::MODIFIER_PUBLIC etc, so update the dumped name as well. --- lib/PhpParser/NodeDumper.php | 14 ++++++------- test/code/parser/commentAtEndOfClass.test | 2 +- test/code/parser/errorHandling/recovery.test | 8 ++++---- test/code/parser/semiReserved.test | 12 +++++------ test/code/parser/stmt/attributes.test | 4 ++-- test/code/parser/stmt/class/abstract.test | 6 +++--- test/code/parser/stmt/class/anonymous.test | 6 +++--- .../stmt/class/constModifierErrors.test | 8 ++++---- .../parser/stmt/class/constModifiers.test | 8 ++++---- test/code/parser/stmt/class/final.test | 2 +- .../parser/stmt/class/implicitPublic.test | 12 +++++------ test/code/parser/stmt/class/interface.test | 2 +- test/code/parser/stmt/class/modifier.test | 20 +++++++++---------- test/code/parser/stmt/class/php4Style.test | 2 +- .../code/parser/stmt/class/propertyTypes.test | 8 ++++---- .../parser/stmt/class/property_promotion.test | 10 +++++----- test/code/parser/stmt/class/readonly.test | 4 ++-- .../parser/stmt/class/readonlyMethod.test | 2 +- test/code/parser/stmt/class/simple.test | 16 +++++++-------- test/code/parser/stmt/class/staticMethod.test | 12 +++++------ test/code/parser/stmt/class/staticType.test | 2 +- test/code/parser/stmt/class/trait.test | 10 +++++----- .../function/disjointNormalFormTypes.test | 2 +- .../stmt/function/intersectionTypes.test | 2 +- .../code/parser/stmt/function/unionTypes.test | 2 +- test/code/parser/stmt/newInInitializer.test | 2 +- 26 files changed, 89 insertions(+), 89 deletions(-) diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index 56a6ac82fb..7c09087368 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -110,25 +110,25 @@ protected function dumpRecursive($node) { protected function dumpFlags($flags) { $strs = []; if ($flags & Modifiers::PUBLIC) { - $strs[] = 'MODIFIER_PUBLIC'; + $strs[] = 'PUBLIC'; } if ($flags & Modifiers::PROTECTED) { - $strs[] = 'MODIFIER_PROTECTED'; + $strs[] = 'PROTECTED'; } if ($flags & Modifiers::PRIVATE) { - $strs[] = 'MODIFIER_PRIVATE'; + $strs[] = 'PRIVATE'; } if ($flags & Modifiers::ABSTRACT) { - $strs[] = 'MODIFIER_ABSTRACT'; + $strs[] = 'ABSTRACT'; } if ($flags & Modifiers::STATIC) { - $strs[] = 'MODIFIER_STATIC'; + $strs[] = 'STATIC'; } if ($flags & Modifiers::FINAL) { - $strs[] = 'MODIFIER_FINAL'; + $strs[] = 'FINAL'; } if ($flags & Modifiers::READONLY) { - $strs[] = 'MODIFIER_READONLY'; + $strs[] = 'READONLY'; } if ($strs) { diff --git a/test/code/parser/commentAtEndOfClass.test b/test/code/parser/commentAtEndOfClass.test index cc5393660b..67ee762328 100644 --- a/test/code/parser/commentAtEndOfClass.test +++ b/test/code/parser/commentAtEndOfClass.test @@ -21,7 +21,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PROTECTED (2) + flags: PROTECTED (2) type: null props: array( 0: Stmt_PropertyProperty( diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index 913d4e4760..1771c76579 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -753,7 +753,7 @@ array( 3: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: null props: array( 0: Stmt_PropertyProperty( @@ -913,7 +913,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: null props: array( 0: Stmt_PropertyProperty( @@ -1421,7 +1421,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PRIVATE (4) + flags: PRIVATE (4) type: null props: array( 0: Stmt_PropertyProperty( @@ -1438,7 +1438,7 @@ array( 1: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) byRef: false name: Identifier( name: __construct diff --git a/test/code/parser/semiReserved.test b/test/code/parser/semiReserved.test index 1d82e4309b..1d76d56bc7 100644 --- a/test/code/parser/semiReserved.test +++ b/test/code/parser/semiReserved.test @@ -95,7 +95,7 @@ array( 2: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) byRef: false name: Identifier( name: list @@ -109,7 +109,7 @@ array( 3: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) byRef: false name: Identifier( name: protected @@ -123,7 +123,7 @@ array( 4: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: null props: array( 0: Stmt_PropertyProperty( @@ -137,7 +137,7 @@ array( 5: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: null props: array( 0: Stmt_PropertyProperty( @@ -426,7 +426,7 @@ array( method: Identifier( name: throw ) - newModifier: MODIFIER_PROTECTED (2) + newModifier: PROTECTED (2) newName: Identifier( name: public ) @@ -440,7 +440,7 @@ array( method: Identifier( name: self ) - newModifier: MODIFIER_PROTECTED (2) + newModifier: PROTECTED (2) newName: null ) 4: Stmt_TraitUseAdaptation_Alias( diff --git a/test/code/parser/stmt/attributes.test b/test/code/parser/stmt/attributes.test index daa913135d..d3ec85731d 100644 --- a/test/code/parser/stmt/attributes.test +++ b/test/code/parser/stmt/attributes.test @@ -143,7 +143,7 @@ array( ) ) ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) byRef: false name: Identifier( name: m @@ -195,7 +195,7 @@ array( ) ) ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: null props: array( 0: Stmt_PropertyProperty( diff --git a/test/code/parser/stmt/class/abstract.test b/test/code/parser/stmt/class/abstract.test index 8635be6000..8c7444cf88 100644 --- a/test/code/parser/stmt/class/abstract.test +++ b/test/code/parser/stmt/class/abstract.test @@ -11,7 +11,7 @@ array( 0: Stmt_Class( attrGroups: array( ) - flags: MODIFIER_ABSTRACT (16) + flags: ABSTRACT (16) name: Identifier( name: A ) @@ -22,7 +22,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) byRef: false name: Identifier( name: a @@ -36,7 +36,7 @@ array( 1: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC | MODIFIER_ABSTRACT (17) + flags: PUBLIC | ABSTRACT (17) byRef: false name: Identifier( name: b diff --git a/test/code/parser/stmt/class/anonymous.test b/test/code/parser/stmt/class/anonymous.test index 923fce8400..7bccc26671 100644 --- a/test/code/parser/stmt/class/anonymous.test +++ b/test/code/parser/stmt/class/anonymous.test @@ -36,7 +36,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) byRef: false name: Identifier( name: test @@ -98,7 +98,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: null props: array( 0: Stmt_PropertyProperty( @@ -177,7 +177,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) byRef: false name: Identifier( name: test diff --git a/test/code/parser/stmt/class/constModifierErrors.test b/test/code/parser/stmt/class/constModifierErrors.test index e4714f40fc..7b6132a385 100644 --- a/test/code/parser/stmt/class/constModifierErrors.test +++ b/test/code/parser/stmt/class/constModifierErrors.test @@ -21,7 +21,7 @@ array( 0: Stmt_ClassConst( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) consts: array( 0: Const( name: Identifier( @@ -58,7 +58,7 @@ array( 0: Stmt_ClassConst( attrGroups: array( ) - flags: MODIFIER_ABSTRACT (16) + flags: ABSTRACT (16) consts: array( 0: Const( name: Identifier( @@ -95,7 +95,7 @@ array( 0: Stmt_ClassConst( attrGroups: array( ) - flags: MODIFIER_READONLY (64) + flags: READONLY (64) consts: array( 0: Const( name: Identifier( @@ -132,7 +132,7 @@ array( 0: Stmt_ClassConst( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) consts: array( 0: Const( name: Identifier( diff --git a/test/code/parser/stmt/class/constModifiers.test b/test/code/parser/stmt/class/constModifiers.test index 1640729ed8..e7afdaed1d 100644 --- a/test/code/parser/stmt/class/constModifiers.test +++ b/test/code/parser/stmt/class/constModifiers.test @@ -40,7 +40,7 @@ array( 1: Stmt_ClassConst( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) consts: array( 0: Const( name: Identifier( @@ -55,7 +55,7 @@ array( 2: Stmt_ClassConst( attrGroups: array( ) - flags: MODIFIER_PROTECTED (2) + flags: PROTECTED (2) consts: array( 0: Const( name: Identifier( @@ -70,7 +70,7 @@ array( 3: Stmt_ClassConst( attrGroups: array( ) - flags: MODIFIER_PRIVATE (4) + flags: PRIVATE (4) consts: array( 0: Const( name: Identifier( @@ -85,7 +85,7 @@ array( 4: Stmt_ClassConst( attrGroups: array( ) - flags: MODIFIER_FINAL (32) + flags: FINAL (32) consts: array( 0: Const( name: Identifier( diff --git a/test/code/parser/stmt/class/final.test b/test/code/parser/stmt/class/final.test index 950d53040e..1a9f52e061 100644 --- a/test/code/parser/stmt/class/final.test +++ b/test/code/parser/stmt/class/final.test @@ -8,7 +8,7 @@ array( 0: Stmt_Class( attrGroups: array( ) - flags: MODIFIER_FINAL (32) + flags: FINAL (32) name: Identifier( name: A ) diff --git a/test/code/parser/stmt/class/implicitPublic.test b/test/code/parser/stmt/class/implicitPublic.test index 949fccf5a6..7892bf2832 100644 --- a/test/code/parser/stmt/class/implicitPublic.test +++ b/test/code/parser/stmt/class/implicitPublic.test @@ -16,7 +16,7 @@ array( 0: Stmt_Class( attrGroups: array( ) - flags: MODIFIER_ABSTRACT (16) + flags: ABSTRACT (16) name: Identifier( name: A ) @@ -41,7 +41,7 @@ array( 1: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) type: null props: array( 0: Stmt_PropertyProperty( @@ -55,7 +55,7 @@ array( 2: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_ABSTRACT (16) + flags: ABSTRACT (16) byRef: false name: Identifier( name: c @@ -68,7 +68,7 @@ array( 3: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_FINAL (32) + flags: FINAL (32) byRef: false name: Identifier( name: d @@ -82,7 +82,7 @@ array( 4: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) byRef: false name: Identifier( name: e @@ -96,7 +96,7 @@ array( 5: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_STATIC | MODIFIER_FINAL (40) + flags: STATIC | FINAL (40) byRef: false name: Identifier( name: f diff --git a/test/code/parser/stmt/class/interface.test b/test/code/parser/stmt/class/interface.test index f0e32854ea..a726d53bf2 100644 --- a/test/code/parser/stmt/class/interface.test +++ b/test/code/parser/stmt/class/interface.test @@ -29,7 +29,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) byRef: false name: Identifier( name: a diff --git a/test/code/parser/stmt/class/modifier.test b/test/code/parser/stmt/class/modifier.test index ecdce0a787..ec789e4c56 100644 --- a/test/code/parser/stmt/class/modifier.test +++ b/test/code/parser/stmt/class/modifier.test @@ -18,7 +18,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: null props: array( 0: Stmt_PropertyProperty( @@ -51,7 +51,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC | MODIFIER_PROTECTED (3) + flags: PUBLIC | PROTECTED (3) type: null props: array( 0: Stmt_PropertyProperty( @@ -84,7 +84,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_READONLY (64) + flags: READONLY (64) type: null props: array( 0: Stmt_PropertyProperty( @@ -117,7 +117,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_ABSTRACT (16) + flags: ABSTRACT (16) byRef: false name: Identifier( name: a @@ -149,7 +149,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) type: null props: array( 0: Stmt_PropertyProperty( @@ -182,7 +182,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_FINAL (32) + flags: FINAL (32) byRef: false name: Identifier( name: a @@ -215,7 +215,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_ABSTRACT | MODIFIER_FINAL (48) + flags: ABSTRACT | FINAL (48) byRef: false name: Identifier( name: a @@ -236,7 +236,7 @@ array( 0: Stmt_Class( attrGroups: array( ) - flags: MODIFIER_ABSTRACT | MODIFIER_FINAL (48) + flags: ABSTRACT | FINAL (48) name: Identifier( name: A ) @@ -266,7 +266,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_ABSTRACT (16) + flags: ABSTRACT (16) type: null props: array( 0: Stmt_PropertyProperty( @@ -299,7 +299,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_FINAL (32) + flags: FINAL (32) type: null props: array( 0: Stmt_PropertyProperty( diff --git a/test/code/parser/stmt/class/php4Style.test b/test/code/parser/stmt/class/php4Style.test index 4c60a7ffb0..b121e78f37 100644 --- a/test/code/parser/stmt/class/php4Style.test +++ b/test/code/parser/stmt/class/php4Style.test @@ -51,7 +51,7 @@ array( 2: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_ABSTRACT | MODIFIER_STATIC (24) + flags: ABSTRACT | STATIC (24) byRef: false name: Identifier( name: baz diff --git a/test/code/parser/stmt/class/propertyTypes.test b/test/code/parser/stmt/class/propertyTypes.test index 454ca6e50d..49fdf112c1 100644 --- a/test/code/parser/stmt/class/propertyTypes.test +++ b/test/code/parser/stmt/class/propertyTypes.test @@ -24,7 +24,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: Identifier( name: string ) @@ -40,7 +40,7 @@ array( 1: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PROTECTED | MODIFIER_STATIC (10) + flags: PROTECTED | STATIC (10) type: Name( parts: array( 0: D @@ -58,7 +58,7 @@ array( 2: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PRIVATE (4) + flags: PRIVATE (4) type: NullableType( type: Identifier( name: float @@ -76,7 +76,7 @@ array( 3: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC | MODIFIER_STATIC | MODIFIER_READONLY (73) + flags: PUBLIC | STATIC | READONLY (73) type: NullableType( type: Identifier( name: int diff --git a/test/code/parser/stmt/class/property_promotion.test b/test/code/parser/stmt/class/property_promotion.test index 20e2b81920..1b0a8f8b7a 100644 --- a/test/code/parser/stmt/class/property_promotion.test +++ b/test/code/parser/stmt/class/property_promotion.test @@ -26,7 +26,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) byRef: false name: Identifier( name: __construct @@ -35,7 +35,7 @@ array( 0: Param( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: Identifier( name: float ) @@ -51,7 +51,7 @@ array( 1: Param( attrGroups: array( ) - flags: MODIFIER_PROTECTED (2) + flags: PROTECTED (2) type: Identifier( name: array ) @@ -68,7 +68,7 @@ array( 2: Param( attrGroups: array( ) - flags: MODIFIER_PRIVATE (4) + flags: PRIVATE (4) type: Identifier( name: string ) @@ -84,7 +84,7 @@ array( 3: Param( attrGroups: array( ) - flags: MODIFIER_PUBLIC | MODIFIER_READONLY (65) + flags: PUBLIC | READONLY (65) type: Identifier( name: int ) diff --git a/test/code/parser/stmt/class/readonly.test b/test/code/parser/stmt/class/readonly.test index fa29c2c9e8..cccd60dfef 100644 --- a/test/code/parser/stmt/class/readonly.test +++ b/test/code/parser/stmt/class/readonly.test @@ -9,7 +9,7 @@ array( 0: Stmt_Class( attrGroups: array( ) - flags: MODIFIER_READONLY (64) + flags: READONLY (64) name: Identifier( name: A ) @@ -30,7 +30,7 @@ array( 0: Stmt_Class( attrGroups: array( ) - flags: MODIFIER_FINAL | MODIFIER_READONLY (96) + flags: FINAL | READONLY (96) name: Identifier( name: A ) diff --git a/test/code/parser/stmt/class/readonlyMethod.test b/test/code/parser/stmt/class/readonlyMethod.test index ebfe9cb990..3b252260e3 100644 --- a/test/code/parser/stmt/class/readonlyMethod.test +++ b/test/code/parser/stmt/class/readonlyMethod.test @@ -18,7 +18,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_READONLY (64) + flags: READONLY (64) byRef: false name: Identifier( name: foo diff --git a/test/code/parser/stmt/class/simple.test b/test/code/parser/stmt/class/simple.test index 9a4e6b436c..17b45f1c93 100644 --- a/test/code/parser/stmt/class/simple.test +++ b/test/code/parser/stmt/class/simple.test @@ -68,7 +68,7 @@ array( 1: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: null props: array( 0: Stmt_PropertyProperty( @@ -92,7 +92,7 @@ array( 2: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PROTECTED (2) + flags: PROTECTED (2) type: null props: array( 0: Stmt_PropertyProperty( @@ -106,7 +106,7 @@ array( 3: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PRIVATE (4) + flags: PRIVATE (4) type: null props: array( 0: Stmt_PropertyProperty( @@ -120,7 +120,7 @@ array( 4: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) byRef: false name: Identifier( name: a @@ -134,7 +134,7 @@ array( 5: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC | MODIFIER_STATIC (9) + flags: PUBLIC | STATIC (9) byRef: false name: Identifier( name: b @@ -160,7 +160,7 @@ array( 6: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC | MODIFIER_FINAL (33) + flags: PUBLIC | FINAL (33) byRef: false name: Identifier( name: c @@ -178,7 +178,7 @@ array( 7: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PROTECTED (2) + flags: PROTECTED (2) byRef: false name: Identifier( name: d @@ -192,7 +192,7 @@ array( 8: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PRIVATE (4) + flags: PRIVATE (4) byRef: false name: Identifier( name: e diff --git a/test/code/parser/stmt/class/staticMethod.test b/test/code/parser/stmt/class/staticMethod.test index 6b671aff45..28b012c05c 100644 --- a/test/code/parser/stmt/class/staticMethod.test +++ b/test/code/parser/stmt/class/staticMethod.test @@ -18,7 +18,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) byRef: false name: Identifier( name: __construct @@ -51,7 +51,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) byRef: false name: Identifier( name: __destruct @@ -84,7 +84,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) byRef: false name: Identifier( name: __clone @@ -117,7 +117,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) byRef: false name: Identifier( name: __CONSTRUCT @@ -150,7 +150,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) byRef: false name: Identifier( name: __Destruct @@ -183,7 +183,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_STATIC (8) + flags: STATIC (8) byRef: false name: Identifier( name: __cLoNe diff --git a/test/code/parser/stmt/class/staticType.test b/test/code/parser/stmt/class/staticType.test index 473c3954c4..9d87f3b277 100644 --- a/test/code/parser/stmt/class/staticType.test +++ b/test/code/parser/stmt/class/staticType.test @@ -20,7 +20,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC | MODIFIER_STATIC (9) + flags: PUBLIC | STATIC (9) byRef: false name: Identifier( name: create diff --git a/test/code/parser/stmt/class/trait.test b/test/code/parser/stmt/class/trait.test index 278650a833..4031ef247a 100644 --- a/test/code/parser/stmt/class/trait.test +++ b/test/code/parser/stmt/class/trait.test @@ -32,7 +32,7 @@ array( 0: Stmt_ClassMethod( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) byRef: false name: Identifier( name: a @@ -81,7 +81,7 @@ array( method: Identifier( name: a ) - newModifier: MODIFIER_PROTECTED (2) + newModifier: PROTECTED (2) newName: Identifier( name: b ) @@ -101,7 +101,7 @@ array( method: Identifier( name: e ) - newModifier: MODIFIER_PRIVATE (4) + newModifier: PRIVATE (4) newName: null ) ) @@ -156,7 +156,7 @@ array( method: Identifier( name: b ) - newModifier: MODIFIER_PROTECTED (2) + newModifier: PROTECTED (2) newName: Identifier( name: c ) @@ -184,7 +184,7 @@ array( method: Identifier( name: f ) - newModifier: MODIFIER_PRIVATE (4) + newModifier: PRIVATE (4) newName: null ) ) diff --git a/test/code/parser/stmt/function/disjointNormalFormTypes.test b/test/code/parser/stmt/function/disjointNormalFormTypes.test index a84906cf40..4107a23f93 100644 --- a/test/code/parser/stmt/function/disjointNormalFormTypes.test +++ b/test/code/parser/stmt/function/disjointNormalFormTypes.test @@ -23,7 +23,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: UnionType( types: array( 0: IntersectionType( diff --git a/test/code/parser/stmt/function/intersectionTypes.test b/test/code/parser/stmt/function/intersectionTypes.test index a89fe76503..1ffe50e531 100644 --- a/test/code/parser/stmt/function/intersectionTypes.test +++ b/test/code/parser/stmt/function/intersectionTypes.test @@ -23,7 +23,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: IntersectionType( types: array( 0: Name( diff --git a/test/code/parser/stmt/function/unionTypes.test b/test/code/parser/stmt/function/unionTypes.test index f3b426c475..ce641475ee 100644 --- a/test/code/parser/stmt/function/unionTypes.test +++ b/test/code/parser/stmt/function/unionTypes.test @@ -23,7 +23,7 @@ array( 0: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: UnionType( types: array( 0: Name( diff --git a/test/code/parser/stmt/newInInitializer.test b/test/code/parser/stmt/newInInitializer.test index 5f660ef402..f38ade6d50 100644 --- a/test/code/parser/stmt/newInInitializer.test +++ b/test/code/parser/stmt/newInInitializer.test @@ -146,7 +146,7 @@ array( 1: Stmt_Property( attrGroups: array( ) - flags: MODIFIER_PUBLIC (1) + flags: PUBLIC (1) type: null props: array( 0: Stmt_PropertyProperty( From 2b562b72a852331ea048a13ff396d2012651bb94 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 11:02:16 +0200 Subject: [PATCH 136/428] Update default of ClassMethod::$flags in docs This defaults to 0, not Modifiers::PUBLIC. --- lib/PhpParser/Node/Stmt/ClassMethod.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index 12e44615fd..71cf1840fe 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -47,7 +47,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike { * * @param string|Node\Identifier $name Name * @param array $subNodes Array of the following optional subnodes: - * 'flags => MODIFIER_PUBLIC: Flags + * 'flags => 0 : Flags * 'byRef' => false : Whether to return by reference * 'params' => array() : Parameters * 'returnType' => null : Return type From 66b20bd6bcea249cfd9b994145097696ee0fa130 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 11:56:06 +0200 Subject: [PATCH 137/428] Rename Scalar\DNumber to Scalar\Float_ --- UPGRADE-5.0.md | 1 + grammar/php.y | 2 +- lib/PhpParser/BuilderHelpers.php | 2 +- lib/PhpParser/ConstExprEvaluator.php | 2 +- lib/PhpParser/Node/Scalar/DNumber.php | 78 +----------------- lib/PhpParser/Node/Scalar/Float_.php | 82 +++++++++++++++++++ lib/PhpParser/Parser/Php7.php | 2 +- lib/PhpParser/Parser/Php8.php | 2 +- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- test/PhpParser/Builder/ClassConstTest.php | 2 +- test/PhpParser/Builder/InterfaceTest.php | 8 +- test/PhpParser/Builder/ParamTest.php | 2 +- test/PhpParser/Builder/PropertyTest.php | 2 +- test/PhpParser/BuilderHelpersTest.php | 2 +- test/PhpParser/CompatibilityTest.php | 5 ++ test/PhpParser/Node/Scalar/DNumberTest.php | 4 +- test/PhpParser/NodeAbstractTest.php | 4 +- test/PhpParser/NodeTraverserTest.php | 2 +- test/PhpParser/PrettyPrinterTest.php | 8 +- test/code/parser/expr/constant_expr.test | 10 +-- test/code/parser/scalar/explicitOctal.test | 2 +- test/code/parser/scalar/float.test | 30 +++---- test/code/parser/scalar/int.test | 4 +- test/code/parser/scalar/numberSeparators.test | 6 +- .../parser/stmt/class/property_promotion.test | 2 +- test/code/parser/stmt/const.test | 2 +- .../parser/stmt/function/defaultValues.test | 2 +- 27 files changed, 141 insertions(+), 129 deletions(-) create mode 100644 lib/PhpParser/Node/Scalar/Float_.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index eaaa0ef2b9..148663ba40 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -75,6 +75,7 @@ used. A number of AST nodes have been renamed or moved in the AST hierarchy: + * `Node\Scalar\DNumber` is now `Node\Scalar\Float_`. * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. * `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`. * `Node\Stmt\StaticVar` is now `Node\StaticVar` and no longer extends `Node\Stmt`. diff --git a/grammar/php.y b/grammar/php.y index 31412c79bd..c9b66f5ae6 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1178,7 +1178,7 @@ dereferencable_scalar: scalar: T_LNUMBER { $$ = $this->parseLNumber($1, attributes(), $this->phpVersion->allowsInvalidOctals()); } - | T_DNUMBER { $$ = Scalar\DNumber::fromString($1, attributes()); } + | T_DNUMBER { $$ = Scalar\Float_::fromString($1, attributes()); } | dereferencable_scalar { $$ = $1; } | constant { $$ = $1; } | class_constant { $$ = $1; } diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index a53fe2574f..ac9b775b2b 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -240,7 +240,7 @@ public static function normalizeValue($value): Expr { } if (is_float($value)) { - return new Scalar\DNumber($value); + return new Scalar\Float_($value); } if (is_string($value)) { diff --git a/lib/PhpParser/ConstExprEvaluator.php b/lib/PhpParser/ConstExprEvaluator.php index 09328880fd..713c3e89f7 100644 --- a/lib/PhpParser/ConstExprEvaluator.php +++ b/lib/PhpParser/ConstExprEvaluator.php @@ -103,7 +103,7 @@ public function evaluateDirectly(Expr $expr) { private function evaluate(Expr $expr) { if ($expr instanceof Scalar\LNumber - || $expr instanceof Scalar\DNumber + || $expr instanceof Scalar\Float_ || $expr instanceof Scalar\String_ ) { return $expr->value; diff --git a/lib/PhpParser/Node/Scalar/DNumber.php b/lib/PhpParser/Node/Scalar/DNumber.php index 6a524e56d5..ad3937a54c 100644 --- a/lib/PhpParser/Node/Scalar/DNumber.php +++ b/lib/PhpParser/Node/Scalar/DNumber.php @@ -1,79 +1,3 @@ attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['value']; - } - - /** - * @param mixed[] $attributes - */ - public static function fromString(string $str, array $attributes = []): DNumber { - $attributes['rawValue'] = $str; - $float = self::parse($str); - - return new DNumber($float, $attributes); - } - - /** - * @internal - * - * Parses a DNUMBER token like PHP would. - * - * @param string $str A string number - * - * @return float The parsed number - */ - public static function parse(string $str): float { - $str = str_replace('_', '', $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; - } - - public function getType(): string { - return 'Scalar_DNumber'; - } -} +require __DIR__ . '/Float_.php'; diff --git a/lib/PhpParser/Node/Scalar/Float_.php b/lib/PhpParser/Node/Scalar/Float_.php new file mode 100644 index 0000000000..14ade5952d --- /dev/null +++ b/lib/PhpParser/Node/Scalar/Float_.php @@ -0,0 +1,82 @@ +attributes = $attributes; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['value']; + } + + /** + * @param mixed[] $attributes + */ + public static function fromString(string $str, array $attributes = []): Float_ { + $attributes['rawValue'] = $str; + $float = self::parse($str); + + return new Float_($float, $attributes); + } + + /** + * @internal + * + * Parses a DNUMBER token like PHP would. + * + * @param string $str A string number + * + * @return float The parsed number + */ + public static function parse(string $str): float { + $str = str_replace('_', '', $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; + } + + public function getType(): string { + return 'Scalar_Float'; + } +} + +// @deprecated compatibility alias +class_alias(Float_::class, DNumber::class); diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 19226852ee..15f657cfe0 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2774,7 +2774,7 @@ protected function initReduceCallbacks() { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 526 => function ($stackPos) { - $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 527 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 433ed39eb3..b9ba351635 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2792,7 +2792,7 @@ protected function initReduceCallbacks() { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 526 => function ($stackPos) { - $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 527 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index f7229be1d6..9069dd6b03 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -211,7 +211,7 @@ protected function pScalar_LNumber(Scalar\LNumber $node) { throw new \Exception('Invalid number kind'); } - protected function pScalar_DNumber(Scalar\DNumber $node) { + protected function pScalar_Float(Scalar\Float_ $node) { if (!is_finite($node->value)) { if ($node->value === \INF) { return '\INF'; diff --git a/test/PhpParser/Builder/ClassConstTest.php b/test/PhpParser/Builder/ClassConstTest.php index 4697cb8cd7..05ed1215da 100644 --- a/test/PhpParser/Builder/ClassConstTest.php +++ b/test/PhpParser/Builder/ClassConstTest.php @@ -173,7 +173,7 @@ public function provideTestDefaultValues() { ], [ 3.1415, - new Scalar\DNumber(3.1415) + new Scalar\Float_(3.1415) ], [ 'Hallo World', diff --git a/test/PhpParser/Builder/InterfaceTest.php b/test/PhpParser/Builder/InterfaceTest.php index 79e956dd88..34ee277ee7 100644 --- a/test/PhpParser/Builder/InterfaceTest.php +++ b/test/PhpParser/Builder/InterfaceTest.php @@ -9,7 +9,7 @@ use PhpParser\Node\AttributeGroup; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PhpParser\Node\Scalar\DNumber; +use PhpParser\Node\Scalar\Float_; use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt; @@ -50,7 +50,7 @@ public function testAddMethod() { public function testAddConst() { $const = new Stmt\ClassConst([ - new Node\Const_('SPEED_OF_LIGHT', new DNumber(299792458.0)) + new Node\Const_('SPEED_OF_LIGHT', new Float_(299792458.0)) ]); $contract = $this->createInterfaceBuilder()->addStmt($const)->getNode(); $this->assertSame(299792458.0, $contract->stmts[0]->consts[0]->value->value); @@ -58,7 +58,7 @@ public function testAddConst() { public function testOrder() { $const = new Stmt\ClassConst([ - new Node\Const_('SPEED_OF_LIGHT', new DNumber(299792458)) + new Node\Const_('SPEED_OF_LIGHT', new Float_(299792458)) ]); $method = new Stmt\ClassMethod('doSomething'); $contract = $this->createInterfaceBuilder() @@ -105,7 +105,7 @@ public function testInvalidStmtError() { public function testFullFunctional() { $const = new Stmt\ClassConst([ - new Node\Const_('SPEED_OF_LIGHT', new DNumber(299792458)) + new Node\Const_('SPEED_OF_LIGHT', new Float_(299792458)) ]); $method = new Stmt\ClassMethod('doSomething'); $contract = $this->createInterfaceBuilder() diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index 9e6fd74c9e..188c97ead4 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -49,7 +49,7 @@ public function provideTestDefaultValues() { ], [ 3.1415, - new Scalar\DNumber(3.1415) + new Scalar\Float_(3.1415) ], [ 'Hallo World', diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index 597fdf5871..f20f66e8f7 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -156,7 +156,7 @@ public function provideTestDefaultValues() { ], [ 3.1415, - new Scalar\DNumber(3.1415) + new Scalar\Float_(3.1415) ], [ 'Hallo World', diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index 6baae9a853..ec7d06f566 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -181,7 +181,7 @@ public function testNormalizeValue() { $this->assertEquals(new Expr\ConstFetch(new Node\Name('true')), BuilderHelpers::normalizeValue(true)); $this->assertEquals(new Expr\ConstFetch(new Node\Name('false')), BuilderHelpers::normalizeValue(false)); $this->assertEquals(new Scalar\LNumber(2), BuilderHelpers::normalizeValue(2)); - $this->assertEquals(new Scalar\DNumber(2.5), BuilderHelpers::normalizeValue(2.5)); + $this->assertEquals(new Scalar\Float_(2.5), BuilderHelpers::normalizeValue(2.5)); $this->assertEquals(new Scalar\String_('text'), BuilderHelpers::normalizeValue('text')); $this->assertEquals( new Expr\Array_([ diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index 62aa869938..e32920ab6a 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -3,6 +3,7 @@ namespace PhpParser; use PhpParser\Node\Expr; +use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; class CompatibilityTest extends \PHPUnit\Framework\TestCase { @@ -15,6 +16,8 @@ public function testAliases1() { $this->assertTrue($node instanceof Expr\ArrayItem); $node = new Node\StaticVar($var); $this->assertTrue($node instanceof Stmt\StaticVar); + $node = new Scalar\Float_(1.0); + $this->assertTrue($node instanceof Scalar\DNumber); } /** @runInSeparateProcess */ @@ -26,5 +29,7 @@ public function testAliases2() { $this->assertTrue($node instanceof Node\ArrayItem); $node = new Node\Stmt\StaticVar($var); $this->assertTrue($node instanceof Node\StaticVar); + $node = new Node\Scalar\DNumber(1.0); + $this->assertTrue($node instanceof Scalar\Float_); } } diff --git a/test/PhpParser/Node/Scalar/DNumberTest.php b/test/PhpParser/Node/Scalar/DNumberTest.php index 32bcfefc5f..6563a933ce 100644 --- a/test/PhpParser/Node/Scalar/DNumberTest.php +++ b/test/PhpParser/Node/Scalar/DNumberTest.php @@ -16,9 +16,9 @@ public function testRawValue() { /** @var Echo_ $echo */ $lLumber = $echo->exprs[0]; - $this->assertInstanceOf(DNumber::class, $lLumber); + $this->assertInstanceOf(Float_::class, $lLumber); - /** @var DNumber $dnumber */ + /** @var Float_ $dnumber */ $this->assertSame(1234.56, $lLumber->value); $this->assertSame('1_234.56', $lLumber->getAttribute('rawValue')); } diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index b2237a397b..2780990584 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -268,7 +268,7 @@ function functionName(&$a = 0, $b = 1.0) { } }, "default": { - "nodeType": "Scalar_DNumber", + "nodeType": "Scalar_Float", "value": 1, "attributes": { "startLine": 4, @@ -425,7 +425,7 @@ function functionName(&$a = 0, $b = 1.0) { "name": "b" }, "default": { - "nodeType": "Scalar_DNumber", + "nodeType": "Scalar_Float", "attributes": { "startLine": 4, "endLine": 4, diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index 3a63298bff..19692522a6 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -332,7 +332,7 @@ public function provideTestInvalidReturn() { ['leaveNode', $expr, 'foobar'], ]); $visitor5 = new NodeVisitorForTesting([ - ['leaveNode', $num, [new Node\Scalar\DNumber(42.0)]], + ['leaveNode', $num, [new Node\Scalar\Float_(42.0)]], ]); $visitor6 = new NodeVisitorForTesting([ ['leaveNode', $expr, false], diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 834c5466f0..86e77605ab 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -4,7 +4,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Name; -use PhpParser\Node\Scalar\DNumber; +use PhpParser\Node\Scalar\Float_; use PhpParser\Node\Scalar\Encapsed; use PhpParser\Node\Scalar\EncapsedStringPart; use PhpParser\Node\Scalar\LNumber; @@ -143,9 +143,9 @@ public function provideTestUnnaturalLiterals() { [new LNumber(-1, ['kind' => LNumber::KIND_BIN]), '-0b1'], [new LNumber(-1, ['kind' => LNumber::KIND_OCT]), '-01'], [new LNumber(-1, ['kind' => LNumber::KIND_HEX]), '-0x1'], - [new DNumber(\INF), '\INF'], - [new DNumber(-\INF), '-\INF'], - [new DNumber(-\NAN), '\NAN'], + [new Float_(\INF), '\INF'], + [new Float_(-\INF), '-\INF'], + [new Float_(-\NAN), '\NAN'], ]; } diff --git a/test/code/parser/expr/constant_expr.test b/test/code/parser/expr/constant_expr.test index 31ddab4ada..87cb59aa9a 100644 --- a/test/code/parser/expr/constant_expr.test +++ b/test/code/parser/expr/constant_expr.test @@ -82,10 +82,10 @@ array( name: T_3 ) value: Expr_BinaryOp_Plus( - left: Scalar_DNumber( + left: Scalar_Float( value: 1.5 ) - right: Scalar_DNumber( + right: Scalar_Float( value: 1.5 ) ) @@ -117,10 +117,10 @@ array( ) value: Expr_BinaryOp_Mul( left: Expr_BinaryOp_Plus( - left: Scalar_DNumber( + left: Scalar_Float( value: 1.5 ) - right: Scalar_DNumber( + right: Scalar_Float( value: 1.5 ) ) @@ -151,7 +151,7 @@ array( value: 3 ) ) - right: Scalar_DNumber( + right: Scalar_Float( value: 4 ) ) diff --git a/test/code/parser/scalar/explicitOctal.test b/test/code/parser/scalar/explicitOctal.test index f9bc3a925b..b880f9e7b3 100644 --- a/test/code/parser/scalar/explicitOctal.test +++ b/test/code/parser/scalar/explicitOctal.test @@ -23,7 +23,7 @@ array( ) ) 3: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 9.2233720368548E+18 ) ) diff --git a/test/code/parser/scalar/float.test b/test/code/parser/scalar/float.test index eb9f5b7262..54a7b8913e 100644 --- a/test/code/parser/scalar/float.test +++ b/test/code/parser/scalar/float.test @@ -23,57 +23,57 @@ Different float syntaxes ----- array( 0: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 0 ) ) 1: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 0 ) ) 2: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 0 ) ) 3: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 0 ) ) 4: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 0 ) ) 5: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 0 ) ) 6: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 0 ) ) 7: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 302000000000 ) ) 8: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 3.002E+102 ) ) 9: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: INF ) ) 10: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 1.844674407371E+19 comments: array( 0: // various integer -> float overflows @@ -86,22 +86,22 @@ array( ) ) 11: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 1.844674407371E+19 ) ) 12: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 1.844674407371E+19 ) ) 13: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 1.844674407371E+19 ) ) 14: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 1.844674407371E+19 ) ) diff --git a/test/code/parser/scalar/int.test b/test/code/parser/scalar/int.test index b65858dbbc..ee9eb7ab2d 100644 --- a/test/code/parser/scalar/int.test +++ b/test/code/parser/scalar/int.test @@ -29,7 +29,7 @@ array( ) ) 3: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: @@{ PHP_INT_MAX + 1 }@@ ) ) @@ -58,4 +58,4 @@ array( value: 3640 ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/scalar/numberSeparators.test b/test/code/parser/scalar/numberSeparators.test index 333c3d691d..be944f9f6e 100644 --- a/test/code/parser/scalar/numberSeparators.test +++ b/test/code/parser/scalar/numberSeparators.test @@ -31,7 +31,7 @@ Syntax error, unexpected T_STRING from 19:2 to 19:4 Syntax error, unexpected T_STRING from 20:2 to 20:4 array( 0: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 6.674083E-11 ) ) @@ -122,12 +122,12 @@ array( ) ) 12: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 0 ) ) 13: Stmt_Expression( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 1 ) ) diff --git a/test/code/parser/stmt/class/property_promotion.test b/test/code/parser/stmt/class/property_promotion.test index 1b0a8f8b7a..c9b397bc97 100644 --- a/test/code/parser/stmt/class/property_promotion.test +++ b/test/code/parser/stmt/class/property_promotion.test @@ -44,7 +44,7 @@ array( var: Expr_Variable( name: x ) - default: Scalar_DNumber( + default: Scalar_Float( value: 0 ) ) diff --git a/test/code/parser/stmt/const.test b/test/code/parser/stmt/const.test index e6c4db84ff..4d2d418502 100644 --- a/test/code/parser/stmt/const.test +++ b/test/code/parser/stmt/const.test @@ -19,7 +19,7 @@ array( name: Identifier( name: B ) - value: Scalar_DNumber( + value: Scalar_Float( value: 1 ) ) diff --git a/test/code/parser/stmt/function/defaultValues.test b/test/code/parser/stmt/function/defaultValues.test index 2bd34cc069..a66080abe5 100644 --- a/test/code/parser/stmt/function/defaultValues.test +++ b/test/code/parser/stmt/function/defaultValues.test @@ -103,7 +103,7 @@ array( name: g ) default: Expr_UnaryMinus( - expr: Scalar_DNumber( + expr: Scalar_Float( value: 1 ) ) From 23835d20efd3d4c6316ed8cb45e111f3f2f1ce87 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 11:58:59 +0200 Subject: [PATCH 138/428] Rename Scalar\LNumber to Scalar\Int_ --- UPGRADE-5.0.md | 1 + .../Constant_expression_evaluation.markdown | 4 +- doc/component/Walking_the_AST.markdown | 2 +- lib/PhpParser/BuilderHelpers.php | 2 +- lib/PhpParser/ConstExprEvaluator.php | 2 +- lib/PhpParser/Node/Scalar/Int_.php | 82 ++++++++++++ lib/PhpParser/Node/Scalar/LNumber.php | 78 +---------- lib/PhpParser/ParserAbstract.php | 10 +- lib/PhpParser/PrettyPrinter/Standard.php | 12 +- test/PhpParser/Builder/ClassConstTest.php | 28 ++-- test/PhpParser/Builder/ClassTest.php | 4 +- test/PhpParser/Builder/EnumCaseTest.php | 6 +- test/PhpParser/Builder/EnumTest.php | 4 +- test/PhpParser/Builder/FunctionTest.php | 4 +- test/PhpParser/Builder/InterfaceTest.php | 4 +- test/PhpParser/Builder/MethodTest.php | 4 +- test/PhpParser/Builder/ParamTest.php | 12 +- test/PhpParser/Builder/PropertyTest.php | 12 +- test/PhpParser/Builder/TraitTest.php | 4 +- test/PhpParser/BuilderFactoryTest.php | 4 +- test/PhpParser/BuilderHelpersTest.php | 8 +- test/PhpParser/CompatibilityTest.php | 14 +- test/PhpParser/ConstExprEvaluatorTest.php | 6 +- test/PhpParser/Node/Expr/CallableLikeTest.php | 4 +- test/PhpParser/Node/Scalar/NumberTest.php | 4 +- test/PhpParser/NodeAbstractTest.php | 4 +- test/PhpParser/NodeDumperTest.php | 2 +- test/PhpParser/NodeTraverserTest.php | 8 +- .../NodeVisitor/NameResolverTest.php | 2 +- test/PhpParser/ParserTest.php | 18 +-- test/PhpParser/PrettyPrinterTest.php | 12 +- test/code/parser/comments.test | 2 +- .../parser/errorHandling/lexerErrors.test | 18 +-- test/code/parser/errorHandling/recovery.test | 32 ++--- test/code/parser/expr/arrayDef.test | 6 +- test/code/parser/expr/arrayEmptyElemens.test | 8 +- test/code/parser/expr/arraySpread.test | 34 ++--- test/code/parser/expr/arrow_function.test | 2 +- test/code/parser/expr/concatPrecedence.test | 32 ++--- test/code/parser/expr/constant_expr.test | 122 +++++++++--------- test/code/parser/expr/exprInIsset.test | 4 +- test/code/parser/expr/exprInList.test | 4 +- .../expr/fetchAndCall/constantDeref.test | 58 ++++----- .../parser/expr/fetchAndCall/namedArgs.test | 2 +- test/code/parser/expr/issetAndEmpty.test | 6 +- test/code/parser/expr/match.test | 20 +-- test/code/parser/expr/uvs/constDeref.test | 22 ++-- test/code/parser/expr/uvs/indirectCall.test | 22 ++-- test/code/parser/expr/uvs/isset.test | 6 +- test/code/parser/expr/uvs/misc.test | 14 +- test/code/parser/expr/uvs/new.test | 2 +- test/code/parser/expr/uvs/staticProperty.test | 4 +- .../parser/scalar/encapsedNegVarOffset.test | 6 +- test/code/parser/scalar/encapsedString.test | 4 +- test/code/parser/scalar/explicitOctal.test | 6 +- test/code/parser/scalar/int.test | 16 +-- test/code/parser/scalar/invalidOctal.test | 4 +- test/code/parser/scalar/numberSeparators.test | 22 ++-- test/code/parser/semiReserved.test | 20 +-- test/code/parser/stmt/attributes.test | 8 +- .../parser/stmt/class/class_position.test | 6 +- .../stmt/class/constModifierErrors.test | 8 +- .../parser/stmt/class/constModifiers.test | 10 +- test/code/parser/stmt/class/enum.test | 2 +- .../parser/stmt/class/property_promotion.test | 2 +- test/code/parser/stmt/const.test | 2 +- test/code/parser/stmt/controlFlow.test | 4 +- .../parser/stmt/function/defaultValues.test | 2 +- .../stmt/generator/yieldUnaryPrecedence.test | 6 +- test/code/parser/stmt/loop/for.test | 2 +- test/code/parser/stmt/namespace/mix.test | 12 +- .../stmt/namespace/outsideStmtInvalid.test | 8 +- test/code/parser/stmt/switch.test | 4 +- 73 files changed, 476 insertions(+), 459 deletions(-) create mode 100644 lib/PhpParser/Node/Scalar/Int_.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 148663ba40..123cb83a32 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -75,6 +75,7 @@ used. A number of AST nodes have been renamed or moved in the AST hierarchy: + * `Node\Scalar\LNumber` is now `Node\Scalar\Int_`. * `Node\Scalar\DNumber` is now `Node\Scalar\Float_`. * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. * `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`. diff --git a/doc/component/Constant_expression_evaluation.markdown b/doc/component/Constant_expression_evaluation.markdown index 9ab4f5c395..45f576c594 100644 --- a/doc/component/Constant_expression_evaluation.markdown +++ b/doc/component/Constant_expression_evaluation.markdown @@ -45,7 +45,7 @@ use PhpParser\Node\{Expr, Scalar}; $evaluator = new ConstExprEvaluator(); // 10 / 0 -$expr = new Expr\BinaryOp\Div(new Scalar\LNumber(10), new Scalar\LNumber(0)); +$expr = new Expr\BinaryOp\Div(new Scalar\Int_(10), new Scalar\Int_(0)); var_dump($evaluator->evaluateDirectly($expr)); // float(INF) // Warning: Division by zero @@ -112,4 +112,4 @@ class Test { const A = self::B; const B = self::A; } -``` \ No newline at end of file +``` diff --git a/doc/component/Walking_the_AST.markdown b/doc/component/Walking_the_AST.markdown index e4d95609ad..25e7c324ad 100644 --- a/doc/component/Walking_the_AST.markdown +++ b/doc/component/Walking_the_AST.markdown @@ -11,7 +11,7 @@ use PhpParser\{Node, NodeTraverser, NodeVisitorAbstract}; $traverser = new NodeTraverser; $traverser->addVisitor(new class extends NodeVisitorAbstract { public function leaveNode(Node $node) { - if ($node instanceof Node\Scalar\LNumber) { + if ($node instanceof Node\Scalar\Int_) { return new Node\Scalar\String_((string) $node->value); } } diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index ac9b775b2b..fe7f923de3 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -236,7 +236,7 @@ public static function normalizeValue($value): Expr { } if (is_int($value)) { - return new Scalar\LNumber($value); + return new Scalar\Int_($value); } if (is_float($value)) { diff --git a/lib/PhpParser/ConstExprEvaluator.php b/lib/PhpParser/ConstExprEvaluator.php index 713c3e89f7..1ad4396819 100644 --- a/lib/PhpParser/ConstExprEvaluator.php +++ b/lib/PhpParser/ConstExprEvaluator.php @@ -102,7 +102,7 @@ public function evaluateDirectly(Expr $expr) { } private function evaluate(Expr $expr) { - if ($expr instanceof Scalar\LNumber + if ($expr instanceof Scalar\Int_ || $expr instanceof Scalar\Float_ || $expr instanceof Scalar\String_ ) { diff --git a/lib/PhpParser/Node/Scalar/Int_.php b/lib/PhpParser/Node/Scalar/Int_.php new file mode 100644 index 0000000000..a0187b218a --- /dev/null +++ b/lib/PhpParser/Node/Scalar/Int_.php @@ -0,0 +1,82 @@ +attributes = $attributes; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['value']; + } + + /** + * Constructs an Int 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 Int_ The constructed LNumber, including kind attribute + */ + public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false): Int_ { + $attributes['rawValue'] = $str; + + $str = str_replace('_', '', $str); + + if ('0' !== $str[0] || '0' === $str) { + $attributes['kind'] = Int_::KIND_DEC; + return new Int_((int) $str, $attributes); + } + + if ('x' === $str[1] || 'X' === $str[1]) { + $attributes['kind'] = Int_::KIND_HEX; + return new Int_(hexdec($str), $attributes); + } + + if ('b' === $str[1] || 'B' === $str[1]) { + $attributes['kind'] = Int_::KIND_BIN; + return new Int_(bindec($str), $attributes); + } + + if (!$allowInvalidOctal && strpbrk($str, '89')) { + throw new Error('Invalid numeric literal', $attributes); + } + + // Strip optional explicit octal prefix. + if ('o' === $str[1] || 'O' === $str[1]) { + $str = substr($str, 2); + } + + // use intval instead of octdec to get proper cutting behavior with malformed numbers + $attributes['kind'] = Int_::KIND_OCT; + return new Int_(intval($str, 8), $attributes); + } + + public function getType(): string { + return 'Scalar_Int'; + } +} + +// @deprecated compatibility alias +class_alias(Int_::class, LNumber::class); diff --git a/lib/PhpParser/Node/Scalar/LNumber.php b/lib/PhpParser/Node/Scalar/LNumber.php index 0991a53647..cfe8c8c1c5 100644 --- a/lib/PhpParser/Node/Scalar/LNumber.php +++ b/lib/PhpParser/Node/Scalar/LNumber.php @@ -1,79 +1,3 @@ attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['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(string $str, array $attributes = [], bool $allowInvalidOctal = false): LNumber { - $attributes['rawValue'] = $str; - - $str = str_replace('_', '', $str); - - 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); - } - - // Strip optional explicit octal prefix. - if ('o' === $str[1] || 'O' === $str[1]) { - $str = substr($str, 2); - } - - // 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); - } - - public function getType(): string { - return 'Scalar_LNumber'; - } -} +require __DIR__ . '/Int_.php'; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index f1cc8d0e3e..eeb06406c5 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -14,7 +14,7 @@ use PhpParser\Node\Name; use PhpParser\Node\Param; use PhpParser\Node\Scalar\Encapsed; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassConst; @@ -664,11 +664,11 @@ protected function getFloatCastKind(string $cast): int { protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { try { - return LNumber::fromString($str, $attributes, $allowInvalidOctal); + return Int_::fromString($str, $attributes, $allowInvalidOctal); } catch (Error $error) { $this->emitError($error); // Use dummy value - return new LNumber(0, $attributes); + return new Int_(0, $attributes); } } @@ -678,7 +678,7 @@ protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { * @param string $str Number string * @param array $attributes Attributes * - * @return LNumber|String_ Integer or string node. + * @return Int_|String_ Integer or string node. */ protected function parseNumString(string $str, array $attributes) { if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { @@ -690,7 +690,7 @@ protected function parseNumString(string $str, array $attributes) { return new String_($str, $attributes); } - return new LNumber($num, $attributes); + return new Int_($num, $attributes); } protected function stripIndentation( diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 9069dd6b03..f704d26412 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -181,15 +181,15 @@ protected function pScalar_Encapsed(Scalar\Encapsed $node) { return '"' . $this->pEncapsList($node->parts, '"') . '"'; } - protected function pScalar_LNumber(Scalar\LNumber $node) { + protected function pScalar_Int(Scalar\Int_ $node) { if ($node->value === -\PHP_INT_MAX-1) { // PHP_INT_MIN cannot be represented as a literal, // because the sign is not part of the literal return '(-' . \PHP_INT_MAX . '-1)'; } - $kind = $node->getAttribute('kind', Scalar\LNumber::KIND_DEC); - if (Scalar\LNumber::KIND_DEC === $kind) { + $kind = $node->getAttribute('kind', Scalar\Int_::KIND_DEC); + if (Scalar\Int_::KIND_DEC === $kind) { return (string) $node->value; } @@ -201,11 +201,11 @@ protected function pScalar_LNumber(Scalar\LNumber $node) { $str = (string) $node->value; } switch ($kind) { - case Scalar\LNumber::KIND_BIN: + case Scalar\Int_::KIND_BIN: return $sign . '0b' . base_convert($str, 10, 2); - case Scalar\LNumber::KIND_OCT: + case Scalar\Int_::KIND_OCT: return $sign . '0' . base_convert($str, 10, 8); - case Scalar\LNumber::KIND_HEX: + case Scalar\Int_::KIND_HEX: return $sign . '0x' . base_convert($str, 10, 16); } throw new \Exception('Invalid number kind'); diff --git a/test/PhpParser/Builder/ClassConstTest.php b/test/PhpParser/Builder/ClassConstTest.php index 05ed1215da..715a5bb63d 100644 --- a/test/PhpParser/Builder/ClassConstTest.php +++ b/test/PhpParser/Builder/ClassConstTest.php @@ -12,7 +12,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; class ClassConstTest extends \PHPUnit\Framework\TestCase { @@ -29,7 +29,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("TEST", new LNumber(1)) + new Const_("TEST", new Int_(1)) ], Modifiers::PRIVATE ), @@ -44,7 +44,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("TEST", new LNumber(1)) + new Const_("TEST", new Int_(1)) ], Modifiers::PROTECTED ), @@ -59,7 +59,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("TEST", new LNumber(1)) + new Const_("TEST", new Int_(1)) ], Modifiers::PUBLIC ), @@ -74,7 +74,7 @@ public function testModifiers() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("TEST", new LNumber(1)) + new Const_("TEST", new Int_(1)) ], Modifiers::FINAL ), @@ -91,7 +91,7 @@ public function testDocComment() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("TEST", new LNumber(1)) + new Const_("TEST", new Int_(1)) ], Modifiers::PUBLIC, [ @@ -110,8 +110,8 @@ public function testAddConst() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("FIRST_TEST", new LNumber(1)), - new Const_("SECOND_TEST", new LNumber(2)) + new Const_("FIRST_TEST", new Int_(1)), + new Const_("SECOND_TEST", new Int_(2)) ] ), $node @@ -121,7 +121,7 @@ public function testAddConst() { public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), - [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + [new Arg(new Int_(1), false, false, [], new Identifier('name'))] ); $attributeGroup = new AttributeGroup([$attribute]); @@ -132,7 +132,7 @@ public function testAddAttribute() { $this->assertEquals( new Stmt\ClassConst( [ - new Const_("ATTR_GROUP", new LNumber(1)) + new Const_("ATTR_GROUP", new Int_(1)) ], 0, [], @@ -169,7 +169,7 @@ public function provideTestDefaultValues() { ], [ 31415, - new Scalar\LNumber(31415) + new Scalar\Int_(31415) ], [ 3.1415, @@ -182,9 +182,9 @@ public function provideTestDefaultValues() { [ [1, 2, 3], new Expr\Array_([ - new \PhpParser\Node\ArrayItem(new Scalar\LNumber(1)), - new \PhpParser\Node\ArrayItem(new Scalar\LNumber(2)), - new \PhpParser\Node\ArrayItem(new Scalar\LNumber(3)), + new \PhpParser\Node\ArrayItem(new Scalar\Int_(1)), + new \PhpParser\Node\ArrayItem(new Scalar\Int_(2)), + new \PhpParser\Node\ArrayItem(new Scalar\Int_(3)), ]) ], [ diff --git a/test/PhpParser/Builder/ClassTest.php b/test/PhpParser/Builder/ClassTest.php index 160de91337..24e6b13916 100644 --- a/test/PhpParser/Builder/ClassTest.php +++ b/test/PhpParser/Builder/ClassTest.php @@ -10,7 +10,7 @@ use PhpParser\Node\AttributeGroup; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; class ClassTest extends \PHPUnit\Framework\TestCase { @@ -144,7 +144,7 @@ public function testDocComment() { public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), - [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + [new Arg(new Int_(1), false, false, [], new Identifier('name'))] ); $attributeGroup = new AttributeGroup([$attribute]); diff --git a/test/PhpParser/Builder/EnumCaseTest.php b/test/PhpParser/Builder/EnumCaseTest.php index be3a863537..437877c44d 100644 --- a/test/PhpParser/Builder/EnumCaseTest.php +++ b/test/PhpParser/Builder/EnumCaseTest.php @@ -9,7 +9,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; class EnumCaseTest extends \PHPUnit\Framework\TestCase { @@ -37,7 +37,7 @@ public function testDocComment() { public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), - [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + [new Arg(new Int_(1), false, false, [], new Identifier('name'))] ); $attributeGroup = new AttributeGroup([$attribute]); @@ -72,7 +72,7 @@ public function provideTestDefaultValues() { return [ [ 31415, - new Scalar\LNumber(31415) + new Scalar\Int_(31415) ], [ 'Hallo World', diff --git a/test/PhpParser/Builder/EnumTest.php b/test/PhpParser/Builder/EnumTest.php index f4ab3b9042..51f94a616c 100644 --- a/test/PhpParser/Builder/EnumTest.php +++ b/test/PhpParser/Builder/EnumTest.php @@ -9,7 +9,7 @@ use PhpParser\Node\AttributeGroup; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; class EnumTest extends \PHPUnit\Framework\TestCase { @@ -109,7 +109,7 @@ public function testDocComment() { public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), - [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + [new Arg(new Int_(1), false, false, [], new Identifier('name'))] ); $attributeGroup = new AttributeGroup([$attribute]); diff --git a/test/PhpParser/Builder/FunctionTest.php b/test/PhpParser/Builder/FunctionTest.php index 175ff6d478..0152b30ab9 100644 --- a/test/PhpParser/Builder/FunctionTest.php +++ b/test/PhpParser/Builder/FunctionTest.php @@ -11,7 +11,7 @@ use PhpParser\Node\Expr\Variable; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; @@ -89,7 +89,7 @@ public function testDocComment() { public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), - [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + [new Arg(new Int_(1), false, false, [], new Identifier('name'))] ); $attributeGroup = new AttributeGroup([$attribute]); diff --git a/test/PhpParser/Builder/InterfaceTest.php b/test/PhpParser/Builder/InterfaceTest.php index 34ee277ee7..4ae93956ff 100644 --- a/test/PhpParser/Builder/InterfaceTest.php +++ b/test/PhpParser/Builder/InterfaceTest.php @@ -10,7 +10,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar\Float_; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; class InterfaceTest extends \PHPUnit\Framework\TestCase { @@ -84,7 +84,7 @@ public function testDocComment() { public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), - [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + [new Arg(new Int_(1), false, false, [], new Identifier('name'))] ); $attributeGroup = new AttributeGroup([$attribute]); diff --git a/test/PhpParser/Builder/MethodTest.php b/test/PhpParser/Builder/MethodTest.php index ee0ea49292..6381aaacb3 100644 --- a/test/PhpParser/Builder/MethodTest.php +++ b/test/PhpParser/Builder/MethodTest.php @@ -12,7 +12,7 @@ use PhpParser\Node\Expr\Variable; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; @@ -131,7 +131,7 @@ public function testDocComment() { public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), - [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + [new Arg(new Int_(1), false, false, [], new Identifier('name'))] ); $attributeGroup = new AttributeGroup([$attribute]); diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index 188c97ead4..62c357e726 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -10,7 +10,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; class ParamTest extends \PHPUnit\Framework\TestCase { public function createParamBuilder($name) { @@ -45,7 +45,7 @@ public function provideTestDefaultValues() { ], [ 31415, - new Scalar\LNumber(31415) + new Scalar\Int_(31415) ], [ 3.1415, @@ -58,9 +58,9 @@ public function provideTestDefaultValues() { [ [1, 2, 3], new Expr\Array_([ - new Node\ArrayItem(new Scalar\LNumber(1)), - new Node\ArrayItem(new Scalar\LNumber(2)), - new Node\ArrayItem(new Scalar\LNumber(3)), + new Node\ArrayItem(new Scalar\Int_(1)), + new Node\ArrayItem(new Scalar\Int_(2)), + new Node\ArrayItem(new Scalar\Int_(3)), ]) ], [ @@ -207,7 +207,7 @@ public function testVariadic() { public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), - [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + [new Arg(new Int_(1), false, false, [], new Identifier('name'))] ); $attributeGroup = new AttributeGroup([$attribute]); diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index f20f66e8f7..329641c82b 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -11,7 +11,7 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; class PropertyTest extends \PHPUnit\Framework\TestCase { @@ -113,7 +113,7 @@ public function testDefaultValues($value, $expectedValueNode) { public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), - [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + [new Arg(new Int_(1), false, false, [], new Identifier('name'))] ); $attributeGroup = new AttributeGroup([$attribute]); @@ -152,7 +152,7 @@ public function provideTestDefaultValues() { ], [ 31415, - new Scalar\LNumber(31415) + new Scalar\Int_(31415) ], [ 3.1415, @@ -165,9 +165,9 @@ public function provideTestDefaultValues() { [ [1, 2, 3], new Expr\Array_([ - new \PhpParser\Node\ArrayItem(new Scalar\LNumber(1)), - new \PhpParser\Node\ArrayItem(new Scalar\LNumber(2)), - new \PhpParser\Node\ArrayItem(new Scalar\LNumber(3)), + new \PhpParser\Node\ArrayItem(new Scalar\Int_(1)), + new \PhpParser\Node\ArrayItem(new Scalar\Int_(2)), + new \PhpParser\Node\ArrayItem(new Scalar\Int_(3)), ]) ], [ diff --git a/test/PhpParser/Builder/TraitTest.php b/test/PhpParser/Builder/TraitTest.php index 3285d19c8b..802833368d 100644 --- a/test/PhpParser/Builder/TraitTest.php +++ b/test/PhpParser/Builder/TraitTest.php @@ -9,7 +9,7 @@ use PhpParser\Node\AttributeGroup; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassConst; @@ -96,7 +96,7 @@ public function testGetProperties() { public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), - [new Arg(new LNumber(1), false, false, [], new Identifier('name'))] + [new Arg(new Int_(1), false, false, [], new Identifier('name'))] ); $attributeGroup = new AttributeGroup([$attribute]); diff --git a/test/PhpParser/BuilderFactoryTest.php b/test/PhpParser/BuilderFactoryTest.php index 74a917c39d..2434dd2168 100644 --- a/test/PhpParser/BuilderFactoryTest.php +++ b/test/PhpParser/BuilderFactoryTest.php @@ -8,7 +8,7 @@ use PhpParser\Node\Expr\BinaryOp\Concat; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; class BuilderFactoryTest extends \PHPUnit\Framework\TestCase { @@ -141,7 +141,7 @@ public function testCalls() { new Expr\MethodCall( new Expr\Variable('obj'), new Identifier('method'), - [new Arg(new LNumber(42))] + [new Arg(new Int_(42))] ), $factory->methodCall(new Expr\Variable('obj'), 'method', [42]) ); diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index ec7d06f566..493e71e90a 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -174,19 +174,19 @@ public function testNormalizeTypeNullableNever() { } public function testNormalizeValue() { - $expression = new Scalar\LNumber(1); + $expression = new Scalar\Int_(1); $this->assertSame($expression, BuilderHelpers::normalizeValue($expression)); $this->assertEquals(new Expr\ConstFetch(new Node\Name('null')), BuilderHelpers::normalizeValue(null)); $this->assertEquals(new Expr\ConstFetch(new Node\Name('true')), BuilderHelpers::normalizeValue(true)); $this->assertEquals(new Expr\ConstFetch(new Node\Name('false')), BuilderHelpers::normalizeValue(false)); - $this->assertEquals(new Scalar\LNumber(2), BuilderHelpers::normalizeValue(2)); + $this->assertEquals(new Scalar\Int_(2), BuilderHelpers::normalizeValue(2)); $this->assertEquals(new Scalar\Float_(2.5), BuilderHelpers::normalizeValue(2.5)); $this->assertEquals(new Scalar\String_('text'), BuilderHelpers::normalizeValue('text')); $this->assertEquals( new Expr\Array_([ - new Node\ArrayItem(new Scalar\LNumber(0)), - new Node\ArrayItem(new Scalar\LNumber(1), new Scalar\String_('test')), + new Node\ArrayItem(new Scalar\Int_(0)), + new Node\ArrayItem(new Scalar\Int_(1), new Scalar\String_('test')), ]), BuilderHelpers::normalizeValue([ 0, diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index e32920ab6a..a762b2bc42 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -7,7 +7,10 @@ use PhpParser\Node\Stmt; class CompatibilityTest extends \PHPUnit\Framework\TestCase { - /** @runInSeparateProcess */ + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ public function testAliases1() { $var = new Expr\Variable('x'); $node = new Node\ClosureUse($var); @@ -18,9 +21,14 @@ public function testAliases1() { $this->assertTrue($node instanceof Stmt\StaticVar); $node = new Scalar\Float_(1.0); $this->assertTrue($node instanceof Scalar\DNumber); + $node = new Scalar\Int_(1); + $this->assertTrue($node instanceof Scalar\LNumber); } - /** @runInSeparateProcess */ + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ public function testAliases2() { $var = new Expr\Variable('x'); $node = new Node\Expr\ClosureUse($var); @@ -31,5 +39,7 @@ public function testAliases2() { $this->assertTrue($node instanceof Node\StaticVar); $node = new Node\Scalar\DNumber(1.0); $this->assertTrue($node instanceof Scalar\Float_); + $node = new Node\Scalar\LNumber(1); + $this->assertTrue($node instanceof Scalar\Int_); } } diff --git a/test/PhpParser/ConstExprEvaluatorTest.php b/test/PhpParser/ConstExprEvaluatorTest.php index 2d2cfc296f..9d78af88a9 100644 --- a/test/PhpParser/ConstExprEvaluatorTest.php +++ b/test/PhpParser/ConstExprEvaluatorTest.php @@ -89,7 +89,7 @@ public function testEvaluateFallback() { throw new ConstExprEvaluationException(); }); $expr = new Expr\BinaryOp\Plus( - new Scalar\LNumber(8), + new Scalar\Int_(8), new Scalar\MagicConst\Line() ); $this->assertSame(50, $evaluator->evaluateDirectly($expr)); @@ -118,12 +118,12 @@ public function testEvaluateSilently($expr, $exception, $msg) { public function provideTestEvaluateSilently() { return [ [ - new Expr\BinaryOp\Mod(new Scalar\LNumber(42), new Scalar\LNumber(0)), + new Expr\BinaryOp\Mod(new Scalar\Int_(42), new Scalar\Int_(0)), \Error::class, 'Modulo by zero' ], [ - new Expr\BinaryOp\Plus(new Scalar\LNumber(42), new Scalar\String_("1foo")), + new Expr\BinaryOp\Plus(new Scalar\Int_(42), new Scalar\String_("1foo")), \ErrorException::class, \PHP_VERSION_ID >= 80000 ? 'A non-numeric value encountered' diff --git a/test/PhpParser/Node/Expr/CallableLikeTest.php b/test/PhpParser/Node/Expr/CallableLikeTest.php index daafcc031c..9a0349c3ac 100644 --- a/test/PhpParser/Node/Expr/CallableLikeTest.php +++ b/test/PhpParser/Node/Expr/CallableLikeTest.php @@ -4,7 +4,7 @@ use PhpParser\Node\Arg; use PhpParser\Node\Name; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\VariadicPlaceholder; class CallableLikeTest extends \PHPUnit\Framework\TestCase { @@ -19,7 +19,7 @@ public function testIsFirstClassCallable(CallLike $node, bool $isFirstClassCalla } public function provideTestIsFirstClassCallable() { - $normalArgs = [new Arg(new LNumber(1))]; + $normalArgs = [new Arg(new Int_(1))]; $callableArgs = [new VariadicPlaceholder()]; return [ [new FuncCall(new Name('test'), $normalArgs), false], diff --git a/test/PhpParser/Node/Scalar/NumberTest.php b/test/PhpParser/Node/Scalar/NumberTest.php index f8f830caf5..a4af23458d 100644 --- a/test/PhpParser/Node/Scalar/NumberTest.php +++ b/test/PhpParser/Node/Scalar/NumberTest.php @@ -15,9 +15,9 @@ public function testRawValue() { /** @var Echo_ $echo */ $lLumber = $echo->exprs[0]; - $this->assertInstanceOf(LNumber::class, $lLumber); + $this->assertInstanceOf(Int_::class, $lLumber); - /** @var LNumber $lnumber */ + /** @var Int_ $lnumber */ $this->assertSame(1234, $lLumber->value); $this->assertSame('1_234', $lLumber->getAttribute('rawValue')); } diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index 2780990584..3efe72a96c 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -238,7 +238,7 @@ function functionName(&$a = 0, $b = 1.0) { } }, "default": { - "nodeType": "Scalar_LNumber", + "nodeType": "Scalar_Int", "value": 0, "attributes": { "startLine": 4, @@ -395,7 +395,7 @@ function functionName(&$a = 0, $b = 1.0) { "name": "a" }, "default": { - "nodeType": "Scalar_LNumber", + "nodeType": "Scalar_Int", "attributes": { "startLine": 4, "endLine": 4, diff --git a/test/PhpParser/NodeDumperTest.php b/test/PhpParser/NodeDumperTest.php index 812c8f2fc6..70ca6f2152 100644 --- a/test/PhpParser/NodeDumperTest.php +++ b/test/PhpParser/NodeDumperTest.php @@ -75,7 +75,7 @@ public function testDumpWithPositions() { var: Expr_Variable[2:1 - 2:2]( name: a ) - expr: Scalar_LNumber[2:6 - 2:6]( + expr: Scalar_Int[2:6 - 2:6]( value: 1 ) ) diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index 19692522a6..27f77c8dd1 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -315,7 +315,7 @@ public function testInvalidReturn($stmts, $visitor, $message) { } public function provideTestInvalidReturn() { - $num = new Node\Scalar\LNumber(42); + $num = new Node\Scalar\Int_(42); $expr = new Node\Stmt\Expression($num); $stmts = [$expr]; @@ -338,7 +338,7 @@ public function provideTestInvalidReturn() { ['leaveNode', $expr, false], ]); $visitor7 = new NodeVisitorForTesting([ - ['enterNode', $expr, new Node\Scalar\LNumber(42)], + ['enterNode', $expr, new Node\Scalar\Int_(42)], ]); $visitor8 = new NodeVisitorForTesting([ ['enterNode', $num, new Node\Stmt\Return_()], @@ -351,8 +351,8 @@ public function provideTestInvalidReturn() { [$stmts, $visitor4, 'leaveNode() returned invalid value of type string'], [$stmts, $visitor5, 'leaveNode() may only return an array if the parent structure is an array'], [$stmts, $visitor6, 'bool(false) return from leaveNode() no longer supported. Return NodeTraverser::REMOVE_NODE instead'], - [$stmts, $visitor7, 'Trying to replace statement (Stmt_Expression) with expression (Scalar_LNumber). Are you missing a Stmt_Expression wrapper?'], - [$stmts, $visitor8, 'Trying to replace expression (Scalar_LNumber) with statement (Stmt_Return)'], + [$stmts, $visitor7, 'Trying to replace statement (Stmt_Expression) with expression (Scalar_Int). Are you missing a Stmt_Expression wrapper?'], + [$stmts, $visitor8, 'Trying to replace expression (Scalar_Int) with statement (Stmt_Return)'], ]; } } diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index 32372a8067..86b29ba966 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -336,7 +336,7 @@ public function testAddDeclarationNamespacedName() { new Stmt\Interface_('B'), new Stmt\Function_('C'), new Stmt\Const_([ - new Node\Const_('D', new Node\Scalar\LNumber(42)) + new Node\Const_('D', new Node\Scalar\Int_(42)) ]), new Stmt\Trait_('E'), new Expr\New_(new Stmt\Class_(null)), diff --git a/test/PhpParser/ParserTest.php b/test/PhpParser/ParserTest.php index 91b41257c8..a35b2724ca 100644 --- a/test/PhpParser/ParserTest.php +++ b/test/PhpParser/ParserTest.php @@ -127,15 +127,15 @@ public function testExtraAttributes($code, $expectedAttributes) { public function provideTestExtraAttributes() { return [ - ['0', ['kind' => Scalar\LNumber::KIND_DEC]], - ['9', ['kind' => Scalar\LNumber::KIND_DEC]], - ['07', ['kind' => Scalar\LNumber::KIND_OCT]], - ['0xf', ['kind' => Scalar\LNumber::KIND_HEX]], - ['0XF', ['kind' => Scalar\LNumber::KIND_HEX]], - ['0b1', ['kind' => Scalar\LNumber::KIND_BIN]], - ['0B1', ['kind' => Scalar\LNumber::KIND_BIN]], - ['0o7', ['kind' => Scalar\LNumber::KIND_OCT]], - ['0O7', ['kind' => Scalar\LNumber::KIND_OCT]], + ['0', ['kind' => Scalar\Int_::KIND_DEC]], + ['9', ['kind' => Scalar\Int_::KIND_DEC]], + ['07', ['kind' => Scalar\Int_::KIND_OCT]], + ['0xf', ['kind' => Scalar\Int_::KIND_HEX]], + ['0XF', ['kind' => Scalar\Int_::KIND_HEX]], + ['0b1', ['kind' => Scalar\Int_::KIND_BIN]], + ['0B1', ['kind' => Scalar\Int_::KIND_BIN]], + ['0o7', ['kind' => Scalar\Int_::KIND_OCT]], + ['0O7', ['kind' => Scalar\Int_::KIND_OCT]], ['[]', ['kind' => Expr\Array_::KIND_SHORT]], ['array()', ['kind' => Expr\Array_::KIND_LONG]], ["'foo'", ['kind' => String_::KIND_SINGLE_QUOTED]], diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 86e77605ab..80b1983167 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -7,7 +7,7 @@ use PhpParser\Node\Scalar\Float_; use PhpParser\Node\Scalar\Encapsed; use PhpParser\Node\Scalar\EncapsedStringPart; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; use PhpParser\Parser\Php7; @@ -138,11 +138,11 @@ public function testUnnaturalLiterals($node, $expected) { public function provideTestUnnaturalLiterals() { return [ - [new LNumber(-1), '-1'], - [new LNumber(-PHP_INT_MAX - 1), '(-' . PHP_INT_MAX . '-1)'], - [new LNumber(-1, ['kind' => LNumber::KIND_BIN]), '-0b1'], - [new LNumber(-1, ['kind' => LNumber::KIND_OCT]), '-01'], - [new LNumber(-1, ['kind' => LNumber::KIND_HEX]), '-0x1'], + [new Int_(-1), '-1'], + [new Int_(-PHP_INT_MAX - 1), '(-' . PHP_INT_MAX . '-1)'], + [new Int_(-1, ['kind' => Int_::KIND_BIN]), '-0b1'], + [new Int_(-1, ['kind' => Int_::KIND_OCT]), '-01'], + [new Int_(-1, ['kind' => Int_::KIND_HEX]), '-0x1'], [new Float_(\INF), '\INF'], [new Float_(-\INF), '-\INF'], [new Float_(-\NAN), '\NAN'], diff --git a/test/code/parser/comments.test b/test/code/parser/comments.test index 90b6b1f079..be797fd330 100644 --- a/test/code/parser/comments.test +++ b/test/code/parser/comments.test @@ -93,7 +93,7 @@ if (42) {} ----- array( 0: Stmt_If( - cond: Scalar_LNumber( + cond: Scalar_Int( value: 42 ) stmts: array( diff --git a/test/code/parser/errorHandling/lexerErrors.test b/test/code/parser/errorHandling/lexerErrors.test index 7ff27eb94b..2efcac65b1 100644 --- a/test/code/parser/errorHandling/lexerErrors.test +++ b/test/code/parser/errorHandling/lexerErrors.test @@ -13,7 +13,7 @@ array( var: Expr_Variable( name: a ) - expr: Scalar_LNumber( + expr: Scalar_Int( value: 42 ) ) @@ -40,7 +40,7 @@ array( var: Expr_Variable[3:1 - 3:2]( name: a ) - expr: Scalar_LNumber[3:6 - 3:7]( + expr: Scalar_Int[3:6 - 3:7]( value: 42 ) ) @@ -50,7 +50,7 @@ array( var: Expr_Variable[5:1 - 5:2]( name: b ) - expr: Scalar_LNumber[5:6 - 5:7]( + expr: Scalar_Int[5:6 - 5:7]( value: 24 ) ) @@ -71,7 +71,7 @@ array( var: Expr_Variable[3:1 - 3:2]( name: a ) - expr: Scalar_LNumber[3:6 - 3:7]( + expr: Scalar_Int[3:6 - 3:7]( value: 42 ) ) @@ -81,7 +81,7 @@ array( var: Expr_Variable[5:1 - 5:2]( name: b ) - expr: Scalar_LNumber[5:6 - 5:7]( + expr: Scalar_Int[5:6 - 5:7]( value: 24 ) ) @@ -105,7 +105,7 @@ array( var: Expr_Variable[3:1 - 3:2]( name: a ) - expr: Scalar_LNumber[3:6 - 3:6]( + expr: Scalar_Int[3:6 - 3:6]( value: 1 ) ) @@ -115,7 +115,7 @@ array( var: Expr_Variable[5:1 - 5:2]( name: b ) - expr: Scalar_LNumber[5:6 - 5:6]( + expr: Scalar_Int[5:6 - 5:6]( value: 2 ) ) @@ -125,7 +125,7 @@ array( var: Expr_Variable[7:1 - 7:2]( name: c ) - expr: Scalar_LNumber[7:6 - 7:6]( + expr: Scalar_Int[7:6 - 7:6]( value: 3 ) ) @@ -140,4 +140,4 @@ if ($b) { } ----- Unterminated comment from 5:5 to 6:2 -Syntax error, unexpected EOF from 6:2 to 6:2 \ No newline at end of file +Syntax error, unexpected EOF from 6:2 to 6:2 diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index 1771c76579..7abe0d0964 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -147,7 +147,7 @@ array( ) ) 1: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) @@ -172,7 +172,7 @@ array( returnType: null stmts: array( 0: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) @@ -195,7 +195,7 @@ array( var: Expr_Variable( name: i ) - expr: Scalar_LNumber( + expr: Scalar_Int( value: 0 ) ) @@ -205,7 +205,7 @@ array( var: Expr_Variable( name: j ) - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) @@ -215,7 +215,7 @@ array( var: Expr_Variable( name: k ) - expr: Scalar_LNumber( + expr: Scalar_Int( value: 2 ) ) @@ -238,7 +238,7 @@ array( var: Expr_Variable( name: i ) - expr: Scalar_LNumber( + expr: Scalar_Int( value: 0 ) ) @@ -248,7 +248,7 @@ array( var: Expr_Variable( name: j ) - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) @@ -258,7 +258,7 @@ array( var: Expr_Variable( name: k ) - expr: Scalar_LNumber( + expr: Scalar_Int( value: 2 ) ) @@ -513,7 +513,7 @@ array( name: Identifier( name: A ) - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) ) @@ -523,7 +523,7 @@ array( num: null ) 5: Stmt_Break( - num: Scalar_LNumber( + num: Scalar_Int( value: 2 ) ) @@ -531,7 +531,7 @@ array( num: null ) 7: Stmt_Continue( - num: Scalar_LNumber( + num: Scalar_Int( value: 2 ) ) @@ -539,7 +539,7 @@ array( expr: null ) 9: Stmt_Return( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 2 ) ) @@ -674,7 +674,7 @@ array( name: Identifier( name: A ) - value: Scalar_LNumber( + value: Scalar_Int( value: 42 ) ) @@ -744,7 +744,7 @@ array( name: Identifier( name: A ) - value: Scalar_LNumber( + value: Scalar_Int( value: 42 ) ) @@ -804,7 +804,7 @@ array( key: Identifier( name: a ) - value: Scalar_LNumber( + value: Scalar_Int( value: 42 ) ) @@ -1500,7 +1500,7 @@ array( name: Identifier( name: X ) - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/expr/arrayDef.test b/test/code/parser/expr/arrayDef.test index 98c5adddee..1159627703 100644 --- a/test/code/parser/expr/arrayDef.test +++ b/test/code/parser/expr/arrayDef.test @@ -129,7 +129,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -137,7 +137,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) byRef: false @@ -145,7 +145,7 @@ array( ) 2: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) byRef: false diff --git a/test/code/parser/expr/arrayEmptyElemens.test b/test/code/parser/expr/arrayEmptyElemens.test index 150f4039ee..48e6451d7d 100644 --- a/test/code/parser/expr/arrayEmptyElemens.test +++ b/test/code/parser/expr/arrayEmptyElemens.test @@ -14,7 +14,7 @@ array( items: array( 0: ArrayItem[3:2 - 3:2]( key: null - value: Scalar_LNumber[3:2 - 3:2]( + value: Scalar_Int[3:2 - 3:2]( value: 1 ) byRef: false @@ -29,7 +29,7 @@ array( ) 2: ArrayItem[3:7 - 3:7]( key: null - value: Scalar_LNumber[3:7 - 3:7]( + value: Scalar_Int[3:7 - 3:7]( value: 2 ) byRef: false @@ -43,7 +43,7 @@ array( items: array( 0: ArrayItem[4:7 - 4:7]( key: null - value: Scalar_LNumber[4:7 - 4:7]( + value: Scalar_Int[4:7 - 4:7]( value: 1 ) byRef: false @@ -58,7 +58,7 @@ array( ) 2: ArrayItem[4:12 - 4:12]( key: null - value: Scalar_LNumber[4:12 - 4:12]( + value: Scalar_Int[4:12 - 4:12]( value: 2 ) byRef: false diff --git a/test/code/parser/expr/arraySpread.test b/test/code/parser/expr/arraySpread.test index e5aa67782f..c600440615 100644 --- a/test/code/parser/expr/arraySpread.test +++ b/test/code/parser/expr/arraySpread.test @@ -32,7 +32,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -40,7 +40,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) byRef: false @@ -48,7 +48,7 @@ array( ) 2: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) byRef: false @@ -74,7 +74,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 4 ) byRef: false @@ -82,7 +82,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 5 ) byRef: false @@ -110,7 +110,7 @@ array( var: Expr_Variable( name: i ) - expr: Scalar_LNumber( + expr: Scalar_Int( value: 11 ) ) @@ -120,7 +120,7 @@ array( left: Expr_Variable( name: i ) - right: Scalar_LNumber( + right: Scalar_Int( value: 15 ) ) @@ -169,7 +169,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -177,7 +177,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) byRef: false @@ -185,7 +185,7 @@ array( ) 2: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) byRef: false @@ -311,7 +311,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 0 ) byRef: false @@ -341,7 +341,7 @@ array( ) 3: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 6 ) byRef: false @@ -349,7 +349,7 @@ array( ) 4: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 7 ) byRef: false @@ -357,7 +357,7 @@ array( ) 5: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 8 ) byRef: false @@ -365,7 +365,7 @@ array( ) 6: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 9 ) byRef: false @@ -373,7 +373,7 @@ array( ) 7: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 10 ) byRef: false @@ -401,7 +401,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 0 ) byRef: false diff --git a/test/code/parser/expr/arrow_function.test b/test/code/parser/expr/arrow_function.test index 5b727a622a..47bd8c5580 100644 --- a/test/code/parser/expr/arrow_function.test +++ b/test/code/parser/expr/arrow_function.test @@ -57,7 +57,7 @@ array( var: Expr_Variable( name: x ) - default: Scalar_LNumber( + default: Scalar_Int( value: 42 ) ) diff --git a/test/code/parser/expr/concatPrecedence.test b/test/code/parser/expr/concatPrecedence.test index 21dee622b9..b7a8ce9415 100644 --- a/test/code/parser/expr/concatPrecedence.test +++ b/test/code/parser/expr/concatPrecedence.test @@ -9,18 +9,18 @@ array( 0: Stmt_Expression( expr: Expr_BinaryOp_Concat( left: Expr_BinaryOp_Plus( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 2 ) ) right: Expr_BinaryOp_Plus( - left: Scalar_LNumber( + left: Scalar_Int( value: 3 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 4 ) ) @@ -29,18 +29,18 @@ array( 1: Stmt_Expression( expr: Expr_BinaryOp_Concat( left: Expr_BinaryOp_ShiftLeft( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 2 ) ) right: Expr_BinaryOp_ShiftLeft( - left: Scalar_LNumber( + left: Scalar_Int( value: 3 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 4 ) ) @@ -58,18 +58,18 @@ array( expr: Expr_BinaryOp_Plus( left: Expr_BinaryOp_Concat( left: Expr_BinaryOp_Plus( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 2 ) ) - right: Scalar_LNumber( + right: Scalar_Int( value: 3 ) ) - right: Scalar_LNumber( + right: Scalar_Int( value: 4 ) ) @@ -77,19 +77,19 @@ array( 1: Stmt_Expression( expr: Expr_BinaryOp_ShiftLeft( left: Expr_BinaryOp_ShiftLeft( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) right: Expr_BinaryOp_Concat( - left: Scalar_LNumber( + left: Scalar_Int( value: 2 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 3 ) ) ) - right: Scalar_LNumber( + right: Scalar_Int( value: 4 ) ) diff --git a/test/code/parser/expr/constant_expr.test b/test/code/parser/expr/constant_expr.test index 87cb59aa9a..926ebcbc9f 100644 --- a/test/code/parser/expr/constant_expr.test +++ b/test/code/parser/expr/constant_expr.test @@ -48,10 +48,10 @@ array( name: T_1 ) value: Expr_BinaryOp_ShiftLeft( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 1 ) ) @@ -65,10 +65,10 @@ array( name: T_2 ) value: Expr_BinaryOp_Div( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 2 ) ) @@ -124,7 +124,7 @@ array( value: 1.5 ) ) - right: Scalar_LNumber( + right: Scalar_Int( value: 2 ) ) @@ -143,11 +143,11 @@ array( left: Scalar_String( value: foo ) - right: Scalar_LNumber( + right: Scalar_Int( value: 2 ) ) - right: Scalar_LNumber( + right: Scalar_Int( value: 3 ) ) @@ -189,7 +189,7 @@ array( ) value: Expr_BitwiseNot( expr: Expr_UnaryMinus( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) @@ -206,23 +206,23 @@ array( value: Expr_BinaryOp_Plus( left: Expr_Ternary( cond: Expr_UnaryMinus( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) if: null - else: Scalar_LNumber( + else: Scalar_Int( value: 1 ) ) right: Expr_Ternary( - cond: Scalar_LNumber( + cond: Scalar_Int( value: 0 ) - if: Scalar_LNumber( + if: Scalar_Int( value: 2 ) - else: Scalar_LNumber( + else: Scalar_Int( value: 3 ) ) @@ -237,10 +237,10 @@ array( name: T_11 ) value: Expr_BinaryOp_BooleanAnd( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 0 ) ) @@ -254,10 +254,10 @@ array( name: T_12 ) value: Expr_BinaryOp_LogicalAnd( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 1 ) ) @@ -271,10 +271,10 @@ array( name: T_13 ) value: Expr_BinaryOp_BooleanOr( - left: Scalar_LNumber( + left: Scalar_Int( value: 0 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 0 ) ) @@ -288,10 +288,10 @@ array( name: T_14 ) value: Expr_BinaryOp_LogicalOr( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 0 ) ) @@ -305,10 +305,10 @@ array( name: T_15 ) value: Expr_BinaryOp_LogicalXor( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 1 ) ) @@ -322,10 +322,10 @@ array( name: T_16 ) value: Expr_BinaryOp_LogicalXor( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 0 ) ) @@ -339,10 +339,10 @@ array( name: T_17 ) value: Expr_BinaryOp_Smaller( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 0 ) ) @@ -356,10 +356,10 @@ array( name: T_18 ) value: Expr_BinaryOp_SmallerOrEqual( - left: Scalar_LNumber( + left: Scalar_Int( value: 0 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 0 ) ) @@ -373,10 +373,10 @@ array( name: T_19 ) value: Expr_BinaryOp_Greater( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 0 ) ) @@ -390,10 +390,10 @@ array( name: T_20 ) value: Expr_BinaryOp_GreaterOrEqual( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 0 ) ) @@ -407,10 +407,10 @@ array( name: T_21 ) value: Expr_BinaryOp_Identical( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 1 ) ) @@ -424,10 +424,10 @@ array( name: T_22 ) value: Expr_BinaryOp_NotIdentical( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 1 ) ) @@ -441,7 +441,7 @@ array( name: T_23 ) value: Expr_BinaryOp_NotEqual( - left: Scalar_LNumber( + left: Scalar_Int( value: 0 ) right: Scalar_String( @@ -458,7 +458,7 @@ array( name: T_24 ) value: Expr_BinaryOp_Equal( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) right: Scalar_String( @@ -475,14 +475,14 @@ array( name: T_25 ) value: Expr_BinaryOp_Plus( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) right: Expr_BinaryOp_Mul( - left: Scalar_LNumber( + left: Scalar_Int( value: 2 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 3 ) ) @@ -501,7 +501,7 @@ array( left: Scalar_String( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 2 ) ) @@ -519,10 +519,10 @@ array( name: T_27 ) value: Expr_BinaryOp_Pow( - left: Scalar_LNumber( + left: Scalar_Int( value: 2 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 3 ) ) @@ -540,7 +540,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -548,7 +548,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) byRef: false @@ -556,7 +556,7 @@ array( ) 2: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) byRef: false @@ -564,7 +564,7 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 1 ) ) @@ -578,10 +578,10 @@ array( name: T_29 ) value: Expr_BinaryOp_Minus( - left: Scalar_LNumber( + left: Scalar_Int( value: 12 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 13 ) ) @@ -595,10 +595,10 @@ array( name: T_30 ) value: Expr_BinaryOp_BitwiseXor( - left: Scalar_LNumber( + left: Scalar_Int( value: 12 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 13 ) ) @@ -612,10 +612,10 @@ array( name: T_31 ) value: Expr_BinaryOp_BitwiseAnd( - left: Scalar_LNumber( + left: Scalar_Int( value: 12 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 13 ) ) @@ -629,10 +629,10 @@ array( name: T_32 ) value: Expr_BinaryOp_BitwiseOr( - left: Scalar_LNumber( + left: Scalar_Int( value: 12 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 13 ) ) @@ -646,10 +646,10 @@ array( name: T_33 ) value: Expr_BinaryOp_Mod( - left: Scalar_LNumber( + left: Scalar_Int( value: 12 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 3 ) ) @@ -663,10 +663,10 @@ array( name: T_34 ) value: Expr_BinaryOp_ShiftRight( - left: Scalar_LNumber( + left: Scalar_Int( value: 100 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 4 ) ) diff --git a/test/code/parser/expr/exprInIsset.test b/test/code/parser/expr/exprInIsset.test index 0d057849be..43e78b4b02 100644 --- a/test/code/parser/expr/exprInIsset.test +++ b/test/code/parser/expr/exprInIsset.test @@ -29,10 +29,10 @@ array( expr: Expr_Isset( vars: array( 0: Expr_BinaryOp_Plus( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/expr/exprInList.test b/test/code/parser/expr/exprInList.test index 682b0972a7..1916074caa 100644 --- a/test/code/parser/expr/exprInList.test +++ b/test/code/parser/expr/exprInList.test @@ -51,10 +51,10 @@ array( 0: ArrayItem( key: null value: Expr_BinaryOp_Plus( - left: Scalar_LNumber( + left: Scalar_Int( value: 1 ) - right: Scalar_LNumber( + right: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/expr/fetchAndCall/constantDeref.test b/test/code/parser/expr/fetchAndCall/constantDeref.test index 5959726da9..b13349ac0c 100644 --- a/test/code/parser/expr/fetchAndCall/constantDeref.test +++ b/test/code/parser/expr/fetchAndCall/constantDeref.test @@ -21,7 +21,7 @@ array( var: Scalar_String( value: abc ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 2 ) ) @@ -33,15 +33,15 @@ array( var: Scalar_String( value: abc ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 2 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) @@ -52,7 +52,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -60,7 +60,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) byRef: false @@ -68,7 +68,7 @@ array( ) 2: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) byRef: false @@ -76,7 +76,7 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 2 ) ) @@ -89,7 +89,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -97,7 +97,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) byRef: false @@ -105,7 +105,7 @@ array( ) 2: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) byRef: false @@ -113,15 +113,15 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 2 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) @@ -132,7 +132,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -140,7 +140,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) byRef: false @@ -148,7 +148,7 @@ array( ) 2: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) byRef: false @@ -156,7 +156,7 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 2 ) ) @@ -169,7 +169,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -177,7 +177,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) byRef: false @@ -185,7 +185,7 @@ array( ) 2: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) byRef: false @@ -193,15 +193,15 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 2 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) @@ -215,7 +215,7 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) @@ -232,7 +232,7 @@ array( name: BAR ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 1 ) ) @@ -249,15 +249,15 @@ array( name: BAR ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 2 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 1 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) diff --git a/test/code/parser/expr/fetchAndCall/namedArgs.test b/test/code/parser/expr/fetchAndCall/namedArgs.test index 882de11213..1d75cf2dcd 100644 --- a/test/code/parser/expr/fetchAndCall/namedArgs.test +++ b/test/code/parser/expr/fetchAndCall/namedArgs.test @@ -48,7 +48,7 @@ array( name: Identifier( name: class ) - value: Scalar_LNumber( + value: Scalar_Int( value: 0 ) byRef: false diff --git a/test/code/parser/expr/issetAndEmpty.test b/test/code/parser/expr/issetAndEmpty.test index cd0e869c79..3db32c3d13 100644 --- a/test/code/parser/expr/issetAndEmpty.test +++ b/test/code/parser/expr/issetAndEmpty.test @@ -59,7 +59,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -67,7 +67,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) byRef: false @@ -75,7 +75,7 @@ array( ) 2: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) byRef: false diff --git a/test/code/parser/expr/match.test b/test/code/parser/expr/match.test index 1d513629b9..364701ebdc 100644 --- a/test/code/parser/expr/match.test +++ b/test/code/parser/expr/match.test @@ -11,13 +11,13 @@ array( 0: Stmt_Echo( exprs: array( 0: Expr_Match( - cond: Scalar_LNumber( + cond: Scalar_Int( value: 1 ) arms: array( 0: MatchArm( conds: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 0 ) ) @@ -27,7 +27,7 @@ array( ) 1: MatchArm( conds: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 1 ) ) @@ -55,19 +55,19 @@ array( name: value ) expr: Expr_Match( - cond: Scalar_LNumber( + cond: Scalar_Int( value: 1 ) arms: array( 0: MatchArm( conds: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 0 comments: array( 0: // list of conditions ) ) - 1: Scalar_LNumber( + 1: Scalar_Int( value: 1 ) ) @@ -149,7 +149,7 @@ array( arms: array( 0: MatchArm( conds: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 1 ) ) @@ -183,16 +183,16 @@ array( name: value ) expr: Expr_Match( - cond: Scalar_LNumber( + cond: Scalar_Int( value: 1 ) arms: array( 0: MatchArm( conds: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 0 ) - 1: Scalar_LNumber( + 1: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/expr/uvs/constDeref.test b/test/code/parser/expr/uvs/constDeref.test index 6d2ca32dce..03f67175cd 100644 --- a/test/code/parser/expr/uvs/constDeref.test +++ b/test/code/parser/expr/uvs/constDeref.test @@ -61,7 +61,7 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) @@ -77,15 +77,15 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 1 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 2 ) ) @@ -99,7 +99,7 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) @@ -116,7 +116,7 @@ array( name: B ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) @@ -135,15 +135,15 @@ array( name: B ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 1 ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 2 ) ) @@ -160,7 +160,7 @@ array( name: B ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) @@ -258,7 +258,7 @@ array( expr: Expr_ArrayDimFetch( var: Scalar_MagicConst_Function( ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) diff --git a/test/code/parser/expr/uvs/indirectCall.test b/test/code/parser/expr/uvs/indirectCall.test index 5515cfdd66..7168b4e7d3 100644 --- a/test/code/parser/expr/uvs/indirectCall.test +++ b/test/code/parser/expr/uvs/indirectCall.test @@ -38,7 +38,7 @@ array( args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -81,7 +81,7 @@ array( args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) byRef: false @@ -120,7 +120,7 @@ array( args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 4 ) byRef: false @@ -168,7 +168,7 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 1 ) ) @@ -189,7 +189,7 @@ array( args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 5 ) byRef: false @@ -257,7 +257,7 @@ array( args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 8 ) byRef: false @@ -348,7 +348,7 @@ array( args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 9 ) byRef: false @@ -422,7 +422,7 @@ array( args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 10 ) byRef: false @@ -467,7 +467,7 @@ array( args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 12 ) byRef: false @@ -505,7 +505,7 @@ array( args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 13 ) byRef: false @@ -534,7 +534,7 @@ array( args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 14 ) byRef: false diff --git a/test/code/parser/expr/uvs/isset.test b/test/code/parser/expr/uvs/isset.test index e198de0b0c..9757d6a4e9 100644 --- a/test/code/parser/expr/uvs/isset.test +++ b/test/code/parser/expr/uvs/isset.test @@ -16,7 +16,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 0 ) byRef: false @@ -24,7 +24,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -37,7 +37,7 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) diff --git a/test/code/parser/expr/uvs/misc.test b/test/code/parser/expr/uvs/misc.test index c31925cdd9..bcb4f2d88e 100644 --- a/test/code/parser/expr/uvs/misc.test +++ b/test/code/parser/expr/uvs/misc.test @@ -33,7 +33,7 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) @@ -70,14 +70,14 @@ array( name: b ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -93,7 +93,7 @@ array( items: array( 0: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 0 ) byRef: false @@ -101,7 +101,7 @@ array( ) 1: ArrayItem( key: null - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -109,11 +109,11 @@ array( ) ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/expr/uvs/new.test b/test/code/parser/expr/uvs/new.test index ba2325bae7..0d93615ebf 100644 --- a/test/code/parser/expr/uvs/new.test +++ b/test/code/parser/expr/uvs/new.test @@ -99,7 +99,7 @@ array( var: Expr_Variable( name: weird ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) diff --git a/test/code/parser/expr/uvs/staticProperty.test b/test/code/parser/expr/uvs/staticProperty.test index 97e7e28ee9..96c61a612c 100644 --- a/test/code/parser/expr/uvs/staticProperty.test +++ b/test/code/parser/expr/uvs/staticProperty.test @@ -64,7 +64,7 @@ array( var: Scalar_String( value: A ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) @@ -97,7 +97,7 @@ array( name: c ) ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/scalar/encapsedNegVarOffset.test b/test/code/parser/scalar/encapsedNegVarOffset.test index b5be51d547..82c9362956 100644 --- a/test/code/parser/scalar/encapsedNegVarOffset.test +++ b/test/code/parser/scalar/encapsedNegVarOffset.test @@ -29,7 +29,7 @@ array( var: Expr_Variable( name: a ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: -1 ) ) @@ -71,11 +71,11 @@ array( var: Expr_Variable( name: a ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: @@{ -PHP_INT_MAX - 1 }@@ ) ) ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/scalar/encapsedString.test b/test/code/parser/scalar/encapsedString.test index 57be611ee0..31f0f4b7be 100644 --- a/test/code/parser/scalar/encapsedString.test +++ b/test/code/parser/scalar/encapsedString.test @@ -72,7 +72,7 @@ array( var: Expr_Variable( name: A ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 0 ) ) @@ -86,7 +86,7 @@ array( var: Expr_Variable( name: A ) - dim: Scalar_LNumber( + dim: Scalar_Int( value: 1234 ) ) diff --git a/test/code/parser/scalar/explicitOctal.test b/test/code/parser/scalar/explicitOctal.test index b880f9e7b3..b3c9aa2980 100644 --- a/test/code/parser/scalar/explicitOctal.test +++ b/test/code/parser/scalar/explicitOctal.test @@ -8,17 +8,17 @@ Explicit octal syntax ----- array( 0: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 83 ) ) 1: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 83 ) ) 2: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 83 ) ) diff --git a/test/code/parser/scalar/int.test b/test/code/parser/scalar/int.test index ee9eb7ab2d..12081e93b6 100644 --- a/test/code/parser/scalar/int.test +++ b/test/code/parser/scalar/int.test @@ -14,17 +14,17 @@ Different integer syntaxes ----- array( 0: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 0 ) ) 1: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) 2: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: @@{ PHP_INT_MAX }@@ ) ) @@ -34,27 +34,27 @@ array( ) ) 4: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 4095 ) ) 5: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 4095 ) ) 6: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 4095 ) ) 7: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 511 ) ) 8: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 3640 ) ) diff --git a/test/code/parser/scalar/invalidOctal.test b/test/code/parser/scalar/invalidOctal.test index 291c13f352..0416048747 100644 --- a/test/code/parser/scalar/invalidOctal.test +++ b/test/code/parser/scalar/invalidOctal.test @@ -7,7 +7,7 @@ Invalid octal literals Invalid numeric literal from 2:1 to 2:4 array( 0: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 0 ) ) @@ -19,7 +19,7 @@ array( !!version=5.6 array( 0: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 7 ) ) diff --git a/test/code/parser/scalar/numberSeparators.test b/test/code/parser/scalar/numberSeparators.test index be944f9f6e..3de89ae6aa 100644 --- a/test/code/parser/scalar/numberSeparators.test +++ b/test/code/parser/scalar/numberSeparators.test @@ -36,22 +36,22 @@ array( ) ) 1: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 299792458 ) ) 2: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 3405705229 ) ) 3: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 95 ) ) 4: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 48673 ) ) @@ -74,7 +74,7 @@ array( ) ) 6: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 100 comments: array( 0: // syntax errors @@ -94,7 +94,7 @@ array( ) ) 8: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) @@ -108,7 +108,7 @@ array( ) ) 10: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) @@ -141,7 +141,7 @@ array( ) ) 15: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 0 ) ) @@ -155,7 +155,7 @@ array( ) ) 17: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 0 ) ) @@ -169,7 +169,7 @@ array( ) ) 19: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) @@ -183,7 +183,7 @@ array( ) ) 21: Stmt_Expression( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/semiReserved.test b/test/code/parser/semiReserved.test index 1d76d56bc7..de914bdd6a 100644 --- a/test/code/parser/semiReserved.test +++ b/test/code/parser/semiReserved.test @@ -157,7 +157,7 @@ array( name: Identifier( name: TRAIT ) - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) ) @@ -165,7 +165,7 @@ array( name: Identifier( name: FINAL ) - value: Scalar_LNumber( + value: Scalar_Int( value: 4 ) ) @@ -180,7 +180,7 @@ array( name: Identifier( name: __CLASS__ ) - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) ) @@ -188,7 +188,7 @@ array( name: Identifier( name: __TRAIT__ ) - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) ) @@ -196,7 +196,7 @@ array( name: Identifier( name: __FUNCTION__ ) - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) ) @@ -204,7 +204,7 @@ array( name: Identifier( name: __METHOD__ ) - value: Scalar_LNumber( + value: Scalar_Int( value: 4 ) ) @@ -212,7 +212,7 @@ array( name: Identifier( name: __LINE__ ) - value: Scalar_LNumber( + value: Scalar_Int( value: 5 ) ) @@ -220,7 +220,7 @@ array( name: Identifier( name: __FILE__ ) - value: Scalar_LNumber( + value: Scalar_Int( value: 6 ) ) @@ -228,7 +228,7 @@ array( name: Identifier( name: __DIR__ ) - value: Scalar_LNumber( + value: Scalar_Int( value: 7 ) ) @@ -236,7 +236,7 @@ array( name: Identifier( name: __NAMESPACE__ ) - value: Scalar_LNumber( + value: Scalar_Int( value: 8 ) ) diff --git a/test/code/parser/stmt/attributes.test b/test/code/parser/stmt/attributes.test index d3ec85731d..0198af979d 100644 --- a/test/code/parser/stmt/attributes.test +++ b/test/code/parser/stmt/attributes.test @@ -63,7 +63,7 @@ array( args: array( 0: Arg( name: null - value: Scalar_LNumber( + value: Scalar_Int( value: 0 ) byRef: false @@ -82,7 +82,7 @@ array( name: Identifier( name: x ) - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) byRef: false @@ -313,7 +313,7 @@ array( params: array( ) returnType: null - expr: Scalar_LNumber( + expr: Scalar_Int( value: 0 ) ) @@ -378,7 +378,7 @@ array( params: array( ) returnType: null - expr: Scalar_LNumber( + expr: Scalar_Int( value: 0 ) ) diff --git a/test/code/parser/stmt/class/class_position.test b/test/code/parser/stmt/class/class_position.test index f90ad9df14..82991499f3 100644 --- a/test/code/parser/stmt/class/class_position.test +++ b/test/code/parser/stmt/class/class_position.test @@ -9,7 +9,7 @@ class C {} !!positions array( 0: Stmt_If[3:1 - 3:7]( - cond: Scalar_LNumber[3:5 - 3:5]( + cond: Scalar_Int[3:5 - 3:5]( value: 1 ) stmts: array( @@ -42,7 +42,7 @@ trait X {} !!positions array( 0: Stmt_If[3:1 - 3:7]( - cond: Scalar_LNumber[3:5 - 3:5]( + cond: Scalar_Int[3:5 - 3:5]( value: 1 ) stmts: array( @@ -71,7 +71,7 @@ interface X {} !!positions array( 0: Stmt_If[3:1 - 3:7]( - cond: Scalar_LNumber[3:5 - 3:5]( + cond: Scalar_Int[3:5 - 3:5]( value: 1 ) stmts: array( diff --git a/test/code/parser/stmt/class/constModifierErrors.test b/test/code/parser/stmt/class/constModifierErrors.test index 7b6132a385..c810bfb8a2 100644 --- a/test/code/parser/stmt/class/constModifierErrors.test +++ b/test/code/parser/stmt/class/constModifierErrors.test @@ -27,7 +27,7 @@ array( name: Identifier( name: X ) - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) ) @@ -64,7 +64,7 @@ array( name: Identifier( name: X ) - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) ) @@ -101,7 +101,7 @@ array( name: Identifier( name: X ) - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) ) @@ -138,7 +138,7 @@ array( name: Identifier( name: X ) - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/stmt/class/constModifiers.test b/test/code/parser/stmt/class/constModifiers.test index e7afdaed1d..6a16ca32c3 100644 --- a/test/code/parser/stmt/class/constModifiers.test +++ b/test/code/parser/stmt/class/constModifiers.test @@ -31,7 +31,7 @@ array( name: Identifier( name: A ) - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) ) @@ -46,7 +46,7 @@ array( name: Identifier( name: B ) - value: Scalar_LNumber( + value: Scalar_Int( value: 2 ) ) @@ -61,7 +61,7 @@ array( name: Identifier( name: C ) - value: Scalar_LNumber( + value: Scalar_Int( value: 3 ) ) @@ -76,7 +76,7 @@ array( name: Identifier( name: D ) - value: Scalar_LNumber( + value: Scalar_Int( value: 4 ) ) @@ -91,7 +91,7 @@ array( name: Identifier( name: E ) - value: Scalar_LNumber( + value: Scalar_Int( value: 5 ) ) diff --git a/test/code/parser/stmt/class/enum.test b/test/code/parser/stmt/class/enum.test index 731da9697b..dfc765226b 100644 --- a/test/code/parser/stmt/class/enum.test +++ b/test/code/parser/stmt/class/enum.test @@ -77,7 +77,7 @@ array( name: Identifier( name: Foo ) - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/stmt/class/property_promotion.test b/test/code/parser/stmt/class/property_promotion.test index c9b397bc97..467943b738 100644 --- a/test/code/parser/stmt/class/property_promotion.test +++ b/test/code/parser/stmt/class/property_promotion.test @@ -93,7 +93,7 @@ array( var: Expr_Variable( name: a ) - default: Scalar_LNumber( + default: Scalar_Int( value: 0 ) ) diff --git a/test/code/parser/stmt/const.test b/test/code/parser/stmt/const.test index 4d2d418502..2e7a1ce2bd 100644 --- a/test/code/parser/stmt/const.test +++ b/test/code/parser/stmt/const.test @@ -11,7 +11,7 @@ array( name: Identifier( name: A ) - value: Scalar_LNumber( + value: Scalar_Int( value: 0 ) ) diff --git a/test/code/parser/stmt/controlFlow.test b/test/code/parser/stmt/controlFlow.test index d9c9fcf353..94184f8f90 100644 --- a/test/code/parser/stmt/controlFlow.test +++ b/test/code/parser/stmt/controlFlow.test @@ -21,7 +21,7 @@ array( num: null ) 1: Stmt_Break( - num: Scalar_LNumber( + num: Scalar_Int( value: 2 ) ) @@ -29,7 +29,7 @@ array( num: null ) 3: Stmt_Continue( - num: Scalar_LNumber( + num: Scalar_Int( value: 2 ) ) diff --git a/test/code/parser/stmt/function/defaultValues.test b/test/code/parser/stmt/function/defaultValues.test index a66080abe5..a87057c990 100644 --- a/test/code/parser/stmt/function/defaultValues.test +++ b/test/code/parser/stmt/function/defaultValues.test @@ -87,7 +87,7 @@ array( name: f ) default: Expr_UnaryPlus( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/stmt/generator/yieldUnaryPrecedence.test b/test/code/parser/stmt/generator/yieldUnaryPrecedence.test index ed78bca51e..e4759abe0c 100644 --- a/test/code/parser/stmt/generator/yieldUnaryPrecedence.test +++ b/test/code/parser/stmt/generator/yieldUnaryPrecedence.test @@ -24,7 +24,7 @@ array( expr: Expr_Yield( key: null value: Expr_UnaryPlus( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) @@ -34,7 +34,7 @@ array( expr: Expr_Yield( key: null value: Expr_UnaryMinus( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) @@ -47,7 +47,7 @@ array( value: null ) right: Expr_UnaryMinus( - expr: Scalar_LNumber( + expr: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/stmt/loop/for.test b/test/code/parser/stmt/loop/for.test index c942d311e6..5d5edc26a9 100644 --- a/test/code/parser/stmt/loop/for.test +++ b/test/code/parser/stmt/loop/for.test @@ -22,7 +22,7 @@ array( var: Expr_Variable( name: i ) - expr: Scalar_LNumber( + expr: Scalar_Int( value: 0 ) ) diff --git a/test/code/parser/stmt/namespace/mix.test b/test/code/parser/stmt/namespace/mix.test index 0fbfbf4241..f11b8a1e1f 100644 --- a/test/code/parser/stmt/namespace/mix.test +++ b/test/code/parser/stmt/namespace/mix.test @@ -19,7 +19,7 @@ array( stmts: array( 0: Stmt_Echo( exprs: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 1 ) ) @@ -35,7 +35,7 @@ array( stmts: array( 0: Stmt_Echo( exprs: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 2 ) ) @@ -44,7 +44,7 @@ array( ) 2: Stmt_Echo( exprs: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 3 ) ) @@ -70,7 +70,7 @@ array( stmts: array( 0: Stmt_Echo( exprs: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 1 ) ) @@ -79,7 +79,7 @@ array( ) 1: Stmt_Echo( exprs: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 2 ) ) @@ -93,7 +93,7 @@ array( stmts: array( 0: Stmt_Echo( exprs: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 3 ) ) diff --git a/test/code/parser/stmt/namespace/outsideStmtInvalid.test b/test/code/parser/stmt/namespace/outsideStmtInvalid.test index 85bd180818..f6ac59811b 100644 --- a/test/code/parser/stmt/namespace/outsideStmtInvalid.test +++ b/test/code/parser/stmt/namespace/outsideStmtInvalid.test @@ -9,14 +9,14 @@ Namespace declaration statement has to be the very first statement in the script array( 0: Stmt_Echo( exprs: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 1 ) ) ) 1: Stmt_Echo( exprs: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 2 ) ) @@ -49,7 +49,7 @@ array( ) 1: Stmt_Echo( exprs: array( - 0: Scalar_LNumber( + 0: Scalar_Int( value: 1 ) ) @@ -79,7 +79,7 @@ array( key: Identifier( name: ticks ) - value: Scalar_LNumber( + value: Scalar_Int( value: 1 ) ) diff --git a/test/code/parser/stmt/switch.test b/test/code/parser/stmt/switch.test index fc24508e1b..8316b52c72 100644 --- a/test/code/parser/stmt/switch.test +++ b/test/code/parser/stmt/switch.test @@ -25,7 +25,7 @@ array( ) cases: array( 0: Stmt_Case( - cond: Scalar_LNumber( + cond: Scalar_Int( value: 0 ) stmts: array( @@ -35,7 +35,7 @@ array( ) ) 1: Stmt_Case( - cond: Scalar_LNumber( + cond: Scalar_Int( value: 1 ) stmts: array( From f4ec6a1e53994b4ecfae574f06e31087d06057ea Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 13:25:23 +0200 Subject: [PATCH 139/428] Rename Scalar\EncapsedStringPart to InterpolatedStringPart It is no longer an expression node, which unfortunately does require a more awkward type for the Encaps node. --- UPGRADE-5.0.md | 2 ++ grammar/php.y | 4 +-- grammar/phpyLang.php | 2 +- ...ingPart.php => InterpolatedStringPart.php} | 10 +++---- lib/PhpParser/Node/Scalar/Encapsed.php | 9 +++--- lib/PhpParser/Parser/Php7.php | 8 +++--- lib/PhpParser/Parser/Php8.php | 8 +++--- lib/PhpParser/ParserAbstract.php | 4 +-- lib/PhpParser/PrettyPrinter/Standard.php | 10 ++----- lib/PhpParser/PrettyPrinterAbstract.php | 2 +- test/PhpParser/PrettyPrinterTest.php | 28 +++++++------------ test/code/parser/expr/shellExec.test | 8 +++--- test/code/parser/expr/uvs/misc.test | 4 +-- test/code/parser/scalar/docString.test | 8 +++--- .../code/parser/scalar/docStringNewlines.test | 6 ++-- test/code/parser/scalar/encapsedString.test | 22 +++++++-------- .../code/parser/scalar/flexibleDocString.test | 28 +++++++++---------- .../scalar/flexibleDocStringErrors.test | 6 ++-- 18 files changed, 80 insertions(+), 89 deletions(-) rename lib/PhpParser/Node/{Scalar/EncapsedStringPart.php => InterpolatedStringPart.php} (68%) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 123cb83a32..878d117083 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -77,6 +77,8 @@ A number of AST nodes have been renamed or moved in the AST hierarchy: * `Node\Scalar\LNumber` is now `Node\Scalar\Int_`. * `Node\Scalar\DNumber` is now `Node\Scalar\Float_`. + * `Node\Scalar\EncapsedStringPart` is now `Node\InterpolatedStringPart` and no longer extends + `Node\Scalar` or `Node\Expr`. * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. * `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`. * `Node\Stmt\StaticVar` is now `Node\StaticVar` and no longer extends `Node\Stmt`. diff --git a/grammar/php.y b/grammar/php.y index c9b66f5ae6..af75f826a0 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1127,7 +1127,7 @@ exit_expr: backticks_expr: /* empty */ { $$ = array(); } | T_ENCAPSED_AND_WHITESPACE - { $$ = array(Scalar\EncapsedStringPart[Scalar\String_::parseEscapeSequences($1, '`')]); } + { $$ = array(Node\InterpolatedStringPart[Scalar\String_::parseEscapeSequences($1, '`')]); } | encaps_list { parseEncapsed($1, '`', true); $$ = $1; } ; @@ -1325,7 +1325,7 @@ encaps_list: ; encaps_string_part: - T_ENCAPSED_AND_WHITESPACE { $$ = Scalar\EncapsedStringPart[$1]; } + T_ENCAPSED_AND_WHITESPACE { $$ = Node\InterpolatedStringPart[$1]; } ; encaps_str_varname: diff --git a/grammar/phpyLang.php b/grammar/phpyLang.php index 4c4382e227..7a41639601 100644 --- a/grammar/phpyLang.php +++ b/grammar/phpyLang.php @@ -106,7 +106,7 @@ function ($matches) { if ('parseEncapsed' === $name) { assertArgs(3, $args, $name); - return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) {' + return 'foreach (' . $args[0] . ' as $s) { if ($s instanceof Node\InterpolatedStringPart) {' . ' $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, ' . $args[1] . ', ' . $args[2] . '); } }'; } diff --git a/lib/PhpParser/Node/Scalar/EncapsedStringPart.php b/lib/PhpParser/Node/InterpolatedStringPart.php similarity index 68% rename from lib/PhpParser/Node/Scalar/EncapsedStringPart.php rename to lib/PhpParser/Node/InterpolatedStringPart.php index 46530b06f4..0d6f0abddb 100644 --- a/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +++ b/lib/PhpParser/Node/InterpolatedStringPart.php @@ -1,15 +1,15 @@ attributes = $attributes; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 15f657cfe0..f881497f24 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2707,10 +2707,10 @@ protected function initReduceCallbacks() { $this->semValue = array(); }, 505 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 506 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 507 => function ($stackPos) { $this->semValue = array(); @@ -2768,7 +2768,7 @@ protected function initReduceCallbacks() { }, 524 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); }, 525 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); @@ -2982,7 +2982,7 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 594 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 595 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index b9ba351635..90370cc59a 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2725,10 +2725,10 @@ protected function initReduceCallbacks() { $this->semValue = array(); }, 505 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 506 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 507 => function ($stackPos) { $this->semValue = array(); @@ -2786,7 +2786,7 @@ protected function initReduceCallbacks() { }, 524 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$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[$stackPos-(3-2)], $attrs); + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); }, 525 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); @@ -3000,7 +3000,7 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 594 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 595 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index eeb06406c5..4b59f08332 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -777,7 +777,7 @@ protected function parseDocString( return new String_($contents, $attributes); } else { assert(count($contents) > 0); - if (!$contents[0] instanceof Node\Scalar\EncapsedStringPart) { + if (!$contents[0] instanceof Node\InterpolatedStringPart) { // If there is no leading encapsed string part, pretend there is an empty one $this->stripIndentation( '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes() @@ -786,7 +786,7 @@ protected function parseDocString( $newContents = []; foreach ($contents as $i => $part) { - if ($part instanceof Node\Scalar\EncapsedStringPart) { + if ($part instanceof Node\InterpolatedStringPart) { $isLast = $i === \count($contents) - 1; $part->value = $this->stripIndentation( $part->value, $indentLen, $indentChar, diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index f704d26412..ae8c31bced 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -168,7 +168,7 @@ protected function pScalar_Encapsed(Scalar\Encapsed $node) { $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] instanceof Node\InterpolatedStringPart && $node->parts[0]->value === '' ) { return "<<<$label\n$label" . $this->docStringEndToken; @@ -238,10 +238,6 @@ protected function pScalar_Float(Scalar\Float_ $node) { return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue; } - protected function pScalar_EncapsedStringPart(Scalar\EncapsedStringPart $node) { - throw new \LogicException('Cannot directly print EncapsedStringPart'); - } - // Assignments protected function pExpr_Assign(Expr\Assign $node) { @@ -1001,7 +997,7 @@ protected function pObjectProperty($node) { protected function pEncapsList(array $encapsList, $quote) { $return = ''; foreach ($encapsList as $element) { - if ($element instanceof Scalar\EncapsedStringPart) { + if ($element instanceof Node\InterpolatedStringPart) { $return .= $this->escapeString($element->value, $quote); } else { $return .= '{' . $this->p($element) . '}'; @@ -1064,7 +1060,7 @@ protected function encapsedContainsEndLabel(array $parts, $label) { foreach ($parts as $i => $part) { $atStart = $i === 0; $atEnd = $i === count($parts) - 1; - if ($part instanceof Scalar\EncapsedStringPart + if ($part instanceof Node\InterpolatedStringPart && $this->containsEndLabel($part->value, $label, $atStart, $atEnd) ) { return true; diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 9721155024..60901fac35 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -975,7 +975,7 @@ protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $ } break; case self::FIXUP_ENCAPSED: - if (!$subNode instanceof Scalar\EncapsedStringPart + if (!$subNode instanceof Node\InterpolatedStringPart && !$this->origTokens->haveBraces($subStartPos, $subEndPos) ) { return '{' . $this->p($subNode) . '}'; diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 80b1983167..0cf0c06f57 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -6,7 +6,7 @@ use PhpParser\Node\Name; use PhpParser\Node\Scalar\Float_; use PhpParser\Node\Scalar\Encapsed; -use PhpParser\Node\Scalar\EncapsedStringPart; +use PhpParser\Node\InterpolatedStringPart; use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; @@ -115,17 +115,17 @@ public function provideTestKindAttributes() { // Empty doc string variations (encapsed variant does not occur naturally) [new String_("", $nowdoc), "<<<'STR'\nSTR\n"], [new String_("", $heredoc), "<<prettyPrint($stmts); } - public function testPrettyPrintEncapsedStringPart() { - $this->expectException(\LogicException::class); - $this->expectExceptionMessage('Cannot directly print EncapsedStringPart'); - $expr = new Node\Scalar\EncapsedStringPart('foo'); - $prettyPrinter = new PrettyPrinter\Standard(); - $prettyPrinter->prettyPrintExpr($expr); - } - /** * @dataProvider provideTestFormatPreservingPrint * @covers \PhpParser\PrettyPrinter\Standard diff --git a/test/code/parser/expr/shellExec.test b/test/code/parser/expr/shellExec.test index 115d9f0a36..ccb110e444 100644 --- a/test/code/parser/expr/shellExec.test +++ b/test/code/parser/expr/shellExec.test @@ -17,7 +17,7 @@ array( 1: Stmt_Expression( expr: Expr_ShellExec( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: test ) ) @@ -26,7 +26,7 @@ array( 2: Stmt_Expression( expr: Expr_ShellExec( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: test ) 1: Expr_Variable( @@ -38,7 +38,7 @@ array( 3: Stmt_Expression( expr: Expr_ShellExec( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: test ` ) ) @@ -47,7 +47,7 @@ array( 4: Stmt_Expression( expr: Expr_ShellExec( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: test \" ) ) diff --git a/test/code/parser/expr/uvs/misc.test b/test/code/parser/expr/uvs/misc.test index bcb4f2d88e..bc22061ed6 100644 --- a/test/code/parser/expr/uvs/misc.test +++ b/test/code/parser/expr/uvs/misc.test @@ -25,7 +25,7 @@ array( expr: Expr_ArrayDimFetch( var: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: foo ) 1: Expr_Variable( @@ -42,7 +42,7 @@ array( expr: Expr_MethodCall( var: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: foo ) 1: Expr_Variable( diff --git a/test/code/parser/scalar/docString.test b/test/code/parser/scalar/docString.test index 2775be75fd..2b95e82d0e 100644 --- a/test/code/parser/scalar/docString.test +++ b/test/code/parser/scalar/docString.test @@ -66,7 +66,7 @@ array( 4: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: Test ) 1: Expr_Variable( @@ -84,13 +84,13 @@ array( 5: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: Test ) 1: Expr_Variable( name: a ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: and ) 3: Expr_PropertyFetch( @@ -101,7 +101,7 @@ array( name: c ) ) - 4: Scalar_EncapsedStringPart( + 4: InterpolatedStringPart( value: test ) ) diff --git a/test/code/parser/scalar/docStringNewlines.test b/test/code/parser/scalar/docStringNewlines.test index 9eae2338f0..db65de8aff 100644 --- a/test/code/parser/scalar/docStringNewlines.test +++ b/test/code/parser/scalar/docStringNewlines.test @@ -37,7 +37,7 @@ array( 0: Expr_Variable( name: var ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: ) @@ -67,11 +67,11 @@ array( 0: Expr_Variable( name: var ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: ) ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/scalar/encapsedString.test b/test/code/parser/scalar/encapsedString.test index 31f0f4b7be..28c55bbe6f 100644 --- a/test/code/parser/scalar/encapsedString.test +++ b/test/code/parser/scalar/encapsedString.test @@ -223,13 +223,13 @@ array( 15: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: \{ ) 1: Expr_Variable( name: A ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: } ) ) @@ -238,13 +238,13 @@ array( 16: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: \{ ) 1: Expr_Variable( name: A ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: } ) ) @@ -253,7 +253,7 @@ array( 17: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: \ ) 1: Expr_Variable( @@ -265,13 +265,13 @@ array( 18: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: \{ ) 1: Expr_Variable( name: A ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: } ) ) @@ -285,7 +285,7 @@ array( name: A ) ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: [B] ) ) @@ -294,7 +294,7 @@ array( 20: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: $ ) 1: Expr_ArrayDimFetch( @@ -311,13 +311,13 @@ array( 21: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: A ) 1: Expr_Variable( name: B ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: C ) ) diff --git a/test/code/parser/scalar/flexibleDocString.test b/test/code/parser/scalar/flexibleDocString.test index 251308d31e..100d0f41b3 100644 --- a/test/code/parser/scalar/flexibleDocString.test +++ b/test/code/parser/scalar/flexibleDocString.test @@ -166,7 +166,7 @@ array( 5: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: a b @@ -174,7 +174,7 @@ array( 1: Expr_Variable( name: test ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: d e @@ -200,7 +200,7 @@ array( 7: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: a @@{ "\t" }@@a @@ -212,7 +212,7 @@ array( 1: Expr_Variable( name: test ) - 2: Scalar_EncapsedStringPart( + 2: InterpolatedStringPart( value: d @@ -229,7 +229,7 @@ array( 0: Expr_Variable( name: one ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) ) @@ -241,7 +241,7 @@ array( 0: Expr_Variable( name: two ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) ) @@ -253,7 +253,7 @@ array( 0: Expr_Variable( name: three ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) ) @@ -265,7 +265,7 @@ array( 0: Expr_Variable( name: four ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) 2: Expr_Variable( @@ -280,13 +280,13 @@ array( 0: Expr_Variable( name: five ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) 2: Expr_Variable( name: five ) - 3: Scalar_EncapsedStringPart( + 3: InterpolatedStringPart( value: - ) ) @@ -298,13 +298,13 @@ array( 0: Expr_Variable( name: six ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) 2: Expr_Variable( name: six ) - 3: Scalar_EncapsedStringPart( + 3: InterpolatedStringPart( value: - ) 4: Expr_Variable( @@ -319,7 +319,7 @@ array( 0: Expr_Variable( name: seven ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) @@ -332,7 +332,7 @@ array( 0: Expr_Variable( name: eight ) - 1: Scalar_EncapsedStringPart( + 1: InterpolatedStringPart( value: - ) diff --git a/test/code/parser/scalar/flexibleDocStringErrors.test b/test/code/parser/scalar/flexibleDocStringErrors.test index 25b7484b24..01ec36f90c 100644 --- a/test/code/parser/scalar/flexibleDocStringErrors.test +++ b/test/code/parser/scalar/flexibleDocStringErrors.test @@ -80,7 +80,7 @@ array( 5: Stmt_Expression( expr: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: Foo ) @@ -103,7 +103,7 @@ array( exprs: array( 0: Scalar_Encapsed( parts: array( - 0: Scalar_EncapsedStringPart( + 0: InterpolatedStringPart( value: a ) @@ -114,4 +114,4 @@ array( ) ) ) -) \ No newline at end of file +) From 11caa3b9ccf3e4e144a5c61048ec5db8ea8abe53 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 15:08:39 +0200 Subject: [PATCH 140/428] Add compat shim for EncapsedStringPart --- lib/PhpParser/Node/InterpolatedStringPart.php | 3 +++ lib/PhpParser/Node/Scalar/EncapsedStringPart.php | 3 +++ test/PhpParser/CompatibilityTest.php | 5 +++++ 3 files changed, 11 insertions(+) create mode 100644 lib/PhpParser/Node/Scalar/EncapsedStringPart.php diff --git a/lib/PhpParser/Node/InterpolatedStringPart.php b/lib/PhpParser/Node/InterpolatedStringPart.php index 0d6f0abddb..ebd9cb3e8d 100644 --- a/lib/PhpParser/Node/InterpolatedStringPart.php +++ b/lib/PhpParser/Node/InterpolatedStringPart.php @@ -27,3 +27,6 @@ public function getType(): string { return 'InterpolatedStringPart'; } } + +// @deprecated compatibility alias +class_alias(InterpolatedStringPart::class, Scalar\EncapsedStringPart::class); diff --git a/lib/PhpParser/Node/Scalar/EncapsedStringPart.php b/lib/PhpParser/Node/Scalar/EncapsedStringPart.php new file mode 100644 index 0000000000..990e9801b5 --- /dev/null +++ b/lib/PhpParser/Node/Scalar/EncapsedStringPart.php @@ -0,0 +1,3 @@ +assertTrue($node instanceof Scalar\DNumber); $node = new Scalar\Int_(1); $this->assertTrue($node instanceof Scalar\LNumber); + $node = new InterpolatedStringPart('foo'); + $this->assertTrue($node instanceof Scalar\EncapsedStringPart); } /** @@ -41,5 +44,7 @@ public function testAliases2() { $this->assertTrue($node instanceof Scalar\Float_); $node = new Node\Scalar\LNumber(1); $this->assertTrue($node instanceof Scalar\Int_); + $node = new Node\Scalar\EncapsedStringPart('foo'); + $this->assertTrue($node instanceof Node\InterpolatedStringPart); } } From a44faa632826b9a37e16d740a14e9ed06541931d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 15:13:42 +0200 Subject: [PATCH 141/428] Rename Scalar\Encapsed to Scalar\InterpolatedString --- UPGRADE-5.0.md | 1 + grammar/php.y | 2 +- lib/PhpParser/Node/Scalar/Encapsed.php | 30 +---------- .../Node/Scalar/InterpolatedString.php | 34 +++++++++++++ lib/PhpParser/Parser/Php7.php | 2 +- lib/PhpParser/Parser/Php8.php | 2 +- lib/PhpParser/ParserAbstract.php | 4 +- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- lib/PhpParser/PrettyPrinterAbstract.php | 4 +- test/PhpParser/CompatibilityTest.php | 12 +++-- test/PhpParser/PrettyPrinterTest.php | 20 ++++---- test/code/parser/expr/nullsafe.test | 6 +-- test/code/parser/expr/uvs/misc.test | 6 +-- test/code/parser/scalar/docString.test | 6 +-- .../code/parser/scalar/docStringNewlines.test | 4 +- .../parser/scalar/encapsedNegVarOffset.test | 10 ++-- test/code/parser/scalar/encapsedString.test | 50 +++++++++---------- .../code/parser/scalar/flexibleDocString.test | 22 ++++---- .../scalar/flexibleDocStringErrors.test | 6 +-- 19 files changed, 117 insertions(+), 106 deletions(-) create mode 100644 lib/PhpParser/Node/Scalar/InterpolatedString.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 878d117083..bb9de2c1ee 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -77,6 +77,7 @@ A number of AST nodes have been renamed or moved in the AST hierarchy: * `Node\Scalar\LNumber` is now `Node\Scalar\Int_`. * `Node\Scalar\DNumber` is now `Node\Scalar\Float_`. + * `Node\Scalar\Encapsed` is now `Node\Scalar\InterpolatedString`. * `Node\Scalar\EncapsedStringPart` is now `Node\InterpolatedStringPart` and no longer extends `Node\Scalar` or `Node\Expr`. * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. diff --git a/grammar/php.y b/grammar/php.y index af75f826a0..650c87634f 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1172,7 +1172,7 @@ dereferencable_scalar: | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes()); } | '"' encaps_list '"' { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - parseEncapsed($2, '"', true); $$ = new Scalar\Encapsed($2, $attrs); } + parseEncapsed($2, '"', true); $$ = new Scalar\InterpolatedString($2, $attrs); } ; scalar: diff --git a/lib/PhpParser/Node/Scalar/Encapsed.php b/lib/PhpParser/Node/Scalar/Encapsed.php index 260ec92d41..c5aaf5b4e2 100644 --- a/lib/PhpParser/Node/Scalar/Encapsed.php +++ b/lib/PhpParser/Node/Scalar/Encapsed.php @@ -1,31 +1,3 @@ attributes = $attributes; - $this->parts = $parts; - } - - public function getSubNodeNames(): array { - return ['parts']; - } - - public function getType(): string { - return 'Scalar_Encapsed'; - } -} +require __DIR__ . '/InterpolatedString.php'; diff --git a/lib/PhpParser/Node/Scalar/InterpolatedString.php b/lib/PhpParser/Node/Scalar/InterpolatedString.php new file mode 100644 index 0000000000..a43e8dcb2d --- /dev/null +++ b/lib/PhpParser/Node/Scalar/InterpolatedString.php @@ -0,0 +1,34 @@ +attributes = $attributes; + $this->parts = $parts; + } + + public function getSubNodeNames(): array { + return ['parts']; + } + + public function getType(): string { + return 'Scalar_InterpolatedString'; + } +} + +// @deprecated compatibility alias +class_alias(InterpolatedString::class, Encapsed::class); diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index f881497f24..94e74803b5 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2768,7 +2768,7 @@ protected function initReduceCallbacks() { }, 524 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, 525 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 90370cc59a..28ca583b5a 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2786,7 +2786,7 @@ protected function initReduceCallbacks() { }, 524 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, 525 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 4b59f08332..685bf789b9 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -13,7 +13,7 @@ use PhpParser\Node\Expr\Cast\Double; use PhpParser\Node\Name; use PhpParser\Node\Param; -use PhpParser\Node\Scalar\Encapsed; +use PhpParser\Node\Scalar\InterpolatedString; use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Class_; @@ -802,7 +802,7 @@ protected function parseDocString( } $newContents[] = $part; } - return new Encapsed($newContents, $attributes); + return new InterpolatedString($newContents, $attributes); } } diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index ae8c31bced..b305b85814 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -163,7 +163,7 @@ protected function pScalar_String(Scalar\String_ $node) { throw new \Exception('Invalid string kind'); } - protected function pScalar_Encapsed(Scalar\Encapsed $node) { + protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node) { if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) { $label = $node->getAttribute('docLabel'); if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 60901fac35..e876e534cd 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1193,7 +1193,7 @@ protected function initializeFixupMap() { 'var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME, ], - Scalar\Encapsed::class => [ + Scalar\InterpolatedString::class => [ 'parts' => self::FIXUP_ENCAPSED, ], ]; @@ -1336,7 +1336,7 @@ protected function initializeListInsertionMap() { $this->listInsertionMap = [ // special //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully - //'Scalar_Encapsed->parts' => '', + //'Scalar_InterpolatedString->parts' => '', 'Stmt_Catch->types' => '|', 'UnionType->types' => '|', 'IntersectionType->types' => '&', diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index aa93013057..9f5de6dfdf 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -24,8 +24,10 @@ public function testAliases1() { $this->assertTrue($node instanceof Scalar\DNumber); $node = new Scalar\Int_(1); $this->assertTrue($node instanceof Scalar\LNumber); - $node = new InterpolatedStringPart('foo'); - $this->assertTrue($node instanceof Scalar\EncapsedStringPart); + $part = new InterpolatedStringPart('foo'); + $this->assertTrue($part instanceof Scalar\EncapsedStringPart); + $node = new Scalar\InterpolatedString([$part]); + $this->assertTrue($node instanceof Scalar\Encapsed); } /** @@ -44,7 +46,9 @@ public function testAliases2() { $this->assertTrue($node instanceof Scalar\Float_); $node = new Node\Scalar\LNumber(1); $this->assertTrue($node instanceof Scalar\Int_); - $node = new Node\Scalar\EncapsedStringPart('foo'); - $this->assertTrue($node instanceof Node\InterpolatedStringPart); + $part = new Node\Scalar\EncapsedStringPart('foo'); + $this->assertTrue($part instanceof Node\InterpolatedStringPart); + $node = new Scalar\Encapsed([$part]); + $this->assertTrue($node instanceof Scalar\InterpolatedString); } } diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 0cf0c06f57..85ce323a69 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -5,7 +5,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Name; use PhpParser\Node\Scalar\Float_; -use PhpParser\Node\Scalar\Encapsed; +use PhpParser\Node\Scalar\InterpolatedString; use PhpParser\Node\InterpolatedStringPart; use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; @@ -115,17 +115,17 @@ public function provideTestKindAttributes() { // Empty doc string variations (encapsed variant does not occur naturally) [new String_("", $nowdoc), "<<<'STR'\nSTR\n"], [new String_("", $heredoc), "<< Date: Sat, 3 Sep 2022 18:15:36 +0200 Subject: [PATCH 142/428] Support REMOVE_NODE from enterNode() --- lib/PhpParser/NodeTraverser.php | 3 +++ lib/PhpParser/NodeVisitor.php | 5 ++++ test/PhpParser/NodeTraverserTest.php | 37 ++++++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 781caa584f..8888153a67 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -201,6 +201,9 @@ protected function traverseArray(array $nodes): array { if ($return instanceof Node) { $this->ensureReplacementReasonable($node, $return); $node = $return; + } else if (self::REMOVE_NODE === $return) { + $doNodes[] = [$i, []]; + continue 2; } elseif (self::DONT_TRAVERSE_CHILDREN === $return) { $traverseChildren = false; } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { diff --git a/lib/PhpParser/NodeVisitor.php b/lib/PhpParser/NodeVisitor.php index 5cd9234123..39cd069988 100644 --- a/lib/PhpParser/NodeVisitor.php +++ b/lib/PhpParser/NodeVisitor.php @@ -22,8 +22,13 @@ public function beforeTraverse(array $nodes); * Return value semantics: * * null * => $node stays as-is + * * NodeTraverser::REMOVE_NODE + * => $node is removed from the parent array * * NodeTraverser::DONT_TRAVERSE_CHILDREN * => Children of $node are not traversed. $node stays as-is + * * NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN + * => Further visitors for the current node are skipped, and its children are not + * traversed. $node stays as-is. * * NodeTraverser::STOP_TRAVERSAL * => Traversal is aborted. $node stays as-is * * otherwise diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index 27f77c8dd1..b45ee2c0a0 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -61,18 +61,51 @@ public function testModifying() { ], $visitor2->trace); } - public function testRemove() { + public function testRemoveFromLeave() { $str1Node = new String_('Foo'); $str2Node = new String_('Bar'); $visitor = new NodeVisitorForTesting([ ['leaveNode', $str1Node, NodeTraverser::REMOVE_NODE], ]); + $visitor2 = new NodeVisitorForTesting(); + + $traverser = new NodeTraverser(); + $traverser->addVisitor($visitor); + $traverser->addVisitor($visitor2); + + $stmts = [$str1Node, $str2Node]; + $this->assertEquals([$str2Node], $traverser->traverse($stmts)); + $this->assertEquals([ + ['beforeTraverse', $stmts], + ['enterNode', $str1Node], + ['enterNode', $str2Node], + ['leaveNode', $str2Node], + ['afterTraverse', [$str2Node]], + ], $visitor2->trace); + } + + public function testRemoveFromEnter() { + $str1Node = new String_('Foo'); + $str2Node = new String_('Bar'); + + $visitor = new NodeVisitorForTesting([ + ['enterNode', $str1Node, NodeTraverser::REMOVE_NODE], + ]); + $visitor2 = new NodeVisitorForTesting(); $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); + $traverser->addVisitor($visitor2); - $this->assertEquals([$str2Node], $traverser->traverse([$str1Node, $str2Node])); + $stmts = [$str1Node, $str2Node]; + $this->assertEquals([$str2Node], $traverser->traverse($stmts)); + $this->assertEquals([ + ['beforeTraverse', $stmts], + ['enterNode', $str2Node], + ['leaveNode', $str2Node], + ['afterTraverse', [$str2Node]], + ], $visitor2->trace); } public function testMerge() { From a3b0541c71cf439526beffcfe72d6e1aaeae9a3a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 18:38:22 +0200 Subject: [PATCH 143/428] Support array return from enterNode() This uses the same semantics as arrays from leaveNode(), i.e. the returned nodes will not be visited by other visitors. This is open to change though (but probably should change for both enterNode() and leaveNode() if it does change?) --- lib/PhpParser/NodeTraverser.php | 3 +++ lib/PhpParser/NodeVisitor.php | 2 ++ test/PhpParser/NodeTraverserTest.php | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 8888153a67..94682c5d47 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -201,6 +201,9 @@ protected function traverseArray(array $nodes): array { if ($return instanceof Node) { $this->ensureReplacementReasonable($node, $return); $node = $return; + } else if (\is_array($return)) { + $doNodes[] = [$i, $return]; + continue 2; } else if (self::REMOVE_NODE === $return) { $doNodes[] = [$i, []]; continue 2; diff --git a/lib/PhpParser/NodeVisitor.php b/lib/PhpParser/NodeVisitor.php index 39cd069988..646b4fade6 100644 --- a/lib/PhpParser/NodeVisitor.php +++ b/lib/PhpParser/NodeVisitor.php @@ -22,6 +22,8 @@ public function beforeTraverse(array $nodes); * Return value semantics: * * null * => $node stays as-is + * * array (of Nodes) + * => The return value is merged into the parent array (at the position of the $node) * * NodeTraverser::REMOVE_NODE * => $node is removed from the parent array * * NodeTraverser::DONT_TRAVERSE_CHILDREN diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index b45ee2c0a0..7e9a3f379e 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -108,6 +108,31 @@ public function testRemoveFromEnter() { ], $visitor2->trace); } + public function testReturnArrayFromEnter() { + $str1Node = new String_('Str1'); + $str2Node = new String_('Str2'); + $str3Node = new String_('Str3'); + $str4Node = new String_('Str4'); + + $visitor = new NodeVisitorForTesting([ + ['enterNode', $str1Node, [$str3Node, $str4Node]], + ]); + $visitor2 = new NodeVisitorForTesting(); + + $traverser = new NodeTraverser(); + $traverser->addVisitor($visitor); + $traverser->addVisitor($visitor2); + + $stmts = [$str1Node, $str2Node]; + $this->assertEquals([$str3Node, $str4Node, $str2Node], $traverser->traverse($stmts)); + $this->assertEquals([ + ['beforeTraverse', $stmts], + ['enterNode', $str2Node], + ['leaveNode', $str2Node], + ['afterTraverse', [$str3Node, $str4Node, $str2Node]], + ], $visitor2->trace); + } + public function testMerge() { $strStart = new String_('Start'); $strMiddle = new String_('End'); From 03ccfa3dd4388024e9dc12a86e0d09642fc44ca0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 18:45:28 +0200 Subject: [PATCH 144/428] Rename Stmt\DeclareDeclare to DeclareItem --- UPGRADE-5.0.md | 3 +- grammar/php.y | 2 +- lib/PhpParser/Node/DeclareItem.php | 37 +++++++++++++++++++ lib/PhpParser/Node/Stmt/DeclareDeclare.php | 32 +--------------- lib/PhpParser/Node/Stmt/Declare_.php | 5 ++- lib/PhpParser/Parser/Php7.php | 2 +- lib/PhpParser/Parser/Php8.php | 2 +- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- test/PhpParser/CompatibilityTest.php | 4 ++ test/code/parser/errorHandling/recovery.test | 4 +- test/code/parser/stmt/blocklessStatement.test | 4 +- test/code/parser/stmt/declare.test | 12 +++--- .../parser/stmt/namespace/outsideStmt.test | 4 +- .../stmt/namespace/outsideStmtInvalid.test | 4 +- 14 files changed, 65 insertions(+), 52 deletions(-) create mode 100644 lib/PhpParser/Node/DeclareItem.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index bb9de2c1ee..46695c42ba 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -80,8 +80,9 @@ A number of AST nodes have been renamed or moved in the AST hierarchy: * `Node\Scalar\Encapsed` is now `Node\Scalar\InterpolatedString`. * `Node\Scalar\EncapsedStringPart` is now `Node\InterpolatedStringPart` and no longer extends `Node\Scalar` or `Node\Expr`. - * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. * `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`. + * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. + * `Node\Stmt\DeclareDeclare` is now `Node\DeclareItem` and no longer extends `Node\Stmt`. * `Node\Stmt\StaticVar` is now `Node\StaticVar` and no longer extends `Node\Stmt`. The old class names have been retained as aliases for backwards compatibility. However, the `Node::getType()` method will now always return the new name (e.g. `ClosureUse` instead of `Expr_ClosureUse`). diff --git a/grammar/php.y b/grammar/php.y index 650c87634f..3e79447907 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -564,7 +564,7 @@ non_empty_declare_list: ; declare_list_element: - identifier_not_reserved '=' expr { $$ = Stmt\DeclareDeclare[$1, $3]; } + identifier_not_reserved '=' expr { $$ = Node\DeclareItem[$1, $3]; } ; switch_case_list: diff --git a/lib/PhpParser/Node/DeclareItem.php b/lib/PhpParser/Node/DeclareItem.php new file mode 100644 index 0000000000..88b03d8714 --- /dev/null +++ b/lib/PhpParser/Node/DeclareItem.php @@ -0,0 +1,37 @@ +value pair node. + * + * @param string|Node\Identifier $key Key + * @param Node\Expr $value Value + * @param array $attributes Additional attributes + */ + public function __construct($key, Node\Expr $value, array $attributes = []) { + $this->attributes = $attributes; + $this->key = \is_string($key) ? new Node\Identifier($key) : $key; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['key', 'value']; + } + + public function getType(): string { + return 'DeclareItem'; + } +} + +// @deprecated compatibility alias +class_alias(DeclareItem::class, Stmt\DeclareDeclare::class); diff --git a/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/lib/PhpParser/Node/Stmt/DeclareDeclare.php index 39df6dae1c..cb9e8376e3 100644 --- a/lib/PhpParser/Node/Stmt/DeclareDeclare.php +++ b/lib/PhpParser/Node/Stmt/DeclareDeclare.php @@ -1,33 +1,3 @@ value pair node. - * - * @param string|Node\Identifier $key Key - * @param Node\Expr $value Value - * @param array $attributes Additional attributes - */ - public function __construct($key, Node\Expr $value, array $attributes = []) { - $this->attributes = $attributes; - $this->key = \is_string($key) ? new Node\Identifier($key) : $key; - $this->value = $value; - } - - public function getSubNodeNames(): array { - return ['key', 'value']; - } - - public function getType(): string { - return 'Stmt_DeclareDeclare'; - } -} +require __DIR__ . '/../DeclareItem.php'; diff --git a/lib/PhpParser/Node/Stmt/Declare_.php b/lib/PhpParser/Node/Stmt/Declare_.php index 5a209cf243..b76fc57416 100644 --- a/lib/PhpParser/Node/Stmt/Declare_.php +++ b/lib/PhpParser/Node/Stmt/Declare_.php @@ -3,9 +3,10 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; +use PhpParser\Node\DeclareItem; class Declare_ extends Node\Stmt { - /** @var DeclareDeclare[] List of declares */ + /** @var DeclareItem[] List of declares */ public $declares; /** @var Node\Stmt[]|null Statements */ public $stmts; @@ -13,7 +14,7 @@ class Declare_ extends Node\Stmt { /** * Constructs a declare node. * - * @param DeclareDeclare[] $declares List of declares + * @param DeclareItem[] $declares List of declares * @param Node\Stmt[]|null $stmts Statements * @param array $attributes Additional attributes */ diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 94e74803b5..e4551193b4 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1891,7 +1891,7 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 238 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 239 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 28ca583b5a..4deddd41a1 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1909,7 +1909,7 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 238 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 239 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index b305b85814..21321a95cb 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -838,7 +838,7 @@ protected function pStmt_Declare(Stmt\Declare_ $node) { . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); } - protected function pStmt_DeclareDeclare(Stmt\DeclareDeclare $node) { + protected function pDeclareItem(Node\DeclareItem $node) { return $node->key . '=' . $this->p($node->value); } diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index 9f5de6dfdf..bcd0dd1044 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -28,6 +28,8 @@ public function testAliases1() { $this->assertTrue($part instanceof Scalar\EncapsedStringPart); $node = new Scalar\InterpolatedString([$part]); $this->assertTrue($node instanceof Scalar\Encapsed); + $node = new Node\DeclareItem('strict_types', new Scalar\Int_(1)); + $this->assertTrue($node instanceof Stmt\DeclareDeclare); } /** @@ -50,5 +52,7 @@ public function testAliases2() { $this->assertTrue($part instanceof Node\InterpolatedStringPart); $node = new Scalar\Encapsed([$part]); $this->assertTrue($node instanceof Scalar\InterpolatedString); + $node = new Stmt\DeclareDeclare('strict_types', new Scalar\LNumber(1)); + $this->assertTrue($node instanceof Node\DeclareItem); } } diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index 7abe0d0964..20ac79c0ab 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -800,7 +800,7 @@ array( ) 8: Stmt_Declare( declares: array( - 0: Stmt_DeclareDeclare( + 0: DeclareItem( key: Identifier( name: a ) @@ -1508,4 +1508,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/blocklessStatement.test b/test/code/parser/stmt/blocklessStatement.test index abf586465b..79b62d81c7 100644 --- a/test/code/parser/stmt/blocklessStatement.test +++ b/test/code/parser/stmt/blocklessStatement.test @@ -110,7 +110,7 @@ array( ) 5: Stmt_Declare( declares: array( - 0: Stmt_DeclareDeclare( + 0: DeclareItem( key: Identifier( name: a ) @@ -127,4 +127,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/declare.test b/test/code/parser/stmt/declare.test index f044d24f91..27e6f3d1c9 100644 --- a/test/code/parser/stmt/declare.test +++ b/test/code/parser/stmt/declare.test @@ -12,7 +12,7 @@ enddeclare; array( 0: Stmt_Declare( declares: array( - 0: Stmt_DeclareDeclare( + 0: DeclareItem( key: Identifier( name: X ) @@ -25,7 +25,7 @@ array( ) 1: Stmt_Declare( declares: array( - 0: Stmt_DeclareDeclare( + 0: DeclareItem( key: Identifier( name: A ) @@ -33,7 +33,7 @@ array( value: B ) ) - 1: Stmt_DeclareDeclare( + 1: DeclareItem( key: Identifier( name: C ) @@ -47,7 +47,7 @@ array( ) 2: Stmt_Declare( declares: array( - 0: Stmt_DeclareDeclare( + 0: DeclareItem( key: Identifier( name: A ) @@ -55,7 +55,7 @@ array( value: B ) ) - 1: Stmt_DeclareDeclare( + 1: DeclareItem( key: Identifier( name: C ) @@ -67,4 +67,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/outsideStmt.test b/test/code/parser/stmt/namespace/outsideStmt.test index fe8bde6686..bfd5aa1603 100644 --- a/test/code/parser/stmt/namespace/outsideStmt.test +++ b/test/code/parser/stmt/namespace/outsideStmt.test @@ -12,7 +12,7 @@ Hi! array( 0: Stmt_Declare( declares: array( - 0: Stmt_DeclareDeclare( + 0: DeclareItem( key: Identifier( name: A ) @@ -57,4 +57,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/outsideStmtInvalid.test b/test/code/parser/stmt/namespace/outsideStmtInvalid.test index f6ac59811b..8d8c75ab47 100644 --- a/test/code/parser/stmt/namespace/outsideStmtInvalid.test +++ b/test/code/parser/stmt/namespace/outsideStmtInvalid.test @@ -75,7 +75,7 @@ array( ) 1: Stmt_Declare( declares: array( - 0: Stmt_DeclareDeclare( + 0: DeclareItem( key: Identifier( name: ticks ) @@ -106,4 +106,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) From e1345f0c094dfb0d47abee7f44fb13ffca19cade Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 18:55:22 +0200 Subject: [PATCH 145/428] Rename Stmt\PropertyProperty to PropertyItem --- UPGRADE-5.0.md | 1 + grammar/php.y | 4 +-- lib/PhpParser/Builder/Property.php | 2 +- lib/PhpParser/Node/PropertyItem.php | 36 +++++++++++++++++++ lib/PhpParser/Node/Stmt/ClassLike.php | 3 +- lib/PhpParser/Node/Stmt/Property.php | 5 +-- lib/PhpParser/Node/Stmt/PropertyProperty.php | 32 +---------------- lib/PhpParser/Parser/Php7.php | 4 +-- lib/PhpParser/Parser/Php8.php | 4 +-- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- lib/PhpParser/PrettyPrinterAbstract.php | 4 +-- test/PhpParser/Builder/ClassTest.php | 2 +- test/PhpParser/Builder/EnumTest.php | 4 +-- test/PhpParser/Builder/InterfaceTest.php | 4 +-- test/PhpParser/Builder/PropertyTest.php | 12 +++---- test/PhpParser/Builder/TraitTest.php | 8 ++--- test/PhpParser/CompatibilityTest.php | 4 +++ test/PhpParser/Node/Stmt/ClassTest.php | 11 +++--- test/code/parser/commentAtEndOfClass.test | 4 +-- test/code/parser/errorHandling/recovery.test | 6 ++-- test/code/parser/semiReserved.test | 6 ++-- test/code/parser/stmt/attributes.test | 4 +-- test/code/parser/stmt/class/anonymous.test | 4 +-- .../parser/stmt/class/implicitPublic.test | 6 ++-- test/code/parser/stmt/class/modifier.test | 14 ++++---- test/code/parser/stmt/class/php4Style.test | 4 +-- .../code/parser/stmt/class/propertyTypes.test | 10 +++--- test/code/parser/stmt/class/simple.test | 10 +++--- .../function/disjointNormalFormTypes.test | 4 +-- .../stmt/function/intersectionTypes.test | 4 +-- .../code/parser/stmt/function/unionTypes.test | 4 +-- test/code/parser/stmt/newInInitializer.test | 4 +-- 32 files changed, 120 insertions(+), 106 deletions(-) create mode 100644 lib/PhpParser/Node/PropertyItem.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 46695c42ba..05f1c32ef3 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -83,6 +83,7 @@ A number of AST nodes have been renamed or moved in the AST hierarchy: * `Node\Expr\ArrayItem` is now `Node\ArrayItem` and no longer extends `Node\Expr`. * `Node\Expr\ClosureUse` is now `Node\ClosureUse` and no longer extends `Node\Expr`. * `Node\Stmt\DeclareDeclare` is now `Node\DeclareItem` and no longer extends `Node\Stmt`. + * `Node\Stmt\PropertyProperty` is now `Node\PropertyItem` and no longer extends `Node\Stmt`. * `Node\Stmt\StaticVar` is now `Node\StaticVar` and no longer extends `Node\Stmt`. The old class names have been retained as aliases for backwards compatibility. However, the `Node::getType()` method will now always return the new name (e.g. `ClosureUse` instead of `Expr_ClosureUse`). diff --git a/grammar/php.y b/grammar/php.y index 3e79447907..5779eec3ac 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -917,8 +917,8 @@ property_decl_name: ; property_declaration: - property_decl_name { $$ = Stmt\PropertyProperty[$1, null]; } - | property_decl_name '=' expr { $$ = Stmt\PropertyProperty[$1, $3]; } + property_decl_name { $$ = Node\PropertyItem[$1, null]; } + | property_decl_name '=' expr { $$ = Node\PropertyItem[$1, $3]; } ; expr_list_forbid_comma: diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 2fd67a88cb..c46638dccb 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -151,7 +151,7 @@ public function getNode(): PhpParser\Node { return new Stmt\Property( $this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, [ - new Stmt\PropertyProperty($this->name, $this->default) + new Node\PropertyItem($this->name, $this->default) ], $this->attributes, $this->type, diff --git a/lib/PhpParser/Node/PropertyItem.php b/lib/PhpParser/Node/PropertyItem.php new file mode 100644 index 0000000000..1b286b4dd0 --- /dev/null +++ b/lib/PhpParser/Node/PropertyItem.php @@ -0,0 +1,36 @@ +attributes = $attributes; + $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; + $this->default = $default; + } + + public function getSubNodeNames(): array { + return ['name', 'default']; + } + + public function getType(): string { + return 'PropertyItem'; + } +} + +// @deprecated compatibility alias +class_alias(PropertyItem::class, Stmt\PropertyProperty::class); diff --git a/lib/PhpParser/Node/Stmt/ClassLike.php b/lib/PhpParser/Node/Stmt/ClassLike.php index 75814705ae..58b859cc83 100644 --- a/lib/PhpParser/Node/Stmt/ClassLike.php +++ b/lib/PhpParser/Node/Stmt/ClassLike.php @@ -3,6 +3,7 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; +use PhpParser\Node\PropertyItem; abstract class ClassLike extends Node\Stmt { /** @var Node\Identifier|null Name */ @@ -65,7 +66,7 @@ public function getProperty(string $name): ?Property { foreach ($this->stmts as $stmt) { if ($stmt instanceof Property) { foreach ($stmt->props as $prop) { - if ($prop instanceof PropertyProperty && $name === $prop->name->toString()) { + if ($prop instanceof PropertyItem && $name === $prop->name->toString()) { return $stmt; } } diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index 304db47f3b..ca6508c2ba 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -7,11 +7,12 @@ use PhpParser\Node\ComplexType; use PhpParser\Node\Identifier; use PhpParser\Node\Name; +use PhpParser\Node\PropertyItem; class Property extends Node\Stmt { /** @var int Modifiers */ public $flags; - /** @var PropertyProperty[] Properties */ + /** @var PropertyItem[] Properties */ public $props; /** @var null|Identifier|Name|ComplexType Type declaration */ public $type; @@ -22,7 +23,7 @@ class Property extends Node\Stmt { * Constructs a class property list node. * * @param int $flags Modifiers - * @param PropertyProperty[] $props Properties + * @param PropertyItem[] $props Properties * @param array $attributes Additional attributes * @param null|string|Identifier|Name|ComplexType $type Type declaration * @param Node\AttributeGroup[] $attrGroups PHP attribute groups diff --git a/lib/PhpParser/Node/Stmt/PropertyProperty.php b/lib/PhpParser/Node/Stmt/PropertyProperty.php index 69fb3b9934..4a21a8806b 100644 --- a/lib/PhpParser/Node/Stmt/PropertyProperty.php +++ b/lib/PhpParser/Node/Stmt/PropertyProperty.php @@ -1,33 +1,3 @@ attributes = $attributes; - $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; - $this->default = $default; - } - - public function getSubNodeNames(): array { - return ['name', 'default']; - } - - public function getType(): string { - return 'Stmt_PropertyProperty'; - } -} +require __DIR__ . '/../PropertyItem.php'; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index e4551193b4..9b40ebc6ec 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2311,10 +2311,10 @@ protected function initReduceCallbacks() { $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 378 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 4deddd41a1..ccc3cf62c9 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2329,10 +2329,10 @@ protected function initReduceCallbacks() { $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 378 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 21321a95cb..b920a5246a 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -799,7 +799,7 @@ protected function pStmt_Property(Stmt\Property $node) { . $this->pCommaSeparated($node->props) . ';'; } - protected function pStmt_PropertyProperty(Stmt\PropertyProperty $node) { + protected function pPropertyItem(Node\PropertyItem $node) { return '$' . $node->name . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index e876e534cd..559c90101a 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1272,7 +1272,7 @@ protected function initializeRemovalMap() { 'Stmt_If->else' => $stripLeft, 'Stmt_Namespace->name' => $stripLeft, 'Stmt_Property->type' => $stripRight, - 'Stmt_PropertyProperty->default' => $stripEquals, + 'PropertyItem->default' => $stripEquals, 'Stmt_Return->expr' => $stripBoth, 'Stmt_StaticVar->default' => $stripEquals, 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, @@ -1314,7 +1314,7 @@ protected function initializeInsertionMap() { 'Stmt_If->else' => [null, false, ' ', null], 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], - 'Stmt_PropertyProperty->default' => [null, false, ' = ', null], + 'PropertyItem->default' => [null, false, ' = ', null], 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], 'Stmt_StaticVar->default' => [null, false, ' = ', null], //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO diff --git a/test/PhpParser/Builder/ClassTest.php b/test/PhpParser/Builder/ClassTest.php index 24e6b13916..334a85382c 100644 --- a/test/PhpParser/Builder/ClassTest.php +++ b/test/PhpParser/Builder/ClassTest.php @@ -86,7 +86,7 @@ public function testStatementOrder() { $method = new Stmt\ClassMethod('testMethod'); $property = new Stmt\Property( Modifiers::PUBLIC, - [new Stmt\PropertyProperty('testProperty')] + [new Node\PropertyItem('testProperty')] ); $const = new Stmt\ClassConst([ new Node\Const_('TEST_CONST', new Node\Scalar\String_('ABC')) diff --git a/test/PhpParser/Builder/EnumTest.php b/test/PhpParser/Builder/EnumTest.php index 51f94a616c..c88a8d6069 100644 --- a/test/PhpParser/Builder/EnumTest.php +++ b/test/PhpParser/Builder/EnumTest.php @@ -129,9 +129,9 @@ public function testAddAttribute() { public function testInvalidStmtError() { $this->expectException(\LogicException::class); - $this->expectExceptionMessage('Unexpected node of type "Stmt_PropertyProperty"'); + $this->expectExceptionMessage('Unexpected node of type "PropertyItem"'); $this->createEnumBuilder('Test') - ->addStmt(new Stmt\PropertyProperty('property')) + ->addStmt(new Node\PropertyItem('property')) ; } diff --git a/test/PhpParser/Builder/InterfaceTest.php b/test/PhpParser/Builder/InterfaceTest.php index 4ae93956ff..71652f72c1 100644 --- a/test/PhpParser/Builder/InterfaceTest.php +++ b/test/PhpParser/Builder/InterfaceTest.php @@ -99,8 +99,8 @@ public function testAddAttribute() { public function testInvalidStmtError() { $this->expectException(\LogicException::class); - $this->expectExceptionMessage('Unexpected node of type "Stmt_PropertyProperty"'); - $this->createInterfaceBuilder()->addStmt(new Stmt\PropertyProperty('invalid')); + $this->expectExceptionMessage('Unexpected node of type "PropertyItem"'); + $this->createInterfaceBuilder()->addStmt(new Node\PropertyItem('invalid')); } public function testFullFunctional() { diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index 329641c82b..50fff0a8ac 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -30,7 +30,7 @@ public function testModifiers() { new Stmt\Property( Modifiers::PRIVATE | Modifiers::STATIC, [ - new Stmt\PropertyProperty('test') + new \PhpParser\Node\PropertyItem('test') ] ), $node @@ -45,7 +45,7 @@ public function testModifiers() { new Stmt\Property( Modifiers::PROTECTED, [ - new Stmt\PropertyProperty('test') + new \PhpParser\Node\PropertyItem('test') ] ), $node @@ -60,7 +60,7 @@ public function testModifiers() { new Stmt\Property( Modifiers::PUBLIC, [ - new Stmt\PropertyProperty('test') + new \PhpParser\Node\PropertyItem('test') ] ), $node @@ -75,7 +75,7 @@ public function testModifiers() { new Stmt\Property( Modifiers::READONLY, [ - new Stmt\PropertyProperty('test') + new \PhpParser\Node\PropertyItem('test') ] ), $node @@ -90,7 +90,7 @@ public function testDocComment() { $this->assertEquals(new Stmt\Property( Modifiers::PUBLIC, [ - new Stmt\PropertyProperty('test') + new \PhpParser\Node\PropertyItem('test') ], [ 'comments' => [new Comment\Doc('/** Test */')] @@ -126,7 +126,7 @@ public function testAddAttribute() { new Stmt\Property( Modifiers::PUBLIC, [ - new Stmt\PropertyProperty('test') + new \PhpParser\Node\PropertyItem('test') ], [], null, diff --git a/test/PhpParser/Builder/TraitTest.php b/test/PhpParser/Builder/TraitTest.php index 802833368d..72218c7402 100644 --- a/test/PhpParser/Builder/TraitTest.php +++ b/test/PhpParser/Builder/TraitTest.php @@ -15,7 +15,7 @@ use PhpParser\Node\Stmt\ClassConst; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Property; -use PhpParser\Node\Stmt\PropertyProperty; +use PhpParser\Node\PropertyItem; use PhpParser\Node\Stmt\TraitUse; class TraitTest extends \PHPUnit\Framework\TestCase { @@ -28,7 +28,7 @@ public function testStmtAddition() { $method2 = new Stmt\ClassMethod('test2'); $method3 = new Stmt\ClassMethod('test3'); $prop = new Stmt\Property(Modifiers::PUBLIC, [ - new Stmt\PropertyProperty('test') + new \PhpParser\Node\PropertyItem('test') ]); $use = new Stmt\TraitUse([new Name('OtherTrait')]); $trait = $this->createTraitBuilder('TestTrait') @@ -77,8 +77,8 @@ public function testGetMethods() { public function testGetProperties() { $properties = [ - new Property(Modifiers::PUBLIC, [new PropertyProperty('foo')]), - new Property(Modifiers::PUBLIC, [new PropertyProperty('bar')]), + new Property(Modifiers::PUBLIC, [new PropertyItem('foo')]), + new Property(Modifiers::PUBLIC, [new PropertyItem('bar')]), ]; $trait = new Stmt\Trait_('Foo', [ 'stmts' => [ diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index bcd0dd1044..fa1ecac64c 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -30,6 +30,8 @@ public function testAliases1() { $this->assertTrue($node instanceof Scalar\Encapsed); $node = new Node\DeclareItem('strict_types', new Scalar\Int_(1)); $this->assertTrue($node instanceof Stmt\DeclareDeclare); + $node = new Node\PropertyItem('x'); + $this->assertTrue($node instanceof Stmt\PropertyProperty); } /** @@ -54,5 +56,7 @@ public function testAliases2() { $this->assertTrue($node instanceof Scalar\InterpolatedString); $node = new Stmt\DeclareDeclare('strict_types', new Scalar\LNumber(1)); $this->assertTrue($node instanceof Node\DeclareItem); + $node = new Stmt\PropertyProperty('x'); + $this->assertTrue($node instanceof Node\PropertyItem); } } diff --git a/test/PhpParser/Node/Stmt/ClassTest.php b/test/PhpParser/Node/Stmt/ClassTest.php index f77e310c42..f0295d2836 100644 --- a/test/PhpParser/Node/Stmt/ClassTest.php +++ b/test/PhpParser/Node/Stmt/ClassTest.php @@ -3,6 +3,7 @@ namespace PhpParser\Node\Stmt; use PhpParser\Modifiers; +use PhpParser\Node\PropertyItem; use PhpParser\Node\Scalar\String_; class ClassTest extends \PHPUnit\Framework\TestCase { @@ -77,8 +78,8 @@ public function testGetConstants() { public function testGetProperties() { $properties = [ - new Property(Modifiers::PUBLIC, [new PropertyProperty('foo')]), - new Property(Modifiers::PUBLIC, [new PropertyProperty('bar')]), + new Property(Modifiers::PUBLIC, [new PropertyItem('foo')]), + new Property(Modifiers::PUBLIC, [new PropertyItem('bar')]), ]; $class = new Class_('Foo', [ 'stmts' => [ @@ -95,9 +96,9 @@ public function testGetProperties() { public function testGetProperty() { $properties = [ - $fooProp = new Property(Modifiers::PUBLIC, [new PropertyProperty('foo1')]), - $barProp = new Property(Modifiers::PUBLIC, [new PropertyProperty('BAR1')]), - $fooBarProp = new Property(Modifiers::PUBLIC, [new PropertyProperty('foo2'), new PropertyProperty('bar2')]), + $fooProp = new Property(Modifiers::PUBLIC, [new PropertyItem('foo1')]), + $barProp = new Property(Modifiers::PUBLIC, [new PropertyItem('BAR1')]), + $fooBarProp = new Property(Modifiers::PUBLIC, [new PropertyItem('foo2'), new PropertyItem('bar2')]), ]; $class = new Class_('Foo', [ 'stmts' => [ diff --git a/test/code/parser/commentAtEndOfClass.test b/test/code/parser/commentAtEndOfClass.test index 67ee762328..8e353ad6d5 100644 --- a/test/code/parser/commentAtEndOfClass.test +++ b/test/code/parser/commentAtEndOfClass.test @@ -24,7 +24,7 @@ array( flags: PROTECTED (2) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: a ) @@ -39,4 +39,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index 20ac79c0ab..c736d60002 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -756,7 +756,7 @@ array( flags: PUBLIC (1) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: x ) @@ -916,7 +916,7 @@ array( flags: PUBLIC (1) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: bar ) @@ -1424,7 +1424,7 @@ array( flags: PRIVATE (4) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: foo ) diff --git a/test/code/parser/semiReserved.test b/test/code/parser/semiReserved.test index de914bdd6a..1d3594a4a6 100644 --- a/test/code/parser/semiReserved.test +++ b/test/code/parser/semiReserved.test @@ -126,7 +126,7 @@ array( flags: PUBLIC (1) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: class ) @@ -140,7 +140,7 @@ array( flags: PUBLIC (1) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: private ) @@ -507,4 +507,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/attributes.test b/test/code/parser/stmt/attributes.test index 0198af979d..aa477435e6 100644 --- a/test/code/parser/stmt/attributes.test +++ b/test/code/parser/stmt/attributes.test @@ -198,7 +198,7 @@ array( flags: PUBLIC (1) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: prop ) @@ -384,4 +384,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/anonymous.test b/test/code/parser/stmt/class/anonymous.test index 7bccc26671..89fe3f360b 100644 --- a/test/code/parser/stmt/class/anonymous.test +++ b/test/code/parser/stmt/class/anonymous.test @@ -101,7 +101,7 @@ array( flags: PUBLIC (1) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: foo ) @@ -234,4 +234,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/implicitPublic.test b/test/code/parser/stmt/class/implicitPublic.test index 7892bf2832..6a6ad1eaba 100644 --- a/test/code/parser/stmt/class/implicitPublic.test +++ b/test/code/parser/stmt/class/implicitPublic.test @@ -30,7 +30,7 @@ array( flags: 0 type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: a ) @@ -44,7 +44,7 @@ array( flags: STATIC (8) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: b ) @@ -123,4 +123,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/modifier.test b/test/code/parser/stmt/class/modifier.test index ec789e4c56..90147c9ad4 100644 --- a/test/code/parser/stmt/class/modifier.test +++ b/test/code/parser/stmt/class/modifier.test @@ -21,7 +21,7 @@ array( flags: PUBLIC (1) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: a ) @@ -54,7 +54,7 @@ array( flags: PUBLIC | PROTECTED (3) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: a ) @@ -87,7 +87,7 @@ array( flags: READONLY (64) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: a ) @@ -152,7 +152,7 @@ array( flags: STATIC (8) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: a ) @@ -269,7 +269,7 @@ array( flags: ABSTRACT (16) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: b ) @@ -302,7 +302,7 @@ array( flags: FINAL (32) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: a ) @@ -312,4 +312,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/php4Style.test b/test/code/parser/stmt/class/php4Style.test index b121e78f37..c59f2f36b6 100644 --- a/test/code/parser/stmt/class/php4Style.test +++ b/test/code/parser/stmt/class/php4Style.test @@ -26,7 +26,7 @@ array( flags: 0 type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: foo ) @@ -64,4 +64,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/propertyTypes.test b/test/code/parser/stmt/class/propertyTypes.test index 49fdf112c1..e502795cfc 100644 --- a/test/code/parser/stmt/class/propertyTypes.test +++ b/test/code/parser/stmt/class/propertyTypes.test @@ -29,7 +29,7 @@ array( name: string ) props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: a ) @@ -47,7 +47,7 @@ array( ) ) props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: b ) @@ -65,7 +65,7 @@ array( ) ) props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: c ) @@ -83,7 +83,7 @@ array( ) ) props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: d ) @@ -93,4 +93,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/simple.test b/test/code/parser/stmt/class/simple.test index 17b45f1c93..fde02c33e1 100644 --- a/test/code/parser/stmt/class/simple.test +++ b/test/code/parser/stmt/class/simple.test @@ -71,7 +71,7 @@ array( flags: PUBLIC (1) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: a ) @@ -79,7 +79,7 @@ array( value: b ) ) - 1: Stmt_PropertyProperty( + 1: PropertyItem( name: VarLikeIdentifier( name: c ) @@ -95,7 +95,7 @@ array( flags: PROTECTED (2) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: e ) @@ -109,7 +109,7 @@ array( flags: PRIVATE (4) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: f ) @@ -205,4 +205,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/disjointNormalFormTypes.test b/test/code/parser/stmt/function/disjointNormalFormTypes.test index 4107a23f93..264023fe85 100644 --- a/test/code/parser/stmt/function/disjointNormalFormTypes.test +++ b/test/code/parser/stmt/function/disjointNormalFormTypes.test @@ -57,7 +57,7 @@ array( ) ) props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: prop ) @@ -154,4 +154,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/intersectionTypes.test b/test/code/parser/stmt/function/intersectionTypes.test index 1ffe50e531..4a7c8fd244 100644 --- a/test/code/parser/stmt/function/intersectionTypes.test +++ b/test/code/parser/stmt/function/intersectionTypes.test @@ -39,7 +39,7 @@ array( ) ) props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: prop ) @@ -100,4 +100,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/unionTypes.test b/test/code/parser/stmt/function/unionTypes.test index ce641475ee..f82724edc9 100644 --- a/test/code/parser/stmt/function/unionTypes.test +++ b/test/code/parser/stmt/function/unionTypes.test @@ -40,7 +40,7 @@ array( ) ) props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: prop ) @@ -97,4 +97,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/newInInitializer.test b/test/code/parser/stmt/newInInitializer.test index f38ade6d50..7ee1574b50 100644 --- a/test/code/parser/stmt/newInInitializer.test +++ b/test/code/parser/stmt/newInInitializer.test @@ -149,7 +149,7 @@ array( flags: PUBLIC (1) type: null props: array( - 0: Stmt_PropertyProperty( + 0: PropertyItem( name: VarLikeIdentifier( name: prop ) @@ -167,4 +167,4 @@ array( ) ) ) -) \ No newline at end of file +) From 4917c71a918a2cad4988e7f2c9eca2fb07e3ef83 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 18:59:48 +0200 Subject: [PATCH 146/428] Rename Stmt\UseUse to UseItem --- UPGRADE-5.0.md | 1 + grammar/php.y | 8 +-- lib/PhpParser/Builder/Use_.php | 2 +- lib/PhpParser/Node/Stmt/GroupUse.php | 5 +- lib/PhpParser/Node/Stmt/UseUse.php | 50 +---------------- lib/PhpParser/Node/Stmt/Use_.php | 5 +- lib/PhpParser/Node/UseItem.php | 55 +++++++++++++++++++ lib/PhpParser/NodeDumper.php | 4 +- lib/PhpParser/NodeVisitor/NameResolver.php | 2 +- lib/PhpParser/Parser/Php7.php | 8 +-- lib/PhpParser/Parser/Php8.php | 8 +-- lib/PhpParser/ParserAbstract.php | 4 +- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- lib/PhpParser/PrettyPrinterAbstract.php | 2 +- test/PhpParser/Builder/UseTest.php | 8 +-- test/PhpParser/CompatibilityTest.php | 5 ++ .../NodeVisitor/NameResolverTest.php | 12 ++-- test/code/parser/errorHandling/recovery.test | 12 ++-- test/code/parser/stmt/namespace/alias.test | 22 ++++---- test/code/parser/stmt/namespace/groupUse.test | 26 ++++----- .../parser/stmt/namespace/groupUseErrors.test | 8 +-- .../stmt/namespace/groupUsePositions.test | 4 +- .../stmt/namespace/groupUseTrailingComma.test | 6 +- .../parser/stmt/namespace/invalidName.test | 6 +- 24 files changed, 140 insertions(+), 125 deletions(-) create mode 100644 lib/PhpParser/Node/UseItem.php diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 05f1c32ef3..8b46b588f5 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -85,6 +85,7 @@ A number of AST nodes have been renamed or moved in the AST hierarchy: * `Node\Stmt\DeclareDeclare` is now `Node\DeclareItem` and no longer extends `Node\Stmt`. * `Node\Stmt\PropertyProperty` is now `Node\PropertyItem` and no longer extends `Node\Stmt`. * `Node\Stmt\StaticVar` is now `Node\StaticVar` and no longer extends `Node\Stmt`. + * `Node\Stmt\UseUse` is now `Node\UseItem` and no longer extends `Node\Stmt`. The old class names have been retained as aliases for backwards compatibility. However, the `Node::getType()` method will now always return the new name (e.g. `ClosureUse` instead of `Expr_ClosureUse`). diff --git a/grammar/php.y b/grammar/php.y index 5779eec3ac..d5de6b9736 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -298,16 +298,16 @@ non_empty_inline_use_declarations: unprefixed_use_declaration: namespace_name - { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } + { $$ = Node\UseItem[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } | namespace_name T_AS identifier_not_reserved - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } + { $$ = Node\UseItem[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } ; use_declaration: legacy_namespace_name - { $$ = Stmt\UseUse[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } + { $$ = Node\UseItem[$1, null, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #1); } | legacy_namespace_name T_AS identifier_not_reserved - { $$ = Stmt\UseUse[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } + { $$ = Node\UseItem[$1, $3, Stmt\Use_::TYPE_UNKNOWN]; $this->checkUseUse($$, #3); } ; inline_use_declaration: diff --git a/lib/PhpParser/Builder/Use_.php b/lib/PhpParser/Builder/Use_.php index 7caed263d4..490594cd00 100644 --- a/lib/PhpParser/Builder/Use_.php +++ b/lib/PhpParser/Builder/Use_.php @@ -42,7 +42,7 @@ public function as(string $alias) { */ public function getNode(): Node { return new Stmt\Use_([ - new Stmt\UseUse($this->name, $this->alias) + new Node\UseItem($this->name, $this->alias) ], $this->type); } } diff --git a/lib/PhpParser/Node/Stmt/GroupUse.php b/lib/PhpParser/Node/Stmt/GroupUse.php index 0a04139550..c1d509dbe5 100644 --- a/lib/PhpParser/Node/Stmt/GroupUse.php +++ b/lib/PhpParser/Node/Stmt/GroupUse.php @@ -4,20 +4,21 @@ use PhpParser\Node\Name; use PhpParser\Node\Stmt; +use PhpParser\Node\UseItem; class GroupUse extends Stmt { /** @var int Type of group use */ public $type; /** @var Name Prefix for uses */ public $prefix; - /** @var UseUse[] Uses */ + /** @var UseItem[] Uses */ public $uses; /** * Constructs a group use node. * * @param Name $prefix Prefix for uses - * @param UseUse[] $uses Uses + * @param UseItem[] $uses Uses * @param int $type Type of group use * @param array $attributes Additional attributes */ diff --git a/lib/PhpParser/Node/Stmt/UseUse.php b/lib/PhpParser/Node/Stmt/UseUse.php index b6a3bfdcf8..85830edc3b 100644 --- a/lib/PhpParser/Node/Stmt/UseUse.php +++ b/lib/PhpParser/Node/Stmt/UseUse.php @@ -1,51 +1,3 @@ attributes = $attributes; - $this->type = $type; - $this->name = $name; - $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; - } - - public function getSubNodeNames(): array { - return ['type', 'name', 'alias']; - } - - /** - * Get alias. If not explicitly given this is the last component of the used name. - * - * @return Identifier - */ - public function getAlias(): Identifier { - if (null !== $this->alias) { - return $this->alias; - } - - return new Identifier($this->name->getLast()); - } - - public function getType(): string { - return 'Stmt_UseUse'; - } -} +require __DIR__ . '/../UseItem.php'; diff --git a/lib/PhpParser/Node/Stmt/Use_.php b/lib/PhpParser/Node/Stmt/Use_.php index 150ee57e53..24c8ff2066 100644 --- a/lib/PhpParser/Node/Stmt/Use_.php +++ b/lib/PhpParser/Node/Stmt/Use_.php @@ -3,6 +3,7 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Stmt; +use PhpParser\Node\UseItem; class Use_ extends Stmt { /** @@ -20,13 +21,13 @@ class Use_ extends Stmt { /** @var int Type of alias */ public $type; - /** @var UseUse[] Aliases */ + /** @var UseItem[] Aliases */ public $uses; /** * Constructs an alias (use) list node. * - * @param UseUse[] $uses Aliases + * @param UseItem[] $uses Aliases * @param int $type Type of alias * @param array $attributes Additional attributes */ diff --git a/lib/PhpParser/Node/UseItem.php b/lib/PhpParser/Node/UseItem.php new file mode 100644 index 0000000000..3c4ed01ad5 --- /dev/null +++ b/lib/PhpParser/Node/UseItem.php @@ -0,0 +1,55 @@ +attributes = $attributes; + $this->type = $type; + $this->name = $name; + $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; + } + + public function getSubNodeNames(): array { + return ['type', 'name', 'alias']; + } + + /** + * Get alias. If not explicitly given this is the last component of the used name. + * + * @return Identifier + */ + public function getAlias(): Identifier { + if (null !== $this->alias) { + return $this->alias; + } + + return new Identifier($this->name->getLast()); + } + + public function getType(): string { + return 'UseItem'; + } +} + +// @deprecated compatibility alias +class_alias(UseItem::class, Stmt\UseUse::class); diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index 7c09087368..802f483986 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -6,7 +6,7 @@ use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\GroupUse; use PhpParser\Node\Stmt\Use_; -use PhpParser\Node\Stmt\UseUse; +use PhpParser\Node\UseItem; class NodeDumper { private $dumpComments; @@ -67,7 +67,7 @@ protected function dumpRecursive($node) { } elseif ('type' === $key && $node instanceof Include_) { $r .= $this->dumpIncludeType($value); } elseif ('type' === $key - && ($node instanceof Use_ || $node instanceof UseUse || $node instanceof GroupUse)) { + && ($node instanceof Use_ || $node instanceof UseItem || $node instanceof GroupUse)) { $r .= $this->dumpUseType($value); } else { $r .= $value; diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index eacbb05d20..d00374bf43 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -160,7 +160,7 @@ public function enterNode(Node $node) { return null; } - private function addAlias(Stmt\UseUse $use, $type, ?Name $prefix = null) { + private function addAlias(Node\UseItem $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 diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 9b40ebc6ec..0fe86518b6 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1567,16 +1567,16 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 137 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 138 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 139 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 140 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 141 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index ccc3cf62c9..a9ddc290da 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1585,16 +1585,16 @@ protected function initReduceCallbacks() { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 137 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 138 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 139 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 140 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 141 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 685bf789b9..c31c97a950 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -24,7 +24,7 @@ use PhpParser\Node\Stmt\Namespace_; use PhpParser\Node\Stmt\Property; use PhpParser\Node\Stmt\TryCatch; -use PhpParser\Node\Stmt\UseUse; +use PhpParser\Node\UseItem; abstract class ParserAbstract implements Parser { private const SYMBOL_NONE = -1; @@ -1021,7 +1021,7 @@ protected function checkProperty(Property $node, $modifierPos) { } } - protected function checkUseUse(UseUse $node, $namePos) { + protected function checkUseUse(UseItem $node, $namePos) { if ($node->alias && $node->alias->isSpecialClassName()) { $this->emitError(new Error( sprintf( diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index b920a5246a..cec7ba63bc 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -730,7 +730,7 @@ protected function pStmt_GroupUse(Stmt\GroupUse $node) { . '\{' . $this->pCommaSeparated($node->uses) . '};'; } - protected function pStmt_UseUse(Stmt\UseUse $node) { + protected function pUseItem(Node\UseItem $node) { return $this->pUseType($node->type) . $this->p($node->name) . (null !== $node->alias ? ' as ' . $node->alias : ''); } diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 559c90101a..d248660984 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1507,6 +1507,6 @@ protected function initializeModifierChangeMap() { // Expr_Include->type // Stmt_GroupUse->type // Stmt_Use->type - // Stmt_UseUse->type + // UseItem->type } } diff --git a/test/PhpParser/Builder/UseTest.php b/test/PhpParser/Builder/UseTest.php index 97f240efaf..2952d44099 100644 --- a/test/PhpParser/Builder/UseTest.php +++ b/test/PhpParser/Builder/UseTest.php @@ -14,22 +14,22 @@ protected function createUseBuilder($name, $type = Stmt\Use_::TYPE_NORMAL) { public function testCreation() { $node = $this->createUseBuilder('Foo\Bar')->getNode(); $this->assertEquals(new Stmt\Use_([ - new Stmt\UseUse(new Name('Foo\Bar'), null) + new \PhpParser\Node\UseItem(new Name('Foo\Bar'), null) ]), $node); $node = $this->createUseBuilder(new Name('Foo\Bar'))->as('XYZ')->getNode(); $this->assertEquals(new Stmt\Use_([ - new Stmt\UseUse(new Name('Foo\Bar'), 'XYZ') + new \PhpParser\Node\UseItem(new Name('Foo\Bar'), 'XYZ') ]), $node); $node = $this->createUseBuilder('foo\bar', Stmt\Use_::TYPE_FUNCTION)->as('foo')->getNode(); $this->assertEquals(new Stmt\Use_([ - new Stmt\UseUse(new Name('foo\bar'), 'foo') + new \PhpParser\Node\UseItem(new Name('foo\bar'), 'foo') ], Stmt\Use_::TYPE_FUNCTION), $node); $node = $this->createUseBuilder('foo\BAR', Stmt\Use_::TYPE_CONSTANT)->as('FOO')->getNode(); $this->assertEquals(new Stmt\Use_([ - new Stmt\UseUse(new Name('foo\BAR'), 'FOO') + new \PhpParser\Node\UseItem(new Name('foo\BAR'), 'FOO') ], Stmt\Use_::TYPE_CONSTANT), $node); } } diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index fa1ecac64c..71f1f236b8 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -4,6 +4,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\InterpolatedStringPart; +use PhpParser\Node\Name; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; @@ -32,6 +33,8 @@ public function testAliases1() { $this->assertTrue($node instanceof Stmt\DeclareDeclare); $node = new Node\PropertyItem('x'); $this->assertTrue($node instanceof Stmt\PropertyProperty); + $node = new Node\UseItem(new Name('X')); + $this->assertTrue($node instanceof Stmt\UseUse); } /** @@ -58,5 +61,7 @@ public function testAliases2() { $this->assertTrue($node instanceof Node\DeclareItem); $node = new Stmt\PropertyProperty('x'); $this->assertTrue($node instanceof Node\PropertyItem); + $node = new Stmt\UseUse(new Name('X')); + $this->assertTrue($node instanceof Node\UseItem); } } diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index 86b29ba966..e7b986c55f 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -404,22 +404,22 @@ public function provideTestError() { return [ [ new Stmt\Use_([ - new Stmt\UseUse(new Name('A\B'), 'B', 0, ['startLine' => 1]), - new Stmt\UseUse(new Name('C\D'), 'B', 0, ['startLine' => 2]), + new Node\UseItem(new Name('A\B'), 'B', 0, ['startLine' => 1]), + new Node\UseItem(new Name('C\D'), 'B', 0, ['startLine' => 2]), ], Stmt\Use_::TYPE_NORMAL), 'Cannot use C\D as B because the name is already in use on line 2' ], [ new Stmt\Use_([ - new Stmt\UseUse(new Name('a\b'), 'b', 0, ['startLine' => 1]), - new Stmt\UseUse(new Name('c\d'), 'B', 0, ['startLine' => 2]), + new Node\UseItem(new Name('a\b'), 'b', 0, ['startLine' => 1]), + new Node\UseItem(new Name('c\d'), 'B', 0, ['startLine' => 2]), ], Stmt\Use_::TYPE_FUNCTION), 'Cannot use function c\d as B because the name is already in use on line 2' ], [ new Stmt\Use_([ - new Stmt\UseUse(new Name('A\B'), 'B', 0, ['startLine' => 1]), - new Stmt\UseUse(new Name('C\D'), 'B', 0, ['startLine' => 2]), + new Node\UseItem(new Name('A\B'), 'B', 0, ['startLine' => 1]), + new Node\UseItem(new Name('C\D'), 'B', 0, ['startLine' => 2]), ], Stmt\Use_::TYPE_CONSTANT), 'Cannot use const C\D as B because the name is already in use on line 2' ], diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index c736d60002..e26bdd127c 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -463,7 +463,7 @@ array( 0: Stmt_Use( type: TYPE_NORMAL (1) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -477,7 +477,7 @@ array( 1: Stmt_Use( type: TYPE_FUNCTION (2) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -496,7 +496,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_NORMAL (1) name: Name( parts: array( @@ -624,7 +624,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_NORMAL (1) name: Name( parts: array( @@ -643,7 +643,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -657,7 +657,7 @@ array( 2: Stmt_Use( type: TYPE_NORMAL (1) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( diff --git a/test/code/parser/stmt/namespace/alias.test b/test/code/parser/stmt/namespace/alias.test index ef3f4256cf..cc158f130f 100644 --- a/test/code/parser/stmt/namespace/alias.test +++ b/test/code/parser/stmt/namespace/alias.test @@ -20,7 +20,7 @@ array( 0: Stmt_Use( type: TYPE_NORMAL (1) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -35,7 +35,7 @@ array( 1: Stmt_Use( type: TYPE_NORMAL (1) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -52,7 +52,7 @@ array( 2: Stmt_Use( type: TYPE_NORMAL (1) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -64,7 +64,7 @@ array( name: H ) ) - 1: Stmt_UseUse( + 1: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -78,7 +78,7 @@ array( 3: Stmt_Use( type: TYPE_NORMAL (1) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -95,7 +95,7 @@ array( 4: Stmt_Use( type: TYPE_NORMAL (1) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -111,7 +111,7 @@ array( 5: Stmt_Use( type: TYPE_FUNCTION (2) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -129,7 +129,7 @@ array( 6: Stmt_Use( type: TYPE_FUNCTION (2) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -146,7 +146,7 @@ array( 7: Stmt_Use( type: TYPE_CONSTANT (3) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -161,7 +161,7 @@ array( 8: Stmt_Use( type: TYPE_CONSTANT (3) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -175,4 +175,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/groupUse.test b/test/code/parser/stmt/namespace/groupUse.test index d68aadba7b..17c8632ddf 100644 --- a/test/code/parser/stmt/namespace/groupUse.test +++ b/test/code/parser/stmt/namespace/groupUse.test @@ -17,7 +17,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_NORMAL (1) name: Name( parts: array( @@ -36,7 +36,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_NORMAL (1) name: Name( parts: array( @@ -46,7 +46,7 @@ array( ) alias: null ) - 1: Stmt_UseUse( + 1: UseItem( type: TYPE_NORMAL (1) name: Name( parts: array( @@ -66,7 +66,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_NORMAL (1) name: Name( parts: array( @@ -76,7 +76,7 @@ array( ) alias: null ) - 1: Stmt_UseUse( + 1: UseItem( type: TYPE_NORMAL (1) name: Name( parts: array( @@ -95,7 +95,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -105,7 +105,7 @@ array( ) alias: null ) - 1: Stmt_UseUse( + 1: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -124,7 +124,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -134,7 +134,7 @@ array( ) alias: null ) - 1: Stmt_UseUse( + 1: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -154,7 +154,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_NORMAL (1) name: Name( parts: array( @@ -164,7 +164,7 @@ array( ) alias: null ) - 1: Stmt_UseUse( + 1: UseItem( type: TYPE_FUNCTION (2) name: Name( parts: array( @@ -174,7 +174,7 @@ array( ) alias: null ) - 2: Stmt_UseUse( + 2: UseItem( type: TYPE_CONSTANT (3) name: Name( parts: array( @@ -185,4 +185,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/groupUseErrors.test b/test/code/parser/stmt/namespace/groupUseErrors.test index da4cc32a41..7c7f5c53ea 100644 --- a/test/code/parser/stmt/namespace/groupUseErrors.test +++ b/test/code/parser/stmt/namespace/groupUseErrors.test @@ -15,7 +15,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_NORMAL (1) name: Name( parts: array( @@ -37,7 +37,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_NORMAL (1) name: Name( parts: array( @@ -59,7 +59,7 @@ array( 0: Stmt_Use( type: TYPE_NORMAL (1) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -108,4 +108,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/groupUsePositions.test b/test/code/parser/stmt/namespace/groupUsePositions.test index 7898b208b0..7e415b4c37 100644 --- a/test/code/parser/stmt/namespace/groupUsePositions.test +++ b/test/code/parser/stmt/namespace/groupUsePositions.test @@ -14,7 +14,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse[2:14 - 2:16]( + 0: UseItem[2:14 - 2:16]( type: TYPE_NORMAL (1) name: Name[2:14 - 2:16]( parts: array( @@ -25,4 +25,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/groupUseTrailingComma.test b/test/code/parser/stmt/namespace/groupUseTrailingComma.test index 8f698a0617..1b9032b05f 100644 --- a/test/code/parser/stmt/namespace/groupUseTrailingComma.test +++ b/test/code/parser/stmt/namespace/groupUseTrailingComma.test @@ -13,7 +13,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_NORMAL (1) name: Name( parts: array( @@ -32,7 +32,7 @@ array( ) ) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -43,4 +43,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/invalidName.test b/test/code/parser/stmt/namespace/invalidName.test index f2c1c69b2a..6f132b3f01 100644 --- a/test/code/parser/stmt/namespace/invalidName.test +++ b/test/code/parser/stmt/namespace/invalidName.test @@ -7,7 +7,7 @@ array( 0: Stmt_Use( type: TYPE_NORMAL (1) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -29,7 +29,7 @@ array( 0: Stmt_Use( type: TYPE_NORMAL (1) uses: array( - 0: Stmt_UseUse( + 0: UseItem( type: TYPE_UNKNOWN (0) name: Name( parts: array( @@ -48,4 +48,4 @@ array( ----- Syntax error, unexpected T_STATIC, expecting T_STRING from 1:16 to 1:21 array( -) \ No newline at end of file +) From 5f3ad31501db987252525f8ea58cc7a2f0886995 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 19:04:22 +0200 Subject: [PATCH 147/428] Fix ArrayItem entries in pretty printer maps The tests were written in such a way that the regression was not caught. --- lib/PhpParser/PrettyPrinterAbstract.php | 4 ++-- test/code/formatPreservation/insertionOfNullable.test | 6 +++--- test/code/formatPreservation/removalViaNull.test | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index d248660984..de6c974f6e 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1250,7 +1250,7 @@ protected function initializeRemovalMap() { $stripEquals = ['left' => '=']; $this->removalMap = [ 'Expr_ArrayDimFetch->dim' => $stripBoth, - 'Expr_ArrayItem->key' => $stripDoubleArrow, + 'ArrayItem->key' => $stripDoubleArrow, 'Expr_ArrowFunction->returnType' => $stripColon, 'Expr_Closure->returnType' => $stripColon, 'Expr_Exit->expr' => $stripBoth, @@ -1293,7 +1293,7 @@ protected function initializeInsertionMap() { // [$find, $beforeToken, $extraLeft, $extraRight] $this->insertionMap = [ 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], - 'Expr_ArrayItem->key' => [null, false, null, ' => '], + 'ArrayItem->key' => [null, false, null, ' => '], 'Expr_ArrowFunction->returnType' => [')', false, ': ', null], 'Expr_Closure->returnType' => [')', false, ': ', null], 'Expr_Ternary->if' => ['?', false, ' ', ' '], diff --git a/test/code/formatPreservation/insertionOfNullable.test b/test/code/formatPreservation/insertionOfNullable.test index 921de02d4a..9822eedea6 100644 --- a/test/code/formatPreservation/insertionOfNullable.test +++ b/test/code/formatPreservation/insertionOfNullable.test @@ -16,7 +16,7 @@ $foo ]; [ - $value + & $value ]; function @@ -107,7 +107,7 @@ $foo ]; [ - 'X' => $value + 'X' => & $value ]; function @@ -191,4 +191,4 @@ try } catch (Exception $e) { -} \ No newline at end of file +} diff --git a/test/code/formatPreservation/removalViaNull.test b/test/code/formatPreservation/removalViaNull.test index 35c40c81b8..4cc43b2a15 100644 --- a/test/code/formatPreservation/removalViaNull.test +++ b/test/code/formatPreservation/removalViaNull.test @@ -43,7 +43,7 @@ $foo ? $bar : $baz; [ $a => $b -, $c => $d]; +, $c => & $d]; yield $foo @@ -149,7 +149,7 @@ $foo ?: $baz; [ $a => $b -, $d]; +, & $d]; yield $bar; @@ -209,4 +209,4 @@ try } catch (Exception) { -} \ No newline at end of file +} From 8ed76726aa6240fd3fc666b8d8eb2633eeaca237 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 19:11:35 +0200 Subject: [PATCH 148/428] Switch modifierChangeMap to use class name For better refactoring support, prefer class name over node type. --- lib/PhpParser/PrettyPrinterAbstract.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index de6c974f6e..0292d575b4 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -9,6 +9,7 @@ use PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\Cast; +use PhpParser\Node\Param; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; @@ -128,7 +129,7 @@ abstract class PrettyPrinterAbstract { */ protected $listInsertionMap; protected $emptyListInsertionMap; - /** @var int[] Map from "{$node->getType()}->{$subNode}" to token before which the modifiers + /** @var int[] Map from "{$class}->{$subNode}" to token before which the modifiers * should be reprinted. */ protected $modifierChangeMap; @@ -576,7 +577,7 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { if (is_int($subNode) && is_int($origSubNode)) { // Check if this is a modifier change - $key = $type . '->' . $subNodeName; + $key = $class . '->' . $subNodeName; if (!isset($this->modifierChangeMap[$key])) { return $this->pFallback($fallbackNode); } @@ -1495,12 +1496,12 @@ protected function initializeModifierChangeMap() { } $this->modifierChangeMap = [ - 'Stmt_ClassConst->flags' => \T_CONST, - 'Stmt_ClassMethod->flags' => \T_FUNCTION, - 'Stmt_Class->flags' => \T_CLASS, - 'Stmt_Property->flags' => \T_VARIABLE, - 'Param->flags' => \T_VARIABLE, - //'Stmt_TraitUseAdaptation_Alias->newModifier' => 0, // TODO + Stmt\ClassConst::class . '->flags' => \T_CONST, + Stmt\ClassMethod::class . '->flags' => \T_FUNCTION, + Stmt\Class_::class . '->flags' => \T_CLASS, + Stmt\Property::class . '->flags' => \T_VARIABLE, + Param::class . '->flags' => \T_VARIABLE, + //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO ]; // List of integer subnodes that are not modifiers: From c585a2d76685e3c2589e756e2b7cf6b6e3fabc32 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 20:56:06 +0200 Subject: [PATCH 149/428] Switch list insertion maps to use class name Also highlights that the list insertion entry for Expr\Match was not used. --- lib/PhpParser/PrettyPrinterAbstract.php | 224 ++++++++++++------------ test/code/formatPreservation/match.test | 2 +- 2 files changed, 117 insertions(+), 109 deletions(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 0292d575b4..18b6beefd9 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -5,13 +5,17 @@ use PhpParser\Internal\DiffElem; use PhpParser\Internal\PrintableNewAnonClassNode; use PhpParser\Internal\TokenStream; +use PhpParser\Node\AttributeGroup; use PhpParser\Node\Expr; use PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\Cast; +use PhpParser\Node\IntersectionType; +use PhpParser\Node\MatchArm; use PhpParser\Node\Param; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; +use PhpParser\Node\UnionType; abstract class PrettyPrinterAbstract { protected const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence @@ -124,10 +128,11 @@ abstract class PrettyPrinterAbstract { */ protected $insertionMap; /** - * @var string[] Map From "{$node->getType()}->{$subNode}" to string that should be inserted + * @var string[] Map From "{$class}->{$subNode}" to string that should be inserted * between elements of this list subnode. */ protected $listInsertionMap; + protected $emptyListInsertionMap; /** @var int[] Map from "{$class}->{$subNode}" to token before which the modifiers * should be reprinted. */ @@ -533,6 +538,7 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { // Normalize node structure of anonymous classes $node = PrintableNewAnonClassNode::fromNewNode($node); $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); + $class = PrintableNewAnonClassNode::class; } // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting @@ -564,7 +570,7 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { if (is_array($subNode) && is_array($origSubNode)) { // Array subnode changed, we might be able to reconstruct it $listResult = $this->pArray( - $subNode, $origSubNode, $pos, $indentAdjustment, $type, $subNodeName, + $subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, $fixupInfo[$subNodeName] ?? null ); if (null === $listResult) { @@ -684,19 +690,19 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { * @param array $origNodes Original nodes * @param int $pos Current token position (updated by reference) * @param int $indentAdjustment Adjustment for indentation - * @param string $parentNodeType Type of the containing node. + * @param string $parentNodeClass Class of the containing node. * @param string $subNodeName Name of array subnode. * @param null|int $fixup Fixup information for array item nodes * * @return null|string Result of pretty print or null if cannot preserve formatting */ protected function pArray( - array $nodes, array $origNodes, int &$pos, int $indentAdjustment, - string $parentNodeType, string $subNodeName, ?int $fixup + array $nodes, array $origNodes, int &$pos, int $indentAdjustment, + string $parentNodeClass, string $subNodeName, ?int $fixup ): ?string { $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); - $mapKey = $parentNodeType . '->' . $subNodeName; + $mapKey = $parentNodeClass . '->' . $subNodeName; $insertStr = $this->listInsertionMap[$mapKey] ?? null; $isStmtList = $subNodeName === 'stmts'; @@ -1338,87 +1344,89 @@ protected function initializeListInsertionMap() { // special //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully //'Scalar_InterpolatedString->parts' => '', - 'Stmt_Catch->types' => '|', - 'UnionType->types' => '|', - 'IntersectionType->types' => '&', - 'Stmt_If->elseifs' => ' ', - 'Stmt_TryCatch->catches' => ' ', + Stmt\Catch_::class . '->types' => '|', + UnionType::class . '->types' => '|', + IntersectionType::class . '->types' => '&', + Stmt\If_::class . '->elseifs' => ' ', + Stmt\TryCatch::class . '->catches' => ' ', // comma-separated lists - 'Expr_Array->items' => ', ', - 'Expr_ArrowFunction->params' => ', ', - 'Expr_Closure->params' => ', ', - 'Expr_Closure->uses' => ', ', - 'Expr_FuncCall->args' => ', ', - 'Expr_Isset->vars' => ', ', - 'Expr_List->items' => ', ', - 'Expr_MethodCall->args' => ', ', - 'Expr_NullsafeMethodCall->args' => ', ', - 'Expr_New->args' => ', ', - 'Expr_PrintableNewAnonClass->args' => ', ', - 'Expr_StaticCall->args' => ', ', - 'Stmt_ClassConst->consts' => ', ', - 'Stmt_ClassMethod->params' => ', ', - 'Stmt_Class->implements' => ', ', - 'Stmt_Enum->implements' => ', ', - 'Expr_PrintableNewAnonClass->implements' => ', ', - 'Stmt_Const->consts' => ', ', - 'Stmt_Declare->declares' => ', ', - 'Stmt_Echo->exprs' => ', ', - 'Stmt_For->init' => ', ', - 'Stmt_For->cond' => ', ', - 'Stmt_For->loop' => ', ', - 'Stmt_Function->params' => ', ', - 'Stmt_Global->vars' => ', ', - 'Stmt_GroupUse->uses' => ', ', - 'Stmt_Interface->extends' => ', ', - 'Stmt_Match->arms' => ', ', - 'Stmt_Property->props' => ', ', - 'Stmt_StaticVar->vars' => ', ', - 'Stmt_TraitUse->traits' => ', ', - 'Stmt_TraitUseAdaptation_Precedence->insteadof' => ', ', - 'Stmt_Unset->vars' => ', ', - 'Stmt_Use->uses' => ', ', - 'MatchArm->conds' => ', ', - 'AttributeGroup->attrs' => ', ', + Expr\Array_::class . '->items' => ', ', + Expr\ArrowFunction::class . '->params' => ', ', + Expr\Closure::class . '->params' => ', ', + Expr\Closure::class . '->uses' => ', ', + Expr\FuncCall::class . '->args' => ', ', + Expr\Isset_::class . '->vars' => ', ', + Expr\List_::class . '->items' => ', ', + Expr\MethodCall::class . '->args' => ', ', + Expr\NullsafeMethodCall::class . '->args' => ', ', + Expr\New_::class . '->args' => ', ', + PrintableNewAnonClassNode::class . '->args' => ', ', + Expr\StaticCall::class . '->args' => ', ', + Stmt\ClassConst::class . '->consts' => ', ', + Stmt\ClassMethod::class . '->params' => ', ', + Stmt\Class_::class . '->implements' => ', ', + Stmt\Enum_::class . '->implements' => ', ', + PrintableNewAnonClassNode::class . '->implements' => ', ', + Stmt\Const_::class . '->consts' => ', ', + Stmt\Declare_::class . '->declares' => ', ', + Stmt\Echo_::class . '->exprs' => ', ', + Stmt\For_::class . '->init' => ', ', + Stmt\For_::class . '->cond' => ', ', + Stmt\For_::class . '->loop' => ', ', + Stmt\Function_::class . '->params' => ', ', + Stmt\Global_::class . '->vars' => ', ', + Stmt\GroupUse::class . '->uses' => ', ', + Stmt\Interface_::class . '->extends' => ', ', + //Expr\Match_::class . '->arms' => ', ', + Stmt\Property::class . '->props' => ', ', + Stmt\StaticVar::class . '->vars' => ', ', + Stmt\TraitUse::class . '->traits' => ', ', + Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ', + Stmt\Unset_::class . '->vars' => ', ', + Stmt\UseUse::class . '->uses' => ', ', + MatchArm::class . '->conds' => ', ', + AttributeGroup::class . '->attrs' => ', ', // statement lists - 'Expr_Closure->stmts' => "\n", - 'Stmt_Case->stmts' => "\n", - 'Stmt_Catch->stmts' => "\n", - 'Stmt_Class->stmts' => "\n", - 'Stmt_Enum->stmts' => "\n", - 'Expr_PrintableNewAnonClass->stmts' => "\n", - 'Stmt_Interface->stmts' => "\n", - 'Stmt_Trait->stmts' => "\n", - 'Stmt_ClassMethod->stmts' => "\n", - 'Stmt_Declare->stmts' => "\n", - 'Stmt_Do->stmts' => "\n", - 'Stmt_ElseIf->stmts' => "\n", - 'Stmt_Else->stmts' => "\n", - 'Stmt_Finally->stmts' => "\n", - 'Stmt_Foreach->stmts' => "\n", - 'Stmt_For->stmts' => "\n", - 'Stmt_Function->stmts' => "\n", - 'Stmt_If->stmts' => "\n", - 'Stmt_Namespace->stmts' => "\n", - 'Stmt_Class->attrGroups' => "\n", - 'Stmt_Enum->attrGroups' => "\n", - 'Stmt_EnumCase->attrGroups' => "\n", - 'Stmt_Interface->attrGroups' => "\n", - 'Stmt_Trait->attrGroups' => "\n", - 'Stmt_Function->attrGroups' => "\n", - 'Stmt_ClassMethod->attrGroups' => "\n", - 'Stmt_ClassConst->attrGroups' => "\n", - 'Stmt_Property->attrGroups' => "\n", - 'Expr_PrintableNewAnonClass->attrGroups' => ' ', - 'Expr_Closure->attrGroups' => ' ', - 'Expr_ArrowFunction->attrGroups' => ' ', - 'Param->attrGroups' => ' ', - 'Stmt_Switch->cases' => "\n", - 'Stmt_TraitUse->adaptations' => "\n", - 'Stmt_TryCatch->stmts' => "\n", - 'Stmt_While->stmts' => "\n", + Expr\Closure::class . '->stmts' => "\n", + Stmt\Case_::class . '->stmts' => "\n", + Stmt\Catch_::class . '->stmts' => "\n", + Stmt\Class_::class . '->stmts' => "\n", + Stmt\Enum_::class . '->stmts' => "\n", + PrintableNewAnonClassNode::class . '->stmts' => "\n", + Stmt\Interface_::class . '->stmts' => "\n", + Stmt\Trait_::class . '->stmts' => "\n", + Stmt\ClassMethod::class . '->stmts' => "\n", + Stmt\Declare_::class . '->stmts' => "\n", + Stmt\Do_::class . '->stmts' => "\n", + Stmt\ElseIf_::class . '->stmts' => "\n", + Stmt\Else_::class . '->stmts' => "\n", + Stmt\Finally_::class . '->stmts' => "\n", + Stmt\Foreach_::class . '->stmts' => "\n", + Stmt\For_::class . '->stmts' => "\n", + Stmt\Function_::class . '->stmts' => "\n", + Stmt\If_::class . '->stmts' => "\n", + Stmt\Namespace_::class . '->stmts' => "\n", + + // Attribute groups + Stmt\Class_::class . '->attrGroups' => "\n", + Stmt\Enum_::class . '->attrGroups' => "\n", + Stmt\EnumCase::class . '->attrGroups' => "\n", + Stmt\Interface_::class . '->attrGroups' => "\n", + Stmt\Trait_::class . '->attrGroups' => "\n", + Stmt\Function_::class . '->attrGroups' => "\n", + Stmt\ClassMethod::class . '->attrGroups' => "\n", + Stmt\ClassConst::class . '->attrGroups' => "\n", + Stmt\Property::class . '->attrGroups' => "\n", + PrintableNewAnonClassNode::class . '->attrGroups' => ' ', + Expr\Closure::class . '->attrGroups' => ' ', + Expr\ArrowFunction::class . '->attrGroups' => ' ', + Param::class . '->attrGroups' => ' ', + Stmt\Switch_::class . '->cases' => "\n", + Stmt\TraitUse::class . '->adaptations' => "\n", + Stmt\TryCatch::class . '->stmts' => "\n", + Stmt\While_::class . '->stmts' => "\n", // dummy for top-level context 'File->stmts' => "\n", @@ -1434,31 +1442,31 @@ protected function initializeEmptyListInsertionMap() { // [$find, $extraLeft, $extraRight] $this->emptyListInsertionMap = [ - 'Expr_ArrowFunction->params' => ['(', '', ''], - 'Expr_Closure->uses' => [')', ' use (', ')'], - 'Expr_Closure->params' => ['(', '', ''], - 'Expr_FuncCall->args' => ['(', '', ''], - 'Expr_MethodCall->args' => ['(', '', ''], - 'Expr_NullsafeMethodCall->args' => ['(', '', ''], - 'Expr_New->args' => ['(', '', ''], - 'Expr_PrintableNewAnonClass->args' => ['(', '', ''], - 'Expr_PrintableNewAnonClass->implements' => [null, ' implements ', ''], - 'Expr_StaticCall->args' => ['(', '', ''], - 'Stmt_Class->implements' => [null, ' implements ', ''], - 'Stmt_Enum->implements' => [null, ' implements ', ''], - 'Stmt_ClassMethod->params' => ['(', '', ''], - 'Stmt_Interface->extends' => [null, ' extends ', ''], - 'Stmt_Function->params' => ['(', '', ''], - 'Stmt_Interface->attrGroups' => [null, '', "\n"], - 'Stmt_Class->attrGroups' => [null, '', "\n"], - 'Stmt_ClassConst->attrGroups' => [null, '', "\n"], - 'Stmt_ClassMethod->attrGroups' => [null, '', "\n"], - 'Stmt_Function->attrGroups' => [null, '', "\n"], - 'Stmt_Property->attrGroups' => [null, '', "\n"], - 'Stmt_Trait->attrGroups' => [null, '', "\n"], - 'Expr_ArrowFunction->attrGroups' => [null, '', ' '], - 'Expr_Closure->attrGroups' => [null, '', ' '], - 'Expr_PrintableNewAnonClass->attrGroups' => [\T_NEW, ' ', ''], + Expr\ArrowFunction::class . '->params' => ['(', '', ''], + Expr\Closure::class . '->uses' => [')', ' use (', ')'], + Expr\Closure::class . '->params' => ['(', '', ''], + Expr\FuncCall::class . '->args' => ['(', '', ''], + Expr\MethodCall::class . '->args' => ['(', '', ''], + Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], + Expr\New_::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], + Expr\StaticCall::class . '->args' => ['(', '', ''], + Stmt\Class_::class . '->implements' => [null, ' implements ', ''], + Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], + Stmt\ClassMethod::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], + Stmt\Function_::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], + Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Property::class . '->attrGroups' => [null, '', "\n"], + Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], + Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], + Expr\Closure::class . '->attrGroups' => [null, '', ' '], + PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], /* These cannot be empty to start with: * Expr_Isset->vars diff --git a/test/code/formatPreservation/match.test b/test/code/formatPreservation/match.test index 4ea70915f5..4ec17bf1e0 100644 --- a/test/code/formatPreservation/match.test +++ b/test/code/formatPreservation/match.test @@ -86,4 +86,4 @@ $stmts[0]->expr->expr->arms[0]->conds = null; // TODO: Preserve formatting? $value = match (1) { default => 'test', -}; \ No newline at end of file +}; From a77285330741134e5566c2f9a723b1c0657c189c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 3 Sep 2022 21:02:34 +0200 Subject: [PATCH 150/428] Fix formatting preservation for match --- lib/PhpParser/PrettyPrinterAbstract.php | 6 ++++-- test/code/formatPreservation/match.test | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 18b6beefd9..1f0a962996 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -826,8 +826,10 @@ protected function pArray( // We go multiline if the original code was multiline, // or if it's an array item with a comment above it. + // Match always uses multiline formatting. if ($insertStr === ', ' && - ($this->isMultiline($origNodes) || $arrItem->getComments()) + ($this->isMultiline($origNodes) || $arrItem->getComments() || + $parentNodeClass === Expr\Match_::class) ) { $insertStr = ','; $insertNewline = true; @@ -1378,7 +1380,7 @@ protected function initializeListInsertionMap() { Stmt\Global_::class . '->vars' => ', ', Stmt\GroupUse::class . '->uses' => ', ', Stmt\Interface_::class . '->extends' => ', ', - //Expr\Match_::class . '->arms' => ', ', + Expr\Match_::class . '->arms' => ', ', Stmt\Property::class . '->props' => ', ', Stmt\StaticVar::class . '->vars' => ', ', Stmt\TraitUse::class . '->traits' => ', ', diff --git a/test/code/formatPreservation/match.test b/test/code/formatPreservation/match.test index 4ec17bf1e0..3a7ff6395b 100644 --- a/test/code/formatPreservation/match.test +++ b/test/code/formatPreservation/match.test @@ -1,7 +1,8 @@ Matches ----- 'one' @@ -10,11 +11,12 @@ $value = match (1) { $stmts[0]->expr->expr->arms[] = new Node\MatchArm(null, new Scalar\String_('two')); ----- 'one', - default => 'two', + default => 'two' }; ----- Date: Sat, 3 Sep 2022 22:14:41 +0200 Subject: [PATCH 151/428] Update changelog --- CHANGELOG.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81c7f120f7..18c65f829f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,46 @@ Version 5.0.0-dev ----------------- +See UPGRADE-5.0 for detailed migration instructions. + ### Changed -* PHP 7.1 is now required to run PHP-Parser (however, older versions can still be parsed). +* PHP 7.1 is now required to run PHP-Parser. +* Formatting of the standard pretty printer has been adjusted to match PSR-12 more closely. +* The internal token representation now uses a `PhpParser\Token` class, which is compatible with + PHP 8 token representation (`PhpToken`). +* Destructuring is now always represented using `Expr\List_` nodes, even if it uses `[]` syntax. +* Renamed a number of node classes, and moved things that were not real expressions/statements + outside the `Expr`/`Stmt` hierarchy. Compatibility shims for the old names have been retained. -Version 4.14.1-dev ------------------- +### Added + +* Added `PhpVersion` class, which is accepted in a number of places (e.g. ParserFactory, Parser, + Lexer, PrettyPrinter) and gives more precise control over the PHP version being targeted. +* Added PHP 8 parser though it only differs from the PHP 7 parser in concatenation precedence. +* Added `Parser::getLexer()` method. +* Added a `Modifiers` class, as a replacement for `Stmt\Class_::MODIFIER_*`. +* Added support for returning an array or `REMOVE_NODE` from `NodeVisitor::enterNode()`. + +### Removed + +* The PHP 5 parser has been removed. The PHP 7 parser has been adjusted to deal with PHP 5 code + more gracefully. + +Version 4.15.0 (2022-09-03) +--------------------------- + +### Added + +* PHP 8.2: Added support for `true` type. +* PHP 8.2: Added support for DNF types. + +### Fixed -Nothing yet. +* Support `readonly` as a function name. +* Added `__serialize` and `__unserialize` to magic method list. +* Fixed bounds check in `Name::slice()`. +* Fixed formatting preservation when adding attributes to a class/method/etc that previously had none. Version 4.14.0 (2022-05-31) --------------------------- From 44c6a97705a5611c6c2f3b4f20105bcb1aab666b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 4 Sep 2022 09:25:36 +0200 Subject: [PATCH 152/428] Fix empty list insertion of multiple attributes --- lib/PhpParser/PrettyPrinterAbstract.php | 3 +++ test/code/formatPreservation/attributes.test | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 1f0a962996..1c1876870d 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -925,6 +925,9 @@ protected function pArray( foreach ($delayedAdd as $delayedAddNode) { if (!$first) { $result .= $insertStr; + if ($insertNewline) { + $result .= $this->nl; + } } $result .= $this->p($delayedAddNode, true); $first = false; diff --git a/test/code/formatPreservation/attributes.test b/test/code/formatPreservation/attributes.test index bc448e7d04..264dc9b6d3 100644 --- a/test/code/formatPreservation/attributes.test +++ b/test/code/formatPreservation/attributes.test @@ -105,8 +105,13 @@ fn() $attrGroup = new Node\AttributeGroup([ new Node\Attribute(new Node\Name('A'), []), ]); +$attrGroup2 = new Node\AttributeGroup([ + new Node\Attribute(new Node\Name('B'), []), +]); $stmts[0]->attrGroups[] = $attrGroup; +$stmts[0]->attrGroups[] = $attrGroup2; $stmts[0]->stmts[0]->attrGroups[] = $attrGroup; +$stmts[0]->stmts[0]->attrGroups[] = $attrGroup2; $stmts[0]->stmts[1]->attrGroups[] = $attrGroup; $stmts[0]->stmts[2]->attrGroups[] = $attrGroup; $stmts[1]->attrGroups[] = $attrGroup; @@ -118,8 +123,10 @@ $stmts[6]->expr->attrGroups[] = $attrGroup; ----- Date: Sun, 4 Sep 2022 16:16:25 +0200 Subject: [PATCH 153/428] Partial documentation update --- README.md | 10 ++-- doc/0_Introduction.markdown | 25 ++++++-- doc/2_Usage_of_basic_components.markdown | 76 +++++++++++++----------- lib/PhpParser/Lexer.php | 1 - 4 files changed, 65 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index e1426da3cb..ca7453681e 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,12 @@ 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 8.1 parser written in PHP. Its purpose is to simplify static code analysis and +This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and manipulation. [Documentation for version 5.x][doc_master] (in development; for running on PHP >= 7.1; for parsing PHP 7.0 to PHP 8.2, with limited support for parsing PHP 5.x). -[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.1). +[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.2). [Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2). @@ -17,12 +17,12 @@ Features The main features provided by this library are: - * Parsing PHP 5, PHP 7, and PHP 8 code into an abstract syntax tree (AST). + * Parsing PHP 7, and PHP 8 code into an abstract syntax tree (AST). * Invalid code can be parsed into a partial AST. * The AST contains accurate location information. * Dumping the AST in human-readable form. * Converting an AST back to PHP code. - * Experimental: Formatting can be preserved for partially changed ASTs. + * Formatting can be preserved for partially changed ASTs. * Infrastructure to traverse and modify ASTs. * Resolution of namespaced names. * Evaluation of constant expressions. @@ -53,7 +53,7 @@ function test($foo) } CODE; -$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); +$parser = (new ParserFactory())->createForNewestSupportedVersion(); try { $ast = $parser->parse($code); } catch (Error $error) { diff --git a/doc/0_Introduction.markdown b/doc/0_Introduction.markdown index 85b22f980a..3f12e366b0 100644 --- a/doc/0_Introduction.markdown +++ b/doc/0_Introduction.markdown @@ -1,7 +1,7 @@ Introduction ============ -This project is a PHP 5.2 to PHP 8.0 parser **written in PHP itself**. +This project is a PHP parser **written in PHP itself**. What is this for? ----------------- @@ -26,16 +26,29 @@ programmatic PHP code analysis are incidentally PHP developers, not C developers What can it parse? ------------------ -The parser supports parsing PHP 5.2-8.0, with the following exceptions: +The parser supports parsing PHP 7 and PHP 8 code, with the following exceptions: * Namespaced names containing whitespace (e.g. `Foo \ Bar` instead of `Foo\Bar`) are not supported. These are illegal in PHP 8, but are legal in earlier versions. However, PHP-Parser does not support them for any version. +PHP-Parser 4.x had full support for parsing PHP 5. PHP-Parser 5.x has only limited support, with the +following caveats: + + * Some variable expressions like `$$foo[0]` are valid in both PHP 5 and PHP 7, but have different + interpretation. In such cases, the PHP 7 AST will always be constructed (using `($$foo)[0]` + rather than `${$foo[0]}`). + * Declarations of the form `global $$var[0]` are not supported in PHP 7 and will cause a parse + error. In error recovery mode, it is possible to continue parsing after such declarations. + 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.4 source code running on PHP 7.0, for example. This emulation is somewhat -hacky and not perfect, but it should work well on any sane code. +This allows to parse PHP 8.0 source code running on PHP 7.1, for example. This emulation is not +perfect, but works well in practice. + +Finally, it should be noted that the parser aims to accept all valid code, not reject all invalid +code. It will generally accept code that is only valid in newer versions (even when targeting an +older one), and accept code that is syntactically correct, but would result in a compiler error. What output does it produce? ---------------------------- @@ -63,7 +76,7 @@ This matches the structure of the code: An echo statement, which takes two strin 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. +However, it does retain accurate position information, which can be used to inspect precise formatting. What else can it do? -------------------- @@ -74,7 +87,7 @@ Apart from the parser itself this package also bundles support for some other, r 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 JSON - * Support for dumping the node tree in a human readable form (see the section above for an + * 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 diff --git a/doc/2_Usage_of_basic_components.markdown b/doc/2_Usage_of_basic_components.markdown index 599de1e640..2a0a89bee3 100644 --- a/doc/2_Usage_of_basic_components.markdown +++ b/doc/2_Usage_of_basic_components.markdown @@ -12,7 +12,7 @@ To bootstrap the library, include the autoloader generated by composer: require 'path/to/vendor/autoload.php'; ``` -Additionally you may want to set the `xdebug.max_nesting_level` ini option to a higher value: +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); @@ -29,25 +29,29 @@ In order to parse code, you first have to create a parser instance: ```php use PhpParser\ParserFactory; -$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); -``` +use PhpParser\PhpVersion; + +// Parser for the version you are running on. +$parser = (new ParserFactory())->createForHostVersion(); -The factory accepts a kind argument, that determines how different PHP versions are treated: +// Parser for the newest PHP version supported by the PHP-Parser library. +$parser = (new ParserFactory())->createForNewestSupportedVersion(); -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. +// Parser for a specific PHP version. +$parser = (new ParserFactory())->createForVersion(PhpVersion::fromString('8.1')); +``` -Unless you have a strong reason to use something else, `PREFER_PHP7` is a reasonable default. +Which version you should target depends on your use case. In many cases you will want to use the +host version, as people typically analyze code for the version they are running on. However, when +analyzing arbitrary code you are usually best off using the newest supported version, which tends +to accept the widest range of code (unless there are breaking changes in PHP). -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). +The `createXYZ()` methods optionally accept an array of lexer options. Some use cases that require +customized lexer options are discussed in the [lexer documentation](component/Lexer.markdown). -Subsequently you can pass PHP code (including the opening `create(ParserFactory::PREFER_PHP7); +$parser = (new ParserFactory())->createForHostVersion(); try { $stmts = $parser->parse($code); @@ -77,7 +81,7 @@ A parser instance can be reused to parse multiple files. Node dumping ------------ -To dump the abstract syntax tree in human readable form, a `NodeDumper` can be used: +To dump the abstract syntax tree in human-readable form, a `NodeDumper` can be used: ```php create(ParserFactory::PREFER_PHP7); -$prettyPrinter = new PrettyPrinter\Standard; +$parser = (new ParserFactory())->createForHostVersion(); +$prettyPrinter = new PrettyPrinter\Standard(); try { // parse @@ -254,10 +257,13 @@ single expression using `prettyPrintExpr()`. The `prettyPrintFile()` method can be used to print an entire file. This will include the opening ` Read more: [Pretty printing documentation](component/Pretty_printing.markdown) -Node traversation ------------------ +Node traversal +-------------- 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. @@ -272,7 +278,7 @@ use PhpParser\NodeTraverser; use PhpParser\ParserFactory; use PhpParser\PrettyPrinter; -$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); +$parser = (new ParserFactory())->createForHostVersion(); $traverser = new NodeTraverser; $prettyPrinter = new PrettyPrinter\Standard; @@ -303,8 +309,7 @@ The corresponding node visitor might look like this: use PhpParser\Node; use PhpParser\NodeVisitorAbstract; -class MyNodeVisitor extends NodeVisitorAbstract -{ +class MyNodeVisitor extends NodeVisitorAbstract { public function leaveNode(Node $node) { if ($node instanceof Node\Scalar\String_) { $node->value = 'foo'; @@ -326,7 +331,7 @@ 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 +traverser was called with. This method can be used for resetting values before traversal or preparing the tree for traversal. The `afterTraverse()` method is similar to the `beforeTraverse()` method, with the only difference that @@ -342,8 +347,8 @@ The `enterNode()` method can additionally return the value `NodeTraverser::DONT_ which instructs the traverser to skip all children of the current node. To furthermore prevent subsequent visitors from visiting the current node, `NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN` can be used instead. -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 +Both methods 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)`. @@ -372,8 +377,9 @@ unqualified function and constant names. These are resolved at runtime and thus 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`. +Additionally, 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`. > Read more: [Name resolution documentation](component/Name_resolution.markdown) @@ -396,7 +402,7 @@ use PhpParser\NodeVisitor\NameResolver; $inDir = '/some/path'; $outDir = '/some/other/path'; -$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); +$parser = (new ParserFactory())->createForNewestSupportedVersion(); $traverser = new NodeTraverser; $prettyPrinter = new PrettyPrinter\Standard; diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 842852af0e..cff6bd4e21 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -15,7 +15,6 @@ class Lexer { protected $pos; protected $prevCloseTagHasNewline; - protected $tokenMap; protected $dropTokens; private $attributeStartLineUsed; From e68b17cc3b97497ce8b9c617a62507c07843f50d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 4 Sep 2022 16:31:39 +0200 Subject: [PATCH 154/428] Add --version flag to php-parse --- bin/php-parse | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bin/php-parse b/bin/php-parse index bb3e46df4b..c0bd423afc 100755 --- a/bin/php-parse +++ b/bin/php-parse @@ -26,13 +26,10 @@ if (empty($files)) { showHelp("Must specify at least one file."); } -$lexer = new PhpParser\Lexer\Emulative(['usedAttributes' => [ +$lexerOptions = ['usedAttributes' => [ 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments' -]]); -$parser = (new PhpParser\ParserFactory)->create( - PhpParser\ParserFactory::PREFER_PHP7, - $lexer -); +]]; +$parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version'], $lexerOptions); $dumper = new PhpParser\NodeDumper([ 'dumpComments' => true, 'dumpPositions' => $attributes['with-positions'], @@ -108,7 +105,7 @@ function showHelp($error = '') { if ($error) { fwrite(STDERR, $error . "\n\n"); } - fwrite($error ? STDERR : STDOUT, << false, 'with-positions' => false, 'with-recovery' => false, + 'version' => PhpParser\PhpVersion::getNewestSupported(), ]; array_shift($args); @@ -193,7 +192,9 @@ function parseArgs($args) { $parseOptions = false; break; default: - if ($arg[0] === '-') { + if (preg_match('/^--version=(.*)$/', $arg, $matches)) { + $attributes['version'] = PhpParser\PhpVersion::fromString($matches[1]); + } elseif ($arg[0] === '-') { showHelp("Invalid operation $arg."); } else { $files[] = $arg; From 8d02d37e421aff9f90a1fcc699334a0de0e55fc3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 4 Sep 2022 18:55:27 +0200 Subject: [PATCH 155/428] More docs updates --- doc/component/AST_builders.markdown | 2 +- .../Constant_expression_evaluation.markdown | 5 +-- doc/component/Error_handling.markdown | 10 +++--- doc/component/FAQ.markdown | 4 +-- doc/component/JSON_representation.markdown | 2 +- doc/component/Lexer.markdown | 30 ++++++++-------- doc/component/Name_resolution.markdown | 6 ++-- doc/component/Pretty_printing.markdown | 34 ++++++++++--------- doc/component/Walking_the_AST.markdown | 7 ++-- 9 files changed, 53 insertions(+), 47 deletions(-) diff --git a/doc/component/AST_builders.markdown b/doc/component/AST_builders.markdown index 60ae0192df..0be51e0fad 100644 --- a/doc/component/AST_builders.markdown +++ b/doc/component/AST_builders.markdown @@ -101,7 +101,7 @@ abstract class SomeOtherClass extends SomeClass implements A\Few, \Interfaces * * @param SomeClass And takes a parameter */ - public abstract function someMethod(SomeClass $someParam) : bool; + public abstract function someMethod(SomeClass $someParam): bool; protected function anotherMethod($someParam = 'test') { print $someParam; diff --git a/doc/component/Constant_expression_evaluation.markdown b/doc/component/Constant_expression_evaluation.markdown index 45f576c594..48ec29652a 100644 --- a/doc/component/Constant_expression_evaluation.markdown +++ b/doc/component/Constant_expression_evaluation.markdown @@ -19,9 +19,9 @@ PHP-Parser supports evaluation of such constant expressions through the `ConstEx use PhpParser\{ConstExprEvaluator, ConstExprEvaluationException}; -$evalutator = new ConstExprEvaluator(); +$evaluator = new ConstExprEvaluator(); try { - $value = $evalutator->evaluateSilently($someExpr); + $value = $evaluator->evaluateSilently($someExpr); } catch (ConstExprEvaluationException $e) { // Either the expression contains unsupported expression types, // or an error occurred during evaluation @@ -69,6 +69,7 @@ expressions, apart from the following: * `Scalar\MagicConst\*` * `Expr\ConstFetch` (only null/false/true are handled) * `Expr\ClassConstFetch` + * `Expr\New_` (since PHP 8.1) Handling these expression types requires non-local information, such as which global constants are defined. By default, the evaluator will throw a `ConstExprEvaluationException` when it encounters diff --git a/doc/component/Error_handling.markdown b/doc/component/Error_handling.markdown index fc088130ea..ac8919b590 100644 --- a/doc/component/Error_handling.markdown +++ b/doc/component/Error_handling.markdown @@ -14,10 +14,10 @@ In order to receive information about not only the line, but also the column spa position attributes in the lexer need to be enabled: ```php -$lexer = new PhpParser\Lexer(array( +$lexerOptions = array( 'usedAttributes' => array('comments', 'startLine', 'endLine', 'startFilePos', 'endFilePos'), -)); -$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7, $lexer); +); +$parser = (new PhpParser\ParserFactory())->createForHostVersion($lexerOptions); try { $stmts = $parser->parse($code); @@ -56,7 +56,7 @@ To instead collect all encountered errors into an array, while trying to continu 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); +$parser = (new PhpParser\ParserFactory())->createForHostVersion(); $errorHandler = new PhpParser\ErrorHandler\Collecting; $stmts = $parser->parse($code, $errorHandler); @@ -72,4 +72,6 @@ if (null !== $stmts) { } ``` +The partial AST may contain `Expr\Error` nodes that indicate that an error occurred while parsing an expression. + The `NameResolver` visitor also accepts an `ErrorHandler` as a constructor argument. diff --git a/doc/component/FAQ.markdown b/doc/component/FAQ.markdown index 1a70a48c68..7c4eccb20c 100644 --- a/doc/component/FAQ.markdown +++ b/doc/component/FAQ.markdown @@ -19,7 +19,7 @@ $code = '...'; $traverser = new NodeTraverser; $traverser->addVisitor(new ParentConnectingVisitor); -$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); +$parser = (new ParserFactory())->createForHostVersion(); $ast = $parser->parse($code); $ast = $traverser->traverse($ast); ``` @@ -42,7 +42,7 @@ $code = '...'; $traverser = new NodeTraverser; $traverser->addVisitor(new NodeConnectingVisitor); -$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); +$parser = (new ParserFactory())->createForHostVersion(); $ast = $parser->parse($code); $ast = $traverser->traverse($ast); ``` diff --git a/doc/component/JSON_representation.markdown b/doc/component/JSON_representation.markdown index 47c3429c07..8b4e95fde0 100644 --- a/doc/component/JSON_representation.markdown +++ b/doc/component/JSON_representation.markdown @@ -18,7 +18,7 @@ function printLine($msg) { } CODE; -$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); +$parser = (new ParserFactory())->createForHostVersion(); try { $stmts = $parser->parse($code); diff --git a/doc/component/Lexer.markdown b/doc/component/Lexer.markdown index be26e381e5..6a8527b5e5 100644 --- a/doc/component/Lexer.markdown +++ b/doc/component/Lexer.markdown @@ -42,16 +42,17 @@ The attributes used in this example match the default behavior of the lexer. The > **Note:** The example in this section is outdated in that this information is directly available in the AST: While > `$property->isPublic()` does not distinguish between `public` and `var`, directly checking `$property->flags` for > the `$property->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0` allows making this distinction without resorting to -> tokens. However the general idea behind the example still applies in other cases. +> tokens. However, the general idea behind the example still applies in other cases. 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 +/** @param PhpParser\Token[] $tokens */ function isDeclaredUsingVar(array $tokens, PhpParser\Node\Stmt\Property $prop) { - $i = $prop->getAttribute('startTokenPos'); - return $tokens[$i][0] === T_VAR; + $i = $prop->getStartTokenPos(); + return $tokens[$i]->id === T_VAR; } ``` @@ -72,12 +73,12 @@ class MyNodeVisitor extends PhpParser\NodeVisitorAbstract { } } -$lexer = new PhpParser\Lexer(array( +$lexerOptions = array( 'usedAttributes' => array( 'comments', 'startLine', 'endLine', 'startTokenPos', 'endTokenPos' ) -)); -$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::ONLY_PHP7, $lexer); +); +$parser = (new PhpParser\ParserFactory())->createForHostVersion($lexerOptions); $visitor = new MyNodeVisitor(); $traverser = new PhpParser\NodeTraverser(); @@ -111,14 +112,15 @@ The `startLexing()` method is invoked whenever the `parse()` method of the parse code that is to be lexed (including the opening tag). It can be used to reset state or preprocess the source code or tokens. The passed `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 `getTokens()` method returns the current array of `PhpParser\Token`s, which are compatible with the PHP 8 `PhpToken` +class. 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 +The `getNextToken()` method returns the ID of the next token (in the sense of `Token::$id`). 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 @@ -144,10 +146,10 @@ 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 + if ($tokenId == \T_CONSTANT_ENCAPSED_STRING // non-interpolated string + || $tokenId == \T_ENCAPSED_AND_WHITESPACE // interpolated string + || $tokenId == \T_LNUMBER // integer + || $tokenId == \T_DNUMBER // floating point number ) { // could also use $startAttributes, doesn't really matter here $endAttributes['originalValue'] = $value; diff --git a/doc/component/Name_resolution.markdown b/doc/component/Name_resolution.markdown index 2a7eb603a9..33702869ff 100644 --- a/doc/component/Name_resolution.markdown +++ b/doc/component/Name_resolution.markdown @@ -10,7 +10,7 @@ visitor (NameResolver) based on it. The NameResolver visitor ------------------------ -The `NameResolver` visitor can (and for nearly all uses of the AST, is) be applied to resolve names +The `NameResolver` visitor can (and for nearly all uses of the AST, should) be applied to resolve names to their fully-qualified form, to the degree that this is possible. ```php @@ -53,7 +53,7 @@ name. Once again, if an unqualified function or constant name cannot be resolved `resolvedName` attribute will not be present, and instead a `namespacedName` attribute is added. The `replaceNodes` attribute is useful if you wish to perform modifications on the AST, as you -probably do not wish the resoluting code to have fully resolved names as a side-effect. +probably do not wish the resulting code to have fully resolved names as a side-effect. The NameContext --------------- @@ -84,4 +84,4 @@ representation of a name given the current name resolution environment. The name context is intended to be used for name resolution operations outside the AST itself, such as class names inside doc comments. A visitor running in parallel with the name resolver can access the name context using `$nameResolver->getNameContext()`. Alternatively a visitor can use an -independent context and explicitly feed `Namespace` and `Use` nodes to it. \ No newline at end of file +independent context and explicitly feed `Namespace` and `Use` nodes to it. diff --git a/doc/component/Pretty_printing.markdown b/doc/component/Pretty_printing.markdown index d6198e315f..29df2fb463 100644 --- a/doc/component/Pretty_printing.markdown +++ b/doc/component/Pretty_printing.markdown @@ -31,10 +31,16 @@ expression. Customizing the formatting -------------------------- -Apart from an `shortArraySyntax` option, the default pretty printer does not provide any -functionality to customize the formatting of the generated code. The pretty printer does respect a -number of `kind` attributes used by some notes (e.g., whether an integer should be printed as -decimal, hexadecimal, etc), but there are no options to control brace placement or similar. +The pretty printer respects a number of `kind` attributes used by some notes (e.g., whether an +integer should be printed as decimal, hexadecimal, etc). Additionally, it supports two options: + +* `phpVersion` (defaults to 7.0) allows opting into formatting that is not supported by older PHP + versions. +* `shortArraySyntax` determines the used array syntax if the `kind` attribute is not set. This is + a legacy option, and `phpVersion` should be used to control this behavior instead. + +However, the default pretty printer does not provide any functionality for fine-grained +customization of code formatting. If you want to make minor changes to the formatting, the easiest way is to extend the pretty printer and override the methods responsible for the node types you are interested in. @@ -46,29 +52,27 @@ default pretty printer with an existing library for code reformatting, such as Formatting-preserving pretty printing ------------------------------------- -> **Note:** This functionality is **experimental** and not yet complete. - For automated code refactoring, migration and similar, you will usually only want to modify a small portion of the code and leave the remainder alone. The basic pretty printer is not suitable for this, because it will also reformat parts of the code which have not been modified. -Since PHP-Parser 4.0, an experimental formatting-preserving pretty-printing mode is available, which +Since PHP-Parser 4.0, a formatting-preserving pretty-printing mode is available, which attempts to preserve the formatting of code (those AST nodes that have not changed) and only reformat code which has been modified or newly inserted. Use of the formatting-preservation functionality requires some additional preparatory steps: ```php -use PhpParser\{Lexer, NodeTraverser, NodeVisitor, Parser, PrettyPrinter}; +use PhpParser\{Lexer, NodeTraverser, NodeVisitor, ParserFactory, PrettyPrinter}; -$lexer = new Lexer\Emulative([ +$lexerOptions = new [ 'usedAttributes' => [ 'comments', 'startLine', 'endLine', 'startTokenPos', 'endTokenPos', ], -]); -$parser = new Parser\Php7($lexer); +]; +$parser = (new ParserFactory())->createForHostVersion($lexerOptions); $traverser = new NodeTraverser(); $traverser->addVisitor(new NodeVisitor\CloningVisitor()); @@ -86,11 +90,9 @@ $newCode = $printer->printFormatPreserving($newStmts, $oldStmts, $oldTokens); ``` If you make use of the name resolution functionality, you will likely want to disable the -`replaceNodes` option. This will add resolved names as attributes, instead of directlying modifying +`replaceNodes` option. This will add resolved names as attributes, instead of directly modifying the AST and causing spurious changes to the pretty printed code. For more information, see the [name resolution documentation](Name_resolution.markdown). -This functionality is experimental and not yet fully implemented. It should not provide incorrect -code, but it may sometimes reformat more code than necessary. Open issues are tracked in -[issue #344](https://github.com/nikic/PHP-Parser/issues/344). If you encounter problems while using -this functionality, please open an issue, so we know what to prioritize. +The formatting-preservation works on a best-effort basis and may sometimes reformat more code tha +necessary. If you encounter problems while using this functionality, please open an issue. diff --git a/doc/component/Walking_the_AST.markdown b/doc/component/Walking_the_AST.markdown index 25e7c324ad..3fd668c477 100644 --- a/doc/component/Walking_the_AST.markdown +++ b/doc/component/Walking_the_AST.markdown @@ -129,8 +129,7 @@ Now `$a && $b` will be replaced by `!($a && $b)`. Then the traverser will go int only) child of `!($a && $b)`, which is `$a && $b`. The transformation applies again and we end up with `!!($a && $b)`. This will continue until PHP hits the memory limit. -Finally, two special replacement types are supported only by leaveNode. The first is removal of a -node: +Finally, there are two special replacement types. The first is removal of a node: ```php public function leaveNode(Node $node) { @@ -165,8 +164,8 @@ This example will remove all calls to `var_dump()` which occur as expression sta that `var_dump($a);` will be removed, but `if (var_dump($a))` will not be removed (and there is no obvious way in which it can be removed). -Next to removing nodes, it is also possible to replace one node with multiple nodes. Again, this -only works inside leaveNode and only if the parent structure is an array. +Next to removing nodes, it is also possible to replace one node with multiple nodes. This +only works if the parent structure is an array. ```php public function leaveNode(Node $node) { From 96037b3d336b8e1cd9da657562f633b1e55d9bca Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 4 Sep 2022 18:58:01 +0200 Subject: [PATCH 156/428] Release PHP-Parser 5.0.0-alpha1 --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18c65f829f..133a1eadd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Version 5.0.0-dev ----------------- +Nothing yet. + +Version 5.0.0-alpha1 (2022-09-04) +--------------------------------- + See UPGRADE-5.0 for detailed migration instructions. ### Changed @@ -27,6 +32,14 @@ See UPGRADE-5.0 for detailed migration instructions. * The PHP 5 parser has been removed. The PHP 7 parser has been adjusted to deal with PHP 5 code more gracefully. +Version 4.15.1 (2022-09-04) +--------------------------- + +### Fixed + +* Fixed formatting preservation when adding *multiple* attributes to a class/method/etc that + previously had none. This fixes a regression in the 4.15.0 release. + Version 4.15.0 (2022-09-03) --------------------------- From 7362f2b2d0951b35b2a9886ba8e075e74f4941d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Mirtes?= Date: Mon, 5 Sep 2022 10:01:12 +0200 Subject: [PATCH 157/428] Fix pretty printing example --- doc/component/Pretty_printing.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/component/Pretty_printing.markdown b/doc/component/Pretty_printing.markdown index 29df2fb463..ee7cac8a09 100644 --- a/doc/component/Pretty_printing.markdown +++ b/doc/component/Pretty_printing.markdown @@ -80,7 +80,7 @@ $traverser->addVisitor(new NodeVisitor\CloningVisitor()); $printer = new PrettyPrinter\Standard(); $oldStmts = $parser->parse($code); -$oldTokens = $lexer->getTokens(); +$oldTokens = $parser->getLexer()->getTokens(); $newStmts = $traverser->traverse($oldStmts); From 636f066b762c6c94cb50d150e376e9cf22522af7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 5 Sep 2022 18:35:06 +0200 Subject: [PATCH 158/428] Use Node\ClosureUse instead of Expr\ClosureUse in parser Fixes #883. --- grammar/php.y | 2 +- lib/PhpParser/Parser/Php7.php | 2 +- lib/PhpParser/Parser/Php8.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index d5de6b9736..9861fef2ae 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1085,7 +1085,7 @@ non_empty_lexical_var_list: ; lexical_var: - optional_ref plain_variable { $$ = Expr\ClosureUse[$2, $1]; } + optional_ref plain_variable { $$ = Node\ClosureUse[$2, $1]; } ; function_call: diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 0fe86518b6..8f110dc93b 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2650,7 +2650,7 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 486 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 487 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index a9ddc290da..b44fde2ffc 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2668,7 +2668,7 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 486 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 487 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); From b4b60c8460136c492dd551e14516e5caaceef8fa Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 6 Sep 2022 20:29:27 +0200 Subject: [PATCH 159/428] Remove phpunit 6.5 With the minimum version raised to PHP 7.1, there should be no more need for PHPUnit 6. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 158152c55f..4adefc3930 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "ext-ctype": "*" }, "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", "ircmaxell/php-yacc": "^0.0.7" }, "extra": { From 468c0ef6bc53108a0751a65716af20f1bad10989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Hansl=C3=ADk?= Date: Thu, 8 Sep 2022 19:28:38 +0200 Subject: [PATCH 160/428] Fixed type in UnionType (cherry picked from commit 2f1fd784fe5560675722a1e5cbbcece5f43bf3a0) --- lib/PhpParser/Node/UnionType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/Node/UnionType.php b/lib/PhpParser/Node/UnionType.php index 24f4597307..7cba2ee35e 100644 --- a/lib/PhpParser/Node/UnionType.php +++ b/lib/PhpParser/Node/UnionType.php @@ -3,7 +3,7 @@ namespace PhpParser\Node; class UnionType extends ComplexType { - /** @var (Identifier|Name)[] Types */ + /** @var (Identifier|Name|IntersectionType)[] Types */ public $types; /** From f59f226f65492089e0e7551f643d950a194a7ac9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 12:10:41 +0200 Subject: [PATCH 161/428] Fix some phpstan warnings --- composer.json | 3 ++- grammar/php.y | 2 +- lib/PhpParser/Builder/Enum_.php | 2 +- lib/PhpParser/Builder/Property.php | 2 +- lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php | 2 +- lib/PhpParser/Node/Name.php | 2 +- lib/PhpParser/NodeVisitor.php | 2 +- lib/PhpParser/Parser/Php7.php | 2 +- lib/PhpParser/Parser/Php8.php | 2 +- lib/PhpParser/PrettyPrinter/Standard.php | 3 ++- 10 files changed, 12 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 4adefc3930..438f772468 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ }, "require-dev": { "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "ircmaxell/php-yacc": "^0.0.7" + "ircmaxell/php-yacc": "^0.0.7", + "phpstan/phpstan": "^1.8" }, "extra": { "branch-alias": { diff --git a/grammar/php.y b/grammar/php.y index 9861fef2ae..69a67d83a6 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1309,7 +1309,7 @@ array_pair: | expr T_DOUBLE_ARROW expr { $$ = Node\ArrayItem[$3, $1, false]; } | expr T_DOUBLE_ARROW ampersand variable { $$ = Node\ArrayItem[$4, $1, true]; } | expr T_DOUBLE_ARROW list_expr { $$ = Node\ArrayItem[$3, $1, false]; } - | T_ELLIPSIS expr { $$ = Node\ArrayItem[$2, null, false, attributes(), true]; } + | T_ELLIPSIS expr { $$ = new Node\ArrayItem($2, null, false, attributes(), true); } | /* empty */ { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ diff --git a/lib/PhpParser/Builder/Enum_.php b/lib/PhpParser/Builder/Enum_.php index 1b486943cd..42e92f6e9f 100644 --- a/lib/PhpParser/Builder/Enum_.php +++ b/lib/PhpParser/Builder/Enum_.php @@ -35,7 +35,7 @@ public function __construct(string $name) { /** * Sets the scalar type. * - * @param string|Identifier $type + * @param string|Identifier $scalarType * * @return $this */ diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index c46638dccb..c04d891870 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -18,7 +18,7 @@ class Property implements PhpParser\Builder { protected $default = null; protected $attributes = []; - /** @var null|Identifier|Name|NullableType */ + /** @var null|Identifier|Name|ComplexType */ protected $type; /** @var Node\AttributeGroup[] */ diff --git a/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php index d06d4436c7..53f65b14d5 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php @@ -12,7 +12,7 @@ abstract public function getPhpVersion(): PhpVersion; abstract public function isEmulationNeeded(string $code): bool; /** - * @param Token[] Original tokens + * @param Token[] $tokens Original tokens * @return Token[] Modified Tokens */ abstract public function emulate(string $code, array $tokens): array; diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index f50e975221..3b791979dd 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -20,7 +20,7 @@ class Name extends NodeAbstract { * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) * @param array $attributes Additional attributes */ - public function __construct($name, array $attributes = []) { + final public function __construct($name, array $attributes = []) { $this->attributes = $attributes; $this->parts = self::prepareName($name); } diff --git a/lib/PhpParser/NodeVisitor.php b/lib/PhpParser/NodeVisitor.php index 646b4fade6..06c694bf02 100644 --- a/lib/PhpParser/NodeVisitor.php +++ b/lib/PhpParser/NodeVisitor.php @@ -38,7 +38,7 @@ public function beforeTraverse(array $nodes); * * @param Node $node Node * - * @return null|int|Node Replacement node (or special return value) + * @return null|int|Node|Node[] Replacement node (or special return value) */ public function enterNode(Node $node); diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 8f110dc93b..d85fd2d401 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2961,7 +2961,7 @@ protected function initReduceCallbacks() { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 588 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); }, 589 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index b44fde2ffc..80a40d3174 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2979,7 +2979,7 @@ protected function initReduceCallbacks() { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 588 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); }, 589 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index cec7ba63bc..be4ddcf113 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -483,7 +483,8 @@ protected function pExpr_Cast_Double(Cast\Double $node) { $cast = '(double)'; } elseif ($kind === Cast\Double::KIND_FLOAT) { $cast = '(float)'; - } elseif ($kind === Cast\Double::KIND_REAL) { + } else { + assert($kind === Cast\Double::KIND_REAL); $cast = '(real)'; } return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr); From 8dfce13d7767f3e36304076b1bdd3f3232c33a29 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 12:31:50 +0200 Subject: [PATCH 162/428] Add phpstan baseline --- lib/PhpParser/ParserAbstract.php | 2 +- lib/PhpParser/PrettyPrinterAbstract.php | 8 +- phpstan-baseline.neon | 141 ++++++++++++++++++++++++ phpstan.neon.dist | 7 ++ 4 files changed, 153 insertions(+), 5 deletions(-) create mode 100644 phpstan-baseline.neon create mode 100644 phpstan.neon.dist diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index c31c97a950..dccc5865f6 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -121,7 +121,7 @@ abstract class ParserAbstract implements Parser { /** @var int Error state, used to avoid error floods */ protected $errorState; - /** @var \SplObjectStorage Array nodes created during parsing, for postprocessing of empty elements. */ + /** @var \SplObjectStorage|null Array nodes created during parsing, for postprocessing of empty elements. */ protected $createdArrays; /** diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 1c1876870d..efea814ace 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -104,7 +104,7 @@ abstract class PrettyPrinterAbstract { /** @var PhpVersion PHP version to target */ protected $phpVersion; - /** @var TokenStream Original tokens for use in format-preserving pretty print */ + /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ protected $origTokens; /** @var Internal\Differ Differ for node lists */ protected $nodeListDiffer; @@ -116,9 +116,9 @@ abstract class PrettyPrinterAbstract { */ protected $fixupMap; /** - * @var int[][] Map from "{$node->getType()}->{$subNode}" to ['left' => $l, 'right' => $r], - * where $l and $r specify the token type that needs to be stripped when removing - * this node. + * @var (int|string)[][] Map from "{$node->getType()}->{$subNode}" to ['left' => $l, 'right' => $r], + * where $l and $r specify the token type that needs to be stripped when + * removing this node. */ protected $removalMap; /** diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 0000000000..8a04a4721b --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,141 @@ +parameters: + ignoreErrors: + - + message: "#^Unary operation \"~\" on mixed results in an error\\.$#" + count: 1 + path: lib/PhpParser/ConstExprEvaluator.php + + - + message: "#^Unary operation \"\\+\" on string results in an error\\.$#" + count: 1 + path: lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php + + - + message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$attrGroups\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NameResolver.php + + - + message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$name\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NameResolver.php + + - + message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$namespacedName\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NameResolver.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:beforeTraverse\\(\\) should return array\\\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:enterNode\\(\\) should return array\\\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:leaveNode\\(\\) should return array\\\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:beforeTraverse\\(\\) should return array\\\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:enterNode\\(\\) should return array\\\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:leaveNode\\(\\) should return array\\\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ATTRIBUTE\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_COALESCE_EQUAL\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ECHO\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ENUM\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_FN\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_MATCH\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_FULLY_QUALIFIED\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_QUALIFIED\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_RELATIVE\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NULLSAFE_OBJECT_OPERATOR\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_PAAMAYIM_NEKUDOTAYIM\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_READONLY\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Unary operation \"\\+\" on string results in an error\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Variable \\$action might not be defined\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Variable \\$tokenValue might not be defined\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000000..e70257c40b --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,7 @@ +includes: + - phpstan-baseline.neon + +parameters: + level: 3 + paths: + - lib From 9b5a2c899196e94c01a2ab60990b218f98df187b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 12:38:46 +0200 Subject: [PATCH 163/428] Use PHPStan level 5 --- lib/PhpParser/Internal/TokenPolyfill.php | 2 +- lib/PhpParser/NodeTraverser.php | 5 ----- lib/PhpParser/PrettyPrinterAbstract.php | 9 +++++---- phpstan-baseline.neon | 5 +++++ phpstan.neon.dist | 3 ++- test/PhpParser/NodeTraverserTest.php | 2 +- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/PhpParser/Internal/TokenPolyfill.php b/lib/PhpParser/Internal/TokenPolyfill.php index f854fb9261..8b5cd5eea2 100644 --- a/lib/PhpParser/Internal/TokenPolyfill.php +++ b/lib/PhpParser/Internal/TokenPolyfill.php @@ -33,7 +33,7 @@ class TokenPolyfill { \T_OPEN_TAG => true, ]; - /** @var bool[] Tokens that may be part of a T_NAME_* identifier. */ + /** @var bool[]|null Tokens that may be part of a T_NAME_* identifier. */ private static $identifierTokens; /** diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 94682c5d47..c6fc1574ab 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -247,11 +247,6 @@ protected function traverseArray(array $nodes): array { } elseif (self::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; - } elseif (false === $return) { - throw new \LogicException( - 'bool(false) return from leaveNode() no longer supported. ' . - 'Return NodeTraverser::REMOVE_NODE instead' - ); } else { throw new \LogicException( 'leaveNode() returned invalid value of type ' . gettype($return) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index efea814ace..015a69b21d 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -106,7 +106,7 @@ abstract class PrettyPrinterAbstract { /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ protected $origTokens; - /** @var Internal\Differ Differ for node lists */ + /** @var Internal\Differ|null Differ for node lists */ protected $nodeListDiffer; /** @var bool[] Map determining whether a certain character is a label character */ protected $labelCharMap; @@ -520,7 +520,7 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { return $this->{'p' . $node->getType()}($node); } - /** @var Node $origNode */ + /** @var Node|null $origNode */ $origNode = $node->getAttribute('origNode'); if (null === $origNode) { return $this->pFallback($node); @@ -536,6 +536,7 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { $fallbackNode = $node; if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { // Normalize node structure of anonymous classes + assert($origNode instanceof Expr\New_); $node = PrintableNewAnonClassNode::fromNewNode($node); $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); $class = PrintableNewAnonClassNode::class; @@ -733,9 +734,9 @@ protected function pArray( $result = ''; foreach ($diff as $i => $diffElem) { $diffType = $diffElem->type; - /** @var Node|null $arrItem */ + /** @var Node|string|null $arrItem */ $arrItem = $diffElem->new; - /** @var Node|null $origArrItem */ + /** @var Node|string|null $origArrItem */ $origArrItem = $diffElem->old; if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 8a04a4721b..488a8548b5 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -5,6 +5,11 @@ parameters: count: 1 path: lib/PhpParser/ConstExprEvaluator.php + - + message: "#^Call to function assert\\(\\) with false will always evaluate to false\\.$#" + count: 1 + path: lib/PhpParser/Lexer/Emulative.php + - message: "#^Unary operation \"\\+\" on string results in an error\\.$#" count: 1 diff --git a/phpstan.neon.dist b/phpstan.neon.dist index e70257c40b..8e67545bd9 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,6 +2,7 @@ includes: - phpstan-baseline.neon parameters: - level: 3 + level: 5 paths: - lib + treatPhpDocTypesAsCertain: false diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index 7e9a3f379e..26f3d12ba5 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -408,7 +408,7 @@ public function provideTestInvalidReturn() { [$stmts, $visitor3, 'leaveNode() returned invalid value of type string'], [$stmts, $visitor4, 'leaveNode() returned invalid value of type string'], [$stmts, $visitor5, 'leaveNode() may only return an array if the parent structure is an array'], - [$stmts, $visitor6, 'bool(false) return from leaveNode() no longer supported. Return NodeTraverser::REMOVE_NODE instead'], + [$stmts, $visitor6, 'leaveNode() returned invalid value of type bool'], [$stmts, $visitor7, 'Trying to replace statement (Stmt_Expression) with expression (Scalar_Int). Are you missing a Stmt_Expression wrapper?'], [$stmts, $visitor8, 'Trying to replace expression (Scalar_Int) with statement (Stmt_Return)'], ]; From 2070cb7cb2812ec37546bc7f73a0efe1d50dcd03 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 12:45:59 +0200 Subject: [PATCH 164/428] Drop phpstan from composer.json It does not support PHP 7.1, so we should not include it unconditionally. --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 438f772468..4adefc3930 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,7 @@ }, "require-dev": { "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "ircmaxell/php-yacc": "^0.0.7", - "phpstan/phpstan": "^1.8" + "ircmaxell/php-yacc": "^0.0.7" }, "extra": { "branch-alias": { From e9800cf7d3f3459b65e0b14ce75446dce418e16c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 13:17:17 +0200 Subject: [PATCH 165/428] Add tools/ directory With php-cs-fixer and phpstan. Also reformat one file. --- lib/PhpParser/NodeTraverser.php | 4 ++-- tools/composer.json | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 tools/composer.json diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index c6fc1574ab..0d81aedb37 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -201,10 +201,10 @@ protected function traverseArray(array $nodes): array { if ($return instanceof Node) { $this->ensureReplacementReasonable($node, $return); $node = $return; - } else if (\is_array($return)) { + } elseif (\is_array($return)) { $doNodes[] = [$i, $return]; continue 2; - } else if (self::REMOVE_NODE === $return) { + } elseif (self::REMOVE_NODE === $return) { $doNodes[] = [$i, []]; continue 2; } elseif (self::DONT_TRAVERSE_CHILDREN === $return) { diff --git a/tools/composer.json b/tools/composer.json new file mode 100644 index 0000000000..d263715f3f --- /dev/null +++ b/tools/composer.json @@ -0,0 +1,6 @@ +{ + "require": { + "friendsofphp/php-cs-fixer": "^3.10", + "phpstan/phpstan": "^1.8" + } +} From b9fe3449e8e22e84b9118a1709abc1a242e29c76 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 15:22:23 +0200 Subject: [PATCH 166/428] Add missing parameter types --- lib/PhpParser/Builder/Declaration.php | 7 +++++++ lib/PhpParser/Internal/DiffElem.php | 5 +++++ lib/PhpParser/Internal/TokenStream.php | 3 +++ lib/PhpParser/JsonDecoder.php | 1 + lib/PhpParser/NameContext.php | 2 +- lib/PhpParser/Node/Stmt/Class_.php | 4 ++-- lib/PhpParser/NodeDumper.php | 9 ++++---- lib/PhpParser/NodeTraverser.php | 2 +- lib/PhpParser/NodeVisitor/NameResolver.php | 4 ++-- lib/PhpParser/ParserAbstract.php | 24 ++++++++++++---------- lib/PhpParser/PrettyPrinter/Standard.php | 14 ++++++------- 11 files changed, 47 insertions(+), 28 deletions(-) diff --git a/lib/PhpParser/Builder/Declaration.php b/lib/PhpParser/Builder/Declaration.php index df50cfb676..6d71657cb3 100644 --- a/lib/PhpParser/Builder/Declaration.php +++ b/lib/PhpParser/Builder/Declaration.php @@ -8,6 +8,13 @@ abstract class Declaration implements PhpParser\Builder { protected $attributes = []; + /** + * Adds a statement. + * + * @param PhpParser\Node\Stmt|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ abstract public function addStmt($stmt); /** diff --git a/lib/PhpParser/Internal/DiffElem.php b/lib/PhpParser/Internal/DiffElem.php index d10409f400..b25925d2d4 100644 --- a/lib/PhpParser/Internal/DiffElem.php +++ b/lib/PhpParser/Internal/DiffElem.php @@ -18,6 +18,11 @@ class DiffElem { /** @var mixed Is null for remove operations */ public $new; + /** + * @param int $type One of the TYPE_* constants + * @param mixed $old Is null for add operations + * @param mixed $new Is null for remove operations + */ public function __construct(int $type, $old, $new) { $this->type = $type; $this->old = $old; diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index 72a28dcae9..5dbd9912ad 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -102,6 +102,7 @@ public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType): bool { return false; } + /** @param int|string|array $skipTokenType */ public function skipLeft(int $pos, $skipTokenType) { $tokens = $this->tokens; @@ -119,6 +120,7 @@ public function skipLeft(int $pos, $skipTokenType) { return $this->skipLeftWhitespace($pos); } + /** @param int|string|array $skipTokenType */ public function skipRight(int $pos, $skipTokenType) { $tokens = $this->tokens; @@ -168,6 +170,7 @@ public function skipRightWhitespace(int $pos): int { return $pos; } + /** @param int|string|array $findTokenType */ public function findRight(int $pos, $findTokenType) { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { diff --git a/lib/PhpParser/JsonDecoder.php b/lib/PhpParser/JsonDecoder.php index fa9d661977..d4965c7be0 100644 --- a/lib/PhpParser/JsonDecoder.php +++ b/lib/PhpParser/JsonDecoder.php @@ -15,6 +15,7 @@ public function decode(string $json) { return $this->decodeRecursive($value); } + /** @param mixed $value */ private function decodeRecursive($value) { if (\is_array($value)) { if (isset($value['nodeType'])) { diff --git a/lib/PhpParser/NameContext.php b/lib/PhpParser/NameContext.php index 9aa50f438e..94afb4b8ad 100644 --- a/lib/PhpParser/NameContext.php +++ b/lib/PhpParser/NameContext.php @@ -226,7 +226,7 @@ public function getShortName(string $name, int $type): Name { return $shortestName; } - private function resolveAlias(Name $name, $type) { + private function resolveAlias(Name $name, int $type) { $firstPart = $name->getFirst(); if ($name->isQualified()) { diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 453cffe472..04ae6a1fea 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -92,7 +92,7 @@ public function isAnonymous(): bool { /** * @internal */ - public static function verifyClassModifier($a, $b) { + public static function verifyClassModifier(int $a, int $b) { if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { throw new Error('Multiple abstract modifiers are not allowed'); } @@ -113,7 +113,7 @@ public static function verifyClassModifier($a, $b) { /** * @internal */ - public static function verifyModifier($a, $b) { + public static function verifyModifier(int $a, int $b) { if ($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK) { throw new Error('Multiple access type modifiers are not allowed'); } diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index 802f483986..78f8d76e94 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -43,6 +43,7 @@ public function dump($node, ?string $code = null): string { return $this->dumpRecursive($node); } + /** @param Node|Comment|array $node */ protected function dumpRecursive($node) { if ($node instanceof Node) { $r = $node->getType(); @@ -107,7 +108,7 @@ protected function dumpRecursive($node) { return $r . "\n)"; } - protected function dumpFlags($flags) { + protected function dumpFlags(int $flags) { $strs = []; if ($flags & Modifiers::PUBLIC) { $strs[] = 'PUBLIC'; @@ -138,7 +139,7 @@ protected function dumpFlags($flags) { } } - protected function dumpIncludeType($type) { + protected function dumpIncludeType(int $type) { $map = [ Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', @@ -152,7 +153,7 @@ protected function dumpIncludeType($type) { return $map[$type] . ' (' . $type . ')'; } - protected function dumpUseType($type) { + protected function dumpUseType(int $type) { $map = [ Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', Use_::TYPE_NORMAL => 'TYPE_NORMAL', @@ -190,7 +191,7 @@ protected function dumpPosition(Node $node): ?string { } // Copied from Error class - private function toColumn($code, $pos) { + private function toColumn(string $code, int $pos) { if ($pos > strlen($code)) { throw new \RuntimeException('Invalid position information'); } diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 0d81aedb37..427e59993a 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -272,7 +272,7 @@ protected function traverseArray(array $nodes): array { return $nodes; } - private function ensureReplacementReasonable($old, $new) { + private function ensureReplacementReasonable(Node $old, Node $new) { if ($old instanceof Node\Stmt && $new instanceof Node\Expr) { throw new \LogicException( "Trying to replace statement ({$old->getType()}) " . diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index d00374bf43..e0352a0082 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -160,7 +160,7 @@ public function enterNode(Node $node) { return null; } - private function addAlias(Node\UseItem $use, $type, ?Name $prefix = null) { + private function addAlias(Node\UseItem $use, int $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 @@ -180,7 +180,7 @@ private function resolveSignature($node) { $node->returnType = $this->resolveType($node->returnType); } - private function resolveType($node) { + private function resolveType(?Node $node) { if ($node instanceof Name) { return $this->resolveClassName($node); } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index dccc5865f6..3686206759 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -11,6 +11,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\Cast\Double; +use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Param; use PhpParser\Node\Scalar\InterpolatedString; @@ -662,7 +663,7 @@ protected function getFloatCastKind(string $cast): int { return Double::KIND_DOUBLE; } - protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { + protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false) { try { return Int_::fromString($str, $attributes, $allowInvalidOctal); } catch (Error $error) { @@ -725,6 +726,7 @@ function ($matches) use ($indentLen, $indentChar, $attributes) { ); } + /** @param string|array $contents */ protected function parseDocString( string $startToken, $contents, string $endToken, array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape @@ -872,7 +874,7 @@ protected function postprocessList(Expr\List_ $node): void { } } - protected function checkClassModifier($a, $b, $modifierPos) { + protected function checkClassModifier(int $a, int $b, int $modifierPos) { try { Class_::verifyClassModifier($a, $b); } catch (Error $error) { @@ -881,7 +883,7 @@ protected function checkClassModifier($a, $b, $modifierPos) { } } - protected function checkModifier($a, $b, $modifierPos) { + protected function checkModifier(int $a, int $b, int $modifierPos) { // Jumping through some hoops here because verifyModifier() is also used elsewhere try { Class_::verifyModifier($a, $b); @@ -920,7 +922,7 @@ protected function checkNamespace(Namespace_ $node) { } } - private function checkClassName($name, $namePos) { + private function checkClassName(?Identifier $name, int $namePos) { if (null !== $name && $name->isSpecialClassName()) { $this->emitError(new Error( sprintf('Cannot use \'%s\' as class name as it is reserved', $name), @@ -940,7 +942,7 @@ private function checkImplementedInterfaces(array $interfaces) { } } - protected function checkClass(Class_ $node, $namePos) { + protected function checkClass(Class_ $node, int $namePos) { $this->checkClassName($node->name, $namePos); if ($node->extends && $node->extends->isSpecialClassName()) { @@ -953,17 +955,17 @@ protected function checkClass(Class_ $node, $namePos) { $this->checkImplementedInterfaces($node->implements); } - protected function checkInterface(Interface_ $node, $namePos) { + protected function checkInterface(Interface_ $node, int $namePos) { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->extends); } - protected function checkEnum(Enum_ $node, $namePos) { + protected function checkEnum(Enum_ $node, int $namePos) { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->implements); } - protected function checkClassMethod(ClassMethod $node, $modifierPos) { + protected function checkClassMethod(ClassMethod $node, int $modifierPos) { if ($node->flags & Modifiers::STATIC) { switch ($node->name->toLowerString()) { case '__construct': @@ -991,7 +993,7 @@ protected function checkClassMethod(ClassMethod $node, $modifierPos) { } } - protected function checkClassConst(ClassConst $node, $modifierPos) { + protected function checkClassConst(ClassConst $node, int $modifierPos) { if ($node->flags & Modifiers::STATIC) { $this->emitError(new Error( "Cannot use 'static' as constant modifier", @@ -1009,7 +1011,7 @@ protected function checkClassConst(ClassConst $node, $modifierPos) { } } - protected function checkProperty(Property $node, $modifierPos) { + protected function checkProperty(Property $node, int $modifierPos) { if ($node->flags & Modifiers::ABSTRACT) { $this->emitError(new Error('Properties cannot be declared abstract', $this->getAttributesAt($modifierPos))); @@ -1021,7 +1023,7 @@ protected function checkProperty(Property $node, $modifierPos) { } } - protected function checkUseUse(UseItem $node, $namePos) { + protected function checkUseUse(UseItem $node, int $namePos) { if ($node->alias && $node->alias->isSpecialClassName()) { $this->emitError(new Error( sprintf( diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index be4ddcf113..6241aec6a9 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -736,7 +736,7 @@ protected function pUseItem(Node\UseItem $node) { . (null !== $node->alias ? ' as ' . $node->alias : ''); } - protected function pUseType($type) { + protected function pUseType(int $type) { return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); } @@ -978,7 +978,7 @@ protected function pStmt_Nop(Stmt\Nop $node) { // Helpers - protected function pClassCommon(Stmt\Class_ $node, $afterClassToken) { + protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken) { return $this->pAttrGroups($node->attrGroups, $node->name === null) . $this->pModifiers($node->flags) . 'class' . $afterClassToken @@ -987,7 +987,7 @@ protected function pClassCommon(Stmt\Class_ $node, $afterClassToken) { . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pObjectProperty($node) { + protected function pObjectProperty(Node $node) { if ($node instanceof Expr) { return '{' . $this->p($node) . '}'; } else { @@ -995,7 +995,7 @@ protected function pObjectProperty($node) { } } - protected function pEncapsList(array $encapsList, $quote) { + protected function pEncapsList(array $encapsList, ?string $quote) { $return = ''; foreach ($encapsList as $element) { if ($element instanceof Node\InterpolatedStringPart) { @@ -1017,7 +1017,7 @@ protected function pSingleQuotedString(string $string) { return '\'' . preg_replace($regex, '\\\\$0', $string) . '\''; } - protected function escapeString($string, $quote) { + protected function escapeString(string $string, ?string $quote) { if (null === $quote) { // For doc strings, don't escape newlines $escaped = addcslashes($string, "\t\f\v$\\"); @@ -1050,14 +1050,14 @@ protected function escapeString($string, $quote) { }, $escaped); } - protected function containsEndLabel($string, $label, $atStart = true, $atEnd = true) { + protected function containsEndLabel(string $string, string $label, bool $atStart = true, bool $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) { + protected function encapsedContainsEndLabel(array $parts, string $label) { foreach ($parts as $i => $part) { $atStart = $i === 0; $atEnd = $i === count($parts) - 1; From 36b2a996ca1f5aeb719e6ea4473879cd2f1a0923 Mon Sep 17 00:00:00 2001 From: Christopher Hertel Date: Tue, 19 Jul 2022 21:10:35 +0200 Subject: [PATCH 167/428] Add isReadonly on Param node --- lib/PhpParser/Node/Param.php | 5 +++++ test/PhpParser/Node/ParamTest.php | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 test/PhpParser/Node/ParamTest.php diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index fe4200a8fd..c1e1810929 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -2,6 +2,7 @@ namespace PhpParser\Node; +use PhpParser\Node\Stmt\Class_; use PhpParser\NodeAbstract; class Param extends NodeAbstract { @@ -56,4 +57,8 @@ public function getSubNodeNames(): array { public function getType(): string { return 'Param'; } + + public function isReadonly() : bool { + return (bool) ($this->flags & Class_::MODIFIER_READONLY); + } } diff --git a/test/PhpParser/Node/ParamTest.php b/test/PhpParser/Node/ParamTest.php new file mode 100644 index 0000000000..e5781a7a33 --- /dev/null +++ b/test/PhpParser/Node/ParamTest.php @@ -0,0 +1,21 @@ +assertFalse($node->isReadonly()); + } + + public function testReadonly() { + $node = new Param(new Variable('foo'), null, null, false, false, [], Class_::MODIFIER_READONLY); + + $this->assertTrue($node->isReadonly()); + } +} From 031c5e6ed057fed583cf62f1d09399b092870616 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 15:25:55 +0200 Subject: [PATCH 168/428] Move verifyModifier/verifyClassModifier to Modifiers class Now that the Modifiers are in a separate class, these *internal* verification methods should also be moved there. --- lib/PhpParser/BuilderHelpers.php | 4 +-- lib/PhpParser/Modifiers.php | 50 ++++++++++++++++++++++++++++++ lib/PhpParser/Node/Stmt/Class_.php | 50 ------------------------------ lib/PhpParser/ParserAbstract.php | 4 +-- 4 files changed, 54 insertions(+), 54 deletions(-) diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index fe7f923de3..8f95668aba 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -318,7 +318,7 @@ public static function normalizeAttribute($attribute): Node\AttributeGroup { * @return int New modifiers */ public static function addModifier(int $modifiers, int $modifier): int { - Stmt\Class_::verifyModifier($modifiers, $modifier); + Modifiers::verifyModifier($modifiers, $modifier); return $modifiers | $modifier; } @@ -327,7 +327,7 @@ public static function addModifier(int $modifiers, int $modifier): int { * @return int New modifiers */ public static function addClassModifier(int $existingModifiers, int $modifierToSet): int { - Stmt\Class_::verifyClassModifier($existingModifiers, $modifierToSet); + Modifiers::verifyClassModifier($existingModifiers, $modifierToSet); return $existingModifiers | $modifierToSet; } } diff --git a/lib/PhpParser/Modifiers.php b/lib/PhpParser/Modifiers.php index a13822714e..79f4f4f50e 100644 --- a/lib/PhpParser/Modifiers.php +++ b/lib/PhpParser/Modifiers.php @@ -16,4 +16,54 @@ final class Modifiers { public const READONLY = 64; public const VISIBILITY_MASK = 1 | 2 | 4; + + /** + * @internal + */ + public static function verifyClassModifier(int $a, int $b) { + if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { + throw new Error('Multiple abstract modifiers are not allowed'); + } + + if ($a & Modifiers::FINAL && $b & Modifiers::FINAL) { + throw new Error('Multiple final modifiers are not allowed'); + } + + if ($a & Modifiers::READONLY && $b & Modifiers::READONLY) { + throw new Error('Multiple readonly modifiers are not allowed'); + } + + if ($a & 48 && $b & 48) { + throw new Error('Cannot use the final modifier on an abstract class'); + } + } + + /** + * @internal + */ + public static function verifyModifier(int $a, int $b) { + if ($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK) { + throw new Error('Multiple access type modifiers are not allowed'); + } + + if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { + throw new Error('Multiple abstract modifiers are not allowed'); + } + + if ($a & Modifiers::STATIC && $b & Modifiers::STATIC) { + throw new Error('Multiple static modifiers are not allowed'); + } + + if ($a & Modifiers::FINAL && $b & Modifiers::FINAL) { + throw new Error('Multiple final modifiers are not allowed'); + } + + if ($a & Modifiers::READONLY && $b & Modifiers::READONLY) { + throw new Error('Multiple readonly 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/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 04ae6a1fea..1a225f8aa8 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -89,56 +89,6 @@ public function isAnonymous(): bool { return null === $this->name; } - /** - * @internal - */ - public static function verifyClassModifier(int $a, int $b) { - if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { - throw new Error('Multiple abstract modifiers are not allowed'); - } - - if ($a & Modifiers::FINAL && $b & Modifiers::FINAL) { - throw new Error('Multiple final modifiers are not allowed'); - } - - if ($a & Modifiers::READONLY && $b & Modifiers::READONLY) { - throw new Error('Multiple readonly modifiers are not allowed'); - } - - if ($a & 48 && $b & 48) { - throw new Error('Cannot use the final modifier on an abstract class'); - } - } - - /** - * @internal - */ - public static function verifyModifier(int $a, int $b) { - if ($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK) { - throw new Error('Multiple access type modifiers are not allowed'); - } - - if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { - throw new Error('Multiple abstract modifiers are not allowed'); - } - - if ($a & Modifiers::STATIC && $b & Modifiers::STATIC) { - throw new Error('Multiple static modifiers are not allowed'); - } - - if ($a & Modifiers::FINAL && $b & Modifiers::FINAL) { - throw new Error('Multiple final modifiers are not allowed'); - } - - if ($a & Modifiers::READONLY && $b & Modifiers::READONLY) { - throw new Error('Multiple readonly modifiers are not allowed'); - } - - if ($a & 48 && $b & 48) { - throw new Error('Cannot use the final modifier on an abstract class member'); - } - } - public function getType(): string { return 'Stmt_Class'; } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 3686206759..37c9ec81a4 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -876,7 +876,7 @@ protected function postprocessList(Expr\List_ $node): void { protected function checkClassModifier(int $a, int $b, int $modifierPos) { try { - Class_::verifyClassModifier($a, $b); + Modifiers::verifyClassModifier($a, $b); } catch (Error $error) { $error->setAttributes($this->getAttributesAt($modifierPos)); $this->emitError($error); @@ -886,7 +886,7 @@ protected function checkClassModifier(int $a, int $b, int $modifierPos) { protected function checkModifier(int $a, int $b, int $modifierPos) { // Jumping through some hoops here because verifyModifier() is also used elsewhere try { - Class_::verifyModifier($a, $b); + Modifiers::verifyModifier($a, $b); } catch (Error $error) { $error->setAttributes($this->getAttributesAt($modifierPos)); $this->emitError($error); From 205bd75aa852fcebd977e2d304e5b2c0be08d7ee Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 16:11:32 +0200 Subject: [PATCH 169/428] Add isPublic() etc methods on Param node Also isPromoted() to check for any flags. --- lib/PhpParser/Node/Param.php | 25 ++++++++++++++++--- test/PhpParser/Node/ParamTest.php | 30 +++++++++++++++++------ test/PhpParser/Node/Stmt/PropertyTest.php | 6 +---- 3 files changed, 46 insertions(+), 15 deletions(-) diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index c1e1810929..bd591d811a 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -2,7 +2,7 @@ namespace PhpParser\Node; -use PhpParser\Node\Stmt\Class_; +use PhpParser\Modifiers; use PhpParser\NodeAbstract; class Param extends NodeAbstract { @@ -58,7 +58,26 @@ public function getType(): string { return 'Param'; } - public function isReadonly() : bool { - return (bool) ($this->flags & Class_::MODIFIER_READONLY); + /** + * Whether this parameter uses constructor property promotion. + */ + public function isPromoted(): bool { + return $this->flags !== 0; + } + + public function isPublic(): bool { + return (bool) ($this->flags & Modifiers::PUBLIC); + } + + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); + } + + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); + } + + public function isReadonly(): bool { + return (bool) ($this->flags & Modifiers::READONLY); } } diff --git a/test/PhpParser/Node/ParamTest.php b/test/PhpParser/Node/ParamTest.php index e5781a7a33..ac0f3e79de 100644 --- a/test/PhpParser/Node/ParamTest.php +++ b/test/PhpParser/Node/ParamTest.php @@ -1,21 +1,37 @@ assertFalse($node->isPromoted()); + $this->assertFalse($node->isPrivate()); + $this->assertFalse($node->isProtected()); + $this->assertFalse($node->isPrivate()); $this->assertFalse($node->isReadonly()); } - public function testReadonly() { - $node = new Param(new Variable('foo'), null, null, false, false, [], Class_::MODIFIER_READONLY); + /** + * @dataProvider provideModifiers + */ + public function testModifiers(string $modifier) { + $node = new Param(new Variable('foo')); + $node->flags = constant(Modifiers::class . '::' . strtoupper($modifier)); + $this->assertTrue($node->isPromoted()); + $this->assertTrue($node->{'is' . $modifier}()); + } - $this->assertTrue($node->isReadonly()); + public function provideModifiers() { + return [ + ['public'], + ['protected'], + ['private'], + ['readonly'], + ]; } } diff --git a/test/PhpParser/Node/Stmt/PropertyTest.php b/test/PhpParser/Node/Stmt/PropertyTest.php index 02b0d004a6..712e93199a 100644 --- a/test/PhpParser/Node/Stmt/PropertyTest.php +++ b/test/PhpParser/Node/Stmt/PropertyTest.php @@ -36,17 +36,13 @@ public function testStaticImplicitlyPublic() { $this->assertFalse($node->isReadonly()); } - public function testReadonly() { - $node = new Property(Modifiers::READONLY, []); - $this->assertTrue($node->isReadonly()); - } - public function provideModifiers() { return [ ['public'], ['protected'], ['private'], ['static'], + ['readonly'], ]; } } From 9b46dffb12c6c83d33b993ae81b9a2895293dee8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 16:57:53 +0200 Subject: [PATCH 170/428] Fix formatting preservation for alternative elseif/else syntax Test taken from PR #797. --- grammar/php.y | 6 +++-- lib/PhpParser/Parser/Php7.php | 4 ++-- lib/PhpParser/Parser/Php8.php | 4 ++-- lib/PhpParser/ParserAbstract.php | 21 +++++++++++++++++ test/code/formatPreservation/comments.test | 2 +- test/code/prettyPrinter/comments.test | 26 +++++++++++++++++++++- 6 files changed, 55 insertions(+), 8 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index 69a67d83a6..3d94fabfe9 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -628,7 +628,8 @@ new_elseif_list: ; new_elseif: - T_ELSEIF '(' expr ')' ':' inner_statement_list { $$ = Stmt\ElseIf_[$3, $6]; } + T_ELSEIF '(' expr ')' ':' inner_statement_list + { $$ = Stmt\ElseIf_[$3, $6]; $this->fixupAlternativeElse($$); } ; else_single: @@ -638,7 +639,8 @@ else_single: new_else_single: /* empty */ { $$ = null; } - | T_ELSE ':' inner_statement_list { $$ = Stmt\Else_[$3]; } + | T_ELSE ':' inner_statement_list + { $$ = Stmt\Else_[$3]; $this->fixupAlternativeElse($$); } ; foreach_variable: diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index d85fd2d401..9c7c5ca08f 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1966,7 +1966,7 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 263 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 264 => function ($stackPos) { $this->semValue = null; @@ -1978,7 +1978,7 @@ protected function initReduceCallbacks() { $this->semValue = null; }, 267 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 268 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 80a40d3174..f0b9a0360c 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1984,7 +1984,7 @@ protected function initReduceCallbacks() { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 263 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 264 => function ($stackPos) { $this->semValue = null; @@ -1996,7 +1996,7 @@ protected function initReduceCallbacks() { $this->semValue = null; }, 267 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 268 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 37c9ec81a4..778e578bc2 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -20,9 +20,12 @@ use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassConst; use PhpParser\Node\Stmt\ClassMethod; +use PhpParser\Node\Stmt\Else_; +use PhpParser\Node\Stmt\ElseIf_; use PhpParser\Node\Stmt\Enum_; use PhpParser\Node\Stmt\Interface_; use PhpParser\Node\Stmt\Namespace_; +use PhpParser\Node\Stmt\Nop; use PhpParser\Node\Stmt\Property; use PhpParser\Node\Stmt\TryCatch; use PhpParser\Node\UseItem; @@ -874,6 +877,24 @@ protected function postprocessList(Expr\List_ $node): void { } } + /** @param ElseIf_|Else_ $node */ + protected function fixupAlternativeElse($node): void { + // Make sure a trailing nop statement carrying comments is part of the node. + $numStmts = \count($node->stmts); + if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) { + $nopAttrs = $node->stmts[$numStmts - 1]->getAttributes(); + if (isset($nopAttrs['endLine'])) { + $node->setAttribute('endLine', $nopAttrs['endLine']); + } + if (isset($nopAttrs['endFilePos'])) { + $node->setAttribute('endFilePos', $nopAttrs['endFilePos']); + } + if (isset($nopAttrs['endTokenPos'])) { + $node->setAttribute('endTokenPos', $nopAttrs['endTokenPos']); + } + } + } + protected function checkClassModifier(int $a, int $b, int $modifierPos) { try { Modifiers::verifyClassModifier($a, $b); diff --git a/test/code/formatPreservation/comments.test b/test/code/formatPreservation/comments.test index 61f21e2f56..1b62ab391a 100644 --- a/test/code/formatPreservation/comments.test +++ b/test/code/formatPreservation/comments.test @@ -49,4 +49,4 @@ class Test { public function test() { // some code } -} \ No newline at end of file +} diff --git a/test/code/prettyPrinter/comments.test b/test/code/prettyPrinter/comments.test index 34a9f93d8f..5163d62e69 100644 --- a/test/code/prettyPrinter/comments.test +++ b/test/code/prettyPrinter/comments.test @@ -64,4 +64,28 @@ function test() function test() { // empty -} \ No newline at end of file +} +----- + Date: Sun, 11 Sep 2022 17:49:41 +0200 Subject: [PATCH 171/428] Add return types to PrettyPrinter\Standard --- lib/PhpParser/PrettyPrinter/Standard.php | 359 ++++++++++++----------- 1 file changed, 180 insertions(+), 179 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 6241aec6a9..43b2e4a95d 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -16,7 +16,7 @@ class Standard extends PrettyPrinterAbstract { // Special nodes - protected function pParam(Node\Param $node) { + protected function pParam(Node\Param $node): string { return $this->pAttrGroups($node->attrGroups, true) . $this->pModifiers($node->flags) . ($node->type ? $this->p($node->type) . ' ' : '') @@ -26,25 +26,25 @@ protected function pParam(Node\Param $node) { . ($node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pArg(Node\Arg $node) { + protected function pArg(Node\Arg $node): string { return ($node->name ? $node->name->toString() . ': ' : '') . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); } - protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node) { + protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node): string { return '...'; } - protected function pConst(Node\Const_ $node) { + protected function pConst(Node\Const_ $node): string { return $node->name . ' = ' . $this->p($node->value); } - protected function pNullableType(Node\NullableType $node) { + protected function pNullableType(Node\NullableType $node): string { return '?' . $this->p($node->type); } - protected function pUnionType(Node\UnionType $node) { + protected function pUnionType(Node\UnionType $node): string { $types = []; foreach ($node->types as $typeNode) { if ($typeNode instanceof Node\IntersectionType) { @@ -56,78 +56,78 @@ protected function pUnionType(Node\UnionType $node) { return implode('|', $types); } - protected function pIntersectionType(Node\IntersectionType $node) { + protected function pIntersectionType(Node\IntersectionType $node): string { return $this->pImplode($node->types, '&'); } - protected function pIdentifier(Node\Identifier $node) { + protected function pIdentifier(Node\Identifier $node): string { return $node->name; } - protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node) { + protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node): string { return '$' . $node->name; } - protected function pAttribute(Node\Attribute $node) { + protected function pAttribute(Node\Attribute $node): string { return $this->p($node->name) . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : ''); } - protected function pAttributeGroup(Node\AttributeGroup $node) { + protected function pAttributeGroup(Node\AttributeGroup $node): string { return '#[' . $this->pCommaSeparated($node->attrs) . ']'; } // Names - protected function pName(Name $node) { + protected function pName(Name $node): string { return implode('\\', $node->parts); } - protected function pName_FullyQualified(Name\FullyQualified $node) { + protected function pName_FullyQualified(Name\FullyQualified $node): string { return '\\' . implode('\\', $node->parts); } - protected function pName_Relative(Name\Relative $node) { + protected function pName_Relative(Name\Relative $node): string { return 'namespace\\' . implode('\\', $node->parts); } // Magic Constants - protected function pScalar_MagicConst_Class(MagicConst\Class_ $node) { + protected function pScalar_MagicConst_Class(MagicConst\Class_ $node): string { return '__CLASS__'; } - protected function pScalar_MagicConst_Dir(MagicConst\Dir $node) { + protected function pScalar_MagicConst_Dir(MagicConst\Dir $node): string { return '__DIR__'; } - protected function pScalar_MagicConst_File(MagicConst\File $node) { + protected function pScalar_MagicConst_File(MagicConst\File $node): string { return '__FILE__'; } - protected function pScalar_MagicConst_Function(MagicConst\Function_ $node) { + protected function pScalar_MagicConst_Function(MagicConst\Function_ $node): string { return '__FUNCTION__'; } - protected function pScalar_MagicConst_Line(MagicConst\Line $node) { + protected function pScalar_MagicConst_Line(MagicConst\Line $node): string { return '__LINE__'; } - protected function pScalar_MagicConst_Method(MagicConst\Method $node) { + protected function pScalar_MagicConst_Method(MagicConst\Method $node): string { return '__METHOD__'; } - protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node) { + protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node): string { return '__NAMESPACE__'; } - protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node) { + protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node): string { return '__TRAIT__'; } // Scalars - protected function pScalar_String(Scalar\String_ $node) { + protected function pScalar_String(Scalar\String_ $node): string { $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED); switch ($kind) { case Scalar\String_::KIND_NOWDOC: @@ -163,7 +163,7 @@ protected function pScalar_String(Scalar\String_ $node) { throw new \Exception('Invalid string kind'); } - protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node) { + protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node): string { if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) { $label = $node->getAttribute('docLabel'); if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { @@ -181,7 +181,7 @@ protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node) { return '"' . $this->pEncapsList($node->parts, '"') . '"'; } - protected function pScalar_Int(Scalar\Int_ $node) { + protected function pScalar_Int(Scalar\Int_ $node): string { if ($node->value === -\PHP_INT_MAX-1) { // PHP_INT_MIN cannot be represented as a literal, // because the sign is not part of the literal @@ -211,7 +211,7 @@ protected function pScalar_Int(Scalar\Int_ $node) { throw new \Exception('Invalid number kind'); } - protected function pScalar_Float(Scalar\Float_ $node) { + protected function pScalar_Float(Scalar\Float_ $node): string { if (!is_finite($node->value)) { if ($node->value === \INF) { return '\INF'; @@ -240,177 +240,177 @@ protected function pScalar_Float(Scalar\Float_ $node) { // Assignments - protected function pExpr_Assign(Expr\Assign $node) { + protected function pExpr_Assign(Expr\Assign $node): string { return $this->pPrefixOp(Expr\Assign::class, $this->p($node->var) . ' = ', $node->expr); } - protected function pExpr_AssignRef(Expr\AssignRef $node) { + protected function pExpr_AssignRef(Expr\AssignRef $node): string { return $this->pPrefixOp(Expr\AssignRef::class, $this->p($node->var) . ' =& ', $node->expr); } - protected function pExpr_AssignOp_Plus(AssignOp\Plus $node) { + protected function pExpr_AssignOp_Plus(AssignOp\Plus $node): string { return $this->pPrefixOp(AssignOp\Plus::class, $this->p($node->var) . ' += ', $node->expr); } - protected function pExpr_AssignOp_Minus(AssignOp\Minus $node) { + protected function pExpr_AssignOp_Minus(AssignOp\Minus $node): string { return $this->pPrefixOp(AssignOp\Minus::class, $this->p($node->var) . ' -= ', $node->expr); } - protected function pExpr_AssignOp_Mul(AssignOp\Mul $node) { + protected function pExpr_AssignOp_Mul(AssignOp\Mul $node): string { return $this->pPrefixOp(AssignOp\Mul::class, $this->p($node->var) . ' *= ', $node->expr); } - protected function pExpr_AssignOp_Div(AssignOp\Div $node) { + protected function pExpr_AssignOp_Div(AssignOp\Div $node): string { return $this->pPrefixOp(AssignOp\Div::class, $this->p($node->var) . ' /= ', $node->expr); } - protected function pExpr_AssignOp_Concat(AssignOp\Concat $node) { + protected function pExpr_AssignOp_Concat(AssignOp\Concat $node): string { return $this->pPrefixOp(AssignOp\Concat::class, $this->p($node->var) . ' .= ', $node->expr); } - protected function pExpr_AssignOp_Mod(AssignOp\Mod $node) { + protected function pExpr_AssignOp_Mod(AssignOp\Mod $node): string { return $this->pPrefixOp(AssignOp\Mod::class, $this->p($node->var) . ' %= ', $node->expr); } - protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node) { + protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node): string { return $this->pPrefixOp(AssignOp\BitwiseAnd::class, $this->p($node->var) . ' &= ', $node->expr); } - protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node) { + protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node): string { return $this->pPrefixOp(AssignOp\BitwiseOr::class, $this->p($node->var) . ' |= ', $node->expr); } - protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node) { + protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node): string { return $this->pPrefixOp(AssignOp\BitwiseXor::class, $this->p($node->var) . ' ^= ', $node->expr); } - protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node) { + protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node): string { return $this->pPrefixOp(AssignOp\ShiftLeft::class, $this->p($node->var) . ' <<= ', $node->expr); } - protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node) { + protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node): string { return $this->pPrefixOp(AssignOp\ShiftRight::class, $this->p($node->var) . ' >>= ', $node->expr); } - protected function pExpr_AssignOp_Pow(AssignOp\Pow $node) { + protected function pExpr_AssignOp_Pow(AssignOp\Pow $node): string { return $this->pPrefixOp(AssignOp\Pow::class, $this->p($node->var) . ' **= ', $node->expr); } - protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node) { + protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node): string { return $this->pPrefixOp(AssignOp\Coalesce::class, $this->p($node->var) . ' ??= ', $node->expr); } // Binary expressions - protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node) { + protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node): string { return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right); } - protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node) { + protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node): string { return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right); } - protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node) { + protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node): string { return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right); } - protected function pExpr_BinaryOp_Div(BinaryOp\Div $node) { + protected function pExpr_BinaryOp_Div(BinaryOp\Div $node): string { return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right); } - protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node) { + protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node): string { return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right); } - protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node) { + protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node): string { return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right); } - protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node) { + protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node): string { return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right); } - protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node) { + protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node): string { return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right); } - protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node) { + protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node): string { return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right); } - protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node) { + protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node): string { return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right); } - protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node) { + protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node): string { return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right); } - protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node) { + protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node): string { return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right); } - protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node) { + protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node): string { return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right); } - protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node) { + protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node): string { return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right); } - protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node) { + protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node): string { return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right); } - protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node) { + protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node): string { return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right); } - protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node) { + protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node): string { return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right); } - protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node) { + protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node): string { return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right); } - protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node) { + protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node): string { return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right); } - protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node) { + protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node): string { return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right); } - protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node) { + protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node): string { return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right); } - protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node) { + protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node): string { return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right); } - protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node) { + protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node): string { return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right); } - protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node) { + protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node): string { return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right); } - protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node) { + protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node): string { return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right); } - protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node) { + protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node): string { return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right); } - protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node) { + protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node): string { return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right); } - protected function pExpr_Instanceof(Expr\Instanceof_ $node) { + protected function pExpr_Instanceof(Expr\Instanceof_ $node): string { list($precedence, $associativity) = $this->precedenceMap[Expr\Instanceof_::class]; return $this->pPrec($node->expr, $precedence, $associativity, -1) . ' instanceof ' @@ -419,15 +419,15 @@ protected function pExpr_Instanceof(Expr\Instanceof_ $node) { // Unary expressions - protected function pExpr_BooleanNot(Expr\BooleanNot $node) { + protected function pExpr_BooleanNot(Expr\BooleanNot $node): string { return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr); } - protected function pExpr_BitwiseNot(Expr\BitwiseNot $node) { + protected function pExpr_BitwiseNot(Expr\BitwiseNot $node): string { return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr); } - protected function pExpr_UnaryMinus(Expr\UnaryMinus $node) { + protected function pExpr_UnaryMinus(Expr\UnaryMinus $node): string { if ($node->expr instanceof Expr\UnaryMinus || $node->expr instanceof Expr\PreDec) { // Enforce -(-$expr) instead of --$expr return '-(' . $this->p($node->expr) . ')'; @@ -435,7 +435,7 @@ protected function pExpr_UnaryMinus(Expr\UnaryMinus $node) { return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr); } - protected function pExpr_UnaryPlus(Expr\UnaryPlus $node) { + protected function pExpr_UnaryPlus(Expr\UnaryPlus $node): string { if ($node->expr instanceof Expr\UnaryPlus || $node->expr instanceof Expr\PreInc) { // Enforce +(+$expr) instead of ++$expr return '+(' . $this->p($node->expr) . ')'; @@ -443,41 +443,41 @@ protected function pExpr_UnaryPlus(Expr\UnaryPlus $node) { return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr); } - protected function pExpr_PreInc(Expr\PreInc $node) { + protected function pExpr_PreInc(Expr\PreInc $node): string { return '++' . $this->p($node->var); } - protected function pExpr_PreDec(Expr\PreDec $node) { + protected function pExpr_PreDec(Expr\PreDec $node): string { return '--' . $this->p($node->var); } - protected function pExpr_PostInc(Expr\PostInc $node) { + protected function pExpr_PostInc(Expr\PostInc $node): string { return $this->p($node->var) . '++'; } - protected function pExpr_PostDec(Expr\PostDec $node) { + protected function pExpr_PostDec(Expr\PostDec $node): string { return $this->p($node->var) . '--'; } - protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node) { + protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node): string { return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr); } - protected function pExpr_YieldFrom(Expr\YieldFrom $node) { + protected function pExpr_YieldFrom(Expr\YieldFrom $node): string { return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr); } - protected function pExpr_Print(Expr\Print_ $node) { + protected function pExpr_Print(Expr\Print_ $node): string { return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr); } // Casts - protected function pExpr_Cast_Int(Cast\Int_ $node) { + protected function pExpr_Cast_Int(Cast\Int_ $node): string { return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr); } - protected function pExpr_Cast_Double(Cast\Double $node) { + protected function pExpr_Cast_Double(Cast\Double $node): string { $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE); if ($kind === Cast\Double::KIND_DOUBLE) { $cast = '(double)'; @@ -490,44 +490,44 @@ protected function pExpr_Cast_Double(Cast\Double $node) { return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr); } - protected function pExpr_Cast_String(Cast\String_ $node) { + protected function pExpr_Cast_String(Cast\String_ $node): string { return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr); } - protected function pExpr_Cast_Array(Cast\Array_ $node) { + protected function pExpr_Cast_Array(Cast\Array_ $node): string { return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr); } - protected function pExpr_Cast_Object(Cast\Object_ $node) { + protected function pExpr_Cast_Object(Cast\Object_ $node): string { return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr); } - protected function pExpr_Cast_Bool(Cast\Bool_ $node) { + protected function pExpr_Cast_Bool(Cast\Bool_ $node): string { return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr); } - protected function pExpr_Cast_Unset(Cast\Unset_ $node) { + protected function pExpr_Cast_Unset(Cast\Unset_ $node): string { return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr); } // Function calls and similar constructs - protected function pExpr_FuncCall(Expr\FuncCall $node) { + protected function pExpr_FuncCall(Expr\FuncCall $node): string { return $this->pCallLhs($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_MethodCall(Expr\MethodCall $node) { + protected function pExpr_MethodCall(Expr\MethodCall $node): string { return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node) { + protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node): string { return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_StaticCall(Expr\StaticCall $node) { + protected function pExpr_StaticCall(Expr\StaticCall $node): string { return $this->pDereferenceLhs($node->class) . '::' . ($node->name instanceof Expr ? ($node->name instanceof Expr\Variable @@ -537,19 +537,19 @@ protected function pExpr_StaticCall(Expr\StaticCall $node) { . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_Empty(Expr\Empty_ $node) { + protected function pExpr_Empty(Expr\Empty_ $node): string { return 'empty(' . $this->p($node->expr) . ')'; } - protected function pExpr_Isset(Expr\Isset_ $node) { + protected function pExpr_Isset(Expr\Isset_ $node): string { return 'isset(' . $this->pCommaSeparated($node->vars) . ')'; } - protected function pExpr_Eval(Expr\Eval_ $node) { + protected function pExpr_Eval(Expr\Eval_ $node): string { return 'eval(' . $this->p($node->expr) . ')'; } - protected function pExpr_Include(Expr\Include_ $node) { + protected function pExpr_Include(Expr\Include_ $node): string { static $map = [ Expr\Include_::TYPE_INCLUDE => 'include', Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', @@ -560,7 +560,7 @@ protected function pExpr_Include(Expr\Include_ $node) { return $map[$node->type] . ' ' . $this->p($node->expr); } - protected function pExpr_List(Expr\List_ $node) { + protected function pExpr_List(Expr\List_ $node): string { $syntax = $node->getAttribute('kind', $this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_LIST); if ($syntax === Expr\List_::KIND_ARRAY) { @@ -572,11 +572,11 @@ protected function pExpr_List(Expr\List_ $node) { // Other - protected function pExpr_Error(Expr\Error $node) { + protected function pExpr_Error(Expr\Error $node): string { throw new \LogicException('Cannot pretty-print AST with Error nodes'); } - protected function pExpr_Variable(Expr\Variable $node) { + protected function pExpr_Variable(Expr\Variable $node): string { if ($node->name instanceof Expr) { return '${' . $this->p($node->name) . '}'; } else { @@ -584,7 +584,7 @@ protected function pExpr_Variable(Expr\Variable $node) { } } - protected function pExpr_Array(Expr\Array_ $node) { + protected function pExpr_Array(Expr\Array_ $node): string { $syntax = $node->getAttribute('kind', $this->shortArraySyntax ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); if ($syntax === Expr\Array_::KIND_SHORT) { @@ -594,43 +594,43 @@ protected function pExpr_Array(Expr\Array_ $node) { } } - protected function pArrayItem(Node\ArrayItem $node) { + protected function pArrayItem(Node\ArrayItem $node): string { return (null !== $node->key ? $this->p($node->key) . ' => ' : '') . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); } - protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node) { + protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node): string { return $this->pDereferenceLhs($node->var) . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']'; } - protected function pExpr_ConstFetch(Expr\ConstFetch $node) { + protected function pExpr_ConstFetch(Expr\ConstFetch $node): string { return $this->p($node->name); } - protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node) { + protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string { return $this->pDereferenceLhs($node->class) . '::' . $this->p($node->name); } - protected function pExpr_PropertyFetch(Expr\PropertyFetch $node) { + protected function pExpr_PropertyFetch(Expr\PropertyFetch $node): string { return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name); } - protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node) { + protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node): string { return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name); } - protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node) { + protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node): string { return $this->pDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); } - protected function pExpr_ShellExec(Expr\ShellExec $node) { + protected function pExpr_ShellExec(Expr\ShellExec $node): string { return '`' . $this->pEncapsList($node->parts, '`') . '`'; } - protected function pExpr_Closure(Expr\Closure $node) { + protected function pExpr_Closure(Expr\Closure $node): string { return $this->pAttrGroups($node->attrGroups, true) . ($node->static ? 'static ' : '') . 'function ' . ($node->byRef ? '&' : '') @@ -640,19 +640,19 @@ protected function pExpr_Closure(Expr\Closure $node) { . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pExpr_Match(Expr\Match_ $node) { + protected function pExpr_Match(Expr\Match_ $node): string { return 'match (' . $this->p($node->cond) . ') {' . $this->pCommaSeparatedMultiline($node->arms, true) . $this->nl . '}'; } - protected function pMatchArm(Node\MatchArm $node) { + protected function pMatchArm(Node\MatchArm $node): string { return ($node->conds ? $this->pCommaSeparated($node->conds) : 'default') . ' => ' . $this->p($node->body); } - protected function pExpr_ArrowFunction(Expr\ArrowFunction $node) { + protected function pExpr_ArrowFunction(Expr\ArrowFunction $node): string { return $this->pAttrGroups($node->attrGroups, true) . ($node->static ? 'static ' : '') . 'fn' . ($node->byRef ? '&' : '') @@ -662,11 +662,11 @@ protected function pExpr_ArrowFunction(Expr\ArrowFunction $node) { . $this->p($node->expr); } - protected function pClosureUse(Node\ClosureUse $node) { + protected function pClosureUse(Node\ClosureUse $node): string { return ($node->byRef ? '&' : '') . $this->p($node->var); } - protected function pExpr_New(Expr\New_ $node) { + protected function pExpr_New(Expr\New_ $node): string { if ($node->class instanceof Stmt\Class_) { $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : ''; return 'new ' . $this->pClassCommon($node->class, $args); @@ -675,11 +675,11 @@ protected function pExpr_New(Expr\New_ $node) { . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_Clone(Expr\Clone_ $node) { + protected function pExpr_Clone(Expr\Clone_ $node): string { return 'clone ' . $this->p($node->expr); } - protected function pExpr_Ternary(Expr\Ternary $node) { + protected function pExpr_Ternary(Expr\Ternary $node): string { // 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::class, @@ -687,17 +687,17 @@ protected function pExpr_Ternary(Expr\Ternary $node) { ); } - protected function pExpr_Exit(Expr\Exit_ $node) { + protected function pExpr_Exit(Expr\Exit_ $node): string { $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_Throw(Expr\Throw_ $node) { + protected function pExpr_Throw(Expr\Throw_ $node): string { return 'throw ' . $this->p($node->expr); } - protected function pExpr_Yield(Expr\Yield_ $node) { + protected function pExpr_Yield(Expr\Yield_ $node): string { if ($node->value === null) { return 'yield'; } else { @@ -711,7 +711,7 @@ protected function pExpr_Yield(Expr\Yield_ $node) { // Declarations - protected function pStmt_Namespace(Stmt\Namespace_ $node) { + protected function pStmt_Namespace(Stmt\Namespace_ $node): string { if ($this->canUseSemicolonNamespaces) { return 'namespace ' . $this->p($node->name) . ';' . $this->nl . $this->pStmts($node->stmts, false); @@ -721,34 +721,34 @@ protected function pStmt_Namespace(Stmt\Namespace_ $node) { } } - protected function pStmt_Use(Stmt\Use_ $node) { + protected function pStmt_Use(Stmt\Use_ $node): string { return 'use ' . $this->pUseType($node->type) . $this->pCommaSeparated($node->uses) . ';'; } - protected function pStmt_GroupUse(Stmt\GroupUse $node) { + protected function pStmt_GroupUse(Stmt\GroupUse $node): string { return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) . '\{' . $this->pCommaSeparated($node->uses) . '};'; } - protected function pUseItem(Node\UseItem $node) { + protected function pUseItem(Node\UseItem $node): string { return $this->pUseType($node->type) . $this->p($node->name) . (null !== $node->alias ? ' as ' . $node->alias : ''); } - protected function pUseType(int $type) { + protected function pUseType(int $type): string { return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); } - protected function pStmt_Interface(Stmt\Interface_ $node) { + protected function pStmt_Interface(Stmt\Interface_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'interface ' . $node->name . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Enum(Stmt\Enum_ $node) { + protected function pStmt_Enum(Stmt\Enum_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'enum ' . $node->name . ($node->scalarType ? " : $node->scalarType" : '') @@ -756,36 +756,36 @@ protected function pStmt_Enum(Stmt\Enum_ $node) { . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Class(Stmt\Class_ $node) { + protected function pStmt_Class(Stmt\Class_ $node): string { return $this->pClassCommon($node, ' ' . $node->name); } - protected function pStmt_Trait(Stmt\Trait_ $node) { + protected function pStmt_Trait(Stmt\Trait_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'trait ' . $node->name . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_EnumCase(Stmt\EnumCase $node) { + protected function pStmt_EnumCase(Stmt\EnumCase $node): string { return $this->pAttrGroups($node->attrGroups) . 'case ' . $node->name . ($node->expr ? ' = ' . $this->p($node->expr) : '') . ';'; } - protected function pStmt_TraitUse(Stmt\TraitUse $node) { + protected function pStmt_TraitUse(Stmt\TraitUse $node): string { return 'use ' . $this->pCommaSeparated($node->traits) . (empty($node->adaptations) ? ';' : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}'); } - protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node) { + protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node): string { return $this->p($node->trait) . '::' . $node->method . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';'; } - protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node) { + protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node): string { return (null !== $node->trait ? $this->p($node->trait) . '::' : '') . $node->method . ' as' . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '') @@ -793,19 +793,19 @@ protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias . ';'; } - protected function pStmt_Property(Stmt\Property $node) { + protected function pStmt_Property(Stmt\Property $node): string { return $this->pAttrGroups($node->attrGroups) . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . ($node->type ? $this->p($node->type) . ' ' : '') . $this->pCommaSeparated($node->props) . ';'; } - protected function pPropertyItem(Node\PropertyItem $node) { + protected function pPropertyItem(Node\PropertyItem $node): string { return '$' . $node->name . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pStmt_ClassMethod(Stmt\ClassMethod $node) { + protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'function ' . ($node->byRef ? '&' : '') . $node->name @@ -816,13 +816,13 @@ protected function pStmt_ClassMethod(Stmt\ClassMethod $node) { : ';'); } - protected function pStmt_ClassConst(Stmt\ClassConst $node) { + protected function pStmt_ClassConst(Stmt\ClassConst $node): string { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'const ' . $this->pCommaSeparated($node->consts) . ';'; } - protected function pStmt_Function(Stmt\Function_ $node) { + protected function pStmt_Function(Stmt\Function_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'function ' . ($node->byRef ? '&' : '') . $node->name . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' @@ -830,38 +830,38 @@ protected function pStmt_Function(Stmt\Function_ $node) { . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Const(Stmt\Const_ $node) { + protected function pStmt_Const(Stmt\Const_ $node): string { return 'const ' . $this->pCommaSeparated($node->consts) . ';'; } - protected function pStmt_Declare(Stmt\Declare_ $node) { + protected function pStmt_Declare(Stmt\Declare_ $node): string { return 'declare (' . $this->pCommaSeparated($node->declares) . ')' . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); } - protected function pDeclareItem(Node\DeclareItem $node) { + protected function pDeclareItem(Node\DeclareItem $node): string { return $node->key . '=' . $this->p($node->value); } // Control flow - protected function pStmt_If(Stmt\If_ $node) { + protected function pStmt_If(Stmt\If_ $node): string { return 'if (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '') . (null !== $node->else ? ' ' . $this->p($node->else) : ''); } - protected function pStmt_ElseIf(Stmt\ElseIf_ $node) { + protected function pStmt_ElseIf(Stmt\ElseIf_ $node): string { return 'elseif (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Else(Stmt\Else_ $node) { + protected function pStmt_Else(Stmt\Else_ $node): string { return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_For(Stmt\For_ $node) { + protected function pStmt_For(Stmt\For_ $node): string { return 'for (' . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') @@ -869,116 +869,116 @@ protected function pStmt_For(Stmt\For_ $node) { . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Foreach(Stmt\Foreach_ $node) { + protected function pStmt_Foreach(Stmt\Foreach_ $node): string { return 'foreach (' . $this->p($node->expr) . ' as ' . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_While(Stmt\While_ $node) { + protected function pStmt_While(Stmt\While_ $node): string { return 'while (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Do(Stmt\Do_ $node) { + protected function pStmt_Do(Stmt\Do_ $node): string { return 'do {' . $this->pStmts($node->stmts) . $this->nl . '} while (' . $this->p($node->cond) . ');'; } - protected function pStmt_Switch(Stmt\Switch_ $node) { + protected function pStmt_Switch(Stmt\Switch_ $node): string { return 'switch (' . $this->p($node->cond) . ') {' . $this->pStmts($node->cases) . $this->nl . '}'; } - protected function pStmt_Case(Stmt\Case_ $node) { + protected function pStmt_Case(Stmt\Case_ $node): string { return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' . $this->pStmts($node->stmts); } - protected function pStmt_TryCatch(Stmt\TryCatch $node) { + protected function pStmt_TryCatch(Stmt\TryCatch $node): string { return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '') . ($node->finally !== null ? ' ' . $this->p($node->finally) : ''); } - protected function pStmt_Catch(Stmt\Catch_ $node) { + protected function pStmt_Catch(Stmt\Catch_ $node): string { return 'catch (' . $this->pImplode($node->types, '|') . ($node->var !== null ? ' ' . $this->p($node->var) : '') . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Finally(Stmt\Finally_ $node) { + protected function pStmt_Finally(Stmt\Finally_ $node): string { return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Break(Stmt\Break_ $node) { + protected function pStmt_Break(Stmt\Break_ $node): string { return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; } - protected function pStmt_Continue(Stmt\Continue_ $node) { + protected function pStmt_Continue(Stmt\Continue_ $node): string { return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; } - protected function pStmt_Return(Stmt\Return_ $node) { + protected function pStmt_Return(Stmt\Return_ $node): string { return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';'; } - protected function pStmt_Throw(Stmt\Throw_ $node) { + protected function pStmt_Throw(Stmt\Throw_ $node): string { return 'throw ' . $this->p($node->expr) . ';'; } - protected function pStmt_Label(Stmt\Label $node) { + protected function pStmt_Label(Stmt\Label $node): string { return $node->name . ':'; } - protected function pStmt_Goto(Stmt\Goto_ $node) { + protected function pStmt_Goto(Stmt\Goto_ $node): string { return 'goto ' . $node->name . ';'; } // Other - protected function pStmt_Expression(Stmt\Expression $node) { + protected function pStmt_Expression(Stmt\Expression $node): string { return $this->p($node->expr) . ';'; } - protected function pStmt_Echo(Stmt\Echo_ $node) { + protected function pStmt_Echo(Stmt\Echo_ $node): string { return 'echo ' . $this->pCommaSeparated($node->exprs) . ';'; } - protected function pStmt_Static(Stmt\Static_ $node) { + protected function pStmt_Static(Stmt\Static_ $node): string { return 'static ' . $this->pCommaSeparated($node->vars) . ';'; } - protected function pStmt_Global(Stmt\Global_ $node) { + protected function pStmt_Global(Stmt\Global_ $node): string { return 'global ' . $this->pCommaSeparated($node->vars) . ';'; } - protected function pStaticVar(Node\StaticVar $node) { + protected function pStaticVar(Node\StaticVar $node): string { return $this->p($node->var) . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pStmt_Unset(Stmt\Unset_ $node) { + protected function pStmt_Unset(Stmt\Unset_ $node): string { return 'unset(' . $this->pCommaSeparated($node->vars) . ');'; } - protected function pStmt_InlineHTML(Stmt\InlineHTML $node) { + protected function pStmt_InlineHTML(Stmt\InlineHTML $node): string { $newline = $node->getAttribute('hasLeadingNewline', true) ? "\n" : ''; return '?>' . $newline . $node->value . 'remaining; } - protected function pStmt_Nop(Stmt\Nop $node) { + protected function pStmt_Nop(Stmt\Nop $node): string { return ''; } // Helpers - protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken) { + protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken): string { return $this->pAttrGroups($node->attrGroups, $node->name === null) . $this->pModifiers($node->flags) . 'class' . $afterClassToken @@ -987,15 +987,16 @@ protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken) { . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pObjectProperty(Node $node) { + protected function pObjectProperty(Node $node): string { if ($node instanceof Expr) { return '{' . $this->p($node) . '}'; } else { - return $node; + assert($node instanceof Node\Identifier); + return $node->name; } } - protected function pEncapsList(array $encapsList, ?string $quote) { + protected function pEncapsList(array $encapsList, ?string $quote): string { $return = ''; foreach ($encapsList as $element) { if ($element instanceof Node\InterpolatedStringPart) { @@ -1008,7 +1009,7 @@ protected function pEncapsList(array $encapsList, ?string $quote) { return $return; } - protected function pSingleQuotedString(string $string) { + protected function pSingleQuotedString(string $string): string { // It is idiomatic to only escape backslashes when necessary, i.e. when followed by ', \ or // the end of the string ('Foo\Bar' instead of 'Foo\\Bar'). However, we also don't want to // produce an odd number of backslashes, so '\\\\a' should not get rendered as '\\\a', even @@ -1017,7 +1018,7 @@ protected function pSingleQuotedString(string $string) { return '\'' . preg_replace($regex, '\\\\$0', $string) . '\''; } - protected function escapeString(string $string, ?string $quote) { + protected function escapeString(string $string, ?string $quote): string { if (null === $quote) { // For doc strings, don't escape newlines $escaped = addcslashes($string, "\t\f\v$\\"); @@ -1042,7 +1043,7 @@ protected function escapeString(string $string, ?string $quote) { | (?<=[\xF0-\xF4])[\x80-\xBF](?![\x80-\xBF]{2}) # Short 4 byte sequence | (?<=[\xF0-\xF4][\x80-\xBF])[\x80-\xBF](?![\x80-\xBF]) # Short 4 byte sequence (2) )/x'; - return preg_replace_callback($regex, function ($matches) { + return preg_replace_callback($regex, function ($matches): string { assert(strlen($matches[0]) === 1); $hex = dechex(ord($matches[0])); ; @@ -1050,14 +1051,14 @@ protected function escapeString(string $string, ?string $quote) { }, $escaped); } - protected function containsEndLabel(string $string, string $label, bool $atStart = true, bool $atEnd = true) { + protected function containsEndLabel(string $string, string $label, bool $atStart = true, bool $atEnd = true): bool { $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, string $label) { + protected function encapsedContainsEndLabel(array $parts, string $label): bool { foreach ($parts as $i => $part) { $atStart = $i === 0; $atEnd = $i === count($parts) - 1; @@ -1070,7 +1071,7 @@ protected function encapsedContainsEndLabel(array $parts, string $label) { return false; } - protected function pDereferenceLhs(Node $node) { + protected function pDereferenceLhs(Node $node): string { if (!$this->dereferenceLhsRequiresParens($node)) { return $this->p($node); } else { @@ -1078,7 +1079,7 @@ protected function pDereferenceLhs(Node $node) { } } - protected function pCallLhs(Node $node) { + protected function pCallLhs(Node $node): string { if (!$this->callLhsRequiresParens($node)) { return $this->p($node); } else { @@ -1086,7 +1087,7 @@ protected function pCallLhs(Node $node) { } } - protected function pNewVariable(Node $node) { + protected function pNewVariable(Node $node): string { // TODO: This is not fully accurate. return $this->pDereferenceLhs($node); } @@ -1104,7 +1105,7 @@ protected function hasNodeWithComments(array $nodes): bool { return false; } - protected function pMaybeMultiline(array $nodes, bool $trailingComma = false) { + protected function pMaybeMultiline(array $nodes, bool $trailingComma = false): string { if (!$this->hasNodeWithComments($nodes)) { return $this->pCommaSeparated($nodes); } else { From 48f470eac7b1a193669e67bdec00eb42bd56259b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 17:51:59 +0200 Subject: [PATCH 172/428] Add missing return types --- grammar/parser.template | 2 +- lib/PhpParser/Builder/Class_.php | 5 ++ lib/PhpParser/Builder/TraitUseAdaptation.php | 2 +- lib/PhpParser/ConstExprEvaluator.php | 6 +- lib/PhpParser/Error.php | 8 +-- lib/PhpParser/ErrorHandler.php | 2 +- lib/PhpParser/ErrorHandler/Collecting.php | 4 +- lib/PhpParser/ErrorHandler/Throwing.php | 2 +- lib/PhpParser/Internal/Differ.php | 4 +- .../Internal/PrintableNewAnonClassNode.php | 2 +- lib/PhpParser/Internal/TokenStream.php | 8 +-- lib/PhpParser/JsonDecoder.php | 6 +- lib/PhpParser/Lexer.php | 4 +- lib/PhpParser/Lexer/Emulative.php | 8 +-- lib/PhpParser/Modifiers.php | 4 +- lib/PhpParser/NameContext.php | 10 ++-- lib/PhpParser/Node.php | 6 +- lib/PhpParser/NodeAbstract.php | 6 +- lib/PhpParser/NodeDumper.php | 16 +++--- lib/PhpParser/NodeTraverser.php | 6 +- lib/PhpParser/NodeTraverserInterface.php | 4 +- lib/PhpParser/NodeVisitor/NameResolver.php | 14 +++-- lib/PhpParser/Parser/Php7.php | 2 +- lib/PhpParser/Parser/Php8.php | 2 +- lib/PhpParser/ParserAbstract.php | 57 ++++++++++--------- lib/PhpParser/PrettyPrinterAbstract.php | 30 +++++----- 26 files changed, 119 insertions(+), 101 deletions(-) diff --git a/grammar/parser.template b/grammar/parser.template index 2633d255e8..5d7da49f3f 100644 --- a/grammar/parser.template +++ b/grammar/parser.template @@ -94,7 +94,7 @@ class #(-p) extends \PhpParser\ParserAbstract ); #endif - protected function initReduceCallbacks() { + protected function initReduceCallbacks(): void { $this->reduceCallbacks = [ #reduce %n => function ($stackPos) { diff --git a/lib/PhpParser/Builder/Class_.php b/lib/PhpParser/Builder/Class_.php index 6c58b54247..db8c6a86ee 100644 --- a/lib/PhpParser/Builder/Class_.php +++ b/lib/PhpParser/Builder/Class_.php @@ -83,6 +83,11 @@ public function makeFinal() { return $this; } + /** + * Makes the class readonly. + * + * @return $this The builder instance (for fluid interface) + */ public function makeReadonly() { $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::READONLY); diff --git a/lib/PhpParser/Builder/TraitUseAdaptation.php b/lib/PhpParser/Builder/TraitUseAdaptation.php index b416429e77..6aac8e4484 100644 --- a/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -114,7 +114,7 @@ public function insteadof(...$traits) { return $this; } - protected function setModifier(int $modifier) { + protected function setModifier(int $modifier): void { if ($this->type === self::TYPE_UNDEFINED) { $this->type = self::TYPE_ALIAS; } diff --git a/lib/PhpParser/ConstExprEvaluator.php b/lib/PhpParser/ConstExprEvaluator.php index 1ad4396819..4ab94995ad 100644 --- a/lib/PhpParser/ConstExprEvaluator.php +++ b/lib/PhpParser/ConstExprEvaluator.php @@ -101,6 +101,7 @@ public function evaluateDirectly(Expr $expr) { return $this->evaluate($expr); } + /** @return mixed */ private function evaluate(Expr $expr) { if ($expr instanceof Scalar\Int_ || $expr instanceof Scalar\Float_ @@ -146,7 +147,7 @@ private function evaluate(Expr $expr) { return ($this->fallbackEvaluator)($expr); } - private function evaluateArray(Expr\Array_ $expr) { + private function evaluateArray(Expr\Array_ $expr): array { $array = []; foreach ($expr->items as $item) { if (null !== $item->key) { @@ -160,6 +161,7 @@ private function evaluateArray(Expr\Array_ $expr) { return $array; } + /** @return mixed */ private function evaluateTernary(Expr\Ternary $expr) { if (null === $expr->if) { return $this->evaluate($expr->cond) ?: $this->evaluate($expr->else); @@ -170,6 +172,7 @@ private function evaluateTernary(Expr\Ternary $expr) { : $this->evaluate($expr->else); } + /** @return mixed */ private function evaluateBinaryOp(Expr\BinaryOp $expr) { if ($expr instanceof Expr\BinaryOp\Coalesce && $expr->left instanceof Expr\ArrayDimFetch @@ -216,6 +219,7 @@ private function evaluateBinaryOp(Expr\BinaryOp $expr) { throw new \Exception('Should not happen'); } + /** @return mixed */ private function evaluateConstFetch(Expr\ConstFetch $expr) { $name = $expr->name->toLowerString(); switch ($name) { diff --git a/lib/PhpParser/Error.php b/lib/PhpParser/Error.php index 12a7724dc0..3fca6938c1 100644 --- a/lib/PhpParser/Error.php +++ b/lib/PhpParser/Error.php @@ -64,7 +64,7 @@ public function getAttributes(): array { * * @param array $attributes */ - public function setAttributes(array $attributes) { + public function setAttributes(array $attributes): void { $this->attributes = $attributes; $this->updateMessage(); } @@ -74,7 +74,7 @@ public function setAttributes(array $attributes) { * * @param string $message Error message */ - public function setRawMessage(string $message) { + public function setRawMessage(string $message): void { $this->rawMessage = $message; $this->updateMessage(); } @@ -84,7 +84,7 @@ public function setRawMessage(string $message) { * * @param int $line Error start line */ - public function setStartLine(int $line) { + public function setStartLine(int $line): void { $this->attributes['startLine'] = $line; $this->updateMessage(); } @@ -167,7 +167,7 @@ private function toColumn(string $code, int $pos): int { /** * Updates the exception message after a change to rawMessage or rawLine. */ - protected function updateMessage() { + protected function updateMessage(): void { $this->message = $this->rawMessage; if (-1 === $this->getStartLine()) { diff --git a/lib/PhpParser/ErrorHandler.php b/lib/PhpParser/ErrorHandler.php index 96d587063c..51ad730c4e 100644 --- a/lib/PhpParser/ErrorHandler.php +++ b/lib/PhpParser/ErrorHandler.php @@ -8,5 +8,5 @@ interface ErrorHandler { * * @param Error $error The error that needs to be handled */ - public function handleError(Error $error); + public function handleError(Error $error): void; } diff --git a/lib/PhpParser/ErrorHandler/Collecting.php b/lib/PhpParser/ErrorHandler/Collecting.php index 5eff5fac9f..9a297399bc 100644 --- a/lib/PhpParser/ErrorHandler/Collecting.php +++ b/lib/PhpParser/ErrorHandler/Collecting.php @@ -14,7 +14,7 @@ class Collecting implements ErrorHandler { /** @var Error[] Collected errors */ private $errors = []; - public function handleError(Error $error) { + public function handleError(Error $error): void { $this->errors[] = $error; } @@ -39,7 +39,7 @@ public function hasErrors(): bool { /** * Reset/clear collected errors. */ - public function clearErrors() { + public function clearErrors(): void { $this->errors = []; } } diff --git a/lib/PhpParser/ErrorHandler/Throwing.php b/lib/PhpParser/ErrorHandler/Throwing.php index da6cb25f40..dff33dd021 100644 --- a/lib/PhpParser/ErrorHandler/Throwing.php +++ b/lib/PhpParser/ErrorHandler/Throwing.php @@ -11,7 +11,7 @@ * This is the default strategy used by all components. */ class Throwing implements ErrorHandler { - public function handleError(Error $error) { + public function handleError(Error $error): void { throw $error; } } diff --git a/lib/PhpParser/Internal/Differ.php b/lib/PhpParser/Internal/Differ.php index dff5977332..a8bc7796cf 100644 --- a/lib/PhpParser/Internal/Differ.php +++ b/lib/PhpParser/Internal/Differ.php @@ -50,7 +50,7 @@ public function diffWithReplacements(array $old, array $new): array { return $this->coalesceReplacements($this->diff($old, $new)); } - private function calculateTrace(array $a, array $b) { + private function calculateTrace(array $a, array $b): array { $n = \count($a); $m = \count($b); $max = $n + $m; @@ -80,7 +80,7 @@ private function calculateTrace(array $a, array $b) { throw new \Exception('Should not happen'); } - private function extractDiff(array $trace, int $x, int $y, array $a, array $b) { + private function extractDiff(array $trace, int $x, int $y, array $a, array $b): array { $result = []; for ($d = \count($trace) - 1; $d >= 0; $d--) { $v = $trace[$d]; diff --git a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index d4b31c1581..0d67eb94db 100644 --- a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -39,7 +39,7 @@ public function __construct( $this->stmts = $stmts; } - public static function fromNewNode(Expr\New_ $newNode) { + public static function fromNewNode(Expr\New_ $newNode): self { $class = $newNode->class; assert($class instanceof Node\Stmt\Class_); // We don't assert that $class->name is null here, to allow consumers to assign unique names diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index 5dbd9912ad..ca2bcaa36c 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -103,7 +103,7 @@ public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType): bool { } /** @param int|string|array $skipTokenType */ - public function skipLeft(int $pos, $skipTokenType) { + public function skipLeft(int $pos, $skipTokenType): int { $tokens = $this->tokens; $pos = $this->skipLeftWhitespace($pos); @@ -121,7 +121,7 @@ public function skipLeft(int $pos, $skipTokenType) { } /** @param int|string|array $skipTokenType */ - public function skipRight(int $pos, $skipTokenType) { + public function skipRight(int $pos, $skipTokenType): int { $tokens = $this->tokens; $pos = $this->skipRightWhitespace($pos); @@ -171,7 +171,7 @@ public function skipRightWhitespace(int $pos): int { } /** @param int|string|array $findTokenType */ - public function findRight(int $pos, $findTokenType) { + public function findRight(int $pos, $findTokenType): int { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { if ($tokens[$pos]->is($findTokenType)) { @@ -199,7 +199,7 @@ public function haveTokenInRange(int $startPos, int $endPos, $tokenType): bool { return false; } - public function haveBracesInRange(int $startPos, int $endPos) { + public function haveBracesInRange(int $startPos, int $endPos): bool { return $this->haveTokenInRange($startPos, $endPos, '{') || $this->haveTokenInRange($startPos, $endPos, T_CURLY_OPEN) || $this->haveTokenInRange($startPos, $endPos, '}'); diff --git a/lib/PhpParser/JsonDecoder.php b/lib/PhpParser/JsonDecoder.php index d4965c7be0..0198ea00f7 100644 --- a/lib/PhpParser/JsonDecoder.php +++ b/lib/PhpParser/JsonDecoder.php @@ -6,6 +6,7 @@ class JsonDecoder { /** @var \ReflectionClass[] Node type to reflection class map */ private $reflectionClassCache; + /** @return mixed */ public function decode(string $json) { $value = json_decode($json, true); if (json_last_error()) { @@ -15,7 +16,10 @@ public function decode(string $json) { return $this->decodeRecursive($value); } - /** @param mixed $value */ + /** + * @param mixed $value + * @return mixed + */ private function decodeRecursive($value) { if (\is_array($value)) { if (isset($value['nodeType'])) { diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index cff6bd4e21..024b2d21a0 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -64,7 +64,7 @@ public function __construct(array $options = []) { * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to * ErrorHandler\Throwing */ - public function startLexing(string $code, ?ErrorHandler $errorHandler = null) { + public function startLexing(string $code, ?ErrorHandler $errorHandler = null): void { if (null === $errorHandler) { $errorHandler = new ErrorHandler\Throwing(); } @@ -111,7 +111,7 @@ private function isUnterminatedComment(Token $token): bool { && substr($token->text, -2) !== '*/'; } - protected function postprocessTokens(ErrorHandler $errorHandler) { + protected function postprocessTokens(ErrorHandler $errorHandler): void { // This function reports errors (bad characters and unterminated comments) in the token // array, and performs certain canonicalizations: // * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 39d8d26474..41afa7edfe 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -72,7 +72,7 @@ public function __construct(array $options = []) { } } - public function startLexing(string $code, ?ErrorHandler $errorHandler = null) { + public function startLexing(string $code, ?ErrorHandler $errorHandler = null): void { $emulators = array_filter($this->emulators, function ($emulator) use ($code) { return $emulator->isEmulationNeeded($code); }); @@ -116,7 +116,7 @@ private function isReverseEmulationNeeded(PhpVersion $emulatorPhpVersion): bool && $this->targetPhpVersion->older($emulatorPhpVersion); } - private function sortPatches() { + private function sortPatches(): void { // Patches may be contributed by different emulators. // Make sure they are sorted by increasing patch position. usort($this->patches, function ($p1, $p2) { @@ -124,7 +124,7 @@ private function sortPatches() { }); } - private function fixupTokens() { + private function fixupTokens(): void { if (\count($this->patches) === 0) { return; } @@ -191,7 +191,7 @@ private function fixupTokens() { * * @param Error[] $errors */ - private function fixupErrors(array $errors) { + private function fixupErrors(array $errors): void { foreach ($errors as $error) { $attrs = $error->getAttributes(); diff --git a/lib/PhpParser/Modifiers.php b/lib/PhpParser/Modifiers.php index 79f4f4f50e..b7120eea3d 100644 --- a/lib/PhpParser/Modifiers.php +++ b/lib/PhpParser/Modifiers.php @@ -20,7 +20,7 @@ final class Modifiers { /** * @internal */ - public static function verifyClassModifier(int $a, int $b) { + public static function verifyClassModifier(int $a, int $b): void { if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { throw new Error('Multiple abstract modifiers are not allowed'); } @@ -41,7 +41,7 @@ public static function verifyClassModifier(int $a, int $b) { /** * @internal */ - public static function verifyModifier(int $a, int $b) { + public static function verifyModifier(int $a, int $b): void { if ($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK) { throw new Error('Multiple access type modifiers are not allowed'); } diff --git a/lib/PhpParser/NameContext.php b/lib/PhpParser/NameContext.php index 94afb4b8ad..946be0ee0b 100644 --- a/lib/PhpParser/NameContext.php +++ b/lib/PhpParser/NameContext.php @@ -35,7 +35,7 @@ public function __construct(ErrorHandler $errorHandler) { * * @param Name|null $namespace Null is the global namespace */ - public function startNamespace(?Name $namespace = null) { + public function startNamespace(?Name $namespace = null): void { $this->namespace = $namespace; $this->origAliases = $this->aliases = [ Stmt\Use_::TYPE_NORMAL => [], @@ -52,7 +52,7 @@ public function startNamespace(?Name $namespace = null) { * @param int $type One of Stmt\Use_::TYPE_* * @param array $errorAttrs Attributes to use to report an error */ - public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []) { + public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void { // Constant names are case sensitive, everything else case insensitive if ($type === Stmt\Use_::TYPE_CONSTANT) { $aliasLookupName = $aliasName; @@ -226,7 +226,7 @@ public function getShortName(string $name, int $type): Name { return $shortestName; } - private function resolveAlias(Name $name, int $type) { + private function resolveAlias(Name $name, int $type): ?FullyQualified { $firstPart = $name->getFirst(); if ($name->isQualified()) { @@ -249,7 +249,7 @@ private function resolveAlias(Name $name, int $type) { return null; } - private function getNamespaceRelativeName(string $name, string $lcName, int $type) { + private function getNamespaceRelativeName(string $name, string $lcName, int $type): ?Name { if (null === $this->namespace) { return new Name($name); } @@ -270,7 +270,7 @@ private function getNamespaceRelativeName(string $name, string $lcName, int $typ return null; } - private function normalizeConstName(string $name) { + private function normalizeConstName(string $name): string { $nsSep = strrpos($name, '\\'); if (false === $nsSep) { return $name; diff --git a/lib/PhpParser/Node.php b/lib/PhpParser/Node.php index df18c2841c..12d8b257ae 100644 --- a/lib/PhpParser/Node.php +++ b/lib/PhpParser/Node.php @@ -105,7 +105,7 @@ public function getDocComment(): ?Comment\Doc; * * @param Comment\Doc $docComment Doc comment to set */ - public function setDocComment(Comment\Doc $docComment); + public function setDocComment(Comment\Doc $docComment): void; /** * Sets an attribute on a node. @@ -113,7 +113,7 @@ public function setDocComment(Comment\Doc $docComment); * @param string $key * @param mixed $value */ - public function setAttribute(string $key, $value); + public function setAttribute(string $key, $value): void; /** * Returns whether an attribute exists. @@ -146,5 +146,5 @@ public function getAttributes(): array; * * @param array $attributes */ - public function setAttributes(array $attributes); + public function setAttributes(array $attributes): void; } diff --git a/lib/PhpParser/NodeAbstract.php b/lib/PhpParser/NodeAbstract.php index 358b62ec45..cdecd4359a 100644 --- a/lib/PhpParser/NodeAbstract.php +++ b/lib/PhpParser/NodeAbstract.php @@ -128,7 +128,7 @@ public function getDocComment(): ?Comment\Doc { * * @param Comment\Doc $docComment Doc comment to set */ - public function setDocComment(Comment\Doc $docComment) { + public function setDocComment(Comment\Doc $docComment): void { $comments = $this->getComments(); for ($i = count($comments) - 1; $i >= 0; $i--) { if ($comments[$i] instanceof Comment\Doc) { @@ -144,7 +144,7 @@ public function setDocComment(Comment\Doc $docComment) { $this->setAttribute('comments', $comments); } - public function setAttribute(string $key, $value) { + public function setAttribute(string $key, $value): void { $this->attributes[$key] = $value; } @@ -164,7 +164,7 @@ public function getAttributes(): array { return $this->attributes; } - public function setAttributes(array $attributes) { + public function setAttributes(array $attributes): void { $this->attributes = $attributes; } diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index 78f8d76e94..f48bc006f3 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -44,7 +44,7 @@ public function dump($node, ?string $code = null): string { } /** @param Node|Comment|array $node */ - protected function dumpRecursive($node) { + protected function dumpRecursive($node): string { if ($node instanceof Node) { $r = $node->getType(); if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) { @@ -108,7 +108,7 @@ protected function dumpRecursive($node) { return $r . "\n)"; } - protected function dumpFlags(int $flags) { + protected function dumpFlags(int $flags): string { $strs = []; if ($flags & Modifiers::PUBLIC) { $strs[] = 'PUBLIC'; @@ -135,11 +135,11 @@ protected function dumpFlags(int $flags) { if ($strs) { return implode(' | ', $strs) . ' (' . $flags . ')'; } else { - return $flags; + return (string) $flags; } } - protected function dumpIncludeType(int $type) { + protected function dumpIncludeType(int $type): string { $map = [ Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', @@ -148,12 +148,12 @@ protected function dumpIncludeType(int $type) { ]; if (!isset($map[$type])) { - return $type; + return (string) $type; } return $map[$type] . ' (' . $type . ')'; } - protected function dumpUseType(int $type) { + protected function dumpUseType(int $type): string { $map = [ Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', Use_::TYPE_NORMAL => 'TYPE_NORMAL', @@ -162,7 +162,7 @@ protected function dumpUseType(int $type) { ]; if (!isset($map[$type])) { - return $type; + return (string) $type; } return $map[$type] . ' (' . $type . ')'; } @@ -191,7 +191,7 @@ protected function dumpPosition(Node $node): ?string { } // Copied from Error class - private function toColumn(string $code, int $pos) { + private function toColumn(string $code, int $pos): int { if ($pos > strlen($code)) { throw new \RuntimeException('Invalid position information'); } diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 427e59993a..fc1185f1d7 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -53,7 +53,7 @@ public function __construct() { * * @param NodeVisitor $visitor Visitor to add */ - public function addVisitor(NodeVisitor $visitor) { + public function addVisitor(NodeVisitor $visitor): void { $this->visitors[] = $visitor; } @@ -62,7 +62,7 @@ public function addVisitor(NodeVisitor $visitor) { * * @param NodeVisitor $visitor */ - public function removeVisitor(NodeVisitor $visitor) { + public function removeVisitor(NodeVisitor $visitor): void { foreach ($this->visitors as $index => $storedVisitor) { if ($storedVisitor === $visitor) { unset($this->visitors[$index]); @@ -272,7 +272,7 @@ protected function traverseArray(array $nodes): array { return $nodes; } - private function ensureReplacementReasonable(Node $old, Node $new) { + private function ensureReplacementReasonable(Node $old, Node $new): void { if ($old instanceof Node\Stmt && $new instanceof Node\Expr) { throw new \LogicException( "Trying to replace statement ({$old->getType()}) " . diff --git a/lib/PhpParser/NodeTraverserInterface.php b/lib/PhpParser/NodeTraverserInterface.php index 383103e381..76863aa642 100644 --- a/lib/PhpParser/NodeTraverserInterface.php +++ b/lib/PhpParser/NodeTraverserInterface.php @@ -8,14 +8,14 @@ interface NodeTraverserInterface { * * @param NodeVisitor $visitor Visitor to add */ - public function addVisitor(NodeVisitor $visitor); + public function addVisitor(NodeVisitor $visitor): void; /** * Removes an added visitor. * * @param NodeVisitor $visitor */ - public function removeVisitor(NodeVisitor $visitor); + public function removeVisitor(NodeVisitor $visitor): void; /** * Traverses an array of nodes using the registered visitors. diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index e0352a0082..b1214fcb3d 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -160,7 +160,7 @@ public function enterNode(Node $node) { return null; } - private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null) { + private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null): void { // 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 @@ -172,7 +172,7 @@ private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null) { } /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure $node */ - private function resolveSignature($node) { + private function resolveSignature($node): void { foreach ($node->params as $param) { $param->type = $this->resolveType($param->type); $this->resolveAttrGroups($param); @@ -180,6 +180,10 @@ private function resolveSignature($node) { $node->returnType = $this->resolveType($node->returnType); } + /** + * @param Node\Identifier|Name|Node\ComplexType|null $node + * @return Node\Identifier|Name|Node\ComplexType|null + */ private function resolveType(?Node $node) { if ($node instanceof Name) { return $this->resolveClassName($node); @@ -236,16 +240,16 @@ protected function resolveName(Name $name, int $type): Name { return $name; } - protected function resolveClassName(Name $name) { + protected function resolveClassName(Name $name): Name { return $this->resolveName($name, Stmt\Use_::TYPE_NORMAL); } - protected function addNamespacedName(Node $node) { + protected function addNamespacedName(Node $node): void { $node->namespacedName = Name::concat( $this->nameContext->getNamespace(), (string) $node->name); } - protected function resolveAttrGroups(Node $node) { + protected function resolveAttrGroups(Node $node): void { foreach ($node->attrGroups as $attrGroup) { foreach ($attrGroup->attrs as $attr) { $attr->name = $this->resolveClassName($attr->name); diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 9c7c5ca08f..92eda218d2 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1146,7 +1146,7 @@ class Php7 extends \PhpParser\ParserAbstract 3, 3, 6, 3, 1, 1, 2, 1 ); - protected function initReduceCallbacks() { + protected function initReduceCallbacks(): void { $this->reduceCallbacks = [ 0 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index f0b9a0360c..7bc81a949b 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1164,7 +1164,7 @@ class Php8 extends \PhpParser\ParserAbstract 3, 3, 6, 3, 1, 1, 2, 1 ); - protected function initReduceCallbacks() { + protected function initReduceCallbacks(): void { $this->reduceCallbacks = [ 0 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 778e578bc2..158f314d4f 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -131,7 +131,7 @@ abstract class ParserAbstract implements Parser { /** * Initialize $reduceCallbacks map. */ - abstract protected function initReduceCallbacks(); + abstract protected function initReduceCallbacks(): void; /** * Creates a parser instance. @@ -201,7 +201,7 @@ public function getLexer(): Lexer { return $this->lexer; } - protected function doParse() { + protected function doParse(): ?array { // We start off with no lookahead-token $symbol = self::SYMBOL_NONE; @@ -404,7 +404,7 @@ protected function doParse() { throw new \RuntimeException('Reached end of parser loop'); } - protected function emitError(Error $error) { + protected function emitError(Error $error): void { $this->errorHandler->handleError($error); } @@ -465,32 +465,32 @@ protected function getExpectedTokens(int $state): array { */ /* - protected function traceNewState($state, $symbol) { + protected function traceNewState($state, $symbol): void { echo '% State ' . $state . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n"; } - protected function traceRead($symbol) { + protected function traceRead($symbol): void { echo '% Reading ' . $this->symbolToName[$symbol] . "\n"; } - protected function traceShift($symbol) { + protected function traceShift($symbol): void { echo '% Shift ' . $this->symbolToName[$symbol] . "\n"; } - protected function traceAccept() { + protected function traceAccept(): void { echo "% Accepted.\n"; } - protected function traceReduce($n) { + protected function traceReduce($n): void { echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n"; } - protected function tracePop($state) { + protected function tracePop($state): void { echo '% Recovering, uncovered state ' . $state . "\n"; } - protected function traceDiscard($symbol) { + protected function traceDiscard($symbol): void { echo '% Discard ' . $this->symbolToName[$symbol] . "\n"; } */ @@ -561,7 +561,7 @@ protected function handleNamespaces(array $stmts): array { } } - private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt) { + private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt): void { // We moved the statements into the namespace node, as such the end of the namespace node // needs to be extended to the end of the statements. if (empty($stmt->stmts)) { @@ -629,6 +629,7 @@ private function getNamespacingStyle(array $stmts): ?string { return $style; } + /** @return Name|Identifier */ protected function handleBuiltinTypes(Name $name) { if (!$name->isUnqualified()) { return $name; @@ -666,7 +667,7 @@ protected function getFloatCastKind(string $cast): int { return Double::KIND_DOUBLE; } - protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false) { + protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false): Int_ { try { return Int_::fromString($str, $attributes, $allowInvalidOctal); } catch (Error $error) { @@ -700,7 +701,7 @@ protected function parseNumString(string $str, array $attributes) { protected function stripIndentation( string $string, int $indentLen, string $indentChar, bool $newlineAtStart, bool $newlineAtEnd, array $attributes - ) { + ): string { if ($indentLen === 0) { return $string; } @@ -733,7 +734,7 @@ function ($matches) use ($indentLen, $indentChar, $attributes) { protected function parseDocString( string $startToken, $contents, string $endToken, array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape - ) { + ): Expr { $kind = strpos($startToken, "'") === false ? String_::KIND_HEREDOC : String_::KIND_NOWDOC; @@ -895,7 +896,7 @@ protected function fixupAlternativeElse($node): void { } } - protected function checkClassModifier(int $a, int $b, int $modifierPos) { + protected function checkClassModifier(int $a, int $b, int $modifierPos): void { try { Modifiers::verifyClassModifier($a, $b); } catch (Error $error) { @@ -904,7 +905,7 @@ protected function checkClassModifier(int $a, int $b, int $modifierPos) { } } - protected function checkModifier(int $a, int $b, int $modifierPos) { + protected function checkModifier(int $a, int $b, int $modifierPos): void { // Jumping through some hoops here because verifyModifier() is also used elsewhere try { Modifiers::verifyModifier($a, $b); @@ -914,7 +915,7 @@ protected function checkModifier(int $a, int $b, int $modifierPos) { } } - protected function checkParam(Param $node) { + protected function checkParam(Param $node): void { if ($node->variadic && null !== $node->default) { $this->emitError(new Error( 'Variadic parameter cannot have a default value', @@ -923,7 +924,7 @@ protected function checkParam(Param $node) { } } - protected function checkTryCatch(TryCatch $node) { + protected function checkTryCatch(TryCatch $node): void { if (empty($node->catches) && null === $node->finally) { $this->emitError(new Error( 'Cannot use try without catch or finally', $node->getAttributes() @@ -931,7 +932,7 @@ protected function checkTryCatch(TryCatch $node) { } } - protected function checkNamespace(Namespace_ $node) { + protected function checkNamespace(Namespace_ $node): void { if (null !== $node->stmts) { foreach ($node->stmts as $stmt) { if ($stmt instanceof Namespace_) { @@ -943,7 +944,7 @@ protected function checkNamespace(Namespace_ $node) { } } - private function checkClassName(?Identifier $name, int $namePos) { + private function checkClassName(?Identifier $name, int $namePos): void { if (null !== $name && $name->isSpecialClassName()) { $this->emitError(new Error( sprintf('Cannot use \'%s\' as class name as it is reserved', $name), @@ -952,7 +953,7 @@ private function checkClassName(?Identifier $name, int $namePos) { } } - private function checkImplementedInterfaces(array $interfaces) { + private function checkImplementedInterfaces(array $interfaces): void { foreach ($interfaces as $interface) { if ($interface->isSpecialClassName()) { $this->emitError(new Error( @@ -963,7 +964,7 @@ private function checkImplementedInterfaces(array $interfaces) { } } - protected function checkClass(Class_ $node, int $namePos) { + protected function checkClass(Class_ $node, int $namePos): void { $this->checkClassName($node->name, $namePos); if ($node->extends && $node->extends->isSpecialClassName()) { @@ -976,17 +977,17 @@ protected function checkClass(Class_ $node, int $namePos) { $this->checkImplementedInterfaces($node->implements); } - protected function checkInterface(Interface_ $node, int $namePos) { + protected function checkInterface(Interface_ $node, int $namePos): void { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->extends); } - protected function checkEnum(Enum_ $node, int $namePos) { + protected function checkEnum(Enum_ $node, int $namePos): void { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->implements); } - protected function checkClassMethod(ClassMethod $node, int $modifierPos) { + protected function checkClassMethod(ClassMethod $node, int $modifierPos): void { if ($node->flags & Modifiers::STATIC) { switch ($node->name->toLowerString()) { case '__construct': @@ -1014,7 +1015,7 @@ protected function checkClassMethod(ClassMethod $node, int $modifierPos) { } } - protected function checkClassConst(ClassConst $node, int $modifierPos) { + protected function checkClassConst(ClassConst $node, int $modifierPos): void { if ($node->flags & Modifiers::STATIC) { $this->emitError(new Error( "Cannot use 'static' as constant modifier", @@ -1032,7 +1033,7 @@ protected function checkClassConst(ClassConst $node, int $modifierPos) { } } - protected function checkProperty(Property $node, int $modifierPos) { + protected function checkProperty(Property $node, int $modifierPos): void { if ($node->flags & Modifiers::ABSTRACT) { $this->emitError(new Error('Properties cannot be declared abstract', $this->getAttributesAt($modifierPos))); @@ -1044,7 +1045,7 @@ protected function checkProperty(Property $node, int $modifierPos) { } } - protected function checkUseUse(UseItem $node, int $namePos) { + protected function checkUseUse(UseItem $node, int $namePos): void { if ($node->alias && $node->alias->isSpecialClassName()) { $this->emitError(new Error( sprintf( diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 015a69b21d..ab3f375270 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -165,7 +165,7 @@ public function __construct(array $options = []) { /** * Reset pretty printing state. */ - protected function resetState() { + protected function resetState(): void { $this->indentLevel = 0; $this->nl = "\n"; $this->origTokens = null; @@ -176,7 +176,7 @@ protected function resetState() { * * @param int $level Level in number of spaces */ - protected function setIndentLevel(int $level) { + protected function setIndentLevel(int $level): void { $this->indentLevel = $level; $this->nl = "\n" . \str_repeat(' ', $level); } @@ -184,7 +184,7 @@ protected function setIndentLevel(int $level) { /** * Increase indentation level. */ - protected function indent() { + protected function indent(): void { $this->indentLevel += 4; $this->nl .= ' '; } @@ -192,7 +192,7 @@ protected function indent() { /** * Decrease indentation level. */ - protected function outdent() { + protected function outdent(): void { assert($this->indentLevel >= 4); $this->indentLevel -= 4; $this->nl = "\n" . str_repeat(' ', $this->indentLevel); @@ -253,7 +253,7 @@ public function prettyPrintFile(array $stmts): string { * * @param Node[] $nodes Array of nodes */ - protected function preprocessNodes(array $nodes) { + protected function preprocessNodes(array $nodes): void { /* We can use semicolon-namespaces unless there is a global namespace declaration */ $this->canUseSemicolonNamespaces = true; foreach ($nodes as $node) { @@ -500,7 +500,7 @@ public function printFormatPreserving(array $stmts, array $origStmts, array $ori return ltrim($this->handleMagicTokens($result)); } - protected function pFallback(Node $node) { + protected function pFallback(Node $node): string { return $this->{'p' . $node->getType()}($node); } @@ -1011,7 +1011,7 @@ protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $ * @param string $str * @param string $append */ - protected function safeAppend(string &$str, string $append) { + protected function safeAppend(string &$str, string $append): void { if ($str === "") { $str = $append; return; @@ -1127,7 +1127,7 @@ protected function isMultiline(array $nodes): bool { * * The label char map determines whether a certain character may occur in a label. */ - protected function initializeLabelCharMap() { + protected function initializeLabelCharMap(): void { if ($this->labelCharMap) { return; } @@ -1146,7 +1146,7 @@ protected function initializeLabelCharMap() { * * The node list differ is used to determine differences between two array subnodes. */ - protected function initializeNodeListDiffer() { + protected function initializeNodeListDiffer(): void { if ($this->nodeListDiffer) { return; } @@ -1166,7 +1166,7 @@ protected function initializeNodeListDiffer() { * The fixup map is used to determine whether a certain subnode of a certain node may require * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. */ - protected function initializeFixupMap() { + protected function initializeFixupMap(): void { if ($this->fixupMap) { return; } @@ -1250,7 +1250,7 @@ protected function initializeFixupMap() { * The removal map is used to determine which additional tokens should be removed when a * certain node is replaced by null. */ - protected function initializeRemovalMap() { + protected function initializeRemovalMap(): void { if ($this->removalMap) { return; } @@ -1297,7 +1297,7 @@ protected function initializeRemovalMap() { ]; } - protected function initializeInsertionMap() { + protected function initializeInsertionMap(): void { if ($this->insertionMap) { return; } @@ -1341,7 +1341,7 @@ protected function initializeInsertionMap() { ]; } - protected function initializeListInsertionMap() { + protected function initializeListInsertionMap(): void { if ($this->listInsertionMap) { return; } @@ -1439,7 +1439,7 @@ protected function initializeListInsertionMap() { ]; } - protected function initializeEmptyListInsertionMap() { + protected function initializeEmptyListInsertionMap(): void { if ($this->emptyListInsertionMap) { return; } @@ -1504,7 +1504,7 @@ protected function initializeEmptyListInsertionMap() { ]; } - protected function initializeModifierChangeMap() { + protected function initializeModifierChangeMap(): void { if ($this->modifierChangeMap) { return; } From 6af204467c29aa5ac5390a7fa6bbd86cf8abc839 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 19:24:38 +0200 Subject: [PATCH 173/428] Add some missing property types --- lib/PhpParser/Builder/ClassConst.php | 3 +++ lib/PhpParser/Builder/Class_.php | 9 ++++++- lib/PhpParser/Builder/Declaration.php | 3 ++- lib/PhpParser/Builder/EnumCase.php | 3 +++ lib/PhpParser/Builder/Enum_.php | 10 +++++--- lib/PhpParser/Builder/FunctionLike.php | 4 ++- lib/PhpParser/Builder/Function_.php | 2 ++ lib/PhpParser/Builder/Interface_.php | 5 +++- lib/PhpParser/Builder/Method.php | 4 ++- lib/PhpParser/Builder/Namespace_.php | 2 ++ lib/PhpParser/Builder/Param.php | 11 ++++----- lib/PhpParser/Builder/Property.php | 7 +++--- lib/PhpParser/Builder/TraitUse.php | 2 ++ lib/PhpParser/Builder/TraitUseAdaptation.php | 26 +++++++++++--------- lib/PhpParser/Builder/Trait_.php | 5 +++- lib/PhpParser/Builder/Use_.php | 3 +++ 16 files changed, 69 insertions(+), 30 deletions(-) diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index fc31cd93cf..b948652228 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -13,8 +13,11 @@ use PhpParser\Node\Stmt; class ClassConst implements PhpParser\Builder { + /** @var int */ protected $flags = 0; + /** @var array */ protected $attributes = []; + /** @var Const_[] */ protected $constants = []; /** @var Node\AttributeGroup[] */ diff --git a/lib/PhpParser/Builder/Class_.php b/lib/PhpParser/Builder/Class_.php index db8c6a86ee..ae6d7bf42f 100644 --- a/lib/PhpParser/Builder/Class_.php +++ b/lib/PhpParser/Builder/Class_.php @@ -10,17 +10,24 @@ use PhpParser\Node\Stmt; class Class_ extends Declaration { + /** @var string */ protected $name; + /** @var Name|null */ protected $extends = null; + /** @var Name[] */ protected $implements = []; + /** @var int */ protected $flags = 0; + /** @var Stmt\TraitUse[] */ protected $uses = []; + /** @var Stmt\ClassConst[] */ protected $constants = []; + /** @var Stmt\Property[] */ protected $properties = []; + /** @var Stmt\ClassMethod[] */ protected $methods = []; - /** @var Node\AttributeGroup[] */ protected $attributeGroups = []; diff --git a/lib/PhpParser/Builder/Declaration.php b/lib/PhpParser/Builder/Declaration.php index 6d71657cb3..e9e625a773 100644 --- a/lib/PhpParser/Builder/Declaration.php +++ b/lib/PhpParser/Builder/Declaration.php @@ -6,6 +6,7 @@ use PhpParser\BuilderHelpers; abstract class Declaration implements PhpParser\Builder { + /** @var array */ protected $attributes = []; /** @@ -20,7 +21,7 @@ abstract public function addStmt($stmt); /** * Adds multiple statements. * - * @param array $stmts The statements to add + * @param (PhpParser\Node\Stmt|PhpParser\Builder)[] $stmts The statements to add * * @return $this The builder instance (for fluid interface) */ diff --git a/lib/PhpParser/Builder/EnumCase.php b/lib/PhpParser/Builder/EnumCase.php index 7856bcc2be..70eec65a35 100644 --- a/lib/PhpParser/Builder/EnumCase.php +++ b/lib/PhpParser/Builder/EnumCase.php @@ -11,8 +11,11 @@ use PhpParser\Node\Stmt; class EnumCase implements PhpParser\Builder { + /** @var Identifier|string */ protected $name; + /** @var ?Node\Expr */ protected $value = null; + /** @var array */ protected $attributes = []; /** @var Node\AttributeGroup[] */ diff --git a/lib/PhpParser/Builder/Enum_.php b/lib/PhpParser/Builder/Enum_.php index 42e92f6e9f..699320d54e 100644 --- a/lib/PhpParser/Builder/Enum_.php +++ b/lib/PhpParser/Builder/Enum_.php @@ -10,16 +10,20 @@ use PhpParser\Node\Stmt; class Enum_ extends Declaration { + /** @var string */ protected $name; + /** @var Identifier|null */ protected $scalarType = null; - + /** @var Name[] */ protected $implements = []; - + /** @var Stmt\TraitUse[] */ protected $uses = []; + /** @var Stmt\EnumCase[] */ protected $enumCases = []; + /** @var Stmt\ClassConst[] */ protected $constants = []; + /** @var Stmt\ClassMethod[] */ protected $methods = []; - /** @var Node\AttributeGroup[] */ protected $attributeGroups = []; diff --git a/lib/PhpParser/Builder/FunctionLike.php b/lib/PhpParser/Builder/FunctionLike.php index 1cb92fe0c4..5af887e46a 100644 --- a/lib/PhpParser/Builder/FunctionLike.php +++ b/lib/PhpParser/Builder/FunctionLike.php @@ -6,7 +6,9 @@ use PhpParser\Node; abstract class FunctionLike extends Declaration { + /** @var bool */ protected $returnByRef = false; + /** @var Node\Param[] */ protected $params = []; /** @var string|Node\Name|Node\NullableType|null */ @@ -45,7 +47,7 @@ public function addParam($param) { /** * Adds multiple parameters. * - * @param array $params The parameters to add + * @param (Node\Param|Param)[] $params The parameters to add * * @return $this The builder instance (for fluid interface) */ diff --git a/lib/PhpParser/Builder/Function_.php b/lib/PhpParser/Builder/Function_.php index c7555160c2..dfce765251 100644 --- a/lib/PhpParser/Builder/Function_.php +++ b/lib/PhpParser/Builder/Function_.php @@ -8,7 +8,9 @@ use PhpParser\Node\Stmt; class Function_ extends FunctionLike { + /** @var string */ protected $name; + /** @var Stmt[] */ protected $stmts = []; /** @var Node\AttributeGroup[] */ diff --git a/lib/PhpParser/Builder/Interface_.php b/lib/PhpParser/Builder/Interface_.php index 585550d72c..95c568531e 100644 --- a/lib/PhpParser/Builder/Interface_.php +++ b/lib/PhpParser/Builder/Interface_.php @@ -9,11 +9,14 @@ use PhpParser\Node\Stmt; class Interface_ extends Declaration { + /** @var string */ protected $name; + /** @var Name[] */ protected $extends = []; + /** @var Stmt\ClassConst[] */ protected $constants = []; + /** @var Stmt\ClassMethod[] */ protected $methods = []; - /** @var Node\AttributeGroup[] */ protected $attributeGroups = []; diff --git a/lib/PhpParser/Builder/Method.php b/lib/PhpParser/Builder/Method.php index fb4a155387..1a33b4bab0 100644 --- a/lib/PhpParser/Builder/Method.php +++ b/lib/PhpParser/Builder/Method.php @@ -9,10 +9,12 @@ use PhpParser\Node\Stmt; class Method extends FunctionLike { + /** @var string */ protected $name; + /** @var int */ protected $flags = 0; - /** @var array|null */ + /** @var Stmt[]|null */ protected $stmts = []; /** @var Node\AttributeGroup[] */ diff --git a/lib/PhpParser/Builder/Namespace_.php b/lib/PhpParser/Builder/Namespace_.php index ec7dc3ea34..7c3b14d9cc 100644 --- a/lib/PhpParser/Builder/Namespace_.php +++ b/lib/PhpParser/Builder/Namespace_.php @@ -8,7 +8,9 @@ use PhpParser\Node\Stmt; class Namespace_ extends Declaration { + /** @var Node\Name|null */ private $name; + /** @var Stmt[] */ private $stmts = []; /** diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index 7f2a41d2db..233a4a7c82 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -7,17 +7,16 @@ use PhpParser\Node; class Param implements PhpParser\Builder { + /** @var string */ protected $name; - + /** @var Node\Expr|null */ protected $default = null; - - /** @var Node\Identifier|Node\Name|Node\NullableType|null */ + /** @var Node\Identifier|Node\Name|Node\ComplexType|null */ protected $type = null; - + /** @var bool */ protected $byRef = false; - + /** @var bool */ protected $variadic = false; - /** @var Node\AttributeGroup[] */ protected $attributeGroups = []; diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index c04d891870..2449702cc7 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -12,15 +12,16 @@ use PhpParser\Node\ComplexType; class Property implements PhpParser\Builder { + /** @var string */ protected $name; - + /** @var int */ protected $flags = 0; + /** @var Node\Expr|null */ protected $default = null; + /** @var array */ protected $attributes = []; - /** @var null|Identifier|Name|ComplexType */ protected $type; - /** @var Node\AttributeGroup[] */ protected $attributeGroups = []; diff --git a/lib/PhpParser/Builder/TraitUse.php b/lib/PhpParser/Builder/TraitUse.php index 17e8a447f5..b9d49bd947 100644 --- a/lib/PhpParser/Builder/TraitUse.php +++ b/lib/PhpParser/Builder/TraitUse.php @@ -8,7 +8,9 @@ use PhpParser\Node\Stmt; class TraitUse implements Builder { + /** @var Node\Name[] */ protected $traits = []; + /** @var Stmt\TraitUseAdaptation[] */ protected $adaptations = []; /** diff --git a/lib/PhpParser/Builder/TraitUseAdaptation.php b/lib/PhpParser/Builder/TraitUseAdaptation.php index 6aac8e4484..eec491a2b8 100644 --- a/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -9,26 +9,28 @@ use PhpParser\Node\Stmt; class TraitUseAdaptation implements Builder { - public const TYPE_UNDEFINED = 0; - public const TYPE_ALIAS = 1; - public const TYPE_PRECEDENCE = 2; + private const TYPE_UNDEFINED = 0; + private const TYPE_ALIAS = 1; + private const TYPE_PRECEDENCE = 2; /** @var int Type of building adaptation */ protected $type; - + /** @var Node\Name|null */ protected $trait; + /** @var Node\Identifier */ protected $method; - + /** @var int|null */ protected $modifier = null; + /** @var Node\Identifier|null */ protected $alias = null; - + /** @var Node\Name[] */ protected $insteadof = []; /** * Creates a trait use adaptation builder. * - * @param Node\Name|string|null $trait Name of adaptated trait - * @param Node\Identifier|string $method Name of adaptated method + * @param Node\Name|string|null $trait Name of adapted trait + * @param Node\Identifier|string $method Name of adapted method */ public function __construct($trait, $method) { $this->type = self::TYPE_UNDEFINED; @@ -40,7 +42,7 @@ public function __construct($trait, $method) { /** * Sets alias of method. * - * @param Node\Identifier|string $alias Alias for adaptated method + * @param Node\Identifier|string $alias Alias for adapted method * * @return $this The builder instance (for fluid interface) */ @@ -58,7 +60,7 @@ public function as($alias) { } /** - * Sets adaptated method public. + * Sets adapted method public. * * @return $this The builder instance (for fluid interface) */ @@ -68,7 +70,7 @@ public function makePublic() { } /** - * Sets adaptated method protected. + * Sets adapted method protected. * * @return $this The builder instance (for fluid interface) */ @@ -78,7 +80,7 @@ public function makeProtected() { } /** - * Sets adaptated method private. + * Sets adapted method private. * * @return $this The builder instance (for fluid interface) */ diff --git a/lib/PhpParser/Builder/Trait_.php b/lib/PhpParser/Builder/Trait_.php index 92d66949c1..c02b34db44 100644 --- a/lib/PhpParser/Builder/Trait_.php +++ b/lib/PhpParser/Builder/Trait_.php @@ -8,11 +8,14 @@ use PhpParser\Node\Stmt; class Trait_ extends Declaration { + /** @var string */ protected $name; + /** @var Stmt\TraitUse[] */ protected $uses = []; + /** @var Stmt\Property[] */ protected $properties = []; + /** @var Stmt\ClassMethod[] */ protected $methods = []; - /** @var Node\AttributeGroup[] */ protected $attributeGroups = []; diff --git a/lib/PhpParser/Builder/Use_.php b/lib/PhpParser/Builder/Use_.php index 490594cd00..a57cfb9da5 100644 --- a/lib/PhpParser/Builder/Use_.php +++ b/lib/PhpParser/Builder/Use_.php @@ -8,8 +8,11 @@ use PhpParser\Node\Stmt; class Use_ implements Builder { + /** @var Node\Name */ protected $name; + /** @var int */ protected $type; + /** @var string|null */ protected $alias = null; /** From c595989e4d3cc5eb747aad5b9dfb8e9c29512837 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 19:34:27 +0200 Subject: [PATCH 174/428] Support adding class constants in trait builder These are allowed as of PHP 8.2. --- lib/PhpParser/Builder/Trait_.php | 6 +++++- test/PhpParser/Builder/TraitTest.php | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/PhpParser/Builder/Trait_.php b/lib/PhpParser/Builder/Trait_.php index c02b34db44..1e3c221c87 100644 --- a/lib/PhpParser/Builder/Trait_.php +++ b/lib/PhpParser/Builder/Trait_.php @@ -12,6 +12,8 @@ class Trait_ extends Declaration { protected $name; /** @var Stmt\TraitUse[] */ protected $uses = []; + /** @var Stmt\ClassConst[] */ + protected $constants = []; /** @var Stmt\Property[] */ protected $properties = []; /** @var Stmt\ClassMethod[] */ @@ -44,6 +46,8 @@ public function addStmt($stmt) { $this->methods[] = $stmt; } elseif ($stmt instanceof Stmt\TraitUse) { $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } @@ -72,7 +76,7 @@ public function addAttribute($attribute) { public function getNode(): PhpParser\Node { return new Stmt\Trait_( $this->name, [ - 'stmts' => array_merge($this->uses, $this->properties, $this->methods), + 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), 'attrGroups' => $this->attributeGroups, ], $this->attributes ); diff --git a/test/PhpParser/Builder/TraitTest.php b/test/PhpParser/Builder/TraitTest.php index 72218c7402..850f198bbe 100644 --- a/test/PhpParser/Builder/TraitTest.php +++ b/test/PhpParser/Builder/TraitTest.php @@ -7,11 +7,11 @@ use PhpParser\Node\Arg; use PhpParser\Node\Attribute; use PhpParser\Node\AttributeGroup; +use PhpParser\Node\Const_; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; -use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassConst; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Property; @@ -28,8 +28,9 @@ public function testStmtAddition() { $method2 = new Stmt\ClassMethod('test2'); $method3 = new Stmt\ClassMethod('test3'); $prop = new Stmt\Property(Modifiers::PUBLIC, [ - new \PhpParser\Node\PropertyItem('test') + new PropertyItem('test') ]); + $const = new ClassConst([new Const_('FOO', new Int_(0))]); $use = new Stmt\TraitUse([new Name('OtherTrait')]); $trait = $this->createTraitBuilder('TestTrait') ->setDocComment('/** Nice trait */') @@ -37,9 +38,10 @@ public function testStmtAddition() { ->addStmts([$method2, $method3]) ->addStmt($prop) ->addStmt($use) + ->addStmt($const) ->getNode(); $this->assertEquals(new Stmt\Trait_('TestTrait', [ - 'stmts' => [$use, $prop, $method1, $method2, $method3] + 'stmts' => [$use, $const, $prop, $method1, $method2, $method3] ], [ 'comments' => [ new Comment\Doc('/** Nice trait */') From a099803d010b4dc5869e34d980a87442b4d67edf Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 20:51:31 +0200 Subject: [PATCH 175/428] Use array type for $attributes Slightly more accurate, and stops PHPStan from complaining about the missing array type information. --- lib/PhpParser/Error.php | 2 +- lib/PhpParser/Node.php | 2 +- lib/PhpParser/Node/Arg.php | 2 +- lib/PhpParser/Node/ArrayItem.php | 2 +- lib/PhpParser/Node/Attribute.php | 2 +- lib/PhpParser/Node/AttributeGroup.php | 2 +- lib/PhpParser/Node/ClosureUse.php | 2 +- lib/PhpParser/Node/Const_.php | 2 +- lib/PhpParser/Node/DeclareItem.php | 2 +- lib/PhpParser/Node/Expr/ArrayDimFetch.php | 2 +- lib/PhpParser/Node/Expr/Array_.php | 2 +- lib/PhpParser/Node/Expr/ArrowFunction.php | 2 +- lib/PhpParser/Node/Expr/Assign.php | 2 +- lib/PhpParser/Node/Expr/AssignOp.php | 2 +- lib/PhpParser/Node/Expr/AssignRef.php | 2 +- lib/PhpParser/Node/Expr/BinaryOp.php | 2 +- lib/PhpParser/Node/Expr/BitwiseNot.php | 2 +- lib/PhpParser/Node/Expr/BooleanNot.php | 2 +- lib/PhpParser/Node/Expr/Cast.php | 2 +- lib/PhpParser/Node/Expr/ClassConstFetch.php | 2 +- lib/PhpParser/Node/Expr/Clone_.php | 2 +- lib/PhpParser/Node/Expr/Closure.php | 2 +- lib/PhpParser/Node/Expr/ConstFetch.php | 2 +- lib/PhpParser/Node/Expr/Empty_.php | 2 +- lib/PhpParser/Node/Expr/Error.php | 2 +- lib/PhpParser/Node/Expr/ErrorSuppress.php | 2 +- lib/PhpParser/Node/Expr/Eval_.php | 2 +- lib/PhpParser/Node/Expr/Exit_.php | 2 +- lib/PhpParser/Node/Expr/FuncCall.php | 2 +- lib/PhpParser/Node/Expr/Include_.php | 2 +- lib/PhpParser/Node/Expr/Instanceof_.php | 2 +- lib/PhpParser/Node/Expr/Isset_.php | 2 +- lib/PhpParser/Node/Expr/List_.php | 2 +- lib/PhpParser/Node/Expr/MethodCall.php | 2 +- lib/PhpParser/Node/Expr/New_.php | 2 +- lib/PhpParser/Node/Expr/NullsafeMethodCall.php | 2 +- lib/PhpParser/Node/Expr/NullsafePropertyFetch.php | 2 +- lib/PhpParser/Node/Expr/PostDec.php | 2 +- lib/PhpParser/Node/Expr/PostInc.php | 2 +- lib/PhpParser/Node/Expr/PreDec.php | 2 +- lib/PhpParser/Node/Expr/PreInc.php | 2 +- lib/PhpParser/Node/Expr/Print_.php | 2 +- lib/PhpParser/Node/Expr/PropertyFetch.php | 2 +- lib/PhpParser/Node/Expr/ShellExec.php | 2 +- lib/PhpParser/Node/Expr/StaticCall.php | 2 +- lib/PhpParser/Node/Expr/StaticPropertyFetch.php | 2 +- lib/PhpParser/Node/Expr/Ternary.php | 2 +- lib/PhpParser/Node/Expr/Throw_.php | 2 +- lib/PhpParser/Node/Expr/UnaryMinus.php | 2 +- lib/PhpParser/Node/Expr/UnaryPlus.php | 2 +- lib/PhpParser/Node/Expr/Variable.php | 2 +- lib/PhpParser/Node/Expr/YieldFrom.php | 2 +- lib/PhpParser/Node/Expr/Yield_.php | 2 +- lib/PhpParser/Node/Identifier.php | 2 +- lib/PhpParser/Node/InterpolatedStringPart.php | 2 +- lib/PhpParser/Node/IntersectionType.php | 2 +- lib/PhpParser/Node/Name.php | 4 ++-- lib/PhpParser/Node/NullableType.php | 2 +- lib/PhpParser/Node/Param.php | 2 +- lib/PhpParser/Node/PropertyItem.php | 2 +- lib/PhpParser/Node/Scalar/Float_.php | 2 +- lib/PhpParser/Node/Scalar/Int_.php | 4 ++-- lib/PhpParser/Node/Scalar/InterpolatedString.php | 2 +- lib/PhpParser/Node/Scalar/MagicConst.php | 2 +- lib/PhpParser/Node/Scalar/String_.php | 2 +- lib/PhpParser/Node/StaticVar.php | 2 +- lib/PhpParser/Node/Stmt/Break_.php | 2 +- lib/PhpParser/Node/Stmt/Case_.php | 2 +- lib/PhpParser/Node/Stmt/Catch_.php | 2 +- lib/PhpParser/Node/Stmt/ClassConst.php | 2 +- lib/PhpParser/Node/Stmt/ClassMethod.php | 2 +- lib/PhpParser/Node/Stmt/Class_.php | 2 +- lib/PhpParser/Node/Stmt/Const_.php | 2 +- lib/PhpParser/Node/Stmt/Continue_.php | 2 +- lib/PhpParser/Node/Stmt/Declare_.php | 2 +- lib/PhpParser/Node/Stmt/Do_.php | 2 +- lib/PhpParser/Node/Stmt/Echo_.php | 2 +- lib/PhpParser/Node/Stmt/ElseIf_.php | 2 +- lib/PhpParser/Node/Stmt/Else_.php | 2 +- lib/PhpParser/Node/Stmt/EnumCase.php | 2 +- lib/PhpParser/Node/Stmt/Enum_.php | 2 +- lib/PhpParser/Node/Stmt/Expression.php | 2 +- lib/PhpParser/Node/Stmt/Finally_.php | 2 +- lib/PhpParser/Node/Stmt/For_.php | 2 +- lib/PhpParser/Node/Stmt/Foreach_.php | 2 +- lib/PhpParser/Node/Stmt/Function_.php | 2 +- lib/PhpParser/Node/Stmt/Global_.php | 2 +- lib/PhpParser/Node/Stmt/Goto_.php | 2 +- lib/PhpParser/Node/Stmt/GroupUse.php | 2 +- lib/PhpParser/Node/Stmt/HaltCompiler.php | 2 +- lib/PhpParser/Node/Stmt/If_.php | 2 +- lib/PhpParser/Node/Stmt/InlineHTML.php | 2 +- lib/PhpParser/Node/Stmt/Interface_.php | 2 +- lib/PhpParser/Node/Stmt/Label.php | 2 +- lib/PhpParser/Node/Stmt/Namespace_.php | 2 +- lib/PhpParser/Node/Stmt/Property.php | 2 +- lib/PhpParser/Node/Stmt/Return_.php | 2 +- lib/PhpParser/Node/Stmt/Static_.php | 2 +- lib/PhpParser/Node/Stmt/Switch_.php | 2 +- lib/PhpParser/Node/Stmt/Throw_.php | 2 +- lib/PhpParser/Node/Stmt/TraitUse.php | 2 +- lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php | 2 +- lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php | 2 +- lib/PhpParser/Node/Stmt/Trait_.php | 2 +- lib/PhpParser/Node/Stmt/TryCatch.php | 2 +- lib/PhpParser/Node/Stmt/Unset_.php | 2 +- lib/PhpParser/Node/Stmt/Use_.php | 2 +- lib/PhpParser/Node/Stmt/While_.php | 2 +- lib/PhpParser/Node/UnionType.php | 2 +- lib/PhpParser/Node/UseItem.php | 2 +- lib/PhpParser/Node/VariadicPlaceholder.php | 2 +- lib/PhpParser/NodeAbstract.php | 2 +- lib/PhpParser/ParserAbstract.php | 2 +- 113 files changed, 115 insertions(+), 115 deletions(-) diff --git a/lib/PhpParser/Error.php b/lib/PhpParser/Error.php index 3fca6938c1..963f68c54c 100644 --- a/lib/PhpParser/Error.php +++ b/lib/PhpParser/Error.php @@ -62,7 +62,7 @@ public function getAttributes(): array { /** * Sets the attributes of the node/token the error occurred at. * - * @param array $attributes + * @param array $attributes */ public function setAttributes(array $attributes): void { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node.php b/lib/PhpParser/Node.php index 12d8b257ae..827b3aeb37 100644 --- a/lib/PhpParser/Node.php +++ b/lib/PhpParser/Node.php @@ -144,7 +144,7 @@ public function getAttributes(): array; /** * Replaces all the attributes of this node. * - * @param array $attributes + * @param array $attributes */ public function setAttributes(array $attributes): void; } diff --git a/lib/PhpParser/Node/Arg.php b/lib/PhpParser/Node/Arg.php index fa70f8ec28..c049e49adc 100644 --- a/lib/PhpParser/Node/Arg.php +++ b/lib/PhpParser/Node/Arg.php @@ -20,7 +20,7 @@ class Arg extends NodeAbstract { * @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 + * @param array $attributes Additional attributes * @param Identifier|null $name Parameter name (for named parameters) */ public function __construct( diff --git a/lib/PhpParser/Node/ArrayItem.php b/lib/PhpParser/Node/ArrayItem.php index 8bcce332eb..f95ee81063 100644 --- a/lib/PhpParser/Node/ArrayItem.php +++ b/lib/PhpParser/Node/ArrayItem.php @@ -20,7 +20,7 @@ class ArrayItem extends NodeAbstract { * @param Expr $value Value * @param null|Expr $key Key * @param bool $byRef Whether to assign by reference - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $value, ?Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Attribute.php b/lib/PhpParser/Node/Attribute.php index 6635bd87e3..8984d8922f 100644 --- a/lib/PhpParser/Node/Attribute.php +++ b/lib/PhpParser/Node/Attribute.php @@ -15,7 +15,7 @@ class Attribute extends NodeAbstract { /** * @param Node\Name $name Attribute name * @param Arg[] $args Attribute arguments - * @param array $attributes Additional node attributes + * @param array $attributes Additional node attributes */ public function __construct(Name $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/AttributeGroup.php b/lib/PhpParser/Node/AttributeGroup.php index 487a996c7a..eae5548a26 100644 --- a/lib/PhpParser/Node/AttributeGroup.php +++ b/lib/PhpParser/Node/AttributeGroup.php @@ -10,7 +10,7 @@ class AttributeGroup extends NodeAbstract { /** * @param Attribute[] $attrs PHP attributes - * @param array $attributes Additional node attributes + * @param array $attributes Additional node attributes */ public function __construct(array $attrs, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/ClosureUse.php b/lib/PhpParser/Node/ClosureUse.php index 1eba69db1f..fcfb387fac 100644 --- a/lib/PhpParser/Node/ClosureUse.php +++ b/lib/PhpParser/Node/ClosureUse.php @@ -15,7 +15,7 @@ class ClosureUse extends NodeAbstract { * * @param Expr\Variable $var Variable to use * @param bool $byRef Whether to use by reference - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr\Variable $var, bool $byRef = false, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Const_.php b/lib/PhpParser/Node/Const_.php index a65db401af..5a80c1e578 100644 --- a/lib/PhpParser/Node/Const_.php +++ b/lib/PhpParser/Node/Const_.php @@ -18,7 +18,7 @@ class Const_ extends NodeAbstract { * * @param string|Identifier $name Name * @param Expr $value Value - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, Expr $value, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/DeclareItem.php b/lib/PhpParser/Node/DeclareItem.php index 88b03d8714..9500d9874e 100644 --- a/lib/PhpParser/Node/DeclareItem.php +++ b/lib/PhpParser/Node/DeclareItem.php @@ -16,7 +16,7 @@ class DeclareItem extends NodeAbstract { * * @param string|Node\Identifier $key Key * @param Node\Expr $value Value - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($key, Node\Expr $value, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/ArrayDimFetch.php b/lib/PhpParser/Node/Expr/ArrayDimFetch.php index 99e3ebe2b8..884169ed72 100644 --- a/lib/PhpParser/Node/Expr/ArrayDimFetch.php +++ b/lib/PhpParser/Node/Expr/ArrayDimFetch.php @@ -15,7 +15,7 @@ class ArrayDimFetch extends Expr { * * @param Expr $var Variable * @param null|Expr $dim Array index / dim - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Array_.php b/lib/PhpParser/Node/Expr/Array_.php index 5b85417065..955c9d25da 100644 --- a/lib/PhpParser/Node/Expr/Array_.php +++ b/lib/PhpParser/Node/Expr/Array_.php @@ -17,7 +17,7 @@ class Array_ extends Expr { * Constructs an array node. * * @param ArrayItem[] $items Items of the array - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $items = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/ArrowFunction.php b/lib/PhpParser/Node/Expr/ArrowFunction.php index 969dc745bd..4a9e5ed186 100644 --- a/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -32,7 +32,7 @@ class ArrowFunction extends Expr implements FunctionLike { * 'returnType' => null : Return type * 'expr' => Expr : Expression body * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Assign.php b/lib/PhpParser/Node/Expr/Assign.php index 0fadbfc42e..8a43226151 100644 --- a/lib/PhpParser/Node/Expr/Assign.php +++ b/lib/PhpParser/Node/Expr/Assign.php @@ -15,7 +15,7 @@ class Assign extends Expr { * * @param Expr $var Variable * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/AssignOp.php b/lib/PhpParser/Node/Expr/AssignOp.php index 77cb661c05..acc37aa2aa 100644 --- a/lib/PhpParser/Node/Expr/AssignOp.php +++ b/lib/PhpParser/Node/Expr/AssignOp.php @@ -15,7 +15,7 @@ abstract class AssignOp extends Expr { * * @param Expr $var Variable * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/AssignRef.php b/lib/PhpParser/Node/Expr/AssignRef.php index 407debd9d8..5cc6dede11 100644 --- a/lib/PhpParser/Node/Expr/AssignRef.php +++ b/lib/PhpParser/Node/Expr/AssignRef.php @@ -15,7 +15,7 @@ class AssignRef extends Expr { * * @param Expr $var Variable * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/BinaryOp.php b/lib/PhpParser/Node/Expr/BinaryOp.php index e72f62ed0e..ae5f8da9a7 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp.php +++ b/lib/PhpParser/Node/Expr/BinaryOp.php @@ -15,7 +15,7 @@ abstract class BinaryOp extends Expr { * * @param Expr $left The left hand side expression * @param Expr $right The right hand side expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $left, Expr $right, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/BitwiseNot.php b/lib/PhpParser/Node/Expr/BitwiseNot.php index 6499bf98ed..818f19702b 100644 --- a/lib/PhpParser/Node/Expr/BitwiseNot.php +++ b/lib/PhpParser/Node/Expr/BitwiseNot.php @@ -12,7 +12,7 @@ class BitwiseNot extends Expr { * Constructs a bitwise not node. * * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/BooleanNot.php b/lib/PhpParser/Node/Expr/BooleanNot.php index c00fd71c3a..6798db837a 100644 --- a/lib/PhpParser/Node/Expr/BooleanNot.php +++ b/lib/PhpParser/Node/Expr/BooleanNot.php @@ -12,7 +12,7 @@ class BooleanNot extends Expr { * Constructs a boolean not node. * * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Cast.php b/lib/PhpParser/Node/Expr/Cast.php index 3a1e8c94b5..d286c21132 100644 --- a/lib/PhpParser/Node/Expr/Cast.php +++ b/lib/PhpParser/Node/Expr/Cast.php @@ -12,7 +12,7 @@ abstract class Cast extends Expr { * Constructs a cast node. * * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/ClassConstFetch.php b/lib/PhpParser/Node/Expr/ClassConstFetch.php index c3bbc731f4..a883f5a382 100644 --- a/lib/PhpParser/Node/Expr/ClassConstFetch.php +++ b/lib/PhpParser/Node/Expr/ClassConstFetch.php @@ -17,7 +17,7 @@ class ClassConstFetch extends Expr { * * @param Name|Expr $class Class name * @param string|Identifier|Error $name Constant name - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($class, $name, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Clone_.php b/lib/PhpParser/Node/Expr/Clone_.php index 2564ae47de..b6110f62b9 100644 --- a/lib/PhpParser/Node/Expr/Clone_.php +++ b/lib/PhpParser/Node/Expr/Clone_.php @@ -12,7 +12,7 @@ class Clone_ extends Expr { * Constructs a clone node. * * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Closure.php b/lib/PhpParser/Node/Expr/Closure.php index 2d40fa55f1..caa566c536 100644 --- a/lib/PhpParser/Node/Expr/Closure.php +++ b/lib/PhpParser/Node/Expr/Closure.php @@ -34,7 +34,7 @@ class Closure extends Expr implements FunctionLike { * 'returnType' => null : Return type * 'stmts' => array(): Statements * 'attrGroups' => array(): PHP attributes groups - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/ConstFetch.php b/lib/PhpParser/Node/Expr/ConstFetch.php index bb3bd00627..99f781859b 100644 --- a/lib/PhpParser/Node/Expr/ConstFetch.php +++ b/lib/PhpParser/Node/Expr/ConstFetch.php @@ -13,7 +13,7 @@ class ConstFetch extends Expr { * Constructs a const fetch node. * * @param Name $name Constant name - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Name $name, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Empty_.php b/lib/PhpParser/Node/Expr/Empty_.php index 5977018628..ee55aaa08c 100644 --- a/lib/PhpParser/Node/Expr/Empty_.php +++ b/lib/PhpParser/Node/Expr/Empty_.php @@ -12,7 +12,7 @@ class Empty_ extends Expr { * Constructs an empty() node. * * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Error.php b/lib/PhpParser/Node/Expr/Error.php index a4cb84868a..43010ac45d 100644 --- a/lib/PhpParser/Node/Expr/Error.php +++ b/lib/PhpParser/Node/Expr/Error.php @@ -14,7 +14,7 @@ class Error extends Expr { /** * Constructs an error node. * - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/ErrorSuppress.php b/lib/PhpParser/Node/Expr/ErrorSuppress.php index a47dd02f0c..4ba61f0f1a 100644 --- a/lib/PhpParser/Node/Expr/ErrorSuppress.php +++ b/lib/PhpParser/Node/Expr/ErrorSuppress.php @@ -12,7 +12,7 @@ class ErrorSuppress extends Expr { * Constructs an error suppress node. * * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Eval_.php b/lib/PhpParser/Node/Expr/Eval_.php index 2d254bfdcc..4030338475 100644 --- a/lib/PhpParser/Node/Expr/Eval_.php +++ b/lib/PhpParser/Node/Expr/Eval_.php @@ -12,7 +12,7 @@ class Eval_ extends Expr { * Constructs an eval() node. * * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Exit_.php b/lib/PhpParser/Node/Expr/Exit_.php index 55b934998a..315307d6c4 100644 --- a/lib/PhpParser/Node/Expr/Exit_.php +++ b/lib/PhpParser/Node/Expr/Exit_.php @@ -16,7 +16,7 @@ class Exit_ extends Expr { * Constructs an exit() node. * * @param null|Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(?Expr $expr = null, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/FuncCall.php b/lib/PhpParser/Node/Expr/FuncCall.php index dd63f1b084..c2f09760a4 100644 --- a/lib/PhpParser/Node/Expr/FuncCall.php +++ b/lib/PhpParser/Node/Expr/FuncCall.php @@ -16,7 +16,7 @@ class FuncCall extends CallLike { * * @param Node\Name|Expr $name Function name * @param array $args Arguments - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, array $args = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Include_.php b/lib/PhpParser/Node/Expr/Include_.php index 894d32a59f..11cc9e20fd 100644 --- a/lib/PhpParser/Node/Expr/Include_.php +++ b/lib/PhpParser/Node/Expr/Include_.php @@ -20,7 +20,7 @@ class Include_ extends Expr { * * @param Expr $expr Expression * @param int $type Type of include - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, int $type, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Instanceof_.php b/lib/PhpParser/Node/Expr/Instanceof_.php index 800d187f6f..1017fad05c 100644 --- a/lib/PhpParser/Node/Expr/Instanceof_.php +++ b/lib/PhpParser/Node/Expr/Instanceof_.php @@ -16,7 +16,7 @@ class Instanceof_ extends Expr { * * @param Expr $expr Expression * @param Name|Expr $class Class name - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, $class, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Isset_.php b/lib/PhpParser/Node/Expr/Isset_.php index e43a859f99..a812ae49df 100644 --- a/lib/PhpParser/Node/Expr/Isset_.php +++ b/lib/PhpParser/Node/Expr/Isset_.php @@ -12,7 +12,7 @@ class Isset_ extends Expr { * Constructs an array node. * * @param Expr[] $vars Variables - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/List_.php b/lib/PhpParser/Node/Expr/List_.php index f9d9697ef7..f988a465ae 100644 --- a/lib/PhpParser/Node/Expr/List_.php +++ b/lib/PhpParser/Node/Expr/List_.php @@ -17,7 +17,7 @@ class List_ extends Expr { * Constructs a list() destructuring node. * * @param (ArrayItem|null)[] $items List of items to assign to - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $items, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/MethodCall.php b/lib/PhpParser/Node/Expr/MethodCall.php index 0e42ab7ce6..16c538b0a4 100644 --- a/lib/PhpParser/Node/Expr/MethodCall.php +++ b/lib/PhpParser/Node/Expr/MethodCall.php @@ -21,7 +21,7 @@ class MethodCall extends CallLike { * @param Expr $var Variable holding object * @param string|Identifier|Expr $name Method name * @param array $args Arguments - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/New_.php b/lib/PhpParser/Node/Expr/New_.php index 2356183787..e3ebc0be0f 100644 --- a/lib/PhpParser/Node/Expr/New_.php +++ b/lib/PhpParser/Node/Expr/New_.php @@ -18,7 +18,7 @@ class New_ extends CallLike { * * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) * @param array $args Arguments - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($class, array $args = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/lib/PhpParser/Node/Expr/NullsafeMethodCall.php index 6acd9795a2..d36fefe83b 100644 --- a/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +++ b/lib/PhpParser/Node/Expr/NullsafeMethodCall.php @@ -21,7 +21,7 @@ class NullsafeMethodCall extends CallLike { * @param Expr $var Variable holding object * @param string|Identifier|Expr $name Method name * @param array $args Arguments - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php index 9b4e8752a2..2a01f87224 100644 --- a/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +++ b/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php @@ -16,7 +16,7 @@ class NullsafePropertyFetch extends Expr { * * @param Expr $var Variable holding object * @param string|Identifier|Expr $name Property name - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/PostDec.php b/lib/PhpParser/Node/Expr/PostDec.php index 325403409b..1efc75aeb5 100644 --- a/lib/PhpParser/Node/Expr/PostDec.php +++ b/lib/PhpParser/Node/Expr/PostDec.php @@ -12,7 +12,7 @@ class PostDec extends Expr { * Constructs a post decrement node. * * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/PostInc.php b/lib/PhpParser/Node/Expr/PostInc.php index df07727aba..783071b2b1 100644 --- a/lib/PhpParser/Node/Expr/PostInc.php +++ b/lib/PhpParser/Node/Expr/PostInc.php @@ -12,7 +12,7 @@ class PostInc extends Expr { * Constructs a post increment node. * * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/PreDec.php b/lib/PhpParser/Node/Expr/PreDec.php index 0aee17fce4..72622ef47b 100644 --- a/lib/PhpParser/Node/Expr/PreDec.php +++ b/lib/PhpParser/Node/Expr/PreDec.php @@ -12,7 +12,7 @@ class PreDec extends Expr { * Constructs a pre decrement node. * * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/PreInc.php b/lib/PhpParser/Node/Expr/PreInc.php index f8958a8ad9..5e26fa9baf 100644 --- a/lib/PhpParser/Node/Expr/PreInc.php +++ b/lib/PhpParser/Node/Expr/PreInc.php @@ -12,7 +12,7 @@ class PreInc extends Expr { * Constructs a pre increment node. * * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Print_.php b/lib/PhpParser/Node/Expr/Print_.php index e68568d6d6..2af35e1e69 100644 --- a/lib/PhpParser/Node/Expr/Print_.php +++ b/lib/PhpParser/Node/Expr/Print_.php @@ -12,7 +12,7 @@ class Print_ extends Expr { * Constructs an print() node. * * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/PropertyFetch.php b/lib/PhpParser/Node/Expr/PropertyFetch.php index 6cbe1762f6..a2fe758361 100644 --- a/lib/PhpParser/Node/Expr/PropertyFetch.php +++ b/lib/PhpParser/Node/Expr/PropertyFetch.php @@ -16,7 +16,7 @@ class PropertyFetch extends Expr { * * @param Expr $var Variable holding object * @param string|Identifier|Expr $name Property name - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/ShellExec.php b/lib/PhpParser/Node/Expr/ShellExec.php index c9c5ade0e4..68907ab66c 100644 --- a/lib/PhpParser/Node/Expr/ShellExec.php +++ b/lib/PhpParser/Node/Expr/ShellExec.php @@ -12,7 +12,7 @@ class ShellExec extends Expr { * Constructs a shell exec (backtick) node. * * @param array $parts Encapsed string array - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $parts, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/StaticCall.php b/lib/PhpParser/Node/Expr/StaticCall.php index bb60013d02..ef2006a4ae 100644 --- a/lib/PhpParser/Node/Expr/StaticCall.php +++ b/lib/PhpParser/Node/Expr/StaticCall.php @@ -22,7 +22,7 @@ class StaticCall extends CallLike { * @param Node\Name|Expr $class Class name * @param string|Identifier|Expr $name Method name * @param array $args Arguments - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($class, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/lib/PhpParser/Node/Expr/StaticPropertyFetch.php index dc1afa13e9..d187917ba3 100644 --- a/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +++ b/lib/PhpParser/Node/Expr/StaticPropertyFetch.php @@ -17,7 +17,7 @@ class StaticPropertyFetch extends Expr { * * @param Name|Expr $class Class name * @param string|VarLikeIdentifier|Expr $name Property name - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($class, $name, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Ternary.php b/lib/PhpParser/Node/Expr/Ternary.php index c72e9af757..d17a73967e 100644 --- a/lib/PhpParser/Node/Expr/Ternary.php +++ b/lib/PhpParser/Node/Expr/Ternary.php @@ -18,7 +18,7 @@ class Ternary extends Expr { * @param Expr $cond Condition * @param null|Expr $if Expression for true * @param Expr $else Expression for false - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Throw_.php b/lib/PhpParser/Node/Expr/Throw_.php index 120a0f5ed7..ef50d8582d 100644 --- a/lib/PhpParser/Node/Expr/Throw_.php +++ b/lib/PhpParser/Node/Expr/Throw_.php @@ -12,7 +12,7 @@ class Throw_ extends Node\Expr { * Constructs a throw expression node. * * @param Node\Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/UnaryMinus.php b/lib/PhpParser/Node/Expr/UnaryMinus.php index 38e5795136..e26dad44ab 100644 --- a/lib/PhpParser/Node/Expr/UnaryMinus.php +++ b/lib/PhpParser/Node/Expr/UnaryMinus.php @@ -12,7 +12,7 @@ class UnaryMinus extends Expr { * Constructs a unary minus node. * * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/UnaryPlus.php b/lib/PhpParser/Node/Expr/UnaryPlus.php index c6298fae32..8fc93f0922 100644 --- a/lib/PhpParser/Node/Expr/UnaryPlus.php +++ b/lib/PhpParser/Node/Expr/UnaryPlus.php @@ -12,7 +12,7 @@ class UnaryPlus extends Expr { * Constructs a unary plus node. * * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Variable.php b/lib/PhpParser/Node/Expr/Variable.php index 8ae09a16c7..43ad3e5db3 100644 --- a/lib/PhpParser/Node/Expr/Variable.php +++ b/lib/PhpParser/Node/Expr/Variable.php @@ -12,7 +12,7 @@ class Variable extends Expr { * Constructs a variable node. * * @param string|Expr $name Name - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/YieldFrom.php b/lib/PhpParser/Node/Expr/YieldFrom.php index a88fdeb350..0cb387d7e7 100644 --- a/lib/PhpParser/Node/Expr/YieldFrom.php +++ b/lib/PhpParser/Node/Expr/YieldFrom.php @@ -12,7 +12,7 @@ class YieldFrom extends Expr { * Constructs an "yield from" node. * * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Expr/Yield_.php b/lib/PhpParser/Node/Expr/Yield_.php index cd214a8abb..9a9ea2f960 100644 --- a/lib/PhpParser/Node/Expr/Yield_.php +++ b/lib/PhpParser/Node/Expr/Yield_.php @@ -15,7 +15,7 @@ class Yield_ extends Expr { * * @param null|Expr $value Value expression * @param null|Expr $key Key expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Identifier.php b/lib/PhpParser/Node/Identifier.php index 2695855d1d..01f3e28985 100644 --- a/lib/PhpParser/Node/Identifier.php +++ b/lib/PhpParser/Node/Identifier.php @@ -21,7 +21,7 @@ class Identifier extends NodeAbstract { * Constructs an identifier node. * * @param string $name Identifier as string - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(string $name, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/InterpolatedStringPart.php b/lib/PhpParser/Node/InterpolatedStringPart.php index ebd9cb3e8d..407258e3c6 100644 --- a/lib/PhpParser/Node/InterpolatedStringPart.php +++ b/lib/PhpParser/Node/InterpolatedStringPart.php @@ -12,7 +12,7 @@ class InterpolatedStringPart extends NodeAbstract { * Constructs a node representing a string part of an interpolated string. * * @param string $value String value - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/IntersectionType.php b/lib/PhpParser/Node/IntersectionType.php index 5b6198b71b..1562544610 100644 --- a/lib/PhpParser/Node/IntersectionType.php +++ b/lib/PhpParser/Node/IntersectionType.php @@ -10,7 +10,7 @@ class IntersectionType extends ComplexType { * Constructs an intersection type. * * @param (Identifier|Name)[] $types Types - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index 3b791979dd..4e6ae0a9fe 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -18,7 +18,7 @@ class Name extends NodeAbstract { * Constructs a name node. * * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ final public function __construct($name, array $attributes = []) { $this->attributes = $attributes; @@ -187,7 +187,7 @@ public function slice(int $offset, ?int $length = null) { * * @param string|string[]|self|null $name1 The first name * @param string|string[]|self|null $name2 The second name - * @param array $attributes Attributes to assign to concatenated name + * @param array $attributes Attributes to assign to concatenated name * * @return static|null Concatenated name */ diff --git a/lib/PhpParser/Node/NullableType.php b/lib/PhpParser/Node/NullableType.php index 1b8f6bd319..e86d097424 100644 --- a/lib/PhpParser/Node/NullableType.php +++ b/lib/PhpParser/Node/NullableType.php @@ -10,7 +10,7 @@ class NullableType extends ComplexType { * Constructs a nullable type (wrapping another type). * * @param string|Identifier|Name $type Type - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($type, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index bd591d811a..22d439f40a 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -29,7 +29,7 @@ class Param extends NodeAbstract { * @param null|string|Identifier|Name|ComplexType $type Type declaration * @param bool $byRef Whether is passed by reference * @param bool $variadic Whether this is a variadic argument - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes * @param int $flags Optional visibility flags * @param AttributeGroup[] $attrGroups PHP attribute groups */ diff --git a/lib/PhpParser/Node/PropertyItem.php b/lib/PhpParser/Node/PropertyItem.php index 1b286b4dd0..804a507c5f 100644 --- a/lib/PhpParser/Node/PropertyItem.php +++ b/lib/PhpParser/Node/PropertyItem.php @@ -15,7 +15,7 @@ class PropertyItem extends Node\Stmt { * * @param string|Node\VarLikeIdentifier $name Name * @param null|Node\Expr $default Default value - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, ?Node\Expr $default = null, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Scalar/Float_.php b/lib/PhpParser/Node/Scalar/Float_.php index 14ade5952d..65b5257696 100644 --- a/lib/PhpParser/Node/Scalar/Float_.php +++ b/lib/PhpParser/Node/Scalar/Float_.php @@ -12,7 +12,7 @@ class Float_ extends Scalar { * Constructs a float number scalar node. * * @param float $value Value of the number - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(float $value, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Scalar/Int_.php b/lib/PhpParser/Node/Scalar/Int_.php index a0187b218a..d6d0de637d 100644 --- a/lib/PhpParser/Node/Scalar/Int_.php +++ b/lib/PhpParser/Node/Scalar/Int_.php @@ -19,7 +19,7 @@ class Int_ extends Scalar { * Constructs an integer number scalar node. * * @param int $value Value of the number - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(int $value, array $attributes = []) { $this->attributes = $attributes; @@ -34,7 +34,7 @@ public function getSubNodeNames(): array { * Constructs an Int node from a string number literal. * * @param string $str String number literal (decimal, octal, hex or binary) - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes * @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5) * * @return Int_ The constructed LNumber, including kind attribute diff --git a/lib/PhpParser/Node/Scalar/InterpolatedString.php b/lib/PhpParser/Node/Scalar/InterpolatedString.php index a43e8dcb2d..7d958993c4 100644 --- a/lib/PhpParser/Node/Scalar/InterpolatedString.php +++ b/lib/PhpParser/Node/Scalar/InterpolatedString.php @@ -14,7 +14,7 @@ class InterpolatedString extends Scalar { * Constructs an interpolated string node. * * @param (Expr|InterpolatedStringPart)[] $parts Interpolated string parts - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $parts, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Scalar/MagicConst.php b/lib/PhpParser/Node/Scalar/MagicConst.php index c539487054..1da9b391cb 100644 --- a/lib/PhpParser/Node/Scalar/MagicConst.php +++ b/lib/PhpParser/Node/Scalar/MagicConst.php @@ -8,7 +8,7 @@ abstract class MagicConst extends Scalar { /** * Constructs a magic constant node. * - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Scalar/String_.php b/lib/PhpParser/Node/Scalar/String_.php index d25090119c..91f4c78e6c 100644 --- a/lib/PhpParser/Node/Scalar/String_.php +++ b/lib/PhpParser/Node/Scalar/String_.php @@ -30,7 +30,7 @@ class String_ extends Scalar { * Constructs a string scalar node. * * @param string $value Value of the string - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/StaticVar.php b/lib/PhpParser/Node/StaticVar.php index a85374334a..8dfb11a4c9 100644 --- a/lib/PhpParser/Node/StaticVar.php +++ b/lib/PhpParser/Node/StaticVar.php @@ -16,7 +16,7 @@ class StaticVar extends NodeAbstract { * * @param Expr\Variable $var Name * @param null|Node\Expr $default Default value - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct( Expr\Variable $var, ?Node\Expr $default = null, array $attributes = [] diff --git a/lib/PhpParser/Node/Stmt/Break_.php b/lib/PhpParser/Node/Stmt/Break_.php index d76c7dd610..11964ba117 100644 --- a/lib/PhpParser/Node/Stmt/Break_.php +++ b/lib/PhpParser/Node/Stmt/Break_.php @@ -12,7 +12,7 @@ class Break_ extends Node\Stmt { * Constructs a break node. * * @param null|Node\Expr $num Number of loops to break - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Case_.php b/lib/PhpParser/Node/Stmt/Case_.php index fe825e4192..6f7a91888b 100644 --- a/lib/PhpParser/Node/Stmt/Case_.php +++ b/lib/PhpParser/Node/Stmt/Case_.php @@ -15,7 +15,7 @@ class Case_ extends Node\Stmt { * * @param null|Node\Expr $cond Condition (null for default) * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Catch_.php b/lib/PhpParser/Node/Stmt/Catch_.php index bbd1f523ad..7f2cd7a911 100644 --- a/lib/PhpParser/Node/Stmt/Catch_.php +++ b/lib/PhpParser/Node/Stmt/Catch_.php @@ -19,7 +19,7 @@ class Catch_ extends Node\Stmt { * @param Node\Name[] $types Types of exceptions to catch * @param Expr\Variable|null $var Variable for exception * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct( array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = [] diff --git a/lib/PhpParser/Node/Stmt/ClassConst.php b/lib/PhpParser/Node/Stmt/ClassConst.php index c35f072460..e4b1a2a168 100644 --- a/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/lib/PhpParser/Node/Stmt/ClassConst.php @@ -18,7 +18,7 @@ class ClassConst extends Node\Stmt { * * @param Node\Const_[] $consts Constant declarations * @param int $flags Modifiers - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes * @param Node\AttributeGroup[] $attrGroups PHP attribute groups */ public function __construct( diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index 71cf1840fe..4e5e3f0593 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -53,7 +53,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike { * 'returnType' => null : Return type * 'stmts' => array() : Statements * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 1a225f8aa8..428d2a9059 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -42,7 +42,7 @@ class Class_ extends ClassLike { * 'implements' => array(): Names of implemented interfaces * 'stmts' => array(): Statements * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Const_.php b/lib/PhpParser/Node/Stmt/Const_.php index 1f97f32796..3a7b090ffe 100644 --- a/lib/PhpParser/Node/Stmt/Const_.php +++ b/lib/PhpParser/Node/Stmt/Const_.php @@ -12,7 +12,7 @@ class Const_ extends Node\Stmt { * Constructs a const list node. * * @param Node\Const_[] $consts Constant declarations - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $consts, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Continue_.php b/lib/PhpParser/Node/Stmt/Continue_.php index 4311fb1c83..f74b7fc6bf 100644 --- a/lib/PhpParser/Node/Stmt/Continue_.php +++ b/lib/PhpParser/Node/Stmt/Continue_.php @@ -12,7 +12,7 @@ class Continue_ extends Node\Stmt { * Constructs a continue node. * * @param null|Node\Expr $num Number of loops to continue - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Declare_.php b/lib/PhpParser/Node/Stmt/Declare_.php index b76fc57416..0c07eb3985 100644 --- a/lib/PhpParser/Node/Stmt/Declare_.php +++ b/lib/PhpParser/Node/Stmt/Declare_.php @@ -16,7 +16,7 @@ class Declare_ extends Node\Stmt { * * @param DeclareItem[] $declares List of declares * @param Node\Stmt[]|null $stmts Statements - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $declares, ?array $stmts = null, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Do_.php b/lib/PhpParser/Node/Stmt/Do_.php index f8328101ef..28d313983e 100644 --- a/lib/PhpParser/Node/Stmt/Do_.php +++ b/lib/PhpParser/Node/Stmt/Do_.php @@ -15,7 +15,7 @@ class Do_ extends Node\Stmt { * * @param Node\Expr $cond Condition * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Echo_.php b/lib/PhpParser/Node/Stmt/Echo_.php index 040f398ad5..b368b392ba 100644 --- a/lib/PhpParser/Node/Stmt/Echo_.php +++ b/lib/PhpParser/Node/Stmt/Echo_.php @@ -12,7 +12,7 @@ class Echo_ extends Node\Stmt { * Constructs an echo node. * * @param Node\Expr[] $exprs Expressions - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $exprs, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/ElseIf_.php b/lib/PhpParser/Node/Stmt/ElseIf_.php index 5d95169515..66e590d428 100644 --- a/lib/PhpParser/Node/Stmt/ElseIf_.php +++ b/lib/PhpParser/Node/Stmt/ElseIf_.php @@ -15,7 +15,7 @@ class ElseIf_ extends Node\Stmt { * * @param Node\Expr $cond Condition * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Else_.php b/lib/PhpParser/Node/Stmt/Else_.php index 03cf37a869..78c1ce86bf 100644 --- a/lib/PhpParser/Node/Stmt/Else_.php +++ b/lib/PhpParser/Node/Stmt/Else_.php @@ -12,7 +12,7 @@ class Else_ extends Node\Stmt { * Constructs an else node. * * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/EnumCase.php b/lib/PhpParser/Node/Stmt/EnumCase.php index e1fa971135..561a21c591 100644 --- a/lib/PhpParser/Node/Stmt/EnumCase.php +++ b/lib/PhpParser/Node/Stmt/EnumCase.php @@ -17,7 +17,7 @@ class EnumCase extends Node\Stmt { * @param string|Node\Identifier $name Enum case name * @param Node\Expr|null $expr Enum case expression * @param AttributeGroup[] $attrGroups PHP attribute groups - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { parent::__construct($attributes); diff --git a/lib/PhpParser/Node/Stmt/Enum_.php b/lib/PhpParser/Node/Stmt/Enum_.php index 640745bdec..62b4aa079b 100644 --- a/lib/PhpParser/Node/Stmt/Enum_.php +++ b/lib/PhpParser/Node/Stmt/Enum_.php @@ -17,7 +17,7 @@ class Enum_ extends ClassLike { * 'implements' => array() : Names of implemented interfaces * 'stmts' => array() : Statements * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->name = \is_string($name) ? new Node\Identifier($name) : $name; diff --git a/lib/PhpParser/Node/Stmt/Expression.php b/lib/PhpParser/Node/Stmt/Expression.php index df9ad71ff0..0f3f9a89b8 100644 --- a/lib/PhpParser/Node/Stmt/Expression.php +++ b/lib/PhpParser/Node/Stmt/Expression.php @@ -15,7 +15,7 @@ class Expression extends Node\Stmt { * Constructs an expression statement. * * @param Node\Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Finally_.php b/lib/PhpParser/Node/Stmt/Finally_.php index 351550e79a..02df135ac8 100644 --- a/lib/PhpParser/Node/Stmt/Finally_.php +++ b/lib/PhpParser/Node/Stmt/Finally_.php @@ -12,7 +12,7 @@ class Finally_ extends Node\Stmt { * Constructs a finally node. * * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/For_.php b/lib/PhpParser/Node/Stmt/For_.php index 7afd2e25eb..3592c142b7 100644 --- a/lib/PhpParser/Node/Stmt/For_.php +++ b/lib/PhpParser/Node/Stmt/For_.php @@ -22,7 +22,7 @@ class For_ extends Node\Stmt { * 'cond' => array(): Loop conditions * 'loop' => array(): Loop expressions * 'stmts' => array(): Statements - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Foreach_.php b/lib/PhpParser/Node/Stmt/Foreach_.php index b0230cfe69..b341d85a19 100644 --- a/lib/PhpParser/Node/Stmt/Foreach_.php +++ b/lib/PhpParser/Node/Stmt/Foreach_.php @@ -25,7 +25,7 @@ class Foreach_ extends Node\Stmt { * 'keyVar' => null : Variable to assign key to * 'byRef' => false : Whether to assign value by reference * 'stmts' => array(): Statements - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Function_.php b/lib/PhpParser/Node/Stmt/Function_.php index e47554a389..aa8372b216 100644 --- a/lib/PhpParser/Node/Stmt/Function_.php +++ b/lib/PhpParser/Node/Stmt/Function_.php @@ -32,7 +32,7 @@ class Function_ extends Node\Stmt implements FunctionLike { * 'returnType' => null : Return type * 'stmts' => array(): Statements * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Global_.php b/lib/PhpParser/Node/Stmt/Global_.php index e46b3a8092..94155aa6a4 100644 --- a/lib/PhpParser/Node/Stmt/Global_.php +++ b/lib/PhpParser/Node/Stmt/Global_.php @@ -12,7 +12,7 @@ class Global_ extends Node\Stmt { * Constructs a global variables list node. * * @param Node\Expr[] $vars Variables to unset - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Goto_.php b/lib/PhpParser/Node/Stmt/Goto_.php index b846faaa4c..774e7c72c2 100644 --- a/lib/PhpParser/Node/Stmt/Goto_.php +++ b/lib/PhpParser/Node/Stmt/Goto_.php @@ -13,7 +13,7 @@ class Goto_ extends Stmt { * Constructs a goto node. * * @param string|Identifier $name Name of label to jump to - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/GroupUse.php b/lib/PhpParser/Node/Stmt/GroupUse.php index c1d509dbe5..4a0322a0af 100644 --- a/lib/PhpParser/Node/Stmt/GroupUse.php +++ b/lib/PhpParser/Node/Stmt/GroupUse.php @@ -20,7 +20,7 @@ class GroupUse extends Stmt { * @param Name $prefix Prefix for uses * @param UseItem[] $uses Uses * @param int $type Type of group use - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/HaltCompiler.php b/lib/PhpParser/Node/Stmt/HaltCompiler.php index 43163750c4..6fe7be35c6 100644 --- a/lib/PhpParser/Node/Stmt/HaltCompiler.php +++ b/lib/PhpParser/Node/Stmt/HaltCompiler.php @@ -12,7 +12,7 @@ class HaltCompiler extends Stmt { * Constructs a __halt_compiler node. * * @param string $remaining Remaining text after halt compiler statement. - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(string $remaining, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/If_.php b/lib/PhpParser/Node/Stmt/If_.php index 57c9290eda..57a9bb6dec 100644 --- a/lib/PhpParser/Node/Stmt/If_.php +++ b/lib/PhpParser/Node/Stmt/If_.php @@ -22,7 +22,7 @@ class If_ extends Node\Stmt { * 'stmts' => array(): Statements * 'elseifs' => array(): Elseif clauses * 'else' => null : Else clause - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/InlineHTML.php b/lib/PhpParser/Node/Stmt/InlineHTML.php index f27ce0fc5e..88d54c060a 100644 --- a/lib/PhpParser/Node/Stmt/InlineHTML.php +++ b/lib/PhpParser/Node/Stmt/InlineHTML.php @@ -12,7 +12,7 @@ class InlineHTML extends Stmt { * Constructs an inline HTML node. * * @param string $value String - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Interface_.php b/lib/PhpParser/Node/Stmt/Interface_.php index 175d2a51eb..8c8b4ee01f 100644 --- a/lib/PhpParser/Node/Stmt/Interface_.php +++ b/lib/PhpParser/Node/Stmt/Interface_.php @@ -16,7 +16,7 @@ class Interface_ extends ClassLike { * 'extends' => array(): Name of extended interfaces * 'stmts' => array(): Statements * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Label.php b/lib/PhpParser/Node/Stmt/Label.php index e4a103b0c3..9e30c19d90 100644 --- a/lib/PhpParser/Node/Stmt/Label.php +++ b/lib/PhpParser/Node/Stmt/Label.php @@ -13,7 +13,7 @@ class Label extends Stmt { * Constructs a label node. * * @param string|Identifier $name Name - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Namespace_.php b/lib/PhpParser/Node/Stmt/Namespace_.php index 7ae38f4b22..a7fe92487a 100644 --- a/lib/PhpParser/Node/Stmt/Namespace_.php +++ b/lib/PhpParser/Node/Stmt/Namespace_.php @@ -19,7 +19,7 @@ class Namespace_ extends Node\Stmt { * * @param null|Node\Name $name Name * @param null|Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index ca6508c2ba..279207fd18 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -24,7 +24,7 @@ class Property extends Node\Stmt { * * @param int $flags Modifiers * @param PropertyItem[] $props Properties - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes * @param null|string|Identifier|Name|ComplexType $type Type declaration * @param Node\AttributeGroup[] $attrGroups PHP attribute groups */ diff --git a/lib/PhpParser/Node/Stmt/Return_.php b/lib/PhpParser/Node/Stmt/Return_.php index 726220ab09..35f49eff4d 100644 --- a/lib/PhpParser/Node/Stmt/Return_.php +++ b/lib/PhpParser/Node/Stmt/Return_.php @@ -12,7 +12,7 @@ class Return_ extends Node\Stmt { * Constructs a return node. * * @param null|Node\Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(?Node\Expr $expr = null, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Static_.php b/lib/PhpParser/Node/Stmt/Static_.php index 6d0cd97798..7f565f74ec 100644 --- a/lib/PhpParser/Node/Stmt/Static_.php +++ b/lib/PhpParser/Node/Stmt/Static_.php @@ -13,7 +13,7 @@ class Static_ extends Stmt { * Constructs a static variables list node. * * @param StaticVar[] $vars Variable definitions - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Switch_.php b/lib/PhpParser/Node/Stmt/Switch_.php index b5c560ec78..5968306a33 100644 --- a/lib/PhpParser/Node/Stmt/Switch_.php +++ b/lib/PhpParser/Node/Stmt/Switch_.php @@ -15,7 +15,7 @@ class Switch_ extends Node\Stmt { * * @param Node\Expr $cond Condition * @param Case_[] $cases Case list - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $cases, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Throw_.php b/lib/PhpParser/Node/Stmt/Throw_.php index a22d40963c..9772f79b30 100644 --- a/lib/PhpParser/Node/Stmt/Throw_.php +++ b/lib/PhpParser/Node/Stmt/Throw_.php @@ -12,7 +12,7 @@ class Throw_ extends Node\Stmt { * Constructs a legacy throw statement node. * * @param Node\Expr $expr Expression - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/TraitUse.php b/lib/PhpParser/Node/Stmt/TraitUse.php index 7f6d318190..460c51f2b7 100644 --- a/lib/PhpParser/Node/Stmt/TraitUse.php +++ b/lib/PhpParser/Node/Stmt/TraitUse.php @@ -15,7 +15,7 @@ class TraitUse extends Node\Stmt { * * @param Node\Name[] $traits Traits * @param TraitUseAdaptation[] $adaptations Adaptations - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $traits, array $adaptations = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php index a4ef555c35..817cbc613f 100644 --- a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +++ b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php @@ -17,7 +17,7 @@ class Alias extends Node\Stmt\TraitUseAdaptation { * @param string|Node\Identifier $method Method name * @param null|int $newModifier New modifier * @param null|string|Node\Identifier $newName New name - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php index 258386afa7..7026150e3f 100644 --- a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +++ b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php @@ -14,7 +14,7 @@ class Precedence extends Node\Stmt\TraitUseAdaptation { * @param Node\Name $trait Trait name * @param string|Node\Identifier $method Method name * @param Node\Name[] $insteadof Overwritten traits - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Trait_.php b/lib/PhpParser/Node/Stmt/Trait_.php index a1c208cada..694924e471 100644 --- a/lib/PhpParser/Node/Stmt/Trait_.php +++ b/lib/PhpParser/Node/Stmt/Trait_.php @@ -12,7 +12,7 @@ class Trait_ extends ClassLike { * @param array $subNodes Array of the following optional subnodes: * 'stmts' => array(): Statements * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/TryCatch.php b/lib/PhpParser/Node/Stmt/TryCatch.php index 3587d6ba14..f051754893 100644 --- a/lib/PhpParser/Node/Stmt/TryCatch.php +++ b/lib/PhpParser/Node/Stmt/TryCatch.php @@ -18,7 +18,7 @@ class TryCatch extends Node\Stmt { * @param Node\Stmt[] $stmts Statements * @param Catch_[] $catches Catches * @param null|Finally_ $finally Optional finally node - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Unset_.php b/lib/PhpParser/Node/Stmt/Unset_.php index 74ae166433..4da8036c56 100644 --- a/lib/PhpParser/Node/Stmt/Unset_.php +++ b/lib/PhpParser/Node/Stmt/Unset_.php @@ -12,7 +12,7 @@ class Unset_ extends Node\Stmt { * Constructs an unset node. * * @param Node\Expr[] $vars Variables to unset - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/Use_.php b/lib/PhpParser/Node/Stmt/Use_.php index 24c8ff2066..b95a58b2e2 100644 --- a/lib/PhpParser/Node/Stmt/Use_.php +++ b/lib/PhpParser/Node/Stmt/Use_.php @@ -29,7 +29,7 @@ class Use_ extends Stmt { * * @param UseItem[] $uses Aliases * @param int $type Type of alias - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/While_.php b/lib/PhpParser/Node/Stmt/While_.php index f13b7e7a6e..7746abdf1a 100644 --- a/lib/PhpParser/Node/Stmt/While_.php +++ b/lib/PhpParser/Node/Stmt/While_.php @@ -15,7 +15,7 @@ class While_ extends Node\Stmt { * * @param Node\Expr $cond Condition * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/UnionType.php b/lib/PhpParser/Node/UnionType.php index 7cba2ee35e..a2abea889c 100644 --- a/lib/PhpParser/Node/UnionType.php +++ b/lib/PhpParser/Node/UnionType.php @@ -10,7 +10,7 @@ class UnionType extends ComplexType { * Constructs a union type. * * @param (Identifier|Name|IntersectionType)[] $types Types - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/UseItem.php b/lib/PhpParser/Node/UseItem.php index 3c4ed01ad5..8c8fb0656a 100644 --- a/lib/PhpParser/Node/UseItem.php +++ b/lib/PhpParser/Node/UseItem.php @@ -20,7 +20,7 @@ class UseItem extends Node\Stmt { * @param Node\Name $name Namespace/Class to alias * @param null|string|Identifier $alias Alias * @param int $type Type of the use element (for mixed group use only) - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/VariadicPlaceholder.php b/lib/PhpParser/Node/VariadicPlaceholder.php index 2e4e9a6c40..48c4f338c0 100644 --- a/lib/PhpParser/Node/VariadicPlaceholder.php +++ b/lib/PhpParser/Node/VariadicPlaceholder.php @@ -11,7 +11,7 @@ class VariadicPlaceholder extends NodeAbstract { /** * Create a variadic argument placeholder (first-class callable syntax). * - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/NodeAbstract.php b/lib/PhpParser/NodeAbstract.php index cdecd4359a..3c8c2ecd3f 100644 --- a/lib/PhpParser/NodeAbstract.php +++ b/lib/PhpParser/NodeAbstract.php @@ -8,7 +8,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable { /** * Creates a Node. * - * @param array $attributes Array of attributes + * @param array $attributes Array of attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 158f314d4f..e7a383a399 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -681,7 +681,7 @@ protected function parseLNumber(string $str, array $attributes, bool $allowInval * Parse a T_NUM_STRING token into either an integer or string node. * * @param string $str Number string - * @param array $attributes Attributes + * @param array $attributes Attributes * * @return Int_|String_ Integer or string node. */ From 40c89cf9245db2fffb42ebd20a56e1c130aec5b7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 20:59:20 +0200 Subject: [PATCH 176/428] Specify some more types --- lib/PhpParser/Comment.php | 7 +++++++ lib/PhpParser/ConstExprEvaluator.php | 1 + lib/PhpParser/Error.php | 2 ++ lib/PhpParser/Node.php | 4 ++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index 2cc491b853..b533c59dd8 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -3,12 +3,19 @@ namespace PhpParser; class Comment implements \JsonSerializable { + /** @var string string */ protected $text; + /** @var int */ protected $startLine; + /** @var int */ protected $startFilePos; + /** @var int */ protected $startTokenPos; + /** @var int */ protected $endLine; + /** @var int */ protected $endFilePos; + /** @var int */ protected $endTokenPos; /** diff --git a/lib/PhpParser/ConstExprEvaluator.php b/lib/PhpParser/ConstExprEvaluator.php index 4ab94995ad..73e59fc516 100644 --- a/lib/PhpParser/ConstExprEvaluator.php +++ b/lib/PhpParser/ConstExprEvaluator.php @@ -27,6 +27,7 @@ * affected by the LC_NUMERIC locale. */ class ConstExprEvaluator { + /** @var callable|null */ private $fallbackEvaluator; /** diff --git a/lib/PhpParser/Error.php b/lib/PhpParser/Error.php index 963f68c54c..443d615288 100644 --- a/lib/PhpParser/Error.php +++ b/lib/PhpParser/Error.php @@ -3,7 +3,9 @@ namespace PhpParser; class Error extends \RuntimeException { + /** @var string */ protected $rawMessage; + /** @var array */ protected $attributes; /** diff --git a/lib/PhpParser/Node.php b/lib/PhpParser/Node.php index 827b3aeb37..43f9deb96b 100644 --- a/lib/PhpParser/Node.php +++ b/lib/PhpParser/Node.php @@ -13,7 +13,7 @@ public function getType(): string; /** * Gets the names of the sub nodes. * - * @return array Names of sub nodes + * @return string[] Names of sub nodes */ public function getSubNodeNames(): array; @@ -137,7 +137,7 @@ public function getAttribute(string $key, $default = null); /** * Returns all the attributes of this node. * - * @return array + * @return array */ public function getAttributes(): array; From 032b10214679b020de7a41dbeb18c3ffdc3c169d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 22:05:47 +0200 Subject: [PATCH 177/428] Remove deprecated Error constructor And use this chance to provide accurate position information for namespace errors. --- lib/PhpParser/Error.php | 13 ++++--------- lib/PhpParser/ParserAbstract.php | 19 +++++++++++++++++-- test/PhpParser/ErrorTest.php | 2 +- test/code/parser/stmt/namespace/mix.test | 6 +++--- .../stmt/namespace/outsideStmtInvalid.test | 2 +- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/lib/PhpParser/Error.php b/lib/PhpParser/Error.php index 443d615288..e033caee44 100644 --- a/lib/PhpParser/Error.php +++ b/lib/PhpParser/Error.php @@ -11,17 +11,12 @@ class Error extends \RuntimeException { /** * 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) + * @param string $message Error message + * @param array $attributes Attributes of node/token where error occurred */ - public function __construct(string $message, $attributes = []) { + public function __construct(string $message, array $attributes = []) { $this->rawMessage = $message; - if (is_array($attributes)) { - $this->attributes = $attributes; - } else { - $this->attributes = ['startLine' => $attributes]; - } + $this->attributes = $attributes; $this->updateMessage(); } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index e7a383a399..bc4c432cc5 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -579,6 +579,21 @@ private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt): void { } } + private function getNamespaceErrorAttributes(Namespace_ $node): array { + $attrs = $node->getAttributes(); + // Adjust end attributes to only cover the "namespace" keyword, not the whole namespace. + if (isset($attrs['startLine'])) { + $attrs['endLine'] = $attrs['startLine']; + } + if (isset($attrs['startTokenPos'])) { + $attrs['endTokenPos'] = $attrs['startTokenPos']; + } + if (isset($attrs['startFilePos'])) { + $attrs['endFilePos'] = $attrs['startFilePos'] + \strlen('namespace') - 1; + } + return $attrs; + } + /** * Determine namespacing style (semicolon or brace) * @@ -597,13 +612,13 @@ private function getNamespacingStyle(array $stmts): ?string { 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 + $this->getNamespaceErrorAttributes($stmt) )); } } 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 + $this->getNamespaceErrorAttributes($stmt) )); // Treat like semicolon style for namespace normalization return 'semicolon'; diff --git a/test/PhpParser/ErrorTest.php b/test/PhpParser/ErrorTest.php index 03e825441e..f378ab234d 100644 --- a/test/PhpParser/ErrorTest.php +++ b/test/PhpParser/ErrorTest.php @@ -73,7 +73,7 @@ public function provideTestColumnInfo() { } public function testNoColumnInfo() { - $error = new Error('Some error', 3); + $error = new Error('Some error', ['startLine' => 3]); $this->assertFalse($error->hasColumnInfo()); try { diff --git a/test/code/parser/stmt/namespace/mix.test b/test/code/parser/stmt/namespace/mix.test index f11b8a1e1f..4c557d4538 100644 --- a/test/code/parser/stmt/namespace/mix.test +++ b/test/code/parser/stmt/namespace/mix.test @@ -8,7 +8,7 @@ namespace B { } echo 3; ----- -Cannot mix bracketed namespace declarations with unbracketed namespace declarations on line 4 +Cannot mix bracketed namespace declarations with unbracketed namespace declarations from 4:1 to 4:9 array( 0: Stmt_Namespace( name: Name( @@ -59,7 +59,7 @@ echo 2; namespace B; echo 3; ----- -Cannot mix bracketed namespace declarations with unbracketed namespace declarations on line 6 +Cannot mix bracketed namespace declarations with unbracketed namespace declarations from 6:1 to 6:9 array( 0: Stmt_Namespace( name: Name( @@ -100,4 +100,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/outsideStmtInvalid.test b/test/code/parser/stmt/namespace/outsideStmtInvalid.test index 8d8c75ab47..79a9c21efe 100644 --- a/test/code/parser/stmt/namespace/outsideStmtInvalid.test +++ b/test/code/parser/stmt/namespace/outsideStmtInvalid.test @@ -5,7 +5,7 @@ echo 1; echo 2; namespace A; ----- -Namespace declaration statement has to be the very first statement in the script on line 4 +Namespace declaration statement has to be the very first statement in the script from 4:1 to 4:9 array( 0: Stmt_Echo( exprs: array( From fc6b4890ef45c47348047d061f871c9135b2329b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Sep 2022 22:33:18 +0200 Subject: [PATCH 178/428] Specify more types --- lib/PhpParser/Error.php | 2 +- lib/PhpParser/Internal/Differ.php | 41 +++++++++++++------ .../Internal/PrintableNewAnonClassNode.php | 8 ++++ lib/PhpParser/Internal/TokenPolyfill.php | 8 ++-- lib/PhpParser/Internal/TokenStream.php | 6 +-- lib/PhpParser/JsonDecoder.php | 4 +- lib/PhpParser/Lexer.php | 10 ++++- 7 files changed, 55 insertions(+), 24 deletions(-) diff --git a/lib/PhpParser/Error.php b/lib/PhpParser/Error.php index e033caee44..544f466358 100644 --- a/lib/PhpParser/Error.php +++ b/lib/PhpParser/Error.php @@ -50,7 +50,7 @@ public function getEndLine(): int { /** * Gets the attributes of the node/token the error occurred at. * - * @return array + * @return array */ public function getAttributes(): array { return $this->attributes; diff --git a/lib/PhpParser/Internal/Differ.php b/lib/PhpParser/Internal/Differ.php index a8bc7796cf..bee9f07841 100644 --- a/lib/PhpParser/Internal/Differ.php +++ b/lib/PhpParser/Internal/Differ.php @@ -8,15 +8,17 @@ * Myers, Eugene W. "An O (ND) difference algorithm and its variations." * Algorithmica 1.1 (1986): 251-266. * + * @template T * @internal */ class Differ { + /** @var callable(T, T): bool */ private $isEqual; /** * Create differ over the given equality relation. * - * @param callable $isEqual Equality relation with signature function($a, $b) : bool + * @param callable(T, T): bool $isEqual Equality relation */ public function __construct(callable $isEqual) { $this->isEqual = $isEqual; @@ -25,8 +27,8 @@ public function __construct(callable $isEqual) { /** * Calculate diff (edit script) from $old to $new. * - * @param array $old Original array - * @param array $new New array + * @param T[] $old Original array + * @param T[] $new New array * * @return DiffElem[] Diff (edit script) */ @@ -41,8 +43,8 @@ public function diff(array $old, array $new): array { * If a sequence of remove operations is followed by the same number of add operations, these * will be coalesced into replace operations. * - * @param array $old Original array - * @param array $new New array + * @param T[] $old Original array + * @param T[] $new New array * * @return DiffElem[] Diff (edit script), including replace operations */ @@ -50,9 +52,14 @@ public function diffWithReplacements(array $old, array $new): array { return $this->coalesceReplacements($this->diff($old, $new)); } - private function calculateTrace(array $a, array $b): array { - $n = \count($a); - $m = \count($b); + /** + * @param T[] $old + * @param T[] $new + * @return array{array>, int, int} + */ + private function calculateTrace(array $old, array $new): array { + $n = \count($old); + $m = \count($new); $max = $n + $m; $v = [1 => 0]; $trace = []; @@ -66,7 +73,7 @@ private function calculateTrace(array $a, array $b): array { } $y = $x - $k; - while ($x < $n && $y < $m && ($this->isEqual)($a[$x], $b[$y])) { + while ($x < $n && $y < $m && ($this->isEqual)($old[$x], $new[$y])) { $x++; $y++; } @@ -80,7 +87,15 @@ private function calculateTrace(array $a, array $b): array { throw new \Exception('Should not happen'); } - private function extractDiff(array $trace, int $x, int $y, array $a, array $b): array { + /** + * @param array> $trace + * @param int $x + * @param int $y + * @param T[] $old + * @param T[] $new + * @return DiffElem[] + */ + private function extractDiff(array $trace, int $x, int $y, array $old, array $new): array { $result = []; for ($d = \count($trace) - 1; $d >= 0; $d--) { $v = $trace[$d]; @@ -96,7 +111,7 @@ private function extractDiff(array $trace, int $x, int $y, array $a, array $b): $prevY = $prevX - $prevK; while ($x > $prevX && $y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_KEEP, $a[$x-1], $b[$y-1]); + $result[] = new DiffElem(DiffElem::TYPE_KEEP, $old[$x-1], $new[$y-1]); $x--; $y--; } @@ -106,12 +121,12 @@ private function extractDiff(array $trace, int $x, int $y, array $a, array $b): } while ($x > $prevX) { - $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $a[$x-1], null); + $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $old[$x-1], null); $x--; } while ($y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $b[$y-1]); + $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $new[$y-1]); $y--; } } diff --git a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index 0d67eb94db..4cb758c041 100644 --- a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -27,6 +27,14 @@ class PrintableNewAnonClassNode extends Expr { /** @var Node\Stmt[] Statements */ public $stmts; + /** + * @param Node\AttributeGroup[] $attrGroups PHP attribute groups + * @param Node\Arg[] $args Arguments + * @param Node\Name|null $extends Name of extended class + * @param Node\Name[] $implements Names of implemented interfaces + * @param Node\Stmt[] $stmts Statements + * @param array $attributes Attributes + */ public function __construct( array $attrGroups, array $args, ?Node\Name $extends, array $implements, array $stmts, array $attributes diff --git a/lib/PhpParser/Internal/TokenPolyfill.php b/lib/PhpParser/Internal/TokenPolyfill.php index 8b5cd5eea2..381950980d 100644 --- a/lib/PhpParser/Internal/TokenPolyfill.php +++ b/lib/PhpParser/Internal/TokenPolyfill.php @@ -25,7 +25,7 @@ class TokenPolyfill { /** @var int The 0-based starting position of the token (or -1 if unknown). */ public $pos; - /** @var bool[] Tokens ignored by the PHP parser. */ + /** @var array Tokens ignored by the PHP parser. */ private const IGNORABLE_TOKENS = [ \T_WHITESPACE => true, \T_COMMENT => true, @@ -33,7 +33,7 @@ class TokenPolyfill { \T_OPEN_TAG => true, ]; - /** @var bool[]|null Tokens that may be part of a T_NAME_* identifier. */ + /** @var array|null Tokens that may be part of a T_NAME_* identifier. */ private static $identifierTokens; /** @@ -64,7 +64,7 @@ public function getTokenName(): ?string { * the token ID, a string that matches the token text, or an array of integers/strings. In the * latter case, the function returns true if any of the kinds in the array match. * - * @param int|string|array $kind + * @param int|string|(int|string)[] $kind */ public function is($kind): bool { if (\is_int($kind)) { @@ -119,7 +119,7 @@ public function __toString(): string { * T_WHITESPACE token. * * Namespaced names are represented using T_NAME_* tokens. * - * @returns static[] + * @return static[] */ public static function tokenize(string $code, int $flags = 0): array { self::init(); diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index ca2bcaa36c..9fcadcfbdd 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -102,7 +102,7 @@ public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType): bool { return false; } - /** @param int|string|array $skipTokenType */ + /** @param int|string|(int|string)[] $skipTokenType */ public function skipLeft(int $pos, $skipTokenType): int { $tokens = $this->tokens; @@ -120,7 +120,7 @@ public function skipLeft(int $pos, $skipTokenType): int { return $this->skipLeftWhitespace($pos); } - /** @param int|string|array $skipTokenType */ + /** @param int|string|(int|string)[] $skipTokenType */ public function skipRight(int $pos, $skipTokenType): int { $tokens = $this->tokens; @@ -170,7 +170,7 @@ public function skipRightWhitespace(int $pos): int { return $pos; } - /** @param int|string|array $findTokenType */ + /** @param int|string|(int|string)[] $findTokenType */ public function findRight(int $pos, $findTokenType): int { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { diff --git a/lib/PhpParser/JsonDecoder.php b/lib/PhpParser/JsonDecoder.php index 0198ea00f7..7b0ac0459d 100644 --- a/lib/PhpParser/JsonDecoder.php +++ b/lib/PhpParser/JsonDecoder.php @@ -3,7 +3,7 @@ namespace PhpParser; class JsonDecoder { - /** @var \ReflectionClass[] Node type to reflection class map */ + /** @var \ReflectionClass[] Node type to reflection class map */ private $reflectionClassCache; /** @return mixed */ @@ -48,7 +48,6 @@ private function decodeNode(array $value): Node { } $reflectionClass = $this->reflectionClassFromNodeType($nodeType); - /** @var Node $node */ $node = $reflectionClass->newInstanceWithoutConstructor(); if (isset($value['attributes'])) { @@ -83,6 +82,7 @@ private function decodeComment(array $value): Comment { ); } + /** @return \ReflectionClass */ private function reflectionClassFromNodeType(string $nodeType): \ReflectionClass { if (!isset($this->reflectionClassCache[$nodeType])) { $className = $this->classNameFromNodeType($nodeType); diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 024b2d21a0..f00015071a 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -13,16 +13,24 @@ class Lexer { protected $tokens; /** @var int Current position in the token array */ protected $pos; + /** @var bool Whether the preceding closing PHP tag has a trailing newline */ protected $prevCloseTagHasNewline; - + /** @var array Map of tokens that should be dropped (like T_WHITESPACE) */ protected $dropTokens; + /** @var bool Whether to use the startLine attribute */ private $attributeStartLineUsed; + /** @var bool Whether to use the endLine attribute */ private $attributeEndLineUsed; + /** @var bool Whether to use the startTokenPos attribute */ private $attributeStartTokenPosUsed; + /** @var bool Whether to use the endTokenPos attribute */ private $attributeEndTokenPosUsed; + /** @var bool Whether to use the startFilePos attribute */ private $attributeStartFilePosUsed; + /** @var bool Whether to use the endFilePos attribute */ private $attributeEndFilePosUsed; + /** @var bool Whether to use the comments attribute */ private $attributeCommentsUsed; /** From f98341f6886eeb0fb3c53b7cd0d3f5a758bdaf7c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 17 Sep 2022 17:12:55 +0200 Subject: [PATCH 179/428] Specify more types --- lib/PhpParser/Lexer.php | 12 +++--- lib/PhpParser/Lexer/Emulative.php | 8 ++-- .../Lexer/TokenEmulator/TokenEmulator.php | 2 + lib/PhpParser/NameContext.php | 2 +- lib/PhpParser/Node/Expr/ArrowFunction.php | 23 ++++++---- lib/PhpParser/Node/Expr/Closure.php | 24 +++++++---- lib/PhpParser/Node/Expr/ShellExec.php | 5 ++- lib/PhpParser/Node/Identifier.php | 1 + lib/PhpParser/Node/Name.php | 1 + lib/PhpParser/Node/Scalar/String_.php | 2 + lib/PhpParser/Node/Stmt/ClassMethod.php | 22 +++++++--- lib/PhpParser/Node/Stmt/Class_.php | 18 +++++--- lib/PhpParser/Node/Stmt/Enum_.php | 17 +++++--- lib/PhpParser/Node/Stmt/For_.php | 15 ++++--- lib/PhpParser/Node/Stmt/Foreach_.php | 12 ++++-- lib/PhpParser/Node/Stmt/Function_.php | 18 +++++--- lib/PhpParser/Node/Stmt/If_.php | 14 +++--- lib/PhpParser/Node/Stmt/Interface_.php | 12 ++++-- lib/PhpParser/Node/Stmt/Trait_.php | 9 ++-- lib/PhpParser/NodeAbstract.php | 3 +- lib/PhpParser/NodeDumper.php | 3 ++ lib/PhpParser/NodeVisitor/NameResolver.php | 2 +- lib/PhpParser/ParserAbstract.php | 41 ++++++++++++------ lib/PhpParser/ParserFactory.php | 6 +++ lib/PhpParser/PrettyPrinter/Standard.php | 4 ++ lib/PhpParser/PrettyPrinterAbstract.php | 43 +++++++++++-------- 26 files changed, 209 insertions(+), 110 deletions(-) diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index f00015071a..1298702b67 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -2,8 +2,6 @@ namespace PhpParser; -use PhpParser\Parser\Tokens; - require __DIR__ . '/compatibility_tokens.php'; class Lexer { @@ -36,11 +34,11 @@ class Lexer { /** * 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. + * @param array{usedAttributes?: string[]} $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 = []) { // map of tokens to drop while lexing (the map is only used for isset lookup, diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 41afa7edfe..c382f8f366 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -20,7 +20,7 @@ use PhpParser\PhpVersion; class Emulative extends Lexer { - /** @var mixed[] Patches used to reverse changes introduced in the code */ + /** @var array{int, string, string}[] Patches used to reverse changes introduced in the code */ private $patches = []; /** @var TokenEmulator[] */ @@ -32,9 +32,9 @@ class Emulative extends Lexer { private $hostPhpVersion; /** - * @param mixed[] $options Lexer options. In addition to the usual options, accepts a - * 'phpVersion' (PhpVersion object or string) that specifies the - * version to emulate. Defaults to newest supported. + * @param array{usedAttributes?: string[], phpVersion?: PhpVersion|string} $options Lexer options. + * In addition to the usual options, accepts a 'phpVersion' (PhpVersion object or string) + * that specifies the version to emulate. Defaults to newest supported. */ public function __construct(array $options = []) { $version = $options['phpVersion'] ?? PhpVersion::getNewestSupported(); diff --git a/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php index 53f65b14d5..fec2f19f44 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php @@ -18,10 +18,12 @@ abstract public function isEmulationNeeded(string $code): bool; abstract public function emulate(string $code, array $tokens): array; /** + * @param Token[] $tokens Original tokens * @return Token[] Modified Tokens */ abstract public function reverseEmulate(string $code, array $tokens): array; + /** @param array{int, string, string}[] $patches */ public function preprocessCode(string $code, array &$patches): string { return $code; } diff --git a/lib/PhpParser/NameContext.php b/lib/PhpParser/NameContext.php index 946be0ee0b..5c7f12f8e8 100644 --- a/lib/PhpParser/NameContext.php +++ b/lib/PhpParser/NameContext.php @@ -50,7 +50,7 @@ public function startNamespace(?Name $namespace = null): void { * @param Name $name Original name * @param string $aliasName Aliased name * @param int $type One of Stmt\Use_::TYPE_* - * @param array $errorAttrs Attributes to use to report an error + * @param array $errorAttrs Attributes to use to report an error */ public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void { // Constant names are case sensitive, everything else case insensitive diff --git a/lib/PhpParser/Node/Expr/ArrowFunction.php b/lib/PhpParser/Node/Expr/ArrowFunction.php index 4a9e5ed186..98e24a5104 100644 --- a/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -25,16 +25,23 @@ class ArrowFunction extends Expr implements FunctionLike { public $attrGroups; /** - * @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 - * 'returnType' => null : Return type - * 'expr' => Expr : Expression body - * 'attrGroups' => array() : PHP attribute groups + * @param array{ + * expr: Expr, + * static?: bool, + * byRef?: bool, + * params?: Node\Param[], + * returnType?: null|string|Node\Identifier|Node\Name|Node\ComplexType, + * attrGroups?: Node\AttributeGroup[] + * } $subNodes Array of the following subnodes: + * 'expr' : Expression body + * 'static' => false : Whether the closure is static + * 'byRef' => false : Whether to return by reference + * 'params' => array() : Parameters + * 'returnType' => null : Return type + * 'attrGroups' => array() : PHP attribute groups * @param array $attributes Additional attributes */ - public function __construct(array $subNodes = [], array $attributes = []) { + public function __construct(array $subNodes, array $attributes = []) { $this->attributes = $attributes; $this->static = $subNodes['static'] ?? false; $this->byRef = $subNodes['byRef'] ?? false; diff --git a/lib/PhpParser/Node/Expr/Closure.php b/lib/PhpParser/Node/Expr/Closure.php index caa566c536..ee257d49db 100644 --- a/lib/PhpParser/Node/Expr/Closure.php +++ b/lib/PhpParser/Node/Expr/Closure.php @@ -26,14 +26,22 @@ class Closure extends Expr implements FunctionLike { /** * 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 - * 'attrGroups' => array(): PHP attributes groups + * @param array{ + * static?: bool, + * byRef?: bool, + * params?: Node\Param[], + * uses?: ClosureUse[], + * returnType?: null|string|Node\Identifier|Node\Name|Node\ComplexType, + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $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 + * 'attrGroups' => array(): PHP attributes groups * @param array $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/ShellExec.php b/lib/PhpParser/Node/Expr/ShellExec.php index 68907ab66c..5fe85d7168 100644 --- a/lib/PhpParser/Node/Expr/ShellExec.php +++ b/lib/PhpParser/Node/Expr/ShellExec.php @@ -3,15 +3,16 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; +use PhpParser\Node\InterpolatedStringPart; class ShellExec extends Expr { - /** @var array Encapsed string array */ + /** @var (Expr|InterpolatedStringPart)[] Interpolated string array */ public $parts; /** * Constructs a shell exec (backtick) node. * - * @param array $parts Encapsed string array + * @param (Expr|InterpolatedStringPart)[] $parts Interpolated string array * @param array $attributes Additional attributes */ public function __construct(array $parts, array $attributes = []) { diff --git a/lib/PhpParser/Node/Identifier.php b/lib/PhpParser/Node/Identifier.php index 01f3e28985..000499957a 100644 --- a/lib/PhpParser/Node/Identifier.php +++ b/lib/PhpParser/Node/Identifier.php @@ -11,6 +11,7 @@ class Identifier extends NodeAbstract { /** @var string Identifier as string */ public $name; + /** @var array */ private static $specialClassNames = [ 'self' => true, 'parent' => true, diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index 4e6ae0a9fe..07bcbfd67b 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -8,6 +8,7 @@ class Name extends NodeAbstract { /** @var string[] Parts of the name */ public $parts; + /** @var array */ private static $specialClassNames = [ 'self' => true, 'parent' => true, diff --git a/lib/PhpParser/Node/Scalar/String_.php b/lib/PhpParser/Node/Scalar/String_.php index 91f4c78e6c..f836fcb3e5 100644 --- a/lib/PhpParser/Node/Scalar/String_.php +++ b/lib/PhpParser/Node/Scalar/String_.php @@ -15,6 +15,7 @@ class String_ extends Scalar { /** @var string String value */ public $value; + /** @var array Escaped character to its decoded value */ protected static $replacements = [ '\\' => '\\', '$' => '$', @@ -42,6 +43,7 @@ public function getSubNodeNames(): array { } /** + * @param array $attributes * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes */ public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self { diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index 4e5e3f0593..927e6f3408 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -22,6 +22,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike { /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; + /** @var array */ private static $magicNames = [ '__construct' => true, '__destruct' => true, @@ -46,13 +47,20 @@ class ClassMethod extends Node\Stmt implements FunctionLike { * Constructs a class method node. * * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'flags => 0 : Flags - * 'byRef' => false : Whether to return by reference - * 'params' => array() : Parameters - * 'returnType' => null : Return type - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups + * @param array{ + * flags?: int, + * byRef?: bool, + * params?: Node\Param[], + * returnType?: null|string|Node\Identifier|Node\Name|Node\ComplexType, + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'flags => 0 : Flags + * 'byRef' => false : Whether to return by reference + * 'params' => array() : Parameters + * 'returnType' => null : Return type + * 'stmts' => array() : Statements + * 'attrGroups' => array() : PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 428d2a9059..98bf9fd7c0 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -36,12 +36,18 @@ class Class_ extends ClassLike { * Constructs a class node. * * @param string|Node\Identifier|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 - * 'attrGroups' => array(): PHP attribute groups + * @param array{ + * flags?: int, + * extends?: Node\Name|null, + * implements?: Node\Name[], + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $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 + * 'attrGroups' => array(): PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Enum_.php b/lib/PhpParser/Node/Stmt/Enum_.php index 62b4aa079b..429cda0273 100644 --- a/lib/PhpParser/Node/Stmt/Enum_.php +++ b/lib/PhpParser/Node/Stmt/Enum_.php @@ -11,12 +11,17 @@ class Enum_ extends ClassLike { public $implements; /** - * @param string|Node\Identifier|null $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'scalarType' => null : Scalar type - * 'implements' => array() : Names of implemented interfaces - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups + * @param string|Node\Identifier|null $name Name + * @param array{ + * scalarType?: Node\Identifier|null, + * implements?: Node\Name[], + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'scalarType' => null : Scalar type + * 'implements' => array() : Names of implemented interfaces + * 'stmts' => array() : Statements + * 'attrGroups' => array() : PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/For_.php b/lib/PhpParser/Node/Stmt/For_.php index 3592c142b7..00dbd14743 100644 --- a/lib/PhpParser/Node/Stmt/For_.php +++ b/lib/PhpParser/Node/Stmt/For_.php @@ -17,11 +17,16 @@ class For_ extends Node\Stmt { /** * 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{ + * init?: Node\Expr[], + * cond?: Node\Expr[], + * loop?: Node\Expr[], + * stmts?: Node\Stmt[], + * } $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 $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Foreach_.php b/lib/PhpParser/Node/Stmt/Foreach_.php index b341d85a19..c347d4e125 100644 --- a/lib/PhpParser/Node/Stmt/Foreach_.php +++ b/lib/PhpParser/Node/Stmt/Foreach_.php @@ -21,10 +21,14 @@ class Foreach_ extends Node\Stmt { * * @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{ + * keyVar?: Node\Expr|null, + * byRef?: bool, + * stmts?: Node\Stmt[], + * } $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 $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Function_.php b/lib/PhpParser/Node/Stmt/Function_.php index aa8372b216..8948e21112 100644 --- a/lib/PhpParser/Node/Stmt/Function_.php +++ b/lib/PhpParser/Node/Stmt/Function_.php @@ -26,12 +26,18 @@ class Function_ extends Node\Stmt implements FunctionLike { * Constructs a function node. * * @param string|Node\Identifier $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 - * 'attrGroups' => array(): PHP attribute groups + * @param array{ + * byRef?: bool, + * params?: Node\Param[], + * returnType?: null|string|Node\Identifier|Node\Name|Node\ComplexType, + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'byRef' => false : Whether to return by reference + * 'params' => array(): Parameters + * 'returnType' => null : Return type + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/If_.php b/lib/PhpParser/Node/Stmt/If_.php index 57a9bb6dec..7c9289e7eb 100644 --- a/lib/PhpParser/Node/Stmt/If_.php +++ b/lib/PhpParser/Node/Stmt/If_.php @@ -17,11 +17,15 @@ class If_ extends Node\Stmt { /** * 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 Node\Expr $cond Condition + * @param array{ + * stmts?: Node\Stmt[], + * elseifs?: ElseIf_[], + * else?: Else_|null, + * } $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 $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Interface_.php b/lib/PhpParser/Node/Stmt/Interface_.php index 8c8b4ee01f..fa0ef46501 100644 --- a/lib/PhpParser/Node/Stmt/Interface_.php +++ b/lib/PhpParser/Node/Stmt/Interface_.php @@ -12,10 +12,14 @@ class Interface_ extends ClassLike { * Constructs a class node. * * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'extends' => array(): Name of extended interfaces - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups + * @param array{ + * extends?: Node\Name[], + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'extends' => array(): Name of extended interfaces + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Trait_.php b/lib/PhpParser/Node/Stmt/Trait_.php index 694924e471..5f2b33070a 100644 --- a/lib/PhpParser/Node/Stmt/Trait_.php +++ b/lib/PhpParser/Node/Stmt/Trait_.php @@ -9,9 +9,12 @@ class Trait_ extends ClassLike { * Constructs a trait node. * * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups + * @param array{ + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { diff --git a/lib/PhpParser/NodeAbstract.php b/lib/PhpParser/NodeAbstract.php index 3c8c2ecd3f..1d3bf26b2b 100644 --- a/lib/PhpParser/NodeAbstract.php +++ b/lib/PhpParser/NodeAbstract.php @@ -3,6 +3,7 @@ namespace PhpParser; abstract class NodeAbstract implements Node, \JsonSerializable { + /** @var array Attributes */ protected $attributes; /** @@ -169,7 +170,7 @@ public function setAttributes(array $attributes): void { } /** - * @return array + * @return array */ public function jsonSerialize(): array { return ['nodeType' => $this->getType()] + get_object_vars($this); diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index f48bc006f3..753f767c7a 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -9,8 +9,11 @@ use PhpParser\Node\UseItem; class NodeDumper { + /** @var bool */ private $dumpComments; + /** @var bool */ private $dumpPositions; + /** @var string|null */ private $code; /** diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index b1214fcb3d..a6c1fd663d 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -32,7 +32,7 @@ class NameResolver extends NodeVisitorAbstract { * namespacedName attribute, as usual.) * * @param ErrorHandler|null $errorHandler Error handler - * @param array $options Options + * @param array{preserveOriginalNames?: bool, replaceNodes?: bool} $options Options */ public function __construct(?ErrorHandler $errorHandler = null, array $options = []) { $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing()); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index bc4c432cc5..8767e33397 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -7,16 +7,17 @@ * turn is based on work by Masato Bito. */ -use PhpParser\Modifiers; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\Cast\Double; use PhpParser\Node\Identifier; +use PhpParser\Node\InterpolatedStringPart; use PhpParser\Node\Name; use PhpParser\Node\Param; use PhpParser\Node\Scalar\InterpolatedString; use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; +use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassConst; use PhpParser\Node\Stmt\ClassMethod; @@ -58,6 +59,7 @@ abstract class ParserAbstract implements Parser { /** @var int Rule number signifying that an unexpected token was encountered */ protected $unexpectedTokenRule; + /** @var int */ protected $YY2TBLSTATE; /** @var int Number of non-leaf states */ protected $numNonLeafStates; @@ -68,7 +70,7 @@ abstract class ParserAbstract implements Parser { protected $tokenToSymbol; /** @var string[] Map of symbols to their names */ protected $symbolToName; - /** @var array Names of the production rules (only necessary for debugging) */ + /** @var array Names of the production rules (only necessary for debugging) */ protected $productions; /** @var int[] Map of states to a displacement into the $action table. The corresponding action for this @@ -109,15 +111,15 @@ abstract class ParserAbstract implements Parser { /** @var mixed Temporary value containing the result of last semantic action (reduction) */ protected $semValue; - /** @var array Semantic value stack (contains values of tokens and semantic action results) */ + /** @var mixed[] Semantic value stack (contains values of tokens and semantic action results) */ protected $semStack; - /** @var array[] Start attribute stack */ + /** @var array[] Start attribute stack */ protected $startAttributeStack; - /** @var array[] End attribute stack */ + /** @var array[] End attribute stack */ protected $endAttributeStack; - /** @var array End attributes of last *shifted* token */ + /** @var array End attributes of last *shifted* token */ protected $endAttributes; - /** @var array Start attributes of last *read* token */ + /** @var array Start attributes of last *read* token */ protected $lookaheadStartAttributes; /** @var ErrorHandler Error handler */ @@ -125,7 +127,7 @@ abstract class ParserAbstract implements Parser { /** @var int Error state, used to avoid error floods */ protected $errorState; - /** @var \SplObjectStorage|null Array nodes created during parsing, for postprocessing of empty elements. */ + /** @var \SplObjectStorage|null Array nodes created during parsing, for postprocessing of empty elements. */ protected $createdArrays; /** @@ -201,6 +203,7 @@ public function getLexer(): Lexer { return $this->lexer; } + /** @return Stmt[]|null */ protected function doParse(): ?array { // We start off with no lookahead-token $symbol = self::SYMBOL_NONE; @@ -579,6 +582,7 @@ private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt): void { } } + /** @return array */ private function getNamespaceErrorAttributes(Namespace_ $node): array { $attrs = $node->getAttributes(); // Adjust end attributes to only cover the "namespace" keyword, not the whole namespace. @@ -663,7 +667,7 @@ protected function handleBuiltinTypes(Name $name) { * * @param int $pos Stack location * - * @return array Combined start and end attributes + * @return array Combined start and end attributes */ protected function getAttributesAt(int $pos): array { return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; @@ -682,6 +686,7 @@ protected function getFloatCastKind(string $cast): int { return Double::KIND_DOUBLE; } + /** @param array $attributes */ protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false): Int_ { try { return Int_::fromString($str, $attributes, $allowInvalidOctal); @@ -695,7 +700,7 @@ protected function parseLNumber(string $str, array $attributes, bool $allowInval /** * Parse a T_NUM_STRING token into either an integer or string node. * - * @param string $str Number string + * @param string $str Number string * @param array $attributes Attributes * * @return Int_|String_ Integer or string node. @@ -713,6 +718,7 @@ protected function parseNumString(string $str, array $attributes) { return new Int_($num, $attributes); } + /** @param array $attributes */ protected function stripIndentation( string $string, int $indentLen, string $indentChar, bool $newlineAtStart, bool $newlineAtEnd, array $attributes @@ -745,7 +751,11 @@ function ($matches) use ($indentLen, $indentChar, $attributes) { ); } - /** @param string|array $contents */ + /** + * @param string|(Expr|InterpolatedStringPart)[] $contents + * @param array $attributes + * @param array $endTokenAttributes + */ protected function parseDocString( string $startToken, $contents, string $endToken, array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape @@ -831,7 +841,7 @@ protected function parseDocString( * Create attributes for a zero-length common-capturing nop. * * @param Comment[] $comments - * @return array + * @return array */ protected function createCommentNopAttributes(array $comments): array { $comment = $comments[count($comments) - 1]; @@ -855,6 +865,10 @@ protected function createCommentNopAttributes(array $comments): array { return $attributes; } + /** + * @param array $attrs + * @return array + */ protected function createEmptyElemAttributes(array $attrs): array { if (isset($attrs['startLine'])) { $attrs['endLine'] = $attrs['startLine']; @@ -968,6 +982,7 @@ private function checkClassName(?Identifier $name, int $namePos): void { } } + /** @param Name[] $interfaces */ private function checkImplementedInterfaces(array $interfaces): void { foreach ($interfaces as $interface) { if ($interface->isSpecialClassName()) { @@ -1079,7 +1094,7 @@ protected function checkUseUse(UseItem $node, int $namePos): void { * 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 + * @return array The token map */ protected function createTokenMap(): array { $tokenMap = []; diff --git a/lib/PhpParser/ParserFactory.php b/lib/PhpParser/ParserFactory.php index 307981e1bb..0e0133982f 100644 --- a/lib/PhpParser/ParserFactory.php +++ b/lib/PhpParser/ParserFactory.php @@ -38,6 +38,8 @@ public function create(int $kind, ?Lexer $lexer = null): Parser { * Create a parser targeting the given version on a best-effort basis. The parser will generally * accept code for the newest supported version, but will try to accommodate code that becomes * invalid in newer versions or changes in interpretation. + * + * @param array $lexerOptions Lexer options */ public function createForVersion(PhpVersion $version, array $lexerOptions = []): Parser { if ($version->isHostVersion()) { @@ -55,6 +57,8 @@ public function createForVersion(PhpVersion $version, array $lexerOptions = []): * Create a parser targeting the newest version supported by this library. Code for older * versions will be accepted if there have been no relevant backwards-compatibility breaks in * PHP. + * + * @param array $lexerOptions Lexer options */ public function createForNewestSupportedVersion(array $lexerOptions = []): Parser { return $this->createForVersion(PhpVersion::getNewestSupported(), $lexerOptions); @@ -63,6 +67,8 @@ public function createForNewestSupportedVersion(array $lexerOptions = []): Parse /** * Create a parser targeting the host PHP version, that is the PHP version we're currently * running on. This parser will not use any token emulation. + * + * @param array $lexerOptions Lexer options */ public function createForHostVersion(array $lexerOptions = []): Parser { return $this->createForVersion(PhpVersion::getHostVersion(), $lexerOptions); diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 43b2e4a95d..1f0b9074b9 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -996,6 +996,7 @@ protected function pObjectProperty(Node $node): string { } } + /** @param (Expr|Node\InterpolatedStringPart)[] $encapsList */ protected function pEncapsList(array $encapsList, ?string $quote): string { $return = ''; foreach ($encapsList as $element) { @@ -1058,6 +1059,7 @@ protected function containsEndLabel(string $string, string $label, bool $atStart && preg_match('/' . $start . $label . $end . '/', $string); } + /** @param (Expr|Node\InterpolatedStringPart)[] $parts */ protected function encapsedContainsEndLabel(array $parts, string $label): bool { foreach ($parts as $i => $part) { $atStart = $i === 0; @@ -1105,6 +1107,7 @@ protected function hasNodeWithComments(array $nodes): bool { return false; } + /** @param Node[] $nodes */ protected function pMaybeMultiline(array $nodes, bool $trailingComma = false): string { if (!$this->hasNodeWithComments($nodes)) { return $this->pCommaSeparated($nodes); @@ -1113,6 +1116,7 @@ protected function pMaybeMultiline(array $nodes, bool $trailingComma = false): s } } + /** @param Node\AttributeGroup[] $nodes */ protected function pAttrGroups(array $nodes, bool $inline = false): string { $result = ''; $sep = $inline ? ' ' : $this->nl; diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index ab3f375270..3ee11d98dd 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -26,6 +26,7 @@ abstract class PrettyPrinterAbstract { protected const FIXUP_VAR_BRACED_NAME = 5; // Name operand that may require ${} bracing protected const FIXUP_ENCAPSED = 6; // Encapsed string part + /** @var array */ protected $precedenceMap = [ // [precedence, associativity] // where for precedence -1 is %left, 0 is %nonassoc and 1 is %right @@ -106,36 +107,40 @@ abstract class PrettyPrinterAbstract { /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ protected $origTokens; - /** @var Internal\Differ|null Differ for node lists */ + /** @var Internal\Differ|null Differ for node lists */ protected $nodeListDiffer; - /** @var bool[] Map determining whether a certain character is a label character */ + /** @var array Map determining whether a certain character is a label character */ protected $labelCharMap; /** - * @var int[][] Map from token classes and subnode names to FIXUP_* constants. This is used - * during format-preserving prints to place additional parens/braces if necessary. + * @var array> Map from token classes and subnode names to FIXUP_* constants. + * This is used during format-preserving prints to place additional parens/braces if necessary. */ protected $fixupMap; /** - * @var (int|string)[][] Map from "{$node->getType()}->{$subNode}" to ['left' => $l, 'right' => $r], - * where $l and $r specify the token type that needs to be stripped when - * removing this node. + * @var array Map from "{$node->getType()}->{$subNode}" + * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped + * when removing this node. */ protected $removalMap; /** - * @var mixed[] Map from "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. - * $find is an optional token after which the insertion occurs. $extraLeft/Right - * are optionally added before/after the main insertions. + * @var array Map from + * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. + * $find is an optional token after which the insertion occurs. $extraLeft/Right + * are optionally added before/after the main insertions. */ protected $insertionMap; /** - * @var string[] Map From "{$class}->{$subNode}" to string that should be inserted - * between elements of this list subnode. + * @var array Map From "{$class}->{$subNode}" to string that should be inserted + * between elements of this list subnode. */ protected $listInsertionMap; + /** + * @var array + */ protected $emptyListInsertionMap; - /** @var int[] Map from "{$class}->{$subNode}" to token before which the modifiers - * should be reprinted. */ + /** @var array Map from "{$class}->{$subNode}" to token before which the modifiers + * should be reprinted. */ protected $modifierChangeMap; /** @@ -152,7 +157,7 @@ abstract class PrettyPrinterAbstract { * syntax, if the node does not specify a format. Defaults to whether * the phpVersion support short array syntax. * - * @param array $options Dictionary of formatting options + * @param array{phpVersion?: PhpVersion, shortArraySyntax?: bool} $options Dictionary of formatting options */ public function __construct(array $options = []) { $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 0); @@ -468,7 +473,7 @@ protected function pComments(array $comments): string { * * @param Node[] $stmts Modified AST with links to original AST * @param Node[] $origStmts Original AST with token offset information - * @param array $origTokens Tokens of the original code + * @param Token[] $origTokens Tokens of the original code * * @return string */ @@ -687,8 +692,8 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { /** * Perform a format-preserving pretty print of an array. * - * @param array $nodes New nodes - * @param array $origNodes Original nodes + * @param Node[] $nodes New nodes + * @param Node[] $origNodes Original nodes * @param int $pos Current token position (updated by reference) * @param int $indentAdjustment Adjustment for indentation * @param string $parentNodeClass Class of the containing node. @@ -1320,7 +1325,7 @@ protected function initializeInsertionMap(): void { 'Stmt_Class->extends' => [null, false, ' extends ', null], 'Stmt_Enum->scalarType' => [null, false, ' : ', null], 'Stmt_EnumCase->expr' => [null, false, ' = ', null], - 'Expr_PrintableNewAnonClass->extends' => [null, ' extends ', null], + 'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', null], 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], 'Stmt_Function->returnType' => [')', false, ': ', null], From 9f9c2ea81ba6c20d55b7b0cdabf49b13faadc701 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 17 Sep 2022 18:49:51 +0200 Subject: [PATCH 180/428] Use PhpStan level 6 New baseline errors are array types that I prefer to leave alone, as well as one PhpStan bug: https://github.com/phpstan/phpstan/issues/4526 --- phpstan-baseline.neon | 120 ++++++++++++++++++++++++++++++++++++++++++ phpstan.neon.dist | 2 +- 2 files changed, 121 insertions(+), 1 deletion(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 488a8548b5..46662369fb 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,10 +1,100 @@ parameters: ignoreErrors: + - + message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:__construct\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/Builder/ClassConst.php + + - + message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:addConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/Builder/ClassConst.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:args\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:attribute\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:classConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:funcCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:methodCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:new\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:staticCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:val\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderHelpers\\:\\:normalizeValue\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderHelpers.php + + - + message: "#^Method PhpParser\\\\ConstExprEvaluator\\:\\:evaluateArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/ConstExprEvaluator.php + - message: "#^Unary operation \"~\" on mixed results in an error\\.$#" count: 1 path: lib/PhpParser/ConstExprEvaluator.php + - + message: "#^Method PhpParser\\\\Internal\\\\TokenPolyfill\\:\\:fixupBadCharacters\\(\\) has parameter \\$origTokens with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/Internal/TokenPolyfill.php + + - + message: "#^Method PhpParser\\\\Internal\\\\TokenPolyfill\\:\\:fixupBadCharacters\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/Internal/TokenPolyfill.php + + - + message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) has parameter \\$array with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/JsonDecoder.php + + - + message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/JsonDecoder.php + + - + message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeComment\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/JsonDecoder.php + + - + message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeNode\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/JsonDecoder.php + - message: "#^Call to function assert\\(\\) with false will always evaluate to false\\.$#" count: 1 @@ -15,6 +105,31 @@ parameters: count: 1 path: lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php + - + message: "#^Method PhpParser\\\\NodeDumper\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/NodeDumper.php + + - + message: "#^Method PhpParser\\\\NodeDumper\\:\\:dump\\(\\) has parameter \\$node with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/NodeDumper.php + + - + message: "#^Method PhpParser\\\\NodeDumper\\:\\:dumpRecursive\\(\\) has parameter \\$node with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/NodeDumper.php + + - + message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) has parameter \\$nodes with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/NodeTraverser.php + + - + message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/NodeTraverser.php + - message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$attrGroups\\.$#" count: 1 @@ -130,6 +245,11 @@ parameters: count: 1 path: lib/PhpParser/ParserAbstract.php + - + message: "#^Property PhpParser\\\\ParserAbstract\\:\\:\\$createdArrays \\(SplObjectStorage\\\\|null\\) does not accept SplObjectStorage\\\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + - message: "#^Unary operation \"\\+\" on string results in an error\\.$#" count: 1 diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 8e67545bd9..af91012549 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -2,7 +2,7 @@ includes: - phpstan-baseline.neon parameters: - level: 5 + level: 6 paths: - lib treatPhpDocTypesAsCertain: false From b3ad14b93843145117253a61d5f26ebf03be8733 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 17 Sep 2022 20:33:04 +0200 Subject: [PATCH 181/428] Fix some types --- lib/PhpParser/Builder/FunctionLike.php | 2 +- lib/PhpParser/Builder/TraitUseAdaptation.php | 2 +- lib/PhpParser/BuilderFactory.php | 4 ++-- lib/PhpParser/Comment.php | 2 +- lib/PhpParser/Internal/PrintableNewAnonClassNode.php | 4 ++-- lib/PhpParser/JsonDecoder.php | 1 + lib/PhpParser/Node/Stmt/ClassMethod.php | 2 +- lib/PhpParser/NodeVisitor/NameResolver.php | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/PhpParser/Builder/FunctionLike.php b/lib/PhpParser/Builder/FunctionLike.php index 5af887e46a..b62ff223a8 100644 --- a/lib/PhpParser/Builder/FunctionLike.php +++ b/lib/PhpParser/Builder/FunctionLike.php @@ -11,7 +11,7 @@ abstract class FunctionLike extends Declaration { /** @var Node\Param[] */ protected $params = []; - /** @var string|Node\Name|Node\NullableType|null */ + /** @var Node\Identifier|Node\Name|Node\ComplexType|null */ protected $returnType = null; /** diff --git a/lib/PhpParser/Builder/TraitUseAdaptation.php b/lib/PhpParser/Builder/TraitUseAdaptation.php index eec491a2b8..6fceb1f0e4 100644 --- a/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -55,7 +55,7 @@ public function as($alias) { throw new \LogicException('Cannot set alias for not alias adaptation buider'); } - $this->alias = $alias; + $this->alias = BuilderHelpers::normalizeIdentifier($alias); return $this; } diff --git a/lib/PhpParser/BuilderFactory.php b/lib/PhpParser/BuilderFactory.php index 4e77f857a9..fa20a7c5fa 100644 --- a/lib/PhpParser/BuilderFactory.php +++ b/lib/PhpParser/BuilderFactory.php @@ -86,7 +86,7 @@ public function enum(string $name): Builder\Enum_ { * * @param Node\Name|string ...$traits Trait names * - * @return Builder\TraitUse The create trait use builder + * @return Builder\TraitUse The created trait use builder */ public function useTrait(...$traits): Builder\TraitUse { return new Builder\TraitUse(...$traits); @@ -98,7 +98,7 @@ public function useTrait(...$traits): Builder\TraitUse { * @param Node\Name|string|null $trait Trait name * @param Node\Identifier|string $method Method name * - * @return Builder\TraitUseAdaptation The create trait use adaptation builder + * @return Builder\TraitUseAdaptation The created trait use adaptation builder */ public function traitUseAdaptation($trait, $method = null): Builder\TraitUseAdaptation { if ($method === null) { diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index b533c59dd8..ff949d9b35 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -215,7 +215,7 @@ public function getReformattedText() { */ private function getShortestWhitespacePrefixLen(string $str): int { $lines = explode("\n", $str); - $shortestPrefixLen = \INF; + $shortestPrefixLen = \PHP_INT_MAX; foreach ($lines as $line) { preg_match('(^\s*)', $line, $matches); $prefixLen = strlen($matches[0]); diff --git a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index 4cb758c041..f60e04073a 100644 --- a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -18,7 +18,7 @@ class PrintableNewAnonClassNode extends Expr { /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; - /** @var Node\Arg[] Arguments */ + /** @var (Node\Arg|Node\VariadicPlaceholder)[] Arguments */ public $args; /** @var null|Node\Name Name of extended class */ public $extends; @@ -29,7 +29,7 @@ class PrintableNewAnonClassNode extends Expr { /** * @param Node\AttributeGroup[] $attrGroups PHP attribute groups - * @param Node\Arg[] $args Arguments + * @param (Node\Arg|Node\VariadicPlaceholder)[] $args Arguments * @param Node\Name|null $extends Name of extended class * @param Node\Name[] $implements Names of implemented interfaces * @param Node\Stmt[] $stmts Statements diff --git a/lib/PhpParser/JsonDecoder.php b/lib/PhpParser/JsonDecoder.php index 7b0ac0459d..bd9d59c827 100644 --- a/lib/PhpParser/JsonDecoder.php +++ b/lib/PhpParser/JsonDecoder.php @@ -91,6 +91,7 @@ private function reflectionClassFromNodeType(string $nodeType): \ReflectionClass return $this->reflectionClassCache[$nodeType]; } + /** @return class-string */ private function classNameFromNodeType(string $nodeType): string { $className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\'); if (class_exists($className)) { diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index 927e6f3408..3cadfd86d9 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -52,7 +52,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike { * byRef?: bool, * params?: Node\Param[], * returnType?: null|string|Node\Identifier|Node\Name|Node\ComplexType, - * stmts?: Node\Stmt[], + * stmts?: Node\Stmt[]|null, * attrGroups?: Node\AttributeGroup[], * } $subNodes Array of the following optional subnodes: * 'flags => 0 : Flags diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index a6c1fd663d..996a9d6897 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -171,7 +171,7 @@ private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null): v ); } - /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure $node */ + /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure|Expr\ArrowFunction $node */ private function resolveSignature($node): void { foreach ($node->params as $param) { $param->type = $this->resolveType($param->type); From f7b448fa1557a2b5943c56da453221ff3e362fff Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 17 Sep 2022 21:14:31 +0200 Subject: [PATCH 182/428] Bail out on list insertion of non-Node PhpStan correctly detected that this is not supported. We could add support for it, but for now just make sure it doesn't crash. --- lib/PhpParser/PrettyPrinterAbstract.php | 5 +++++ test/code/formatPreservation/listInsertion.test | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 3ee11d98dd..643801dd3f 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -830,6 +830,11 @@ protected function pArray( return null; } + if (!$arrItem instanceof Node) { + // We only support list insertion of nodes. + return null; + } + // We go multiline if the original code was multiline, // or if it's an array item with a comment above it. // Match always uses multiline formatting. diff --git a/test/code/formatPreservation/listInsertion.test b/test/code/formatPreservation/listInsertion.test index 6ddd8168ca..30b129179b 100644 --- a/test/code/formatPreservation/listInsertion.test +++ b/test/code/formatPreservation/listInsertion.test @@ -345,4 +345,12 @@ function test() { $a; $b; $z; -} \ No newline at end of file +} +----- +expr->var->items, 1, 0, [null]); +----- + Date: Sat, 17 Sep 2022 21:19:37 +0200 Subject: [PATCH 183/428] Slightly more precise type --- lib/PhpParser/NodeVisitor/NameResolver.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index 996a9d6897..e2db5d4457 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -181,10 +181,11 @@ private function resolveSignature($node): void { } /** - * @param Node\Identifier|Name|Node\ComplexType|null $node - * @return Node\Identifier|Name|Node\ComplexType|null + * @template T of Node\Identifier|Name|Node\ComplexType|null + * @param T $node + * @return T */ - private function resolveType(?Node $node) { + private function resolveType(?Node $node): ?Node { if ($node instanceof Name) { return $this->resolveClassName($node); } From 0dd85ebd34d7463d53ec92035105b04799a687e1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 18 Sep 2022 15:30:16 +0200 Subject: [PATCH 184/428] Support readonly before DNF type This makes us match the PHP 8.2 handling of readonly. Handling of "readonly" functions is moved to the parser to allow distinguishing them from readonly properties with DNF types. We have to uglify the grammar to avoid some shift/reduce conflicts. Thank you WordPress. --- grammar/php.y | 19 +- lib/PhpParser/Lexer/Emulative.php | 2 + .../ReadonlyFunctionTokenEmulator.php | 31 + lib/PhpParser/Parser/Php7.php | 1982 ++++++++-------- lib/PhpParser/Parser/Php8.php | 2008 ++++++++--------- test/PhpParser/Lexer/EmulativeTest.php | 4 +- .../function/disjointNormalFormTypes.test | 37 + .../stmt/function/readonlyFunction.test | 32 + 8 files changed, 2122 insertions(+), 1993 deletions(-) create mode 100644 lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php create mode 100644 test/code/parser/stmt/function/readonlyFunction.test diff --git a/grammar/php.y b/grammar/php.y index 3d94fabfe9..9f931c4d99 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -468,15 +468,23 @@ block_or_error: | error { $$ = []; } ; +identifier_maybe_readonly: + identifier_not_reserved { $$ = $1; } + | T_READONLY { $$ = Node\Identifier[$1]; } +; + function_declaration_statement: - T_FUNCTION optional_ref identifier_not_reserved '(' parameter_list ')' optional_return_type block_or_error + T_FUNCTION optional_ref identifier_maybe_readonly '(' parameter_list ')' optional_return_type block_or_error { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $8, 'attrGroups' => []]]; } - | attributes T_FUNCTION optional_ref identifier_not_reserved '(' parameter_list ')' optional_return_type block_or_error + | attributes T_FUNCTION optional_ref identifier_maybe_readonly '(' parameter_list ')' optional_return_type block_or_error { $$ = Stmt\Function_[$4, ['byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => $1]]; } ; class_declaration_statement: - optional_attributes class_entry_type identifier_not_reserved extends_from implements_list '{' class_statement_list '}' + class_entry_type identifier_not_reserved extends_from implements_list '{' class_statement_list '}' + { $$ = Stmt\Class_[$2, ['type' => $1, 'extends' => $3, 'implements' => $4, 'stmts' => $6, 'attrGroups' => []]]; + $this->checkClass($$, #2); } + | attributes class_entry_type identifier_not_reserved extends_from implements_list '{' class_statement_list '}' { $$ = Stmt\Class_[$3, ['type' => $2, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]]; $this->checkClass($$, #3); } | optional_attributes T_INTERFACE identifier_not_reserved interface_extends_list '{' class_statement_list '}' @@ -1090,8 +1098,13 @@ lexical_var: optional_ref plain_variable { $$ = Node\ClosureUse[$2, $1]; } ; +name_readonly: + T_READONLY { $$ = Name[$1]; } +; + function_call: name argument_list { $$ = Expr\FuncCall[$1, $2]; } + | name_readonly 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]; } diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index c382f8f366..d1861f7579 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -14,6 +14,7 @@ use PhpParser\Lexer\TokenEmulator\MatchTokenEmulator; use PhpParser\Lexer\TokenEmulator\NullsafeTokenEmulator; use PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator; +use PhpParser\Lexer\TokenEmulator\ReadonlyFunctionTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReverseEmulator; use PhpParser\Lexer\TokenEmulator\TokenEmulator; @@ -58,6 +59,7 @@ public function __construct(array $options = []) { new EnumTokenEmulator(), new ReadonlyTokenEmulator(), new ExplicitOctalEmulator(), + new ReadonlyFunctionTokenEmulator(), ]; // Collect emulators that are relevant for the PHP version we're running diff --git a/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php new file mode 100644 index 0000000000..5990d7fa0d --- /dev/null +++ b/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php @@ -0,0 +1,31 @@ +semValue = []; }, 202 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 203 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 204 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - $this->checkClass($this->semValue, $stackPos-(8-3)); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 205 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - $this->checkInterface($this->semValue, $stackPos-(7-3)); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 206 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->checkClass($this->semValue, $stackPos-(7-2)); }, 207 => function ($stackPos) { - $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - $this->checkEnum($this->semValue, $stackPos-(8-3)); + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->checkClass($this->semValue, $stackPos-(8-3)); }, 208 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->checkInterface($this->semValue, $stackPos-(7-3)); }, 209 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 210 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->checkEnum($this->semValue, $stackPos-(8-3)); }, 211 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 212 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = null; }, 214 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 215 => function ($stackPos) { - $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = 0; }, 216 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 217 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 218 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 219 => function ($stackPos) { - $this->semValue = null; + $this->semValue = Modifiers::ABSTRACT; }, 220 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = Modifiers::FINAL; }, 221 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = Modifiers::READONLY; }, 222 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 223 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 224 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 225 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 226 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 227 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 228 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 229 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 230 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 231 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 232 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 233 => function ($stackPos) { - $this->semValue = null; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 234 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 236 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = null; }, 237 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 238 => function ($stackPos) { - $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 239 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 240 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 241 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 242 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 243 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 244 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 245 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(5-3)]; }, 246 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array(); }, 247 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 248 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 249 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 250 => function ($stackPos) { - $this->semValue = []; + $this->semValue = $this->semStack[$stackPos]; }, 251 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 252 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 253 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = []; }, 254 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 255 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 256 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 257 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 258 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 259 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 260 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 261 => function ($stackPos) { $this->semValue = array(); @@ -1966,132 +1969,132 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 263 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 264 => function ($stackPos) { - $this->semValue = null; + $this->semValue = array(); }, 265 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 266 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 267 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = null; }, 268 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 269 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = null; }, 270 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 271 => function ($stackPos) { - $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 272 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 273 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 274 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, 275 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 276 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = array(); }, 277 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 278 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 279 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + $this->semValue = 0; }, 280 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 281 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->semValue = Modifiers::PUBLIC; }, 282 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); + $this->semValue = Modifiers::PROTECTED; }, 283 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); - $this->checkParam($this->semValue); + $this->semValue = Modifiers::PRIVATE; }, 284 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = Modifiers::READONLY; }, 285 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->checkParam($this->semValue); }, 286 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->checkParam($this->semValue); }, 287 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, 288 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 289 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 290 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 291 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 292 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 293 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 294 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 295 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 296 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 297 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 298 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 299 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 300 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 301 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 302 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 303 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 304 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 305 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -2103,714 +2106,714 @@ protected function initReduceCallbacks(): void { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 308 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 309 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 310 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 311 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 312 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 313 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 314 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 315 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 316 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 317 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 318 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 319 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); + $this->semValue = null; }, 320 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 321 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 322 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, 323 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 325 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 326 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 327 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 328 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 329 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 330 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 331 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 332 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 333 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 334 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 335 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 336 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 337 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 338 => function ($stackPos) { + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 339 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + }, + 340 => function ($stackPos) { + $this->semValue = array(); + }, + 341 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 339 => function ($stackPos) { + 342 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 340 => function ($stackPos) { + 343 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 341 => function ($stackPos) { + 344 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, - 342 => function ($stackPos) { + 345 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 343 => function ($stackPos) { + 346 => function ($stackPos) { $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 344 => function ($stackPos) { + 347 => function ($stackPos) { $this->semValue = null; /* will be skipped */ }, - 345 => function ($stackPos) { + 348 => function ($stackPos) { $this->semValue = array(); }, - 346 => function ($stackPos) { + 349 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 347 => function ($stackPos) { + 350 => function ($stackPos) { $this->semValue = array(); }, - 348 => function ($stackPos) { + 351 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 349 => function ($stackPos) { + 352 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 350 => function ($stackPos) { + 353 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 351 => function ($stackPos) { + 354 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 352 => function ($stackPos) { + 355 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 353 => function ($stackPos) { + 356 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 354 => function ($stackPos) { + 357 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 355 => function ($stackPos) { + 358 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 356 => function ($stackPos) { + 359 => function ($stackPos) { $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, - 357 => function ($stackPos) { + 360 => function ($stackPos) { $this->semValue = null; }, - 358 => function ($stackPos) { + 361 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 359 => function ($stackPos) { + 362 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 360 => function ($stackPos) { + 363 => function ($stackPos) { $this->semValue = 0; }, - 361 => function ($stackPos) { + 364 => function ($stackPos) { $this->semValue = 0; }, - 362 => function ($stackPos) { + 365 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 363 => function ($stackPos) { + 366 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 364 => function ($stackPos) { + 367 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 365 => function ($stackPos) { + 368 => function ($stackPos) { $this->semValue = Modifiers::PUBLIC; }, - 366 => function ($stackPos) { + 369 => function ($stackPos) { $this->semValue = Modifiers::PROTECTED; }, - 367 => function ($stackPos) { + 370 => function ($stackPos) { $this->semValue = Modifiers::PRIVATE; }, - 368 => function ($stackPos) { + 371 => function ($stackPos) { $this->semValue = Modifiers::STATIC; }, - 369 => function ($stackPos) { + 372 => function ($stackPos) { $this->semValue = Modifiers::ABSTRACT; }, - 370 => function ($stackPos) { + 373 => function ($stackPos) { $this->semValue = Modifiers::FINAL; }, - 371 => function ($stackPos) { + 374 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 372 => function ($stackPos) { + 375 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 373 => function ($stackPos) { + 376 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 374 => function ($stackPos) { + 377 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 375 => function ($stackPos) { + 378 => function ($stackPos) { $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 376 => function ($stackPos) { + 379 => function ($stackPos) { $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 377 => function ($stackPos) { + 380 => function ($stackPos) { $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 378 => function ($stackPos) { + 381 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 379 => function ($stackPos) { + 382 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 380 => function ($stackPos) { + 383 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 381 => function ($stackPos) { + 384 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 382 => function ($stackPos) { + 385 => function ($stackPos) { $this->semValue = array(); }, - 383 => function ($stackPos) { + 386 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 384 => function ($stackPos) { + 387 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 385 => function ($stackPos) { + 388 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 386 => function ($stackPos) { + 389 => function ($stackPos) { $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 387 => function ($stackPos) { + 390 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 388 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 389 => function ($stackPos) { + 392 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); if (!$this->phpVersion->allowsAssignNewByReference()) { $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); } }, - 390 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 391 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 392 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 393 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 394 => function ($stackPos) { + 397 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 395 => function ($stackPos) { + 398 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { + 399 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 397 => function ($stackPos) { + 400 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 398 => function ($stackPos) { + 401 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 399 => function ($stackPos) { + 402 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 400 => function ($stackPos) { + 403 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 401 => function ($stackPos) { + 404 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 402 => function ($stackPos) { + 405 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 403 => function ($stackPos) { + 406 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 404 => function ($stackPos) { + 407 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 405 => function ($stackPos) { + 408 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 406 => function ($stackPos) { + 409 => function ($stackPos) { $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 407 => function ($stackPos) { + 410 => function ($stackPos) { $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 408 => function ($stackPos) { + 411 => function ($stackPos) { $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 409 => function ($stackPos) { + 412 => function ($stackPos) { $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 410 => function ($stackPos) { + 413 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 411 => function ($stackPos) { + 414 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 412 => function ($stackPos) { + 415 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 413 => function ($stackPos) { + 416 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 414 => function ($stackPos) { + 417 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 415 => function ($stackPos) { + 418 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 416 => function ($stackPos) { + 419 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 417 => function ($stackPos) { + 420 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 418 => function ($stackPos) { + 421 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 419 => function ($stackPos) { + 422 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 420 => function ($stackPos) { + 423 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 421 => function ($stackPos) { + 424 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 422 => function ($stackPos) { + 425 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 423 => function ($stackPos) { + 426 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 424 => function ($stackPos) { + 427 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 425 => function ($stackPos) { + 428 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 426 => function ($stackPos) { + 429 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 427 => function ($stackPos) { + 430 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 428 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 429 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 431 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 432 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 441 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 443 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 444 => function ($stackPos) { + 447 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 445 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 446 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 447 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 448 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 452 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 450 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 452 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 456 => function ($stackPos) { $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 457 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 455 => function ($stackPos) { + 458 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 459 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 457 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 458 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 463 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 461 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 462 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 463 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, 464 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 465 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 466 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 467 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 468 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 469 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 470 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 471 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 472 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 473 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 474 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 475 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 476 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 477 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 478 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 479 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 480 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 481 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->checkClass($this->semValue[0], -1); }, 482 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 483 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 484 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 485 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 486 => function ($stackPos) { - $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 487 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 488 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 489 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 490 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 491 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 492 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 493 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 494 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 495 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 496 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 497 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 498 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 499 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 500 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 501 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 502 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 503 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 504 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 505 => function ($stackPos) { - $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 506 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 507 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 508 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 509 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 510 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 511 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 512 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 513 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 514 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 515 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 516 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 517 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 518 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 519 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 520 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 521 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - $this->createdArrays->attach($this->semValue); + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 522 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 523 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 524 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, 525 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, 526 => function ($stackPos) { - $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + $this->createdArrays->attach($this->semValue); }, 527 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, 528 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, 530 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 531 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 532 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 533 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 534 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 536 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 537 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 538 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 539 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2819,10 +2822,10 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 543 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2831,196 +2834,211 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 545 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 546 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 548 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 549 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 550 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 551 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 552 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 553 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 554 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 555 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = null; }, 556 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 557 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 558 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 559 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 560 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 561 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 562 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 563 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 565 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 566 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 567 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 568 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 569 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 570 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 571 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 572 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 573 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 574 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 575 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 576 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 577 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 578 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 579 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 580 => function ($stackPos) { + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + }, + 581 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $this->postprocessList($this->semValue); }, - 577 => function ($stackPos) { + 582 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, - 578 => function ($stackPos) { + 583 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 579 => function ($stackPos) { + 584 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, - 580 => function ($stackPos) { + 585 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 581 => function ($stackPos) { + 586 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 582 => function ($stackPos) { + 587 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 583 => function ($stackPos) { + 588 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 584 => function ($stackPos) { + 589 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 585 => function ($stackPos) { + 590 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 586 => function ($stackPos) { + 591 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 587 => function ($stackPos) { + 592 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 588 => function ($stackPos) { + 593 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); }, - 589 => function ($stackPos) { + 594 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 590 => function ($stackPos) { + 595 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 591 => function ($stackPos) { + 596 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 592 => function ($stackPos) { + 597 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 593 => function ($stackPos) { + 598 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, - 594 => function ($stackPos) { + 599 => function ($stackPos) { $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 595 => function ($stackPos) { + 600 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 596 => function ($stackPos) { + 601 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 597 => function ($stackPos) { + 602 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 598 => function ($stackPos) { + 603 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 599 => function ($stackPos) { + 604 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 600 => function ($stackPos) { + 605 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 601 => function ($stackPos) { + 606 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 602 => function ($stackPos) { + 607 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 603 => function ($stackPos) { + 608 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 604 => function ($stackPos) { + 609 => function ($stackPos) { $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 605 => function ($stackPos) { + 610 => function ($stackPos) { $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 606 => function ($stackPos) { + 611 => function ($stackPos) { $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 607 => function ($stackPos) { + 612 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 7bc81a949b..d1fc37d396 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -160,8 +160,8 @@ class Php8 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1221; - protected $gotoTableSize = 775; + protected $actionTableSize = 1255; + protected $gotoTableSize = 628; protected $invalidSymbol = 168; protected $errorSymbol = 1; @@ -169,7 +169,7 @@ class Php8 extends \PhpParser\ParserAbstract protected $unexpectedTokenRule = 32767; protected $YY2TBLSTATE = 429; - protected $numNonLeafStates = 720; + protected $numNonLeafStates = 729; protected $symbolToName = array( "EOF", @@ -386,332 +386,339 @@ class Php8 extends \PhpParser\ParserAbstract ); protected $action = array( - 132, 133, 134, 573, 135, 136, 0, 732, 733, 734, - 137, 37,-32766,-32766,-32766, 1004,-32766,-32766,-32766, 932, - 450, 451, 452, 808,-32767,-32767,-32767,-32767, 101, 102, - 103,-32766, 240,-32766, -324, 726, 725,-32766, 2,-32766, + 132, 133, 134, 578, 135, 136, 0, 741, 742, 743, + 137, 37,-32766,-32766,-32766, 979,-32766,-32766,-32766,-32766, + -32766,-32766, 1293, 817,-32767,-32767,-32767,-32767, 101, 102, + 103,-32766, 930,-32766, 828, 735, 734,-32766, 1016,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1219, 819, 1013, 12, 735,-32766,-32766,-32766, 1088, - 1089, 1090, 1087, 1086, 1085, 1091, -193, -192, 810, 267, - 138, 399, 739, 740, 741, 742, 288,-32766, 423,-32766, - -32766,-32766,-32766,-32766, 34, 743, 744, 745, 746, 747, - 748, 749, 750, 751, 752, 753, 773, 574, 774, 775, - 776, 777, 765, 766, 339, 340, 768, 769, 754, 755, - 756, 758, 759, 760, 349, 800, 801, 802, 803, 804, - 805, 761, 762, 575, 576, 794, 785, 783, 784, 797, - 780, 781, 817, 128, 577, 578, 779, 579, 580, 581, - 582, 583, 584, 921, 812,-32766,-32766,-32766, 782, 585, - 586, 694, 139, 144, 132, 133, 134, 573, 135, 136, - 1037, 732, 733, 734, 137, 37,-32766, 253,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 307, - -268,-32766,-32766,-32766, 844, 967, 845,-32766, -324, 726, - 725, 602,-32766,-32766,-32766, 1279,-32766, 126,-32766,-32766, - -32766,-32766,-32766, 309,-32766,-32766,-32766, 1295, 296, 735, - 818, 74, 104, 105, 106, 107, 108, 322, 271, 1324, - -193, -192, 1325, 267, 138, 399, 739, 740, 741, 742, - 109, -86, 423, 816,-32766,-32766,-32766,-32766,-32766, 743, - 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, - 773, 574, 774, 775, 776, 777, 765, 766, 339, 340, - 768, 769, 754, 755, 756, 758, 759, 760, 349, 800, - 801, 802, 803, 804, 805, 761, 762, 575, 576, 794, - 785, 783, 784, 797, 780, 781, 808, 596, 577, 578, - 779, 579, 580, 581, 582, 583, 584, -86, 82, 83, - 84, 320, 782, 585, 586, 706, 148, 757, 727, 728, - 729, 730, 731, 968, 732, 733, 734, 770, 771, 36, - 336, 85, 86, 87, 88, 89, 90, 91, 92, 93, + -32767, 1233, -365, 1025, -365, 744,-32766,-32766,-32766, 1100, + 1101, 1102, 1099, 1098, 1097, 1103, -327, -193, 819, 267, + 138, 399, 748, 749, 750, 751, 288,-32766, 423,-32766, + -32766,-32766,-32766,-32766, 602, 752, 753, 754, 755, 756, + 757, 758, 759, 760, 761, 762, 782, 579, 783, 784, + 785, 786, 774, 775, 340, 341, 777, 778, 763, 764, + 765, 767, 768, 769, 351, 809, 810, 811, 812, 813, + 580, 770, 771, 581, 582, 803, 794, 792, 793, 806, + 789, 790, 826, -192, 583, 584, 788, 585, 586, 587, + 588, 589, 590, 980, 821,-32766,-32766,-32766, 791, 591, + 592, 702, 139, 2, 132, 133, 134, 578, 135, 136, + 1049, 741, 742, 743, 137, 37,-32766, 12,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 34, + 238,-32766,-32766,-32766, 81, 128, -591,-32766, 322, 735, + 734, 608, 827, -591, 715, 386,-32766, 11,-32766,-32766, + -32766,-32766,-32766, 1313,-32766,-32766,-32766, 1309, 296, 744, + 1312, 74, 104, 105, 106, 107, 108, 322, 271, 1338, + -327, -193, 1339, 267, 138, 399, 748, 749, 750, 751, + 109, 476, 423,-32766,-32766,-32766, 551, 822, 126, 752, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, + 782, 579, 783, 784, 785, 786, 774, 775, 340, 341, + 777, 778, 763, 764, 765, 767, 768, 769, 351, 809, + 810, 811, 812, 813, 580, 770, 771, 581, 582, 803, + 794, 792, 793, 806, 789, 790, 817, -192, 583, 584, + 788, 585, 586, 587, 588, 589, 590, 1265, 82, 83, + 84, 1077, 791, 591, 592, 727, 148, 766, 736, 737, + 738, 739, 740, 823, 741, 742, 743, 779, 780, 36, + 144, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 1010, 271, 1088, 1089, 1090, - 1087, 1086, 1085, 1091, 936, 937, 1065, 81, 109, 938, - 718, 322, 735,-32766,-32766,-32766, 337, 1013, 289, 141, - 1064, 472, 363, 322, 813, 367, 736, 737, 738, 739, - 740, 741, 742, 239,-32766, 806,-32766,-32766, -537, 423, - 278, 382, 743, 744, 745, 746, 747, 748, 749, 750, - 751, 752, 753, 773, 796, 774, 775, 776, 777, 765, - 766, 767, 795, 768, 769, 754, 755, 756, 758, 759, - 760, 799, 800, 801, 802, 803, 804, 805, 761, 762, - 763, 764, 794, 785, 783, 784, 797, 780, 781,-32766, - 546, 772, 778, 779, 786, 787, 789, 788, 790, 791, - 814,-32766, -537, -537,-32766, 782, 793, 792, 49, 50, - 51, 503, 52, 53, 1214, 1213, 1215, -537, 54, 55, - -111, 56,-32766, 1066, 901, -111, 1013, -111, 289, -543, - 435, -537, 303, 373, 374, -111, -111, -111, -111, -111, - -111, -111, -111, 417, 901, 375, 374, 436, 1219, 288, - 437, 1251, 1219, 473, 697, 417, 1299, 57, 58, 14, - 150, -536, 59, 1298, 60, 247, 248, 61, 62, 63, - 64, 65, 66, 67, 68, 438, 27, 269, 69, 439, - 504, 1080, -16, -338, 1245, 1246, 505, -362, 817, -362, - 823, 323, 1243, 41, 24, 506, 384, 507, 11, 508, - 901, 509, 726, 725, 510, 511, 1239, 891, 151, 43, - 44, 440, 370, 369,-32766, 45, 512, 1000, 999, 998, - 1001, 361, 335, 153, 1212, -536, -536, 891, -586, 817, - 513, 514, 515, 817, 123, -586, 1013, 844, 817, 845, - -536, 1314, 517, 518,-32766, 1233, 1234, 1235, 1236, 1230, - 1231, 295, -542, 154, -536, 458, 459, 1237, 1232, 288, - 1210, 1214, 1213, 1215, 296, 155, 1013, 70, 1010, 102, - 103, 318, 319, 322, -153, -153, -153, 157, -577, -111, - -577, 1012, 903, 891,-32766, -538, 692, 817,-32766, -153, - 1013, -153, 32, -153, -298, -153,-32766,-32766, 124, 1214, - 1213, 1215, 903, 35, 250, 368, 692, 129, 74, 296, - 643, 25, 74, 130, 322, 143, -111, -111, 322, 1036, - 158, -111, 662, 663, 149, 402, 877, -111, -111, -111, + 104, 105, 106, 107, 108, -591, 271, -591, 251, 375, + 376, 1100, 1101, 1102, 1099, 1098, 1097, 1103, 109, 417, + 948, 949, 744, 477, 289, 950,-32766,-32766,-32766, 141, + 1076, 944,-32766, 322, 377, 376, 745, 746, 747, 748, + 749, 750, 751, 307, 417, 815, 309,-32766, -542,-32766, + -32766, 320, 752, 753, 754, 755, 756, 757, 758, 759, + 760, 761, 762, 782, 805, 783, 784, 785, 786, 774, + 775, 776, 804, 777, 778, 763, 764, 765, 767, 768, + 769, 808, 809, 810, 811, 812, 813, 814, 770, 771, + 772, 773, 803, 794, 792, 793, 806, 789, 790, 239, + -86, 781, 787, 788, 795, 796, 798, 797, 799, 800, + -32766, 1022, -542, -542, 932, 791, 802, 801, 49, 50, + 51, 507, 52, 53, 423, 335, 932, -542, 54, 55, + -111, 56, 1025, 1025, 910, -111, 150, -111, 289, -548, + -32766, -542, 303,-32766,-32766, -111, -111, -111, -111, -111, + -111, -111, -111, 352, 910, 288, 279, 853, 1233, 854, + 336,-32766, 1233, 14, 705, 357, -86, 57, 58,-32766, + 365, -541, 59, 369, 60, 245, 246, 61, 62, 63, + 64, 65, 66, 67, 68, 1092, 27, 269, 69, 439, + 508, 1025, -16, -341, 1259, 1260, 509, 384, 826, 1228, + 1227, 1229, 1257, 41, 24, 510, 825, 511, 1078, 512, + 910, 513, 735, 734, 514, 515, 853, 900, 854, 43, + 44, 440, 372, 371,-32766, 45, 516, 1012, 1011, 1010, + 1013, 363, 334, 435, 1226, -541, -541, 900, 1219, 826, + 518, 519, 520, 826, 1022, 436, 1025, -271, 1253, -582, + -541, -582, 522, 523, 437, 1247, 1248, 1249, 1250, 1244, + 1245, 295, -547, 151, -541, 438, 1025, 1251, 1246, 288, + 1224, 1228, 1227, 1229, 296, 102, 103, 70, 910, 651, + 25, 318, 319, 322, -153, -153, -153, 910, 832, -111, + 123, 1024, 912, 900,-32766, 910, 700, 153,-32766, -153, + -88, -153, 154, -153, 1048, -153,-32766,-32766, 706, 1228, + 1227, 1229, 912, 124, -588, 370, 700, 707, 74, 296, + 155, -588, 74, 157, 322, 710, 948, 949, 322, 826, + 129, 517, 910, 283, 32, 323, 886, 944, -111, -111, -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 726, 725, 159, 283, -538, - -538, 635, 636, 901, 160, -4, 901, 161, 903, 371, - 372, -88, 692, -153, -538, -79, -583, -75, 140, 284, - 901, -73, 322, -583, 1126, 1128, 376, 377, -538, 726, - 725, -72,-32766, 698, 901, -535, -294, -586, 1212, -586, - -71, -70, -69, 726, 725,-32766,-32766,-32766, -68,-32766, - 699,-32766, -67,-32766, -66, -47,-32766, -18, 147, 270, - 280,-32766,-32766,-32766, 701, 707,-32766,-32766,-32766, 710, - 900, 146, 1212,-32766, 414, 917, 27, 276, 277,-32766, - -32766,-32766,-32766,-32766, 1010,-32766, 891,-32766, 817, 891, - -32766, 281, 1243, 282, 329,-32766,-32766,-32766, 285, -535, - -535,-32766,-32766, 891, 290, 291, 1013,-32766, 414, 271, - 109, 368, 73, 430, -535, 145,-32766, 891, 294, 1326, - -535, 672, -111, -111, 901, 644, 808, -111, -535, 278, - 817, -51, 516, -111, -111, -111, -111, 1095,-32766, 548, - 552, 685, 517, 518, 13, 1233, 1234, 1235, 1236, 1230, - 1231, 665, 301, 48, 708, 9, 649, 1237, 1232, 455, - 483, 903, 308, 131, 903, 692, 650, 72, 692, -4, - 666, 1250, 319, 322,-32766, -583, 919, -583, 953, 304, - 1212, -501, 692, -505, -535, -535, 633,-32766,-32766,-32766, - 39,-32766, 903,-32766, 0,-32766, 692, 434,-32766, -535, - -540,-32766, 933,-32766,-32766,-32766,-32766, 891, 302,-32766, - -32766, 0, 1212, -535, 901,-32766, 414, 299, 300,-32766, - -32766,-32766, 1252,-32766,-32766,-32766, -491,-32766, 7, 16, - -32766, 47, 366, 901, 365,-32766,-32766,-32766,-32766, 558, - 600,-32766,-32766, 816, 1212, -571, 127,-32766, 414, 296, - 1240,-32766,-32766,-32766, 40,-32766,-32766,-32766, 715,-32766, - 716, 836,-32766, 882, -540, -540, 478,-32766,-32766,-32766, - -32766, 977, 954,-32766,-32766, 961, 1212, 565, 951,-32766, - 414, 962, 903,-32766,-32766,-32766, 692,-32766,-32766,-32766, - 880,-32766, 949, -540,-32766, 297, 298, 891, 1069,-32766, - -32766,-32766, 1072, 1073, 1070,-32766,-32766, 1071, 1077, -271, - 828,-32766, 414, -246, -246, -246, 891, 1265, 1283, 368, - -32766, -569, 1317, 638, 125, 1244, -543, -542, -541, 1, - -111, -111, -245, -245, -245, -111, 28, 29, 368, 38, - 877, -111, -111, -111, -111, 42, 46, 71, 75, -111, - -111, 76, 77, 78, -111, 27, 269, -269, 79, 877, - -111, -111, -111, -111, 80, 142, 152, 817,-32766, 156, - 246, 1243, 903, 324, 1212, 350, 692, -246, 351, 352, - 353,-32766,-32766,-32766, 354,-32766, 355,-32766, 356,-32766, - 27, 903,-32766, -268, 357, 692, -245,-32766,-32766,-32766, - 358, 359, 817,-32766,-32766, 360, 1243, 362, 431,-32766, - 414, 545, 33, 18, 19, 20, 21, 23,-32766, 401, - 474, 475, 518, 482, 1233, 1234, 1235, 1236, 1230, 1231, - 485, 486, 487, 488, 492, 493, 1237, 1232, 494, 501, - 563, 679, 1223, 1166, 1241, 1039, 72, 317, 1038, 1019, - 1202, 319, 322, 1015, -273, -103, 322, 518, 17, 1233, - 1234, 1235, 1236, 1230, 1231, 22, 26, 293, 400, 593, - 597, 1237, 1232, 624, 684, 1170, 1218, 1167, 1296, 0, - 364, 72, 693, 1183, 696, 700, 319, 322, 702, 703, - 704, 705, 709, 695, 0, 712, 878, 1321, 1323, 839, - 838, 847, 926, 969, 846, 1322, 925, 927, 924, 1198, - 910, 920, 908, 959, 960, 1320, 1277, 1266, 1284, 1290, - 1293 + 118, 119, 120, 121, 122, 735, 734, 453, 454, 455, + 130, 900, 717, 735, 734, -543, 826, 143, 912, 1328, + 900, 158, 700, -153, 670, 671, 948, 949, 900, 149, + 402, 950, 373, 374, 1138, 1140, -545, 945, 378, 379, + 642, 643,-32766, 159, 160, -540, 27, 161, 1226, 461, + 462, -85, -79, -75, -73,-32766,-32766,-32766, 826,-32766, + 140,-32766, 1257,-32766, 322, 900,-32766, 47, -72, 1022, + -71,-32766,-32766,-32766, -4, 910, -70,-32766,-32766, -543, + -543, 35, 248,-32766, 414, -69, 912, -68, -67, -66, + 700, 1025,-32766, -47, -543, 965, 735, 734, 1219, 700, + -545, -545, -540, 912, -18, -301, 48, 700, -543, -540, + -540, 147, 522, 523, 279, 1247, 1248, 1249, 1250, 1244, + 1245, 270, 73, -588, -540, -588, 280, 1251, 1246, -545, + 716, 297, 298,-32766, 719, 909, 146, 72, -540, 1226, + 912, -297, 319, 322, 700, 277,-32766,-32766,-32766, 278, + -32766, 281,-32766, 282,-32766, 328, 284,-32766, 900, 285, + 125, 290,-32766,-32766,-32766, 291, -540, -540,-32766,-32766, + 299, 300, -51, 926,-32766, 414, 109, 680, 271, 145, + 370, -540, 430,-32766, 826, 368,-32766, 294, 817, 693, + 673, 948, 949, 1107, 657, -540, 517, 553, 1340, 127, + 640, 521, 944, -111, -111, -111, 131, 652, 304, 434, + 13, 301, 557,-32766, 308,-32766, 302, 1264, 1266, 563, + 606, 1226, 458, 487, 9, 1254, -506, 658,-32766,-32766, + -32766, 674,-32766, 912,-32766, -496,-32766, 700, -4,-32766, + 7, 16, 367, 928,-32766,-32766,-32766, 39, 33,-32766, + -32766,-32766, 910, 0, 0, 1226,-32766, 414, 0, 0, + 0, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, + -32766, 0, 0,-32766, 0, 0, 0, 0,-32766,-32766, + -32766,-32766, 0, 0,-32766,-32766, 0, 1226, 825, 40, + -32766, 414, 910, 724,-32766,-32766,-32766, 296,-32766,-32766, + -32766, 725,-32766, 845, 891,-32766, 989, 966, 973, 482, + -32766,-32766,-32766,-32766, 963, 974,-32766,-32766, 889, 1226, + 570, 961,-32766, 414, 1081, 1084,-32766,-32766,-32766, 1085, + -32766,-32766,-32766, 1082,-32766, 900, 1083,-32766, 1089, -576, + 837, 1279,-32766,-32766,-32766, 1297, 1331, 645,-32766,-32766, + -574, -249, -249, -249,-32766, 414, -548, 370, -547, -546, + 27, 269, -490,-32766, 1, 28, 29, 38, 948, 949, + 42, 46, 826, 517, 71, 900, 1257, 75, 886, 944, + -111, -111, -111, 76, 77, 78, 79, 80, 142, 152, + 156, -248, -248, -248, 244, 324, 352, 370, 353, 354, + 721, 355, 356, 357, 358, 359, 360, 361, 948, 949, + 912, 362, 1219, 517, 700, -249, 364, 431, 886, 944, + -111, -111, -111, 550, 317, -274, -272, 523, 27, 1247, + 1248, 1249, 1250, 1244, 1245, -271, 18, 19, 20, 21, + 826, 1251, 1246, 23, 1257, 401,-32766, 478, 479, 486, + 912, 72, 1226, 887, 700, -248, 319, 322, 489,-32766, + -32766,-32766, 490,-32766, 491,-32766, 492,-32766, 496, 497, + -32766, 498, 505, 568, 687,-32766,-32766,-32766, 1237, 1178, + 1219,-32766,-32766, 1255, 1051, 1050, 1031,-32766, 414, 1214, + 1027, -276, -103, 17, 22, 523,-32766, 1247, 1248, 1249, + 1250, 1244, 1245, 26, 293, 400, 599, 603, 631, 1251, + 1246, 692, 1182, 1232, 1179, 1310, 0, 366, 701, 72, + 704, -510, 708, 709, 319, 322, 711, 712, 713, 714, + 718, 703, 0, 1335, 1337, 848, 0, 847, 856, 938, + 981, 855, 1336, 937, 935, 936, 939, 1210, 919, 929, + 917, 971, 972, 1334, 1291, 1280, 1298, 1304, 1307, 0, + 1195, 0, 1258, 0, 322 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 9, 10, 11, 1, 9, 10, 11, 128, - 129, 130, 131, 80, 44, 45, 46, 47, 48, 49, - 50, 116, 14, 30, 8, 37, 38, 30, 8, 32, + 12, 13, 9, 10, 11, 31, 9, 10, 11, 9, + 10, 11, 1, 80, 44, 45, 46, 47, 48, 49, + 50, 116, 1, 30, 1, 37, 38, 30, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 1, 1, 138, 8, 57, 9, 10, 11, 116, + 43, 1, 106, 138, 108, 57, 9, 10, 11, 116, 117, 118, 119, 120, 121, 122, 8, 8, 80, 71, 72, 73, 74, 75, 76, 77, 161, 30, 80, 32, - 33, 34, 35, 36, 8, 87, 88, 89, 90, 91, + 33, 34, 35, 36, 1, 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, 82, 8, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 1, 156, 9, 10, 11, 150, 151, + 142, 143, 144, 159, 156, 9, 10, 11, 150, 151, 152, 163, 154, 8, 2, 3, 4, 5, 6, 7, 162, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 9, 10, 11, 128, 8, - 162, 9, 10, 11, 106, 31, 108, 137, 162, 37, - 38, 52, 9, 10, 11, 1, 30, 14, 32, 33, - 34, 35, 30, 8, 32, 33, 34, 1, 158, 57, - 159, 161, 51, 52, 53, 54, 55, 167, 57, 80, + 97, 9, 10, 11, 163, 8, 1, 137, 167, 37, + 38, 52, 159, 8, 163, 106, 30, 108, 32, 33, + 34, 35, 30, 1, 32, 33, 34, 1, 158, 57, + 8, 161, 51, 52, 53, 54, 55, 167, 57, 80, 162, 162, 83, 71, 72, 73, 74, 75, 76, 77, - 69, 31, 80, 155, 9, 10, 11, 9, 10, 87, + 69, 31, 80, 9, 10, 11, 85, 80, 14, 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, 80, 1, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 97, 9, 10, - 11, 8, 150, 151, 152, 163, 154, 2, 3, 4, - 5, 6, 7, 159, 9, 10, 11, 12, 13, 30, + 128, 129, 130, 131, 132, 133, 80, 162, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 146, 9, 10, + 11, 159, 150, 151, 152, 163, 154, 2, 3, 4, + 5, 6, 7, 156, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 116, 57, 116, 117, 118, - 119, 120, 121, 122, 117, 118, 159, 163, 69, 122, - 163, 167, 57, 9, 10, 11, 8, 138, 30, 163, - 1, 31, 8, 167, 80, 8, 71, 72, 73, 74, - 75, 76, 77, 97, 30, 80, 32, 33, 70, 80, - 161, 8, 87, 88, 89, 90, 91, 92, 93, 94, + 51, 52, 53, 54, 55, 160, 57, 162, 8, 106, + 107, 116, 117, 118, 119, 120, 121, 122, 69, 116, + 117, 118, 57, 163, 30, 122, 9, 10, 11, 163, + 1, 128, 9, 167, 106, 107, 71, 72, 73, 74, + 75, 76, 77, 8, 116, 80, 8, 30, 70, 32, + 33, 8, 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, 9, - 85, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 156, 116, 134, 135, 116, 150, 151, 152, 2, 3, - 4, 5, 6, 7, 155, 156, 157, 149, 12, 13, - 101, 15, 137, 164, 1, 106, 138, 108, 30, 161, - 8, 163, 113, 106, 107, 116, 117, 118, 119, 120, - 121, 122, 123, 116, 1, 106, 107, 8, 1, 161, - 8, 146, 1, 163, 31, 116, 1, 51, 52, 101, - 14, 70, 56, 8, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 8, 70, 71, 72, 73, - 74, 123, 31, 164, 78, 79, 80, 106, 82, 108, - 8, 70, 86, 87, 88, 89, 106, 91, 108, 93, - 1, 95, 37, 38, 98, 99, 1, 84, 14, 103, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 14, + 31, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 116, 116, 134, 135, 122, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 80, 8, 122, 149, 12, 13, + 101, 15, 138, 138, 1, 106, 14, 108, 30, 161, + 116, 163, 113, 9, 10, 116, 117, 118, 119, 120, + 121, 122, 123, 161, 1, 161, 161, 106, 1, 108, + 8, 137, 1, 101, 31, 161, 97, 51, 52, 116, + 8, 70, 56, 8, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 123, 70, 71, 72, 73, + 74, 138, 31, 164, 78, 79, 80, 8, 82, 155, + 156, 157, 86, 87, 88, 89, 155, 91, 164, 93, + 1, 95, 37, 38, 98, 99, 106, 84, 108, 103, 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 14, 80, 134, 135, 84, 1, 82, - 124, 125, 126, 82, 16, 8, 138, 106, 82, 108, - 149, 85, 136, 137, 116, 139, 140, 141, 142, 143, - 144, 145, 161, 14, 163, 134, 135, 151, 152, 161, - 116, 155, 156, 157, 158, 14, 138, 161, 116, 49, - 50, 165, 166, 167, 75, 76, 77, 14, 160, 128, - 162, 137, 159, 84, 137, 70, 163, 82, 137, 90, - 138, 92, 14, 94, 35, 96, 51, 52, 16, 155, - 156, 157, 159, 147, 148, 106, 163, 16, 161, 158, - 75, 76, 161, 16, 167, 16, 117, 118, 167, 1, - 16, 122, 75, 76, 101, 102, 127, 128, 129, 130, + 122, 115, 116, 8, 80, 134, 135, 84, 122, 82, + 124, 125, 126, 82, 116, 8, 138, 162, 1, 160, + 149, 162, 136, 137, 8, 139, 140, 141, 142, 143, + 144, 145, 161, 14, 163, 8, 138, 151, 152, 161, + 116, 155, 156, 157, 158, 49, 50, 161, 1, 75, + 76, 165, 166, 167, 75, 76, 77, 1, 8, 128, + 16, 137, 159, 84, 137, 1, 163, 14, 137, 90, + 31, 92, 14, 94, 1, 96, 51, 52, 31, 155, + 156, 157, 159, 16, 1, 106, 163, 31, 161, 158, + 14, 8, 161, 14, 167, 31, 117, 118, 167, 82, + 16, 122, 1, 30, 14, 70, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 37, 38, 16, 30, 134, - 135, 111, 112, 1, 16, 0, 1, 16, 159, 106, - 107, 31, 163, 164, 149, 31, 1, 31, 163, 37, - 1, 31, 167, 8, 59, 60, 106, 107, 163, 37, - 38, 31, 74, 31, 1, 70, 35, 160, 80, 162, - 31, 31, 31, 37, 38, 87, 88, 89, 31, 91, - 31, 93, 31, 95, 31, 31, 98, 31, 31, 31, - 31, 103, 104, 105, 31, 31, 74, 109, 110, 31, - 31, 31, 80, 115, 116, 38, 70, 35, 35, 87, - 88, 89, 124, 91, 116, 93, 84, 95, 82, 84, - 98, 35, 86, 35, 35, 103, 104, 105, 37, 134, - 135, 109, 110, 84, 37, 37, 138, 115, 116, 57, - 69, 106, 154, 108, 149, 70, 124, 84, 113, 83, - 70, 77, 117, 118, 1, 90, 80, 122, 163, 161, - 82, 31, 127, 128, 129, 130, 131, 82, 85, 85, - 89, 92, 136, 137, 97, 139, 140, 141, 142, 143, - 144, 94, 132, 70, 31, 150, 96, 151, 152, 97, - 97, 159, 132, 31, 159, 163, 100, 161, 163, 164, - 100, 146, 166, 167, 74, 160, 154, 162, 159, 114, - 80, 149, 163, 165, 134, 135, 113, 87, 88, 89, - 159, 91, 159, 93, -1, 95, 163, 128, 98, 149, - 70, 137, 128, 103, 104, 105, 74, 84, 133, 109, - 110, -1, 80, 163, 1, 115, 116, 134, 135, 87, - 88, 89, 146, 91, 124, 93, 149, 95, 149, 149, - 98, 70, 149, 1, 149, 103, 104, 105, 74, 153, - 153, 109, 110, 155, 80, 161, 163, 115, 116, 158, - 160, 87, 88, 89, 159, 91, 124, 93, 159, 95, - 159, 159, 98, 159, 134, 135, 102, 103, 104, 105, - 74, 159, 159, 109, 110, 159, 80, 81, 159, 115, - 116, 159, 159, 87, 88, 89, 163, 91, 124, 93, - 159, 95, 159, 163, 98, 134, 135, 84, 159, 103, - 104, 105, 159, 159, 159, 109, 110, 159, 159, 162, - 160, 115, 116, 100, 101, 102, 84, 160, 160, 106, - 124, 161, 160, 160, 163, 166, 161, 161, 161, 161, - 117, 118, 100, 101, 102, 122, 161, 161, 106, 161, - 127, 128, 129, 130, 131, 161, 161, 161, 161, 117, - 118, 161, 161, 161, 122, 70, 71, 162, 161, 127, - 128, 129, 130, 131, 161, 161, 161, 82, 74, 161, - 161, 86, 159, 161, 80, 161, 163, 164, 161, 161, - 161, 87, 88, 89, 161, 91, 161, 93, 161, 95, - 70, 159, 98, 162, 161, 163, 164, 103, 104, 105, - 161, 161, 82, 109, 110, 161, 86, 161, 161, 115, - 116, 161, 163, 162, 162, 162, 162, 162, 124, 162, - 162, 162, 137, 162, 139, 140, 141, 142, 143, 144, - 162, 162, 162, 162, 162, 162, 151, 152, 162, 162, - 162, 162, 162, 162, 162, 162, 161, 163, 162, 162, - 162, 166, 167, 162, 162, 162, 167, 137, 162, 139, + 25, 26, 27, 28, 29, 37, 38, 129, 130, 131, + 16, 84, 31, 37, 38, 70, 82, 16, 159, 85, + 84, 16, 163, 164, 75, 76, 117, 118, 84, 101, + 102, 122, 106, 107, 59, 60, 70, 128, 106, 107, + 111, 112, 74, 16, 16, 70, 70, 16, 80, 134, + 135, 31, 31, 31, 31, 87, 88, 89, 82, 91, + 163, 93, 86, 95, 167, 84, 98, 70, 31, 116, + 31, 103, 104, 105, 0, 1, 31, 109, 110, 134, + 135, 147, 148, 115, 116, 31, 159, 31, 31, 31, + 163, 138, 124, 31, 149, 159, 37, 38, 122, 163, + 134, 135, 70, 159, 31, 35, 70, 163, 163, 134, + 135, 31, 136, 137, 161, 139, 140, 141, 142, 143, + 144, 31, 154, 160, 149, 162, 31, 151, 152, 163, + 31, 134, 135, 74, 31, 31, 31, 161, 163, 80, + 159, 35, 166, 167, 163, 35, 87, 88, 89, 35, + 91, 35, 93, 35, 95, 35, 37, 98, 84, 37, + 163, 37, 103, 104, 105, 37, 134, 135, 109, 110, + 134, 135, 31, 38, 115, 116, 69, 77, 57, 70, + 106, 149, 108, 124, 82, 149, 85, 113, 80, 92, + 94, 117, 118, 82, 96, 163, 122, 85, 83, 163, + 113, 127, 128, 129, 130, 131, 31, 90, 114, 128, + 97, 132, 89, 137, 132, 74, 133, 146, 146, 153, + 153, 80, 97, 97, 150, 160, 149, 100, 87, 88, + 89, 100, 91, 159, 93, 149, 95, 163, 164, 98, + 149, 149, 149, 154, 103, 104, 105, 159, 163, 74, + 109, 110, 1, -1, -1, 80, 115, 116, -1, -1, + -1, -1, 87, 88, 89, 124, 91, -1, 93, -1, + 95, -1, -1, 98, -1, -1, -1, -1, 103, 104, + 105, 74, -1, -1, 109, 110, -1, 80, 155, 159, + 115, 116, 1, 159, 87, 88, 89, 158, 91, 124, + 93, 159, 95, 159, 159, 98, 159, 159, 159, 102, + 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, + 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, + 91, 124, 93, 159, 95, 84, 159, 98, 159, 161, + 160, 160, 103, 104, 105, 160, 160, 160, 109, 110, + 161, 100, 101, 102, 115, 116, 161, 106, 161, 161, + 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, + 161, 161, 82, 122, 161, 84, 86, 161, 127, 128, + 129, 130, 131, 161, 161, 161, 161, 161, 161, 161, + 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, + 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, + 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, + 129, 130, 131, 161, 163, 162, 162, 137, 70, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, - 162, 151, 152, 162, 162, 162, 162, 162, 162, -1, - 163, 161, 163, 165, 163, 163, 166, 167, 163, 163, - 163, 163, 163, 163, -1, 164, 164, 164, 164, 164, + 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, + 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, + 88, 89, 162, 91, 162, 93, 162, 95, 162, 162, + 98, 162, 162, 162, 162, 103, 104, 105, 162, 162, + 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, + 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, + 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, + 152, 162, 162, 162, 162, 162, -1, 163, 163, 161, + 163, 165, 163, 163, 166, 167, 163, 163, 163, 163, + 163, 163, -1, 164, 164, 164, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164 + 164, 164, 164, 164, 164, 164, 164, 164, 164, -1, + 165, -1, 166, -1, 167 ); protected $actionBase = array( - 0, -2, 152, 549, 705, 913, 932, 555, 309, -12, - 848, 305, 305, -57, 305, 305, 305, 702, 733, 733, - 823, 733, 473, 719, 493, 493, 493, 658, 658, 658, - 658, 692, 692, 864, 864, 896, 832, 800, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 994, 994, 994, 994, 994, 994, 994, 994, - 994, 994, 51, 154, 286, 628, 1005, 1013, 1007, 1014, - 1003, 996, 1006, 1008, 1015, 1051, 1052, 740, 1053, 1054, - 1055, 1056, 1011, 863, 1004, 1012, 289, 289, 289, 289, + 0, -2, 152, 549, 764, 941, 981, 587, 384, -12, + 867, 305, 305, -57, 305, 305, 305, 617, 634, 634, + 671, 634, 473, 626, 493, 493, 493, 658, 658, 658, + 658, 749, 749, 897, 897, 929, 865, 831, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 33, -16, 83, 660, 1032, 1040, 1034, 1041, + 1022, 1021, 1033, 1035, 1042, 1079, 1080, 795, 1081, 1082, + 1083, 1084, 1036, 877, 1031, 1039, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 430, 183, 228, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 3, 3, 3, 354, 706, - 706, 172, 166, 985, 665, 47, 1020, 1020, 1020, 1020, - 1020, 1020, 1020, 1020, 1020, 136, 136, 7, 7, 7, + 289, 289, 363, 224, 474, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 3, 3, 3, 666, 666, + 357, 172, 980, 166, 1048, 1048, 1048, 1048, 1048, 1048, + 1048, 1048, 1048, 665, 47, 136, 136, 7, 7, 7, 7, 7, 369, -20, -20, -20, -20, 501, 448, 50, - 668, 497, 408, 431, 570, 338, 229, 229, 502, -109, - 502, -85, -85, 502, 502, 502, 161, 161, 478, 478, - 478, 478, 318, 441, 78, 355, 764, 206, 206, 206, - 206, 764, 764, 764, 764, 776, 859, 764, 764, 764, - 565, 750, 750, 783, 595, 595, 750, 481, 754, 506, - 481, 506, 194, 139, 335, 377, 389, 468, 774, 335, - 830, 861, 715, 577, 788, 603, 788, 993, 753, 724, - 686, 849, 1030, 1016, 766, 1049, 770, 1050, 471, 684, - 992, 992, 992, 992, 992, 992, 992, 992, 992, 992, - 992, 989, 515, 993, 294, 989, 989, 989, 515, 515, - 515, 515, 515, 515, 515, 515, 515, 515, 590, 294, - 585, 597, 294, 759, 515, 51, 777, 51, 51, 51, - 51, 914, 51, 51, 51, 51, 51, 51, 925, 726, - 340, 51, 154, 142, 142, 197, 14, 142, 142, 142, - 142, 51, 51, 51, 603, 752, 786, 620, 787, 59, - 752, 752, 752, 200, 26, 18, 58, 609, 701, 440, - 746, 746, 755, 868, 868, 746, 748, 746, 755, 885, - 746, 868, 791, 125, 472, 312, 367, 489, 868, 171, - 746, 746, 746, 746, 492, 746, 159, 145, 746, 746, - 720, 729, 730, 30, 868, 868, 868, 730, 364, 775, - 775, 775, 799, 801, 773, 728, 293, 195, 532, 76, - 737, 728, 728, 746, 383, 773, 728, 773, 728, 722, - 728, 728, 728, 773, 728, 748, 358, 728, 654, 517, - 46, 728, 6, 886, 887, 680, 890, 878, 891, 947, - 892, 897, 1019, 909, 884, 903, 950, 876, 875, 739, - 568, 632, 779, 732, 867, 741, 741, 741, 865, 741, - 741, 741, 741, 741, 741, 741, 741, 568, 790, 785, - 769, 751, 917, 641, 647, 978, 725, 1032, 718, 1018, - 914, 980, 904, 731, 649, 955, 918, 1031, 984, 919, - 923, 957, 981, 802, 982, 1033, 745, 1034, 1035, 850, - 927, 1021, 741, 886, 897, 884, 903, 876, 875, 723, - 721, 711, 717, 710, 709, 690, 700, 727, 983, 860, - 784, 857, 925, 866, 568, 858, 951, 949, 958, 959, - 1017, 762, 736, 862, 1036, 933, 939, 940, 1022, 986, - 795, 952, 847, 961, 763, 1037, 968, 969, 970, 971, - 1038, 1025, 1026, 1027, 804, 735, 895, 760, 1039, 496, - 756, 758, 768, 946, 544, 912, 1028, 1040, 1041, 972, - 973, 976, 1042, 905, 812, 953, 757, 954, 931, 813, - 816, 559, 767, 987, 742, 743, 761, 589, 601, 1043, - 1044, 1045, 908, 734, 744, 819, 822, 988, 682, 991, - 1046, 613, 831, 681, 1047, 979, 688, 691, 749, 1029, - 780, 765, 747, 944, 738, 833, 1048, 839, 843, 844, - 977, 845, 0, 0, 0, 0, 0, 0, 0, 0, + 643, 497, 402, -54, 566, 334, 243, 335, 335, 468, + 468, -85, -85, 468, 468, 468, 161, 161, 393, 393, + 393, 393, 318, 441, 391, 151, 766, 206, 206, 206, + 206, 766, 766, 766, 766, 762, 1086, 766, 766, 766, + 635, 722, 722, 726, 595, 595, 722, 450, 802, 624, + 450, 624, 21, 139, 364, 599, 268, 429, 364, 656, + 687, 653, 185, 823, 616, 823, 1020, 332, 791, 344, + 752, 712, 869, 1058, 1043, 817, 1077, 821, 1078, 568, + 605, 711, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, + 1019, 1019, 1019, 1087, 515, 1020, 157, 1087, 1087, 1087, + 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, + 619, 157, 544, 639, 157, 810, 515, 33, 776, 33, + 33, 33, 33, 33, 33, 33, 33, 33, 33, 763, + 200, 33, -16, 31, 31, 142, 37, 31, 31, 31, + 31, 33, 33, 33, 616, 811, 756, 622, 757, 125, + 811, 811, 811, 409, 58, 425, 59, 760, 796, 89, + 798, 798, 801, 893, 893, 798, 792, 798, 801, 900, + 798, 798, 893, 893, 829, 177, 565, 457, 505, 577, + 893, 375, 798, 798, 798, 798, 772, 586, 798, 340, + 312, 798, 798, 772, 769, 785, 145, 773, 893, 893, + 893, 772, 502, 773, 773, 773, 824, 832, 777, 780, + 383, 378, 620, 171, 825, 780, 780, 798, 529, 777, + 780, 777, 780, 779, 780, 780, 780, 777, 780, 792, + 492, 780, 695, 597, 159, 780, 6, 903, 906, 609, + 912, 896, 913, 946, 914, 915, 1045, 891, 923, 899, + 916, 952, 895, 894, 794, 614, 637, 781, 767, 888, + 797, 797, 797, 885, 797, 797, 797, 797, 797, 797, + 797, 797, 614, 755, 783, 771, 813, 927, 654, 684, + 1001, 761, 979, 1046, 1085, 925, 1006, 917, 778, 691, + 971, 928, 926, 951, 930, 931, 973, 1007, 834, 1011, + 1059, 799, 1060, 1061, 870, 933, 1047, 797, 903, 915, + 710, 899, 916, 895, 894, 748, 747, 744, 746, 735, + 729, 713, 727, 770, 1012, 879, 868, 871, 932, 887, + 614, 875, 964, 775, 975, 976, 1044, 815, 805, 876, + 1063, 934, 935, 936, 1049, 1013, 1050, 820, 965, 953, + 977, 816, 1064, 986, 990, 992, 994, 1053, 1065, 1054, + 1055, 835, 807, 954, 788, 1066, 462, 806, 808, 818, + 945, 589, 924, 1056, 1067, 1068, 996, 997, 999, 1069, + 1070, 918, 837, 966, 786, 967, 963, 838, 839, 623, + 814, 1014, 800, 804, 812, 628, 646, 1071, 1072, 1073, + 919, 789, 790, 845, 846, 1017, 809, 1018, 1074, 649, + 849, 717, 1075, 1002, 718, 721, 787, 1057, 782, 784, + 803, 940, 793, 852, 1076, 855, 856, 860, 1000, 864, + 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, 456, 456, 456, 456, 456, 456, 305, 305, 305, - 305, 0, 0, 305, 0, 0, 0, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 305, 305, 305, 305, + 0, 0, 305, 0, 0, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, @@ -726,42 +733,42 @@ class Php8 extends \PhpParser\ParserAbstract 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 289, 289, 289, 289, 289, 289, 289, 289, + 456, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 0, 0, 0, 0, + 289, 289, 289, 289, 289, 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, 289, 289, 289, 289, 289, 289, 289, 289, + 0, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 494, - 494, 289, 289, 494, 0, 289, 494, 494, 494, 494, - 494, 494, 494, 494, 494, 289, 289, 289, 289, 289, - 289, 289, 791, 161, 161, 161, 161, 494, 494, 494, - 494, 494, 231, 231, 161, 494, 494, 494, 494, 237, - 494, 494, 494, 494, 494, 494, 0, 0, 494, 494, - 494, 494, 0, 0, 294, 506, 494, 748, 748, 748, - 748, 494, 494, 494, 494, 506, 506, 494, 494, 494, - 0, 0, 0, 0, 161, 161, 0, 294, 506, 0, - 294, 0, 748, 748, 494, 791, 791, 505, 237, 494, - 0, 0, 0, 0, 294, 748, 294, 515, 506, 515, - 515, 142, 51, 505, 573, 573, 573, 573, 0, 603, - 791, 791, 791, 791, 791, 791, 791, 791, 791, 791, - 791, 748, 0, 791, 0, 748, 748, 748, 0, 0, + 289, 289, 289, 289, 289, 289, 289, 494, 494, 289, + 289, 494, 289, 494, 494, 494, 494, 494, 494, 494, + 494, 494, 0, 289, 289, 289, 289, 289, 289, 289, + 289, 829, 161, 161, 161, 161, 494, 494, 494, 494, + 494, 235, 235, 161, 494, 829, 494, 494, 494, 494, + 494, 494, 494, 494, 494, 0, 0, 494, 494, 494, + 494, 0, 0, 157, 624, 494, 792, 792, 792, 792, + 494, 494, 494, 494, 624, 624, 494, 494, 494, 0, + 0, 0, 0, 161, 161, 0, 157, 624, 0, 157, + 0, 792, 792, 494, 0, 829, 202, 494, 0, 0, + 0, 0, 157, 792, 157, 515, 798, 624, 798, 515, + 515, 31, 33, 202, 618, 618, 618, 618, 0, 0, + 616, 829, 829, 829, 829, 829, 829, 829, 829, 829, + 829, 829, 792, 0, 829, 0, 792, 792, 792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 748, 0, 0, 868, 0, 0, 0, - 0, 746, 0, 0, 0, 0, 0, 0, 746, 885, - 0, 0, 0, 0, 0, 0, 748, 0, 0, 0, - 0, 0, 0, 0, 0, 741, 762, 0, 762, 0, - 741, 741, 741, 0, 0, 0, 0, 767, 682 + 0, 0, 0, 0, 792, 0, 0, 893, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 900, 0, + 0, 0, 0, 0, 0, 792, 0, 0, 0, 0, + 0, 0, 0, 0, 797, 815, 0, 815, 0, 797, + 797, 797, 0, 0, 0, 0, 814, 809 ); protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 589, 589, 589, - 589,32767,32767, 250, 103,32767,32767, 465, 382, 382, - 382,32767,32767, 533, 533, 533, 533, 533, 533,32767, - 32767,32767,32767,32767,32767, 465,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 594, 594, 594, + 594,32767,32767, 253, 103,32767,32767, 468, 385, 385, + 385,32767,32767, 538, 538, 538, 538, 538, 538,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,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, @@ -769,152 +776,138 @@ class Php8 extends \PhpParser\ParserAbstract 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, 101,32767, - 32767,32767, 37, 7, 8, 10, 11, 50, 17, 320, + 32767,32767, 37, 7, 8, 10, 11, 50, 17, 323, 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 582,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 587,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 469, 448, 449, 451, - 452, 381, 534, 588, 323, 585, 380, 146, 335, 325, - 238, 326, 254, 470, 255, 471, 474, 475, 211, 283, - 377, 150, 412, 466, 414, 464, 468, 413, 387, 393, - 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, - 404, 405, 385, 386, 467, 445, 444, 443, 410,32767, - 32767, 411, 415,32767, 384, 418,32767,32767,32767,32767, - 32767,32767,32767, 103,32767, 416, 417, 434, 435, 432, - 433, 436,32767, 437, 438, 439, 440,32767, 312,32767, - 32767,32767, 361, 359, 419, 312,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 425, 426,32767,32767, - 32767,32767, 527, 442,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 472, 451, 452, 454, + 455, 384, 539, 593, 326, 590, 383, 146, 338, 328, + 241, 329, 257, 473, 258, 474, 477, 478, 214, 286, + 380, 150, 415, 469, 417, 467, 471, 416, 390, 396, + 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, + 407, 408, 388, 389, 470, 448, 447, 446,32767,32767, + 413, 414,32767, 418,32767,32767,32767,32767,32767,32767, + 32767, 103,32767, 387, 421, 419, 420, 437, 438, 435, + 436, 439,32767, 440, 441, 442, 443,32767, 315,32767, + 32767,32767, 364, 362, 422, 315, 112,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 428, 429,32767,32767, + 32767,32767, 532, 445,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767, 103,32767, 101, - 529, 407, 409, 497, 420, 421, 388,32767, 504,32767, - 103, 506,32767,32767,32767, 112,32767,32767,32767,32767, - 528,32767, 535, 535,32767, 490, 101, 194,32767, 194, - 194,32767,32767,32767,32767,32767,32767,32767, 596, 490, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111,32767, 194, 111,32767,32767,32767, 101, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 189,32767, - 264, 266, 103, 550, 194,32767, 509,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 502, + 534, 410, 412, 502, 423, 424, 391,32767, 509,32767, + 103, 511,32767,32767,32767,32767,32767,32767,32767, 533, + 32767, 540, 540,32767, 495, 101, 194,32767,32767,32767, + 194, 194,32767,32767,32767,32767,32767,32767,32767,32767, + 601, 495, 111, 111, 111, 111, 111, 111, 111, 111, + 111, 111, 111,32767, 194, 111,32767,32767,32767, 101, + 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 189,32767, 267, 269, 103, 555, 194,32767, 514,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 507, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 490, 430, 139,32767, 139, 535, - 422, 423, 424, 492, 535, 535, 535, 308, 285,32767, - 32767,32767,32767, 507, 507, 101, 101, 101, 101, 502, - 32767,32767, 112, 100, 100, 100, 100, 100, 104, 102, - 32767,32767,32767,32767, 100,32767, 102, 102,32767,32767, - 221, 208, 219, 102,32767, 554, 555, 219, 102, 223, - 223, 223, 243, 243, 481, 314, 102, 100, 102, 102, - 196, 314, 314,32767, 102, 481, 314, 481, 314, 198, - 314, 314, 314, 481, 314,32767, 102, 314, 210, 100, - 100, 314,32767,32767,32767, 492,32767,32767,32767,32767, + 32767,32767,32767,32767, 495, 433, 139,32767, 139, 540, + 425, 426, 427, 497, 540, 540, 540, 311, 288,32767, + 32767,32767,32767, 512, 512, 101, 101, 101, 101, 507, + 32767,32767,32767,32767, 112, 100, 100, 100, 100, 100, + 104, 102,32767,32767,32767,32767, 222, 100,32767, 102, + 102,32767,32767, 222, 224, 211, 102, 226,32767, 559, + 560, 222, 102, 226, 226, 226, 246, 246, 484, 317, + 102, 100, 102, 102, 196, 317, 317,32767, 102, 484, + 317, 484, 317, 198, 317, 317, 317, 484, 317,32767, + 102, 317, 213, 100, 100, 317,32767,32767,32767, 497, + 32767,32767,32767,32767,32767,32767,32767, 221,32767,32767, + 32767,32767,32767,32767,32767,32767, 527,32767, 544, 557, + 431, 432, 434, 542, 456, 457, 458, 459, 460, 461, + 462, 464, 589,32767, 501,32767,32767,32767,32767, 337, + 32767, 599,32767, 599,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 522,32767, 539, 552, 428, 429, 431, 537, 453, - 454, 455, 456, 457, 458, 459, 461, 584,32767, 496, - 32767,32767,32767,32767, 334,32767, 594,32767, 594,32767, + 600,32767, 540,32767,32767,32767,32767, 430, 9, 76, + 490, 43, 44, 52, 58, 518, 519, 520, 521, 515, + 516, 522, 517,32767,32767, 523, 565,32767,32767, 541, + 592,32767,32767,32767,32767,32767,32767, 139,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 527, + 32767, 137,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 540,32767,32767,32767,32767, 313, 310, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 595,32767, 535,32767,32767, - 32767,32767, 427, 9, 76, 43, 44, 52, 58, 513, - 514, 515, 516, 510, 511, 517, 512,32767,32767, 518, - 560,32767,32767, 536, 587,32767,32767,32767,32767,32767, - 32767, 139,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 522,32767, 137,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 535,32767,32767,32767, - 32767, 310, 307,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 535,32767, - 32767,32767,32767,32767, 287,32767, 304,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 540,32767,32767,32767, + 32767,32767, 290,32767, 307,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 282,32767,32767, 376,32767,32767,32767, - 32767, 355,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 152, 152, 3, 3, 337, 152, 152, 152, - 337, 152, 337, 337, 337, 152, 152, 152, 152, 152, - 152, 276, 184, 258, 261, 243, 243, 152, 347, 152 + 32767, 285,32767,32767, 379,32767,32767,32767,32767, 358, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 152, 152, 3, 3, 340, 152, 152, 152, 340, 340, + 152, 340, 340, 340, 152, 152, 152, 152, 152, 152, + 279, 184, 261, 264, 246, 246, 152, 350, 152 ); protected $goto = array( - 194, 194, 680, 425, 648, 1311, 1311, 316, 610, 645, - 419, 311, 312, 332, 567, 424, 333, 426, 626, 1042, - 688, 1311, 325, 325, 325, 325, 165, 165, 165, 165, + 194, 194, 688, 425, 656, 1325, 1325, 316, 1054, 419, + 311, 312, 331, 572, 424, 332, 426, 633, 843, 346, + 696, 1325, 276, 276, 276, 276, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 525, 526, 415, 527, - 529, 530, 531, 532, 533, 534, 535, 536, 1112, 166, + 188, 189, 190, 215, 213, 216, 530, 531, 415, 532, + 534, 535, 536, 537, 538, 539, 540, 541, 1124, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, - 176, 212, 214, 217, 235, 238, 241, 242, 245, 255, + 176, 212, 214, 217, 235, 240, 241, 243, 254, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, - 274, 286, 287, 314, 315, 420, 421, 422, 572, 219, + 274, 286, 287, 314, 315, 420, 421, 422, 577, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1112, 199, 180, + 236, 186, 187, 188, 189, 190, 215, 1124, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 837, 590, 612, 612, 550, 542, 1242, 833, 345, - 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1242, 1083, - 1084, 976, 950, 950, 948, 950, 713, 815, 541, 985, - 980, 830, 830, 834, 391, 542, 550, 559, 560, 398, - 570, 592, 606, 607, 842, 835, 890, 885, 886, 899, - 15, 843, 887, 840, 888, 889, 841, 1192, 922, 811, - 893, 1193, 1196, 923, 1197, 251, 251, 815, 868, 815, - 1063, 1059, 1060, 809, 1260, 1260, 952, 1207, 1260, 1017, - 1016, 1260, 1260, 1260, 1260, 1260, 1260, 1260, 1260, 1260, - 564, 249, 249, 249, 249, 243, 252, 343, 457, 457, - 1300, 1211, 1011, 1211, 1011, 1211, 894, 457, 895, 1011, - 1011, 1011, 1011, 973, 1011, 1011, 1011, 1011, 1011, 1011, - 562, 442, 1011, 1011, 1011, 1011, 442, 418, 442, 601, - 1211, 5, 1208, 6, 387, 1211, 1211, 1211, 1211, 825, - 647, 1211, 1211, 1211, 1292, 1292, 1292, 1292, 830, 348, - 1109, 863, 851, 1047, 1051, 1209, 1268, 1269, 906, 348, - 348, 955, 1161, 907, 279, 279, 279, 279, 428, 1310, - 1310, 432, 348, 348, 653, 348, 668, 1327, 929, 321, - 306, 1006, 1022, 1023, 945, 1310, 1258, 1258, 669, 544, - 1258, 334, 348, 1258, 1258, 1258, 1258, 1258, 1258, 1258, - 1258, 1258, 1313, 466, 1285, 1286, 1092, 867, 850, 442, - 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, - 528, 528, 442, 862, 528, 827, 849, 528, 528, 528, - 528, 528, 528, 528, 528, 528, 855, 1271, 556, 539, - 935, 539, 557, 539, 852, 605, 714, 625, 627, 397, - 646, 346, 347, 995, 670, 674, 987, 678, 686, 983, - 673, 1204, 1282, 467, 1282, 717, 1282, 642, 448, 659, - 660, 661, 864, 946, 946, 946, 946, 543, 554, 448, - 940, 947, 543, 490, 554, 491, 1048, 390, 1020, 1021, - 544, 497, 1294, 1294, 1294, 1294, 1052, 571, 460, 461, - 462, 0, 860, 254, 254, 1318, 1319, 1287, 1288, 403, - 404, 944, 405, 687, 657, 957, 658, 1278, 407, 408, - 409, 1094, 671, 622, 623, 410, 568, 604, 0, 341, - 858, 599, 613, 616, 617, 618, 619, 639, 640, 641, - 690, 471, 0, 911, 1099, 0, 0, 0, 0, 1206, - 609, 0, 0, 0, 0, 992, 1050, 0, 0, 0, - 1280, 1280, 1050, 854, 0, 651, 971, 427, 0, 0, - 0, 848, 0, 0, 427, 389, 393, 551, 591, 595, - 1018, 1018, 0, 1203, 0, 0, 0, 652, 1029, 1025, - 1026, 589, 1076, 0, 691, 677, 677, 0, 498, 683, - 1074, 537, 537, 537, 537, 0, 594, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 272, 0, 0, 0, 0, 540, 0, - 540, 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, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 211, 846, 596, 619, 619, 844, 903, 1256, 904, 1256, + 1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256, 350, 649, + 650, 820, 667, 668, 669, 964, 1274, 1274, 350, 350, + 1274, 818, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, + 1274, 350, 350, 877, 350, 851, 1341, 899, 894, 895, + 908, 852, 896, 849, 897, 898, 850, 549, 344, 902, + 839, 350, 569, 460, 460, 1314, 249, 249, 389, 1075, + 1071, 1072, 460, 1272, 1272, 985, 418, 1272, 607, 1272, + 1272, 1272, 1272, 1272, 1272, 1272, 1272, 1272, 470, 1299, + 1300, 567, 247, 247, 247, 247, 242, 250, 956, 405, + 695, 1225, 1023, 1225, 1023, 1225, 347, 348, 1285, 1023, + 839, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, + 655, 444, 1023, 1023, 1023, 1023, 444, 1121, 444, 681, + 1225, 1173, 473, 555, 547, 1225, 1225, 1225, 1225, 824, + 475, 1225, 1225, 1225, 1306, 1306, 1306, 1306, 605, 620, + 623, 624, 625, 626, 646, 647, 648, 698, 915, 549, + 617, 653, 916, 337, 547, 555, 564, 565, 339, 575, + 598, 612, 613, 349, 349, 349, 349, 432, 824, 15, + 824, 533, 533, 452, 931, 533, 931, 533, 533, 533, + 533, 533, 533, 533, 533, 533, 544, 5, 544, 6, + 544, 595, 1088, 677, 699, 685, 685, 661, 502, 691, + 1086, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 1218, 836, 444, 450, 1324, 1324, 839, 333, + 958, 958, 958, 958, 864, 562, 450, 952, 959, 723, + 632, 634, 1324, 947, 654, 627, 629, 630, 678, 682, + 999, 686, 694, 995, 842, 542, 542, 542, 542, 1327, + 600, 398, 1296, 1007, 1296, 859, 1296, 988, 962, 962, + 960, 962, 722, 861, 546, 997, 992, 548, 559, 611, + 871, 1216, 548, 858, 559, 1095, 1096, 392, 456, 1220, + 1032, 1033, 1308, 1308, 1308, 1308, 1029, 1028, 726, 463, + 576, 464, 465, 252, 252, 869, 321, 306, 1332, 1333, + 1060, 403, 404, 1301, 1302, 873, 665, 1292, 666, 1064, + 407, 408, 409, 471, 679, 920, 1111, 410, 573, 610, + 1106, 342, 615, 0, 867, 0, 0, 969, 1004, 872, + 860, 1059, 1063, 1221, 1222, 494, 863, 495, 659, 983, + 967, 834, 0, 501, 857, 0, 0, 0, 1062, 0, + 0, 0, 1294, 1294, 1062, 427, 1215, 0, 0, 1223, + 1282, 1283, 427, 0, 957, 0, 0, 0, 1030, 1030, + 428, 0, 0, 0, 0, 660, 1041, 1037, 1038, 676, + 941, 0, 0, 1018, 1034, 1035, 1104, 876, 0, 1204, + 933, 0, 0, 1205, 1208, 934, 1209, 391, 394, 556, + 597, 601, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 272, 0, 0, 0, 0, 545, 0, 545, 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, 990, 990 + 0, 0, 0, 0, 0, 0, 1002, 1002 ); protected $gotoCheck = array( - 42, 42, 72, 65, 65, 179, 179, 65, 55, 55, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 125, - 9, 179, 23, 23, 23, 23, 42, 42, 42, 42, + 42, 42, 72, 65, 65, 181, 181, 65, 126, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 26, 96, + 9, 181, 23, 23, 23, 23, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -928,112 +921,97 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 15, 128, 106, 106, 75, 75, 106, 25, 95, - 106, 106, 106, 106, 106, 106, 106, 106, 106, 142, - 142, 25, 25, 25, 25, 25, 25, 12, 25, 25, - 25, 22, 22, 26, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 15, 27, 15, 15, 15, 15, - 75, 15, 15, 15, 15, 15, 15, 78, 78, 7, - 15, 78, 78, 78, 78, 5, 5, 12, 45, 12, - 15, 15, 15, 6, 166, 166, 49, 20, 166, 116, - 116, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 168, 5, 5, 5, 5, 5, 5, 175, 147, 147, - 177, 72, 72, 72, 72, 72, 64, 147, 64, 72, - 72, 72, 72, 101, 72, 72, 72, 72, 72, 72, - 102, 23, 72, 72, 72, 72, 23, 13, 23, 13, - 72, 46, 20, 46, 61, 72, 72, 72, 72, 20, - 63, 72, 72, 72, 9, 9, 9, 9, 22, 14, - 148, 16, 16, 16, 16, 20, 20, 20, 72, 14, - 14, 16, 149, 72, 24, 24, 24, 24, 87, 178, - 178, 111, 14, 14, 118, 14, 87, 14, 87, 165, - 165, 87, 87, 87, 16, 178, 167, 167, 114, 14, - 167, 29, 14, 167, 167, 167, 167, 167, 167, 167, - 167, 167, 178, 172, 172, 172, 16, 16, 35, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 169, 169, 23, 35, 169, 18, 35, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 39, 14, 9, 19, - 90, 19, 48, 19, 37, 9, 48, 48, 48, 28, - 48, 95, 95, 108, 48, 48, 48, 48, 48, 48, - 14, 158, 128, 155, 128, 97, 128, 84, 19, 84, - 84, 84, 41, 19, 19, 19, 19, 9, 9, 19, - 19, 19, 9, 153, 9, 153, 127, 9, 117, 117, - 14, 153, 128, 128, 128, 128, 130, 9, 9, 9, - 9, -1, 9, 5, 5, 9, 9, 174, 174, 80, - 80, 91, 91, 91, 80, 94, 80, 128, 80, 80, - 80, 145, 80, 83, 83, 80, 2, 2, -1, 80, - 9, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 79, 82, -1, 17, 17, -1, -1, -1, -1, 14, - 17, -1, -1, -1, -1, 17, 128, -1, -1, -1, - 128, 128, 128, 17, -1, 17, 17, 115, -1, -1, - -1, 17, -1, -1, 115, 58, 58, 58, 58, 58, - 115, 115, -1, 17, -1, -1, -1, 115, 115, 115, - 115, 8, 8, -1, 8, 8, 8, -1, 8, 8, - 8, 105, 105, 105, 105, -1, 105, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 24, -1, -1, -1, -1, 24, -1, - 24, -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, -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, + 42, 15, 129, 107, 107, 27, 64, 107, 64, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 14, 85, + 85, 7, 85, 85, 85, 49, 168, 168, 14, 14, + 168, 6, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 14, 14, 45, 14, 15, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 14, 177, 15, + 22, 14, 170, 148, 148, 179, 5, 5, 61, 15, + 15, 15, 148, 169, 169, 102, 13, 169, 13, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 174, 174, + 174, 103, 5, 5, 5, 5, 5, 5, 92, 92, + 92, 72, 72, 72, 72, 72, 96, 96, 14, 72, + 22, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 63, 23, 72, 72, 72, 72, 23, 149, 23, 14, + 72, 150, 83, 75, 75, 72, 72, 72, 72, 12, + 83, 72, 72, 72, 9, 9, 9, 9, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 72, 14, + 55, 55, 72, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 75, 24, 24, 24, 24, 112, 12, 75, + 12, 171, 171, 82, 9, 171, 9, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 19, 46, 19, 46, + 19, 8, 8, 115, 8, 8, 8, 119, 8, 8, + 8, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 14, 18, 23, 19, 180, 180, 22, 29, + 19, 19, 19, 19, 39, 48, 19, 19, 19, 48, + 48, 48, 180, 91, 48, 84, 84, 84, 48, 48, + 48, 48, 48, 48, 25, 106, 106, 106, 106, 180, + 106, 28, 129, 109, 129, 35, 129, 25, 25, 25, + 25, 25, 25, 37, 25, 25, 25, 9, 9, 79, + 35, 159, 9, 35, 9, 143, 143, 9, 9, 20, + 118, 118, 129, 129, 129, 129, 117, 117, 98, 9, + 9, 9, 9, 5, 5, 9, 167, 167, 9, 9, + 128, 81, 81, 176, 176, 41, 81, 129, 81, 131, + 81, 81, 81, 156, 81, 17, 17, 81, 2, 2, + 146, 81, 17, -1, 9, -1, -1, 95, 17, 16, + 16, 16, 16, 20, 20, 154, 17, 154, 17, 17, + 16, 20, -1, 154, 17, -1, -1, -1, 129, -1, + -1, -1, 129, 129, 129, 116, 17, -1, -1, 20, + 20, 20, 116, -1, 16, -1, -1, -1, 116, 116, + 88, -1, -1, -1, -1, 116, 116, 116, 116, 88, + 88, -1, -1, 88, 88, 88, 16, 16, -1, 78, + 78, -1, -1, 78, 78, 78, 78, 58, 58, 58, + 58, 58, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 24, -1, -1, -1, -1, 24, -1, 24, -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, 105, 105 + -1, -1, -1, -1, -1, -1, 106, 106 ); protected $gotoBase = array( - 0, 0, -208, 0, 0, 224, 220, 210, 544, 7, - 0, 0, -107, -47, 14, -181, -133, 47, 78, 132, - -149, 0, -134, 19, 321, 164, 189, 201, 75, 57, - 0, 0, 0, 0, 0, 4, 0, 68, 0, 76, - 0, -3, -1, 0, 0, 216, -426, 0, -291, 213, - 0, 0, 0, 0, 0, -31, 0, 0, 491, 0, - 0, 253, 0, 60, 247, -236, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -174, 0, 0, -186, 140, - -12, 0, 34, 13, -273, 0, 0, 58, 0, 0, - 72, 169, 0, 0, 38, -304, 0, 23, 0, 0, - 0, 239, 238, 0, 0, 534, -76, 0, 50, 0, - 0, 56, 0, 0, 70, 259, -37, 167, 46, 0, - 0, 0, 0, 0, 0, 17, 0, 79, 155, 0, - 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, -93, 0, 0, 43, 0, 225, 67, 51, - 0, 0, 0, -42, 0, -11, 0, 0, 59, 0, - 0, 0, 0, 0, 0, 21, -5, 107, 222, 141, - 0, 0, 65, 0, 102, 228, 0, 230, 24, -300, - 0, 0 + 0, 0, -214, 0, 0, 225, 178, 172, 354, 7, + 0, 0, 5, -97, -117, -182, 53, 26, 76, 89, + 61, 0, -56, 19, 330, 410, 14, 161, 88, 95, + 0, 0, 0, 0, 0, 59, 0, 98, 0, 74, + 0, 40, -1, 0, 0, 191, -369, 0, -306, 162, + 0, 0, 0, 0, 0, 281, 0, 0, 523, 0, + 0, 187, 0, 41, 147, -235, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -47, 0, 0, 156, 100, + -45, -14, 67, -171, -68, -529, 0, 0, 270, 0, + 0, 78, -44, 0, 0, 60, -458, 0, 56, 0, + 0, 0, 201, 209, 0, 0, 388, -75, 0, 58, + 0, 0, 62, 0, 0, 84, 257, 179, 169, 79, + 0, 0, 0, 0, 0, 0, 6, 0, 101, 155, + 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 173, 0, 0, 52, 0, 190, 45, + 20, 0, 0, 0, 16, 0, 49, 0, 0, 77, + 0, 0, 0, 0, 0, 0, 0, 148, -52, -5, + 194, 103, 0, 0, -50, 0, 106, 189, 0, 195, + 81, -300, 0, 0 ); protected $gotoDefault = array( - -32768, 502, 721, 4, 722, 915, 798, 807, 587, 519, - 689, 342, 614, 416, 1276, 892, 1098, 569, 826, 1220, - 1228, 449, 829, 326, 711, 874, 875, 876, 394, 379, - 385, 392, 637, 615, 484, 861, 445, 853, 476, 856, - 444, 865, 162, 413, 500, 869, 3, 871, 547, 902, - 380, 879, 381, 664, 881, 553, 883, 884, 388, 395, - 396, 1103, 561, 611, 896, 244, 555, 897, 378, 898, - 905, 383, 386, 675, 456, 495, 489, 406, 1078, 598, - 634, 453, 470, 621, 620, 608, 469, 1014, 411, 328, - 934, 942, 477, 454, 956, 344, 964, 719, 1111, 628, - 479, 972, 629, 979, 982, 520, 521, 468, 994, 268, - 997, 480, 1035, 654, 1008, 1009, 655, 630, 1031, 631, - 656, 632, 1033, 463, 588, 1041, 446, 1049, 1264, 447, - 1053, 262, 1056, 275, 412, 429, 1061, 1062, 8, 1068, - 681, 682, 10, 273, 499, 1093, 676, 443, 1110, 433, - 1180, 1182, 549, 481, 1200, 1199, 667, 496, 1205, 1267, - 441, 522, 464, 313, 523, 305, 330, 310, 538, 292, - 331, 524, 465, 1273, 1281, 327, 30, 1301, 1312, 338, - 566, 603 + -32768, 506, 730, 4, 731, 924, 807, 816, 593, 524, + 697, 343, 621, 416, 1290, 901, 1110, 574, 835, 1234, + 1242, 451, 838, 326, 720, 883, 884, 885, 395, 381, + 387, 393, 644, 622, 488, 870, 447, 862, 480, 865, + 446, 874, 162, 413, 504, 878, 3, 880, 552, 911, + 382, 888, 383, 672, 890, 558, 892, 893, 390, 396, + 397, 1115, 566, 618, 905, 253, 560, 906, 380, 907, + 914, 385, 388, 683, 459, 499, 493, 406, 1090, 561, + 604, 641, 441, 467, 616, 628, 614, 474, 1026, 411, + 325, 946, 954, 481, 457, 968, 345, 976, 728, 1123, + 635, 483, 984, 636, 991, 994, 525, 526, 472, 1006, + 268, 1009, 484, 1047, 662, 1020, 1021, 663, 637, 1043, + 638, 664, 639, 1045, 466, 594, 1053, 448, 1061, 1278, + 449, 1065, 262, 1068, 275, 412, 429, 1073, 1074, 8, + 1080, 689, 690, 10, 273, 503, 1105, 684, 445, 1122, + 433, 1192, 1194, 554, 485, 1212, 1211, 675, 500, 1217, + 442, 1281, 443, 527, 468, 313, 528, 305, 329, 310, + 543, 292, 330, 529, 469, 1287, 1295, 327, 30, 1315, + 1326, 338, 571, 609 ); protected $ruleToNonTerminal = array( @@ -1057,25 +1035,26 @@ class Php8 extends \PhpParser\ParserAbstract 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, - 78, 78, 26, 26, 27, 27, 27, 27, 86, 86, - 88, 88, 81, 81, 89, 89, 90, 90, 90, 82, - 82, 85, 85, 83, 83, 91, 92, 92, 56, 56, - 64, 64, 67, 67, 67, 66, 93, 93, 94, 57, - 57, 57, 57, 95, 95, 96, 96, 97, 97, 98, - 99, 99, 100, 100, 101, 101, 54, 54, 50, 50, - 103, 52, 52, 104, 51, 51, 53, 53, 63, 63, - 63, 63, 79, 79, 107, 107, 109, 109, 110, 110, - 110, 110, 108, 108, 108, 112, 112, 112, 112, 87, - 87, 115, 115, 115, 116, 116, 113, 113, 117, 117, - 119, 119, 120, 120, 114, 121, 121, 118, 122, 122, - 122, 122, 111, 111, 80, 80, 80, 20, 20, 20, - 124, 123, 123, 125, 125, 125, 125, 59, 126, 126, - 127, 60, 129, 129, 130, 130, 131, 131, 84, 132, - 132, 132, 132, 132, 132, 137, 137, 138, 138, 139, - 139, 139, 139, 139, 140, 141, 141, 136, 136, 133, - 133, 135, 135, 143, 143, 142, 142, 142, 142, 142, - 142, 142, 134, 144, 144, 146, 145, 145, 61, 102, - 147, 147, 55, 55, 42, 42, 42, 42, 42, 42, + 78, 78, 79, 79, 26, 26, 27, 27, 27, 27, + 27, 87, 87, 89, 89, 82, 82, 90, 90, 91, + 91, 91, 83, 83, 86, 86, 84, 84, 92, 93, + 93, 56, 56, 64, 64, 67, 67, 67, 66, 94, + 94, 95, 57, 57, 57, 57, 96, 96, 97, 97, + 98, 98, 99, 100, 100, 101, 101, 102, 102, 54, + 54, 50, 50, 104, 52, 52, 105, 51, 51, 53, + 53, 63, 63, 63, 63, 80, 80, 108, 108, 110, + 110, 111, 111, 111, 111, 109, 109, 109, 113, 113, + 113, 113, 88, 88, 116, 116, 116, 117, 117, 114, + 114, 118, 118, 120, 120, 121, 121, 115, 122, 122, + 119, 123, 123, 123, 123, 112, 112, 81, 81, 81, + 20, 20, 20, 125, 124, 124, 126, 126, 126, 126, + 59, 127, 127, 128, 60, 130, 130, 131, 131, 132, + 132, 85, 133, 133, 133, 133, 133, 133, 138, 138, + 139, 139, 140, 140, 140, 140, 140, 141, 142, 142, + 137, 137, 134, 134, 136, 136, 144, 144, 143, 143, + 143, 143, 143, 143, 143, 135, 145, 145, 147, 146, + 146, 61, 103, 148, 148, 55, 55, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1084,20 +1063,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 154, 148, - 148, 153, 153, 156, 157, 157, 158, 159, 159, 159, - 19, 19, 72, 72, 72, 72, 149, 149, 149, 149, - 161, 161, 150, 150, 152, 152, 152, 155, 155, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 167, 167, - 106, 169, 169, 169, 169, 151, 151, 151, 151, 151, - 151, 151, 151, 58, 58, 164, 164, 164, 164, 170, - 170, 160, 160, 160, 171, 171, 171, 171, 171, 171, - 73, 73, 65, 65, 65, 65, 128, 128, 128, 128, - 174, 173, 163, 163, 163, 163, 163, 163, 163, 162, - 162, 162, 172, 172, 172, 172, 105, 168, 176, 176, - 175, 175, 177, 177, 177, 177, 177, 177, 177, 177, - 165, 165, 165, 165, 179, 180, 178, 178, 178, 178, - 178, 178, 178, 178, 181, 181, 181, 181 + 42, 155, 149, 149, 154, 154, 157, 158, 158, 159, + 160, 161, 161, 161, 161, 19, 19, 72, 72, 72, + 72, 150, 150, 150, 150, 163, 163, 151, 151, 153, + 153, 153, 156, 156, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 169, 169, 107, 171, 171, 171, 171, + 152, 152, 152, 152, 152, 152, 152, 152, 58, 58, + 166, 166, 166, 166, 172, 172, 162, 162, 162, 173, + 173, 173, 173, 173, 173, 73, 73, 65, 65, 65, + 65, 129, 129, 129, 129, 176, 175, 165, 165, 165, + 165, 165, 165, 165, 164, 164, 164, 174, 174, 174, + 174, 106, 170, 178, 178, 177, 177, 179, 179, 179, + 179, 179, 179, 179, 179, 167, 167, 167, 167, 181, + 182, 180, 180, 180, 180, 180, 180, 180, 180, 183, + 183, 183, 183 ); protected $ruleToLength = array( @@ -1121,47 +1100,48 @@ class Php8 extends \PhpParser\ParserAbstract 3, 1, 2, 5, 7, 9, 6, 5, 6, 3, 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, - 3, 1, 8, 9, 8, 7, 6, 8, 0, 2, - 0, 2, 1, 2, 1, 2, 1, 1, 1, 0, - 2, 0, 2, 0, 2, 2, 1, 3, 1, 4, - 1, 4, 1, 1, 4, 2, 1, 3, 3, 3, - 4, 4, 5, 0, 2, 4, 3, 1, 1, 7, - 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, - 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, - 1, 1, 2, 0, 1, 3, 0, 2, 1, 1, - 1, 1, 6, 8, 6, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, - 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, - 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, - 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, - 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, - 5, 10, 3, 5, 1, 1, 3, 0, 2, 4, - 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 2, 1, 3, 1, 1, 3, 2, 2, - 3, 1, 0, 1, 1, 3, 3, 3, 4, 4, - 1, 1, 2, 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, 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, 2, - 8, 9, 8, 9, 9, 10, 9, 10, 8, 3, - 2, 0, 4, 2, 1, 3, 2, 2, 2, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, + 3, 1, 1, 1, 8, 9, 7, 8, 7, 6, + 8, 0, 2, 0, 2, 1, 2, 1, 2, 1, + 1, 1, 0, 2, 0, 2, 0, 2, 2, 1, + 3, 1, 4, 1, 4, 1, 1, 4, 2, 1, + 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, + 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, + 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, + 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, + 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, - 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, - 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, - 1, 1, 3, 1, 1, 4, 4, 1, 4, 4, - 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, - 1, 3, 1, 4, 4, 3, 3, 3, 3, 1, - 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, - 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, - 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, - 3, 3, 6, 3, 1, 1, 2, 1 + 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, + 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, + 2, 4, 3, 1, 1, 3, 1, 2, 2, 3, + 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, + 0, 1, 5, 5, 10, 3, 5, 1, 1, 3, + 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, + 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, + 3, 2, 2, 3, 1, 0, 1, 1, 3, 3, + 3, 4, 4, 1, 1, 2, 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, 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, 2, 8, 9, 8, 9, 9, 10, 9, + 10, 8, 3, 2, 0, 4, 2, 1, 3, 2, + 1, 2, 2, 2, 4, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 0, 3, 0, + 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 3, 3, 4, 1, 1, 3, + 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, + 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, + 4, 4, 1, 4, 4, 0, 1, 1, 1, 3, + 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, + 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, + 1, 4, 1, 1, 1, 3, 1, 1, 2, 1, + 3, 4, 3, 2, 0, 2, 2, 1, 2, 1, + 1, 1, 4, 3, 3, 3, 3, 6, 3, 1, + 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1798,184 +1778,185 @@ protected function initReduceCallbacks(): void { $this->semValue = []; }, 202 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 203 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 204 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - $this->checkClass($this->semValue, $stackPos-(8-3)); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 205 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - $this->checkInterface($this->semValue, $stackPos-(7-3)); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 206 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->checkClass($this->semValue, $stackPos-(7-2)); }, 207 => function ($stackPos) { - $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - $this->checkEnum($this->semValue, $stackPos-(8-3)); + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->checkClass($this->semValue, $stackPos-(8-3)); }, 208 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->checkInterface($this->semValue, $stackPos-(7-3)); }, 209 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 210 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->checkEnum($this->semValue, $stackPos-(8-3)); }, 211 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 212 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = null; }, 214 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 215 => function ($stackPos) { - $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = 0; }, 216 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 217 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 218 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 219 => function ($stackPos) { - $this->semValue = null; + $this->semValue = Modifiers::ABSTRACT; }, 220 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = Modifiers::FINAL; }, 221 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = Modifiers::READONLY; }, 222 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 223 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 224 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 225 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 226 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 227 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 228 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 229 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 230 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 231 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 232 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 233 => function ($stackPos) { - $this->semValue = null; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 234 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 236 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = null; }, 237 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 238 => function ($stackPos) { - $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 239 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 240 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 241 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 242 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 243 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 244 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 245 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(5-3)]; }, 246 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array(); }, 247 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 248 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 249 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 250 => function ($stackPos) { - $this->semValue = []; + $this->semValue = $this->semStack[$stackPos]; }, 251 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 252 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 253 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = []; }, 254 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 255 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 256 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 257 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 258 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 259 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 260 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 261 => function ($stackPos) { $this->semValue = array(); @@ -1984,132 +1965,132 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 263 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 264 => function ($stackPos) { - $this->semValue = null; + $this->semValue = array(); }, 265 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 266 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 267 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = null; }, 268 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 269 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = null; }, 270 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 271 => function ($stackPos) { - $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 272 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 273 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 274 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, 275 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 276 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = array(); }, 277 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 278 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 279 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + $this->semValue = 0; }, 280 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 281 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->semValue = Modifiers::PUBLIC; }, 282 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); + $this->semValue = Modifiers::PROTECTED; }, 283 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); - $this->checkParam($this->semValue); + $this->semValue = Modifiers::PRIVATE; }, 284 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = Modifiers::READONLY; }, 285 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->checkParam($this->semValue); }, 286 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->checkParam($this->semValue); }, 287 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, 288 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 289 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 290 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 291 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 292 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 293 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 294 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 295 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 296 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 297 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 298 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 299 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 300 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 301 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 302 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 303 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 304 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 305 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -2121,714 +2102,714 @@ protected function initReduceCallbacks(): void { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 308 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 309 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 310 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 311 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 312 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 313 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 314 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 315 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 316 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 317 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 318 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 319 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); + $this->semValue = null; }, 320 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 321 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 322 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, 323 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 325 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 326 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 327 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 328 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 329 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 330 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 331 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 332 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 333 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 334 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 335 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 336 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 337 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 338 => function ($stackPos) { + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 339 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + }, + 340 => function ($stackPos) { + $this->semValue = array(); + }, + 341 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 339 => function ($stackPos) { + 342 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 340 => function ($stackPos) { + 343 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 341 => function ($stackPos) { + 344 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, - 342 => function ($stackPos) { + 345 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 343 => function ($stackPos) { + 346 => function ($stackPos) { $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 344 => function ($stackPos) { + 347 => function ($stackPos) { $this->semValue = null; /* will be skipped */ }, - 345 => function ($stackPos) { + 348 => function ($stackPos) { $this->semValue = array(); }, - 346 => function ($stackPos) { + 349 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 347 => function ($stackPos) { + 350 => function ($stackPos) { $this->semValue = array(); }, - 348 => function ($stackPos) { + 351 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 349 => function ($stackPos) { + 352 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 350 => function ($stackPos) { + 353 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 351 => function ($stackPos) { + 354 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 352 => function ($stackPos) { + 355 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 353 => function ($stackPos) { + 356 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 354 => function ($stackPos) { + 357 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 355 => function ($stackPos) { + 358 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 356 => function ($stackPos) { + 359 => function ($stackPos) { $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, - 357 => function ($stackPos) { + 360 => function ($stackPos) { $this->semValue = null; }, - 358 => function ($stackPos) { + 361 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 359 => function ($stackPos) { + 362 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 360 => function ($stackPos) { + 363 => function ($stackPos) { $this->semValue = 0; }, - 361 => function ($stackPos) { + 364 => function ($stackPos) { $this->semValue = 0; }, - 362 => function ($stackPos) { + 365 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 363 => function ($stackPos) { + 366 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 364 => function ($stackPos) { + 367 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 365 => function ($stackPos) { + 368 => function ($stackPos) { $this->semValue = Modifiers::PUBLIC; }, - 366 => function ($stackPos) { + 369 => function ($stackPos) { $this->semValue = Modifiers::PROTECTED; }, - 367 => function ($stackPos) { + 370 => function ($stackPos) { $this->semValue = Modifiers::PRIVATE; }, - 368 => function ($stackPos) { + 371 => function ($stackPos) { $this->semValue = Modifiers::STATIC; }, - 369 => function ($stackPos) { + 372 => function ($stackPos) { $this->semValue = Modifiers::ABSTRACT; }, - 370 => function ($stackPos) { + 373 => function ($stackPos) { $this->semValue = Modifiers::FINAL; }, - 371 => function ($stackPos) { + 374 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 372 => function ($stackPos) { + 375 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 373 => function ($stackPos) { + 376 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 374 => function ($stackPos) { + 377 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 375 => function ($stackPos) { + 378 => function ($stackPos) { $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 376 => function ($stackPos) { + 379 => function ($stackPos) { $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 377 => function ($stackPos) { + 380 => function ($stackPos) { $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 378 => function ($stackPos) { + 381 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 379 => function ($stackPos) { + 382 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 380 => function ($stackPos) { + 383 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 381 => function ($stackPos) { + 384 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 382 => function ($stackPos) { + 385 => function ($stackPos) { $this->semValue = array(); }, - 383 => function ($stackPos) { + 386 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 384 => function ($stackPos) { + 387 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 385 => function ($stackPos) { + 388 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 386 => function ($stackPos) { + 389 => function ($stackPos) { $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 387 => function ($stackPos) { + 390 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 388 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 389 => function ($stackPos) { + 392 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); if (!$this->phpVersion->allowsAssignNewByReference()) { $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); } }, - 390 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 391 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 392 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 393 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 394 => function ($stackPos) { + 397 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 395 => function ($stackPos) { + 398 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { + 399 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 397 => function ($stackPos) { + 400 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 398 => function ($stackPos) { + 401 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 399 => function ($stackPos) { + 402 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 400 => function ($stackPos) { + 403 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 401 => function ($stackPos) { + 404 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 402 => function ($stackPos) { + 405 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 403 => function ($stackPos) { + 406 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 404 => function ($stackPos) { + 407 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 405 => function ($stackPos) { + 408 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 406 => function ($stackPos) { + 409 => function ($stackPos) { $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 407 => function ($stackPos) { + 410 => function ($stackPos) { $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 408 => function ($stackPos) { + 411 => function ($stackPos) { $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 409 => function ($stackPos) { + 412 => function ($stackPos) { $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 410 => function ($stackPos) { + 413 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 411 => function ($stackPos) { + 414 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 412 => function ($stackPos) { + 415 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 413 => function ($stackPos) { + 416 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 414 => function ($stackPos) { + 417 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 415 => function ($stackPos) { + 418 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 416 => function ($stackPos) { + 419 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 417 => function ($stackPos) { + 420 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 418 => function ($stackPos) { + 421 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 419 => function ($stackPos) { + 422 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 420 => function ($stackPos) { + 423 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 421 => function ($stackPos) { + 424 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 422 => function ($stackPos) { + 425 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 423 => function ($stackPos) { + 426 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 424 => function ($stackPos) { + 427 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 425 => function ($stackPos) { + 428 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 426 => function ($stackPos) { + 429 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 427 => function ($stackPos) { + 430 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 428 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 429 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 431 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 432 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 441 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 443 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 444 => function ($stackPos) { + 447 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 445 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 446 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 447 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 448 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 452 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 450 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 452 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 456 => function ($stackPos) { $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 457 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 455 => function ($stackPos) { + 458 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 459 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 457 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 458 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 463 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 461 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 462 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 463 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, 464 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 465 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 466 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 467 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 468 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 469 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 470 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 471 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 472 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 473 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 474 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 475 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, 476 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 477 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 478 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 479 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, 480 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 481 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->checkClass($this->semValue[0], -1); }, 482 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 483 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 484 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 485 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 486 => function ($stackPos) { - $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 487 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 488 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 489 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 490 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 491 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 492 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 493 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 494 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 495 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 496 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 497 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 498 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 499 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 500 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 501 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 502 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 503 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 504 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 505 => function ($stackPos) { - $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 506 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 507 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 508 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 509 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 510 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 511 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 512 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array(); }, 513 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 514 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 515 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 516 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 517 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 518 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 519 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 520 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 521 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - $this->createdArrays->attach($this->semValue); + $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 522 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 523 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 524 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, 525 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, 526 => function ($stackPos) { - $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + $this->createdArrays->attach($this->semValue); }, 527 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, 528 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, 530 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 531 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 532 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 533 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 534 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 536 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 537 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 538 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 539 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2837,10 +2818,10 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 543 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2849,196 +2830,211 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 545 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 546 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 548 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 549 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 550 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 551 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 552 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 553 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 554 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 555 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = null; }, 556 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 557 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 558 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 559 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 560 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 561 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 562 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 563 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 565 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 566 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 567 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 568 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 569 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 570 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 571 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 572 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 573 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 574 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 575 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 576 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 577 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 578 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 579 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 580 => function ($stackPos) { + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + }, + 581 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $this->postprocessList($this->semValue); }, - 577 => function ($stackPos) { + 582 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, - 578 => function ($stackPos) { + 583 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 579 => function ($stackPos) { + 584 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, - 580 => function ($stackPos) { + 585 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 581 => function ($stackPos) { + 586 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 582 => function ($stackPos) { + 587 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 583 => function ($stackPos) { + 588 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 584 => function ($stackPos) { + 589 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 585 => function ($stackPos) { + 590 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 586 => function ($stackPos) { + 591 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 587 => function ($stackPos) { + 592 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 588 => function ($stackPos) { + 593 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); }, - 589 => function ($stackPos) { + 594 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 590 => function ($stackPos) { + 595 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 591 => function ($stackPos) { + 596 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 592 => function ($stackPos) { + 597 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 593 => function ($stackPos) { + 598 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, - 594 => function ($stackPos) { + 599 => function ($stackPos) { $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 595 => function ($stackPos) { + 600 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 596 => function ($stackPos) { + 601 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 597 => function ($stackPos) { + 602 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 598 => function ($stackPos) { + 603 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 599 => function ($stackPos) { + 604 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 600 => function ($stackPos) { + 605 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 601 => function ($stackPos) { + 606 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 602 => function ($stackPos) { + 607 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 603 => function ($stackPos) { + 608 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 604 => function ($stackPos) { + 609 => function ($stackPos) { $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 605 => function ($stackPos) { + 610 => function ($stackPos) { $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 606 => function ($stackPos) { + 611 => function ($stackPos) { $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 607 => function ($stackPos) { + 612 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index f41adf9477..14648452d0 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -360,12 +360,12 @@ public function provideTestLexNewFeatures() { ]], ['function readonly(', [ [\T_FUNCTION, 'function'], - [\T_STRING, 'readonly'], + [\T_READONLY, 'readonly'], [ord('('), '('], ]], ['function readonly (', [ [\T_FUNCTION, 'function'], - [\T_STRING, 'readonly'], + [\T_READONLY, 'readonly'], [ord('('), '('], ]], ]; diff --git a/test/code/parser/stmt/function/disjointNormalFormTypes.test b/test/code/parser/stmt/function/disjointNormalFormTypes.test index 264023fe85..39dc261372 100644 --- a/test/code/parser/stmt/function/disjointNormalFormTypes.test +++ b/test/code/parser/stmt/function/disjointNormalFormTypes.test @@ -4,6 +4,7 @@ DNF types class Test { public (A&B)|(X&Y) $prop; + public readonly (A&B)|C $prop2; } function test((A&B)|(X&Y) $a): (A&B)|(X&Y) {} @@ -65,6 +66,42 @@ array( ) ) ) + 1: Stmt_Property( + attrGroups: array( + ) + flags: PUBLIC | READONLY (65) + type: UnionType( + types: array( + 0: IntersectionType( + types: array( + 0: Name( + parts: array( + 0: A + ) + ) + 1: Name( + parts: array( + 0: B + ) + ) + ) + ) + 1: Name( + parts: array( + 0: C + ) + ) + ) + ) + props: array( + 0: PropertyItem( + name: VarLikeIdentifier( + name: prop2 + ) + default: null + ) + ) + ) ) ) 1: Stmt_Function( diff --git a/test/code/parser/stmt/function/readonlyFunction.test b/test/code/parser/stmt/function/readonlyFunction.test new file mode 100644 index 0000000000..c96d483575 --- /dev/null +++ b/test/code/parser/stmt/function/readonlyFunction.test @@ -0,0 +1,32 @@ +readonly function +----- + Date: Sun, 18 Sep 2022 15:33:40 +0200 Subject: [PATCH 185/428] Test PHP 8.2 in CI --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3ce2132935..0d2e36e1e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,7 @@ jobs: - "7.4" - "8.0" - "8.1" + - "8.2" steps: - name: "Checkout" uses: "actions/checkout@v2" From 46558ed9a5dc2abb19eb784d1eebeecd7009b21d Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Mon, 19 Sep 2022 22:10:42 +0700 Subject: [PATCH 186/428] Show missing format preservation when adding static modifier to closure --- test/code/formatPreservation/closure.test | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/code/formatPreservation/closure.test diff --git a/test/code/formatPreservation/closure.test b/test/code/formatPreservation/closure.test new file mode 100644 index 0000000000..1fc2a16f81 --- /dev/null +++ b/test/code/formatPreservation/closure.test @@ -0,0 +1,21 @@ +Closure add static +----- +expr->static = true; +----- + Date: Wed, 21 Sep 2022 18:56:09 +0200 Subject: [PATCH 187/428] Add support for perserving formatting for static modifier change Closes GH-891. --- lib/PhpParser/PrettyPrinter/Standard.php | 4 +- lib/PhpParser/PrettyPrinterAbstract.php | 44 +++++++++---------- .../formatPreservation/arrow_function.test | 9 ++-- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 1f0b9074b9..dbe30a7111 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -632,7 +632,7 @@ protected function pExpr_ShellExec(Expr\ShellExec $node): string { protected function pExpr_Closure(Expr\Closure $node): string { return $this->pAttrGroups($node->attrGroups, true) - . ($node->static ? 'static ' : '') + . $this->pStatic($node->static) . 'function ' . ($node->byRef ? '&' : '') . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') @@ -654,7 +654,7 @@ protected function pMatchArm(Node\MatchArm $node): string { protected function pExpr_ArrowFunction(Expr\ArrowFunction $node): string { return $this->pAttrGroups($node->attrGroups, true) - . ($node->static ? 'static ' : '') + . $this->pStatic($node->static) . 'fn' . ($node->byRef ? '&' : '') . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 643801dd3f..9a513d82a4 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -139,8 +139,9 @@ abstract class PrettyPrinterAbstract { * @var array */ protected $emptyListInsertionMap; - /** @var array Map from "{$class}->{$subNode}" to token before which the modifiers - * should be reprinted. */ + /** @var array Map from "{$class}->{$subNode}" to [$printFn, $token] + * where $printFn is the function to print the modifiers and $token is the token before which + * the modifiers should be reprinted. */ protected $modifierChangeMap; /** @@ -587,23 +588,16 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { continue; } - if (is_int($subNode) && is_int($origSubNode)) { - // Check if this is a modifier change - $key = $class . '->' . $subNodeName; - if (!isset($this->modifierChangeMap[$key])) { - return $this->pFallback($fallbackNode); - } - - $findToken = $this->modifierChangeMap[$key]; - $result .= $this->pModifiers($subNode); - $pos = $this->origTokens->findRight($pos, $findToken); - continue; + // Check if this is a modifier change + $key = $class . '->' . $subNodeName; + if (!isset($this->modifierChangeMap[$key])) { + return $this->pFallback($fallbackNode); } - // If a non-node, non-array subnode changed, we don't be able to do a partial - // reconstructions, as we don't have enough offset information. Pretty print the - // whole node instead. - return $this->pFallback($fallbackNode); + [$printFn, $findToken] = $this->modifierChangeMap[$key]; + $result .= $this->$printFn($subNode); + $pos = $this->origTokens->findRight($pos, $findToken); + continue; } $extraLeft = ''; @@ -1098,6 +1092,10 @@ protected function pModifiers(int $modifiers): string { . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); } + protected function pStatic(bool $static): string { + return $static ? 'static ' : ''; + } + /** * Determine whether a list of nodes uses multiline formatting. * @@ -1520,11 +1518,13 @@ protected function initializeModifierChangeMap(): void { } $this->modifierChangeMap = [ - Stmt\ClassConst::class . '->flags' => \T_CONST, - Stmt\ClassMethod::class . '->flags' => \T_FUNCTION, - Stmt\Class_::class . '->flags' => \T_CLASS, - Stmt\Property::class . '->flags' => \T_VARIABLE, - Param::class . '->flags' => \T_VARIABLE, + Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST], + Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], + Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], + Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], + Param::class . '->flags' => ['pModifiers', \T_VARIABLE], + Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], + Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO ]; diff --git a/test/code/formatPreservation/arrow_function.test b/test/code/formatPreservation/arrow_function.test index eeff36f7bb..0b81e1b2e6 100644 --- a/test/code/formatPreservation/arrow_function.test +++ b/test/code/formatPreservation/arrow_function.test @@ -69,14 +69,17 @@ static fn($a) : int => $a; ----- -// TODO: Format preserving currently not supported $stmts[0]->expr->static = true; $stmts[1]->expr->static = false; ----- $a; +static fn($a) +: int +=> $a; -fn($a): int => $a; +fn($a) +: int +=> $a; ----- Date: Wed, 21 Sep 2022 20:28:52 +0200 Subject: [PATCH 188/428] Add more tests for formatting preservation with InlineHTML It's all broken... --- test/code/formatPreservation/inlineHtml.test | 56 +++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/test/code/formatPreservation/inlineHtml.test b/test/code/formatPreservation/inlineHtml.test index 7494e53597..ae25cc64da 100644 --- a/test/code/formatPreservation/inlineHtml.test +++ b/test/code/formatPreservation/inlineHtml.test @@ -51,4 +51,58 @@ function test() { foo();Barstmts[2]); +----- +Bar +} +----- +Barstmts, 0, 1, []); +----- +Barstmts, 1, 1, []); +----- + Date: Wed, 21 Sep 2022 20:38:21 +0200 Subject: [PATCH 189/428] Bail out on PHP tags in removed code If dropping a node would drop PHP tags, bail out of formatting preservation. This will lose formatting, but at least produce legal code. Closes GH-884. --- lib/PhpParser/Internal/TokenStream.php | 5 ++++ lib/PhpParser/PrettyPrinterAbstract.php | 6 +++-- test/code/formatPreservation/inlineHtml.test | 28 +++++++++++--------- 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index 9fcadcfbdd..824cf7c04e 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -205,6 +205,11 @@ public function haveBracesInRange(int $startPos, int $endPos): bool { || $this->haveTokenInRange($startPos, $endPos, '}'); } + public function haveTagInRange(int $startPos, int $endPos): bool { + return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG) + || $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG); + } + /** * Get indentation before token position. * diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 9a513d82a4..404d0b0107 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -774,7 +774,8 @@ protected function pArray( } if ($skipRemovedNode) { - if ($isStmtList && $this->origTokens->haveBracesInRange($pos, $itemStartPos)) { + if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || + $this->origTokens->haveTagInRange($pos, $itemStartPos))) { // We'd remove the brace of a code block. // TODO: Preserve formatting. $this->setIndentLevel($origIndentLevel); @@ -884,7 +885,8 @@ protected function pArray( $pos, $itemStartPos, $indentAdjustment); $skipRemovedNode = true; } else { - if ($isStmtList && $this->origTokens->haveBracesInRange($pos, $itemStartPos)) { + if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || + $this->origTokens->haveTagInRange($pos, $itemStartPos))) { // We'd remove the brace of a code block. // TODO: Preserve formatting. return null; diff --git a/test/code/formatPreservation/inlineHtml.test b/test/code/formatPreservation/inlineHtml.test index ae25cc64da..0b131fed09 100644 --- a/test/code/formatPreservation/inlineHtml.test +++ b/test/code/formatPreservation/inlineHtml.test @@ -42,13 +42,14 @@ function test() { baz(); } ----- -// TODO Fix broken result +// TODO Preserve formatting $stmts[0]->stmts[1] = $stmts[0]->stmts[2]; ----- stmts[2]); ----- Bar + ?>Barstmts, 0, 1, []); ----- Barstmts, 1, 1, []); ----- Date: Sun, 30 Oct 2022 18:00:30 +0100 Subject: [PATCH 190/428] Add some unit tests for PhpVersion --- test/PhpParser/PhpVersionTest.php | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 test/PhpParser/PhpVersionTest.php diff --git a/test/PhpParser/PhpVersionTest.php b/test/PhpParser/PhpVersionTest.php new file mode 100644 index 0000000000..c5d2abea46 --- /dev/null +++ b/test/PhpParser/PhpVersionTest.php @@ -0,0 +1,41 @@ +assertSame(80200, $version->id); + + $version = PhpVersion::fromString('8.2'); + $this->assertSame(80200, $version->id); + + $version = PhpVersion::fromString('8.2.14'); + $this->assertSame(80200, $version->id); + + $version = PhpVersion::fromString('8.2.14rc1'); + $this->assertSame(80200, $version->id); + } + + public function testInvalidVersion() { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Invalid PHP version "8"'); + PhpVersion::fromString('8'); + } + + public function testEquals() { + $php74 = PhpVersion::fromComponents(7, 4); + $php81 = PhpVersion::fromComponents(8, 1); + $php82 = PhpVersion::fromComponents(8, 2); + $this->assertTrue($php81->equals($php81)); + $this->assertFalse($php81->equals($php82)); + + $this->assertTrue($php81->older($php82)); + $this->assertFalse($php81->older($php81)); + $this->assertFalse($php81->older($php74)); + + $this->assertFalse($php81->newerOrEqual($php82)); + $this->assertTrue($php81->newerOrEqual($php81)); + $this->assertTrue($php81->newerOrEqual($php74)); + } +} From 4ce978126044b868ecfc350c065f6d1703f60db5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 12 Nov 2022 16:15:32 +0100 Subject: [PATCH 191/428] Fix parsing of large hex floats containing "e" These ended up taking the code path for normal floats and being cast to zero. --- lib/PhpParser/Node/Scalar/Float_.php | 18 +++++++----------- test/code/parser/scalar/float.test | 10 ++++++++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/PhpParser/Node/Scalar/Float_.php b/lib/PhpParser/Node/Scalar/Float_.php index 65b5257696..4dffb8c6f2 100644 --- a/lib/PhpParser/Node/Scalar/Float_.php +++ b/lib/PhpParser/Node/Scalar/Float_.php @@ -45,13 +45,7 @@ public static function fromString(string $str, array $attributes = []): Float_ { public static function parse(string $str): float { $str = str_replace('_', '', $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 + // Check whether this is one of the special integer notations. if ('0' === $str[0]) { // hex if ('x' === $str[1] || 'X' === $str[1]) { @@ -63,10 +57,12 @@ public static function parse(string $str): float { 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'))); + // oct, but only if the string does not contain any of '.eE'. + if (false === strpbrk($str, '.eE')) { + // 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 diff --git a/test/code/parser/scalar/float.test b/test/code/parser/scalar/float.test index 54a7b8913e..be8b914dd6 100644 --- a/test/code/parser/scalar/float.test +++ b/test/code/parser/scalar/float.test @@ -17,6 +17,7 @@ Different float syntaxes // (all are actually the same number, just in different representations) 18446744073709551615; 0xFFFFFFFFFFFFFFFF; +0xEEEEEEEEEEEEEEEE; 01777777777777777777777; 0177777777777777777777787; 0b1111111111111111111111111111111111111111111111111111111111111111; @@ -92,7 +93,7 @@ array( ) 12: Stmt_Expression( expr: Scalar_Float( - value: 1.844674407371E+19 + value: 1.7216961135462E+19 ) ) 13: Stmt_Expression( @@ -105,4 +106,9 @@ array( value: 1.844674407371E+19 ) ) -) \ No newline at end of file + 15: Stmt_Expression( + expr: Scalar_Float( + value: 1.844674407371E+19 + ) + ) +) From 950bf8f1d1865cfd0d248e13a3455db0be1d870c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 12 Nov 2022 16:19:15 +0100 Subject: [PATCH 192/428] Adjust tests to work on 32-bit Fixes #662. --- test/PhpParser/Lexer/EmulativeTest.php | 4 ++-- test/code/parser/scalar/numberSeparators.test | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index 14648452d0..15b121d5c6 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -241,8 +241,8 @@ public function provideTestLexNewFeatures() { ['1_000', [ [\T_LNUMBER, '1_000'], ]], - ['0xCAFE_F00D', [ - [\T_LNUMBER, '0xCAFE_F00D'], + ['0x7AFE_F00D', [ + [\T_LNUMBER, '0x7AFE_F00D'], ]], ['0b0101_1111', [ [\T_LNUMBER, '0b0101_1111'], diff --git a/test/code/parser/scalar/numberSeparators.test b/test/code/parser/scalar/numberSeparators.test index 3de89ae6aa..24b2e6709e 100644 --- a/test/code/parser/scalar/numberSeparators.test +++ b/test/code/parser/scalar/numberSeparators.test @@ -4,7 +4,7 @@ Different integer syntaxes 6.674_083e-11; 299_792_458; -0xCAFE_F00D; +0x7AFE_F00D; 0b0101_1111; 0137_041; @@ -42,7 +42,7 @@ array( ) 2: Stmt_Expression( expr: Scalar_Int( - value: 3405705229 + value: 2063527949 ) ) 3: Stmt_Expression( @@ -196,4 +196,4 @@ array( ) ) ) -) \ No newline at end of file +) From 21a3e8cac52b1d3d0ea0e91c34d112cf53716732 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 14 Dec 2022 21:50:11 +0100 Subject: [PATCH 193/428] Fix attrGroups/attributes confusion in EnumCase builder Found by staabm in #907. --- lib/PhpParser/Builder/EnumCase.php | 4 ++-- test/PhpParser/Builder/EnumCaseTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PhpParser/Builder/EnumCase.php b/lib/PhpParser/Builder/EnumCase.php index 70eec65a35..9c92b2831c 100644 --- a/lib/PhpParser/Builder/EnumCase.php +++ b/lib/PhpParser/Builder/EnumCase.php @@ -80,8 +80,8 @@ public function getNode(): PhpParser\Node { return new Stmt\EnumCase( $this->name, $this->value, - $this->attributes, - $this->attributeGroups + $this->attributeGroups, + $this->attributes ); } } diff --git a/test/PhpParser/Builder/EnumCaseTest.php b/test/PhpParser/Builder/EnumCaseTest.php index 437877c44d..66eb10c3dd 100644 --- a/test/PhpParser/Builder/EnumCaseTest.php +++ b/test/PhpParser/Builder/EnumCaseTest.php @@ -26,6 +26,7 @@ public function testDocComment() { new Stmt\EnumCase( "TEST", null, + [], [ 'comments' => [new Comment\Doc('/** Test */')] ] @@ -49,7 +50,6 @@ public function testAddAttribute() { new Stmt\EnumCase( "ATTR_GROUP", null, - [], [$attributeGroup] ), $node From 4c4af21df8dbfaad094d0fdb4748fcf048f95993 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 14 Dec 2022 22:58:37 +0100 Subject: [PATCH 194/428] Rewrote overly magic code to make it readable (#906) New code inspired by https://github.com/nikic/PHP-Parser/blob/950bf8f1d1865cfd0d248e13a3455db0be1d870c/lib/PhpParser/Builder/Trait_.php#L43 --- lib/PhpParser/Builder/Class_.php | 20 +++++++++----------- lib/PhpParser/Builder/Enum_.php | 20 +++++++++----------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/lib/PhpParser/Builder/Class_.php b/lib/PhpParser/Builder/Class_.php index ae6d7bf42f..8d00e4d39f 100644 --- a/lib/PhpParser/Builder/Class_.php +++ b/lib/PhpParser/Builder/Class_.php @@ -111,20 +111,18 @@ public function makeReadonly() { public function addStmt($stmt) { $stmt = BuilderHelpers::normalizeNode($stmt); - $targets = [ - Stmt\TraitUse::class => &$this->uses, - Stmt\ClassConst::class => &$this->constants, - Stmt\Property::class => &$this->properties, - Stmt\ClassMethod::class => &$this->methods, - ]; - - $class = \get_class($stmt); - if (!isset($targets[$class])) { + if ($stmt instanceof Stmt\Property) { + $this->properties[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassMethod) { + $this->methods[] = $stmt; + } elseif ($stmt instanceof Stmt\TraitUse) { + $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; + } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } - $targets[$class][] = $stmt; - return $this; } diff --git a/lib/PhpParser/Builder/Enum_.php b/lib/PhpParser/Builder/Enum_.php index 699320d54e..c9cce99b69 100644 --- a/lib/PhpParser/Builder/Enum_.php +++ b/lib/PhpParser/Builder/Enum_.php @@ -74,20 +74,18 @@ public function implement(...$interfaces) { public function addStmt($stmt) { $stmt = BuilderHelpers::normalizeNode($stmt); - $targets = [ - Stmt\TraitUse::class => &$this->uses, - Stmt\EnumCase::class => &$this->enumCases, - Stmt\ClassConst::class => &$this->constants, - Stmt\ClassMethod::class => &$this->methods, - ]; - - $class = \get_class($stmt); - if (!isset($targets[$class])) { + if ($stmt instanceof Stmt\EnumCase) { + $this->enumCases[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassMethod) { + $this->methods[] = $stmt; + } elseif ($stmt instanceof Stmt\TraitUse) { + $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; + } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } - $targets[$class][] = $stmt; - return $this; } From 8ad412944259c8028993e7708efc796040e890d5 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 14 Dec 2022 22:59:53 +0100 Subject: [PATCH 195/428] Declare list types (#907) Closes #905 --- .github/workflows/main.yml | 21 +++++++++++++++++++++ lib/PhpParser/Builder/ClassConst.php | 4 ++-- lib/PhpParser/Builder/Class_.php | 12 ++++++------ lib/PhpParser/Builder/EnumCase.php | 2 +- lib/PhpParser/Builder/Enum_.php | 12 ++++++------ lib/PhpParser/Builder/Function_.php | 4 ++-- lib/PhpParser/Builder/Interface_.php | 8 ++++---- lib/PhpParser/Builder/Method.php | 4 ++-- lib/PhpParser/Builder/Param.php | 2 +- lib/PhpParser/Builder/Property.php | 2 +- lib/PhpParser/Builder/Trait_.php | 10 +++++----- lib/PhpParser/BuilderFactory.php | 2 +- lib/PhpParser/Lexer.php | 2 +- lib/PhpParser/Lexer/Emulative.php | 2 +- lib/PhpParser/Node/Attribute.php | 4 ++-- lib/PhpParser/Node/MatchArm.php | 4 ++-- lib/PhpParser/Node/Param.php | 2 +- lib/PhpParser/Node/Stmt/ClassConst.php | 2 +- lib/PhpParser/Node/Stmt/EnumCase.php | 2 +- lib/PhpParser/NodeTraverser.php | 2 +- phpstan-baseline.neon | 5 ----- 21 files changed, 62 insertions(+), 46 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d2e36e1e4..c8269e49e1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -85,3 +85,24 @@ jobs: run: "composer update --no-progress --prefer-dist" - name: "Tests" run: "test_old/run-php-src.sh 8.1.6" + phpstan: + runs-on: "ubuntu-latest" + name: "PHP ${{ matrix.php-version }} PHPStan" + strategy: + matrix: + php-version: + - "8.2" + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: "none" + php-version: "${{ matrix.php-version }}" + tools: composer:v2 + - name: "Install dependencies" + run: | + cd tools && composer install + - name: "PHPStan" + run: "php tools/vendor/bin/phpstan" diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index b948652228..de51a91096 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -17,10 +17,10 @@ class ClassConst implements PhpParser\Builder { protected $flags = 0; /** @var array */ protected $attributes = []; - /** @var Const_[] */ + /** @var list */ protected $constants = []; - /** @var Node\AttributeGroup[] */ + /** @var list */ protected $attributeGroups = []; /** diff --git a/lib/PhpParser/Builder/Class_.php b/lib/PhpParser/Builder/Class_.php index 8d00e4d39f..069362aa13 100644 --- a/lib/PhpParser/Builder/Class_.php +++ b/lib/PhpParser/Builder/Class_.php @@ -15,20 +15,20 @@ class Class_ extends Declaration { /** @var Name|null */ protected $extends = null; - /** @var Name[] */ + /** @var list */ protected $implements = []; /** @var int */ protected $flags = 0; - /** @var Stmt\TraitUse[] */ + /** @var list */ protected $uses = []; - /** @var Stmt\ClassConst[] */ + /** @var list */ protected $constants = []; - /** @var Stmt\Property[] */ + /** @var list */ protected $properties = []; - /** @var Stmt\ClassMethod[] */ + /** @var list */ protected $methods = []; - /** @var Node\AttributeGroup[] */ + /** @var list */ protected $attributeGroups = []; /** diff --git a/lib/PhpParser/Builder/EnumCase.php b/lib/PhpParser/Builder/EnumCase.php index 9c92b2831c..9c4633b86c 100644 --- a/lib/PhpParser/Builder/EnumCase.php +++ b/lib/PhpParser/Builder/EnumCase.php @@ -18,7 +18,7 @@ class EnumCase implements PhpParser\Builder { /** @var array */ protected $attributes = []; - /** @var Node\AttributeGroup[] */ + /** @var list */ protected $attributeGroups = []; /** diff --git a/lib/PhpParser/Builder/Enum_.php b/lib/PhpParser/Builder/Enum_.php index c9cce99b69..3335493074 100644 --- a/lib/PhpParser/Builder/Enum_.php +++ b/lib/PhpParser/Builder/Enum_.php @@ -14,17 +14,17 @@ class Enum_ extends Declaration { protected $name; /** @var Identifier|null */ protected $scalarType = null; - /** @var Name[] */ + /** @var list */ protected $implements = []; - /** @var Stmt\TraitUse[] */ + /** @var list */ protected $uses = []; - /** @var Stmt\EnumCase[] */ + /** @var list */ protected $enumCases = []; - /** @var Stmt\ClassConst[] */ + /** @var list */ protected $constants = []; - /** @var Stmt\ClassMethod[] */ + /** @var list */ protected $methods = []; - /** @var Node\AttributeGroup[] */ + /** @var list */ protected $attributeGroups = []; /** diff --git a/lib/PhpParser/Builder/Function_.php b/lib/PhpParser/Builder/Function_.php index dfce765251..db8c3baa5f 100644 --- a/lib/PhpParser/Builder/Function_.php +++ b/lib/PhpParser/Builder/Function_.php @@ -10,10 +10,10 @@ class Function_ extends FunctionLike { /** @var string */ protected $name; - /** @var Stmt[] */ + /** @var list */ protected $stmts = []; - /** @var Node\AttributeGroup[] */ + /** @var list */ protected $attributeGroups = []; /** diff --git a/lib/PhpParser/Builder/Interface_.php b/lib/PhpParser/Builder/Interface_.php index 95c568531e..a28a14d21d 100644 --- a/lib/PhpParser/Builder/Interface_.php +++ b/lib/PhpParser/Builder/Interface_.php @@ -11,13 +11,13 @@ class Interface_ extends Declaration { /** @var string */ protected $name; - /** @var Name[] */ + /** @var list */ protected $extends = []; - /** @var Stmt\ClassConst[] */ + /** @var list */ protected $constants = []; - /** @var Stmt\ClassMethod[] */ + /** @var list */ protected $methods = []; - /** @var Node\AttributeGroup[] */ + /** @var list */ protected $attributeGroups = []; /** diff --git a/lib/PhpParser/Builder/Method.php b/lib/PhpParser/Builder/Method.php index 1a33b4bab0..9f1df4a0ce 100644 --- a/lib/PhpParser/Builder/Method.php +++ b/lib/PhpParser/Builder/Method.php @@ -14,10 +14,10 @@ class Method extends FunctionLike { /** @var int */ protected $flags = 0; - /** @var Stmt[]|null */ + /** @var list|null */ protected $stmts = []; - /** @var Node\AttributeGroup[] */ + /** @var list */ protected $attributeGroups = []; /** diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index 233a4a7c82..433801a08f 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -17,7 +17,7 @@ class Param implements PhpParser\Builder { protected $byRef = false; /** @var bool */ protected $variadic = false; - /** @var Node\AttributeGroup[] */ + /** @var list */ protected $attributeGroups = []; /** diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 2449702cc7..93de442e5e 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -22,7 +22,7 @@ class Property implements PhpParser\Builder { protected $attributes = []; /** @var null|Identifier|Name|ComplexType */ protected $type; - /** @var Node\AttributeGroup[] */ + /** @var list */ protected $attributeGroups = []; /** diff --git a/lib/PhpParser/Builder/Trait_.php b/lib/PhpParser/Builder/Trait_.php index 1e3c221c87..9e622886ff 100644 --- a/lib/PhpParser/Builder/Trait_.php +++ b/lib/PhpParser/Builder/Trait_.php @@ -10,15 +10,15 @@ class Trait_ extends Declaration { /** @var string */ protected $name; - /** @var Stmt\TraitUse[] */ + /** @var list */ protected $uses = []; - /** @var Stmt\ClassConst[] */ + /** @var list */ protected $constants = []; - /** @var Stmt\Property[] */ + /** @var list */ protected $properties = []; - /** @var Stmt\ClassMethod[] */ + /** @var list */ protected $methods = []; - /** @var Node\AttributeGroup[] */ + /** @var list */ protected $attributeGroups = []; /** diff --git a/lib/PhpParser/BuilderFactory.php b/lib/PhpParser/BuilderFactory.php index fa20a7c5fa..c4b30e0cc6 100644 --- a/lib/PhpParser/BuilderFactory.php +++ b/lib/PhpParser/BuilderFactory.php @@ -242,7 +242,7 @@ public function var($name): Expr\Variable { * * @param array $args List of arguments to normalize * - * @return Arg[] + * @return list */ public function args(array $args): array { $normalizedArgs = []; diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 1298702b67..2f78b7d114 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -7,7 +7,7 @@ class Lexer { /** @var string Code being tokenized */ protected $code; - /** @var Token[] Array of tokens */ + /** @var list List of tokens */ protected $tokens; /** @var int Current position in the token array */ protected $pos; diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index d1861f7579..054cc73486 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -24,7 +24,7 @@ class Emulative extends Lexer { /** @var array{int, string, string}[] Patches used to reverse changes introduced in the code */ private $patches = []; - /** @var TokenEmulator[] */ + /** @var list */ private $emulators = []; /** @var PhpVersion */ diff --git a/lib/PhpParser/Node/Attribute.php b/lib/PhpParser/Node/Attribute.php index 8984d8922f..701daebfe3 100644 --- a/lib/PhpParser/Node/Attribute.php +++ b/lib/PhpParser/Node/Attribute.php @@ -9,12 +9,12 @@ class Attribute extends NodeAbstract { /** @var Name Attribute name */ public $name; - /** @var Arg[] Attribute arguments */ + /** @var list Attribute arguments */ public $args; /** * @param Node\Name $name Attribute name - * @param Arg[] $args Attribute arguments + * @param list $args Attribute arguments * @param array $attributes Additional node attributes */ public function __construct(Name $name, array $args = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/MatchArm.php b/lib/PhpParser/Node/MatchArm.php index 55a7eacef4..1c8d7053a7 100644 --- a/lib/PhpParser/Node/MatchArm.php +++ b/lib/PhpParser/Node/MatchArm.php @@ -6,13 +6,13 @@ use PhpParser\NodeAbstract; class MatchArm extends NodeAbstract { - /** @var null|Node\Expr[] */ + /** @var null|list */ public $conds; /** @var Node\Expr */ public $body; /** - * @param null|Node\Expr[] $conds + * @param null|list $conds */ public function __construct(?array $conds, Node\Expr $body, array $attributes = []) { $this->conds = $conds; diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index 22d439f40a..ef110531bb 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -31,7 +31,7 @@ class Param extends NodeAbstract { * @param bool $variadic Whether this is a variadic argument * @param array $attributes Additional attributes * @param int $flags Optional visibility flags - * @param AttributeGroup[] $attrGroups PHP attribute groups + * @param list $attrGroups PHP attribute groups */ public function __construct( $var, ?Expr $default = null, $type = null, diff --git a/lib/PhpParser/Node/Stmt/ClassConst.php b/lib/PhpParser/Node/Stmt/ClassConst.php index e4b1a2a168..8b05980c5e 100644 --- a/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/lib/PhpParser/Node/Stmt/ClassConst.php @@ -19,7 +19,7 @@ class ClassConst extends Node\Stmt { * @param Node\Const_[] $consts Constant declarations * @param int $flags Modifiers * @param array $attributes Additional attributes - * @param Node\AttributeGroup[] $attrGroups PHP attribute groups + * @param list $attrGroups PHP attribute groups */ public function __construct( array $consts, diff --git a/lib/PhpParser/Node/Stmt/EnumCase.php b/lib/PhpParser/Node/Stmt/EnumCase.php index 561a21c591..fddadb034c 100644 --- a/lib/PhpParser/Node/Stmt/EnumCase.php +++ b/lib/PhpParser/Node/Stmt/EnumCase.php @@ -16,7 +16,7 @@ class EnumCase extends Node\Stmt { /** * @param string|Node\Identifier $name Enum case name * @param Node\Expr|null $expr Enum case expression - * @param AttributeGroup[] $attrGroups PHP attribute groups + * @param list $attrGroups PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index fc1185f1d7..b338e981ce 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -38,7 +38,7 @@ class NodeTraverser implements NodeTraverserInterface { */ public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4; - /** @var NodeVisitor[] Visitors */ + /** @var list Visitors */ protected $visitors = []; /** @var bool Whether traversal should be stopped */ diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 46662369fb..2cc5fe7658 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -245,11 +245,6 @@ parameters: count: 1 path: lib/PhpParser/ParserAbstract.php - - - message: "#^Property PhpParser\\\\ParserAbstract\\:\\:\\$createdArrays \\(SplObjectStorage\\\\|null\\) does not accept SplObjectStorage\\\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - message: "#^Unary operation \"\\+\" on string results in an error\\.$#" count: 1 From 2df8878f5df6b871c14d2aa005cb469cb572e467 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 29 Jan 2023 20:47:55 +0100 Subject: [PATCH 196/428] [PHP 8.3] Support dynamic class const fetch RFC: https://wiki.php.net/rfc/dynamic_class_constant_fetch --- grammar/php.y | 2 + lib/PhpParser/BuilderFactory.php | 6 +- lib/PhpParser/Node/Expr/ClassConstFetch.php | 6 +- lib/PhpParser/Parser/Php7.php | 845 +++++++++--------- lib/PhpParser/Parser/Php8.php | 765 ++++++++-------- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- test/PhpParser/BuilderFactoryTest.php | 6 +- test/code/parser/expr/dynamicClassConst.test | 42 + .../expr/dynamicClassConstFetch.test | 8 + 9 files changed, 872 insertions(+), 810 deletions(-) create mode 100644 test/code/parser/expr/dynamicClassConst.test create mode 100644 test/code/prettyPrinter/expr/dynamicClassConstFetch.test diff --git a/grammar/php.y b/grammar/php.y index 9f931c4d99..f745739cda 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1166,6 +1166,8 @@ constant: class_constant: class_name_or_var T_PAAMAYIM_NEKUDOTAYIM identifier_maybe_reserved { $$ = Expr\ClassConstFetch[$1, $3]; } + | class_name_or_var T_PAAMAYIM_NEKUDOTAYIM '{' expr '}' + { $$ = Expr\ClassConstFetch[$1, $4]; } /* We interpret an 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 diff --git a/lib/PhpParser/BuilderFactory.php b/lib/PhpParser/BuilderFactory.php index c4b30e0cc6..efc1bff612 100644 --- a/lib/PhpParser/BuilderFactory.php +++ b/lib/PhpParser/BuilderFactory.php @@ -348,15 +348,15 @@ public function propertyFetch(Expr $var, $name): Expr\PropertyFetch { /** * Creates a class constant fetch node. * - * @param string|Name|Expr $class Class name - * @param string|Identifier $name Constant name + * @param string|Name|Expr $class Class name + * @param string|Identifier|Expr $name Constant name * * @return Expr\ClassConstFetch */ public function classConstFetch($class, $name): Expr\ClassConstFetch { return new Expr\ClassConstFetch( BuilderHelpers::normalizeNameOrExpr($class), - BuilderHelpers::normalizeIdentifier($name) + BuilderHelpers::normalizeIdentifierOrExpr($name) ); } diff --git a/lib/PhpParser/Node/Expr/ClassConstFetch.php b/lib/PhpParser/Node/Expr/ClassConstFetch.php index a883f5a382..9b107c3975 100644 --- a/lib/PhpParser/Node/Expr/ClassConstFetch.php +++ b/lib/PhpParser/Node/Expr/ClassConstFetch.php @@ -9,14 +9,14 @@ class ClassConstFetch extends Expr { /** @var Name|Expr Class name */ public $class; - /** @var Identifier|Error Constant name */ + /** @var Identifier|Expr|Error Constant name */ public $name; /** * Constructs a class const fetch node. * - * @param Name|Expr $class Class name - * @param string|Identifier|Error $name Constant name + * @param Name|Expr $class Class name + * @param string|Identifier|Expr|Error $name Constant name * @param array $attributes Additional attributes */ public function __construct($class, $name, array $attributes = []) { diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index d8dab22ab0..0eaf16a42b 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -160,7 +160,7 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1255; + protected $actionTableSize = 1256; protected $gotoTableSize = 644; protected $invalidSymbol = 168; @@ -169,7 +169,7 @@ class Php7 extends \PhpParser\ParserAbstract protected $unexpectedTokenRule = 32767; protected $YY2TBLSTATE = 429; - protected $numNonLeafStates = 729; + protected $numNonLeafStates = 730; protected $symbolToName = array( "EOF", @@ -386,132 +386,132 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $action = array( - 132, 133, 134, 578, 135, 136, 0, 741, 742, 743, - 137, 37, 476, 853, 1016, 854,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 101, 102, 103, 104, 105, 1100, 1101, - 1102, 1099, 1098, 1097, 1103, 735, 734,-32766, 2,-32766, + 132, 133, 134, 578, 135, 136, 0, 742, 743, 744, + 137, 37, 476, 854, 1017, 855,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 101, 102, 103, 104, 105, 1101, 1102, + 1103, 1100, 1099, 1098, 1104, 736, 735,-32766, 2,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1233,-32766,-32766,-32766, 744,-32766,-32766,-32766, -327, - -591, -588, 825,-32766,-32766,-32766, 979, -591, -588, 267, - 138, 399, 748, 749, 750, 751, -193,-32766, 423,-32766, - -32766,-32766,-32766,-32766,-32766, 752, 753, 754, 755, 756, - 757, 758, 759, 760, 761, 762, 782, 579, 783, 784, - 785, 786, 774, 775, 340, 341, 777, 778, 763, 764, - 765, 767, 768, 769, 351, 809, 810, 811, 812, 813, - 580, 770, 771, 581, 582, 803, 794, 792, 793, 806, - 789, 790, 826, -192, 583, 584, 788, 585, 586, 587, - 588, 589, 590, 817, 477,-32766,-32766,-32766, 791, 591, + -32767, 1234,-32766,-32766,-32766, 745,-32766,-32766,-32766, -327, + -592, -589, 826,-32766,-32766,-32766, 980, -592, -589, 267, + 138, 399, 749, 750, 751, 752, -193,-32766, 423,-32766, + -32766,-32766,-32766,-32766,-32766, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 762, 763, 783, 579, 784, 785, + 786, 787, 775, 776, 340, 341, 778, 779, 764, 765, + 766, 768, 769, 770, 351, 810, 811, 812, 813, 814, + 580, 771, 772, 581, 582, 804, 795, 793, 794, 807, + 790, 791, 827, -192, 583, 584, 789, 585, 586, 587, + 588, 589, 590, 818, 477,-32766,-32766,-32766, 792, 591, 592, 12, 139, 239, 132, 133, 134, 578, 135, 136, - 1049, 741, 742, 743, 137, 37,-32766, 34,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 1100, - 1101, 1102, 1099, 1098, 1097, 1103, 930,-32766, 14, 735, - 734,-32766,-32766,-32766, 980, 128,-32766, 828,-32766,-32766, - -32766,-32766, 106, 107, 108, 144, 271, 1309, 295, 744, - 1092, 74,-32766, -327,-32766,-32766,-32766, 322, 109, -591, - -588, -591, -588, 267, 138, 399, 748, 749, 750, 751, - -193, -86, 423,-32766,-32766,-32766,-32766, 819, 126, 752, - 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, - 782, 579, 783, 784, 785, 786, 774, 775, 340, 341, - 777, 778, 763, 764, 765, 767, 768, 769, 351, 809, - 810, 811, 812, 813, 580, 770, 771, 581, 582, 803, - 794, 792, 793, 806, 789, 790, 817, -192, 583, 584, - 788, 585, 586, 587, 588, 589, 590, -86, 82, 83, - 84, -271, 791, 591, 592, 251, 148, 766, 736, 737, - 738, 739, 740, 821, 741, 742, 743, 779, 780, 36, - 702, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 1050, 742, 743, 744, 137, 37,-32766, 34,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 1101, + 1102, 1103, 1100, 1099, 1098, 1104, 931,-32766, 14, 736, + 735,-32766,-32766,-32766, 981, 128,-32766, 829,-32766,-32766, + -32766,-32766, 106, 107, 108, 144, 271, 1311, 295, 745, + 1093, 74,-32766, -327,-32766,-32766,-32766, 322, 109, -592, + -589, -592, -589, 267, 138, 399, 749, 750, 751, 752, + -193, -86, 423,-32766,-32766,-32766,-32766, 820, 126, 753, + 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, + 783, 579, 784, 785, 786, 787, 775, 776, 340, 341, + 778, 779, 764, 765, 766, 768, 769, 770, 351, 810, + 811, 812, 813, 814, 580, 771, 772, 581, 582, 804, + 795, 793, 794, 807, 790, 791, 818, -192, 583, 584, + 789, 585, 586, 587, 588, 589, 590, -86, 82, 83, + 84, -271, 792, 591, 592, 251, 148, 767, 737, 738, + 739, 740, 741, 822, 742, 743, 744, 780, 781, 36, + 703, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108,-32766, 271, 1293, 715, 375, - 376,-32766,-32766,-32766, 608, 827, 377, 376, 109, 417, - 948, 949, 744, 822, 288, 950, 417, 1025, 306, 141, - 1076, 944,-32766, 322,-32766,-32766, 745, 746, 747, 748, - 749, 750, 751, 1338, 602, 815, 1339, 1077, -542, 423, - 287, 727, 752, 753, 754, 755, 756, 757, 758, 759, - 760, 761, 762, 782, 805, 783, 784, 785, 786, 774, - 775, 776, 804, 777, 778, 763, 764, 765, 767, 768, - 769, 808, 809, 810, 811, 812, 813, 814, 770, 771, - 772, 773, 803, 794, 792, 793, 806, 789, 790, 823, - 308, 781, 787, 788, 795, 796, 798, 797, 799, 800, - -32766, 150, -542, -542, 932, 791, 802, 801, 49, 50, - 51, 507, 52, 53, 1228, 1227, 1229, -542, 54, 55, - -111, 56, 1025, 1078, 910, -111, 323, -111, 288, -548, - 238, -542, 302,-32766, 320, -111, -111, -111, -111, -111, - -111, -111, -111, 352, 910, 287, 335, 551, 1233, 103, - 104, 105, 1233, 1022, 705, 1025, 57, 58, 1253, 81, - 336, -541, 59, 322, 60, 245, 246, 61, 62, 63, - 64, 65, 66, 67, 68, 1025, 27, 269, 69, 439, - 508, 1022, -16, -341, 1259, 1260, 509, -365, 826, -365, - 461, 462, 1257, 41, 24, 510, 932, 511, 280, 512, - 910, 513,-32766, 1025, 514, 515, 365, 900, 1265, 43, - 44, 440, 372, 371,-32766, 45, 516, 1012, 1011, 1010, - 1013, 363, 334,-32766, 1226, -541, -541, 900, 1219, 826, - 518, 519, 520, 826, 369, 357, 1025, 1313, 826, 826, - -541, 1328, 522, 523, 1312, 1247, 1248, 1249, 1250, 1244, - 1245, 294, -547, -582, -541, -582, 384, 1251, 1246, 287, - 1224, 1228, 1227, 1229, 295,-32766,-32766, 70, 910, 735, - 734, 318, 319, 322, -153, -153, -153, 910, 386, -111, - 11, 1024, 912, 900,-32766, 910, 700, 435,-32766, -153, - 853, -153, 854, -153, 1048, -153, 651, 25, 706, 1228, - 1227, 1229, 912, 35, 248, 370, 700, 707, 74, 295, - 670, 671, 74, 436, 322, 710, 948, 949, 322, 437, - 140, 517, 910, 284, 322, 438, 886, 944, -111, -111, + 104, 105, 106, 107, 108,-32766, 271, 1295, 716, 375, + 376,-32766,-32766,-32766, 608, 828, 377, 376, 109, 417, + 949, 950, 745, 823, 288, 951, 417, 1026, 306, 141, + 1077, 945,-32766, 322,-32766,-32766, 746, 747, 748, 749, + 750, 751, 752, 1340, 602, 816, 1341, 1078, -543, 423, + 287, 728, 753, 754, 755, 756, 757, 758, 759, 760, + 761, 762, 763, 783, 806, 784, 785, 786, 787, 775, + 776, 777, 805, 778, 779, 764, 765, 766, 768, 769, + 770, 809, 810, 811, 812, 813, 814, 815, 771, 772, + 773, 774, 804, 795, 793, 794, 807, 790, 791, 824, + 308, 782, 788, 789, 796, 797, 799, 798, 800, 801, + -32766, 150, -543, -543, 933, 792, 803, 802, 49, 50, + 51, 507, 52, 53, 1229, 1228, 1230, -543, 54, 55, + -111, 56, 1026, 1079, 911, -111, 323, -111, 288, -549, + 238, -543, 302,-32766, 320, -111, -111, -111, -111, -111, + -111, -111, -111, 352, 911, 287, 335, 551, 1234, 103, + 104, 105, 1234, 1023, 706, 1026, 57, 58, 1255, 81, + 336, -542, 59, 322, 60, 245, 246, 61, 62, 63, + 64, 65, 66, 67, 68, 1026, 27, 269, 69, 439, + 508, 1023, -16, -341, 1261, 1262, 509, -365, 827, -365, + 461, 462, 1259, 41, 24, 510, 933, 511, 280, 512, + 911, 513,-32766, 1026, 514, 515, 365, 901, 1267, 43, + 44, 440, 372, 371,-32766, 45, 516, 1013, 1012, 1011, + 1014, 363, 334,-32766, 1227, -542, -542, 901, 1220, 827, + 518, 519, 520, 827, 369, 357, 1026, 1315, 827, 827, + -542, 1330, 522, 523, 1314, 1248, 1249, 1250, 1251, 1245, + 1246, 294, -548, -583, -542, -583, 384, 1252, 1247, 287, + 1225, 1229, 1228, 1230, 295,-32766,-32766, 70, 911, 736, + 735, 318, 319, 322, -153, -153, -153, 911, 386, -111, + 11, 1025, 913, 901,-32766, 911, 701, 435,-32766, -153, + 854, -153, 855, -153, 1049, -153, 652, 25, 707, 1229, + 1228, 1230, 913, 35, 248, 370, 701, 708, 74, 295, + 671, 672, 74, 436, 322, 711, 949, 950, 322, 437, + 140, 517, 911, 284, 322, 438, 887, 945, -111, -111, -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 735, 734, 453, 454, 455, - 832, 900, 717, 735, 734, -543, 948, 949, 912, 151, - 900, 950, 700, -153, 149, 402, 153, 945, 900, 154, - 373, 374, 378, 379, 1138, 1140, -545, 155, 157, 642, - 643, 32,-32766, -301, 123, -540, 27, 124, 1226, 129, - 130, 143, -88, 158, 159,-32766,-32766,-32766, 826,-32766, - 160,-32766, 1257,-32766, 161, 900,-32766, 47, 926, 1022, - -85,-32766,-32766,-32766, -4, 910, -79,-32766,-32766, -543, - -543, -75, -73,-32766, 414, -72, 912, -71, -70, -69, - 700, 1025,-32766, -68, -543, 965, 735, 734, 1219, 700, - -545, -545, -540, 912, -67, -297, 48, 700, -543, -540, - -540, -66, 522, 523, 280, 1247, 1248, 1249, 1250, 1244, - 1245, -47, 73, -18, -540, 147, 270, 1251, 1246, -545, - 281, 296, 297,-32766, 716, 719, 909, 72, -540, 1226, - 912, 146, 319, 322, 700, 285,-32766,-32766,-32766, 276, - -32766, 277,-32766, 282,-32766, 283, 328,-32766, 900, 286, - 125, 289,-32766,-32766,-32766, 290, -540, -540,-32766,-32766, - 298, 299, -51, 680,-32766, 414, 271, 145, 109, 826, - 370, -540, 430,-32766, 1107, 368, 817, 293, 652, 557, - 13, 948, 949, 693, 1340, -540, 517,-32766, 553, 127, - 640, 521, 944, -111, -111, -111, 131, 434, 300, 673, - 307, 1264,-32766, 657, 301,-32766, -506, 1266, -496, 563, - 458, 1226, 487, 825, 9, 606, 658, 674,-32766,-32766, - -32766, 7,-32766, 912,-32766, 16,-32766, 700, -4,-32766, - 367, 295, 928, 303,-32766,-32766,-32766, -274, 39,-32766, - -32766,-32766, 910, 0, 0, 1226,-32766, 414, 0, 0, + 118, 119, 120, 121, 122, 736, 735, 453, 454, 455, + 833, 901, 718, 736, 735, -544, 949, 950, 913, 151, + 901, 951, 701, -153, 149, 402, 153, 946, 901, 154, + 373, 374, 378, 379, 1139, 1141, -546, 155, 157, 643, + 644, 32,-32766, -301, 123, -541, 27, 124, 1227, 129, + 130, 143, -88, 158, 159,-32766,-32766,-32766, 827,-32766, + 160,-32766, 1259,-32766, 161, 901,-32766, 47, 927, 1023, + -85,-32766,-32766,-32766, -4, 911, -79,-32766,-32766, -544, + -544, -75, -73,-32766, 414, -72, 913, -71, -70, -69, + 701, 1026,-32766, -68, -544, 966, 736, 735, 1220, 701, + -546, -546, -541, 913, -67, -297, 48, 701, -544, -541, + -541, -66, 522, 523, 280, 1248, 1249, 1250, 1251, 1245, + 1246, -47, 73, -18, -541, 147, 270, 1252, 1247, -546, + 281, 296, 297,-32766, 717, 720, 910, 72, -541, 1227, + 913, 146, 319, 322, 701, 285,-32766,-32766,-32766, 276, + -32766, 277,-32766, 282,-32766, 283, 328,-32766, 901, 286, + 125, 289,-32766,-32766,-32766, 290, -541, -541,-32766,-32766, + 298, 299, -51, 681,-32766, 414, 271, 145, 109, 827, + 370, -541, 430,-32766, 1108, 368, 818, 293, 653, 557, + 13, 949, 950, 694, 1342, -541, 517,-32766, 553, 127, + 641, 521, 945, -111, -111, -111, 131, 434, 300, 674, + 307, 1266,-32766, 658, 301,-32766, -506, 1268, -496, 563, + 458, 1227, 487, 826, 9, 606, 659, 675,-32766,-32766, + -32766, 7,-32766, 913,-32766, 16,-32766, 701, -4,-32766, + 367, 295, 929, 303,-32766,-32766,-32766, -274, 39,-32766, + -32766,-32766, 911, 0, 0, 1227,-32766, 414, 0, 0, 0, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, -32766, 0, 0,-32766, 0, 0, 0, 0,-32766,-32766, - -32766,-32766, 0, 0,-32766,-32766, 0, 1226, 0, 40, - -32766, 414, 910, 724,-32766,-32766,-32766, 725,-32766,-32766, - -32766, 845,-32766, 891, 989,-32766, 966, 973, 963, 482, - -32766,-32766,-32766,-32766, 974, 889,-32766,-32766, 961, 1226, - 570, 1081,-32766, 414, 1084, 1085,-32766,-32766,-32766, 1082, - -32766,-32766,-32766, 1083,-32766, 900, 1089,-32766, 1254, 837, - 1279, 1297,-32766,-32766,-32766, 1331, 645, 33,-32766,-32766, - -576, -249, -249, -249,-32766, 414, -574, 370, -548, -547, - 27, 269, -546,-32766, -490, 1, 28, 29, 948, 949, - 38, 42, 826, 517, 46, 900, 1257, 71, 886, 944, - -111, -111, -111, 75, 76, 77, 78, 79, 80, 142, - 152, -248, -248, -248, 156, 244, 324, 370, 352, 353, - 721, 354, 355, 356, 357, 358, 359, 360, 948, 949, - 912, 361, 1219, 517, 700, -249, 362, 364, 886, 944, - -111, -111, -111, 431, 550, 887, -272, 523, 27, 1247, - 1248, 1249, 1250, 1244, 1245, -271, 18, 19, 20, 21, - 826, 1251, 1246, 23, 1257, 401,-32766, 478, 479, 486, - 912, 72, 1226, 1335, 700, -248, 319, 322, 489,-32766, - -32766,-32766, 490,-32766, 491,-32766, 492,-32766, 496, 497, - -32766, 498, 505, 568, 687,-32766,-32766,-32766, 1237, 1178, - 1219,-32766,-32766, 1255, 1051, 1050, 1031,-32766, 414, 1214, - 1027, -276, -103, 17, 22, 523,-32766, 1247, 1248, 1249, - 1250, 1244, 1245, 26, 292, 400, 599, 603, 631, 1251, - 1246, 692, 1182, 1232, 1179, 1310, 0, 317, 366, 72, - 701, -510, 704, 708, 319, 322, 709, 711, 712, 713, - 714, 718, 703, 0, 1337, 848, 0, 847, 856, 938, - 981, 855, 1336, 937, 935, 936, 939, 1210, 919, 929, - 917, 971, 972, 1334, 1291, 1280, 1298, 1304, 1307, 0, - 1195, 0, 1258, 0, 322 + -32766,-32766, 0, 0,-32766,-32766, 0, 1227, 0, 40, + -32766, 414, 911, 725,-32766,-32766,-32766, 726,-32766,-32766, + -32766, 846,-32766, 892, 990,-32766, 967, 974, 964, 482, + -32766,-32766,-32766,-32766, 975, 890,-32766,-32766, 962, 1227, + 570, 1082,-32766, 414, 1085, 1086,-32766,-32766,-32766, 1083, + -32766,-32766,-32766, 1084,-32766, 901, 1090,-32766, 1256, 838, + 1281, 1299,-32766,-32766,-32766, 1333, 646, 33,-32766,-32766, + -577, -249, -249, -249,-32766, 414, -576, 370, -575, -549, + 27, 269, -548,-32766, -547, -490, 1, 28, 949, 950, + 29, 38, 827, 517, 42, 901, 1259, 46, 887, 945, + -111, -111, -111, 71, 75, 76, 77, 78, 79, 80, + 142, -248, -248, -248, 152, 156, 244, 370, 324, 352, + 722, 353, 354, 355, 356, 357, 358, 359, 949, 950, + 913, 360, 1220, 517, 701, -249, 361, 362, 887, 945, + -111, -111, -111, 364, 431, 550, -510, 523, 27, 1248, + 1249, 1250, 1251, 1245, 1246, -272, -271, 18, 19, 20, + 827, 1252, 1247, 21, 1259, 23,-32766, 401, 478, 479, + 913, 72, 1227, 888, 701, -248, 319, 322, 486,-32766, + -32766,-32766, 489,-32766, 490,-32766, 491,-32766, 492, 496, + -32766, 497, 498, 505, 568,-32766,-32766,-32766, 688, 1238, + 1220,-32766,-32766, 1179, 1257, 1052, 1051,-32766, 414, 1032, + 1215, 1028, -276, -103, 17, 523,-32766, 1248, 1249, 1250, + 1251, 1245, 1246, 22, 26, 292, 400, 599, 603, 1252, + 1247, 632, 693, 1183, 1233, 1180, 1312, 0, 317, 72, + 366, 1196, 702, 705, 319, 322, 709, 710, 712, 713, + 714, 715, 719, 704, 0, 1337, 0, 1339, 849, 848, + 857, 939, 982, 856, 1338, 938, 936, 937, 940, 1211, + 920, 930, 918, 972, 973, 630, 1336, 1293, 1282, 1300, + 1309, 0, 0, 1260, 0, 322 ); protected $actionCheck = array( @@ -626,7 +626,7 @@ class Php7 extends \PhpParser\ParserAbstract 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, - 129, 130, 131, 161, 161, 164, 162, 137, 70, 139, + 129, 130, 131, 161, 161, 161, 165, 137, 70, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, @@ -635,12 +635,12 @@ class Php7 extends \PhpParser\ParserAbstract 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, - 152, 162, 162, 162, 162, 162, -1, 163, 163, 161, + 152, 162, 162, 162, 162, 162, 162, -1, 163, 161, 163, 165, 163, 163, 166, 167, 163, 163, 163, 163, - 163, 163, 163, -1, 164, 164, -1, 164, 164, 164, + 163, 163, 163, 163, -1, 164, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, -1, - 165, -1, 166, -1, 167 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, -1, -1, 166, -1, 167 ); protected $actionBase = array( @@ -660,9 +660,9 @@ class Php7 extends \PhpParser\ParserAbstract 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 196, 35, 383, 717, 1032, 1040, 1034, 1041, - 1022, 1021, 1033, 1035, 1042, 1079, 1080, 800, 1081, 1082, - 1083, 1084, 1036, 876, 1031, 1039, 289, 289, 289, 289, + 1062, 1062, 196, 35, 383, 717, 1033, 1041, 1035, 1042, + 1031, 1022, 1034, 1036, 1043, 1082, 1083, 800, 1084, 1085, + 1081, 1086, 1039, 876, 1032, 1040, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 227, 224, 606, 43, 43, 43, 43, 43, @@ -674,51 +674,51 @@ class Php7 extends \PhpParser\ParserAbstract 643, 497, 87, 431, 334, 243, 387, 387, 449, 449, 415, 415, 229, 229, 415, 415, 415, 367, 367, 367, 367, 318, 441, -93, 412, 765, 206, 206, 206, 206, - 765, 765, 765, 765, 761, 1086, 765, 765, 765, 635, + 765, 765, 765, 765, 761, 1087, 765, 765, 765, 635, 722, 722, 726, 149, 149, 149, 722, 534, 803, 506, 534, 506, 346, 303, 436, 589, 250, 443, 436, 656, - 687, 60, 59, 758, 614, 758, 1020, 332, 802, 424, - 780, 740, 867, 1059, 1043, 816, 1077, 817, 1078, 568, - 406, 735, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1087, 582, 1020, 283, 1087, 1087, 1087, + 687, 60, 59, 758, 614, 758, 1021, 332, 802, 424, + 780, 740, 867, 1060, 1044, 816, 1079, 817, 1080, 568, + 406, 735, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, + 1020, 1020, 1020, 1088, 582, 1021, 283, 1088, 1088, 1088, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 618, 283, 571, 585, 283, 811, 582, 196, 759, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 782, -19, 196, 35, 185, 185, 228, 13, 185, 185, 185, 185, 196, 196, 196, 614, 809, 756, 616, 762, 125, 809, 809, 809, 200, 51, 139, 68, 698, 760, 522, - 796, 796, 792, 894, 894, 796, 787, 796, 792, 903, - 796, 796, 894, 894, 773, 187, 629, 488, 576, 655, - 894, 360, 796, 796, 796, 796, 768, 661, 796, 297, - 197, 796, 796, 768, 766, 789, 30, 771, 894, 894, - 894, 768, 548, 771, 771, 771, 824, 828, 777, 785, + 796, 796, 792, 895, 895, 796, 787, 796, 792, 906, + 796, 796, 895, 895, 773, 187, 629, 488, 576, 655, + 895, 360, 796, 796, 796, 796, 768, 661, 796, 297, + 197, 796, 796, 768, 766, 789, 30, 771, 895, 895, + 895, 768, 548, 771, 771, 771, 824, 828, 777, 785, 476, 432, 692, 159, 720, 785, 785, 796, 598, 777, 785, 777, 785, 778, 785, 785, 785, 777, 785, 787, - 502, 785, 727, 667, 143, 785, 6, 906, 912, 711, - 913, 899, 914, 952, 915, 916, 1047, 893, 924, 900, - 917, 953, 896, 895, 795, 718, 721, 772, 757, 891, - 799, 799, 799, 887, 799, 799, 799, 799, 799, 799, - 799, 799, 718, 868, 781, 769, 790, 928, 723, 724, - 1001, 755, 951, 1046, 1085, 927, 1006, 918, 779, 725, - 971, 930, 926, 1044, 931, 932, 973, 1007, 832, 1011, - 979, 797, 1060, 1061, 869, 934, 1049, 799, 906, 916, - 729, 900, 917, 896, 895, 770, 763, 748, 752, 747, - 746, 741, 744, 784, 1012, 885, 879, 870, 933, 888, - 718, 871, 964, 874, 975, 976, 1045, 813, 801, 875, - 1063, 935, 936, 940, 1050, 1013, 1053, 820, 965, 775, - 977, 815, 1064, 986, 990, 992, 994, 1054, 1065, 1055, - 1056, 834, 788, 954, 807, 1066, 437, 808, 810, 818, - 946, 695, 925, 1057, 1067, 1068, 996, 997, 999, 1069, - 1070, 919, 835, 966, 805, 967, 963, 837, 838, 702, - 814, 1014, 804, 806, 812, 705, 713, 1071, 1072, 1073, - 923, 793, 786, 839, 845, 1017, 798, 1018, 1074, 714, - 846, 728, 1075, 1002, 734, 738, 791, 1058, 776, 819, - 783, 945, 794, 849, 1076, 852, 855, 856, 1000, 860, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 502, 785, 727, 667, 143, 785, 6, 912, 913, 711, + 914, 900, 915, 953, 916, 917, 1049, 894, 925, 903, + 918, 954, 899, 896, 795, 718, 721, 772, 757, 893, + 799, 799, 799, 888, 799, 799, 799, 799, 799, 799, + 799, 799, 718, 868, 781, 769, 790, 930, 723, 724, + 1002, 755, 979, 951, 1046, 928, 1007, 919, 779, 725, + 973, 931, 926, 1045, 932, 933, 975, 1011, 832, 1012, + 1061, 797, 1063, 1064, 869, 935, 1050, 799, 912, 917, + 729, 903, 918, 899, 896, 770, 763, 748, 752, 747, + 746, 741, 744, 784, 1013, 887, 879, 870, 934, 891, + 718, 871, 965, 874, 976, 977, 1047, 813, 801, 875, + 1065, 936, 940, 945, 1053, 1014, 1054, 820, 966, 775, + 986, 815, 1066, 990, 992, 994, 996, 1055, 1067, 1056, + 885, 1057, 834, 788, 963, 807, 1068, 437, 808, 810, + 818, 952, 695, 927, 1058, 1069, 1070, 997, 999, 1000, + 1071, 1072, 923, 835, 967, 805, 971, 964, 837, 838, + 702, 814, 1017, 804, 806, 812, 705, 713, 1073, 1074, + 1075, 924, 793, 786, 839, 845, 1018, 798, 1019, 1076, + 714, 846, 728, 1077, 1006, 734, 738, 791, 1059, 776, + 819, 783, 946, 794, 849, 1078, 852, 855, 856, 1001, + 860, 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, - 456, 456, 456, 456, 456, 456, 305, 305, 305, 305, - 0, 0, 305, 0, 0, 0, 456, 456, 456, 456, + 0, 456, 456, 456, 456, 456, 456, 305, 305, 305, + 305, 0, 0, 305, 0, 0, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, @@ -733,41 +733,41 @@ class Php7 extends \PhpParser\ParserAbstract 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 456, 456, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 0, 0, 0, 0, 0, + 289, 289, 289, 289, 289, 289, 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, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 0, 0, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 494, 494, 289, - 289, 494, 289, 494, 494, 494, 494, 494, 494, 494, - 494, 494, 0, 289, 289, 289, 289, 289, 289, 289, - 289, 773, 149, 149, 149, 149, 494, 494, 494, 494, - 494, -88, -88, 494, 773, 494, 494, 149, 149, 494, + 289, 289, 289, 289, 289, 289, 289, 289, 494, 494, + 289, 289, 494, 289, 494, 494, 494, 494, 494, 494, + 494, 494, 494, 0, 289, 289, 289, 289, 289, 289, + 289, 289, 773, 149, 149, 149, 149, 494, 494, 494, + 494, 494, -88, -88, 494, 773, 494, 494, 149, 149, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, - 0, 0, 283, 506, 494, 787, 787, 787, 787, 494, - 494, 494, 494, 506, 506, 494, 494, 494, 0, 0, - 0, 0, 0, 0, 0, 0, 283, 506, 0, 283, - 0, 787, 787, 494, 0, 773, 586, 494, 0, 0, - 0, 0, 283, 787, 283, 582, 796, 506, 796, 582, - 582, 185, 196, 586, 613, 613, 613, 613, 0, 0, - 614, 773, 773, 773, 773, 773, 773, 773, 773, 773, - 773, 773, 787, 0, 773, 0, 787, 787, 787, 0, + 494, 0, 0, 283, 506, 494, 787, 787, 787, 787, + 494, 494, 494, 494, 506, 506, 494, 494, 494, 0, + 0, 0, 0, 0, 0, 0, 0, 283, 506, 0, + 283, 0, 787, 787, 494, 0, 773, 586, 494, 0, + 0, 0, 0, 283, 787, 283, 582, 796, 506, 796, + 582, 582, 185, 196, 586, 613, 613, 613, 613, 0, + 0, 614, 773, 773, 773, 773, 773, 773, 773, 773, + 773, 773, 773, 787, 0, 773, 0, 787, 787, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 787, 0, 0, 894, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 903, 0, - 0, 0, 0, 0, 0, 787, 0, 0, 0, 0, - 0, 0, 0, 0, 799, 813, 0, 813, 0, 799, - 799, 799, 0, 0, 0, 0, 814, 798 + 0, 0, 0, 0, 0, 787, 0, 0, 895, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 906, + 0, 0, 0, 0, 0, 0, 787, 0, 0, 0, + 0, 0, 0, 0, 0, 799, 813, 0, 813, 0, + 799, 799, 799, 0, 0, 0, 0, 814, 798 ); protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 594, 594, 594, - 594,32767,32767, 253, 103,32767,32767, 468, 385, 385, - 385,32767,32767, 538, 538, 538, 538, 538, 538,32767, + 32767,32767,32767,32767,32767,32767,32767, 595, 595, 595, + 595,32767,32767, 253, 103,32767,32767, 468, 385, 385, + 385,32767,32767, 539, 539, 539, 539, 539, 539,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,32767,32767,32767, @@ -779,10 +779,10 @@ class Php7 extends \PhpParser\ParserAbstract 32767,32767, 37, 7, 8, 10, 11, 50, 17, 323, 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 587,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 588,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767, 472, 451, 452, 454, - 455, 384, 539, 593, 326, 590, 383, 146, 338, 328, + 455, 384, 540, 594, 326, 591, 383, 146, 338, 328, 241, 329, 257, 473, 258, 474, 477, 478, 214, 286, 380, 150, 415, 469, 417, 467, 471, 416, 390, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, @@ -792,118 +792,118 @@ class Php7 extends \PhpParser\ParserAbstract 436, 439,32767, 440, 441, 442, 443,32767, 315,32767, 32767,32767, 364, 362, 315, 112,32767,32767, 428, 429, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 532, 445,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 103,32767, 101, 534, + 32767, 533, 445,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 103,32767, 101, 535, 410, 412, 502, 423, 424, 422, 391,32767, 509,32767, - 103, 511,32767,32767,32767,32767,32767,32767,32767, 533, - 32767, 540, 540,32767, 495, 101, 194,32767,32767,32767, + 103, 511,32767,32767,32767,32767,32767,32767,32767, 534, + 32767, 541, 541,32767, 495, 101, 194,32767,32767,32767, 194, 194,32767,32767,32767,32767,32767,32767,32767,32767, - 601, 495, 111, 111, 111, 111, 111, 111, 111, 111, + 602, 495, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,32767, 194, 111,32767,32767,32767, 101, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 189,32767, 267, 269, 103, 555, 194,32767, 514,32767, + 189,32767, 267, 269, 103, 556, 194,32767, 514,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 507, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 495, 433, 139,32767, 139, 540, - 425, 426, 427, 497, 540, 540, 540, 311, 288,32767, + 32767,32767,32767,32767, 495, 433, 139,32767, 139, 541, + 425, 426, 427, 497, 541, 541, 541, 311, 288,32767, 32767,32767,32767, 512, 512, 101, 101, 101, 101, 507, 32767,32767,32767,32767, 112, 100, 100, 100, 100, 100, 104, 102,32767,32767,32767,32767, 222, 100,32767, 102, - 102,32767,32767, 222, 224, 211, 102, 226,32767, 559, - 560, 222, 102, 226, 226, 226, 246, 246, 484, 317, + 102,32767,32767, 222, 224, 211, 102, 226,32767, 560, + 561, 222, 102, 226, 226, 226, 246, 246, 484, 317, 102, 100, 102, 102, 196, 317, 317,32767, 102, 484, 317, 484, 317, 198, 317, 317, 317, 484, 317,32767, 102, 317, 213, 100, 100, 317,32767,32767,32767, 497, 32767,32767,32767,32767,32767,32767,32767, 221,32767,32767, - 32767,32767,32767,32767,32767,32767, 527,32767, 544, 557, - 431, 432, 434, 542, 456, 457, 458, 459, 460, 461, - 462, 464, 589,32767, 501,32767,32767,32767,32767, 337, - 32767, 599,32767, 599,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 528,32767, 545, 558, + 431, 432, 434, 543, 456, 457, 458, 459, 460, 461, + 462, 464, 590,32767, 501,32767,32767,32767,32767, 337, + 32767, 600,32767, 600,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 600,32767, 540,32767,32767,32767,32767, 430, 9, 76, + 601,32767, 541,32767,32767,32767,32767, 430, 9, 76, 490, 43, 44, 52, 58, 518, 519, 520, 521, 515, - 516, 522, 517,32767,32767, 523, 565,32767,32767, 541, - 592,32767,32767,32767,32767,32767,32767, 139,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 527, + 516, 522, 517,32767,32767, 523, 566,32767,32767, 542, + 593,32767,32767,32767,32767,32767,32767, 139,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 528, 32767, 137,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 540,32767,32767,32767,32767, 313, 310, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 540,32767,32767,32767, - 32767,32767, 290,32767, 307,32767,32767,32767,32767,32767, + 524,32767,32767,32767, 541,32767,32767,32767,32767, 313, + 310,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 541,32767,32767, + 32767,32767,32767, 290,32767, 307,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 285,32767,32767, 379,32767,32767,32767,32767, 358, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 152, 152, 3, 3, 340, 152, 152, 152, 340, 340, - 152, 340, 340, 340, 152, 152, 152, 152, 152, 152, - 279, 184, 261, 264, 246, 246, 152, 350, 152 + 32767,32767, 285,32767,32767, 379,32767,32767,32767,32767, + 358,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 152, 152, 3, 3, 340, 152, 152, 152, 340, + 340, 152, 340, 340, 340, 152, 152, 152, 152, 152, + 152, 279, 184, 261, 264, 246, 246, 152, 350, 152 ); protected $goto = array( - 194, 194, 688, 425, 656, 617, 653, 316, 428, 419, - 310, 311, 331, 572, 424, 332, 426, 633, 676, 941, - 696, 1054, 1018, 1034, 1035, 843, 165, 165, 165, 165, + 194, 194, 689, 425, 657, 617, 654, 316, 428, 419, + 310, 311, 331, 572, 424, 332, 426, 634, 677, 942, + 697, 1055, 1019, 1035, 1036, 844, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, 188, 189, 190, 215, 213, 216, 530, 531, 415, 532, - 534, 535, 536, 537, 538, 539, 540, 541, 1124, 166, + 534, 535, 536, 537, 538, 539, 540, 541, 1125, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, 176, 212, 214, 217, 235, 240, 241, 243, 254, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, 278, 279, 313, 314, 315, 420, 421, 422, 577, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1124, 199, 180, + 236, 186, 187, 188, 189, 190, 215, 1125, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 275, 275, 275, 275, 846, 596, 249, 249, 649, - 650, 346, 667, 668, 669, 844, 619, 619, 839, 820, - 1256, 350, 1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256, - 1256, 350, 350, 247, 247, 247, 247, 242, 250, 391, - 394, 556, 597, 601, 877, 350, 350, 818, 350, 851, - 1341, 899, 894, 895, 908, 852, 896, 849, 897, 898, - 850, 549, 964, 902, 494, 350, 495, 824, 569, 839, - 460, 460, 501, 1075, 1071, 1072, 1274, 1274, 842, 460, - 1274, 344, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - 1274, 988, 962, 962, 960, 962, 722, 1314, 546, 997, - 992, 1225, 1023, 1225, 1023, 1225, 985, 824, 1023, 824, - 1023, 1023, 1285, 567, 1023, 1023, 1023, 1023, 1023, 1023, - 1023, 1023, 1023, 1023, 1023, 349, 349, 349, 349, 1225, - 470, 1299, 1300, 681, 1225, 1225, 1225, 1225, 1095, 1096, - 1225, 1225, 1225, 1306, 1306, 1306, 1306, 605, 620, 623, - 624, 625, 626, 646, 647, 648, 698, 389, 915, 555, - 547, 473, 916, 549, 1272, 1272, 655, 859, 1272, 475, - 1272, 1272, 1272, 1272, 1272, 1272, 1272, 1272, 1272, 956, - 405, 695, 871, 1121, 931, 858, 931, 839, 1173, 337, - 547, 555, 564, 565, 339, 575, 598, 612, 613, 432, - 533, 533, 1032, 1033, 533, 15, 533, 533, 533, 533, - 533, 533, 533, 533, 533, 544, 562, 544, 452, 544, - 723, 632, 634, 1029, 1028, 654, 1218, 321, 305, 678, - 682, 999, 686, 694, 995, 1325, 1325, 627, 629, 630, - 920, 1111, 661, 450, 252, 252, 677, 615, 958, 958, - 958, 958, 1325, 1004, 450, 952, 959, 333, 347, 348, - 444, 863, 836, 659, 983, 444, 1296, 444, 1296, 857, - 1296, 542, 542, 542, 542, 947, 600, 548, 559, 1301, - 1302, 1215, 548, 864, 559, 1204, 933, 392, 456, 1205, - 1208, 934, 1209, 573, 610, 1308, 1308, 1308, 1308, 463, - 576, 464, 465, 398, 861, 869, 403, 404, 1332, 1333, - 903, 665, 904, 666, 611, 407, 408, 409, 418, 679, - 607, 1292, 410, 5, 1216, 6, 342, 427, 1220, 872, - 860, 1059, 1063, 427, 867, 726, 1007, 1060, 471, 1064, - 967, 1030, 1030, 873, 969, 0, 660, 1041, 1037, 1038, + 211, 275, 275, 275, 275, 847, 596, 249, 249, 650, + 651, 840, 668, 669, 670, 845, 619, 619, 1096, 1097, + 1258, 350, 1258, 1258, 1258, 1258, 1258, 1258, 1258, 1258, + 1258, 350, 350, 247, 247, 247, 247, 242, 250, 391, + 394, 556, 597, 601, 821, 350, 350, 819, 350, 852, + 1343, 900, 895, 896, 909, 853, 897, 850, 898, 899, + 851, 549, 840, 903, 494, 350, 495, 825, 1030, 1029, + 460, 460, 501, 1076, 1072, 1073, 1276, 1276, 843, 460, + 1276, 878, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + 1276, 989, 963, 963, 961, 963, 723, 344, 546, 998, + 993, 1226, 1024, 1226, 1024, 1226, 965, 825, 1024, 825, + 1024, 1024, 1287, 569, 1024, 1024, 1024, 1024, 1024, 1024, + 1024, 1024, 1024, 1024, 1024, 349, 349, 349, 349, 1226, + 470, 1301, 1302, 682, 1226, 1226, 1226, 1226, 1033, 1034, + 1226, 1226, 1226, 1308, 1308, 1308, 1308, 605, 620, 623, + 624, 625, 626, 647, 648, 649, 699, 346, 916, 555, + 547, 473, 917, 549, 1274, 1274, 1316, 860, 1274, 475, + 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 904, + 840, 905, 872, 986, 932, 859, 932, 321, 305, 337, + 547, 555, 564, 565, 339, 575, 598, 612, 613, 389, + 533, 533, 1303, 1304, 533, 15, 533, 533, 533, 533, + 533, 533, 533, 533, 533, 544, 562, 544, 567, 544, + 724, 633, 635, 573, 610, 655, 1219, 656, 1122, 679, + 683, 1000, 687, 695, 996, 1327, 1327, 957, 405, 696, + 921, 1112, 1174, 450, 252, 252, 432, 615, 959, 959, + 959, 959, 1327, 1005, 450, 953, 960, 627, 629, 631, + 444, 864, 452, 660, 984, 444, 1298, 444, 1298, 858, + 1298, 542, 542, 542, 542, 333, 600, 548, 559, 662, + 678, 1216, 548, 865, 559, 1205, 934, 392, 456, 1206, + 1209, 935, 1210, 948, 398, 1310, 1310, 1310, 1310, 463, + 576, 464, 465, 837, 862, 870, 403, 404, 1334, 1335, + 418, 666, 607, 667, 611, 407, 408, 409, 5, 680, + 6, 1294, 410, 1217, 1061, 1008, 342, 427, 1221, 873, + 861, 1060, 1064, 427, 868, 727, 471, 1065, 874, 0, + 968, 1031, 1031, 970, 0, 1107, 661, 1042, 1038, 1039, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, - 444, 1106, 1062, 444, 957, 0, 1294, 1294, 1062, 595, - 1088, 0, 699, 685, 685, 0, 502, 691, 1086, 1324, - 1324, 0, 1221, 1222, 272, 0, 1104, 876, 0, 545, - 834, 545, 0, 0, 0, 0, 1324, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1223, 1282, - 1283, 0, 0, 1327, 0, 0, 0, 0, 0, 0, + 444, 0, 1063, 444, 958, 0, 1296, 1296, 1063, 595, + 1089, 0, 700, 686, 686, 0, 502, 692, 1087, 1326, + 1326, 0, 1222, 1223, 272, 0, 1105, 877, 0, 545, + 835, 545, 0, 0, 0, 0, 1326, 0, 0, 0, + 0, 0, 0, 0, 0, 347, 348, 0, 1224, 1284, + 1285, 0, 0, 1329, 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, 1002, 1002 + 0, 0, 1003, 1003 ); protected $gotoCheck = array( @@ -924,46 +924,46 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 23, 23, 23, 23, 15, 129, 5, 5, 85, - 85, 96, 85, 85, 85, 27, 107, 107, 22, 7, + 85, 22, 85, 85, 85, 27, 107, 107, 143, 143, 107, 14, 107, 107, 107, 107, 107, 107, 107, 107, 107, 14, 14, 5, 5, 5, 5, 5, 5, 58, - 58, 58, 58, 58, 45, 14, 14, 6, 14, 15, + 58, 58, 58, 58, 7, 14, 14, 6, 14, 15, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 14, 49, 15, 154, 14, 154, 12, 170, 22, + 15, 14, 22, 15, 154, 14, 154, 12, 117, 117, 148, 148, 154, 15, 15, 15, 168, 168, 25, 148, - 168, 177, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 25, 25, 25, 25, 25, 25, 179, 25, 25, - 25, 72, 72, 72, 72, 72, 102, 12, 72, 12, - 72, 72, 14, 103, 72, 72, 72, 72, 72, 72, + 168, 45, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 25, 25, 25, 25, 25, 25, 177, 25, 25, + 25, 72, 72, 72, 72, 72, 49, 12, 72, 12, + 72, 72, 14, 170, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 24, 24, 24, 24, 72, - 174, 174, 174, 14, 72, 72, 72, 72, 143, 143, + 174, 174, 174, 14, 72, 72, 72, 72, 118, 118, 72, 72, 72, 9, 9, 9, 9, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 61, 72, 75, - 75, 83, 72, 14, 169, 169, 63, 35, 169, 83, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 92, - 92, 92, 35, 149, 9, 35, 9, 22, 150, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 112, - 171, 171, 118, 118, 171, 75, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 19, 48, 19, 82, 19, - 48, 48, 48, 117, 117, 48, 14, 167, 167, 48, - 48, 48, 48, 48, 48, 181, 181, 84, 84, 84, - 17, 17, 119, 19, 5, 5, 115, 17, 19, 19, - 19, 19, 181, 17, 19, 19, 19, 29, 96, 96, - 23, 17, 18, 17, 17, 23, 129, 23, 129, 17, - 129, 106, 106, 106, 106, 91, 106, 9, 9, 176, - 176, 17, 9, 39, 9, 78, 78, 9, 9, 78, - 78, 78, 78, 2, 2, 129, 129, 129, 129, 9, - 9, 9, 9, 28, 37, 9, 81, 81, 9, 9, - 64, 81, 64, 81, 79, 81, 81, 81, 13, 81, - 13, 129, 81, 46, 159, 46, 81, 116, 20, 16, - 16, 16, 16, 116, 9, 98, 109, 128, 156, 131, - 16, 116, 116, 41, 95, -1, 116, 116, 116, 116, + 80, 80, 80, 80, 80, 80, 80, 96, 72, 75, + 75, 83, 72, 14, 169, 169, 179, 35, 169, 83, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 64, + 22, 64, 35, 102, 9, 35, 9, 167, 167, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 61, + 171, 171, 176, 176, 171, 75, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 19, 48, 19, 103, 19, + 48, 48, 48, 2, 2, 48, 14, 63, 149, 48, + 48, 48, 48, 48, 48, 181, 181, 92, 92, 92, + 17, 17, 150, 19, 5, 5, 112, 17, 19, 19, + 19, 19, 181, 17, 19, 19, 19, 84, 84, 84, + 23, 17, 82, 17, 17, 23, 129, 23, 129, 17, + 129, 106, 106, 106, 106, 29, 106, 9, 9, 119, + 115, 17, 9, 39, 9, 78, 78, 9, 9, 78, + 78, 78, 78, 91, 28, 129, 129, 129, 129, 9, + 9, 9, 9, 18, 37, 9, 81, 81, 9, 9, + 13, 81, 13, 81, 79, 81, 81, 81, 46, 81, + 46, 129, 81, 159, 128, 109, 81, 116, 20, 16, + 16, 16, 16, 116, 9, 98, 156, 131, 41, -1, + 16, 116, 116, 95, -1, 146, 116, 116, 116, 116, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 146, 129, 23, 16, -1, 129, 129, 129, 8, + 23, -1, 129, 23, 16, -1, 129, 129, 129, 8, 8, -1, 8, 8, 8, -1, 8, 8, 8, 180, 180, -1, 20, 20, 24, -1, 16, 16, -1, 24, 20, 24, -1, -1, -1, -1, 180, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 20, 20, + -1, -1, -1, -1, -1, 96, 96, -1, 20, 20, 20, -1, -1, 180, -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, @@ -975,47 +975,47 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $gotoBase = array( - 0, 0, -249, 0, 0, 166, 194, 170, 522, 7, - 0, 0, -66, 145, -113, -178, 43, -59, 116, 108, - 100, 0, -97, 158, 282, 234, 21, 171, 130, 124, + 0, 0, -320, 0, 0, 166, 194, 195, 522, 7, + 0, 0, -66, 137, -113, -178, 43, -59, 157, 108, + 100, 0, -104, 158, 282, 234, 21, 171, 121, 142, 0, 0, 0, 0, 0, -39, 0, 129, 0, 123, - 0, 68, -1, 0, 0, 192, -243, 0, -325, 199, + 0, 63, -1, 0, 0, 229, -249, 0, -326, 243, 0, 0, 0, 0, 0, -34, 0, 0, 155, 0, - 0, 276, 0, 87, 451, -235, 0, 0, 0, 0, + 0, 318, 0, 148, 320, -235, 0, 0, 0, 0, 0, 0, -6, 0, 0, -21, 0, 0, 42, 135, - -46, -19, 103, -142, -76, -539, 0, 0, -262, 0, - 0, 110, 38, 0, 0, 67, -306, 0, 93, 0, - 0, 0, 232, 231, 0, 0, 404, -62, 0, 131, - 0, 0, 85, 0, 0, 126, 219, 107, 80, 115, - 0, 0, 0, 0, 0, 0, 19, 0, 128, 159, - 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 26, 0, 0, 83, 0, 197, 101, - 77, 0, 0, 0, -265, 0, 64, 0, 0, 120, - 0, 0, 0, 0, 0, 0, 0, 69, -2, 86, - 200, 122, 0, 0, -7, 0, 72, 212, 0, 227, + -46, -19, 147, -142, -56, -540, 0, 0, -262, 0, + 0, 128, 96, 0, 0, 66, -160, 0, 93, 0, + 0, 0, 309, 336, 0, 0, 404, -62, 0, 120, + 0, 0, 132, 0, 0, 160, 219, -48, 16, 152, + 0, 0, 0, 0, 0, 0, 19, 0, 115, 159, + 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -94, 0, 0, 67, 0, 197, 146, + 131, 0, 0, 0, -265, 0, 62, 0, 0, 119, + 0, 0, 0, 0, 0, 0, 0, 29, -2, 86, + 245, 122, 0, 0, -7, 0, -5, 228, 0, 296, 235, 91, 0, 0 ); protected $gotoDefault = array( - -32768, 506, 730, 4, 731, 924, 807, 816, 593, 524, - 697, 343, 621, 416, 1290, 901, 1110, 574, 835, 1234, - 1242, 451, 838, 326, 720, 883, 884, 885, 395, 381, - 387, 393, 644, 622, 488, 870, 447, 862, 480, 865, - 446, 874, 162, 413, 504, 878, 3, 880, 552, 911, - 382, 888, 383, 672, 890, 558, 892, 893, 390, 396, - 397, 1115, 566, 618, 905, 253, 560, 906, 380, 907, - 914, 385, 388, 683, 459, 499, 493, 406, 1090, 561, - 604, 641, 441, 467, 616, 628, 614, 474, 1026, 411, - 325, 946, 954, 481, 457, 968, 345, 976, 728, 1123, - 635, 483, 984, 636, 991, 994, 525, 526, 472, 1006, - 268, 1009, 484, 1047, 662, 1020, 1021, 663, 637, 1043, - 638, 664, 639, 1045, 466, 594, 1053, 448, 1061, 1278, - 449, 1065, 262, 1068, 274, 412, 429, 1073, 1074, 8, - 1080, 689, 690, 10, 273, 503, 1105, 684, 445, 1122, - 433, 1192, 1194, 554, 485, 1212, 1211, 675, 500, 1217, - 442, 1281, 443, 527, 468, 312, 528, 304, 329, 309, - 543, 291, 330, 529, 469, 1287, 1295, 327, 30, 1315, - 1326, 338, 571, 609 + -32768, 506, 731, 4, 732, 925, 808, 817, 593, 524, + 698, 343, 621, 416, 1292, 902, 1111, 574, 836, 1235, + 1243, 451, 839, 326, 721, 884, 885, 886, 395, 381, + 387, 393, 645, 622, 488, 871, 447, 863, 480, 866, + 446, 875, 162, 413, 504, 879, 3, 881, 552, 912, + 382, 889, 383, 673, 891, 558, 893, 894, 390, 396, + 397, 1116, 566, 618, 906, 253, 560, 907, 380, 908, + 915, 385, 388, 684, 459, 499, 493, 406, 1091, 561, + 604, 642, 441, 467, 616, 628, 614, 474, 1027, 411, + 325, 947, 955, 481, 457, 969, 345, 977, 729, 1124, + 636, 483, 985, 637, 992, 995, 525, 526, 472, 1007, + 268, 1010, 484, 1048, 663, 1021, 1022, 664, 638, 1044, + 639, 665, 640, 1046, 466, 594, 1054, 448, 1062, 1280, + 449, 1066, 262, 1069, 274, 412, 429, 1074, 1075, 8, + 1081, 690, 691, 10, 273, 503, 1106, 685, 445, 1123, + 433, 1193, 1195, 554, 485, 1213, 1212, 676, 500, 1218, + 442, 1283, 443, 527, 468, 312, 528, 304, 329, 309, + 543, 291, 330, 529, 469, 1289, 1297, 327, 30, 1317, + 1328, 338, 571, 609 ); protected $ruleToNonTerminal = array( @@ -1071,16 +1071,16 @@ class Php7 extends \PhpParser\ParserAbstract 160, 161, 161, 161, 161, 19, 19, 72, 72, 72, 72, 150, 150, 150, 150, 163, 163, 151, 151, 153, 153, 153, 156, 156, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 169, 169, 107, 171, 171, 171, 171, - 152, 152, 152, 152, 152, 152, 152, 152, 58, 58, - 166, 166, 166, 166, 172, 172, 162, 162, 162, 173, - 173, 173, 173, 173, 173, 73, 73, 65, 65, 65, - 65, 129, 129, 129, 129, 176, 175, 165, 165, 165, - 165, 165, 165, 165, 164, 164, 164, 174, 174, 174, - 174, 106, 170, 178, 178, 177, 177, 179, 179, 179, - 179, 179, 179, 179, 179, 167, 167, 167, 167, 181, - 182, 180, 180, 180, 180, 180, 180, 180, 180, 183, - 183, 183, 183 + 168, 168, 168, 169, 169, 169, 107, 171, 171, 171, + 171, 152, 152, 152, 152, 152, 152, 152, 152, 58, + 58, 166, 166, 166, 166, 172, 172, 162, 162, 162, + 173, 173, 173, 173, 173, 173, 73, 73, 65, 65, + 65, 65, 129, 129, 129, 129, 176, 175, 165, 165, + 165, 165, 165, 165, 165, 164, 164, 164, 174, 174, + 174, 174, 106, 170, 178, 178, 177, 177, 179, 179, + 179, 179, 179, 179, 179, 179, 167, 167, 167, 167, + 181, 182, 180, 180, 180, 180, 180, 180, 180, 180, + 183, 183, 183, 183 ); protected $ruleToLength = array( @@ -1136,16 +1136,16 @@ class Php7 extends \PhpParser\ParserAbstract 1, 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 3, 3, 4, 1, 1, 3, - 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, - 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, - 4, 4, 1, 4, 4, 0, 1, 1, 1, 3, - 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, - 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, - 1, 4, 1, 1, 1, 3, 1, 1, 2, 1, - 3, 4, 3, 2, 0, 2, 2, 1, 2, 1, - 1, 1, 4, 3, 3, 3, 3, 6, 3, 1, - 1, 2, 1 + 1, 1, 1, 3, 5, 3, 3, 4, 1, 1, + 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, + 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, + 1, 4, 4, 1, 4, 4, 0, 1, 1, 1, + 3, 3, 1, 4, 2, 2, 1, 3, 1, 4, + 4, 3, 3, 3, 3, 1, 3, 1, 1, 3, + 1, 1, 4, 1, 1, 1, 3, 1, 1, 2, + 1, 3, 4, 3, 2, 0, 2, 2, 1, 2, + 1, 1, 1, 4, 3, 3, 3, 3, 6, 3, + 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -2767,35 +2767,35 @@ protected function initReduceCallbacks(): void { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 524 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 525 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + }, + 526 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 526 => function ($stackPos) { + 527 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); $this->createdArrays->attach($this->semValue); }, - 527 => function ($stackPos) { + 528 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, - 528 => function ($stackPos) { + 529 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 529 => function ($stackPos) { + 530 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, - 530 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); - }, 531 => function ($stackPos) { - $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 533 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2804,28 +2804,28 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 536 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 537 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 538 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 539 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 540 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 543 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2840,34 +2840,34 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 548 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 549 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 550 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 551 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 552 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 553 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 554 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 555 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 556 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 557 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2876,169 +2876,172 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 559 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 560 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 561 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 562 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 563 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 565 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 566 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 567 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 568 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 569 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 570 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 571 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 572 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 573 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 574 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 575 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 576 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 577 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 579 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 580 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 581 => function ($stackPos) { + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + }, + 582 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $this->postprocessList($this->semValue); }, - 582 => function ($stackPos) { + 583 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, - 583 => function ($stackPos) { + 584 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 584 => function ($stackPos) { + 585 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, - 585 => function ($stackPos) { + 586 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 586 => function ($stackPos) { + 587 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 587 => function ($stackPos) { + 588 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 588 => function ($stackPos) { + 589 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 589 => function ($stackPos) { + 590 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 590 => function ($stackPos) { + 591 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 591 => function ($stackPos) { + 592 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 592 => function ($stackPos) { + 593 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 593 => function ($stackPos) { + 594 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); }, - 594 => function ($stackPos) { + 595 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 595 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, 596 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 597 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 598 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 599 => function ($stackPos) { - $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 600 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 601 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 602 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 603 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 604 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 605 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 606 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 607 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 608 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 609 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 610 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 611 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 612 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 613 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index d1fc37d396..6cd99b6651 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -160,7 +160,7 @@ class Php8 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1255; + protected $actionTableSize = 1256; protected $gotoTableSize = 628; protected $invalidSymbol = 168; @@ -169,7 +169,7 @@ class Php8 extends \PhpParser\ParserAbstract protected $unexpectedTokenRule = 32767; protected $YY2TBLSTATE = 429; - protected $numNonLeafStates = 729; + protected $numNonLeafStates = 730; protected $symbolToName = array( "EOF", @@ -386,132 +386,132 @@ class Php8 extends \PhpParser\ParserAbstract ); protected $action = array( - 132, 133, 134, 578, 135, 136, 0, 741, 742, 743, - 137, 37,-32766,-32766,-32766, 979,-32766,-32766,-32766,-32766, - -32766,-32766, 1293, 817,-32767,-32767,-32767,-32767, 101, 102, - 103,-32766, 930,-32766, 828, 735, 734,-32766, 1016,-32766, + 132, 133, 134, 578, 135, 136, 0, 742, 743, 744, + 137, 37,-32766,-32766,-32766, 980,-32766,-32766,-32766,-32766, + -32766,-32766, 1295, 818,-32767,-32767,-32767,-32767, 101, 102, + 103,-32766, 931,-32766, 829, 736, 735,-32766, 1017,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1233, -365, 1025, -365, 744,-32766,-32766,-32766, 1100, - 1101, 1102, 1099, 1098, 1097, 1103, -327, -193, 819, 267, - 138, 399, 748, 749, 750, 751, 288,-32766, 423,-32766, - -32766,-32766,-32766,-32766, 602, 752, 753, 754, 755, 756, - 757, 758, 759, 760, 761, 762, 782, 579, 783, 784, - 785, 786, 774, 775, 340, 341, 777, 778, 763, 764, - 765, 767, 768, 769, 351, 809, 810, 811, 812, 813, - 580, 770, 771, 581, 582, 803, 794, 792, 793, 806, - 789, 790, 826, -192, 583, 584, 788, 585, 586, 587, - 588, 589, 590, 980, 821,-32766,-32766,-32766, 791, 591, - 592, 702, 139, 2, 132, 133, 134, 578, 135, 136, - 1049, 741, 742, 743, 137, 37,-32766, 12,-32766,-32766, + -32767, 1234, -365, 1026, -365, 745,-32766,-32766,-32766, 1101, + 1102, 1103, 1100, 1099, 1098, 1104, -327, -193, 820, 267, + 138, 399, 749, 750, 751, 752, 288,-32766, 423,-32766, + -32766,-32766,-32766,-32766, 602, 753, 754, 755, 756, 757, + 758, 759, 760, 761, 762, 763, 783, 579, 784, 785, + 786, 787, 775, 776, 340, 341, 778, 779, 764, 765, + 766, 768, 769, 770, 351, 810, 811, 812, 813, 814, + 580, 771, 772, 581, 582, 804, 795, 793, 794, 807, + 790, 791, 827, -192, 583, 584, 789, 585, 586, 587, + 588, 589, 590, 981, 822,-32766,-32766,-32766, 792, 591, + 592, 703, 139, 2, 132, 133, 134, 578, 135, 136, + 1050, 742, 743, 744, 137, 37,-32766, 12,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 34, - 238,-32766,-32766,-32766, 81, 128, -591,-32766, 322, 735, - 734, 608, 827, -591, 715, 386,-32766, 11,-32766,-32766, - -32766,-32766,-32766, 1313,-32766,-32766,-32766, 1309, 296, 744, - 1312, 74, 104, 105, 106, 107, 108, 322, 271, 1338, - -327, -193, 1339, 267, 138, 399, 748, 749, 750, 751, - 109, 476, 423,-32766,-32766,-32766, 551, 822, 126, 752, - 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, - 782, 579, 783, 784, 785, 786, 774, 775, 340, 341, - 777, 778, 763, 764, 765, 767, 768, 769, 351, 809, - 810, 811, 812, 813, 580, 770, 771, 581, 582, 803, - 794, 792, 793, 806, 789, 790, 817, -192, 583, 584, - 788, 585, 586, 587, 588, 589, 590, 1265, 82, 83, - 84, 1077, 791, 591, 592, 727, 148, 766, 736, 737, - 738, 739, 740, 823, 741, 742, 743, 779, 780, 36, + 238,-32766,-32766,-32766, 81, 128, -592,-32766, 322, 736, + 735, 608, 828, -592, 716, 386,-32766, 11,-32766,-32766, + -32766,-32766,-32766, 1315,-32766,-32766,-32766, 1311, 296, 745, + 1314, 74, 104, 105, 106, 107, 108, 322, 271, 1340, + -327, -193, 1341, 267, 138, 399, 749, 750, 751, 752, + 109, 476, 423,-32766,-32766,-32766, 551, 823, 126, 753, + 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, + 783, 579, 784, 785, 786, 787, 775, 776, 340, 341, + 778, 779, 764, 765, 766, 768, 769, 770, 351, 810, + 811, 812, 813, 814, 580, 771, 772, 581, 582, 804, + 795, 793, 794, 807, 790, 791, 818, -192, 583, 584, + 789, 585, 586, 587, 588, 589, 590, 1267, 82, 83, + 84, 1078, 792, 591, 592, 728, 148, 767, 737, 738, + 739, 740, 741, 824, 742, 743, 744, 780, 781, 36, 144, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, -591, 271, -591, 251, 375, - 376, 1100, 1101, 1102, 1099, 1098, 1097, 1103, 109, 417, - 948, 949, 744, 477, 289, 950,-32766,-32766,-32766, 141, - 1076, 944,-32766, 322, 377, 376, 745, 746, 747, 748, - 749, 750, 751, 307, 417, 815, 309,-32766, -542,-32766, - -32766, 320, 752, 753, 754, 755, 756, 757, 758, 759, - 760, 761, 762, 782, 805, 783, 784, 785, 786, 774, - 775, 776, 804, 777, 778, 763, 764, 765, 767, 768, - 769, 808, 809, 810, 811, 812, 813, 814, 770, 771, - 772, 773, 803, 794, 792, 793, 806, 789, 790, 239, - -86, 781, 787, 788, 795, 796, 798, 797, 799, 800, - -32766, 1022, -542, -542, 932, 791, 802, 801, 49, 50, - 51, 507, 52, 53, 423, 335, 932, -542, 54, 55, - -111, 56, 1025, 1025, 910, -111, 150, -111, 289, -548, - -32766, -542, 303,-32766,-32766, -111, -111, -111, -111, -111, - -111, -111, -111, 352, 910, 288, 279, 853, 1233, 854, - 336,-32766, 1233, 14, 705, 357, -86, 57, 58,-32766, - 365, -541, 59, 369, 60, 245, 246, 61, 62, 63, - 64, 65, 66, 67, 68, 1092, 27, 269, 69, 439, - 508, 1025, -16, -341, 1259, 1260, 509, 384, 826, 1228, - 1227, 1229, 1257, 41, 24, 510, 825, 511, 1078, 512, - 910, 513, 735, 734, 514, 515, 853, 900, 854, 43, - 44, 440, 372, 371,-32766, 45, 516, 1012, 1011, 1010, - 1013, 363, 334, 435, 1226, -541, -541, 900, 1219, 826, - 518, 519, 520, 826, 1022, 436, 1025, -271, 1253, -582, - -541, -582, 522, 523, 437, 1247, 1248, 1249, 1250, 1244, - 1245, 295, -547, 151, -541, 438, 1025, 1251, 1246, 288, - 1224, 1228, 1227, 1229, 296, 102, 103, 70, 910, 651, - 25, 318, 319, 322, -153, -153, -153, 910, 832, -111, - 123, 1024, 912, 900,-32766, 910, 700, 153,-32766, -153, - -88, -153, 154, -153, 1048, -153,-32766,-32766, 706, 1228, - 1227, 1229, 912, 124, -588, 370, 700, 707, 74, 296, - 155, -588, 74, 157, 322, 710, 948, 949, 322, 826, - 129, 517, 910, 283, 32, 323, 886, 944, -111, -111, + 104, 105, 106, 107, 108, -592, 271, -592, 251, 375, + 376, 1101, 1102, 1103, 1100, 1099, 1098, 1104, 109, 417, + 949, 950, 745, 477, 289, 951,-32766,-32766,-32766, 141, + 1077, 945,-32766, 322, 377, 376, 746, 747, 748, 749, + 750, 751, 752, 307, 417, 816, 309,-32766, -543,-32766, + -32766, 320, 753, 754, 755, 756, 757, 758, 759, 760, + 761, 762, 763, 783, 806, 784, 785, 786, 787, 775, + 776, 777, 805, 778, 779, 764, 765, 766, 768, 769, + 770, 809, 810, 811, 812, 813, 814, 815, 771, 772, + 773, 774, 804, 795, 793, 794, 807, 790, 791, 239, + -86, 782, 788, 789, 796, 797, 799, 798, 800, 801, + -32766, 1023, -543, -543, 933, 792, 803, 802, 49, 50, + 51, 507, 52, 53, 423, 335, 933, -543, 54, 55, + -111, 56, 1026, 1026, 911, -111, 150, -111, 289, -549, + -32766, -543, 303,-32766,-32766, -111, -111, -111, -111, -111, + -111, -111, -111, 352, 911, 288, 279, 854, 1234, 855, + 336,-32766, 1234, 14, 706, 357, -86, 57, 58,-32766, + 365, -542, 59, 369, 60, 245, 246, 61, 62, 63, + 64, 65, 66, 67, 68, 1093, 27, 269, 69, 439, + 508, 1026, -16, -341, 1261, 1262, 509, 384, 827, 1229, + 1228, 1230, 1259, 41, 24, 510, 826, 511, 1079, 512, + 911, 513, 736, 735, 514, 515, 854, 901, 855, 43, + 44, 440, 372, 371,-32766, 45, 516, 1013, 1012, 1011, + 1014, 363, 334, 435, 1227, -542, -542, 901, 1220, 827, + 518, 519, 520, 827, 1023, 436, 1026, -271, 1255, -583, + -542, -583, 522, 523, 437, 1248, 1249, 1250, 1251, 1245, + 1246, 295, -548, 151, -542, 438, 1026, 1252, 1247, 288, + 1225, 1229, 1228, 1230, 296, 102, 103, 70, 911, 652, + 25, 318, 319, 322, -153, -153, -153, 911, 833, -111, + 123, 1025, 913, 901,-32766, 911, 701, 153,-32766, -153, + -88, -153, 154, -153, 1049, -153,-32766,-32766, 707, 1229, + 1228, 1230, 913, 124, -589, 370, 701, 708, 74, 296, + 155, -589, 74, 157, 322, 711, 949, 950, 322, 827, + 129, 517, 911, 283, 32, 323, 887, 945, -111, -111, -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 735, 734, 453, 454, 455, - 130, 900, 717, 735, 734, -543, 826, 143, 912, 1328, - 900, 158, 700, -153, 670, 671, 948, 949, 900, 149, - 402, 950, 373, 374, 1138, 1140, -545, 945, 378, 379, - 642, 643,-32766, 159, 160, -540, 27, 161, 1226, 461, - 462, -85, -79, -75, -73,-32766,-32766,-32766, 826,-32766, - 140,-32766, 1257,-32766, 322, 900,-32766, 47, -72, 1022, - -71,-32766,-32766,-32766, -4, 910, -70,-32766,-32766, -543, - -543, 35, 248,-32766, 414, -69, 912, -68, -67, -66, - 700, 1025,-32766, -47, -543, 965, 735, 734, 1219, 700, - -545, -545, -540, 912, -18, -301, 48, 700, -543, -540, - -540, 147, 522, 523, 279, 1247, 1248, 1249, 1250, 1244, - 1245, 270, 73, -588, -540, -588, 280, 1251, 1246, -545, - 716, 297, 298,-32766, 719, 909, 146, 72, -540, 1226, - 912, -297, 319, 322, 700, 277,-32766,-32766,-32766, 278, - -32766, 281,-32766, 282,-32766, 328, 284,-32766, 900, 285, - 125, 290,-32766,-32766,-32766, 291, -540, -540,-32766,-32766, - 299, 300, -51, 926,-32766, 414, 109, 680, 271, 145, - 370, -540, 430,-32766, 826, 368,-32766, 294, 817, 693, - 673, 948, 949, 1107, 657, -540, 517, 553, 1340, 127, - 640, 521, 944, -111, -111, -111, 131, 652, 304, 434, - 13, 301, 557,-32766, 308,-32766, 302, 1264, 1266, 563, - 606, 1226, 458, 487, 9, 1254, -506, 658,-32766,-32766, - -32766, 674,-32766, 912,-32766, -496,-32766, 700, -4,-32766, - 7, 16, 367, 928,-32766,-32766,-32766, 39, 33,-32766, - -32766,-32766, 910, 0, 0, 1226,-32766, 414, 0, 0, + 118, 119, 120, 121, 122, 736, 735, 453, 454, 455, + 130, 901, 718, 736, 735, -544, 827, 143, 913, 1330, + 901, 158, 701, -153, 671, 672, 949, 950, 901, 149, + 402, 951, 373, 374, 1139, 1141, -546, 946, 378, 379, + 643, 644,-32766, 159, 160, -541, 27, 161, 1227, 461, + 462, -85, -79, -75, -73,-32766,-32766,-32766, 827,-32766, + 140,-32766, 1259,-32766, 322, 901,-32766, 47, -72, 1023, + -71,-32766,-32766,-32766, -4, 911, -70,-32766,-32766, -544, + -544, 35, 248,-32766, 414, -69, 913, -68, -67, -66, + 701, 1026,-32766, -47, -544, 966, 736, 735, 1220, 701, + -546, -546, -541, 913, -18, -301, 48, 701, -544, -541, + -541, 147, 522, 523, 279, 1248, 1249, 1250, 1251, 1245, + 1246, 270, 73, -589, -541, -589, 280, 1252, 1247, -546, + 717, 297, 298,-32766, 720, 910, 146, 72, -541, 1227, + 913, -297, 319, 322, 701, 277,-32766,-32766,-32766, 278, + -32766, 281,-32766, 282,-32766, 328, 284,-32766, 901, 285, + 125, 290,-32766,-32766,-32766, 291, -541, -541,-32766,-32766, + 299, 300, -51, 927,-32766, 414, 109, 681, 271, 145, + 370, -541, 430,-32766, 827, 368,-32766, 294, 818, 694, + 674, 949, 950, 1108, 658, -541, 517, 553, 1342, 127, + 641, 521, 945, -111, -111, -111, 131, 653, 304, 434, + 13, 301, 557,-32766, 308,-32766, 302, 1266, 1268, 563, + 606, 1227, 458, 487, 9, 1256, -506, 659,-32766,-32766, + -32766, 675,-32766, 913,-32766, -496,-32766, 701, -4,-32766, + 7, 16, 367, 929,-32766,-32766,-32766, 39, 33,-32766, + -32766,-32766, 911, 0, 0, 1227,-32766, 414, 0, 0, 0, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, -32766, 0, 0,-32766, 0, 0, 0, 0,-32766,-32766, - -32766,-32766, 0, 0,-32766,-32766, 0, 1226, 825, 40, - -32766, 414, 910, 724,-32766,-32766,-32766, 296,-32766,-32766, - -32766, 725,-32766, 845, 891,-32766, 989, 966, 973, 482, - -32766,-32766,-32766,-32766, 963, 974,-32766,-32766, 889, 1226, - 570, 961,-32766, 414, 1081, 1084,-32766,-32766,-32766, 1085, - -32766,-32766,-32766, 1082,-32766, 900, 1083,-32766, 1089, -576, - 837, 1279,-32766,-32766,-32766, 1297, 1331, 645,-32766,-32766, - -574, -249, -249, -249,-32766, 414, -548, 370, -547, -546, - 27, 269, -490,-32766, 1, 28, 29, 38, 948, 949, - 42, 46, 826, 517, 71, 900, 1257, 75, 886, 944, - -111, -111, -111, 76, 77, 78, 79, 80, 142, 152, - 156, -248, -248, -248, 244, 324, 352, 370, 353, 354, - 721, 355, 356, 357, 358, 359, 360, 361, 948, 949, - 912, 362, 1219, 517, 700, -249, 364, 431, 886, 944, - -111, -111, -111, 550, 317, -274, -272, 523, 27, 1247, - 1248, 1249, 1250, 1244, 1245, -271, 18, 19, 20, 21, - 826, 1251, 1246, 23, 1257, 401,-32766, 478, 479, 486, - 912, 72, 1226, 887, 700, -248, 319, 322, 489,-32766, - -32766,-32766, 490,-32766, 491,-32766, 492,-32766, 496, 497, - -32766, 498, 505, 568, 687,-32766,-32766,-32766, 1237, 1178, - 1219,-32766,-32766, 1255, 1051, 1050, 1031,-32766, 414, 1214, - 1027, -276, -103, 17, 22, 523,-32766, 1247, 1248, 1249, - 1250, 1244, 1245, 26, 293, 400, 599, 603, 631, 1251, - 1246, 692, 1182, 1232, 1179, 1310, 0, 366, 701, 72, - 704, -510, 708, 709, 319, 322, 711, 712, 713, 714, - 718, 703, 0, 1335, 1337, 848, 0, 847, 856, 938, - 981, 855, 1336, 937, 935, 936, 939, 1210, 919, 929, - 917, 971, 972, 1334, 1291, 1280, 1298, 1304, 1307, 0, - 1195, 0, 1258, 0, 322 + -32766,-32766, 0, 0,-32766,-32766, 0, 1227, 826, 40, + -32766, 414, 911, 725,-32766,-32766,-32766, 296,-32766,-32766, + -32766, 726,-32766, 846, 892,-32766, 990, 967, 974, 482, + -32766,-32766,-32766,-32766, 964, 975,-32766,-32766, 890, 1227, + 570, 962,-32766, 414, 1082, 1085,-32766,-32766,-32766, 1086, + -32766,-32766,-32766, 1083,-32766, 901, 1084,-32766, 1090, -577, + 838, 1281,-32766,-32766,-32766, 1299, 1333, 646,-32766,-32766, + -576, -249, -249, -249,-32766, 414, -575, 370, -549, -548, + 27, 269, -547,-32766, -490, 1, 28, 29, 949, 950, + 38, 42, 827, 517, 46, 901, 1259, 71, 887, 945, + -111, -111, -111, 75, 76, 77, 78, 79, 80, 142, + 152, -248, -248, -248, 156, 244, 324, 370, 352, 353, + 722, 354, 355, 356, 357, 358, 359, 360, 949, 950, + 913, 361, 1220, 517, 701, -249, 362, 364, 887, 945, + -111, -111, -111, 431, 550, 888, -274, 523, 27, 1248, + 1249, 1250, 1251, 1245, 1246, -272, -271, 18, 19, 20, + 827, 1252, 1247, 21, 1259, 23,-32766, 401, 478, 479, + 913, 72, 1227, 1337, 701, -248, 319, 322, 486,-32766, + -32766,-32766, 489,-32766, 490,-32766, 491,-32766, 492, 496, + -32766, 497, 498, 505, 568,-32766,-32766,-32766, 688, 1238, + 1220,-32766,-32766, 1179, 1257, 1052, 1051,-32766, 414, 1032, + 1215, 1028, -276, -103, 17, 523,-32766, 1248, 1249, 1250, + 1251, 1245, 1246, 22, 26, 293, 400, 599, 603, 1252, + 1247, 632, 693, 1183, 1233, 1180, 1312, 0, 317, 72, + 366, -510, 702, 705, 319, 322, 709, 710, 712, 713, + 714, 715, 719, 704, 0, 1339, 0, 849, 848, 857, + 939, 982, 856, 1338, 938, 936, 937, 940, 1211, 920, + 930, 918, 972, 973, 630, 1336, 1293, 1282, 1300, 1309, + 0, 1196, 0, 1260, 0, 322 ); protected $actionCheck = array( @@ -626,7 +626,7 @@ class Php8 extends \PhpParser\ParserAbstract 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, - 129, 130, 131, 161, 163, 162, 162, 137, 70, 139, + 129, 130, 131, 161, 161, 164, 162, 137, 70, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, @@ -635,12 +635,12 @@ class Php8 extends \PhpParser\ParserAbstract 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, - 152, 162, 162, 162, 162, 162, -1, 163, 163, 161, + 152, 162, 162, 162, 162, 162, 162, -1, 163, 161, 163, 165, 163, 163, 166, 167, 163, 163, 163, 163, - 163, 163, -1, 164, 164, 164, -1, 164, 164, 164, + 163, 163, 163, 163, -1, 164, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, -1, - 165, -1, 166, -1, 167 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + -1, 165, -1, 166, -1, 167 ); protected $actionBase = array( @@ -660,9 +660,9 @@ class Php8 extends \PhpParser\ParserAbstract 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 33, -16, 83, 660, 1032, 1040, 1034, 1041, - 1022, 1021, 1033, 1035, 1042, 1079, 1080, 795, 1081, 1082, - 1083, 1084, 1036, 877, 1031, 1039, 289, 289, 289, 289, + 1062, 1062, 33, -16, 83, 660, 1033, 1041, 1035, 1042, + 1031, 1022, 1034, 1036, 1043, 1081, 1082, 795, 1083, 1084, + 1080, 1085, 1039, 877, 1032, 1040, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 363, 224, 474, 10, 10, 10, 10, 10, @@ -674,51 +674,51 @@ class Php8 extends \PhpParser\ParserAbstract 643, 497, 402, -54, 566, 334, 243, 335, 335, 468, 468, -85, -85, 468, 468, 468, 161, 161, 393, 393, 393, 393, 318, 441, 391, 151, 766, 206, 206, 206, - 206, 766, 766, 766, 766, 762, 1086, 766, 766, 766, + 206, 766, 766, 766, 766, 762, 1087, 766, 766, 766, 635, 722, 722, 726, 595, 595, 722, 450, 802, 624, 450, 624, 21, 139, 364, 599, 268, 429, 364, 656, - 687, 653, 185, 823, 616, 823, 1020, 332, 791, 344, - 752, 712, 869, 1058, 1043, 817, 1077, 821, 1078, 568, - 605, 711, 1019, 1019, 1019, 1019, 1019, 1019, 1019, 1019, - 1019, 1019, 1019, 1087, 515, 1020, 157, 1087, 1087, 1087, + 687, 653, 185, 823, 616, 823, 1021, 332, 791, 344, + 752, 712, 869, 1060, 1044, 817, 1078, 821, 1079, 568, + 605, 711, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, + 1020, 1020, 1020, 1088, 515, 1021, 157, 1088, 1088, 1088, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 619, 157, 544, 639, 157, 810, 515, 33, 776, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 763, 200, 33, -16, 31, 31, 142, 37, 31, 31, 31, 31, 33, 33, 33, 616, 811, 756, 622, 757, 125, 811, 811, 811, 409, 58, 425, 59, 760, 796, 89, - 798, 798, 801, 893, 893, 798, 792, 798, 801, 900, - 798, 798, 893, 893, 829, 177, 565, 457, 505, 577, - 893, 375, 798, 798, 798, 798, 772, 586, 798, 340, - 312, 798, 798, 772, 769, 785, 145, 773, 893, 893, - 893, 772, 502, 773, 773, 773, 824, 832, 777, 780, + 798, 798, 801, 894, 894, 798, 792, 798, 801, 903, + 798, 798, 894, 894, 829, 177, 565, 457, 505, 577, + 894, 375, 798, 798, 798, 798, 772, 586, 798, 340, + 312, 798, 798, 772, 769, 785, 145, 773, 894, 894, + 894, 772, 502, 773, 773, 773, 824, 832, 777, 780, 383, 378, 620, 171, 825, 780, 780, 798, 529, 777, 780, 777, 780, 779, 780, 780, 780, 777, 780, 792, - 492, 780, 695, 597, 159, 780, 6, 903, 906, 609, - 912, 896, 913, 946, 914, 915, 1045, 891, 923, 899, - 916, 952, 895, 894, 794, 614, 637, 781, 767, 888, - 797, 797, 797, 885, 797, 797, 797, 797, 797, 797, - 797, 797, 614, 755, 783, 771, 813, 927, 654, 684, - 1001, 761, 979, 1046, 1085, 925, 1006, 917, 778, 691, - 971, 928, 926, 951, 930, 931, 973, 1007, 834, 1011, - 1059, 799, 1060, 1061, 870, 933, 1047, 797, 903, 915, - 710, 899, 916, 895, 894, 748, 747, 744, 746, 735, - 729, 713, 727, 770, 1012, 879, 868, 871, 932, 887, - 614, 875, 964, 775, 975, 976, 1044, 815, 805, 876, - 1063, 934, 935, 936, 1049, 1013, 1050, 820, 965, 953, - 977, 816, 1064, 986, 990, 992, 994, 1053, 1065, 1054, - 1055, 835, 807, 954, 788, 1066, 462, 806, 808, 818, - 945, 589, 924, 1056, 1067, 1068, 996, 997, 999, 1069, - 1070, 918, 837, 966, 786, 967, 963, 838, 839, 623, - 814, 1014, 800, 804, 812, 628, 646, 1071, 1072, 1073, - 919, 789, 790, 845, 846, 1017, 809, 1018, 1074, 649, - 849, 717, 1075, 1002, 718, 721, 787, 1057, 782, 784, - 803, 940, 793, 852, 1076, 855, 856, 860, 1000, 864, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 492, 780, 695, 597, 159, 780, 6, 906, 912, 609, + 913, 899, 914, 952, 915, 916, 1049, 893, 924, 900, + 917, 953, 896, 895, 794, 614, 637, 781, 767, 891, + 797, 797, 797, 887, 797, 797, 797, 797, 797, 797, + 797, 797, 614, 755, 783, 771, 813, 928, 654, 684, + 1002, 761, 951, 1046, 1086, 927, 1007, 918, 778, 691, + 973, 930, 926, 1045, 931, 932, 975, 1011, 834, 1012, + 979, 799, 1061, 1063, 870, 934, 1050, 797, 906, 916, + 710, 900, 917, 896, 895, 748, 747, 744, 746, 735, + 729, 713, 727, 770, 1013, 885, 868, 871, 933, 888, + 614, 875, 965, 775, 976, 977, 1047, 815, 805, 876, + 1064, 935, 936, 940, 1053, 1014, 1054, 820, 966, 954, + 986, 816, 1065, 990, 992, 994, 996, 1055, 1066, 1056, + 879, 1057, 835, 807, 963, 788, 1067, 462, 806, 808, + 818, 946, 589, 925, 1058, 1068, 1069, 997, 999, 1000, + 1070, 1071, 919, 837, 967, 786, 971, 964, 838, 839, + 623, 814, 1017, 800, 804, 812, 628, 646, 1072, 1073, + 1074, 923, 789, 790, 845, 846, 1018, 809, 1019, 1075, + 649, 849, 717, 1076, 1006, 718, 721, 787, 1059, 782, + 784, 803, 945, 793, 852, 1077, 855, 856, 860, 1001, + 864, 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, - 456, 456, 456, 456, 456, 456, 305, 305, 305, 305, - 0, 0, 305, 0, 0, 0, 456, 456, 456, 456, + 0, 456, 456, 456, 456, 456, 456, 305, 305, 305, + 305, 0, 0, 305, 0, 0, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, @@ -733,41 +733,41 @@ class Php8 extends \PhpParser\ParserAbstract 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 456, 456, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 0, 0, 0, 0, 0, + 289, 289, 289, 289, 289, 289, 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, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 0, 0, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 494, 494, 289, - 289, 494, 289, 494, 494, 494, 494, 494, 494, 494, - 494, 494, 0, 289, 289, 289, 289, 289, 289, 289, - 289, 829, 161, 161, 161, 161, 494, 494, 494, 494, - 494, 235, 235, 161, 494, 829, 494, 494, 494, 494, - 494, 494, 494, 494, 494, 0, 0, 494, 494, 494, - 494, 0, 0, 157, 624, 494, 792, 792, 792, 792, - 494, 494, 494, 494, 624, 624, 494, 494, 494, 0, - 0, 0, 0, 161, 161, 0, 157, 624, 0, 157, - 0, 792, 792, 494, 0, 829, 202, 494, 0, 0, - 0, 0, 157, 792, 157, 515, 798, 624, 798, 515, - 515, 31, 33, 202, 618, 618, 618, 618, 0, 0, - 616, 829, 829, 829, 829, 829, 829, 829, 829, 829, - 829, 829, 792, 0, 829, 0, 792, 792, 792, 0, + 289, 289, 289, 289, 289, 289, 289, 289, 494, 494, + 289, 289, 494, 289, 494, 494, 494, 494, 494, 494, + 494, 494, 494, 0, 289, 289, 289, 289, 289, 289, + 289, 289, 829, 161, 161, 161, 161, 494, 494, 494, + 494, 494, 235, 235, 161, 494, 829, 494, 494, 494, + 494, 494, 494, 494, 494, 494, 0, 0, 494, 494, + 494, 494, 0, 0, 157, 624, 494, 792, 792, 792, + 792, 494, 494, 494, 494, 624, 624, 494, 494, 494, + 0, 0, 0, 0, 161, 161, 0, 157, 624, 0, + 157, 0, 792, 792, 494, 0, 829, 202, 494, 0, + 0, 0, 0, 157, 792, 157, 515, 798, 624, 798, + 515, 515, 31, 33, 202, 618, 618, 618, 618, 0, + 0, 616, 829, 829, 829, 829, 829, 829, 829, 829, + 829, 829, 829, 792, 0, 829, 0, 792, 792, 792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 792, 0, 0, 893, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 900, 0, - 0, 0, 0, 0, 0, 792, 0, 0, 0, 0, - 0, 0, 0, 0, 797, 815, 0, 815, 0, 797, - 797, 797, 0, 0, 0, 0, 814, 809 + 0, 0, 0, 0, 0, 792, 0, 0, 894, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 903, + 0, 0, 0, 0, 0, 0, 792, 0, 0, 0, + 0, 0, 0, 0, 0, 797, 815, 0, 815, 0, + 797, 797, 797, 0, 0, 0, 0, 814, 809 ); protected $actionDefault = array( 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 594, 594, 594, - 594,32767,32767, 253, 103,32767,32767, 468, 385, 385, - 385,32767,32767, 538, 538, 538, 538, 538, 538,32767, + 32767,32767,32767,32767,32767,32767,32767, 595, 595, 595, + 595,32767,32767, 253, 103,32767,32767, 468, 385, 385, + 385,32767,32767, 539, 539, 539, 539, 539, 539,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,32767,32767,32767, @@ -779,10 +779,10 @@ class Php8 extends \PhpParser\ParserAbstract 32767,32767, 37, 7, 8, 10, 11, 50, 17, 323, 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 587,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 588,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767, 472, 451, 452, 454, - 455, 384, 539, 593, 326, 590, 383, 146, 338, 328, + 455, 384, 540, 594, 326, 591, 383, 146, 338, 328, 241, 329, 257, 473, 258, 474, 477, 478, 214, 286, 380, 150, 415, 469, 417, 467, 471, 416, 390, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, @@ -792,121 +792,121 @@ class Php8 extends \PhpParser\ParserAbstract 436, 439,32767, 440, 441, 442, 443,32767, 315,32767, 32767,32767, 364, 362, 422, 315, 112,32767,32767,32767, 32767,32767,32767,32767,32767,32767, 428, 429,32767,32767, - 32767,32767, 532, 445,32767,32767,32767,32767,32767,32767, + 32767,32767, 533, 445,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767, 103,32767, 101, - 534, 410, 412, 502, 423, 424, 391,32767, 509,32767, - 103, 511,32767,32767,32767,32767,32767,32767,32767, 533, - 32767, 540, 540,32767, 495, 101, 194,32767,32767,32767, + 535, 410, 412, 502, 423, 424, 391,32767, 509,32767, + 103, 511,32767,32767,32767,32767,32767,32767,32767, 534, + 32767, 541, 541,32767, 495, 101, 194,32767,32767,32767, 194, 194,32767,32767,32767,32767,32767,32767,32767,32767, - 601, 495, 111, 111, 111, 111, 111, 111, 111, 111, + 602, 495, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,32767, 194, 111,32767,32767,32767, 101, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 189,32767, 267, 269, 103, 555, 194,32767, 514,32767, + 189,32767, 267, 269, 103, 556, 194,32767, 514,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 507, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 495, 433, 139,32767, 139, 540, - 425, 426, 427, 497, 540, 540, 540, 311, 288,32767, + 32767,32767,32767,32767, 495, 433, 139,32767, 139, 541, + 425, 426, 427, 497, 541, 541, 541, 311, 288,32767, 32767,32767,32767, 512, 512, 101, 101, 101, 101, 507, 32767,32767,32767,32767, 112, 100, 100, 100, 100, 100, 104, 102,32767,32767,32767,32767, 222, 100,32767, 102, - 102,32767,32767, 222, 224, 211, 102, 226,32767, 559, - 560, 222, 102, 226, 226, 226, 246, 246, 484, 317, + 102,32767,32767, 222, 224, 211, 102, 226,32767, 560, + 561, 222, 102, 226, 226, 226, 246, 246, 484, 317, 102, 100, 102, 102, 196, 317, 317,32767, 102, 484, 317, 484, 317, 198, 317, 317, 317, 484, 317,32767, 102, 317, 213, 100, 100, 317,32767,32767,32767, 497, 32767,32767,32767,32767,32767,32767,32767, 221,32767,32767, - 32767,32767,32767,32767,32767,32767, 527,32767, 544, 557, - 431, 432, 434, 542, 456, 457, 458, 459, 460, 461, - 462, 464, 589,32767, 501,32767,32767,32767,32767, 337, - 32767, 599,32767, 599,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 528,32767, 545, 558, + 431, 432, 434, 543, 456, 457, 458, 459, 460, 461, + 462, 464, 590,32767, 501,32767,32767,32767,32767, 337, + 32767, 600,32767, 600,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 600,32767, 540,32767,32767,32767,32767, 430, 9, 76, + 601,32767, 541,32767,32767,32767,32767, 430, 9, 76, 490, 43, 44, 52, 58, 518, 519, 520, 521, 515, - 516, 522, 517,32767,32767, 523, 565,32767,32767, 541, - 592,32767,32767,32767,32767,32767,32767, 139,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 527, + 516, 522, 517,32767,32767, 523, 566,32767,32767, 542, + 593,32767,32767,32767,32767,32767,32767, 139,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 528, 32767, 137,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 540,32767,32767,32767,32767, 313, 310, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 540,32767,32767,32767, - 32767,32767, 290,32767, 307,32767,32767,32767,32767,32767, + 524,32767,32767,32767, 541,32767,32767,32767,32767, 313, + 310,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 541,32767,32767, + 32767,32767,32767, 290,32767, 307,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 285,32767,32767, 379,32767,32767,32767,32767, 358, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 152, 152, 3, 3, 340, 152, 152, 152, 340, 340, - 152, 340, 340, 340, 152, 152, 152, 152, 152, 152, - 279, 184, 261, 264, 246, 246, 152, 350, 152 + 32767,32767, 285,32767,32767, 379,32767,32767,32767,32767, + 358,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 152, 152, 3, 3, 340, 152, 152, 152, 340, + 340, 152, 340, 340, 340, 152, 152, 152, 152, 152, + 152, 279, 184, 261, 264, 246, 246, 152, 350, 152 ); protected $goto = array( - 194, 194, 688, 425, 656, 1325, 1325, 316, 1054, 419, - 311, 312, 331, 572, 424, 332, 426, 633, 843, 346, - 696, 1325, 276, 276, 276, 276, 165, 165, 165, 165, + 194, 194, 689, 425, 657, 1327, 1327, 316, 1055, 419, + 311, 312, 331, 572, 424, 332, 426, 634, 346, 844, + 697, 1327, 276, 276, 276, 276, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, 188, 189, 190, 215, 213, 216, 530, 531, 415, 532, - 534, 535, 536, 537, 538, 539, 540, 541, 1124, 166, + 534, 535, 536, 537, 538, 539, 540, 541, 1125, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, 176, 212, 214, 217, 235, 240, 241, 243, 254, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, 274, 286, 287, 314, 315, 420, 421, 422, 577, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1124, 199, 180, + 236, 186, 187, 188, 189, 190, 215, 1125, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 846, 596, 619, 619, 844, 903, 1256, 904, 1256, - 1256, 1256, 1256, 1256, 1256, 1256, 1256, 1256, 350, 649, - 650, 820, 667, 668, 669, 964, 1274, 1274, 350, 350, - 1274, 818, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, - 1274, 350, 350, 877, 350, 851, 1341, 899, 894, 895, - 908, 852, 896, 849, 897, 898, 850, 549, 344, 902, - 839, 350, 569, 460, 460, 1314, 249, 249, 389, 1075, - 1071, 1072, 460, 1272, 1272, 985, 418, 1272, 607, 1272, - 1272, 1272, 1272, 1272, 1272, 1272, 1272, 1272, 470, 1299, - 1300, 567, 247, 247, 247, 247, 242, 250, 956, 405, - 695, 1225, 1023, 1225, 1023, 1225, 347, 348, 1285, 1023, - 839, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, - 655, 444, 1023, 1023, 1023, 1023, 444, 1121, 444, 681, - 1225, 1173, 473, 555, 547, 1225, 1225, 1225, 1225, 824, - 475, 1225, 1225, 1225, 1306, 1306, 1306, 1306, 605, 620, - 623, 624, 625, 626, 646, 647, 648, 698, 915, 549, - 617, 653, 916, 337, 547, 555, 564, 565, 339, 575, - 598, 612, 613, 349, 349, 349, 349, 432, 824, 15, - 824, 533, 533, 452, 931, 533, 931, 533, 533, 533, + 211, 847, 596, 619, 619, 845, 904, 1258, 905, 1258, + 1258, 1258, 1258, 1258, 1258, 1258, 1258, 1258, 350, 650, + 651, 821, 668, 669, 670, 965, 1276, 1276, 350, 350, + 1276, 819, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, + 1276, 350, 350, 878, 350, 852, 1343, 900, 895, 896, + 909, 853, 897, 850, 898, 899, 851, 549, 344, 903, + 840, 350, 569, 460, 460, 1316, 249, 249, 389, 1076, + 1072, 1073, 460, 1274, 1274, 986, 418, 1274, 607, 1274, + 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 470, 1301, + 1302, 567, 247, 247, 247, 247, 242, 250, 957, 405, + 696, 1226, 1024, 1226, 1024, 1226, 347, 348, 1287, 1024, + 840, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, + 656, 444, 1024, 1024, 1024, 1024, 444, 1122, 444, 682, + 1226, 1174, 473, 555, 547, 1226, 1226, 1226, 1226, 825, + 475, 1226, 1226, 1226, 1308, 1308, 1308, 1308, 605, 620, + 623, 624, 625, 626, 647, 648, 649, 699, 916, 549, + 617, 654, 917, 337, 547, 555, 564, 565, 339, 575, + 598, 612, 613, 349, 349, 349, 349, 432, 825, 15, + 825, 533, 533, 452, 932, 533, 932, 533, 533, 533, 533, 533, 533, 533, 533, 533, 544, 5, 544, 6, - 544, 595, 1088, 677, 699, 685, 685, 661, 502, 691, - 1086, 444, 444, 444, 444, 444, 444, 444, 444, 444, - 444, 444, 1218, 836, 444, 450, 1324, 1324, 839, 333, - 958, 958, 958, 958, 864, 562, 450, 952, 959, 723, - 632, 634, 1324, 947, 654, 627, 629, 630, 678, 682, - 999, 686, 694, 995, 842, 542, 542, 542, 542, 1327, - 600, 398, 1296, 1007, 1296, 859, 1296, 988, 962, 962, - 960, 962, 722, 861, 546, 997, 992, 548, 559, 611, - 871, 1216, 548, 858, 559, 1095, 1096, 392, 456, 1220, - 1032, 1033, 1308, 1308, 1308, 1308, 1029, 1028, 726, 463, - 576, 464, 465, 252, 252, 869, 321, 306, 1332, 1333, - 1060, 403, 404, 1301, 1302, 873, 665, 1292, 666, 1064, - 407, 408, 409, 471, 679, 920, 1111, 410, 573, 610, - 1106, 342, 615, 0, 867, 0, 0, 969, 1004, 872, - 860, 1059, 1063, 1221, 1222, 494, 863, 495, 659, 983, - 967, 834, 0, 501, 857, 0, 0, 0, 1062, 0, - 0, 0, 1294, 1294, 1062, 427, 1215, 0, 0, 1223, - 1282, 1283, 427, 0, 957, 0, 0, 0, 1030, 1030, - 428, 0, 0, 0, 0, 660, 1041, 1037, 1038, 676, - 941, 0, 0, 1018, 1034, 1035, 1104, 876, 0, 1204, - 933, 0, 0, 1205, 1208, 934, 1209, 391, 394, 556, + 544, 595, 1089, 678, 700, 686, 686, 662, 502, 692, + 1087, 444, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 1219, 837, 444, 450, 1326, 1326, 840, 333, + 959, 959, 959, 959, 865, 562, 450, 953, 960, 724, + 633, 635, 1326, 948, 655, 627, 629, 631, 679, 683, + 1000, 687, 695, 996, 843, 542, 542, 542, 542, 1329, + 600, 398, 1298, 1008, 1298, 860, 1298, 989, 963, 963, + 961, 963, 723, 862, 546, 998, 993, 548, 559, 611, + 872, 1217, 548, 859, 559, 1096, 1097, 392, 456, 1221, + 1033, 1034, 1310, 1310, 1310, 1310, 1030, 1029, 727, 463, + 576, 464, 465, 252, 252, 870, 321, 306, 1334, 1335, + 1061, 403, 404, 1303, 1304, 874, 666, 1294, 667, 1065, + 407, 408, 409, 471, 680, 921, 1112, 410, 573, 610, + 1107, 342, 615, 0, 868, 0, 0, 970, 1005, 873, + 861, 1060, 1064, 1222, 1223, 494, 864, 495, 660, 984, + 968, 835, 0, 501, 858, 0, 0, 0, 1063, 0, + 0, 0, 1296, 1296, 1063, 427, 1216, 0, 0, 1224, + 1284, 1285, 427, 0, 958, 0, 0, 0, 1031, 1031, + 428, 0, 0, 0, 0, 661, 1042, 1038, 1039, 677, + 942, 0, 0, 1019, 1035, 1036, 1105, 877, 0, 1205, + 934, 0, 0, 1206, 1209, 935, 1210, 391, 394, 556, 597, 601, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 272, 0, 0, 0, 0, 545, 0, 545, 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, 1002, 1002 + 0, 0, 0, 0, 0, 0, 1003, 1003 ); protected $gotoCheck = array( 42, 42, 72, 65, 65, 181, 181, 65, 126, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 26, 96, + 65, 65, 65, 65, 65, 65, 65, 65, 96, 26, 9, 181, 23, 23, 23, 23, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -971,16 +971,16 @@ class Php8 extends \PhpParser\ParserAbstract ); protected $gotoBase = array( - 0, 0, -214, 0, 0, 225, 178, 172, 354, 7, + 0, 0, -215, 0, 0, 225, 178, 172, 354, 7, 0, 0, 5, -97, -117, -182, 53, 26, 76, 89, - 61, 0, -56, 19, 330, 410, 14, 161, 88, 95, + 61, 0, -56, 19, 330, 410, 15, 161, 88, 95, 0, 0, 0, 0, 0, 59, 0, 98, 0, 74, - 0, 40, -1, 0, 0, 191, -369, 0, -306, 162, + 0, 40, -1, 0, 0, 191, -370, 0, -307, 162, 0, 0, 0, 0, 0, 281, 0, 0, 523, 0, 0, 187, 0, 41, 147, -235, 0, 0, 0, 0, 0, 0, -6, 0, 0, -47, 0, 0, 156, 100, - -45, -14, 67, -171, -68, -529, 0, 0, 270, 0, - 0, 78, -44, 0, 0, 60, -458, 0, 56, 0, + -45, -14, 67, -171, -68, -530, 0, 0, 270, 0, + 0, 78, -44, 0, 0, 60, -459, 0, 56, 0, 0, 0, 201, 209, 0, 0, 388, -75, 0, 58, 0, 0, 62, 0, 0, 84, 257, 179, 169, 79, 0, 0, 0, 0, 0, 0, 6, 0, 101, 155, @@ -993,25 +993,25 @@ class Php8 extends \PhpParser\ParserAbstract ); protected $gotoDefault = array( - -32768, 506, 730, 4, 731, 924, 807, 816, 593, 524, - 697, 343, 621, 416, 1290, 901, 1110, 574, 835, 1234, - 1242, 451, 838, 326, 720, 883, 884, 885, 395, 381, - 387, 393, 644, 622, 488, 870, 447, 862, 480, 865, - 446, 874, 162, 413, 504, 878, 3, 880, 552, 911, - 382, 888, 383, 672, 890, 558, 892, 893, 390, 396, - 397, 1115, 566, 618, 905, 253, 560, 906, 380, 907, - 914, 385, 388, 683, 459, 499, 493, 406, 1090, 561, - 604, 641, 441, 467, 616, 628, 614, 474, 1026, 411, - 325, 946, 954, 481, 457, 968, 345, 976, 728, 1123, - 635, 483, 984, 636, 991, 994, 525, 526, 472, 1006, - 268, 1009, 484, 1047, 662, 1020, 1021, 663, 637, 1043, - 638, 664, 639, 1045, 466, 594, 1053, 448, 1061, 1278, - 449, 1065, 262, 1068, 275, 412, 429, 1073, 1074, 8, - 1080, 689, 690, 10, 273, 503, 1105, 684, 445, 1122, - 433, 1192, 1194, 554, 485, 1212, 1211, 675, 500, 1217, - 442, 1281, 443, 527, 468, 313, 528, 305, 329, 310, - 543, 292, 330, 529, 469, 1287, 1295, 327, 30, 1315, - 1326, 338, 571, 609 + -32768, 506, 731, 4, 732, 925, 808, 817, 593, 524, + 698, 343, 621, 416, 1292, 902, 1111, 574, 836, 1235, + 1243, 451, 839, 326, 721, 884, 885, 886, 395, 381, + 387, 393, 645, 622, 488, 871, 447, 863, 480, 866, + 446, 875, 162, 413, 504, 879, 3, 881, 552, 912, + 382, 889, 383, 673, 891, 558, 893, 894, 390, 396, + 397, 1116, 566, 618, 906, 253, 560, 907, 380, 908, + 915, 385, 388, 684, 459, 499, 493, 406, 1091, 561, + 604, 642, 441, 467, 616, 628, 614, 474, 1027, 411, + 325, 947, 955, 481, 457, 969, 345, 977, 729, 1124, + 636, 483, 985, 637, 992, 995, 525, 526, 472, 1007, + 268, 1010, 484, 1048, 663, 1021, 1022, 664, 638, 1044, + 639, 665, 640, 1046, 466, 594, 1054, 448, 1062, 1280, + 449, 1066, 262, 1069, 275, 412, 429, 1074, 1075, 8, + 1081, 690, 691, 10, 273, 503, 1106, 685, 445, 1123, + 433, 1193, 1195, 554, 485, 1213, 1212, 676, 500, 1218, + 442, 1283, 443, 527, 468, 313, 528, 305, 329, 310, + 543, 292, 330, 529, 469, 1289, 1297, 327, 30, 1317, + 1328, 338, 571, 609 ); protected $ruleToNonTerminal = array( @@ -1067,16 +1067,16 @@ class Php8 extends \PhpParser\ParserAbstract 160, 161, 161, 161, 161, 19, 19, 72, 72, 72, 72, 150, 150, 150, 150, 163, 163, 151, 151, 153, 153, 153, 156, 156, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 169, 169, 107, 171, 171, 171, 171, - 152, 152, 152, 152, 152, 152, 152, 152, 58, 58, - 166, 166, 166, 166, 172, 172, 162, 162, 162, 173, - 173, 173, 173, 173, 173, 73, 73, 65, 65, 65, - 65, 129, 129, 129, 129, 176, 175, 165, 165, 165, - 165, 165, 165, 165, 164, 164, 164, 174, 174, 174, - 174, 106, 170, 178, 178, 177, 177, 179, 179, 179, - 179, 179, 179, 179, 179, 167, 167, 167, 167, 181, - 182, 180, 180, 180, 180, 180, 180, 180, 180, 183, - 183, 183, 183 + 168, 168, 168, 169, 169, 169, 107, 171, 171, 171, + 171, 152, 152, 152, 152, 152, 152, 152, 152, 58, + 58, 166, 166, 166, 166, 172, 172, 162, 162, 162, + 173, 173, 173, 173, 173, 173, 73, 73, 65, 65, + 65, 65, 129, 129, 129, 129, 176, 175, 165, 165, + 165, 165, 165, 165, 165, 164, 164, 164, 174, 174, + 174, 174, 106, 170, 178, 178, 177, 177, 179, 179, + 179, 179, 179, 179, 179, 179, 167, 167, 167, 167, + 181, 182, 180, 180, 180, 180, 180, 180, 180, 180, + 183, 183, 183, 183 ); protected $ruleToLength = array( @@ -1132,16 +1132,16 @@ class Php8 extends \PhpParser\ParserAbstract 1, 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 3, 3, 4, 1, 1, 3, - 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, - 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, - 4, 4, 1, 4, 4, 0, 1, 1, 1, 3, - 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, - 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, - 1, 4, 1, 1, 1, 3, 1, 1, 2, 1, - 3, 4, 3, 2, 0, 2, 2, 1, 2, 1, - 1, 1, 4, 3, 3, 3, 3, 6, 3, 1, - 1, 2, 1 + 1, 1, 1, 3, 5, 3, 3, 4, 1, 1, + 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, + 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, + 1, 4, 4, 1, 4, 4, 0, 1, 1, 1, + 3, 3, 1, 4, 2, 2, 1, 3, 1, 4, + 4, 3, 3, 3, 3, 1, 3, 1, 1, 3, + 1, 1, 4, 1, 1, 1, 3, 1, 1, 2, + 1, 3, 4, 3, 2, 0, 2, 2, 1, 2, + 1, 1, 1, 4, 3, 3, 3, 3, 6, 3, + 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -2763,35 +2763,35 @@ protected function initReduceCallbacks(): void { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 524 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 525 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + }, + 526 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 526 => function ($stackPos) { + 527 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); $this->createdArrays->attach($this->semValue); }, - 527 => function ($stackPos) { + 528 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, - 528 => function ($stackPos) { + 529 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 529 => function ($stackPos) { + 530 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, - 530 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); - }, 531 => function ($stackPos) { - $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 533 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2800,28 +2800,28 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 536 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 537 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 538 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 539 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 540 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 543 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2836,34 +2836,34 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 548 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 549 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 550 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 551 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 552 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 553 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 554 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 555 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 556 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 557 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2872,169 +2872,172 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 559 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 560 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 561 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 562 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 563 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 565 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 566 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 567 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 568 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 569 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 570 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 571 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 572 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 573 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 574 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 575 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 576 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 577 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 579 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 580 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 581 => function ($stackPos) { + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + }, + 582 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $this->postprocessList($this->semValue); }, - 582 => function ($stackPos) { + 583 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, - 583 => function ($stackPos) { + 584 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 584 => function ($stackPos) { + 585 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, - 585 => function ($stackPos) { + 586 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 586 => function ($stackPos) { + 587 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 587 => function ($stackPos) { + 588 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 588 => function ($stackPos) { + 589 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 589 => function ($stackPos) { + 590 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 590 => function ($stackPos) { + 591 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 591 => function ($stackPos) { + 592 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 592 => function ($stackPos) { + 593 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 593 => function ($stackPos) { + 594 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); }, - 594 => function ($stackPos) { + 595 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 595 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, 596 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 597 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 598 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 599 => function ($stackPos) { - $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 600 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 601 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 602 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 603 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 604 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 605 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 606 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 607 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 608 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 609 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 610 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 611 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 612 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 613 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index dbe30a7111..87e9aacf8e 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -611,7 +611,7 @@ protected function pExpr_ConstFetch(Expr\ConstFetch $node): string { } protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string { - return $this->pDereferenceLhs($node->class) . '::' . $this->p($node->name); + return $this->pDereferenceLhs($node->class) . '::' . $this->pObjectProperty($node->name); } protected function pExpr_PropertyFetch(Expr\PropertyFetch $node): string { diff --git a/test/PhpParser/BuilderFactoryTest.php b/test/PhpParser/BuilderFactoryTest.php index 2434dd2168..a86e17e14f 100644 --- a/test/PhpParser/BuilderFactoryTest.php +++ b/test/PhpParser/BuilderFactoryTest.php @@ -209,6 +209,10 @@ public function testConstFetches() { new Expr\ClassConstFetch(new Expr\Variable('foo'), new Identifier('BAR')), $factory->classConstFetch(new Expr\Variable('foo'), 'BAR') ); + $this->assertEquals( + new Expr\ClassConstFetch(new Name('Foo'), new Expr\Variable('foo')), + $factory->classConstFetch('Foo', $factory->var('foo')) + ); } public function testVar() { @@ -242,7 +246,7 @@ public function testPropertyFetch() { public function testInvalidIdentifier() { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Expected string or instance of Node\Identifier'); - (new BuilderFactory())->classConstFetch('Foo', new Expr\Variable('foo')); + (new BuilderFactory())->classConstFetch('Foo', new Name('foo')); } public function testInvalidIdentifierOrExpr() { diff --git a/test/code/parser/expr/dynamicClassConst.test b/test/code/parser/expr/dynamicClassConst.test new file mode 100644 index 0000000000..a333df8a5e --- /dev/null +++ b/test/code/parser/expr/dynamicClassConst.test @@ -0,0 +1,42 @@ +Dynamic class constant fetch +----- + Date: Sun, 26 Feb 2023 09:41:02 +0100 Subject: [PATCH 197/428] Add tools directory to export-ignore --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 08e3180c11..1f8fb40416 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ /doc export-ignore /test export-ignore /test_old export-ignore +/tools export-ignore .editorconfig export-ignore .gitattributes export-ignore .gitignore export-ignore From d83562e6fef79c2b06d10bd60684f9343ed228ed Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 09:46:15 +0100 Subject: [PATCH 198/428] Print INF as 1.0E+1000 This makes pretty printing round trip to another Float literal, rather than a constant lookup. The 1e1000 form in particular is chosen because that seems to be the typical form used in various tests. --- lib/PhpParser/PrettyPrinter/Standard.php | 4 ++-- test/PhpParser/PrettyPrinterTest.php | 4 ++-- test/code/prettyPrinter/expr/literals.test | 2 +- test/code/prettyPrinter/expr/numbers.test | 4 ++-- test_old/run.php | 6 ------ 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 87e9aacf8e..49543910c7 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -214,10 +214,10 @@ protected function pScalar_Int(Scalar\Int_ $node): string { protected function pScalar_Float(Scalar\Float_ $node): string { if (!is_finite($node->value)) { if ($node->value === \INF) { - return '\INF'; + return '1.0E+1000'; } if ($node->value === -\INF) { - return '-\INF'; + return '-1.0E+1000'; } else { return '\NAN'; } diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 85ce323a69..f72a815cab 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -143,8 +143,8 @@ public function provideTestUnnaturalLiterals() { [new Int_(-1, ['kind' => Int_::KIND_BIN]), '-0b1'], [new Int_(-1, ['kind' => Int_::KIND_OCT]), '-01'], [new Int_(-1, ['kind' => Int_::KIND_HEX]), '-0x1'], - [new Float_(\INF), '\INF'], - [new Float_(-\INF), '-\INF'], + [new Float_(\INF), '1.0E+1000'], + [new Float_(-\INF), '-1.0E+1000'], [new Float_(-\NAN), '\NAN'], ]; } diff --git a/test/code/prettyPrinter/expr/literals.test b/test/code/prettyPrinter/expr/literals.test index 0d92b38884..3267b32018 100644 --- a/test/code/prettyPrinter/expr/literals.test +++ b/test/code/prettyPrinter/expr/literals.test @@ -114,7 +114,7 @@ FALSE; 0.0; 1.0; 1.0E+100; -\INF; +1.0E+1000; 1.0E-100; 1.0E+84; 378282246310005.0; diff --git a/test/code/prettyPrinter/expr/numbers.test b/test/code/prettyPrinter/expr/numbers.test index c85f36bd82..09ecf7d5a3 100644 --- a/test/code/prettyPrinter/expr/numbers.test +++ b/test/code/prettyPrinter/expr/numbers.test @@ -31,5 +31,5 @@ Number literals -42.5; 1.0E+42; -1.0E+42; -\INF; --\INF; \ No newline at end of file +1.0E+1000; +-1.0E+1000; diff --git a/test_old/run.php b/test_old/run.php index bcacab3826..7eb956622b 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -95,12 +95,6 @@ function showHelp($error) { | tests.run-test.bug75042-3 # contains invalid chars, which we treat as parse error | Zend.tests.warning_during_heredoc_scan_ahead -# pretty print difference due to INF vs 1e1000 -| ext.standard.tests.general_functions.bug27678 -| tests.lang.bug24640 -| tests.lang.integer_literals.(binary|octal|hexadecimal)_(32|64)bit -| Zend.tests.bug74947 -| Zend.tests.float_to_int.union_int_string_type_arg # pretty print differences due to negative LNumbers | Zend.tests.neg_num_string | Zend.tests.numeric_strings.neg_num_string From ce3337b0c24b84341d56c56af6954d78423ff615 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 12:14:04 +0100 Subject: [PATCH 199/428] Update allowed characters after doc string label With the introduction of flexible doc strings, the ending label is no longer required to be followed by a semicolon or newline. We need to prevent doc string printing if the label is followed by any non-label character. --- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- test/PhpParser/PrettyPrinterTest.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 49543910c7..1315b8d672 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -1054,7 +1054,7 @@ protected function escapeString(string $string, ?string $quote): string { protected function containsEndLabel(string $string, string $label, bool $atStart = true, bool $atEnd = true): bool { $start = $atStart ? '(?:^|[\r\n])' : '[\r\n]'; - $end = $atEnd ? '(?:$|[;\r\n])' : '[;\r\n]'; + $end = $atEnd ? '(?:$|[^_A-Za-z0-9\x80-\xff])' : '[^_A-Za-z0-9\x80-\xff]'; return false !== strpos($string, $label) && preg_match('/' . $start . $label . $end . '/', $string); } diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index f72a815cab..2859a0a29e 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -107,11 +107,13 @@ public function provideTestKindAttributes() { [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;'"], + [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), "<< Date: Sun, 26 Feb 2023 12:20:32 +0100 Subject: [PATCH 200/428] Handle interpolated variable after end label Interpolated variables start with non-label characters, and as such also count as end label terminators since PHP 7.3. --- lib/PhpParser/PrettyPrinter/Standard.php | 9 +++------ test/PhpParser/PrettyPrinterTest.php | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 1315b8d672..b9f2d3d791 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -1052,20 +1052,17 @@ protected function escapeString(string $string, ?string $quote): string { }, $escaped); } - protected function containsEndLabel(string $string, string $label, bool $atStart = true, bool $atEnd = true): bool { + protected function containsEndLabel(string $string, string $label, bool $atStart = true): bool { $start = $atStart ? '(?:^|[\r\n])' : '[\r\n]'; - $end = $atEnd ? '(?:$|[^_A-Za-z0-9\x80-\xff])' : '[^_A-Za-z0-9\x80-\xff]'; return false !== strpos($string, $label) - && preg_match('/' . $start . $label . $end . '/', $string); + && preg_match('/' . $start . $label . '(?:$|[^_A-Za-z0-9\x80-\xff])/', $string); } /** @param (Expr|Node\InterpolatedStringPart)[] $parts */ protected function encapsedContainsEndLabel(array $parts, string $label): bool { foreach ($parts as $i => $part) { - $atStart = $i === 0; - $atEnd = $i === count($parts) - 1; if ($part instanceof Node\InterpolatedStringPart - && $this->containsEndLabel($part->value, $label, $atStart, $atEnd) + && $this->containsEndLabel($part->value, $label, $i === 0) ) { return true; } diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 2859a0a29e..d432e9475d 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -121,8 +121,7 @@ public function provideTestKindAttributes() { // Encapsed doc string variations [new InterpolatedString([new InterpolatedStringPart('foo')], $heredoc), "<< Date: Sun, 26 Feb 2023 12:26:27 +0100 Subject: [PATCH 201/428] Perform end label check on escaped string Escaping might convert a label character into an escape sequence if it is not valid UTF-8. --- lib/PhpParser/PrettyPrinter/Standard.php | 8 ++++---- test/PhpParser/PrettyPrinterTest.php | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index b9f2d3d791..75b0638d91 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -146,12 +146,12 @@ protected function pScalar_String(Scalar\String_ $node): string { return $this->pSingleQuotedString($node->value); case Scalar\String_::KIND_HEREDOC: $label = $node->getAttribute('docLabel'); - if ($label && !$this->containsEndLabel($node->value, $label)) { - if ($node->value === '') { + $escaped = $this->escapeString($node->value, null); + if ($label && !$this->containsEndLabel($escaped, $label)) { + if ($escaped === '') { return "<<<$label\n$label" . $this->docStringEndToken; } - $escaped = $this->escapeString($node->value, null); return "<<<$label\n" . $escaped . "\n$label" . $this->docStringEndToken; } @@ -1062,7 +1062,7 @@ protected function containsEndLabel(string $string, string $label, bool $atStart protected function encapsedContainsEndLabel(array $parts, string $label): bool { foreach ($parts as $i => $part) { if ($part instanceof Node\InterpolatedStringPart - && $this->containsEndLabel($part->value, $label, $i === 0) + && $this->containsEndLabel($this->escapeString($part->value, null), $label, $i === 0) ) { return true; } diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index d432e9475d..8c59f79e08 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -106,14 +106,16 @@ public function provideTestKindAttributes() { [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;'"], - [new String_("STR,", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']), "'STR,'"], + [new String_("STR;", $nowdoc), "'STR;'"], + [new String_("STR,", $nowdoc), "'STR,'"], + [new String_("STR\x80", $heredoc), '"STR\x80"'], // Doc string if label not contained (or not in ending position) [new String_("foo", $nowdoc), "<<<'STR'\nfoo\nSTR\n"], [new String_("foo", $heredoc), "<< Date: Sun, 26 Feb 2023 12:32:22 +0100 Subject: [PATCH 202/428] Remove __halt_compiler from semi reserved keyword list Apparently PHP does not allow use of __halt_compiler as a semi-reserved keyword. --- grammar/php.y | 2 +- lib/PhpParser/Parser/Php7.php | 2065 ++++++++++++++++----------------- lib/PhpParser/Parser/Php8.php | 2005 ++++++++++++++++---------------- 3 files changed, 2032 insertions(+), 2040 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index f745739cda..240c81e5c6 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -150,7 +150,7 @@ reserved_non_modifiers: | 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 | T_FN + | T_CLASS_C | T_TRAIT_C | T_FUNC_C | T_METHOD_C | T_LINE | T_FILE | T_DIR | T_NS_C | T_FN | T_MATCH | T_ENUM ; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 0eaf16a42b..421cf09501 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -160,8 +160,8 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1256; - protected $gotoTableSize = 644; + protected $actionTableSize = 1252; + protected $gotoTableSize = 615; protected $invalidSymbol = 168; protected $errorSymbol = 1; @@ -387,138 +387,138 @@ class Php7 extends \PhpParser\ParserAbstract protected $action = array( 132, 133, 134, 578, 135, 136, 0, 742, 743, 744, - 137, 37, 476, 854, 1017, 855,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 101, 102, 103, 104, 105, 1101, 1102, - 1103, 1100, 1099, 1098, 1104, 736, 735,-32766, 2,-32766, + 137, 37, 476, 853, 1016, 854,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 101, 102, 103, 104, 105, 1100, 1101, + 1102, 1099, 1098, 1097, 1103, 736, 735,-32766, 239,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1234,-32766,-32766,-32766, 745,-32766,-32766,-32766, -327, - -592, -589, 826,-32766,-32766,-32766, 980, -592, -589, 267, - 138, 399, 749, 750, 751, 752, -193,-32766, 423,-32766, + -32767, 1233,-32766,-32766,-32766, 745,-32766,-32766,-32766, -326, + -591, -588, 825,-32766,-32766,-32766, 979, -591, -588, 267, + 138, 399, 749, 750, 751, 752, -192,-32766, 423,-32766, -32766,-32766,-32766,-32766,-32766, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 783, 579, 784, 785, 786, 787, 775, 776, 340, 341, 778, 779, 764, 765, - 766, 768, 769, 770, 351, 810, 811, 812, 813, 814, - 580, 771, 772, 581, 582, 804, 795, 793, 794, 807, - 790, 791, 827, -192, 583, 584, 789, 585, 586, 587, - 588, 589, 590, 818, 477,-32766,-32766,-32766, 792, 591, - 592, 12, 139, 239, 132, 133, 134, 578, 135, 136, - 1050, 742, 743, 744, 137, 37,-32766, 34,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 1101, - 1102, 1103, 1100, 1099, 1098, 1104, 931,-32766, 14, 736, - 735,-32766,-32766,-32766, 981, 128,-32766, 829,-32766,-32766, - -32766,-32766, 106, 107, 108, 144, 271, 1311, 295, 745, - 1093, 74,-32766, -327,-32766,-32766,-32766, 322, 109, -592, - -589, -592, -589, 267, 138, 399, 749, 750, 751, 752, - -193, -86, 423,-32766,-32766,-32766,-32766, 820, 126, 753, + 766, 768, 769, 770, 351, 809, 810, 811, 812, 813, + 580, 771, 772, 581, 582, 930, 795, 793, 794, 806, + 790, 791, 826, 2, 583, 584, 789, 585, 586, 587, + 588, 589, 590, 817, 477,-32766,-32766,-32766, 792, 591, + 592, -191, 139, 19, 132, 133, 134, 578, 135, 136, + 1049, 742, 743, 744, 137, 37,-32766, 34,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -110, 1100, + 1101, 1102, 1099, 1098, 1097, 1103, -270,-32766, 21, 736, + 735,-32766,-32766,-32766, 980, 128,-32766, 932,-32766,-32766, + -32766,-32766, 106, 107, 108, 602, 271, 1310, 295, 745, + 1092, 74,-32766, -326,-32766,-32766,-32766, 322, 109, -591, + -588, -591, -588, 267, 138, 399, 749, 750, 751, 752, + -192, -85, 423,-32766,-32766,-32766, 352, 819, 126, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 783, 579, 784, 785, 786, 787, 775, 776, 340, 341, - 778, 779, 764, 765, 766, 768, 769, 770, 351, 810, - 811, 812, 813, 814, 580, 771, 772, 581, 582, 804, - 795, 793, 794, 807, 790, 791, 818, -192, 583, 584, - 789, 585, 586, 587, 588, 589, 590, -86, 82, 83, - 84, -271, 792, 591, 592, 251, 148, 767, 737, 738, - 739, 740, 741, 822, 742, 743, 744, 780, 781, 36, + 778, 779, 764, 765, 766, 768, 769, 770, 351, 809, + 810, 811, 812, 813, 580, 771, 772, 581, 582, 423, + 795, 793, 794, 806, 790, 791, 817, 716, 583, 584, + 789, 585, 586, 587, 588, 589, 590, -85, 82, 83, + 84, 238, 792, 591, 592, -191, 148, 767, 737, 738, + 739, 740, 741, 821, 742, 743, 744, 780, 781, 36, 703, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108,-32766, 271, 1295, 716, 375, - 376,-32766,-32766,-32766, 608, 828, 377, 376, 109, 417, - 949, 950, 745, 823, 288, 951, 417, 1026, 306, 141, - 1077, 945,-32766, 322,-32766,-32766, 746, 747, 748, 749, - 750, 751, 752, 1340, 602, 816, 1341, 1078, -543, 423, - 287, 728, 753, 754, 755, 756, 757, 758, 759, 760, - 761, 762, 763, 783, 806, 784, 785, 786, 787, 775, - 776, 777, 805, 778, 779, 764, 765, 766, 768, 769, - 770, 809, 810, 811, 812, 813, 814, 815, 771, 772, - 773, 774, 804, 795, 793, 794, 807, 790, 791, 824, - 308, 782, 788, 789, 796, 797, 799, 798, 800, 801, - -32766, 150, -543, -543, 933, 792, 803, 802, 49, 50, - 51, 507, 52, 53, 1229, 1228, 1230, -543, 54, 55, - -111, 56, 1026, 1079, 911, -111, 323, -111, 288, -549, - 238, -543, 302,-32766, 320, -111, -111, -111, -111, -111, - -111, -111, -111, 352, 911, 287, 335, 551, 1234, 103, - 104, 105, 1234, 1023, 706, 1026, 57, 58, 1255, 81, - 336, -542, 59, 322, 60, 245, 246, 61, 62, 63, - 64, 65, 66, 67, 68, 1026, 27, 269, 69, 439, - 508, 1023, -16, -341, 1261, 1262, 509, -365, 827, -365, - 461, 462, 1259, 41, 24, 510, 933, 511, 280, 512, - 911, 513,-32766, 1026, 514, 515, 365, 901, 1267, 43, - 44, 440, 372, 371,-32766, 45, 516, 1013, 1012, 1011, - 1014, 363, 334,-32766, 1227, -542, -542, 901, 1220, 827, - 518, 519, 520, 827, 369, 357, 1026, 1315, 827, 827, - -542, 1330, 522, 523, 1314, 1248, 1249, 1250, 1251, 1245, - 1246, 294, -548, -583, -542, -583, 384, 1252, 1247, 287, - 1225, 1229, 1228, 1230, 295,-32766,-32766, 70, 911, 736, - 735, 318, 319, 322, -153, -153, -153, 911, 386, -111, - 11, 1025, 913, 901,-32766, 911, 701, 435,-32766, -153, - 854, -153, 855, -153, 1049, -153, 652, 25, 707, 1229, - 1228, 1230, 913, 35, 248, 370, 701, 708, 74, 295, - 671, 672, 74, 436, 322, 711, 949, 950, 322, 437, - 140, 517, 911, 284, 322, 438, 887, 945, -111, -111, - -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 736, 735, 453, 454, 455, - 833, 901, 718, 736, 735, -544, 949, 950, 913, 151, - 901, 951, 701, -153, 149, 402, 153, 946, 901, 154, - 373, 374, 378, 379, 1139, 1141, -546, 155, 157, 643, - 644, 32,-32766, -301, 123, -541, 27, 124, 1227, 129, - 130, 143, -88, 158, 159,-32766,-32766,-32766, 827,-32766, - 160,-32766, 1259,-32766, 161, 901,-32766, 47, 927, 1023, - -85,-32766,-32766,-32766, -4, 911, -79,-32766,-32766, -544, - -544, -75, -73,-32766, 414, -72, 913, -71, -70, -69, - 701, 1026,-32766, -68, -544, 966, 736, 735, 1220, 701, - -546, -546, -541, 913, -67, -297, 48, 701, -544, -541, - -541, -66, 522, 523, 280, 1248, 1249, 1250, 1251, 1245, - 1246, -47, 73, -18, -541, 147, 270, 1252, 1247, -546, - 281, 296, 297,-32766, 717, 720, 910, 72, -541, 1227, - 913, 146, 319, 322, 701, 285,-32766,-32766,-32766, 276, - -32766, 277,-32766, 282,-32766, 283, 328,-32766, 901, 286, - 125, 289,-32766,-32766,-32766, 290, -541, -541,-32766,-32766, - 298, 299, -51, 681,-32766, 414, 271, 145, 109, 827, - 370, -541, 430,-32766, 1108, 368, 818, 293, 653, 557, - 13, 949, 950, 694, 1342, -541, 517,-32766, 553, 127, - 641, 521, 945, -111, -111, -111, 131, 434, 300, 674, - 307, 1266,-32766, 658, 301,-32766, -506, 1268, -496, 563, - 458, 1227, 487, 826, 9, 606, 659, 675,-32766,-32766, - -32766, 7,-32766, 913,-32766, 16,-32766, 701, -4,-32766, - 367, 295, 929, 303,-32766,-32766,-32766, -274, 39,-32766, - -32766,-32766, 911, 0, 0, 1227,-32766, 414, 0, 0, - 0, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, - -32766, 0, 0,-32766, 0, 0, 0, 0,-32766,-32766, - -32766,-32766, 0, 0,-32766,-32766, 0, 1227, 0, 40, - -32766, 414, 911, 725,-32766,-32766,-32766, 726,-32766,-32766, - -32766, 846,-32766, 892, 990,-32766, 967, 974, 964, 482, - -32766,-32766,-32766,-32766, 975, 890,-32766,-32766, 962, 1227, - 570, 1082,-32766, 414, 1085, 1086,-32766,-32766,-32766, 1083, - -32766,-32766,-32766, 1084,-32766, 901, 1090,-32766, 1256, 838, - 1281, 1299,-32766,-32766,-32766, 1333, 646, 33,-32766,-32766, - -577, -249, -249, -249,-32766, 414, -576, 370, -575, -549, - 27, 269, -548,-32766, -547, -490, 1, 28, 949, 950, - 29, 38, 827, 517, 42, 901, 1259, 46, 887, 945, - -111, -111, -111, 71, 75, 76, 77, 78, 79, 80, - 142, -248, -248, -248, 152, 156, 244, 370, 324, 352, - 722, 353, 354, 355, 356, 357, 358, 359, 949, 950, - 913, 360, 1220, 517, 701, -249, 361, 362, 887, 945, - -111, -111, -111, 364, 431, 550, -510, 523, 27, 1248, - 1249, 1250, 1251, 1245, 1246, -272, -271, 18, 19, 20, - 827, 1252, 1247, 21, 1259, 23,-32766, 401, 478, 479, - 913, 72, 1227, 888, 701, -248, 319, 322, 486,-32766, - -32766,-32766, 489,-32766, 490,-32766, 491,-32766, 492, 496, - -32766, 497, 498, 505, 568,-32766,-32766,-32766, 688, 1238, - 1220,-32766,-32766, 1179, 1257, 1052, 1051,-32766, 414, 1032, - 1215, 1028, -276, -103, 17, 523,-32766, 1248, 1249, 1250, - 1251, 1245, 1246, 22, 26, 292, 400, 599, 603, 1252, - 1247, 632, 693, 1183, 1233, 1180, 1312, 0, 317, 72, - 366, 1196, 702, 705, 319, 322, 709, 710, 712, 713, - 714, 715, 719, 704, 0, 1337, 0, 1339, 849, 848, - 857, 939, 982, 856, 1338, 938, 936, 937, 940, 1211, - 920, 930, 918, 972, 973, 630, 1336, 1293, 1282, 1300, - 1309, 0, 0, 1260, 0, 322 + 104, 105, 106, 107, 108, 828, 271, 1294, 932, 375, + 376,-32766,-32766,-32766, 1228, 1227, 1229, 608, 109, 417, + 948, 949, 745, 1078, 288, 950, 103, 104, 105, 141, + 1076, 944,-32766, 322,-32766,-32766, 746, 747, 748, 749, + 750, 751, 752, 144, 1314, 815, 1339, 357, -542, 1340, + 910, 1313, 753, 754, 755, 756, 757, 758, 759, 760, + 761, 762, 763, 783, 805, 784, 785, 786, 787, 775, + 776, 777, 804, 778, 779, 764, 765, 766, 768, 769, + 770, 808, 809, 810, 811, 812, 813, 814, 771, 772, + 773, 774, -545, 795, 793, 794, 806, 790, 791, 551, + 251, 782, 788, 789, 796, 797, 799, 798, 800, 801, + -32766,-32766, -542, -542, 306, 792, 803, 802, 49, 50, + 51, 507, 52, 53, 453, 454, 455, -542, 54, 55, + -110, 56, 1025, 900, 910, -110, 323, -110, 288, -548, + 822, -542, 302, 377, 376, -110, -110, -110, -110, -110, + -110, -110, -110, 417, 308, 287, -545, -545, 1233, -364, + 1266, -364, 1233, 827, 706, 150, 57, 58, 1254, 81, + 320, -541, 59, 322, 60, 245, 246, 61, 62, 63, + 64, 65, 66, 67, 68, -545, 27, 269, 69, 439, + 508,-32766, -16, -340, 1260, 1261, 509,-32766, 826, 335, + 461, 462, 1258, 41, 24, 510, 336, 511, 912, 512, + 910, 513, 701, 1025, 514, 515, 823, 900,-32766, 43, + 44, 440, 372, 371,-32766, 45, 516, 1012, 1011, 1010, + 1013, 363, 334, 1077, 1226, -541, -541, 728, 1219, 826, + 518, 519, 520, 826, 1022, 386, 1025, 18, 826, 826, + -541, 1329, 522, 523, 365, 1247, 1248, 1249, 1250, 1244, + 1245, 294, -547, -582, -541, -582, 1025, 1251, 1246, 287, + 1224, 1228, 1227, 1229, 295,-32766, 369, 70, 910,-32766, + -32766, 318, 319, 322, -152, -152, -152, 910, 384, -110, + 1022, 1024, 912, 900,-32766, 910, 701, 1025,-32766, -152, + 853, -152, 854, -152, 1048, -152, 736, 735, 707, 1228, + 1227, 1229, 1025, 35, 248, 370, 435, 708, 74, 295, + 287, 436, 74, 437, 322, 711, 948, 949, 322, 438, + 140, 517, 910, 284, 322, 280, 886, 944, -110, -110, + -110, 31, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 736, 735, 652, 25, 671, + 672, 900, 718, 736, 735, -543, 948, 949, 912, 832, + 900, 950, 701, -152, 149, 402, 151, 945, 900, 153, + 373, 374, 378, 379, 1138, 1140, 47, 154, 155, 643, + 644, 157,-32766, 32, 123, -540, 27, 124, 1226, 129, + 130, 143, -87, 158, 159,-32766,-32766,-32766, 826,-32766, + 160,-32766, 1258,-32766, 161, 900,-32766, 285, 109, 1022, + -84,-32766,-32766,-32766, -4, 910, -78,-32766,-32766, -543, + -543, -74, -73,-32766, 414, -72, 912, -71, -70, -69, + 701, 1025,-32766, -68, -543, 965, 736, 735, 1219, 701, + 296, 297, -540, 912, -67, -300, 48, 701, -543, -540, + -540, -66, 522, 523, 280, 1247, 1248, 1249, 1250, 1244, + 1245, -47, 73, -18, -540, 147, 270, 1251, 1246, 125, + 281, 717, 720,-32766, 909, 146, 926, 72, -540, 1226, + 912, -296, 319, 322, 701, 276,-32766,-32766,-32766, 277, + -32766, 282,-32766, 283,-32766, 328, 286,-32766, 900, 289, + 290, 145,-32766,-32766,-32766, 271, -540, -540,-32766,-32766, + 298, 299, -51, 681,-32766, 414, 1341, 817, 557, 694, + 370, -540, 430,-32766, 826, 368, 659, 293, 675, 1107, + -32766, 948, 949, 303, 553, -540, 517, 641, 300, 127, + 434, 521, 944, -110, -110, -110, 131, 653, 658, 674, + 20, 301,-32766, 307, 1265,-32766, -505, 1267, 458, 928, + 39, 1226, 487, 40, 9, -495, 7, 295,-32766,-32766, + -32766, 23,-32766, 912,-32766, 0,-32766, 701, -4,-32766, + 825, 0, 725, 0,-32766,-32766,-32766, 0, 0,-32766, + -32766,-32766, 910, 0, 0, 1226,-32766, 414, 0, 0, + 367, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, + -32766, 0, 0,-32766, 0, 0, 0, 563,-32766,-32766, + -32766,-32766, 606, 0,-32766,-32766, 726, 1226, 1255, 845, + -32766, 414, 910, 891,-32766,-32766,-32766, 989,-32766,-32766, + -32766, 966,-32766, 973, 963,-32766, 974, 889, 961, 482, + -32766,-32766,-32766,-32766, 1081, 1084,-32766,-32766, 1085, 1226, + 570, 1082,-32766, 414, 1083, 1089,-32766,-32766,-32766, 837, + -32766,-32766,-32766, 1280,-32766, 900, 1298,-32766, 1332, 646, + 33, -576,-32766,-32766,-32766, -575, -574, -548,-32766,-32766, + -547, -248, -248, -248,-32766, 414, -546, 370, -489, 1, + 27, 269, 28,-32766, 29, 38, 42, 46, 948, 949, + 71, 75, 826, 517, 76, 900, 1258, 77, 886, 944, + -110, -110, -110, 78, 79, 80, 142, 152, 156, 244, + 324, -247, -247, -247, 352, 353, 354, 370, 355, 356, + 722, 357, 358, 359, 360, 361, 362, 364, 948, 949, + 912, 431, 1219, 517, 701, -248, 550, 317, 886, 944, + -110, -110, -110, -273, -271, -270, 12, 523, 27, 1247, + 1248, 1249, 1250, 1244, 1245, 13, 14, 15, 17, 401, + 826, 1251, 1246, 478, 1258, 479,-32766, 486, 489, 490, + 912, 72, 1226, 887, 701, -247, 319, 322, 491,-32766, + -32766,-32766, 492,-32766, 496,-32766, 497,-32766, 498, 505, + -32766, 568, 688, 1237, 1178,-32766,-32766,-32766, 1256, 1051, + 1219,-32766,-32766, 1050, 1031, 1214, 1027,-32766, 414, -275, + -102, 11, 16, 26, 292, 523,-32766, 1247, 1248, 1249, + 1250, 1244, 1245, 400, 599, 603, 632, 693, 1182, 1251, + 1246, 1232, 1179, 1311, 1259, 366, 702, 705, 709, 72, + 710, -509, 712, 713, 319, 322, 714, 715, 719, 704, + 0, 1336, 1338, 848, 847, 856, 0, 938, 981, 855, + 1337, 937, 935, 936, 939, 1210, 919, 929, 917, 971, + 972, 630, 1335, 1292, 1281, 1299, 1308, 0, 1195, 0, + 0, 322 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 31, 106, 1, 108, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, - 118, 119, 120, 121, 122, 37, 38, 30, 8, 32, + 118, 119, 120, 121, 122, 37, 38, 30, 14, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 1, 9, 10, 11, 57, 9, 10, 11, 8, 1, 1, 155, 9, 10, 11, 31, 8, 8, 71, @@ -527,106 +527,106 @@ class Php7 extends \PhpParser\ParserAbstract 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, + 122, 123, 124, 125, 126, 1, 128, 129, 130, 131, 132, 133, 82, 8, 136, 137, 138, 139, 140, 141, 142, 143, 144, 80, 163, 9, 10, 11, 150, 151, - 152, 8, 154, 14, 2, 3, 4, 5, 6, 7, + 152, 8, 154, 8, 2, 3, 4, 5, 6, 7, 162, 9, 10, 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 9, 10, 11, 128, 116, - 117, 118, 119, 120, 121, 122, 1, 137, 101, 37, - 38, 9, 10, 11, 159, 8, 30, 1, 32, 33, - 34, 35, 53, 54, 55, 8, 57, 1, 158, 57, + 117, 118, 119, 120, 121, 122, 162, 137, 101, 37, + 38, 9, 10, 11, 159, 8, 30, 122, 32, 33, + 34, 35, 53, 54, 55, 1, 57, 1, 158, 57, 123, 161, 30, 162, 32, 33, 34, 167, 69, 160, 160, 162, 162, 71, 72, 73, 74, 75, 76, 77, - 162, 31, 80, 9, 10, 11, 9, 80, 14, 87, + 162, 31, 80, 9, 10, 11, 161, 80, 14, 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, 80, 162, 136, 137, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 80, + 128, 129, 130, 131, 132, 133, 80, 163, 136, 137, 138, 139, 140, 141, 142, 143, 144, 97, 9, 10, - 11, 162, 150, 151, 152, 8, 154, 2, 3, 4, + 11, 97, 150, 151, 152, 162, 154, 2, 3, 4, 5, 6, 7, 156, 9, 10, 11, 12, 13, 30, 163, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 116, 57, 1, 163, 106, - 107, 9, 10, 11, 51, 159, 106, 107, 69, 116, - 117, 118, 57, 80, 30, 122, 116, 138, 8, 163, + 51, 52, 53, 54, 55, 1, 57, 1, 122, 106, + 107, 9, 10, 11, 155, 156, 157, 51, 69, 116, + 117, 118, 57, 164, 30, 122, 50, 51, 52, 163, 1, 128, 30, 167, 32, 33, 71, 72, 73, 74, - 75, 76, 77, 80, 1, 80, 83, 159, 70, 80, - 161, 163, 87, 88, 89, 90, 91, 92, 93, 94, + 75, 76, 77, 8, 1, 80, 80, 161, 70, 83, + 1, 8, 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, 156, + 125, 126, 70, 128, 129, 130, 131, 132, 133, 85, 8, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 116, 14, 134, 135, 122, 150, 151, 152, 2, 3, - 4, 5, 6, 7, 155, 156, 157, 149, 12, 13, - 101, 15, 138, 164, 1, 106, 70, 108, 30, 161, - 97, 163, 113, 116, 8, 116, 117, 118, 119, 120, - 121, 122, 123, 161, 1, 161, 8, 85, 1, 50, - 51, 52, 1, 116, 31, 138, 50, 51, 1, 163, + 116, 9, 134, 135, 8, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 129, 130, 131, 149, 12, 13, + 101, 15, 138, 84, 1, 106, 70, 108, 30, 161, + 80, 163, 113, 106, 107, 116, 117, 118, 119, 120, + 121, 122, 123, 116, 8, 161, 134, 135, 1, 106, + 146, 108, 1, 159, 31, 14, 50, 51, 1, 163, 8, 70, 56, 167, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 138, 70, 71, 72, 73, - 74, 116, 31, 164, 78, 79, 80, 106, 82, 108, - 134, 135, 86, 87, 88, 89, 122, 91, 161, 93, - 1, 95, 116, 138, 98, 99, 8, 84, 146, 103, + 64, 65, 66, 67, 68, 163, 70, 71, 72, 73, + 74, 116, 31, 164, 78, 79, 80, 116, 82, 8, + 134, 135, 86, 87, 88, 89, 8, 91, 159, 93, + 1, 95, 163, 138, 98, 99, 156, 84, 137, 103, 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 137, 80, 134, 135, 84, 122, 82, - 124, 125, 126, 82, 8, 161, 138, 1, 82, 82, + 122, 115, 116, 159, 80, 134, 135, 163, 122, 82, + 124, 125, 126, 82, 116, 106, 138, 108, 82, 82, 149, 85, 136, 137, 8, 139, 140, 141, 142, 143, - 144, 145, 161, 160, 163, 162, 8, 151, 152, 161, - 116, 155, 156, 157, 158, 9, 10, 161, 1, 37, - 38, 165, 166, 167, 75, 76, 77, 1, 106, 128, - 108, 137, 159, 84, 137, 1, 163, 8, 137, 90, - 106, 92, 108, 94, 1, 96, 75, 76, 31, 155, - 156, 157, 159, 147, 148, 106, 163, 31, 161, 158, - 75, 76, 161, 8, 167, 31, 117, 118, 167, 8, - 163, 122, 1, 30, 167, 8, 127, 128, 129, 130, + 144, 145, 161, 160, 163, 162, 138, 151, 152, 161, + 116, 155, 156, 157, 158, 116, 8, 161, 1, 9, + 10, 165, 166, 167, 75, 76, 77, 1, 8, 128, + 116, 137, 159, 84, 137, 1, 163, 138, 137, 90, + 106, 92, 108, 94, 1, 96, 37, 38, 31, 155, + 156, 157, 138, 147, 148, 106, 8, 31, 161, 158, + 161, 8, 161, 8, 167, 31, 117, 118, 167, 8, + 163, 122, 1, 30, 167, 161, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 37, 38, 129, 130, 131, - 8, 84, 31, 37, 38, 70, 117, 118, 159, 14, + 25, 26, 27, 28, 29, 37, 38, 75, 76, 75, + 76, 84, 31, 37, 38, 70, 117, 118, 159, 8, 84, 122, 163, 164, 101, 102, 14, 128, 84, 14, 106, 107, 106, 107, 59, 60, 70, 14, 14, 111, - 112, 14, 74, 35, 16, 70, 70, 16, 80, 16, + 112, 14, 74, 14, 16, 70, 70, 16, 80, 16, 16, 16, 31, 16, 16, 87, 88, 89, 82, 91, - 16, 93, 86, 95, 16, 84, 98, 70, 38, 116, + 16, 93, 86, 95, 16, 84, 98, 37, 69, 116, 31, 103, 104, 105, 0, 1, 31, 109, 110, 134, 135, 31, 31, 115, 116, 31, 159, 31, 31, 31, 163, 138, 124, 31, 149, 159, 37, 38, 122, 163, 134, 135, 70, 159, 31, 35, 70, 163, 163, 134, 135, 31, 136, 137, 161, 139, 140, 141, 142, 143, 144, 31, 154, 31, 149, 31, 31, 151, 152, 163, - 31, 134, 135, 74, 31, 31, 31, 161, 163, 80, - 159, 31, 166, 167, 163, 37, 87, 88, 89, 35, - 91, 35, 93, 35, 95, 35, 35, 98, 84, 37, - 163, 37, 103, 104, 105, 37, 134, 135, 109, 110, - 134, 135, 31, 77, 115, 116, 57, 70, 69, 82, - 106, 149, 108, 124, 82, 149, 80, 113, 90, 89, - 97, 117, 118, 92, 83, 163, 122, 85, 85, 163, - 113, 127, 128, 129, 130, 131, 31, 128, 132, 94, - 132, 146, 137, 96, 133, 74, 149, 146, 149, 153, - 97, 80, 97, 155, 150, 153, 100, 100, 87, 88, - 89, 149, 91, 159, 93, 149, 95, 163, 164, 98, - 149, 158, 154, 114, 103, 104, 105, 162, 159, 74, + 31, 31, 31, 74, 31, 31, 38, 161, 163, 80, + 159, 35, 166, 167, 163, 35, 87, 88, 89, 35, + 91, 35, 93, 35, 95, 35, 37, 98, 84, 37, + 37, 70, 103, 104, 105, 57, 134, 135, 109, 110, + 134, 135, 31, 77, 115, 116, 83, 80, 89, 92, + 106, 149, 108, 124, 82, 149, 100, 113, 100, 82, + 85, 117, 118, 114, 85, 163, 122, 113, 132, 163, + 128, 127, 128, 129, 130, 131, 31, 90, 96, 94, + 97, 133, 137, 132, 146, 74, 149, 146, 97, 154, + 159, 80, 97, 159, 150, 149, 149, 158, 87, 88, + 89, 149, 91, 159, 93, -1, 95, 163, 164, 98, + 155, -1, 159, -1, 103, 104, 105, -1, -1, 74, 109, 110, 1, -1, -1, 80, 115, 116, -1, -1, - -1, -1, 87, 88, 89, 124, 91, -1, 93, -1, - 95, -1, -1, 98, -1, -1, -1, -1, 103, 104, - 105, 74, -1, -1, 109, 110, -1, 80, -1, 159, + 149, -1, 87, 88, 89, 124, 91, -1, 93, -1, + 95, -1, -1, 98, -1, -1, -1, 153, 103, 104, + 105, 74, 153, -1, 109, 110, 159, 80, 160, 159, 115, 116, 1, 159, 87, 88, 89, 159, 91, 124, 93, 159, 95, 159, 159, 98, 159, 159, 159, 102, 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, - 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, - 91, 124, 93, 159, 95, 84, 159, 98, 160, 160, - 160, 160, 103, 104, 105, 160, 160, 163, 109, 110, + 81, 159, 115, 116, 159, 159, 87, 88, 89, 160, + 91, 124, 93, 160, 95, 84, 160, 98, 160, 160, + 163, 161, 103, 104, 105, 161, 161, 161, 109, 110, 161, 100, 101, 102, 115, 116, 161, 106, 161, 161, 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, 161, 161, 82, 122, 161, 84, 86, 161, 127, 128, 129, 130, 131, 161, 161, 161, 161, 161, 161, 161, 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, - 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, - 129, 130, 131, 161, 161, 161, 165, 137, 70, 139, + 159, 161, 122, 122, 163, 164, 161, 163, 127, 128, + 129, 130, 131, 162, 162, 162, 162, 137, 70, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, @@ -635,18 +635,18 @@ class Php7 extends \PhpParser\ParserAbstract 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, - 152, 162, 162, 162, 162, 162, 162, -1, 163, 161, + 152, 162, 162, 162, 166, 163, 163, 163, 163, 161, 163, 165, 163, 163, 166, 167, 163, 163, 163, 163, - 163, 163, 163, 163, -1, 164, -1, 164, 164, 164, + -1, 164, 164, 164, 164, 164, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, -1, -1, 166, -1, 167 + 164, 164, 164, 164, 164, 164, 164, -1, 165, -1, + -1, 167 ); protected $actionBase = array( - 0, -2, 152, 549, 764, 941, 981, 507, 309, 157, - 864, 305, 305, 63, 305, 305, 305, 617, 634, 634, - 671, 634, 473, 626, 493, 493, 493, 658, 658, 658, + 0, -2, 152, 549, 764, 941, 981, 507, 199, 157, + 855, 617, 634, 634, 671, 634, 473, 626, 305, 305, + 63, 305, 305, 305, 389, 389, 389, 658, 658, 658, 658, 749, 749, 897, 897, 929, 865, 831, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, @@ -660,66 +660,66 @@ class Php7 extends \PhpParser\ParserAbstract 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 196, 35, 383, 717, 1033, 1041, 1035, 1042, - 1031, 1022, 1034, 1036, 1043, 1082, 1083, 800, 1084, 1085, - 1081, 1086, 1039, 876, 1032, 1040, 289, 289, 289, 289, + 1062, 1062, 344, 35, 204, 719, 1022, 1036, 1032, 1039, + 1020, 1019, 1031, 1033, 1040, 1078, 1079, 794, 1080, 1081, + 1077, 1082, 1034, 869, 1021, 1035, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 227, 224, 606, 43, 43, 43, 43, 43, + 289, 289, 442, 224, 610, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 54, 54, 54, 666, 666, 342, 182, 980, 166, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 665, 47, 136, 136, 7, 7, 7, 7, 7, 369, -25, -25, -25, -25, 501, 448, 50, - 643, 497, 87, 431, 334, 243, 387, 387, 449, 449, - 415, 415, 229, 229, 415, 415, 415, 367, 367, 367, - 367, 318, 441, -93, 412, 765, 206, 206, 206, 206, - 765, 765, 765, 765, 761, 1087, 765, 765, 765, 635, - 722, 722, 726, 149, 149, 149, 722, 534, 803, 506, - 534, 506, 346, 303, 436, 589, 250, 443, 436, 656, - 687, 60, 59, 758, 614, 758, 1021, 332, 802, 424, - 780, 740, 867, 1060, 1044, 816, 1079, 817, 1080, 568, - 406, 735, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, - 1020, 1020, 1020, 1088, 582, 1021, 283, 1088, 1088, 1088, - 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, - 618, 283, 571, 585, 283, 811, 582, 196, 759, 196, - 196, 196, 196, 196, 196, 196, 196, 196, 196, 782, - -19, 196, 35, 185, 185, 228, 13, 185, 185, 185, - 185, 196, 196, 196, 614, 809, 756, 616, 762, 125, - 809, 809, 809, 200, 51, 139, 68, 698, 760, 522, - 796, 796, 792, 895, 895, 796, 787, 796, 792, 906, - 796, 796, 895, 895, 773, 187, 629, 488, 576, 655, - 895, 360, 796, 796, 796, 796, 768, 661, 796, 297, - 197, 796, 796, 768, 766, 789, 30, 771, 895, 895, - 895, 768, 548, 771, 771, 771, 824, 828, 777, 785, - 476, 432, 692, 159, 720, 785, 785, 796, 598, 777, - 785, 777, 785, 778, 785, 785, 785, 777, 785, 787, - 502, 785, 727, 667, 143, 785, 6, 912, 913, 711, - 914, 900, 915, 953, 916, 917, 1049, 894, 925, 903, - 918, 954, 899, 896, 795, 718, 721, 772, 757, 893, - 799, 799, 799, 888, 799, 799, 799, 799, 799, 799, - 799, 799, 718, 868, 781, 769, 790, 930, 723, 724, - 1002, 755, 979, 951, 1046, 928, 1007, 919, 779, 725, - 973, 931, 926, 1045, 932, 933, 975, 1011, 832, 1012, - 1061, 797, 1063, 1064, 869, 935, 1050, 799, 912, 917, - 729, 903, 918, 899, 896, 770, 763, 748, 752, 747, - 746, 741, 744, 784, 1013, 887, 879, 870, 934, 891, - 718, 871, 965, 874, 976, 977, 1047, 813, 801, 875, - 1065, 936, 940, 945, 1053, 1014, 1054, 820, 966, 775, - 986, 815, 1066, 990, 992, 994, 996, 1055, 1067, 1056, - 885, 1057, 834, 788, 963, 807, 1068, 437, 808, 810, - 818, 952, 695, 927, 1058, 1069, 1070, 997, 999, 1000, - 1071, 1072, 923, 835, 967, 805, 971, 964, 837, 838, - 702, 814, 1017, 804, 806, 812, 705, 713, 1073, 1074, - 1075, 924, 793, 786, 839, 845, 1018, 798, 1019, 1076, - 714, 846, 728, 1077, 1006, 734, 738, 791, 1059, 776, - 819, 783, 946, 794, 849, 1078, 852, 855, 856, 1001, - 860, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 643, 497, 87, 393, 334, 243, 514, 514, 316, 316, + 468, 468, 499, 499, 468, 468, 468, 415, 415, 415, + 415, 318, 441, -93, 354, 765, 206, 206, 206, 206, + 765, 765, 765, 765, 761, 1038, 765, 765, 765, 635, + 722, 722, 726, 149, 149, 149, 722, 534, 799, 506, + 534, 506, 346, 306, 421, 589, 377, 443, 421, 362, + 656, 60, 59, 775, 614, 775, 1018, 75, 795, 226, + 780, 740, 856, 1056, 1041, 776, 1075, 778, 1076, 335, + 406, 735, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, + 1017, 1017, 1017, 1084, 609, 1018, 400, 1084, 1084, 1084, + 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, + 618, 400, 622, 624, 400, 810, 609, 344, 766, 344, + 344, 344, 344, 344, 344, 344, 344, 344, 344, 782, + -19, 344, 35, 124, 124, 414, 13, 124, 124, 124, + 124, 344, 344, 344, 614, 798, 814, 616, 819, 143, + 798, 798, 798, 200, 51, 24, 68, 760, 796, 479, + 787, 787, 797, 888, 888, 787, 792, 787, 797, 896, + 787, 787, 888, 888, 759, 187, 648, 531, 608, 653, + 888, 446, 787, 787, 787, 787, 771, 655, 787, 432, + 375, 787, 787, 771, 756, 789, 125, 768, 888, 888, + 888, 771, 586, 768, 768, 768, 773, 817, 774, 785, + 502, 486, 701, 159, 788, 785, 785, 787, 620, 774, + 785, 774, 785, 755, 785, 785, 785, 774, 785, 792, + 538, 785, 727, 661, 145, 785, 6, 899, 900, 711, + 903, 894, 906, 940, 912, 913, 1043, 887, 918, 895, + 914, 945, 893, 891, 793, 718, 721, 767, 757, 885, + 689, 689, 689, 876, 689, 689, 689, 689, 689, 689, + 689, 689, 718, 818, 801, 762, 779, 924, 723, 724, + 999, 758, 979, 1046, 1083, 923, 1001, 915, 751, 725, + 966, 925, 926, 944, 927, 928, 967, 1002, 820, 1006, + 1057, 781, 1058, 1059, 859, 931, 1044, 689, 899, 913, + 729, 895, 914, 893, 891, 770, 763, 748, 752, 747, + 746, 741, 744, 784, 1007, 875, 870, 863, 930, 879, + 718, 866, 954, 867, 971, 973, 1042, 811, 783, 868, + 1060, 932, 933, 934, 1045, 1011, 1047, 754, 963, 951, + 975, 815, 1061, 976, 977, 986, 990, 1049, 1063, 1050, + 874, 1053, 824, 807, 952, 802, 1064, 491, 806, 808, + 813, 936, 702, 919, 1054, 1065, 1066, 992, 994, 996, + 1067, 1068, 916, 828, 964, 805, 965, 953, 832, 834, + 705, 812, 1012, 800, 804, 809, 713, 714, 1069, 1070, + 1071, 917, 790, 786, 835, 837, 1013, 720, 1014, 1072, + 717, 838, 728, 1073, 1000, 734, 738, 777, 1055, 772, + 769, 803, 935, 791, 839, 1074, 845, 846, 849, 997, + 852, 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, 456, 456, 456, 456, 456, 456, 305, 305, 305, - 305, 0, 0, 305, 0, 0, 0, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 305, 456, 456, 456, 456, 456, 456, 456, 0, 0, + 305, 0, 0, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, @@ -743,173 +743,170 @@ class Php7 extends \PhpParser\ParserAbstract 289, 289, 289, 289, 289, 289, 289, 289, 494, 494, 289, 289, 494, 289, 494, 494, 494, 494, 494, 494, 494, 494, 494, 0, 289, 289, 289, 289, 289, 289, - 289, 289, 773, 149, 149, 149, 149, 494, 494, 494, - 494, 494, -88, -88, 494, 773, 494, 494, 149, 149, + 289, 289, 759, 149, 149, 149, 149, 494, 494, 494, + 494, 494, -88, -88, 494, 759, 494, 494, 149, 149, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, - 494, 0, 0, 283, 506, 494, 787, 787, 787, 787, + 494, 0, 0, 400, 506, 494, 792, 792, 792, 792, 494, 494, 494, 494, 506, 506, 494, 494, 494, 0, - 0, 0, 0, 0, 0, 0, 0, 283, 506, 0, - 283, 0, 787, 787, 494, 0, 773, 586, 494, 0, - 0, 0, 0, 283, 787, 283, 582, 796, 506, 796, - 582, 582, 185, 196, 586, 613, 613, 613, 613, 0, - 0, 614, 773, 773, 773, 773, 773, 773, 773, 773, - 773, 773, 773, 787, 0, 773, 0, 787, 787, 787, + 0, 0, 0, 0, 0, 0, 0, 400, 506, 0, + 400, 0, 792, 792, 494, 0, 759, 383, 494, 0, + 0, 0, 0, 400, 792, 400, 609, 787, 506, 787, + 609, 609, 124, 344, 383, 613, 613, 613, 613, 0, + 0, 614, 759, 759, 759, 759, 759, 759, 759, 759, + 759, 759, 759, 792, 0, 759, 0, 792, 792, 792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 787, 0, 0, 895, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 906, - 0, 0, 0, 0, 0, 0, 787, 0, 0, 0, - 0, 0, 0, 0, 0, 799, 813, 0, 813, 0, - 799, 799, 799, 0, 0, 0, 0, 814, 798 + 0, 0, 0, 0, 0, 792, 0, 0, 888, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 896, + 0, 0, 0, 0, 0, 0, 792, 0, 0, 0, + 0, 0, 0, 0, 0, 689, 811, 0, 811, 0, + 689, 689, 689, 0, 0, 0, 0, 812, 720 ); protected $actionDefault = array( - 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 595, 595, 595, - 595,32767,32767, 253, 103,32767,32767, 468, 385, 385, - 385,32767,32767, 539, 539, 539, 539, 539, 539,32767, - 32767,32767,32767,32767,32767, 468,32767,32767,32767,32767, + 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, + 32767,32767,32767,32767,32767,32767,32767, 594, 594, 594, + 594,32767,32767, 252, 102,32767,32767, 467, 384, 384, + 384,32767,32767, 538, 538, 538, 538, 538, 538,32767, + 32767,32767,32767,32767,32767, 467,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, 101,32767, - 32767,32767, 37, 7, 8, 10, 11, 50, 17, 323, - 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 100,32767, + 32767,32767, 37, 7, 8, 10, 11, 50, 17, 322, + 32767,32767,32767,32767, 102,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 588,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 587,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 472, 451, 452, 454, - 455, 384, 540, 594, 326, 591, 383, 146, 338, 328, - 241, 329, 257, 473, 258, 474, 477, 478, 214, 286, - 380, 150, 415, 469, 417, 467, 471, 416, 390, 396, - 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, - 407, 408, 388, 389, 470, 448, 447, 446,32767,32767, - 413, 414,32767, 418,32767,32767,32767,32767,32767,32767, - 32767, 103,32767, 387, 421, 419, 420, 437, 438, 435, - 436, 439,32767, 440, 441, 442, 443,32767, 315,32767, - 32767,32767, 364, 362, 315, 112,32767,32767, 428, 429, + 32767,32767,32767,32767,32767,32767, 471, 450, 451, 453, + 454, 383, 539, 593, 325, 590, 382, 145, 337, 327, + 240, 328, 256, 472, 257, 473, 476, 477, 213, 285, + 379, 149, 414, 468, 416, 466, 470, 415, 389, 395, + 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, + 406, 407, 387, 388, 469, 447, 446, 445,32767,32767, + 412, 413,32767, 417,32767,32767,32767,32767,32767,32767, + 32767, 102,32767, 386, 420, 418, 419, 436, 437, 434, + 435, 438,32767, 439, 440, 441, 442,32767, 314,32767, + 32767,32767, 363, 361, 314, 111,32767,32767, 427, 428, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 533, 445,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 103,32767, 101, 535, - 410, 412, 502, 423, 424, 422, 391,32767, 509,32767, - 103, 511,32767,32767,32767,32767,32767,32767,32767, 534, - 32767, 541, 541,32767, 495, 101, 194,32767,32767,32767, - 194, 194,32767,32767,32767,32767,32767,32767,32767,32767, - 602, 495, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111,32767, 194, 111,32767,32767,32767, 101, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 189,32767, 267, 269, 103, 556, 194,32767, 514,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 507, + 32767, 532, 444,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 102,32767, 100, 534, + 409, 411, 501, 422, 423, 421, 390,32767, 508,32767, + 102, 510,32767,32767,32767,32767,32767,32767,32767, 533, + 32767, 540, 540,32767, 494, 100, 193,32767,32767,32767, + 193, 193,32767,32767,32767,32767,32767,32767,32767,32767, + 601, 494, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110,32767, 193, 110,32767,32767,32767, 100, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 188,32767, 266, 268, 102, 555, 193,32767, 513,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 506, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 495, 433, 139,32767, 139, 541, - 425, 426, 427, 497, 541, 541, 541, 311, 288,32767, - 32767,32767,32767, 512, 512, 101, 101, 101, 101, 507, - 32767,32767,32767,32767, 112, 100, 100, 100, 100, 100, - 104, 102,32767,32767,32767,32767, 222, 100,32767, 102, - 102,32767,32767, 222, 224, 211, 102, 226,32767, 560, - 561, 222, 102, 226, 226, 226, 246, 246, 484, 317, - 102, 100, 102, 102, 196, 317, 317,32767, 102, 484, - 317, 484, 317, 198, 317, 317, 317, 484, 317,32767, - 102, 317, 213, 100, 100, 317,32767,32767,32767, 497, - 32767,32767,32767,32767,32767,32767,32767, 221,32767,32767, - 32767,32767,32767,32767,32767,32767, 528,32767, 545, 558, - 431, 432, 434, 543, 456, 457, 458, 459, 460, 461, - 462, 464, 590,32767, 501,32767,32767,32767,32767, 337, - 32767, 600,32767, 600,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 494, 432, 138,32767, 138, 540, + 424, 425, 426, 496, 540, 540, 540, 310, 287,32767, + 32767,32767,32767, 511, 511, 100, 100, 100, 100, 506, + 32767,32767,32767,32767, 111, 99, 99, 99, 99, 99, + 103, 101,32767,32767,32767,32767, 221, 99,32767, 101, + 101,32767,32767, 221, 223, 210, 101, 225,32767, 559, + 560, 221, 101, 225, 225, 225, 245, 245, 483, 316, + 101, 99, 101, 101, 195, 316, 316,32767, 101, 483, + 316, 483, 316, 197, 316, 316, 316, 483, 316,32767, + 101, 316, 212, 99, 99, 316,32767,32767,32767, 496, + 32767,32767,32767,32767,32767,32767,32767, 220,32767,32767, + 32767,32767,32767,32767,32767,32767, 527,32767, 544, 557, + 430, 431, 433, 542, 455, 456, 457, 458, 459, 460, + 461, 463, 589,32767, 500,32767,32767,32767,32767, 336, + 32767, 599,32767, 599,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 601,32767, 541,32767,32767,32767,32767, 430, 9, 76, - 490, 43, 44, 52, 58, 518, 519, 520, 521, 515, - 516, 522, 517,32767,32767, 523, 566,32767,32767, 542, - 593,32767,32767,32767,32767,32767,32767, 139,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 528, - 32767, 137,32767,32767,32767,32767,32767,32767,32767,32767, - 524,32767,32767,32767, 541,32767,32767,32767,32767, 313, - 310,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 541,32767,32767, - 32767,32767,32767, 290,32767, 307,32767,32767,32767,32767, + 600,32767, 540,32767,32767,32767,32767, 429, 9, 75, + 489, 43, 44, 52, 58, 517, 518, 519, 520, 514, + 515, 521, 516,32767,32767, 522, 565,32767,32767, 541, + 592,32767,32767,32767,32767,32767,32767, 138,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 527, + 32767, 136,32767,32767,32767,32767,32767,32767,32767,32767, + 523,32767,32767,32767, 540,32767,32767,32767,32767, 312, + 309,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 540,32767,32767, + 32767,32767,32767, 289,32767, 306,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 285,32767,32767, 379,32767,32767,32767,32767, - 358,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 152, 152, 3, 3, 340, 152, 152, 152, 340, - 340, 152, 340, 340, 340, 152, 152, 152, 152, 152, - 152, 279, 184, 261, 264, 246, 246, 152, 350, 152 + 32767,32767, 284,32767,32767, 378,32767,32767,32767,32767, + 357,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 151, 151, 3, 3, 339, 151, 151, 151, 339, + 339, 151, 339, 339, 339, 151, 151, 151, 151, 151, + 151, 278, 183, 260, 263, 245, 245, 151, 349, 151 ); protected $goto = array( - 194, 194, 689, 425, 657, 617, 654, 316, 428, 419, - 310, 311, 331, 572, 424, 332, 426, 634, 677, 942, - 697, 1055, 1019, 1035, 1036, 844, 165, 165, 165, 165, + 194, 194, 689, 1054, 425, 657, 617, 654, 316, 697, + 419, 310, 311, 331, 572, 424, 332, 426, 634, 650, + 651, 843, 668, 669, 670, 844, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, 188, 189, 190, 215, 213, 216, 530, 531, 415, 532, - 534, 535, 536, 537, 538, 539, 540, 541, 1125, 166, + 534, 535, 536, 537, 538, 539, 540, 541, 1124, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, 176, 212, 214, 217, 235, 240, 241, 243, 254, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, 278, 279, 313, 314, 315, 420, 421, 422, 577, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1125, 199, 180, + 236, 186, 187, 188, 189, 190, 215, 1124, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 275, 275, 275, 275, 847, 596, 249, 249, 650, - 651, 840, 668, 669, 670, 845, 619, 619, 1096, 1097, - 1258, 350, 1258, 1258, 1258, 1258, 1258, 1258, 1258, 1258, - 1258, 350, 350, 247, 247, 247, 247, 242, 250, 391, - 394, 556, 597, 601, 821, 350, 350, 819, 350, 852, - 1343, 900, 895, 896, 909, 853, 897, 850, 898, 899, - 851, 549, 840, 903, 494, 350, 495, 825, 1030, 1029, - 460, 460, 501, 1076, 1072, 1073, 1276, 1276, 843, 460, - 1276, 878, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, - 1276, 989, 963, 963, 961, 963, 723, 344, 546, 998, - 993, 1226, 1024, 1226, 1024, 1226, 965, 825, 1024, 825, - 1024, 1024, 1287, 569, 1024, 1024, 1024, 1024, 1024, 1024, - 1024, 1024, 1024, 1024, 1024, 349, 349, 349, 349, 1226, - 470, 1301, 1302, 682, 1226, 1226, 1226, 1226, 1033, 1034, - 1226, 1226, 1226, 1308, 1308, 1308, 1308, 605, 620, 623, - 624, 625, 626, 647, 648, 649, 699, 346, 916, 555, - 547, 473, 917, 549, 1274, 1274, 1316, 860, 1274, 475, - 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 904, - 840, 905, 872, 986, 932, 859, 932, 321, 305, 337, - 547, 555, 564, 565, 339, 575, 598, 612, 613, 389, - 533, 533, 1303, 1304, 533, 15, 533, 533, 533, 533, - 533, 533, 533, 533, 533, 544, 562, 544, 567, 544, - 724, 633, 635, 573, 610, 655, 1219, 656, 1122, 679, - 683, 1000, 687, 695, 996, 1327, 1327, 957, 405, 696, - 921, 1112, 1174, 450, 252, 252, 432, 615, 959, 959, - 959, 959, 1327, 1005, 450, 953, 960, 627, 629, 631, - 444, 864, 452, 660, 984, 444, 1298, 444, 1298, 858, - 1298, 542, 542, 542, 542, 333, 600, 548, 559, 662, - 678, 1216, 548, 865, 559, 1205, 934, 392, 456, 1206, - 1209, 935, 1210, 948, 398, 1310, 1310, 1310, 1310, 463, - 576, 464, 465, 837, 862, 870, 403, 404, 1334, 1335, - 418, 666, 607, 667, 611, 407, 408, 409, 5, 680, - 6, 1294, 410, 1217, 1061, 1008, 342, 427, 1221, 873, - 861, 1060, 1064, 427, 868, 727, 471, 1065, 874, 0, - 968, 1031, 1031, 970, 0, 1107, 661, 1042, 1038, 1039, - 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, - 444, 0, 1063, 444, 958, 0, 1296, 1296, 1063, 595, - 1089, 0, 700, 686, 686, 0, 502, 692, 1087, 1326, - 1326, 0, 1222, 1223, 272, 0, 1105, 877, 0, 545, - 835, 545, 0, 0, 0, 0, 1326, 0, 0, 0, - 0, 0, 0, 0, 0, 347, 348, 0, 1224, 1284, - 1285, 0, 0, 1329, 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, + 211, 846, 820, 249, 249, 470, 1300, 1301, 275, 275, + 275, 275, 964, 596, 619, 619, 877, 903, 1257, 904, + 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1257, 247, + 247, 247, 247, 242, 250, 349, 349, 349, 349, 956, + 405, 696, 555, 547, 346, 851, 818, 899, 894, 895, + 908, 852, 896, 849, 897, 898, 850, 1204, 933, 902, + 473, 1205, 1208, 934, 1209, 1325, 1325, 824, 475, 1075, + 1071, 1072, 337, 547, 555, 564, 565, 339, 575, 598, + 612, 613, 1325, 1275, 1275, 1095, 1096, 1275, 22, 1275, + 1275, 1275, 1275, 1275, 1275, 1275, 1275, 1275, 494, 1328, + 495, 1225, 1023, 1225, 1023, 1225, 501, 824, 1023, 824, + 1023, 1023, 1029, 1028, 1023, 1023, 1023, 1023, 1023, 1023, + 1023, 1023, 1023, 1023, 1023, 1307, 1307, 1307, 1307, 1225, + 859, 569, 1326, 1326, 1225, 1225, 1225, 1225, 460, 460, + 1225, 1225, 1225, 842, 344, 871, 350, 460, 858, 1326, + 988, 962, 962, 960, 962, 723, 350, 350, 915, 627, + 629, 631, 916, 546, 997, 992, 931, 5, 931, 6, + 350, 350, 1315, 350, 1220, 1342, 605, 620, 623, 624, + 625, 626, 647, 648, 649, 699, 549, 1273, 1273, 985, + 350, 1273, 389, 1273, 1273, 1273, 1273, 1273, 1273, 1273, + 1273, 1273, 533, 533, 567, 418, 533, 607, 533, 533, + 533, 533, 533, 533, 533, 533, 533, 562, 1032, 1033, + 839, 724, 633, 635, 321, 305, 655, 656, 1221, 1222, + 679, 683, 999, 687, 695, 995, 834, 1286, 1302, 1303, + 252, 252, 542, 542, 542, 542, 1173, 600, 573, 610, + 872, 860, 1059, 1063, 1223, 1283, 1284, 1121, 682, 548, + 559, 967, 452, 432, 548, 678, 559, 444, 662, 392, + 456, 839, 444, 1297, 444, 1297, 333, 1297, 836, 864, + 947, 463, 576, 464, 465, 957, 398, 869, 549, 861, + 1333, 1334, 347, 348, 272, 611, 544, 1216, 544, 545, + 544, 545, 1309, 1309, 1309, 1309, 1007, 1104, 876, 1060, + 727, 595, 1088, 471, 700, 873, 867, 391, 394, 556, + 597, 601, 686, 686, 450, 502, 692, 1086, 1293, 958, + 958, 958, 958, 403, 404, 450, 952, 959, 666, 1064, + 667, 969, 407, 408, 409, 1106, 680, 0, 0, 410, + 0, 1218, 0, 342, 0, 0, 0, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 0, 1062, + 444, 920, 1111, 1295, 1295, 1062, 0, 0, 615, 0, + 0, 0, 427, 0, 1004, 0, 0, 0, 427, 839, + 0, 0, 863, 0, 660, 983, 1030, 1030, 0, 428, + 857, 661, 1041, 1037, 1038, 0, 0, 0, 0, 677, + 941, 0, 1215, 1018, 1034, 1035, 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, 1003, 1003 + 0, 0, 0, 1002, 1002 ); protected $gotoCheck = array( - 42, 42, 72, 65, 65, 55, 55, 65, 88, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 88, 88, - 9, 126, 88, 88, 88, 26, 42, 42, 42, 42, + 42, 42, 72, 126, 65, 65, 55, 55, 65, 9, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 85, + 85, 26, 85, 85, 85, 27, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -923,99 +920,96 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 23, 23, 23, 23, 15, 129, 5, 5, 85, - 85, 22, 85, 85, 85, 27, 107, 107, 143, 143, - 107, 14, 107, 107, 107, 107, 107, 107, 107, 107, - 107, 14, 14, 5, 5, 5, 5, 5, 5, 58, - 58, 58, 58, 58, 7, 14, 14, 6, 14, 15, - 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 14, 22, 15, 154, 14, 154, 12, 117, 117, - 148, 148, 154, 15, 15, 15, 168, 168, 25, 148, - 168, 45, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 25, 25, 25, 25, 25, 25, 177, 25, 25, - 25, 72, 72, 72, 72, 72, 49, 12, 72, 12, - 72, 72, 14, 170, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 24, 24, 24, 24, 72, - 174, 174, 174, 14, 72, 72, 72, 72, 118, 118, - 72, 72, 72, 9, 9, 9, 9, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 96, 72, 75, - 75, 83, 72, 14, 169, 169, 179, 35, 169, 83, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 64, - 22, 64, 35, 102, 9, 35, 9, 167, 167, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 61, - 171, 171, 176, 176, 171, 75, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 19, 48, 19, 103, 19, - 48, 48, 48, 2, 2, 48, 14, 63, 149, 48, - 48, 48, 48, 48, 48, 181, 181, 92, 92, 92, - 17, 17, 150, 19, 5, 5, 112, 17, 19, 19, - 19, 19, 181, 17, 19, 19, 19, 84, 84, 84, - 23, 17, 82, 17, 17, 23, 129, 23, 129, 17, - 129, 106, 106, 106, 106, 29, 106, 9, 9, 119, - 115, 17, 9, 39, 9, 78, 78, 9, 9, 78, - 78, 78, 78, 91, 28, 129, 129, 129, 129, 9, - 9, 9, 9, 18, 37, 9, 81, 81, 9, 9, - 13, 81, 13, 81, 79, 81, 81, 81, 46, 81, - 46, 129, 81, 159, 128, 109, 81, 116, 20, 16, - 16, 16, 16, 116, 9, 98, 156, 131, 41, -1, - 16, 116, 116, 95, -1, 146, 116, 116, 116, 116, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, -1, 129, 23, 16, -1, 129, 129, 129, 8, - 8, -1, 8, 8, 8, -1, 8, 8, 8, 180, - 180, -1, 20, 20, 24, -1, 16, 16, -1, 24, - 20, 24, -1, -1, -1, -1, 180, -1, -1, -1, - -1, -1, -1, -1, -1, 96, 96, -1, 20, 20, - 20, -1, -1, 180, -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, + 42, 15, 7, 5, 5, 174, 174, 174, 23, 23, + 23, 23, 49, 129, 107, 107, 45, 64, 107, 64, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 5, + 5, 5, 5, 5, 5, 24, 24, 24, 24, 92, + 92, 92, 75, 75, 96, 15, 6, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 78, 78, 15, + 83, 78, 78, 78, 78, 180, 180, 12, 83, 15, + 15, 15, 75, 75, 75, 75, 75, 75, 75, 75, + 75, 75, 180, 168, 168, 143, 143, 168, 75, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 154, 180, + 154, 72, 72, 72, 72, 72, 154, 12, 72, 12, + 72, 72, 117, 117, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 9, 9, 9, 9, 72, + 35, 170, 181, 181, 72, 72, 72, 72, 148, 148, + 72, 72, 72, 25, 177, 35, 14, 148, 35, 181, + 25, 25, 25, 25, 25, 25, 14, 14, 72, 84, + 84, 84, 72, 25, 25, 25, 9, 46, 9, 46, + 14, 14, 179, 14, 20, 14, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 14, 169, 169, 102, + 14, 169, 61, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 171, 171, 103, 13, 171, 13, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 48, 118, 118, + 22, 48, 48, 48, 167, 167, 48, 63, 20, 20, + 48, 48, 48, 48, 48, 48, 20, 14, 176, 176, + 5, 5, 106, 106, 106, 106, 150, 106, 2, 2, + 16, 16, 16, 16, 20, 20, 20, 149, 14, 9, + 9, 16, 82, 112, 9, 115, 9, 23, 119, 9, + 9, 22, 23, 129, 23, 129, 29, 129, 18, 39, + 91, 9, 9, 9, 9, 16, 28, 9, 14, 37, + 9, 9, 96, 96, 24, 79, 19, 159, 19, 24, + 19, 24, 129, 129, 129, 129, 109, 16, 16, 128, + 98, 8, 8, 156, 8, 41, 9, 58, 58, 58, + 58, 58, 8, 8, 19, 8, 8, 8, 129, 19, + 19, 19, 19, 81, 81, 19, 19, 19, 81, 131, + 81, 95, 81, 81, 81, 146, 81, -1, -1, 81, + -1, 14, -1, 81, -1, -1, -1, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, -1, 129, + 23, 17, 17, 129, 129, 129, -1, -1, 17, -1, + -1, -1, 116, -1, 17, -1, -1, -1, 116, 22, + -1, -1, 17, -1, 17, 17, 116, 116, -1, 88, + 17, 116, 116, 116, 116, -1, -1, -1, -1, 88, + 88, -1, 17, 88, 88, 88, -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, 106, 106 + -1, -1, -1, 106, 106 ); protected $gotoBase = array( - 0, 0, -320, 0, 0, 166, 194, 195, 522, 7, - 0, 0, -66, 137, -113, -178, 43, -59, 157, 108, - 100, 0, -104, 158, 282, 234, 21, 171, 121, 142, - 0, 0, 0, 0, 0, -39, 0, 129, 0, 123, - 0, 63, -1, 0, 0, 229, -249, 0, -326, 243, - 0, 0, 0, 0, 0, -34, 0, 0, 155, 0, - 0, 318, 0, 148, 320, -235, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -21, 0, 0, 42, 135, - -46, -19, 147, -142, -56, -540, 0, 0, -262, 0, - 0, 128, 96, 0, 0, 66, -160, 0, 93, 0, - 0, 0, 309, 336, 0, 0, 404, -62, 0, 120, - 0, 0, 132, 0, 0, 160, 219, -48, 16, 152, - 0, 0, 0, 0, 0, 0, 19, 0, 115, 159, - 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -94, 0, 0, 67, 0, 197, 146, - 131, 0, 0, 0, -265, 0, 62, 0, 0, 119, - 0, 0, 0, 0, 0, 0, 0, 29, -2, 86, - 245, 122, 0, 0, -7, 0, -5, 228, 0, 296, - 235, 91, 0, 0 + 0, 0, -295, 0, 0, 162, 186, 153, 464, -11, + 0, 0, -66, 32, 12, -182, -36, 72, 132, 189, + -54, 0, 105, 165, 192, 299, 17, 21, 113, 143, + 0, 0, 0, 0, 0, -76, 0, 114, 0, 119, + 0, 40, -1, 0, 0, 157, -400, 0, -325, 155, + 0, 0, 0, 0, 0, -33, 0, 0, 433, 0, + 0, 311, 0, 148, 164, -234, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -138, 0, 0, -186, 116, + -17, 8, 147, -243, -154, -690, 0, 0, 289, 0, + 0, 115, -102, 0, 0, 64, -273, 0, 68, 0, + 0, 0, 315, 322, 0, 0, 375, -64, 0, 101, + 0, 0, 149, 0, 0, 145, 274, -4, 96, 141, + 0, 0, 0, 0, 0, 0, 1, 0, 100, 166, + 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -27, 0, 0, 67, 0, 265, 175, + 135, 0, 0, 0, -231, 0, 39, 0, 0, 93, + 0, 0, 0, 0, 0, 0, 0, 66, 5, 109, + 263, 124, 0, 0, -132, 0, 31, 275, 0, 302, + -79, -12, 0, 0 ); protected $gotoDefault = array( - -32768, 506, 731, 4, 732, 925, 808, 817, 593, 524, - 698, 343, 621, 416, 1292, 902, 1111, 574, 836, 1235, - 1243, 451, 839, 326, 721, 884, 885, 886, 395, 381, - 387, 393, 645, 622, 488, 871, 447, 863, 480, 866, - 446, 875, 162, 413, 504, 879, 3, 881, 552, 912, - 382, 889, 383, 673, 891, 558, 893, 894, 390, 396, - 397, 1116, 566, 618, 906, 253, 560, 907, 380, 908, - 915, 385, 388, 684, 459, 499, 493, 406, 1091, 561, - 604, 642, 441, 467, 616, 628, 614, 474, 1027, 411, - 325, 947, 955, 481, 457, 969, 345, 977, 729, 1124, - 636, 483, 985, 637, 992, 995, 525, 526, 472, 1007, - 268, 1010, 484, 1048, 663, 1021, 1022, 664, 638, 1044, - 639, 665, 640, 1046, 466, 594, 1054, 448, 1062, 1280, - 449, 1066, 262, 1069, 274, 412, 429, 1074, 1075, 8, - 1081, 690, 691, 10, 273, 503, 1106, 685, 445, 1123, - 433, 1193, 1195, 554, 485, 1213, 1212, 676, 500, 1218, - 442, 1283, 443, 527, 468, 312, 528, 304, 329, 309, - 543, 291, 330, 529, 469, 1289, 1297, 327, 30, 1317, - 1328, 338, 571, 609 + -32768, 506, 731, 4, 732, 924, 807, 816, 593, 524, + 698, 343, 621, 416, 1291, 901, 1110, 574, 835, 1234, + 1242, 451, 838, 326, 721, 883, 884, 885, 395, 381, + 387, 393, 645, 622, 488, 870, 447, 862, 480, 865, + 446, 874, 162, 413, 504, 878, 3, 880, 552, 911, + 382, 888, 383, 673, 890, 558, 892, 893, 390, 396, + 397, 1115, 566, 618, 905, 253, 560, 906, 380, 907, + 914, 385, 388, 684, 459, 499, 493, 406, 1090, 561, + 604, 642, 441, 467, 616, 628, 614, 474, 1026, 411, + 325, 946, 954, 481, 457, 968, 345, 976, 729, 1123, + 636, 483, 984, 637, 991, 994, 525, 526, 472, 1006, + 268, 1009, 484, 1047, 663, 1020, 1021, 664, 638, 1043, + 639, 665, 640, 1045, 466, 594, 1053, 448, 1061, 1279, + 449, 1065, 262, 1068, 274, 412, 429, 1073, 1074, 8, + 1080, 690, 691, 10, 273, 503, 1105, 685, 445, 1122, + 433, 1192, 1194, 554, 485, 1212, 1211, 676, 500, 1217, + 442, 1282, 443, 527, 468, 312, 528, 304, 329, 309, + 543, 291, 330, 529, 469, 1288, 1296, 327, 30, 1316, + 1327, 338, 571, 609 ); protected $ruleToNonTerminal = array( @@ -1026,38 +1020,38 @@ class Php7 extends \PhpParser\ParserAbstract 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, - 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, - 11, 11, 11, 12, 12, 13, 13, 14, 15, 15, - 16, 16, 17, 17, 18, 18, 21, 21, 22, 23, - 23, 24, 24, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, - 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, - 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, - 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, + 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, + 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, + 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, + 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, + 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, + 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, + 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, - 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, - 78, 78, 79, 79, 26, 26, 27, 27, 27, 27, - 27, 87, 87, 89, 89, 82, 82, 90, 90, 91, - 91, 91, 83, 83, 86, 86, 84, 84, 92, 93, - 93, 56, 56, 64, 64, 67, 67, 67, 66, 94, - 94, 95, 57, 57, 57, 57, 96, 96, 97, 97, - 98, 98, 99, 100, 100, 101, 101, 102, 102, 54, - 54, 50, 50, 104, 52, 52, 105, 51, 51, 53, - 53, 63, 63, 63, 63, 80, 80, 108, 108, 110, - 110, 111, 111, 111, 111, 109, 109, 109, 113, 113, - 113, 113, 88, 88, 116, 116, 116, 117, 117, 114, - 114, 118, 118, 120, 120, 121, 121, 115, 122, 122, - 119, 123, 123, 123, 123, 112, 112, 81, 81, 81, - 20, 20, 20, 125, 124, 124, 126, 126, 126, 126, - 59, 127, 127, 128, 60, 130, 130, 131, 131, 132, - 132, 85, 133, 133, 133, 133, 133, 133, 138, 138, - 139, 139, 140, 140, 140, 140, 140, 141, 142, 142, - 137, 137, 134, 134, 136, 136, 144, 144, 143, 143, - 143, 143, 143, 143, 143, 135, 145, 145, 147, 146, - 146, 61, 103, 148, 148, 55, 55, 42, 42, 42, + 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, + 62, 74, 74, 75, 75, 76, 76, 77, 77, 78, + 78, 79, 79, 26, 26, 27, 27, 27, 27, 27, + 87, 87, 89, 89, 82, 82, 90, 90, 91, 91, + 91, 83, 83, 86, 86, 84, 84, 92, 93, 93, + 56, 56, 64, 64, 67, 67, 67, 66, 94, 94, + 95, 57, 57, 57, 57, 96, 96, 97, 97, 98, + 98, 99, 100, 100, 101, 101, 102, 102, 54, 54, + 50, 50, 104, 52, 52, 105, 51, 51, 53, 53, + 63, 63, 63, 63, 80, 80, 108, 108, 110, 110, + 111, 111, 111, 111, 109, 109, 109, 113, 113, 113, + 113, 88, 88, 116, 116, 116, 117, 117, 114, 114, + 118, 118, 120, 120, 121, 121, 115, 122, 122, 119, + 123, 123, 123, 123, 112, 112, 81, 81, 81, 20, + 20, 20, 125, 124, 124, 126, 126, 126, 126, 59, + 127, 127, 128, 60, 130, 130, 131, 131, 132, 132, + 85, 133, 133, 133, 133, 133, 133, 138, 138, 139, + 139, 140, 140, 140, 140, 140, 141, 142, 142, 137, + 137, 134, 134, 136, 136, 144, 144, 143, 143, 143, + 143, 143, 143, 143, 135, 145, 145, 147, 146, 146, + 61, 103, 148, 148, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1067,20 +1061,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 155, 149, 149, 154, 154, 157, 158, 158, 159, - 160, 161, 161, 161, 161, 19, 19, 72, 72, 72, - 72, 150, 150, 150, 150, 163, 163, 151, 151, 153, - 153, 153, 156, 156, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 169, 169, 169, 107, 171, 171, 171, - 171, 152, 152, 152, 152, 152, 152, 152, 152, 58, - 58, 166, 166, 166, 166, 172, 172, 162, 162, 162, - 173, 173, 173, 173, 173, 173, 73, 73, 65, 65, - 65, 65, 129, 129, 129, 129, 176, 175, 165, 165, - 165, 165, 165, 165, 165, 164, 164, 164, 174, 174, - 174, 174, 106, 170, 178, 178, 177, 177, 179, 179, - 179, 179, 179, 179, 179, 179, 167, 167, 167, 167, - 181, 182, 180, 180, 180, 180, 180, 180, 180, 180, - 183, 183, 183, 183 + 155, 149, 149, 154, 154, 157, 158, 158, 159, 160, + 161, 161, 161, 161, 19, 19, 72, 72, 72, 72, + 150, 150, 150, 150, 163, 163, 151, 151, 153, 153, + 153, 156, 156, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 169, 169, 169, 107, 171, 171, 171, 171, + 152, 152, 152, 152, 152, 152, 152, 152, 58, 58, + 166, 166, 166, 166, 172, 172, 162, 162, 162, 173, + 173, 173, 173, 173, 173, 73, 73, 65, 65, 65, + 65, 129, 129, 129, 129, 176, 175, 165, 165, 165, + 165, 165, 165, 165, 164, 164, 164, 174, 174, 174, + 174, 106, 170, 178, 178, 177, 177, 179, 179, 179, + 179, 179, 179, 179, 179, 167, 167, 167, 167, 181, + 182, 180, 180, 180, 180, 180, 180, 180, 180, 183, + 183, 183, 183 ); protected $ruleToLength = array( @@ -1093,59 +1087,59 @@ class Php7 extends \PhpParser\ParserAbstract 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, - 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, - 2, 0, 1, 1, 1, 1, 4, 3, 5, 4, - 3, 4, 2, 3, 1, 1, 7, 6, 2, 3, - 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, - 3, 1, 2, 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, - 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, - 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, - 3, 1, 1, 1, 8, 9, 7, 8, 7, 6, - 8, 0, 2, 0, 2, 1, 2, 1, 2, 1, - 1, 1, 0, 2, 0, 2, 0, 2, 2, 1, - 3, 1, 4, 1, 4, 1, 1, 4, 2, 1, - 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, - 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, - 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, - 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, - 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, - 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, - 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, - 2, 4, 3, 1, 1, 3, 1, 2, 2, 3, - 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, - 0, 1, 5, 5, 10, 3, 5, 1, 1, 3, - 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, - 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, - 3, 2, 2, 3, 1, 0, 1, 1, 3, 3, - 3, 4, 4, 1, 1, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, + 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, + 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, + 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, + 1, 2, 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, 2, + 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, + 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, + 1, 1, 1, 8, 9, 7, 8, 7, 6, 8, + 0, 2, 0, 2, 1, 2, 1, 2, 1, 1, + 1, 0, 2, 0, 2, 0, 2, 2, 1, 3, + 1, 4, 1, 4, 1, 1, 4, 2, 1, 3, + 3, 3, 4, 4, 5, 0, 2, 4, 3, 1, + 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, + 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, + 1, 2, 1, 1, 2, 0, 1, 3, 0, 2, + 1, 1, 1, 1, 6, 8, 6, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, + 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, + 1, 2, 1, 1, 0, 1, 0, 2, 2, 2, + 4, 3, 1, 1, 3, 1, 2, 2, 3, 2, + 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, + 1, 5, 5, 10, 3, 5, 1, 1, 3, 0, + 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, + 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, + 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, + 4, 4, 1, 1, 2, 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, 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, 2, 8, 9, 8, 9, 9, 10, 9, - 10, 8, 3, 2, 0, 4, 2, 1, 3, 2, - 1, 2, 2, 2, 4, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 0, 3, 0, - 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 5, 3, 3, 4, 1, 1, - 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, - 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, - 1, 4, 4, 1, 4, 4, 0, 1, 1, 1, - 3, 3, 1, 4, 2, 2, 1, 3, 1, 4, - 4, 3, 3, 3, 3, 1, 3, 1, 1, 3, - 1, 1, 4, 1, 1, 1, 3, 1, 1, 2, - 1, 3, 4, 3, 2, 0, 2, 2, 1, 2, - 1, 1, 1, 4, 3, 3, 3, 3, 6, 3, - 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, 10, 9, 10, + 8, 3, 2, 0, 4, 2, 1, 3, 2, 1, + 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, + 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 5, 3, 3, 4, 1, 1, 3, + 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, + 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, + 4, 4, 1, 4, 4, 0, 1, 1, 1, 3, + 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, + 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, + 1, 4, 1, 1, 1, 3, 1, 1, 2, 1, + 3, 4, 3, 2, 0, 2, 2, 1, 2, 1, + 1, 1, 4, 3, 3, 3, 3, 6, 3, 1, + 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1407,7 +1401,7 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos]; }, 85 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 86 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1419,7 +1413,7 @@ protected function initReduceCallbacks(): void { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 89 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 90 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1434,16 +1428,16 @@ protected function initReduceCallbacks(): void { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 94 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 95 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 96 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 97 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + /* nothing */ }, 98 => function ($stackPos) { /* nothing */ @@ -1452,40 +1446,40 @@ protected function initReduceCallbacks(): void { /* nothing */ }, 100 => function ($stackPos) { - /* nothing */ + $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 101 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = $this->semStack[$stackPos]; }, 102 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 103 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 104 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 105 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 106 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 107 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 108 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 109 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 110 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = []; }, 111 => function ($stackPos) { - $this->semValue = []; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 112 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -1497,129 +1491,129 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 115 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 116 => function ($stackPos) { $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 117 => function ($stackPos) { + 116 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); $this->checkNamespace($this->semValue); }, - 118 => function ($stackPos) { + 117 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 119 => function ($stackPos) { + 118 => function ($stackPos) { $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 120 => function ($stackPos) { + 119 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 121 => function ($stackPos) { + 120 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 122 => function ($stackPos) { + 121 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 123 => function ($stackPos) { + 122 => function ($stackPos) { $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 124 => function ($stackPos) { + 123 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_FUNCTION; }, - 125 => function ($stackPos) { + 124 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_CONSTANT; }, - 126 => function ($stackPos) { + 125 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 127 => function ($stackPos) { + 126 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 128 => function ($stackPos) { + 127 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 129 => function ($stackPos) { + 128 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 130 => function ($stackPos) { + 129 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 131 => function ($stackPos) { + 130 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 132 => function ($stackPos) { + 131 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 133 => function ($stackPos) { + 132 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 134 => function ($stackPos) { + 133 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 135 => function ($stackPos) { + 134 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 136 => function ($stackPos) { + 135 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 137 => function ($stackPos) { + 136 => function ($stackPos) { $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, - 138 => function ($stackPos) { + 137 => function ($stackPos) { $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, - 139 => function ($stackPos) { + 138 => function ($stackPos) { $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, - 140 => function ($stackPos) { + 139 => function ($stackPos) { $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, - 141 => function ($stackPos) { + 140 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; }, - 142 => function ($stackPos) { + 141 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; }, - 143 => function ($stackPos) { + 142 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 144 => function ($stackPos) { + 143 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 145 => function ($stackPos) { + 144 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 146 => function ($stackPos) { + 145 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 147 => function ($stackPos) { + 146 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 148 => function ($stackPos) { + 147 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 149 => function ($stackPos) { + 148 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 150 => function ($stackPos) { + 149 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 151 => function ($stackPos) { + 150 => function ($stackPos) { if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; }, - 152 => function ($stackPos) { + 151 => function ($stackPos) { $this->semValue = array(); }, - 153 => function ($stackPos) { + 152 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 153 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, 154 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, @@ -1627,12 +1621,9 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 156 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 157 => function ($stackPos) { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 158 => function ($stackPos) { + 157 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; @@ -1642,46 +1633,46 @@ protected function initReduceCallbacks(): void { } }, - 159 => function ($stackPos) { + 158 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 160 => function ($stackPos) { + 159 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 161 => function ($stackPos) { + 160 => function ($stackPos) { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 162 => function ($stackPos) { + 161 => function ($stackPos) { $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 163 => function ($stackPos) { + 162 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 164 => function ($stackPos) { + 163 => function ($stackPos) { $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 165 => function ($stackPos) { + 164 => function ($stackPos) { $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 166 => function ($stackPos) { + 165 => function ($stackPos) { $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 167 => function ($stackPos) { + 166 => function ($stackPos) { $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 168 => function ($stackPos) { + 167 => function ($stackPos) { $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 169 => function ($stackPos) { + 168 => function ($stackPos) { $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 170 => function ($stackPos) { + 169 => function ($stackPos) { $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 171 => function ($stackPos) { + 170 => function ($stackPos) { $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 172 => function ($stackPos) { + 171 => function ($stackPos) { $e = $this->semStack[$stackPos-(2-1)]; if ($e instanceof Expr\Throw_) { @@ -1693,980 +1684,983 @@ protected function initReduceCallbacks(): void { } }, - 173 => function ($stackPos) { + 172 => function ($stackPos) { $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 174 => function ($stackPos) { + 173 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 175 => function ($stackPos) { + 174 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 176 => function ($stackPos) { + 175 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 177 => function ($stackPos) { + 176 => function ($stackPos) { $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 178 => function ($stackPos) { + 177 => function ($stackPos) { $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); }, - 179 => function ($stackPos) { + 178 => function ($stackPos) { $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 180 => function ($stackPos) { + 179 => function ($stackPos) { $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 181 => function ($stackPos) { + 180 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, - 182 => function ($stackPos) { + 181 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 183 => function ($stackPos) { + 182 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, - 184 => function ($stackPos) { + 183 => function ($stackPos) { $this->semValue = array(); }, - 185 => function ($stackPos) { + 184 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 186 => function ($stackPos) { + 185 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 187 => function ($stackPos) { + 186 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 188 => function ($stackPos) { + 187 => function ($stackPos) { $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 189 => function ($stackPos) { + 188 => function ($stackPos) { $this->semValue = null; }, - 190 => function ($stackPos) { + 189 => function ($stackPos) { $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 191 => function ($stackPos) { + 190 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 192 => function ($stackPos) { + 191 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 193 => function ($stackPos) { + 192 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 194 => function ($stackPos) { + 193 => function ($stackPos) { $this->semValue = false; }, - 195 => function ($stackPos) { + 194 => function ($stackPos) { $this->semValue = true; }, - 196 => function ($stackPos) { + 195 => function ($stackPos) { $this->semValue = false; }, - 197 => function ($stackPos) { + 196 => function ($stackPos) { $this->semValue = true; }, - 198 => function ($stackPos) { + 197 => function ($stackPos) { $this->semValue = false; }, - 199 => function ($stackPos) { + 198 => function ($stackPos) { $this->semValue = true; }, - 200 => function ($stackPos) { + 199 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 201 => function ($stackPos) { + 200 => function ($stackPos) { $this->semValue = []; }, - 202 => function ($stackPos) { + 201 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 203 => function ($stackPos) { + 202 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 204 => function ($stackPos) { + 203 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 205 => function ($stackPos) { + 204 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 206 => function ($stackPos) { + 205 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(7-2)); }, - 207 => function ($stackPos) { + 206 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(8-3)); }, - 208 => function ($stackPos) { + 207 => function ($stackPos) { $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkInterface($this->semValue, $stackPos-(7-3)); }, - 209 => function ($stackPos) { + 208 => function ($stackPos) { $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 210 => function ($stackPos) { + 209 => function ($stackPos) { $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); $this->checkEnum($this->semValue, $stackPos-(8-3)); }, - 211 => function ($stackPos) { + 210 => function ($stackPos) { $this->semValue = null; }, - 212 => function ($stackPos) { + 211 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 213 => function ($stackPos) { + 212 => function ($stackPos) { $this->semValue = null; }, - 214 => function ($stackPos) { + 213 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 215 => function ($stackPos) { + 214 => function ($stackPos) { $this->semValue = 0; }, - 216 => function ($stackPos) { + 215 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 217 => function ($stackPos) { + 216 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 218 => function ($stackPos) { + 217 => function ($stackPos) { $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 219 => function ($stackPos) { + 218 => function ($stackPos) { $this->semValue = Modifiers::ABSTRACT; }, - 220 => function ($stackPos) { + 219 => function ($stackPos) { $this->semValue = Modifiers::FINAL; }, - 221 => function ($stackPos) { + 220 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 222 => function ($stackPos) { + 221 => function ($stackPos) { $this->semValue = null; }, - 223 => function ($stackPos) { + 222 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 224 => function ($stackPos) { + 223 => function ($stackPos) { $this->semValue = array(); }, - 225 => function ($stackPos) { + 224 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 226 => function ($stackPos) { + 225 => function ($stackPos) { $this->semValue = array(); }, - 227 => function ($stackPos) { + 226 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 228 => function ($stackPos) { + 227 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 229 => function ($stackPos) { + 228 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 230 => function ($stackPos) { + 229 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 231 => function ($stackPos) { + 230 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, - 232 => function ($stackPos) { + 231 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 233 => function ($stackPos) { + 232 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, - 234 => function ($stackPos) { + 233 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 235 => function ($stackPos) { + 234 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, - 236 => function ($stackPos) { + 235 => function ($stackPos) { $this->semValue = null; }, - 237 => function ($stackPos) { + 236 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 238 => function ($stackPos) { + 237 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 239 => function ($stackPos) { + 238 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 240 => function ($stackPos) { + 239 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 241 => function ($stackPos) { + 240 => function ($stackPos) { $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 242 => function ($stackPos) { + 241 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 243 => function ($stackPos) { + 242 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 244 => function ($stackPos) { + 243 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 245 => function ($stackPos) { + 244 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(5-3)]; }, - 246 => function ($stackPos) { + 245 => function ($stackPos) { $this->semValue = array(); }, - 247 => function ($stackPos) { + 246 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 248 => function ($stackPos) { + 247 => function ($stackPos) { $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 249 => function ($stackPos) { + 248 => function ($stackPos) { $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 250 => function ($stackPos) { + 249 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 251 => function ($stackPos) { + 250 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 252 => function ($stackPos) { + 251 => function ($stackPos) { $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 253 => function ($stackPos) { + 252 => function ($stackPos) { $this->semValue = []; }, - 254 => function ($stackPos) { + 253 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 255 => function ($stackPos) { + 254 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 256 => function ($stackPos) { + 255 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 257 => function ($stackPos) { + 256 => function ($stackPos) { $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 258 => function ($stackPos) { + 257 => function ($stackPos) { $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 259 => function ($stackPos) { + 258 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, - 260 => function ($stackPos) { + 259 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 261 => function ($stackPos) { + 260 => function ($stackPos) { $this->semValue = array(); }, - 262 => function ($stackPos) { + 261 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 263 => function ($stackPos) { + 262 => function ($stackPos) { $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 264 => function ($stackPos) { + 263 => function ($stackPos) { $this->semValue = array(); }, - 265 => function ($stackPos) { + 264 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 266 => function ($stackPos) { + 265 => function ($stackPos) { $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, - 267 => function ($stackPos) { + 266 => function ($stackPos) { $this->semValue = null; }, - 268 => function ($stackPos) { + 267 => function ($stackPos) { $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 269 => function ($stackPos) { + 268 => function ($stackPos) { $this->semValue = null; }, - 270 => function ($stackPos) { + 269 => function ($stackPos) { $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, - 271 => function ($stackPos) { + 270 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, - 272 => function ($stackPos) { + 271 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, - 273 => function ($stackPos) { + 272 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, - 274 => function ($stackPos) { + 273 => function ($stackPos) { $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, - 275 => function ($stackPos) { + 274 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 276 => function ($stackPos) { + 275 => function ($stackPos) { $this->semValue = array(); }, - 277 => function ($stackPos) { + 276 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 278 => function ($stackPos) { + 277 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 279 => function ($stackPos) { + 278 => function ($stackPos) { $this->semValue = 0; }, - 280 => function ($stackPos) { + 279 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 281 => function ($stackPos) { + 280 => function ($stackPos) { $this->semValue = Modifiers::PUBLIC; }, - 282 => function ($stackPos) { + 281 => function ($stackPos) { $this->semValue = Modifiers::PROTECTED; }, - 283 => function ($stackPos) { + 282 => function ($stackPos) { $this->semValue = Modifiers::PRIVATE; }, - 284 => function ($stackPos) { + 283 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 285 => function ($stackPos) { + 284 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, - 286 => function ($stackPos) { + 285 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); $this->checkParam($this->semValue); }, - 287 => function ($stackPos) { + 286 => function ($stackPos) { $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, - 288 => function ($stackPos) { + 287 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 289 => function ($stackPos) { + 288 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 290 => function ($stackPos) { + 289 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 291 => function ($stackPos) { + 290 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 292 => function ($stackPos) { + 291 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 293 => function ($stackPos) { + 292 => function ($stackPos) { $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 294 => function ($stackPos) { + 293 => function ($stackPos) { $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, - 295 => function ($stackPos) { + 294 => function ($stackPos) { $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 296 => function ($stackPos) { + 295 => function ($stackPos) { $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 297 => function ($stackPos) { + 296 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 298 => function ($stackPos) { + 297 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 299 => function ($stackPos) { + 298 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 300 => function ($stackPos) { + 299 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 301 => function ($stackPos) { + 300 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 302 => function ($stackPos) { + 301 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 303 => function ($stackPos) { + 302 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 304 => function ($stackPos) { + 303 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 305 => function ($stackPos) { + 304 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 306 => function ($stackPos) { + 305 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 307 => function ($stackPos) { + 306 => function ($stackPos) { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 308 => function ($stackPos) { + 307 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 309 => function ($stackPos) { + 308 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 310 => function ($stackPos) { + 309 => function ($stackPos) { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 311 => function ($stackPos) { + 310 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 312 => function ($stackPos) { + 311 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 313 => function ($stackPos) { + 312 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 314 => function ($stackPos) { + 313 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 315 => function ($stackPos) { + 314 => function ($stackPos) { $this->semValue = null; }, - 316 => function ($stackPos) { + 315 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 317 => function ($stackPos) { + 316 => function ($stackPos) { $this->semValue = null; }, - 318 => function ($stackPos) { + 317 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 319 => function ($stackPos) { + 318 => function ($stackPos) { $this->semValue = null; }, - 320 => function ($stackPos) { + 319 => function ($stackPos) { $this->semValue = array(); }, - 321 => function ($stackPos) { + 320 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 322 => function ($stackPos) { + 321 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, - 323 => function ($stackPos) { + 322 => function ($stackPos) { $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 324 => function ($stackPos) { + 323 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 325 => function ($stackPos) { + 324 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 326 => function ($stackPos) { + 325 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 327 => function ($stackPos) { + 326 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 328 => function ($stackPos) { + 327 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 329 => function ($stackPos) { + 328 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, - 330 => function ($stackPos) { + 329 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 331 => function ($stackPos) { + 330 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 332 => function ($stackPos) { + 331 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 333 => function ($stackPos) { + 332 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 334 => function ($stackPos) { + 333 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 335 => function ($stackPos) { + 334 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 336 => function ($stackPos) { + 335 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 337 => function ($stackPos) { + 336 => function ($stackPos) { $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 338 => function ($stackPos) { + 337 => function ($stackPos) { $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 339 => function ($stackPos) { + 338 => function ($stackPos) { if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, - 340 => function ($stackPos) { + 339 => function ($stackPos) { $this->semValue = array(); }, - 341 => function ($stackPos) { + 340 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 342 => function ($stackPos) { + 341 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 343 => function ($stackPos) { + 342 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 344 => function ($stackPos) { + 343 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, - 345 => function ($stackPos) { + 344 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 346 => function ($stackPos) { + 345 => function ($stackPos) { $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 347 => function ($stackPos) { + 346 => function ($stackPos) { $this->semValue = null; /* will be skipped */ }, - 348 => function ($stackPos) { + 347 => function ($stackPos) { $this->semValue = array(); }, - 349 => function ($stackPos) { + 348 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 350 => function ($stackPos) { + 349 => function ($stackPos) { $this->semValue = array(); }, - 351 => function ($stackPos) { + 350 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 352 => function ($stackPos) { + 351 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 353 => function ($stackPos) { + 352 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 354 => function ($stackPos) { + 353 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, + 354 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, 355 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 356 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 357 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 358 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 359 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = null; }, 360 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 361 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 362 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 363 => function ($stackPos) { $this->semValue = 0; }, 364 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 365 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 366 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 367 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = Modifiers::PUBLIC; }, 368 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + $this->semValue = Modifiers::PROTECTED; }, 369 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + $this->semValue = Modifiers::PRIVATE; }, 370 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + $this->semValue = Modifiers::STATIC; }, 371 => function ($stackPos) { - $this->semValue = Modifiers::STATIC; + $this->semValue = Modifiers::ABSTRACT; }, 372 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + $this->semValue = Modifiers::FINAL; }, 373 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + $this->semValue = Modifiers::READONLY; }, 374 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 375 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 376 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 377 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 379 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 380 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 381 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 382 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 383 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 384 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 385 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 386 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 387 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 388 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 389 => function ($stackPos) { + 388 => function ($stackPos) { $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 390 => function ($stackPos) { + 389 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 391 => function ($stackPos) { + 390 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 392 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); if (!$this->phpVersion->allowsAssignNewByReference()) { $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); } + }, + 392 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 393 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 394 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 395 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 396 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 397 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 404 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 405 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 406 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 410 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 411 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 419 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 421 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 422 => function ($stackPos) { + 421 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 423 => function ($stackPos) { + 422 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 424 => function ($stackPos) { + 423 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 425 => function ($stackPos) { + 424 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 426 => function ($stackPos) { + 425 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 427 => function ($stackPos) { + 426 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 428 => function ($stackPos) { + 427 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 429 => function ($stackPos) { + 428 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 429 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 431 => function ($stackPos) { + 430 => function ($stackPos) { $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 432 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 441 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 443 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 444 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 445 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 446 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 447 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 448 => function ($stackPos) { + 447 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 450 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 452 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 452 => function ($stackPos) { $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 455 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 457 => function ($stackPos) { + 456 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 458 => function ($stackPos) { + 457 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 458 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 459 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 461 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 462 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 463 => function ($stackPos) { + 462 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 464 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 465 => function ($stackPos) { + 464 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 466 => function ($stackPos) { + 465 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 467 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 468 => function ($stackPos) { + 467 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 469 => function ($stackPos) { + 468 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 470 => function ($stackPos) { + 469 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 471 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 472 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 473 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 474 => function ($stackPos) { + 473 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 475 => function ($stackPos) { + 474 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 476 => function ($stackPos) { + 475 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 477 => function ($stackPos) { + 476 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 478 => function ($stackPos) { + 477 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 479 => function ($stackPos) { + 478 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 480 => function ($stackPos) { + 479 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 481 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 482 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 483 => function ($stackPos) { + 482 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 484 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = array(); }, - 485 => function ($stackPos) { + 484 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 486 => function ($stackPos) { + 485 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 487 => function ($stackPos) { + 486 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 488 => function ($stackPos) { + 487 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 489 => function ($stackPos) { + 488 => function ($stackPos) { $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 490 => function ($stackPos) { + 489 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, + 490 => function ($stackPos) { + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, 491 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, @@ -2674,129 +2668,129 @@ protected function initReduceCallbacks(): void { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 493 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 494 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 495 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 496 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 497 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 498 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 499 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 500 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 501 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 502 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 503 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 504 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 505 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 506 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 507 => function ($stackPos) { $this->semValue = null; }, - 508 => function ($stackPos) { + 507 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 509 => function ($stackPos) { + 508 => function ($stackPos) { $this->semValue = array(); }, - 510 => function ($stackPos) { + 509 => function ($stackPos) { $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 511 => function ($stackPos) { + 510 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 512 => function ($stackPos) { + 511 => function ($stackPos) { $this->semValue = array(); }, - 513 => function ($stackPos) { + 512 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 514 => function ($stackPos) { + 513 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 515 => function ($stackPos) { + 514 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 516 => function ($stackPos) { + 515 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 517 => function ($stackPos) { + 516 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 518 => function ($stackPos) { + 517 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 519 => function ($stackPos) { + 518 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 520 => function ($stackPos) { + 519 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 521 => function ($stackPos) { + 520 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 522 => function ($stackPos) { + 521 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 523 => function ($stackPos) { + 522 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 524 => function ($stackPos) { + 523 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 525 => function ($stackPos) { + 524 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, - 526 => function ($stackPos) { + 525 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 527 => function ($stackPos) { + 526 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); $this->createdArrays->attach($this->semValue); }, - 528 => function ($stackPos) { + 527 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, - 529 => function ($stackPos) { + 528 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 530 => function ($stackPos) { + 529 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, - 531 => function ($stackPos) { + 530 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, - 532 => function ($stackPos) { + 531 => function ($stackPos) { $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, + 532 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, 533 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, @@ -2804,28 +2798,28 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 536 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 537 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 538 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = null; }, 539 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 540 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 543 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2840,34 +2834,34 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 548 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 549 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 551 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 552 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 553 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 554 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 555 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = null; }, 556 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 557 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2876,172 +2870,169 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 559 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 560 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 561 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 562 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 563 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 565 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 566 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 567 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 568 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 569 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 570 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 571 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 572 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 573 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 574 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 575 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 576 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 577 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 579 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 580 => function ($stackPos) { + 579 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 581 => function ($stackPos) { + 580 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, - 582 => function ($stackPos) { + 581 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $this->postprocessList($this->semValue); }, - 583 => function ($stackPos) { + 582 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, - 584 => function ($stackPos) { + 583 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 585 => function ($stackPos) { + 584 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, - 586 => function ($stackPos) { + 585 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 587 => function ($stackPos) { + 586 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 588 => function ($stackPos) { + 587 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 589 => function ($stackPos) { + 588 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 590 => function ($stackPos) { + 589 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 591 => function ($stackPos) { + 590 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 592 => function ($stackPos) { + 591 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 593 => function ($stackPos) { + 592 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 594 => function ($stackPos) { + 593 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); }, - 595 => function ($stackPos) { + 594 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, + 595 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, 596 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 597 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 598 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 599 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 600 => function ($stackPos) { - $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 601 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 602 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 603 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 604 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 605 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 606 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 607 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 608 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 609 => function ($stackPos) { + 608 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 610 => function ($stackPos) { + 609 => function ($stackPos) { $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 611 => function ($stackPos) { + 610 => function ($stackPos) { $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 612 => function ($stackPos) { + 611 => function ($stackPos) { $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 613 => function ($stackPos) { + 612 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 6cd99b6651..c375874120 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -160,8 +160,8 @@ class Php8 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1256; - protected $gotoTableSize = 628; + protected $actionTableSize = 1252; + protected $gotoTableSize = 646; protected $invalidSymbol = 168; protected $errorSymbol = 1; @@ -387,131 +387,131 @@ class Php8 extends \PhpParser\ParserAbstract protected $action = array( 132, 133, 134, 578, 135, 136, 0, 742, 743, 744, - 137, 37,-32766,-32766,-32766, 980,-32766,-32766,-32766,-32766, - -32766,-32766, 1295, 818,-32767,-32767,-32767,-32767, 101, 102, - 103,-32766, 931,-32766, 829, 736, 735,-32766, 1017,-32766, + 137, 37,-32766,-32766,-32766, 979,-32766,-32766,-32766,-32766, + -32766,-32766, 1294, 817,-32767,-32767,-32767,-32767, 101, 102, + 103,-32766, 930,-32766, 828, 736, 735,-32766, 1016,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1234, -365, 1026, -365, 745,-32766,-32766,-32766, 1101, - 1102, 1103, 1100, 1099, 1098, 1104, -327, -193, 820, 267, + -32767, 1233, -364, 1025, -364, 745,-32766,-32766,-32766, 1100, + 1101, 1102, 1099, 1098, 1097, 1103, -326, -192, 819, 267, 138, 399, 749, 750, 751, 752, 288,-32766, 423,-32766, -32766,-32766,-32766,-32766, 602, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 783, 579, 784, 785, 786, 787, 775, 776, 340, 341, 778, 779, 764, 765, - 766, 768, 769, 770, 351, 810, 811, 812, 813, 814, - 580, 771, 772, 581, 582, 804, 795, 793, 794, 807, - 790, 791, 827, -192, 583, 584, 789, 585, 586, 587, - 588, 589, 590, 981, 822,-32766,-32766,-32766, 792, 591, - 592, 703, 139, 2, 132, 133, 134, 578, 135, 136, - 1050, 742, 743, 744, 137, 37,-32766, 12,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -111, 34, - 238,-32766,-32766,-32766, 81, 128, -592,-32766, 322, 736, - 735, 608, 828, -592, 716, 386,-32766, 11,-32766,-32766, - -32766,-32766,-32766, 1315,-32766,-32766,-32766, 1311, 296, 745, - 1314, 74, 104, 105, 106, 107, 108, 322, 271, 1340, - -327, -193, 1341, 267, 138, 399, 749, 750, 751, 752, - 109, 476, 423,-32766,-32766,-32766, 551, 823, 126, 753, + 766, 768, 769, 770, 351, 809, 810, 811, 812, 813, + 580, 771, 772, 581, 582, -191, 795, 793, 794, 806, + 790, 791, 826, 2, 583, 584, 789, 585, 586, 587, + 588, 589, 590, 980, 821,-32766,-32766,-32766, 792, 591, + 592, 703, 139, 19, 132, 133, 134, 578, 135, 136, + 1049, 742, 743, 744, 137, 37,-32766, 34,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -110, 128, + 238,-32766,-32766,-32766, 81, 144, -591,-32766, 322, 736, + 735, 608, 827, -591, 716, 386,-32766, 18,-32766,-32766, + -32766,-32766,-32766, 1314,-32766,-32766,-32766, 1310, 296, 745, + 1313, 74, 104, 105, 106, 107, 108, 322, 271, 1339, + -326, -192, 1340, 267, 138, 399, 749, 750, 751, 752, + 109, 476, 423,-32766,-32766,-32766, 551, 822, 126, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 783, 579, 784, 785, 786, 787, 775, 776, 340, 341, - 778, 779, 764, 765, 766, 768, 769, 770, 351, 810, - 811, 812, 813, 814, 580, 771, 772, 581, 582, 804, - 795, 793, 794, 807, 790, 791, 818, -192, 583, 584, - 789, 585, 586, 587, 588, 589, 590, 1267, 82, 83, - 84, 1078, 792, 591, 592, 728, 148, 767, 737, 738, - 739, 740, 741, 824, 742, 743, 744, 780, 781, 36, - 144, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 778, 779, 764, 765, 766, 768, 769, 770, 351, 809, + 810, 811, 812, 813, 580, 771, 772, 581, 582, -191, + 795, 793, 794, 806, 790, 791, 817, 251, 583, 584, + 789, 585, 586, 587, 588, 589, 590, 1266, 82, 83, + 84, 1077, 792, 591, 592, 728, 148, 767, 737, 738, + 739, 740, 741, 823, 742, 743, 744, 780, 781, 36, + 307, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, -592, 271, -592, 251, 375, - 376, 1101, 1102, 1103, 1100, 1099, 1098, 1104, 109, 417, - 949, 950, 745, 477, 289, 951,-32766,-32766,-32766, 141, - 1077, 945,-32766, 322, 377, 376, 746, 747, 748, 749, - 750, 751, 752, 307, 417, 816, 309,-32766, -543,-32766, - -32766, 320, 753, 754, 755, 756, 757, 758, 759, 760, - 761, 762, 763, 783, 806, 784, 785, 786, 787, 775, - 776, 777, 805, 778, 779, 764, 765, 766, 768, 769, - 770, 809, 810, 811, 812, 813, 814, 815, 771, 772, - 773, 774, 804, 795, 793, 794, 807, 790, 791, 239, - -86, 782, 788, 789, 796, 797, 799, 798, 800, 801, - -32766, 1023, -543, -543, 933, 792, 803, 802, 49, 50, - 51, 507, 52, 53, 423, 335, 933, -543, 54, 55, - -111, 56, 1026, 1026, 911, -111, 150, -111, 289, -549, - -32766, -543, 303,-32766,-32766, -111, -111, -111, -111, -111, - -111, -111, -111, 352, 911, 288, 279, 854, 1234, 855, - 336,-32766, 1234, 14, 706, 357, -86, 57, 58,-32766, - 365, -542, 59, 369, 60, 245, 246, 61, 62, 63, - 64, 65, 66, 67, 68, 1093, 27, 269, 69, 439, - 508, 1026, -16, -341, 1261, 1262, 509, 384, 827, 1229, - 1228, 1230, 1259, 41, 24, 510, 826, 511, 1079, 512, - 911, 513, 736, 735, 514, 515, 854, 901, 855, 43, - 44, 440, 372, 371,-32766, 45, 516, 1013, 1012, 1011, - 1014, 363, 334, 435, 1227, -542, -542, 901, 1220, 827, - 518, 519, 520, 827, 1023, 436, 1026, -271, 1255, -583, - -542, -583, 522, 523, 437, 1248, 1249, 1250, 1251, 1245, - 1246, 295, -548, 151, -542, 438, 1026, 1252, 1247, 288, - 1225, 1229, 1228, 1230, 296, 102, 103, 70, 911, 652, - 25, 318, 319, 322, -153, -153, -153, 911, 833, -111, - 123, 1025, 913, 901,-32766, 911, 701, 153,-32766, -153, - -88, -153, 154, -153, 1049, -153,-32766,-32766, 707, 1229, - 1228, 1230, 913, 124, -589, 370, 701, 708, 74, 296, - 155, -589, 74, 157, 322, 711, 949, 950, 322, 827, - 129, 517, 911, 283, 32, 323, 887, 945, -111, -111, - -111, 31, 110, 111, 112, 113, 114, 115, 116, 117, + 104, 105, 106, 107, 108, -591, 271, -591, 309, 375, + 376, 1100, 1101, 1102, 1099, 1098, 1097, 1103, 109, 417, + 948, 949, 745, 477, 289, 950,-32766,-32766,-32766, 141, + 1076, 944,-32766, 322, 377, 376, 746, 747, 748, 749, + 750, 751, 752, 320, 417, 815, 335,-32766, -542,-32766, + -32766, 336, 753, 754, 755, 756, 757, 758, 759, 760, + 761, 762, 763, 783, 805, 784, 785, 786, 787, 775, + 776, 777, 804, 778, 779, 764, 765, 766, 768, 769, + 770, 808, 809, 810, 811, 812, 813, 814, 771, 772, + 773, 774, -545, 795, 793, 794, 806, 790, 791, 239, + -85, 782, 788, 789, 796, 797, 799, 798, 800, 801, + -32766, 21, -542, -542, 1022, 792, 803, 802, 49, 50, + 51, 507, 52, 53, 423, 736, 735, -542, 54, 55, + -110, 56, 1025, 1092, 910, -110, 1025, -110, 289, -548, + -32766, -542, 303,-32766,-32766, -110, -110, -110, -110, -110, + -110, -110, -110, 365, 910, 288, -545, -545, 1233, 279, + 369,-32766, 1233, 853, 706, 854, -85, 57, 58,-32766, + 384, -541, 59, 435, 60, 245, 246, 61, 62, 63, + 64, 65, 66, 67, 68, -545, 27, 269, 69, 439, + 508, 1025, -16, -340, 1260, 1261, 509, 436, 826, 1228, + 1227, 1229, 1258, 41, 24, 510, 932, 511, 1078, 512, + 910, 513, 825, 437, 514, 515, 853, 900, 854, 43, + 44, 440, 372, 371,-32766, 45, 516, 1012, 1011, 1010, + 1013, 363, 334, 438, 1226, -541, -541, 900, 1219, 826, + 518, 519, 520, 826, 1022, 352, 1025, -270, 1254, 932, + -541, 832, 522, 523, 150, 1247, 1248, 1249, 1250, 1244, + 1245, 295, -547, -582, -541, -582, 1025, 1251, 1246, 288, + 1224, 1228, 1227, 1229, 296, 102, 103, 70, 910, 652, + 25, 318, 319, 322, -152, -152, -152, 910, 357, -110, + 123, 1024, 912, 900,-32766, 910, 701, 151,-32766, -152, + -87, -152, 153, -152, 1048, -152,-32766,-32766, 707, 1228, + 1227, 1229, 912, 124, -588, 370, 701, 708, 74, 296, + 154, -588, 74, 155, 322, 711, 948, 949, 322, 826, + 129, 517, 910, 283, 157, 323, 886, 944, -110, -110, + -110, 31, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 736, 735, 453, 454, 455, - 130, 901, 718, 736, 735, -544, 827, 143, 913, 1330, - 901, 158, 701, -153, 671, 672, 949, 950, 901, 149, - 402, 951, 373, 374, 1139, 1141, -546, 946, 378, 379, - 643, 644,-32766, 159, 160, -541, 27, 161, 1227, 461, - 462, -85, -79, -75, -73,-32766,-32766,-32766, 827,-32766, - 140,-32766, 1259,-32766, 322, 901,-32766, 47, -72, 1023, - -71,-32766,-32766,-32766, -4, 911, -70,-32766,-32766, -544, - -544, 35, 248,-32766, 414, -69, 913, -68, -67, -66, - 701, 1026,-32766, -47, -544, 966, 736, 735, 1220, 701, - -546, -546, -541, 913, -18, -301, 48, 701, -544, -541, - -541, 147, 522, 523, 279, 1248, 1249, 1250, 1251, 1245, - 1246, 270, 73, -589, -541, -589, 280, 1252, 1247, -546, - 717, 297, 298,-32766, 720, 910, 146, 72, -541, 1227, - 913, -297, 319, 322, 701, 277,-32766,-32766,-32766, 278, - -32766, 281,-32766, 282,-32766, 328, 284,-32766, 901, 285, - 125, 290,-32766,-32766,-32766, 291, -541, -541,-32766,-32766, - 299, 300, -51, 927,-32766, 414, 109, 681, 271, 145, - 370, -541, 430,-32766, 827, 368,-32766, 294, 818, 694, - 674, 949, 950, 1108, 658, -541, 517, 553, 1342, 127, - 641, 521, 945, -111, -111, -111, 131, 653, 304, 434, - 13, 301, 557,-32766, 308,-32766, 302, 1266, 1268, 563, - 606, 1227, 458, 487, 9, 1256, -506, 659,-32766,-32766, - -32766, 675,-32766, 913,-32766, -496,-32766, 701, -4,-32766, - 7, 16, 367, 929,-32766,-32766,-32766, 39, 33,-32766, - -32766,-32766, 911, 0, 0, 1227,-32766, 414, 0, 0, + 32, 900, 718, 736, 735, -543, 826, 130, 912, 1329, + 900, 143, 701, -152, 671, 672, 948, 949, 900, 149, + 402, 950, 373, 374, 1138, 1140, 47, 945, 378, 379, + 643, 644,-32766, 158, 159, -540, 27, 160, 1226, 461, + 462, 161, -84, -78, -74,-32766,-32766,-32766, 826,-32766, + 140,-32766, 1258,-32766, 322, 900,-32766, 284, -73, 1022, + -72,-32766,-32766,-32766, -4, 910, -71,-32766,-32766, -543, + -543, 35, 248,-32766, 414, -70, 912, -69, -68, -67, + 701, 1025,-32766, -66, -543, 965, 736, 735, 1219, 701, + 297, 298, -540, 912, -47, -300, 48, 701, -543, -540, + -540, -18, 522, 523, 279, 1247, 1248, 1249, 1250, 1244, + 1245, 147, 73, -588, -540, -588, 270, 1251, 1246, 125, + 280, 717, 720,-32766, 909, 146, 926, 72, -540, 1226, + 912, -296, 319, 322, 701, 277,-32766,-32766,-32766, 278, + -32766, 281,-32766, 282,-32766, 328, 285,-32766, 900, 290, + 291, 109,-32766,-32766,-32766, 271, -540, -540,-32766,-32766, + 299, 300, -51, 681,-32766, 414, 826, 145,-32766, 1107, + 370, -540, 430,-32766, 658, 368, 20, 294, 1341, 817, + 641, 948, 949, 304, 694, -540, 517, 553, 301, 127, + 557, 521, 944, -110, -110, -110, 131, 653, 308, 674, + 458, 434,-32766, 1265, 302,-32766, 563, 1267, 487, 928, + 39, 1226, 606, 825, 9, 659, 675, -505,-32766,-32766, + -32766, -495,-32766, 912,-32766, 7,-32766, 701, -4,-32766, + 23, 0, 296, 0,-32766,-32766,-32766, 1255, 33,-32766, + -32766,-32766, 910, 0, 0, 1226,-32766, 414, 0, 0, 0, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, - -32766, 0, 0,-32766, 0, 0, 0, 0,-32766,-32766, - -32766,-32766, 0, 0,-32766,-32766, 0, 1227, 826, 40, - -32766, 414, 911, 725,-32766,-32766,-32766, 296,-32766,-32766, - -32766, 726,-32766, 846, 892,-32766, 990, 967, 974, 482, - -32766,-32766,-32766,-32766, 964, 975,-32766,-32766, 890, 1227, - 570, 962,-32766, 414, 1082, 1085,-32766,-32766,-32766, 1086, - -32766,-32766,-32766, 1083,-32766, 901, 1084,-32766, 1090, -577, - 838, 1281,-32766,-32766,-32766, 1299, 1333, 646,-32766,-32766, - -576, -249, -249, -249,-32766, 414, -575, 370, -549, -548, - 27, 269, -547,-32766, -490, 1, 28, 29, 949, 950, - 38, 42, 827, 517, 46, 901, 1259, 71, 887, 945, - -111, -111, -111, 75, 76, 77, 78, 79, 80, 142, - 152, -248, -248, -248, 156, 244, 324, 370, 352, 353, - 722, 354, 355, 356, 357, 358, 359, 360, 949, 950, - 913, 361, 1220, 517, 701, -249, 362, 364, 887, 945, - -111, -111, -111, 431, 550, 888, -274, 523, 27, 1248, - 1249, 1250, 1251, 1245, 1246, -272, -271, 18, 19, 20, - 827, 1252, 1247, 21, 1259, 23,-32766, 401, 478, 479, - 913, 72, 1227, 1337, 701, -248, 319, 322, 486,-32766, - -32766,-32766, 489,-32766, 490,-32766, 491,-32766, 492, 496, - -32766, 497, 498, 505, 568,-32766,-32766,-32766, 688, 1238, - 1220,-32766,-32766, 1179, 1257, 1052, 1051,-32766, 414, 1032, - 1215, 1028, -276, -103, 17, 523,-32766, 1248, 1249, 1250, - 1251, 1245, 1246, 22, 26, 293, 400, 599, 603, 1252, - 1247, 632, 693, 1183, 1233, 1180, 1312, 0, 317, 72, - 366, -510, 702, 705, 319, 322, 709, 710, 712, 713, - 714, 715, 719, 704, 0, 1339, 0, 849, 848, 857, - 939, 982, 856, 1338, 938, 936, 937, 940, 1211, 920, - 930, 918, 972, 973, 630, 1336, 1293, 1282, 1300, 1309, - 0, 1196, 0, 1260, 0, 322 + -32766, 0, 0,-32766, 0, 0, 367, 0,-32766,-32766, + -32766,-32766, 0, 40,-32766,-32766, 0, 1226, 725, 726, + -32766, 414, 910, 845,-32766,-32766,-32766, 891,-32766,-32766, + -32766, 989,-32766, 966, 973,-32766, 963, 974, 889, 482, + -32766,-32766,-32766,-32766, 961, 1081,-32766,-32766, 1084, 1226, + 570, 1085,-32766, 414, 1082, 1083,-32766,-32766,-32766, 1089, + -32766,-32766,-32766, 837,-32766, 900, 1280,-32766, 1298, 1332, + 646, 722,-32766,-32766,-32766, -576, -575, -574,-32766,-32766, + -548, -248, -248, -248,-32766, 414, -547, 370, -546, -489, + 27, 269, 1,-32766, 28, 29, 38, 42, 948, 949, + 46, 71, 826, 517, 75, 900, 1258, 76, 886, 944, + -110, -110, -110, 77, 78, 79, 80, 142, 152, 156, + 244, -247, -247, -247, 324, 352, 353, 370, 354, 355, + 887, 356, 357, 358, 359, 360, 361, 362, 948, 949, + 912, 364, 1219, 517, 701, -248, 431, 550, 886, 944, + -110, -110, -110, -273, -271, -270, 12, 523, 27, 1247, + 1248, 1249, 1250, 1244, 1245, 13, 14, 15, 17, 401, + 826, 1251, 1246, 478, 1258, 479,-32766, 486, 489, 490, + 912, 72, 1226, 1336, 701, -247, 319, 322, 491,-32766, + -32766,-32766, 492,-32766, 496,-32766, 497,-32766, 498, 505, + -32766, 568, 688, 1237, 1178,-32766,-32766,-32766, 1256, 1051, + 1219,-32766,-32766, 1050, 1031, 1214, 1027,-32766, 414, -275, + -102, 11, 16, 26, 293, 523,-32766, 1247, 1248, 1249, + 1250, 1244, 1245, 400, 599, 603, 632, 693, 1182, 1251, + 1246, 1232, 1179, 1311, 1259, 317, 366, 702, 705, 72, + 709, -509, 710, 712, 319, 322, 713, 714, 715, 719, + 704, 0, 1338, 848, 847, 856, 0, 938, 981, 855, + 1337, 937, 935, 936, 939, 1210, 919, 929, 917, 971, + 972, 630, 1335, 1292, 1281, 1299, 1308, 0, 1195, 0, + 0, 322 ); protected $actionCheck = array( @@ -527,7 +527,7 @@ class Php8 extends \PhpParser\ParserAbstract 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, + 122, 123, 124, 125, 126, 8, 128, 129, 130, 131, 132, 133, 82, 8, 136, 137, 138, 139, 140, 141, 142, 143, 144, 159, 156, 9, 10, 11, 150, 151, 152, 163, 154, 8, 2, 3, 4, 5, 6, 7, @@ -542,8 +542,8 @@ class Php8 extends \PhpParser\ParserAbstract 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, 80, 162, 136, 137, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 162, + 128, 129, 130, 131, 132, 133, 80, 8, 136, 137, 138, 139, 140, 141, 142, 143, 144, 146, 9, 10, 11, 159, 150, 151, 152, 163, 154, 2, 3, 4, 5, 6, 7, 156, 9, 10, 11, 12, 13, 30, @@ -558,26 +558,26 @@ class Php8 extends \PhpParser\ParserAbstract 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, 14, + 125, 126, 70, 128, 129, 130, 131, 132, 133, 14, 31, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 116, 116, 134, 135, 122, 150, 151, 152, 2, 3, - 4, 5, 6, 7, 80, 8, 122, 149, 12, 13, - 101, 15, 138, 138, 1, 106, 14, 108, 30, 161, + 116, 101, 134, 135, 116, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 80, 37, 38, 149, 12, 13, + 101, 15, 138, 123, 1, 106, 138, 108, 30, 161, 116, 163, 113, 9, 10, 116, 117, 118, 119, 120, - 121, 122, 123, 161, 1, 161, 161, 106, 1, 108, - 8, 137, 1, 101, 31, 161, 97, 51, 52, 116, + 121, 122, 123, 8, 1, 161, 134, 135, 1, 161, + 8, 137, 1, 106, 31, 108, 97, 51, 52, 116, 8, 70, 56, 8, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 123, 70, 71, 72, 73, + 64, 65, 66, 67, 68, 163, 70, 71, 72, 73, 74, 138, 31, 164, 78, 79, 80, 8, 82, 155, - 156, 157, 86, 87, 88, 89, 155, 91, 164, 93, - 1, 95, 37, 38, 98, 99, 106, 84, 108, 103, + 156, 157, 86, 87, 88, 89, 122, 91, 164, 93, + 1, 95, 155, 8, 98, 99, 106, 84, 108, 103, 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, 122, 115, 116, 8, 80, 134, 135, 84, 122, 82, - 124, 125, 126, 82, 116, 8, 138, 162, 1, 160, - 149, 162, 136, 137, 8, 139, 140, 141, 142, 143, - 144, 145, 161, 14, 163, 8, 138, 151, 152, 161, + 124, 125, 126, 82, 116, 161, 138, 162, 1, 122, + 149, 8, 136, 137, 14, 139, 140, 141, 142, 143, + 144, 145, 161, 160, 163, 162, 138, 151, 152, 161, 116, 155, 156, 157, 158, 49, 50, 161, 1, 75, - 76, 165, 166, 167, 75, 76, 77, 1, 8, 128, + 76, 165, 166, 167, 75, 76, 77, 1, 161, 128, 16, 137, 159, 84, 137, 1, 163, 14, 137, 90, 31, 92, 14, 94, 1, 96, 51, 52, 31, 155, 156, 157, 159, 16, 1, 106, 163, 31, 161, 158, @@ -585,40 +585,40 @@ class Php8 extends \PhpParser\ParserAbstract 16, 122, 1, 30, 14, 70, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 37, 38, 129, 130, 131, - 16, 84, 31, 37, 38, 70, 82, 16, 159, 85, + 14, 84, 31, 37, 38, 70, 82, 16, 159, 85, 84, 16, 163, 164, 75, 76, 117, 118, 84, 101, 102, 122, 106, 107, 59, 60, 70, 128, 106, 107, 111, 112, 74, 16, 16, 70, 70, 16, 80, 134, - 135, 31, 31, 31, 31, 87, 88, 89, 82, 91, - 163, 93, 86, 95, 167, 84, 98, 70, 31, 116, + 135, 16, 31, 31, 31, 87, 88, 89, 82, 91, + 163, 93, 86, 95, 167, 84, 98, 37, 31, 116, 31, 103, 104, 105, 0, 1, 31, 109, 110, 134, 135, 147, 148, 115, 116, 31, 159, 31, 31, 31, 163, 138, 124, 31, 149, 159, 37, 38, 122, 163, 134, 135, 70, 159, 31, 35, 70, 163, 163, 134, 135, 31, 136, 137, 161, 139, 140, 141, 142, 143, 144, 31, 154, 160, 149, 162, 31, 151, 152, 163, - 31, 134, 135, 74, 31, 31, 31, 161, 163, 80, + 31, 31, 31, 74, 31, 31, 38, 161, 163, 80, 159, 35, 166, 167, 163, 35, 87, 88, 89, 35, 91, 35, 93, 35, 95, 35, 37, 98, 84, 37, - 163, 37, 103, 104, 105, 37, 134, 135, 109, 110, - 134, 135, 31, 38, 115, 116, 69, 77, 57, 70, - 106, 149, 108, 124, 82, 149, 85, 113, 80, 92, - 94, 117, 118, 82, 96, 163, 122, 85, 83, 163, - 113, 127, 128, 129, 130, 131, 31, 90, 114, 128, - 97, 132, 89, 137, 132, 74, 133, 146, 146, 153, - 153, 80, 97, 97, 150, 160, 149, 100, 87, 88, - 89, 100, 91, 159, 93, 149, 95, 163, 164, 98, - 149, 149, 149, 154, 103, 104, 105, 159, 163, 74, + 37, 69, 103, 104, 105, 57, 134, 135, 109, 110, + 134, 135, 31, 77, 115, 116, 82, 70, 85, 82, + 106, 149, 108, 124, 96, 149, 97, 113, 83, 80, + 113, 117, 118, 114, 92, 163, 122, 85, 132, 163, + 89, 127, 128, 129, 130, 131, 31, 90, 132, 94, + 97, 128, 137, 146, 133, 74, 153, 146, 97, 154, + 159, 80, 153, 155, 150, 100, 100, 149, 87, 88, + 89, 149, 91, 159, 93, 149, 95, 163, 164, 98, + 149, -1, 158, -1, 103, 104, 105, 160, 163, 74, 109, 110, 1, -1, -1, 80, 115, 116, -1, -1, -1, -1, 87, 88, 89, 124, 91, -1, 93, -1, - 95, -1, -1, 98, -1, -1, -1, -1, 103, 104, - 105, 74, -1, -1, 109, 110, -1, 80, 155, 159, - 115, 116, 1, 159, 87, 88, 89, 158, 91, 124, + 95, -1, -1, 98, -1, -1, 149, -1, 103, 104, + 105, 74, -1, 159, 109, 110, -1, 80, 159, 159, + 115, 116, 1, 159, 87, 88, 89, 159, 91, 124, 93, 159, 95, 159, 159, 98, 159, 159, 159, 102, 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, - 91, 124, 93, 159, 95, 84, 159, 98, 159, 161, - 160, 160, 103, 104, 105, 160, 160, 160, 109, 110, + 91, 124, 93, 160, 95, 84, 160, 98, 160, 160, + 160, 164, 103, 104, 105, 161, 161, 161, 109, 110, 161, 100, 101, 102, 115, 116, 161, 106, 161, 161, 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, 161, 161, 82, 122, 161, 84, 86, 161, 127, 128, @@ -626,7 +626,7 @@ class Php8 extends \PhpParser\ParserAbstract 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, - 129, 130, 131, 161, 161, 164, 162, 137, 70, 139, + 129, 130, 131, 162, 162, 162, 162, 137, 70, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, @@ -635,18 +635,18 @@ class Php8 extends \PhpParser\ParserAbstract 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, - 152, 162, 162, 162, 162, 162, 162, -1, 163, 161, + 152, 162, 162, 162, 166, 163, 163, 163, 163, 161, 163, 165, 163, 163, 166, 167, 163, 163, 163, 163, - 163, 163, 163, 163, -1, 164, -1, 164, 164, 164, + 163, -1, 164, 164, 164, 164, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - -1, 165, -1, 166, -1, 167 + 164, 164, 164, 164, 164, 164, 164, -1, 165, -1, + -1, 167 ); protected $actionBase = array( 0, -2, 152, 549, 764, 941, 981, 587, 384, -12, - 867, 305, 305, -57, 305, 305, 305, 617, 634, 634, - 671, 634, 473, 626, 493, 493, 493, 658, 658, 658, + 856, 617, 634, 634, 671, 634, 473, 626, 305, 305, + -57, 305, 305, 305, 493, 493, 493, 658, 658, 658, 658, 749, 749, 897, 897, 929, 865, 831, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, @@ -660,9 +660,9 @@ class Php8 extends \PhpParser\ParserAbstract 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 33, -16, 83, 660, 1033, 1041, 1035, 1042, - 1031, 1022, 1034, 1036, 1043, 1081, 1082, 795, 1083, 1084, - 1080, 1085, 1039, 877, 1032, 1040, 289, 289, 289, 289, + 1062, 1062, 33, -16, 83, 686, 1022, 1036, 1032, 1039, + 1020, 1019, 1031, 1033, 1040, 1078, 1079, 794, 1080, 1081, + 1077, 1082, 1034, 870, 1021, 1035, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 363, 224, 474, 10, 10, 10, 10, 10, @@ -671,55 +671,55 @@ class Php8 extends \PhpParser\ParserAbstract 357, 172, 980, 166, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 665, 47, 136, 136, 7, 7, 7, 7, 7, 369, -20, -20, -20, -20, 501, 448, 50, - 643, 497, 402, -54, 566, 334, 243, 335, 335, 468, + 643, 497, 350, -54, 566, 334, 243, 338, 338, 468, 468, -85, -85, 468, 468, 468, 161, 161, 393, 393, - 393, 393, 318, 441, 391, 151, 766, 206, 206, 206, - 206, 766, 766, 766, 766, 762, 1087, 766, 766, 766, + 393, 393, 318, 441, 397, 151, 765, 206, 206, 206, + 206, 765, 765, 765, 765, 761, 1038, 765, 765, 765, 635, 722, 722, 726, 595, 595, 722, 450, 802, 624, - 450, 624, 21, 139, 364, 599, 268, 429, 364, 656, - 687, 653, 185, 823, 616, 823, 1021, 332, 791, 344, - 752, 712, 869, 1060, 1044, 817, 1078, 821, 1079, 568, - 605, 711, 1020, 1020, 1020, 1020, 1020, 1020, 1020, 1020, - 1020, 1020, 1020, 1088, 515, 1021, 157, 1088, 1088, 1088, - 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, - 619, 157, 544, 639, 157, 810, 515, 33, 776, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 763, + 450, 624, 21, 139, 364, 599, 268, 443, 364, 362, + 656, 653, 185, 758, 616, 758, 1018, 424, 783, 467, + 763, 713, 860, 1057, 1041, 815, 1075, 816, 1076, 568, + 605, 712, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, + 1017, 1017, 1017, 1084, 428, 1018, 157, 1084, 1084, 1084, + 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, + 619, 157, 544, 639, 157, 810, 428, 33, 772, 33, + 33, 33, 33, 33, 33, 33, 33, 33, 33, 770, 200, 33, -16, 31, 31, 142, 37, 31, 31, 31, - 31, 33, 33, 33, 616, 811, 756, 622, 757, 125, - 811, 811, 811, 409, 58, 425, 59, 760, 796, 89, - 798, 798, 801, 894, 894, 798, 792, 798, 801, 903, - 798, 798, 894, 894, 829, 177, 565, 457, 505, 577, - 894, 375, 798, 798, 798, 798, 772, 586, 798, 340, - 312, 798, 798, 772, 769, 785, 145, 773, 894, 894, - 894, 772, 502, 773, 773, 773, 824, 832, 777, 780, - 383, 378, 620, 171, 825, 780, 780, 798, 529, 777, - 780, 777, 780, 779, 780, 780, 780, 777, 780, 792, - 492, 780, 695, 597, 159, 780, 6, 906, 912, 609, - 913, 899, 914, 952, 915, 916, 1049, 893, 924, 900, - 917, 953, 896, 895, 794, 614, 637, 781, 767, 891, - 797, 797, 797, 887, 797, 797, 797, 797, 797, 797, - 797, 797, 614, 755, 783, 771, 813, 928, 654, 684, - 1002, 761, 951, 1046, 1086, 927, 1007, 918, 778, 691, - 973, 930, 926, 1045, 931, 932, 975, 1011, 834, 1012, - 979, 799, 1061, 1063, 870, 934, 1050, 797, 906, 916, - 710, 900, 917, 896, 895, 748, 747, 744, 746, 735, - 729, 713, 727, 770, 1013, 885, 868, 871, 933, 888, - 614, 875, 965, 775, 976, 977, 1047, 815, 805, 876, - 1064, 935, 936, 940, 1053, 1014, 1054, 820, 966, 954, - 986, 816, 1065, 990, 992, 994, 996, 1055, 1066, 1056, - 879, 1057, 835, 807, 963, 788, 1067, 462, 806, 808, - 818, 946, 589, 925, 1058, 1068, 1069, 997, 999, 1000, - 1070, 1071, 919, 837, 967, 786, 971, 964, 838, 839, - 623, 814, 1017, 800, 804, 812, 628, 646, 1072, 1073, - 1074, 923, 789, 790, 845, 846, 1018, 809, 1019, 1075, - 649, 849, 717, 1076, 1006, 718, 721, 787, 1059, 782, - 784, 803, 945, 793, 852, 1077, 855, 856, 860, 1001, - 864, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 31, 33, 33, 33, 616, 798, 753, 622, 759, 117, + 798, 798, 798, 409, 58, 425, 59, 760, 796, 89, + 799, 799, 787, 891, 891, 799, 784, 799, 787, 899, + 799, 799, 891, 891, 774, 171, 505, 378, 492, 529, + 891, 312, 799, 799, 799, 799, 766, 545, 799, 279, + 177, 799, 799, 766, 756, 789, 125, 771, 891, 891, + 891, 766, 485, 771, 771, 771, 819, 820, 767, 785, + 375, 340, 583, 159, 788, 785, 785, 799, 502, 767, + 785, 767, 785, 755, 785, 785, 785, 767, 785, 784, + 383, 785, 717, 565, 145, 785, 6, 900, 903, 609, + 906, 895, 912, 945, 913, 914, 1044, 888, 919, 896, + 915, 946, 894, 893, 793, 614, 637, 776, 768, 887, + 782, 782, 782, 879, 782, 782, 782, 782, 782, 782, + 782, 782, 614, 777, 817, 773, 801, 925, 654, 691, + 999, 757, 926, 1046, 1083, 924, 1001, 916, 751, 695, + 966, 927, 867, 1042, 928, 930, 967, 1002, 824, 1006, + 979, 797, 1058, 1059, 863, 932, 1045, 782, 900, 914, + 711, 896, 915, 894, 893, 752, 748, 746, 747, 744, + 735, 727, 729, 780, 1007, 876, 874, 866, 931, 885, + 614, 868, 954, 775, 971, 973, 1043, 803, 795, 869, + 1060, 933, 934, 935, 1047, 1011, 1049, 814, 963, 951, + 975, 811, 1061, 976, 977, 986, 990, 1050, 1063, 1053, + 875, 1054, 828, 807, 952, 778, 1064, 580, 806, 808, + 813, 940, 623, 923, 1055, 1065, 1066, 992, 994, 996, + 1067, 1068, 917, 832, 964, 805, 965, 953, 834, 835, + 628, 812, 1012, 800, 804, 809, 646, 649, 1069, 1070, + 1071, 918, 790, 786, 837, 838, 1013, 720, 1014, 1072, + 660, 839, 718, 1073, 1000, 721, 725, 792, 1056, 781, + 769, 779, 936, 791, 845, 1074, 846, 849, 852, 997, + 855, 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, 456, 456, 456, 456, 456, 456, 305, 305, 305, - 305, 0, 0, 305, 0, 0, 0, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 305, 456, 456, 456, 456, 456, 456, 456, 0, 0, + 305, 0, 0, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, @@ -743,171 +743,173 @@ class Php8 extends \PhpParser\ParserAbstract 289, 289, 289, 289, 289, 289, 289, 289, 494, 494, 289, 289, 494, 289, 494, 494, 494, 494, 494, 494, 494, 494, 494, 0, 289, 289, 289, 289, 289, 289, - 289, 289, 829, 161, 161, 161, 161, 494, 494, 494, - 494, 494, 235, 235, 161, 494, 829, 494, 494, 494, + 289, 289, 774, 161, 161, 161, 161, 494, 494, 494, + 494, 494, 235, 235, 161, 494, 774, 494, 494, 494, 494, 494, 494, 494, 494, 494, 0, 0, 494, 494, - 494, 494, 0, 0, 157, 624, 494, 792, 792, 792, - 792, 494, 494, 494, 494, 624, 624, 494, 494, 494, + 494, 494, 0, 0, 157, 624, 494, 784, 784, 784, + 784, 494, 494, 494, 494, 624, 624, 494, 494, 494, 0, 0, 0, 0, 161, 161, 0, 157, 624, 0, - 157, 0, 792, 792, 494, 0, 829, 202, 494, 0, - 0, 0, 0, 157, 792, 157, 515, 798, 624, 798, - 515, 515, 31, 33, 202, 618, 618, 618, 618, 0, - 0, 616, 829, 829, 829, 829, 829, 829, 829, 829, - 829, 829, 829, 792, 0, 829, 0, 792, 792, 792, + 157, 0, 784, 784, 494, 0, 774, 202, 494, 0, + 0, 0, 0, 157, 784, 157, 428, 799, 624, 799, + 428, 428, 31, 33, 202, 618, 618, 618, 618, 0, + 0, 616, 774, 774, 774, 774, 774, 774, 774, 774, + 774, 774, 774, 784, 0, 774, 0, 784, 784, 784, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 792, 0, 0, 894, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 903, - 0, 0, 0, 0, 0, 0, 792, 0, 0, 0, - 0, 0, 0, 0, 0, 797, 815, 0, 815, 0, - 797, 797, 797, 0, 0, 0, 0, 814, 809 + 0, 0, 0, 0, 0, 784, 0, 0, 891, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 899, + 0, 0, 0, 0, 0, 0, 784, 0, 0, 0, + 0, 0, 0, 0, 0, 782, 803, 0, 803, 0, + 782, 782, 782, 0, 0, 0, 0, 812, 720 ); protected $actionDefault = array( - 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 101,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 595, 595, 595, - 595,32767,32767, 253, 103,32767,32767, 468, 385, 385, - 385,32767,32767, 539, 539, 539, 539, 539, 539,32767, - 32767,32767,32767,32767,32767, 468,32767,32767,32767,32767, + 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, + 32767,32767,32767,32767,32767,32767,32767, 594, 594, 594, + 594,32767,32767, 252, 102,32767,32767, 467, 384, 384, + 384,32767,32767, 538, 538, 538, 538, 538, 538,32767, + 32767,32767,32767,32767,32767, 467,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, 101,32767, - 32767,32767, 37, 7, 8, 10, 11, 50, 17, 323, - 32767,32767,32767,32767, 103,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 100,32767, + 32767,32767, 37, 7, 8, 10, 11, 50, 17, 322, + 32767,32767,32767,32767, 102,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 588,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 587,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 472, 451, 452, 454, - 455, 384, 540, 594, 326, 591, 383, 146, 338, 328, - 241, 329, 257, 473, 258, 474, 477, 478, 214, 286, - 380, 150, 415, 469, 417, 467, 471, 416, 390, 396, - 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, - 407, 408, 388, 389, 470, 448, 447, 446,32767,32767, - 413, 414,32767, 418,32767,32767,32767,32767,32767,32767, - 32767, 103,32767, 387, 421, 419, 420, 437, 438, 435, - 436, 439,32767, 440, 441, 442, 443,32767, 315,32767, - 32767,32767, 364, 362, 422, 315, 112,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 428, 429,32767,32767, - 32767,32767, 533, 445,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 103,32767, 101, - 535, 410, 412, 502, 423, 424, 391,32767, 509,32767, - 103, 511,32767,32767,32767,32767,32767,32767,32767, 534, - 32767, 541, 541,32767, 495, 101, 194,32767,32767,32767, - 194, 194,32767,32767,32767,32767,32767,32767,32767,32767, - 602, 495, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111,32767, 194, 111,32767,32767,32767, 101, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 189,32767, 267, 269, 103, 556, 194,32767, 514,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 507, + 32767,32767,32767,32767,32767,32767, 471, 450, 451, 453, + 454, 383, 539, 593, 325, 590, 382, 145, 337, 327, + 240, 328, 256, 472, 257, 473, 476, 477, 213, 285, + 379, 149, 414, 468, 416, 466, 470, 415, 389, 395, + 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, + 406, 407, 387, 388, 469, 447, 446, 445,32767,32767, + 412, 413,32767, 417,32767,32767,32767,32767,32767,32767, + 32767, 102,32767, 386, 420, 418, 419, 436, 437, 434, + 435, 438,32767, 439, 440, 441, 442,32767, 314,32767, + 32767,32767, 363, 361, 421, 314, 111,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 427, 428,32767,32767, + 32767,32767, 532, 444,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 102,32767, 100, + 534, 409, 411, 501, 422, 423, 390,32767, 508,32767, + 102, 510,32767,32767,32767,32767,32767,32767,32767, 533, + 32767, 540, 540,32767, 494, 100, 193,32767,32767,32767, + 193, 193,32767,32767,32767,32767,32767,32767,32767,32767, + 601, 494, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110,32767, 193, 110,32767,32767,32767, 100, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 188,32767, 266, 268, 102, 555, 193,32767, 513,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 506, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 495, 433, 139,32767, 139, 541, - 425, 426, 427, 497, 541, 541, 541, 311, 288,32767, - 32767,32767,32767, 512, 512, 101, 101, 101, 101, 507, - 32767,32767,32767,32767, 112, 100, 100, 100, 100, 100, - 104, 102,32767,32767,32767,32767, 222, 100,32767, 102, - 102,32767,32767, 222, 224, 211, 102, 226,32767, 560, - 561, 222, 102, 226, 226, 226, 246, 246, 484, 317, - 102, 100, 102, 102, 196, 317, 317,32767, 102, 484, - 317, 484, 317, 198, 317, 317, 317, 484, 317,32767, - 102, 317, 213, 100, 100, 317,32767,32767,32767, 497, - 32767,32767,32767,32767,32767,32767,32767, 221,32767,32767, - 32767,32767,32767,32767,32767,32767, 528,32767, 545, 558, - 431, 432, 434, 543, 456, 457, 458, 459, 460, 461, - 462, 464, 590,32767, 501,32767,32767,32767,32767, 337, - 32767, 600,32767, 600,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 494, 432, 138,32767, 138, 540, + 424, 425, 426, 496, 540, 540, 540, 310, 287,32767, + 32767,32767,32767, 511, 511, 100, 100, 100, 100, 506, + 32767,32767,32767,32767, 111, 99, 99, 99, 99, 99, + 103, 101,32767,32767,32767,32767, 221, 99,32767, 101, + 101,32767,32767, 221, 223, 210, 101, 225,32767, 559, + 560, 221, 101, 225, 225, 225, 245, 245, 483, 316, + 101, 99, 101, 101, 195, 316, 316,32767, 101, 483, + 316, 483, 316, 197, 316, 316, 316, 483, 316,32767, + 101, 316, 212, 99, 99, 316,32767,32767,32767, 496, + 32767,32767,32767,32767,32767,32767,32767, 220,32767,32767, + 32767,32767,32767,32767,32767,32767, 527,32767, 544, 557, + 430, 431, 433, 542, 455, 456, 457, 458, 459, 460, + 461, 463, 589,32767, 500,32767,32767,32767,32767, 336, + 32767, 599,32767, 599,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 601,32767, 541,32767,32767,32767,32767, 430, 9, 76, - 490, 43, 44, 52, 58, 518, 519, 520, 521, 515, - 516, 522, 517,32767,32767, 523, 566,32767,32767, 542, - 593,32767,32767,32767,32767,32767,32767, 139,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 528, - 32767, 137,32767,32767,32767,32767,32767,32767,32767,32767, - 524,32767,32767,32767, 541,32767,32767,32767,32767, 313, - 310,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 541,32767,32767, - 32767,32767,32767, 290,32767, 307,32767,32767,32767,32767, + 600,32767, 540,32767,32767,32767,32767, 429, 9, 75, + 489, 43, 44, 52, 58, 517, 518, 519, 520, 514, + 515, 521, 516,32767,32767, 522, 565,32767,32767, 541, + 592,32767,32767,32767,32767,32767,32767, 138,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 527, + 32767, 136,32767,32767,32767,32767,32767,32767,32767,32767, + 523,32767,32767,32767, 540,32767,32767,32767,32767, 312, + 309,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 540,32767,32767, + 32767,32767,32767, 289,32767, 306,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 285,32767,32767, 379,32767,32767,32767,32767, - 358,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 152, 152, 3, 3, 340, 152, 152, 152, 340, - 340, 152, 340, 340, 340, 152, 152, 152, 152, 152, - 152, 279, 184, 261, 264, 246, 246, 152, 350, 152 + 32767,32767, 284,32767,32767, 378,32767,32767,32767,32767, + 357,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 151, 151, 3, 3, 339, 151, 151, 151, 339, + 339, 151, 339, 339, 339, 151, 151, 151, 151, 151, + 151, 278, 183, 260, 263, 245, 245, 151, 349, 151 ); protected $goto = array( - 194, 194, 689, 425, 657, 1327, 1327, 316, 1055, 419, - 311, 312, 331, 572, 424, 332, 426, 634, 346, 844, - 697, 1327, 276, 276, 276, 276, 165, 165, 165, 165, + 194, 194, 689, 1054, 425, 657, 617, 654, 316, 697, + 419, 311, 312, 331, 572, 424, 332, 426, 634, 650, + 651, 843, 668, 669, 670, 820, 165, 165, 165, 165, 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, 188, 189, 190, 215, 213, 216, 530, 531, 415, 532, - 534, 535, 536, 537, 538, 539, 540, 541, 1125, 166, + 534, 535, 536, 537, 538, 539, 540, 541, 1124, 166, 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, 176, 212, 214, 217, 235, 240, 241, 243, 254, 255, 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, 274, 286, 287, 314, 315, 420, 421, 422, 577, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1125, 199, 180, + 236, 186, 187, 188, 189, 190, 215, 1124, 199, 180, 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 847, 596, 619, 619, 845, 904, 1258, 905, 1258, - 1258, 1258, 1258, 1258, 1258, 1258, 1258, 1258, 350, 650, - 651, 821, 668, 669, 670, 965, 1276, 1276, 350, 350, - 1276, 819, 1276, 1276, 1276, 1276, 1276, 1276, 1276, 1276, - 1276, 350, 350, 878, 350, 852, 1343, 900, 895, 896, - 909, 853, 897, 850, 898, 899, 851, 549, 344, 903, - 840, 350, 569, 460, 460, 1316, 249, 249, 389, 1076, - 1072, 1073, 460, 1274, 1274, 986, 418, 1274, 607, 1274, - 1274, 1274, 1274, 1274, 1274, 1274, 1274, 1274, 470, 1301, - 1302, 567, 247, 247, 247, 247, 242, 250, 957, 405, - 696, 1226, 1024, 1226, 1024, 1226, 347, 348, 1287, 1024, - 840, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, - 656, 444, 1024, 1024, 1024, 1024, 444, 1122, 444, 682, - 1226, 1174, 473, 555, 547, 1226, 1226, 1226, 1226, 825, - 475, 1226, 1226, 1226, 1308, 1308, 1308, 1308, 605, 620, - 623, 624, 625, 626, 647, 648, 649, 699, 916, 549, - 617, 654, 917, 337, 547, 555, 564, 565, 339, 575, - 598, 612, 613, 349, 349, 349, 349, 432, 825, 15, - 825, 533, 533, 452, 932, 533, 932, 533, 533, 533, - 533, 533, 533, 533, 533, 533, 544, 5, 544, 6, - 544, 595, 1089, 678, 700, 686, 686, 662, 502, 692, - 1087, 444, 444, 444, 444, 444, 444, 444, 444, 444, - 444, 444, 1219, 837, 444, 450, 1326, 1326, 840, 333, - 959, 959, 959, 959, 865, 562, 450, 953, 960, 724, - 633, 635, 1326, 948, 655, 627, 629, 631, 679, 683, - 1000, 687, 695, 996, 843, 542, 542, 542, 542, 1329, - 600, 398, 1298, 1008, 1298, 860, 1298, 989, 963, 963, - 961, 963, 723, 862, 546, 998, 993, 548, 559, 611, - 872, 1217, 548, 859, 559, 1096, 1097, 392, 456, 1221, - 1033, 1034, 1310, 1310, 1310, 1310, 1030, 1029, 727, 463, - 576, 464, 465, 252, 252, 870, 321, 306, 1334, 1335, - 1061, 403, 404, 1303, 1304, 874, 666, 1294, 667, 1065, - 407, 408, 409, 471, 680, 921, 1112, 410, 573, 610, - 1107, 342, 615, 0, 868, 0, 0, 970, 1005, 873, - 861, 1060, 1064, 1222, 1223, 494, 864, 495, 660, 984, - 968, 835, 0, 501, 858, 0, 0, 0, 1063, 0, - 0, 0, 1296, 1296, 1063, 427, 1216, 0, 0, 1224, - 1284, 1285, 427, 0, 958, 0, 0, 0, 1031, 1031, - 428, 0, 0, 0, 0, 661, 1042, 1038, 1039, 677, - 942, 0, 0, 1019, 1035, 1036, 1105, 877, 0, 1205, - 934, 0, 0, 1206, 1209, 935, 1210, 391, 394, 556, - 597, 601, 0, 0, 0, 0, 0, 0, 0, 0, + 211, 846, 391, 394, 556, 597, 601, 346, 276, 276, + 276, 276, 844, 596, 619, 619, 859, 964, 1257, 824, + 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1275, + 1275, 871, 877, 1275, 858, 1275, 1275, 1275, 1275, 1275, + 1275, 1275, 1275, 1275, 903, 851, 904, 899, 894, 895, + 908, 852, 896, 849, 897, 898, 850, 818, 824, 902, + 824, 1095, 1096, 872, 860, 1059, 1063, 350, 569, 1075, + 1071, 1072, 473, 344, 967, 1273, 1273, 350, 350, 1273, + 475, 1273, 1273, 1273, 1273, 1273, 1273, 1273, 1273, 1273, + 350, 350, 418, 350, 607, 1342, 389, 839, 957, 460, + 460, 1225, 1023, 1225, 1023, 1225, 549, 1315, 460, 1023, + 350, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, + 1104, 876, 1023, 1023, 1023, 1023, 1307, 1307, 1307, 1307, + 1225, 5, 427, 6, 985, 1225, 1225, 1225, 1225, 427, + 567, 1225, 1225, 1225, 656, 1030, 1030, 839, 1121, 555, + 547, 1173, 661, 1041, 1037, 1038, 432, 1286, 915, 470, + 1300, 1301, 916, 533, 533, 452, 931, 533, 931, 533, + 533, 533, 533, 533, 533, 533, 533, 533, 682, 337, + 547, 555, 564, 565, 339, 575, 598, 612, 613, 544, + 494, 544, 495, 544, 678, 22, 562, 333, 501, 662, + 724, 633, 635, 1029, 1028, 655, 249, 249, 549, 679, + 683, 999, 687, 695, 995, 956, 405, 696, 450, 349, + 349, 349, 349, 958, 958, 958, 958, 321, 306, 450, + 952, 959, 247, 247, 247, 247, 242, 250, 1326, 1326, + 864, 842, 542, 542, 542, 542, 947, 600, 988, 962, + 962, 960, 962, 723, 1326, 347, 348, 1032, 1033, 548, + 559, 546, 997, 992, 548, 839, 559, 444, 836, 392, + 456, 1218, 444, 1297, 444, 1297, 398, 1297, 627, 629, + 631, 463, 576, 464, 465, 1302, 1303, 869, 573, 610, + 1333, 1334, 605, 620, 623, 624, 625, 626, 647, 648, + 649, 699, 861, 1309, 1309, 1309, 1309, 611, 1216, 1060, + 403, 404, 1007, 471, 1064, 666, 867, 667, 727, 407, + 408, 409, 873, 680, 595, 1088, 410, 700, 1293, 969, + 342, 1106, 428, 0, 1220, 686, 686, 0, 502, 692, + 1086, 677, 941, 0, 0, 1018, 1034, 1035, 1204, 933, + 0, 0, 1205, 1208, 934, 1209, 0, 444, 444, 444, + 444, 444, 444, 444, 444, 444, 444, 444, 0, 1062, + 444, 920, 1111, 1295, 1295, 1062, 0, 0, 615, 0, + 0, 0, 0, 0, 1004, 1325, 1325, 0, 1221, 1222, + 0, 0, 863, 0, 660, 983, 834, 0, 0, 0, + 857, 1325, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1215, 0, 1223, 1283, 1284, 0, 1328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 272, 0, 0, 0, 0, 545, 0, 545, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 252, 252, 0, 0, 0, 0, 0, + 0, 0, 0, 1002, 1002, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1003, 1003 + 0, 0, 0, 0, 0, 0, 0, 0, 272, 0, + 0, 0, 0, 545, 0, 545 ); protected $gotoCheck = array( - 42, 42, 72, 65, 65, 181, 181, 65, 126, 65, - 65, 65, 65, 65, 65, 65, 65, 65, 96, 26, - 9, 181, 23, 23, 23, 23, 42, 42, 42, 42, + 42, 42, 72, 126, 65, 65, 55, 55, 65, 9, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 85, + 85, 26, 85, 85, 85, 7, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -921,97 +923,99 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 15, 129, 107, 107, 27, 64, 107, 64, 107, - 107, 107, 107, 107, 107, 107, 107, 107, 14, 85, - 85, 7, 85, 85, 85, 49, 168, 168, 14, 14, - 168, 6, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 14, 14, 45, 14, 15, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 14, 177, 15, - 22, 14, 170, 148, 148, 179, 5, 5, 61, 15, - 15, 15, 148, 169, 169, 102, 13, 169, 13, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 174, 174, - 174, 103, 5, 5, 5, 5, 5, 5, 92, 92, - 92, 72, 72, 72, 72, 72, 96, 96, 14, 72, - 22, 72, 72, 72, 72, 72, 72, 72, 72, 72, - 63, 23, 72, 72, 72, 72, 23, 149, 23, 14, - 72, 150, 83, 75, 75, 72, 72, 72, 72, 12, - 83, 72, 72, 72, 9, 9, 9, 9, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 72, 14, - 55, 55, 72, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 24, 24, 24, 24, 112, 12, 75, - 12, 171, 171, 82, 9, 171, 9, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 19, 46, 19, 46, - 19, 8, 8, 115, 8, 8, 8, 119, 8, 8, - 8, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 14, 18, 23, 19, 180, 180, 22, 29, - 19, 19, 19, 19, 39, 48, 19, 19, 19, 48, - 48, 48, 180, 91, 48, 84, 84, 84, 48, 48, - 48, 48, 48, 48, 25, 106, 106, 106, 106, 180, - 106, 28, 129, 109, 129, 35, 129, 25, 25, 25, - 25, 25, 25, 37, 25, 25, 25, 9, 9, 79, - 35, 159, 9, 35, 9, 143, 143, 9, 9, 20, - 118, 118, 129, 129, 129, 129, 117, 117, 98, 9, - 9, 9, 9, 5, 5, 9, 167, 167, 9, 9, - 128, 81, 81, 176, 176, 41, 81, 129, 81, 131, - 81, 81, 81, 156, 81, 17, 17, 81, 2, 2, - 146, 81, 17, -1, 9, -1, -1, 95, 17, 16, - 16, 16, 16, 20, 20, 154, 17, 154, 17, 17, - 16, 20, -1, 154, 17, -1, -1, -1, 129, -1, - -1, -1, 129, 129, 129, 116, 17, -1, -1, 20, - 20, 20, 116, -1, 16, -1, -1, -1, 116, 116, - 88, -1, -1, -1, -1, 116, 116, 116, 116, 88, - 88, -1, -1, 88, 88, 88, 16, 16, -1, 78, - 78, -1, -1, 78, 78, 78, 78, 58, 58, 58, - 58, 58, -1, -1, -1, -1, -1, -1, -1, -1, + 42, 15, 58, 58, 58, 58, 58, 96, 23, 23, + 23, 23, 27, 129, 107, 107, 35, 49, 107, 12, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 168, + 168, 35, 45, 168, 35, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 64, 15, 64, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 6, 12, 15, + 12, 143, 143, 16, 16, 16, 16, 14, 170, 15, + 15, 15, 83, 177, 16, 169, 169, 14, 14, 169, + 83, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 14, 14, 13, 14, 13, 14, 61, 22, 16, 148, + 148, 72, 72, 72, 72, 72, 14, 179, 148, 72, + 14, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 16, 16, 72, 72, 72, 72, 9, 9, 9, 9, + 72, 46, 116, 46, 102, 72, 72, 72, 72, 116, + 103, 72, 72, 72, 63, 116, 116, 22, 149, 75, + 75, 150, 116, 116, 116, 116, 112, 14, 72, 174, + 174, 174, 72, 171, 171, 82, 9, 171, 9, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 14, 75, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 19, + 154, 19, 154, 19, 115, 75, 48, 29, 154, 119, + 48, 48, 48, 117, 117, 48, 5, 5, 14, 48, + 48, 48, 48, 48, 48, 92, 92, 92, 19, 24, + 24, 24, 24, 19, 19, 19, 19, 167, 167, 19, + 19, 19, 5, 5, 5, 5, 5, 5, 181, 181, + 39, 25, 106, 106, 106, 106, 91, 106, 25, 25, + 25, 25, 25, 25, 181, 96, 96, 118, 118, 9, + 9, 25, 25, 25, 9, 22, 9, 23, 18, 9, + 9, 14, 23, 129, 23, 129, 28, 129, 84, 84, + 84, 9, 9, 9, 9, 176, 176, 9, 2, 2, + 9, 9, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 37, 129, 129, 129, 129, 79, 159, 128, + 81, 81, 109, 156, 131, 81, 9, 81, 98, 81, + 81, 81, 41, 81, 8, 8, 81, 8, 129, 95, + 81, 146, 88, -1, 20, 8, 8, -1, 8, 8, + 8, 88, 88, -1, -1, 88, 88, 88, 78, 78, + -1, -1, 78, 78, 78, 78, -1, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, -1, 129, + 23, 17, 17, 129, 129, 129, -1, -1, 17, -1, + -1, -1, -1, -1, 17, 180, 180, -1, 20, 20, + -1, -1, 17, -1, 17, 17, 20, -1, -1, -1, + 17, 180, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 17, -1, 20, 20, 20, -1, 180, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 24, -1, -1, -1, -1, 24, -1, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 5, 5, -1, -1, -1, -1, -1, + -1, -1, -1, 106, 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 106, 106 + -1, -1, -1, -1, -1, -1, -1, -1, 24, -1, + -1, -1, -1, 24, -1, 24 ); protected $gotoBase = array( - 0, 0, -215, 0, 0, 225, 178, 172, 354, 7, - 0, 0, 5, -97, -117, -182, 53, 26, 76, 89, - 61, 0, -56, 19, 330, 410, 15, 161, 88, 95, - 0, 0, 0, 0, 0, 59, 0, 98, 0, 74, - 0, 40, -1, 0, 0, 191, -370, 0, -307, 162, - 0, 0, 0, 0, 0, 281, 0, 0, 523, 0, - 0, 187, 0, 41, 147, -235, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -47, 0, 0, 156, 100, - -45, -14, 67, -171, -68, -530, 0, 0, 270, 0, - 0, 78, -44, 0, 0, 60, -459, 0, 56, 0, - 0, 0, 201, 209, 0, 0, 388, -75, 0, 58, - 0, 0, 62, 0, 0, 84, 257, 179, 169, 79, - 0, 0, 0, 0, 0, 0, 6, 0, 101, 155, - 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 173, 0, 0, 52, 0, 190, 45, - 20, 0, 0, 0, 16, 0, 49, 0, 0, 77, - 0, 0, 0, 0, 0, 0, 0, 148, -52, -5, - 194, 103, 0, 0, -50, 0, 106, 189, 0, 195, - 81, -300, 0, 0 + 0, 0, -255, 0, 0, 365, 197, 16, 477, -11, + 0, 0, -115, -81, -68, -182, -223, 72, 121, 82, + 106, 0, -19, 165, 376, 397, 17, 168, 103, 63, + 0, 0, 0, 0, 0, -190, 0, 127, 0, 80, + 0, 47, -1, 0, 0, 173, -436, 0, -346, 160, + 0, 0, 0, 0, 0, -33, 0, 0, 118, 0, + 0, 215, 0, 65, 191, -234, 0, 0, 0, 0, + 0, 0, -6, 0, 0, -31, 0, 0, 105, 128, + 99, -15, 49, -231, -35, -690, 0, 0, 222, 0, + 0, 81, 73, 0, 0, 52, -310, 0, 76, 0, + 0, 0, 260, 258, 0, 0, 375, -64, 0, 107, + 0, 0, 41, 0, 0, 75, 24, 86, 136, 71, + 0, 0, 0, 0, 0, 0, 1, 0, 100, 166, + 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -51, 0, 0, 53, 0, 226, 66, + 40, 0, 0, 0, -139, 0, 39, 0, 0, 104, + 0, 0, 0, 0, 0, 0, 0, 69, -49, -3, + 200, 85, 0, 0, 21, 0, 78, 204, 0, 237, + 240, 93, 0, 0 ); protected $gotoDefault = array( - -32768, 506, 731, 4, 732, 925, 808, 817, 593, 524, - 698, 343, 621, 416, 1292, 902, 1111, 574, 836, 1235, - 1243, 451, 839, 326, 721, 884, 885, 886, 395, 381, - 387, 393, 645, 622, 488, 871, 447, 863, 480, 866, - 446, 875, 162, 413, 504, 879, 3, 881, 552, 912, - 382, 889, 383, 673, 891, 558, 893, 894, 390, 396, - 397, 1116, 566, 618, 906, 253, 560, 907, 380, 908, - 915, 385, 388, 684, 459, 499, 493, 406, 1091, 561, - 604, 642, 441, 467, 616, 628, 614, 474, 1027, 411, - 325, 947, 955, 481, 457, 969, 345, 977, 729, 1124, - 636, 483, 985, 637, 992, 995, 525, 526, 472, 1007, - 268, 1010, 484, 1048, 663, 1021, 1022, 664, 638, 1044, - 639, 665, 640, 1046, 466, 594, 1054, 448, 1062, 1280, - 449, 1066, 262, 1069, 275, 412, 429, 1074, 1075, 8, - 1081, 690, 691, 10, 273, 503, 1106, 685, 445, 1123, - 433, 1193, 1195, 554, 485, 1213, 1212, 676, 500, 1218, - 442, 1283, 443, 527, 468, 313, 528, 305, 329, 310, - 543, 292, 330, 529, 469, 1289, 1297, 327, 30, 1317, - 1328, 338, 571, 609 + -32768, 506, 731, 4, 732, 924, 807, 816, 593, 524, + 698, 343, 621, 416, 1291, 901, 1110, 574, 835, 1234, + 1242, 451, 838, 326, 721, 883, 884, 885, 395, 381, + 387, 393, 645, 622, 488, 870, 447, 862, 480, 865, + 446, 874, 162, 413, 504, 878, 3, 880, 552, 911, + 382, 888, 383, 673, 890, 558, 892, 893, 390, 396, + 397, 1115, 566, 618, 905, 253, 560, 906, 380, 907, + 914, 385, 388, 684, 459, 499, 493, 406, 1090, 561, + 604, 642, 441, 467, 616, 628, 614, 474, 1026, 411, + 325, 946, 954, 481, 457, 968, 345, 976, 729, 1123, + 636, 483, 984, 637, 991, 994, 525, 526, 472, 1006, + 268, 1009, 484, 1047, 663, 1020, 1021, 664, 638, 1043, + 639, 665, 640, 1045, 466, 594, 1053, 448, 1061, 1279, + 449, 1065, 262, 1068, 275, 412, 429, 1073, 1074, 8, + 1080, 690, 691, 10, 273, 503, 1105, 685, 445, 1122, + 433, 1192, 1194, 554, 485, 1212, 1211, 676, 500, 1217, + 442, 1282, 443, 527, 468, 313, 528, 305, 329, 310, + 543, 292, 330, 529, 469, 1288, 1296, 327, 30, 1316, + 1327, 338, 571, 609 ); protected $ruleToNonTerminal = array( @@ -1022,38 +1026,38 @@ class Php8 extends \PhpParser\ParserAbstract 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, - 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, - 11, 11, 11, 12, 12, 13, 13, 14, 15, 15, - 16, 16, 17, 17, 18, 18, 21, 21, 22, 23, - 23, 24, 24, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, - 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, - 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, - 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, + 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, + 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, + 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, + 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, + 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, + 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, + 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, - 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, - 78, 78, 79, 79, 26, 26, 27, 27, 27, 27, - 27, 87, 87, 89, 89, 82, 82, 90, 90, 91, - 91, 91, 83, 83, 86, 86, 84, 84, 92, 93, - 93, 56, 56, 64, 64, 67, 67, 67, 66, 94, - 94, 95, 57, 57, 57, 57, 96, 96, 97, 97, - 98, 98, 99, 100, 100, 101, 101, 102, 102, 54, - 54, 50, 50, 104, 52, 52, 105, 51, 51, 53, - 53, 63, 63, 63, 63, 80, 80, 108, 108, 110, - 110, 111, 111, 111, 111, 109, 109, 109, 113, 113, - 113, 113, 88, 88, 116, 116, 116, 117, 117, 114, - 114, 118, 118, 120, 120, 121, 121, 115, 122, 122, - 119, 123, 123, 123, 123, 112, 112, 81, 81, 81, - 20, 20, 20, 125, 124, 124, 126, 126, 126, 126, - 59, 127, 127, 128, 60, 130, 130, 131, 131, 132, - 132, 85, 133, 133, 133, 133, 133, 133, 138, 138, - 139, 139, 140, 140, 140, 140, 140, 141, 142, 142, - 137, 137, 134, 134, 136, 136, 144, 144, 143, 143, - 143, 143, 143, 143, 143, 135, 145, 145, 147, 146, - 146, 61, 103, 148, 148, 55, 55, 42, 42, 42, + 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, + 62, 74, 74, 75, 75, 76, 76, 77, 77, 78, + 78, 79, 79, 26, 26, 27, 27, 27, 27, 27, + 87, 87, 89, 89, 82, 82, 90, 90, 91, 91, + 91, 83, 83, 86, 86, 84, 84, 92, 93, 93, + 56, 56, 64, 64, 67, 67, 67, 66, 94, 94, + 95, 57, 57, 57, 57, 96, 96, 97, 97, 98, + 98, 99, 100, 100, 101, 101, 102, 102, 54, 54, + 50, 50, 104, 52, 52, 105, 51, 51, 53, 53, + 63, 63, 63, 63, 80, 80, 108, 108, 110, 110, + 111, 111, 111, 111, 109, 109, 109, 113, 113, 113, + 113, 88, 88, 116, 116, 116, 117, 117, 114, 114, + 118, 118, 120, 120, 121, 121, 115, 122, 122, 119, + 123, 123, 123, 123, 112, 112, 81, 81, 81, 20, + 20, 20, 125, 124, 124, 126, 126, 126, 126, 59, + 127, 127, 128, 60, 130, 130, 131, 131, 132, 132, + 85, 133, 133, 133, 133, 133, 133, 138, 138, 139, + 139, 140, 140, 140, 140, 140, 141, 142, 142, 137, + 137, 134, 134, 136, 136, 144, 144, 143, 143, 143, + 143, 143, 143, 143, 135, 145, 145, 147, 146, 146, + 61, 103, 148, 148, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1063,20 +1067,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 155, 149, 149, 154, 154, 157, 158, 158, 159, - 160, 161, 161, 161, 161, 19, 19, 72, 72, 72, - 72, 150, 150, 150, 150, 163, 163, 151, 151, 153, - 153, 153, 156, 156, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 169, 169, 169, 107, 171, 171, 171, - 171, 152, 152, 152, 152, 152, 152, 152, 152, 58, - 58, 166, 166, 166, 166, 172, 172, 162, 162, 162, - 173, 173, 173, 173, 173, 173, 73, 73, 65, 65, - 65, 65, 129, 129, 129, 129, 176, 175, 165, 165, - 165, 165, 165, 165, 165, 164, 164, 164, 174, 174, - 174, 174, 106, 170, 178, 178, 177, 177, 179, 179, - 179, 179, 179, 179, 179, 179, 167, 167, 167, 167, - 181, 182, 180, 180, 180, 180, 180, 180, 180, 180, - 183, 183, 183, 183 + 155, 149, 149, 154, 154, 157, 158, 158, 159, 160, + 161, 161, 161, 161, 19, 19, 72, 72, 72, 72, + 150, 150, 150, 150, 163, 163, 151, 151, 153, 153, + 153, 156, 156, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 169, 169, 169, 107, 171, 171, 171, 171, + 152, 152, 152, 152, 152, 152, 152, 152, 58, 58, + 166, 166, 166, 166, 172, 172, 162, 162, 162, 173, + 173, 173, 173, 173, 173, 73, 73, 65, 65, 65, + 65, 129, 129, 129, 129, 176, 175, 165, 165, 165, + 165, 165, 165, 165, 164, 164, 164, 174, 174, 174, + 174, 106, 170, 178, 178, 177, 177, 179, 179, 179, + 179, 179, 179, 179, 179, 167, 167, 167, 167, 181, + 182, 180, 180, 180, 180, 180, 180, 180, 180, 183, + 183, 183, 183 ); protected $ruleToLength = array( @@ -1089,59 +1093,59 @@ class Php8 extends \PhpParser\ParserAbstract 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, - 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, - 2, 0, 1, 1, 1, 1, 4, 3, 5, 4, - 3, 4, 2, 3, 1, 1, 7, 6, 2, 3, - 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, - 3, 1, 2, 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, - 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, - 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, - 3, 1, 1, 1, 8, 9, 7, 8, 7, 6, - 8, 0, 2, 0, 2, 1, 2, 1, 2, 1, - 1, 1, 0, 2, 0, 2, 0, 2, 2, 1, - 3, 1, 4, 1, 4, 1, 1, 4, 2, 1, - 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, - 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, - 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, - 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, - 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, - 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, - 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, - 2, 4, 3, 1, 1, 3, 1, 2, 2, 3, - 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, - 0, 1, 5, 5, 10, 3, 5, 1, 1, 3, - 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, - 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, - 3, 2, 2, 3, 1, 0, 1, 1, 3, 3, - 3, 4, 4, 1, 1, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, + 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, + 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, + 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, + 1, 2, 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, 2, + 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, + 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, + 1, 1, 1, 8, 9, 7, 8, 7, 6, 8, + 0, 2, 0, 2, 1, 2, 1, 2, 1, 1, + 1, 0, 2, 0, 2, 0, 2, 2, 1, 3, + 1, 4, 1, 4, 1, 1, 4, 2, 1, 3, + 3, 3, 4, 4, 5, 0, 2, 4, 3, 1, + 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, + 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, + 1, 2, 1, 1, 2, 0, 1, 3, 0, 2, + 1, 1, 1, 1, 6, 8, 6, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, + 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, + 1, 2, 1, 1, 0, 1, 0, 2, 2, 2, + 4, 3, 1, 1, 3, 1, 2, 2, 3, 2, + 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, + 1, 5, 5, 10, 3, 5, 1, 1, 3, 0, + 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, + 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, + 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, + 4, 4, 1, 1, 2, 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, 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, 2, 8, 9, 8, 9, 9, 10, 9, - 10, 8, 3, 2, 0, 4, 2, 1, 3, 2, - 1, 2, 2, 2, 4, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 0, 3, 0, - 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 5, 3, 3, 4, 1, 1, - 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, - 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, - 1, 4, 4, 1, 4, 4, 0, 1, 1, 1, - 3, 3, 1, 4, 2, 2, 1, 3, 1, 4, - 4, 3, 3, 3, 3, 1, 3, 1, 1, 3, - 1, 1, 4, 1, 1, 1, 3, 1, 1, 2, - 1, 3, 4, 3, 2, 0, 2, 2, 1, 2, - 1, 1, 1, 4, 3, 3, 3, 3, 6, 3, - 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, 10, 9, 10, + 8, 3, 2, 0, 4, 2, 1, 3, 2, 1, + 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, + 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 5, 3, 3, 4, 1, 1, 3, + 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, + 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, + 4, 4, 1, 4, 4, 0, 1, 1, 1, 3, + 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, + 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, + 1, 4, 1, 1, 1, 3, 1, 1, 2, 1, + 3, 4, 3, 2, 0, 2, 2, 1, 2, 1, + 1, 1, 4, 3, 3, 3, 3, 6, 3, 1, + 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1403,7 +1407,7 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos]; }, 85 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 86 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1415,7 +1419,7 @@ protected function initReduceCallbacks(): void { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 89 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 90 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); @@ -1430,16 +1434,16 @@ protected function initReduceCallbacks(): void { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 94 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 95 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 96 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 97 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + /* nothing */ }, 98 => function ($stackPos) { /* nothing */ @@ -1448,40 +1452,40 @@ protected function initReduceCallbacks(): void { /* nothing */ }, 100 => function ($stackPos) { - /* nothing */ + $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 101 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = $this->semStack[$stackPos]; }, 102 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 103 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 104 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 105 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 106 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 107 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 108 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 109 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 110 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = []; }, 111 => function ($stackPos) { - $this->semValue = []; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 112 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -1493,129 +1497,129 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 115 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 116 => function ($stackPos) { $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 117 => function ($stackPos) { + 116 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); $this->checkNamespace($this->semValue); }, - 118 => function ($stackPos) { + 117 => function ($stackPos) { $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 119 => function ($stackPos) { + 118 => function ($stackPos) { $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, - 120 => function ($stackPos) { + 119 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 121 => function ($stackPos) { + 120 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 122 => function ($stackPos) { + 121 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 123 => function ($stackPos) { + 122 => function ($stackPos) { $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 124 => function ($stackPos) { + 123 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_FUNCTION; }, - 125 => function ($stackPos) { + 124 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_CONSTANT; }, - 126 => function ($stackPos) { + 125 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 127 => function ($stackPos) { + 126 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 128 => function ($stackPos) { + 127 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 129 => function ($stackPos) { + 128 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 130 => function ($stackPos) { + 129 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 131 => function ($stackPos) { + 130 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 132 => function ($stackPos) { + 131 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 133 => function ($stackPos) { + 132 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 134 => function ($stackPos) { + 133 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 135 => function ($stackPos) { + 134 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 136 => function ($stackPos) { + 135 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 137 => function ($stackPos) { + 136 => function ($stackPos) { $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, - 138 => function ($stackPos) { + 137 => function ($stackPos) { $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, - 139 => function ($stackPos) { + 138 => function ($stackPos) { $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, - 140 => function ($stackPos) { + 139 => function ($stackPos) { $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, - 141 => function ($stackPos) { + 140 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; }, - 142 => function ($stackPos) { + 141 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; }, - 143 => function ($stackPos) { + 142 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 144 => function ($stackPos) { + 143 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 145 => function ($stackPos) { + 144 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 146 => function ($stackPos) { + 145 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 147 => function ($stackPos) { + 146 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 148 => function ($stackPos) { + 147 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 149 => function ($stackPos) { + 148 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 150 => function ($stackPos) { + 149 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 151 => function ($stackPos) { + 150 => function ($stackPos) { if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; }, - 152 => function ($stackPos) { + 151 => function ($stackPos) { $this->semValue = array(); }, - 153 => function ($stackPos) { + 152 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 153 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, 154 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, @@ -1623,12 +1627,9 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 156 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 157 => function ($stackPos) { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 158 => function ($stackPos) { + 157 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; @@ -1638,46 +1639,46 @@ protected function initReduceCallbacks(): void { } }, - 159 => function ($stackPos) { + 158 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 160 => function ($stackPos) { + 159 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 161 => function ($stackPos) { + 160 => function ($stackPos) { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 162 => function ($stackPos) { + 161 => function ($stackPos) { $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 163 => function ($stackPos) { + 162 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 164 => function ($stackPos) { + 163 => function ($stackPos) { $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 165 => function ($stackPos) { + 164 => function ($stackPos) { $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 166 => function ($stackPos) { + 165 => function ($stackPos) { $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 167 => function ($stackPos) { + 166 => function ($stackPos) { $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 168 => function ($stackPos) { + 167 => function ($stackPos) { $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 169 => function ($stackPos) { + 168 => function ($stackPos) { $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 170 => function ($stackPos) { + 169 => function ($stackPos) { $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 171 => function ($stackPos) { + 170 => function ($stackPos) { $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 172 => function ($stackPos) { + 171 => function ($stackPos) { $e = $this->semStack[$stackPos-(2-1)]; if ($e instanceof Expr\Throw_) { @@ -1689,980 +1690,983 @@ protected function initReduceCallbacks(): void { } }, - 173 => function ($stackPos) { + 172 => function ($stackPos) { $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 174 => function ($stackPos) { + 173 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 175 => function ($stackPos) { + 174 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 176 => function ($stackPos) { + 175 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 177 => function ($stackPos) { + 176 => function ($stackPos) { $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 178 => function ($stackPos) { + 177 => function ($stackPos) { $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); }, - 179 => function ($stackPos) { + 178 => function ($stackPos) { $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 180 => function ($stackPos) { + 179 => function ($stackPos) { $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 181 => function ($stackPos) { + 180 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, - 182 => function ($stackPos) { + 181 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 183 => function ($stackPos) { + 182 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, - 184 => function ($stackPos) { + 183 => function ($stackPos) { $this->semValue = array(); }, - 185 => function ($stackPos) { + 184 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 186 => function ($stackPos) { + 185 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 187 => function ($stackPos) { + 186 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 188 => function ($stackPos) { + 187 => function ($stackPos) { $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 189 => function ($stackPos) { + 188 => function ($stackPos) { $this->semValue = null; }, - 190 => function ($stackPos) { + 189 => function ($stackPos) { $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 191 => function ($stackPos) { + 190 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 192 => function ($stackPos) { + 191 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 193 => function ($stackPos) { + 192 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 194 => function ($stackPos) { + 193 => function ($stackPos) { $this->semValue = false; }, - 195 => function ($stackPos) { + 194 => function ($stackPos) { $this->semValue = true; }, - 196 => function ($stackPos) { + 195 => function ($stackPos) { $this->semValue = false; }, - 197 => function ($stackPos) { + 196 => function ($stackPos) { $this->semValue = true; }, - 198 => function ($stackPos) { + 197 => function ($stackPos) { $this->semValue = false; }, - 199 => function ($stackPos) { + 198 => function ($stackPos) { $this->semValue = true; }, - 200 => function ($stackPos) { + 199 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 201 => function ($stackPos) { + 200 => function ($stackPos) { $this->semValue = []; }, - 202 => function ($stackPos) { + 201 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 203 => function ($stackPos) { + 202 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 204 => function ($stackPos) { + 203 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 205 => function ($stackPos) { + 204 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 206 => function ($stackPos) { + 205 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(7-2)); }, - 207 => function ($stackPos) { + 206 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(8-3)); }, - 208 => function ($stackPos) { + 207 => function ($stackPos) { $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkInterface($this->semValue, $stackPos-(7-3)); }, - 209 => function ($stackPos) { + 208 => function ($stackPos) { $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 210 => function ($stackPos) { + 209 => function ($stackPos) { $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); $this->checkEnum($this->semValue, $stackPos-(8-3)); }, - 211 => function ($stackPos) { + 210 => function ($stackPos) { $this->semValue = null; }, - 212 => function ($stackPos) { + 211 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 213 => function ($stackPos) { + 212 => function ($stackPos) { $this->semValue = null; }, - 214 => function ($stackPos) { + 213 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 215 => function ($stackPos) { + 214 => function ($stackPos) { $this->semValue = 0; }, - 216 => function ($stackPos) { + 215 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 217 => function ($stackPos) { + 216 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 218 => function ($stackPos) { + 217 => function ($stackPos) { $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 219 => function ($stackPos) { + 218 => function ($stackPos) { $this->semValue = Modifiers::ABSTRACT; }, - 220 => function ($stackPos) { + 219 => function ($stackPos) { $this->semValue = Modifiers::FINAL; }, - 221 => function ($stackPos) { + 220 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 222 => function ($stackPos) { + 221 => function ($stackPos) { $this->semValue = null; }, - 223 => function ($stackPos) { + 222 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 224 => function ($stackPos) { + 223 => function ($stackPos) { $this->semValue = array(); }, - 225 => function ($stackPos) { + 224 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 226 => function ($stackPos) { + 225 => function ($stackPos) { $this->semValue = array(); }, - 227 => function ($stackPos) { + 226 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 228 => function ($stackPos) { + 227 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 229 => function ($stackPos) { + 228 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 230 => function ($stackPos) { + 229 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 231 => function ($stackPos) { + 230 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, - 232 => function ($stackPos) { + 231 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 233 => function ($stackPos) { + 232 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, - 234 => function ($stackPos) { + 233 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 235 => function ($stackPos) { + 234 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, - 236 => function ($stackPos) { + 235 => function ($stackPos) { $this->semValue = null; }, - 237 => function ($stackPos) { + 236 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 238 => function ($stackPos) { + 237 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 239 => function ($stackPos) { + 238 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 240 => function ($stackPos) { + 239 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 241 => function ($stackPos) { + 240 => function ($stackPos) { $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 242 => function ($stackPos) { + 241 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 243 => function ($stackPos) { + 242 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 244 => function ($stackPos) { + 243 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 245 => function ($stackPos) { + 244 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(5-3)]; }, - 246 => function ($stackPos) { + 245 => function ($stackPos) { $this->semValue = array(); }, - 247 => function ($stackPos) { + 246 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 248 => function ($stackPos) { + 247 => function ($stackPos) { $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 249 => function ($stackPos) { + 248 => function ($stackPos) { $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 250 => function ($stackPos) { + 249 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 251 => function ($stackPos) { + 250 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 252 => function ($stackPos) { + 251 => function ($stackPos) { $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 253 => function ($stackPos) { + 252 => function ($stackPos) { $this->semValue = []; }, - 254 => function ($stackPos) { + 253 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 255 => function ($stackPos) { + 254 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 256 => function ($stackPos) { + 255 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 257 => function ($stackPos) { + 256 => function ($stackPos) { $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 258 => function ($stackPos) { + 257 => function ($stackPos) { $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 259 => function ($stackPos) { + 258 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, - 260 => function ($stackPos) { + 259 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 261 => function ($stackPos) { + 260 => function ($stackPos) { $this->semValue = array(); }, - 262 => function ($stackPos) { + 261 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 263 => function ($stackPos) { + 262 => function ($stackPos) { $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 264 => function ($stackPos) { + 263 => function ($stackPos) { $this->semValue = array(); }, - 265 => function ($stackPos) { + 264 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 266 => function ($stackPos) { + 265 => function ($stackPos) { $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, - 267 => function ($stackPos) { + 266 => function ($stackPos) { $this->semValue = null; }, - 268 => function ($stackPos) { + 267 => function ($stackPos) { $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 269 => function ($stackPos) { + 268 => function ($stackPos) { $this->semValue = null; }, - 270 => function ($stackPos) { + 269 => function ($stackPos) { $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, - 271 => function ($stackPos) { + 270 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, - 272 => function ($stackPos) { + 271 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, - 273 => function ($stackPos) { + 272 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, - 274 => function ($stackPos) { + 273 => function ($stackPos) { $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, - 275 => function ($stackPos) { + 274 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 276 => function ($stackPos) { + 275 => function ($stackPos) { $this->semValue = array(); }, - 277 => function ($stackPos) { + 276 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 278 => function ($stackPos) { + 277 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 279 => function ($stackPos) { + 278 => function ($stackPos) { $this->semValue = 0; }, - 280 => function ($stackPos) { + 279 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 281 => function ($stackPos) { + 280 => function ($stackPos) { $this->semValue = Modifiers::PUBLIC; }, - 282 => function ($stackPos) { + 281 => function ($stackPos) { $this->semValue = Modifiers::PROTECTED; }, - 283 => function ($stackPos) { + 282 => function ($stackPos) { $this->semValue = Modifiers::PRIVATE; }, - 284 => function ($stackPos) { + 283 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 285 => function ($stackPos) { + 284 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, - 286 => function ($stackPos) { + 285 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); $this->checkParam($this->semValue); }, - 287 => function ($stackPos) { + 286 => function ($stackPos) { $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, - 288 => function ($stackPos) { + 287 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 289 => function ($stackPos) { + 288 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 290 => function ($stackPos) { + 289 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 291 => function ($stackPos) { + 290 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 292 => function ($stackPos) { + 291 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 293 => function ($stackPos) { + 292 => function ($stackPos) { $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 294 => function ($stackPos) { + 293 => function ($stackPos) { $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, - 295 => function ($stackPos) { + 294 => function ($stackPos) { $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 296 => function ($stackPos) { + 295 => function ($stackPos) { $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 297 => function ($stackPos) { + 296 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 298 => function ($stackPos) { + 297 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 299 => function ($stackPos) { + 298 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 300 => function ($stackPos) { + 299 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 301 => function ($stackPos) { + 300 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 302 => function ($stackPos) { + 301 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 303 => function ($stackPos) { + 302 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 304 => function ($stackPos) { + 303 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 305 => function ($stackPos) { + 304 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 306 => function ($stackPos) { + 305 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 307 => function ($stackPos) { + 306 => function ($stackPos) { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 308 => function ($stackPos) { + 307 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 309 => function ($stackPos) { + 308 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 310 => function ($stackPos) { + 309 => function ($stackPos) { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 311 => function ($stackPos) { + 310 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 312 => function ($stackPos) { + 311 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 313 => function ($stackPos) { + 312 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 314 => function ($stackPos) { + 313 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 315 => function ($stackPos) { + 314 => function ($stackPos) { $this->semValue = null; }, - 316 => function ($stackPos) { + 315 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 317 => function ($stackPos) { + 316 => function ($stackPos) { $this->semValue = null; }, - 318 => function ($stackPos) { + 317 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 319 => function ($stackPos) { + 318 => function ($stackPos) { $this->semValue = null; }, - 320 => function ($stackPos) { + 319 => function ($stackPos) { $this->semValue = array(); }, - 321 => function ($stackPos) { + 320 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 322 => function ($stackPos) { + 321 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, - 323 => function ($stackPos) { + 322 => function ($stackPos) { $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 324 => function ($stackPos) { + 323 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 325 => function ($stackPos) { + 324 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 326 => function ($stackPos) { + 325 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 327 => function ($stackPos) { + 326 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 328 => function ($stackPos) { + 327 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 329 => function ($stackPos) { + 328 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, - 330 => function ($stackPos) { + 329 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 331 => function ($stackPos) { + 330 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 332 => function ($stackPos) { + 331 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 333 => function ($stackPos) { + 332 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 334 => function ($stackPos) { + 333 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 335 => function ($stackPos) { + 334 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 336 => function ($stackPos) { + 335 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 337 => function ($stackPos) { + 336 => function ($stackPos) { $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 338 => function ($stackPos) { + 337 => function ($stackPos) { $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 339 => function ($stackPos) { + 338 => function ($stackPos) { if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, - 340 => function ($stackPos) { + 339 => function ($stackPos) { $this->semValue = array(); }, - 341 => function ($stackPos) { + 340 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 342 => function ($stackPos) { + 341 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 343 => function ($stackPos) { + 342 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 344 => function ($stackPos) { + 343 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, - 345 => function ($stackPos) { + 344 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 346 => function ($stackPos) { + 345 => function ($stackPos) { $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 347 => function ($stackPos) { + 346 => function ($stackPos) { $this->semValue = null; /* will be skipped */ }, - 348 => function ($stackPos) { + 347 => function ($stackPos) { $this->semValue = array(); }, - 349 => function ($stackPos) { + 348 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 350 => function ($stackPos) { + 349 => function ($stackPos) { $this->semValue = array(); }, - 351 => function ($stackPos) { + 350 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 352 => function ($stackPos) { + 351 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 353 => function ($stackPos) { + 352 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 354 => function ($stackPos) { + 353 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, + 354 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, 355 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 356 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 357 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 358 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 359 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = null; }, 360 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 361 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 362 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 363 => function ($stackPos) { $this->semValue = 0; }, 364 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 365 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 366 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 367 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = Modifiers::PUBLIC; }, 368 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + $this->semValue = Modifiers::PROTECTED; }, 369 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + $this->semValue = Modifiers::PRIVATE; }, 370 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + $this->semValue = Modifiers::STATIC; }, 371 => function ($stackPos) { - $this->semValue = Modifiers::STATIC; + $this->semValue = Modifiers::ABSTRACT; }, 372 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + $this->semValue = Modifiers::FINAL; }, 373 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + $this->semValue = Modifiers::READONLY; }, 374 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 375 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 376 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 377 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 379 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 380 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 381 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 382 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 383 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 384 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 385 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 386 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 387 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 388 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 389 => function ($stackPos) { + 388 => function ($stackPos) { $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 390 => function ($stackPos) { + 389 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 391 => function ($stackPos) { + 390 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 392 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); if (!$this->phpVersion->allowsAssignNewByReference()) { $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); } + }, + 392 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 393 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 394 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 395 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 396 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 397 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 400 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 401 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 402 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 403 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 404 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 405 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 406 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 407 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 410 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 411 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 412 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 419 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 421 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 422 => function ($stackPos) { + 421 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 423 => function ($stackPos) { + 422 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 424 => function ($stackPos) { + 423 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 425 => function ($stackPos) { + 424 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 426 => function ($stackPos) { + 425 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 427 => function ($stackPos) { + 426 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 428 => function ($stackPos) { + 427 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 429 => function ($stackPos) { + 428 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 429 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 431 => function ($stackPos) { + 430 => function ($stackPos) { $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 432 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 441 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 443 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 444 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 445 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 446 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 447 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 448 => function ($stackPos) { + 447 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 450 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 452 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 452 => function ($stackPos) { $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 455 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 457 => function ($stackPos) { + 456 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 458 => function ($stackPos) { + 457 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 458 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 459 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 461 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 462 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 463 => function ($stackPos) { + 462 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 464 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 465 => function ($stackPos) { + 464 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 466 => function ($stackPos) { + 465 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 467 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 468 => function ($stackPos) { + 467 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 469 => function ($stackPos) { + 468 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 470 => function ($stackPos) { + 469 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 471 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 472 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 473 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 474 => function ($stackPos) { + 473 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 475 => function ($stackPos) { + 474 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 476 => function ($stackPos) { + 475 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 477 => function ($stackPos) { + 476 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 478 => function ($stackPos) { + 477 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 479 => function ($stackPos) { + 478 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 480 => function ($stackPos) { + 479 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 481 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 482 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 483 => function ($stackPos) { + 482 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 484 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = array(); }, - 485 => function ($stackPos) { + 484 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 486 => function ($stackPos) { + 485 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 487 => function ($stackPos) { + 486 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 488 => function ($stackPos) { + 487 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 489 => function ($stackPos) { + 488 => function ($stackPos) { $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 490 => function ($stackPos) { + 489 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, + 490 => function ($stackPos) { + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, 491 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, @@ -2670,129 +2674,129 @@ protected function initReduceCallbacks(): void { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 493 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 494 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 495 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 496 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 497 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 498 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 499 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 500 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 501 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 502 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 503 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 504 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 505 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 506 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 507 => function ($stackPos) { $this->semValue = null; }, - 508 => function ($stackPos) { + 507 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 509 => function ($stackPos) { + 508 => function ($stackPos) { $this->semValue = array(); }, - 510 => function ($stackPos) { + 509 => function ($stackPos) { $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 511 => function ($stackPos) { + 510 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 512 => function ($stackPos) { + 511 => function ($stackPos) { $this->semValue = array(); }, - 513 => function ($stackPos) { + 512 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 514 => function ($stackPos) { + 513 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 515 => function ($stackPos) { + 514 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 516 => function ($stackPos) { + 515 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 517 => function ($stackPos) { + 516 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 518 => function ($stackPos) { + 517 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 519 => function ($stackPos) { + 518 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 520 => function ($stackPos) { + 519 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 521 => function ($stackPos) { + 520 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 522 => function ($stackPos) { + 521 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 523 => function ($stackPos) { + 522 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 524 => function ($stackPos) { + 523 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 525 => function ($stackPos) { + 524 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, - 526 => function ($stackPos) { + 525 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 527 => function ($stackPos) { + 526 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); $this->createdArrays->attach($this->semValue); }, - 528 => function ($stackPos) { + 527 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, - 529 => function ($stackPos) { + 528 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 530 => function ($stackPos) { + 529 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, - 531 => function ($stackPos) { + 530 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, - 532 => function ($stackPos) { + 531 => function ($stackPos) { $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, + 532 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, 533 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, @@ -2800,28 +2804,28 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 536 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 537 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 538 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = null; }, 539 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 540 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 543 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2836,34 +2840,34 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 548 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 549 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 551 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 552 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 553 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 554 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 555 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = null; }, 556 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 557 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2872,172 +2876,169 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 559 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 560 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 561 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 562 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 563 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 564 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 565 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 566 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 567 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 568 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 569 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 570 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 571 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 572 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 573 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 574 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 575 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 576 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 577 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 579 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 580 => function ($stackPos) { + 579 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 581 => function ($stackPos) { + 580 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, - 582 => function ($stackPos) { + 581 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $this->postprocessList($this->semValue); }, - 583 => function ($stackPos) { + 582 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, - 584 => function ($stackPos) { + 583 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, - 585 => function ($stackPos) { + 584 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, - 586 => function ($stackPos) { + 585 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 587 => function ($stackPos) { + 586 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 588 => function ($stackPos) { + 587 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 589 => function ($stackPos) { + 588 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 590 => function ($stackPos) { + 589 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 591 => function ($stackPos) { + 590 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 592 => function ($stackPos) { + 591 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 593 => function ($stackPos) { + 592 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 594 => function ($stackPos) { + 593 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); }, - 595 => function ($stackPos) { + 594 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, + 595 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, 596 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 597 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 598 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 599 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 600 => function ($stackPos) { - $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 601 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 602 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 603 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 604 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 605 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 606 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 607 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 608 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 609 => function ($stackPos) { + 608 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 610 => function ($stackPos) { + 609 => function ($stackPos) { $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 611 => function ($stackPos) { + 610 => function ($stackPos) { $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 612 => function ($stackPos) { + 611 => function ($stackPos) { $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 613 => function ($stackPos) { + 612 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; From d24745ddbcba8b4297e5d6a545c8cd4afecc889e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 14:58:17 +0100 Subject: [PATCH 203/428] Respect precedence during clone pretty printing Clone is the prefix operator with the highest operator precedence, but was not treated as an operator at all. --- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- lib/PhpParser/PrettyPrinterAbstract.php | 1 + test/code/prettyPrinter/expr/parentheses.test | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 75b0638d91..d91d81fc8e 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -676,7 +676,7 @@ protected function pExpr_New(Expr\New_ $node): string { } protected function pExpr_Clone(Expr\Clone_ $node): string { - return 'clone ' . $this->p($node->expr); + return $this->pPrefixOp(Expr\Clone_::class, 'clone ', $node->expr); } protected function pExpr_Ternary(Expr\Ternary $node): string { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 404d0b0107..89274c6828 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -30,6 +30,7 @@ abstract class PrettyPrinterAbstract { protected $precedenceMap = [ // [precedence, associativity] // where for precedence -1 is %left, 0 is %nonassoc and 1 is %right + Expr\Clone_::class => [-10, 1], BinaryOp\Pow::class => [ 0, 1], Expr\BitwiseNot::class => [ 10, 1], Expr\UnaryPlus::class => [ 10, 1], diff --git a/test/code/prettyPrinter/expr/parentheses.test b/test/code/prettyPrinter/expr/parentheses.test index 9e351fab7b..11f336bf23 100644 --- a/test/code/prettyPrinter/expr/parentheses.test +++ b/test/code/prettyPrinter/expr/parentheses.test @@ -37,6 +37,7 @@ yield from $a and yield from $b; yield from ($a and yield from $b); print ($a and print $b); +clone ($a + $b); -(-$a); +(+$a); @@ -76,6 +77,7 @@ $a ** $b ** $c; yield from $a and yield from $b; yield from ($a and yield from $b); print ($a and print $b); +clone ($a + $b); -(-$a); +(+$a); -(--$a); From 1eb6b5653eb7aeb9e12d2bbbaa8b8f698528e0a2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 15:11:36 +0100 Subject: [PATCH 204/428] Properly handle new/instanceof operand restrictions Fixes #912. --- lib/PhpParser/PrettyPrinter/Standard.php | 13 ++++++++----- lib/PhpParser/PrettyPrinterAbstract.php | 16 ++++++++++++++++ test/code/prettyPrinter/expr/newVariable.test | 8 +++++++- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index d91d81fc8e..8e47bfb0cc 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -414,7 +414,7 @@ protected function pExpr_Instanceof(Expr\Instanceof_ $node): string { list($precedence, $associativity) = $this->precedenceMap[Expr\Instanceof_::class]; return $this->pPrec($node->expr, $precedence, $associativity, -1) . ' instanceof ' - . $this->pNewVariable($node->class); + . $this->pNewOperand($node->class); } // Unary expressions @@ -671,7 +671,7 @@ protected function pExpr_New(Expr\New_ $node): string { $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : ''; return 'new ' . $this->pClassCommon($node->class, $args); } - return 'new ' . $this->pNewVariable($node->class) + return 'new ' . $this->pNewOperand($node->class) . '(' . $this->pMaybeMultiline($node->args) . ')'; } @@ -1086,9 +1086,12 @@ protected function pCallLhs(Node $node): string { } } - protected function pNewVariable(Node $node): string { - // TODO: This is not fully accurate. - return $this->pDereferenceLhs($node); + protected function pNewOperand(Node $node): string { + if (!$this->newOperandRequiresParens($node)) { + return $this->p($node); + } else { + return '(' . $this->p($node) . ')'; + } } /** diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 89274c6828..98ba740c37 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1078,6 +1078,22 @@ protected function dereferenceLhsRequiresParens(Node $node): bool { || $node instanceof Expr\ClassConstFetch); } + /** + * Determines whether an expression used in "new" or "instanceof" requires parentheses. + * + * @param Node $node New or instanceof operand + * + * @return bool Whether parentheses are required + */ + protected function newOperandRequiresParens(Node $node): bool { + return !($node instanceof Node\Name + || $node instanceof Expr\Variable + || $node instanceof Expr\ArrayDimFetch + || $node instanceof Expr\PropertyFetch + || $node instanceof Expr\NullsafePropertyFetch + || $node instanceof Expr\StaticPropertyFetch); + } + /** * Print modifiers, including trailing whitespace. * diff --git a/test/code/prettyPrinter/expr/newVariable.test b/test/code/prettyPrinter/expr/newVariable.test index 81176a4c16..366349c3dc 100644 --- a/test/code/prettyPrinter/expr/newVariable.test +++ b/test/code/prettyPrinter/expr/newVariable.test @@ -2,9 +2,15 @@ Parentheses for complex new/instanceof expressions ----- Date: Sun, 26 Feb 2023 15:17:07 +0100 Subject: [PATCH 205/428] Support new variables in fixup --- lib/PhpParser/PrettyPrinterAbstract.php | 11 +++++++++-- test/code/formatPreservation/fixup.test | 8 +++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 98ba740c37..8f435e16e9 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -25,6 +25,7 @@ abstract class PrettyPrinterAbstract { protected const FIXUP_BRACED_NAME = 4; // Name operand that may require bracing protected const FIXUP_VAR_BRACED_NAME = 5; // Name operand that may require ${} bracing protected const FIXUP_ENCAPSED = 6; // Encapsed string part + protected const FIXUP_NEW = 7; // New/instanceof operand /** @var array */ protected $precedenceMap = [ @@ -985,6 +986,12 @@ protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $ return '(' . $this->p($subNode) . ')'; } break; + case self::FIXUP_NEW: + if ($this->newOperandRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { + return '(' . $this->p($subNode) . ')'; + } + break; case self::FIXUP_BRACED_NAME: case self::FIXUP_VAR_BRACED_NAME: if ($subNode instanceof Expr @@ -1201,7 +1208,7 @@ protected function initializeFixupMap(): void { $this->fixupMap = [ Expr\Instanceof_::class => [ 'expr' => self::FIXUP_PREC_LEFT, - 'class' => self::FIXUP_PREC_RIGHT, // TODO: FIXUP_NEW_VARIABLE + 'class' => self::FIXUP_NEW, ], Expr\Ternary::class => [ 'cond' => self::FIXUP_PREC_LEFT, @@ -1212,7 +1219,7 @@ protected function initializeFixupMap(): void { Expr\StaticCall::class => ['class' => self::FIXUP_DEREF_LHS], Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], Expr\ClassConstFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\New_::class => ['class' => self::FIXUP_DEREF_LHS], // TODO: FIXUP_NEW_VARIABLE + Expr\New_::class => ['class' => self::FIXUP_NEW], Expr\MethodCall::class => [ 'var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME, diff --git a/test/code/formatPreservation/fixup.test b/test/code/formatPreservation/fixup.test index e8870ae56b..de38532721 100644 --- a/test/code/formatPreservation/fixup.test +++ b/test/code/formatPreservation/fixup.test @@ -42,6 +42,8 @@ $foo -> bar; $foo -> bar; self :: $foo; self :: $foo; +new Foo(); +$x instanceof Foo; ----- $stmts[0]->expr->name = new Expr\Variable('a'); $stmts[1]->expr->name = new Expr\BinaryOp\Concat(new Expr\Variable('a'), new Expr\Variable('b')); @@ -54,6 +56,8 @@ $stmts[5]->expr->name = new Expr\Variable('bar'); $stmts[6]->expr->name = new Expr\BinaryOp\Concat(new Expr\Variable('a'), new Expr\Variable('b')); $stmts[7]->expr->name = new Node\VarLikeIdentifier('bar'); $stmts[8]->expr->name = new Expr\BinaryOp\Concat(new Expr\Variable('a'), new Expr\Variable('b')); +$stmts[9]->expr->class = new Scalar\String_('Foo'); +$stmts[10]->expr->class = new Scalar\String_('Foo'); ----- foo; $foo -> {$bar}; $foo -> {$a . $b}; self :: $bar; -self :: ${$a . $b}; \ No newline at end of file +self :: ${$a . $b}; +new ('Foo')(); +$x instanceof ('Foo'); From 9476cff37d02e60780dcbfa77f88da58a5f8d0f2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 15:21:33 +0100 Subject: [PATCH 206/428] Doc string end label may have leading whitespace When detecting whether the string contains the end label, allow leading whitespace in front of it. This is legal since the introduction of flexible doc strings. --- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- test/PhpParser/PrettyPrinterTest.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 8e47bfb0cc..19bb68aae8 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -1053,7 +1053,7 @@ protected function escapeString(string $string, ?string $quote): string { } protected function containsEndLabel(string $string, string $label, bool $atStart = true): bool { - $start = $atStart ? '(?:^|[\r\n])' : '[\r\n]'; + $start = $atStart ? '(?:^|[\r\n])[ \t]*' : '[\r\n][ \t]*'; return false !== strpos($string, $label) && preg_match('/' . $start . $label . '(?:$|[^_A-Za-z0-9\x80-\xff])/', $string); } diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 8c59f79e08..53da77dcf6 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -108,6 +108,8 @@ public function provideTestKindAttributes() { [new String_("A\nB\nC", ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'C']), "'A\nB\nC'"], [new String_("STR;", $nowdoc), "'STR;'"], [new String_("STR,", $nowdoc), "'STR,'"], + [new String_(" STR", $nowdoc), "' STR'"], + [new String_("\tSTR", $nowdoc), "'\tSTR'"], [new String_("STR\x80", $heredoc), '"STR\x80"'], // Doc string if label not contained (or not in ending position) [new String_("foo", $nowdoc), "<<<'STR'\nfoo\nSTR\n"], From ee3c80f90b6b576d0609a18ba30db1538c7dc763 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 15:29:47 +0100 Subject: [PATCH 207/428] Add .idea and .php-cs-fixer.cache to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 9772bead8c..aad97c0cd0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ +.idea/ vendor/ composer.lock grammar/kmyacc.exe grammar/y.output .phpunit.result.cache +.php-cs-fixer.cache From 7b4a8c1ebd09fd6f6ccc33d7193df0f75e7e28d7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 15:57:37 +0100 Subject: [PATCH 208/428] Properly handle static deref LHS The rules for static and array/object deref are slightly different: The former does not allow constants. --- lib/PhpParser/PrettyPrinter/Standard.php | 14 ++++++-- lib/PhpParser/PrettyPrinterAbstract.php | 46 +++++++++++++++++------- test/code/formatPreservation/fixup.test | 9 +++++ test/code/prettyPrinter/expr/uvs.test | 8 ++++- 4 files changed, 60 insertions(+), 17 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 19bb68aae8..6f2fd46b9e 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -528,7 +528,7 @@ protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node): stri } protected function pExpr_StaticCall(Expr\StaticCall $node): string { - return $this->pDereferenceLhs($node->class) . '::' + return $this->pStaticDereferenceLhs($node->class) . '::' . ($node->name instanceof Expr ? ($node->name instanceof Expr\Variable ? $this->p($node->name) @@ -611,7 +611,7 @@ protected function pExpr_ConstFetch(Expr\ConstFetch $node): string { } protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string { - return $this->pDereferenceLhs($node->class) . '::' . $this->pObjectProperty($node->name); + return $this->pStaticDereferenceLhs($node->class) . '::' . $this->pObjectProperty($node->name); } protected function pExpr_PropertyFetch(Expr\PropertyFetch $node): string { @@ -623,7 +623,7 @@ protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node) } protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node): string { - return $this->pDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); + return $this->pStaticDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); } protected function pExpr_ShellExec(Expr\ShellExec $node): string { @@ -1078,6 +1078,14 @@ protected function pDereferenceLhs(Node $node): string { } } + protected function pStaticDereferenceLhs(Node $node): string { + if (!$this->staticDereferenceLhsRequiresParens($node)) { + return $this->p($node); + } else { + return '(' . $this->p($node) . ')'; + } + } + protected function pCallLhs(Node $node): string { if (!$this->callLhsRequiresParens($node)) { return $this->p($node); diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 8f435e16e9..9087e30c98 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -18,14 +18,15 @@ use PhpParser\Node\UnionType; abstract class PrettyPrinterAbstract { - protected const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence - protected const FIXUP_PREC_RIGHT = 1; // RHS operand affected by precedence - protected const FIXUP_CALL_LHS = 2; // LHS of call - protected const FIXUP_DEREF_LHS = 3; // LHS of dereferencing operation - protected const FIXUP_BRACED_NAME = 4; // Name operand that may require bracing - protected const FIXUP_VAR_BRACED_NAME = 5; // Name operand that may require ${} bracing - protected const FIXUP_ENCAPSED = 6; // Encapsed string part - protected const FIXUP_NEW = 7; // New/instanceof operand + protected const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence + protected const FIXUP_PREC_RIGHT = 1; // RHS operand affected by precedence + protected const FIXUP_CALL_LHS = 2; // LHS of call + protected const FIXUP_DEREF_LHS = 3; // LHS of dereferencing operation + protected const FIXUP_STATIC_DEREF_LHS = 4; // LHS of static dereferencing operation + protected const FIXUP_BRACED_NAME = 5; // Name operand that may require bracing + protected const FIXUP_VAR_BRACED_NAME = 6; // Name operand that may require ${} bracing + protected const FIXUP_ENCAPSED = 7; // Encapsed string part + protected const FIXUP_NEW = 8; // New/instanceof operand /** @var array */ protected $precedenceMap = [ @@ -986,6 +987,13 @@ protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $ return '(' . $this->p($subNode) . ')'; } break; + case self::FIXUP_STATIC_DEREF_LHS: + if ($this->staticDereferenceLhsRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos) + ) { + return '(' . $this->p($subNode) . ')'; + } + break; case self::FIXUP_NEW: if ($this->newOperandRequiresParens($subNode) && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { @@ -1062,13 +1070,26 @@ protected function callLhsRequiresParens(Node $node): bool { } /** - * Determines whether the LHS of a dereferencing operation must be wrapped in parenthesis. + * Determines whether the LHS of an array/object operation must be wrapped in parentheses. * * @param Node $node LHS of dereferencing operation * * @return bool Whether parentheses are required */ protected function dereferenceLhsRequiresParens(Node $node): bool { + // A constant can occur on the LHS of an array/object deref, but not a static deref. + return $this->staticDereferenceLhsRequiresParens($node) + && !$node instanceof Expr\ConstFetch; + } + + /** + * Determines whether the LHS of a static operation must be wrapped in parentheses. + * + * @param Node $node LHS of dereferencing operation + * + * @return bool Whether parentheses are required + */ + protected function staticDereferenceLhsRequiresParens(Node $node): bool { return !($node instanceof Expr\Variable || $node instanceof Node\Name || $node instanceof Expr\ArrayDimFetch @@ -1081,7 +1102,6 @@ protected function dereferenceLhsRequiresParens(Node $node): bool { || $node instanceof Expr\StaticCall || $node instanceof Expr\Array_ || $node instanceof Scalar\String_ - || $node instanceof Expr\ConstFetch || $node instanceof Expr\ClassConstFetch); } @@ -1216,9 +1236,9 @@ protected function initializeFixupMap(): void { ], Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], - Expr\StaticCall::class => ['class' => self::FIXUP_DEREF_LHS], + Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\ClassConstFetch::class => ['var' => self::FIXUP_DEREF_LHS], + Expr\ClassConstFetch::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], Expr\New_::class => ['class' => self::FIXUP_NEW], Expr\MethodCall::class => [ 'var' => self::FIXUP_DEREF_LHS, @@ -1229,7 +1249,7 @@ protected function initializeFixupMap(): void { 'name' => self::FIXUP_BRACED_NAME, ], Expr\StaticPropertyFetch::class => [ - 'class' => self::FIXUP_DEREF_LHS, + 'class' => self::FIXUP_STATIC_DEREF_LHS, 'name' => self::FIXUP_VAR_BRACED_NAME, ], Expr\PropertyFetch::class => [ diff --git a/test/code/formatPreservation/fixup.test b/test/code/formatPreservation/fixup.test index de38532721..ec3afe61f2 100644 --- a/test/code/formatPreservation/fixup.test +++ b/test/code/formatPreservation/fixup.test @@ -44,6 +44,9 @@ self :: $foo; self :: $foo; new Foo(); $x instanceof Foo; +Foo :: bar; +Foo :: $bar; +Foo :: bar(); ----- $stmts[0]->expr->name = new Expr\Variable('a'); $stmts[1]->expr->name = new Expr\BinaryOp\Concat(new Expr\Variable('a'), new Expr\Variable('b')); @@ -58,6 +61,9 @@ $stmts[7]->expr->name = new Node\VarLikeIdentifier('bar'); $stmts[8]->expr->name = new Expr\BinaryOp\Concat(new Expr\Variable('a'), new Expr\Variable('b')); $stmts[9]->expr->class = new Scalar\String_('Foo'); $stmts[10]->expr->class = new Scalar\String_('Foo'); +$stmts[11]->expr->class = new Expr\ConstFetch(new Node\Name('FOO')); +$stmts[12]->expr->class = new Expr\ConstFetch(new Node\Name('FOO')); +$stmts[13]->expr->class = new Expr\ConstFetch(new Node\Name('FOO')); ----- b)(); (A::$b)(); ('a' . 'b')::X; +(A)::X; +(A)::$x; +(A)::x(); ----- (function () { })(); @@ -21,4 +24,7 @@ $A::{$b[$c]}(); A::${$b}[$c](); ($a->b)(); (A::$b)(); -('a' . 'b')::X; \ No newline at end of file +('a' . 'b')::X; +(A)::X; +(A)::$x; +(A)::x(); From e9416a0eaec601df910045a6f63361068cffddbf Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 16:00:35 +0100 Subject: [PATCH 209/428] Support fixup for dynamic class const name This is new in PHP 8.3. --- lib/PhpParser/PrettyPrinterAbstract.php | 5 ++++- test/code/formatPreservation/fixup.test | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 9087e30c98..aa83f768e9 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1238,7 +1238,10 @@ protected function initializeFixupMap(): void { Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\ClassConstFetch::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], + Expr\ClassConstFetch::class => [ + 'class' => self::FIXUP_STATIC_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], Expr\New_::class => ['class' => self::FIXUP_NEW], Expr\MethodCall::class => [ 'var' => self::FIXUP_DEREF_LHS, diff --git a/test/code/formatPreservation/fixup.test b/test/code/formatPreservation/fixup.test index ec3afe61f2..0fd07f16d1 100644 --- a/test/code/formatPreservation/fixup.test +++ b/test/code/formatPreservation/fixup.test @@ -47,6 +47,7 @@ $x instanceof Foo; Foo :: bar; Foo :: $bar; Foo :: bar(); +Foo :: bar; ----- $stmts[0]->expr->name = new Expr\Variable('a'); $stmts[1]->expr->name = new Expr\BinaryOp\Concat(new Expr\Variable('a'), new Expr\Variable('b')); @@ -64,6 +65,7 @@ $stmts[10]->expr->class = new Scalar\String_('Foo'); $stmts[11]->expr->class = new Expr\ConstFetch(new Node\Name('FOO')); $stmts[12]->expr->class = new Expr\ConstFetch(new Node\Name('FOO')); $stmts[13]->expr->class = new Expr\ConstFetch(new Node\Name('FOO')); +$stmts[14]->expr->name = new Expr\Variable('bar'); ----- Date: Sat, 25 Feb 2023 21:05:08 +0100 Subject: [PATCH 210/428] Properly support prefix operator precedence printing The pretty printer is supposed to produce a minimal-parentheses printing for expressions. However, for prefix operators, we were failing to do so in ways that are practically meaningful, e.g. $a = yield from $b produced redundant parentheses around the yield from. For prefix operators, the precedence of the direct parent operator is not actually relevant: What matters is the precedence of any infix operator whose LHS it appears on. For example, $a . include $b does not require parentheses, but (include $a) . $b does. To handle this, keep separate track of the parent operator precedence, and a special LHS precedence which is used for unary operator printing only. Because the LHS precedence may not come from the direct parent, we have to pass it down the call stack. And if we do that, we may as well do the same for the parent precedence. This also fixes an integration test failure with php-src, because arrow function precedence was previously not respected (and would be ugly to respect without this change). --- lib/PhpParser/PrettyPrinter/Standard.php | 257 ++++++++-------- lib/PhpParser/PrettyPrinterAbstract.php | 284 ++++++++++-------- test/code/prettyPrinter/expr/include.test | 2 +- test/code/prettyPrinter/expr/parentheses.test | 16 +- test/code/prettyPrinter/expr/yield.test | 4 +- 5 files changed, 307 insertions(+), 256 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 6f2fd46b9e..33e41a49a6 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -240,207 +240,207 @@ protected function pScalar_Float(Scalar\Float_ $node): string { // Assignments - protected function pExpr_Assign(Expr\Assign $node): string { - return $this->pPrefixOp(Expr\Assign::class, $this->p($node->var) . ' = ', $node->expr); + protected function pExpr_Assign(Expr\Assign $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Assign::class, $this->p($node->var) . ' = ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignRef(Expr\AssignRef $node): string { - return $this->pPrefixOp(Expr\AssignRef::class, $this->p($node->var) . ' =& ', $node->expr); + protected function pExpr_AssignRef(Expr\AssignRef $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\AssignRef::class, $this->p($node->var) . ' =& ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Plus(AssignOp\Plus $node): string { - return $this->pPrefixOp(AssignOp\Plus::class, $this->p($node->var) . ' += ', $node->expr); + protected function pExpr_AssignOp_Plus(AssignOp\Plus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Plus::class, $this->p($node->var) . ' += ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Minus(AssignOp\Minus $node): string { - return $this->pPrefixOp(AssignOp\Minus::class, $this->p($node->var) . ' -= ', $node->expr); + protected function pExpr_AssignOp_Minus(AssignOp\Minus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Minus::class, $this->p($node->var) . ' -= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Mul(AssignOp\Mul $node): string { - return $this->pPrefixOp(AssignOp\Mul::class, $this->p($node->var) . ' *= ', $node->expr); + protected function pExpr_AssignOp_Mul(AssignOp\Mul $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Mul::class, $this->p($node->var) . ' *= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Div(AssignOp\Div $node): string { - return $this->pPrefixOp(AssignOp\Div::class, $this->p($node->var) . ' /= ', $node->expr); + protected function pExpr_AssignOp_Div(AssignOp\Div $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Div::class, $this->p($node->var) . ' /= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Concat(AssignOp\Concat $node): string { - return $this->pPrefixOp(AssignOp\Concat::class, $this->p($node->var) . ' .= ', $node->expr); + protected function pExpr_AssignOp_Concat(AssignOp\Concat $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Concat::class, $this->p($node->var) . ' .= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Mod(AssignOp\Mod $node): string { - return $this->pPrefixOp(AssignOp\Mod::class, $this->p($node->var) . ' %= ', $node->expr); + protected function pExpr_AssignOp_Mod(AssignOp\Mod $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Mod::class, $this->p($node->var) . ' %= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node): string { - return $this->pPrefixOp(AssignOp\BitwiseAnd::class, $this->p($node->var) . ' &= ', $node->expr); + protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseAnd::class, $this->p($node->var) . ' &= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node): string { - return $this->pPrefixOp(AssignOp\BitwiseOr::class, $this->p($node->var) . ' |= ', $node->expr); + protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseOr::class, $this->p($node->var) . ' |= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node): string { - return $this->pPrefixOp(AssignOp\BitwiseXor::class, $this->p($node->var) . ' ^= ', $node->expr); + protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseXor::class, $this->p($node->var) . ' ^= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node): string { - return $this->pPrefixOp(AssignOp\ShiftLeft::class, $this->p($node->var) . ' <<= ', $node->expr); + protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\ShiftLeft::class, $this->p($node->var) . ' <<= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node): string { - return $this->pPrefixOp(AssignOp\ShiftRight::class, $this->p($node->var) . ' >>= ', $node->expr); + protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\ShiftRight::class, $this->p($node->var) . ' >>= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Pow(AssignOp\Pow $node): string { - return $this->pPrefixOp(AssignOp\Pow::class, $this->p($node->var) . ' **= ', $node->expr); + protected function pExpr_AssignOp_Pow(AssignOp\Pow $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Pow::class, $this->p($node->var) . ' **= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node): string { - return $this->pPrefixOp(AssignOp\Coalesce::class, $this->p($node->var) . ' ??= ', $node->expr); + protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Coalesce::class, $this->p($node->var) . ' ??= ', $node->expr, $precedence, $lhsPrecedence); } // Binary expressions - protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node): string { - return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right); + protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node): string { - return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right); + protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node): string { - return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right); + protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Div(BinaryOp\Div $node): string { - return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right); + protected function pExpr_BinaryOp_Div(BinaryOp\Div $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node): string { - return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right); + protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node): string { - return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right); + protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node): string { - return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right); + protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node): string { - return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right); + protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node): string { - return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right); + protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node): string { - return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right); + protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node): string { - return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right); + protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node): string { - return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right); + protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node): string { - return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right); + protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node): string { - return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right); + protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node): string { - return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right); + protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node): string { - return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right); + protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node): string { - return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right); + protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node): string { - return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right); + protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node): string { - return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right); + protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node): string { - return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right); + protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node): string { - return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right); + protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node): string { - return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right); + protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node): string { - return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right); + protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node): string { - return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right); + protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node): string { - return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right); + protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node): string { - return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right); + protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node): string { - return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right); + protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_Instanceof(Expr\Instanceof_ $node): string { - list($precedence, $associativity) = $this->precedenceMap[Expr\Instanceof_::class]; - return $this->pPrec($node->expr, $precedence, $associativity, -1) - . ' instanceof ' - . $this->pNewOperand($node->class); + protected function pExpr_Instanceof(Expr\Instanceof_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPostfixOp( + Expr\Instanceof_::class, $node->expr, + ' instanceof ' . $this->pNewOperand($node->class), + $precedence, $lhsPrecedence); } // Unary expressions - protected function pExpr_BooleanNot(Expr\BooleanNot $node): string { - return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr); + protected function pExpr_BooleanNot(Expr\BooleanNot $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_BitwiseNot(Expr\BitwiseNot $node): string { - return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr); + protected function pExpr_BitwiseNot(Expr\BitwiseNot $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_UnaryMinus(Expr\UnaryMinus $node): string { + protected function pExpr_UnaryMinus(Expr\UnaryMinus $node, int $precedence, int $lhsPrecedence): string { if ($node->expr instanceof Expr\UnaryMinus || $node->expr instanceof Expr\PreDec) { // Enforce -(-$expr) instead of --$expr return '-(' . $this->p($node->expr) . ')'; } - return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr); + return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_UnaryPlus(Expr\UnaryPlus $node): string { + protected function pExpr_UnaryPlus(Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence): string { if ($node->expr instanceof Expr\UnaryPlus || $node->expr instanceof Expr\PreInc) { // Enforce +(+$expr) instead of ++$expr return '+(' . $this->p($node->expr) . ')'; } - return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr); + return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr, $precedence, $lhsPrecedence); } protected function pExpr_PreInc(Expr\PreInc $node): string { @@ -459,25 +459,25 @@ protected function pExpr_PostDec(Expr\PostDec $node): string { return $this->p($node->var) . '--'; } - protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node): string { - return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr); + protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_YieldFrom(Expr\YieldFrom $node): string { - return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr); + protected function pExpr_YieldFrom(Expr\YieldFrom $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Print(Expr\Print_ $node): string { - return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr); + protected function pExpr_Print(Expr\Print_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr, $precedence, $lhsPrecedence); } // Casts - protected function pExpr_Cast_Int(Cast\Int_ $node): string { - return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr); + protected function pExpr_Cast_Int(Cast\Int_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Double(Cast\Double $node): string { + protected function pExpr_Cast_Double(Cast\Double $node, int $precedence, int $lhsPrecedence): string { $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE); if ($kind === Cast\Double::KIND_DOUBLE) { $cast = '(double)'; @@ -487,27 +487,27 @@ protected function pExpr_Cast_Double(Cast\Double $node): string { assert($kind === Cast\Double::KIND_REAL); $cast = '(real)'; } - return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr); + return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_String(Cast\String_ $node): string { - return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr); + protected function pExpr_Cast_String(Cast\String_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Array(Cast\Array_ $node): string { - return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr); + protected function pExpr_Cast_Array(Cast\Array_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Object(Cast\Object_ $node): string { - return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr); + protected function pExpr_Cast_Object(Cast\Object_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Bool(Cast\Bool_ $node): string { - return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr); + protected function pExpr_Cast_Bool(Cast\Bool_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Unset(Cast\Unset_ $node): string { - return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr); + protected function pExpr_Cast_Unset(Cast\Unset_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr, $precedence, $lhsPrecedence); } // Function calls and similar constructs @@ -549,7 +549,7 @@ protected function pExpr_Eval(Expr\Eval_ $node): string { return 'eval(' . $this->p($node->expr) . ')'; } - protected function pExpr_Include(Expr\Include_ $node): string { + protected function pExpr_Include(Expr\Include_ $node, int $precedence, int $lhsPrecedence): string { static $map = [ Expr\Include_::TYPE_INCLUDE => 'include', Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', @@ -557,7 +557,7 @@ protected function pExpr_Include(Expr\Include_ $node): string { Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once', ]; - return $map[$node->type] . ' ' . $this->p($node->expr); + return $this->pPrefixOp(Expr\Include_::class, $map[$node->type] . ' ', $node->expr, $precedence, $lhsPrecedence); } protected function pExpr_List(Expr\List_ $node): string { @@ -652,14 +652,16 @@ protected function pMatchArm(Node\MatchArm $node): string { . ' => ' . $this->p($node->body); } - protected function pExpr_ArrowFunction(Expr\ArrowFunction $node): string { - return $this->pAttrGroups($node->attrGroups, true) + protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp( + Expr\ArrowFunction::class, + $this->pAttrGroups($node->attrGroups, true) . $this->pStatic($node->static) . 'fn' . ($node->byRef ? '&' : '') . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . ' => ' - . $this->p($node->expr); + . ' => ', + $node->expr, $precedence, $lhsPrecedence); } protected function pClosureUse(Node\ClosureUse $node): string { @@ -675,15 +677,16 @@ protected function pExpr_New(Expr\New_ $node): string { . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_Clone(Expr\Clone_ $node): string { - return $this->pPrefixOp(Expr\Clone_::class, 'clone ', $node->expr); + protected function pExpr_Clone(Expr\Clone_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Clone_::class, 'clone ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Ternary(Expr\Ternary $node): string { + protected function pExpr_Ternary(Expr\Ternary $node, int $precedence, int $lhsPrecedence): string { // 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::class, - $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else + $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else, + $precedence, $lhsPrecedence ); } diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index aa83f768e9..9937866ca5 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -20,78 +20,84 @@ abstract class PrettyPrinterAbstract { protected const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence protected const FIXUP_PREC_RIGHT = 1; // RHS operand affected by precedence - protected const FIXUP_CALL_LHS = 2; // LHS of call - protected const FIXUP_DEREF_LHS = 3; // LHS of dereferencing operation - protected const FIXUP_STATIC_DEREF_LHS = 4; // LHS of static dereferencing operation - protected const FIXUP_BRACED_NAME = 5; // Name operand that may require bracing - protected const FIXUP_VAR_BRACED_NAME = 6; // Name operand that may require ${} bracing - protected const FIXUP_ENCAPSED = 7; // Encapsed string part - protected const FIXUP_NEW = 8; // New/instanceof operand - - /** @var array */ + protected const FIXUP_PREC_UNARY = 2; // Only operand affected by precedence + protected const FIXUP_CALL_LHS = 3; // LHS of call + protected const FIXUP_DEREF_LHS = 4; // LHS of dereferencing operation + protected const FIXUP_STATIC_DEREF_LHS = 5; // LHS of static dereferencing operation + protected const FIXUP_BRACED_NAME = 6; // Name operand that may require bracing + protected const FIXUP_VAR_BRACED_NAME = 7; // Name operand that may require ${} bracing + protected const FIXUP_ENCAPSED = 8; // Encapsed string part + protected const FIXUP_NEW = 9; // New/instanceof operand + + private const MAX_PRECEDENCE = 1000; + + /** @var array */ protected $precedenceMap = [ - // [precedence, associativity] - // where for precedence -1 is %left, 0 is %nonassoc and 1 is %right - Expr\Clone_::class => [-10, 1], - BinaryOp\Pow::class => [ 0, 1], - Expr\BitwiseNot::class => [ 10, 1], - Expr\UnaryPlus::class => [ 10, 1], - Expr\UnaryMinus::class => [ 10, 1], - Cast\Int_::class => [ 10, 1], - Cast\Double::class => [ 10, 1], - Cast\String_::class => [ 10, 1], - Cast\Array_::class => [ 10, 1], - Cast\Object_::class => [ 10, 1], - Cast\Bool_::class => [ 10, 1], - Cast\Unset_::class => [ 10, 1], - Expr\ErrorSuppress::class => [ 10, 1], - Expr\Instanceof_::class => [ 20, 0], - Expr\BooleanNot::class => [ 30, 1], - BinaryOp\Mul::class => [ 40, -1], - BinaryOp\Div::class => [ 40, -1], - BinaryOp\Mod::class => [ 40, -1], - BinaryOp\Plus::class => [ 50, -1], - BinaryOp\Minus::class => [ 50, -1], - BinaryOp\Concat::class => [ 50, -1], - BinaryOp\ShiftLeft::class => [ 60, -1], - BinaryOp\ShiftRight::class => [ 60, -1], - BinaryOp\Smaller::class => [ 70, 0], - BinaryOp\SmallerOrEqual::class => [ 70, 0], - BinaryOp\Greater::class => [ 70, 0], - BinaryOp\GreaterOrEqual::class => [ 70, 0], - BinaryOp\Equal::class => [ 80, 0], - BinaryOp\NotEqual::class => [ 80, 0], - BinaryOp\Identical::class => [ 80, 0], - BinaryOp\NotIdentical::class => [ 80, 0], - BinaryOp\Spaceship::class => [ 80, 0], - BinaryOp\BitwiseAnd::class => [ 90, -1], - BinaryOp\BitwiseXor::class => [100, -1], - BinaryOp\BitwiseOr::class => [110, -1], - BinaryOp\BooleanAnd::class => [120, -1], - BinaryOp\BooleanOr::class => [130, -1], - BinaryOp\Coalesce::class => [140, 1], - Expr\Ternary::class => [150, 0], - Expr\Assign::class => [160, 1], - Expr\AssignRef::class => [160, 1], - AssignOp\Plus::class => [160, 1], - AssignOp\Minus::class => [160, 1], - AssignOp\Mul::class => [160, 1], - AssignOp\Div::class => [160, 1], - AssignOp\Concat::class => [160, 1], - AssignOp\Mod::class => [160, 1], - AssignOp\BitwiseAnd::class => [160, 1], - AssignOp\BitwiseOr::class => [160, 1], - AssignOp\BitwiseXor::class => [160, 1], - AssignOp\ShiftLeft::class => [160, 1], - AssignOp\ShiftRight::class => [160, 1], - AssignOp\Pow::class => [160, 1], - AssignOp\Coalesce::class => [160, 1], - Expr\YieldFrom::class => [165, 1], - Expr\Print_::class => [168, 1], - BinaryOp\LogicalAnd::class => [170, -1], - BinaryOp\LogicalXor::class => [180, -1], - BinaryOp\LogicalOr::class => [190, -1], - Expr\Include_::class => [200, -1], + // [precedence, precedenceLHS, precedenceRHS] + // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, + // where 1 is added to one of the sides depending on associativity. This information is not + // used for unary operators and set to -1. + Expr\Clone_::class => [-10, 0, 1], + BinaryOp\Pow::class => [ 0, 0, 1], + Expr\BitwiseNot::class => [ 10, -1, -1], + Expr\UnaryPlus::class => [ 10, -1, -1], + Expr\UnaryMinus::class => [ 10, -1, -1], + Cast\Int_::class => [ 10, -1, -1], + Cast\Double::class => [ 10, -1, -1], + Cast\String_::class => [ 10, -1, -1], + Cast\Array_::class => [ 10, -1, -1], + Cast\Object_::class => [ 10, -1, -1], + Cast\Bool_::class => [ 10, -1, -1], + Cast\Unset_::class => [ 10, -1, -1], + Expr\ErrorSuppress::class => [ 10, -1, -1], + Expr\Instanceof_::class => [ 20, -1, -1], + Expr\BooleanNot::class => [ 30, -1, -1], + BinaryOp\Mul::class => [ 40, 41, 40], + BinaryOp\Div::class => [ 40, 41, 40], + BinaryOp\Mod::class => [ 40, 41, 40], + BinaryOp\Plus::class => [ 50, 51, 50], + BinaryOp\Minus::class => [ 50, 51, 50], + BinaryOp\Concat::class => [ 50, 51, 50], + BinaryOp\ShiftLeft::class => [ 60, 61, 60], + BinaryOp\ShiftRight::class => [ 60, 61, 60], + BinaryOp\Smaller::class => [ 70, 70, 70], + BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], + BinaryOp\Greater::class => [ 70, 70, 70], + BinaryOp\GreaterOrEqual::class => [ 70, 70, 70], + BinaryOp\Equal::class => [ 80, 80, 80], + BinaryOp\NotEqual::class => [ 80, 80, 80], + BinaryOp\Identical::class => [ 80, 80, 80], + BinaryOp\NotIdentical::class => [ 80, 80, 80], + BinaryOp\Spaceship::class => [ 80, 80, 80], + BinaryOp\BitwiseAnd::class => [ 90, 91, 90], + BinaryOp\BitwiseXor::class => [100, 101, 100], + BinaryOp\BitwiseOr::class => [110, 111, 110], + BinaryOp\BooleanAnd::class => [120, 121, 120], + BinaryOp\BooleanOr::class => [130, 131, 130], + BinaryOp\Coalesce::class => [140, 140, 141], + Expr\Ternary::class => [150, -1, -1], + Expr\Assign::class => [160, -1, -1], + Expr\AssignRef::class => [160, -1, -1], + AssignOp\Plus::class => [160, -1, -1], + AssignOp\Minus::class => [160, -1, -1], + AssignOp\Mul::class => [160, -1, -1], + AssignOp\Div::class => [160, -1, -1], + AssignOp\Concat::class => [160, -1, -1], + AssignOp\Mod::class => [160, -1, -1], + AssignOp\BitwiseAnd::class => [160, -1, -1], + AssignOp\BitwiseOr::class => [160, -1, -1], + AssignOp\BitwiseXor::class => [160, -1, -1], + AssignOp\ShiftLeft::class => [160, -1, -1], + AssignOp\ShiftRight::class => [160, -1, -1], + AssignOp\Pow::class => [160, -1, -1], + AssignOp\Coalesce::class => [160, -1, -1], + Expr\YieldFrom::class => [170, -1, -1], + Expr\Print_::class => [180, -1, -1], + BinaryOp\LogicalAnd::class => [190, 191, 190], + BinaryOp\LogicalXor::class => [200, 201, 200], + BinaryOp\LogicalOr::class => [210, 211, 210], + Expr\Include_::class => [220, -1, -1], + Expr\ArrowFunction::class => [230, -1, -1], ]; /** @var int Current indentation level. */ @@ -329,15 +335,25 @@ protected function pStmts(array $nodes, bool $indent = true): string { * @param Node $leftNode Left-hand side node * @param string $operatorString String representation of the operator * @param Node $rightNode Right-hand side node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * * @return string Pretty printed infix operation */ - protected function pInfixOp(string $class, Node $leftNode, string $operatorString, Node $rightNode): string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - - return $this->pPrec($leftNode, $precedence, $associativity, -1) - . $operatorString - . $this->pPrec($rightNode, $precedence, $associativity, 1); + protected function pInfixOp( + string $class, Node $leftNode, string $operatorString, Node $rightNode, + int $precedence, int $lhsPrecedence + ): string { + list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) + . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; } /** @@ -346,38 +362,47 @@ protected function pInfixOp(string $class, Node $leftNode, string $operatorStrin * @param string $class Node class of operator * @param string $operatorString String representation of the operator * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * * @return string Pretty printed prefix operation */ - protected function pPrefixOp(string $class, string $operatorString, Node $node): string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - return $operatorString . $this->pPrec($node, $precedence, $associativity, 1); + protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence > $lhsPrecedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + return $prefix . $operatorString . $this->p($node, $opPrecedence, $lhsPrecedence) . $suffix; } /** - * Prints an expression node with the least amount of parentheses necessary to preserve the meaning. + * Pretty-print a postfix operation while taking precedence into account. * - * @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) + * @param string $class Node class of operator + * @param string $operatorString String representation of the operator + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * - * @return string The pretty printed node + * @return string Pretty printed postfix operation */ - protected function pPrec(Node $node, int $parentPrecedence, int $parentAssociativity, int $childPosition): string { - $class = \get_class($node); - if (isset($this->precedenceMap[$class])) { - $childPrecedence = $this->precedenceMap[$class][0]; - if ($childPrecedence > $parentPrecedence - || ($parentPrecedence === $childPrecedence && $parentAssociativity !== $childPosition) - ) { - return '(' . $this->p($node) . ')'; - } + protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence > $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; } - - return $this->p($node); + if ($opPrecedence < $lhsPrecedence) { + $lhsPrecedence = $opPrecedence; + } + return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix; } /** @@ -386,7 +411,7 @@ protected function pPrec(Node $node, int $parentPrecedence, int $parentAssociati * @param Node[] $nodes Array of Nodes to be printed * @param string $glue Character to implode with * - * @return string Imploded pretty printed nodes + * @return string Imploded pretty printed nodes> $pre */ protected function pImplode(array $nodes, string $glue = ''): string { $pNodes = []; @@ -509,8 +534,8 @@ public function printFormatPreserving(array $stmts, array $origStmts, array $ori return ltrim($this->handleMagicTokens($result)); } - protected function pFallback(Node $node): string { - return $this->{'p' . $node->getType()}($node); + protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); } /** @@ -519,20 +544,25 @@ protected function pFallback(Node $node): string { * This method also handles formatting preservation for nodes. * * @param Node $node Node to be pretty printed + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * @param bool $parentFormatPreserved Whether parent node has preserved formatting * * @return string Pretty printed node */ - protected function p(Node $node, bool $parentFormatPreserved = false): string { + protected function p( + Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, + bool $parentFormatPreserved = false + ): string { // No orig tokens means this is a normal pretty print without preservation of formatting if (!$this->origTokens) { - return $this->{'p' . $node->getType()}($node); + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); } /** @var Node|null $origNode */ $origNode = $node->getAttribute('origNode'); if (null === $origNode) { - return $this->pFallback($node); + return $this->pFallback($node, $precedence, $lhsPrecedence); } $class = \get_class($node); @@ -555,7 +585,7 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { // is not preserved, then we need to use the fallback code to make sure the tags are // printed. if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); @@ -584,7 +614,7 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { $fixupInfo[$subNodeName] ?? null ); if (null === $listResult) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } $result .= $listResult; @@ -594,7 +624,7 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { // Check if this is a modifier change $key = $class . '->' . $subNodeName; if (!isset($this->modifierChangeMap[$key])) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } [$printFn, $findToken] = $this->modifierChangeMap[$key]; @@ -618,7 +648,7 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { // A node has been inserted, check if we have insertion information for it $key = $type . '->' . $subNodeName; if (!isset($this->insertionMap[$key])) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; @@ -640,7 +670,7 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { // A node has been removed, check if we have removal information for it $key = $type . '->' . $subNodeName; if (!isset($this->removalMap[$key])) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } // Adjust positions to account for additional tokens that must be skipped @@ -670,7 +700,7 @@ protected function p(Node $node, bool $parentFormatPreserved = false): string { $fixup = $fixupInfo[$subNodeName]; $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); } else { - $res = $this->p($subNode, true); + $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); } $this->safeAppend($result, $res); @@ -799,7 +829,7 @@ protected function pArray( } } - $this->safeAppend($result, $this->p($delayedAddNode, true)); + $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true)); if ($insertNewline) { $result .= $insertStr . $this->nl; @@ -905,7 +935,7 @@ protected function pArray( if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); } else { - $res = $this->p($arrItem, true); + $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); } $this->safeAppend($result, $res); @@ -939,7 +969,7 @@ protected function pArray( $result .= $this->nl; } } - $result .= $this->p($delayedAddNode, true); + $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); $first = false; } $result .= $extraRight === "\n" ? $this->nl : $extraRight; @@ -966,11 +996,22 @@ protected function pArray( protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { switch ($fixup) { case self::FIXUP_PREC_LEFT: + // We use a conservative approximation where lhsPrecedence == precedence. + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][1]; + return $this->p($subNode, $precedence, $precedence); + } + break; case self::FIXUP_PREC_RIGHT: if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - list($precedence, $associativity) = $this->precedenceMap[$parentClass]; - return $this->pPrec($subNode, $precedence, $associativity, - $fixup === self::FIXUP_PREC_LEFT ? -1 : 1); + $precedence = $this->precedenceMap[$parentClass][2]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_PREC_UNARY: + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][0]; + return $this->p($subNode, $precedence, $precedence); } break; case self::FIXUP_CALL_LHS: @@ -1227,7 +1268,7 @@ protected function initializeFixupMap(): void { $this->fixupMap = [ Expr\Instanceof_::class => [ - 'expr' => self::FIXUP_PREC_LEFT, + 'expr' => self::FIXUP_PREC_UNARY, 'class' => self::FIXUP_NEW, ], Expr\Ternary::class => [ @@ -1287,17 +1328,18 @@ protected function initializeFixupMap(): void { } $prefixOps = [ - Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, + Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class + AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, + Expr\ArrowFunction::class, ]; foreach ($prefixOps as $prefixOp) { - $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_RIGHT]; + $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; } } diff --git a/test/code/prettyPrinter/expr/include.test b/test/code/prettyPrinter/expr/include.test index 3c40779876..ef8c9911ef 100644 --- a/test/code/prettyPrinter/expr/include.test +++ b/test/code/prettyPrinter/expr/include.test @@ -4,4 +4,4 @@ Include (include $foo) && (include $bar); ----- -(include $foo) && (include $bar); \ No newline at end of file +(include $foo) && include $bar; diff --git a/test/code/prettyPrinter/expr/parentheses.test b/test/code/prettyPrinter/expr/parentheses.test index 11f336bf23..018f3d830c 100644 --- a/test/code/prettyPrinter/expr/parentheses.test +++ b/test/code/prettyPrinter/expr/parentheses.test @@ -44,12 +44,15 @@ clone ($a + $b); -(--$a); +(++$a); -// The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment -// only works on variables. !$a = $b; ++$a ** $b; $a ** $b++; $a . ($b = $c) . $d; +!($a = $b) || $c; +(fn() => $a) || $b; +($a = $b and $c) + $d; +$a ** ($b instanceof $c); +($a = $b) instanceof $c; ----- echo 'abc' . 'cde' . 'fgh'; echo 'abc' . ('cde' . 'fgh'); @@ -82,9 +85,12 @@ clone ($a + $b); +(+$a); -(--$a); +(++$a); -// The following will currently add unnecessary parentheses, because the pretty printer is not aware that assignment -// only works on variables. -!($a = $b); +!$a = $b; ++$a ** $b; $a ** $b++; $a . ($b = $c) . $d; +!($a = $b) || $c; +(fn() => $a) || $b; +($a = $b and $c) + $d; +$a ** ($b instanceof $c); +($a = $b) instanceof $c; diff --git a/test/code/prettyPrinter/expr/yield.test b/test/code/prettyPrinter/expr/yield.test index 64dc902ffb..b18fa4899e 100644 --- a/test/code/prettyPrinter/expr/yield.test +++ b/test/code/prettyPrinter/expr/yield.test @@ -40,6 +40,6 @@ function gen() $a = (yield $b); $a = (yield $b => $c); yield from $a; - $a = (yield from $b); + $a = yield from $b; } -// TODO Get rid of parens for last case \ No newline at end of file +// TODO Get rid of parens for last case From 5ad02d8a2cf518af20343feace7726f34c77ce77 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 18:28:17 +0100 Subject: [PATCH 211/428] Run integration tests against PHP 8.2 test suite --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c8269e49e1..dbe31d2e24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,7 +71,7 @@ jobs: run: "test_old/run-php-src.sh 7.3.21" test_old_80_70: runs-on: "ubuntu-latest" - name: "PHP 8.1 Code on PHP 7.1 Integration Tests" + name: "PHP 8.2 Code on PHP 7.1 Integration Tests" steps: - name: "Checkout" uses: "actions/checkout@v2" @@ -84,7 +84,7 @@ jobs: - name: "Install PHP 8 dependencies" run: "composer update --no-progress --prefer-dist" - name: "Tests" - run: "test_old/run-php-src.sh 8.1.6" + run: "test_old/run-php-src.sh 8.2.3" phpstan: runs-on: "ubuntu-latest" name: "PHP ${{ matrix.php-version }} PHPStan" From 1cb460ae387022780975edbc9b222196f5c42405 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 18:33:24 +0100 Subject: [PATCH 212/428] Handle throw precedence Now that this is an expression, we also need to handle precedence. --- lib/PhpParser/PrettyPrinter/Standard.php | 4 ++-- lib/PhpParser/PrettyPrinterAbstract.php | 3 ++- test/code/prettyPrinter/expr/parentheses.test | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 33e41a49a6..a17bf8fc6a 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -696,8 +696,8 @@ protected function pExpr_Exit(Expr\Exit_ $node): string { . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); } - protected function pExpr_Throw(Expr\Throw_ $node): string { - return 'throw ' . $this->p($node->expr); + protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Throw_::class, 'throw ', $node->expr, $precedence, $lhsPrecedence); } protected function pExpr_Yield(Expr\Yield_ $node): string { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 9937866ca5..782a1bd23e 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -98,6 +98,7 @@ abstract class PrettyPrinterAbstract { BinaryOp\LogicalOr::class => [210, 211, 210], Expr\Include_::class => [220, -1, -1], Expr\ArrowFunction::class => [230, -1, -1], + Expr\Throw_::class => [240, -1, -1], ]; /** @var int Current indentation level. */ @@ -1336,7 +1337,7 @@ protected function initializeFixupMap(): void { AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, - Expr\ArrowFunction::class, + Expr\ArrowFunction::class, Expr\Throw_::class, ]; foreach ($prefixOps as $prefixOp) { $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; diff --git a/test/code/prettyPrinter/expr/parentheses.test b/test/code/prettyPrinter/expr/parentheses.test index 018f3d830c..38cd5766a8 100644 --- a/test/code/prettyPrinter/expr/parentheses.test +++ b/test/code/prettyPrinter/expr/parentheses.test @@ -38,6 +38,7 @@ yield from ($a and yield from $b); print ($a and print $b); clone ($a + $b); +(throw $a) + $b; -(-$a); +(+$a); @@ -81,6 +82,7 @@ yield from $a and yield from $b; yield from ($a and yield from $b); print ($a and print $b); clone ($a + $b); +(throw $a) + $b; -(-$a); +(+$a); -(--$a); From cb60eda7748cdf1b757bef7fa6618a938446c2ba Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 18:44:40 +0100 Subject: [PATCH 213/428] Support yield precedence Since PHP 7.0 yield is a proper expression, so print it with proper precedence. If the pretty printer is configured for older version (non-default), then always print parentheses. There is an interesting interaction here, in that => is resolved in favor of yield if the yield occurs as part of an array (or outer yield). This kind of bypasses the entire precedence hierarchy and *only* affects yield expressions. For the sake of simplicity this is modeled via normal LHS precedence, because this will only add unnecessary parentheses to a handful of low precedence unary operators. If desired, a special marker for this purpose could be added though. --- lib/PhpParser/PhpVersion.php | 7 +++ lib/PhpParser/PrettyPrinter/Standard.php | 30 +++++++--- lib/PhpParser/PrettyPrinterAbstract.php | 8 ++- test/code/prettyPrinter/expr/parentheses.test | 6 ++ test/code/prettyPrinter/expr/yield.test | 57 +++++++++++++++---- 5 files changed, 88 insertions(+), 20 deletions(-) diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index f8e05e7712..0a28d0541c 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -140,4 +140,11 @@ public function allowsAssignNewByReference(): bool { public function allowsInvalidOctals(): bool { return $this->id < 70000; } + + /** + * Whether this version support yield in expression context without parentheses. + */ + public function supportsYieldWithoutParentheses(): bool { + return $this->id >= 70000; + } } diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index a17bf8fc6a..76cf870d7f 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -594,8 +594,23 @@ protected function pExpr_Array(Expr\Array_ $node): string { } } + protected function pKey(?Node $node): string { + if ($node === null) { + return ''; + } + + // => is not really an operator and does not typically participate in precedence resolution. + // However, there is an exception if yield expressions with keys are involved: + // [yield $a => $b] is interpreted as [(yield $a => $b)], so we need to ensure that + // [(yield $a) => $b] is printed with parentheses. We approximate this by lowering the LHS + // precedence to that of yield (which will also print unnecessary parentheses for rare low + // precedence unary operators like include). + $yieldPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; + return $this->p($node, self::MAX_PRECEDENCE, $yieldPrecedence) . ' => '; + } + protected function pArrayItem(Node\ArrayItem $node): string { - return (null !== $node->key ? $this->p($node->key) . ' => ' : '') + return $this->pKey($node->key) . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); @@ -700,15 +715,16 @@ protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int $lhsPrece return $this->pPrefixOp(Expr\Throw_::class, 'throw ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Yield(Expr\Yield_ $node): string { + protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int $lhsPrecedence): string { 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) - . ')'; + if (!$this->phpVersion->supportsYieldWithoutParentheses()) { + return '(yield ' . $this->pKey($node->key) . $this->p($node->value) . ')'; + } + return $this->pPrefixOp( + Expr\Yield_::class, 'yield ' . $this->pKey($node->key), + $node->value, $precedence, $lhsPrecedence); } } diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 782a1bd23e..f3d1e83034 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -29,7 +29,7 @@ abstract class PrettyPrinterAbstract { protected const FIXUP_ENCAPSED = 8; // Encapsed string part protected const FIXUP_NEW = 9; // New/instanceof operand - private const MAX_PRECEDENCE = 1000; + protected const MAX_PRECEDENCE = 1000; /** @var array */ protected $precedenceMap = [ @@ -92,6 +92,7 @@ abstract class PrettyPrinterAbstract { AssignOp\Pow::class => [160, -1, -1], AssignOp\Coalesce::class => [160, -1, -1], Expr\YieldFrom::class => [170, -1, -1], + Expr\Yield_::class => [175, -1, -1], Expr\Print_::class => [180, -1, -1], BinaryOp\LogicalAnd::class => [190, 191, 190], BinaryOp\LogicalXor::class => [200, 201, 200], @@ -372,7 +373,7 @@ protected function pPrefixOp(string $class, string $operatorString, Node $node, $opPrecedence = $this->precedenceMap[$class][0]; $prefix = ''; $suffix = ''; - if ($opPrecedence > $lhsPrecedence) { + if ($opPrecedence >= $lhsPrecedence) { $prefix = '('; $suffix = ')'; $lhsPrecedence = self::MAX_PRECEDENCE; @@ -395,7 +396,7 @@ protected function pPostfixOp(string $class, Node $node, string $operatorString, $opPrecedence = $this->precedenceMap[$class][0]; $prefix = ''; $suffix = ''; - if ($opPrecedence > $precedence) { + if ($opPrecedence >= $precedence) { $prefix = '('; $suffix = ')'; $lhsPrecedence = self::MAX_PRECEDENCE; @@ -1276,6 +1277,7 @@ protected function initializeFixupMap(): void { 'cond' => self::FIXUP_PREC_LEFT, 'else' => self::FIXUP_PREC_RIGHT, ], + Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], diff --git a/test/code/prettyPrinter/expr/parentheses.test b/test/code/prettyPrinter/expr/parentheses.test index 38cd5766a8..e707fd1016 100644 --- a/test/code/prettyPrinter/expr/parentheses.test +++ b/test/code/prettyPrinter/expr/parentheses.test @@ -54,6 +54,9 @@ $a . ($b = $c) . $d; ($a = $b and $c) + $d; $a ** ($b instanceof $c); ($a = $b) instanceof $c; +[$a and $b => $c]; +// TODO: This prints redundant parentheses +[include $a => $c]; ----- echo 'abc' . 'cde' . 'fgh'; echo 'abc' . ('cde' . 'fgh'); @@ -96,3 +99,6 @@ $a . ($b = $c) . $d; ($a = $b and $c) + $d; $a ** ($b instanceof $c); ($a = $b) instanceof $c; +[$a and $b => $c]; +// TODO: This prints redundant parentheses +[(include $a) => $c]; diff --git a/test/code/prettyPrinter/expr/yield.test b/test/code/prettyPrinter/expr/yield.test index b18fa4899e..204eef2741 100644 --- a/test/code/prettyPrinter/expr/yield.test +++ b/test/code/prettyPrinter/expr/yield.test @@ -8,38 +8,75 @@ function gen() yield $a; yield $a => $b; $a = yield; - $a = (yield $b); - $a = (yield $b => $c); + $a = yield $b; + $a = yield $b => $c; + yield from $a; + $a = yield from $b; + (yield $a) + $b; + (yield from $a) + $b; + [yield $a => $b]; + [(yield $a) => $b]; + [$a + (yield $b) => $c]; + yield yield $a => $b; + yield (yield $a) => $b; } -// TODO Get rid of parens for cases 2 and 3 ----- function gen() { yield; - (yield $a); - (yield $a => $b); + yield $a; + yield $a => $b; $a = yield; - $a = (yield $b); - $a = (yield $b => $c); + $a = yield $b; + $a = yield $b => $c; + yield from $a; + $a = yield from $b; + (yield $a) + $b; + (yield from $a) + $b; + [yield $a => $b]; + [(yield $a) => $b]; + [$a + (yield $b) => $c]; + yield yield $a => $b; + yield (yield $a) => $b; } -// TODO Get rid of parens for cases 2 and 3 ----- $b; + $a = yield; $a = yield $b; $a = yield $b => $c; yield from $a; $a = yield from $b; + (yield $a) + $b; + (yield from $a) + $b; + [yield $a => $b]; + [(yield $a) => $b]; + [$a + (yield $b) => $c]; + yield yield $a => $b; + yield (yield $a) => $b; } -// TODO Get rid of parens for last case ----- +!!version=5.6 function gen() { + yield; + (yield $a); + (yield $a => $b); + $a = yield; $a = (yield $b); $a = (yield $b => $c); yield from $a; $a = yield from $b; + (yield $a) + $b; + (yield from $a) + $b; + [(yield $a => $b)]; + [(yield $a) => $b]; + [$a + (yield $b) => $c]; + (yield (yield $a => $b)); + (yield (yield $a) => $b); } -// TODO Get rid of parens for last case From 68eb1ca9c1928a9b0f54f985d630b6154ede2fc4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 26 Feb 2023 23:02:31 +0100 Subject: [PATCH 214/428] Add fuzzing target --- tools/fuzzing/generateCorpus.php | 35 +++++++++++ tools/fuzzing/php.dict | 89 ++++++++++++++++++++++++++ tools/fuzzing/target.php | 104 +++++++++++++++++++++++++++++++ 3 files changed, 228 insertions(+) create mode 100644 tools/fuzzing/generateCorpus.php create mode 100644 tools/fuzzing/php.dict create mode 100644 tools/fuzzing/target.php diff --git a/tools/fuzzing/generateCorpus.php b/tools/fuzzing/generateCorpus.php new file mode 100644 index 0000000000..f359832201 --- /dev/null +++ b/tools/fuzzing/generateCorpus.php @@ -0,0 +1,35 @@ + $code) { + if (false !== strpos($code, '@@{')) { + // Skip tests with evaluate segments + continue; + } + + list($_name, $tests) = $testParser->parseTest($code, 2); + foreach ($tests as list($_modeLine, list($input, $_expected))) { + $path = $corpusDir . '/' . md5($input) . '.txt'; + file_put_contents($path, $input); + } + } +} diff --git a/tools/fuzzing/php.dict b/tools/fuzzing/php.dict new file mode 100644 index 0000000000..e0889f98c1 --- /dev/null +++ b/tools/fuzzing/php.dict @@ -0,0 +1,89 @@ +"" +"__class__" +"__dir__" +"__file__" +"__function__" +"__halt_compiler" +"__line__" +"__method__" +"__namespace__" +"__trait__" +"abstract" +"array" +"as" +"binary" +"bool" +"boolean" +"break" +"callable" +"case" +"catch" +"class" +"clone" +"const" +"continue" +"declare" +"default" +"die" +"do" +"double" +"echo" +"else" +"elseif" +"empty" +"enddeclare" +"endfor" +"endforeach" +"endif" +"endswitch" +"endwhile" +"eval" +"exit" +"extends" +"final" +"finally" +"float" +"fn" +"for" +"foreach" +"function" +"global" +"goto" +"if" +"implements" +"include" +"include_once" +"instanceof" +"insteadof" +"int" +"integer" +"interface" +"isset" +"list" +"namespace" +"new" +"object" +"print" +"private" +"protected" +"public" +"readonly" +"real" +"require" +"require_once" +"return" +"static" +"string" +"switch" +"throw" +"trait" +"try" +"unset" +"unset" +"use" +"var" +"while" +"yield from" +"yield" diff --git a/tools/fuzzing/target.php b/tools/fuzzing/target.php new file mode 100644 index 0000000000..ece41c0872 --- /dev/null +++ b/tools/fuzzing/target.php @@ -0,0 +1,104 @@ +hasProblematicConstruct = false; + } + + public function leaveNode(PhpParser\Node $node) { + // We don't precisely preserve nop statements. + if ($node instanceof Stmt\Nop) { + return PhpParser\NodeTraverser::REMOVE_NODE; + } + + // We don't precisely preserve redundant trailing commas in array destructuring. + if ($node instanceof Expr\List_) { + while (!empty($node->items) && $node->items[count($node->items) - 1] === null) { + array_pop($node->items); + } + } + + // For T_NUM_STRING the parser produced negative integer literals. Convert these into + // a unary minus followed by a positive integer. + if ($node instanceof Scalar\Int_ && $node->value < 0) { + if ($node->value === \PHP_INT_MIN) { + // PHP_INT_MIN == -PHP_INT_MAX - 1 + return new Expr\BinaryOp\Minus( + new Expr\UnaryMinus(new Scalar\Int_(\PHP_INT_MAX)), + new Scalar\Int_(1)); + } + return new Expr\UnaryMinus(new Scalar\Int_(-$node->value)); + } + + // If a constant with the same name as a cast operand occurs inside parentheses, it will + // be parsed back as a cast. E.g. "foo(int)" will fail to parse, because the argument is + // interpreted as a cast. We can run into this with inputs like "foo(int\n)", where the + // newline is not preserved. + if ($node instanceof Expr\ConstFetch && $node->name->isUnqualified() && + in_array($node->name->toLowerString(), self::CAST_NAMES) + ) { + $this->hasProblematicConstruct = true; + } + } +}; +$traverser = new PhpParser\NodeTraverser(); +$traverser->addVisitor($visitor); + +$fuzzer->setTarget(function(string $input) use($parser, $prettyPrinter, $nodeDumper, $visitor, $traverser) { + $stmts = $parser->parse($input); + $printed = $prettyPrinter->prettyPrintFile($stmts); + + $stmts = $traverser->traverse($stmts); + if ($visitor->hasProblematicConstruct) { + return; + } + + try { + $printedStmts = $parser->parse($printed); + } catch (PhpParser\Error $e) { + throw new Error("Failed to parse pretty printer output"); + } + + $printedStmts = $traverser->traverse($printedStmts); + $same = $nodeDumper->dump($stmts) == $nodeDumper->dump($printedStmts); + if (!$same && !preg_match('/<\?php<\?php/i', $input)) { + throw new Error("Result after pretty printing differs"); + } +}); + +$fuzzer->setMaxLen(1024); +$fuzzer->addDictionary(__DIR__ . '/php.dict'); From cc34c2450c50504b7b3aaa36dfd6276eb9be77d8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Feb 2023 19:00:33 +0100 Subject: [PATCH 215/428] Fix logic for new operand parentheses requirement We need to perform this check recursively. --- lib/PhpParser/PrettyPrinterAbstract.php | 18 ++++++++++++------ test/code/prettyPrinter/expr/newVariable.test | 6 ++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index f3d1e83034..067599ae24 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1156,12 +1156,18 @@ protected function staticDereferenceLhsRequiresParens(Node $node): bool { * @return bool Whether parentheses are required */ protected function newOperandRequiresParens(Node $node): bool { - return !($node instanceof Node\Name - || $node instanceof Expr\Variable - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\PropertyFetch - || $node instanceof Expr\NullsafePropertyFetch - || $node instanceof Expr\StaticPropertyFetch); + if ($node instanceof Node\Name || $node instanceof Expr\Variable) { + return false; + } + if ($node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || + $node instanceof Expr\NullsafePropertyFetch + ) { + return $this->newOperandRequiresParens($node->var); + } + if ($node instanceof Expr\StaticPropertyFetch) { + return $this->newOperandRequiresParens($node->class); + } + return true; } /** diff --git a/test/code/prettyPrinter/expr/newVariable.test b/test/code/prettyPrinter/expr/newVariable.test index 366349c3dc..dae95d6854 100644 --- a/test/code/prettyPrinter/expr/newVariable.test +++ b/test/code/prettyPrinter/expr/newVariable.test @@ -5,6 +5,9 @@ new ('a' . 'b'); new (x); new (foo()); new ('foo'); +new (x[0]); +new (x->y); +new ((x)::$y); $x instanceof ('a' . 'b'); $x instanceof ($y++); ----- @@ -12,5 +15,8 @@ new ('a' . 'b')(); new (x)(); new (foo())(); new ('foo')(); +new (x[0])(); +new (x->y)(); +new ((x)::$y)(); $x instanceof ('a' . 'b'); $x instanceof ($y++); From fcd5934dae00beea10bb8a248463a3415223b49d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Feb 2023 19:07:44 +0100 Subject: [PATCH 216/428] Prevent merging of consecutive -/+ more thoroughly The unary -/+ or --/++ might not be the direct child. Instead determine this by actually printing the operand and checking whether it starts with -/+. --- lib/PhpParser/PrettyPrinter/Standard.php | 8 -------- lib/PhpParser/PrettyPrinterAbstract.php | 9 ++++++++- test/code/prettyPrinter/expr/parentheses.test | 4 ++++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 76cf870d7f..376ef4f437 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -428,18 +428,10 @@ protected function pExpr_BitwiseNot(Expr\BitwiseNot $node, int $precedence, int } protected function pExpr_UnaryMinus(Expr\UnaryMinus $node, int $precedence, int $lhsPrecedence): string { - if ($node->expr instanceof Expr\UnaryMinus || $node->expr instanceof Expr\PreDec) { - // Enforce -(-$expr) instead of --$expr - return '-(' . $this->p($node->expr) . ')'; - } return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr, $precedence, $lhsPrecedence); } protected function pExpr_UnaryPlus(Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence): string { - if ($node->expr instanceof Expr\UnaryPlus || $node->expr instanceof Expr\PreInc) { - // Enforce +(+$expr) instead of ++$expr - return '+(' . $this->p($node->expr) . ')'; - } return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr, $precedence, $lhsPrecedence); } diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 067599ae24..4ab38a0423 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -378,7 +378,14 @@ protected function pPrefixOp(string $class, string $operatorString, Node $node, $suffix = ')'; $lhsPrecedence = self::MAX_PRECEDENCE; } - return $prefix . $operatorString . $this->p($node, $opPrecedence, $lhsPrecedence) . $suffix; + $printedArg = $this->p($node, $opPrecedence, $lhsPrecedence); + if (($operatorString === '+' && $printedArg[0] === '+') || + ($operatorString === '-' && $printedArg[0] === '-') + ) { + // Avoid printing +(+$a) as ++$a and similar. + $printedArg = '(' . $printedArg . ')'; + } + return $prefix . $operatorString . $printedArg . $suffix; } /** diff --git a/test/code/prettyPrinter/expr/parentheses.test b/test/code/prettyPrinter/expr/parentheses.test index e707fd1016..6468949bf7 100644 --- a/test/code/prettyPrinter/expr/parentheses.test +++ b/test/code/prettyPrinter/expr/parentheses.test @@ -44,6 +44,8 @@ clone ($a + $b); +(+$a); -(--$a); +(++$a); +-(--$a)**$b; ++(++$a)**$b; !$a = $b; ++$a ** $b; @@ -90,6 +92,8 @@ clone ($a + $b); +(+$a); -(--$a); +(++$a); +-(--$a ** $b); ++(++$a ** $b); !$a = $b; ++$a ** $b; $a ** $b++; From 8e100f1e69958f01d5e4822d336e4b2c7c409f2e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Feb 2023 21:36:36 +0100 Subject: [PATCH 217/428] Handle another yield edge case match also uses =>, so we need to make sure that a trailing yield is wrapped in parentheses. --- lib/PhpParser/PrettyPrinter/Standard.php | 12 ++++++++++-- test/code/prettyPrinter/expr/yield.test | 12 ++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 376ef4f437..d5837bdeed 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -655,8 +655,16 @@ protected function pExpr_Match(Expr\Match_ $node): string { } protected function pMatchArm(Node\MatchArm $node): string { - return ($node->conds ? $this->pCommaSeparated($node->conds) : 'default') - . ' => ' . $this->p($node->body); + $result = ''; + if ($node->conds) { + for ($i = 0, $c = \count($node->conds); $i + 1 < $c; $i++) { + $result .= $this->p($node->conds[$i]) . ', '; + } + $result .= $this->pKey($node->conds[$i]); + } else { + $result = 'default => '; + } + return $result . $this->p($node->body); } protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $precedence, int $lhsPrecedence): string { diff --git a/test/code/prettyPrinter/expr/yield.test b/test/code/prettyPrinter/expr/yield.test index 204eef2741..8d7f4d00a6 100644 --- a/test/code/prettyPrinter/expr/yield.test +++ b/test/code/prettyPrinter/expr/yield.test @@ -19,6 +19,9 @@ function gen() [$a + (yield $b) => $c]; yield yield $a => $b; yield (yield $a) => $b; + match ($x) { + yield $a, (yield $b) => $c, + }; } ----- function gen() @@ -38,6 +41,9 @@ function gen() [$a + (yield $b) => $c]; yield yield $a => $b; yield (yield $a) => $b; + match ($x) { + yield $a, (yield $b) => $c, + }; } ----- $c]; yield yield $a => $b; yield (yield $a) => $b; + match ($x) { + yield $a, (yield $b) => $c, + }; } ----- !!version=5.6 @@ -79,4 +88,7 @@ function gen() [$a + (yield $b) => $c]; (yield (yield $a => $b)); (yield (yield $a) => $b); + match ($x) { + (yield $a), (yield $b) => $c, + }; } From 57d4a02659d92f77d75a00dbf7b924862e6f0f7f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 Feb 2023 22:00:49 +0100 Subject: [PATCH 218/428] Handle isolated \r in doc string Doc strings have a trailing \n and these will get interpreted as \r\n and removed from the string contents. For nowdoc, fall back to single quote if there's a trailing \r. For heredoc, escape all isolated \r -- unlike \n and \r\n this is really a special character, because this is no longer relevant as an actual newline character. --- lib/PhpParser/PrettyPrinter/Standard.php | 10 ++++++++-- test/PhpParser/PrettyPrinterTest.php | 4 ++++ test/code/prettyPrinter/expr/stringEscaping.test | 6 +++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index d5837bdeed..46a80dac0f 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -137,8 +137,11 @@ protected function pScalar_String(Scalar\String_ $node): string { return "<<<'$label'\n$label" . $this->docStringEndToken; } - return "<<<'$label'\n$node->value\n$label" - . $this->docStringEndToken; + // Make sure trailing \r is not combined with following \n into CRLF. + if ($node->value[strlen($node->value) - 1] !== "\r") { + return "<<<'$label'\n$node->value\n$label" + . $this->docStringEndToken; + } } /* break missing intentionally */ // no break @@ -1042,6 +1045,9 @@ protected function escapeString(string $string, ?string $quote): string { if (null === $quote) { // For doc strings, don't escape newlines $escaped = addcslashes($string, "\t\f\v$\\"); + // But do escape isolated \r. Combined with the terminating newline, it might get + // interpreted as \r\n and dropped from the string contents. + $escaped = preg_replace('/\r(?!\n)/', '\\r', $escaped); } else { $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\"); } diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 53da77dcf6..a2b68f4e2e 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -122,6 +122,10 @@ public function provideTestKindAttributes() { [new String_("", $nowdoc), "<<<'STR'\nSTR\n"], [new String_("", $heredoc), "<< Date: Mon, 27 Feb 2023 23:05:08 +0100 Subject: [PATCH 219/428] Detect another special case in fuzzer --- tools/fuzzing/target.php | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tools/fuzzing/target.php b/tools/fuzzing/target.php index ece41c0872..84626053c9 100644 --- a/tools/fuzzing/target.php +++ b/tools/fuzzing/target.php @@ -20,7 +20,10 @@ require $autoload; -$parser = new PhpParser\Parser\Php7(new PhpParser\Lexer); +$lexer = new PhpParser\Lexer([ + 'usedAttributes' => ['comments', 'startLine', 'endLine', 'startTokenPos'], +]); +$parser = new PhpParser\Parser\Php7($lexer); $prettyPrinter = new PhpParser\PrettyPrinter\Standard(); $nodeDumper = new PhpParser\NodeDumper(); $visitor = new class extends PhpParser\NodeVisitorAbstract { @@ -33,8 +36,14 @@ 'unset', ]; + + private $tokens; public $hasProblematicConstruct; + public function setTokens(array $tokens) { + $this->tokens = $tokens; + } + public function beforeTraverse(array $nodes) { $this->hasProblematicConstruct = false; } @@ -73,15 +82,25 @@ public function leaveNode(PhpParser\Node $node) { ) { $this->hasProblematicConstruct = true; } + + // The parser does not distinguish between use X and use \X, as they are semantically + // equivalent. However, use \keyword is legal PHP, while use keyword is not, so we inspect + // tokens to detect this situation here. + if ($node instanceof Stmt\Use_ && $node->uses[0]->name->isUnqualified() && + $this->tokens[$node->uses[0]->name->getStartTokenPos()]->is(\T_NAME_FULLY_QUALIFIED) + ) { + $this->hasProblematicConstruct = true; + } } }; $traverser = new PhpParser\NodeTraverser(); $traverser->addVisitor($visitor); -$fuzzer->setTarget(function(string $input) use($parser, $prettyPrinter, $nodeDumper, $visitor, $traverser) { +$fuzzer->setTarget(function(string $input) use($lexer, $parser, $prettyPrinter, $nodeDumper, $visitor, $traverser) { $stmts = $parser->parse($input); $printed = $prettyPrinter->prettyPrintFile($stmts); + $visitor->setTokens($lexer->getTokens()); $stmts = $traverser->traverse($stmts); if ($visitor->hasProblematicConstruct) { return; @@ -93,6 +112,7 @@ public function leaveNode(PhpParser\Node $node) { throw new Error("Failed to parse pretty printer output"); } + $visitor->setTokens($lexer->getTokens()); $printedStmts = $traverser->traverse($printedStmts); $same = $nodeDumper->dump($stmts) == $nodeDumper->dump($printedStmts); if (!$same && !preg_match('/<\?php<\?php/i', $input)) { From 4c3e759a51c62f1aab45ef033854275453807ea5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 1 Mar 2023 20:56:03 +0100 Subject: [PATCH 220/428] Support parsing from stdin in php-parse Following the usual convention, read from stdin if the file name is "-". --- bin/php-parse | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/php-parse b/bin/php-parse index c0bd423afc..cdf9584c5f 100755 --- a/bin/php-parse +++ b/bin/php-parse @@ -40,7 +40,10 @@ $traverser = new PhpParser\NodeTraverser(); $traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver); foreach ($files as $file) { - if (strpos($file, ' Stdin:\n"); + } else if (strpos($file, ' Code $code\n"); } else { @@ -194,7 +197,7 @@ function parseArgs($args) { default: if (preg_match('/^--version=(.*)$/', $arg, $matches)) { $attributes['version'] = PhpParser\PhpVersion::fromString($matches[1]); - } elseif ($arg[0] === '-') { + } elseif ($arg[0] === '-' && \strlen($arg[0]) > 1) { showHelp("Invalid operation $arg."); } else { $files[] = $arg; From c62dda950748de64b0a19b1299a2d77283fc40d7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 1 Mar 2023 21:05:55 +0100 Subject: [PATCH 221/428] Strip trailing doc string newline before parsing escape sequences If the doc string ends on an escaped \r, it should not get eaten as the "last newline". --- lib/PhpParser/ParserAbstract.php | 2 +- test/code/parser/scalar/docString.test | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 8767e33397..f3e5eb2f10 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -823,10 +823,10 @@ protected function parseDocString( $part->value, $indentLen, $indentChar, $i === 0, $isLast, $part->getAttributes() ); - $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); if ($isLast) { $part->value = preg_replace('~(\r\n|\n|\r)\z~', '', $part->value); } + $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); if ('' === $part->value) { continue; } diff --git a/test/code/parser/scalar/docString.test b/test/code/parser/scalar/docString.test index 799b97f3b5..2caefdf854 100644 --- a/test/code/parser/scalar/docString.test +++ b/test/code/parser/scalar/docString.test @@ -28,6 +28,10 @@ b<< Date: Wed, 1 Mar 2023 21:25:02 +0100 Subject: [PATCH 222/428] Rename PrettyPrinterAbstract to PrettyPrinter --- lib/PhpParser/PrettyPrinter.php | 1647 ++++++++++++++++++++++ lib/PhpParser/PrettyPrinter/Standard.php | 4 +- lib/PhpParser/PrettyPrinterAbstract.php | 1643 +-------------------- test/PhpParser/CompatibilityTest.php | 2 + 4 files changed, 1652 insertions(+), 1644 deletions(-) create mode 100644 lib/PhpParser/PrettyPrinter.php diff --git a/lib/PhpParser/PrettyPrinter.php b/lib/PhpParser/PrettyPrinter.php new file mode 100644 index 0000000000..96605b7ea3 --- /dev/null +++ b/lib/PhpParser/PrettyPrinter.php @@ -0,0 +1,1647 @@ + */ + protected $precedenceMap = [ + // [precedence, precedenceLHS, precedenceRHS] + // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, + // where 1 is added to one of the sides depending on associativity. This information is not + // used for unary operators and set to -1. + Expr\Clone_::class => [-10, 0, 1], + BinaryOp\Pow::class => [ 0, 0, 1], + Expr\BitwiseNot::class => [ 10, -1, -1], + Expr\UnaryPlus::class => [ 10, -1, -1], + Expr\UnaryMinus::class => [ 10, -1, -1], + Cast\Int_::class => [ 10, -1, -1], + Cast\Double::class => [ 10, -1, -1], + Cast\String_::class => [ 10, -1, -1], + Cast\Array_::class => [ 10, -1, -1], + Cast\Object_::class => [ 10, -1, -1], + Cast\Bool_::class => [ 10, -1, -1], + Cast\Unset_::class => [ 10, -1, -1], + Expr\ErrorSuppress::class => [ 10, -1, -1], + Expr\Instanceof_::class => [ 20, -1, -1], + Expr\BooleanNot::class => [ 30, -1, -1], + BinaryOp\Mul::class => [ 40, 41, 40], + BinaryOp\Div::class => [ 40, 41, 40], + BinaryOp\Mod::class => [ 40, 41, 40], + BinaryOp\Plus::class => [ 50, 51, 50], + BinaryOp\Minus::class => [ 50, 51, 50], + BinaryOp\Concat::class => [ 50, 51, 50], + BinaryOp\ShiftLeft::class => [ 60, 61, 60], + BinaryOp\ShiftRight::class => [ 60, 61, 60], + BinaryOp\Smaller::class => [ 70, 70, 70], + BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], + BinaryOp\Greater::class => [ 70, 70, 70], + BinaryOp\GreaterOrEqual::class => [ 70, 70, 70], + BinaryOp\Equal::class => [ 80, 80, 80], + BinaryOp\NotEqual::class => [ 80, 80, 80], + BinaryOp\Identical::class => [ 80, 80, 80], + BinaryOp\NotIdentical::class => [ 80, 80, 80], + BinaryOp\Spaceship::class => [ 80, 80, 80], + BinaryOp\BitwiseAnd::class => [ 90, 91, 90], + BinaryOp\BitwiseXor::class => [100, 101, 100], + BinaryOp\BitwiseOr::class => [110, 111, 110], + BinaryOp\BooleanAnd::class => [120, 121, 120], + BinaryOp\BooleanOr::class => [130, 131, 130], + BinaryOp\Coalesce::class => [140, 140, 141], + Expr\Ternary::class => [150, -1, -1], + Expr\Assign::class => [160, -1, -1], + Expr\AssignRef::class => [160, -1, -1], + AssignOp\Plus::class => [160, -1, -1], + AssignOp\Minus::class => [160, -1, -1], + AssignOp\Mul::class => [160, -1, -1], + AssignOp\Div::class => [160, -1, -1], + AssignOp\Concat::class => [160, -1, -1], + AssignOp\Mod::class => [160, -1, -1], + AssignOp\BitwiseAnd::class => [160, -1, -1], + AssignOp\BitwiseOr::class => [160, -1, -1], + AssignOp\BitwiseXor::class => [160, -1, -1], + AssignOp\ShiftLeft::class => [160, -1, -1], + AssignOp\ShiftRight::class => [160, -1, -1], + AssignOp\Pow::class => [160, -1, -1], + AssignOp\Coalesce::class => [160, -1, -1], + Expr\YieldFrom::class => [170, -1, -1], + Expr\Yield_::class => [175, -1, -1], + Expr\Print_::class => [180, -1, -1], + BinaryOp\LogicalAnd::class => [190, 191, 190], + BinaryOp\LogicalXor::class => [200, 201, 200], + BinaryOp\LogicalOr::class => [210, 211, 210], + Expr\Include_::class => [220, -1, -1], + Expr\ArrowFunction::class => [230, -1, -1], + Expr\Throw_::class => [240, -1, -1], + ]; + + /** @var int Current indentation level. */ + protected $indentLevel; + /** @var string Newline including current indentation. */ + protected $nl; + /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. + * Null if flexible doc strings are used. */ + protected $docStringEndToken; + /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ + protected $canUseSemicolonNamespaces; + /** @var bool Whether to use short array syntax if the node specifies no preference */ + protected $shortArraySyntax; + /** @var PhpVersion PHP version to target */ + protected $phpVersion; + + /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ + protected $origTokens; + /** @var Internal\Differ|null Differ for node lists */ + protected $nodeListDiffer; + /** @var array Map determining whether a certain character is a label character */ + protected $labelCharMap; + /** + * @var array> Map from token classes and subnode names to FIXUP_* constants. + * This is used during format-preserving prints to place additional parens/braces if necessary. + */ + protected $fixupMap; + /** + * @var array Map from "{$node->getType()}->{$subNode}" + * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped + * when removing this node. + */ + protected $removalMap; + /** + * @var array Map from + * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. + * $find is an optional token after which the insertion occurs. $extraLeft/Right + * are optionally added before/after the main insertions. + */ + protected $insertionMap; + /** + * @var array Map From "{$class}->{$subNode}" to string that should be inserted + * between elements of this list subnode. + */ + protected $listInsertionMap; + + /** + * @var array + */ + protected $emptyListInsertionMap; + /** @var array Map from "{$class}->{$subNode}" to [$printFn, $token] + * where $printFn is the function to print the modifiers and $token is the token before which + * the modifiers should be reprinted. */ + protected $modifierChangeMap; + + /** + * Creates a pretty printer instance using the given options. + * + * Supported options: + * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.0). This option + * controls compatibility of the generated code with older PHP + * versions in cases where a simple stylistic choice exists (e.g. + * array() vs []). It is safe to pretty-print an AST for a newer + * PHP version while specifying an older target (but the result will + * of course not be compatible with the older version in that case). + * * bool $shortArraySyntax: Whether to use [] instead of array() as the default array + * syntax, if the node does not specify a format. Defaults to whether + * the phpVersion support short array syntax. + * + * @param array{phpVersion?: PhpVersion, shortArraySyntax?: bool} $options Dictionary of formatting options + */ + public function __construct(array $options = []) { + $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 0); + $this->shortArraySyntax = + $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); + $this->docStringEndToken = + $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); + } + + /** + * Reset pretty printing state. + */ + protected function resetState(): void { + $this->indentLevel = 0; + $this->nl = "\n"; + $this->origTokens = null; + } + + /** + * Set indentation level + * + * @param int $level Level in number of spaces + */ + protected function setIndentLevel(int $level): void { + $this->indentLevel = $level; + $this->nl = "\n" . \str_repeat(' ', $level); + } + + /** + * Increase indentation level. + */ + protected function indent(): void { + $this->indentLevel += 4; + $this->nl .= ' '; + } + + /** + * Decrease indentation level. + */ + protected function outdent(): void { + assert($this->indentLevel >= 4); + $this->indentLevel -= 4; + $this->nl = "\n" . str_repeat(' ', $this->indentLevel); + } + + /** + * Pretty prints an array of statements. + * + * @param Node[] $stmts Array of statements + * + * @return string Pretty printed statements + */ + public function prettyPrint(array $stmts): string { + $this->resetState(); + $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): string { + $this->resetState(); + return $this->handleMagicTokens($this->p($node)); + } + + /** + * Pretty prints a file of statements (includes the opening 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): void { + /* 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; + break; + } + } + } + + /** + * Handles (and removes) no-indent and doc-string-end tokens. + * + * @param string $str + * @return string + */ + protected function handleMagicTokens(string $str): string { + if ($this->docStringEndToken !== null) { + // 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, bool $indent = true): string { + if ($indent) { + $this->indent(); + } + + $result = ''; + foreach ($nodes as $node) { + $comments = $node->getComments(); + if ($comments) { + $result .= $this->nl . $this->pComments($comments); + if ($node instanceof Stmt\Nop) { + continue; + } + } + + $result .= $this->nl . $this->p($node); + } + + if ($indent) { + $this->outdent(); + } + + return $result; + } + + /** + * Pretty-print an infix operation while taking precedence into account. + * + * @param string $class Node class of operator + * @param Node $leftNode Left-hand side node + * @param string $operatorString String representation of the operator + * @param Node $rightNode Right-hand side node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * + * @return string Pretty printed infix operation + */ + protected function pInfixOp( + string $class, Node $leftNode, string $operatorString, Node $rightNode, + int $precedence, int $lhsPrecedence + ): string { + list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) + . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; + } + + /** + * Pretty-print a prefix operation while taking precedence into account. + * + * @param string $class Node class of operator + * @param string $operatorString String representation of the operator + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * + * @return string Pretty printed prefix operation + */ + protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $lhsPrecedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + $printedArg = $this->p($node, $opPrecedence, $lhsPrecedence); + if (($operatorString === '+' && $printedArg[0] === '+') || + ($operatorString === '-' && $printedArg[0] === '-') + ) { + // Avoid printing +(+$a) as ++$a and similar. + $printedArg = '(' . $printedArg . ')'; + } + return $prefix . $operatorString . $printedArg . $suffix; + } + + /** + * Pretty-print a postfix operation while taking precedence into account. + * + * @param string $class Node class of operator + * @param string $operatorString String representation of the operator + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * + * @return string Pretty printed postfix operation + */ + protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + if ($opPrecedence < $lhsPrecedence) { + $lhsPrecedence = $opPrecedence; + } + return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix; + } + + /** + * 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> $pre + */ + protected function pImplode(array $nodes, string $glue = ''): string { + $pNodes = []; + 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): string { + return $this->pImplode($nodes, ', '); + } + + /** + * Pretty prints a comma-separated list of nodes in multiline style, including comments. + * + * The result includes a leading newline and one level of indentation (same as pStmts). + * + * @param Node[] $nodes Array of Nodes to be printed + * @param bool $trailingComma Whether to use a trailing comma + * + * @return string Comma separated pretty printed nodes in multiline style + */ + protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string { + $this->indent(); + + $result = ''; + $lastIdx = count($nodes) - 1; + foreach ($nodes as $idx => $node) { + if ($node !== null) { + $comments = $node->getComments(); + if ($comments) { + $result .= $this->nl . $this->pComments($comments); + } + + $result .= $this->nl . $this->p($node); + } else { + $result .= $this->nl; + } + if ($trailingComma || $idx !== $lastIdx) { + $result .= ','; + } + } + + $this->outdent(); + return $result; + } + + /** + * Prints reformatted text of the passed comments. + * + * @param Comment[] $comments List of comments + * + * @return string Reformatted text of comments + */ + protected function pComments(array $comments): string { + $formattedComments = []; + + foreach ($comments as $comment) { + $formattedComments[] = str_replace("\n", $this->nl, $comment->getReformattedText()); + } + + return implode($this->nl, $formattedComments); + } + + /** + * Perform a format-preserving pretty print of an AST. + * + * The format preservation is best effort. For some changes to the AST the formatting will not + * be preserved (at least not locally). + * + * In order to use this method a number of prerequisites must be satisfied: + * * The startTokenPos and endTokenPos attributes in the lexer must be enabled. + * * The CloningVisitor must be run on the AST prior to modification. + * * The original tokens must be provided, using the getTokens() method on the lexer. + * + * @param Node[] $stmts Modified AST with links to original AST + * @param Node[] $origStmts Original AST with token offset information + * @param Token[] $origTokens Tokens of the original code + * + * @return string + */ + public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { + $this->initializeNodeListDiffer(); + $this->initializeLabelCharMap(); + $this->initializeFixupMap(); + $this->initializeRemovalMap(); + $this->initializeInsertionMap(); + $this->initializeListInsertionMap(); + $this->initializeEmptyListInsertionMap(); + $this->initializeModifierChangeMap(); + + $this->resetState(); + $this->origTokens = new TokenStream($origTokens); + + $this->preprocessNodes($stmts); + + $pos = 0; + $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); + if (null !== $result) { + $result .= $this->origTokens->getTokenCode($pos, count($origTokens) - 1, 0); + } else { + // Fallback + // TODO Add pStmts($stmts, false); + } + + return ltrim($this->handleMagicTokens($result)); + } + + protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); + } + + /** + * Pretty prints a node. + * + * This method also handles formatting preservation for nodes. + * + * @param Node $node Node to be pretty printed + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * @param bool $parentFormatPreserved Whether parent node has preserved formatting + * + * @return string Pretty printed node + */ + protected function p( + Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, + bool $parentFormatPreserved = false + ): string { + // No orig tokens means this is a normal pretty print without preservation of formatting + if (!$this->origTokens) { + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); + } + + /** @var Node|null $origNode */ + $origNode = $node->getAttribute('origNode'); + if (null === $origNode) { + return $this->pFallback($node, $precedence, $lhsPrecedence); + } + + $class = \get_class($node); + \assert($class === \get_class($origNode)); + + $startPos = $origNode->getStartTokenPos(); + $endPos = $origNode->getEndTokenPos(); + \assert($startPos >= 0 && $endPos >= 0); + + $fallbackNode = $node; + if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { + // Normalize node structure of anonymous classes + assert($origNode instanceof Expr\New_); + $node = PrintableNewAnonClassNode::fromNewNode($node); + $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); + $class = PrintableNewAnonClassNode::class; + } + + // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting + // is not preserved, then we need to use the fallback code to make sure the tags are + // printed. + if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); + + $type = $node->getType(); + $fixupInfo = $this->fixupMap[$class] ?? null; + + $result = ''; + $pos = $startPos; + foreach ($node->getSubNodeNames() as $subNodeName) { + $subNode = $node->$subNodeName; + $origSubNode = $origNode->$subNodeName; + + if ((!$subNode instanceof Node && $subNode !== null) + || (!$origSubNode instanceof Node && $origSubNode !== null) + ) { + if ($subNode === $origSubNode) { + // Unchanged, can reuse old code + continue; + } + + if (is_array($subNode) && is_array($origSubNode)) { + // Array subnode changed, we might be able to reconstruct it + $listResult = $this->pArray( + $subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, + $fixupInfo[$subNodeName] ?? null + ); + if (null === $listResult) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + $result .= $listResult; + continue; + } + + // Check if this is a modifier change + $key = $class . '->' . $subNodeName; + if (!isset($this->modifierChangeMap[$key])) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + [$printFn, $findToken] = $this->modifierChangeMap[$key]; + $result .= $this->$printFn($subNode); + $pos = $this->origTokens->findRight($pos, $findToken); + continue; + } + + $extraLeft = ''; + $extraRight = ''; + if ($origSubNode !== null) { + $subStartPos = $origSubNode->getStartTokenPos(); + $subEndPos = $origSubNode->getEndTokenPos(); + \assert($subStartPos >= 0 && $subEndPos >= 0); + } else { + if ($subNode === null) { + // Both null, nothing to do + continue; + } + + // A node has been inserted, check if we have insertion information for it + $key = $type . '->' . $subNodeName; + if (!isset($this->insertionMap[$key])) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; + if (null !== $findToken) { + $subStartPos = $this->origTokens->findRight($pos, $findToken) + + (int) !$beforeToken; + } else { + $subStartPos = $pos; + } + + if (null === $extraLeft && null !== $extraRight) { + // If inserting on the right only, skipping whitespace looks better + $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos); + } + $subEndPos = $subStartPos - 1; + } + + if (null === $subNode) { + // A node has been removed, check if we have removal information for it + $key = $type . '->' . $subNodeName; + if (!isset($this->removalMap[$key])) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + // Adjust positions to account for additional tokens that must be skipped + $removalInfo = $this->removalMap[$key]; + if (isset($removalInfo['left'])) { + $subStartPos = $this->origTokens->skipLeft($subStartPos - 1, $removalInfo['left']) + 1; + } + if (isset($removalInfo['right'])) { + $subEndPos = $this->origTokens->skipRight($subEndPos + 1, $removalInfo['right']) - 1; + } + } + + $result .= $this->origTokens->getTokenCode($pos, $subStartPos, $indentAdjustment); + + if (null !== $subNode) { + $result .= $extraLeft; + + $origIndentLevel = $this->indentLevel; + $this->setIndentLevel($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment); + + // If it's the same node that was previously in this position, it certainly doesn't + // need fixup. It's important to check this here, because our fixup checks are more + // conservative than strictly necessary. + if (isset($fixupInfo[$subNodeName]) + && $subNode->getAttribute('origNode') !== $origSubNode + ) { + $fixup = $fixupInfo[$subNodeName]; + $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); + } else { + $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); + } + + $this->safeAppend($result, $res); + $this->setIndentLevel($origIndentLevel); + + $result .= $extraRight; + } + + $pos = $subEndPos + 1; + } + + $result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment); + return $result; + } + + /** + * Perform a format-preserving pretty print of an array. + * + * @param Node[] $nodes New nodes + * @param Node[] $origNodes Original nodes + * @param int $pos Current token position (updated by reference) + * @param int $indentAdjustment Adjustment for indentation + * @param string $parentNodeClass Class of the containing node. + * @param string $subNodeName Name of array subnode. + * @param null|int $fixup Fixup information for array item nodes + * + * @return null|string Result of pretty print or null if cannot preserve formatting + */ + protected function pArray( + array $nodes, array $origNodes, int &$pos, int $indentAdjustment, + string $parentNodeClass, string $subNodeName, ?int $fixup + ): ?string { + $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); + + $mapKey = $parentNodeClass . '->' . $subNodeName; + $insertStr = $this->listInsertionMap[$mapKey] ?? null; + $isStmtList = $subNodeName === 'stmts'; + + $beforeFirstKeepOrReplace = true; + $skipRemovedNode = false; + $delayedAdd = []; + $lastElemIndentLevel = $this->indentLevel; + + $insertNewline = false; + if ($insertStr === "\n") { + $insertStr = ''; + $insertNewline = true; + } + + if ($isStmtList && \count($origNodes) === 1 && \count($nodes) !== 1) { + $startPos = $origNodes[0]->getStartTokenPos(); + $endPos = $origNodes[0]->getEndTokenPos(); + \assert($startPos >= 0 && $endPos >= 0); + if (!$this->origTokens->haveBraces($startPos, $endPos)) { + // This was a single statement without braces, but either additional statements + // have been added, or the single statement has been removed. This requires the + // addition of braces. For now fall back. + // TODO: Try to preserve formatting + return null; + } + } + + $result = ''; + foreach ($diff as $i => $diffElem) { + $diffType = $diffElem->type; + /** @var Node|string|null $arrItem */ + $arrItem = $diffElem->new; + /** @var Node|string|null $origArrItem */ + $origArrItem = $diffElem->old; + + if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { + $beforeFirstKeepOrReplace = false; + + if ($origArrItem === null || $arrItem === null) { + // We can only handle the case where both are null + if ($origArrItem === $arrItem) { + continue; + } + return null; + } + + if (!$arrItem instanceof Node || !$origArrItem instanceof Node) { + // We can only deal with nodes. This can occur for Names, which use string arrays. + return null; + } + + $itemStartPos = $origArrItem->getStartTokenPos(); + $itemEndPos = $origArrItem->getEndTokenPos(); + \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos); + + $origIndentLevel = $this->indentLevel; + $lastElemIndentLevel = $this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment; + $this->setIndentLevel($lastElemIndentLevel); + + $comments = $arrItem->getComments(); + $origComments = $origArrItem->getComments(); + $commentStartPos = $origComments ? $origComments[0]->getStartTokenPos() : $itemStartPos; + \assert($commentStartPos >= 0); + + if ($commentStartPos < $pos) { + // Comments may be assigned to multiple nodes if they start at the same position. + // Make sure we don't try to print them multiple times. + $commentStartPos = $itemStartPos; + } + + if ($skipRemovedNode) { + if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || + $this->origTokens->haveTagInRange($pos, $itemStartPos))) { + // We'd remove the brace of a code block. + // TODO: Preserve formatting. + $this->setIndentLevel($origIndentLevel); + return null; + } + } else { + $result .= $this->origTokens->getTokenCode( + $pos, $commentStartPos, $indentAdjustment); + } + + if (!empty($delayedAdd)) { + /** @var Node $delayedAddNode */ + foreach ($delayedAdd as $delayedAddNode) { + if ($insertNewline) { + $delayedAddComments = $delayedAddNode->getComments(); + if ($delayedAddComments) { + $result .= $this->pComments($delayedAddComments) . $this->nl; + } + } + + $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true)); + + if ($insertNewline) { + $result .= $insertStr . $this->nl; + } else { + $result .= $insertStr; + } + } + + $delayedAdd = []; + } + + if ($comments !== $origComments) { + if ($comments) { + $result .= $this->pComments($comments) . $this->nl; + } + } else { + $result .= $this->origTokens->getTokenCode( + $commentStartPos, $itemStartPos, $indentAdjustment); + } + + // If we had to remove anything, we have done so now. + $skipRemovedNode = false; + } elseif ($diffType === DiffElem::TYPE_ADD) { + if (null === $insertStr) { + // We don't have insertion information for this list type + return null; + } + + if (!$arrItem instanceof Node) { + // We only support list insertion of nodes. + return null; + } + + // We go multiline if the original code was multiline, + // or if it's an array item with a comment above it. + // Match always uses multiline formatting. + if ($insertStr === ', ' && + ($this->isMultiline($origNodes) || $arrItem->getComments() || + $parentNodeClass === Expr\Match_::class) + ) { + $insertStr = ','; + $insertNewline = true; + } + + if ($beforeFirstKeepOrReplace) { + // Will be inserted at the next "replace" or "keep" element + $delayedAdd[] = $arrItem; + continue; + } + + $itemStartPos = $pos; + $itemEndPos = $pos - 1; + + $origIndentLevel = $this->indentLevel; + $this->setIndentLevel($lastElemIndentLevel); + + if ($insertNewline) { + $result .= $insertStr . $this->nl; + $comments = $arrItem->getComments(); + if ($comments) { + $result .= $this->pComments($comments) . $this->nl; + } + } else { + $result .= $insertStr; + } + } elseif ($diffType === DiffElem::TYPE_REMOVE) { + if (!$origArrItem instanceof Node) { + // We only support removal for nodes + return null; + } + + $itemStartPos = $origArrItem->getStartTokenPos(); + $itemEndPos = $origArrItem->getEndTokenPos(); + \assert($itemStartPos >= 0 && $itemEndPos >= 0); + + // Consider comments part of the node. + $origComments = $origArrItem->getComments(); + if ($origComments) { + $itemStartPos = $origComments[0]->getStartTokenPos(); + } + + if ($i === 0) { + // If we're removing from the start, keep the tokens before the node and drop those after it, + // instead of the other way around. + $result .= $this->origTokens->getTokenCode( + $pos, $itemStartPos, $indentAdjustment); + $skipRemovedNode = true; + } else { + if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || + $this->origTokens->haveTagInRange($pos, $itemStartPos))) { + // We'd remove the brace of a code block. + // TODO: Preserve formatting. + return null; + } + } + + $pos = $itemEndPos + 1; + continue; + } else { + throw new \Exception("Shouldn't happen"); + } + + if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { + $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); + } else { + $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); + } + $this->safeAppend($result, $res); + + $this->setIndentLevel($origIndentLevel); + $pos = $itemEndPos + 1; + } + + if ($skipRemovedNode) { + // TODO: Support removing single node. + return null; + } + + if (!empty($delayedAdd)) { + if (!isset($this->emptyListInsertionMap[$mapKey])) { + return null; + } + + list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey]; + if (null !== $findToken) { + $insertPos = $this->origTokens->findRight($pos, $findToken) + 1; + $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment); + $pos = $insertPos; + } + + $first = true; + $result .= $extraLeft; + foreach ($delayedAdd as $delayedAddNode) { + if (!$first) { + $result .= $insertStr; + if ($insertNewline) { + $result .= $this->nl; + } + } + $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); + $first = false; + } + $result .= $extraRight === "\n" ? $this->nl : $extraRight; + } + + return $result; + } + + /** + * Print node with fixups. + * + * Fixups here refer to the addition of extra parentheses, braces or other characters, that + * are required to preserve program semantics in a certain context (e.g. to maintain precedence + * or because only certain expressions are allowed in certain places). + * + * @param int $fixup Fixup type + * @param Node $subNode Subnode to print + * @param string|null $parentClass Class of parent node + * @param int $subStartPos Original start pos of subnode + * @param int $subEndPos Original end pos of subnode + * + * @return string Result of fixed-up print of subnode + */ + protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { + switch ($fixup) { + case self::FIXUP_PREC_LEFT: + // We use a conservative approximation where lhsPrecedence == precedence. + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][1]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_PREC_RIGHT: + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][2]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_PREC_UNARY: + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][0]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_CALL_LHS: + if ($this->callLhsRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos) + ) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_DEREF_LHS: + if ($this->dereferenceLhsRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos) + ) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_STATIC_DEREF_LHS: + if ($this->staticDereferenceLhsRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos) + ) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_NEW: + if ($this->newOperandRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_BRACED_NAME: + case self::FIXUP_VAR_BRACED_NAME: + if ($subNode instanceof Expr + && !$this->origTokens->haveBraces($subStartPos, $subEndPos) + ) { + return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '') + . '{' . $this->p($subNode) . '}'; + } + break; + case self::FIXUP_ENCAPSED: + if (!$subNode instanceof Node\InterpolatedStringPart + && !$this->origTokens->haveBraces($subStartPos, $subEndPos) + ) { + return '{' . $this->p($subNode) . '}'; + } + break; + default: + throw new \Exception('Cannot happen'); + } + + // Nothing special to do + return $this->p($subNode); + } + + /** + * Appends to a string, ensuring whitespace between label characters. + * + * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". + * Without safeAppend the result would be "echox", which does not preserve semantics. + * + * @param string $str + * @param string $append + */ + protected function safeAppend(string &$str, string $append): void { + if ($str === "") { + $str = $append; + return; + } + + if ($append === "") { + return; + } + + if (!$this->labelCharMap[$append[0]] + || !$this->labelCharMap[$str[\strlen($str) - 1]]) { + $str .= $append; + } else { + $str .= " " . $append; + } + } + + /** + * Determines whether the LHS of a call must be wrapped in parenthesis. + * + * @param Node $node LHS of a call + * + * @return bool Whether parentheses are required + */ + protected function callLhsRequiresParens(Node $node): bool { + return !($node instanceof Node\Name + || $node instanceof Expr\Variable + || $node instanceof Expr\ArrayDimFetch + || $node instanceof Expr\FuncCall + || $node instanceof Expr\MethodCall + || $node instanceof Expr\NullsafeMethodCall + || $node instanceof Expr\StaticCall + || $node instanceof Expr\Array_); + } + + /** + * Determines whether the LHS of an array/object operation must be wrapped in parentheses. + * + * @param Node $node LHS of dereferencing operation + * + * @return bool Whether parentheses are required + */ + protected function dereferenceLhsRequiresParens(Node $node): bool { + // A constant can occur on the LHS of an array/object deref, but not a static deref. + return $this->staticDereferenceLhsRequiresParens($node) + && !$node instanceof Expr\ConstFetch; + } + + /** + * Determines whether the LHS of a static operation must be wrapped in parentheses. + * + * @param Node $node LHS of dereferencing operation + * + * @return bool Whether parentheses are required + */ + protected function staticDereferenceLhsRequiresParens(Node $node): bool { + return !($node instanceof Expr\Variable + || $node instanceof Node\Name + || $node instanceof Expr\ArrayDimFetch + || $node instanceof Expr\PropertyFetch + || $node instanceof Expr\NullsafePropertyFetch + || $node instanceof Expr\StaticPropertyFetch + || $node instanceof Expr\FuncCall + || $node instanceof Expr\MethodCall + || $node instanceof Expr\NullsafeMethodCall + || $node instanceof Expr\StaticCall + || $node instanceof Expr\Array_ + || $node instanceof Scalar\String_ + || $node instanceof Expr\ClassConstFetch); + } + + /** + * Determines whether an expression used in "new" or "instanceof" requires parentheses. + * + * @param Node $node New or instanceof operand + * + * @return bool Whether parentheses are required + */ + protected function newOperandRequiresParens(Node $node): bool { + if ($node instanceof Node\Name || $node instanceof Expr\Variable) { + return false; + } + if ($node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || + $node instanceof Expr\NullsafePropertyFetch + ) { + return $this->newOperandRequiresParens($node->var); + } + if ($node instanceof Expr\StaticPropertyFetch) { + return $this->newOperandRequiresParens($node->class); + } + return true; + } + + /** + * Print modifiers, including trailing whitespace. + * + * @param int $modifiers Modifier mask to print + * + * @return string Printed modifiers + */ + protected function pModifiers(int $modifiers): string { + return ($modifiers & Modifiers::FINAL ? 'final ' : '') + . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') + . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') + . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') + . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') + . ($modifiers & Modifiers::STATIC ? 'static ' : '') + . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); + } + + protected function pStatic(bool $static): string { + return $static ? 'static ' : ''; + } + + /** + * Determine whether a list of nodes uses multiline formatting. + * + * @param (Node|null)[] $nodes Node list + * + * @return bool Whether multiline formatting is used + */ + protected function isMultiline(array $nodes): bool { + if (\count($nodes) < 2) { + return false; + } + + $pos = -1; + foreach ($nodes as $node) { + if (null === $node) { + continue; + } + + $endPos = $node->getEndTokenPos() + 1; + if ($pos >= 0) { + $text = $this->origTokens->getTokenCode($pos, $endPos, 0); + if (false === strpos($text, "\n")) { + // We require that a newline is present between *every* item. If the formatting + // is inconsistent, with only some items having newlines, we don't consider it + // as multiline + return false; + } + } + $pos = $endPos; + } + + return true; + } + + /** + * Lazily initializes label char map. + * + * The label char map determines whether a certain character may occur in a label. + */ + protected function initializeLabelCharMap(): void { + if ($this->labelCharMap) { + return; + } + + $this->labelCharMap = []; + for ($i = 0; $i < 256; $i++) { + // Since PHP 7.1 The lower range is 0x80. However, we also want to support code for + // older versions. + $chr = chr($i); + $this->labelCharMap[$chr] = $i >= 0x7f || ctype_alnum($chr); + } + } + + /** + * Lazily initializes node list differ. + * + * The node list differ is used to determine differences between two array subnodes. + */ + protected function initializeNodeListDiffer(): void { + if ($this->nodeListDiffer) { + return; + } + + $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { + if ($a instanceof Node && $b instanceof Node) { + return $a === $b->getAttribute('origNode'); + } + // Can happen for array destructuring + return $a === null && $b === null; + }); + } + + /** + * Lazily initializes fixup map. + * + * The fixup map is used to determine whether a certain subnode of a certain node may require + * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. + */ + protected function initializeFixupMap(): void { + if ($this->fixupMap) { + return; + } + + $this->fixupMap = [ + Expr\Instanceof_::class => [ + 'expr' => self::FIXUP_PREC_UNARY, + 'class' => self::FIXUP_NEW, + ], + Expr\Ternary::class => [ + 'cond' => self::FIXUP_PREC_LEFT, + 'else' => self::FIXUP_PREC_RIGHT, + ], + Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], + + Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], + Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], + Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], + Expr\ClassConstFetch::class => [ + 'class' => self::FIXUP_STATIC_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\New_::class => ['class' => self::FIXUP_NEW], + Expr\MethodCall::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\NullsafeMethodCall::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\StaticPropertyFetch::class => [ + 'class' => self::FIXUP_STATIC_DEREF_LHS, + 'name' => self::FIXUP_VAR_BRACED_NAME, + ], + Expr\PropertyFetch::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\NullsafePropertyFetch::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Scalar\InterpolatedString::class => [ + 'parts' => self::FIXUP_ENCAPSED, + ], + ]; + + $binaryOps = [ + BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class, + BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class, + BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class, + BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class, + BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class, + BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, + BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, + BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, + BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, + ]; + foreach ($binaryOps as $binaryOp) { + $this->fixupMap[$binaryOp] = [ + 'left' => self::FIXUP_PREC_LEFT, + 'right' => self::FIXUP_PREC_RIGHT + ]; + } + + $prefixOps = [ + Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, + Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, + Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, + Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, + Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, + AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, + AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, + AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, + Expr\ArrowFunction::class, Expr\Throw_::class, + ]; + foreach ($prefixOps as $prefixOp) { + $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; + } + } + + /** + * Lazily initializes the removal map. + * + * The removal map is used to determine which additional tokens should be removed when a + * certain node is replaced by null. + */ + protected function initializeRemovalMap(): void { + if ($this->removalMap) { + return; + } + + $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; + $stripLeft = ['left' => \T_WHITESPACE]; + $stripRight = ['right' => \T_WHITESPACE]; + $stripDoubleArrow = ['right' => \T_DOUBLE_ARROW]; + $stripColon = ['left' => ':']; + $stripEquals = ['left' => '=']; + $this->removalMap = [ + 'Expr_ArrayDimFetch->dim' => $stripBoth, + 'ArrayItem->key' => $stripDoubleArrow, + 'Expr_ArrowFunction->returnType' => $stripColon, + 'Expr_Closure->returnType' => $stripColon, + 'Expr_Exit->expr' => $stripBoth, + 'Expr_Ternary->if' => $stripBoth, + 'Expr_Yield->key' => $stripDoubleArrow, + 'Expr_Yield->value' => $stripBoth, + 'Param->type' => $stripRight, + 'Param->default' => $stripEquals, + 'Stmt_Break->num' => $stripBoth, + 'Stmt_Catch->var' => $stripLeft, + 'Stmt_ClassMethod->returnType' => $stripColon, + 'Stmt_Class->extends' => ['left' => \T_EXTENDS], + 'Stmt_Enum->scalarType' => $stripColon, + 'Stmt_EnumCase->expr' => $stripEquals, + 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], + 'Stmt_Continue->num' => $stripBoth, + 'Stmt_Foreach->keyVar' => $stripDoubleArrow, + 'Stmt_Function->returnType' => $stripColon, + 'Stmt_If->else' => $stripLeft, + 'Stmt_Namespace->name' => $stripLeft, + 'Stmt_Property->type' => $stripRight, + 'PropertyItem->default' => $stripEquals, + 'Stmt_Return->expr' => $stripBoth, + 'Stmt_StaticVar->default' => $stripEquals, + 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, + 'Stmt_TryCatch->finally' => $stripLeft, + // 'Stmt_Case->cond': Replace with "default" + // 'Stmt_Class->name': Unclear what to do + // 'Stmt_Declare->stmts': Not a plain node + // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a plain node + ]; + } + + protected function initializeInsertionMap(): void { + if ($this->insertionMap) { + return; + } + + // TODO: "yield" where both key and value are inserted doesn't work + // [$find, $beforeToken, $extraLeft, $extraRight] + $this->insertionMap = [ + 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], + 'ArrayItem->key' => [null, false, null, ' => '], + 'Expr_ArrowFunction->returnType' => [')', false, ': ', null], + 'Expr_Closure->returnType' => [')', false, ': ', null], + 'Expr_Ternary->if' => ['?', false, ' ', ' '], + 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], + 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], + 'Param->type' => [null, false, null, ' '], + 'Param->default' => [null, false, ' = ', null], + 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], + 'Stmt_Catch->var' => [null, false, ' ', null], + 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], + 'Stmt_Class->extends' => [null, false, ' extends ', null], + 'Stmt_Enum->scalarType' => [null, false, ' : ', null], + 'Stmt_EnumCase->expr' => [null, false, ' = ', null], + 'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', null], + 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], + 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], + 'Stmt_Function->returnType' => [')', false, ': ', null], + 'Stmt_If->else' => [null, false, ' ', null], + 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], + 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], + 'PropertyItem->default' => [null, false, ' = ', null], + 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], + 'Stmt_StaticVar->default' => [null, false, ' = ', null], + //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO + 'Stmt_TryCatch->finally' => [null, false, ' ', null], + + // 'Expr_Exit->expr': Complicated due to optional () + // 'Stmt_Case->cond': Conversion from default to case + // 'Stmt_Class->name': Unclear + // 'Stmt_Declare->stmts': Not a proper node + // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a proper node + ]; + } + + protected function initializeListInsertionMap(): void { + if ($this->listInsertionMap) { + return; + } + + $this->listInsertionMap = [ + // special + //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully + //'Scalar_InterpolatedString->parts' => '', + Stmt\Catch_::class . '->types' => '|', + UnionType::class . '->types' => '|', + IntersectionType::class . '->types' => '&', + Stmt\If_::class . '->elseifs' => ' ', + Stmt\TryCatch::class . '->catches' => ' ', + + // comma-separated lists + Expr\Array_::class . '->items' => ', ', + Expr\ArrowFunction::class . '->params' => ', ', + Expr\Closure::class . '->params' => ', ', + Expr\Closure::class . '->uses' => ', ', + Expr\FuncCall::class . '->args' => ', ', + Expr\Isset_::class . '->vars' => ', ', + Expr\List_::class . '->items' => ', ', + Expr\MethodCall::class . '->args' => ', ', + Expr\NullsafeMethodCall::class . '->args' => ', ', + Expr\New_::class . '->args' => ', ', + PrintableNewAnonClassNode::class . '->args' => ', ', + Expr\StaticCall::class . '->args' => ', ', + Stmt\ClassConst::class . '->consts' => ', ', + Stmt\ClassMethod::class . '->params' => ', ', + Stmt\Class_::class . '->implements' => ', ', + Stmt\Enum_::class . '->implements' => ', ', + PrintableNewAnonClassNode::class . '->implements' => ', ', + Stmt\Const_::class . '->consts' => ', ', + Stmt\Declare_::class . '->declares' => ', ', + Stmt\Echo_::class . '->exprs' => ', ', + Stmt\For_::class . '->init' => ', ', + Stmt\For_::class . '->cond' => ', ', + Stmt\For_::class . '->loop' => ', ', + Stmt\Function_::class . '->params' => ', ', + Stmt\Global_::class . '->vars' => ', ', + Stmt\GroupUse::class . '->uses' => ', ', + Stmt\Interface_::class . '->extends' => ', ', + Expr\Match_::class . '->arms' => ', ', + Stmt\Property::class . '->props' => ', ', + Stmt\StaticVar::class . '->vars' => ', ', + Stmt\TraitUse::class . '->traits' => ', ', + Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ', + Stmt\Unset_::class . '->vars' => ', ', + Stmt\UseUse::class . '->uses' => ', ', + MatchArm::class . '->conds' => ', ', + AttributeGroup::class . '->attrs' => ', ', + + // statement lists + Expr\Closure::class . '->stmts' => "\n", + Stmt\Case_::class . '->stmts' => "\n", + Stmt\Catch_::class . '->stmts' => "\n", + Stmt\Class_::class . '->stmts' => "\n", + Stmt\Enum_::class . '->stmts' => "\n", + PrintableNewAnonClassNode::class . '->stmts' => "\n", + Stmt\Interface_::class . '->stmts' => "\n", + Stmt\Trait_::class . '->stmts' => "\n", + Stmt\ClassMethod::class . '->stmts' => "\n", + Stmt\Declare_::class . '->stmts' => "\n", + Stmt\Do_::class . '->stmts' => "\n", + Stmt\ElseIf_::class . '->stmts' => "\n", + Stmt\Else_::class . '->stmts' => "\n", + Stmt\Finally_::class . '->stmts' => "\n", + Stmt\Foreach_::class . '->stmts' => "\n", + Stmt\For_::class . '->stmts' => "\n", + Stmt\Function_::class . '->stmts' => "\n", + Stmt\If_::class . '->stmts' => "\n", + Stmt\Namespace_::class . '->stmts' => "\n", + + // Attribute groups + Stmt\Class_::class . '->attrGroups' => "\n", + Stmt\Enum_::class . '->attrGroups' => "\n", + Stmt\EnumCase::class . '->attrGroups' => "\n", + Stmt\Interface_::class . '->attrGroups' => "\n", + Stmt\Trait_::class . '->attrGroups' => "\n", + Stmt\Function_::class . '->attrGroups' => "\n", + Stmt\ClassMethod::class . '->attrGroups' => "\n", + Stmt\ClassConst::class . '->attrGroups' => "\n", + Stmt\Property::class . '->attrGroups' => "\n", + PrintableNewAnonClassNode::class . '->attrGroups' => ' ', + Expr\Closure::class . '->attrGroups' => ' ', + Expr\ArrowFunction::class . '->attrGroups' => ' ', + Param::class . '->attrGroups' => ' ', + Stmt\Switch_::class . '->cases' => "\n", + Stmt\TraitUse::class . '->adaptations' => "\n", + Stmt\TryCatch::class . '->stmts' => "\n", + Stmt\While_::class . '->stmts' => "\n", + + // dummy for top-level context + 'File->stmts' => "\n", + ]; + } + + protected function initializeEmptyListInsertionMap(): void { + if ($this->emptyListInsertionMap) { + return; + } + + // TODO Insertion into empty statement lists. + + // [$find, $extraLeft, $extraRight] + $this->emptyListInsertionMap = [ + Expr\ArrowFunction::class . '->params' => ['(', '', ''], + Expr\Closure::class . '->uses' => [')', ' use (', ')'], + Expr\Closure::class . '->params' => ['(', '', ''], + Expr\FuncCall::class . '->args' => ['(', '', ''], + Expr\MethodCall::class . '->args' => ['(', '', ''], + Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], + Expr\New_::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], + Expr\StaticCall::class . '->args' => ['(', '', ''], + Stmt\Class_::class . '->implements' => [null, ' implements ', ''], + Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], + Stmt\ClassMethod::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], + Stmt\Function_::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], + Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Property::class . '->attrGroups' => [null, '', "\n"], + Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], + Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], + Expr\Closure::class . '->attrGroups' => [null, '', ' '], + PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], + + /* These cannot be empty to start with: + * Expr_Isset->vars + * Stmt_Catch->types + * Stmt_Const->consts + * Stmt_ClassConst->consts + * Stmt_Declare->declares + * Stmt_Echo->exprs + * Stmt_Global->vars + * Stmt_GroupUse->uses + * Stmt_Property->props + * Stmt_StaticVar->vars + * Stmt_TraitUse->traits + * Stmt_TraitUseAdaptation_Precedence->insteadof + * Stmt_Unset->vars + * Stmt_Use->uses + * UnionType->types + */ + + /* TODO + * Stmt_If->elseifs + * Stmt_TryCatch->catches + * Expr_Array->items + * Expr_List->items + * Stmt_For->init + * Stmt_For->cond + * Stmt_For->loop + */ + ]; + } + + protected function initializeModifierChangeMap(): void { + if ($this->modifierChangeMap) { + return; + } + + $this->modifierChangeMap = [ + Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST], + Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], + Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], + Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], + Param::class . '->flags' => ['pModifiers', \T_VARIABLE], + Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], + Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], + //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO + ]; + + // List of integer subnodes that are not modifiers: + // Expr_Include->type + // Stmt_GroupUse->type + // Stmt_Use->type + // UseItem->type + } +} + +// @deprecated compatibility alias +class_alias(PrettyPrinter::class, PrettyPrinterAbstract::class); diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 46a80dac0f..f8d0f31d56 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -11,9 +11,9 @@ use PhpParser\Node\Scalar; use PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Stmt; -use PhpParser\PrettyPrinterAbstract; +use PhpParser\PrettyPrinter; -class Standard extends PrettyPrinterAbstract { +class Standard extends PrettyPrinter { // Special nodes protected function pParam(Node\Param $node): string { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 4ab38a0423..4116e457fb 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1,1644 +1,3 @@ */ - protected $precedenceMap = [ - // [precedence, precedenceLHS, precedenceRHS] - // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, - // where 1 is added to one of the sides depending on associativity. This information is not - // used for unary operators and set to -1. - Expr\Clone_::class => [-10, 0, 1], - BinaryOp\Pow::class => [ 0, 0, 1], - Expr\BitwiseNot::class => [ 10, -1, -1], - Expr\UnaryPlus::class => [ 10, -1, -1], - Expr\UnaryMinus::class => [ 10, -1, -1], - Cast\Int_::class => [ 10, -1, -1], - Cast\Double::class => [ 10, -1, -1], - Cast\String_::class => [ 10, -1, -1], - Cast\Array_::class => [ 10, -1, -1], - Cast\Object_::class => [ 10, -1, -1], - Cast\Bool_::class => [ 10, -1, -1], - Cast\Unset_::class => [ 10, -1, -1], - Expr\ErrorSuppress::class => [ 10, -1, -1], - Expr\Instanceof_::class => [ 20, -1, -1], - Expr\BooleanNot::class => [ 30, -1, -1], - BinaryOp\Mul::class => [ 40, 41, 40], - BinaryOp\Div::class => [ 40, 41, 40], - BinaryOp\Mod::class => [ 40, 41, 40], - BinaryOp\Plus::class => [ 50, 51, 50], - BinaryOp\Minus::class => [ 50, 51, 50], - BinaryOp\Concat::class => [ 50, 51, 50], - BinaryOp\ShiftLeft::class => [ 60, 61, 60], - BinaryOp\ShiftRight::class => [ 60, 61, 60], - BinaryOp\Smaller::class => [ 70, 70, 70], - BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], - BinaryOp\Greater::class => [ 70, 70, 70], - BinaryOp\GreaterOrEqual::class => [ 70, 70, 70], - BinaryOp\Equal::class => [ 80, 80, 80], - BinaryOp\NotEqual::class => [ 80, 80, 80], - BinaryOp\Identical::class => [ 80, 80, 80], - BinaryOp\NotIdentical::class => [ 80, 80, 80], - BinaryOp\Spaceship::class => [ 80, 80, 80], - BinaryOp\BitwiseAnd::class => [ 90, 91, 90], - BinaryOp\BitwiseXor::class => [100, 101, 100], - BinaryOp\BitwiseOr::class => [110, 111, 110], - BinaryOp\BooleanAnd::class => [120, 121, 120], - BinaryOp\BooleanOr::class => [130, 131, 130], - BinaryOp\Coalesce::class => [140, 140, 141], - Expr\Ternary::class => [150, -1, -1], - Expr\Assign::class => [160, -1, -1], - Expr\AssignRef::class => [160, -1, -1], - AssignOp\Plus::class => [160, -1, -1], - AssignOp\Minus::class => [160, -1, -1], - AssignOp\Mul::class => [160, -1, -1], - AssignOp\Div::class => [160, -1, -1], - AssignOp\Concat::class => [160, -1, -1], - AssignOp\Mod::class => [160, -1, -1], - AssignOp\BitwiseAnd::class => [160, -1, -1], - AssignOp\BitwiseOr::class => [160, -1, -1], - AssignOp\BitwiseXor::class => [160, -1, -1], - AssignOp\ShiftLeft::class => [160, -1, -1], - AssignOp\ShiftRight::class => [160, -1, -1], - AssignOp\Pow::class => [160, -1, -1], - AssignOp\Coalesce::class => [160, -1, -1], - Expr\YieldFrom::class => [170, -1, -1], - Expr\Yield_::class => [175, -1, -1], - Expr\Print_::class => [180, -1, -1], - BinaryOp\LogicalAnd::class => [190, 191, 190], - BinaryOp\LogicalXor::class => [200, 201, 200], - BinaryOp\LogicalOr::class => [210, 211, 210], - Expr\Include_::class => [220, -1, -1], - Expr\ArrowFunction::class => [230, -1, -1], - Expr\Throw_::class => [240, -1, -1], - ]; - - /** @var int Current indentation level. */ - protected $indentLevel; - /** @var string Newline including current indentation. */ - protected $nl; - /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. - * Null if flexible doc strings are used. */ - protected $docStringEndToken; - /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ - protected $canUseSemicolonNamespaces; - /** @var bool Whether to use short array syntax if the node specifies no preference */ - protected $shortArraySyntax; - /** @var PhpVersion PHP version to target */ - protected $phpVersion; - - /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ - protected $origTokens; - /** @var Internal\Differ|null Differ for node lists */ - protected $nodeListDiffer; - /** @var array Map determining whether a certain character is a label character */ - protected $labelCharMap; - /** - * @var array> Map from token classes and subnode names to FIXUP_* constants. - * This is used during format-preserving prints to place additional parens/braces if necessary. - */ - protected $fixupMap; - /** - * @var array Map from "{$node->getType()}->{$subNode}" - * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped - * when removing this node. - */ - protected $removalMap; - /** - * @var array Map from - * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. - * $find is an optional token after which the insertion occurs. $extraLeft/Right - * are optionally added before/after the main insertions. - */ - protected $insertionMap; - /** - * @var array Map From "{$class}->{$subNode}" to string that should be inserted - * between elements of this list subnode. - */ - protected $listInsertionMap; - - /** - * @var array - */ - protected $emptyListInsertionMap; - /** @var array Map from "{$class}->{$subNode}" to [$printFn, $token] - * where $printFn is the function to print the modifiers and $token is the token before which - * the modifiers should be reprinted. */ - protected $modifierChangeMap; - - /** - * Creates a pretty printer instance using the given options. - * - * Supported options: - * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.0). This option - * controls compatibility of the generated code with older PHP - * versions in cases where a simple stylistic choice exists (e.g. - * array() vs []). It is safe to pretty-print an AST for a newer - * PHP version while specifying an older target (but the result will - * of course not be compatible with the older version in that case). - * * bool $shortArraySyntax: Whether to use [] instead of array() as the default array - * syntax, if the node does not specify a format. Defaults to whether - * the phpVersion support short array syntax. - * - * @param array{phpVersion?: PhpVersion, shortArraySyntax?: bool} $options Dictionary of formatting options - */ - public function __construct(array $options = []) { - $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 0); - $this->shortArraySyntax = - $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); - $this->docStringEndToken = - $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); - } - - /** - * Reset pretty printing state. - */ - protected function resetState(): void { - $this->indentLevel = 0; - $this->nl = "\n"; - $this->origTokens = null; - } - - /** - * Set indentation level - * - * @param int $level Level in number of spaces - */ - protected function setIndentLevel(int $level): void { - $this->indentLevel = $level; - $this->nl = "\n" . \str_repeat(' ', $level); - } - - /** - * Increase indentation level. - */ - protected function indent(): void { - $this->indentLevel += 4; - $this->nl .= ' '; - } - - /** - * Decrease indentation level. - */ - protected function outdent(): void { - assert($this->indentLevel >= 4); - $this->indentLevel -= 4; - $this->nl = "\n" . str_repeat(' ', $this->indentLevel); - } - - /** - * Pretty prints an array of statements. - * - * @param Node[] $stmts Array of statements - * - * @return string Pretty printed statements - */ - public function prettyPrint(array $stmts): string { - $this->resetState(); - $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): string { - $this->resetState(); - return $this->handleMagicTokens($this->p($node)); - } - - /** - * Pretty prints a file of statements (includes the opening 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): void { - /* 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; - break; - } - } - } - - /** - * Handles (and removes) no-indent and doc-string-end tokens. - * - * @param string $str - * @return string - */ - protected function handleMagicTokens(string $str): string { - if ($this->docStringEndToken !== null) { - // 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, bool $indent = true): string { - if ($indent) { - $this->indent(); - } - - $result = ''; - foreach ($nodes as $node) { - $comments = $node->getComments(); - if ($comments) { - $result .= $this->nl . $this->pComments($comments); - if ($node instanceof Stmt\Nop) { - continue; - } - } - - $result .= $this->nl . $this->p($node); - } - - if ($indent) { - $this->outdent(); - } - - return $result; - } - - /** - * Pretty-print an infix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param Node $leftNode Left-hand side node - * @param string $operatorString String representation of the operator - * @param Node $rightNode Right-hand side node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed infix operation - */ - protected function pInfixOp( - string $class, Node $leftNode, string $operatorString, Node $rightNode, - int $precedence, int $lhsPrecedence - ): string { - list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $precedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) - . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; - } - - /** - * Pretty-print a prefix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param string $operatorString String representation of the operator - * @param Node $node Node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed prefix operation - */ - protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string { - $opPrecedence = $this->precedenceMap[$class][0]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $lhsPrecedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - $printedArg = $this->p($node, $opPrecedence, $lhsPrecedence); - if (($operatorString === '+' && $printedArg[0] === '+') || - ($operatorString === '-' && $printedArg[0] === '-') - ) { - // Avoid printing +(+$a) as ++$a and similar. - $printedArg = '(' . $printedArg . ')'; - } - return $prefix . $operatorString . $printedArg . $suffix; - } - - /** - * Pretty-print a postfix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param string $operatorString String representation of the operator - * @param Node $node Node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed postfix operation - */ - protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string { - $opPrecedence = $this->precedenceMap[$class][0]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $precedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - if ($opPrecedence < $lhsPrecedence) { - $lhsPrecedence = $opPrecedence; - } - return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix; - } - - /** - * 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> $pre - */ - protected function pImplode(array $nodes, string $glue = ''): string { - $pNodes = []; - 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): string { - return $this->pImplode($nodes, ', '); - } - - /** - * Pretty prints a comma-separated list of nodes in multiline style, including comments. - * - * The result includes a leading newline and one level of indentation (same as pStmts). - * - * @param Node[] $nodes Array of Nodes to be printed - * @param bool $trailingComma Whether to use a trailing comma - * - * @return string Comma separated pretty printed nodes in multiline style - */ - protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string { - $this->indent(); - - $result = ''; - $lastIdx = count($nodes) - 1; - foreach ($nodes as $idx => $node) { - if ($node !== null) { - $comments = $node->getComments(); - if ($comments) { - $result .= $this->nl . $this->pComments($comments); - } - - $result .= $this->nl . $this->p($node); - } else { - $result .= $this->nl; - } - if ($trailingComma || $idx !== $lastIdx) { - $result .= ','; - } - } - - $this->outdent(); - return $result; - } - - /** - * Prints reformatted text of the passed comments. - * - * @param Comment[] $comments List of comments - * - * @return string Reformatted text of comments - */ - protected function pComments(array $comments): string { - $formattedComments = []; - - foreach ($comments as $comment) { - $formattedComments[] = str_replace("\n", $this->nl, $comment->getReformattedText()); - } - - return implode($this->nl, $formattedComments); - } - - /** - * Perform a format-preserving pretty print of an AST. - * - * The format preservation is best effort. For some changes to the AST the formatting will not - * be preserved (at least not locally). - * - * In order to use this method a number of prerequisites must be satisfied: - * * The startTokenPos and endTokenPos attributes in the lexer must be enabled. - * * The CloningVisitor must be run on the AST prior to modification. - * * The original tokens must be provided, using the getTokens() method on the lexer. - * - * @param Node[] $stmts Modified AST with links to original AST - * @param Node[] $origStmts Original AST with token offset information - * @param Token[] $origTokens Tokens of the original code - * - * @return string - */ - public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { - $this->initializeNodeListDiffer(); - $this->initializeLabelCharMap(); - $this->initializeFixupMap(); - $this->initializeRemovalMap(); - $this->initializeInsertionMap(); - $this->initializeListInsertionMap(); - $this->initializeEmptyListInsertionMap(); - $this->initializeModifierChangeMap(); - - $this->resetState(); - $this->origTokens = new TokenStream($origTokens); - - $this->preprocessNodes($stmts); - - $pos = 0; - $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); - if (null !== $result) { - $result .= $this->origTokens->getTokenCode($pos, count($origTokens) - 1, 0); - } else { - // Fallback - // TODO Add pStmts($stmts, false); - } - - return ltrim($this->handleMagicTokens($result)); - } - - protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { - return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); - } - - /** - * Pretty prints a node. - * - * This method also handles formatting preservation for nodes. - * - * @param Node $node Node to be pretty printed - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * @param bool $parentFormatPreserved Whether parent node has preserved formatting - * - * @return string Pretty printed node - */ - protected function p( - Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, - bool $parentFormatPreserved = false - ): string { - // No orig tokens means this is a normal pretty print without preservation of formatting - if (!$this->origTokens) { - return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); - } - - /** @var Node|null $origNode */ - $origNode = $node->getAttribute('origNode'); - if (null === $origNode) { - return $this->pFallback($node, $precedence, $lhsPrecedence); - } - - $class = \get_class($node); - \assert($class === \get_class($origNode)); - - $startPos = $origNode->getStartTokenPos(); - $endPos = $origNode->getEndTokenPos(); - \assert($startPos >= 0 && $endPos >= 0); - - $fallbackNode = $node; - if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { - // Normalize node structure of anonymous classes - assert($origNode instanceof Expr\New_); - $node = PrintableNewAnonClassNode::fromNewNode($node); - $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); - $class = PrintableNewAnonClassNode::class; - } - - // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting - // is not preserved, then we need to use the fallback code to make sure the tags are - // printed. - if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); - - $type = $node->getType(); - $fixupInfo = $this->fixupMap[$class] ?? null; - - $result = ''; - $pos = $startPos; - foreach ($node->getSubNodeNames() as $subNodeName) { - $subNode = $node->$subNodeName; - $origSubNode = $origNode->$subNodeName; - - if ((!$subNode instanceof Node && $subNode !== null) - || (!$origSubNode instanceof Node && $origSubNode !== null) - ) { - if ($subNode === $origSubNode) { - // Unchanged, can reuse old code - continue; - } - - if (is_array($subNode) && is_array($origSubNode)) { - // Array subnode changed, we might be able to reconstruct it - $listResult = $this->pArray( - $subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, - $fixupInfo[$subNodeName] ?? null - ); - if (null === $listResult) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - $result .= $listResult; - continue; - } - - // Check if this is a modifier change - $key = $class . '->' . $subNodeName; - if (!isset($this->modifierChangeMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - [$printFn, $findToken] = $this->modifierChangeMap[$key]; - $result .= $this->$printFn($subNode); - $pos = $this->origTokens->findRight($pos, $findToken); - continue; - } - - $extraLeft = ''; - $extraRight = ''; - if ($origSubNode !== null) { - $subStartPos = $origSubNode->getStartTokenPos(); - $subEndPos = $origSubNode->getEndTokenPos(); - \assert($subStartPos >= 0 && $subEndPos >= 0); - } else { - if ($subNode === null) { - // Both null, nothing to do - continue; - } - - // A node has been inserted, check if we have insertion information for it - $key = $type . '->' . $subNodeName; - if (!isset($this->insertionMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; - if (null !== $findToken) { - $subStartPos = $this->origTokens->findRight($pos, $findToken) - + (int) !$beforeToken; - } else { - $subStartPos = $pos; - } - - if (null === $extraLeft && null !== $extraRight) { - // If inserting on the right only, skipping whitespace looks better - $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos); - } - $subEndPos = $subStartPos - 1; - } - - if (null === $subNode) { - // A node has been removed, check if we have removal information for it - $key = $type . '->' . $subNodeName; - if (!isset($this->removalMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - // Adjust positions to account for additional tokens that must be skipped - $removalInfo = $this->removalMap[$key]; - if (isset($removalInfo['left'])) { - $subStartPos = $this->origTokens->skipLeft($subStartPos - 1, $removalInfo['left']) + 1; - } - if (isset($removalInfo['right'])) { - $subEndPos = $this->origTokens->skipRight($subEndPos + 1, $removalInfo['right']) - 1; - } - } - - $result .= $this->origTokens->getTokenCode($pos, $subStartPos, $indentAdjustment); - - if (null !== $subNode) { - $result .= $extraLeft; - - $origIndentLevel = $this->indentLevel; - $this->setIndentLevel($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment); - - // If it's the same node that was previously in this position, it certainly doesn't - // need fixup. It's important to check this here, because our fixup checks are more - // conservative than strictly necessary. - if (isset($fixupInfo[$subNodeName]) - && $subNode->getAttribute('origNode') !== $origSubNode - ) { - $fixup = $fixupInfo[$subNodeName]; - $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); - } else { - $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - } - - $this->safeAppend($result, $res); - $this->setIndentLevel($origIndentLevel); - - $result .= $extraRight; - } - - $pos = $subEndPos + 1; - } - - $result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment); - return $result; - } - - /** - * Perform a format-preserving pretty print of an array. - * - * @param Node[] $nodes New nodes - * @param Node[] $origNodes Original nodes - * @param int $pos Current token position (updated by reference) - * @param int $indentAdjustment Adjustment for indentation - * @param string $parentNodeClass Class of the containing node. - * @param string $subNodeName Name of array subnode. - * @param null|int $fixup Fixup information for array item nodes - * - * @return null|string Result of pretty print or null if cannot preserve formatting - */ - protected function pArray( - array $nodes, array $origNodes, int &$pos, int $indentAdjustment, - string $parentNodeClass, string $subNodeName, ?int $fixup - ): ?string { - $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); - - $mapKey = $parentNodeClass . '->' . $subNodeName; - $insertStr = $this->listInsertionMap[$mapKey] ?? null; - $isStmtList = $subNodeName === 'stmts'; - - $beforeFirstKeepOrReplace = true; - $skipRemovedNode = false; - $delayedAdd = []; - $lastElemIndentLevel = $this->indentLevel; - - $insertNewline = false; - if ($insertStr === "\n") { - $insertStr = ''; - $insertNewline = true; - } - - if ($isStmtList && \count($origNodes) === 1 && \count($nodes) !== 1) { - $startPos = $origNodes[0]->getStartTokenPos(); - $endPos = $origNodes[0]->getEndTokenPos(); - \assert($startPos >= 0 && $endPos >= 0); - if (!$this->origTokens->haveBraces($startPos, $endPos)) { - // This was a single statement without braces, but either additional statements - // have been added, or the single statement has been removed. This requires the - // addition of braces. For now fall back. - // TODO: Try to preserve formatting - return null; - } - } - - $result = ''; - foreach ($diff as $i => $diffElem) { - $diffType = $diffElem->type; - /** @var Node|string|null $arrItem */ - $arrItem = $diffElem->new; - /** @var Node|string|null $origArrItem */ - $origArrItem = $diffElem->old; - - if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { - $beforeFirstKeepOrReplace = false; - - if ($origArrItem === null || $arrItem === null) { - // We can only handle the case where both are null - if ($origArrItem === $arrItem) { - continue; - } - return null; - } - - if (!$arrItem instanceof Node || !$origArrItem instanceof Node) { - // We can only deal with nodes. This can occur for Names, which use string arrays. - return null; - } - - $itemStartPos = $origArrItem->getStartTokenPos(); - $itemEndPos = $origArrItem->getEndTokenPos(); - \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos); - - $origIndentLevel = $this->indentLevel; - $lastElemIndentLevel = $this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment; - $this->setIndentLevel($lastElemIndentLevel); - - $comments = $arrItem->getComments(); - $origComments = $origArrItem->getComments(); - $commentStartPos = $origComments ? $origComments[0]->getStartTokenPos() : $itemStartPos; - \assert($commentStartPos >= 0); - - if ($commentStartPos < $pos) { - // Comments may be assigned to multiple nodes if they start at the same position. - // Make sure we don't try to print them multiple times. - $commentStartPos = $itemStartPos; - } - - if ($skipRemovedNode) { - if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || - $this->origTokens->haveTagInRange($pos, $itemStartPos))) { - // We'd remove the brace of a code block. - // TODO: Preserve formatting. - $this->setIndentLevel($origIndentLevel); - return null; - } - } else { - $result .= $this->origTokens->getTokenCode( - $pos, $commentStartPos, $indentAdjustment); - } - - if (!empty($delayedAdd)) { - /** @var Node $delayedAddNode */ - foreach ($delayedAdd as $delayedAddNode) { - if ($insertNewline) { - $delayedAddComments = $delayedAddNode->getComments(); - if ($delayedAddComments) { - $result .= $this->pComments($delayedAddComments) . $this->nl; - } - } - - $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true)); - - if ($insertNewline) { - $result .= $insertStr . $this->nl; - } else { - $result .= $insertStr; - } - } - - $delayedAdd = []; - } - - if ($comments !== $origComments) { - if ($comments) { - $result .= $this->pComments($comments) . $this->nl; - } - } else { - $result .= $this->origTokens->getTokenCode( - $commentStartPos, $itemStartPos, $indentAdjustment); - } - - // If we had to remove anything, we have done so now. - $skipRemovedNode = false; - } elseif ($diffType === DiffElem::TYPE_ADD) { - if (null === $insertStr) { - // We don't have insertion information for this list type - return null; - } - - if (!$arrItem instanceof Node) { - // We only support list insertion of nodes. - return null; - } - - // We go multiline if the original code was multiline, - // or if it's an array item with a comment above it. - // Match always uses multiline formatting. - if ($insertStr === ', ' && - ($this->isMultiline($origNodes) || $arrItem->getComments() || - $parentNodeClass === Expr\Match_::class) - ) { - $insertStr = ','; - $insertNewline = true; - } - - if ($beforeFirstKeepOrReplace) { - // Will be inserted at the next "replace" or "keep" element - $delayedAdd[] = $arrItem; - continue; - } - - $itemStartPos = $pos; - $itemEndPos = $pos - 1; - - $origIndentLevel = $this->indentLevel; - $this->setIndentLevel($lastElemIndentLevel); - - if ($insertNewline) { - $result .= $insertStr . $this->nl; - $comments = $arrItem->getComments(); - if ($comments) { - $result .= $this->pComments($comments) . $this->nl; - } - } else { - $result .= $insertStr; - } - } elseif ($diffType === DiffElem::TYPE_REMOVE) { - if (!$origArrItem instanceof Node) { - // We only support removal for nodes - return null; - } - - $itemStartPos = $origArrItem->getStartTokenPos(); - $itemEndPos = $origArrItem->getEndTokenPos(); - \assert($itemStartPos >= 0 && $itemEndPos >= 0); - - // Consider comments part of the node. - $origComments = $origArrItem->getComments(); - if ($origComments) { - $itemStartPos = $origComments[0]->getStartTokenPos(); - } - - if ($i === 0) { - // If we're removing from the start, keep the tokens before the node and drop those after it, - // instead of the other way around. - $result .= $this->origTokens->getTokenCode( - $pos, $itemStartPos, $indentAdjustment); - $skipRemovedNode = true; - } else { - if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || - $this->origTokens->haveTagInRange($pos, $itemStartPos))) { - // We'd remove the brace of a code block. - // TODO: Preserve formatting. - return null; - } - } - - $pos = $itemEndPos + 1; - continue; - } else { - throw new \Exception("Shouldn't happen"); - } - - if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { - $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); - } else { - $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - } - $this->safeAppend($result, $res); - - $this->setIndentLevel($origIndentLevel); - $pos = $itemEndPos + 1; - } - - if ($skipRemovedNode) { - // TODO: Support removing single node. - return null; - } - - if (!empty($delayedAdd)) { - if (!isset($this->emptyListInsertionMap[$mapKey])) { - return null; - } - - list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey]; - if (null !== $findToken) { - $insertPos = $this->origTokens->findRight($pos, $findToken) + 1; - $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment); - $pos = $insertPos; - } - - $first = true; - $result .= $extraLeft; - foreach ($delayedAdd as $delayedAddNode) { - if (!$first) { - $result .= $insertStr; - if ($insertNewline) { - $result .= $this->nl; - } - } - $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - $first = false; - } - $result .= $extraRight === "\n" ? $this->nl : $extraRight; - } - - return $result; - } - - /** - * Print node with fixups. - * - * Fixups here refer to the addition of extra parentheses, braces or other characters, that - * are required to preserve program semantics in a certain context (e.g. to maintain precedence - * or because only certain expressions are allowed in certain places). - * - * @param int $fixup Fixup type - * @param Node $subNode Subnode to print - * @param string|null $parentClass Class of parent node - * @param int $subStartPos Original start pos of subnode - * @param int $subEndPos Original end pos of subnode - * - * @return string Result of fixed-up print of subnode - */ - protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { - switch ($fixup) { - case self::FIXUP_PREC_LEFT: - // We use a conservative approximation where lhsPrecedence == precedence. - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][1]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_PREC_RIGHT: - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][2]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_PREC_UNARY: - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][0]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_CALL_LHS: - if ($this->callLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_DEREF_LHS: - if ($this->dereferenceLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_STATIC_DEREF_LHS: - if ($this->staticDereferenceLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_NEW: - if ($this->newOperandRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_BRACED_NAME: - case self::FIXUP_VAR_BRACED_NAME: - if ($subNode instanceof Expr - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { - return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '') - . '{' . $this->p($subNode) . '}'; - } - break; - case self::FIXUP_ENCAPSED: - if (!$subNode instanceof Node\InterpolatedStringPart - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { - return '{' . $this->p($subNode) . '}'; - } - break; - default: - throw new \Exception('Cannot happen'); - } - - // Nothing special to do - return $this->p($subNode); - } - - /** - * Appends to a string, ensuring whitespace between label characters. - * - * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". - * Without safeAppend the result would be "echox", which does not preserve semantics. - * - * @param string $str - * @param string $append - */ - protected function safeAppend(string &$str, string $append): void { - if ($str === "") { - $str = $append; - return; - } - - if ($append === "") { - return; - } - - if (!$this->labelCharMap[$append[0]] - || !$this->labelCharMap[$str[\strlen($str) - 1]]) { - $str .= $append; - } else { - $str .= " " . $append; - } - } - - /** - * Determines whether the LHS of a call must be wrapped in parenthesis. - * - * @param Node $node LHS of a call - * - * @return bool Whether parentheses are required - */ - protected function callLhsRequiresParens(Node $node): bool { - return !($node instanceof Node\Name - || $node instanceof Expr\Variable - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_); - } - - /** - * Determines whether the LHS of an array/object operation must be wrapped in parentheses. - * - * @param Node $node LHS of dereferencing operation - * - * @return bool Whether parentheses are required - */ - protected function dereferenceLhsRequiresParens(Node $node): bool { - // A constant can occur on the LHS of an array/object deref, but not a static deref. - return $this->staticDereferenceLhsRequiresParens($node) - && !$node instanceof Expr\ConstFetch; - } - - /** - * Determines whether the LHS of a static operation must be wrapped in parentheses. - * - * @param Node $node LHS of dereferencing operation - * - * @return bool Whether parentheses are required - */ - protected function staticDereferenceLhsRequiresParens(Node $node): bool { - return !($node instanceof Expr\Variable - || $node instanceof Node\Name - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\PropertyFetch - || $node instanceof Expr\NullsafePropertyFetch - || $node instanceof Expr\StaticPropertyFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_ - || $node instanceof Scalar\String_ - || $node instanceof Expr\ClassConstFetch); - } - - /** - * Determines whether an expression used in "new" or "instanceof" requires parentheses. - * - * @param Node $node New or instanceof operand - * - * @return bool Whether parentheses are required - */ - protected function newOperandRequiresParens(Node $node): bool { - if ($node instanceof Node\Name || $node instanceof Expr\Variable) { - return false; - } - if ($node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || - $node instanceof Expr\NullsafePropertyFetch - ) { - return $this->newOperandRequiresParens($node->var); - } - if ($node instanceof Expr\StaticPropertyFetch) { - return $this->newOperandRequiresParens($node->class); - } - return true; - } - - /** - * Print modifiers, including trailing whitespace. - * - * @param int $modifiers Modifier mask to print - * - * @return string Printed modifiers - */ - protected function pModifiers(int $modifiers): string { - return ($modifiers & Modifiers::FINAL ? 'final ' : '') - . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') - . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') - . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') - . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') - . ($modifiers & Modifiers::STATIC ? 'static ' : '') - . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); - } - - protected function pStatic(bool $static): string { - return $static ? 'static ' : ''; - } - - /** - * Determine whether a list of nodes uses multiline formatting. - * - * @param (Node|null)[] $nodes Node list - * - * @return bool Whether multiline formatting is used - */ - protected function isMultiline(array $nodes): bool { - if (\count($nodes) < 2) { - return false; - } - - $pos = -1; - foreach ($nodes as $node) { - if (null === $node) { - continue; - } - - $endPos = $node->getEndTokenPos() + 1; - if ($pos >= 0) { - $text = $this->origTokens->getTokenCode($pos, $endPos, 0); - if (false === strpos($text, "\n")) { - // We require that a newline is present between *every* item. If the formatting - // is inconsistent, with only some items having newlines, we don't consider it - // as multiline - return false; - } - } - $pos = $endPos; - } - - return true; - } - - /** - * Lazily initializes label char map. - * - * The label char map determines whether a certain character may occur in a label. - */ - protected function initializeLabelCharMap(): void { - if ($this->labelCharMap) { - return; - } - - $this->labelCharMap = []; - for ($i = 0; $i < 256; $i++) { - // Since PHP 7.1 The lower range is 0x80. However, we also want to support code for - // older versions. - $chr = chr($i); - $this->labelCharMap[$chr] = $i >= 0x7f || ctype_alnum($chr); - } - } - - /** - * Lazily initializes node list differ. - * - * The node list differ is used to determine differences between two array subnodes. - */ - protected function initializeNodeListDiffer(): void { - if ($this->nodeListDiffer) { - return; - } - - $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { - if ($a instanceof Node && $b instanceof Node) { - return $a === $b->getAttribute('origNode'); - } - // Can happen for array destructuring - return $a === null && $b === null; - }); - } - - /** - * Lazily initializes fixup map. - * - * The fixup map is used to determine whether a certain subnode of a certain node may require - * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. - */ - protected function initializeFixupMap(): void { - if ($this->fixupMap) { - return; - } - - $this->fixupMap = [ - Expr\Instanceof_::class => [ - 'expr' => self::FIXUP_PREC_UNARY, - 'class' => self::FIXUP_NEW, - ], - Expr\Ternary::class => [ - 'cond' => self::FIXUP_PREC_LEFT, - 'else' => self::FIXUP_PREC_RIGHT, - ], - Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], - - Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], - Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], - Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\ClassConstFetch::class => [ - 'class' => self::FIXUP_STATIC_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\New_::class => ['class' => self::FIXUP_NEW], - Expr\MethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafeMethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\StaticPropertyFetch::class => [ - 'class' => self::FIXUP_STATIC_DEREF_LHS, - 'name' => self::FIXUP_VAR_BRACED_NAME, - ], - Expr\PropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafePropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Scalar\InterpolatedString::class => [ - 'parts' => self::FIXUP_ENCAPSED, - ], - ]; - - $binaryOps = [ - BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class, - BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class, - BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class, - BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class, - BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class, - BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, - BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, - BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, - BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, - ]; - foreach ($binaryOps as $binaryOp) { - $this->fixupMap[$binaryOp] = [ - 'left' => self::FIXUP_PREC_LEFT, - 'right' => self::FIXUP_PREC_RIGHT - ]; - } - - $prefixOps = [ - Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, - Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, - Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, - Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, - Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, - AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, - AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, - Expr\ArrowFunction::class, Expr\Throw_::class, - ]; - foreach ($prefixOps as $prefixOp) { - $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; - } - } - - /** - * Lazily initializes the removal map. - * - * The removal map is used to determine which additional tokens should be removed when a - * certain node is replaced by null. - */ - protected function initializeRemovalMap(): void { - if ($this->removalMap) { - return; - } - - $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; - $stripLeft = ['left' => \T_WHITESPACE]; - $stripRight = ['right' => \T_WHITESPACE]; - $stripDoubleArrow = ['right' => \T_DOUBLE_ARROW]; - $stripColon = ['left' => ':']; - $stripEquals = ['left' => '=']; - $this->removalMap = [ - 'Expr_ArrayDimFetch->dim' => $stripBoth, - 'ArrayItem->key' => $stripDoubleArrow, - 'Expr_ArrowFunction->returnType' => $stripColon, - 'Expr_Closure->returnType' => $stripColon, - 'Expr_Exit->expr' => $stripBoth, - 'Expr_Ternary->if' => $stripBoth, - 'Expr_Yield->key' => $stripDoubleArrow, - 'Expr_Yield->value' => $stripBoth, - 'Param->type' => $stripRight, - 'Param->default' => $stripEquals, - 'Stmt_Break->num' => $stripBoth, - 'Stmt_Catch->var' => $stripLeft, - 'Stmt_ClassMethod->returnType' => $stripColon, - 'Stmt_Class->extends' => ['left' => \T_EXTENDS], - 'Stmt_Enum->scalarType' => $stripColon, - 'Stmt_EnumCase->expr' => $stripEquals, - 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], - 'Stmt_Continue->num' => $stripBoth, - 'Stmt_Foreach->keyVar' => $stripDoubleArrow, - 'Stmt_Function->returnType' => $stripColon, - 'Stmt_If->else' => $stripLeft, - 'Stmt_Namespace->name' => $stripLeft, - 'Stmt_Property->type' => $stripRight, - 'PropertyItem->default' => $stripEquals, - 'Stmt_Return->expr' => $stripBoth, - 'Stmt_StaticVar->default' => $stripEquals, - 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, - 'Stmt_TryCatch->finally' => $stripLeft, - // 'Stmt_Case->cond': Replace with "default" - // 'Stmt_Class->name': Unclear what to do - // 'Stmt_Declare->stmts': Not a plain node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a plain node - ]; - } - - protected function initializeInsertionMap(): void { - if ($this->insertionMap) { - return; - } - - // TODO: "yield" where both key and value are inserted doesn't work - // [$find, $beforeToken, $extraLeft, $extraRight] - $this->insertionMap = [ - 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], - 'ArrayItem->key' => [null, false, null, ' => '], - 'Expr_ArrowFunction->returnType' => [')', false, ': ', null], - 'Expr_Closure->returnType' => [')', false, ': ', null], - 'Expr_Ternary->if' => ['?', false, ' ', ' '], - 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], - 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], - 'Param->type' => [null, false, null, ' '], - 'Param->default' => [null, false, ' = ', null], - 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], - 'Stmt_Catch->var' => [null, false, ' ', null], - 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], - 'Stmt_Class->extends' => [null, false, ' extends ', null], - 'Stmt_Enum->scalarType' => [null, false, ' : ', null], - 'Stmt_EnumCase->expr' => [null, false, ' = ', null], - 'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', null], - 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], - 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], - 'Stmt_Function->returnType' => [')', false, ': ', null], - 'Stmt_If->else' => [null, false, ' ', null], - 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], - 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], - 'PropertyItem->default' => [null, false, ' = ', null], - 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], - 'Stmt_StaticVar->default' => [null, false, ' = ', null], - //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO - 'Stmt_TryCatch->finally' => [null, false, ' ', null], - - // 'Expr_Exit->expr': Complicated due to optional () - // 'Stmt_Case->cond': Conversion from default to case - // 'Stmt_Class->name': Unclear - // 'Stmt_Declare->stmts': Not a proper node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a proper node - ]; - } - - protected function initializeListInsertionMap(): void { - if ($this->listInsertionMap) { - return; - } - - $this->listInsertionMap = [ - // special - //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully - //'Scalar_InterpolatedString->parts' => '', - Stmt\Catch_::class . '->types' => '|', - UnionType::class . '->types' => '|', - IntersectionType::class . '->types' => '&', - Stmt\If_::class . '->elseifs' => ' ', - Stmt\TryCatch::class . '->catches' => ' ', - - // comma-separated lists - Expr\Array_::class . '->items' => ', ', - Expr\ArrowFunction::class . '->params' => ', ', - Expr\Closure::class . '->params' => ', ', - Expr\Closure::class . '->uses' => ', ', - Expr\FuncCall::class . '->args' => ', ', - Expr\Isset_::class . '->vars' => ', ', - Expr\List_::class . '->items' => ', ', - Expr\MethodCall::class . '->args' => ', ', - Expr\NullsafeMethodCall::class . '->args' => ', ', - Expr\New_::class . '->args' => ', ', - PrintableNewAnonClassNode::class . '->args' => ', ', - Expr\StaticCall::class . '->args' => ', ', - Stmt\ClassConst::class . '->consts' => ', ', - Stmt\ClassMethod::class . '->params' => ', ', - Stmt\Class_::class . '->implements' => ', ', - Stmt\Enum_::class . '->implements' => ', ', - PrintableNewAnonClassNode::class . '->implements' => ', ', - Stmt\Const_::class . '->consts' => ', ', - Stmt\Declare_::class . '->declares' => ', ', - Stmt\Echo_::class . '->exprs' => ', ', - Stmt\For_::class . '->init' => ', ', - Stmt\For_::class . '->cond' => ', ', - Stmt\For_::class . '->loop' => ', ', - Stmt\Function_::class . '->params' => ', ', - Stmt\Global_::class . '->vars' => ', ', - Stmt\GroupUse::class . '->uses' => ', ', - Stmt\Interface_::class . '->extends' => ', ', - Expr\Match_::class . '->arms' => ', ', - Stmt\Property::class . '->props' => ', ', - Stmt\StaticVar::class . '->vars' => ', ', - Stmt\TraitUse::class . '->traits' => ', ', - Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ', - Stmt\Unset_::class . '->vars' => ', ', - Stmt\UseUse::class . '->uses' => ', ', - MatchArm::class . '->conds' => ', ', - AttributeGroup::class . '->attrs' => ', ', - - // statement lists - Expr\Closure::class . '->stmts' => "\n", - Stmt\Case_::class . '->stmts' => "\n", - Stmt\Catch_::class . '->stmts' => "\n", - Stmt\Class_::class . '->stmts' => "\n", - Stmt\Enum_::class . '->stmts' => "\n", - PrintableNewAnonClassNode::class . '->stmts' => "\n", - Stmt\Interface_::class . '->stmts' => "\n", - Stmt\Trait_::class . '->stmts' => "\n", - Stmt\ClassMethod::class . '->stmts' => "\n", - Stmt\Declare_::class . '->stmts' => "\n", - Stmt\Do_::class . '->stmts' => "\n", - Stmt\ElseIf_::class . '->stmts' => "\n", - Stmt\Else_::class . '->stmts' => "\n", - Stmt\Finally_::class . '->stmts' => "\n", - Stmt\Foreach_::class . '->stmts' => "\n", - Stmt\For_::class . '->stmts' => "\n", - Stmt\Function_::class . '->stmts' => "\n", - Stmt\If_::class . '->stmts' => "\n", - Stmt\Namespace_::class . '->stmts' => "\n", - - // Attribute groups - Stmt\Class_::class . '->attrGroups' => "\n", - Stmt\Enum_::class . '->attrGroups' => "\n", - Stmt\EnumCase::class . '->attrGroups' => "\n", - Stmt\Interface_::class . '->attrGroups' => "\n", - Stmt\Trait_::class . '->attrGroups' => "\n", - Stmt\Function_::class . '->attrGroups' => "\n", - Stmt\ClassMethod::class . '->attrGroups' => "\n", - Stmt\ClassConst::class . '->attrGroups' => "\n", - Stmt\Property::class . '->attrGroups' => "\n", - PrintableNewAnonClassNode::class . '->attrGroups' => ' ', - Expr\Closure::class . '->attrGroups' => ' ', - Expr\ArrowFunction::class . '->attrGroups' => ' ', - Param::class . '->attrGroups' => ' ', - Stmt\Switch_::class . '->cases' => "\n", - Stmt\TraitUse::class . '->adaptations' => "\n", - Stmt\TryCatch::class . '->stmts' => "\n", - Stmt\While_::class . '->stmts' => "\n", - - // dummy for top-level context - 'File->stmts' => "\n", - ]; - } - - protected function initializeEmptyListInsertionMap(): void { - if ($this->emptyListInsertionMap) { - return; - } - - // TODO Insertion into empty statement lists. - - // [$find, $extraLeft, $extraRight] - $this->emptyListInsertionMap = [ - Expr\ArrowFunction::class . '->params' => ['(', '', ''], - Expr\Closure::class . '->uses' => [')', ' use (', ')'], - Expr\Closure::class . '->params' => ['(', '', ''], - Expr\FuncCall::class . '->args' => ['(', '', ''], - Expr\MethodCall::class . '->args' => ['(', '', ''], - Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], - Expr\New_::class . '->args' => ['(', '', ''], - PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], - PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], - Expr\StaticCall::class . '->args' => ['(', '', ''], - Stmt\Class_::class . '->implements' => [null, ' implements ', ''], - Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], - Stmt\ClassMethod::class . '->params' => ['(', '', ''], - Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], - Stmt\Function_::class . '->params' => ['(', '', ''], - Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], - Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], - Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], - Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], - Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], - Stmt\Property::class . '->attrGroups' => [null, '', "\n"], - Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], - Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], - Expr\Closure::class . '->attrGroups' => [null, '', ' '], - PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], - - /* These cannot be empty to start with: - * Expr_Isset->vars - * Stmt_Catch->types - * Stmt_Const->consts - * Stmt_ClassConst->consts - * Stmt_Declare->declares - * Stmt_Echo->exprs - * Stmt_Global->vars - * Stmt_GroupUse->uses - * Stmt_Property->props - * Stmt_StaticVar->vars - * Stmt_TraitUse->traits - * Stmt_TraitUseAdaptation_Precedence->insteadof - * Stmt_Unset->vars - * Stmt_Use->uses - * UnionType->types - */ - - /* TODO - * Stmt_If->elseifs - * Stmt_TryCatch->catches - * Expr_Array->items - * Expr_List->items - * Stmt_For->init - * Stmt_For->cond - * Stmt_For->loop - */ - ]; - } - - protected function initializeModifierChangeMap(): void { - if ($this->modifierChangeMap) { - return; - } - - $this->modifierChangeMap = [ - Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST], - Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], - Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], - Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], - Param::class . '->flags' => ['pModifiers', \T_VARIABLE], - Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], - Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], - //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO - ]; - - // List of integer subnodes that are not modifiers: - // Expr_Include->type - // Stmt_GroupUse->type - // Stmt_Use->type - // UseItem->type - } -} +require __DIR__ . '/PrettyPrinter.php'; diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index 71f1f236b8..6e1f772033 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -35,6 +35,8 @@ public function testAliases1() { $this->assertTrue($node instanceof Stmt\PropertyProperty); $node = new Node\UseItem(new Name('X')); $this->assertTrue($node instanceof Stmt\UseUse); + $prettyPrinter = new PrettyPrinter\Standard(); + $this->assertTrue($prettyPrinter instanceof PrettyPrinterAbstract); } /** From 6649012e6c5f44ce4d7f0aac1206ff9c9117d732 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 1 Mar 2023 21:35:27 +0100 Subject: [PATCH 223/428] Produce error if emitError(new Error('Cannot use "semValue = $this->semStack[$stackPos]; }, 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "emitError(new Error('Cannot use "startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 77 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index c375874120..cdf3e43623 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -394,13 +394,13 @@ class Php8 extends \PhpParser\ParserAbstract -32767, 1233, -364, 1025, -364, 745,-32766,-32766,-32766, 1100, 1101, 1102, 1099, 1098, 1097, 1103, -326, -192, 819, 267, 138, 399, 749, 750, 751, 752, 288,-32766, 423,-32766, - -32766,-32766,-32766,-32766, 602, 753, 754, 755, 756, 757, - 758, 759, 760, 761, 762, 763, 783, 579, 784, 785, - 786, 787, 775, 776, 340, 341, 778, 779, 764, 765, - 766, 768, 769, 770, 351, 809, 810, 811, 812, 813, - 580, 771, 772, 581, 582, -191, 795, 793, 794, 806, - 790, 791, 826, 2, 583, 584, 789, 585, 586, 587, - 588, 589, 590, 980, 821,-32766,-32766,-32766, 792, 591, + -32766,-32766,-32766,-32766, 602, 806, 753, 754, 755, 756, + 757, 758, 759, 760, 761, 762, 782, 579, 783, 784, + 785, 786, 774, 775, 340, 341, 777, 778, 763, 764, + 765, 767, 768, 769, 351, 809, 810, 811, 812, 813, + 580, 770, 771, 581, 582, -191, 794, 792, 793, 805, + 789, 790, 826, 2, 583, 584, 788, 585, 586, 587, + 588, 589, 590, 980, 821,-32766,-32766,-32766, 791, 591, 592, 703, 139, 19, 132, 133, 134, 578, 135, 136, 1049, 742, 743, 744, 137, 37,-32766, 34,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -110, 128, @@ -409,15 +409,15 @@ class Php8 extends \PhpParser\ParserAbstract -32766,-32766,-32766, 1314,-32766,-32766,-32766, 1310, 296, 745, 1313, 74, 104, 105, 106, 107, 108, 322, 271, 1339, -326, -192, 1340, 267, 138, 399, 749, 750, 751, 752, - 109, 476, 423,-32766,-32766,-32766, 551, 822, 126, 753, - 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, - 783, 579, 784, 785, 786, 787, 775, 776, 340, 341, - 778, 779, 764, 765, 766, 768, 769, 770, 351, 809, - 810, 811, 812, 813, 580, 771, 772, 581, 582, -191, - 795, 793, 794, 806, 790, 791, 817, 251, 583, 584, - 789, 585, 586, 587, 588, 589, 590, 1266, 82, 83, - 84, 1077, 792, 591, 592, 728, 148, 767, 737, 738, - 739, 740, 741, 823, 742, 743, 744, 780, 781, 36, + 109, 476, 423,-32766,-32766,-32766, 551, 822, 126, 806, + 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, + 782, 579, 783, 784, 785, 786, 774, 775, 340, 341, + 777, 778, 763, 764, 765, 767, 768, 769, 351, 809, + 810, 811, 812, 813, 580, 770, 771, 581, 582, -191, + 794, 792, 793, 805, 789, 790, 817, 251, 583, 584, + 788, 585, 586, 587, 588, 589, 590, 1266, 82, 83, + 84, 1077, 791, 591, 592, 728, 148, 766, 737, 738, + 739, 740, 741, 823, 742, 743, 744, 779, 780, 36, 307, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, -591, 271, -591, 309, 375, @@ -425,13 +425,13 @@ class Php8 extends \PhpParser\ParserAbstract 948, 949, 745, 477, 289, 950,-32766,-32766,-32766, 141, 1076, 944,-32766, 322, 377, 376, 746, 747, 748, 749, 750, 751, 752, 320, 417, 815, 335,-32766, -542,-32766, - -32766, 336, 753, 754, 755, 756, 757, 758, 759, 760, - 761, 762, 763, 783, 805, 784, 785, 786, 787, 775, - 776, 777, 804, 778, 779, 764, 765, 766, 768, 769, - 770, 808, 809, 810, 811, 812, 813, 814, 771, 772, - 773, 774, -545, 795, 793, 794, 806, 790, 791, 239, - -85, 782, 788, 789, 796, 797, 799, 798, 800, 801, - -32766, 21, -542, -542, 1022, 792, 803, 802, 49, 50, + -32766, 336, 806, 753, 754, 755, 756, 757, 758, 759, + 760, 761, 762, 782, 804, 783, 784, 785, 786, 774, + 775, 776, 803, 777, 778, 763, 764, 765, 767, 768, + 769, 808, 809, 810, 811, 812, 813, 814, 770, 771, + 772, 773, -545, 794, 792, 793, 805, 789, 790, 239, + -85, 781, 787, 788, 795, 796, 798, 797, 799, 800, + -32766, 21, -542, -542, 1022, 791, 802, 801, 49, 50, 51, 507, 52, 53, 423, 736, 735, -542, 54, 55, -110, 56, 1025, 1092, 910, -110, 1025, -110, 289, -548, -32766, -542, 303,-32766,-32766, -110, -110, -110, -110, -110, @@ -460,19 +460,19 @@ class Php8 extends \PhpParser\ParserAbstract 900, 143, 701, -152, 671, 672, 948, 949, 900, 149, 402, 950, 373, 374, 1138, 1140, 47, 945, 378, 379, 643, 644,-32766, 158, 159, -540, 27, 160, 1226, 461, - 462, 161, -84, -78, -74,-32766,-32766,-32766, 826,-32766, - 140,-32766, 1258,-32766, 322, 900,-32766, 284, -73, 1022, - -72,-32766,-32766,-32766, -4, 910, -71,-32766,-32766, -543, - -543, 35, 248,-32766, 414, -70, 912, -69, -68, -67, - 701, 1025,-32766, -66, -543, 965, 736, 735, 1219, 701, - 297, 298, -540, 912, -47, -300, 48, 701, -543, -540, + 462, 161, -84, -78, -73,-32766,-32766,-32766, 826,-32766, + 140,-32766, 1258,-32766, 322, 900,-32766, 284, -72, 1022, + -71,-32766,-32766,-32766, -4, 910, -70,-32766,-32766, -543, + -543, 35, 248,-32766, 414, -69, 912, -68, -67, -66, + 701, 1025,-32766, -65, -543, 965, 736, 735, 1219, 701, + 297, 298, -540, 912, -46, -300, 48, 701, -543, -540, -540, -18, 522, 523, 279, 1247, 1248, 1249, 1250, 1244, 1245, 147, 73, -588, -540, -588, 270, 1251, 1246, 125, 280, 717, 720,-32766, 909, 146, 926, 72, -540, 1226, 912, -296, 319, 322, 701, 277,-32766,-32766,-32766, 278, -32766, 281,-32766, 282,-32766, 328, 285,-32766, 900, 290, 291, 109,-32766,-32766,-32766, 271, -540, -540,-32766,-32766, - 299, 300, -51, 681,-32766, 414, 826, 145,-32766, 1107, + 299, 300, -50, 681,-32766, 414, 826, 145,-32766, 1107, 370, -540, 430,-32766, 658, 368, 20, 294, 1341, 817, 641, 948, 949, 304, 694, -540, 517, 553, 301, 127, 557, 521, 944, -110, -110, -110, 131, 653, 308, 674, @@ -776,7 +776,7 @@ class Php8 extends \PhpParser\ParserAbstract 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, 100,32767, - 32767,32767, 37, 7, 8, 10, 11, 50, 17, 322, + 32767,32767, 36, 7, 8, 10, 11, 49, 17, 322, 32767,32767,32767,32767, 102,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767, 587,32767,32767,32767,32767, @@ -820,8 +820,8 @@ class Php8 extends \PhpParser\ParserAbstract 461, 463, 589,32767, 500,32767,32767,32767,32767, 336, 32767, 599,32767, 599,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 600,32767, 540,32767,32767,32767,32767, 429, 9, 75, - 489, 43, 44, 52, 58, 517, 518, 519, 520, 514, + 600,32767, 540,32767,32767,32767,32767, 429, 9, 74, + 489, 42, 43, 51, 57, 517, 518, 519, 520, 514, 515, 521, 516,32767,32767, 522, 565,32767,32767, 541, 592,32767,32767,32767,32767,32767,32767, 138,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 527, @@ -1380,7 +1380,7 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos]; }, 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "emitError(new Error('Cannot use "startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, 77 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; diff --git a/test/code/parser/stmt/class/shortEchoAsIdentifier.test b/test/code/parser/stmt/class/shortEchoAsIdentifier.test new file mode 100644 index 0000000000..90d05c7e79 --- /dev/null +++ b/test/code/parser/stmt/class/shortEchoAsIdentifier.test @@ -0,0 +1,56 @@ +Short echo syntax cannot be used as an identifier +----- + Date: Wed, 1 Mar 2023 21:37:37 +0100 Subject: [PATCH 224/428] Don't skip tests with evaluate segment when generating corpus This code was adopted from test updating, but in this context we're fine with just evaluating these. --- tools/fuzzing/generateCorpus.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/fuzzing/generateCorpus.php b/tools/fuzzing/generateCorpus.php index f359832201..900ba462a1 100644 --- a/tools/fuzzing/generateCorpus.php +++ b/tools/fuzzing/generateCorpus.php @@ -21,11 +21,6 @@ $codeParsingTest = new PhpParser\CodeParsingTest(); foreach ($inputDirs as $inputDir) { foreach (PhpParser\filesInDir($inputDir, 'test') as $fileName => $code) { - if (false !== strpos($code, '@@{')) { - // Skip tests with evaluate segments - continue; - } - list($_name, $tests) = $testParser->parseTest($code, 2); foreach ($tests as list($_modeLine, list($input, $_expected))) { $path = $corpusDir . '/' . md5($input) . '.txt'; From bbec9db6261a532bf663be20c3b25f9614cc7252 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 1 Mar 2023 22:39:15 +0100 Subject: [PATCH 225/428] Handle overflowing \u escape sequence --- lib/PhpParser/Node/Scalar/String_.php | 4 +++- test/code/parser/scalar/unicodeEscape.test | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/Node/Scalar/String_.php b/lib/PhpParser/Node/Scalar/String_.php index f836fcb3e5..371c3b6cb0 100644 --- a/lib/PhpParser/Node/Scalar/String_.php +++ b/lib/PhpParser/Node/Scalar/String_.php @@ -120,7 +120,9 @@ function ($matches) { return chr(hexdec(substr($str, 1))); } if ('u' === $str[0]) { - return self::codePointToUtf8(hexdec($matches[2])); + $dec = hexdec($matches[2]); + // If it overflowed to float, treat as INT_MAX, it will throw an error anyway. + return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX); } else { return chr(octdec($str)); } diff --git a/test/code/parser/scalar/unicodeEscape.test b/test/code/parser/scalar/unicodeEscape.test index 237a01292f..04ac1582d4 100644 --- a/test/code/parser/scalar/unicodeEscape.test +++ b/test/code/parser/scalar/unicodeEscape.test @@ -22,4 +22,9 @@ array( value: @@{"\xF0\x9F\x98\x82"}@@ ) ) -) \ No newline at end of file +) +----- + Date: Sat, 4 Mar 2023 11:52:44 +0100 Subject: [PATCH 226/428] Respect namespace style for enum scalar type printing Doesn't matter in any practical sense because such types are always invalid, but makes sure pretty printing round-trips. --- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- test/code/prettyPrinter/stmt/enum.test | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index f8d0f31d56..1126c3d8b6 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -773,7 +773,7 @@ protected function pStmt_Interface(Stmt\Interface_ $node): string { protected function pStmt_Enum(Stmt\Enum_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'enum ' . $node->name - . ($node->scalarType ? " : $node->scalarType" : '') + . ($node->scalarType ? ' : ' . $this->p($node->scalarType) : '') . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } diff --git a/test/code/prettyPrinter/stmt/enum.test b/test/code/prettyPrinter/stmt/enum.test index 262d9b744b..4dbd7e040b 100644 --- a/test/code/prettyPrinter/stmt/enum.test +++ b/test/code/prettyPrinter/stmt/enum.test @@ -18,6 +18,8 @@ enum B: int { enum C: string implements D { case Z = 'A'; } + +enum D: \Foo\Bar {} ----- enum A implements B { @@ -35,4 +37,7 @@ enum B : int enum C : string implements D { case Z = 'A'; -} \ No newline at end of file +} +enum D : \Foo\Bar +{ +} From 7877e0302d05955456ccc1255ff63f3bb95fb8ad Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 4 Mar 2023 11:59:42 +0100 Subject: [PATCH 227/428] Handle group use special case in fuzzer Same as for normal use. --- tools/fuzzing/target.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/fuzzing/target.php b/tools/fuzzing/target.php index 84626053c9..6e67eb201d 100644 --- a/tools/fuzzing/target.php +++ b/tools/fuzzing/target.php @@ -91,6 +91,11 @@ public function leaveNode(PhpParser\Node $node) { ) { $this->hasProblematicConstruct = true; } + if ($node instanceof Stmt\GroupUse && $node->prefix->isUnqualified() && + $this->tokens[$node->prefix->getStartTokenPos()]->is(\T_NAME_FULLY_QUALIFIED) + ) { + $this->hasProblematicConstruct = true; + } } }; $traverser = new PhpParser\NodeTraverser(); From 698ff1ca46bea7b48133902b0658a1facae12a9a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 4 Mar 2023 12:04:47 +0100 Subject: [PATCH 228/428] Don't always omit parentheses for argument-less yield We may need parentheses around an argument-less yield to distinguish (yield) - $a from yield -$a and similar. Treat argument-less yield like a prefix operator. This will print parentheses a bit more often than is really required, because the arity ambiguity only exists for certain operators. This seems like a reasonably good approximation through, as it only affects argument-less yield on the LHS of infix operators. --- lib/PhpParser/PrettyPrinter/Standard.php | 3 ++- test/code/prettyPrinter/expr/yield.test | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 1126c3d8b6..23f9915db1 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -720,7 +720,8 @@ protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int $lhsPrece protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int $lhsPrecedence): string { if ($node->value === null) { - return 'yield'; + $opPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; + return $opPrecedence >= $lhsPrecedence ? '(yield)' : 'yield'; } else { if (!$this->phpVersion->supportsYieldWithoutParentheses()) { return '(yield ' . $this->pKey($node->key) . $this->p($node->value) . ')'; diff --git a/test/code/prettyPrinter/expr/yield.test b/test/code/prettyPrinter/expr/yield.test index 8d7f4d00a6..006fc79d1c 100644 --- a/test/code/prettyPrinter/expr/yield.test +++ b/test/code/prettyPrinter/expr/yield.test @@ -22,6 +22,9 @@ function gen() match ($x) { yield $a, (yield $b) => $c, }; + yield -$a; + (yield) - $a; + yield * $a; } ----- function gen() @@ -44,6 +47,9 @@ function gen() match ($x) { yield $a, (yield $b) => $c, }; + yield -$a; + (yield) - $a; + (yield) * $a; } ----- $c, }; + yield -$a; + (yield) - $a; + yield * $a; } ----- !!version=5.6 @@ -91,4 +100,7 @@ function gen() match ($x) { (yield $a), (yield $b) => $c, }; + (yield -$a); + (yield) - $a; + (yield) * $a; } From 12860599988b3502a554a02a1080804cd747b1b6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 4 Mar 2023 19:07:27 +0100 Subject: [PATCH 229/428] Set allowed exceptions in fuzzer --- tools/fuzzing/target.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/fuzzing/target.php b/tools/fuzzing/target.php index 6e67eb201d..1057a493b5 100644 --- a/tools/fuzzing/target.php +++ b/tools/fuzzing/target.php @@ -127,3 +127,4 @@ public function leaveNode(PhpParser\Node $node) { $fuzzer->setMaxLen(1024); $fuzzer->addDictionary(__DIR__ . '/php.dict'); +$fuzzer->setAllowedExceptions([PhpParser\Error::class]); From a0ed229b310af09e21592aa5dc081f2cd6bcf30e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 4 Mar 2023 21:54:56 +0100 Subject: [PATCH 230/428] Revert "Rename PrettyPrinterAbstract to PrettyPrinter" This reverts commit 2217f14d6e039f1c0572329e6fcc99f6c17178a3. --- lib/PhpParser/PrettyPrinter.php | 1647 ---------------------- lib/PhpParser/PrettyPrinter/Standard.php | 4 +- lib/PhpParser/PrettyPrinterAbstract.php | 1643 ++++++++++++++++++++- test/PhpParser/CompatibilityTest.php | 2 - 4 files changed, 1644 insertions(+), 1652 deletions(-) delete mode 100644 lib/PhpParser/PrettyPrinter.php diff --git a/lib/PhpParser/PrettyPrinter.php b/lib/PhpParser/PrettyPrinter.php deleted file mode 100644 index 96605b7ea3..0000000000 --- a/lib/PhpParser/PrettyPrinter.php +++ /dev/null @@ -1,1647 +0,0 @@ - */ - protected $precedenceMap = [ - // [precedence, precedenceLHS, precedenceRHS] - // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, - // where 1 is added to one of the sides depending on associativity. This information is not - // used for unary operators and set to -1. - Expr\Clone_::class => [-10, 0, 1], - BinaryOp\Pow::class => [ 0, 0, 1], - Expr\BitwiseNot::class => [ 10, -1, -1], - Expr\UnaryPlus::class => [ 10, -1, -1], - Expr\UnaryMinus::class => [ 10, -1, -1], - Cast\Int_::class => [ 10, -1, -1], - Cast\Double::class => [ 10, -1, -1], - Cast\String_::class => [ 10, -1, -1], - Cast\Array_::class => [ 10, -1, -1], - Cast\Object_::class => [ 10, -1, -1], - Cast\Bool_::class => [ 10, -1, -1], - Cast\Unset_::class => [ 10, -1, -1], - Expr\ErrorSuppress::class => [ 10, -1, -1], - Expr\Instanceof_::class => [ 20, -1, -1], - Expr\BooleanNot::class => [ 30, -1, -1], - BinaryOp\Mul::class => [ 40, 41, 40], - BinaryOp\Div::class => [ 40, 41, 40], - BinaryOp\Mod::class => [ 40, 41, 40], - BinaryOp\Plus::class => [ 50, 51, 50], - BinaryOp\Minus::class => [ 50, 51, 50], - BinaryOp\Concat::class => [ 50, 51, 50], - BinaryOp\ShiftLeft::class => [ 60, 61, 60], - BinaryOp\ShiftRight::class => [ 60, 61, 60], - BinaryOp\Smaller::class => [ 70, 70, 70], - BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], - BinaryOp\Greater::class => [ 70, 70, 70], - BinaryOp\GreaterOrEqual::class => [ 70, 70, 70], - BinaryOp\Equal::class => [ 80, 80, 80], - BinaryOp\NotEqual::class => [ 80, 80, 80], - BinaryOp\Identical::class => [ 80, 80, 80], - BinaryOp\NotIdentical::class => [ 80, 80, 80], - BinaryOp\Spaceship::class => [ 80, 80, 80], - BinaryOp\BitwiseAnd::class => [ 90, 91, 90], - BinaryOp\BitwiseXor::class => [100, 101, 100], - BinaryOp\BitwiseOr::class => [110, 111, 110], - BinaryOp\BooleanAnd::class => [120, 121, 120], - BinaryOp\BooleanOr::class => [130, 131, 130], - BinaryOp\Coalesce::class => [140, 140, 141], - Expr\Ternary::class => [150, -1, -1], - Expr\Assign::class => [160, -1, -1], - Expr\AssignRef::class => [160, -1, -1], - AssignOp\Plus::class => [160, -1, -1], - AssignOp\Minus::class => [160, -1, -1], - AssignOp\Mul::class => [160, -1, -1], - AssignOp\Div::class => [160, -1, -1], - AssignOp\Concat::class => [160, -1, -1], - AssignOp\Mod::class => [160, -1, -1], - AssignOp\BitwiseAnd::class => [160, -1, -1], - AssignOp\BitwiseOr::class => [160, -1, -1], - AssignOp\BitwiseXor::class => [160, -1, -1], - AssignOp\ShiftLeft::class => [160, -1, -1], - AssignOp\ShiftRight::class => [160, -1, -1], - AssignOp\Pow::class => [160, -1, -1], - AssignOp\Coalesce::class => [160, -1, -1], - Expr\YieldFrom::class => [170, -1, -1], - Expr\Yield_::class => [175, -1, -1], - Expr\Print_::class => [180, -1, -1], - BinaryOp\LogicalAnd::class => [190, 191, 190], - BinaryOp\LogicalXor::class => [200, 201, 200], - BinaryOp\LogicalOr::class => [210, 211, 210], - Expr\Include_::class => [220, -1, -1], - Expr\ArrowFunction::class => [230, -1, -1], - Expr\Throw_::class => [240, -1, -1], - ]; - - /** @var int Current indentation level. */ - protected $indentLevel; - /** @var string Newline including current indentation. */ - protected $nl; - /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. - * Null if flexible doc strings are used. */ - protected $docStringEndToken; - /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ - protected $canUseSemicolonNamespaces; - /** @var bool Whether to use short array syntax if the node specifies no preference */ - protected $shortArraySyntax; - /** @var PhpVersion PHP version to target */ - protected $phpVersion; - - /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ - protected $origTokens; - /** @var Internal\Differ|null Differ for node lists */ - protected $nodeListDiffer; - /** @var array Map determining whether a certain character is a label character */ - protected $labelCharMap; - /** - * @var array> Map from token classes and subnode names to FIXUP_* constants. - * This is used during format-preserving prints to place additional parens/braces if necessary. - */ - protected $fixupMap; - /** - * @var array Map from "{$node->getType()}->{$subNode}" - * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped - * when removing this node. - */ - protected $removalMap; - /** - * @var array Map from - * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. - * $find is an optional token after which the insertion occurs. $extraLeft/Right - * are optionally added before/after the main insertions. - */ - protected $insertionMap; - /** - * @var array Map From "{$class}->{$subNode}" to string that should be inserted - * between elements of this list subnode. - */ - protected $listInsertionMap; - - /** - * @var array - */ - protected $emptyListInsertionMap; - /** @var array Map from "{$class}->{$subNode}" to [$printFn, $token] - * where $printFn is the function to print the modifiers and $token is the token before which - * the modifiers should be reprinted. */ - protected $modifierChangeMap; - - /** - * Creates a pretty printer instance using the given options. - * - * Supported options: - * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.0). This option - * controls compatibility of the generated code with older PHP - * versions in cases where a simple stylistic choice exists (e.g. - * array() vs []). It is safe to pretty-print an AST for a newer - * PHP version while specifying an older target (but the result will - * of course not be compatible with the older version in that case). - * * bool $shortArraySyntax: Whether to use [] instead of array() as the default array - * syntax, if the node does not specify a format. Defaults to whether - * the phpVersion support short array syntax. - * - * @param array{phpVersion?: PhpVersion, shortArraySyntax?: bool} $options Dictionary of formatting options - */ - public function __construct(array $options = []) { - $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 0); - $this->shortArraySyntax = - $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); - $this->docStringEndToken = - $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); - } - - /** - * Reset pretty printing state. - */ - protected function resetState(): void { - $this->indentLevel = 0; - $this->nl = "\n"; - $this->origTokens = null; - } - - /** - * Set indentation level - * - * @param int $level Level in number of spaces - */ - protected function setIndentLevel(int $level): void { - $this->indentLevel = $level; - $this->nl = "\n" . \str_repeat(' ', $level); - } - - /** - * Increase indentation level. - */ - protected function indent(): void { - $this->indentLevel += 4; - $this->nl .= ' '; - } - - /** - * Decrease indentation level. - */ - protected function outdent(): void { - assert($this->indentLevel >= 4); - $this->indentLevel -= 4; - $this->nl = "\n" . str_repeat(' ', $this->indentLevel); - } - - /** - * Pretty prints an array of statements. - * - * @param Node[] $stmts Array of statements - * - * @return string Pretty printed statements - */ - public function prettyPrint(array $stmts): string { - $this->resetState(); - $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): string { - $this->resetState(); - return $this->handleMagicTokens($this->p($node)); - } - - /** - * Pretty prints a file of statements (includes the opening 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): void { - /* 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; - break; - } - } - } - - /** - * Handles (and removes) no-indent and doc-string-end tokens. - * - * @param string $str - * @return string - */ - protected function handleMagicTokens(string $str): string { - if ($this->docStringEndToken !== null) { - // 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, bool $indent = true): string { - if ($indent) { - $this->indent(); - } - - $result = ''; - foreach ($nodes as $node) { - $comments = $node->getComments(); - if ($comments) { - $result .= $this->nl . $this->pComments($comments); - if ($node instanceof Stmt\Nop) { - continue; - } - } - - $result .= $this->nl . $this->p($node); - } - - if ($indent) { - $this->outdent(); - } - - return $result; - } - - /** - * Pretty-print an infix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param Node $leftNode Left-hand side node - * @param string $operatorString String representation of the operator - * @param Node $rightNode Right-hand side node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed infix operation - */ - protected function pInfixOp( - string $class, Node $leftNode, string $operatorString, Node $rightNode, - int $precedence, int $lhsPrecedence - ): string { - list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $precedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) - . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; - } - - /** - * Pretty-print a prefix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param string $operatorString String representation of the operator - * @param Node $node Node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed prefix operation - */ - protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string { - $opPrecedence = $this->precedenceMap[$class][0]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $lhsPrecedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - $printedArg = $this->p($node, $opPrecedence, $lhsPrecedence); - if (($operatorString === '+' && $printedArg[0] === '+') || - ($operatorString === '-' && $printedArg[0] === '-') - ) { - // Avoid printing +(+$a) as ++$a and similar. - $printedArg = '(' . $printedArg . ')'; - } - return $prefix . $operatorString . $printedArg . $suffix; - } - - /** - * Pretty-print a postfix operation while taking precedence into account. - * - * @param string $class Node class of operator - * @param string $operatorString String representation of the operator - * @param Node $node Node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * - * @return string Pretty printed postfix operation - */ - protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string { - $opPrecedence = $this->precedenceMap[$class][0]; - $prefix = ''; - $suffix = ''; - if ($opPrecedence >= $precedence) { - $prefix = '('; - $suffix = ')'; - $lhsPrecedence = self::MAX_PRECEDENCE; - } - if ($opPrecedence < $lhsPrecedence) { - $lhsPrecedence = $opPrecedence; - } - return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix; - } - - /** - * 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> $pre - */ - protected function pImplode(array $nodes, string $glue = ''): string { - $pNodes = []; - 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): string { - return $this->pImplode($nodes, ', '); - } - - /** - * Pretty prints a comma-separated list of nodes in multiline style, including comments. - * - * The result includes a leading newline and one level of indentation (same as pStmts). - * - * @param Node[] $nodes Array of Nodes to be printed - * @param bool $trailingComma Whether to use a trailing comma - * - * @return string Comma separated pretty printed nodes in multiline style - */ - protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string { - $this->indent(); - - $result = ''; - $lastIdx = count($nodes) - 1; - foreach ($nodes as $idx => $node) { - if ($node !== null) { - $comments = $node->getComments(); - if ($comments) { - $result .= $this->nl . $this->pComments($comments); - } - - $result .= $this->nl . $this->p($node); - } else { - $result .= $this->nl; - } - if ($trailingComma || $idx !== $lastIdx) { - $result .= ','; - } - } - - $this->outdent(); - return $result; - } - - /** - * Prints reformatted text of the passed comments. - * - * @param Comment[] $comments List of comments - * - * @return string Reformatted text of comments - */ - protected function pComments(array $comments): string { - $formattedComments = []; - - foreach ($comments as $comment) { - $formattedComments[] = str_replace("\n", $this->nl, $comment->getReformattedText()); - } - - return implode($this->nl, $formattedComments); - } - - /** - * Perform a format-preserving pretty print of an AST. - * - * The format preservation is best effort. For some changes to the AST the formatting will not - * be preserved (at least not locally). - * - * In order to use this method a number of prerequisites must be satisfied: - * * The startTokenPos and endTokenPos attributes in the lexer must be enabled. - * * The CloningVisitor must be run on the AST prior to modification. - * * The original tokens must be provided, using the getTokens() method on the lexer. - * - * @param Node[] $stmts Modified AST with links to original AST - * @param Node[] $origStmts Original AST with token offset information - * @param Token[] $origTokens Tokens of the original code - * - * @return string - */ - public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { - $this->initializeNodeListDiffer(); - $this->initializeLabelCharMap(); - $this->initializeFixupMap(); - $this->initializeRemovalMap(); - $this->initializeInsertionMap(); - $this->initializeListInsertionMap(); - $this->initializeEmptyListInsertionMap(); - $this->initializeModifierChangeMap(); - - $this->resetState(); - $this->origTokens = new TokenStream($origTokens); - - $this->preprocessNodes($stmts); - - $pos = 0; - $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); - if (null !== $result) { - $result .= $this->origTokens->getTokenCode($pos, count($origTokens) - 1, 0); - } else { - // Fallback - // TODO Add pStmts($stmts, false); - } - - return ltrim($this->handleMagicTokens($result)); - } - - protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { - return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); - } - - /** - * Pretty prints a node. - * - * This method also handles formatting preservation for nodes. - * - * @param Node $node Node to be pretty printed - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator - * @param bool $parentFormatPreserved Whether parent node has preserved formatting - * - * @return string Pretty printed node - */ - protected function p( - Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, - bool $parentFormatPreserved = false - ): string { - // No orig tokens means this is a normal pretty print without preservation of formatting - if (!$this->origTokens) { - return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); - } - - /** @var Node|null $origNode */ - $origNode = $node->getAttribute('origNode'); - if (null === $origNode) { - return $this->pFallback($node, $precedence, $lhsPrecedence); - } - - $class = \get_class($node); - \assert($class === \get_class($origNode)); - - $startPos = $origNode->getStartTokenPos(); - $endPos = $origNode->getEndTokenPos(); - \assert($startPos >= 0 && $endPos >= 0); - - $fallbackNode = $node; - if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { - // Normalize node structure of anonymous classes - assert($origNode instanceof Expr\New_); - $node = PrintableNewAnonClassNode::fromNewNode($node); - $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); - $class = PrintableNewAnonClassNode::class; - } - - // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting - // is not preserved, then we need to use the fallback code to make sure the tags are - // printed. - if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); - - $type = $node->getType(); - $fixupInfo = $this->fixupMap[$class] ?? null; - - $result = ''; - $pos = $startPos; - foreach ($node->getSubNodeNames() as $subNodeName) { - $subNode = $node->$subNodeName; - $origSubNode = $origNode->$subNodeName; - - if ((!$subNode instanceof Node && $subNode !== null) - || (!$origSubNode instanceof Node && $origSubNode !== null) - ) { - if ($subNode === $origSubNode) { - // Unchanged, can reuse old code - continue; - } - - if (is_array($subNode) && is_array($origSubNode)) { - // Array subnode changed, we might be able to reconstruct it - $listResult = $this->pArray( - $subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, - $fixupInfo[$subNodeName] ?? null - ); - if (null === $listResult) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - $result .= $listResult; - continue; - } - - // Check if this is a modifier change - $key = $class . '->' . $subNodeName; - if (!isset($this->modifierChangeMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - [$printFn, $findToken] = $this->modifierChangeMap[$key]; - $result .= $this->$printFn($subNode); - $pos = $this->origTokens->findRight($pos, $findToken); - continue; - } - - $extraLeft = ''; - $extraRight = ''; - if ($origSubNode !== null) { - $subStartPos = $origSubNode->getStartTokenPos(); - $subEndPos = $origSubNode->getEndTokenPos(); - \assert($subStartPos >= 0 && $subEndPos >= 0); - } else { - if ($subNode === null) { - // Both null, nothing to do - continue; - } - - // A node has been inserted, check if we have insertion information for it - $key = $type . '->' . $subNodeName; - if (!isset($this->insertionMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; - if (null !== $findToken) { - $subStartPos = $this->origTokens->findRight($pos, $findToken) - + (int) !$beforeToken; - } else { - $subStartPos = $pos; - } - - if (null === $extraLeft && null !== $extraRight) { - // If inserting on the right only, skipping whitespace looks better - $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos); - } - $subEndPos = $subStartPos - 1; - } - - if (null === $subNode) { - // A node has been removed, check if we have removal information for it - $key = $type . '->' . $subNodeName; - if (!isset($this->removalMap[$key])) { - return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); - } - - // Adjust positions to account for additional tokens that must be skipped - $removalInfo = $this->removalMap[$key]; - if (isset($removalInfo['left'])) { - $subStartPos = $this->origTokens->skipLeft($subStartPos - 1, $removalInfo['left']) + 1; - } - if (isset($removalInfo['right'])) { - $subEndPos = $this->origTokens->skipRight($subEndPos + 1, $removalInfo['right']) - 1; - } - } - - $result .= $this->origTokens->getTokenCode($pos, $subStartPos, $indentAdjustment); - - if (null !== $subNode) { - $result .= $extraLeft; - - $origIndentLevel = $this->indentLevel; - $this->setIndentLevel($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment); - - // If it's the same node that was previously in this position, it certainly doesn't - // need fixup. It's important to check this here, because our fixup checks are more - // conservative than strictly necessary. - if (isset($fixupInfo[$subNodeName]) - && $subNode->getAttribute('origNode') !== $origSubNode - ) { - $fixup = $fixupInfo[$subNodeName]; - $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); - } else { - $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - } - - $this->safeAppend($result, $res); - $this->setIndentLevel($origIndentLevel); - - $result .= $extraRight; - } - - $pos = $subEndPos + 1; - } - - $result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment); - return $result; - } - - /** - * Perform a format-preserving pretty print of an array. - * - * @param Node[] $nodes New nodes - * @param Node[] $origNodes Original nodes - * @param int $pos Current token position (updated by reference) - * @param int $indentAdjustment Adjustment for indentation - * @param string $parentNodeClass Class of the containing node. - * @param string $subNodeName Name of array subnode. - * @param null|int $fixup Fixup information for array item nodes - * - * @return null|string Result of pretty print or null if cannot preserve formatting - */ - protected function pArray( - array $nodes, array $origNodes, int &$pos, int $indentAdjustment, - string $parentNodeClass, string $subNodeName, ?int $fixup - ): ?string { - $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); - - $mapKey = $parentNodeClass . '->' . $subNodeName; - $insertStr = $this->listInsertionMap[$mapKey] ?? null; - $isStmtList = $subNodeName === 'stmts'; - - $beforeFirstKeepOrReplace = true; - $skipRemovedNode = false; - $delayedAdd = []; - $lastElemIndentLevel = $this->indentLevel; - - $insertNewline = false; - if ($insertStr === "\n") { - $insertStr = ''; - $insertNewline = true; - } - - if ($isStmtList && \count($origNodes) === 1 && \count($nodes) !== 1) { - $startPos = $origNodes[0]->getStartTokenPos(); - $endPos = $origNodes[0]->getEndTokenPos(); - \assert($startPos >= 0 && $endPos >= 0); - if (!$this->origTokens->haveBraces($startPos, $endPos)) { - // This was a single statement without braces, but either additional statements - // have been added, or the single statement has been removed. This requires the - // addition of braces. For now fall back. - // TODO: Try to preserve formatting - return null; - } - } - - $result = ''; - foreach ($diff as $i => $diffElem) { - $diffType = $diffElem->type; - /** @var Node|string|null $arrItem */ - $arrItem = $diffElem->new; - /** @var Node|string|null $origArrItem */ - $origArrItem = $diffElem->old; - - if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { - $beforeFirstKeepOrReplace = false; - - if ($origArrItem === null || $arrItem === null) { - // We can only handle the case where both are null - if ($origArrItem === $arrItem) { - continue; - } - return null; - } - - if (!$arrItem instanceof Node || !$origArrItem instanceof Node) { - // We can only deal with nodes. This can occur for Names, which use string arrays. - return null; - } - - $itemStartPos = $origArrItem->getStartTokenPos(); - $itemEndPos = $origArrItem->getEndTokenPos(); - \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos); - - $origIndentLevel = $this->indentLevel; - $lastElemIndentLevel = $this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment; - $this->setIndentLevel($lastElemIndentLevel); - - $comments = $arrItem->getComments(); - $origComments = $origArrItem->getComments(); - $commentStartPos = $origComments ? $origComments[0]->getStartTokenPos() : $itemStartPos; - \assert($commentStartPos >= 0); - - if ($commentStartPos < $pos) { - // Comments may be assigned to multiple nodes if they start at the same position. - // Make sure we don't try to print them multiple times. - $commentStartPos = $itemStartPos; - } - - if ($skipRemovedNode) { - if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || - $this->origTokens->haveTagInRange($pos, $itemStartPos))) { - // We'd remove the brace of a code block. - // TODO: Preserve formatting. - $this->setIndentLevel($origIndentLevel); - return null; - } - } else { - $result .= $this->origTokens->getTokenCode( - $pos, $commentStartPos, $indentAdjustment); - } - - if (!empty($delayedAdd)) { - /** @var Node $delayedAddNode */ - foreach ($delayedAdd as $delayedAddNode) { - if ($insertNewline) { - $delayedAddComments = $delayedAddNode->getComments(); - if ($delayedAddComments) { - $result .= $this->pComments($delayedAddComments) . $this->nl; - } - } - - $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true)); - - if ($insertNewline) { - $result .= $insertStr . $this->nl; - } else { - $result .= $insertStr; - } - } - - $delayedAdd = []; - } - - if ($comments !== $origComments) { - if ($comments) { - $result .= $this->pComments($comments) . $this->nl; - } - } else { - $result .= $this->origTokens->getTokenCode( - $commentStartPos, $itemStartPos, $indentAdjustment); - } - - // If we had to remove anything, we have done so now. - $skipRemovedNode = false; - } elseif ($diffType === DiffElem::TYPE_ADD) { - if (null === $insertStr) { - // We don't have insertion information for this list type - return null; - } - - if (!$arrItem instanceof Node) { - // We only support list insertion of nodes. - return null; - } - - // We go multiline if the original code was multiline, - // or if it's an array item with a comment above it. - // Match always uses multiline formatting. - if ($insertStr === ', ' && - ($this->isMultiline($origNodes) || $arrItem->getComments() || - $parentNodeClass === Expr\Match_::class) - ) { - $insertStr = ','; - $insertNewline = true; - } - - if ($beforeFirstKeepOrReplace) { - // Will be inserted at the next "replace" or "keep" element - $delayedAdd[] = $arrItem; - continue; - } - - $itemStartPos = $pos; - $itemEndPos = $pos - 1; - - $origIndentLevel = $this->indentLevel; - $this->setIndentLevel($lastElemIndentLevel); - - if ($insertNewline) { - $result .= $insertStr . $this->nl; - $comments = $arrItem->getComments(); - if ($comments) { - $result .= $this->pComments($comments) . $this->nl; - } - } else { - $result .= $insertStr; - } - } elseif ($diffType === DiffElem::TYPE_REMOVE) { - if (!$origArrItem instanceof Node) { - // We only support removal for nodes - return null; - } - - $itemStartPos = $origArrItem->getStartTokenPos(); - $itemEndPos = $origArrItem->getEndTokenPos(); - \assert($itemStartPos >= 0 && $itemEndPos >= 0); - - // Consider comments part of the node. - $origComments = $origArrItem->getComments(); - if ($origComments) { - $itemStartPos = $origComments[0]->getStartTokenPos(); - } - - if ($i === 0) { - // If we're removing from the start, keep the tokens before the node and drop those after it, - // instead of the other way around. - $result .= $this->origTokens->getTokenCode( - $pos, $itemStartPos, $indentAdjustment); - $skipRemovedNode = true; - } else { - if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || - $this->origTokens->haveTagInRange($pos, $itemStartPos))) { - // We'd remove the brace of a code block. - // TODO: Preserve formatting. - return null; - } - } - - $pos = $itemEndPos + 1; - continue; - } else { - throw new \Exception("Shouldn't happen"); - } - - if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { - $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); - } else { - $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - } - $this->safeAppend($result, $res); - - $this->setIndentLevel($origIndentLevel); - $pos = $itemEndPos + 1; - } - - if ($skipRemovedNode) { - // TODO: Support removing single node. - return null; - } - - if (!empty($delayedAdd)) { - if (!isset($this->emptyListInsertionMap[$mapKey])) { - return null; - } - - list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey]; - if (null !== $findToken) { - $insertPos = $this->origTokens->findRight($pos, $findToken) + 1; - $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment); - $pos = $insertPos; - } - - $first = true; - $result .= $extraLeft; - foreach ($delayedAdd as $delayedAddNode) { - if (!$first) { - $result .= $insertStr; - if ($insertNewline) { - $result .= $this->nl; - } - } - $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); - $first = false; - } - $result .= $extraRight === "\n" ? $this->nl : $extraRight; - } - - return $result; - } - - /** - * Print node with fixups. - * - * Fixups here refer to the addition of extra parentheses, braces or other characters, that - * are required to preserve program semantics in a certain context (e.g. to maintain precedence - * or because only certain expressions are allowed in certain places). - * - * @param int $fixup Fixup type - * @param Node $subNode Subnode to print - * @param string|null $parentClass Class of parent node - * @param int $subStartPos Original start pos of subnode - * @param int $subEndPos Original end pos of subnode - * - * @return string Result of fixed-up print of subnode - */ - protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { - switch ($fixup) { - case self::FIXUP_PREC_LEFT: - // We use a conservative approximation where lhsPrecedence == precedence. - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][1]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_PREC_RIGHT: - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][2]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_PREC_UNARY: - if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - $precedence = $this->precedenceMap[$parentClass][0]; - return $this->p($subNode, $precedence, $precedence); - } - break; - case self::FIXUP_CALL_LHS: - if ($this->callLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_DEREF_LHS: - if ($this->dereferenceLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_STATIC_DEREF_LHS: - if ($this->staticDereferenceLhsRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos) - ) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_NEW: - if ($this->newOperandRequiresParens($subNode) - && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { - return '(' . $this->p($subNode) . ')'; - } - break; - case self::FIXUP_BRACED_NAME: - case self::FIXUP_VAR_BRACED_NAME: - if ($subNode instanceof Expr - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { - return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '') - . '{' . $this->p($subNode) . '}'; - } - break; - case self::FIXUP_ENCAPSED: - if (!$subNode instanceof Node\InterpolatedStringPart - && !$this->origTokens->haveBraces($subStartPos, $subEndPos) - ) { - return '{' . $this->p($subNode) . '}'; - } - break; - default: - throw new \Exception('Cannot happen'); - } - - // Nothing special to do - return $this->p($subNode); - } - - /** - * Appends to a string, ensuring whitespace between label characters. - * - * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". - * Without safeAppend the result would be "echox", which does not preserve semantics. - * - * @param string $str - * @param string $append - */ - protected function safeAppend(string &$str, string $append): void { - if ($str === "") { - $str = $append; - return; - } - - if ($append === "") { - return; - } - - if (!$this->labelCharMap[$append[0]] - || !$this->labelCharMap[$str[\strlen($str) - 1]]) { - $str .= $append; - } else { - $str .= " " . $append; - } - } - - /** - * Determines whether the LHS of a call must be wrapped in parenthesis. - * - * @param Node $node LHS of a call - * - * @return bool Whether parentheses are required - */ - protected function callLhsRequiresParens(Node $node): bool { - return !($node instanceof Node\Name - || $node instanceof Expr\Variable - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_); - } - - /** - * Determines whether the LHS of an array/object operation must be wrapped in parentheses. - * - * @param Node $node LHS of dereferencing operation - * - * @return bool Whether parentheses are required - */ - protected function dereferenceLhsRequiresParens(Node $node): bool { - // A constant can occur on the LHS of an array/object deref, but not a static deref. - return $this->staticDereferenceLhsRequiresParens($node) - && !$node instanceof Expr\ConstFetch; - } - - /** - * Determines whether the LHS of a static operation must be wrapped in parentheses. - * - * @param Node $node LHS of dereferencing operation - * - * @return bool Whether parentheses are required - */ - protected function staticDereferenceLhsRequiresParens(Node $node): bool { - return !($node instanceof Expr\Variable - || $node instanceof Node\Name - || $node instanceof Expr\ArrayDimFetch - || $node instanceof Expr\PropertyFetch - || $node instanceof Expr\NullsafePropertyFetch - || $node instanceof Expr\StaticPropertyFetch - || $node instanceof Expr\FuncCall - || $node instanceof Expr\MethodCall - || $node instanceof Expr\NullsafeMethodCall - || $node instanceof Expr\StaticCall - || $node instanceof Expr\Array_ - || $node instanceof Scalar\String_ - || $node instanceof Expr\ClassConstFetch); - } - - /** - * Determines whether an expression used in "new" or "instanceof" requires parentheses. - * - * @param Node $node New or instanceof operand - * - * @return bool Whether parentheses are required - */ - protected function newOperandRequiresParens(Node $node): bool { - if ($node instanceof Node\Name || $node instanceof Expr\Variable) { - return false; - } - if ($node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || - $node instanceof Expr\NullsafePropertyFetch - ) { - return $this->newOperandRequiresParens($node->var); - } - if ($node instanceof Expr\StaticPropertyFetch) { - return $this->newOperandRequiresParens($node->class); - } - return true; - } - - /** - * Print modifiers, including trailing whitespace. - * - * @param int $modifiers Modifier mask to print - * - * @return string Printed modifiers - */ - protected function pModifiers(int $modifiers): string { - return ($modifiers & Modifiers::FINAL ? 'final ' : '') - . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') - . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') - . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') - . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') - . ($modifiers & Modifiers::STATIC ? 'static ' : '') - . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); - } - - protected function pStatic(bool $static): string { - return $static ? 'static ' : ''; - } - - /** - * Determine whether a list of nodes uses multiline formatting. - * - * @param (Node|null)[] $nodes Node list - * - * @return bool Whether multiline formatting is used - */ - protected function isMultiline(array $nodes): bool { - if (\count($nodes) < 2) { - return false; - } - - $pos = -1; - foreach ($nodes as $node) { - if (null === $node) { - continue; - } - - $endPos = $node->getEndTokenPos() + 1; - if ($pos >= 0) { - $text = $this->origTokens->getTokenCode($pos, $endPos, 0); - if (false === strpos($text, "\n")) { - // We require that a newline is present between *every* item. If the formatting - // is inconsistent, with only some items having newlines, we don't consider it - // as multiline - return false; - } - } - $pos = $endPos; - } - - return true; - } - - /** - * Lazily initializes label char map. - * - * The label char map determines whether a certain character may occur in a label. - */ - protected function initializeLabelCharMap(): void { - if ($this->labelCharMap) { - return; - } - - $this->labelCharMap = []; - for ($i = 0; $i < 256; $i++) { - // Since PHP 7.1 The lower range is 0x80. However, we also want to support code for - // older versions. - $chr = chr($i); - $this->labelCharMap[$chr] = $i >= 0x7f || ctype_alnum($chr); - } - } - - /** - * Lazily initializes node list differ. - * - * The node list differ is used to determine differences between two array subnodes. - */ - protected function initializeNodeListDiffer(): void { - if ($this->nodeListDiffer) { - return; - } - - $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { - if ($a instanceof Node && $b instanceof Node) { - return $a === $b->getAttribute('origNode'); - } - // Can happen for array destructuring - return $a === null && $b === null; - }); - } - - /** - * Lazily initializes fixup map. - * - * The fixup map is used to determine whether a certain subnode of a certain node may require - * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. - */ - protected function initializeFixupMap(): void { - if ($this->fixupMap) { - return; - } - - $this->fixupMap = [ - Expr\Instanceof_::class => [ - 'expr' => self::FIXUP_PREC_UNARY, - 'class' => self::FIXUP_NEW, - ], - Expr\Ternary::class => [ - 'cond' => self::FIXUP_PREC_LEFT, - 'else' => self::FIXUP_PREC_RIGHT, - ], - Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], - - Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], - Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], - Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], - Expr\ClassConstFetch::class => [ - 'class' => self::FIXUP_STATIC_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\New_::class => ['class' => self::FIXUP_NEW], - Expr\MethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafeMethodCall::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\StaticPropertyFetch::class => [ - 'class' => self::FIXUP_STATIC_DEREF_LHS, - 'name' => self::FIXUP_VAR_BRACED_NAME, - ], - Expr\PropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Expr\NullsafePropertyFetch::class => [ - 'var' => self::FIXUP_DEREF_LHS, - 'name' => self::FIXUP_BRACED_NAME, - ], - Scalar\InterpolatedString::class => [ - 'parts' => self::FIXUP_ENCAPSED, - ], - ]; - - $binaryOps = [ - BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class, - BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class, - BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class, - BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class, - BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class, - BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, - BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, - BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, - BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, - ]; - foreach ($binaryOps as $binaryOp) { - $this->fixupMap[$binaryOp] = [ - 'left' => self::FIXUP_PREC_LEFT, - 'right' => self::FIXUP_PREC_RIGHT - ]; - } - - $prefixOps = [ - Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, - Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, - Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, - Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, - Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, - AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, - AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, - Expr\ArrowFunction::class, Expr\Throw_::class, - ]; - foreach ($prefixOps as $prefixOp) { - $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; - } - } - - /** - * Lazily initializes the removal map. - * - * The removal map is used to determine which additional tokens should be removed when a - * certain node is replaced by null. - */ - protected function initializeRemovalMap(): void { - if ($this->removalMap) { - return; - } - - $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; - $stripLeft = ['left' => \T_WHITESPACE]; - $stripRight = ['right' => \T_WHITESPACE]; - $stripDoubleArrow = ['right' => \T_DOUBLE_ARROW]; - $stripColon = ['left' => ':']; - $stripEquals = ['left' => '=']; - $this->removalMap = [ - 'Expr_ArrayDimFetch->dim' => $stripBoth, - 'ArrayItem->key' => $stripDoubleArrow, - 'Expr_ArrowFunction->returnType' => $stripColon, - 'Expr_Closure->returnType' => $stripColon, - 'Expr_Exit->expr' => $stripBoth, - 'Expr_Ternary->if' => $stripBoth, - 'Expr_Yield->key' => $stripDoubleArrow, - 'Expr_Yield->value' => $stripBoth, - 'Param->type' => $stripRight, - 'Param->default' => $stripEquals, - 'Stmt_Break->num' => $stripBoth, - 'Stmt_Catch->var' => $stripLeft, - 'Stmt_ClassMethod->returnType' => $stripColon, - 'Stmt_Class->extends' => ['left' => \T_EXTENDS], - 'Stmt_Enum->scalarType' => $stripColon, - 'Stmt_EnumCase->expr' => $stripEquals, - 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], - 'Stmt_Continue->num' => $stripBoth, - 'Stmt_Foreach->keyVar' => $stripDoubleArrow, - 'Stmt_Function->returnType' => $stripColon, - 'Stmt_If->else' => $stripLeft, - 'Stmt_Namespace->name' => $stripLeft, - 'Stmt_Property->type' => $stripRight, - 'PropertyItem->default' => $stripEquals, - 'Stmt_Return->expr' => $stripBoth, - 'Stmt_StaticVar->default' => $stripEquals, - 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, - 'Stmt_TryCatch->finally' => $stripLeft, - // 'Stmt_Case->cond': Replace with "default" - // 'Stmt_Class->name': Unclear what to do - // 'Stmt_Declare->stmts': Not a plain node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a plain node - ]; - } - - protected function initializeInsertionMap(): void { - if ($this->insertionMap) { - return; - } - - // TODO: "yield" where both key and value are inserted doesn't work - // [$find, $beforeToken, $extraLeft, $extraRight] - $this->insertionMap = [ - 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], - 'ArrayItem->key' => [null, false, null, ' => '], - 'Expr_ArrowFunction->returnType' => [')', false, ': ', null], - 'Expr_Closure->returnType' => [')', false, ': ', null], - 'Expr_Ternary->if' => ['?', false, ' ', ' '], - 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], - 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], - 'Param->type' => [null, false, null, ' '], - 'Param->default' => [null, false, ' = ', null], - 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], - 'Stmt_Catch->var' => [null, false, ' ', null], - 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], - 'Stmt_Class->extends' => [null, false, ' extends ', null], - 'Stmt_Enum->scalarType' => [null, false, ' : ', null], - 'Stmt_EnumCase->expr' => [null, false, ' = ', null], - 'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', null], - 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], - 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], - 'Stmt_Function->returnType' => [')', false, ': ', null], - 'Stmt_If->else' => [null, false, ' ', null], - 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], - 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], - 'PropertyItem->default' => [null, false, ' = ', null], - 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], - 'Stmt_StaticVar->default' => [null, false, ' = ', null], - //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO - 'Stmt_TryCatch->finally' => [null, false, ' ', null], - - // 'Expr_Exit->expr': Complicated due to optional () - // 'Stmt_Case->cond': Conversion from default to case - // 'Stmt_Class->name': Unclear - // 'Stmt_Declare->stmts': Not a proper node - // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a proper node - ]; - } - - protected function initializeListInsertionMap(): void { - if ($this->listInsertionMap) { - return; - } - - $this->listInsertionMap = [ - // special - //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully - //'Scalar_InterpolatedString->parts' => '', - Stmt\Catch_::class . '->types' => '|', - UnionType::class . '->types' => '|', - IntersectionType::class . '->types' => '&', - Stmt\If_::class . '->elseifs' => ' ', - Stmt\TryCatch::class . '->catches' => ' ', - - // comma-separated lists - Expr\Array_::class . '->items' => ', ', - Expr\ArrowFunction::class . '->params' => ', ', - Expr\Closure::class . '->params' => ', ', - Expr\Closure::class . '->uses' => ', ', - Expr\FuncCall::class . '->args' => ', ', - Expr\Isset_::class . '->vars' => ', ', - Expr\List_::class . '->items' => ', ', - Expr\MethodCall::class . '->args' => ', ', - Expr\NullsafeMethodCall::class . '->args' => ', ', - Expr\New_::class . '->args' => ', ', - PrintableNewAnonClassNode::class . '->args' => ', ', - Expr\StaticCall::class . '->args' => ', ', - Stmt\ClassConst::class . '->consts' => ', ', - Stmt\ClassMethod::class . '->params' => ', ', - Stmt\Class_::class . '->implements' => ', ', - Stmt\Enum_::class . '->implements' => ', ', - PrintableNewAnonClassNode::class . '->implements' => ', ', - Stmt\Const_::class . '->consts' => ', ', - Stmt\Declare_::class . '->declares' => ', ', - Stmt\Echo_::class . '->exprs' => ', ', - Stmt\For_::class . '->init' => ', ', - Stmt\For_::class . '->cond' => ', ', - Stmt\For_::class . '->loop' => ', ', - Stmt\Function_::class . '->params' => ', ', - Stmt\Global_::class . '->vars' => ', ', - Stmt\GroupUse::class . '->uses' => ', ', - Stmt\Interface_::class . '->extends' => ', ', - Expr\Match_::class . '->arms' => ', ', - Stmt\Property::class . '->props' => ', ', - Stmt\StaticVar::class . '->vars' => ', ', - Stmt\TraitUse::class . '->traits' => ', ', - Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ', - Stmt\Unset_::class . '->vars' => ', ', - Stmt\UseUse::class . '->uses' => ', ', - MatchArm::class . '->conds' => ', ', - AttributeGroup::class . '->attrs' => ', ', - - // statement lists - Expr\Closure::class . '->stmts' => "\n", - Stmt\Case_::class . '->stmts' => "\n", - Stmt\Catch_::class . '->stmts' => "\n", - Stmt\Class_::class . '->stmts' => "\n", - Stmt\Enum_::class . '->stmts' => "\n", - PrintableNewAnonClassNode::class . '->stmts' => "\n", - Stmt\Interface_::class . '->stmts' => "\n", - Stmt\Trait_::class . '->stmts' => "\n", - Stmt\ClassMethod::class . '->stmts' => "\n", - Stmt\Declare_::class . '->stmts' => "\n", - Stmt\Do_::class . '->stmts' => "\n", - Stmt\ElseIf_::class . '->stmts' => "\n", - Stmt\Else_::class . '->stmts' => "\n", - Stmt\Finally_::class . '->stmts' => "\n", - Stmt\Foreach_::class . '->stmts' => "\n", - Stmt\For_::class . '->stmts' => "\n", - Stmt\Function_::class . '->stmts' => "\n", - Stmt\If_::class . '->stmts' => "\n", - Stmt\Namespace_::class . '->stmts' => "\n", - - // Attribute groups - Stmt\Class_::class . '->attrGroups' => "\n", - Stmt\Enum_::class . '->attrGroups' => "\n", - Stmt\EnumCase::class . '->attrGroups' => "\n", - Stmt\Interface_::class . '->attrGroups' => "\n", - Stmt\Trait_::class . '->attrGroups' => "\n", - Stmt\Function_::class . '->attrGroups' => "\n", - Stmt\ClassMethod::class . '->attrGroups' => "\n", - Stmt\ClassConst::class . '->attrGroups' => "\n", - Stmt\Property::class . '->attrGroups' => "\n", - PrintableNewAnonClassNode::class . '->attrGroups' => ' ', - Expr\Closure::class . '->attrGroups' => ' ', - Expr\ArrowFunction::class . '->attrGroups' => ' ', - Param::class . '->attrGroups' => ' ', - Stmt\Switch_::class . '->cases' => "\n", - Stmt\TraitUse::class . '->adaptations' => "\n", - Stmt\TryCatch::class . '->stmts' => "\n", - Stmt\While_::class . '->stmts' => "\n", - - // dummy for top-level context - 'File->stmts' => "\n", - ]; - } - - protected function initializeEmptyListInsertionMap(): void { - if ($this->emptyListInsertionMap) { - return; - } - - // TODO Insertion into empty statement lists. - - // [$find, $extraLeft, $extraRight] - $this->emptyListInsertionMap = [ - Expr\ArrowFunction::class . '->params' => ['(', '', ''], - Expr\Closure::class . '->uses' => [')', ' use (', ')'], - Expr\Closure::class . '->params' => ['(', '', ''], - Expr\FuncCall::class . '->args' => ['(', '', ''], - Expr\MethodCall::class . '->args' => ['(', '', ''], - Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], - Expr\New_::class . '->args' => ['(', '', ''], - PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], - PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], - Expr\StaticCall::class . '->args' => ['(', '', ''], - Stmt\Class_::class . '->implements' => [null, ' implements ', ''], - Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], - Stmt\ClassMethod::class . '->params' => ['(', '', ''], - Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], - Stmt\Function_::class . '->params' => ['(', '', ''], - Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], - Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], - Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], - Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], - Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], - Stmt\Property::class . '->attrGroups' => [null, '', "\n"], - Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], - Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], - Expr\Closure::class . '->attrGroups' => [null, '', ' '], - PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], - - /* These cannot be empty to start with: - * Expr_Isset->vars - * Stmt_Catch->types - * Stmt_Const->consts - * Stmt_ClassConst->consts - * Stmt_Declare->declares - * Stmt_Echo->exprs - * Stmt_Global->vars - * Stmt_GroupUse->uses - * Stmt_Property->props - * Stmt_StaticVar->vars - * Stmt_TraitUse->traits - * Stmt_TraitUseAdaptation_Precedence->insteadof - * Stmt_Unset->vars - * Stmt_Use->uses - * UnionType->types - */ - - /* TODO - * Stmt_If->elseifs - * Stmt_TryCatch->catches - * Expr_Array->items - * Expr_List->items - * Stmt_For->init - * Stmt_For->cond - * Stmt_For->loop - */ - ]; - } - - protected function initializeModifierChangeMap(): void { - if ($this->modifierChangeMap) { - return; - } - - $this->modifierChangeMap = [ - Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST], - Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], - Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], - Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], - Param::class . '->flags' => ['pModifiers', \T_VARIABLE], - Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], - Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], - //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO - ]; - - // List of integer subnodes that are not modifiers: - // Expr_Include->type - // Stmt_GroupUse->type - // Stmt_Use->type - // UseItem->type - } -} - -// @deprecated compatibility alias -class_alias(PrettyPrinter::class, PrettyPrinterAbstract::class); diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 23f9915db1..efdbcf5389 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -11,9 +11,9 @@ use PhpParser\Node\Scalar; use PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Stmt; -use PhpParser\PrettyPrinter; +use PhpParser\PrettyPrinterAbstract; -class Standard extends PrettyPrinter { +class Standard extends PrettyPrinterAbstract { // Special nodes protected function pParam(Node\Param $node): string { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 4116e457fb..4ab38a0423 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1,3 +1,1644 @@ */ + protected $precedenceMap = [ + // [precedence, precedenceLHS, precedenceRHS] + // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, + // where 1 is added to one of the sides depending on associativity. This information is not + // used for unary operators and set to -1. + Expr\Clone_::class => [-10, 0, 1], + BinaryOp\Pow::class => [ 0, 0, 1], + Expr\BitwiseNot::class => [ 10, -1, -1], + Expr\UnaryPlus::class => [ 10, -1, -1], + Expr\UnaryMinus::class => [ 10, -1, -1], + Cast\Int_::class => [ 10, -1, -1], + Cast\Double::class => [ 10, -1, -1], + Cast\String_::class => [ 10, -1, -1], + Cast\Array_::class => [ 10, -1, -1], + Cast\Object_::class => [ 10, -1, -1], + Cast\Bool_::class => [ 10, -1, -1], + Cast\Unset_::class => [ 10, -1, -1], + Expr\ErrorSuppress::class => [ 10, -1, -1], + Expr\Instanceof_::class => [ 20, -1, -1], + Expr\BooleanNot::class => [ 30, -1, -1], + BinaryOp\Mul::class => [ 40, 41, 40], + BinaryOp\Div::class => [ 40, 41, 40], + BinaryOp\Mod::class => [ 40, 41, 40], + BinaryOp\Plus::class => [ 50, 51, 50], + BinaryOp\Minus::class => [ 50, 51, 50], + BinaryOp\Concat::class => [ 50, 51, 50], + BinaryOp\ShiftLeft::class => [ 60, 61, 60], + BinaryOp\ShiftRight::class => [ 60, 61, 60], + BinaryOp\Smaller::class => [ 70, 70, 70], + BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], + BinaryOp\Greater::class => [ 70, 70, 70], + BinaryOp\GreaterOrEqual::class => [ 70, 70, 70], + BinaryOp\Equal::class => [ 80, 80, 80], + BinaryOp\NotEqual::class => [ 80, 80, 80], + BinaryOp\Identical::class => [ 80, 80, 80], + BinaryOp\NotIdentical::class => [ 80, 80, 80], + BinaryOp\Spaceship::class => [ 80, 80, 80], + BinaryOp\BitwiseAnd::class => [ 90, 91, 90], + BinaryOp\BitwiseXor::class => [100, 101, 100], + BinaryOp\BitwiseOr::class => [110, 111, 110], + BinaryOp\BooleanAnd::class => [120, 121, 120], + BinaryOp\BooleanOr::class => [130, 131, 130], + BinaryOp\Coalesce::class => [140, 140, 141], + Expr\Ternary::class => [150, -1, -1], + Expr\Assign::class => [160, -1, -1], + Expr\AssignRef::class => [160, -1, -1], + AssignOp\Plus::class => [160, -1, -1], + AssignOp\Minus::class => [160, -1, -1], + AssignOp\Mul::class => [160, -1, -1], + AssignOp\Div::class => [160, -1, -1], + AssignOp\Concat::class => [160, -1, -1], + AssignOp\Mod::class => [160, -1, -1], + AssignOp\BitwiseAnd::class => [160, -1, -1], + AssignOp\BitwiseOr::class => [160, -1, -1], + AssignOp\BitwiseXor::class => [160, -1, -1], + AssignOp\ShiftLeft::class => [160, -1, -1], + AssignOp\ShiftRight::class => [160, -1, -1], + AssignOp\Pow::class => [160, -1, -1], + AssignOp\Coalesce::class => [160, -1, -1], + Expr\YieldFrom::class => [170, -1, -1], + Expr\Yield_::class => [175, -1, -1], + Expr\Print_::class => [180, -1, -1], + BinaryOp\LogicalAnd::class => [190, 191, 190], + BinaryOp\LogicalXor::class => [200, 201, 200], + BinaryOp\LogicalOr::class => [210, 211, 210], + Expr\Include_::class => [220, -1, -1], + Expr\ArrowFunction::class => [230, -1, -1], + Expr\Throw_::class => [240, -1, -1], + ]; + + /** @var int Current indentation level. */ + protected $indentLevel; + /** @var string Newline including current indentation. */ + protected $nl; + /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. + * Null if flexible doc strings are used. */ + protected $docStringEndToken; + /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ + protected $canUseSemicolonNamespaces; + /** @var bool Whether to use short array syntax if the node specifies no preference */ + protected $shortArraySyntax; + /** @var PhpVersion PHP version to target */ + protected $phpVersion; + + /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ + protected $origTokens; + /** @var Internal\Differ|null Differ for node lists */ + protected $nodeListDiffer; + /** @var array Map determining whether a certain character is a label character */ + protected $labelCharMap; + /** + * @var array> Map from token classes and subnode names to FIXUP_* constants. + * This is used during format-preserving prints to place additional parens/braces if necessary. + */ + protected $fixupMap; + /** + * @var array Map from "{$node->getType()}->{$subNode}" + * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped + * when removing this node. + */ + protected $removalMap; + /** + * @var array Map from + * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. + * $find is an optional token after which the insertion occurs. $extraLeft/Right + * are optionally added before/after the main insertions. + */ + protected $insertionMap; + /** + * @var array Map From "{$class}->{$subNode}" to string that should be inserted + * between elements of this list subnode. + */ + protected $listInsertionMap; + + /** + * @var array + */ + protected $emptyListInsertionMap; + /** @var array Map from "{$class}->{$subNode}" to [$printFn, $token] + * where $printFn is the function to print the modifiers and $token is the token before which + * the modifiers should be reprinted. */ + protected $modifierChangeMap; + + /** + * Creates a pretty printer instance using the given options. + * + * Supported options: + * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.0). This option + * controls compatibility of the generated code with older PHP + * versions in cases where a simple stylistic choice exists (e.g. + * array() vs []). It is safe to pretty-print an AST for a newer + * PHP version while specifying an older target (but the result will + * of course not be compatible with the older version in that case). + * * bool $shortArraySyntax: Whether to use [] instead of array() as the default array + * syntax, if the node does not specify a format. Defaults to whether + * the phpVersion support short array syntax. + * + * @param array{phpVersion?: PhpVersion, shortArraySyntax?: bool} $options Dictionary of formatting options + */ + public function __construct(array $options = []) { + $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 0); + $this->shortArraySyntax = + $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); + $this->docStringEndToken = + $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); + } + + /** + * Reset pretty printing state. + */ + protected function resetState(): void { + $this->indentLevel = 0; + $this->nl = "\n"; + $this->origTokens = null; + } + + /** + * Set indentation level + * + * @param int $level Level in number of spaces + */ + protected function setIndentLevel(int $level): void { + $this->indentLevel = $level; + $this->nl = "\n" . \str_repeat(' ', $level); + } + + /** + * Increase indentation level. + */ + protected function indent(): void { + $this->indentLevel += 4; + $this->nl .= ' '; + } + + /** + * Decrease indentation level. + */ + protected function outdent(): void { + assert($this->indentLevel >= 4); + $this->indentLevel -= 4; + $this->nl = "\n" . str_repeat(' ', $this->indentLevel); + } + + /** + * Pretty prints an array of statements. + * + * @param Node[] $stmts Array of statements + * + * @return string Pretty printed statements + */ + public function prettyPrint(array $stmts): string { + $this->resetState(); + $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): string { + $this->resetState(); + return $this->handleMagicTokens($this->p($node)); + } + + /** + * Pretty prints a file of statements (includes the opening 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): void { + /* 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; + break; + } + } + } + + /** + * Handles (and removes) no-indent and doc-string-end tokens. + * + * @param string $str + * @return string + */ + protected function handleMagicTokens(string $str): string { + if ($this->docStringEndToken !== null) { + // 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, bool $indent = true): string { + if ($indent) { + $this->indent(); + } + + $result = ''; + foreach ($nodes as $node) { + $comments = $node->getComments(); + if ($comments) { + $result .= $this->nl . $this->pComments($comments); + if ($node instanceof Stmt\Nop) { + continue; + } + } + + $result .= $this->nl . $this->p($node); + } + + if ($indent) { + $this->outdent(); + } + + return $result; + } + + /** + * Pretty-print an infix operation while taking precedence into account. + * + * @param string $class Node class of operator + * @param Node $leftNode Left-hand side node + * @param string $operatorString String representation of the operator + * @param Node $rightNode Right-hand side node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * + * @return string Pretty printed infix operation + */ + protected function pInfixOp( + string $class, Node $leftNode, string $operatorString, Node $rightNode, + int $precedence, int $lhsPrecedence + ): string { + list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) + . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; + } + + /** + * Pretty-print a prefix operation while taking precedence into account. + * + * @param string $class Node class of operator + * @param string $operatorString String representation of the operator + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * + * @return string Pretty printed prefix operation + */ + protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $lhsPrecedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + $printedArg = $this->p($node, $opPrecedence, $lhsPrecedence); + if (($operatorString === '+' && $printedArg[0] === '+') || + ($operatorString === '-' && $printedArg[0] === '-') + ) { + // Avoid printing +(+$a) as ++$a and similar. + $printedArg = '(' . $printedArg . ')'; + } + return $prefix . $operatorString . $printedArg . $suffix; + } + + /** + * Pretty-print a postfix operation while taking precedence into account. + * + * @param string $class Node class of operator + * @param string $operatorString String representation of the operator + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * + * @return string Pretty printed postfix operation + */ + protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + if ($opPrecedence < $lhsPrecedence) { + $lhsPrecedence = $opPrecedence; + } + return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix; + } + + /** + * 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> $pre + */ + protected function pImplode(array $nodes, string $glue = ''): string { + $pNodes = []; + 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): string { + return $this->pImplode($nodes, ', '); + } + + /** + * Pretty prints a comma-separated list of nodes in multiline style, including comments. + * + * The result includes a leading newline and one level of indentation (same as pStmts). + * + * @param Node[] $nodes Array of Nodes to be printed + * @param bool $trailingComma Whether to use a trailing comma + * + * @return string Comma separated pretty printed nodes in multiline style + */ + protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string { + $this->indent(); + + $result = ''; + $lastIdx = count($nodes) - 1; + foreach ($nodes as $idx => $node) { + if ($node !== null) { + $comments = $node->getComments(); + if ($comments) { + $result .= $this->nl . $this->pComments($comments); + } + + $result .= $this->nl . $this->p($node); + } else { + $result .= $this->nl; + } + if ($trailingComma || $idx !== $lastIdx) { + $result .= ','; + } + } + + $this->outdent(); + return $result; + } + + /** + * Prints reformatted text of the passed comments. + * + * @param Comment[] $comments List of comments + * + * @return string Reformatted text of comments + */ + protected function pComments(array $comments): string { + $formattedComments = []; + + foreach ($comments as $comment) { + $formattedComments[] = str_replace("\n", $this->nl, $comment->getReformattedText()); + } + + return implode($this->nl, $formattedComments); + } + + /** + * Perform a format-preserving pretty print of an AST. + * + * The format preservation is best effort. For some changes to the AST the formatting will not + * be preserved (at least not locally). + * + * In order to use this method a number of prerequisites must be satisfied: + * * The startTokenPos and endTokenPos attributes in the lexer must be enabled. + * * The CloningVisitor must be run on the AST prior to modification. + * * The original tokens must be provided, using the getTokens() method on the lexer. + * + * @param Node[] $stmts Modified AST with links to original AST + * @param Node[] $origStmts Original AST with token offset information + * @param Token[] $origTokens Tokens of the original code + * + * @return string + */ + public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { + $this->initializeNodeListDiffer(); + $this->initializeLabelCharMap(); + $this->initializeFixupMap(); + $this->initializeRemovalMap(); + $this->initializeInsertionMap(); + $this->initializeListInsertionMap(); + $this->initializeEmptyListInsertionMap(); + $this->initializeModifierChangeMap(); + + $this->resetState(); + $this->origTokens = new TokenStream($origTokens); + + $this->preprocessNodes($stmts); + + $pos = 0; + $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); + if (null !== $result) { + $result .= $this->origTokens->getTokenCode($pos, count($origTokens) - 1, 0); + } else { + // Fallback + // TODO Add pStmts($stmts, false); + } + + return ltrim($this->handleMagicTokens($result)); + } + + protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); + } + + /** + * Pretty prints a node. + * + * This method also handles formatting preservation for nodes. + * + * @param Node $node Node to be pretty printed + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * @param bool $parentFormatPreserved Whether parent node has preserved formatting + * + * @return string Pretty printed node + */ + protected function p( + Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, + bool $parentFormatPreserved = false + ): string { + // No orig tokens means this is a normal pretty print without preservation of formatting + if (!$this->origTokens) { + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); + } + + /** @var Node|null $origNode */ + $origNode = $node->getAttribute('origNode'); + if (null === $origNode) { + return $this->pFallback($node, $precedence, $lhsPrecedence); + } + + $class = \get_class($node); + \assert($class === \get_class($origNode)); + + $startPos = $origNode->getStartTokenPos(); + $endPos = $origNode->getEndTokenPos(); + \assert($startPos >= 0 && $endPos >= 0); + + $fallbackNode = $node; + if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { + // Normalize node structure of anonymous classes + assert($origNode instanceof Expr\New_); + $node = PrintableNewAnonClassNode::fromNewNode($node); + $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); + $class = PrintableNewAnonClassNode::class; + } + + // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting + // is not preserved, then we need to use the fallback code to make sure the tags are + // printed. + if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); + + $type = $node->getType(); + $fixupInfo = $this->fixupMap[$class] ?? null; + + $result = ''; + $pos = $startPos; + foreach ($node->getSubNodeNames() as $subNodeName) { + $subNode = $node->$subNodeName; + $origSubNode = $origNode->$subNodeName; + + if ((!$subNode instanceof Node && $subNode !== null) + || (!$origSubNode instanceof Node && $origSubNode !== null) + ) { + if ($subNode === $origSubNode) { + // Unchanged, can reuse old code + continue; + } + + if (is_array($subNode) && is_array($origSubNode)) { + // Array subnode changed, we might be able to reconstruct it + $listResult = $this->pArray( + $subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, + $fixupInfo[$subNodeName] ?? null + ); + if (null === $listResult) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + $result .= $listResult; + continue; + } + + // Check if this is a modifier change + $key = $class . '->' . $subNodeName; + if (!isset($this->modifierChangeMap[$key])) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + [$printFn, $findToken] = $this->modifierChangeMap[$key]; + $result .= $this->$printFn($subNode); + $pos = $this->origTokens->findRight($pos, $findToken); + continue; + } + + $extraLeft = ''; + $extraRight = ''; + if ($origSubNode !== null) { + $subStartPos = $origSubNode->getStartTokenPos(); + $subEndPos = $origSubNode->getEndTokenPos(); + \assert($subStartPos >= 0 && $subEndPos >= 0); + } else { + if ($subNode === null) { + // Both null, nothing to do + continue; + } + + // A node has been inserted, check if we have insertion information for it + $key = $type . '->' . $subNodeName; + if (!isset($this->insertionMap[$key])) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; + if (null !== $findToken) { + $subStartPos = $this->origTokens->findRight($pos, $findToken) + + (int) !$beforeToken; + } else { + $subStartPos = $pos; + } + + if (null === $extraLeft && null !== $extraRight) { + // If inserting on the right only, skipping whitespace looks better + $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos); + } + $subEndPos = $subStartPos - 1; + } + + if (null === $subNode) { + // A node has been removed, check if we have removal information for it + $key = $type . '->' . $subNodeName; + if (!isset($this->removalMap[$key])) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); + } + + // Adjust positions to account for additional tokens that must be skipped + $removalInfo = $this->removalMap[$key]; + if (isset($removalInfo['left'])) { + $subStartPos = $this->origTokens->skipLeft($subStartPos - 1, $removalInfo['left']) + 1; + } + if (isset($removalInfo['right'])) { + $subEndPos = $this->origTokens->skipRight($subEndPos + 1, $removalInfo['right']) - 1; + } + } + + $result .= $this->origTokens->getTokenCode($pos, $subStartPos, $indentAdjustment); + + if (null !== $subNode) { + $result .= $extraLeft; + + $origIndentLevel = $this->indentLevel; + $this->setIndentLevel($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment); + + // If it's the same node that was previously in this position, it certainly doesn't + // need fixup. It's important to check this here, because our fixup checks are more + // conservative than strictly necessary. + if (isset($fixupInfo[$subNodeName]) + && $subNode->getAttribute('origNode') !== $origSubNode + ) { + $fixup = $fixupInfo[$subNodeName]; + $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); + } else { + $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); + } + + $this->safeAppend($result, $res); + $this->setIndentLevel($origIndentLevel); + + $result .= $extraRight; + } + + $pos = $subEndPos + 1; + } + + $result .= $this->origTokens->getTokenCode($pos, $endPos + 1, $indentAdjustment); + return $result; + } + + /** + * Perform a format-preserving pretty print of an array. + * + * @param Node[] $nodes New nodes + * @param Node[] $origNodes Original nodes + * @param int $pos Current token position (updated by reference) + * @param int $indentAdjustment Adjustment for indentation + * @param string $parentNodeClass Class of the containing node. + * @param string $subNodeName Name of array subnode. + * @param null|int $fixup Fixup information for array item nodes + * + * @return null|string Result of pretty print or null if cannot preserve formatting + */ + protected function pArray( + array $nodes, array $origNodes, int &$pos, int $indentAdjustment, + string $parentNodeClass, string $subNodeName, ?int $fixup + ): ?string { + $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); + + $mapKey = $parentNodeClass . '->' . $subNodeName; + $insertStr = $this->listInsertionMap[$mapKey] ?? null; + $isStmtList = $subNodeName === 'stmts'; + + $beforeFirstKeepOrReplace = true; + $skipRemovedNode = false; + $delayedAdd = []; + $lastElemIndentLevel = $this->indentLevel; + + $insertNewline = false; + if ($insertStr === "\n") { + $insertStr = ''; + $insertNewline = true; + } + + if ($isStmtList && \count($origNodes) === 1 && \count($nodes) !== 1) { + $startPos = $origNodes[0]->getStartTokenPos(); + $endPos = $origNodes[0]->getEndTokenPos(); + \assert($startPos >= 0 && $endPos >= 0); + if (!$this->origTokens->haveBraces($startPos, $endPos)) { + // This was a single statement without braces, but either additional statements + // have been added, or the single statement has been removed. This requires the + // addition of braces. For now fall back. + // TODO: Try to preserve formatting + return null; + } + } + + $result = ''; + foreach ($diff as $i => $diffElem) { + $diffType = $diffElem->type; + /** @var Node|string|null $arrItem */ + $arrItem = $diffElem->new; + /** @var Node|string|null $origArrItem */ + $origArrItem = $diffElem->old; + + if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { + $beforeFirstKeepOrReplace = false; + + if ($origArrItem === null || $arrItem === null) { + // We can only handle the case where both are null + if ($origArrItem === $arrItem) { + continue; + } + return null; + } + + if (!$arrItem instanceof Node || !$origArrItem instanceof Node) { + // We can only deal with nodes. This can occur for Names, which use string arrays. + return null; + } + + $itemStartPos = $origArrItem->getStartTokenPos(); + $itemEndPos = $origArrItem->getEndTokenPos(); + \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos); + + $origIndentLevel = $this->indentLevel; + $lastElemIndentLevel = $this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment; + $this->setIndentLevel($lastElemIndentLevel); + + $comments = $arrItem->getComments(); + $origComments = $origArrItem->getComments(); + $commentStartPos = $origComments ? $origComments[0]->getStartTokenPos() : $itemStartPos; + \assert($commentStartPos >= 0); + + if ($commentStartPos < $pos) { + // Comments may be assigned to multiple nodes if they start at the same position. + // Make sure we don't try to print them multiple times. + $commentStartPos = $itemStartPos; + } + + if ($skipRemovedNode) { + if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || + $this->origTokens->haveTagInRange($pos, $itemStartPos))) { + // We'd remove the brace of a code block. + // TODO: Preserve formatting. + $this->setIndentLevel($origIndentLevel); + return null; + } + } else { + $result .= $this->origTokens->getTokenCode( + $pos, $commentStartPos, $indentAdjustment); + } + + if (!empty($delayedAdd)) { + /** @var Node $delayedAddNode */ + foreach ($delayedAdd as $delayedAddNode) { + if ($insertNewline) { + $delayedAddComments = $delayedAddNode->getComments(); + if ($delayedAddComments) { + $result .= $this->pComments($delayedAddComments) . $this->nl; + } + } + + $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true)); + + if ($insertNewline) { + $result .= $insertStr . $this->nl; + } else { + $result .= $insertStr; + } + } + + $delayedAdd = []; + } + + if ($comments !== $origComments) { + if ($comments) { + $result .= $this->pComments($comments) . $this->nl; + } + } else { + $result .= $this->origTokens->getTokenCode( + $commentStartPos, $itemStartPos, $indentAdjustment); + } + + // If we had to remove anything, we have done so now. + $skipRemovedNode = false; + } elseif ($diffType === DiffElem::TYPE_ADD) { + if (null === $insertStr) { + // We don't have insertion information for this list type + return null; + } + + if (!$arrItem instanceof Node) { + // We only support list insertion of nodes. + return null; + } + + // We go multiline if the original code was multiline, + // or if it's an array item with a comment above it. + // Match always uses multiline formatting. + if ($insertStr === ', ' && + ($this->isMultiline($origNodes) || $arrItem->getComments() || + $parentNodeClass === Expr\Match_::class) + ) { + $insertStr = ','; + $insertNewline = true; + } + + if ($beforeFirstKeepOrReplace) { + // Will be inserted at the next "replace" or "keep" element + $delayedAdd[] = $arrItem; + continue; + } + + $itemStartPos = $pos; + $itemEndPos = $pos - 1; + + $origIndentLevel = $this->indentLevel; + $this->setIndentLevel($lastElemIndentLevel); + + if ($insertNewline) { + $result .= $insertStr . $this->nl; + $comments = $arrItem->getComments(); + if ($comments) { + $result .= $this->pComments($comments) . $this->nl; + } + } else { + $result .= $insertStr; + } + } elseif ($diffType === DiffElem::TYPE_REMOVE) { + if (!$origArrItem instanceof Node) { + // We only support removal for nodes + return null; + } + + $itemStartPos = $origArrItem->getStartTokenPos(); + $itemEndPos = $origArrItem->getEndTokenPos(); + \assert($itemStartPos >= 0 && $itemEndPos >= 0); + + // Consider comments part of the node. + $origComments = $origArrItem->getComments(); + if ($origComments) { + $itemStartPos = $origComments[0]->getStartTokenPos(); + } + + if ($i === 0) { + // If we're removing from the start, keep the tokens before the node and drop those after it, + // instead of the other way around. + $result .= $this->origTokens->getTokenCode( + $pos, $itemStartPos, $indentAdjustment); + $skipRemovedNode = true; + } else { + if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || + $this->origTokens->haveTagInRange($pos, $itemStartPos))) { + // We'd remove the brace of a code block. + // TODO: Preserve formatting. + return null; + } + } + + $pos = $itemEndPos + 1; + continue; + } else { + throw new \Exception("Shouldn't happen"); + } + + if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { + $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); + } else { + $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); + } + $this->safeAppend($result, $res); + + $this->setIndentLevel($origIndentLevel); + $pos = $itemEndPos + 1; + } + + if ($skipRemovedNode) { + // TODO: Support removing single node. + return null; + } + + if (!empty($delayedAdd)) { + if (!isset($this->emptyListInsertionMap[$mapKey])) { + return null; + } + + list($findToken, $extraLeft, $extraRight) = $this->emptyListInsertionMap[$mapKey]; + if (null !== $findToken) { + $insertPos = $this->origTokens->findRight($pos, $findToken) + 1; + $result .= $this->origTokens->getTokenCode($pos, $insertPos, $indentAdjustment); + $pos = $insertPos; + } + + $first = true; + $result .= $extraLeft; + foreach ($delayedAdd as $delayedAddNode) { + if (!$first) { + $result .= $insertStr; + if ($insertNewline) { + $result .= $this->nl; + } + } + $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); + $first = false; + } + $result .= $extraRight === "\n" ? $this->nl : $extraRight; + } + + return $result; + } + + /** + * Print node with fixups. + * + * Fixups here refer to the addition of extra parentheses, braces or other characters, that + * are required to preserve program semantics in a certain context (e.g. to maintain precedence + * or because only certain expressions are allowed in certain places). + * + * @param int $fixup Fixup type + * @param Node $subNode Subnode to print + * @param string|null $parentClass Class of parent node + * @param int $subStartPos Original start pos of subnode + * @param int $subEndPos Original end pos of subnode + * + * @return string Result of fixed-up print of subnode + */ + protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { + switch ($fixup) { + case self::FIXUP_PREC_LEFT: + // We use a conservative approximation where lhsPrecedence == precedence. + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][1]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_PREC_RIGHT: + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][2]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_PREC_UNARY: + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][0]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_CALL_LHS: + if ($this->callLhsRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos) + ) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_DEREF_LHS: + if ($this->dereferenceLhsRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos) + ) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_STATIC_DEREF_LHS: + if ($this->staticDereferenceLhsRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos) + ) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_NEW: + if ($this->newOperandRequiresParens($subNode) + && !$this->origTokens->haveParens($subStartPos, $subEndPos)) { + return '(' . $this->p($subNode) . ')'; + } + break; + case self::FIXUP_BRACED_NAME: + case self::FIXUP_VAR_BRACED_NAME: + if ($subNode instanceof Expr + && !$this->origTokens->haveBraces($subStartPos, $subEndPos) + ) { + return ($fixup === self::FIXUP_VAR_BRACED_NAME ? '$' : '') + . '{' . $this->p($subNode) . '}'; + } + break; + case self::FIXUP_ENCAPSED: + if (!$subNode instanceof Node\InterpolatedStringPart + && !$this->origTokens->haveBraces($subStartPos, $subEndPos) + ) { + return '{' . $this->p($subNode) . '}'; + } + break; + default: + throw new \Exception('Cannot happen'); + } + + // Nothing special to do + return $this->p($subNode); + } + + /** + * Appends to a string, ensuring whitespace between label characters. + * + * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". + * Without safeAppend the result would be "echox", which does not preserve semantics. + * + * @param string $str + * @param string $append + */ + protected function safeAppend(string &$str, string $append): void { + if ($str === "") { + $str = $append; + return; + } + + if ($append === "") { + return; + } + + if (!$this->labelCharMap[$append[0]] + || !$this->labelCharMap[$str[\strlen($str) - 1]]) { + $str .= $append; + } else { + $str .= " " . $append; + } + } + + /** + * Determines whether the LHS of a call must be wrapped in parenthesis. + * + * @param Node $node LHS of a call + * + * @return bool Whether parentheses are required + */ + protected function callLhsRequiresParens(Node $node): bool { + return !($node instanceof Node\Name + || $node instanceof Expr\Variable + || $node instanceof Expr\ArrayDimFetch + || $node instanceof Expr\FuncCall + || $node instanceof Expr\MethodCall + || $node instanceof Expr\NullsafeMethodCall + || $node instanceof Expr\StaticCall + || $node instanceof Expr\Array_); + } + + /** + * Determines whether the LHS of an array/object operation must be wrapped in parentheses. + * + * @param Node $node LHS of dereferencing operation + * + * @return bool Whether parentheses are required + */ + protected function dereferenceLhsRequiresParens(Node $node): bool { + // A constant can occur on the LHS of an array/object deref, but not a static deref. + return $this->staticDereferenceLhsRequiresParens($node) + && !$node instanceof Expr\ConstFetch; + } + + /** + * Determines whether the LHS of a static operation must be wrapped in parentheses. + * + * @param Node $node LHS of dereferencing operation + * + * @return bool Whether parentheses are required + */ + protected function staticDereferenceLhsRequiresParens(Node $node): bool { + return !($node instanceof Expr\Variable + || $node instanceof Node\Name + || $node instanceof Expr\ArrayDimFetch + || $node instanceof Expr\PropertyFetch + || $node instanceof Expr\NullsafePropertyFetch + || $node instanceof Expr\StaticPropertyFetch + || $node instanceof Expr\FuncCall + || $node instanceof Expr\MethodCall + || $node instanceof Expr\NullsafeMethodCall + || $node instanceof Expr\StaticCall + || $node instanceof Expr\Array_ + || $node instanceof Scalar\String_ + || $node instanceof Expr\ClassConstFetch); + } + + /** + * Determines whether an expression used in "new" or "instanceof" requires parentheses. + * + * @param Node $node New or instanceof operand + * + * @return bool Whether parentheses are required + */ + protected function newOperandRequiresParens(Node $node): bool { + if ($node instanceof Node\Name || $node instanceof Expr\Variable) { + return false; + } + if ($node instanceof Expr\ArrayDimFetch || $node instanceof Expr\PropertyFetch || + $node instanceof Expr\NullsafePropertyFetch + ) { + return $this->newOperandRequiresParens($node->var); + } + if ($node instanceof Expr\StaticPropertyFetch) { + return $this->newOperandRequiresParens($node->class); + } + return true; + } + + /** + * Print modifiers, including trailing whitespace. + * + * @param int $modifiers Modifier mask to print + * + * @return string Printed modifiers + */ + protected function pModifiers(int $modifiers): string { + return ($modifiers & Modifiers::FINAL ? 'final ' : '') + . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') + . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') + . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') + . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') + . ($modifiers & Modifiers::STATIC ? 'static ' : '') + . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); + } + + protected function pStatic(bool $static): string { + return $static ? 'static ' : ''; + } + + /** + * Determine whether a list of nodes uses multiline formatting. + * + * @param (Node|null)[] $nodes Node list + * + * @return bool Whether multiline formatting is used + */ + protected function isMultiline(array $nodes): bool { + if (\count($nodes) < 2) { + return false; + } + + $pos = -1; + foreach ($nodes as $node) { + if (null === $node) { + continue; + } + + $endPos = $node->getEndTokenPos() + 1; + if ($pos >= 0) { + $text = $this->origTokens->getTokenCode($pos, $endPos, 0); + if (false === strpos($text, "\n")) { + // We require that a newline is present between *every* item. If the formatting + // is inconsistent, with only some items having newlines, we don't consider it + // as multiline + return false; + } + } + $pos = $endPos; + } + + return true; + } + + /** + * Lazily initializes label char map. + * + * The label char map determines whether a certain character may occur in a label. + */ + protected function initializeLabelCharMap(): void { + if ($this->labelCharMap) { + return; + } + + $this->labelCharMap = []; + for ($i = 0; $i < 256; $i++) { + // Since PHP 7.1 The lower range is 0x80. However, we also want to support code for + // older versions. + $chr = chr($i); + $this->labelCharMap[$chr] = $i >= 0x7f || ctype_alnum($chr); + } + } + + /** + * Lazily initializes node list differ. + * + * The node list differ is used to determine differences between two array subnodes. + */ + protected function initializeNodeListDiffer(): void { + if ($this->nodeListDiffer) { + return; + } + + $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { + if ($a instanceof Node && $b instanceof Node) { + return $a === $b->getAttribute('origNode'); + } + // Can happen for array destructuring + return $a === null && $b === null; + }); + } + + /** + * Lazily initializes fixup map. + * + * The fixup map is used to determine whether a certain subnode of a certain node may require + * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. + */ + protected function initializeFixupMap(): void { + if ($this->fixupMap) { + return; + } + + $this->fixupMap = [ + Expr\Instanceof_::class => [ + 'expr' => self::FIXUP_PREC_UNARY, + 'class' => self::FIXUP_NEW, + ], + Expr\Ternary::class => [ + 'cond' => self::FIXUP_PREC_LEFT, + 'else' => self::FIXUP_PREC_RIGHT, + ], + Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], + + Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], + Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], + Expr\ArrayDimFetch::class => ['var' => self::FIXUP_DEREF_LHS], + Expr\ClassConstFetch::class => [ + 'class' => self::FIXUP_STATIC_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\New_::class => ['class' => self::FIXUP_NEW], + Expr\MethodCall::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\NullsafeMethodCall::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\StaticPropertyFetch::class => [ + 'class' => self::FIXUP_STATIC_DEREF_LHS, + 'name' => self::FIXUP_VAR_BRACED_NAME, + ], + Expr\PropertyFetch::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Expr\NullsafePropertyFetch::class => [ + 'var' => self::FIXUP_DEREF_LHS, + 'name' => self::FIXUP_BRACED_NAME, + ], + Scalar\InterpolatedString::class => [ + 'parts' => self::FIXUP_ENCAPSED, + ], + ]; + + $binaryOps = [ + BinaryOp\Pow::class, BinaryOp\Mul::class, BinaryOp\Div::class, BinaryOp\Mod::class, + BinaryOp\Plus::class, BinaryOp\Minus::class, BinaryOp\Concat::class, + BinaryOp\ShiftLeft::class, BinaryOp\ShiftRight::class, BinaryOp\Smaller::class, + BinaryOp\SmallerOrEqual::class, BinaryOp\Greater::class, BinaryOp\GreaterOrEqual::class, + BinaryOp\Equal::class, BinaryOp\NotEqual::class, BinaryOp\Identical::class, + BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, + BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, + BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, + BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, + ]; + foreach ($binaryOps as $binaryOp) { + $this->fixupMap[$binaryOp] = [ + 'left' => self::FIXUP_PREC_LEFT, + 'right' => self::FIXUP_PREC_RIGHT + ]; + } + + $prefixOps = [ + Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, + Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, + Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, + Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, + Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, + AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, + AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, + AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, + Expr\ArrowFunction::class, Expr\Throw_::class, + ]; + foreach ($prefixOps as $prefixOp) { + $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; + } + } + + /** + * Lazily initializes the removal map. + * + * The removal map is used to determine which additional tokens should be removed when a + * certain node is replaced by null. + */ + protected function initializeRemovalMap(): void { + if ($this->removalMap) { + return; + } + + $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; + $stripLeft = ['left' => \T_WHITESPACE]; + $stripRight = ['right' => \T_WHITESPACE]; + $stripDoubleArrow = ['right' => \T_DOUBLE_ARROW]; + $stripColon = ['left' => ':']; + $stripEquals = ['left' => '=']; + $this->removalMap = [ + 'Expr_ArrayDimFetch->dim' => $stripBoth, + 'ArrayItem->key' => $stripDoubleArrow, + 'Expr_ArrowFunction->returnType' => $stripColon, + 'Expr_Closure->returnType' => $stripColon, + 'Expr_Exit->expr' => $stripBoth, + 'Expr_Ternary->if' => $stripBoth, + 'Expr_Yield->key' => $stripDoubleArrow, + 'Expr_Yield->value' => $stripBoth, + 'Param->type' => $stripRight, + 'Param->default' => $stripEquals, + 'Stmt_Break->num' => $stripBoth, + 'Stmt_Catch->var' => $stripLeft, + 'Stmt_ClassMethod->returnType' => $stripColon, + 'Stmt_Class->extends' => ['left' => \T_EXTENDS], + 'Stmt_Enum->scalarType' => $stripColon, + 'Stmt_EnumCase->expr' => $stripEquals, + 'Expr_PrintableNewAnonClass->extends' => ['left' => \T_EXTENDS], + 'Stmt_Continue->num' => $stripBoth, + 'Stmt_Foreach->keyVar' => $stripDoubleArrow, + 'Stmt_Function->returnType' => $stripColon, + 'Stmt_If->else' => $stripLeft, + 'Stmt_Namespace->name' => $stripLeft, + 'Stmt_Property->type' => $stripRight, + 'PropertyItem->default' => $stripEquals, + 'Stmt_Return->expr' => $stripBoth, + 'Stmt_StaticVar->default' => $stripEquals, + 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, + 'Stmt_TryCatch->finally' => $stripLeft, + // 'Stmt_Case->cond': Replace with "default" + // 'Stmt_Class->name': Unclear what to do + // 'Stmt_Declare->stmts': Not a plain node + // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a plain node + ]; + } + + protected function initializeInsertionMap(): void { + if ($this->insertionMap) { + return; + } + + // TODO: "yield" where both key and value are inserted doesn't work + // [$find, $beforeToken, $extraLeft, $extraRight] + $this->insertionMap = [ + 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], + 'ArrayItem->key' => [null, false, null, ' => '], + 'Expr_ArrowFunction->returnType' => [')', false, ': ', null], + 'Expr_Closure->returnType' => [')', false, ': ', null], + 'Expr_Ternary->if' => ['?', false, ' ', ' '], + 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], + 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], + 'Param->type' => [null, false, null, ' '], + 'Param->default' => [null, false, ' = ', null], + 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], + 'Stmt_Catch->var' => [null, false, ' ', null], + 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], + 'Stmt_Class->extends' => [null, false, ' extends ', null], + 'Stmt_Enum->scalarType' => [null, false, ' : ', null], + 'Stmt_EnumCase->expr' => [null, false, ' = ', null], + 'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', null], + 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], + 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], + 'Stmt_Function->returnType' => [')', false, ': ', null], + 'Stmt_If->else' => [null, false, ' ', null], + 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], + 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], + 'PropertyItem->default' => [null, false, ' = ', null], + 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], + 'Stmt_StaticVar->default' => [null, false, ' = ', null], + //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO + 'Stmt_TryCatch->finally' => [null, false, ' ', null], + + // 'Expr_Exit->expr': Complicated due to optional () + // 'Stmt_Case->cond': Conversion from default to case + // 'Stmt_Class->name': Unclear + // 'Stmt_Declare->stmts': Not a proper node + // 'Stmt_TraitUseAdaptation_Alias->newModifier': Not a proper node + ]; + } + + protected function initializeListInsertionMap(): void { + if ($this->listInsertionMap) { + return; + } + + $this->listInsertionMap = [ + // special + //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully + //'Scalar_InterpolatedString->parts' => '', + Stmt\Catch_::class . '->types' => '|', + UnionType::class . '->types' => '|', + IntersectionType::class . '->types' => '&', + Stmt\If_::class . '->elseifs' => ' ', + Stmt\TryCatch::class . '->catches' => ' ', + + // comma-separated lists + Expr\Array_::class . '->items' => ', ', + Expr\ArrowFunction::class . '->params' => ', ', + Expr\Closure::class . '->params' => ', ', + Expr\Closure::class . '->uses' => ', ', + Expr\FuncCall::class . '->args' => ', ', + Expr\Isset_::class . '->vars' => ', ', + Expr\List_::class . '->items' => ', ', + Expr\MethodCall::class . '->args' => ', ', + Expr\NullsafeMethodCall::class . '->args' => ', ', + Expr\New_::class . '->args' => ', ', + PrintableNewAnonClassNode::class . '->args' => ', ', + Expr\StaticCall::class . '->args' => ', ', + Stmt\ClassConst::class . '->consts' => ', ', + Stmt\ClassMethod::class . '->params' => ', ', + Stmt\Class_::class . '->implements' => ', ', + Stmt\Enum_::class . '->implements' => ', ', + PrintableNewAnonClassNode::class . '->implements' => ', ', + Stmt\Const_::class . '->consts' => ', ', + Stmt\Declare_::class . '->declares' => ', ', + Stmt\Echo_::class . '->exprs' => ', ', + Stmt\For_::class . '->init' => ', ', + Stmt\For_::class . '->cond' => ', ', + Stmt\For_::class . '->loop' => ', ', + Stmt\Function_::class . '->params' => ', ', + Stmt\Global_::class . '->vars' => ', ', + Stmt\GroupUse::class . '->uses' => ', ', + Stmt\Interface_::class . '->extends' => ', ', + Expr\Match_::class . '->arms' => ', ', + Stmt\Property::class . '->props' => ', ', + Stmt\StaticVar::class . '->vars' => ', ', + Stmt\TraitUse::class . '->traits' => ', ', + Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ', + Stmt\Unset_::class . '->vars' => ', ', + Stmt\UseUse::class . '->uses' => ', ', + MatchArm::class . '->conds' => ', ', + AttributeGroup::class . '->attrs' => ', ', + + // statement lists + Expr\Closure::class . '->stmts' => "\n", + Stmt\Case_::class . '->stmts' => "\n", + Stmt\Catch_::class . '->stmts' => "\n", + Stmt\Class_::class . '->stmts' => "\n", + Stmt\Enum_::class . '->stmts' => "\n", + PrintableNewAnonClassNode::class . '->stmts' => "\n", + Stmt\Interface_::class . '->stmts' => "\n", + Stmt\Trait_::class . '->stmts' => "\n", + Stmt\ClassMethod::class . '->stmts' => "\n", + Stmt\Declare_::class . '->stmts' => "\n", + Stmt\Do_::class . '->stmts' => "\n", + Stmt\ElseIf_::class . '->stmts' => "\n", + Stmt\Else_::class . '->stmts' => "\n", + Stmt\Finally_::class . '->stmts' => "\n", + Stmt\Foreach_::class . '->stmts' => "\n", + Stmt\For_::class . '->stmts' => "\n", + Stmt\Function_::class . '->stmts' => "\n", + Stmt\If_::class . '->stmts' => "\n", + Stmt\Namespace_::class . '->stmts' => "\n", + + // Attribute groups + Stmt\Class_::class . '->attrGroups' => "\n", + Stmt\Enum_::class . '->attrGroups' => "\n", + Stmt\EnumCase::class . '->attrGroups' => "\n", + Stmt\Interface_::class . '->attrGroups' => "\n", + Stmt\Trait_::class . '->attrGroups' => "\n", + Stmt\Function_::class . '->attrGroups' => "\n", + Stmt\ClassMethod::class . '->attrGroups' => "\n", + Stmt\ClassConst::class . '->attrGroups' => "\n", + Stmt\Property::class . '->attrGroups' => "\n", + PrintableNewAnonClassNode::class . '->attrGroups' => ' ', + Expr\Closure::class . '->attrGroups' => ' ', + Expr\ArrowFunction::class . '->attrGroups' => ' ', + Param::class . '->attrGroups' => ' ', + Stmt\Switch_::class . '->cases' => "\n", + Stmt\TraitUse::class . '->adaptations' => "\n", + Stmt\TryCatch::class . '->stmts' => "\n", + Stmt\While_::class . '->stmts' => "\n", + + // dummy for top-level context + 'File->stmts' => "\n", + ]; + } + + protected function initializeEmptyListInsertionMap(): void { + if ($this->emptyListInsertionMap) { + return; + } + + // TODO Insertion into empty statement lists. + + // [$find, $extraLeft, $extraRight] + $this->emptyListInsertionMap = [ + Expr\ArrowFunction::class . '->params' => ['(', '', ''], + Expr\Closure::class . '->uses' => [')', ' use (', ')'], + Expr\Closure::class . '->params' => ['(', '', ''], + Expr\FuncCall::class . '->args' => ['(', '', ''], + Expr\MethodCall::class . '->args' => ['(', '', ''], + Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], + Expr\New_::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], + Expr\StaticCall::class . '->args' => ['(', '', ''], + Stmt\Class_::class . '->implements' => [null, ' implements ', ''], + Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], + Stmt\ClassMethod::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], + Stmt\Function_::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], + Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Property::class . '->attrGroups' => [null, '', "\n"], + Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], + Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], + Expr\Closure::class . '->attrGroups' => [null, '', ' '], + PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], + + /* These cannot be empty to start with: + * Expr_Isset->vars + * Stmt_Catch->types + * Stmt_Const->consts + * Stmt_ClassConst->consts + * Stmt_Declare->declares + * Stmt_Echo->exprs + * Stmt_Global->vars + * Stmt_GroupUse->uses + * Stmt_Property->props + * Stmt_StaticVar->vars + * Stmt_TraitUse->traits + * Stmt_TraitUseAdaptation_Precedence->insteadof + * Stmt_Unset->vars + * Stmt_Use->uses + * UnionType->types + */ + + /* TODO + * Stmt_If->elseifs + * Stmt_TryCatch->catches + * Expr_Array->items + * Expr_List->items + * Stmt_For->init + * Stmt_For->cond + * Stmt_For->loop + */ + ]; + } + + protected function initializeModifierChangeMap(): void { + if ($this->modifierChangeMap) { + return; + } + + $this->modifierChangeMap = [ + Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST], + Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], + Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], + Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], + Param::class . '->flags' => ['pModifiers', \T_VARIABLE], + Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], + Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], + //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO + ]; + + // List of integer subnodes that are not modifiers: + // Expr_Include->type + // Stmt_GroupUse->type + // Stmt_Use->type + // UseItem->type + } +} diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index 6e1f772033..71f1f236b8 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -35,8 +35,6 @@ public function testAliases1() { $this->assertTrue($node instanceof Stmt\PropertyProperty); $node = new Node\UseItem(new Name('X')); $this->assertTrue($node instanceof Stmt\UseUse); - $prettyPrinter = new PrettyPrinter\Standard(); - $this->assertTrue($prettyPrinter instanceof PrettyPrinterAbstract); } /** From 64484a4979aa8924d6baea8a53ab1ce4713b2bc6 Mon Sep 17 00:00:00 2001 From: Anthony Ferrara Date: Sat, 4 Mar 2023 21:56:31 +0100 Subject: [PATCH 231/428] Add PrettyPrinter interface Closes #423. --- lib/PhpParser/PrettyPrinter.php | 53 +++++++++++++++++++++++++ lib/PhpParser/PrettyPrinterAbstract.php | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 lib/PhpParser/PrettyPrinter.php diff --git a/lib/PhpParser/PrettyPrinter.php b/lib/PhpParser/PrettyPrinter.php new file mode 100644 index 0000000000..9eed6072af --- /dev/null +++ b/lib/PhpParser/PrettyPrinter.php @@ -0,0 +1,53 @@ + Date: Sat, 4 Mar 2023 23:25:31 +0100 Subject: [PATCH 232/428] Update changelog --- CHANGELOG.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 133a1eadd3..42a81b3847 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,43 @@ Version 5.0.0-dev ----------------- -Nothing yet. +See UPGRADE-5.0 for detailed migration instructions. + +### Added + +* [PHP 8.3] Added support for dynamic class constant fetch. +* Added many additional type annotations. PhpStan is now used. +* Added a fuzzing target for PHP-Fuzzer, which was how a lot of pretty printer bugs were found. +* Added `isPromoted()`, `isPublic()`, `isProtected()`, `isPrivate()` and `isReadonly()` methods + on `Param`. +* Added support for class constants in trait builder. +* Added `PrettyPrinter` interface. +* Added support for formatting preservation when toggling static modifiers. +* The `php-parse` binary now accepts `-` as the file name, in which case it will read from stdin. + +### Fixed + +* The pretty printer now uses a more accurate treatment of unary operator precedence, and will only + wrap them in parentheses if required. This allowed fixing a number of other precedence related + bugs. +* The pretty printer now respects the precedence of `clone`, `throw` and arrow functions. +* The pretty printer no longer unconditionally wraps `yield` in parentheses, unless the target + version is set to older than PHP 7.0. +* Fixed formatting preservation for alternative elseif/else syntax. +* Fixed checks for when it is safe to print strings as heredoc/nowdoc to accommodate flexible + doc string semantics. +* The pretty printer now prints parentheses around new/instanceof operands in all required + situations. +* Similar, differences in allowed expressions on the LHS of `->` and `::` are now taken into account. +* Fixed various cases where `\r` at the end of a doc string could be incorrectly merged into a CRLF + sequence with a following `\n`. +* `__halt_compiler` is no longer recognized as a semi-reserved keyword, in line with PHP behavior. +* ` Date: Sun, 5 Mar 2023 10:49:24 +0100 Subject: [PATCH 233/428] Update upgrading documentation --- UPGRADE-5.0.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 8b46b588f5..b30bb9a778 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -104,7 +104,7 @@ PhpParser\Node\Stmt\Class_::MODIFIER_READONLY -> PhpParser\Modifiers::READONLY PhpParser\Node\Stmt\Class_::VISIBILITY_MODIFIER_MASK -> PhpParser\Modifiers::VISIBILITY_MASK ``` -### Changes to the default pretty printer +### Changes to the pretty printer A number of changes to the standard pretty printer have been made, to make it match contemporary coding style conventions (and in particular PSR-12). Options to restore the previous behavior are not provided, but it is possible to override the formatting methods (such as `pStmt_ClassMethod`) with your preferred formatting. @@ -159,10 +159,44 @@ Backslashes in single-quoted strings are now only printed if they are necessary: The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defaults to PHP 7.0. The pretty printer will make formatting choices to make the code valid for that version. It currently controls the following behavior: * For PHP >= 7.0 (default), short array syntax `[]` will be used by default. This does not affect nodes that specify an explicit array syntax using the `kind` attribute. +* For PHP >= 7.0 (default), parentheses around `yield` expressions will only be printed when necessary. Previously, parentheses were always printed, even if `yield` was used as a statement. * For PHP >= 7.1, the short array syntax `[]` will be used for destructuring by default (instead of `list()`). This does not affect nodes that specify and explicit syntax using the `kind` attribute. * For PHP >= 7.3, a newline is no longer forced after heredoc/nowdoc strings, as the requirement for this has been removed with the introduction of flexible heredoc/nowdoc strings. +### Changes to precedence handling in the pretty printer + +The pretty printer now more accurately models operator precedence. Especially for unary operators, less unnecessary parentheses will be printed. Conversely, many bugs where semantically meaningful parentheses were omitted have been fixed. + +To support these changes, precedence is now handled differently in the pretty printer. The internal `p()` method, which is used to recursively print nodes, now has the following signature: +```php +protected function p( + Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, + bool $parentFormatPreserved = false +): string; +``` + +The `$precedence` is the precedence of the direct parent operator (if any), while `$lhsPrecedence` is that precedence of the nearest binary operator on whose left-hand-side the node occurs. For unary operators, only the `$lhsPrecedence` is relevant. + +Recursive calls in pretty-printer methods should generally continue calling `p()` without additional parameters. However, pretty-printer methods for operators that participate in precedence resolution need to be adjusted. For example, typical implementations for operators looks as follows now: + +```php +protected function pExpr_BinaryOp_Plus( + BinaryOp\Plus $node, int $precedence, int $lhsPrecedence +): string { + return $this->pInfixOp( + BinaryOp\Plus::class, $node->left, ' + ', $node->right, $precedence, $lhsPrecedence); +} + +protected function pExpr_UnaryPlus( + Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence +): string { + return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr, $precedence, $lhsPrecedence); +} +``` + +The new `$precedence` and `$lhsPrecedence` arguments need to be passed down to the `pInfixOp()`, `pPrefixOp()` and `pPostfixOp()` methods. + ### Changes to token representation Tokens are now internally represented using the `PhpParser\Token` class, which exposes the same base interface as @@ -186,3 +220,4 @@ Additionally, the token array is now terminated by a sentinel token with ID 0. ### Other removed functionality * The deprecated `Builder\Param::setTypeHint()` method has been removed in favor of `Builder\Param::setType()`. + * The deprecated `Error` constructor taking a start line has been removed. Pass `['startLine' => $startLine]` attributes instead. From da65ae474d2db681b0c37f6d3ff97dba8e14cc5f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 5 Mar 2023 10:49:58 +0100 Subject: [PATCH 234/428] Release PHP-Parser 5.0.0 alpha 2 --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42a81b3847..6b0442b1a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ -Version 5.0.0-dev ------------------ +Version 5.0.0-alpha2 (2023-03-05) +--------------------------------- See UPGRADE-5.0 for detailed migration instructions. From aa721520f9dbc64628a87105e6a63931ad9d1833 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 5 Mar 2023 11:30:39 +0100 Subject: [PATCH 235/428] Don't generate braces for "else if" Mentioned in #915. --- lib/PhpParser/PrettyPrinter/Standard.php | 4 ++++ test/code/prettyPrinter/stmt/if.test | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index efdbcf5389..5fd54c184b 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -881,6 +881,10 @@ protected function pStmt_ElseIf(Stmt\ElseIf_ $node): string { } protected function pStmt_Else(Stmt\Else_ $node): string { + if (\count($node->stmts) === 1 && $node->stmts[0] instanceof Stmt\If_) { + // Print as "else if" rather than "else { if }" + return 'else ' . $this->p($node->stmts[0]); + } return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}'; } diff --git a/test/code/prettyPrinter/stmt/if.test b/test/code/prettyPrinter/stmt/if.test index 8debb2ec38..ed850e6d23 100644 --- a/test/code/prettyPrinter/stmt/if.test +++ b/test/code/prettyPrinter/stmt/if.test @@ -6,11 +6,13 @@ if ($expr) { } elseif ($expr2) { -} else { +} else if ($expr3) { +} else { } ----- if ($expr) { } elseif ($expr2) { +} else if ($expr3) { } else { -} \ No newline at end of file +} From 7785d2b887c5f3db54b4b4558a12d67279dc1a02 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 5 Mar 2023 16:12:50 +0100 Subject: [PATCH 236/428] Remove garbage collection section from docs The GC issue has been fixed in PHP 7.3 and is no longer relevant. --- doc/component/Performance.markdown | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/doc/component/Performance.markdown b/doc/component/Performance.markdown index 4de4160767..47e8fea4b2 100644 --- a/doc/component/Performance.markdown +++ b/doc/component/Performance.markdown @@ -42,24 +42,3 @@ When possible, objects should be reused rather than being newly instantiated for objects have expensive initialization procedures, which will be unnecessarily repeated if the object is not reused. (Currently two objects with particularly expensive setup are lexers and pretty printers, though the details might change between versions of this library.) - -Garbage collection ------------------- - -A limitation in PHP's cyclic garbage collector may lead to major performance degradation when the -active working set exceeds 10000 objects (or arrays). Especially when parsing very large files this -limit is significantly exceeded and PHP will spend the majority of time performing unnecessary -garbage collection attempts. - -Without GC, parsing time is roughly linear in the input size. With GC, this degenerates to quadratic -runtime for large files. While the specifics may differ, as a rough guideline you may expect a 2.5x -GC overhead for 500KB files and a 5x overhead for 1MB files. - -Because this a limitation in PHP's implementation, there is no easy way to work around this. If -possible, you should avoid parsing very large files, as they will impact overall execution time -disproportionally (and are usually generated anyway). - -Of course, you can also try to (temporarily) disable GC. By design the AST generated by PHP-Parser -is cycle-free, so the AST itself will never cause leaks with GC disabled. However, other code -(including for example the parser object itself) may hold cycles, so disabling of GC should be -approached with care. From a3bc900a41b337266c0af359e38638968e10b9f1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 5 Mar 2023 16:41:06 +0100 Subject: [PATCH 237/428] Don't ltrim when preserving formatting We shouldn't ltrim when printing a whole file, that way we will not just fail to preserve formatting, but actually change semantics by dropping meaningful whitespace. --- lib/PhpParser/PrettyPrinterAbstract.php | 2 +- test/code/formatPreservation/inlineHtml.test | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index d20b4f6b73..6afea18cce 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -540,7 +540,7 @@ public function printFormatPreserving(array $stmts, array $origStmts, array $ori $result = "pStmts($stmts, false); } - return ltrim($this->handleMagicTokens($result)); + return $this->handleMagicTokens($result); } protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { diff --git a/test/code/formatPreservation/inlineHtml.test b/test/code/formatPreservation/inlineHtml.test index 0b131fed09..c3afc699ab 100644 --- a/test/code/formatPreservation/inlineHtml.test +++ b/test/code/formatPreservation/inlineHtml.test @@ -110,3 +110,13 @@ function test() foo(); baz(); } +----- + + + Date: Sun, 5 Mar 2023 16:56:50 +0100 Subject: [PATCH 238/428] Use PHP 7.1 as default pretty printer target --- UPGRADE-5.0.md | 5 ++--- lib/PhpParser/PrettyPrinterAbstract.php | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index b30bb9a778..c4e40198d5 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -156,12 +156,11 @@ Backslashes in single-quoted strings are now only printed if they are necessary: '\\\\'; ``` -The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defaults to PHP 7.0. The pretty printer will make formatting choices to make the code valid for that version. It currently controls the following behavior: +The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defaults to PHP 7.1. The pretty printer will make formatting choices to make the code valid for that version. It currently controls the following behavior: * For PHP >= 7.0 (default), short array syntax `[]` will be used by default. This does not affect nodes that specify an explicit array syntax using the `kind` attribute. * For PHP >= 7.0 (default), parentheses around `yield` expressions will only be printed when necessary. Previously, parentheses were always printed, even if `yield` was used as a statement. -* For PHP >= 7.1, the short array syntax `[]` will be used for destructuring by default (instead of - `list()`). This does not affect nodes that specify and explicit syntax using the `kind` attribute. +* For PHP >= 7.1 (default), the short array syntax `[]` will be used for destructuring by default (instead of `list()`). This does not affect nodes that specify and explicit syntax using the `kind` attribute. * For PHP >= 7.3, a newline is no longer forced after heredoc/nowdoc strings, as the requirement for this has been removed with the introduction of flexible heredoc/nowdoc strings. ### Changes to precedence handling in the pretty printer diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 6afea18cce..445d894a7e 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -159,7 +159,7 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { * Creates a pretty printer instance using the given options. * * Supported options: - * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.0). This option + * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.1). This option * controls compatibility of the generated code with older PHP * versions in cases where a simple stylistic choice exists (e.g. * array() vs []). It is safe to pretty-print an AST for a newer @@ -172,7 +172,7 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { * @param array{phpVersion?: PhpVersion, shortArraySyntax?: bool} $options Dictionary of formatting options */ public function __construct(array $options = []) { - $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 0); + $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 1); $this->shortArraySyntax = $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); $this->docStringEndToken = From bb4263ea1a36455b7942debf53edc8329ad01e31 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 5 Mar 2023 17:03:00 +0100 Subject: [PATCH 239/428] Treat del as label character depending on PHP version In formatting-preserving pretty printing, treat DEL as a label character based on the target PHP version (the default of 7.1 implying it isn't one). This avoids failure to round-trip an unchanged input. --- lib/PhpParser/PhpVersion.php | 7 +++++++ lib/PhpParser/PrettyPrinterAbstract.php | 8 +++++--- test/code/formatPreservation/delAfterIdentifier.test | 9 +++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 test/code/formatPreservation/delAfterIdentifier.test diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index 0a28d0541c..9dd168162f 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -141,6 +141,13 @@ public function allowsInvalidOctals(): bool { return $this->id < 70000; } + /** + * Whether this version allows DEL (\x7f) to occur in identifiers. + */ + public function allowsDelInIdentifiers(): bool { + return $this->id < 70100; + } + /** * Whether this version support yield in expression context without parentheses. */ diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 445d894a7e..eda5f304b8 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1244,10 +1244,12 @@ protected function initializeLabelCharMap(): void { $this->labelCharMap = []; for ($i = 0; $i < 256; $i++) { - // Since PHP 7.1 The lower range is 0x80. However, we also want to support code for - // older versions. $chr = chr($i); - $this->labelCharMap[$chr] = $i >= 0x7f || ctype_alnum($chr); + $this->labelCharMap[$chr] = $i >= 0x80 || ctype_alnum($chr); + } + + if ($this->phpVersion->allowsDelInIdentifiers()) { + $this->labelCharMap[0x7f] = true; } } diff --git a/test/code/formatPreservation/delAfterIdentifier.test b/test/code/formatPreservation/delAfterIdentifier.test new file mode 100644 index 0000000000..be6f3b6260 --- /dev/null +++ b/test/code/formatPreservation/delAfterIdentifier.test @@ -0,0 +1,9 @@ +DEL after identifier +----- + Date: Mon, 6 Mar 2023 18:50:47 +0100 Subject: [PATCH 240/428] [5.x] Add constructor property promotion By making flags on the Param builder configurable by providing make(Public|Protected|Private) methods we can promote parameters to properties from the constructor --- lib/PhpParser/Builder/Param.php | 38 +++++++++++++++++++++++++++- test/PhpParser/Builder/ParamTest.php | 37 +++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index 433801a08f..3690eebbbc 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -4,6 +4,7 @@ use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; class Param implements PhpParser\Builder { @@ -15,6 +16,8 @@ class Param implements PhpParser\Builder { protected $type = null; /** @var bool */ protected $byRef = false; + /** @var int */ + protected $flags = 0; /** @var bool */ protected $variadic = false; /** @var list */ @@ -80,6 +83,39 @@ public function makeVariadic() { return $this; } + /** + * Makes the parameter public. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePublic() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); + + return $this; + } + + /** + * Makes the parameter protected. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtected() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); + + return $this; + } + + /** + * Makes the parameter private. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivate() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); + + return $this; + } + /** * Adds an attribute group. * @@ -101,7 +137,7 @@ public function addAttribute($attribute) { public function getNode(): Node { return new Node\Param( new Node\Expr\Variable($this->name), - $this->default, $this->type, $this->byRef, $this->variadic, [], 0, $this->attributeGroups + $this->default, $this->type, $this->byRef, $this->variadic, [], $this->flags, $this->attributeGroups ); } } diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index 62c357e726..a00ae043eb 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -2,6 +2,7 @@ namespace PhpParser\Builder; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Attribute; @@ -204,6 +205,42 @@ public function testVariadic() { ); } + public function testMakePublic() { + $node = $this->createParamBuilder('test') + ->makePublic() + ->getNode() + ; + + $this->assertEquals( + new Node\Param(new Expr\Variable('test'), null, null, false, false, [], Modifiers::PUBLIC), + $node + ); + } + + public function testMakeProtected() { + $node = $this->createParamBuilder('test') + ->makeProtected() + ->getNode() + ; + + $this->assertEquals( + new Node\Param(new Expr\Variable('test'), null, null, false, false, [], Modifiers::PROTECTED), + $node + ); + } + + public function testMakePrivate() { + $node = $this->createParamBuilder('test') + ->makePrivate() + ->getNode() + ; + + $this->assertEquals( + new Node\Param(new Expr\Variable('test'), null, null, false, false, [], Modifiers::PRIVATE), + $node + ); + } + public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), From b68fb76f14a0ba0288e21151d75d4fde3dada82f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 19 May 2023 22:17:09 +0200 Subject: [PATCH 241/428] Add makeReadonly() to param builder (cherry picked from commit 11e2dcd96c830ee934fa7b0243f4d67d8a8821ab) --- lib/PhpParser/Builder/Param.php | 17 ++++++++++++++--- test/PhpParser/Builder/ParamTest.php | 12 ++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index 3690eebbbc..1994a70982 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -84,7 +84,7 @@ public function makeVariadic() { } /** - * Makes the parameter public. + * Makes the (promoted) parameter public. * * @return $this The builder instance (for fluid interface) */ @@ -95,7 +95,7 @@ public function makePublic() { } /** - * Makes the parameter protected. + * Makes the (promoted) parameter protected. * * @return $this The builder instance (for fluid interface) */ @@ -106,7 +106,7 @@ public function makeProtected() { } /** - * Makes the parameter private. + * Makes the (promoted) parameter private. * * @return $this The builder instance (for fluid interface) */ @@ -116,6 +116,17 @@ public function makePrivate() { return $this; } + /** + * Makes the (promoted) parameter readonly. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeReadonly() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); + + return $this; + } + /** * Adds an attribute group. * diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index a00ae043eb..58a6c04287 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -241,6 +241,18 @@ public function testMakePrivate() { ); } + public function testMakeReadonly() { + $node = $this->createParamBuilder('test') + ->makeReadonly() + ->getNode() + ; + + $this->assertEquals( + new Node\Param(new Expr\Variable('test'), null, null, false, false, [], Modifiers::READONLY), + $node + ); + } + public function testAddAttribute() { $attribute = new Attribute( new Name('Attr'), From 779b6950c3a1251742071101070f438ebf3dbca4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 May 2023 18:55:12 +0200 Subject: [PATCH 242/428] Fix coding style --- lib/PhpParser/PrettyPrinter.php | 2 +- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter.php b/lib/PhpParser/PrettyPrinter.php index 9eed6072af..ceaaba95e5 100644 --- a/lib/PhpParser/PrettyPrinter.php +++ b/lib/PhpParser/PrettyPrinter.php @@ -1,4 +1,4 @@ -pPrefixOp( Expr\Yield_::class, 'yield ' . $this->pKey($node->key), - $node->value, $precedence, $lhsPrecedence); + $node->value, $precedence, $lhsPrecedence); } } From 9a5d5c112cab5b9b9de46aeeb22913296bb3065f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 May 2023 19:16:37 +0200 Subject: [PATCH 243/428] Add newline at end of file for many tests Add the newline in reconstructTest() and run updateTests.php, to reduce spurious diffs in the future. --- test/PhpParser/CodeTestParser.php | 2 +- test/code/parser/blockComments.test | 2 +- test/code/parser/comments.test | 2 +- test/code/parser/errorHandling/eofError.test | 2 +- test/code/parser/expr/arrayDef.test | 2 +- test/code/parser/expr/arrayDestructuring.test | 2 +- test/code/parser/expr/arrayEmptyElemens.test | 2 +- test/code/parser/expr/arraySpread.test | 2 +- test/code/parser/expr/arrow_function.test | 2 +- test/code/parser/expr/assign.test | 2 +- test/code/parser/expr/assignNewByRef.test | 2 +- test/code/parser/expr/cast.test | 2 +- test/code/parser/expr/clone.test | 2 +- test/code/parser/expr/closure.test | 2 +- test/code/parser/expr/closure_use_trailing_comma.test | 2 +- test/code/parser/expr/comparison.test | 2 +- test/code/parser/expr/concatPrecedence.test | 2 +- test/code/parser/expr/constant_expr.test | 2 +- test/code/parser/expr/errorSuppress.test | 2 +- test/code/parser/expr/exit.test | 2 +- test/code/parser/expr/exprInIsset.test | 2 +- test/code/parser/expr/exprInList.test | 2 +- test/code/parser/expr/fetchAndCall/args.test | 2 +- test/code/parser/expr/fetchAndCall/constFetch.test | 2 +- test/code/parser/expr/fetchAndCall/constantDeref.test | 2 +- test/code/parser/expr/fetchAndCall/funcCall.test | 2 +- test/code/parser/expr/fetchAndCall/namedArgs.test | 2 +- test/code/parser/expr/fetchAndCall/newDeref.test | 2 +- test/code/parser/expr/fetchAndCall/objectAccess.test | 2 +- test/code/parser/expr/fetchAndCall/simpleArrayAccess.test | 2 +- test/code/parser/expr/fetchAndCall/staticCall.test | 2 +- test/code/parser/expr/fetchAndCall/staticPropertyFetch.test | 2 +- test/code/parser/expr/firstClassCallables.test | 2 +- test/code/parser/expr/includeAndEval.test | 2 +- test/code/parser/expr/issetAndEmpty.test | 2 +- test/code/parser/expr/keywordsInNamespacedName.test | 2 +- test/code/parser/expr/listReferences.test | 2 +- test/code/parser/expr/listWithKeys.test | 2 +- test/code/parser/expr/logic.test | 2 +- test/code/parser/expr/match.test | 2 +- test/code/parser/expr/math.test | 2 +- test/code/parser/expr/new.test | 2 +- test/code/parser/expr/newWithoutClass.test | 2 +- test/code/parser/expr/print.test | 2 +- test/code/parser/expr/shellExec.test | 2 +- test/code/parser/expr/ternaryAndCoalesce.test | 2 +- test/code/parser/expr/throw.test | 2 +- test/code/parser/expr/trailingCommas.test | 2 +- test/code/parser/expr/uvs/constDeref.test | 2 +- test/code/parser/expr/uvs/globalNonSimpleVarError.test | 2 +- test/code/parser/expr/uvs/indirectCall.test | 2 +- test/code/parser/expr/uvs/isset.test | 2 +- test/code/parser/expr/uvs/new.test | 2 +- test/code/parser/expr/uvs/newInstanceofExpr.test | 2 +- test/code/parser/expr/uvs/staticProperty.test | 2 +- test/code/parser/expr/varVarPos.test | 2 +- test/code/parser/expr/variable.test | 2 +- test/code/parser/nopPositions.test | 2 +- test/code/parser/scalar/explicitOctal.test | 2 +- test/code/parser/scalar/invalidOctal.test | 2 +- test/code/parser/scalar/magicConst.test | 2 +- test/code/parser/stmt/class/abstract.test | 2 +- test/code/parser/stmt/class/class_position.test | 2 +- test/code/parser/stmt/class/conditional.test | 2 +- test/code/parser/stmt/class/constModifierErrors.test | 2 +- test/code/parser/stmt/class/constModifiers.test | 2 +- test/code/parser/stmt/class/enum.test | 2 +- test/code/parser/stmt/class/enum_with_string.test | 2 +- test/code/parser/stmt/class/final.test | 2 +- test/code/parser/stmt/class/interface.test | 2 +- test/code/parser/stmt/class/name.test | 2 +- test/code/parser/stmt/class/property_promotion.test | 2 +- test/code/parser/stmt/class/readonly.test | 2 +- test/code/parser/stmt/class/readonlyAsClassName.test | 2 +- test/code/parser/stmt/class/readonlyMethod.test | 2 +- test/code/parser/stmt/class/staticMethod.test | 2 +- test/code/parser/stmt/class/staticType.test | 2 +- test/code/parser/stmt/class/trait.test | 2 +- test/code/parser/stmt/const.test | 2 +- test/code/parser/stmt/controlFlow.test | 2 +- test/code/parser/stmt/echo.test | 2 +- test/code/parser/stmt/function/builtinTypeDeclarations.test | 2 +- test/code/parser/stmt/function/byRef.test | 2 +- test/code/parser/stmt/function/conditional.test | 2 +- test/code/parser/stmt/function/defaultValues.test | 2 +- test/code/parser/stmt/function/neverType.test | 2 +- test/code/parser/stmt/function/nullFalseTrueTypes.test | 2 +- test/code/parser/stmt/function/nullableTypes.test | 2 +- test/code/parser/stmt/function/parameters_trailing_comma.test | 2 +- test/code/parser/stmt/function/returnTypes.test | 2 +- test/code/parser/stmt/function/specialVars.test | 2 +- test/code/parser/stmt/function/typeDeclarations.test | 2 +- test/code/parser/stmt/function/typeVersions.test | 2 +- test/code/parser/stmt/function/variadic.test | 2 +- test/code/parser/stmt/function/variadicDefaultValue.test | 2 +- test/code/parser/stmt/generator/basic.test | 2 +- test/code/parser/stmt/generator/yieldPrecedence.test | 2 +- test/code/parser/stmt/generator/yieldUnaryPrecedence.test | 2 +- test/code/parser/stmt/haltCompiler.test | 2 +- test/code/parser/stmt/haltCompilerInvalidSyntax.test | 2 +- test/code/parser/stmt/haltCompilerOffset.test | 2 +- test/code/parser/stmt/haltCompilerOutermostScope.test | 2 +- test/code/parser/stmt/hashbang.test | 2 +- test/code/parser/stmt/if.test | 2 +- test/code/parser/stmt/inlineHTML.test | 2 +- test/code/parser/stmt/loop/do.test | 2 +- test/code/parser/stmt/loop/for.test | 2 +- test/code/parser/stmt/loop/foreach.test | 2 +- test/code/parser/stmt/loop/while.test | 2 +- test/code/parser/stmt/multiCatch.test | 2 +- test/code/parser/stmt/namespace/braced.test | 2 +- test/code/parser/stmt/namespace/commentAfterNamespace.test | 2 +- test/code/parser/stmt/namespace/name.test | 2 +- test/code/parser/stmt/namespace/nested.test | 2 +- test/code/parser/stmt/namespace/notBraced.test | 2 +- test/code/parser/stmt/namespace/nsAfterHashbang.test | 2 +- test/code/parser/stmt/switch.test | 2 +- test/code/parser/stmt/tryCatch.test | 2 +- test/code/parser/stmt/tryCatch_without_variable.test | 2 +- test/code/parser/stmt/tryWithoutCatch.test | 2 +- test/code/parser/stmt/unset.test | 2 +- 121 files changed, 121 insertions(+), 121 deletions(-) diff --git a/test/PhpParser/CodeTestParser.php b/test/PhpParser/CodeTestParser.php index d77a50f0ce..bde0a5fde5 100644 --- a/test/PhpParser/CodeTestParser.php +++ b/test/PhpParser/CodeTestParser.php @@ -47,7 +47,7 @@ public function reconstructTest($name, array $tests) { } $result .= $lastPart; } - return $result; + return $result . "\n"; } private function extractMode(string $expected): array { diff --git a/test/code/parser/blockComments.test b/test/code/parser/blockComments.test index 8cfe166d74..bc72183ddb 100644 --- a/test/code/parser/blockComments.test +++ b/test/code/parser/blockComments.test @@ -33,4 +33,4 @@ array( 0: // empty ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/comments.test b/test/code/parser/comments.test index be797fd330..404cfaa899 100644 --- a/test/code/parser/comments.test +++ b/test/code/parser/comments.test @@ -105,4 +105,4 @@ array( 0: // comment ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/errorHandling/eofError.test b/test/code/parser/errorHandling/eofError.test index 012841def0..ae8ef1910f 100644 --- a/test/code/parser/errorHandling/eofError.test +++ b/test/code/parser/errorHandling/eofError.test @@ -33,4 +33,4 @@ array( 0: /* bar */ ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/arrayDef.test b/test/code/parser/expr/arrayDef.test index 1159627703..7c06801047 100644 --- a/test/code/parser/expr/arrayDef.test +++ b/test/code/parser/expr/arrayDef.test @@ -170,4 +170,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/arrayDestructuring.test b/test/code/parser/expr/arrayDestructuring.test index 148019ba31..9b0dfa5829 100644 --- a/test/code/parser/expr/arrayDestructuring.test +++ b/test/code/parser/expr/arrayDestructuring.test @@ -169,4 +169,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/arrayEmptyElemens.test b/test/code/parser/expr/arrayEmptyElemens.test index 48e6451d7d..919c0ece6f 100644 --- a/test/code/parser/expr/arrayEmptyElemens.test +++ b/test/code/parser/expr/arrayEmptyElemens.test @@ -67,4 +67,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/arraySpread.test b/test/code/parser/expr/arraySpread.test index c600440615..5fa69c5309 100644 --- a/test/code/parser/expr/arraySpread.test +++ b/test/code/parser/expr/arraySpread.test @@ -434,4 +434,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/arrow_function.test b/test/code/parser/expr/arrow_function.test index 47bd8c5580..3ab9e2711b 100644 --- a/test/code/parser/expr/arrow_function.test +++ b/test/code/parser/expr/arrow_function.test @@ -260,4 +260,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/assign.test b/test/code/parser/expr/assign.test index 9066ac8a58..971407e10b 100644 --- a/test/code/parser/expr/assign.test +++ b/test/code/parser/expr/assign.test @@ -378,4 +378,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/assignNewByRef.test b/test/code/parser/expr/assignNewByRef.test index 8ed227bd81..a2542bb8b5 100644 --- a/test/code/parser/expr/assignNewByRef.test +++ b/test/code/parser/expr/assignNewByRef.test @@ -45,4 +45,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/cast.test b/test/code/parser/expr/cast.test index a875bb47fe..b996548ca0 100644 --- a/test/code/parser/expr/cast.test +++ b/test/code/parser/expr/cast.test @@ -91,4 +91,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/clone.test b/test/code/parser/expr/clone.test index 418eb0e658..3b2c4a4055 100644 --- a/test/code/parser/expr/clone.test +++ b/test/code/parser/expr/clone.test @@ -12,4 +12,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/closure.test b/test/code/parser/expr/closure.test index e87d6a354a..2bc6d0542d 100644 --- a/test/code/parser/expr/closure.test +++ b/test/code/parser/expr/closure.test @@ -199,4 +199,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/closure_use_trailing_comma.test b/test/code/parser/expr/closure_use_trailing_comma.test index a7fd0e12a9..3dfdd7ba20 100644 --- a/test/code/parser/expr/closure_use_trailing_comma.test +++ b/test/code/parser/expr/closure_use_trailing_comma.test @@ -25,4 +25,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/comparison.test b/test/code/parser/expr/comparison.test index 011692f064..dbb468b3ba 100644 --- a/test/code/parser/expr/comparison.test +++ b/test/code/parser/expr/comparison.test @@ -126,4 +126,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/concatPrecedence.test b/test/code/parser/expr/concatPrecedence.test index b7a8ce9415..293d7d739c 100644 --- a/test/code/parser/expr/concatPrecedence.test +++ b/test/code/parser/expr/concatPrecedence.test @@ -94,4 +94,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/constant_expr.test b/test/code/parser/expr/constant_expr.test index 926ebcbc9f..b072cb6a15 100644 --- a/test/code/parser/expr/constant_expr.test +++ b/test/code/parser/expr/constant_expr.test @@ -691,4 +691,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/errorSuppress.test b/test/code/parser/expr/errorSuppress.test index 7f099988ab..44f9b6cf5e 100644 --- a/test/code/parser/expr/errorSuppress.test +++ b/test/code/parser/expr/errorSuppress.test @@ -11,4 +11,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/exit.test b/test/code/parser/expr/exit.test index c880921f30..ced97a4d0e 100644 --- a/test/code/parser/expr/exit.test +++ b/test/code/parser/expr/exit.test @@ -43,4 +43,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/exprInIsset.test b/test/code/parser/expr/exprInIsset.test index 43e78b4b02..f8b678e87a 100644 --- a/test/code/parser/expr/exprInIsset.test +++ b/test/code/parser/expr/exprInIsset.test @@ -45,4 +45,4 @@ array( 0: // This is illegal, but not a syntax error. ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/exprInList.test b/test/code/parser/expr/exprInList.test index 1916074caa..b471528679 100644 --- a/test/code/parser/expr/exprInList.test +++ b/test/code/parser/expr/exprInList.test @@ -77,4 +77,4 @@ array( 0: // This is illegal, but not a syntax error. ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/fetchAndCall/args.test b/test/code/parser/expr/fetchAndCall/args.test index 5c4f38634e..0bfc2bf312 100644 --- a/test/code/parser/expr/fetchAndCall/args.test +++ b/test/code/parser/expr/fetchAndCall/args.test @@ -112,4 +112,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/fetchAndCall/constFetch.test b/test/code/parser/expr/fetchAndCall/constFetch.test index 98af79ddde..569cf22fb6 100644 --- a/test/code/parser/expr/fetchAndCall/constFetch.test +++ b/test/code/parser/expr/fetchAndCall/constFetch.test @@ -62,4 +62,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/fetchAndCall/constantDeref.test b/test/code/parser/expr/fetchAndCall/constantDeref.test index b13349ac0c..6dde2490f9 100644 --- a/test/code/parser/expr/fetchAndCall/constantDeref.test +++ b/test/code/parser/expr/fetchAndCall/constantDeref.test @@ -262,4 +262,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/fetchAndCall/funcCall.test b/test/code/parser/expr/fetchAndCall/funcCall.test index 4a82651403..b1da775b2a 100644 --- a/test/code/parser/expr/fetchAndCall/funcCall.test +++ b/test/code/parser/expr/fetchAndCall/funcCall.test @@ -155,4 +155,4 @@ array( 0: // array dereferencing ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/fetchAndCall/namedArgs.test b/test/code/parser/expr/fetchAndCall/namedArgs.test index 1d75cf2dcd..d7a9cb8d3f 100644 --- a/test/code/parser/expr/fetchAndCall/namedArgs.test +++ b/test/code/parser/expr/fetchAndCall/namedArgs.test @@ -57,4 +57,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/fetchAndCall/newDeref.test b/test/code/parser/expr/fetchAndCall/newDeref.test index a4b7a7240b..bec0ac4dd5 100644 --- a/test/code/parser/expr/fetchAndCall/newDeref.test +++ b/test/code/parser/expr/fetchAndCall/newDeref.test @@ -79,4 +79,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/fetchAndCall/objectAccess.test b/test/code/parser/expr/fetchAndCall/objectAccess.test index 5f7751ee27..9772f2619a 100644 --- a/test/code/parser/expr/fetchAndCall/objectAccess.test +++ b/test/code/parser/expr/fetchAndCall/objectAccess.test @@ -177,4 +177,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test b/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test index 133771b75d..9cc88b9e3f 100644 --- a/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test +++ b/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test @@ -69,4 +69,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/fetchAndCall/staticCall.test b/test/code/parser/expr/fetchAndCall/staticCall.test index 47df8f5fd5..4807e64716 100644 --- a/test/code/parser/expr/fetchAndCall/staticCall.test +++ b/test/code/parser/expr/fetchAndCall/staticCall.test @@ -214,4 +214,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test b/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test index a1de3c8c12..d8ca7aa1d6 100644 --- a/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test +++ b/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test @@ -110,4 +110,4 @@ array( 0: // class name variations can be found in staticCall.test ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/firstClassCallables.test b/test/code/parser/expr/firstClassCallables.test index 73ec2ce6c5..26e1ad23b9 100644 --- a/test/code/parser/expr/firstClassCallables.test +++ b/test/code/parser/expr/firstClassCallables.test @@ -117,4 +117,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/includeAndEval.test b/test/code/parser/expr/includeAndEval.test index 0ab189081a..6d28e7c53d 100644 --- a/test/code/parser/expr/includeAndEval.test +++ b/test/code/parser/expr/includeAndEval.test @@ -47,4 +47,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/issetAndEmpty.test b/test/code/parser/expr/issetAndEmpty.test index 3db32c3d13..1f48901cc0 100644 --- a/test/code/parser/expr/issetAndEmpty.test +++ b/test/code/parser/expr/issetAndEmpty.test @@ -85,4 +85,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/keywordsInNamespacedName.test b/test/code/parser/expr/keywordsInNamespacedName.test index 742beb8133..02cf890aa5 100644 --- a/test/code/parser/expr/keywordsInNamespacedName.test +++ b/test/code/parser/expr/keywordsInNamespacedName.test @@ -110,4 +110,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/listReferences.test b/test/code/parser/expr/listReferences.test index 0e02d36898..fd333555e1 100644 --- a/test/code/parser/expr/listReferences.test +++ b/test/code/parser/expr/listReferences.test @@ -88,4 +88,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/listWithKeys.test b/test/code/parser/expr/listWithKeys.test index e800236d61..aa07d45e25 100644 --- a/test/code/parser/expr/listWithKeys.test +++ b/test/code/parser/expr/listWithKeys.test @@ -80,4 +80,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/logic.test b/test/code/parser/expr/logic.test index 6b434565f6..6b841f50f8 100644 --- a/test/code/parser/expr/logic.test +++ b/test/code/parser/expr/logic.test @@ -187,4 +187,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/match.test b/test/code/parser/expr/match.test index 364701ebdc..34475d3b31 100644 --- a/test/code/parser/expr/match.test +++ b/test/code/parser/expr/match.test @@ -210,4 +210,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/math.test b/test/code/parser/expr/math.test index 8399400c06..5d22bf8ef7 100644 --- a/test/code/parser/expr/math.test +++ b/test/code/parser/expr/math.test @@ -310,4 +310,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/new.test b/test/code/parser/expr/new.test index 5c6a82a1ee..d152cd81e4 100644 --- a/test/code/parser/expr/new.test +++ b/test/code/parser/expr/new.test @@ -185,4 +185,4 @@ array( 0: // test regression introduces by new dereferencing syntax ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/newWithoutClass.test b/test/code/parser/expr/newWithoutClass.test index 2ad0af0068..d06f880f4b 100644 --- a/test/code/parser/expr/newWithoutClass.test +++ b/test/code/parser/expr/newWithoutClass.test @@ -13,4 +13,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/print.test b/test/code/parser/expr/print.test index 84ed7775b1..98e45b56ea 100644 --- a/test/code/parser/expr/print.test +++ b/test/code/parser/expr/print.test @@ -11,4 +11,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/shellExec.test b/test/code/parser/expr/shellExec.test index ccb110e444..594bce6f96 100644 --- a/test/code/parser/expr/shellExec.test +++ b/test/code/parser/expr/shellExec.test @@ -53,4 +53,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/ternaryAndCoalesce.test b/test/code/parser/expr/ternaryAndCoalesce.test index ea1010caa1..3d16308736 100644 --- a/test/code/parser/expr/ternaryAndCoalesce.test +++ b/test/code/parser/expr/ternaryAndCoalesce.test @@ -171,4 +171,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/throw.test b/test/code/parser/expr/throw.test index 2b54521d6e..057fda40a9 100644 --- a/test/code/parser/expr/throw.test +++ b/test/code/parser/expr/throw.test @@ -44,4 +44,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/trailingCommas.test b/test/code/parser/expr/trailingCommas.test index 4a7a343794..54a43089aa 100644 --- a/test/code/parser/expr/trailingCommas.test +++ b/test/code/parser/expr/trailingCommas.test @@ -144,4 +144,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/uvs/constDeref.test b/test/code/parser/expr/uvs/constDeref.test index 03f67175cd..ecbdb96d34 100644 --- a/test/code/parser/expr/uvs/constDeref.test +++ b/test/code/parser/expr/uvs/constDeref.test @@ -288,4 +288,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/uvs/globalNonSimpleVarError.test b/test/code/parser/expr/uvs/globalNonSimpleVarError.test index 54dd467d64..61122d81e0 100644 --- a/test/code/parser/expr/uvs/globalNonSimpleVarError.test +++ b/test/code/parser/expr/uvs/globalNonSimpleVarError.test @@ -23,4 +23,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/uvs/indirectCall.test b/test/code/parser/expr/uvs/indirectCall.test index 7168b4e7d3..c517986613 100644 --- a/test/code/parser/expr/uvs/indirectCall.test +++ b/test/code/parser/expr/uvs/indirectCall.test @@ -543,4 +543,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/uvs/isset.test b/test/code/parser/expr/uvs/isset.test index 9757d6a4e9..fe20e98520 100644 --- a/test/code/parser/expr/uvs/isset.test +++ b/test/code/parser/expr/uvs/isset.test @@ -83,4 +83,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/uvs/new.test b/test/code/parser/expr/uvs/new.test index 0d93615ebf..7487a3c9d1 100644 --- a/test/code/parser/expr/uvs/new.test +++ b/test/code/parser/expr/uvs/new.test @@ -115,4 +115,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/uvs/newInstanceofExpr.test b/test/code/parser/expr/uvs/newInstanceofExpr.test index 2908c9e3ee..0fe70746d4 100644 --- a/test/code/parser/expr/uvs/newInstanceofExpr.test +++ b/test/code/parser/expr/uvs/newInstanceofExpr.test @@ -58,4 +58,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/uvs/staticProperty.test b/test/code/parser/expr/uvs/staticProperty.test index 96c61a612c..e4653e31b2 100644 --- a/test/code/parser/expr/uvs/staticProperty.test +++ b/test/code/parser/expr/uvs/staticProperty.test @@ -119,4 +119,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/varVarPos.test b/test/code/parser/expr/varVarPos.test index 26c747f5ab..aefb8f5217 100644 --- a/test/code/parser/expr/varVarPos.test +++ b/test/code/parser/expr/varVarPos.test @@ -14,4 +14,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/expr/variable.test b/test/code/parser/expr/variable.test index b28a93214b..5281336d64 100644 --- a/test/code/parser/expr/variable.test +++ b/test/code/parser/expr/variable.test @@ -63,4 +63,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/nopPositions.test b/test/code/parser/nopPositions.test index 7f5d15b32f..d790741a75 100644 --- a/test/code/parser/nopPositions.test +++ b/test/code/parser/nopPositions.test @@ -24,4 +24,4 @@ array( 0: /* comment */ ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/scalar/explicitOctal.test b/test/code/parser/scalar/explicitOctal.test index b3c9aa2980..d6bb85004d 100644 --- a/test/code/parser/scalar/explicitOctal.test +++ b/test/code/parser/scalar/explicitOctal.test @@ -27,4 +27,4 @@ array( value: 9.2233720368548E+18 ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/scalar/invalidOctal.test b/test/code/parser/scalar/invalidOctal.test index 0416048747..c489abe713 100644 --- a/test/code/parser/scalar/invalidOctal.test +++ b/test/code/parser/scalar/invalidOctal.test @@ -23,4 +23,4 @@ array( value: 7 ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/scalar/magicConst.test b/test/code/parser/scalar/magicConst.test index 520ea1776c..c0980f1369 100644 --- a/test/code/parser/scalar/magicConst.test +++ b/test/code/parser/scalar/magicConst.test @@ -44,4 +44,4 @@ array( expr: Scalar_MagicConst_Trait( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/abstract.test b/test/code/parser/stmt/class/abstract.test index 8c7444cf88..8b81fd95d9 100644 --- a/test/code/parser/stmt/class/abstract.test +++ b/test/code/parser/stmt/class/abstract.test @@ -48,4 +48,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/class_position.test b/test/code/parser/stmt/class/class_position.test index 82991499f3..1f6e11b769 100644 --- a/test/code/parser/stmt/class/class_position.test +++ b/test/code/parser/stmt/class/class_position.test @@ -91,4 +91,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/conditional.test b/test/code/parser/stmt/class/conditional.test index 53a38c2eef..e0c7daefa3 100644 --- a/test/code/parser/stmt/class/conditional.test +++ b/test/code/parser/stmt/class/conditional.test @@ -34,4 +34,4 @@ array( ) else: null ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/constModifierErrors.test b/test/code/parser/stmt/class/constModifierErrors.test index c810bfb8a2..178f4a764b 100644 --- a/test/code/parser/stmt/class/constModifierErrors.test +++ b/test/code/parser/stmt/class/constModifierErrors.test @@ -146,4 +146,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/constModifiers.test b/test/code/parser/stmt/class/constModifiers.test index 6a16ca32c3..90e43be4ad 100644 --- a/test/code/parser/stmt/class/constModifiers.test +++ b/test/code/parser/stmt/class/constModifiers.test @@ -99,4 +99,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/enum.test b/test/code/parser/stmt/class/enum.test index dfc765226b..443e59a0da 100644 --- a/test/code/parser/stmt/class/enum.test +++ b/test/code/parser/stmt/class/enum.test @@ -83,4 +83,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/enum_with_string.test b/test/code/parser/stmt/class/enum_with_string.test index a8f8655ad8..49deeba59b 100644 --- a/test/code/parser/stmt/class/enum_with_string.test +++ b/test/code/parser/stmt/class/enum_with_string.test @@ -63,4 +63,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/final.test b/test/code/parser/stmt/class/final.test index 1a9f52e061..44d9f664ee 100644 --- a/test/code/parser/stmt/class/final.test +++ b/test/code/parser/stmt/class/final.test @@ -18,4 +18,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/interface.test b/test/code/parser/stmt/class/interface.test index a726d53bf2..a9f5185bfd 100644 --- a/test/code/parser/stmt/class/interface.test +++ b/test/code/parser/stmt/class/interface.test @@ -41,4 +41,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/name.test b/test/code/parser/stmt/class/name.test index 77ba1f27e3..2676bd84cc 100644 --- a/test/code/parser/stmt/class/name.test +++ b/test/code/parser/stmt/class/name.test @@ -289,4 +289,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/property_promotion.test b/test/code/parser/stmt/class/property_promotion.test index 467943b738..f613623ccb 100644 --- a/test/code/parser/stmt/class/property_promotion.test +++ b/test/code/parser/stmt/class/property_promotion.test @@ -104,4 +104,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/readonly.test b/test/code/parser/stmt/class/readonly.test index cccd60dfef..fb2131e683 100644 --- a/test/code/parser/stmt/class/readonly.test +++ b/test/code/parser/stmt/class/readonly.test @@ -40,4 +40,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/readonlyAsClassName.test b/test/code/parser/stmt/class/readonlyAsClassName.test index 7d3010dd48..3bf53f7766 100644 --- a/test/code/parser/stmt/class/readonlyAsClassName.test +++ b/test/code/parser/stmt/class/readonlyAsClassName.test @@ -25,4 +25,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/readonlyMethod.test b/test/code/parser/stmt/class/readonlyMethod.test index 3b252260e3..c509d11c4a 100644 --- a/test/code/parser/stmt/class/readonlyMethod.test +++ b/test/code/parser/stmt/class/readonlyMethod.test @@ -31,4 +31,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/staticMethod.test b/test/code/parser/stmt/class/staticMethod.test index 28b012c05c..aabacbb82d 100644 --- a/test/code/parser/stmt/class/staticMethod.test +++ b/test/code/parser/stmt/class/staticMethod.test @@ -196,4 +196,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/staticType.test b/test/code/parser/stmt/class/staticType.test index 9d87f3b277..a8bded265e 100644 --- a/test/code/parser/stmt/class/staticType.test +++ b/test/code/parser/stmt/class/staticType.test @@ -37,4 +37,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/class/trait.test b/test/code/parser/stmt/class/trait.test index 4031ef247a..d1f9546680 100644 --- a/test/code/parser/stmt/class/trait.test +++ b/test/code/parser/stmt/class/trait.test @@ -191,4 +191,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/const.test b/test/code/parser/stmt/const.test index 2e7a1ce2bd..e114e052f8 100644 --- a/test/code/parser/stmt/const.test +++ b/test/code/parser/stmt/const.test @@ -45,4 +45,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/controlFlow.test b/test/code/parser/stmt/controlFlow.test index 94184f8f90..be786f9ada 100644 --- a/test/code/parser/stmt/controlFlow.test +++ b/test/code/parser/stmt/controlFlow.test @@ -56,4 +56,4 @@ array( name: label ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/echo.test b/test/code/parser/stmt/echo.test index 1d03eae5d0..74241b0ec0 100644 --- a/test/code/parser/stmt/echo.test +++ b/test/code/parser/stmt/echo.test @@ -29,4 +29,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/builtinTypeDeclarations.test b/test/code/parser/stmt/function/builtinTypeDeclarations.test index 3229b4dfc7..64cbedcffe 100644 --- a/test/code/parser/stmt/function/builtinTypeDeclarations.test +++ b/test/code/parser/stmt/function/builtinTypeDeclarations.test @@ -117,4 +117,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/byRef.test b/test/code/parser/stmt/function/byRef.test index b4e4514b4a..ae01214c83 100644 --- a/test/code/parser/stmt/function/byRef.test +++ b/test/code/parser/stmt/function/byRef.test @@ -56,4 +56,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/conditional.test b/test/code/parser/stmt/function/conditional.test index 42f5fa203b..0e9541af1a 100644 --- a/test/code/parser/stmt/function/conditional.test +++ b/test/code/parser/stmt/function/conditional.test @@ -34,4 +34,4 @@ array( ) else: null ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/defaultValues.test b/test/code/parser/stmt/function/defaultValues.test index a87057c990..cf078e136c 100644 --- a/test/code/parser/stmt/function/defaultValues.test +++ b/test/code/parser/stmt/function/defaultValues.test @@ -199,4 +199,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/neverType.test b/test/code/parser/stmt/function/neverType.test index a504b89b91..e23bcdbd36 100644 --- a/test/code/parser/stmt/function/neverType.test +++ b/test/code/parser/stmt/function/neverType.test @@ -19,4 +19,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/nullFalseTrueTypes.test b/test/code/parser/stmt/function/nullFalseTrueTypes.test index 45e18ec64e..2d68dd1521 100644 --- a/test/code/parser/stmt/function/nullFalseTrueTypes.test +++ b/test/code/parser/stmt/function/nullFalseTrueTypes.test @@ -110,4 +110,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/nullableTypes.test b/test/code/parser/stmt/function/nullableTypes.test index 4f4f6b41b0..6a2f4924e3 100644 --- a/test/code/parser/stmt/function/nullableTypes.test +++ b/test/code/parser/stmt/function/nullableTypes.test @@ -59,4 +59,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/parameters_trailing_comma.test b/test/code/parser/stmt/function/parameters_trailing_comma.test index dce1878b02..f80ba1f413 100644 --- a/test/code/parser/stmt/function/parameters_trailing_comma.test +++ b/test/code/parser/stmt/function/parameters_trailing_comma.test @@ -126,4 +126,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/returnTypes.test b/test/code/parser/stmt/function/returnTypes.test index 96e43a2a2d..2b34ee4c37 100644 --- a/test/code/parser/stmt/function/returnTypes.test +++ b/test/code/parser/stmt/function/returnTypes.test @@ -69,4 +69,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/specialVars.test b/test/code/parser/stmt/function/specialVars.test index 79b204c5a9..462e0652e2 100644 --- a/test/code/parser/stmt/function/specialVars.test +++ b/test/code/parser/stmt/function/specialVars.test @@ -56,4 +56,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/typeDeclarations.test b/test/code/parser/stmt/function/typeDeclarations.test index b3102a13cc..918e281e77 100644 --- a/test/code/parser/stmt/function/typeDeclarations.test +++ b/test/code/parser/stmt/function/typeDeclarations.test @@ -74,4 +74,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/typeVersions.test b/test/code/parser/stmt/function/typeVersions.test index 6f8b4b47d0..e4747e8494 100644 --- a/test/code/parser/stmt/function/typeVersions.test +++ b/test/code/parser/stmt/function/typeVersions.test @@ -1308,4 +1308,4 @@ array( 0: // PHP 8.1 ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/variadic.test b/test/code/parser/stmt/function/variadic.test index 245c0876a4..d73e21dc81 100644 --- a/test/code/parser/stmt/function/variadic.test +++ b/test/code/parser/stmt/function/variadic.test @@ -163,4 +163,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/function/variadicDefaultValue.test b/test/code/parser/stmt/function/variadicDefaultValue.test index 1bd85401b5..45b7df696e 100644 --- a/test/code/parser/stmt/function/variadicDefaultValue.test +++ b/test/code/parser/stmt/function/variadicDefaultValue.test @@ -33,4 +33,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/generator/basic.test b/test/code/parser/stmt/generator/basic.test index 57fc3a4bb1..3bbc5d66fc 100644 --- a/test/code/parser/stmt/generator/basic.test +++ b/test/code/parser/stmt/generator/basic.test @@ -321,4 +321,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/generator/yieldPrecedence.test b/test/code/parser/stmt/generator/yieldPrecedence.test index 8d8746d4de..fd2a99f195 100644 --- a/test/code/parser/stmt/generator/yieldPrecedence.test +++ b/test/code/parser/stmt/generator/yieldPrecedence.test @@ -254,4 +254,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/generator/yieldUnaryPrecedence.test b/test/code/parser/stmt/generator/yieldUnaryPrecedence.test index e4759abe0c..172984f395 100644 --- a/test/code/parser/stmt/generator/yieldUnaryPrecedence.test +++ b/test/code/parser/stmt/generator/yieldUnaryPrecedence.test @@ -55,4 +55,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/haltCompiler.test b/test/code/parser/stmt/haltCompiler.test index 112946ea7c..87b528c3ed 100644 --- a/test/code/parser/stmt/haltCompiler.test +++ b/test/code/parser/stmt/haltCompiler.test @@ -58,4 +58,4 @@ array( 1: Stmt_HaltCompiler( remaining: ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/haltCompilerInvalidSyntax.test b/test/code/parser/stmt/haltCompilerInvalidSyntax.test index 2884737d2e..9b121ecbcc 100644 --- a/test/code/parser/stmt/haltCompilerInvalidSyntax.test +++ b/test/code/parser/stmt/haltCompilerInvalidSyntax.test @@ -5,4 +5,4 @@ __halt_compiler() ----- Syntax error, unexpected EOF, expecting ';' from 2:18 to 2:18 array( -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/haltCompilerOffset.test b/test/code/parser/stmt/haltCompilerOffset.test index b713dbcdbf..790b093c3a 100644 --- a/test/code/parser/stmt/haltCompilerOffset.test +++ b/test/code/parser/stmt/haltCompilerOffset.test @@ -34,4 +34,4 @@ array( remaining: Foo ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/haltCompilerOutermostScope.test b/test/code/parser/stmt/haltCompilerOutermostScope.test index fddb6191d3..2f8a3f19a5 100644 --- a/test/code/parser/stmt/haltCompilerOutermostScope.test +++ b/test/code/parser/stmt/haltCompilerOutermostScope.test @@ -5,4 +5,4 @@ if (true) { __halt_compiler(); } ----- -__HALT_COMPILER() can only be used from the outermost scope from 3:5 to 3:19 \ No newline at end of file +__HALT_COMPILER() can only be used from the outermost scope from 3:5 to 3:19 diff --git a/test/code/parser/stmt/hashbang.test b/test/code/parser/stmt/hashbang.test index 60eff65216..11c45da60f 100644 --- a/test/code/parser/stmt/hashbang.test +++ b/test/code/parser/stmt/hashbang.test @@ -23,4 +23,4 @@ array( 2: Stmt_InlineHTML( value: #!/usr/bin/env php ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/if.test b/test/code/parser/stmt/if.test index e054c89766..53d2c8302a 100644 --- a/test/code/parser/stmt/if.test +++ b/test/code/parser/stmt/if.test @@ -100,4 +100,4 @@ array( 0: // without else ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/inlineHTML.test b/test/code/parser/stmt/inlineHTML.test index a7e543cfcd..6f23b66672 100644 --- a/test/code/parser/stmt/inlineHTML.test +++ b/test/code/parser/stmt/inlineHTML.test @@ -30,4 +30,4 @@ array( name: d ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/loop/do.test b/test/code/parser/stmt/loop/do.test index 76c8081082..ca5bdf4564 100644 --- a/test/code/parser/stmt/loop/do.test +++ b/test/code/parser/stmt/loop/do.test @@ -14,4 +14,4 @@ array( name: a ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/loop/for.test b/test/code/parser/stmt/loop/for.test index 5d5edc26a9..a121477122 100644 --- a/test/code/parser/stmt/loop/for.test +++ b/test/code/parser/stmt/loop/for.test @@ -107,4 +107,4 @@ array( 0: // alternative syntax ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/loop/foreach.test b/test/code/parser/stmt/loop/foreach.test index 504002526a..6bca655eca 100644 --- a/test/code/parser/stmt/loop/foreach.test +++ b/test/code/parser/stmt/loop/foreach.test @@ -165,4 +165,4 @@ array( 0: // alternative syntax ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/loop/while.test b/test/code/parser/stmt/loop/while.test index 65f6b2336f..e8540fa7cd 100644 --- a/test/code/parser/stmt/loop/while.test +++ b/test/code/parser/stmt/loop/while.test @@ -22,4 +22,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/multiCatch.test b/test/code/parser/stmt/multiCatch.test index 4d8fcabd81..5995997ade 100644 --- a/test/code/parser/stmt/multiCatch.test +++ b/test/code/parser/stmt/multiCatch.test @@ -71,4 +71,4 @@ array( ) finally: null ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/braced.test b/test/code/parser/stmt/namespace/braced.test index a057352f41..530a5b4634 100644 --- a/test/code/parser/stmt/namespace/braced.test +++ b/test/code/parser/stmt/namespace/braced.test @@ -43,4 +43,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/commentAfterNamespace.test b/test/code/parser/stmt/namespace/commentAfterNamespace.test index 3f379b734f..97a0778586 100644 --- a/test/code/parser/stmt/namespace/commentAfterNamespace.test +++ b/test/code/parser/stmt/namespace/commentAfterNamespace.test @@ -19,4 +19,4 @@ array( 0: // Comment ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/name.test b/test/code/parser/stmt/namespace/name.test index 9a5babb36a..74bf73ead2 100644 --- a/test/code/parser/stmt/namespace/name.test +++ b/test/code/parser/stmt/namespace/name.test @@ -47,4 +47,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/nested.test b/test/code/parser/stmt/namespace/nested.test index 840daffe92..482e70c4af 100644 --- a/test/code/parser/stmt/namespace/nested.test +++ b/test/code/parser/stmt/namespace/nested.test @@ -27,4 +27,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/notBraced.test b/test/code/parser/stmt/namespace/notBraced.test index aa34fc5c3b..264cc730cb 100644 --- a/test/code/parser/stmt/namespace/notBraced.test +++ b/test/code/parser/stmt/namespace/notBraced.test @@ -46,4 +46,4 @@ array( ) ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/namespace/nsAfterHashbang.test b/test/code/parser/stmt/namespace/nsAfterHashbang.test index 6d452538d4..bbe8e38c51 100644 --- a/test/code/parser/stmt/namespace/nsAfterHashbang.test +++ b/test/code/parser/stmt/namespace/nsAfterHashbang.test @@ -19,4 +19,4 @@ array( stmts: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/switch.test b/test/code/parser/stmt/switch.test index 8316b52c72..8be9c7f4ff 100644 --- a/test/code/parser/stmt/switch.test +++ b/test/code/parser/stmt/switch.test @@ -78,4 +78,4 @@ array( cases: array( ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/tryCatch.test b/test/code/parser/stmt/tryCatch.test index 8f88f4a359..664a7c84ce 100644 --- a/test/code/parser/stmt/tryCatch.test +++ b/test/code/parser/stmt/tryCatch.test @@ -141,4 +141,4 @@ array( 0: // no catch ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/tryCatch_without_variable.test b/test/code/parser/stmt/tryCatch_without_variable.test index 2efd8e1ab2..5fc3db7996 100644 --- a/test/code/parser/stmt/tryCatch_without_variable.test +++ b/test/code/parser/stmt/tryCatch_without_variable.test @@ -28,4 +28,4 @@ array( ) finally: null ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/tryWithoutCatch.test b/test/code/parser/stmt/tryWithoutCatch.test index 5650d80ac5..36f8242d55 100644 --- a/test/code/parser/stmt/tryWithoutCatch.test +++ b/test/code/parser/stmt/tryWithoutCatch.test @@ -26,4 +26,4 @@ array( ) finally: null ) -) \ No newline at end of file +) diff --git a/test/code/parser/stmt/unset.test b/test/code/parser/stmt/unset.test index c69679ef50..412e6d6515 100644 --- a/test/code/parser/stmt/unset.test +++ b/test/code/parser/stmt/unset.test @@ -23,4 +23,4 @@ array( ) ) ) -) \ No newline at end of file +) From 5c267f55c9cbcc968ccd035ffbf6bcf292eec707 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 May 2023 19:14:49 +0200 Subject: [PATCH 244/428] Add support for typed constants RFC: https://wiki.php.net/rfc/typed_class_constants --- grammar/php.y | 8 +- lib/PhpParser/Builder/ClassConst.php | 18 +- lib/PhpParser/Node/Stmt/ClassConst.php | 15 +- lib/PhpParser/Parser/Php7.php | 2050 ++++++++-------- lib/PhpParser/Parser/Php8.php | 2074 +++++++++-------- lib/PhpParser/PrettyPrinter/Standard.php | 4 +- lib/PhpParser/PrettyPrinterAbstract.php | 2 + test/PhpParser/Builder/ClassConstTest.php | 12 + .../insertionOfNullable.test | 9 + .../formatPreservation/removalViaNull.test | 10 + test/code/parser/errorHandling/recovery.test | 2 + test/code/parser/semiReserved.test | 2 + test/code/parser/stmt/class/anonymous.test | 1 + .../stmt/class/constModifierErrors.test | 4 + .../parser/stmt/class/constModifiers.test | 5 + test/code/parser/stmt/class/simple.test | 1 + .../parser/stmt/class/typedConstants.test | 124 + test/code/parser/stmt/newInInitializer.test | 1 + test/code/prettyPrinter/stmt/class_const.test | 6 +- 19 files changed, 2295 insertions(+), 2053 deletions(-) create mode 100644 test/code/parser/stmt/class/typedConstants.test diff --git a/grammar/php.y b/grammar/php.y index 4756898bf6..d354070115 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -340,7 +340,10 @@ non_empty_class_const_list: ; class_const: - identifier_maybe_reserved '=' expr { $$ = Node\Const_[$1, $3]; } + T_STRING '=' expr + { $$ = Node\Const_[new Node\Identifier($1, stackAttributes(#1)), $3]; } + | semi_reserved '=' expr + { $$ = Node\Const_[new Node\Identifier($1, stackAttributes(#1)), $3]; } ; inner_statement_list_ex: @@ -842,6 +845,9 @@ class_statement: | optional_attributes method_modifiers T_CONST class_const_list semi { $$ = new Stmt\ClassConst($4, $2, attributes(), $1); $this->checkClassConst($$, #2); } + | optional_attributes method_modifiers T_CONST type_expr class_const_list semi + { $$ = new Stmt\ClassConst($5, $2, attributes(), $1, $4); + $this->checkClassConst($$, #2); } | optional_attributes method_modifiers T_FUNCTION optional_ref identifier_maybe_reserved '(' parameter_list ')' optional_return_type method_body { $$ = Stmt\ClassMethod[$5, ['type' => $2, 'byRef' => $4, 'params' => $7, 'returnType' => $9, 'stmts' => $10, 'attrGroups' => $1]]; diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index de51a91096..13b4a7031d 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -22,6 +22,8 @@ class ClassConst implements PhpParser\Builder { /** @var list */ protected $attributeGroups = []; + /** @var Identifier|Node\Name|Node\ComplexType */ + protected $type; /** * Creates a class constant builder @@ -119,6 +121,19 @@ public function addAttribute($attribute) { return $this; } + /** + * Sets the constant type. + * + * @param string|Node\Name|Identifier|Node\ComplexType $type + * + * @return $this + */ + public function setType($type) { + $this->type = BuilderHelpers::normalizeType($type); + + return $this; + } + /** * Returns the built class node. * @@ -129,7 +144,8 @@ public function getNode(): PhpParser\Node { $this->constants, $this->flags, $this->attributes, - $this->attributeGroups + $this->attributeGroups, + $this->type ); } } diff --git a/lib/PhpParser/Node/Stmt/ClassConst.php b/lib/PhpParser/Node/Stmt/ClassConst.php index 8b05980c5e..38527bb839 100644 --- a/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/lib/PhpParser/Node/Stmt/ClassConst.php @@ -10,31 +10,36 @@ class ClassConst extends Node\Stmt { public $flags; /** @var Node\Const_[] Constant declarations */ public $consts; - /** @var Node\AttributeGroup[] */ + /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; + /** @var Node\Identifier|Node\Name|Node\ComplexType Type declaration */ + public $type; /** * Constructs a class const list node. * - * @param Node\Const_[] $consts Constant declarations - * @param int $flags Modifiers + * @param Node\Const_[] $consts Constant declarations + * @param int $flags Modifiers * @param array $attributes Additional attributes * @param list $attrGroups PHP attribute groups + * @param null|string|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration */ public function __construct( array $consts, int $flags = 0, array $attributes = [], - array $attrGroups = [] + array $attrGroups = [], + $type = null ) { $this->attributes = $attributes; $this->flags = $flags; $this->consts = $consts; $this->attrGroups = $attrGroups; + $this->type = $type; } public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'consts']; + return ['attrGroups', 'flags', 'type', 'consts']; } /** diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index f39511c755..b90176c310 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -160,16 +160,16 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1252; - protected $gotoTableSize = 615; + protected $actionTableSize = 1265; + protected $gotoTableSize = 624; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 429; - protected $numNonLeafStates = 730; + protected $YY2TBLSTATE = 433; + protected $numNonLeafStates = 739; protected $symbolToName = array( "EOF", @@ -386,132 +386,133 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $action = array( - 132, 133, 134, 578, 135, 136, 0, 742, 743, 744, - 137, 37, 476, 853, 1016, 854,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 101, 102, 103, 104, 105, 1100, 1101, - 1102, 1099, 1098, 1097, 1103, 736, 735,-32766, 239,-32766, + 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, + 138, 38, 480, 862, 1026, 863,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 102, 103, 104, 105, 106, 1111, 1112, + 1113, 1110, 1109, 1108, 1114, 745, 744,-32766, 242,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1233,-32766,-32766,-32766, 745,-32766,-32766,-32766, -326, - -591, -588, 825,-32766,-32766,-32766, 979, -591, -588, 267, - 138, 399, 749, 750, 751, 752, -192,-32766, 423,-32766, - -32766,-32766,-32766,-32766,-32766, 806, 753, 754, 755, 756, - 757, 758, 759, 760, 761, 762, 782, 579, 783, 784, - 785, 786, 774, 775, 340, 341, 777, 778, 763, 764, - 765, 767, 768, 769, 351, 809, 810, 811, 812, 813, - 580, 770, 771, 581, 582, 930, 794, 792, 793, 805, - 789, 790, 826, 2, 583, 584, 788, 585, 586, 587, - 588, 589, 590, 817, 477,-32766,-32766,-32766, 791, 591, - 592, -191, 139, 19, 132, 133, 134, 578, 135, 136, - 1049, 742, 743, 744, 137, 37,-32766, 34,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -110, 1100, - 1101, 1102, 1099, 1098, 1097, 1103, -270,-32766, 21, 736, - 735,-32766,-32766,-32766, 980, 128,-32766, 932,-32766,-32766, - -32766,-32766, 106, 107, 108, 602, 271, 1310, 295, 745, - 1092, 74,-32766, -326,-32766,-32766,-32766, 322, 109, -591, - -588, -591, -588, 267, 138, 399, 749, 750, 751, 752, - -192, -85, 423,-32766,-32766,-32766, 352, 819, 126, 806, - 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, - 782, 579, 783, 784, 785, 786, 774, 775, 340, 341, - 777, 778, 763, 764, 765, 767, 768, 769, 351, 809, - 810, 811, 812, 813, 580, 770, 771, 581, 582, 423, - 794, 792, 793, 805, 789, 790, 817, 716, 583, 584, - 788, 585, 586, 587, 588, 589, 590, -85, 82, 83, - 84, 238, 791, 591, 592, -191, 148, 766, 737, 738, - 739, 740, 741, 821, 742, 743, 744, 779, 780, 36, - 703, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 828, 271, 1294, 932, 375, - 376,-32766,-32766,-32766, 1228, 1227, 1229, 608, 109, 417, - 948, 949, 745, 1078, 288, 950, 103, 104, 105, 141, - 1076, 944,-32766, 322,-32766,-32766, 746, 747, 748, 749, - 750, 751, 752, 144, 1314, 815, 1339, 357, -542, 1340, - 910, 1313, 806, 753, 754, 755, 756, 757, 758, 759, - 760, 761, 762, 782, 804, 783, 784, 785, 786, 774, - 775, 776, 803, 777, 778, 763, 764, 765, 767, 768, - 769, 808, 809, 810, 811, 812, 813, 814, 770, 771, - 772, 773, -545, 794, 792, 793, 805, 789, 790, 551, - 251, 781, 787, 788, 795, 796, 798, 797, 799, 800, - -32766,-32766, -542, -542, 306, 791, 802, 801, 49, 50, - 51, 507, 52, 53, 453, 454, 455, -542, 54, 55, - -110, 56, 1025, 900, 910, -110, 323, -110, 288, -548, - 822, -542, 302, 377, 376, -110, -110, -110, -110, -110, - -110, -110, -110, 417, 308, 287, -545, -545, 1233, -364, - 1266, -364, 1233, 827, 706, 150, 57, 58, 1254, 81, - 320, -541, 59, 322, 60, 245, 246, 61, 62, 63, - 64, 65, 66, 67, 68, -545, 27, 269, 69, 439, - 508,-32766, -16, -340, 1260, 1261, 509,-32766, 826, 335, - 461, 462, 1258, 41, 24, 510, 336, 511, 912, 512, - 910, 513, 701, 1025, 514, 515, 823, 900,-32766, 43, - 44, 440, 372, 371,-32766, 45, 516, 1012, 1011, 1010, - 1013, 363, 334, 1077, 1226, -541, -541, 728, 1219, 826, - 518, 519, 520, 826, 1022, 386, 1025, 18, 826, 826, - -541, 1329, 522, 523, 365, 1247, 1248, 1249, 1250, 1244, - 1245, 294, -547, -582, -541, -582, 1025, 1251, 1246, 287, - 1224, 1228, 1227, 1229, 295,-32766, 369, 70, 910,-32766, - -32766, 318, 319, 322, -152, -152, -152, 910, 384, -110, - 1022, 1024, 912, 900,-32766, 910, 701, 1025,-32766, -152, - 853, -152, 854, -152, 1048, -152, 736, 735, 707, 1228, - 1227, 1229, 1025, 35, 248, 370, 435, 708, 74, 295, - 287, 436, 74, 437, 322, 711, 948, 949, 322, 438, - 140, 517, 910, 284, 322, 280, 886, 944, -110, -110, - -110, 31, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 736, 735, 652, 25, 671, - 672, 900, 718, 736, 735, -543, 948, 949, 912, 832, - 900, 950, 701, -152, 149, 402, 151, 945, 900, 153, - 373, 374, 378, 379, 1138, 1140, 47, 154, 155, 643, - 644, 157,-32766, 32, 123, -540, 27, 124, 1226, 129, - 130, 143, -87, 158, 159,-32766,-32766,-32766, 826,-32766, - 160,-32766, 1258,-32766, 161, 900,-32766, 285, 109, 1022, - -84,-32766,-32766,-32766, -4, 910, -78,-32766,-32766, -543, - -543, -73, -72,-32766, 414, -71, 912, -70, -69, -68, - 701, 1025,-32766, -67, -543, 965, 736, 735, 1219, 701, - 296, 297, -540, 912, -66, -300, 48, 701, -543, -540, - -540, -65, 522, 523, 280, 1247, 1248, 1249, 1250, 1244, - 1245, -46, 73, -18, -540, 147, 270, 1251, 1246, 125, - 281, 717, 720,-32766, 909, 146, 926, 72, -540, 1226, - 912, -296, 319, 322, 701, 276,-32766,-32766,-32766, 277, - -32766, 282,-32766, 283,-32766, 328, 286,-32766, 900, 289, - 290, 145,-32766,-32766,-32766, 271, -540, -540,-32766,-32766, - 298, 299, -50, 681,-32766, 414, 1341, 817, 557, 694, - 370, -540, 430,-32766, 826, 368, 659, 293, 675, 1107, - -32766, 948, 949, 303, 553, -540, 517, 641, 300, 127, - 434, 521, 944, -110, -110, -110, 131, 653, 658, 674, - 20, 301,-32766, 307, 1265,-32766, -505, 1267, 458, 928, - 39, 1226, 487, 40, 9, -495, 7, 295,-32766,-32766, - -32766, 23,-32766, 912,-32766, 0,-32766, 701, -4,-32766, - 825, 0, 725, 0,-32766,-32766,-32766, 0, 0,-32766, - -32766,-32766, 910, 0, 0, 1226,-32766, 414, 0, 0, - 367, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, - -32766, 0, 0,-32766, 0, 0, 0, 563,-32766,-32766, - -32766,-32766, 606, 0,-32766,-32766, 726, 1226, 1255, 845, - -32766, 414, 910, 891,-32766,-32766,-32766, 989,-32766,-32766, - -32766, 966,-32766, 973, 963,-32766, 974, 889, 961, 482, - -32766,-32766,-32766,-32766, 1081, 1084,-32766,-32766, 1085, 1226, - 570, 1082,-32766, 414, 1083, 1089,-32766,-32766,-32766, 837, - -32766,-32766,-32766, 1280,-32766, 900, 1298,-32766, 1332, 646, - 33, -576,-32766,-32766,-32766, -575, -574, -548,-32766,-32766, - -547, -248, -248, -248,-32766, 414, -546, 370, -489, 1, - 27, 269, 28,-32766, 29, 38, 42, 46, 948, 949, - 71, 75, 826, 517, 76, 900, 1258, 77, 886, 944, - -110, -110, -110, 78, 79, 80, 142, 152, 156, 244, - 324, -247, -247, -247, 352, 353, 354, 370, 355, 356, - 722, 357, 358, 359, 360, 361, 362, 364, 948, 949, - 912, 431, 1219, 517, 701, -248, 550, 317, 886, 944, - -110, -110, -110, -273, -271, -270, 12, 523, 27, 1247, - 1248, 1249, 1250, 1244, 1245, 13, 14, 15, 17, 401, - 826, 1251, 1246, 478, 1258, 479,-32766, 486, 489, 490, - 912, 72, 1226, 887, 701, -247, 319, 322, 491,-32766, - -32766,-32766, 492,-32766, 496,-32766, 497,-32766, 498, 505, - -32766, 568, 688, 1237, 1178,-32766,-32766,-32766, 1256, 1051, - 1219,-32766,-32766, 1050, 1031, 1214, 1027,-32766, 414, -275, - -102, 11, 16, 26, 292, 523,-32766, 1247, 1248, 1249, - 1250, 1244, 1245, 400, 599, 603, 632, 693, 1182, 1251, - 1246, 1232, 1179, 1311, 1259, 366, 702, 705, 709, 72, - 710, -509, 712, 713, 319, 322, 714, 715, 719, 704, - 0, 1336, 1338, 848, 847, 856, 0, 938, 981, 855, - 1337, 937, 935, 936, 939, 1210, 919, 929, 917, 971, - 972, 630, 1335, 1292, 1281, 1299, 1308, 0, 1195, 0, - 0, 322 + -32767, 1244,-32766,-32766,-32766, 754,-32766,-32766,-32766, -327, + -593, -590, 834,-32766,-32766,-32766, 989, -593, -590, 270, + 139, 402, 758, 759, 760, 761, -193,-32766, 427,-32766, + -32766,-32766,-32766,-32766,-32766, 815, 762, 763, 764, 765, + 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, + 794, 795, 783, 784, 343, 344, 786, 787, 772, 773, + 774, 776, 777, 778, 354, 818, 819, 820, 821, 822, + 584, 779, 780, 585, 586, 940, 803, 801, 802, 814, + 798, 799, 835, 2, 587, 588, 797, 589, 590, 591, + 592, 593, 594, 826, 481,-32766,-32766,-32766, 800, 595, + 596, -192, 140, 23, 133, 134, 135, 582, 136, 137, + 1059, 751, 752, 753, 138, 38,-32766, 35,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -110, 1111, + 1112, 1113, 1110, 1109, 1108, 1114, -271,-32766, 21, 745, + 744,-32766,-32766,-32766, 990, 129,-32766, 942,-32766,-32766, + -32766,-32766, 107, 108, 109, 606, 274, 1321, 298, 754, + 1103, 75,-32766, -327,-32766,-32766,-32766, 325, 110, -593, + -590, -593, -590, 270, 139, 402, 758, 759, 760, 761, + -193, -85, 427,-32766,-32766,-32766, 355, 828, 127, 815, + 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, + 791, 583, 792, 793, 794, 795, 783, 784, 343, 344, + 786, 787, 772, 773, 774, 776, 777, 778, 354, 818, + 819, 820, 821, 822, 584, 779, 780, 585, 586, 427, + 803, 801, 802, 814, 798, 799, 826, 725, 587, 588, + 797, 589, 590, 591, 592, 593, 594, -85, 83, 84, + 85, 241, 800, 595, 596, -192, 149, 775, 746, 747, + 748, 749, 750, 830, 751, 752, 753, 788, 789, 37, + 712, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 942, 274, 837, 145, 378, + 379,-32766,-32766,-32766, 1239, 1238, 1240, 612, 110, 421, + 958, 959, 754, 1089, 291, 960, 104, 105, 106, 142, + 1087, 954,-32766, 325,-32766,-32766, 755, 756, 757, 758, + 759, 760, 761, 254, 360, 824, 1350, 1088, -544, 1351, + 920, 737, 815, 762, 763, 764, 765, 766, 767, 768, + 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, + 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, + 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, + 781, 782, -547, 803, 801, 802, 814, 798, 799, 555, + 309, 790, 796, 797, 804, 805, 807, 806, 808, 809, + -32766, 311, -544, -544, 323, 800, 811, 810, 50, 51, + 52, 511, 53, 54, 457, 458, 459, -544, 55, 56, + -110, 57, 1035, 910, 920, -110, 326, -110, 291, -550, + 1305, -544, 305, 380, 379, -110, -110, -110, -110, -110, + -110, -110, -110, 421, 338, 290, -547, -547, 958, 959, + 1277, 831, 1244, 960, 715, 836, 58, 59, 1265, 955, + 339, -543, 60, 368, 61, 248, 249, 62, 63, 64, + 65, 66, 67, 68, 69, -547, 28, 272, 70, 443, + 512,-32766, -16, -341, 1271, 1272, 513, 372, 835, 1244, + 465, 466, 1269, 42, 25, 514,-32766, 515, 922, 516, + 920, 517, 710, 1035, 518, 519, 387, 910,-32766, 44, + 45, 444, 375, 374,-32766, 46, 520, 1022, 1021, 1020, + 1023, 366, 337, 439, 1237, -543, -543, 832, 1230,-32766, + 522, 523, 524, 835, 440, -584, 1035, -584, 835, 835, + -543, 1340, 526, 527, 1032, 1258, 1259, 1260, 1261, 1255, + 1256, 297, -549, -366, -543, -366, 1058, 1262, 1257, 290, + 1235, 1239, 1238, 1240, 298,-32766, 1035, 71, 920, 441, + 835, 321, 322, 325, -153, -153, -153, 1325, 389, -110, + 7, 1034, 922, 910, 1324, 287, 710, 1035,-32766, -153, + 442, -153, 82, -153, 841, -153, 325, 151, 716, 1239, + 1238, 1240, 152, 36, 251, 373, 862, 154, 863, 298, + 290, 155, 75, 156, 287, -545, 958, 959, 325, 158, + 141, 521, 920, 33, 325,-32766, 896, 954, -110, -110, + -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 745, 744, 1032, 920, 75, + -78, 910, 717, 745, 744, 325, 745, 744, 922, 920, + -32766,-32766, 710, -153, 690, 656, 26, 675, 676, 1035, + 48, 1032, 150, 405, 1149, 1151, 376, 377, 720, -545, + -545, -58,-32766, 381, 382, -542, 28, -57, 1237, 727, + 647, 648, 283, 1035, -545,-32766,-32766,-32766, 835,-32766, + 691,-32766, 1269,-32766, 124, 910,-32766, -87, -545, 125, + 130,-32766,-32766,-32766, -4, 920, 283,-32766,-32766, 131, + 144, 692, 693,-32766, 418, 159, 922, 160, 161, 162, + 710, 910,-32766, 163, 299, 300, 745, 744, 1230, 1239, + 1238, 1240, 910, -301, 288, 283, -84, -78, 936, -542, + -542, -73, 526, 527, -542, 1258, 1259, 1260, 1261, 1255, + 1256, 49, 74, 126, -542, -72, -71, 1262, 1257, -70, + -69, -68, -67,-32766, -66, -65, -46, 73, -542, 1237, + 975, -18, 322, 325, 710, 148,-32766,-32766,-32766, 273, + -32766, 284,-32766, 726,-32766, 729, 919,-32766, 910, 147, + 289, -297,-32766,-32766,-32766, 279, 922, 280,-32766,-32766, + 710, 285, -50, 286,-32766, 418, 292, 922, -542, -542, + 373, 710, 434,-32766, 331, 301, 302, 296, 293, 146, + 274, 958, 959, -542, 685, 826, 521,-32766, 110, 1352, + 371, 525, 954, -110, -110, -110, 132, -542, 20, 835, + 561, 701, 438, 663, 128,-32766, 1118, 303, 310, 645, + 557, 1237, 306, 304, 10,-32766, 1266, 657,-32766,-32766, + -32766, -507,-32766, 922,-32766, 703,-32766, 710, -4,-32766, + 678, 662, 679, 1276,-32766,-32766,-32766, 462, 1278,-32766, + -32766,-32766, 920, 491, 298, 1237,-32766, 418, -497, 1270, + 567, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, + -32766, 0, 0,-32766, 0, 0, 0, 0,-32766,-32766, + -32766,-32766, 0, 0,-32766,-32766, 0, 1237, 0, 8, + -32766, 418, 920, 24,-32766,-32766,-32766, 370,-32766,-32766, + -32766, 938,-32766, 0, 0,-32766, 610, 834, 0, 486, + -32766,-32766,-32766,-32766, 40, -578,-32766,-32766, 41, 1237, + 574, 734,-32766, 418, 735, 854,-32766,-32766,-32766, 901, + -32766,-32766,-32766, 999,-32766, 910, 976,-32766, 983, 973, + 984, 899,-32766,-32766,-32766, 971, 1092, 1095,-32766,-32766, + 1096, -249, -249, -249,-32766, 418, 1093, 373, 1094, 1100, + 28, 272, 846,-32766, 1291, 1309, 1343, 731, 958, 959, + 650, -274, 835, 521, -577, 910, 1269, -576, 896, 954, + -110, -110, -110, -550, -549, -548, -491, 1, 29, 30, + 39, -248, -248, -248, 43, 47, 72, 373, 76, 77, + 897, 78, 79, 80, 81, 143, 153, 157, 958, 959, + 922, 247, 1230, 521, 710, -249, 327, 355, 896, 954, + -110, -110, -110, 356, 357, 358, 359, 527, 28, 1258, + 1259, 1260, 1261, 1255, 1256, 360, 361, 362, 363, 364, + 835, 1262, 1257, 365, 1269, 367,-32766, 435, 554, 1347, + 922, 73, 1237, 1349, 710, -248, 322, 325, -272,-32766, + -32766,-32766, -271,-32766, 13,-32766, 14,-32766, 15, 16, + -32766, 18, 404, 482, 483,-32766,-32766,-32766, 490, 493, + 1230,-32766,-32766, 494, 495, 496, 500,-32766, 418, 501, + 502, 509, 572, 696, 1248, 527,-32766, 1258, 1259, 1260, + 1261, 1255, 1256, 1189, 1267, 1061, 1060, 1041, 1225, 1262, + 1257, 1037, -276, -102, 12, 17, 27, 295, 403, 73, + 34, 603, 607, 636, 322, 325, 702, 1193, 1243, 1190, + 1322, 0, 320, 369, 711, 0, 714, 718, 719, 721, + 722, 723, 724, 728, 713, 0, 857, 856, 865, 948, + 991, 864, 1348, 947, 945, 946, 949, 1221, 929, 939, + 927, 981, 982, 634, 1346, 1303, 1292, 1310, 1319, 0, + -511, 1206, 0, 0, 325 ); protected $actionCheck = array( @@ -549,105 +550,106 @@ class Php7 extends \PhpParser\ParserAbstract 5, 6, 7, 156, 9, 10, 11, 12, 13, 30, 163, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 1, 57, 1, 122, 106, + 51, 52, 53, 54, 55, 122, 57, 1, 8, 106, 107, 9, 10, 11, 155, 156, 157, 51, 69, 116, 117, 118, 57, 164, 30, 122, 50, 51, 52, 163, 1, 128, 30, 167, 32, 33, 71, 72, 73, 74, - 75, 76, 77, 8, 1, 80, 80, 161, 70, 83, - 1, 8, 87, 88, 89, 90, 91, 92, 93, 94, + 75, 76, 77, 8, 161, 80, 80, 159, 70, 83, + 1, 163, 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, 70, 128, 129, 130, 131, 132, 133, 85, 8, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 116, 9, 134, 135, 8, 150, 151, 152, 2, 3, + 116, 8, 134, 135, 8, 150, 151, 152, 2, 3, 4, 5, 6, 7, 129, 130, 131, 149, 12, 13, 101, 15, 138, 84, 1, 106, 70, 108, 30, 161, - 80, 163, 113, 106, 107, 116, 117, 118, 119, 120, - 121, 122, 123, 116, 8, 161, 134, 135, 1, 106, - 146, 108, 1, 159, 31, 14, 50, 51, 1, 163, - 8, 70, 56, 167, 58, 59, 60, 61, 62, 63, + 1, 163, 113, 106, 107, 116, 117, 118, 119, 120, + 121, 122, 123, 116, 8, 161, 134, 135, 117, 118, + 146, 80, 1, 122, 31, 159, 50, 51, 1, 128, + 8, 70, 56, 8, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 163, 70, 71, 72, 73, - 74, 116, 31, 164, 78, 79, 80, 116, 82, 8, - 134, 135, 86, 87, 88, 89, 8, 91, 159, 93, - 1, 95, 163, 138, 98, 99, 156, 84, 137, 103, + 74, 116, 31, 164, 78, 79, 80, 8, 82, 1, + 134, 135, 86, 87, 88, 89, 9, 91, 159, 93, + 1, 95, 163, 138, 98, 99, 8, 84, 116, 103, 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 159, 80, 134, 135, 163, 122, 82, - 124, 125, 126, 82, 116, 106, 138, 108, 82, 82, - 149, 85, 136, 137, 8, 139, 140, 141, 142, 143, - 144, 145, 161, 160, 163, 162, 138, 151, 152, 161, - 116, 155, 156, 157, 158, 116, 8, 161, 1, 9, - 10, 165, 166, 167, 75, 76, 77, 1, 8, 128, - 116, 137, 159, 84, 137, 1, 163, 138, 137, 90, - 106, 92, 108, 94, 1, 96, 37, 38, 31, 155, - 156, 157, 138, 147, 148, 106, 8, 31, 161, 158, - 161, 8, 161, 8, 167, 31, 117, 118, 167, 8, - 163, 122, 1, 30, 167, 161, 127, 128, 129, 130, + 122, 115, 116, 8, 80, 134, 135, 156, 122, 137, + 124, 125, 126, 82, 8, 160, 138, 162, 82, 82, + 149, 85, 136, 137, 116, 139, 140, 141, 142, 143, + 144, 145, 161, 106, 163, 108, 1, 151, 152, 161, + 116, 155, 156, 157, 158, 116, 138, 161, 1, 8, + 82, 165, 166, 167, 75, 76, 77, 1, 106, 128, + 108, 137, 159, 84, 8, 30, 163, 138, 137, 90, + 8, 92, 163, 94, 8, 96, 167, 14, 31, 155, + 156, 157, 14, 147, 148, 106, 106, 14, 108, 158, + 161, 14, 161, 14, 30, 70, 117, 118, 167, 14, + 163, 122, 1, 14, 167, 137, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 37, 38, 75, 76, 75, - 76, 84, 31, 37, 38, 70, 117, 118, 159, 8, - 84, 122, 163, 164, 101, 102, 14, 128, 84, 14, - 106, 107, 106, 107, 59, 60, 70, 14, 14, 111, - 112, 14, 74, 14, 16, 70, 70, 16, 80, 16, - 16, 16, 31, 16, 16, 87, 88, 89, 82, 91, - 16, 93, 86, 95, 16, 84, 98, 37, 69, 116, - 31, 103, 104, 105, 0, 1, 31, 109, 110, 134, - 135, 31, 31, 115, 116, 31, 159, 31, 31, 31, - 163, 138, 124, 31, 149, 159, 37, 38, 122, 163, - 134, 135, 70, 159, 31, 35, 70, 163, 163, 134, - 135, 31, 136, 137, 161, 139, 140, 141, 142, 143, - 144, 31, 154, 31, 149, 31, 31, 151, 152, 163, - 31, 31, 31, 74, 31, 31, 38, 161, 163, 80, - 159, 35, 166, 167, 163, 35, 87, 88, 89, 35, - 91, 35, 93, 35, 95, 35, 37, 98, 84, 37, - 37, 70, 103, 104, 105, 57, 134, 135, 109, 110, - 134, 135, 31, 77, 115, 116, 83, 80, 89, 92, - 106, 149, 108, 124, 82, 149, 100, 113, 100, 82, - 85, 117, 118, 114, 85, 163, 122, 113, 132, 163, - 128, 127, 128, 129, 130, 131, 31, 90, 96, 94, - 97, 133, 137, 132, 146, 74, 149, 146, 97, 154, - 159, 80, 97, 159, 150, 149, 149, 158, 87, 88, - 89, 149, 91, 159, 93, -1, 95, 163, 164, 98, - 155, -1, 159, -1, 103, 104, 105, -1, -1, 74, - 109, 110, 1, -1, -1, 80, 115, 116, -1, -1, - 149, -1, 87, 88, 89, 124, 91, -1, 93, -1, - 95, -1, -1, 98, -1, -1, -1, 153, 103, 104, - 105, 74, 153, -1, 109, 110, 159, 80, 160, 159, - 115, 116, 1, 159, 87, 88, 89, 159, 91, 124, - 93, 159, 95, 159, 159, 98, 159, 159, 159, 102, - 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, - 81, 159, 115, 116, 159, 159, 87, 88, 89, 160, - 91, 124, 93, 160, 95, 84, 160, 98, 160, 160, - 163, 161, 103, 104, 105, 161, 161, 161, 109, 110, - 161, 100, 101, 102, 115, 116, 161, 106, 161, 161, - 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, - 161, 161, 82, 122, 161, 84, 86, 161, 127, 128, + 25, 26, 27, 28, 29, 37, 38, 116, 1, 161, + 16, 84, 31, 37, 38, 167, 37, 38, 159, 1, + 9, 10, 163, 164, 80, 75, 76, 75, 76, 138, + 70, 116, 101, 102, 59, 60, 106, 107, 31, 134, + 135, 16, 74, 106, 107, 70, 70, 16, 80, 31, + 111, 112, 161, 138, 149, 87, 88, 89, 82, 91, + 116, 93, 86, 95, 16, 84, 98, 31, 163, 16, + 16, 103, 104, 105, 0, 1, 161, 109, 110, 16, + 16, 137, 138, 115, 116, 16, 159, 16, 16, 16, + 163, 84, 124, 16, 134, 135, 37, 38, 122, 155, + 156, 157, 84, 35, 37, 161, 31, 31, 38, 134, + 135, 31, 136, 137, 70, 139, 140, 141, 142, 143, + 144, 70, 154, 163, 149, 31, 31, 151, 152, 31, + 31, 31, 31, 74, 31, 31, 31, 161, 163, 80, + 159, 31, 166, 167, 163, 31, 87, 88, 89, 31, + 91, 31, 93, 31, 95, 31, 31, 98, 84, 31, + 37, 35, 103, 104, 105, 35, 159, 35, 109, 110, + 163, 35, 31, 35, 115, 116, 37, 159, 134, 135, + 106, 163, 108, 124, 35, 134, 135, 113, 37, 70, + 57, 117, 118, 149, 77, 80, 122, 85, 69, 83, + 149, 127, 128, 129, 130, 131, 31, 163, 97, 82, + 89, 80, 128, 100, 163, 74, 82, 132, 132, 113, + 85, 80, 114, 133, 150, 137, 160, 90, 87, 88, + 89, 149, 91, 159, 93, 92, 95, 163, 164, 98, + 94, 96, 100, 146, 103, 104, 105, 97, 146, 74, + 109, 110, 1, 97, 158, 80, 115, 116, 149, 166, + 153, -1, 87, 88, 89, 124, 91, -1, 93, -1, + 95, -1, -1, 98, -1, -1, -1, -1, 103, 104, + 105, 74, -1, -1, 109, 110, -1, 80, -1, 149, + 115, 116, 1, 149, 87, 88, 89, 149, 91, 124, + 93, 154, 95, -1, -1, 98, 153, 155, -1, 102, + 103, 104, 105, 74, 159, 161, 109, 110, 159, 80, + 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, + 91, 124, 93, 159, 95, 84, 159, 98, 159, 159, + 159, 159, 103, 104, 105, 159, 159, 159, 109, 110, + 159, 100, 101, 102, 115, 116, 159, 106, 159, 159, + 70, 71, 160, 124, 160, 160, 160, 164, 117, 118, + 160, 162, 82, 122, 161, 84, 86, 161, 127, 128, 129, 130, 131, 161, 161, 161, 161, 161, 161, 161, 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, - 159, 161, 122, 122, 163, 164, 161, 163, 127, 128, - 129, 130, 131, 162, 162, 162, 162, 137, 70, 139, - 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, - 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, + 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, + 129, 130, 131, 161, 161, 161, 161, 137, 70, 139, + 140, 141, 142, 143, 144, 161, 161, 161, 161, 161, + 82, 151, 152, 161, 86, 161, 74, 161, 161, 164, 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, 88, 89, 162, 91, 162, 93, 162, 95, 162, 162, 98, 162, 162, 162, 162, 103, 104, 105, 162, 162, 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, - 152, 162, 162, 162, 166, 163, 163, 163, 163, 161, - 163, 165, 163, 163, 166, 167, 163, 163, 163, 163, - -1, 164, 164, 164, 164, 164, -1, 164, 164, 164, + 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, + 163, 162, 162, 162, 166, 167, 162, 162, 162, 162, + 162, -1, 163, 163, 163, -1, 163, 163, 163, 163, + 163, 163, 163, 163, 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, -1, 165, -1, - -1, 167 + 164, 164, 164, 164, 164, 164, 164, 164, 164, -1, + 165, 165, -1, -1, 167 ); protected $actionBase = array( - 0, -2, 152, 549, 764, 941, 981, 507, 199, 157, - 855, 617, 634, 634, 671, 634, 473, 626, 305, 305, - 63, 305, 305, 305, 389, 389, 389, 658, 658, 658, - 658, 749, 749, 897, 897, 929, 865, 831, 1062, 1062, + 0, -2, 152, 549, 764, 941, 981, 634, 507, 199, + 157, 889, 617, 697, 697, 708, 697, 473, 671, 821, + 63, 305, 305, 821, 305, 389, 389, 389, 658, 658, + 658, 658, 749, 749, 897, 897, 929, 865, 831, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, @@ -660,66 +662,67 @@ class Php7 extends \PhpParser\ParserAbstract 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 344, 35, 204, 719, 1022, 1036, 1032, 1039, - 1020, 1019, 1031, 1033, 1040, 1078, 1079, 794, 1080, 1081, - 1077, 1082, 1034, 869, 1021, 1035, 289, 289, 289, 289, + 1062, 1062, 1062, 1062, 346, 35, 204, 659, 1045, 1055, + 1049, 1056, 1043, 1042, 1046, 1050, 1057, 1090, 1091, 818, + 1092, 1093, 1089, 1094, 1051, 900, 1044, 1054, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 442, 224, 610, 43, 43, 43, 43, 43, + 289, 289, 289, 289, 289, 537, 224, 701, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 54, 54, 54, 666, 666, - 342, 182, 980, 166, 1048, 1048, 1048, 1048, 1048, 1048, - 1048, 1048, 1048, 665, 47, 136, 136, 7, 7, 7, - 7, 7, 369, -25, -25, -25, -25, 501, 448, 50, - 643, 497, 87, 393, 334, 243, 514, 514, 316, 316, - 468, 468, 499, 499, 468, 468, 468, 415, 415, 415, - 415, 318, 441, -93, 354, 765, 206, 206, 206, 206, - 765, 765, 765, 765, 761, 1038, 765, 765, 765, 635, - 722, 722, 726, 149, 149, 149, 722, 534, 799, 506, - 534, 506, 346, 306, 421, 589, 377, 443, 421, 362, - 656, 60, 59, 775, 614, 775, 1018, 75, 795, 226, - 780, 740, 856, 1056, 1041, 776, 1075, 778, 1076, 335, - 406, 735, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, - 1017, 1017, 1017, 1084, 609, 1018, 400, 1084, 1084, 1084, - 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, - 618, 400, 622, 624, 400, 810, 609, 344, 766, 344, - 344, 344, 344, 344, 344, 344, 344, 344, 344, 782, - -19, 344, 35, 124, 124, 414, 13, 124, 124, 124, - 124, 344, 344, 344, 614, 798, 814, 616, 819, 143, - 798, 798, 798, 200, 51, 24, 68, 760, 796, 479, - 787, 787, 797, 888, 888, 787, 792, 787, 797, 896, - 787, 787, 888, 888, 759, 187, 648, 531, 608, 653, - 888, 446, 787, 787, 787, 787, 771, 655, 787, 432, - 375, 787, 787, 771, 756, 789, 125, 768, 888, 888, - 888, 771, 586, 768, 768, 768, 773, 817, 774, 785, - 502, 486, 701, 159, 788, 785, 785, 787, 620, 774, - 785, 774, 785, 755, 785, 785, 785, 774, 785, 792, - 538, 785, 727, 661, 145, 785, 6, 899, 900, 711, - 903, 894, 906, 940, 912, 913, 1043, 887, 918, 895, - 914, 945, 893, 891, 793, 718, 721, 767, 757, 885, - 689, 689, 689, 876, 689, 689, 689, 689, 689, 689, - 689, 689, 718, 818, 801, 762, 779, 924, 723, 724, - 999, 758, 979, 1046, 1083, 923, 1001, 915, 751, 725, - 966, 925, 926, 944, 927, 928, 967, 1002, 820, 1006, - 1057, 781, 1058, 1059, 859, 931, 1044, 689, 899, 913, - 729, 895, 914, 893, 891, 770, 763, 748, 752, 747, - 746, 741, 744, 784, 1007, 875, 870, 863, 930, 879, - 718, 866, 954, 867, 971, 973, 1042, 811, 783, 868, - 1060, 932, 933, 934, 1045, 1011, 1047, 754, 963, 951, - 975, 815, 1061, 976, 977, 986, 990, 1049, 1063, 1050, - 874, 1053, 824, 807, 952, 802, 1064, 491, 806, 808, - 813, 936, 702, 919, 1054, 1065, 1066, 992, 994, 996, - 1067, 1068, 916, 828, 964, 805, 965, 953, 832, 834, - 705, 812, 1012, 800, 804, 809, 713, 714, 1069, 1070, - 1071, 917, 790, 786, 835, 837, 1013, 720, 1014, 1072, - 717, 838, 728, 1073, 1000, 734, 738, 777, 1055, 772, - 769, 803, 935, 791, 839, 1074, 845, 846, 849, 997, - 852, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 43, 43, 43, 43, 43, 43, 43, 43, 54, 54, + 54, 666, 666, 342, 182, 980, 166, 1048, 1048, 1048, + 1048, 1048, 1048, 1048, 1048, 1048, 665, 47, 136, 136, + 7, 7, 7, 7, 7, 369, -25, -25, -25, -25, + 501, 448, 50, 605, 538, 87, 497, 334, 243, 581, + 581, 316, 316, 478, 478, 499, 499, 478, 478, 478, + 415, 415, 415, 415, 318, 441, -93, 354, 778, 206, + 206, 206, 206, 778, 778, 778, 778, 792, 783, 778, + 778, 778, 595, 734, 734, 741, 149, 149, 149, 734, + 550, 825, 506, 550, 506, 479, 306, 442, 381, 377, + 425, 442, 362, 650, 60, 59, 842, 620, 842, 1041, + 75, 802, 223, 795, 770, 890, 1071, 1058, 803, 1087, + 832, 1088, 335, 406, 766, 1040, 1040, 1040, 1040, 1040, + 1040, 1040, 1040, 1040, 1040, 1040, 1097, 669, 1041, 421, + 1097, 1097, 1097, 669, 669, 669, 669, 669, 669, 669, + 669, 669, 669, 629, 421, 640, 642, 421, 839, 669, + 346, 799, 346, 346, 346, 346, 346, 346, 346, 346, + 346, 346, 800, -19, 346, 35, 124, 124, 228, 13, + 124, 124, 124, 124, 346, 346, 346, 346, 620, 823, + 797, 627, 843, 143, 823, 823, 823, 200, 51, 24, + 68, 758, 816, 522, 805, 805, 824, 916, 916, 805, + 817, 805, 824, 924, 805, 805, 916, 916, 786, 187, + 565, 486, 529, 576, 916, 432, 805, 805, 805, 805, + 776, 611, 805, 375, 340, 805, 805, 776, 775, 810, + 125, 780, 916, 916, 916, 776, 505, 780, 780, 780, + 852, 855, 796, 808, 446, 443, 636, 159, 760, 808, + 808, 805, 548, 796, 808, 796, 808, 837, 808, 808, + 808, 796, 808, 817, 502, 808, 759, 632, 145, 808, + 6, 925, 927, 726, 928, 919, 930, 976, 931, 932, + 1061, 915, 940, 923, 933, 977, 918, 917, 815, 738, + 743, 830, 772, 914, 819, 819, 819, 912, 819, 819, + 819, 819, 819, 819, 819, 819, 738, 756, 838, 774, + 811, 952, 744, 753, 1020, 787, 926, 1095, 1096, 946, + 1022, 934, 845, 754, 999, 953, 893, 1059, 954, 955, + 1000, 1031, 856, 1032, 975, 809, 979, 1072, 892, 965, + 1063, 819, 925, 932, 765, 923, 933, 918, 917, 794, + 793, 790, 791, 789, 788, 784, 785, 804, 1033, 906, + 844, 894, 964, 913, 738, 895, 992, 1047, 1001, 1002, + 1060, 840, 806, 896, 1073, 966, 967, 968, 1064, 1034, + 1065, 849, 994, 899, 1006, 846, 1074, 1007, 1011, 1012, + 1013, 1066, 1075, 1067, 903, 1068, 860, 827, 986, 835, + 1076, 633, 826, 828, 841, 974, 638, 945, 1069, 1077, + 1078, 1014, 1017, 1018, 1079, 1080, 935, 864, 996, 836, + 997, 990, 867, 869, 643, 829, 1035, 820, 822, 813, + 647, 649, 1081, 1082, 1083, 936, 812, 807, 870, 871, + 1036, 757, 1039, 1084, 655, 872, 761, 1085, 1021, 762, + 763, 684, 721, 715, 767, 833, 1070, 834, 798, 801, + 972, 763, 814, 876, 1086, 877, 878, 881, 1019, 887, + 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, 456, 456, 456, 456, 456, 456, 305, 305, 305, - 305, 456, 456, 456, 456, 456, 456, 456, 0, 0, - 305, 0, 0, 0, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 305, 305, 305, 305, + 305, 456, 456, 456, 456, 456, 456, 456, 305, 305, + 0, 0, 305, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, @@ -733,180 +736,183 @@ class Php7 extends \PhpParser\ParserAbstract 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 289, 289, 289, 289, 289, 289, 289, 289, + 456, 456, 456, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 0, 0, 0, 0, + 289, 289, 289, 289, 289, 289, 289, 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, 289, 289, 289, 289, 289, 289, 289, 289, + 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 494, 494, - 289, 289, 494, 289, 494, 494, 494, 494, 494, 494, - 494, 494, 494, 0, 289, 289, 289, 289, 289, 289, - 289, 289, 759, 149, 149, 149, 149, 494, 494, 494, - 494, 494, -88, -88, 494, 759, 494, 494, 149, 149, - 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, - 494, 0, 0, 400, 506, 494, 792, 792, 792, 792, - 494, 494, 494, 494, 506, 506, 494, 494, 494, 0, - 0, 0, 0, 0, 0, 0, 0, 400, 506, 0, - 400, 0, 792, 792, 494, 0, 759, 383, 494, 0, - 0, 0, 0, 400, 792, 400, 609, 787, 506, 787, - 609, 609, 124, 344, 383, 613, 613, 613, 613, 0, - 0, 614, 759, 759, 759, 759, 759, 759, 759, 759, - 759, 759, 759, 792, 0, 759, 0, 792, 792, 792, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 792, 0, 0, 888, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 896, - 0, 0, 0, 0, 0, 0, 792, 0, 0, 0, - 0, 0, 0, 0, 0, 689, 811, 0, 811, 0, - 689, 689, 689, 0, 0, 0, 0, 812, 720 + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 494, 494, 289, 289, 494, 289, 494, 494, 494, 494, + 494, 494, 494, 494, 494, 0, 289, 289, 289, 289, + 289, 289, 289, 289, 786, 149, 149, 149, 149, 494, + 494, 494, 494, 494, -88, -88, 494, 786, 494, 494, + 149, 149, 494, 494, 494, 494, 494, 494, 494, 494, + 494, 494, 494, 0, 0, 421, 506, 494, 817, 817, + 817, 817, 494, 494, 494, 494, 506, 506, 494, 494, + 494, 0, 0, 0, 0, 0, 0, 0, 0, 421, + 506, 0, 421, 0, 817, 817, 494, 0, 786, 626, + 494, 0, 0, 0, 0, 421, 817, 421, 669, 805, + 506, 805, 669, 669, 124, 346, 626, 621, 621, 621, + 621, 0, 0, 620, 786, 786, 786, 786, 786, 786, + 786, 786, 786, 786, 786, 817, 0, 786, 0, 817, + 817, 817, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 817, 0, 0, + 916, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 924, 0, 0, 0, 0, 0, 0, 817, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 819, 840, + 0, 840, 0, 819, 819, 819, 0, 0, 0, 0, + 829, 757 ); protected $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767,32767,32767,32767,32767,32767,32767, 594, 594, 594, - 594,32767,32767, 252, 102,32767,32767, 467, 384, 384, - 384,32767,32767, 538, 538, 538, 538, 538, 538,32767, - 32767,32767,32767,32767,32767, 467,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 100,32767,32767,32767,32767, 596, 596, + 596, 596,32767,32767, 253, 102,32767,32767, 469, 386, + 386, 386,32767,32767, 540, 540, 540, 540, 540, 540, + 32767,32767,32767,32767,32767,32767, 469,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, 100,32767, - 32767,32767, 36, 7, 8, 10, 11, 49, 17, 322, - 32767,32767,32767,32767, 102,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, + 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, + 323,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 587,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 589,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 471, 450, 451, 453, - 454, 383, 539, 593, 325, 590, 382, 145, 337, 327, - 240, 328, 256, 472, 257, 473, 476, 477, 213, 285, - 379, 149, 414, 468, 416, 466, 470, 415, 389, 395, - 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 387, 388, 469, 447, 446, 445,32767,32767, - 412, 413,32767, 417,32767,32767,32767,32767,32767,32767, - 32767, 102,32767, 386, 420, 418, 419, 436, 437, 434, - 435, 438,32767, 439, 440, 441, 442,32767, 314,32767, - 32767,32767, 363, 361, 314, 111,32767,32767, 427, 428, + 32767,32767,32767,32767,32767,32767,32767,32767, 473, 452, + 453, 455, 456, 385, 541, 595, 326, 592, 384, 145, + 338, 328, 241, 329, 257, 474, 258, 475, 478, 479, + 214, 286, 381, 149, 150, 416, 470, 418, 468, 472, + 417, 391, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 389, 390, 471, 449, 448, + 447,32767,32767, 414, 415,32767, 419,32767,32767,32767, + 32767,32767,32767,32767, 102,32767, 388, 422, 420, 421, + 438, 439, 436, 437, 440,32767, 441, 442, 443, 444, + 32767, 315,32767,32767,32767, 365, 363, 315, 111,32767, + 32767, 429, 430,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 534, 446,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 102, + 32767, 100, 536, 411, 413, 503, 424, 425, 423, 392, + 32767, 510,32767, 102, 512,32767,32767,32767,32767,32767, + 32767,32767, 535,32767, 542, 542,32767, 496, 100, 194, + 32767,32767,32767, 194, 194,32767,32767,32767,32767,32767, + 32767,32767,32767, 603, 496, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110,32767, 194, 110,32767, + 32767,32767, 100, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 189,32767, 267, 269, 102, 557, 194, + 32767, 515,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 508,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 496, 434, + 138,32767, 138, 542, 426, 427, 428, 498, 542, 542, + 542, 311, 288,32767,32767,32767,32767, 513, 513, 100, + 100, 100, 100, 508,32767,32767,32767,32767, 111, 99, + 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, + 222, 99,32767, 101, 101,32767,32767, 222, 224, 211, + 101, 226,32767, 561, 562, 222, 101, 226, 226, 226, + 246, 246, 485, 317, 101, 99, 101, 101, 196, 317, + 317,32767, 101, 485, 317, 485, 317, 198, 317, 317, + 317, 485, 317,32767, 101, 317, 213, 99, 99, 317, + 32767,32767,32767, 498,32767,32767,32767,32767,32767,32767, + 32767, 221,32767,32767,32767,32767,32767,32767,32767,32767, + 529,32767, 546, 559, 432, 433, 435, 544, 457, 458, + 459, 460, 461, 462, 463, 465, 591,32767, 502,32767, + 32767,32767,32767, 337,32767, 601,32767, 601,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 532, 444,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 102,32767, 100, 534, - 409, 411, 501, 422, 423, 421, 390,32767, 508,32767, - 102, 510,32767,32767,32767,32767,32767,32767,32767, 533, - 32767, 540, 540,32767, 494, 100, 193,32767,32767,32767, - 193, 193,32767,32767,32767,32767,32767,32767,32767,32767, - 601, 494, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110,32767, 193, 110,32767,32767,32767, 100, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 188,32767, 266, 268, 102, 555, 193,32767, 513,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 506, + 32767,32767,32767,32767, 602,32767, 542,32767,32767,32767, + 32767, 431, 9, 74, 491, 42, 43, 51, 57, 519, + 520, 521, 522, 516, 517, 523, 518,32767,32767, 524, + 567,32767,32767, 543, 594,32767,32767,32767,32767,32767, + 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 529,32767, 136,32767,32767,32767,32767, + 32767,32767,32767,32767, 525,32767,32767,32767, 542,32767, + 32767,32767,32767, 313, 310,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 494, 432, 138,32767, 138, 540, - 424, 425, 426, 496, 540, 540, 540, 310, 287,32767, - 32767,32767,32767, 511, 511, 100, 100, 100, 100, 506, - 32767,32767,32767,32767, 111, 99, 99, 99, 99, 99, - 103, 101,32767,32767,32767,32767, 221, 99,32767, 101, - 101,32767,32767, 221, 223, 210, 101, 225,32767, 559, - 560, 221, 101, 225, 225, 225, 245, 245, 483, 316, - 101, 99, 101, 101, 195, 316, 316,32767, 101, 483, - 316, 483, 316, 197, 316, 316, 316, 483, 316,32767, - 101, 316, 212, 99, 99, 316,32767,32767,32767, 496, - 32767,32767,32767,32767,32767,32767,32767, 220,32767,32767, - 32767,32767,32767,32767,32767,32767, 527,32767, 544, 557, - 430, 431, 433, 542, 455, 456, 457, 458, 459, 460, - 461, 463, 589,32767, 500,32767,32767,32767,32767, 336, - 32767, 599,32767, 599,32767,32767,32767,32767,32767,32767, + 32767, 542,32767,32767,32767,32767,32767, 290,32767, 307, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 600,32767, 540,32767,32767,32767,32767, 429, 9, 74, - 489, 42, 43, 51, 57, 517, 518, 519, 520, 514, - 515, 521, 516,32767,32767, 522, 565,32767,32767, 541, - 592,32767,32767,32767,32767,32767,32767, 138,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 527, - 32767, 136,32767,32767,32767,32767,32767,32767,32767,32767, - 523,32767,32767,32767, 540,32767,32767,32767,32767, 312, - 309,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 540,32767,32767, - 32767,32767,32767, 289,32767, 306,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 285,32767,32767, 380, + 498, 293, 295, 296,32767,32767,32767,32767, 359,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 284,32767,32767, 378,32767,32767,32767,32767, - 357,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 151, 151, 3, 3, 339, 151, 151, 151, 339, - 339, 151, 339, 339, 339, 151, 151, 151, 151, 151, - 151, 278, 183, 260, 263, 245, 245, 151, 349, 151 + 152, 152, 3, 3, 340, 152, 152, 152, 340, 340, + 152, 340, 340, 340, 152, 152, 152, 152, 152, 152, + 279, 184, 261, 264, 246, 246, 152, 351, 152 ); protected $goto = array( - 194, 194, 689, 1054, 425, 657, 617, 654, 316, 697, - 419, 310, 311, 331, 572, 424, 332, 426, 634, 650, - 651, 843, 668, 669, 670, 844, 165, 165, 165, 165, - 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, - 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 530, 531, 415, 532, - 534, 535, 536, 537, 538, 539, 540, 541, 1124, 166, - 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, - 176, 212, 214, 217, 235, 240, 241, 243, 254, 255, - 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, - 278, 279, 313, 314, 315, 420, 421, 422, 577, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1124, 199, 180, - 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, - 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 846, 820, 249, 249, 470, 1300, 1301, 275, 275, - 275, 275, 964, 596, 619, 619, 877, 903, 1257, 904, - 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1257, 247, - 247, 247, 247, 242, 250, 349, 349, 349, 349, 956, - 405, 696, 555, 547, 346, 851, 818, 899, 894, 895, - 908, 852, 896, 849, 897, 898, 850, 1204, 933, 902, - 473, 1205, 1208, 934, 1209, 1325, 1325, 824, 475, 1075, - 1071, 1072, 337, 547, 555, 564, 565, 339, 575, 598, - 612, 613, 1325, 1275, 1275, 1095, 1096, 1275, 22, 1275, - 1275, 1275, 1275, 1275, 1275, 1275, 1275, 1275, 494, 1328, - 495, 1225, 1023, 1225, 1023, 1225, 501, 824, 1023, 824, - 1023, 1023, 1029, 1028, 1023, 1023, 1023, 1023, 1023, 1023, - 1023, 1023, 1023, 1023, 1023, 1307, 1307, 1307, 1307, 1225, - 859, 569, 1326, 1326, 1225, 1225, 1225, 1225, 460, 460, - 1225, 1225, 1225, 842, 344, 871, 350, 460, 858, 1326, - 988, 962, 962, 960, 962, 723, 350, 350, 915, 627, - 629, 631, 916, 546, 997, 992, 931, 5, 931, 6, - 350, 350, 1315, 350, 1220, 1342, 605, 620, 623, 624, - 625, 626, 647, 648, 649, 699, 549, 1273, 1273, 985, - 350, 1273, 389, 1273, 1273, 1273, 1273, 1273, 1273, 1273, - 1273, 1273, 533, 533, 567, 418, 533, 607, 533, 533, - 533, 533, 533, 533, 533, 533, 533, 562, 1032, 1033, - 839, 724, 633, 635, 321, 305, 655, 656, 1221, 1222, - 679, 683, 999, 687, 695, 995, 834, 1286, 1302, 1303, - 252, 252, 542, 542, 542, 542, 1173, 600, 573, 610, - 872, 860, 1059, 1063, 1223, 1283, 1284, 1121, 682, 548, - 559, 967, 452, 432, 548, 678, 559, 444, 662, 392, - 456, 839, 444, 1297, 444, 1297, 333, 1297, 836, 864, - 947, 463, 576, 464, 465, 957, 398, 869, 549, 861, - 1333, 1334, 347, 348, 272, 611, 544, 1216, 544, 545, - 544, 545, 1309, 1309, 1309, 1309, 1007, 1104, 876, 1060, - 727, 595, 1088, 471, 700, 873, 867, 391, 394, 556, - 597, 601, 686, 686, 450, 502, 692, 1086, 1293, 958, - 958, 958, 958, 403, 404, 450, 952, 959, 666, 1064, - 667, 969, 407, 408, 409, 1106, 680, 0, 0, 410, - 0, 1218, 0, 342, 0, 0, 0, 444, 444, 444, - 444, 444, 444, 444, 444, 444, 444, 444, 0, 1062, - 444, 920, 1111, 1295, 1295, 1062, 0, 0, 615, 0, - 0, 0, 427, 0, 1004, 0, 0, 0, 427, 839, - 0, 0, 863, 0, 660, 983, 1030, 1030, 0, 428, - 857, 661, 1041, 1037, 1038, 0, 0, 0, 0, 677, - 941, 0, 1215, 1018, 1034, 1035, 0, 0, 0, 0, + 196, 196, 1033, 1064, 697, 429, 661, 349, 852, 319, + 706, 423, 313, 314, 334, 576, 428, 335, 430, 638, + 654, 655, 853, 672, 673, 674, 974, 167, 167, 167, + 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, + 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, + 189, 190, 191, 192, 218, 216, 219, 534, 535, 419, + 536, 538, 539, 540, 541, 542, 543, 544, 545, 1135, + 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, + 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, + 258, 259, 260, 261, 262, 263, 264, 266, 267, 268, + 269, 281, 282, 316, 317, 318, 424, 425, 426, 581, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, + 200, 239, 188, 189, 190, 191, 192, 218, 1135, 201, + 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, + 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, + 212, 213, 214, 855, 353, 417, 881, 869, 1069, 1073, + 278, 278, 278, 278, 353, 353, 600, 977, 621, 658, + 833, 566, 827, 1337, 1337, 733, 637, 639, 353, 353, + 659, 353, 573, 1353, 683, 687, 1009, 695, 704, 1005, + 1337, 967, 1106, 1107, 553, 559, 551, 860, 353, 909, + 904, 905, 918, 861, 906, 858, 907, 908, 859, 886, + 833, 912, 833, 1115, 885, 394, 397, 560, 601, 605, + 347, 1086, 1081, 1082, 1083, 340, 551, 559, 568, 569, + 342, 579, 602, 616, 617, 464, 464, 694, 1036, 1036, + 829, 22, 681, 951, 464, 1297, 1028, 1044, 1045, 694, + 350, 351, 498, 694, 499, 1236, 1033, 1236, 1033, 1236, + 505, 913, 1033, 914, 1033, 1033, 686, 1326, 1033, 1033, + 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1318, + 1318, 1318, 1318, 1236, 352, 352, 352, 352, 1236, 1236, + 1236, 1236, 851, 868, 1236, 1236, 1236, 553, 995, 477, + 998, 972, 972, 970, 972, 732, 848, 479, 880, 1039, + 1038, 867, 925, 550, 1007, 1002, 926, 623, 623, 392, + 941, 1268, 941, 1268, 1268, 1268, 1268, 1268, 1268, 1268, + 1268, 1268, 1286, 1286, 571, 5, 1286, 6, 1286, 1286, + 1286, 1286, 1286, 1286, 1286, 1286, 1286, 546, 546, 546, + 546, 422, 604, 611, 660, 1284, 1284, 848, 1132, 1284, + 1229, 1284, 1284, 1284, 1284, 1284, 1284, 1284, 1284, 1284, + 537, 537, 252, 252, 537, 1057, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 609, 624, 627, 628, 629, + 630, 651, 652, 653, 708, 599, 1099, 1184, 709, 250, + 250, 250, 250, 245, 253, 666, 1336, 1336, 506, 700, + 436, 1097, 1042, 1043, 552, 563, 474, 1311, 1312, 552, + 456, 563, 448, 1336, 395, 460, 682, 448, 1308, 448, + 1308, 336, 1308, 631, 633, 635, 467, 580, 468, 469, + 1339, 845, 878, 324, 308, 1344, 1345, 873, 431, 1313, + 1314, 548, 615, 548, 431, 548, 401, 1320, 1320, 1320, + 1320, 1227, 1040, 1040, 966, 408, 705, 665, 1051, 1047, + 1048, 876, 577, 614, 957, 870, 848, 1017, 1070, 454, + 736, 1231, 475, 1304, 968, 968, 968, 968, 406, 407, + 454, 962, 969, 670, 882, 671, 1074, 410, 411, 412, + 979, 684, 1117, 0, 413, 0, 0, 0, 345, 0, + 0, 0, 448, 448, 448, 448, 448, 448, 448, 448, + 448, 448, 448, 0, 1072, 448, 930, 1122, 1306, 1306, + 1072, 0, 0, 619, 0, 0, 1232, 1233, 0, 1014, + 0, 0, 0, 0, 843, 0, 275, 872, 0, 664, + 993, 549, 0, 549, 0, 866, 0, 0, 0, 0, + 1012, 1012, 1234, 1294, 1295, 1215, 943, 1226, 0, 1216, + 1219, 944, 1220, 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, 1002, 1002 + 0, 0, 255, 255 ); protected $gotoCheck = array( - 42, 42, 72, 126, 65, 65, 55, 55, 65, 9, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 85, - 85, 26, 85, 85, 85, 27, 42, 42, 42, 42, + 42, 42, 72, 126, 72, 65, 65, 96, 26, 65, + 9, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 85, 85, 27, 85, 85, 85, 49, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -920,96 +926,97 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 15, 7, 5, 5, 174, 174, 174, 23, 23, - 23, 23, 49, 129, 107, 107, 45, 64, 107, 64, - 107, 107, 107, 107, 107, 107, 107, 107, 107, 5, - 5, 5, 5, 5, 5, 24, 24, 24, 24, 92, - 92, 92, 75, 75, 96, 15, 6, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 78, 78, 15, - 83, 78, 78, 78, 78, 180, 180, 12, 83, 15, - 15, 15, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 180, 168, 168, 143, 143, 168, 75, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 154, 180, - 154, 72, 72, 72, 72, 72, 154, 12, 72, 12, - 72, 72, 117, 117, 72, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 72, 9, 9, 9, 9, 72, - 35, 170, 181, 181, 72, 72, 72, 72, 148, 148, - 72, 72, 72, 25, 177, 35, 14, 148, 35, 181, - 25, 25, 25, 25, 25, 25, 14, 14, 72, 84, - 84, 84, 72, 25, 25, 25, 9, 46, 9, 46, - 14, 14, 179, 14, 20, 14, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 14, 169, 169, 102, - 14, 169, 61, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 171, 171, 103, 13, 171, 13, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 48, 118, 118, - 22, 48, 48, 48, 167, 167, 48, 63, 20, 20, - 48, 48, 48, 48, 48, 48, 20, 14, 176, 176, - 5, 5, 106, 106, 106, 106, 150, 106, 2, 2, - 16, 16, 16, 16, 20, 20, 20, 149, 14, 9, - 9, 16, 82, 112, 9, 115, 9, 23, 119, 9, - 9, 22, 23, 129, 23, 129, 29, 129, 18, 39, - 91, 9, 9, 9, 9, 16, 28, 9, 14, 37, - 9, 9, 96, 96, 24, 79, 19, 159, 19, 24, - 19, 24, 129, 129, 129, 129, 109, 16, 16, 128, - 98, 8, 8, 156, 8, 41, 9, 58, 58, 58, - 58, 58, 8, 8, 19, 8, 8, 8, 129, 19, - 19, 19, 19, 81, 81, 19, 19, 19, 81, 131, - 81, 95, 81, 81, 81, 146, 81, -1, -1, 81, - -1, 14, -1, 81, -1, -1, -1, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, -1, 129, - 23, 17, 17, 129, 129, 129, -1, -1, 17, -1, - -1, -1, 116, -1, 17, -1, -1, -1, 116, 22, - -1, -1, 17, -1, 17, 17, 116, 116, -1, 88, - 17, 116, 116, 116, 116, -1, -1, -1, -1, 88, - 88, -1, 17, 88, 88, 88, -1, -1, -1, -1, + 42, 42, 42, 15, 14, 43, 16, 16, 16, 16, + 23, 23, 23, 23, 14, 14, 129, 16, 55, 55, + 12, 48, 6, 181, 181, 48, 48, 48, 14, 14, + 48, 14, 170, 14, 48, 48, 48, 48, 48, 48, + 181, 16, 143, 143, 14, 75, 75, 15, 14, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 45, + 12, 15, 12, 16, 16, 58, 58, 58, 58, 58, + 177, 15, 15, 15, 15, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 148, 148, 7, 88, 88, + 7, 75, 88, 88, 148, 14, 88, 88, 88, 7, + 96, 96, 154, 7, 154, 72, 72, 72, 72, 72, + 154, 64, 72, 64, 72, 72, 14, 179, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 9, + 9, 9, 9, 72, 24, 24, 24, 24, 72, 72, + 72, 72, 25, 35, 72, 72, 72, 14, 102, 83, + 25, 25, 25, 25, 25, 25, 22, 83, 35, 117, + 117, 35, 72, 25, 25, 25, 72, 107, 107, 61, + 9, 107, 9, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 168, 168, 103, 46, 168, 46, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 106, 106, 106, + 106, 13, 106, 13, 63, 169, 169, 22, 149, 169, + 14, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 171, 171, 5, 5, 171, 113, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 8, 8, 150, 8, 5, + 5, 5, 5, 5, 5, 119, 180, 180, 8, 8, + 112, 8, 118, 118, 9, 9, 174, 174, 174, 9, + 82, 9, 23, 180, 9, 9, 115, 23, 129, 23, + 129, 29, 129, 84, 84, 84, 9, 9, 9, 9, + 180, 18, 9, 167, 167, 9, 9, 39, 116, 176, + 176, 19, 79, 19, 116, 19, 28, 129, 129, 129, + 129, 159, 116, 116, 92, 92, 92, 116, 116, 116, + 116, 9, 2, 2, 91, 37, 22, 109, 128, 19, + 98, 20, 156, 129, 19, 19, 19, 19, 81, 81, + 19, 19, 19, 81, 41, 81, 131, 81, 81, 81, + 95, 81, 146, -1, 81, -1, -1, -1, 81, -1, + -1, -1, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, -1, 129, 23, 17, 17, 129, 129, + 129, -1, -1, 17, -1, -1, 20, 20, -1, 17, + -1, -1, -1, -1, 20, -1, 24, 17, -1, 17, + 17, 24, -1, 24, -1, 17, -1, -1, -1, -1, + 106, 106, 20, 20, 20, 78, 78, 17, -1, 78, + 78, 78, 78, -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, 106, 106 + -1, -1, 5, 5 ); protected $gotoBase = array( - 0, 0, -295, 0, 0, 162, 186, 153, 464, -11, - 0, 0, -66, 32, 12, -182, -36, 72, 132, 189, - -54, 0, 105, 165, 192, 299, 17, 21, 113, 143, - 0, 0, 0, 0, 0, -76, 0, 114, 0, 119, - 0, 40, -1, 0, 0, 157, -400, 0, -325, 155, - 0, 0, 0, 0, 0, -33, 0, 0, 433, 0, - 0, 311, 0, 148, 164, -234, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -138, 0, 0, -186, 116, - -17, 8, 147, -243, -154, -690, 0, 0, 289, 0, - 0, 115, -102, 0, 0, 64, -273, 0, 68, 0, - 0, 0, 315, 322, 0, 0, 375, -64, 0, 101, - 0, 0, 149, 0, 0, 145, 274, -4, 96, 141, - 0, 0, 0, 0, 0, 0, 1, 0, 100, 166, - 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -27, 0, 0, 67, 0, 265, 175, - 135, 0, 0, 0, -231, 0, 39, 0, 0, 93, - 0, 0, 0, 0, 0, 0, 0, 66, 5, 109, - 263, 124, 0, 0, -132, 0, 31, 275, 0, 302, - -79, -12, 0, 0 + 0, 0, -230, 0, 0, 381, 162, 240, 397, -10, + 0, 0, -116, 25, -133, -183, -284, 73, 142, 191, + 100, 0, 38, 167, 291, 298, 4, 18, 130, 145, + 0, 0, 0, 0, 0, -66, 0, 147, 0, 134, + 0, 65, -1, 146, 0, 196, -391, 0, -530, 8, + 0, 0, 0, 0, 0, 138, 0, 0, 180, 0, + 0, 287, 0, 122, 257, -236, 0, 0, 0, 0, + 0, 0, -5, 0, 0, -138, 0, 0, 169, 120, + 39, 9, 152, -158, -34, -698, 0, 0, -31, 0, + 0, 156, 170, 0, 0, 69, -474, 0, 85, 0, + 0, 0, 273, 301, 0, 0, 329, 86, 0, 119, + 0, 0, 143, 112, 0, 153, 187, 40, 137, 125, + 0, 0, 0, 0, 0, 0, 1, 0, 116, 168, + 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -73, 0, 0, 70, 0, 211, 123, + 133, 0, 0, 0, -231, 0, 54, 0, 0, 104, + 0, 0, 0, 0, 0, 0, 0, 132, 101, 124, + 163, 139, 0, 0, 126, 0, 89, 200, 0, 246, + 109, -124, 0, 0 ); protected $gotoDefault = array( - -32768, 506, 731, 4, 732, 924, 807, 816, 593, 524, - 698, 343, 621, 416, 1291, 901, 1110, 574, 835, 1234, - 1242, 451, 838, 326, 721, 883, 884, 885, 395, 381, - 387, 393, 645, 622, 488, 870, 447, 862, 480, 865, - 446, 874, 162, 413, 504, 878, 3, 880, 552, 911, - 382, 888, 383, 673, 890, 558, 892, 893, 390, 396, - 397, 1115, 566, 618, 905, 253, 560, 906, 380, 907, - 914, 385, 388, 684, 459, 499, 493, 406, 1090, 561, - 604, 642, 441, 467, 616, 628, 614, 474, 1026, 411, - 325, 946, 954, 481, 457, 968, 345, 976, 729, 1123, - 636, 483, 984, 637, 991, 994, 525, 526, 472, 1006, - 268, 1009, 484, 1047, 663, 1020, 1021, 664, 638, 1043, - 639, 665, 640, 1045, 466, 594, 1053, 448, 1061, 1279, - 449, 1065, 262, 1068, 274, 412, 429, 1073, 1074, 8, - 1080, 690, 691, 10, 273, 503, 1105, 685, 445, 1122, - 433, 1192, 1194, 554, 485, 1212, 1211, 676, 500, 1217, - 442, 1282, 443, 527, 468, 312, 528, 304, 329, 309, - 543, 291, 330, 529, 469, 1288, 1296, 327, 30, 1316, - 1327, 338, 571, 609 + -32768, 510, 740, 4, 741, 934, 816, 825, 597, 528, + 707, 346, 625, 420, 1302, 911, 1121, 578, 844, 1245, + 1253, 455, 847, 329, 730, 893, 894, 895, 398, 384, + 390, 396, 649, 626, 492, 879, 451, 871, 484, 874, + 450, 883, 164, 416, 508, 887, 3, 890, 556, 921, + 385, 898, 386, 677, 900, 562, 902, 903, 393, 399, + 400, 1126, 570, 622, 915, 256, 564, 916, 383, 917, + 924, 388, 391, 688, 463, 503, 497, 409, 1101, 565, + 608, 646, 445, 471, 620, 632, 618, 478, 432, 414, + 328, 956, 964, 485, 461, 978, 348, 986, 738, 1134, + 640, 487, 994, 641, 1001, 1004, 529, 530, 476, 1016, + 271, 1019, 488, 19, 667, 1030, 1031, 668, 642, 1053, + 643, 669, 644, 1055, 470, 598, 1063, 452, 1071, 1290, + 453, 1075, 265, 1078, 277, 415, 433, 1084, 1085, 9, + 1091, 698, 699, 11, 276, 507, 1116, 689, 449, 1133, + 437, 1203, 1205, 558, 489, 1223, 1222, 680, 504, 1228, + 446, 1293, 447, 531, 472, 315, 532, 307, 332, 312, + 547, 294, 333, 533, 473, 1299, 1307, 330, 31, 1327, + 1338, 341, 575, 613 ); protected $ruleToNonTerminal = array( @@ -1028,30 +1035,30 @@ class Php7 extends \PhpParser\ParserAbstract 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, - 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, + 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, - 62, 74, 74, 75, 75, 76, 76, 77, 77, 78, - 78, 79, 79, 26, 26, 27, 27, 27, 27, 27, - 87, 87, 89, 89, 82, 82, 90, 90, 91, 91, - 91, 83, 83, 86, 86, 84, 84, 92, 93, 93, - 56, 56, 64, 64, 67, 67, 67, 66, 94, 94, - 95, 57, 57, 57, 57, 96, 96, 97, 97, 98, - 98, 99, 100, 100, 101, 101, 102, 102, 54, 54, - 50, 50, 104, 52, 52, 105, 51, 51, 53, 53, - 63, 63, 63, 63, 80, 80, 108, 108, 110, 110, - 111, 111, 111, 111, 109, 109, 109, 113, 113, 113, - 113, 88, 88, 116, 116, 116, 117, 117, 114, 114, - 118, 118, 120, 120, 121, 121, 115, 122, 122, 119, - 123, 123, 123, 123, 112, 112, 81, 81, 81, 20, - 20, 20, 125, 124, 124, 126, 126, 126, 126, 59, - 127, 127, 128, 60, 130, 130, 131, 131, 132, 132, - 85, 133, 133, 133, 133, 133, 133, 138, 138, 139, - 139, 140, 140, 140, 140, 140, 141, 142, 142, 137, - 137, 134, 134, 136, 136, 144, 144, 143, 143, 143, - 143, 143, 143, 143, 135, 145, 145, 147, 146, 146, - 61, 103, 148, 148, 55, 55, 42, 42, 42, 42, + 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, + 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, + 78, 78, 79, 79, 26, 26, 27, 27, 27, 27, + 27, 87, 87, 89, 89, 82, 82, 90, 90, 91, + 91, 91, 83, 83, 86, 86, 84, 84, 92, 93, + 93, 56, 56, 64, 64, 67, 67, 67, 66, 94, + 94, 95, 57, 57, 57, 57, 96, 96, 97, 97, + 98, 98, 99, 100, 100, 101, 101, 102, 102, 54, + 54, 50, 50, 104, 52, 52, 105, 51, 51, 53, + 53, 63, 63, 63, 63, 80, 80, 108, 108, 110, + 110, 111, 111, 111, 111, 109, 109, 109, 113, 113, + 113, 113, 88, 88, 116, 116, 116, 117, 117, 114, + 114, 118, 118, 120, 120, 121, 121, 115, 122, 122, + 119, 123, 123, 123, 123, 112, 112, 81, 81, 81, + 20, 20, 20, 125, 124, 124, 126, 126, 126, 126, + 59, 127, 127, 128, 60, 130, 130, 131, 131, 132, + 132, 85, 133, 133, 133, 133, 133, 133, 133, 138, + 138, 139, 139, 140, 140, 140, 140, 140, 141, 142, + 142, 137, 137, 134, 134, 136, 136, 144, 144, 143, + 143, 143, 143, 143, 143, 143, 135, 145, 145, 147, + 146, 146, 61, 103, 148, 148, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1061,20 +1068,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 155, 149, 149, 154, 154, 157, 158, 158, 159, 160, - 161, 161, 161, 161, 19, 19, 72, 72, 72, 72, - 150, 150, 150, 150, 163, 163, 151, 151, 153, 153, - 153, 156, 156, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 169, 169, 169, 107, 171, 171, 171, 171, - 152, 152, 152, 152, 152, 152, 152, 152, 58, 58, - 166, 166, 166, 166, 172, 172, 162, 162, 162, 173, - 173, 173, 173, 173, 173, 73, 73, 65, 65, 65, - 65, 129, 129, 129, 129, 176, 175, 165, 165, 165, - 165, 165, 165, 165, 164, 164, 164, 174, 174, 174, - 174, 106, 170, 178, 178, 177, 177, 179, 179, 179, - 179, 179, 179, 179, 179, 167, 167, 167, 167, 181, - 182, 180, 180, 180, 180, 180, 180, 180, 180, 183, - 183, 183, 183 + 42, 42, 155, 149, 149, 154, 154, 157, 158, 158, + 159, 160, 161, 161, 161, 161, 19, 19, 72, 72, + 72, 72, 150, 150, 150, 150, 163, 163, 151, 151, + 153, 153, 153, 156, 156, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 169, 169, 169, 107, 171, 171, + 171, 171, 152, 152, 152, 152, 152, 152, 152, 152, + 58, 58, 166, 166, 166, 166, 172, 172, 162, 162, + 162, 173, 173, 173, 173, 173, 173, 73, 73, 65, + 65, 65, 65, 129, 129, 129, 129, 176, 175, 165, + 165, 165, 165, 165, 165, 165, 164, 164, 164, 174, + 174, 174, 174, 106, 170, 178, 178, 177, 177, 179, + 179, 179, 179, 179, 179, 179, 179, 167, 167, 167, + 167, 181, 182, 180, 180, 180, 180, 180, 180, 180, + 180, 183, 183, 183, 183 ); protected $ruleToLength = array( @@ -1093,53 +1100,53 @@ class Php7 extends \PhpParser\ParserAbstract 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, 2, - 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, - 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, - 1, 1, 1, 8, 9, 7, 8, 7, 6, 8, - 0, 2, 0, 2, 1, 2, 1, 2, 1, 1, - 1, 0, 2, 0, 2, 0, 2, 2, 1, 3, - 1, 4, 1, 4, 1, 1, 4, 2, 1, 3, - 3, 3, 4, 4, 5, 0, 2, 4, 3, 1, - 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, - 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, - 1, 2, 1, 1, 2, 0, 1, 3, 0, 2, - 1, 1, 1, 1, 6, 8, 6, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, - 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, - 1, 2, 1, 1, 0, 1, 0, 2, 2, 2, - 4, 3, 1, 1, 3, 1, 2, 2, 3, 2, - 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, - 1, 5, 5, 10, 3, 5, 1, 1, 3, 0, - 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, - 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, - 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, - 4, 4, 1, 1, 2, 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, 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, 6, 5, 6, 3, + 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, + 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, + 3, 1, 1, 1, 8, 9, 7, 8, 7, 6, + 8, 0, 2, 0, 2, 1, 2, 1, 2, 1, + 1, 1, 0, 2, 0, 2, 0, 2, 2, 1, + 3, 1, 4, 1, 4, 1, 1, 4, 2, 1, + 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, + 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, + 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, + 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, + 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, + 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, + 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, + 2, 4, 3, 1, 1, 3, 1, 2, 2, 3, + 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, + 0, 1, 5, 5, 6, 10, 3, 5, 1, 1, + 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, + 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, + 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, + 3, 3, 4, 4, 1, 1, 2, 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, 2, 8, 9, 8, 9, 9, 10, 9, 10, - 8, 3, 2, 0, 4, 2, 1, 3, 2, 1, - 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 5, 3, 3, 4, 1, 1, 3, - 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, - 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, - 4, 4, 1, 4, 4, 0, 1, 1, 1, 3, - 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, - 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, - 1, 4, 1, 1, 1, 3, 1, 1, 2, 1, - 3, 4, 3, 2, 0, 2, 2, 1, 2, 1, - 1, 1, 4, 3, 3, 3, 3, 6, 3, 1, - 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, 10, + 9, 10, 8, 3, 2, 0, 4, 2, 1, 3, + 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 1, 0, 3, + 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 5, 3, 3, 4, 1, + 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, + 0, 1, 1, 3, 1, 1, 1, 1, 1, 3, + 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, + 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, + 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, + 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, + 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, + 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, + 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1599,20 +1606,20 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 149 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributeStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 150 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributeStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 151 => function ($stackPos) { - $this->semValue = array(); + if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; }, 152 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 153 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 154 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -1621,9 +1628,12 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 156 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 157 => function ($stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 158 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; @@ -1633,46 +1643,46 @@ protected function initReduceCallbacks(): void { } }, - 158 => function ($stackPos) { + 159 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 159 => function ($stackPos) { + 160 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 160 => function ($stackPos) { + 161 => function ($stackPos) { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 161 => function ($stackPos) { + 162 => function ($stackPos) { $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 162 => function ($stackPos) { + 163 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 163 => function ($stackPos) { + 164 => function ($stackPos) { $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 164 => function ($stackPos) { + 165 => function ($stackPos) { $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 165 => function ($stackPos) { + 166 => function ($stackPos) { $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 166 => function ($stackPos) { + 167 => function ($stackPos) { $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 167 => function ($stackPos) { + 168 => function ($stackPos) { $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 168 => function ($stackPos) { + 169 => function ($stackPos) { $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 169 => function ($stackPos) { + 170 => function ($stackPos) { $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 170 => function ($stackPos) { + 171 => function ($stackPos) { $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 171 => function ($stackPos) { + 172 => function ($stackPos) { $e = $this->semStack[$stackPos-(2-1)]; if ($e instanceof Expr\Throw_) { @@ -1684,1145 +1694,1143 @@ protected function initReduceCallbacks(): void { } }, - 172 => function ($stackPos) { + 173 => function ($stackPos) { $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 173 => function ($stackPos) { + 174 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 174 => function ($stackPos) { + 175 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 175 => function ($stackPos) { + 176 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 176 => function ($stackPos) { + 177 => function ($stackPos) { $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 177 => function ($stackPos) { + 178 => function ($stackPos) { $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); }, - 178 => function ($stackPos) { + 179 => function ($stackPos) { $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 179 => function ($stackPos) { + 180 => function ($stackPos) { $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 180 => function ($stackPos) { + 181 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, - 181 => function ($stackPos) { + 182 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 182 => function ($stackPos) { + 183 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, - 183 => function ($stackPos) { + 184 => function ($stackPos) { $this->semValue = array(); }, - 184 => function ($stackPos) { + 185 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 185 => function ($stackPos) { + 186 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 186 => function ($stackPos) { + 187 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 187 => function ($stackPos) { + 188 => function ($stackPos) { $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 188 => function ($stackPos) { + 189 => function ($stackPos) { $this->semValue = null; }, - 189 => function ($stackPos) { + 190 => function ($stackPos) { $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 190 => function ($stackPos) { + 191 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 191 => function ($stackPos) { + 192 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 192 => function ($stackPos) { + 193 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 193 => function ($stackPos) { + 194 => function ($stackPos) { $this->semValue = false; }, - 194 => function ($stackPos) { + 195 => function ($stackPos) { $this->semValue = true; }, - 195 => function ($stackPos) { + 196 => function ($stackPos) { $this->semValue = false; }, - 196 => function ($stackPos) { + 197 => function ($stackPos) { $this->semValue = true; }, - 197 => function ($stackPos) { + 198 => function ($stackPos) { $this->semValue = false; }, - 198 => function ($stackPos) { + 199 => function ($stackPos) { $this->semValue = true; }, - 199 => function ($stackPos) { + 200 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 200 => function ($stackPos) { + 201 => function ($stackPos) { $this->semValue = []; }, - 201 => function ($stackPos) { + 202 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 202 => function ($stackPos) { + 203 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 203 => function ($stackPos) { + 204 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 204 => function ($stackPos) { + 205 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 205 => function ($stackPos) { + 206 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(7-2)); }, - 206 => function ($stackPos) { + 207 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(8-3)); }, - 207 => function ($stackPos) { + 208 => function ($stackPos) { $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkInterface($this->semValue, $stackPos-(7-3)); }, - 208 => function ($stackPos) { + 209 => function ($stackPos) { $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 209 => function ($stackPos) { + 210 => function ($stackPos) { $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); $this->checkEnum($this->semValue, $stackPos-(8-3)); }, - 210 => function ($stackPos) { - $this->semValue = null; - }, 211 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 212 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 214 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 215 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = 0; }, 216 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 217 => function ($stackPos) { - $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 218 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 219 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + $this->semValue = Modifiers::ABSTRACT; }, 220 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->semValue = Modifiers::FINAL; }, 221 => function ($stackPos) { - $this->semValue = null; + $this->semValue = Modifiers::READONLY; }, 222 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 223 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 224 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 225 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 226 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 227 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 228 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 229 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 230 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 231 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 232 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 233 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 234 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 235 => function ($stackPos) { - $this->semValue = null; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 236 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = null; }, 237 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 238 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 239 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 240 => function ($stackPos) { - $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 241 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 242 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 243 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 244 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 245 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(5-3)]; }, 246 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 247 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 248 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 249 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 250 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 251 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 252 => function ($stackPos) { - $this->semValue = []; + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 253 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = []; }, 254 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 255 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 256 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 257 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 258 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 259 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 260 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 261 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 262 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 263 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 264 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 265 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 266 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 267 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = null; }, 268 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 269 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = null; }, 270 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 271 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 272 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 273 => function ($stackPos) { - $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 274 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, 275 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 276 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 277 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 278 => function ($stackPos) { - $this->semValue = 0; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 279 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = 0; }, 280 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 281 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + $this->semValue = Modifiers::PUBLIC; }, 282 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + $this->semValue = Modifiers::PROTECTED; }, 283 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->semValue = Modifiers::PRIVATE; }, 284 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); + $this->semValue = Modifiers::READONLY; }, 285 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, 286 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->checkParam($this->semValue); }, 287 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, 288 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 289 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 290 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 291 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 292 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 293 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 294 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 295 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 296 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 297 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 298 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 299 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 300 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 301 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 302 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 303 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 304 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 305 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 306 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 307 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 308 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 309 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 310 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 311 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 312 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 313 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 314 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 315 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 316 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 317 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 318 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 319 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 320 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = array(); }, 321 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 322 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, 323 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 325 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 326 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 327 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 328 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 329 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 330 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 331 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 332 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 333 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 334 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 335 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 336 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 337 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 338 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 339 => function ($stackPos) { - $this->semValue = array(); + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, 340 => function ($stackPos) { + $this->semValue = array(); + }, + 341 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 341 => function ($stackPos) { + 342 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 342 => function ($stackPos) { + 343 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 343 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); - }, 344 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); + $this->checkClassConst($this->semValue, $stackPos-(6-2)); }, 345 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, 346 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 347 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 348 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = null; /* will be skipped */ }, 349 => function ($stackPos) { $this->semValue = array(); }, 350 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 351 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 352 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 353 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 354 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 355 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 356 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 357 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 358 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 359 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 360 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 361 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 362 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 363 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 364 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 365 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 366 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 367 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 368 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 369 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + $this->semValue = Modifiers::PUBLIC; }, 370 => function ($stackPos) { - $this->semValue = Modifiers::STATIC; + $this->semValue = Modifiers::PROTECTED; }, 371 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + $this->semValue = Modifiers::PRIVATE; }, 372 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + $this->semValue = Modifiers::STATIC; }, 373 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->semValue = Modifiers::ABSTRACT; }, 374 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Modifiers::FINAL; }, 375 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = Modifiers::READONLY; }, 376 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 377 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 378 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 379 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 380 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 381 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 382 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 383 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 384 => function ($stackPos) { - $this->semValue = array(); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 385 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 386 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 387 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 388 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 389 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 390 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 391 => function ($stackPos) { + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 392 => function ($stackPos) { + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 393 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); if (!$this->phpVersion->allowsAssignNewByReference()) { $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); } }, - 392 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 393 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 394 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 395 => function ($stackPos) { + 397 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { + 398 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 397 => function ($stackPos) { + 399 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 398 => function ($stackPos) { + 400 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 399 => function ($stackPos) { + 401 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 400 => function ($stackPos) { + 402 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 401 => function ($stackPos) { + 403 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 402 => function ($stackPos) { + 404 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 403 => function ($stackPos) { + 405 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 404 => function ($stackPos) { + 406 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 405 => function ($stackPos) { + 407 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 406 => function ($stackPos) { + 408 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 407 => function ($stackPos) { + 409 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 408 => function ($stackPos) { + 410 => function ($stackPos) { $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 409 => function ($stackPos) { + 411 => function ($stackPos) { $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 410 => function ($stackPos) { + 412 => function ($stackPos) { $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 411 => function ($stackPos) { + 413 => function ($stackPos) { $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 412 => function ($stackPos) { + 414 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 413 => function ($stackPos) { + 415 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 414 => function ($stackPos) { + 416 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 415 => function ($stackPos) { + 417 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 416 => function ($stackPos) { + 418 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 417 => function ($stackPos) { + 419 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 418 => function ($stackPos) { + 420 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 419 => function ($stackPos) { + 421 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 420 => function ($stackPos) { + 422 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 421 => function ($stackPos) { + 423 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 422 => function ($stackPos) { + 424 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 423 => function ($stackPos) { + 425 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 424 => function ($stackPos) { + 426 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 425 => function ($stackPos) { + 427 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 426 => function ($stackPos) { + 428 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 427 => function ($stackPos) { + 429 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 428 => function ($stackPos) { + 430 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 429 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 431 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 432 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 441 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 443 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 444 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 445 => function ($stackPos) { + 447 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 446 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 447 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 448 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 450 => function ($stackPos) { + 452 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 452 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 456 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 455 => function ($stackPos) { + 457 => function ($stackPos) { $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 458 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 457 => function ($stackPos) { + 459 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 458 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 461 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 462 => function ($stackPos) { + 464 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 463 => function ($stackPos) { + 465 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 464 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 465 => function ($stackPos) { + 467 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 466 => function ($stackPos) { + 468 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 467 => function ($stackPos) { + 469 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 468 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 469 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 470 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 471 => function ($stackPos) { + 473 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 472 => function ($stackPos) { + 474 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 473 => function ($stackPos) { + 475 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 474 => function ($stackPos) { + 476 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 475 => function ($stackPos) { + 477 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 476 => function ($stackPos) { + 478 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 477 => function ($stackPos) { + 479 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 478 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 479 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 480 => function ($stackPos) { + 482 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 481 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 482 => function ($stackPos) { + 484 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 483 => function ($stackPos) { + 485 => function ($stackPos) { $this->semValue = array(); }, - 484 => function ($stackPos) { + 486 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 485 => function ($stackPos) { + 487 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 486 => function ($stackPos) { + 488 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 487 => function ($stackPos) { + 489 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 488 => function ($stackPos) { + 490 => function ($stackPos) { $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 489 => function ($stackPos) { + 491 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 490 => function ($stackPos) { + 492 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 491 => function ($stackPos) { + 493 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 492 => function ($stackPos) { + 494 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 493 => function ($stackPos) { + 495 => function ($stackPos) { $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 494 => function ($stackPos) { + 496 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 495 => function ($stackPos) { + 497 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 496 => function ($stackPos) { + 498 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 497 => function ($stackPos) { + 499 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 498 => function ($stackPos) { + 500 => function ($stackPos) { $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 499 => function ($stackPos) { + 501 => function ($stackPos) { $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 500 => function ($stackPos) { + 502 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 501 => function ($stackPos) { + 503 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 502 => function ($stackPos) { + 504 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 503 => function ($stackPos) { + 505 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, - 504 => function ($stackPos) { + 506 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 505 => function ($stackPos) { + 507 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 506 => function ($stackPos) { + 508 => function ($stackPos) { $this->semValue = null; }, - 507 => function ($stackPos) { + 509 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 508 => function ($stackPos) { + 510 => function ($stackPos) { $this->semValue = array(); }, - 509 => function ($stackPos) { + 511 => function ($stackPos) { $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 510 => function ($stackPos) { + 512 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 511 => function ($stackPos) { + 513 => function ($stackPos) { $this->semValue = array(); }, - 512 => function ($stackPos) { + 514 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 513 => function ($stackPos) { + 515 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 514 => function ($stackPos) { + 516 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 515 => function ($stackPos) { + 517 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 516 => function ($stackPos) { + 518 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 517 => function ($stackPos) { + 519 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 518 => function ($stackPos) { + 520 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 519 => function ($stackPos) { + 521 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 520 => function ($stackPos) { + 522 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 521 => function ($stackPos) { + 523 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 522 => function ($stackPos) { + 524 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 523 => function ($stackPos) { + 525 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 524 => function ($stackPos) { + 526 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, - 525 => function ($stackPos) { + 527 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 526 => function ($stackPos) { + 528 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); $this->createdArrays->attach($this->semValue); }, - 527 => function ($stackPos) { + 529 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, - 528 => function ($stackPos) { + 530 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 529 => function ($stackPos) { + 531 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, - 530 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); - }, - 531 => function ($stackPos) { - $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 533 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 534 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 536 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 537 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 538 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 539 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 540 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 542 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 543 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 544 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2834,205 +2842,211 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 548 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 549 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 550 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 551 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 552 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 553 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 554 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 555 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 556 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 557 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 558 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 559 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 560 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 561 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 562 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 563 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 564 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 565 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 566 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 567 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 568 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 569 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 570 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 571 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 572 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 573 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 574 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 575 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 576 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 577 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 579 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 580 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 581 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); - $this->postprocessList($this->semValue); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 582 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 583 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $this->postprocessList($this->semValue); }, 584 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, 585 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 586 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 587 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 588 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 589 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 590 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 591 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 592 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 593 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 594 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 595 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); + }, + 596 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 595 => function ($stackPos) { + 597 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 596 => function ($stackPos) { + 598 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 597 => function ($stackPos) { + 599 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 598 => function ($stackPos) { + 600 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, - 599 => function ($stackPos) { + 601 => function ($stackPos) { $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 600 => function ($stackPos) { + 602 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 601 => function ($stackPos) { + 603 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 602 => function ($stackPos) { + 604 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 603 => function ($stackPos) { + 605 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 604 => function ($stackPos) { + 606 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 605 => function ($stackPos) { + 607 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 606 => function ($stackPos) { + 608 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 607 => function ($stackPos) { + 609 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 608 => function ($stackPos) { + 610 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 609 => function ($stackPos) { + 611 => function ($stackPos) { $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 610 => function ($stackPos) { + 612 => function ($stackPos) { $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 611 => function ($stackPos) { + 613 => function ($stackPos) { $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 612 => function ($stackPos) { + 614 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index cdf3e43623..0d1ece9718 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -160,16 +160,16 @@ class Php8 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1252; - protected $gotoTableSize = 646; + protected $actionTableSize = 1263; + protected $gotoTableSize = 718; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 429; - protected $numNonLeafStates = 730; + protected $YY2TBLSTATE = 433; + protected $numNonLeafStates = 739; protected $symbolToName = array( "EOF", @@ -386,132 +386,133 @@ class Php8 extends \PhpParser\ParserAbstract ); protected $action = array( - 132, 133, 134, 578, 135, 136, 0, 742, 743, 744, - 137, 37,-32766,-32766,-32766, 979,-32766,-32766,-32766,-32766, - -32766,-32766, 1294, 817,-32767,-32767,-32767,-32767, 101, 102, - 103,-32766, 930,-32766, 828, 736, 735,-32766, 1016,-32766, + 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, + 138, 38,-32766,-32766,-32766, 989,-32766,-32766,-32766,-32766, + -32766,-32766, 1305, 826,-32767,-32767,-32767,-32767, 102, 103, + 104,-32766, 940,-32766, 837, 745, 744,-32766, 1026,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1233, -364, 1025, -364, 745,-32766,-32766,-32766, 1100, - 1101, 1102, 1099, 1098, 1097, 1103, -326, -192, 819, 267, - 138, 399, 749, 750, 751, 752, 288,-32766, 423,-32766, - -32766,-32766,-32766,-32766, 602, 806, 753, 754, 755, 756, - 757, 758, 759, 760, 761, 762, 782, 579, 783, 784, - 785, 786, 774, 775, 340, 341, 777, 778, 763, 764, - 765, 767, 768, 769, 351, 809, 810, 811, 812, 813, - 580, 770, 771, 581, 582, -191, 794, 792, 793, 805, - 789, 790, 826, 2, 583, 584, 788, 585, 586, 587, - 588, 589, 590, 980, 821,-32766,-32766,-32766, 791, 591, - 592, 703, 139, 19, 132, 133, 134, 578, 135, 136, - 1049, 742, 743, 744, 137, 37,-32766, 34,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -110, 128, - 238,-32766,-32766,-32766, 81, 144, -591,-32766, 322, 736, - 735, 608, 827, -591, 716, 386,-32766, 18,-32766,-32766, - -32766,-32766,-32766, 1314,-32766,-32766,-32766, 1310, 296, 745, - 1313, 74, 104, 105, 106, 107, 108, 322, 271, 1339, - -326, -192, 1340, 267, 138, 399, 749, 750, 751, 752, - 109, 476, 423,-32766,-32766,-32766, 551, 822, 126, 806, - 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, - 782, 579, 783, 784, 785, 786, 774, 775, 340, 341, - 777, 778, 763, 764, 765, 767, 768, 769, 351, 809, - 810, 811, 812, 813, 580, 770, 771, 581, 582, -191, - 794, 792, 793, 805, 789, 790, 817, 251, 583, 584, - 788, 585, 586, 587, 588, 589, 590, 1266, 82, 83, - 84, 1077, 791, 591, 592, 728, 148, 766, 737, 738, - 739, 740, 741, 823, 742, 743, 744, 779, 780, 36, - 307, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, -591, 271, -591, 309, 375, - 376, 1100, 1101, 1102, 1099, 1098, 1097, 1103, 109, 417, - 948, 949, 745, 477, 289, 950,-32766,-32766,-32766, 141, - 1076, 944,-32766, 322, 377, 376, 746, 747, 748, 749, - 750, 751, 752, 320, 417, 815, 335,-32766, -542,-32766, - -32766, 336, 806, 753, 754, 755, 756, 757, 758, 759, - 760, 761, 762, 782, 804, 783, 784, 785, 786, 774, - 775, 776, 803, 777, 778, 763, 764, 765, 767, 768, - 769, 808, 809, 810, 811, 812, 813, 814, 770, 771, - 772, 773, -545, 794, 792, 793, 805, 789, 790, 239, - -85, 781, 787, 788, 795, 796, 798, 797, 799, 800, - -32766, 21, -542, -542, 1022, 791, 802, 801, 49, 50, - 51, 507, 52, 53, 423, 736, 735, -542, 54, 55, - -110, 56, 1025, 1092, 910, -110, 1025, -110, 289, -548, - -32766, -542, 303,-32766,-32766, -110, -110, -110, -110, -110, - -110, -110, -110, 365, 910, 288, -545, -545, 1233, 279, - 369,-32766, 1233, 853, 706, 854, -85, 57, 58,-32766, - 384, -541, 59, 435, 60, 245, 246, 61, 62, 63, - 64, 65, 66, 67, 68, -545, 27, 269, 69, 439, - 508, 1025, -16, -340, 1260, 1261, 509, 436, 826, 1228, - 1227, 1229, 1258, 41, 24, 510, 932, 511, 1078, 512, - 910, 513, 825, 437, 514, 515, 853, 900, 854, 43, - 44, 440, 372, 371,-32766, 45, 516, 1012, 1011, 1010, - 1013, 363, 334, 438, 1226, -541, -541, 900, 1219, 826, - 518, 519, 520, 826, 1022, 352, 1025, -270, 1254, 932, - -541, 832, 522, 523, 150, 1247, 1248, 1249, 1250, 1244, - 1245, 295, -547, -582, -541, -582, 1025, 1251, 1246, 288, - 1224, 1228, 1227, 1229, 296, 102, 103, 70, 910, 652, - 25, 318, 319, 322, -152, -152, -152, 910, 357, -110, - 123, 1024, 912, 900,-32766, 910, 701, 151,-32766, -152, - -87, -152, 153, -152, 1048, -152,-32766,-32766, 707, 1228, - 1227, 1229, 912, 124, -588, 370, 701, 708, 74, 296, - 154, -588, 74, 155, 322, 711, 948, 949, 322, 826, - 129, 517, 910, 283, 157, 323, 886, 944, -110, -110, - -110, 31, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 736, 735, 453, 454, 455, - 32, 900, 718, 736, 735, -543, 826, 130, 912, 1329, - 900, 143, 701, -152, 671, 672, 948, 949, 900, 149, - 402, 950, 373, 374, 1138, 1140, 47, 945, 378, 379, - 643, 644,-32766, 158, 159, -540, 27, 160, 1226, 461, - 462, 161, -84, -78, -73,-32766,-32766,-32766, 826,-32766, - 140,-32766, 1258,-32766, 322, 900,-32766, 284, -72, 1022, - -71,-32766,-32766,-32766, -4, 910, -70,-32766,-32766, -543, - -543, 35, 248,-32766, 414, -69, 912, -68, -67, -66, - 701, 1025,-32766, -65, -543, 965, 736, 735, 1219, 701, - 297, 298, -540, 912, -46, -300, 48, 701, -543, -540, - -540, -18, 522, 523, 279, 1247, 1248, 1249, 1250, 1244, - 1245, 147, 73, -588, -540, -588, 270, 1251, 1246, 125, - 280, 717, 720,-32766, 909, 146, 926, 72, -540, 1226, - 912, -296, 319, 322, 701, 277,-32766,-32766,-32766, 278, - -32766, 281,-32766, 282,-32766, 328, 285,-32766, 900, 290, - 291, 109,-32766,-32766,-32766, 271, -540, -540,-32766,-32766, - 299, 300, -50, 681,-32766, 414, 826, 145,-32766, 1107, - 370, -540, 430,-32766, 658, 368, 20, 294, 1341, 817, - 641, 948, 949, 304, 694, -540, 517, 553, 301, 127, - 557, 521, 944, -110, -110, -110, 131, 653, 308, 674, - 458, 434,-32766, 1265, 302,-32766, 563, 1267, 487, 928, - 39, 1226, 606, 825, 9, 659, 675, -505,-32766,-32766, - -32766, -495,-32766, 912,-32766, 7,-32766, 701, -4,-32766, - 23, 0, 296, 0,-32766,-32766,-32766, 1255, 33,-32766, - -32766,-32766, 910, 0, 0, 1226,-32766, 414, 0, 0, - 0, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, - -32766, 0, 0,-32766, 0, 0, 367, 0,-32766,-32766, - -32766,-32766, 0, 40,-32766,-32766, 0, 1226, 725, 726, - -32766, 414, 910, 845,-32766,-32766,-32766, 891,-32766,-32766, - -32766, 989,-32766, 966, 973,-32766, 963, 974, 889, 482, - -32766,-32766,-32766,-32766, 961, 1081,-32766,-32766, 1084, 1226, - 570, 1085,-32766, 414, 1082, 1083,-32766,-32766,-32766, 1089, - -32766,-32766,-32766, 837,-32766, 900, 1280,-32766, 1298, 1332, - 646, 722,-32766,-32766,-32766, -576, -575, -574,-32766,-32766, - -548, -248, -248, -248,-32766, 414, -547, 370, -546, -489, - 27, 269, 1,-32766, 28, 29, 38, 42, 948, 949, - 46, 71, 826, 517, 75, 900, 1258, 76, 886, 944, - -110, -110, -110, 77, 78, 79, 80, 142, 152, 156, - 244, -247, -247, -247, 324, 352, 353, 370, 354, 355, - 887, 356, 357, 358, 359, 360, 361, 362, 948, 949, - 912, 364, 1219, 517, 701, -248, 431, 550, 886, 944, - -110, -110, -110, -273, -271, -270, 12, 523, 27, 1247, - 1248, 1249, 1250, 1244, 1245, 13, 14, 15, 17, 401, - 826, 1251, 1246, 478, 1258, 479,-32766, 486, 489, 490, - 912, 72, 1226, 1336, 701, -247, 319, 322, 491,-32766, - -32766,-32766, 492,-32766, 496,-32766, 497,-32766, 498, 505, - -32766, 568, 688, 1237, 1178,-32766,-32766,-32766, 1256, 1051, - 1219,-32766,-32766, 1050, 1031, 1214, 1027,-32766, 414, -275, - -102, 11, 16, 26, 293, 523,-32766, 1247, 1248, 1249, - 1250, 1244, 1245, 400, 599, 603, 632, 693, 1182, 1251, - 1246, 1232, 1179, 1311, 1259, 317, 366, 702, 705, 72, - 709, -509, 710, 712, 319, 322, 713, 714, 715, 719, - 704, 0, 1338, 848, 847, 856, 0, 938, 981, 855, - 1337, 937, 935, 936, 939, 1210, 919, 929, 917, 971, - 972, 630, 1335, 1292, 1281, 1299, 1308, 0, 1195, 0, - 0, 322 + -32767, 1244, -366, 1035, -366, 754,-32766,-32766,-32766, 1111, + 1112, 1113, 1110, 1109, 1108, 1114, -327, -193, 828, 270, + 139, 402, 758, 759, 760, 761, 291,-32766, 427,-32766, + -32766,-32766,-32766,-32766, 606, 815, 762, 763, 764, 765, + 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, + 794, 795, 783, 784, 343, 344, 786, 787, 772, 773, + 774, 776, 777, 778, 354, 818, 819, 820, 821, 822, + 584, 779, 780, 585, 586, -192, 803, 801, 802, 814, + 798, 799, 835, 2, 587, 588, 797, 589, 590, 591, + 592, 593, 594, 990, 830,-32766,-32766,-32766, 800, 595, + 596, 712, 140, 23, 133, 134, 135, 582, 136, 137, + 1059, 751, 752, 753, 138, 38,-32766, 35,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -110, 129, + 241,-32766,-32766,-32766, 82, 145, -593,-32766, 325, 745, + 744, 612, 836, -593, 725, 389,-32766, 7,-32766,-32766, + -32766,-32766,-32766, 1325,-32766,-32766,-32766, 1321, 299, 754, + 1324, 75, 105, 106, 107, 108, 109, 325, 274, 1350, + -327, -193, 1351, 270, 139, 402, 758, 759, 760, 761, + 110, 480, 427,-32766,-32766,-32766, 555, 831, 127, 815, + 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, + 791, 583, 792, 793, 794, 795, 783, 784, 343, 344, + 786, 787, 772, 773, 774, 776, 777, 778, 354, 818, + 819, 820, 821, 822, 584, 779, 780, 585, 586, -192, + 803, 801, 802, 814, 798, 799, 826, 254, 587, 588, + 797, 589, 590, 591, 592, 593, 594, 1277, 83, 84, + 85, 1088, 800, 595, 596, 737, 149, 775, 746, 747, + 748, 749, 750, 832, 751, 752, 753, 788, 789, 37, + 310, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, -593, 274, -593, 312, 378, + 379, 1111, 1112, 1113, 1110, 1109, 1108, 1114, 110, 421, + 958, 959, 754, 481, 292, 960,-32766,-32766,-32766, 142, + 1087, 954, 323, 325, 380, 379, 755, 756, 757, 758, + 759, 760, 761, 338, 421, 824, 339,-32766, -544,-32766, + -32766, 368, 815, 762, 763, 764, 765, 766, 767, 768, + 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, + 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, + 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, + 781, 782, -547, 803, 801, 802, 814, 798, 799, -85, + 372, 790, 796, 797, 804, 805, 807, 806, 808, 809, + -32766, 21, -544, -544, 942, 800, 811, 810, 50, 51, + 52, 511, 53, 54, 862, 387, 863, -544, 55, 56, + -110, 57, 1035, 1103, 920, -110, 326, -110, 292, -550, + 242, -544, 306,-32766,-32766, -110, -110, -110, -110, -110, + -110, -110, -110, 355, 439, 291, -547, -547, 942, -590, + 440, 862, 1244, 863, 715, -85, -590, 58, 59,-32766, + 441, -543, 60, 834, 61, 248, 249, 62, 63, 64, + 65, 66, 67, 68, 69, -547, 28, 272, 70, 443, + 512, 1035, -16, -341, 1271, 1272, 513, 360, 835, 1244, + 465, 466, 1269, 42, 25, 514, -584, 515, -584, 516, + 920, 517,-32766, 1265, 518, 519, 442, 910, 841, 44, + 45, 444, 375, 374,-32766, 46, 520, 1022, 1021, 1020, + 1023, 366, 337,-32766, 1237, -543, -543, 427, 1230,-32766, + 522, 523, 524, 835, 745, 744, 1035, 457, 458, 459, + -543, 151, 526, 527, 1032, 1258, 1259, 1260, 1261, 1255, + 1256, 298, -549, -78, -543, 152, 1058, 1262, 1257, 291, + 1235, 1239, 1238, 1240, 299, 154, 1035, 71, 920, -58, + 835, 321, 322, 325, -153, -153, -153, 155, -271, -110, + 156, 1034, 922, 910, 835, 286, 710, 158,-32766, -153, + 33, -153, -87, -153, -57, -153, 103, 104, 716, 1239, + 1238, 1240, 1239, 1238, 1240, 373, 124, 920, -590, 299, + -590, 1089, 75, -84, 286, -545, 958, 959, 325,-32766, + -32766, 521, 920, 656, 26,-32766, 896, 954, -110, -110, + -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 745, 744, 125, 920, 75, + 130, 910, 717, 745, 744, 325, 958, 959, 922, 920, + 131, 960, 710, -153, 690, 141, 144, 955, 159, 325, + 48, 1032, 675, 676, 1149, 1151, 150, 405, 720, -545, + -545, 835,-32766, 160, 1340, -542, 28, 161, 1237, 727, + 910, 376, 377, 1035, -545,-32766,-32766,-32766, 835,-32766, + 691,-32766, 1269,-32766, 162, 910,-32766, -78, -545, 381, + 382,-32766,-32766,-32766, -4, 920, 282,-32766,-32766, 163, + -73, 692, 693,-32766, 418, -72, 922, -71, -70, 1032, + 710, 910,-32766, -69, 300, 301, 745, 744, 1230, 1239, + 1238, 1240, 910, 647, 648, 282, 36, 251, -68, -542, + -542, 1035, 526, 527, -542, 1258, 1259, 1260, 1261, 1255, + 1256, 49, 74, 126, -542, 922, -67, 1262, 1257, 710, + -66, -65, -46,-32766, 282, -18, 148, 73, -542, 1237, + 975, 273, 322, 325, 710, 283,-32766,-32766,-32766, 726, + -32766, 729,-32766, 919,-32766, 147, -301,-32766, 910, 274, + -297, 280,-32766,-32766,-32766, 281, 922, 284,-32766,-32766, + 710, 285, -50, 331,-32766, 418, 287, 922, -542, -542, + 373, 710, 434,-32766, 288, 302, 303, 297, 293, 294, + 685, 958, 959, -542, 936, 826, 521, 110, 835, 146, + 371, 525, 954, -110, -110, -110, 132, -542,-32766, 1118, + 645, 701, 663, 678, 128,-32766, 1352, 679, 438, 557, + 307, 1237, 305, 304, 10, 657, 561, 1276,-32766,-32766, + -32766,-32766,-32766, 922,-32766, 703,-32766, 710, -4,-32766, + 662, 311, 20, 462,-32766,-32766,-32766, 491, 834,-32766, + -32766,-32766, 920, 1278, 299, 1237,-32766, 418, 1266, 325, + -507, 567,-32766,-32766,-32766,-32766,-32766, 731,-32766, 0, + -32766, 0, 0,-32766, 0, 0, 0, 0,-32766,-32766, + -32766,-32766, 0, 0,-32766,-32766, 0, 1237, 0, -497, + -32766, 418, 920, 0,-32766,-32766,-32766, 8,-32766,-32766, + -32766, 40,-32766, 24, 370,-32766, 610, 0, 41, 486, + -32766,-32766,-32766,-32766, 938, 0,-32766,-32766, 734, 1237, + 574, 735,-32766, 418, 854, 901,-32766,-32766,-32766, 999, + -32766,-32766,-32766, 976,-32766, 910, 983,-32766, 973, 984, + 899, 971,-32766,-32766,-32766, 1092, 1095, 1096,-32766,-32766, + 1093, -249, -249, -249,-32766, 418, 1094, 373, 1100, -578, + 28, 272, 846,-32766, 1291, 1309, 1343, 897, 958, 959, + 650, -274, 835, 521, -577, 910, 1269, -576, 896, 954, + -110, -110, -110, -550, -549, -548, -491, 1, 29, 30, + 39, -248, -248, -248, 43, 47, 72, 373, 76, 77, + 1347, 78, 79, 80, 81, 143, 153, 157, 958, 959, + 922, 247, 1230, 521, 710, -249, 327, 355, 896, 954, + -110, -110, -110, 356, 357, 358, 359, 527, 28, 1258, + 1259, 1260, 1261, 1255, 1256, 360, 361, 362, 363, 364, + 835, 1262, 1257, 365, 1269, 367,-32766, 435, 554, 1349, + 922, 73, 1237, 857, 710, -248, 322, 325, -272,-32766, + -32766,-32766, -271,-32766, 13,-32766, 14,-32766, 15, 16, + -32766, 18, 404, 482, 483,-32766,-32766,-32766, 490, 493, + 1230,-32766,-32766, 494, 495, 496, 500,-32766, 418, 501, + 502, 509, 572, 696, 1248, 527,-32766, 1258, 1259, 1260, + 1261, 1255, 1256, 1189, 1267, 1061, 1060, 1041, 1225, 1262, + 1257, 1037, -276, -102, 12, 17, 27, 296, 403, 73, + 34, 603, 607, 636, 322, 325, 702, 1193, 1243, 1190, + 1322, 0, 320, 369, 711, 0, 714, 718, 719, 721, + 722, 723, 724, 728, 713, 0, 856, 865, 948, 991, + 864, 1348, 947, 945, 946, 949, 1221, 929, 939, 927, + 981, 982, 634, 1346, 1303, 1292, 1310, 1319, 0, -511, + 1206, 0, 1270 ); protected $actionCheck = array( @@ -552,102 +553,103 @@ class Php8 extends \PhpParser\ParserAbstract 51, 52, 53, 54, 55, 160, 57, 162, 8, 106, 107, 116, 117, 118, 119, 120, 121, 122, 69, 116, 117, 118, 57, 163, 30, 122, 9, 10, 11, 163, - 1, 128, 9, 167, 106, 107, 71, 72, 73, 74, + 1, 128, 8, 167, 106, 107, 71, 72, 73, 74, 75, 76, 77, 8, 116, 80, 8, 30, 70, 32, 33, 8, 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, 70, 128, 129, 130, 131, 132, 133, 14, - 31, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 116, 101, 134, 135, 116, 150, 151, 152, 2, 3, - 4, 5, 6, 7, 80, 37, 38, 149, 12, 13, - 101, 15, 138, 123, 1, 106, 138, 108, 30, 161, - 116, 163, 113, 9, 10, 116, 117, 118, 119, 120, - 121, 122, 123, 8, 1, 161, 134, 135, 1, 161, - 8, 137, 1, 106, 31, 108, 97, 51, 52, 116, - 8, 70, 56, 8, 58, 59, 60, 61, 62, 63, + 125, 126, 70, 128, 129, 130, 131, 132, 133, 31, + 8, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 116, 101, 134, 135, 122, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 106, 8, 108, 149, 12, 13, + 101, 15, 138, 123, 1, 106, 70, 108, 30, 161, + 14, 163, 113, 9, 10, 116, 117, 118, 119, 120, + 121, 122, 123, 161, 8, 161, 134, 135, 122, 1, + 8, 106, 1, 108, 31, 97, 8, 51, 52, 116, + 8, 70, 56, 155, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 163, 70, 71, 72, 73, - 74, 138, 31, 164, 78, 79, 80, 8, 82, 155, - 156, 157, 86, 87, 88, 89, 122, 91, 164, 93, - 1, 95, 155, 8, 98, 99, 106, 84, 108, 103, + 74, 138, 31, 164, 78, 79, 80, 161, 82, 1, + 134, 135, 86, 87, 88, 89, 160, 91, 162, 93, + 1, 95, 116, 1, 98, 99, 8, 84, 8, 103, 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 8, 80, 134, 135, 84, 122, 82, - 124, 125, 126, 82, 116, 161, 138, 162, 1, 122, - 149, 8, 136, 137, 14, 139, 140, 141, 142, 143, - 144, 145, 161, 160, 163, 162, 138, 151, 152, 161, - 116, 155, 156, 157, 158, 49, 50, 161, 1, 75, - 76, 165, 166, 167, 75, 76, 77, 1, 161, 128, - 16, 137, 159, 84, 137, 1, 163, 14, 137, 90, - 31, 92, 14, 94, 1, 96, 51, 52, 31, 155, - 156, 157, 159, 16, 1, 106, 163, 31, 161, 158, - 14, 8, 161, 14, 167, 31, 117, 118, 167, 82, - 16, 122, 1, 30, 14, 70, 127, 128, 129, 130, + 122, 115, 116, 137, 80, 134, 135, 80, 122, 9, + 124, 125, 126, 82, 37, 38, 138, 129, 130, 131, + 149, 14, 136, 137, 116, 139, 140, 141, 142, 143, + 144, 145, 161, 16, 163, 14, 1, 151, 152, 161, + 116, 155, 156, 157, 158, 14, 138, 161, 1, 16, + 82, 165, 166, 167, 75, 76, 77, 14, 162, 128, + 14, 137, 159, 84, 82, 30, 163, 14, 137, 90, + 14, 92, 31, 94, 16, 96, 49, 50, 31, 155, + 156, 157, 155, 156, 157, 106, 16, 1, 160, 158, + 162, 164, 161, 31, 30, 70, 117, 118, 167, 51, + 52, 122, 1, 75, 76, 137, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 37, 38, 129, 130, 131, - 14, 84, 31, 37, 38, 70, 82, 16, 159, 85, - 84, 16, 163, 164, 75, 76, 117, 118, 84, 101, - 102, 122, 106, 107, 59, 60, 70, 128, 106, 107, - 111, 112, 74, 16, 16, 70, 70, 16, 80, 134, - 135, 16, 31, 31, 31, 87, 88, 89, 82, 91, - 163, 93, 86, 95, 167, 84, 98, 37, 31, 116, - 31, 103, 104, 105, 0, 1, 31, 109, 110, 134, - 135, 147, 148, 115, 116, 31, 159, 31, 31, 31, - 163, 138, 124, 31, 149, 159, 37, 38, 122, 163, - 134, 135, 70, 159, 31, 35, 70, 163, 163, 134, - 135, 31, 136, 137, 161, 139, 140, 141, 142, 143, - 144, 31, 154, 160, 149, 162, 31, 151, 152, 163, - 31, 31, 31, 74, 31, 31, 38, 161, 163, 80, - 159, 35, 166, 167, 163, 35, 87, 88, 89, 35, - 91, 35, 93, 35, 95, 35, 37, 98, 84, 37, - 37, 69, 103, 104, 105, 57, 134, 135, 109, 110, - 134, 135, 31, 77, 115, 116, 82, 70, 85, 82, - 106, 149, 108, 124, 96, 149, 97, 113, 83, 80, - 113, 117, 118, 114, 92, 163, 122, 85, 132, 163, - 89, 127, 128, 129, 130, 131, 31, 90, 132, 94, - 97, 128, 137, 146, 133, 74, 153, 146, 97, 154, - 159, 80, 153, 155, 150, 100, 100, 149, 87, 88, - 89, 149, 91, 159, 93, 149, 95, 163, 164, 98, - 149, -1, 158, -1, 103, 104, 105, 160, 163, 74, - 109, 110, 1, -1, -1, 80, 115, 116, -1, -1, - -1, -1, 87, 88, 89, 124, 91, -1, 93, -1, - 95, -1, -1, 98, -1, -1, 149, -1, 103, 104, - 105, 74, -1, 159, 109, 110, -1, 80, 159, 159, - 115, 116, 1, 159, 87, 88, 89, 159, 91, 124, - 93, 159, 95, 159, 159, 98, 159, 159, 159, 102, - 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, + 25, 26, 27, 28, 29, 37, 38, 16, 1, 161, + 16, 84, 31, 37, 38, 167, 117, 118, 159, 1, + 16, 122, 163, 164, 80, 163, 16, 128, 16, 167, + 70, 116, 75, 76, 59, 60, 101, 102, 31, 134, + 135, 82, 74, 16, 85, 70, 70, 16, 80, 31, + 84, 106, 107, 138, 149, 87, 88, 89, 82, 91, + 116, 93, 86, 95, 16, 84, 98, 31, 163, 106, + 107, 103, 104, 105, 0, 1, 161, 109, 110, 16, + 31, 137, 138, 115, 116, 31, 159, 31, 31, 116, + 163, 84, 124, 31, 134, 135, 37, 38, 122, 155, + 156, 157, 84, 111, 112, 161, 147, 148, 31, 134, + 135, 138, 136, 137, 70, 139, 140, 141, 142, 143, + 144, 70, 154, 163, 149, 159, 31, 151, 152, 163, + 31, 31, 31, 74, 161, 31, 31, 161, 163, 80, + 159, 31, 166, 167, 163, 31, 87, 88, 89, 31, + 91, 31, 93, 31, 95, 31, 35, 98, 84, 57, + 35, 35, 103, 104, 105, 35, 159, 35, 109, 110, + 163, 35, 31, 35, 115, 116, 37, 159, 134, 135, + 106, 163, 108, 124, 37, 134, 135, 113, 37, 37, + 77, 117, 118, 149, 38, 80, 122, 69, 82, 70, + 149, 127, 128, 129, 130, 131, 31, 163, 85, 82, + 113, 80, 100, 94, 163, 74, 83, 100, 128, 85, + 114, 80, 133, 132, 150, 90, 89, 146, 87, 88, + 89, 137, 91, 159, 93, 92, 95, 163, 164, 98, + 96, 132, 97, 97, 103, 104, 105, 97, 155, 74, + 109, 110, 1, 146, 158, 80, 115, 116, 160, 167, + 149, 153, 87, 88, 89, 124, 91, 164, 93, -1, + 95, -1, -1, 98, -1, -1, -1, -1, 103, 104, + 105, 74, -1, -1, 109, 110, -1, 80, -1, 149, + 115, 116, 1, -1, 87, 88, 89, 149, 91, 124, + 93, 159, 95, 149, 149, 98, 153, -1, 159, 102, + 103, 104, 105, 74, 154, -1, 109, 110, 159, 80, 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, - 91, 124, 93, 160, 95, 84, 160, 98, 160, 160, - 160, 164, 103, 104, 105, 161, 161, 161, 109, 110, - 161, 100, 101, 102, 115, 116, 161, 106, 161, 161, - 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, - 161, 161, 82, 122, 161, 84, 86, 161, 127, 128, + 91, 124, 93, 159, 95, 84, 159, 98, 159, 159, + 159, 159, 103, 104, 105, 159, 159, 159, 109, 110, + 159, 100, 101, 102, 115, 116, 159, 106, 159, 161, + 70, 71, 160, 124, 160, 160, 160, 164, 117, 118, + 160, 162, 82, 122, 161, 84, 86, 161, 127, 128, 129, 130, 131, 161, 161, 161, 161, 161, 161, 161, 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, - 129, 130, 131, 162, 162, 162, 162, 137, 70, 139, - 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, - 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, + 129, 130, 131, 161, 161, 161, 161, 137, 70, 139, + 140, 141, 142, 143, 144, 161, 161, 161, 161, 161, + 82, 151, 152, 161, 86, 161, 74, 161, 161, 164, 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, 88, 89, 162, 91, 162, 93, 162, 95, 162, 162, 98, 162, 162, 162, 162, 103, 104, 105, 162, 162, 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, - 152, 162, 162, 162, 166, 163, 163, 163, 163, 161, - 163, 165, 163, 163, 166, 167, 163, 163, 163, 163, - 163, -1, 164, 164, 164, 164, -1, 164, 164, 164, + 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, + 163, 162, 162, 162, 166, 167, 162, 162, 162, 162, + 162, -1, 163, 163, 163, -1, 163, 163, 163, 163, + 163, 163, 163, 163, 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, -1, 165, -1, - -1, 167 + 164, 164, 164, 164, 164, 164, 164, 164, -1, 165, + 165, -1, 166 ); protected $actionBase = array( - 0, -2, 152, 549, 764, 941, 981, 587, 384, -12, - 856, 617, 634, 634, 671, 634, 473, 626, 305, 305, - -57, 305, 305, 305, 493, 493, 493, 658, 658, 658, - 658, 749, 749, 897, 897, 929, 865, 831, 1062, 1062, + 0, -2, 152, 549, 764, 941, 981, 634, 552, 497, + -12, 887, 617, 697, 697, 708, 697, 473, 671, 821, + -57, 305, 305, 821, 305, 656, 656, 656, 658, 658, + 658, 658, 749, 749, 897, 897, 929, 865, 831, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, @@ -660,66 +662,67 @@ class Php8 extends \PhpParser\ParserAbstract 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 33, -16, 83, 686, 1022, 1036, 1032, 1039, - 1020, 1019, 1031, 1033, 1040, 1078, 1079, 794, 1080, 1081, - 1077, 1082, 1034, 870, 1021, 1035, 289, 289, 289, 289, + 1062, 1062, 1062, 1062, 33, -16, 83, 626, 1045, 1055, + 1049, 1056, 1043, 1042, 1046, 1050, 1057, 1089, 1090, 814, + 1091, 1092, 1088, 1093, 1051, 900, 1044, 1054, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 363, 224, 474, 10, 10, 10, 10, 10, + 289, 289, 289, 289, 289, 570, 224, 474, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 3, 3, 3, 666, 666, - 357, 172, 980, 166, 1048, 1048, 1048, 1048, 1048, 1048, - 1048, 1048, 1048, 665, 47, 136, 136, 7, 7, 7, - 7, 7, 369, -20, -20, -20, -20, 501, 448, 50, - 643, 497, 350, -54, 566, 334, 243, 338, 338, 468, - 468, -85, -85, 468, 468, 468, 161, 161, 393, 393, - 393, 393, 318, 441, 397, 151, 765, 206, 206, 206, - 206, 765, 765, 765, 765, 761, 1038, 765, 765, 765, - 635, 722, 722, 726, 595, 595, 722, 450, 802, 624, - 450, 624, 21, 139, 364, 599, 268, 443, 364, 362, - 656, 653, 185, 758, 616, 758, 1018, 424, 783, 467, - 763, 713, 860, 1057, 1041, 815, 1075, 816, 1076, 568, - 605, 712, 1017, 1017, 1017, 1017, 1017, 1017, 1017, 1017, - 1017, 1017, 1017, 1084, 428, 1018, 157, 1084, 1084, 1084, - 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, - 619, 157, 544, 639, 157, 810, 428, 33, 772, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 770, - 200, 33, -16, 31, 31, 142, 37, 31, 31, 31, - 31, 33, 33, 33, 616, 798, 753, 622, 759, 117, - 798, 798, 798, 409, 58, 425, 59, 760, 796, 89, - 799, 799, 787, 891, 891, 799, 784, 799, 787, 899, - 799, 799, 891, 891, 774, 171, 505, 378, 492, 529, - 891, 312, 799, 799, 799, 799, 766, 545, 799, 279, - 177, 799, 799, 766, 756, 789, 125, 771, 891, 891, - 891, 766, 485, 771, 771, 771, 819, 820, 767, 785, - 375, 340, 583, 159, 788, 785, 785, 799, 502, 767, - 785, 767, 785, 755, 785, 785, 785, 767, 785, 784, - 383, 785, 717, 565, 145, 785, 6, 900, 903, 609, - 906, 895, 912, 945, 913, 914, 1044, 888, 919, 896, - 915, 946, 894, 893, 793, 614, 637, 776, 768, 887, - 782, 782, 782, 879, 782, 782, 782, 782, 782, 782, - 782, 782, 614, 777, 817, 773, 801, 925, 654, 691, - 999, 757, 926, 1046, 1083, 924, 1001, 916, 751, 695, - 966, 927, 867, 1042, 928, 930, 967, 1002, 824, 1006, - 979, 797, 1058, 1059, 863, 932, 1045, 782, 900, 914, - 711, 896, 915, 894, 893, 752, 748, 746, 747, 744, - 735, 727, 729, 780, 1007, 876, 874, 866, 931, 885, - 614, 868, 954, 775, 971, 973, 1043, 803, 795, 869, - 1060, 933, 934, 935, 1047, 1011, 1049, 814, 963, 951, - 975, 811, 1061, 976, 977, 986, 990, 1050, 1063, 1053, - 875, 1054, 828, 807, 952, 778, 1064, 580, 806, 808, - 813, 940, 623, 923, 1055, 1065, 1066, 992, 994, 996, - 1067, 1068, 917, 832, 964, 805, 965, 953, 834, 835, - 628, 812, 1012, 800, 804, 809, 646, 649, 1069, 1070, - 1071, 918, 790, 786, 837, 838, 1013, 720, 1014, 1072, - 660, 839, 718, 1073, 1000, 721, 725, 792, 1056, 781, - 769, 779, 936, 791, 845, 1074, 846, 849, 852, 997, - 855, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, 3, 3, + 3, 666, 666, 357, 172, 980, 166, 1048, 1048, 1048, + 1048, 1048, 1048, 1048, 1048, 1048, 665, 47, 136, 136, + 7, 7, 7, 7, 7, 369, -20, -20, -20, -20, + 501, 448, 50, 605, 538, 350, -54, 597, 334, 243, + 663, 663, 478, 478, -85, -85, 478, 478, 478, 161, + 161, 393, 393, 393, 393, 318, 441, 358, 151, 784, + 206, 206, 206, 206, 784, 784, 784, 784, 797, 1096, + 784, 784, 784, 595, 734, 734, 741, 618, 618, 734, + 395, 824, 649, 395, 649, 21, 139, 436, 589, 268, + 386, 436, 362, 650, 498, 185, 783, 635, 783, 1041, + 332, 813, 376, 791, 739, 889, 1071, 1058, 802, 1086, + 807, 1087, 458, 406, 726, 1040, 1040, 1040, 1040, 1040, + 1040, 1040, 1040, 1040, 1040, 1040, 782, 547, 1041, 157, + 782, 782, 782, 547, 547, 547, 547, 547, 547, 547, + 547, 547, 547, 682, 157, 598, 647, 157, 828, 547, + 33, 830, 33, 33, 33, 33, 33, 33, 33, 33, + 33, 33, 794, 200, 33, -16, 31, 31, 142, 37, + 31, 31, 31, 31, 33, 33, 33, 33, 635, 792, + 798, 653, 843, 117, 792, 792, 792, 408, 58, 466, + 59, 811, 815, 89, 805, 805, 817, 916, 916, 805, + 806, 805, 817, 924, 805, 805, 916, 916, 786, 171, + 486, 375, 432, 492, 916, 312, 805, 805, 805, 805, + 799, 502, 805, 279, 177, 805, 805, 799, 781, 804, + 125, 779, 916, 916, 916, 799, 383, 779, 779, 779, + 849, 852, 787, 800, 364, 340, 550, 159, 846, 800, + 800, 805, 457, 787, 800, 787, 800, 850, 800, 800, + 800, 787, 800, 806, 378, 800, 702, 548, 145, 800, + 6, 925, 927, 611, 928, 919, 930, 976, 931, 932, + 1061, 915, 940, 923, 933, 977, 918, 917, 812, 640, + 681, 838, 801, 914, 818, 818, 818, 912, 818, 818, + 818, 818, 818, 818, 818, 818, 640, 788, 845, 780, + 827, 952, 684, 694, 1020, 771, 893, 1094, 1095, 946, + 1022, 934, 832, 700, 999, 953, 793, 1059, 954, 955, + 1000, 1031, 855, 1032, 926, 819, 975, 979, 892, 965, + 1063, 818, 925, 932, 632, 923, 933, 918, 917, 790, + 789, 767, 785, 752, 747, 744, 746, 795, 1033, 906, + 888, 894, 964, 913, 640, 895, 992, 1047, 1001, 1002, + 1060, 836, 823, 896, 1072, 966, 967, 968, 1064, 1034, + 1065, 839, 994, 899, 1006, 840, 1073, 1007, 1011, 1012, + 1013, 1066, 1074, 1067, 903, 1068, 856, 825, 986, 834, + 1075, 577, 822, 826, 842, 974, 591, 945, 1069, 1076, + 1077, 1014, 1017, 1018, 1078, 1079, 935, 860, 996, 809, + 997, 990, 864, 867, 601, 841, 1035, 816, 820, 837, + 613, 616, 1080, 1081, 1082, 936, 808, 803, 869, 870, + 1036, 829, 1039, 1083, 623, 871, 717, 1084, 1021, 721, + 738, 587, 628, 603, 753, 833, 1070, 844, 796, 835, + 972, 738, 810, 872, 1085, 876, 877, 878, 1019, 881, + 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, 456, 456, 456, 456, 456, 456, 305, 305, 305, - 305, 456, 456, 456, 456, 456, 456, 456, 0, 0, - 305, 0, 0, 0, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 305, 305, 305, 305, + 305, 456, 456, 456, 456, 456, 456, 456, 305, 305, + 0, 0, 305, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, @@ -733,183 +736,192 @@ class Php8 extends \PhpParser\ParserAbstract 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 289, 289, 289, 289, 289, 289, 289, 289, + 456, 456, 456, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 0, 0, 0, 0, + 289, 289, 289, 289, 289, 289, 289, 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, 289, 289, 289, 289, 289, 289, 289, 289, + 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 494, 494, - 289, 289, 494, 289, 494, 494, 494, 494, 494, 494, - 494, 494, 494, 0, 289, 289, 289, 289, 289, 289, - 289, 289, 774, 161, 161, 161, 161, 494, 494, 494, - 494, 494, 235, 235, 161, 494, 774, 494, 494, 494, - 494, 494, 494, 494, 494, 494, 0, 0, 494, 494, - 494, 494, 0, 0, 157, 624, 494, 784, 784, 784, - 784, 494, 494, 494, 494, 624, 624, 494, 494, 494, - 0, 0, 0, 0, 161, 161, 0, 157, 624, 0, - 157, 0, 784, 784, 494, 0, 774, 202, 494, 0, - 0, 0, 0, 157, 784, 157, 428, 799, 624, 799, - 428, 428, 31, 33, 202, 618, 618, 618, 618, 0, - 0, 616, 774, 774, 774, 774, 774, 774, 774, 774, - 774, 774, 774, 784, 0, 774, 0, 784, 784, 784, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 784, 0, 0, 891, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 899, - 0, 0, 0, 0, 0, 0, 784, 0, 0, 0, - 0, 0, 0, 0, 0, 782, 803, 0, 803, 0, - 782, 782, 782, 0, 0, 0, 0, 812, 720 + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 494, 494, 289, 289, 494, 289, 494, 494, 494, 494, + 494, 494, 494, 494, 494, 0, 289, 289, 289, 289, + 289, 289, 289, 289, 786, 161, 161, 161, 161, 494, + 494, 494, 494, 494, 235, 235, 161, 494, 786, 494, + 494, 494, 494, 494, 494, 494, 494, 494, 0, 0, + 494, 494, 494, 494, 0, 0, 157, 649, 494, 806, + 806, 806, 806, 494, 494, 494, 494, 649, 649, 494, + 494, 494, 0, 0, 0, 0, 161, 161, 0, 157, + 649, 0, 157, 0, 806, 806, 494, 0, 786, 202, + 494, 0, 0, 0, 0, 157, 806, 157, 547, 805, + 649, 805, 547, 547, 31, 33, 202, 625, 625, 625, + 625, 0, 0, 635, 786, 786, 786, 786, 786, 786, + 786, 786, 786, 786, 786, 806, 0, 786, 0, 806, + 806, 806, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 806, 0, 0, + 916, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 924, 0, 0, 0, 0, 0, 0, 806, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 818, 836, + 0, 836, 0, 818, 818, 818, 0, 0, 0, 0, + 841, 829 ); protected $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767,32767,32767,32767,32767,32767,32767, 594, 594, 594, - 594,32767,32767, 252, 102,32767,32767, 467, 384, 384, - 384,32767,32767, 538, 538, 538, 538, 538, 538,32767, - 32767,32767,32767,32767,32767, 467,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 100,32767,32767,32767,32767, 596, 596, + 596, 596,32767,32767, 253, 102,32767,32767, 469, 386, + 386, 386,32767,32767, 540, 540, 540, 540, 540, 540, + 32767,32767,32767,32767,32767,32767, 469,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, 100, + 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, + 323,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 589,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 100,32767, - 32767,32767, 36, 7, 8, 10, 11, 49, 17, 322, - 32767,32767,32767,32767, 102,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 473, 452, + 453, 455, 456, 385, 541, 595, 326, 592, 384, 145, + 338, 328, 241, 329, 257, 474, 258, 475, 478, 479, + 214, 286, 381, 149, 150, 416, 470, 418, 468, 472, + 417, 391, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 389, 390, 471, 449, 448, + 447,32767,32767, 414, 415,32767, 419,32767,32767,32767, + 32767,32767,32767,32767, 102,32767, 388, 422, 420, 421, + 438, 439, 436, 437, 440,32767, 441, 442, 443, 444, + 32767, 315,32767,32767,32767, 365, 363, 423, 315, 111, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 429, + 430,32767,32767,32767,32767, 534, 446,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 587,32767,32767,32767,32767, + 102,32767, 100, 536, 411, 413, 503, 424, 425, 392, + 32767, 510,32767, 102, 512,32767,32767,32767,32767,32767, + 32767,32767, 535,32767, 542, 542,32767, 496, 100, 194, + 32767,32767,32767, 194, 194,32767,32767,32767,32767,32767, + 32767,32767,32767, 603, 496, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110,32767, 194, 110,32767, + 32767,32767, 100, 194, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 189,32767, 267, 269, 102, 557, 194, + 32767, 515,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 508,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 496, 434, + 138,32767, 138, 542, 426, 427, 428, 498, 542, 542, + 542, 311, 288,32767,32767,32767,32767, 513, 513, 100, + 100, 100, 100, 508,32767,32767,32767,32767, 111, 99, + 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, + 222, 99,32767, 101, 101,32767,32767, 222, 224, 211, + 101, 226,32767, 561, 562, 222, 101, 226, 226, 226, + 246, 246, 485, 317, 101, 99, 101, 101, 196, 317, + 317,32767, 101, 485, 317, 485, 317, 198, 317, 317, + 317, 485, 317,32767, 101, 317, 213, 99, 99, 317, + 32767,32767,32767, 498,32767,32767,32767,32767,32767,32767, + 32767, 221,32767,32767,32767,32767,32767,32767,32767,32767, + 529,32767, 546, 559, 432, 433, 435, 544, 457, 458, + 459, 460, 461, 462, 463, 465, 591,32767, 502,32767, + 32767,32767,32767, 337,32767, 601,32767, 601,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 471, 450, 451, 453, - 454, 383, 539, 593, 325, 590, 382, 145, 337, 327, - 240, 328, 256, 472, 257, 473, 476, 477, 213, 285, - 379, 149, 414, 468, 416, 466, 470, 415, 389, 395, - 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 387, 388, 469, 447, 446, 445,32767,32767, - 412, 413,32767, 417,32767,32767,32767,32767,32767,32767, - 32767, 102,32767, 386, 420, 418, 419, 436, 437, 434, - 435, 438,32767, 439, 440, 441, 442,32767, 314,32767, - 32767,32767, 363, 361, 421, 314, 111,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 427, 428,32767,32767, - 32767,32767, 532, 444,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 102,32767, 100, - 534, 409, 411, 501, 422, 423, 390,32767, 508,32767, - 102, 510,32767,32767,32767,32767,32767,32767,32767, 533, - 32767, 540, 540,32767, 494, 100, 193,32767,32767,32767, - 193, 193,32767,32767,32767,32767,32767,32767,32767,32767, - 601, 494, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110,32767, 193, 110,32767,32767,32767, 100, - 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 188,32767, 266, 268, 102, 555, 193,32767, 513,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 506, + 32767,32767,32767,32767, 602,32767, 542,32767,32767,32767, + 32767, 431, 9, 74, 491, 42, 43, 51, 57, 519, + 520, 521, 522, 516, 517, 523, 518,32767,32767, 524, + 567,32767,32767, 543, 594,32767,32767,32767,32767,32767, + 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 529,32767, 136,32767,32767,32767,32767, + 32767,32767,32767,32767, 525,32767,32767,32767, 542,32767, + 32767,32767,32767, 313, 310,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 494, 432, 138,32767, 138, 540, - 424, 425, 426, 496, 540, 540, 540, 310, 287,32767, - 32767,32767,32767, 511, 511, 100, 100, 100, 100, 506, - 32767,32767,32767,32767, 111, 99, 99, 99, 99, 99, - 103, 101,32767,32767,32767,32767, 221, 99,32767, 101, - 101,32767,32767, 221, 223, 210, 101, 225,32767, 559, - 560, 221, 101, 225, 225, 225, 245, 245, 483, 316, - 101, 99, 101, 101, 195, 316, 316,32767, 101, 483, - 316, 483, 316, 197, 316, 316, 316, 483, 316,32767, - 101, 316, 212, 99, 99, 316,32767,32767,32767, 496, - 32767,32767,32767,32767,32767,32767,32767, 220,32767,32767, - 32767,32767,32767,32767,32767,32767, 527,32767, 544, 557, - 430, 431, 433, 542, 455, 456, 457, 458, 459, 460, - 461, 463, 589,32767, 500,32767,32767,32767,32767, 336, - 32767, 599,32767, 599,32767,32767,32767,32767,32767,32767, + 32767, 542,32767,32767,32767,32767,32767, 290,32767, 307, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 600,32767, 540,32767,32767,32767,32767, 429, 9, 74, - 489, 42, 43, 51, 57, 517, 518, 519, 520, 514, - 515, 521, 516,32767,32767, 522, 565,32767,32767, 541, - 592,32767,32767,32767,32767,32767,32767, 138,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 527, - 32767, 136,32767,32767,32767,32767,32767,32767,32767,32767, - 523,32767,32767,32767, 540,32767,32767,32767,32767, 312, - 309,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 540,32767,32767, - 32767,32767,32767, 289,32767, 306,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 285,32767,32767, 380, + 498, 293, 295, 296,32767,32767,32767,32767, 359,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 284,32767,32767, 378,32767,32767,32767,32767, - 357,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 151, 151, 3, 3, 339, 151, 151, 151, 339, - 339, 151, 339, 339, 339, 151, 151, 151, 151, 151, - 151, 278, 183, 260, 263, 245, 245, 151, 349, 151 + 152, 152, 3, 3, 340, 152, 152, 152, 340, 340, + 152, 340, 340, 340, 152, 152, 152, 152, 152, 152, + 279, 184, 261, 264, 246, 246, 152, 351, 152 ); protected $goto = array( - 194, 194, 689, 1054, 425, 657, 617, 654, 316, 697, - 419, 311, 312, 331, 572, 424, 332, 426, 634, 650, - 651, 843, 668, 669, 670, 820, 165, 165, 165, 165, - 218, 195, 191, 191, 175, 177, 213, 191, 191, 191, - 191, 191, 192, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 530, 531, 415, 532, - 534, 535, 536, 537, 538, 539, 540, 541, 1124, 166, - 167, 168, 193, 169, 170, 171, 164, 172, 173, 174, - 176, 212, 214, 217, 235, 240, 241, 243, 254, 255, - 256, 257, 258, 259, 260, 261, 263, 264, 265, 266, - 274, 286, 287, 314, 315, 420, 421, 422, 577, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, 178, 234, 179, 196, 197, 198, - 236, 186, 187, 188, 189, 190, 215, 1124, 199, 180, - 181, 182, 200, 196, 183, 237, 201, 199, 163, 202, - 203, 184, 204, 205, 206, 185, 207, 208, 209, 210, - 211, 846, 391, 394, 556, 597, 601, 346, 276, 276, - 276, 276, 844, 596, 619, 619, 859, 964, 1257, 824, - 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1257, 1275, - 1275, 871, 877, 1275, 858, 1275, 1275, 1275, 1275, 1275, - 1275, 1275, 1275, 1275, 903, 851, 904, 899, 894, 895, - 908, 852, 896, 849, 897, 898, 850, 818, 824, 902, - 824, 1095, 1096, 872, 860, 1059, 1063, 350, 569, 1075, - 1071, 1072, 473, 344, 967, 1273, 1273, 350, 350, 1273, - 475, 1273, 1273, 1273, 1273, 1273, 1273, 1273, 1273, 1273, - 350, 350, 418, 350, 607, 1342, 389, 839, 957, 460, - 460, 1225, 1023, 1225, 1023, 1225, 549, 1315, 460, 1023, - 350, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, 1023, - 1104, 876, 1023, 1023, 1023, 1023, 1307, 1307, 1307, 1307, - 1225, 5, 427, 6, 985, 1225, 1225, 1225, 1225, 427, - 567, 1225, 1225, 1225, 656, 1030, 1030, 839, 1121, 555, - 547, 1173, 661, 1041, 1037, 1038, 432, 1286, 915, 470, - 1300, 1301, 916, 533, 533, 452, 931, 533, 931, 533, - 533, 533, 533, 533, 533, 533, 533, 533, 682, 337, - 547, 555, 564, 565, 339, 575, 598, 612, 613, 544, - 494, 544, 495, 544, 678, 22, 562, 333, 501, 662, - 724, 633, 635, 1029, 1028, 655, 249, 249, 549, 679, - 683, 999, 687, 695, 995, 956, 405, 696, 450, 349, - 349, 349, 349, 958, 958, 958, 958, 321, 306, 450, - 952, 959, 247, 247, 247, 247, 242, 250, 1326, 1326, - 864, 842, 542, 542, 542, 542, 947, 600, 988, 962, - 962, 960, 962, 723, 1326, 347, 348, 1032, 1033, 548, - 559, 546, 997, 992, 548, 839, 559, 444, 836, 392, - 456, 1218, 444, 1297, 444, 1297, 398, 1297, 627, 629, - 631, 463, 576, 464, 465, 1302, 1303, 869, 573, 610, - 1333, 1334, 605, 620, 623, 624, 625, 626, 647, 648, - 649, 699, 861, 1309, 1309, 1309, 1309, 611, 1216, 1060, - 403, 404, 1007, 471, 1064, 666, 867, 667, 727, 407, - 408, 409, 873, 680, 595, 1088, 410, 700, 1293, 969, - 342, 1106, 428, 0, 1220, 686, 686, 0, 502, 692, - 1086, 677, 941, 0, 0, 1018, 1034, 1035, 1204, 933, - 0, 0, 1205, 1208, 934, 1209, 0, 444, 444, 444, - 444, 444, 444, 444, 444, 444, 444, 444, 0, 1062, - 444, 920, 1111, 1295, 1295, 1062, 0, 0, 615, 0, - 0, 0, 0, 0, 1004, 1325, 1325, 0, 1221, 1222, - 0, 0, 863, 0, 660, 983, 834, 0, 0, 0, - 857, 1325, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1215, 0, 1223, 1283, 1284, 0, 1328, 0, + 196, 196, 1033, 1064, 697, 429, 661, 621, 658, 319, + 706, 423, 314, 315, 334, 576, 428, 335, 430, 638, + 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, + 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, + 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, + 189, 190, 191, 192, 218, 216, 219, 534, 535, 419, + 536, 538, 539, 540, 541, 542, 543, 544, 545, 1135, + 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, + 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, + 258, 259, 260, 261, 262, 263, 264, 266, 267, 268, + 269, 277, 289, 290, 317, 318, 424, 425, 426, 581, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, + 200, 239, 188, 189, 190, 191, 192, 218, 1135, 201, + 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, + 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, + 212, 213, 214, 855, 394, 397, 560, 601, 605, 349, + 279, 279, 279, 279, 623, 623, 600, 913, 1268, 914, + 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1286, + 1286, 974, 422, 1286, 611, 1286, 1286, 1286, 1286, 1286, + 1286, 1286, 1286, 1286, 827, 559, 551, 860, 417, 909, + 904, 905, 918, 861, 906, 858, 907, 908, 859, 464, + 464, 912, 352, 352, 352, 352, 1039, 1038, 464, 1336, + 1336, 1086, 1081, 1082, 1083, 340, 551, 559, 568, 569, + 342, 579, 602, 616, 617, 1336, 1284, 1284, 1106, 1107, + 1284, 22, 1284, 1284, 1284, 1284, 1284, 1284, 1284, 1284, + 1284, 5, 1339, 6, 848, 1236, 1033, 1236, 1033, 1236, + 886, 833, 573, 1033, 347, 1033, 1033, 1033, 1033, 1033, + 1033, 1033, 1033, 1033, 1326, 353, 1033, 1033, 1033, 1033, + 1318, 1318, 1318, 1318, 1236, 353, 353, 1042, 1043, 1236, + 1236, 1236, 1236, 324, 309, 1236, 1236, 1236, 353, 353, + 833, 353, 833, 1353, 848, 694, 995, 477, 829, 548, + 868, 548, 925, 548, 553, 479, 926, 694, 353, 392, + 941, 694, 941, 537, 537, 880, 571, 537, 867, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 454, 1337, + 1337, 1313, 1314, 968, 968, 968, 968, 252, 252, 454, + 962, 969, 498, 566, 499, 1337, 660, 733, 637, 639, + 505, 1132, 659, 577, 614, 1297, 683, 687, 1009, 695, + 704, 1005, 851, 1057, 250, 250, 250, 250, 245, 253, + 998, 972, 972, 970, 972, 732, 686, 474, 1311, 1312, + 436, 406, 407, 550, 1007, 1002, 670, 1184, 671, 456, + 410, 411, 412, 682, 684, 336, 666, 413, 966, 408, + 705, 345, 350, 351, 552, 563, 873, 553, 957, 552, + 845, 563, 448, 848, 395, 460, 870, 448, 1308, 448, + 1308, 401, 1308, 631, 633, 635, 467, 580, 468, 469, + 615, 1227, 878, 1017, 1070, 1344, 1345, 609, 624, 627, + 628, 629, 630, 651, 652, 653, 708, 736, 1320, 1320, + 1320, 1320, 475, 930, 1122, 882, 979, 1074, 0, 0, + 619, 876, 1117, 0, 275, 0, 1014, 0, 0, 549, + 1229, 549, 0, 1304, 872, 0, 664, 993, 881, 869, + 1069, 1073, 866, 546, 546, 546, 546, 1231, 604, 977, + 1036, 1036, 681, 951, 1226, 0, 1028, 1044, 1045, 0, + 0, 0, 448, 448, 448, 448, 448, 448, 448, 448, + 448, 448, 448, 967, 1072, 448, 0, 431, 1306, 1306, + 1072, 1215, 943, 0, 431, 1216, 1219, 944, 1220, 0, + 1040, 1040, 0, 0, 0, 1115, 885, 665, 1051, 1047, + 1048, 0, 1232, 1233, 599, 1099, 0, 709, 0, 0, + 843, 0, 0, 0, 0, 0, 0, 506, 700, 0, + 1097, 0, 0, 0, 0, 0, 0, 0, 1234, 1294, + 1295, 0, 0, 0, 0, 0, 0, 255, 255, 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, 252, 252, 0, 0, 0, 0, 0, - 0, 0, 0, 1002, 1002, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 272, 0, - 0, 0, 0, 545, 0, 545 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1012, 1012 ); protected $gotoCheck = array( - 42, 42, 72, 126, 65, 65, 55, 55, 65, 9, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 85, - 85, 26, 85, 85, 85, 7, 42, 42, 42, 42, + 42, 42, 72, 126, 72, 65, 65, 55, 55, 65, + 9, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 85, 85, 26, 85, 85, 85, 27, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -923,99 +935,106 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 15, 58, 58, 58, 58, 58, 96, 23, 23, - 23, 23, 27, 129, 107, 107, 35, 49, 107, 12, + 42, 42, 42, 15, 58, 58, 58, 58, 58, 96, + 23, 23, 23, 23, 107, 107, 129, 64, 107, 64, 107, 107, 107, 107, 107, 107, 107, 107, 107, 168, - 168, 35, 45, 168, 35, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 64, 15, 64, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 6, 12, 15, - 12, 143, 143, 16, 16, 16, 16, 14, 170, 15, - 15, 15, 83, 177, 16, 169, 169, 14, 14, 169, - 83, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 14, 14, 13, 14, 13, 14, 61, 22, 16, 148, - 148, 72, 72, 72, 72, 72, 14, 179, 148, 72, - 14, 72, 72, 72, 72, 72, 72, 72, 72, 72, - 16, 16, 72, 72, 72, 72, 9, 9, 9, 9, - 72, 46, 116, 46, 102, 72, 72, 72, 72, 116, - 103, 72, 72, 72, 63, 116, 116, 22, 149, 75, - 75, 150, 116, 116, 116, 116, 112, 14, 72, 174, - 174, 174, 72, 171, 171, 82, 9, 171, 9, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 14, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 19, - 154, 19, 154, 19, 115, 75, 48, 29, 154, 119, - 48, 48, 48, 117, 117, 48, 5, 5, 14, 48, - 48, 48, 48, 48, 48, 92, 92, 92, 19, 24, - 24, 24, 24, 19, 19, 19, 19, 167, 167, 19, - 19, 19, 5, 5, 5, 5, 5, 5, 181, 181, - 39, 25, 106, 106, 106, 106, 91, 106, 25, 25, - 25, 25, 25, 25, 181, 96, 96, 118, 118, 9, - 9, 25, 25, 25, 9, 22, 9, 23, 18, 9, - 9, 14, 23, 129, 23, 129, 28, 129, 84, 84, - 84, 9, 9, 9, 9, 176, 176, 9, 2, 2, - 9, 9, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 37, 129, 129, 129, 129, 79, 159, 128, - 81, 81, 109, 156, 131, 81, 9, 81, 98, 81, - 81, 81, 41, 81, 8, 8, 81, 8, 129, 95, - 81, 146, 88, -1, 20, 8, 8, -1, 8, 8, - 8, 88, 88, -1, -1, 88, 88, 88, 78, 78, - -1, -1, 78, 78, 78, 78, -1, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, -1, 129, - 23, 17, 17, 129, 129, 129, -1, -1, 17, -1, - -1, -1, -1, -1, 17, 180, 180, -1, 20, 20, - -1, -1, 17, -1, 17, 17, 20, -1, -1, -1, - 17, 180, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 17, -1, 20, 20, 20, -1, 180, -1, + 168, 49, 13, 168, 13, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 6, 75, 75, 15, 43, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 148, + 148, 15, 24, 24, 24, 24, 117, 117, 148, 180, + 180, 15, 15, 15, 15, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 180, 169, 169, 143, 143, + 169, 75, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 46, 180, 46, 22, 72, 72, 72, 72, 72, + 45, 12, 170, 72, 177, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 179, 14, 72, 72, 72, 72, + 9, 9, 9, 9, 72, 14, 14, 118, 118, 72, + 72, 72, 72, 167, 167, 72, 72, 72, 14, 14, + 12, 14, 12, 14, 22, 7, 102, 83, 7, 19, + 35, 19, 72, 19, 14, 83, 72, 7, 14, 61, + 9, 7, 9, 171, 171, 35, 103, 171, 35, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 19, 181, + 181, 176, 176, 19, 19, 19, 19, 5, 5, 19, + 19, 19, 154, 48, 154, 181, 63, 48, 48, 48, + 154, 149, 48, 2, 2, 14, 48, 48, 48, 48, + 48, 48, 25, 113, 5, 5, 5, 5, 5, 5, + 25, 25, 25, 25, 25, 25, 14, 174, 174, 174, + 112, 81, 81, 25, 25, 25, 81, 150, 81, 82, + 81, 81, 81, 115, 81, 29, 119, 81, 92, 92, + 92, 81, 96, 96, 9, 9, 39, 14, 91, 9, + 18, 9, 23, 22, 9, 9, 37, 23, 129, 23, + 129, 28, 129, 84, 84, 84, 9, 9, 9, 9, + 79, 159, 9, 109, 128, 9, 9, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 98, 129, 129, + 129, 129, 156, 17, 17, 41, 95, 131, -1, -1, + 17, 9, 146, -1, 24, -1, 17, -1, -1, 24, + 14, 24, -1, 129, 17, -1, 17, 17, 16, 16, + 16, 16, 17, 106, 106, 106, 106, 20, 106, 16, + 88, 88, 88, 88, 17, -1, 88, 88, 88, -1, + -1, -1, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 16, 129, 23, -1, 116, 129, 129, + 129, 78, 78, -1, 116, 78, 78, 78, 78, -1, + 116, 116, -1, -1, -1, 16, 16, 116, 116, 116, + 116, -1, 20, 20, 8, 8, -1, 8, -1, -1, + 20, -1, -1, -1, -1, -1, -1, 8, 8, -1, + 8, -1, -1, -1, -1, -1, -1, -1, 20, 20, + 20, -1, -1, -1, -1, -1, -1, 5, 5, -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, 5, 5, -1, -1, -1, -1, -1, - -1, -1, -1, 106, 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 24, -1, - -1, -1, -1, 24, -1, 24 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 106, 106 ); protected $gotoBase = array( - 0, 0, -255, 0, 0, 365, 197, 16, 477, -11, - 0, 0, -115, -81, -68, -182, -223, 72, 121, 82, - 106, 0, -19, 165, 376, 397, 17, 168, 103, 63, - 0, 0, 0, 0, 0, -190, 0, 127, 0, 80, - 0, 47, -1, 0, 0, 173, -436, 0, -346, 160, - 0, 0, 0, 0, 0, -33, 0, 0, 118, 0, - 0, 215, 0, 65, 191, -234, 0, 0, 0, 0, - 0, 0, -6, 0, 0, -31, 0, 0, 105, 128, - 99, -15, 49, -231, -35, -690, 0, 0, 222, 0, - 0, 81, 73, 0, 0, 52, -310, 0, 76, 0, - 0, 0, 260, 258, 0, 0, 375, -64, 0, 107, - 0, 0, 41, 0, 0, 75, 24, 86, 136, 71, - 0, 0, 0, 0, 0, 0, 1, 0, 100, 166, - 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -51, 0, 0, 53, 0, 226, 66, - 40, 0, 0, 0, -139, 0, 39, 0, 0, 104, - 0, 0, 0, 0, 0, 0, 0, 69, -49, -3, - 200, 85, 0, 0, 21, 0, 78, 204, 0, 237, - 240, 93, 0, 0 + 0, 0, -339, 0, 0, 356, 184, 308, 556, -10, + 0, 0, -26, -144, -13, -183, 48, 10, 120, 49, + 116, 0, -15, 167, 219, 378, 18, 22, 105, 118, + 0, 0, 0, 0, 0, -49, 0, 98, 0, 103, + 0, 36, -1, 189, 0, 247, -475, 0, -348, 173, + 0, 0, 0, 0, 0, -33, 0, 0, 119, 0, + 0, 287, 0, 124, 163, -236, 0, 0, 0, 0, + 0, 0, -5, 0, 0, -138, 0, 0, 135, 108, + 101, -88, 130, -150, -34, -698, 0, 0, 230, 0, + 0, 100, 113, 0, 0, 35, -312, 0, 62, 0, + 0, 0, 281, 293, 0, 0, 475, -67, 0, 85, + 0, 0, 122, 110, 0, 131, 266, -54, 13, 125, + 0, 0, 0, 0, 0, 0, 1, 0, 82, 168, + 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -27, 0, 0, 40, 0, 185, 126, + 133, 0, 0, 0, -131, 0, 34, 0, 0, 84, + 0, 0, 0, 0, 0, 0, 0, -18, -52, 5, + 243, 92, 0, 0, 96, 0, -19, 244, 0, 253, + -79, 41, 0, 0 ); protected $gotoDefault = array( - -32768, 506, 731, 4, 732, 924, 807, 816, 593, 524, - 698, 343, 621, 416, 1291, 901, 1110, 574, 835, 1234, - 1242, 451, 838, 326, 721, 883, 884, 885, 395, 381, - 387, 393, 645, 622, 488, 870, 447, 862, 480, 865, - 446, 874, 162, 413, 504, 878, 3, 880, 552, 911, - 382, 888, 383, 673, 890, 558, 892, 893, 390, 396, - 397, 1115, 566, 618, 905, 253, 560, 906, 380, 907, - 914, 385, 388, 684, 459, 499, 493, 406, 1090, 561, - 604, 642, 441, 467, 616, 628, 614, 474, 1026, 411, - 325, 946, 954, 481, 457, 968, 345, 976, 729, 1123, - 636, 483, 984, 637, 991, 994, 525, 526, 472, 1006, - 268, 1009, 484, 1047, 663, 1020, 1021, 664, 638, 1043, - 639, 665, 640, 1045, 466, 594, 1053, 448, 1061, 1279, - 449, 1065, 262, 1068, 275, 412, 429, 1073, 1074, 8, - 1080, 690, 691, 10, 273, 503, 1105, 685, 445, 1122, - 433, 1192, 1194, 554, 485, 1212, 1211, 676, 500, 1217, - 442, 1282, 443, 527, 468, 313, 528, 305, 329, 310, - 543, 292, 330, 529, 469, 1288, 1296, 327, 30, 1316, - 1327, 338, 571, 609 + -32768, 510, 740, 4, 741, 934, 816, 825, 597, 528, + 707, 346, 625, 420, 1302, 911, 1121, 578, 844, 1245, + 1253, 455, 847, 329, 730, 893, 894, 895, 398, 384, + 390, 396, 649, 626, 492, 879, 451, 871, 484, 874, + 450, 883, 164, 416, 508, 887, 3, 890, 556, 921, + 385, 898, 386, 677, 900, 562, 902, 903, 393, 399, + 400, 1126, 570, 622, 915, 256, 564, 916, 383, 917, + 924, 388, 391, 688, 463, 503, 497, 409, 1101, 565, + 608, 646, 445, 471, 620, 632, 618, 478, 432, 414, + 328, 956, 964, 485, 461, 978, 348, 986, 738, 1134, + 640, 487, 994, 641, 1001, 1004, 529, 530, 476, 1016, + 271, 1019, 488, 19, 667, 1030, 1031, 668, 642, 1053, + 643, 669, 644, 1055, 470, 598, 1063, 452, 1071, 1290, + 453, 1075, 265, 1078, 278, 415, 433, 1084, 1085, 9, + 1091, 698, 699, 11, 276, 507, 1116, 689, 449, 1133, + 437, 1203, 1205, 558, 489, 1223, 1222, 680, 504, 1228, + 446, 1293, 447, 531, 472, 316, 532, 308, 332, 313, + 547, 295, 333, 533, 473, 1299, 1307, 330, 31, 1327, + 1338, 341, 575, 613 ); protected $ruleToNonTerminal = array( @@ -1034,30 +1053,30 @@ class Php8 extends \PhpParser\ParserAbstract 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, - 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, + 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 25, 25, 68, 68, 71, 71, 70, 69, 69, - 62, 74, 74, 75, 75, 76, 76, 77, 77, 78, - 78, 79, 79, 26, 26, 27, 27, 27, 27, 27, - 87, 87, 89, 89, 82, 82, 90, 90, 91, 91, - 91, 83, 83, 86, 86, 84, 84, 92, 93, 93, - 56, 56, 64, 64, 67, 67, 67, 66, 94, 94, - 95, 57, 57, 57, 57, 96, 96, 97, 97, 98, - 98, 99, 100, 100, 101, 101, 102, 102, 54, 54, - 50, 50, 104, 52, 52, 105, 51, 51, 53, 53, - 63, 63, 63, 63, 80, 80, 108, 108, 110, 110, - 111, 111, 111, 111, 109, 109, 109, 113, 113, 113, - 113, 88, 88, 116, 116, 116, 117, 117, 114, 114, - 118, 118, 120, 120, 121, 121, 115, 122, 122, 119, - 123, 123, 123, 123, 112, 112, 81, 81, 81, 20, - 20, 20, 125, 124, 124, 126, 126, 126, 126, 59, - 127, 127, 128, 60, 130, 130, 131, 131, 132, 132, - 85, 133, 133, 133, 133, 133, 133, 138, 138, 139, - 139, 140, 140, 140, 140, 140, 141, 142, 142, 137, - 137, 134, 134, 136, 136, 144, 144, 143, 143, 143, - 143, 143, 143, 143, 135, 145, 145, 147, 146, 146, - 61, 103, 148, 148, 55, 55, 42, 42, 42, 42, + 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, + 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, + 78, 78, 79, 79, 26, 26, 27, 27, 27, 27, + 27, 87, 87, 89, 89, 82, 82, 90, 90, 91, + 91, 91, 83, 83, 86, 86, 84, 84, 92, 93, + 93, 56, 56, 64, 64, 67, 67, 67, 66, 94, + 94, 95, 57, 57, 57, 57, 96, 96, 97, 97, + 98, 98, 99, 100, 100, 101, 101, 102, 102, 54, + 54, 50, 50, 104, 52, 52, 105, 51, 51, 53, + 53, 63, 63, 63, 63, 80, 80, 108, 108, 110, + 110, 111, 111, 111, 111, 109, 109, 109, 113, 113, + 113, 113, 88, 88, 116, 116, 116, 117, 117, 114, + 114, 118, 118, 120, 120, 121, 121, 115, 122, 122, + 119, 123, 123, 123, 123, 112, 112, 81, 81, 81, + 20, 20, 20, 125, 124, 124, 126, 126, 126, 126, + 59, 127, 127, 128, 60, 130, 130, 131, 131, 132, + 132, 85, 133, 133, 133, 133, 133, 133, 133, 138, + 138, 139, 139, 140, 140, 140, 140, 140, 141, 142, + 142, 137, 137, 134, 134, 136, 136, 144, 144, 143, + 143, 143, 143, 143, 143, 143, 135, 145, 145, 147, + 146, 146, 61, 103, 148, 148, 55, 55, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1067,20 +1086,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 155, 149, 149, 154, 154, 157, 158, 158, 159, 160, - 161, 161, 161, 161, 19, 19, 72, 72, 72, 72, - 150, 150, 150, 150, 163, 163, 151, 151, 153, 153, - 153, 156, 156, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 169, 169, 169, 107, 171, 171, 171, 171, - 152, 152, 152, 152, 152, 152, 152, 152, 58, 58, - 166, 166, 166, 166, 172, 172, 162, 162, 162, 173, - 173, 173, 173, 173, 173, 73, 73, 65, 65, 65, - 65, 129, 129, 129, 129, 176, 175, 165, 165, 165, - 165, 165, 165, 165, 164, 164, 164, 174, 174, 174, - 174, 106, 170, 178, 178, 177, 177, 179, 179, 179, - 179, 179, 179, 179, 179, 167, 167, 167, 167, 181, - 182, 180, 180, 180, 180, 180, 180, 180, 180, 183, - 183, 183, 183 + 42, 42, 155, 149, 149, 154, 154, 157, 158, 158, + 159, 160, 161, 161, 161, 161, 19, 19, 72, 72, + 72, 72, 150, 150, 150, 150, 163, 163, 151, 151, + 153, 153, 153, 156, 156, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 169, 169, 169, 107, 171, 171, + 171, 171, 152, 152, 152, 152, 152, 152, 152, 152, + 58, 58, 166, 166, 166, 166, 172, 172, 162, 162, + 162, 173, 173, 173, 173, 173, 173, 73, 73, 65, + 65, 65, 65, 129, 129, 129, 129, 176, 175, 165, + 165, 165, 165, 165, 165, 165, 164, 164, 164, 174, + 174, 174, 174, 106, 170, 178, 178, 177, 177, 179, + 179, 179, 179, 179, 179, 179, 179, 167, 167, 167, + 167, 181, 182, 180, 180, 180, 180, 180, 180, 180, + 180, 183, 183, 183, 183 ); protected $ruleToLength = array( @@ -1099,53 +1118,53 @@ class Php8 extends \PhpParser\ParserAbstract 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, 2, 3, 1, 3, 2, 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, 6, 5, 6, 3, 2, - 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, - 2, 1, 3, 0, 1, 0, 1, 0, 1, 3, - 1, 1, 1, 8, 9, 7, 8, 7, 6, 8, - 0, 2, 0, 2, 1, 2, 1, 2, 1, 1, - 1, 0, 2, 0, 2, 0, 2, 2, 1, 3, - 1, 4, 1, 4, 1, 1, 4, 2, 1, 3, - 3, 3, 4, 4, 5, 0, 2, 4, 3, 1, - 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, - 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, - 1, 2, 1, 1, 2, 0, 1, 3, 0, 2, - 1, 1, 1, 1, 6, 8, 6, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, - 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, - 1, 2, 1, 1, 0, 1, 0, 2, 2, 2, - 4, 3, 1, 1, 3, 1, 2, 2, 3, 2, - 3, 1, 1, 2, 3, 1, 1, 3, 2, 0, - 1, 5, 5, 10, 3, 5, 1, 1, 3, 0, - 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, - 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, - 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, - 4, 4, 1, 1, 2, 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, 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, 6, 5, 6, 3, + 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, + 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, + 3, 1, 1, 1, 8, 9, 7, 8, 7, 6, + 8, 0, 2, 0, 2, 1, 2, 1, 2, 1, + 1, 1, 0, 2, 0, 2, 0, 2, 2, 1, + 3, 1, 4, 1, 4, 1, 1, 4, 2, 1, + 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, + 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, + 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, + 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, + 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, + 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, + 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, + 2, 4, 3, 1, 1, 3, 1, 2, 2, 3, + 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, + 0, 1, 5, 5, 6, 10, 3, 5, 1, 1, + 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, + 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, + 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, + 3, 3, 4, 4, 1, 1, 2, 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, 2, 8, 9, 8, 9, 9, 10, 9, 10, - 8, 3, 2, 0, 4, 2, 1, 3, 2, 1, - 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 5, 3, 3, 4, 1, 1, 3, - 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, - 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, - 4, 4, 1, 4, 4, 0, 1, 1, 1, 3, - 3, 1, 4, 2, 2, 1, 3, 1, 4, 4, - 3, 3, 3, 3, 1, 3, 1, 1, 3, 1, - 1, 4, 1, 1, 1, 3, 1, 1, 2, 1, - 3, 4, 3, 2, 0, 2, 2, 1, 2, 1, - 1, 1, 4, 3, 3, 3, 3, 6, 3, 1, - 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, 10, + 9, 10, 8, 3, 2, 0, 4, 2, 1, 3, + 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 1, 0, 3, + 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 5, 3, 3, 4, 1, + 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, + 0, 1, 1, 3, 1, 1, 1, 1, 1, 3, + 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, + 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, + 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, + 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, + 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, + 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, + 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1605,20 +1624,20 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 149 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributeStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 150 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributeStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 151 => function ($stackPos) { - $this->semValue = array(); + if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; }, 152 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 153 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 154 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -1627,9 +1646,12 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 156 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 157 => function ($stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 158 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; @@ -1639,46 +1661,46 @@ protected function initReduceCallbacks(): void { } }, - 158 => function ($stackPos) { + 159 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 159 => function ($stackPos) { + 160 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 160 => function ($stackPos) { + 161 => function ($stackPos) { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 161 => function ($stackPos) { + 162 => function ($stackPos) { $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 162 => function ($stackPos) { + 163 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 163 => function ($stackPos) { + 164 => function ($stackPos) { $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 164 => function ($stackPos) { + 165 => function ($stackPos) { $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 165 => function ($stackPos) { + 166 => function ($stackPos) { $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 166 => function ($stackPos) { + 167 => function ($stackPos) { $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 167 => function ($stackPos) { + 168 => function ($stackPos) { $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 168 => function ($stackPos) { + 169 => function ($stackPos) { $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 169 => function ($stackPos) { + 170 => function ($stackPos) { $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 170 => function ($stackPos) { + 171 => function ($stackPos) { $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 171 => function ($stackPos) { + 172 => function ($stackPos) { $e = $this->semStack[$stackPos-(2-1)]; if ($e instanceof Expr\Throw_) { @@ -1690,1145 +1712,1143 @@ protected function initReduceCallbacks(): void { } }, - 172 => function ($stackPos) { + 173 => function ($stackPos) { $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 173 => function ($stackPos) { + 174 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, - 174 => function ($stackPos) { + 175 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 175 => function ($stackPos) { + 176 => function ($stackPos) { $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 176 => function ($stackPos) { + 177 => function ($stackPos) { $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 177 => function ($stackPos) { + 178 => function ($stackPos) { $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); }, - 178 => function ($stackPos) { + 179 => function ($stackPos) { $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 179 => function ($stackPos) { + 180 => function ($stackPos) { $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 180 => function ($stackPos) { + 181 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, - 181 => function ($stackPos) { + 182 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 182 => function ($stackPos) { + 183 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, - 183 => function ($stackPos) { + 184 => function ($stackPos) { $this->semValue = array(); }, - 184 => function ($stackPos) { + 185 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 185 => function ($stackPos) { + 186 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 186 => function ($stackPos) { + 187 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 187 => function ($stackPos) { + 188 => function ($stackPos) { $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 188 => function ($stackPos) { + 189 => function ($stackPos) { $this->semValue = null; }, - 189 => function ($stackPos) { + 190 => function ($stackPos) { $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 190 => function ($stackPos) { + 191 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 191 => function ($stackPos) { + 192 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 192 => function ($stackPos) { + 193 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 193 => function ($stackPos) { + 194 => function ($stackPos) { $this->semValue = false; }, - 194 => function ($stackPos) { + 195 => function ($stackPos) { $this->semValue = true; }, - 195 => function ($stackPos) { + 196 => function ($stackPos) { $this->semValue = false; }, - 196 => function ($stackPos) { + 197 => function ($stackPos) { $this->semValue = true; }, - 197 => function ($stackPos) { + 198 => function ($stackPos) { $this->semValue = false; }, - 198 => function ($stackPos) { + 199 => function ($stackPos) { $this->semValue = true; }, - 199 => function ($stackPos) { + 200 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 200 => function ($stackPos) { + 201 => function ($stackPos) { $this->semValue = []; }, - 201 => function ($stackPos) { + 202 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 202 => function ($stackPos) { + 203 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 203 => function ($stackPos) { + 204 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 204 => function ($stackPos) { + 205 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 205 => function ($stackPos) { + 206 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(7-2)); }, - 206 => function ($stackPos) { + 207 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); $this->checkClass($this->semValue, $stackPos-(8-3)); }, - 207 => function ($stackPos) { + 208 => function ($stackPos) { $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); $this->checkInterface($this->semValue, $stackPos-(7-3)); }, - 208 => function ($stackPos) { + 209 => function ($stackPos) { $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 209 => function ($stackPos) { + 210 => function ($stackPos) { $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); $this->checkEnum($this->semValue, $stackPos-(8-3)); }, - 210 => function ($stackPos) { - $this->semValue = null; - }, 211 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 212 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 214 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 215 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = 0; }, 216 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 217 => function ($stackPos) { - $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 218 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 219 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + $this->semValue = Modifiers::ABSTRACT; }, 220 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->semValue = Modifiers::FINAL; }, 221 => function ($stackPos) { - $this->semValue = null; + $this->semValue = Modifiers::READONLY; }, 222 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 223 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 224 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 225 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 226 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = array(); }, 227 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 228 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 229 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 230 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 231 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 232 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 233 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 234 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 235 => function ($stackPos) { - $this->semValue = null; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 236 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = null; }, 237 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 238 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 239 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 240 => function ($stackPos) { - $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 241 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 242 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 243 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 244 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 245 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(5-3)]; }, 246 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 247 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 248 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 249 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 250 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 251 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos]; }, 252 => function ($stackPos) { - $this->semValue = []; + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 253 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = []; }, 254 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 255 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 256 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 257 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 258 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 259 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); }, 260 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 261 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 262 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 263 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 264 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 265 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 266 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 267 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = null; }, 268 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 269 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = null; }, 270 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); }, 271 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 272 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 273 => function ($stackPos) { - $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 274 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, 275 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 276 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = array(); }, 277 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 278 => function ($stackPos) { - $this->semValue = 0; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 279 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = 0; }, 280 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 281 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + $this->semValue = Modifiers::PUBLIC; }, 282 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + $this->semValue = Modifiers::PROTECTED; }, 283 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->semValue = Modifiers::PRIVATE; }, 284 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); + $this->semValue = Modifiers::READONLY; }, 285 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, 286 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->checkParam($this->semValue); }, 287 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, 288 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 289 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 290 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 291 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 292 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 293 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 294 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 295 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 296 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 297 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 298 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 299 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 300 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 301 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 302 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 303 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 304 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 305 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 306 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 307 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 308 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 309 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 310 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 311 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 312 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 313 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 314 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 315 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 316 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 317 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + $this->semValue = null; }, 318 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 319 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 320 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = array(); }, 321 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 322 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, 323 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 325 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 326 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 327 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 328 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 329 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, 330 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 331 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 332 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 333 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 334 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 335 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 336 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 337 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 338 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 339 => function ($stackPos) { - $this->semValue = array(); + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, 340 => function ($stackPos) { + $this->semValue = array(); + }, + 341 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 341 => function ($stackPos) { + 342 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 342 => function ($stackPos) { + 343 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 343 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); - }, 344 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); + $this->checkClassConst($this->semValue, $stackPos-(6-2)); }, 345 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, 346 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 347 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 348 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = null; /* will be skipped */ }, 349 => function ($stackPos) { $this->semValue = array(); }, 350 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 351 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = array(); }, 352 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 353 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 354 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 355 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 356 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 357 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 358 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 359 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 360 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 361 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 362 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 363 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 364 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 365 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 366 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 367 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 368 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 369 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + $this->semValue = Modifiers::PUBLIC; }, 370 => function ($stackPos) { - $this->semValue = Modifiers::STATIC; + $this->semValue = Modifiers::PROTECTED; }, 371 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + $this->semValue = Modifiers::PRIVATE; }, 372 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + $this->semValue = Modifiers::STATIC; }, 373 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + $this->semValue = Modifiers::ABSTRACT; }, 374 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Modifiers::FINAL; }, 375 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = Modifiers::READONLY; }, 376 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 377 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 378 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 379 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 380 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 381 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 382 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 383 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 384 => function ($stackPos) { - $this->semValue = array(); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 385 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 386 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 387 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 388 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 389 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 390 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 391 => function ($stackPos) { + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 392 => function ($stackPos) { + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, + 393 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); if (!$this->phpVersion->allowsAssignNewByReference()) { $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); } }, - 392 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 393 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 394 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 395 => function ($stackPos) { + 397 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { + 398 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 397 => function ($stackPos) { + 399 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 398 => function ($stackPos) { + 400 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 399 => function ($stackPos) { + 401 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 400 => function ($stackPos) { + 402 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 401 => function ($stackPos) { + 403 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 402 => function ($stackPos) { + 404 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 403 => function ($stackPos) { + 405 => function ($stackPos) { $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 404 => function ($stackPos) { + 406 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 405 => function ($stackPos) { + 407 => function ($stackPos) { $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 406 => function ($stackPos) { + 408 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 407 => function ($stackPos) { + 409 => function ($stackPos) { $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 408 => function ($stackPos) { + 410 => function ($stackPos) { $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 409 => function ($stackPos) { + 411 => function ($stackPos) { $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 410 => function ($stackPos) { + 412 => function ($stackPos) { $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 411 => function ($stackPos) { + 413 => function ($stackPos) { $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 412 => function ($stackPos) { + 414 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 413 => function ($stackPos) { + 415 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 414 => function ($stackPos) { + 416 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 415 => function ($stackPos) { + 417 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 416 => function ($stackPos) { + 418 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 417 => function ($stackPos) { + 419 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 418 => function ($stackPos) { + 420 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 419 => function ($stackPos) { + 421 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 420 => function ($stackPos) { + 422 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 421 => function ($stackPos) { + 423 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 422 => function ($stackPos) { + 424 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 423 => function ($stackPos) { + 425 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 424 => function ($stackPos) { + 426 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 425 => function ($stackPos) { + 427 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 426 => function ($stackPos) { + 428 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 427 => function ($stackPos) { + 429 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 428 => function ($stackPos) { + 430 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 429 => function ($stackPos) { + 431 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 430 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 431 => function ($stackPos) { + 433 => function ($stackPos) { $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 432 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 433 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 441 => function ($stackPos) { + 443 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { + 444 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 443 => function ($stackPos) { + 445 => function ($stackPos) { $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 444 => function ($stackPos) { + 446 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 445 => function ($stackPos) { + 447 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 446 => function ($stackPos) { + 448 => function ($stackPos) { $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 447 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 448 => function ($stackPos) { + 450 => function ($stackPos) { $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 449 => function ($stackPos) { + 451 => function ($stackPos) { $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 450 => function ($stackPos) { + 452 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 451 => function ($stackPos) { + 453 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 452 => function ($stackPos) { + 454 => function ($stackPos) { $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 453 => function ($stackPos) { + 455 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 454 => function ($stackPos) { + 456 => function ($stackPos) { $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 455 => function ($stackPos) { + 457 => function ($stackPos) { $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 456 => function ($stackPos) { + 458 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 457 => function ($stackPos) { + 459 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 458 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 459 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 460 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 461 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 462 => function ($stackPos) { + 464 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 463 => function ($stackPos) { + 465 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 464 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 465 => function ($stackPos) { + 467 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 466 => function ($stackPos) { + 468 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 467 => function ($stackPos) { + 469 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 468 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 469 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 470 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 471 => function ($stackPos) { + 473 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 472 => function ($stackPos) { + 474 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 473 => function ($stackPos) { + 475 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 474 => function ($stackPos) { + 476 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 475 => function ($stackPos) { + 477 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 476 => function ($stackPos) { + 478 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 477 => function ($stackPos) { + 479 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 478 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 479 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, - 480 => function ($stackPos) { + 482 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 481 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 482 => function ($stackPos) { + 484 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 483 => function ($stackPos) { + 485 => function ($stackPos) { $this->semValue = array(); }, - 484 => function ($stackPos) { + 486 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 485 => function ($stackPos) { + 487 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 486 => function ($stackPos) { + 488 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 487 => function ($stackPos) { + 489 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 488 => function ($stackPos) { + 490 => function ($stackPos) { $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 489 => function ($stackPos) { + 491 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 490 => function ($stackPos) { + 492 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 491 => function ($stackPos) { + 493 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 492 => function ($stackPos) { + 494 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 493 => function ($stackPos) { + 495 => function ($stackPos) { $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 494 => function ($stackPos) { + 496 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 495 => function ($stackPos) { + 497 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 496 => function ($stackPos) { + 498 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 497 => function ($stackPos) { + 499 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 498 => function ($stackPos) { + 500 => function ($stackPos) { $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 499 => function ($stackPos) { + 501 => function ($stackPos) { $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 500 => function ($stackPos) { + 502 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 501 => function ($stackPos) { + 503 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 502 => function ($stackPos) { + 504 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 503 => function ($stackPos) { + 505 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, - 504 => function ($stackPos) { + 506 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 505 => function ($stackPos) { + 507 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 506 => function ($stackPos) { + 508 => function ($stackPos) { $this->semValue = null; }, - 507 => function ($stackPos) { + 509 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 508 => function ($stackPos) { + 510 => function ($stackPos) { $this->semValue = array(); }, - 509 => function ($stackPos) { + 511 => function ($stackPos) { $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 510 => function ($stackPos) { + 512 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 511 => function ($stackPos) { + 513 => function ($stackPos) { $this->semValue = array(); }, - 512 => function ($stackPos) { + 514 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 513 => function ($stackPos) { + 515 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 514 => function ($stackPos) { + 516 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 515 => function ($stackPos) { + 517 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 516 => function ($stackPos) { + 518 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 517 => function ($stackPos) { + 519 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 518 => function ($stackPos) { + 520 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 519 => function ($stackPos) { + 521 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 520 => function ($stackPos) { + 522 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 521 => function ($stackPos) { + 523 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 522 => function ($stackPos) { + 524 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 523 => function ($stackPos) { + 525 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, - 524 => function ($stackPos) { + 526 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; }, - 525 => function ($stackPos) { + 527 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 526 => function ($stackPos) { + 528 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); $this->createdArrays->attach($this->semValue); }, - 527 => function ($stackPos) { + 529 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, - 528 => function ($stackPos) { + 530 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 529 => function ($stackPos) { + 531 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, - 530 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); - }, - 531 => function ($stackPos) { - $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, 532 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); }, 533 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 534 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 535 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 536 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 537 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 538 => function ($stackPos) { - $this->semValue = null; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); }, 539 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 540 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 542 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 543 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 544 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2840,205 +2860,211 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 548 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 549 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 550 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 551 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 552 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 553 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 554 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 555 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 556 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 557 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 558 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 559 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 560 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 561 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 562 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 563 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 564 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 565 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 566 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 567 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 568 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 569 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 570 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 571 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 572 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 573 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 574 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 575 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 576 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 577 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 579 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 580 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 581 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); - $this->postprocessList($this->semValue); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 582 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 583 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $this->postprocessList($this->semValue); }, 584 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, 585 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = $this->semStack[$stackPos]; }, 586 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 587 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 588 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 589 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 590 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 591 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 592 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 593 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 594 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 595 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); + }, + 596 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 595 => function ($stackPos) { + 597 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 596 => function ($stackPos) { + 598 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 597 => function ($stackPos) { + 599 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 598 => function ($stackPos) { + 600 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, - 599 => function ($stackPos) { + 601 => function ($stackPos) { $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 600 => function ($stackPos) { + 602 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 601 => function ($stackPos) { + 603 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 602 => function ($stackPos) { + 604 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 603 => function ($stackPos) { + 605 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 604 => function ($stackPos) { + 606 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 605 => function ($stackPos) { + 607 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 606 => function ($stackPos) { + 608 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 607 => function ($stackPos) { + 609 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 608 => function ($stackPos) { + 610 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 609 => function ($stackPos) { + 611 => function ($stackPos) { $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 610 => function ($stackPos) { + 612 => function ($stackPos) { $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 611 => function ($stackPos) { + 613 => function ($stackPos) { $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 612 => function ($stackPos) { + 614 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index d596494395..230d6a7d35 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -842,7 +842,9 @@ protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string { protected function pStmt_ClassConst(Stmt\ClassConst $node): string { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) - . 'const ' . $this->pCommaSeparated($node->consts) . ';'; + . 'const ' + . (null !== $node->type ? $this->p($node->type) . ' ' : '') + . $this->pCommaSeparated($node->consts) . ';'; } protected function pStmt_Function(Stmt\Function_ $node): string { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index eda5f304b8..a02dc39921 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1391,6 +1391,7 @@ protected function initializeRemovalMap(): void { 'Param->default' => $stripEquals, 'Stmt_Break->num' => $stripBoth, 'Stmt_Catch->var' => $stripLeft, + 'Stmt_ClassConst->type' => $stripRight, 'Stmt_ClassMethod->returnType' => $stripColon, 'Stmt_Class->extends' => ['left' => \T_EXTENDS], 'Stmt_Enum->scalarType' => $stripColon, @@ -1434,6 +1435,7 @@ protected function initializeInsertionMap(): void { 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], 'Stmt_Catch->var' => [null, false, ' ', null], 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], + 'Stmt_ClassConst->type' => [\T_CONST, false, ' ', null], 'Stmt_Class->extends' => [null, false, ' extends ', null], 'Stmt_Enum->scalarType' => [null, false, ' : ', null], 'Stmt_EnumCase->expr' => [null, false, ' = ', null], diff --git a/test/PhpParser/Builder/ClassConstTest.php b/test/PhpParser/Builder/ClassConstTest.php index 715a5bb63d..4a71e0fdd5 100644 --- a/test/PhpParser/Builder/ClassConstTest.php +++ b/test/PhpParser/Builder/ClassConstTest.php @@ -142,6 +142,18 @@ public function testAddAttribute() { ); } + public function testType() { + $node = $this->createClassConstBuilder('TYPE', 1) + ->setType('int') + ->getNode(); + $this->assertEquals( + new Stmt\ClassConst( + [new Const_('TYPE', new Int_(1))], + 0, [], [], new Identifier('int')), + $node + ); + } + /** * @dataProvider provideTestDefaultValues */ diff --git a/test/code/formatPreservation/insertionOfNullable.test b/test/code/formatPreservation/insertionOfNullable.test index 9822eedea6..9278d3eca2 100644 --- a/test/code/formatPreservation/insertionOfNullable.test +++ b/test/code/formatPreservation/insertionOfNullable.test @@ -49,6 +49,10 @@ X private $x ; + + const + X + = 1; } foreach ( @@ -86,6 +90,7 @@ $stmts[9]->expr = new Expr\Variable('x'); $stmts[10]->extends = new Node\Name\FullyQualified('Bar'); $stmts[10]->stmts[0]->returnType = new Node\Name('Y'); $stmts[10]->stmts[1]->props[0]->default = new Scalar\DNumber(42.0); +$stmts[10]->stmts[2]->type = new Node\Identifier('int'); $stmts[11]->keyVar = new Expr\Variable('z'); $stmts[12]->vars[0]->default = new Scalar\String_('abc'); $stmts[13]->finally = new Stmt\Finally_([]); @@ -140,6 +145,10 @@ X extends \Bar private $x = 42.0 ; + + const int + X + = 1; } foreach ( diff --git a/test/code/formatPreservation/removalViaNull.test b/test/code/formatPreservation/removalViaNull.test index 4cc43b2a15..a3679289db 100644 --- a/test/code/formatPreservation/removalViaNull.test +++ b/test/code/formatPreservation/removalViaNull.test @@ -35,6 +35,11 @@ Bar y ; } + + const + int + X + = 1; } $foo [ $bar ]; @@ -97,6 +102,7 @@ $stmts[2]->extends = null; $stmts[2]->stmts[0]->returnType = null; $stmts[2]->stmts[1]->props[0]->default = null; $stmts[2]->stmts[2]->adaptations[0]->newName = null; +$stmts[2]->stmts[3]->type = null; $stmts[3]->expr->dim = null; $stmts[4]->expr->expr = null; $stmts[5]->expr->if = null; @@ -141,6 +147,10 @@ Foo public ; } + + const + X + = 1; } $foo []; diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index e26bdd127c..651c09e582 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -739,6 +739,7 @@ array( attrGroups: array( ) flags: 0 + type: null consts: array( 0: Const( name: Identifier( @@ -1495,6 +1496,7 @@ array( attrGroups: array( ) flags: 0 + type: null consts: array( 0: Const( name: Identifier( diff --git a/test/code/parser/semiReserved.test b/test/code/parser/semiReserved.test index 1d3594a4a6..1b17461584 100644 --- a/test/code/parser/semiReserved.test +++ b/test/code/parser/semiReserved.test @@ -152,6 +152,7 @@ array( attrGroups: array( ) flags: 0 + type: null consts: array( 0: Const( name: Identifier( @@ -175,6 +176,7 @@ array( attrGroups: array( ) flags: 0 + type: null consts: array( 0: Const( name: Identifier( diff --git a/test/code/parser/stmt/class/anonymous.test b/test/code/parser/stmt/class/anonymous.test index 89fe3f360b..4f653294a6 100644 --- a/test/code/parser/stmt/class/anonymous.test +++ b/test/code/parser/stmt/class/anonymous.test @@ -205,6 +205,7 @@ array( attrGroups: array( ) flags: 0 + type: null consts: array( 0: Const( name: Identifier( diff --git a/test/code/parser/stmt/class/constModifierErrors.test b/test/code/parser/stmt/class/constModifierErrors.test index 178f4a764b..5cde50d426 100644 --- a/test/code/parser/stmt/class/constModifierErrors.test +++ b/test/code/parser/stmt/class/constModifierErrors.test @@ -22,6 +22,7 @@ array( attrGroups: array( ) flags: STATIC (8) + type: null consts: array( 0: Const( name: Identifier( @@ -59,6 +60,7 @@ array( attrGroups: array( ) flags: ABSTRACT (16) + type: null consts: array( 0: Const( name: Identifier( @@ -96,6 +98,7 @@ array( attrGroups: array( ) flags: READONLY (64) + type: null consts: array( 0: Const( name: Identifier( @@ -133,6 +136,7 @@ array( attrGroups: array( ) flags: PUBLIC (1) + type: null consts: array( 0: Const( name: Identifier( diff --git a/test/code/parser/stmt/class/constModifiers.test b/test/code/parser/stmt/class/constModifiers.test index 90e43be4ad..1a448b9c63 100644 --- a/test/code/parser/stmt/class/constModifiers.test +++ b/test/code/parser/stmt/class/constModifiers.test @@ -26,6 +26,7 @@ array( attrGroups: array( ) flags: 0 + type: null consts: array( 0: Const( name: Identifier( @@ -41,6 +42,7 @@ array( attrGroups: array( ) flags: PUBLIC (1) + type: null consts: array( 0: Const( name: Identifier( @@ -56,6 +58,7 @@ array( attrGroups: array( ) flags: PROTECTED (2) + type: null consts: array( 0: Const( name: Identifier( @@ -71,6 +74,7 @@ array( attrGroups: array( ) flags: PRIVATE (4) + type: null consts: array( 0: Const( name: Identifier( @@ -86,6 +90,7 @@ array( attrGroups: array( ) flags: FINAL (32) + type: null consts: array( 0: Const( name: Identifier( diff --git a/test/code/parser/stmt/class/simple.test b/test/code/parser/stmt/class/simple.test index fde02c33e1..a4c0e61db2 100644 --- a/test/code/parser/stmt/class/simple.test +++ b/test/code/parser/stmt/class/simple.test @@ -46,6 +46,7 @@ array( attrGroups: array( ) flags: 0 + type: null consts: array( 0: Const( name: Identifier( diff --git a/test/code/parser/stmt/class/typedConstants.test b/test/code/parser/stmt/class/typedConstants.test new file mode 100644 index 0000000000..1b0e250dee --- /dev/null +++ b/test/code/parser/stmt/class/typedConstants.test @@ -0,0 +1,124 @@ +Typed constants +----- + Date: Sat, 20 May 2023 21:17:44 +0200 Subject: [PATCH 245/428] Support readonly anonymous classes --- grammar/php.y | 4 +- .../Internal/PrintableNewAnonClassNode.php | 9 +- lib/PhpParser/Parser/Php7.php | 900 +++++++++-------- lib/PhpParser/Parser/Php8.php | 914 +++++++++--------- lib/PhpParser/PrettyPrinterAbstract.php | 1 + test/PhpParser/PrettyPrinterTest.php | 1 + .../formatPreservation/modifierChange.test | 11 + .../parser/stmt/class/readonlyAnonyous.test | 25 + .../prettyPrinter/expr/anonymousClass.test | 4 + 9 files changed, 948 insertions(+), 921 deletions(-) create mode 100644 test/code/parser/stmt/class/readonlyAnonyous.test diff --git a/grammar/php.y b/grammar/php.y index d354070115..e5d6914bc3 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1076,8 +1076,8 @@ expr: ; anonymous_class: - optional_attributes T_CLASS ctor_arguments extends_from implements_list '{' class_statement_list '}' - { $$ = array(Stmt\Class_[null, ['type' => 0, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]], $3); + optional_attributes class_entry_type ctor_arguments extends_from implements_list '{' class_statement_list '}' + { $$ = array(Stmt\Class_[null, ['type' => $2, 'extends' => $4, 'implements' => $5, 'stmts' => $7, 'attrGroups' => $1]], $3); $this->checkClass($$[0], -1); } ; diff --git a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index f60e04073a..e897bf13e5 100644 --- a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -18,6 +18,8 @@ class PrintableNewAnonClassNode extends Expr { /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; + /** @var int Modifiers */ + public $flags; /** @var (Node\Arg|Node\VariadicPlaceholder)[] Arguments */ public $args; /** @var null|Node\Name Name of extended class */ @@ -36,11 +38,12 @@ class PrintableNewAnonClassNode extends Expr { * @param array $attributes Attributes */ public function __construct( - array $attrGroups, array $args, ?Node\Name $extends, array $implements, + array $attrGroups, int $flags, array $args, ?Node\Name $extends, array $implements, array $stmts, array $attributes ) { parent::__construct($attributes); $this->attrGroups = $attrGroups; + $this->flags = $flags; $this->args = $args; $this->extends = $extends; $this->implements = $implements; @@ -53,7 +56,7 @@ public static function fromNewNode(Expr\New_ $newNode): self { // We don't assert that $class->name is null here, to allow consumers to assign unique names // to anonymous classes for their own purposes. We simplify ignore the name here. return new self( - $class->attrGroups, $newNode->args, $class->extends, $class->implements, + $class->attrGroups, $class->flags, $newNode->args, $class->extends, $class->implements, $class->stmts, $newNode->getAttributes() ); } @@ -63,6 +66,6 @@ public function getType(): string { } public function getSubNodeNames(): array { - return ['attrGroups', 'args', 'extends', 'implements', 'stmts']; + return ['attrGroups', 'flags', 'args', 'extends', 'implements', 'stmts']; } } diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index b90176c310..7cb0471066 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -160,15 +160,15 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1265; - protected $gotoTableSize = 624; + protected $actionTableSize = 1260; + protected $gotoTableSize = 612; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 433; + protected $YY2TBLSTATE = 434; protected $numNonLeafStates = 739; protected $symbolToName = array( @@ -387,249 +387,248 @@ class Php7 extends \PhpParser\ParserAbstract protected $action = array( 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, - 138, 38, 480, 862, 1026, 863,-32766,-32766,-32766,-32767, + 138, 38,-32766,-32766,-32766, 151,-32766,-32766,-32766,-32767, -32767,-32767,-32767, 102, 103, 104, 105, 106, 1111, 1112, - 1113, 1110, 1109, 1108, 1114, 745, 744,-32766, 242,-32766, + 1113, 1110, 1109, 1108, 1114, 745, 744,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1244,-32766,-32766,-32766, 754,-32766,-32766,-32766, -327, - -593, -590, 834,-32766,-32766,-32766, 989, -593, -590, 270, - 139, 402, 758, 759, 760, 761, -193,-32766, 427,-32766, - -32766,-32766,-32766,-32766,-32766, 815, 762, 763, 764, 765, + -32767, 1244, 837,-32766, 1321, 754,-32766,-32766,-32766,-32766, + -593,-32766,-32766,-32766, 104, 105, 106, -593, 1305, 265, + 139, 403, 758, 759, 760, 761, 989,-32766, 428,-32766, + -32766, -16,-32766, 242, 1026, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, - 794, 795, 783, 784, 343, 344, 786, 787, 772, 773, - 774, 776, 777, 778, 354, 818, 819, 820, 821, 822, - 584, 779, 780, 585, 586, 940, 803, 801, 802, 814, - 798, 799, 835, 2, 587, 588, 797, 589, 590, 591, - 592, 593, 594, 826, 481,-32766,-32766,-32766, 800, 595, - 596, -192, 140, 23, 133, 134, 135, 582, 136, 137, - 1059, 751, 752, 753, 138, 38,-32766, 35,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -110, 1111, - 1112, 1113, 1110, 1109, 1108, 1114, -271,-32766, 21, 745, - 744,-32766,-32766,-32766, 990, 129,-32766, 942,-32766,-32766, - -32766,-32766, 107, 108, 109, 606, 274, 1321, 298, 754, - 1103, 75,-32766, -327,-32766,-32766,-32766, 325, 110, -593, - -590, -593, -590, 270, 139, 402, 758, 759, 760, 761, - -193, -85, 427,-32766,-32766,-32766, 355, 828, 127, 815, + 794, 795, 783, 784, 344, 345, 786, 787, 772, 773, + 774, 776, 777, 778, 355, 818, 819, 820, 821, 822, + 584, 779, 780, 585, 586,-32766, 803, 801, 802, 814, + 798, 799, 835, 826, 587, 588, 797, 589, 590, 591, + 592, 593, 594, 826, 458, 459, 460, 1035, 800, 595, + 596, 940, 140, 2, 133, 134, 135, 582, 136, 137, + 1059, 751, 752, 753, 138, 38, -327, -110, -110, 1325, + 290, 23, -110,-32766,-32766,-32766, 1324, 35, -110, 1111, + 1112, 1113, 1110, 1109, 1108, 1114, 612,-32766, 129, 745, + 744, 107, 108, 109,-32766, 274,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 828, 990, -193, 145, 110, 298, 754, + 836, 75,-32766,-32766,-32766, 1350, 142, 326, 1351, -593, + 326, -593, 254, 265, 139, 403, 758, 759, 760, 761, + 82, -271, 428,-32766, 326,-32766,-32766,-32766,-32766, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, - 791, 583, 792, 793, 794, 795, 783, 784, 343, 344, - 786, 787, 772, 773, 774, 776, 777, 778, 354, 818, - 819, 820, 821, 822, 584, 779, 780, 585, 586, 427, - 803, 801, 802, 814, 798, 799, 826, 725, 587, 588, - 797, 589, 590, 591, 592, 593, 594, -85, 83, 84, - 85, 241, 800, 595, 596, -192, 149, 775, 746, 747, - 748, 749, 750, 830, 751, 752, 753, 788, 789, 37, - 712, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 791, 583, 792, 793, 794, 795, 783, 784, 344, 345, + 786, 787, 772, 773, 774, 776, 777, 778, 355, 818, + 819, 820, 821, 822, 584, 779, 780, 585, 586, 830, + 803, 801, 802, 814, 798, 799, 712, 309, 587, 588, + 797, 589, 590, 591, 592, 593, 594, -78, 83, 84, + 85, -85, 800, 595, 596, 311, 149, 775, 746, 747, + 748, 749, 750, 725, 751, 752, 753, 788, 789, 37, + -327, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 942, 274, 837, 145, 378, - 379,-32766,-32766,-32766, 1239, 1238, 1240, 612, 110, 421, - 958, 959, 754, 1089, 291, 960, 104, 105, 106, 142, - 1087, 954,-32766, 325,-32766,-32766, 755, 756, 757, 758, - 759, 760, 761, 254, 360, 824, 1350, 1088, -544, 1351, - 920, 737, 815, 762, 763, 764, 765, 766, 767, 768, + 105, 106, 107, 108, 109, 323, 274, 481,-32766,-32766, + -32766, -58,-32766,-32766,-32766, 958, 959, 127, 110, -193, + 960, 339, 754,-32766,-32766,-32766, 954, -85, 291,-32766, + 1087,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, + 759, 760, 761, -192,-32766, 824,-32766,-32766,-32766, -366, + 428, -366, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, - 781, 782, -547, 803, 801, 802, 814, 798, 799, 555, - 309, 790, 796, 797, 804, 805, 807, 806, 808, 809, - -32766, 311, -544, -544, 323, 800, 811, 810, 50, 51, - 52, 511, 53, 54, 457, 458, 459, -544, 55, 56, - -110, 57, 1035, 910, 920, -110, 326, -110, 291, -550, - 1305, -544, 305, 380, 379, -110, -110, -110, -110, -110, - -110, -110, -110, 421, 338, 290, -547, -547, 958, 959, - 1277, 831, 1244, 960, 715, 836, 58, 59, 1265, 955, - 339, -543, 60, 368, 61, 248, 249, 62, 63, 64, - 65, 66, 67, 68, 69, -547, 28, 272, 70, 443, - 512,-32766, -16, -341, 1271, 1272, 513, 372, 835, 1244, - 465, 466, 1269, 42, 25, 514,-32766, 515, 922, 516, - 920, 517, 710, 1035, 518, 519, 387, 910,-32766, 44, - 45, 444, 375, 374,-32766, 46, 520, 1022, 1021, 1020, - 1023, 366, 337, 439, 1237, -543, -543, 832, 1230,-32766, - 522, 523, 524, 835, 440, -584, 1035, -584, 835, 835, - -543, 1340, 526, 527, 1032, 1258, 1259, 1260, 1261, 1255, - 1256, 297, -549, -366, -543, -366, 1058, 1262, 1257, 290, - 1235, 1239, 1238, 1240, 298,-32766, 1035, 71, 920, 441, - 835, 321, 322, 325, -153, -153, -153, 1325, 389, -110, - 7, 1034, 922, 910, 1324, 287, 710, 1035,-32766, -153, - 442, -153, 82, -153, 841, -153, 325, 151, 716, 1239, - 1238, 1240, 152, 36, 251, 373, 862, 154, 863, 298, - 290, 155, 75, 156, 287, -545, 958, 959, 325, 158, - 141, 521, 920, 33, 325,-32766, 896, 954, -110, -110, + 781, 782, -547, 803, 801, 802, 814, 798, 799, 340, + 327, 790, 796, 797, 804, 805, 807, 806, 808, 809, + 1032, 390, 606, 7,-32766, 800, 811, 810, 50, 51, + 52, 512, 53, 54, 831, 1239, 1238, 1240, 55, 56, + -110, 57, 1035, 920, 1089, -110, 1035, -110, 291, 482, + 745, 744, 305, 381, 380, -110, -110, -110, -110, -110, + -110, -110, -110, 422, 920, 283, -547, -547, 152, 290, + 379, 380, 1244, 715, 466, 467, 58, 59, 369, 21, + 422, -544, 60, 555, 61, 248, 249, 62, 63, 64, + 65, 66, 67, 68, 69, -547, 28, 267, 70, 444, + 513, 1103, 373, -341, 1271, 1272, 514, -192, 835, 154, + 832, -543, 1269, 42, 25, 515, 388, 516, 241, 517, + 920, 518, 298, 1237, 519, 520, 910, 920, 440, 44, + 45, 445, 376, 375,-32766, 46, 521, 1022, 1021, 1020, + 1023, 367, 338, 441, 1277, -544, -544, 910, 1230, 442, + 523, 524, 525, 835, 1244, 835, 1035, 716, 1340, 1235, + -544, 155, 527, 528,-32766, 1258, 1259, 1260, 1261, 1255, + 1256, 297, -550, 942, -544, -543, -543, 1262, 1257, 290, + 1034, 1239, 1238, 1240, 298, 443, 1035, 71, 1265, 841, + -543, 321, 322, 326, -153, -153, -153, 920, 1239, 1238, + 1240, 922, -549, 910, -543, 710, 942, -590,-32766, -153, + 910, -153, 356, -153, -590, -153, 862, 1032, 863, 1088, + 36, 251, 922, 737, 156, 374, 710, 717, 862, -584, + 863, -584, 75, 158, -545, 835, 958, 959, 326, 1035, + -57, 522, 920,-32766,-32766, 361, 896, 954, -110, -110, -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 745, 744, 1032, 920, 75, - -78, 910, 717, 745, 744, 325, 745, 744, 922, 920, - -32766,-32766, 710, -153, 690, 656, 26, 675, 676, 1035, - 48, 1032, 150, 405, 1149, 1151, 376, 377, 720, -545, - -545, -58,-32766, 381, 382, -542, 28, -57, 1237, 727, - 647, 648, 283, 1035, -545,-32766,-32766,-32766, 835,-32766, - 691,-32766, 1269,-32766, 124, 910,-32766, -87, -545, 125, - 130,-32766,-32766,-32766, -4, 920, 283,-32766,-32766, 131, - 144, 692, 693,-32766, 418, 159, 922, 160, 161, 162, - 710, 910,-32766, 163, 299, 300, 745, 744, 1230, 1239, - 1238, 1240, 910, -301, 288, 283, -84, -78, 936, -542, - -542, -73, 526, 527, -542, 1258, 1259, 1260, 1261, 1255, - 1256, 49, 74, 126, -542, -72, -71, 1262, 1257, -70, - -69, -68, -67,-32766, -66, -65, -46, 73, -542, 1237, - 975, -18, 322, 325, 710, 148,-32766,-32766,-32766, 273, - -32766, 284,-32766, 726,-32766, 729, 919,-32766, 910, 147, - 289, -297,-32766,-32766,-32766, 279, 922, 280,-32766,-32766, - 710, 285, -50, 286,-32766, 418, 292, 922, -542, -542, - 373, 710, 434,-32766, 331, 301, 302, 296, 293, 146, - 274, 958, 959, -542, 685, 826, 521,-32766, 110, 1352, - 371, 525, 954, -110, -110, -110, 132, -542, 20, 835, - 561, 701, 438, 663, 128,-32766, 1118, 303, 310, 645, - 557, 1237, 306, 304, 10,-32766, 1266, 657,-32766,-32766, - -32766, -507,-32766, 922,-32766, 703,-32766, 710, -4,-32766, - 678, 662, 679, 1276,-32766,-32766,-32766, 462, 1278,-32766, - -32766,-32766, 920, 491, 298, 1237,-32766, 418, -497, 1270, - 567, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, - -32766, 0, 0,-32766, 0, 0, 0, 0,-32766,-32766, - -32766,-32766, 0, 0,-32766,-32766, 0, 1237, 0, 8, - -32766, 418, 920, 24,-32766,-32766,-32766, 370,-32766,-32766, - -32766, 938,-32766, 0, 0,-32766, 610, 834, 0, 486, - -32766,-32766,-32766,-32766, 40, -578,-32766,-32766, 41, 1237, - 574, 734,-32766, 418, 735, 854,-32766,-32766,-32766, 901, - -32766,-32766,-32766, 999,-32766, 910, 976,-32766, 983, 973, - 984, 899,-32766,-32766,-32766, 971, 1092, 1095,-32766,-32766, - 1096, -249, -249, -249,-32766, 418, 1093, 373, 1094, 1100, - 28, 272, 846,-32766, 1291, 1309, 1343, 731, 958, 959, - 650, -274, 835, 521, -577, 910, 1269, -576, 896, 954, - -110, -110, -110, -550, -549, -548, -491, 1, 29, 30, - 39, -248, -248, -248, 43, 47, 72, 373, 76, 77, - 897, 78, 79, 80, 81, 143, 153, 157, 958, 959, - 922, 247, 1230, 521, 710, -249, 327, 355, 896, 954, - -110, -110, -110, 356, 357, 358, 359, 527, 28, 1258, - 1259, 1260, 1261, 1255, 1256, 360, 361, 362, 363, 364, - 835, 1262, 1257, 365, 1269, 367,-32766, 435, 554, 1347, - 922, 73, 1237, 1349, 710, -248, 322, 325, -272,-32766, - -32766,-32766, -271,-32766, 13,-32766, 14,-32766, 15, 16, - -32766, 18, 404, 482, 483,-32766,-32766,-32766, 490, 493, - 1230,-32766,-32766, 494, 495, 496, 500,-32766, 418, 501, - 502, 509, 572, 696, 1248, 527,-32766, 1258, 1259, 1260, - 1261, 1255, 1256, 1189, 1267, 1061, 1060, 1041, 1225, 1262, - 1257, 1037, -276, -102, 12, 17, 27, 295, 403, 73, - 34, 603, 607, 636, 322, 325, 702, 1193, 1243, 1190, - 1322, 0, 320, 369, 711, 0, 714, 718, 719, 721, - 722, 723, 724, 728, 713, 0, 857, 856, 865, 948, - 991, 864, 1348, 947, 945, 946, 949, 1221, 929, 939, - 927, 981, 982, 634, 1346, 1303, 1292, 1310, 1319, 0, - -511, 1206, 0, 0, 325 + 119, 120, 121, 122, 123, 745, 744, 656, 26, 835, + -110, -110, 720, 745, 744, -110, 33, 834, 922, 124, + 910, -110, 710, -153, 125, 922, 675, 676, 130, 710, + -32766, 150, 406, 131, 1149, 1151, 48, 144, -545, -545, + 377, 378,-32766, 382, 383, -542, 28, 159, 1237, 920, + 160, 298, 1058, -545, 75,-32766,-32766,-32766, 835,-32766, + 326,-32766, 1269,-32766, -87, 910,-32766, -545, 647, 648, + 161,-32766,-32766,-32766, -4, 920, -84,-32766,-32766, 727, + 162, 287, 163,-32766, 419, -301, -78, -73, -72, -71, + 141, 287,-32766, -70, 326, 975, 745, 744, 1230, 710, + 299, 300, -69, -68, -67, -297, -590, -66, -590, -542, + -542, -65, 527, 528, -46, 1258, 1259, 1260, 1261, 1255, + 1256, -18, 74, 148, -542, 273, 284, 1262, 1257, 126, + -542, 726, 910,-32766, 729, 919, 147, 73, -542, 1237, + 922, 690, 322, 326, 710, 279,-32766,-32766,-32766, 280, + -32766, 285,-32766, 286,-32766, 332, 288,-32766, 910, 289, + 292, 49,-32766,-32766,-32766, 293, 274, 1032,-32766,-32766, + 936, 110, -50, 685,-32766, 419, 146, 691, 826, 701, + 374, 703, 435,-32766, 1352, 20, 561, 296, 645, 1035, + 835, 958, 959, 1118, -542, -542, 522,-32766, 692, 693, + 557, 526, 954, -110, -110, -110, 132, 922, 834, -542, + 463, 710, 283, 662, 657,-32766, 1239, 1238, 1240, 678, + 304, 1237, 283, -542, 10, 301, 302, 492,-32766,-32766, + -32766, 663,-32766, 922,-32766, 679,-32766, 710, -4,-32766, + 372, 306, -507, 298,-32766,-32766,-32766, -578, 731,-32766, + -32766,-32766, 920, 303, 128, 1237,-32766, 419, 310, 0, + 567, 955,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, + -32766,-32766, 0,-32766, 0, 1276, 0, 0,-32766,-32766, + -32766,-32766, 1278, 0,-32766,-32766, -497, 1237, 8, 24, + -32766, 419, 920, 371,-32766,-32766,-32766, 938,-32766,-32766, + -32766, 610,-32766, -577, 40,-32766, 41, -576, 734, 487, + -32766,-32766,-32766,-32766, 735, 854,-32766,-32766, 901, 1237, + 574, 999,-32766, 419, 976, 983,-32766,-32766,-32766, 973, + -32766,-32766,-32766, 984,-32766, 910, 899,-32766, 971, 1092, + 1095, 1096,-32766,-32766,-32766, 1093, 1094, 1100,-32766,-32766, + 1266, -249, -249, -249,-32766, 419, 846, 374, 1291, 1309, + 28, 267, 1343,-32766, 650, -274, -550, -549, 958, 959, + -548, -491, 835, 522, 1, 910, 1269, 29, 896, 954, + -110, -110, -110, 30, 39, 43, 47, 72, 76, 77, + 78, -248, -248, -248, 79, 80, 81, 374, 143, 153, + 897, 157, 247, 328, 356, 357, 358, 359, 958, 959, + 922, 360, 1230, 522, 710, -249, 361, 362, 896, 954, + -110, -110, -110, 363, 364, 365, 366, 528, 28, 1258, + 1259, 1260, 1261, 1255, 1256, 368, 436, 554, -511, -272, + 835, 1262, 1257, -271, 1269, 13,-32766, 14, 15, 16, + 922, 73, 1237, 1347, 710, -248, 322, 326, 18,-32766, + -32766,-32766, 405,-32766, 483,-32766, 484,-32766, 491, 494, + -32766, 495, 496, 497, 501,-32766,-32766,-32766, 502, 503, + 1230,-32766,-32766, 510, 572, 696, 1248,-32766, 419, 1189, + 1267, 1061, 1060, 1041, 1225, 528,-32766, 1258, 1259, 1260, + 1261, 1255, 1256, 1037, -276, -102, 12, 17, 27, 1262, + 1257, 295, 404, 603, 607, 636, 702, 1193, 1243, 73, + 34, 1190, 1322, 0, 322, 326, 320, 370, 711, 714, + 718, 719, 721, 722, 723, 0, 724, 728, 713, 0, + 1349, 857, 856, 865, 948, 991, 864, 1348, 947, 945, + 946, 949, 1221, 929, 939, 927, 981, 982, 634, 1346, + 1303, 1292, 1310, 1319, 0, 1206, 0, 1270, 0, 326 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 31, 106, 1, 108, 9, 10, 11, 44, + 12, 13, 9, 10, 11, 14, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, - 118, 119, 120, 121, 122, 37, 38, 30, 14, 32, + 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 1, 9, 10, 11, 57, 9, 10, 11, 8, - 1, 1, 155, 9, 10, 11, 31, 8, 8, 71, - 72, 73, 74, 75, 76, 77, 8, 30, 80, 32, - 33, 34, 35, 36, 30, 87, 88, 89, 90, 91, + 43, 1, 1, 9, 1, 57, 9, 10, 11, 137, + 1, 9, 10, 11, 50, 51, 52, 8, 1, 71, + 72, 73, 74, 75, 76, 77, 31, 30, 80, 32, + 33, 31, 30, 14, 1, 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, 1, 128, 129, 130, 131, - 132, 133, 82, 8, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 80, 163, 9, 10, 11, 150, 151, - 152, 8, 154, 8, 2, 3, 4, 5, 6, 7, - 162, 9, 10, 11, 12, 13, 30, 8, 32, 33, - 34, 35, 36, 37, 38, 9, 10, 11, 128, 116, - 117, 118, 119, 120, 121, 122, 162, 137, 101, 37, - 38, 9, 10, 11, 159, 8, 30, 122, 32, 33, - 34, 35, 53, 54, 55, 1, 57, 1, 158, 57, - 123, 161, 30, 162, 32, 33, 34, 167, 69, 160, - 160, 162, 162, 71, 72, 73, 74, 75, 76, 77, - 162, 31, 80, 9, 10, 11, 161, 80, 14, 87, + 122, 123, 124, 125, 126, 116, 128, 129, 130, 131, + 132, 133, 82, 80, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 80, 129, 130, 131, 138, 150, 151, + 152, 1, 154, 8, 2, 3, 4, 5, 6, 7, + 162, 9, 10, 11, 12, 13, 8, 117, 118, 1, + 161, 8, 122, 9, 10, 11, 8, 8, 128, 116, + 117, 118, 119, 120, 121, 122, 51, 137, 8, 37, + 38, 53, 54, 55, 30, 57, 32, 33, 34, 35, + 36, 37, 38, 80, 159, 8, 8, 69, 158, 57, + 159, 161, 9, 10, 11, 80, 163, 167, 83, 160, + 167, 162, 8, 71, 72, 73, 74, 75, 76, 77, + 163, 162, 80, 30, 167, 32, 33, 34, 35, 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, 80, - 128, 129, 130, 131, 132, 133, 80, 163, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 97, 9, 10, - 11, 97, 150, 151, 152, 162, 154, 2, 3, 4, - 5, 6, 7, 156, 9, 10, 11, 12, 13, 30, - 163, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 156, + 128, 129, 130, 131, 132, 133, 163, 8, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 16, 9, 10, + 11, 31, 150, 151, 152, 8, 154, 2, 3, 4, + 5, 6, 7, 163, 9, 10, 11, 12, 13, 30, + 162, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 122, 57, 1, 8, 106, - 107, 9, 10, 11, 155, 156, 157, 51, 69, 116, - 117, 118, 57, 164, 30, 122, 50, 51, 52, 163, - 1, 128, 30, 167, 32, 33, 71, 72, 73, 74, - 75, 76, 77, 8, 161, 80, 80, 159, 70, 83, - 1, 163, 87, 88, 89, 90, 91, 92, 93, 94, + 51, 52, 53, 54, 55, 8, 57, 31, 9, 10, + 11, 16, 9, 10, 11, 117, 118, 14, 69, 162, + 122, 8, 57, 9, 10, 11, 128, 97, 30, 30, + 1, 32, 33, 34, 35, 36, 71, 72, 73, 74, + 75, 76, 77, 8, 30, 80, 32, 33, 34, 106, + 80, 108, 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, 70, 128, 129, 130, 131, 132, 133, 85, - 8, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 116, 8, 134, 135, 8, 150, 151, 152, 2, 3, - 4, 5, 6, 7, 129, 130, 131, 149, 12, 13, - 101, 15, 138, 84, 1, 106, 70, 108, 30, 161, - 1, 163, 113, 106, 107, 116, 117, 118, 119, 120, - 121, 122, 123, 116, 8, 161, 134, 135, 117, 118, - 146, 80, 1, 122, 31, 159, 50, 51, 1, 128, - 8, 70, 56, 8, 58, 59, 60, 61, 62, 63, + 125, 126, 70, 128, 129, 130, 131, 132, 133, 8, + 70, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 116, 106, 1, 108, 116, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 80, 155, 156, 157, 12, 13, + 101, 15, 138, 1, 164, 106, 138, 108, 30, 163, + 37, 38, 113, 106, 107, 116, 117, 118, 119, 120, + 121, 122, 123, 116, 1, 161, 134, 135, 14, 161, + 106, 107, 1, 31, 134, 135, 50, 51, 8, 101, + 116, 70, 56, 85, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 163, 70, 71, 72, 73, - 74, 116, 31, 164, 78, 79, 80, 8, 82, 1, - 134, 135, 86, 87, 88, 89, 9, 91, 159, 93, - 1, 95, 163, 138, 98, 99, 8, 84, 116, 103, + 74, 123, 8, 164, 78, 79, 80, 162, 82, 14, + 156, 70, 86, 87, 88, 89, 8, 91, 97, 93, + 1, 95, 158, 80, 98, 99, 84, 1, 8, 103, 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 8, 80, 134, 135, 156, 122, 137, - 124, 125, 126, 82, 8, 160, 138, 162, 82, 82, - 149, 85, 136, 137, 116, 139, 140, 141, 142, 143, - 144, 145, 161, 106, 163, 108, 1, 151, 152, 161, - 116, 155, 156, 157, 158, 116, 138, 161, 1, 8, - 82, 165, 166, 167, 75, 76, 77, 1, 106, 128, - 108, 137, 159, 84, 8, 30, 163, 138, 137, 90, - 8, 92, 163, 94, 8, 96, 167, 14, 31, 155, - 156, 157, 14, 147, 148, 106, 106, 14, 108, 158, - 161, 14, 161, 14, 30, 70, 117, 118, 167, 14, - 163, 122, 1, 14, 167, 137, 127, 128, 129, 130, + 122, 115, 116, 8, 146, 134, 135, 84, 122, 8, + 124, 125, 126, 82, 1, 82, 138, 31, 85, 116, + 149, 14, 136, 137, 116, 139, 140, 141, 142, 143, + 144, 145, 161, 122, 163, 134, 135, 151, 152, 161, + 137, 155, 156, 157, 158, 8, 138, 161, 1, 8, + 149, 165, 166, 167, 75, 76, 77, 1, 155, 156, + 157, 159, 161, 84, 163, 163, 122, 1, 137, 90, + 84, 92, 161, 94, 8, 96, 106, 116, 108, 159, + 147, 148, 159, 163, 14, 106, 163, 31, 106, 160, + 108, 162, 161, 14, 70, 82, 117, 118, 167, 138, + 16, 122, 1, 9, 10, 161, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 37, 38, 116, 1, 161, - 16, 84, 31, 37, 38, 167, 37, 38, 159, 1, - 9, 10, 163, 164, 80, 75, 76, 75, 76, 138, - 70, 116, 101, 102, 59, 60, 106, 107, 31, 134, - 135, 16, 74, 106, 107, 70, 70, 16, 80, 31, - 111, 112, 161, 138, 149, 87, 88, 89, 82, 91, - 116, 93, 86, 95, 16, 84, 98, 31, 163, 16, - 16, 103, 104, 105, 0, 1, 161, 109, 110, 16, - 16, 137, 138, 115, 116, 16, 159, 16, 16, 16, - 163, 84, 124, 16, 134, 135, 37, 38, 122, 155, - 156, 157, 84, 35, 37, 161, 31, 31, 38, 134, - 135, 31, 136, 137, 70, 139, 140, 141, 142, 143, - 144, 70, 154, 163, 149, 31, 31, 151, 152, 31, - 31, 31, 31, 74, 31, 31, 31, 161, 163, 80, - 159, 31, 166, 167, 163, 31, 87, 88, 89, 31, - 91, 31, 93, 31, 95, 31, 31, 98, 84, 31, - 37, 35, 103, 104, 105, 35, 159, 35, 109, 110, - 163, 35, 31, 35, 115, 116, 37, 159, 134, 135, - 106, 163, 108, 124, 35, 134, 135, 113, 37, 70, - 57, 117, 118, 149, 77, 80, 122, 85, 69, 83, - 149, 127, 128, 129, 130, 131, 31, 163, 97, 82, - 89, 80, 128, 100, 163, 74, 82, 132, 132, 113, - 85, 80, 114, 133, 150, 137, 160, 90, 87, 88, - 89, 149, 91, 159, 93, 92, 95, 163, 164, 98, - 94, 96, 100, 146, 103, 104, 105, 97, 146, 74, - 109, 110, 1, 97, 158, 80, 115, 116, 149, 166, - 153, -1, 87, 88, 89, 124, 91, -1, 93, -1, - 95, -1, -1, 98, -1, -1, -1, -1, 103, 104, - 105, 74, -1, -1, 109, 110, -1, 80, -1, 149, - 115, 116, 1, 149, 87, 88, 89, 149, 91, 124, - 93, 154, 95, -1, -1, 98, 153, 155, -1, 102, - 103, 104, 105, 74, 159, 161, 109, 110, 159, 80, + 25, 26, 27, 28, 29, 37, 38, 75, 76, 82, + 117, 118, 31, 37, 38, 122, 14, 155, 159, 16, + 84, 128, 163, 164, 16, 159, 75, 76, 16, 163, + 137, 101, 102, 16, 59, 60, 70, 16, 134, 135, + 106, 107, 74, 106, 107, 70, 70, 16, 80, 1, + 16, 158, 1, 149, 161, 87, 88, 89, 82, 91, + 167, 93, 86, 95, 31, 84, 98, 163, 111, 112, + 16, 103, 104, 105, 0, 1, 31, 109, 110, 31, + 16, 30, 16, 115, 116, 35, 31, 31, 31, 31, + 163, 30, 124, 31, 167, 159, 37, 38, 122, 163, + 134, 135, 31, 31, 31, 35, 160, 31, 162, 134, + 135, 31, 136, 137, 31, 139, 140, 141, 142, 143, + 144, 31, 154, 31, 149, 31, 31, 151, 152, 163, + 70, 31, 84, 74, 31, 31, 31, 161, 163, 80, + 159, 80, 166, 167, 163, 35, 87, 88, 89, 35, + 91, 35, 93, 35, 95, 35, 37, 98, 84, 37, + 37, 70, 103, 104, 105, 37, 57, 116, 109, 110, + 38, 69, 31, 77, 115, 116, 70, 116, 80, 80, + 106, 92, 108, 124, 83, 97, 89, 113, 113, 138, + 82, 117, 118, 82, 134, 135, 122, 85, 137, 138, + 85, 127, 128, 129, 130, 131, 31, 159, 155, 149, + 97, 163, 161, 96, 90, 74, 155, 156, 157, 94, + 133, 80, 161, 163, 150, 134, 135, 97, 87, 88, + 89, 100, 91, 159, 93, 100, 95, 163, 164, 98, + 149, 114, 149, 158, 103, 104, 105, 161, 164, 74, + 109, 110, 1, 132, 163, 80, 115, 116, 132, -1, + 153, 128, 87, 88, 89, 124, 91, -1, 93, -1, + 95, 137, -1, 98, -1, 146, -1, -1, 103, 104, + 105, 74, 146, -1, 109, 110, 149, 80, 149, 149, + 115, 116, 1, 149, 87, 88, 89, 154, 91, 124, + 93, 153, 95, 161, 159, 98, 159, 161, 159, 102, + 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, 91, 124, 93, 159, 95, 84, 159, 98, 159, 159, 159, 159, 103, 104, 105, 159, 159, 159, 109, 110, - 159, 100, 101, 102, 115, 116, 159, 106, 159, 159, - 70, 71, 160, 124, 160, 160, 160, 164, 117, 118, - 160, 162, 82, 122, 161, 84, 86, 161, 127, 128, + 160, 100, 101, 102, 115, 116, 160, 106, 160, 160, + 70, 71, 160, 124, 160, 162, 161, 161, 117, 118, + 161, 161, 82, 122, 161, 84, 86, 161, 127, 128, 129, 130, 131, 161, 161, 161, 161, 161, 161, 161, 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, 129, 130, 131, 161, 161, 161, 161, 137, 70, 139, - 140, 141, 142, 143, 144, 161, 161, 161, 161, 161, - 82, 151, 152, 161, 86, 161, 74, 161, 161, 164, + 140, 141, 142, 143, 144, 161, 161, 161, 165, 162, + 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, 88, 89, 162, 91, 162, 93, 162, 95, 162, 162, 98, 162, 162, 162, 162, 103, 104, 105, 162, 162, @@ -637,18 +636,17 @@ class Php7 extends \PhpParser\ParserAbstract 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, - 163, 162, 162, 162, 166, 167, 162, 162, 162, 162, - 162, -1, 163, 163, 163, -1, 163, 163, 163, 163, - 163, 163, 163, 163, 163, -1, 164, 164, 164, 164, + 163, 162, 162, -1, 166, 167, 163, 163, 163, 163, + 163, 163, 163, 163, 163, -1, 163, 163, 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, -1, - 165, 165, -1, -1, 167 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, -1, 165, -1, 166, -1, 167 ); protected $actionBase = array( - 0, -2, 152, 549, 764, 941, 981, 634, 507, 199, - 157, 889, 617, 697, 697, 708, 697, 473, 671, 821, - 63, 305, 305, 821, 305, 389, 389, 389, 658, 658, + 0, -2, 152, 549, 764, 941, 981, 751, 617, 310, + 123, 877, 556, 671, 671, 738, 671, 472, 626, 789, + 63, 305, 305, 789, 305, 493, 493, 493, 658, 658, 658, 658, 749, 749, 897, 897, 929, 865, 831, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, @@ -662,61 +660,61 @@ class Php7 extends \PhpParser\ParserAbstract 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 346, 35, 204, 659, 1045, 1055, - 1049, 1056, 1043, 1042, 1046, 1050, 1057, 1090, 1091, 818, - 1092, 1093, 1089, 1094, 1051, 900, 1044, 1054, 289, 289, + 1062, 1062, 1062, 1062, 51, 45, 451, 692, 1039, 1045, + 1041, 1046, 1035, 1034, 1040, 1042, 1049, 1085, 1086, 795, + 1087, 1088, 1084, 1089, 1043, 894, 1036, 1044, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 537, 224, 701, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 54, 54, - 54, 666, 666, 342, 182, 980, 166, 1048, 1048, 1048, - 1048, 1048, 1048, 1048, 1048, 1048, 665, 47, 136, 136, - 7, 7, 7, 7, 7, 369, -25, -25, -25, -25, - 501, 448, 50, 605, 538, 87, 497, 334, 243, 581, - 581, 316, 316, 478, 478, 499, 499, 478, 478, 478, - 415, 415, 415, 415, 318, 441, -93, 354, 778, 206, - 206, 206, 206, 778, 778, 778, 778, 792, 783, 778, - 778, 778, 595, 734, 734, 741, 149, 149, 149, 734, - 550, 825, 506, 550, 506, 479, 306, 442, 381, 377, - 425, 442, 362, 650, 60, 59, 842, 620, 842, 1041, - 75, 802, 223, 795, 770, 890, 1071, 1058, 803, 1087, - 832, 1088, 335, 406, 766, 1040, 1040, 1040, 1040, 1040, - 1040, 1040, 1040, 1040, 1040, 1040, 1097, 669, 1041, 421, - 1097, 1097, 1097, 669, 669, 669, 669, 669, 669, 669, - 669, 669, 669, 629, 421, 640, 642, 421, 839, 669, - 346, 799, 346, 346, 346, 346, 346, 346, 346, 346, - 346, 346, 800, -19, 346, 35, 124, 124, 228, 13, - 124, 124, 124, 124, 346, 346, 346, 346, 620, 823, - 797, 627, 843, 143, 823, 823, 823, 200, 51, 24, - 68, 758, 816, 522, 805, 805, 824, 916, 916, 805, - 817, 805, 824, 924, 805, 805, 916, 916, 786, 187, - 565, 486, 529, 576, 916, 432, 805, 805, 805, 805, - 776, 611, 805, 375, 340, 805, 805, 776, 775, 810, - 125, 780, 916, 916, 916, 776, 505, 780, 780, 780, - 852, 855, 796, 808, 446, 443, 636, 159, 760, 808, - 808, 805, 548, 796, 808, 796, 808, 837, 808, 808, - 808, 796, 808, 817, 502, 808, 759, 632, 145, 808, - 6, 925, 927, 726, 928, 919, 930, 976, 931, 932, - 1061, 915, 940, 923, 933, 977, 918, 917, 815, 738, - 743, 830, 772, 914, 819, 819, 819, 912, 819, 819, - 819, 819, 819, 819, 819, 819, 738, 756, 838, 774, - 811, 952, 744, 753, 1020, 787, 926, 1095, 1096, 946, - 1022, 934, 845, 754, 999, 953, 893, 1059, 954, 955, - 1000, 1031, 856, 1032, 975, 809, 979, 1072, 892, 965, - 1063, 819, 925, 932, 765, 923, 933, 918, 917, 794, - 793, 790, 791, 789, 788, 784, 785, 804, 1033, 906, - 844, 894, 964, 913, 738, 895, 992, 1047, 1001, 1002, - 1060, 840, 806, 896, 1073, 966, 967, 968, 1064, 1034, - 1065, 849, 994, 899, 1006, 846, 1074, 1007, 1011, 1012, - 1013, 1066, 1075, 1067, 903, 1068, 860, 827, 986, 835, - 1076, 633, 826, 828, 841, 974, 638, 945, 1069, 1077, - 1078, 1014, 1017, 1018, 1079, 1080, 935, 864, 996, 836, - 997, 990, 867, 869, 643, 829, 1035, 820, 822, 813, - 647, 649, 1081, 1082, 1083, 936, 812, 807, 870, 871, - 1036, 757, 1039, 1084, 655, 872, 761, 1085, 1021, 762, - 763, 684, 721, 715, 767, 833, 1070, 834, 798, 801, - 972, 763, 814, 876, 1086, 877, 878, 881, 1019, 887, + 289, 289, 289, 289, 289, 44, 343, 664, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 52, 52, + 52, 666, 666, 47, 354, 980, 203, 1048, 1048, 1048, + 1048, 1048, 1048, 1048, 1048, 1048, 665, 339, 164, 164, + 7, 7, 7, 7, 7, 50, 369, 583, -25, -25, + -25, -25, 448, 741, 501, 408, 283, 338, 394, 334, + 334, 14, 14, 531, 531, 9, 9, 531, 531, 531, + 478, 478, 478, 478, 441, 471, 552, 428, 824, 53, + 53, 53, 53, 824, 824, 824, 824, 826, 1091, 824, + 824, 824, 594, 750, 750, 781, 138, 138, 138, 750, + 540, 805, 503, 540, 238, 503, 67, 135, -78, 823, + 377, 499, -78, 362, 656, 636, 59, 743, 624, 743, + 1033, 481, 802, 514, 773, 746, 878, 1065, 1050, 821, + 1082, 825, 1083, 15, 370, 745, 1032, 1032, 1032, 1032, + 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1092, 443, 1033, + 384, 1092, 1092, 1092, 443, 443, 443, 443, 443, 443, + 443, 443, 443, 443, 647, 384, 622, 641, 384, 810, + 443, 51, 827, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 780, 316, 51, 45, 150, 150, 490, + 83, 150, 150, 150, 150, 51, 51, 51, 51, 624, + 799, 797, 627, 838, 375, 799, 799, 799, 270, 158, + 69, 197, 740, 760, 345, 788, 788, 801, 903, 903, + 788, 798, 788, 801, 915, 788, 788, 903, 903, 775, + 180, 550, 353, 524, 565, 903, 279, 788, 788, 788, + 788, 816, 571, 788, 214, 198, 788, 788, 816, 811, + 785, 145, 777, 903, 903, 903, 816, 500, 777, 777, + 777, 839, 845, 765, 784, 337, 297, 611, 169, 822, + 784, 784, 788, 538, 765, 784, 765, 784, 833, 784, + 784, 784, 765, 784, 798, 431, 784, 721, 607, 163, + 784, 6, 916, 917, 723, 918, 913, 919, 965, 923, + 924, 1055, 900, 931, 914, 925, 966, 912, 906, 794, + 693, 698, 829, 783, 899, 792, 792, 792, 895, 792, + 792, 792, 792, 792, 792, 792, 792, 693, 880, 834, + 787, 934, 702, 707, 1012, 819, 926, 963, 1090, 933, + 1014, 927, 835, 711, 986, 935, 774, 1053, 936, 940, + 990, 1017, 846, 1018, 979, 796, 1066, 1067, 886, 946, + 1056, 792, 916, 924, 735, 914, 925, 912, 906, 770, + 766, 762, 763, 761, 752, 747, 748, 782, 1019, 836, + 776, 888, 945, 896, 693, 889, 973, 1047, 992, 994, + 1054, 803, 791, 892, 1068, 952, 953, 954, 1057, 1020, + 1058, 837, 975, 893, 996, 820, 1069, 997, 999, 1000, + 1001, 1059, 1070, 1060, 832, 1061, 849, 814, 967, 807, + 1071, 1, 806, 808, 818, 964, 484, 932, 1063, 1072, + 1073, 1002, 1006, 1007, 1074, 1075, 928, 852, 976, 815, + 977, 971, 855, 856, 525, 813, 1021, 800, 804, 812, + 577, 640, 1076, 1077, 1078, 930, 790, 786, 860, 864, + 1022, 809, 1031, 1079, 649, 867, 724, 1080, 1013, 744, + 754, 281, 654, 335, 756, 779, 1064, 830, 817, 778, + 955, 754, 793, 869, 1081, 870, 871, 872, 1011, 876, 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, @@ -744,26 +742,26 @@ class Php7 extends \PhpParser\ParserAbstract 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 494, 494, 289, 289, 494, 289, 494, 494, 494, 494, - 494, 494, 494, 494, 494, 0, 289, 289, 289, 289, - 289, 289, 289, 289, 786, 149, 149, 149, 149, 494, - 494, 494, 494, 494, -88, -88, 494, 786, 494, 494, - 149, 149, 494, 494, 494, 494, 494, 494, 494, 494, - 494, 494, 494, 0, 0, 421, 506, 494, 817, 817, - 817, 817, 494, 494, 494, 494, 506, 506, 494, 494, - 494, 0, 0, 0, 0, 0, 0, 0, 0, 421, - 506, 0, 421, 0, 817, 817, 494, 0, 786, 626, - 494, 0, 0, 0, 0, 421, 817, 421, 669, 805, - 506, 805, 669, 669, 124, 346, 626, 621, 621, 621, - 621, 0, 0, 620, 786, 786, 786, 786, 786, 786, - 786, 786, 786, 786, 786, 817, 0, 786, 0, 817, - 817, 817, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 817, 0, 0, - 916, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 924, 0, 0, 0, 0, 0, 0, 817, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 819, 840, - 0, 840, 0, 819, 819, 819, 0, 0, 0, 0, - 829, 757 + 473, 473, 289, 289, 473, 289, 473, 473, 473, 473, + 473, 473, 473, 473, 473, 0, 289, 289, 289, 289, + 289, 289, 289, 289, 473, 775, 473, 138, 138, 138, + 138, 473, 473, 473, -88, -88, 473, 238, 473, 473, + 138, 138, 473, 473, 473, 473, 473, 473, 473, 473, + 473, 473, 473, 0, 0, 384, 503, 473, 798, 798, + 798, 798, 473, 473, 473, 473, 503, 503, 473, 473, + 473, 0, 0, 0, 0, 0, 0, 0, 0, 384, + 503, 0, 384, 0, 0, 798, 798, 473, 238, 775, + 168, 473, 0, 0, 0, 0, 384, 798, 384, 443, + 788, 503, 788, 443, 443, 150, 51, 168, 620, 620, + 620, 620, 0, 0, 624, 775, 775, 775, 775, 775, + 775, 775, 775, 775, 775, 775, 798, 0, 775, 0, + 798, 798, 798, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 798, 0, + 0, 903, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 915, 0, 0, 0, 0, 0, 0, 798, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 792, + 803, 0, 803, 0, 792, 792, 792, 0, 0, 0, + 0, 813, 809 ); protected $actionDefault = array( @@ -793,35 +791,35 @@ class Php7 extends \PhpParser\ParserAbstract 405, 406, 407, 408, 409, 389, 390, 471, 449, 448, 447,32767,32767, 414, 415,32767, 419,32767,32767,32767, 32767,32767,32767,32767, 102,32767, 388, 422, 420, 421, - 438, 439, 436, 437, 440,32767, 441, 442, 443, 444, - 32767, 315,32767,32767,32767, 365, 363, 315, 111,32767, + 438, 439, 436, 437, 440,32767,32767,32767, 441, 442, + 443, 444, 315,32767,32767, 365, 363, 315, 111,32767, 32767, 429, 430,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767, 534, 446,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 102, 32767, 100, 536, 411, 413, 503, 424, 425, 423, 392, - 32767, 510,32767, 102, 512,32767,32767,32767,32767,32767, - 32767,32767, 535,32767, 542, 542,32767, 496, 100, 194, - 32767,32767,32767, 194, 194,32767,32767,32767,32767,32767, - 32767,32767,32767, 603, 496, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110,32767, 194, 110,32767, - 32767,32767, 100, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 189,32767, 267, 269, 102, 557, 194, - 32767, 515,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 508,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 496, 434, - 138,32767, 138, 542, 426, 427, 428, 498, 542, 542, - 542, 311, 288,32767,32767,32767,32767, 513, 513, 100, - 100, 100, 100, 508,32767,32767,32767,32767, 111, 99, - 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, - 222, 99,32767, 101, 101,32767,32767, 222, 224, 211, - 101, 226,32767, 561, 562, 222, 101, 226, 226, 226, - 246, 246, 485, 317, 101, 99, 101, 101, 196, 317, - 317,32767, 101, 485, 317, 485, 317, 198, 317, 317, - 317, 485, 317,32767, 101, 317, 213, 99, 99, 317, - 32767,32767,32767, 498,32767,32767,32767,32767,32767,32767, - 32767, 221,32767,32767,32767,32767,32767,32767,32767,32767, - 529,32767, 546, 559, 432, 433, 435, 544, 457, 458, - 459, 460, 461, 462, 463, 465, 591,32767, 502,32767, + 32767, 510,32767, 102,32767, 512,32767,32767,32767,32767, + 32767,32767,32767, 535,32767, 542, 542,32767, 496, 100, + 194,32767,32767,32767, 194, 194,32767,32767,32767,32767, + 32767,32767,32767,32767, 603, 496, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110,32767, 194, 110, + 32767,32767,32767, 100, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 189,32767, 267, 269, 102, 557, + 194,32767, 515,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 508,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 496, + 434, 138,32767, 138, 542, 426, 427, 428, 498, 542, + 542, 542, 311, 288,32767,32767,32767,32767, 513, 513, + 100, 100, 100, 100, 508,32767,32767,32767,32767, 111, + 99, 99, 99, 99, 99, 103, 101,32767,32767,32767, + 32767, 222, 99,32767, 101, 101,32767,32767, 222, 224, + 211, 101, 226,32767, 561, 562, 222, 101, 226, 226, + 226, 246, 246, 485, 317, 101, 99, 101, 101, 196, + 317, 317,32767, 101, 485, 317, 485, 317, 198, 317, + 317, 317, 485, 317,32767, 101, 317, 213, 99, 99, + 317,32767,32767,32767, 498,32767,32767,32767,32767,32767, + 32767,32767, 221,32767,32767,32767,32767,32767,32767,32767, + 32767, 529,32767, 546, 559, 432, 433, 435, 544, 457, + 458, 459, 460, 461, 462, 463, 465, 591,32767, 502, 32767,32767,32767, 337,32767, 601,32767, 601,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767, 602,32767, 542,32767,32767,32767, @@ -844,75 +842,74 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $goto = array( - 196, 196, 1033, 1064, 697, 429, 661, 349, 852, 319, - 706, 423, 313, 314, 334, 576, 428, 335, 430, 638, - 654, 655, 853, 672, 673, 674, 974, 167, 167, 167, + 196, 196, 1033, 1064, 697, 430, 661, 621, 658, 319, + 706, 424, 313, 314, 335, 576, 429, 336, 431, 638, + 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, - 189, 190, 191, 192, 218, 216, 219, 534, 535, 419, - 536, 538, 539, 540, 541, 542, 543, 544, 545, 1135, + 189, 190, 191, 192, 218, 216, 219, 535, 536, 420, + 537, 539, 540, 541, 542, 543, 544, 545, 546, 1135, 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, - 258, 259, 260, 261, 262, 263, 264, 266, 267, 268, - 269, 281, 282, 316, 317, 318, 424, 425, 426, 581, + 258, 259, 260, 261, 262, 263, 264, 268, 269, 270, + 271, 281, 282, 316, 317, 318, 425, 426, 427, 581, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, 200, 239, 188, 189, 190, 191, 192, 218, 1135, 201, 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, - 212, 213, 214, 855, 353, 417, 881, 869, 1069, 1073, - 278, 278, 278, 278, 353, 353, 600, 977, 621, 658, - 833, 566, 827, 1337, 1337, 733, 637, 639, 353, 353, - 659, 353, 573, 1353, 683, 687, 1009, 695, 704, 1005, - 1337, 967, 1106, 1107, 553, 559, 551, 860, 353, 909, - 904, 905, 918, 861, 906, 858, 907, 908, 859, 886, - 833, 912, 833, 1115, 885, 394, 397, 560, 601, 605, - 347, 1086, 1081, 1082, 1083, 340, 551, 559, 568, 569, - 342, 579, 602, 616, 617, 464, 464, 694, 1036, 1036, - 829, 22, 681, 951, 464, 1297, 1028, 1044, 1045, 694, - 350, 351, 498, 694, 499, 1236, 1033, 1236, 1033, 1236, - 505, 913, 1033, 914, 1033, 1033, 686, 1326, 1033, 1033, + 212, 213, 214, 855, 478, 278, 278, 278, 278, 623, + 623, 974, 480, 1268, 600, 1268, 1268, 1268, 1268, 1268, + 1268, 1268, 1268, 1268, 1286, 1286, 599, 1099, 1286, 709, + 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 507, + 700, 848, 1097, 418, 868, 559, 551, 860, 827, 909, + 904, 905, 918, 861, 906, 858, 907, 908, 859, 880, + 886, 912, 867, 833, 547, 547, 547, 547, 423, 604, + 611, 1086, 1081, 1082, 1083, 341, 551, 559, 568, 569, + 343, 579, 602, 616, 617, 407, 408, 573, 465, 465, + 670, 22, 671, 848, 411, 412, 413, 465, 684, 348, + 1236, 414, 1236, 350, 833, 346, 833, 1033, 1033, 1236, + 1326, 457, 1033, 995, 1033, 1033, 1336, 1336, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1318, - 1318, 1318, 1318, 1236, 352, 352, 352, 352, 1236, 1236, - 1236, 1236, 851, 868, 1236, 1236, 1236, 553, 995, 477, - 998, 972, 972, 970, 972, 732, 848, 479, 880, 1039, - 1038, 867, 925, 550, 1007, 1002, 926, 623, 623, 392, - 941, 1268, 941, 1268, 1268, 1268, 1268, 1268, 1268, 1268, - 1268, 1268, 1286, 1286, 571, 5, 1286, 6, 1286, 1286, - 1286, 1286, 1286, 1286, 1286, 1286, 1286, 546, 546, 546, - 546, 422, 604, 611, 660, 1284, 1284, 848, 1132, 1284, - 1229, 1284, 1284, 1284, 1284, 1284, 1284, 1284, 1284, 1284, - 537, 537, 252, 252, 537, 1057, 537, 537, 537, 537, - 537, 537, 537, 537, 537, 609, 624, 627, 628, 629, - 630, 651, 652, 653, 708, 599, 1099, 1184, 709, 250, - 250, 250, 250, 245, 253, 666, 1336, 1336, 506, 700, - 436, 1097, 1042, 1043, 552, 563, 474, 1311, 1312, 552, - 456, 563, 448, 1336, 395, 460, 682, 448, 1308, 448, - 1308, 336, 1308, 631, 633, 635, 467, 580, 468, 469, - 1339, 845, 878, 324, 308, 1344, 1345, 873, 431, 1313, - 1314, 548, 615, 548, 431, 548, 401, 1320, 1320, 1320, - 1320, 1227, 1040, 1040, 966, 408, 705, 665, 1051, 1047, - 1048, 876, 577, 614, 957, 870, 848, 1017, 1070, 454, - 736, 1231, 475, 1304, 968, 968, 968, 968, 406, 407, - 454, 962, 969, 670, 882, 671, 1074, 410, 411, 412, - 979, 684, 1117, 0, 413, 0, 0, 0, 345, 0, - 0, 0, 448, 448, 448, 448, 448, 448, 448, 448, - 448, 448, 448, 0, 1072, 448, 930, 1122, 1306, 1306, - 1072, 0, 0, 619, 0, 0, 1232, 1233, 0, 1014, - 0, 0, 0, 0, 843, 0, 275, 872, 0, 664, - 993, 549, 0, 549, 0, 866, 0, 0, 0, 0, - 1012, 1012, 1234, 1294, 1295, 1215, 943, 1226, 0, 1216, - 1219, 944, 1220, 0, 0, 0, 0, 0, 0, 0, + 1318, 1318, 1318, 1236, 1336, 930, 1122, 393, 1236, 1236, + 1236, 1236, 619, 571, 1236, 1236, 1236, 913, 1014, 914, + 354, 1339, 1337, 1337, 252, 252, 872, 439, 664, 993, + 354, 354, 1132, 925, 866, 1057, 5, 926, 6, 660, + 1337, 941, 1184, 941, 354, 354, 1226, 437, 354, 682, + 1353, 250, 250, 250, 250, 245, 253, 353, 353, 353, + 353, 553, 1284, 1284, 666, 354, 1284, 337, 1284, 1284, + 1284, 1284, 1284, 1284, 1284, 1284, 1284, 538, 538, 1106, + 1107, 538, 848, 538, 538, 538, 538, 538, 538, 538, + 538, 538, 566, 475, 1311, 1312, 733, 637, 639, 1039, + 1038, 659, 966, 409, 705, 683, 687, 1009, 695, 704, + 1005, 845, 1297, 609, 624, 627, 628, 629, 630, 651, + 652, 653, 708, 1215, 943, 1042, 1043, 1216, 1219, 944, + 1220, 325, 308, 686, 873, 552, 563, 449, 449, 449, + 552, 1308, 563, 1308, 957, 396, 461, 1012, 1012, 402, + 1308, 395, 398, 560, 601, 605, 870, 468, 580, 469, + 470, 1313, 1314, 878, 553, 615, 1344, 1345, 577, 614, + 549, 1227, 549, 851, 1070, 1320, 1320, 1320, 1320, 549, + 476, 998, 972, 972, 970, 972, 732, 881, 869, 1069, + 1073, 736, 876, 1017, 550, 1007, 1002, 1231, 977, 432, + 882, 979, 1304, 455, 432, 631, 633, 635, 968, 968, + 968, 968, 1040, 1040, 455, 962, 969, 665, 1051, 1047, + 1048, 1074, 967, 0, 1117, 351, 352, 1229, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 694, + 0, 449, 829, 1072, 1115, 885, 0, 1306, 1306, 1072, + 0, 694, 1232, 1233, 0, 694, 0, 0, 1036, 1036, + 843, 0, 681, 951, 255, 255, 1028, 1044, 1045, 499, + 0, 500, 0, 0, 0, 0, 0, 506, 1234, 1294, + 1295, 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, 255, 255 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 324, + 275, 324 ); protected $gotoCheck = array( - 42, 42, 72, 126, 72, 65, 65, 96, 26, 65, + 42, 42, 72, 126, 72, 65, 65, 55, 55, 65, 9, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 85, 85, 27, 85, 85, 85, 49, 42, 42, 42, + 85, 85, 26, 85, 85, 85, 27, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -926,97 +923,96 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 15, 14, 43, 16, 16, 16, 16, - 23, 23, 23, 23, 14, 14, 129, 16, 55, 55, - 12, 48, 6, 181, 181, 48, 48, 48, 14, 14, - 48, 14, 170, 14, 48, 48, 48, 48, 48, 48, - 181, 16, 143, 143, 14, 75, 75, 15, 14, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 45, - 12, 15, 12, 16, 16, 58, 58, 58, 58, 58, - 177, 15, 15, 15, 15, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 148, 148, 7, 88, 88, - 7, 75, 88, 88, 148, 14, 88, 88, 88, 7, - 96, 96, 154, 7, 154, 72, 72, 72, 72, 72, - 154, 64, 72, 64, 72, 72, 14, 179, 72, 72, + 42, 42, 42, 15, 83, 23, 23, 23, 23, 107, + 107, 49, 83, 107, 129, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 168, 168, 8, 8, 168, 8, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 8, + 8, 22, 8, 43, 35, 75, 75, 15, 6, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 35, + 45, 15, 35, 12, 106, 106, 106, 106, 13, 106, + 13, 15, 15, 15, 15, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 81, 81, 170, 148, 148, + 81, 75, 81, 22, 81, 81, 81, 148, 81, 177, + 72, 81, 72, 96, 12, 81, 12, 72, 72, 72, + 179, 82, 72, 102, 72, 72, 180, 180, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 9, - 9, 9, 9, 72, 24, 24, 24, 24, 72, 72, - 72, 72, 25, 35, 72, 72, 72, 14, 102, 83, - 25, 25, 25, 25, 25, 25, 22, 83, 35, 117, - 117, 35, 72, 25, 25, 25, 72, 107, 107, 61, - 9, 107, 9, 107, 107, 107, 107, 107, 107, 107, - 107, 107, 168, 168, 103, 46, 168, 46, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 106, 106, 106, - 106, 13, 106, 13, 63, 169, 169, 22, 149, 169, - 14, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 171, 171, 5, 5, 171, 113, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 8, 8, 150, 8, 5, - 5, 5, 5, 5, 5, 119, 180, 180, 8, 8, - 112, 8, 118, 118, 9, 9, 174, 174, 174, 9, - 82, 9, 23, 180, 9, 9, 115, 23, 129, 23, - 129, 29, 129, 84, 84, 84, 9, 9, 9, 9, - 180, 18, 9, 167, 167, 9, 9, 39, 116, 176, - 176, 19, 79, 19, 116, 19, 28, 129, 129, 129, - 129, 159, 116, 116, 92, 92, 92, 116, 116, 116, - 116, 9, 2, 2, 91, 37, 22, 109, 128, 19, - 98, 20, 156, 129, 19, 19, 19, 19, 81, 81, - 19, 19, 19, 81, 41, 81, 131, 81, 81, 81, - 95, 81, 146, -1, 81, -1, -1, -1, 81, -1, - -1, -1, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, -1, 129, 23, 17, 17, 129, 129, - 129, -1, -1, 17, -1, -1, 20, 20, -1, 17, - -1, -1, -1, -1, 20, -1, 24, 17, -1, 17, - 17, 24, -1, 24, -1, 17, -1, -1, -1, -1, - 106, 106, 20, 20, 20, 78, 78, 17, -1, 78, - 78, 78, 78, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 9, 9, 9, 72, 180, 17, 17, 61, 72, 72, + 72, 72, 17, 103, 72, 72, 72, 64, 17, 64, + 14, 180, 181, 181, 5, 5, 17, 82, 17, 17, + 14, 14, 149, 72, 17, 113, 46, 72, 46, 63, + 181, 9, 150, 9, 14, 14, 17, 112, 14, 115, + 14, 5, 5, 5, 5, 5, 5, 24, 24, 24, + 24, 14, 169, 169, 119, 14, 169, 29, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 171, 171, 143, + 143, 171, 22, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 48, 174, 174, 174, 48, 48, 48, 117, + 117, 48, 92, 92, 92, 48, 48, 48, 48, 48, + 48, 18, 14, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 78, 78, 118, 118, 78, 78, 78, + 78, 167, 167, 14, 39, 9, 9, 23, 23, 23, + 9, 129, 9, 129, 91, 9, 9, 106, 106, 28, + 129, 58, 58, 58, 58, 58, 37, 9, 9, 9, + 9, 176, 176, 9, 14, 79, 9, 9, 2, 2, + 19, 159, 19, 25, 128, 129, 129, 129, 129, 19, + 156, 25, 25, 25, 25, 25, 25, 16, 16, 16, + 16, 98, 9, 109, 25, 25, 25, 20, 16, 116, + 41, 95, 129, 19, 116, 84, 84, 84, 19, 19, + 19, 19, 116, 116, 19, 19, 19, 116, 116, 116, + 116, 131, 16, -1, 146, 96, 96, 14, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 7, + -1, 23, 7, 129, 16, 16, -1, 129, 129, 129, + -1, 7, 20, 20, -1, 7, -1, -1, 88, 88, + 20, -1, 88, 88, 5, 5, 88, 88, 88, 154, + -1, 154, -1, -1, -1, -1, -1, 154, 20, 20, + 20, -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, 5, 5 + -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, + 24, 24 ); protected $gotoBase = array( - 0, 0, -230, 0, 0, 381, 162, 240, 397, -10, - 0, 0, -116, 25, -133, -183, -284, 73, 142, 191, - 100, 0, 38, 167, 291, 298, 4, 18, 130, 145, - 0, 0, 0, 0, 0, -66, 0, 147, 0, 134, - 0, 65, -1, 146, 0, 196, -391, 0, -530, 8, - 0, 0, 0, 0, 0, 138, 0, 0, 180, 0, - 0, 287, 0, 122, 257, -236, 0, 0, 0, 0, - 0, 0, -5, 0, 0, -138, 0, 0, 169, 120, - 39, 9, 152, -158, -34, -698, 0, 0, -31, 0, - 0, 156, 170, 0, 0, 69, -474, 0, 85, 0, - 0, 0, 273, 301, 0, 0, 329, 86, 0, 119, - 0, 0, 143, 112, 0, 153, 187, 40, 137, 125, - 0, 0, 0, 0, 0, 0, 1, 0, 116, 168, - 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -73, 0, 0, 70, 0, 211, 123, - 133, 0, 0, 0, -231, 0, 54, 0, 0, 104, - 0, 0, 0, 0, 0, 0, 0, 132, 101, 124, - 163, 139, 0, 0, 126, 0, 89, 200, 0, 246, - 109, -124, 0, 0 + 0, 0, -254, 0, 0, 313, 188, 522, 178, -10, + 0, 0, -73, -109, 13, -184, 26, -169, 92, 195, + 95, 0, -77, 162, 344, 459, 18, 22, 102, 61, + 0, 0, 0, 0, 0, -166, 0, 107, 0, 101, + 0, 50, -1, 184, 0, 197, -410, 0, -329, 153, + 0, 0, 0, 0, 0, -33, 0, 0, 396, 0, + 0, 255, 0, 87, 293, -236, 0, 0, 0, 0, + 0, 0, -5, 0, 0, -139, 0, 0, 6, 112, + 46, -245, -7, -304, 17, -698, 0, 0, 269, 0, + 0, 105, 88, 0, 0, 49, -219, 0, 75, 0, + 0, 0, 238, 260, 0, 0, 196, -72, 0, 114, + 0, 0, 60, 52, 0, 56, 217, 110, 130, 64, + 0, 0, 0, 0, 0, 0, 1, 0, 91, 166, + 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 94, 0, 0, 71, 0, 214, 77, + 58, 0, 0, 0, 65, 0, 31, 0, 0, 93, + 0, 0, 0, 0, 0, 0, 0, 100, -57, 111, + 218, 126, 0, 0, 83, 0, 80, 229, 0, 239, + -31, 5, 0, 0 ); protected $gotoDefault = array( - -32768, 510, 740, 4, 741, 934, 816, 825, 597, 528, - 707, 346, 625, 420, 1302, 911, 1121, 578, 844, 1245, - 1253, 455, 847, 329, 730, 893, 894, 895, 398, 384, - 390, 396, 649, 626, 492, 879, 451, 871, 484, 874, - 450, 883, 164, 416, 508, 887, 3, 890, 556, 921, - 385, 898, 386, 677, 900, 562, 902, 903, 393, 399, - 400, 1126, 570, 622, 915, 256, 564, 916, 383, 917, - 924, 388, 391, 688, 463, 503, 497, 409, 1101, 565, - 608, 646, 445, 471, 620, 632, 618, 478, 432, 414, - 328, 956, 964, 485, 461, 978, 348, 986, 738, 1134, - 640, 487, 994, 641, 1001, 1004, 529, 530, 476, 1016, - 271, 1019, 488, 19, 667, 1030, 1031, 668, 642, 1053, - 643, 669, 644, 1055, 470, 598, 1063, 452, 1071, 1290, - 453, 1075, 265, 1078, 277, 415, 433, 1084, 1085, 9, - 1091, 698, 699, 11, 276, 507, 1116, 689, 449, 1133, - 437, 1203, 1205, 558, 489, 1223, 1222, 680, 504, 1228, - 446, 1293, 447, 531, 472, 315, 532, 307, 332, 312, - 547, 294, 333, 533, 473, 1299, 1307, 330, 31, 1327, - 1338, 341, 575, 613 + -32768, 511, 740, 4, 741, 934, 816, 825, 597, 529, + 707, 347, 625, 421, 1302, 911, 1121, 578, 844, 1245, + 1253, 456, 847, 330, 730, 893, 894, 895, 399, 385, + 391, 397, 649, 626, 493, 879, 452, 871, 485, 874, + 451, 883, 164, 417, 509, 887, 3, 890, 556, 921, + 386, 898, 387, 677, 900, 562, 902, 903, 394, 400, + 401, 1126, 570, 622, 915, 256, 564, 916, 384, 917, + 924, 389, 392, 688, 464, 504, 498, 410, 1101, 565, + 608, 646, 446, 472, 620, 632, 618, 479, 433, 415, + 329, 956, 964, 486, 462, 978, 349, 986, 738, 1134, + 640, 488, 994, 641, 1001, 1004, 530, 531, 477, 1016, + 272, 1019, 489, 19, 667, 1030, 1031, 668, 642, 1053, + 643, 669, 644, 1055, 471, 598, 1063, 453, 1071, 1290, + 454, 1075, 266, 1078, 277, 416, 434, 1084, 1085, 9, + 1091, 698, 699, 11, 276, 508, 1116, 689, 450, 1133, + 438, 1203, 1205, 558, 490, 1223, 1222, 680, 505, 1228, + 447, 1293, 448, 532, 473, 315, 533, 307, 333, 312, + 548, 294, 334, 534, 474, 1299, 1307, 331, 31, 1327, + 1338, 342, 575, 613 ); protected $ruleToNonTerminal = array( @@ -2642,7 +2638,7 @@ protected function initReduceCallbacks(): void { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 482 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, 483 => function ($stackPos) { diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 0d1ece9718..009a8b6a72 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -160,15 +160,15 @@ class Php8 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1263; - protected $gotoTableSize = 718; + protected $actionTableSize = 1260; + protected $gotoTableSize = 656; protected $invalidSymbol = 168; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 433; + protected $YY2TBLSTATE = 434; protected $numNonLeafStates = 739; protected $symbolToName = array( @@ -387,249 +387,248 @@ class Php8 extends \PhpParser\ParserAbstract protected $action = array( 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, - 138, 38,-32766,-32766,-32766, 989,-32766,-32766,-32766,-32766, - -32766,-32766, 1305, 826,-32767,-32767,-32767,-32767, 102, 103, - 104,-32766, 940,-32766, 837, 745, 744,-32766, 1026,-32766, + 138, 38, 327,-32766,-32766,-32766,-32766,-32766,-32766, 837, + 826,-32767,-32767,-32767,-32767, 102, 103, 104, 1111, 1112, + 1113, 1110, 1109, 1108, 1114, 745, 744,-32766, 1026,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1244, -366, 1035, -366, 754,-32766,-32766,-32766, 1111, - 1112, 1113, 1110, 1109, 1108, 1114, -327, -193, 828, 270, - 139, 402, 758, 759, 760, 761, 291,-32766, 427,-32766, - -32766,-32766,-32766,-32766, 606, 815, 762, 763, 764, 765, + -32767, 1244,-32766,-32766, 1321, 754, 1111, 1112, 1113, 1110, + 1109, 1108, 1114, 458, 459, 460, 2, 989, 1305, 265, + 139, 403, 758, 759, 760, 761, 466, 467, 428, 835, + 606, -16, 1340, 23, 292, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, - 794, 795, 783, 784, 343, 344, 786, 787, 772, 773, - 774, 776, 777, 778, 354, 818, 819, 820, 821, 822, - 584, 779, 780, 585, 586, -192, 803, 801, 802, 814, - 798, 799, 835, 2, 587, 588, 797, 589, 590, 591, - 592, 593, 594, 990, 830,-32766,-32766,-32766, 800, 595, - 596, 712, 140, 23, 133, 134, 135, 582, 136, 137, - 1059, 751, 752, 753, 138, 38,-32766, 35,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -110, 129, - 241,-32766,-32766,-32766, 82, 145, -593,-32766, 325, 745, - 744, 612, 836, -593, 725, 389,-32766, 7,-32766,-32766, - -32766,-32766,-32766, 1325,-32766,-32766,-32766, 1321, 299, 754, - 1324, 75, 105, 106, 107, 108, 109, 325, 274, 1350, - -327, -193, 1351, 270, 139, 402, 758, 759, 760, 761, - 110, 480, 427,-32766,-32766,-32766, 555, 831, 127, 815, + 794, 795, 783, 784, 344, 345, 786, 787, 772, 773, + 774, 776, 777, 778, 355, 818, 819, 820, 821, 822, + 584, 779, 780, 585, 586, 940, 803, 801, 802, 814, + 798, 799, 835, 826, 587, 588, 797, 589, 590, 591, + 592, 593, 594, -327, 36, 251, 35, -193, 800, 595, + 596, -192, 140, -85, 133, 134, 135, 582, 136, 137, + 1059, 751, 752, 753, 138, 38, 129, -110, -110, -584, + -32766, -584, -110,-32766,-32766,-32766, 241, 836, -110, 145, + 958, 959,-32766,-32766,-32766, 960, -593,-32766, 481, 745, + 744, 954, 1035, -593,-32766, 990,-32766,-32766,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 299, 754, + 831, 75,-32766,-32766,-32766, 291, 142, 326, 242, -85, + 326, 381, 380, 265, 139, 403, 758, 759, 760, 761, + 82, 422, 428,-32766, 326,-32766,-32766,-32766,-32766, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, - 791, 583, 792, 793, 794, 795, 783, 784, 343, 344, - 786, 787, 772, 773, 774, 776, 777, 778, 354, 818, - 819, 820, 821, 822, 584, 779, 780, 585, 586, -192, - 803, 801, 802, 814, 798, 799, 826, 254, 587, 588, - 797, 589, 590, 591, 592, 593, 594, 1277, 83, 84, - 85, 1088, 800, 595, 596, 737, 149, 775, 746, 747, - 748, 749, 750, 832, 751, 752, 753, 788, 789, 37, - 310, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 791, 583, 792, 793, 794, 795, 783, 784, 344, 345, + 786, 787, 772, 773, 774, 776, 777, 778, 355, 818, + 819, 820, 821, 822, 584, 779, 780, 585, 586, 254, + 803, 801, 802, 814, 798, 799, 832, 725, 587, 588, + 797, 589, 590, 591, 592, 593, 594, -327, 83, 84, + 85, -193, 800, 595, 596, -192, 149, 775, 746, 747, + 748, 749, 750, 151, 751, 752, 753, 788, 789, 37, + 482, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, -593, 274, -593, 312, 378, - 379, 1111, 1112, 1113, 1110, 1109, 1108, 1114, 110, 421, - 958, 959, 754, 481, 292, 960,-32766,-32766,-32766, 142, - 1087, 954, 323, 325, 380, 379, 755, 756, 757, 758, - 759, 760, 761, 338, 421, 824, 339,-32766, -544,-32766, - -32766, 368, 815, 762, 763, 764, 765, 766, 767, 768, + 105, 106, 107, 108, 109, -593, 274, -593,-32766,-32766, + -32766,-32766,-32766,-32766, 310, 1088, 127, 312, 110, 737, + 1325, 21, 754,-32766,-32766,-32766, -271, 1324,-32766,-32766, + 1087,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, + 759, 760, 761, 1103,-32766, 824,-32766,-32766, -544, 428, + 1035, 323, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, - 781, 782, -547, 803, 801, 802, 814, 798, 799, -85, - 372, 790, 796, 797, 804, 805, 807, 806, 808, 809, - -32766, 21, -544, -544, 942, 800, 811, 810, 50, 51, - 52, 511, 53, 54, 862, 387, 863, -544, 55, 56, - -110, 57, 1035, 1103, 920, -110, 326, -110, 292, -550, - 242, -544, 306,-32766,-32766, -110, -110, -110, -110, -110, - -110, -110, -110, 355, 439, 291, -547, -547, 942, -590, - 440, 862, 1244, 863, 715, -85, -590, 58, 59,-32766, - 441, -543, 60, 834, 61, 248, 249, 62, 63, 64, - 65, 66, 67, 68, 69, -547, 28, 272, 70, 443, - 512, 1035, -16, -341, 1271, 1272, 513, 360, 835, 1244, - 465, 466, 1269, 42, 25, 514, -584, 515, -584, 516, - 920, 517,-32766, 1265, 518, 519, 442, 910, 841, 44, - 45, 444, 375, 374,-32766, 46, 520, 1022, 1021, 1020, - 1023, 366, 337,-32766, 1237, -543, -543, 427, 1230,-32766, - 522, 523, 524, 835, 745, 744, 1035, 457, 458, 459, - -543, 151, 526, 527, 1032, 1258, 1259, 1260, 1261, 1255, - 1256, 298, -549, -78, -543, 152, 1058, 1262, 1257, 291, - 1235, 1239, 1238, 1240, 299, 154, 1035, 71, 920, -58, - 835, 321, 322, 325, -153, -153, -153, 155, -271, -110, - 156, 1034, 922, 910, 835, 286, 710, 158,-32766, -153, - 33, -153, -87, -153, -57, -153, 103, 104, 716, 1239, - 1238, 1240, 1239, 1238, 1240, 373, 124, 920, -590, 299, - -590, 1089, 75, -84, 286, -545, 958, 959, 325,-32766, - -32766, 521, 920, 656, 26,-32766, 896, 954, -110, -110, + 781, 782, 1032, 803, 801, 802, 814, 798, 799, 745, + 744, 790, 796, 797, 804, 805, 807, 806, 808, 809, + 152,-32766, -544, -544, 1035, 800, 811, 810, 50, 51, + 52, 512, 53, 54, 1239, 1238, 1240, -544, 55, 56, + -110, 57,-32766, 1089, 920, -110, 555, -110, 292, -550, + 339, -544, 306, 103, 104, -110, -110, -110, -110, -110, + -110, -110, -110, 105, 106, 107, 108, 109, 1244, 274, + 379, 380, -590, -366, 715, -366, 340, 58, 59, -590, + 422, 110, 60, 369, 61, 248, 249, 62, 63, 64, + 65, 66, 67, 68, 69, -543, 28, 267, 70, 444, + 513,-32766, 373, -341, 1271, 1272, 514, 1277, 835, 862, + 388, 863, 1269, 42, 25, 515, 942, 516, 942, 517, + 920, 518, 299, 1035, 519, 520, 1265, 910, 440, 44, + 45, 445, 376, 375,-32766, 46, 521, 1022, 1021, 1020, + 1023, 367, 338, 390, 1237, 7, 291, 441, 1230, 835, + 523, 524, 525, 442, 1244, 356, 1035, 361, 834, -543, + -543, 154, 527, 528, 443, 1258, 1259, 1260, 1261, 1255, + 1256, 298,-32766,-32766, -543, -547, 1058, 1262, 1257, 291, + 1235, 1239, 1238, 1240, 299, 841, -549, 71, -543, 656, + 26, 321, 322, 326, -153, -153, -153, 920, 612, 675, + 676, 1034, 922, 910,-32766, 286, 710, 835, 155, -153, + 828, -153, 862, -153, 863, -153, 150, 406, 156, 1239, + 1238, 1240,-32766,-32766,-32766, 374, 1350, 716, 75, 1351, + 158, -590, 33, -590, 326, 835, 958, 959, -78, -547, + -547, 522, 920,-32766, 377, 378, 896, 954, -110, -110, -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 745, 744, 125, 920, 75, - 130, 910, 717, 745, 744, 325, 958, 959, 922, 920, - 131, 960, 710, -153, 690, 141, 144, 955, 159, 325, - 48, 1032, 675, 676, 1149, 1151, 150, 405, 720, -545, - -545, 835,-32766, 160, 1340, -542, 28, 161, 1237, 727, - 910, 376, 377, 1035, -545,-32766,-32766,-32766, 835,-32766, - 691,-32766, 1269,-32766, 162, 910,-32766, -78, -545, 381, - 382,-32766,-32766,-32766, -4, 920, 282,-32766,-32766, 163, - -73, 692, 693,-32766, 418, -72, 922, -71, -70, 1032, - 710, 910,-32766, -69, 300, 301, 745, 744, 1230, 1239, - 1238, 1240, 910, 647, 648, 282, 36, 251, -68, -542, - -542, 1035, 526, 527, -542, 1258, 1259, 1260, 1261, 1255, - 1256, 49, 74, 126, -542, 922, -67, 1262, 1257, 710, - -66, -65, -46,-32766, 282, -18, 148, 73, -542, 1237, - 975, 273, 322, 325, 710, 283,-32766,-32766,-32766, 726, - -32766, 729,-32766, 919,-32766, 147, -301,-32766, 910, 274, - -297, 280,-32766,-32766,-32766, 281, 922, 284,-32766,-32766, - 710, 285, -50, 331,-32766, 418, 287, 922, -542, -542, - 373, 710, 434,-32766, 288, 302, 303, 297, 293, 294, - 685, 958, 959, -542, 936, 826, 521, 110, 835, 146, - 371, 525, 954, -110, -110, -110, 132, -542,-32766, 1118, - 645, 701, 663, 678, 128,-32766, 1352, 679, 438, 557, - 307, 1237, 305, 304, 10, 657, 561, 1276,-32766,-32766, - -32766,-32766,-32766, 922,-32766, 703,-32766, 710, -4,-32766, - 662, 311, 20, 462,-32766,-32766,-32766, 491, 834,-32766, - -32766,-32766, 920, 1278, 299, 1237,-32766, 418, 1266, 325, - -507, 567,-32766,-32766,-32766,-32766,-32766, 731,-32766, 0, - -32766, 0, 0,-32766, 0, 0, 0, 0,-32766,-32766, - -32766,-32766, 0, 0,-32766,-32766, 0, 1237, 0, -497, - -32766, 418, 920, 0,-32766,-32766,-32766, 8,-32766,-32766, - -32766, 40,-32766, 24, 370,-32766, 610, 0, 41, 486, - -32766,-32766,-32766,-32766, 938, 0,-32766,-32766, 734, 1237, - 574, 735,-32766, 418, 854, 901,-32766,-32766,-32766, 999, - -32766,-32766,-32766, 976,-32766, 910, 983,-32766, 973, 984, - 899, 971,-32766,-32766,-32766, 1092, 1095, 1096,-32766,-32766, - 1093, -249, -249, -249,-32766, 418, 1094, 373, 1100, -578, - 28, 272, 846,-32766, 1291, 1309, 1343, 897, 958, 959, - 650, -274, 835, 521, -577, 910, 1269, -576, 896, 954, - -110, -110, -110, -550, -549, -548, -491, 1, 29, 30, - 39, -248, -248, -248, 43, 47, 72, 373, 76, 77, - 1347, 78, 79, 80, 81, 143, 153, 157, 958, 959, - 922, 247, 1230, 521, 710, -249, 327, 355, 896, 954, - -110, -110, -110, 356, 357, 358, 359, 527, 28, 1258, - 1259, 1260, 1261, 1255, 1256, 360, 361, 362, 363, 364, - 835, 1262, 1257, 365, 1269, 367,-32766, 435, 554, 1349, - 922, 73, 1237, 857, 710, -248, 322, 325, -272,-32766, - -32766,-32766, -271,-32766, 13,-32766, 14,-32766, 15, 16, - -32766, 18, 404, 482, 483,-32766,-32766,-32766, 490, 493, - 1230,-32766,-32766, 494, 495, 496, 500,-32766, 418, 501, - 502, 509, 572, 696, 1248, 527,-32766, 1258, 1259, 1260, - 1261, 1255, 1256, 1189, 1267, 1061, 1060, 1041, 1225, 1262, - 1257, 1037, -276, -102, 12, 17, 27, 296, 403, 73, - 34, 603, 607, 636, 322, 325, 702, 1193, 1243, 1190, - 1322, 0, 320, 369, 711, 0, 714, 718, 719, 721, - 722, 723, 724, 728, 713, 0, 856, 865, 948, 991, - 864, 1348, 947, 945, 946, 949, 1221, 929, 939, 927, - 981, 982, 634, 1346, 1303, 1292, 1310, 1319, 0, -511, - 1206, 0, 1270 + 119, 120, 121, 122, 123, 745, 744, -58, -547, -57, + -110, -110, 717, 745, 744, -110, 382, 383, 922, 1032, + 910, -110, 710, -153, 647, 648, 830, 124, 141, 125, + -32766, 1032, 326, 712, 1149, 1151, 48, 130, 131, 144, + 159, 1035,-32766, 160, 161, -542, 28, 162, 1237, 920, + 163, 299, 920, 1035, 75,-32766,-32766,-32766, 835,-32766, + 326,-32766, 1269,-32766, 282, 910,-32766, -87, -84, -78, + -73,-32766,-32766,-32766, -4, 920, 282,-32766,-32766, 720, + -72, -71, 727,-32766, 419, -70, -69, -68, -67, -66, + 287, 286,-32766, -65, -46, 922, 745, 744, 1230, 710, + 300, 301, -545, -18, 148, -301, 273, 283, 726, -542, + -542, 729, 527, 528, 920, 1258, 1259, 1260, 1261, 1255, + 1256, 919, 74, 147, -542, 288, 293, 1262, 1257, 126, + -297, 280, 910,-32766, 281, 910, 284, 73, -542, 1237, + 975, 690, 322, 326, 710, 285,-32766,-32766,-32766, 332, + -32766, 274,-32766, 294,-32766, 936, 110,-32766, 910, 685, + 835, -542,-32766,-32766,-32766, 826, -545, -545,-32766,-32766, + 146,-32766, -50, 701,-32766, 419, 703, 691, 20, 1118, + 374, -545, 435,-32766, 645, 1352, 1276, 297, 557,-32766, + 1278, 958, 959, 561, 662, -545, 522, 910, 692, 693, + 678, 526, 954, -110, -110, -110, 132, 922, 657, 463, + 922, 710, 492, -507, 710,-32766, 1239, 1238, 1240, 663, + 679, 1237, 282, 307, 10, -542, -542, 299,-32766,-32766, + -32766, 34,-32766, 922,-32766, 955,-32766, 710, -4,-32766, + -542, 305, 40, 304,-32766,-32766,-32766, 0, 0,-32766, + -32766,-32766, 920, 311, -542, 1237,-32766, 419, 567, 0, + 0, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, + -32766, -497, 922,-32766, 8, 24, 710, 371,-32766,-32766, + -32766,-32766, 610, 41,-32766,-32766, 938, 1237, 834, 734, + -32766, 419, 920, 735,-32766,-32766,-32766, 854,-32766,-32766, + -32766, 901,-32766, 999, 976,-32766, 49, 983, 973, 487, + -32766,-32766,-32766,-32766, 984, 899,-32766,-32766, 971, 1237, + 574, 1092,-32766, 419, 1095, 1096,-32766,-32766,-32766, 1093, + -32766,-32766,-32766, 1094,-32766, 910, 1100,-32766, 1266, 846, + 1291, 1309,-32766,-32766,-32766, 1343, 650, 320,-32766,-32766, + -578, -249, -249, -249,-32766, 419, -577, 374, -576, -550, + 28, 267, -549,-32766, -548, -491, 1, 29, 958, 959, + 302, 303, 835, 522, 30, 910, 1269, 39, 896, 954, + -110, -110, -110, 43, 47, 372, 72, 76, 77, 78, + 79, -248, -248, -248, 80, 81, 143, 374, 153, 128, + -274, 157, 247, 328, 356, 357, 358, 359, 958, 959, + 922, 360, 1230, 522, 710, -249, 361, 362, 896, 954, + -110, -110, -110, 363, 364, 365, 366, 528, 28, 1258, + 1259, 1260, 1261, 1255, 1256, 368, 436, 554, -511, -272, + 835, 1262, 1257, -271, 1269, 13,-32766, 14, 15, 16, + 922, 73, 1237, 731, 710, -248, 322, 326, 18,-32766, + -32766,-32766, 405,-32766, 483,-32766, 484,-32766, 491, 494, + -32766, 495, 496, 497, 501,-32766,-32766,-32766, 502, 503, + 1230,-32766,-32766, 510, 572, 696, 1248,-32766, 419, 1189, + 1267, 1061, 1060, 1041, 1225, 528,-32766, 1258, 1259, 1260, + 1261, 1255, 1256, 1037, -276, -102, 12, 17, 27, 1262, + 1257, 296, 404, 603, 607, 636, 702, 1193, 1243, 73, + 370, 1190, 1322, 0, 322, 326, 711, 714, 718, 719, + 721, 722, 723, 724, 728, 0, 713, 0, 897, 1347, + 1349, 857, 856, 865, 948, 991, 864, 1348, 947, 945, + 946, 949, 1221, 929, 939, 927, 981, 982, 634, 1346, + 1303, 1292, 1310, 1319, 0, 1206, 0, 1270, 0, 326 ); protected $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 9, 10, 11, 31, 9, 10, 11, 9, - 10, 11, 1, 80, 44, 45, 46, 47, 48, 49, - 50, 116, 1, 30, 1, 37, 38, 30, 1, 32, + 12, 13, 70, 9, 10, 11, 9, 10, 11, 1, + 80, 44, 45, 46, 47, 48, 49, 50, 116, 117, + 118, 119, 120, 121, 122, 37, 38, 30, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 1, 106, 138, 108, 57, 9, 10, 11, 116, - 117, 118, 119, 120, 121, 122, 8, 8, 80, 71, - 72, 73, 74, 75, 76, 77, 161, 30, 80, 32, - 33, 34, 35, 36, 1, 87, 88, 89, 90, 91, + 43, 1, 9, 10, 1, 57, 116, 117, 118, 119, + 120, 121, 122, 129, 130, 131, 8, 31, 1, 71, + 72, 73, 74, 75, 76, 77, 134, 135, 80, 82, + 1, 31, 85, 8, 30, 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, 8, 128, 129, 130, 131, - 132, 133, 82, 8, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 159, 156, 9, 10, 11, 150, 151, - 152, 163, 154, 8, 2, 3, 4, 5, 6, 7, - 162, 9, 10, 11, 12, 13, 30, 8, 32, 33, - 34, 35, 36, 37, 38, 9, 10, 11, 128, 8, - 97, 9, 10, 11, 163, 8, 1, 137, 167, 37, - 38, 52, 159, 8, 163, 106, 30, 108, 32, 33, - 34, 35, 30, 1, 32, 33, 34, 1, 158, 57, - 8, 161, 51, 52, 53, 54, 55, 167, 57, 80, - 162, 162, 83, 71, 72, 73, 74, 75, 76, 77, - 69, 31, 80, 9, 10, 11, 85, 80, 14, 87, + 122, 123, 124, 125, 126, 1, 128, 129, 130, 131, + 132, 133, 82, 80, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 8, 147, 148, 8, 8, 150, 151, + 152, 8, 154, 31, 2, 3, 4, 5, 6, 7, + 162, 9, 10, 11, 12, 13, 8, 117, 118, 160, + 116, 162, 122, 9, 10, 11, 97, 159, 128, 8, + 117, 118, 9, 10, 11, 122, 1, 137, 31, 37, + 38, 128, 138, 8, 30, 159, 32, 33, 34, 35, + 36, 37, 38, 30, 9, 32, 33, 34, 158, 57, + 80, 161, 9, 10, 11, 161, 163, 167, 14, 97, + 167, 106, 107, 71, 72, 73, 74, 75, 76, 77, + 163, 116, 80, 30, 167, 32, 33, 34, 35, 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, 162, - 128, 129, 130, 131, 132, 133, 80, 8, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 146, 9, 10, - 11, 159, 150, 151, 152, 163, 154, 2, 3, 4, - 5, 6, 7, 156, 9, 10, 11, 12, 13, 30, - 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 8, + 128, 129, 130, 131, 132, 133, 156, 163, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 162, 9, 10, + 11, 162, 150, 151, 152, 162, 154, 2, 3, 4, + 5, 6, 7, 14, 9, 10, 11, 12, 13, 30, + 163, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 160, 57, 162, 8, 106, - 107, 116, 117, 118, 119, 120, 121, 122, 69, 116, - 117, 118, 57, 163, 30, 122, 9, 10, 11, 163, - 1, 128, 8, 167, 106, 107, 71, 72, 73, 74, - 75, 76, 77, 8, 116, 80, 8, 30, 70, 32, - 33, 8, 87, 88, 89, 90, 91, 92, 93, 94, + 51, 52, 53, 54, 55, 160, 57, 162, 9, 10, + 11, 9, 10, 11, 8, 159, 14, 8, 69, 163, + 1, 101, 57, 9, 10, 11, 162, 8, 116, 30, + 1, 32, 33, 34, 35, 36, 71, 72, 73, 74, + 75, 76, 77, 123, 30, 80, 32, 33, 70, 80, + 138, 8, 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, 70, 128, 129, 130, 131, 132, 133, 31, - 8, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 116, 101, 134, 135, 122, 150, 151, 152, 2, 3, - 4, 5, 6, 7, 106, 8, 108, 149, 12, 13, - 101, 15, 138, 123, 1, 106, 70, 108, 30, 161, - 14, 163, 113, 9, 10, 116, 117, 118, 119, 120, - 121, 122, 123, 161, 8, 161, 134, 135, 122, 1, - 8, 106, 1, 108, 31, 97, 8, 51, 52, 116, - 8, 70, 56, 155, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 163, 70, 71, 72, 73, - 74, 138, 31, 164, 78, 79, 80, 161, 82, 1, - 134, 135, 86, 87, 88, 89, 160, 91, 162, 93, - 1, 95, 116, 1, 98, 99, 8, 84, 8, 103, + 125, 126, 116, 128, 129, 130, 131, 132, 133, 37, + 38, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 14, 116, 134, 135, 138, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 155, 156, 157, 149, 12, 13, + 101, 15, 137, 164, 1, 106, 85, 108, 30, 161, + 8, 163, 113, 49, 50, 116, 117, 118, 119, 120, + 121, 122, 123, 51, 52, 53, 54, 55, 1, 57, + 106, 107, 1, 106, 31, 108, 8, 51, 52, 8, + 116, 69, 56, 8, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 70, 70, 71, 72, 73, + 74, 116, 8, 164, 78, 79, 80, 146, 82, 106, + 8, 108, 86, 87, 88, 89, 122, 91, 122, 93, + 1, 95, 158, 138, 98, 99, 1, 84, 8, 103, 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 137, 80, 134, 135, 80, 122, 9, - 124, 125, 126, 82, 37, 38, 138, 129, 130, 131, - 149, 14, 136, 137, 116, 139, 140, 141, 142, 143, - 144, 145, 161, 16, 163, 14, 1, 151, 152, 161, - 116, 155, 156, 157, 158, 14, 138, 161, 1, 16, - 82, 165, 166, 167, 75, 76, 77, 14, 162, 128, - 14, 137, 159, 84, 82, 30, 163, 14, 137, 90, - 14, 92, 31, 94, 16, 96, 49, 50, 31, 155, - 156, 157, 155, 156, 157, 106, 16, 1, 160, 158, - 162, 164, 161, 31, 30, 70, 117, 118, 167, 51, - 52, 122, 1, 75, 76, 137, 127, 128, 129, 130, + 122, 115, 116, 106, 80, 108, 161, 8, 122, 82, + 124, 125, 126, 8, 1, 161, 138, 161, 155, 134, + 135, 14, 136, 137, 8, 139, 140, 141, 142, 143, + 144, 145, 51, 52, 149, 70, 1, 151, 152, 161, + 116, 155, 156, 157, 158, 8, 161, 161, 163, 75, + 76, 165, 166, 167, 75, 76, 77, 1, 52, 75, + 76, 137, 159, 84, 137, 30, 163, 82, 14, 90, + 80, 92, 106, 94, 108, 96, 101, 102, 14, 155, + 156, 157, 9, 10, 11, 106, 80, 31, 161, 83, + 14, 160, 14, 162, 167, 82, 117, 118, 16, 134, + 135, 122, 1, 30, 106, 107, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 37, 38, 16, 1, 161, - 16, 84, 31, 37, 38, 167, 117, 118, 159, 1, - 16, 122, 163, 164, 80, 163, 16, 128, 16, 167, - 70, 116, 75, 76, 59, 60, 101, 102, 31, 134, - 135, 82, 74, 16, 85, 70, 70, 16, 80, 31, - 84, 106, 107, 138, 149, 87, 88, 89, 82, 91, - 116, 93, 86, 95, 16, 84, 98, 31, 163, 106, - 107, 103, 104, 105, 0, 1, 161, 109, 110, 16, - 31, 137, 138, 115, 116, 31, 159, 31, 31, 116, - 163, 84, 124, 31, 134, 135, 37, 38, 122, 155, - 156, 157, 84, 111, 112, 161, 147, 148, 31, 134, - 135, 138, 136, 137, 70, 139, 140, 141, 142, 143, - 144, 70, 154, 163, 149, 159, 31, 151, 152, 163, - 31, 31, 31, 74, 161, 31, 31, 161, 163, 80, - 159, 31, 166, 167, 163, 31, 87, 88, 89, 31, - 91, 31, 93, 31, 95, 31, 35, 98, 84, 57, - 35, 35, 103, 104, 105, 35, 159, 35, 109, 110, - 163, 35, 31, 35, 115, 116, 37, 159, 134, 135, - 106, 163, 108, 124, 37, 134, 135, 113, 37, 37, - 77, 117, 118, 149, 38, 80, 122, 69, 82, 70, - 149, 127, 128, 129, 130, 131, 31, 163, 85, 82, - 113, 80, 100, 94, 163, 74, 83, 100, 128, 85, - 114, 80, 133, 132, 150, 90, 89, 146, 87, 88, - 89, 137, 91, 159, 93, 92, 95, 163, 164, 98, - 96, 132, 97, 97, 103, 104, 105, 97, 155, 74, - 109, 110, 1, 146, 158, 80, 115, 116, 160, 167, - 149, 153, 87, 88, 89, 124, 91, 164, 93, -1, - 95, -1, -1, 98, -1, -1, -1, -1, 103, 104, - 105, 74, -1, -1, 109, 110, -1, 80, -1, 149, - 115, 116, 1, -1, 87, 88, 89, 149, 91, 124, - 93, 159, 95, 149, 149, 98, 153, -1, 159, 102, - 103, 104, 105, 74, 154, -1, 109, 110, 159, 80, + 25, 26, 27, 28, 29, 37, 38, 16, 163, 16, + 117, 118, 31, 37, 38, 122, 106, 107, 159, 116, + 84, 128, 163, 164, 111, 112, 156, 16, 163, 16, + 137, 116, 167, 163, 59, 60, 70, 16, 16, 16, + 16, 138, 74, 16, 16, 70, 70, 16, 80, 1, + 16, 158, 1, 138, 161, 87, 88, 89, 82, 91, + 167, 93, 86, 95, 161, 84, 98, 31, 31, 31, + 31, 103, 104, 105, 0, 1, 161, 109, 110, 31, + 31, 31, 31, 115, 116, 31, 31, 31, 31, 31, + 37, 30, 124, 31, 31, 159, 37, 38, 122, 163, + 134, 135, 70, 31, 31, 35, 31, 31, 31, 134, + 135, 31, 136, 137, 1, 139, 140, 141, 142, 143, + 144, 31, 154, 31, 149, 37, 37, 151, 152, 163, + 35, 35, 84, 74, 35, 84, 35, 161, 163, 80, + 159, 80, 166, 167, 163, 35, 87, 88, 89, 35, + 91, 57, 93, 37, 95, 38, 69, 98, 84, 77, + 82, 70, 103, 104, 105, 80, 134, 135, 109, 110, + 70, 85, 31, 80, 115, 116, 92, 116, 97, 82, + 106, 149, 108, 124, 113, 83, 146, 113, 85, 137, + 146, 117, 118, 89, 96, 163, 122, 84, 137, 138, + 94, 127, 128, 129, 130, 131, 31, 159, 90, 97, + 159, 163, 97, 149, 163, 74, 155, 156, 157, 100, + 100, 80, 161, 114, 150, 134, 135, 158, 87, 88, + 89, 163, 91, 159, 93, 128, 95, 163, 164, 98, + 149, 133, 159, 132, 103, 104, 105, -1, -1, 74, + 109, 110, 1, 132, 163, 80, 115, 116, 153, -1, + -1, -1, 87, 88, 89, 124, 91, -1, 93, -1, + 95, 149, 159, 98, 149, 149, 163, 149, 103, 104, + 105, 74, 153, 159, 109, 110, 154, 80, 155, 159, + 115, 116, 1, 159, 87, 88, 89, 159, 91, 124, + 93, 159, 95, 159, 159, 98, 70, 159, 159, 102, + 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, - 91, 124, 93, 159, 95, 84, 159, 98, 159, 159, - 159, 159, 103, 104, 105, 159, 159, 159, 109, 110, - 159, 100, 101, 102, 115, 116, 159, 106, 159, 161, - 70, 71, 160, 124, 160, 160, 160, 164, 117, 118, - 160, 162, 82, 122, 161, 84, 86, 161, 127, 128, - 129, 130, 131, 161, 161, 161, 161, 161, 161, 161, - 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, - 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, + 91, 124, 93, 159, 95, 84, 159, 98, 160, 160, + 160, 160, 103, 104, 105, 160, 160, 163, 109, 110, + 161, 100, 101, 102, 115, 116, 161, 106, 161, 161, + 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, + 134, 135, 82, 122, 161, 84, 86, 161, 127, 128, + 129, 130, 131, 161, 161, 149, 161, 161, 161, 161, + 161, 100, 101, 102, 161, 161, 161, 106, 161, 163, + 162, 161, 161, 161, 161, 161, 161, 161, 117, 118, 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, 129, 130, 131, 161, 161, 161, 161, 137, 70, 139, - 140, 141, 142, 143, 144, 161, 161, 161, 161, 161, - 82, 151, 152, 161, 86, 161, 74, 161, 161, 164, + 140, 141, 142, 143, 144, 161, 161, 161, 165, 162, + 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, 88, 89, 162, 91, 162, 93, 162, 95, 162, 162, 98, 162, 162, 162, 162, 103, 104, 105, 162, 162, @@ -637,18 +636,17 @@ class Php8 extends \PhpParser\ParserAbstract 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, - 163, 162, 162, 162, 166, 167, 162, 162, 162, 162, - 162, -1, 163, 163, 163, -1, 163, 163, 163, 163, - 163, 163, 163, 163, 163, -1, 164, 164, 164, 164, + 163, 162, 162, -1, 166, 167, 163, 163, 163, 163, + 163, 163, 163, 163, 163, -1, 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, -1, 165, - 165, -1, 166 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, -1, 165, -1, 166, -1, 167 ); protected $actionBase = array( - 0, -2, 152, 549, 764, 941, 981, 634, 552, 497, - -12, 887, 617, 697, 697, 708, 697, 473, 671, 821, - -57, 305, 305, 821, 305, 656, 656, 656, 658, 658, + 0, -2, 152, 549, 764, 941, 981, 751, 555, 309, + 560, 864, 626, 738, 738, 741, 738, 473, 671, 783, + -60, 305, 305, 783, 305, 803, 803, 803, 658, 658, 658, 658, 749, 749, 897, 897, 929, 865, 831, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, @@ -662,61 +660,61 @@ class Php8 extends \PhpParser\ParserAbstract 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 33, -16, 83, 626, 1045, 1055, - 1049, 1056, 1043, 1042, 1046, 1050, 1057, 1089, 1090, 814, - 1091, 1092, 1088, 1093, 1051, 900, 1044, 1054, 289, 289, + 1062, 1062, 1062, 1062, 18, 36, 79, 648, 1039, 1045, + 1041, 1046, 1035, 1034, 1040, 1042, 1049, 1085, 1086, 782, + 1087, 1088, 1084, 1089, 1043, 876, 1036, 1044, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 570, 224, 474, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 10, 3, 3, - 3, 666, 666, 357, 172, 980, 166, 1048, 1048, 1048, - 1048, 1048, 1048, 1048, 1048, 1048, 665, 47, 136, 136, - 7, 7, 7, 7, 7, 369, -20, -20, -20, -20, - 501, 448, 50, 605, 538, 350, -54, 597, 334, 243, - 663, 663, 478, 478, -85, -85, 478, 478, 478, 161, - 161, 393, 393, 393, 393, 318, 441, 358, 151, 784, - 206, 206, 206, 206, 784, 784, 784, 784, 797, 1096, - 784, 784, 784, 595, 734, 734, 741, 618, 618, 734, - 395, 824, 649, 395, 649, 21, 139, 436, 589, 268, - 386, 436, 362, 650, 498, 185, 783, 635, 783, 1041, - 332, 813, 376, 791, 739, 889, 1071, 1058, 802, 1086, - 807, 1087, 458, 406, 726, 1040, 1040, 1040, 1040, 1040, - 1040, 1040, 1040, 1040, 1040, 1040, 782, 547, 1041, 157, - 782, 782, 782, 547, 547, 547, 547, 547, 547, 547, - 547, 547, 547, 682, 157, 598, 647, 157, 828, 547, - 33, 830, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 794, 200, 33, -16, 31, 31, 142, 37, - 31, 31, 31, 31, 33, 33, 33, 33, 635, 792, - 798, 653, 843, 117, 792, 792, 792, 408, 58, 466, - 59, 811, 815, 89, 805, 805, 817, 916, 916, 805, - 806, 805, 817, 924, 805, 805, 916, 916, 786, 171, - 486, 375, 432, 492, 916, 312, 805, 805, 805, 805, - 799, 502, 805, 279, 177, 805, 805, 799, 781, 804, - 125, 779, 916, 916, 916, 799, 383, 779, 779, 779, - 849, 852, 787, 800, 364, 340, 550, 159, 846, 800, - 800, 805, 457, 787, 800, 787, 800, 850, 800, 800, - 800, 787, 800, 806, 378, 800, 702, 548, 145, 800, - 6, 925, 927, 611, 928, 919, 930, 976, 931, 932, - 1061, 915, 940, 923, 933, 977, 918, 917, 812, 640, - 681, 838, 801, 914, 818, 818, 818, 912, 818, 818, - 818, 818, 818, 818, 818, 818, 640, 788, 845, 780, - 827, 952, 684, 694, 1020, 771, 893, 1094, 1095, 946, - 1022, 934, 832, 700, 999, 953, 793, 1059, 954, 955, - 1000, 1031, 855, 1032, 926, 819, 975, 979, 892, 965, - 1063, 818, 925, 932, 632, 923, 933, 918, 917, 790, - 789, 767, 785, 752, 747, 744, 746, 795, 1033, 906, - 888, 894, 964, 913, 640, 895, 992, 1047, 1001, 1002, - 1060, 836, 823, 896, 1072, 966, 967, 968, 1064, 1034, - 1065, 839, 994, 899, 1006, 840, 1073, 1007, 1011, 1012, - 1013, 1066, 1074, 1067, 903, 1068, 856, 825, 986, 834, - 1075, 577, 822, 826, 842, 974, 591, 945, 1069, 1076, - 1077, 1014, 1017, 1018, 1078, 1079, 935, 860, 996, 809, - 997, 990, 864, 867, 601, 841, 1035, 816, 820, 837, - 613, 616, 1080, 1081, 1082, 936, 808, 803, 869, 870, - 1036, 829, 1039, 1083, 623, 871, 717, 1084, 1021, 721, - 738, 587, 628, 603, 753, 833, 1070, 844, 796, 835, - 972, 738, 810, 872, 1085, 876, 877, 878, 1019, 881, + 289, 289, 289, 289, 289, 195, 342, 43, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 643, 643, + 643, 666, 666, 354, 173, 980, 203, 1048, 1048, 1048, + 1048, 1048, 1048, 1048, 1048, 1048, 665, 339, 164, 164, + 7, 7, 7, 7, 7, 50, 369, 583, -23, -23, + -23, -23, 448, 605, 497, 260, 397, 434, 54, 394, + 593, 593, 316, 316, 415, 415, 316, 316, 316, 442, + 442, 252, 252, 252, 252, 318, 455, 433, 391, 742, + 53, 53, 53, 53, 742, 742, 742, 742, 734, 1091, + 742, 742, 742, 722, 781, 781, 926, 551, 551, 781, + 536, 793, -3, 536, 63, -3, 67, 576, 335, 797, + 115, 9, 335, 535, 656, 501, 185, 823, 568, 823, + 1033, 424, 776, 426, 753, 729, 867, 1063, 1050, 809, + 1082, 810, 1083, -66, -58, 728, 1032, 1032, 1032, 1032, + 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1092, 402, 1033, + 130, 1092, 1092, 1092, 402, 402, 402, 402, 402, 402, + 402, 402, 402, 402, 603, 130, 544, 554, 130, 804, + 402, 18, 812, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 762, 157, 18, 36, 124, 124, 196, + 37, 124, 124, 124, 124, 18, 18, 18, 18, 568, + 784, 795, 600, 819, 143, 784, 784, 784, 122, 135, + 204, 139, 760, 785, 467, 775, 775, 787, 895, 895, + 775, 768, 775, 787, 913, 775, 775, 895, 895, 759, + 158, 550, 472, 524, 569, 895, 346, 775, 775, 775, + 775, 811, 575, 775, 271, 171, 775, 775, 811, 801, + 766, 58, 798, 895, 895, 895, 811, 505, 798, 798, + 798, 820, 824, 761, 765, 383, 349, 607, 138, 807, + 765, 765, 775, 532, 761, 765, 761, 765, 822, 765, + 765, 765, 761, 765, 768, 498, 765, 714, 586, 75, + 765, 6, 915, 916, 726, 917, 906, 918, 965, 919, + 923, 1053, 894, 931, 912, 924, 966, 903, 896, 780, + 701, 703, 815, 754, 893, 777, 777, 777, 888, 777, + 777, 777, 777, 777, 777, 777, 777, 701, 868, 818, + 794, 934, 711, 712, 1012, 730, 1064, 963, 1090, 933, + 1014, 925, 773, 713, 986, 935, 979, 874, 936, 940, + 990, 1017, 828, 1018, 1065, 790, 1066, 1067, 869, 946, + 1054, 777, 915, 923, 727, 912, 924, 903, 896, 752, + 748, 746, 747, 745, 744, 739, 740, 763, 1019, 887, + 879, 870, 945, 891, 701, 871, 973, 758, 992, 994, + 1047, 802, 792, 875, 1068, 952, 953, 954, 1055, 1020, + 1056, 814, 975, 928, 996, 805, 1069, 997, 999, 1000, + 1001, 1057, 1070, 1058, 885, 1059, 832, 808, 967, 788, + 1071, 299, 791, 800, 806, 964, 436, 932, 1060, 1072, + 1073, 1002, 1006, 1007, 1074, 1075, 927, 834, 976, 796, + 977, 971, 835, 838, 577, 779, 1021, 786, 789, 778, + 624, 634, 1076, 1077, 1078, 930, 767, 772, 839, 845, + 1022, 743, 1031, 1079, 646, 846, 717, 1080, 1013, 718, + 721, 652, 683, 681, 724, 774, 1061, 816, 799, 771, + 955, 721, 770, 849, 1081, 852, 855, 856, 1011, 860, 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, @@ -746,24 +744,24 @@ class Php8 extends \PhpParser\ParserAbstract 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 494, 494, 289, 289, 494, 289, 494, 494, 494, 494, 494, 494, 494, 494, 494, 0, 289, 289, 289, 289, - 289, 289, 289, 289, 786, 161, 161, 161, 161, 494, - 494, 494, 494, 494, 235, 235, 161, 494, 786, 494, + 289, 289, 289, 289, 494, 759, 494, 442, 442, 442, + 442, 494, 494, 494, -88, -88, 442, 494, 63, 494, 494, 494, 494, 494, 494, 494, 494, 494, 0, 0, - 494, 494, 494, 494, 0, 0, 157, 649, 494, 806, - 806, 806, 806, 494, 494, 494, 494, 649, 649, 494, - 494, 494, 0, 0, 0, 0, 161, 161, 0, 157, - 649, 0, 157, 0, 806, 806, 494, 0, 786, 202, - 494, 0, 0, 0, 0, 157, 806, 157, 547, 805, - 649, 805, 547, 547, 31, 33, 202, 625, 625, 625, - 625, 0, 0, 635, 786, 786, 786, 786, 786, 786, - 786, 786, 786, 786, 786, 806, 0, 786, 0, 806, - 806, 806, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 806, 0, 0, - 916, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 924, 0, 0, 0, 0, 0, 0, 806, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 818, 836, - 0, 836, 0, 818, 818, 818, 0, 0, 0, 0, - 841, 829 + 494, 494, 494, 494, 0, 0, 130, -3, 494, 768, + 768, 768, 768, 494, 494, 494, 494, -3, -3, 494, + 494, 494, 0, 0, 0, 0, 442, 442, 0, 130, + -3, 0, 130, 0, 0, 768, 768, 494, 63, 759, + 359, 494, 0, 0, 0, 0, 130, 768, 130, 402, + 775, -3, 775, 402, 402, 124, 18, 359, 545, 545, + 545, 545, 0, 0, 568, 759, 759, 759, 759, 759, + 759, 759, 759, 759, 759, 759, 768, 0, 759, 0, + 768, 768, 768, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 768, 0, + 0, 895, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 913, 0, 0, 0, 0, 0, 0, 768, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 777, + 802, 0, 802, 0, 777, 777, 777, 0, 0, 0, + 0, 779, 743 ); protected $actionDefault = array( @@ -793,35 +791,35 @@ class Php8 extends \PhpParser\ParserAbstract 405, 406, 407, 408, 409, 389, 390, 471, 449, 448, 447,32767,32767, 414, 415,32767, 419,32767,32767,32767, 32767,32767,32767,32767, 102,32767, 388, 422, 420, 421, - 438, 439, 436, 437, 440,32767, 441, 442, 443, 444, - 32767, 315,32767,32767,32767, 365, 363, 423, 315, 111, + 438, 439, 436, 437, 440,32767,32767,32767, 441, 442, + 443, 444, 315,32767,32767, 365, 363, 423, 315, 111, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 429, 430,32767,32767,32767,32767, 534, 446,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, 100, 536, 411, 413, 503, 424, 425, 392, - 32767, 510,32767, 102, 512,32767,32767,32767,32767,32767, - 32767,32767, 535,32767, 542, 542,32767, 496, 100, 194, - 32767,32767,32767, 194, 194,32767,32767,32767,32767,32767, - 32767,32767,32767, 603, 496, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110,32767, 194, 110,32767, - 32767,32767, 100, 194, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 189,32767, 267, 269, 102, 557, 194, - 32767, 515,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 508,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 496, 434, - 138,32767, 138, 542, 426, 427, 428, 498, 542, 542, - 542, 311, 288,32767,32767,32767,32767, 513, 513, 100, - 100, 100, 100, 508,32767,32767,32767,32767, 111, 99, - 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, - 222, 99,32767, 101, 101,32767,32767, 222, 224, 211, - 101, 226,32767, 561, 562, 222, 101, 226, 226, 226, - 246, 246, 485, 317, 101, 99, 101, 101, 196, 317, - 317,32767, 101, 485, 317, 485, 317, 198, 317, 317, - 317, 485, 317,32767, 101, 317, 213, 99, 99, 317, - 32767,32767,32767, 498,32767,32767,32767,32767,32767,32767, - 32767, 221,32767,32767,32767,32767,32767,32767,32767,32767, - 529,32767, 546, 559, 432, 433, 435, 544, 457, 458, - 459, 460, 461, 462, 463, 465, 591,32767, 502,32767, + 32767, 510,32767, 102,32767, 512,32767,32767,32767,32767, + 32767,32767,32767, 535,32767, 542, 542,32767, 496, 100, + 194,32767,32767,32767, 194, 194,32767,32767,32767,32767, + 32767,32767,32767,32767, 603, 496, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110,32767, 194, 110, + 32767,32767,32767, 100, 194, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 189,32767, 267, 269, 102, 557, + 194,32767, 515,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 508,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 496, + 434, 138,32767, 138, 542, 426, 427, 428, 498, 542, + 542, 542, 311, 288,32767,32767,32767,32767, 513, 513, + 100, 100, 100, 100, 508,32767,32767,32767,32767, 111, + 99, 99, 99, 99, 99, 103, 101,32767,32767,32767, + 32767, 222, 99,32767, 101, 101,32767,32767, 222, 224, + 211, 101, 226,32767, 561, 562, 222, 101, 226, 226, + 226, 246, 246, 485, 317, 101, 99, 101, 101, 196, + 317, 317,32767, 101, 485, 317, 485, 317, 198, 317, + 317, 317, 485, 317,32767, 101, 317, 213, 99, 99, + 317,32767,32767,32767, 498,32767,32767,32767,32767,32767, + 32767,32767, 221,32767,32767,32767,32767,32767,32767,32767, + 32767, 529,32767, 546, 559, 432, 433, 435, 544, 457, + 458, 459, 460, 461, 462, 463, 465, 591,32767, 502, 32767,32767,32767, 337,32767, 601,32767, 601,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767, 602,32767, 542,32767,32767,32767, @@ -844,70 +842,64 @@ class Php8 extends \PhpParser\ParserAbstract ); protected $goto = array( - 196, 196, 1033, 1064, 697, 429, 661, 621, 658, 319, - 706, 423, 314, 315, 334, 576, 428, 335, 430, 638, + 196, 196, 1033, 1064, 697, 430, 661, 621, 658, 319, + 706, 424, 314, 315, 335, 576, 429, 336, 431, 638, 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, - 189, 190, 191, 192, 218, 216, 219, 534, 535, 419, - 536, 538, 539, 540, 541, 542, 543, 544, 545, 1135, + 189, 190, 191, 192, 218, 216, 219, 535, 536, 420, + 537, 539, 540, 541, 542, 543, 544, 545, 546, 1135, 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, - 258, 259, 260, 261, 262, 263, 264, 266, 267, 268, - 269, 277, 289, 290, 317, 318, 424, 425, 426, 581, + 258, 259, 260, 261, 262, 263, 264, 268, 269, 270, + 271, 277, 289, 290, 317, 318, 425, 426, 427, 581, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, 200, 239, 188, 189, 190, 191, 192, 218, 1135, 201, 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, - 212, 213, 214, 855, 394, 397, 560, 601, 605, 349, - 279, 279, 279, 279, 623, 623, 600, 913, 1268, 914, - 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1286, - 1286, 974, 422, 1286, 611, 1286, 1286, 1286, 1286, 1286, - 1286, 1286, 1286, 1286, 827, 559, 551, 860, 417, 909, - 904, 905, 918, 861, 906, 858, 907, 908, 859, 464, - 464, 912, 352, 352, 352, 352, 1039, 1038, 464, 1336, - 1336, 1086, 1081, 1082, 1083, 340, 551, 559, 568, 569, - 342, 579, 602, 616, 617, 1336, 1284, 1284, 1106, 1107, - 1284, 22, 1284, 1284, 1284, 1284, 1284, 1284, 1284, 1284, - 1284, 5, 1339, 6, 848, 1236, 1033, 1236, 1033, 1236, - 886, 833, 573, 1033, 347, 1033, 1033, 1033, 1033, 1033, - 1033, 1033, 1033, 1033, 1326, 353, 1033, 1033, 1033, 1033, - 1318, 1318, 1318, 1318, 1236, 353, 353, 1042, 1043, 1236, - 1236, 1236, 1236, 324, 309, 1236, 1236, 1236, 353, 353, - 833, 353, 833, 1353, 848, 694, 995, 477, 829, 548, - 868, 548, 925, 548, 553, 479, 926, 694, 353, 392, - 941, 694, 941, 537, 537, 880, 571, 537, 867, 537, - 537, 537, 537, 537, 537, 537, 537, 537, 454, 1337, - 1337, 1313, 1314, 968, 968, 968, 968, 252, 252, 454, - 962, 969, 498, 566, 499, 1337, 660, 733, 637, 639, - 505, 1132, 659, 577, 614, 1297, 683, 687, 1009, 695, - 704, 1005, 851, 1057, 250, 250, 250, 250, 245, 253, - 998, 972, 972, 970, 972, 732, 686, 474, 1311, 1312, - 436, 406, 407, 550, 1007, 1002, 670, 1184, 671, 456, - 410, 411, 412, 682, 684, 336, 666, 413, 966, 408, - 705, 345, 350, 351, 552, 563, 873, 553, 957, 552, - 845, 563, 448, 848, 395, 460, 870, 448, 1308, 448, - 1308, 401, 1308, 631, 633, 635, 467, 580, 468, 469, - 615, 1227, 878, 1017, 1070, 1344, 1345, 609, 624, 627, - 628, 629, 630, 651, 652, 653, 708, 736, 1320, 1320, - 1320, 1320, 475, 930, 1122, 882, 979, 1074, 0, 0, - 619, 876, 1117, 0, 275, 0, 1014, 0, 0, 549, - 1229, 549, 0, 1304, 872, 0, 664, 993, 881, 869, - 1069, 1073, 866, 546, 546, 546, 546, 1231, 604, 977, - 1036, 1036, 681, 951, 1226, 0, 1028, 1044, 1045, 0, - 0, 0, 448, 448, 448, 448, 448, 448, 448, 448, - 448, 448, 448, 967, 1072, 448, 0, 431, 1306, 1306, - 1072, 1215, 943, 0, 431, 1216, 1219, 944, 1220, 0, - 1040, 1040, 0, 0, 0, 1115, 885, 665, 1051, 1047, - 1048, 0, 1232, 1233, 599, 1099, 0, 709, 0, 0, - 843, 0, 0, 0, 0, 0, 0, 506, 700, 0, - 1097, 0, 0, 0, 0, 0, 0, 0, 1234, 1294, - 1295, 0, 0, 0, 0, 0, 0, 255, 255, 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, + 212, 213, 214, 855, 478, 279, 279, 279, 279, 623, + 623, 974, 480, 1268, 600, 1268, 1268, 1268, 1268, 1268, + 1268, 1268, 1268, 1268, 1286, 1286, 599, 1099, 1286, 709, + 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 507, + 700, 418, 1097, 1337, 1337, 559, 551, 860, 827, 909, + 904, 905, 918, 861, 906, 858, 907, 908, 859, 457, + 1337, 912, 353, 353, 353, 353, 395, 398, 560, 601, + 605, 1086, 1081, 1082, 1083, 341, 551, 559, 568, 569, + 343, 579, 602, 616, 617, 407, 408, 913, 868, 914, + 670, 22, 671, 350, 411, 412, 413, 423, 684, 611, + 1236, 414, 1236, 880, 439, 346, 867, 1033, 1033, 1236, + 833, 886, 5, 1033, 6, 1033, 1033, 1033, 1033, 1033, + 1033, 1033, 1033, 1033, 573, 848, 1033, 1033, 1033, 1033, + 1318, 1318, 1318, 1318, 1236, 348, 930, 1122, 1326, 1236, + 1236, 1236, 1236, 619, 995, 1236, 1236, 1236, 393, 1014, + 833, 354, 833, 571, 252, 252, 499, 872, 500, 664, + 993, 354, 354, 925, 506, 866, 660, 926, 475, 1311, + 1312, 941, 1132, 941, 354, 354, 848, 1226, 354, 1057, + 1353, 250, 250, 250, 250, 245, 253, 1184, 549, 437, + 549, 553, 1284, 1284, 682, 354, 1284, 549, 1284, 1284, + 1284, 1284, 1284, 1284, 1284, 1284, 1284, 538, 538, 1336, + 1336, 538, 666, 538, 538, 538, 538, 538, 538, 538, + 538, 538, 455, 966, 409, 705, 1336, 968, 968, 968, + 968, 337, 566, 455, 962, 969, 733, 637, 639, 1106, + 1107, 659, 1297, 1339, 957, 683, 687, 1009, 695, 704, + 1005, 609, 624, 627, 628, 629, 630, 651, 652, 653, + 708, 1039, 1038, 686, 845, 552, 563, 449, 449, 449, + 552, 1308, 563, 1308, 870, 396, 461, 631, 633, 635, + 1308, 547, 547, 547, 547, 873, 604, 468, 580, 469, + 470, 851, 402, 878, 553, 848, 1344, 1345, 1227, 998, + 972, 972, 970, 972, 732, 1017, 1320, 1320, 1320, 1320, + 1042, 1043, 550, 1007, 1002, 325, 309, 881, 869, 1069, + 1073, 432, 876, 615, 324, 275, 324, 432, 977, 1231, + 465, 465, 1304, 1040, 1040, 736, 1313, 1314, 476, 465, + 665, 1051, 1047, 1048, 1070, 351, 352, 1036, 1036, 681, + 951, 1074, 967, 1028, 1044, 1045, 882, 1229, 449, 449, + 449, 449, 449, 449, 449, 449, 449, 449, 449, 577, + 614, 449, 0, 1072, 1115, 885, 1117, 1306, 1306, 1072, + 979, 0, 1215, 943, 1232, 1233, 1216, 1219, 944, 1220, + 694, 0, 843, 829, 255, 255, 0, 0, 0, 0, + 0, 0, 694, 0, 0, 0, 694, 0, 0, 0, + 1234, 1294, 1295, 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, @@ -915,7 +907,7 @@ class Php8 extends \PhpParser\ParserAbstract 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, 1012, 1012 + 0, 0, 0, 0, 1012, 1012 ); protected $gotoCheck = array( @@ -935,54 +927,48 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 15, 58, 58, 58, 58, 58, 96, - 23, 23, 23, 23, 107, 107, 129, 64, 107, 64, - 107, 107, 107, 107, 107, 107, 107, 107, 107, 168, - 168, 49, 13, 168, 13, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 6, 75, 75, 15, 43, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 148, - 148, 15, 24, 24, 24, 24, 117, 117, 148, 180, - 180, 15, 15, 15, 15, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 180, 169, 169, 143, 143, - 169, 75, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 46, 180, 46, 22, 72, 72, 72, 72, 72, - 45, 12, 170, 72, 177, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 179, 14, 72, 72, 72, 72, - 9, 9, 9, 9, 72, 14, 14, 118, 118, 72, - 72, 72, 72, 167, 167, 72, 72, 72, 14, 14, - 12, 14, 12, 14, 22, 7, 102, 83, 7, 19, - 35, 19, 72, 19, 14, 83, 72, 7, 14, 61, - 9, 7, 9, 171, 171, 35, 103, 171, 35, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 19, 181, - 181, 176, 176, 19, 19, 19, 19, 5, 5, 19, - 19, 19, 154, 48, 154, 181, 63, 48, 48, 48, - 154, 149, 48, 2, 2, 14, 48, 48, 48, 48, - 48, 48, 25, 113, 5, 5, 5, 5, 5, 5, - 25, 25, 25, 25, 25, 25, 14, 174, 174, 174, - 112, 81, 81, 25, 25, 25, 81, 150, 81, 82, - 81, 81, 81, 115, 81, 29, 119, 81, 92, 92, - 92, 81, 96, 96, 9, 9, 39, 14, 91, 9, - 18, 9, 23, 22, 9, 9, 37, 23, 129, 23, - 129, 28, 129, 84, 84, 84, 9, 9, 9, 9, - 79, 159, 9, 109, 128, 9, 9, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 98, 129, 129, - 129, 129, 156, 17, 17, 41, 95, 131, -1, -1, - 17, 9, 146, -1, 24, -1, 17, -1, -1, 24, - 14, 24, -1, 129, 17, -1, 17, 17, 16, 16, - 16, 16, 17, 106, 106, 106, 106, 20, 106, 16, - 88, 88, 88, 88, 17, -1, 88, 88, 88, -1, - -1, -1, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 16, 129, 23, -1, 116, 129, 129, - 129, 78, 78, -1, 116, 78, 78, 78, 78, -1, - 116, 116, -1, -1, -1, 16, 16, 116, 116, 116, - 116, -1, 20, 20, 8, 8, -1, 8, -1, -1, - 20, -1, -1, -1, -1, -1, -1, 8, 8, -1, - 8, -1, -1, -1, -1, -1, -1, -1, 20, 20, - 20, -1, -1, -1, -1, -1, -1, 5, 5, -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, + 42, 42, 42, 15, 83, 23, 23, 23, 23, 107, + 107, 49, 83, 107, 129, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 168, 168, 8, 8, 168, 8, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 8, + 8, 43, 8, 181, 181, 75, 75, 15, 6, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 82, + 181, 15, 24, 24, 24, 24, 58, 58, 58, 58, + 58, 15, 15, 15, 15, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 81, 81, 64, 35, 64, + 81, 75, 81, 96, 81, 81, 81, 13, 81, 13, + 72, 81, 72, 35, 82, 81, 35, 72, 72, 72, + 12, 45, 46, 72, 46, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 170, 22, 72, 72, 72, 72, + 9, 9, 9, 9, 72, 177, 17, 17, 179, 72, + 72, 72, 72, 17, 102, 72, 72, 72, 61, 17, + 12, 14, 12, 103, 5, 5, 154, 17, 154, 17, + 17, 14, 14, 72, 154, 17, 63, 72, 174, 174, + 174, 9, 149, 9, 14, 14, 22, 17, 14, 113, + 14, 5, 5, 5, 5, 5, 5, 150, 19, 112, + 19, 14, 169, 169, 115, 14, 169, 19, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 171, 171, 180, + 180, 171, 119, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 19, 92, 92, 92, 180, 19, 19, 19, + 19, 29, 48, 19, 19, 19, 48, 48, 48, 143, + 143, 48, 14, 180, 91, 48, 48, 48, 48, 48, + 48, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 117, 117, 14, 18, 9, 9, 23, 23, 23, + 9, 129, 9, 129, 37, 9, 9, 84, 84, 84, + 129, 106, 106, 106, 106, 39, 106, 9, 9, 9, + 9, 25, 28, 9, 14, 22, 9, 9, 159, 25, + 25, 25, 25, 25, 25, 109, 129, 129, 129, 129, + 118, 118, 25, 25, 25, 167, 167, 16, 16, 16, + 16, 116, 9, 79, 24, 24, 24, 116, 16, 20, + 148, 148, 129, 116, 116, 98, 176, 176, 156, 148, + 116, 116, 116, 116, 128, 96, 96, 88, 88, 88, + 88, 131, 16, 88, 88, 88, 41, 14, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 2, + 2, 23, -1, 129, 16, 16, 146, 129, 129, 129, + 95, -1, 78, 78, 20, 20, 78, 78, 78, 78, + 7, -1, 20, 7, 5, 5, -1, -1, -1, -1, + -1, -1, 7, -1, -1, -1, 7, -1, -1, -1, + 20, 20, 20, -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, @@ -990,51 +976,51 @@ class Php8 extends \PhpParser\ParserAbstract -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, 106, 106 + -1, -1, -1, -1, 106, 106 ); protected $gotoBase = array( - 0, 0, -339, 0, 0, 356, 184, 308, 556, -10, - 0, 0, -26, -144, -13, -183, 48, 10, 120, 49, - 116, 0, -15, 167, 219, 378, 18, 22, 105, 118, - 0, 0, 0, 0, 0, -49, 0, 98, 0, 103, - 0, 36, -1, 189, 0, 247, -475, 0, -348, 173, - 0, 0, 0, 0, 0, -33, 0, 0, 119, 0, - 0, 287, 0, 124, 163, -236, 0, 0, 0, 0, - 0, 0, -5, 0, 0, -138, 0, 0, 135, 108, - 101, -88, 130, -150, -34, -698, 0, 0, 230, 0, - 0, 100, 113, 0, 0, 35, -312, 0, 62, 0, - 0, 0, 281, 293, 0, 0, 475, -67, 0, 85, - 0, 0, 122, 110, 0, 131, 266, -54, 13, 125, - 0, 0, 0, 0, 0, 0, 1, 0, 82, 168, - 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -27, 0, 0, 40, 0, 185, 126, - 133, 0, 0, 0, -131, 0, 34, 0, 0, 84, - 0, 0, 0, 0, 0, 0, 0, -18, -52, 5, - 243, 92, 0, 0, 96, 0, -19, 244, 0, 253, - -79, 41, 0, 0 + 0, 0, -183, 0, 0, 313, 188, 543, 178, -10, + 0, 0, -27, -80, 13, -184, 26, -168, 114, 83, + 97, 0, 6, 162, 219, 447, 18, 22, 115, 94, + 0, 0, 0, 0, 0, -122, 0, 95, 0, 122, + 0, 76, -1, 182, 0, 248, -464, 0, -319, 153, + 0, 0, 0, 0, 0, -33, 0, 0, 181, 0, + 0, 266, 0, 84, 233, -236, 0, 0, 0, 0, + 0, 0, -5, 0, 0, -139, 0, 0, 135, 140, + 54, -245, -60, -304, -41, -698, 0, 0, 227, 0, + 0, 75, 78, 0, 0, 98, -229, 0, 89, 0, + 0, 0, 269, 270, 0, 0, 413, -72, 0, 96, + 0, 0, 71, 66, 0, 72, 209, 141, 186, 81, + 0, 0, 0, 0, 0, 0, 1, 0, 131, 166, + 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 124, 0, 0, 93, 0, 456, 87, + 73, 0, 0, 0, -178, 0, 59, 0, 0, 90, + 0, 0, 0, 0, 0, 0, 0, 154, -57, 111, + 255, 126, 0, 0, 27, 0, 125, 265, 0, 267, + 61, -105, 0, 0 ); protected $gotoDefault = array( - -32768, 510, 740, 4, 741, 934, 816, 825, 597, 528, - 707, 346, 625, 420, 1302, 911, 1121, 578, 844, 1245, - 1253, 455, 847, 329, 730, 893, 894, 895, 398, 384, - 390, 396, 649, 626, 492, 879, 451, 871, 484, 874, - 450, 883, 164, 416, 508, 887, 3, 890, 556, 921, - 385, 898, 386, 677, 900, 562, 902, 903, 393, 399, - 400, 1126, 570, 622, 915, 256, 564, 916, 383, 917, - 924, 388, 391, 688, 463, 503, 497, 409, 1101, 565, - 608, 646, 445, 471, 620, 632, 618, 478, 432, 414, - 328, 956, 964, 485, 461, 978, 348, 986, 738, 1134, - 640, 487, 994, 641, 1001, 1004, 529, 530, 476, 1016, - 271, 1019, 488, 19, 667, 1030, 1031, 668, 642, 1053, - 643, 669, 644, 1055, 470, 598, 1063, 452, 1071, 1290, - 453, 1075, 265, 1078, 278, 415, 433, 1084, 1085, 9, - 1091, 698, 699, 11, 276, 507, 1116, 689, 449, 1133, - 437, 1203, 1205, 558, 489, 1223, 1222, 680, 504, 1228, - 446, 1293, 447, 531, 472, 316, 532, 308, 332, 313, - 547, 295, 333, 533, 473, 1299, 1307, 330, 31, 1327, - 1338, 341, 575, 613 + -32768, 511, 740, 4, 741, 934, 816, 825, 597, 529, + 707, 347, 625, 421, 1302, 911, 1121, 578, 844, 1245, + 1253, 456, 847, 330, 730, 893, 894, 895, 399, 385, + 391, 397, 649, 626, 493, 879, 452, 871, 485, 874, + 451, 883, 164, 417, 509, 887, 3, 890, 556, 921, + 386, 898, 387, 677, 900, 562, 902, 903, 394, 400, + 401, 1126, 570, 622, 915, 256, 564, 916, 384, 917, + 924, 389, 392, 688, 464, 504, 498, 410, 1101, 565, + 608, 646, 446, 472, 620, 632, 618, 479, 433, 415, + 329, 956, 964, 486, 462, 978, 349, 986, 738, 1134, + 640, 488, 994, 641, 1001, 1004, 530, 531, 477, 1016, + 272, 1019, 489, 19, 667, 1030, 1031, 668, 642, 1053, + 643, 669, 644, 1055, 471, 598, 1063, 453, 1071, 1290, + 454, 1075, 266, 1078, 278, 416, 434, 1084, 1085, 9, + 1091, 698, 699, 11, 276, 508, 1116, 689, 450, 1133, + 438, 1203, 1205, 558, 490, 1223, 1222, 680, 505, 1228, + 447, 1293, 448, 532, 473, 316, 533, 308, 333, 313, + 548, 295, 334, 534, 474, 1299, 1307, 331, 31, 1327, + 1338, 342, 575, 613 ); protected $ruleToNonTerminal = array( @@ -2660,7 +2646,7 @@ protected function initReduceCallbacks(): void { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); }, 482 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, 483 => function ($stackPos) { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index a02dc39921..3e3f825868 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1633,6 +1633,7 @@ protected function initializeModifierChangeMap(): void { Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], + PrintableNewAnonClassNode::class . '->flags' => ['pModifiers', \T_CLASS], Param::class . '->flags' => ['pModifiers', \T_VARIABLE], Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index a2b68f4e2e..781256a1ef 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -210,6 +210,7 @@ public function testFormatPreservingPrint($name, $code, $modification, $expected use PhpParser\Node\Expr; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; +use PhpParser\Modifiers; \$fn = function(&\$stmts) { $modification }; CODE ); diff --git a/test/code/formatPreservation/modifierChange.test b/test/code/formatPreservation/modifierChange.test index 0c4f6cc497..af74aa2891 100644 --- a/test/code/formatPreservation/modifierChange.test +++ b/test/code/formatPreservation/modifierChange.test @@ -55,3 +55,14 @@ function test( public T3 $z = 'x', ) {} +----- +expr->class->flags = Modifiers::READONLY; +$stmts[1]->expr->class->flags = 0; +----- +a = $a; } }; +new readonly class {}; ----- new class { @@ -25,3 +26,6 @@ new class($a) extends A $this->a = $a; } }; +new readonly class +{ +}; From 0a8a333a4a15482a1c5f509b06c41de8c60a76fc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 May 2023 21:21:45 +0200 Subject: [PATCH 246/428] Blacklist test with comments in intersection types --- test_old/run.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_old/run.php b/test_old/run.php index 7eb956622b..e76c350b0f 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -107,6 +107,8 @@ function showHelp($error) { # whitespace in namespaced name | Zend.tests.bug55086 | Zend.tests.grammar.regression_010 +# not worth emulating on old PHP versions +| Zend.tests.type_declarations.intersection_types.parsing_comment )\.phpt$~x', $file)) { return null; } From 93731c5cfa2c87cfb31768e9e5aa06b0d72e1aa3 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 May 2023 21:37:34 +0200 Subject: [PATCH 247/428] Move constants from NodeTraverser to NodeVisitor These are really part of the NodeVisitor API. Retain aliases for compatibility. --- doc/2_Usage_of_basic_components.markdown | 4 +- lib/PhpParser/NodeTraverser.php | 51 +++++++------------ lib/PhpParser/NodeVisitor.php | 35 +++++++++++++ .../NodeVisitor/FirstFindingVisitor.php | 3 +- test/PhpParser/NodeTraverserTest.php | 24 ++++----- tools/fuzzing/target.php | 3 +- 6 files changed, 71 insertions(+), 49 deletions(-) diff --git a/doc/2_Usage_of_basic_components.markdown b/doc/2_Usage_of_basic_components.markdown index 2a0a89bee3..22daa80341 100644 --- a/doc/2_Usage_of_basic_components.markdown +++ b/doc/2_Usage_of_basic_components.markdown @@ -493,7 +493,7 @@ The last thing we need to do is remove the `namespace` and `use` statements: ```php use PhpParser\Node; use PhpParser\Node\Stmt; -use PhpParser\NodeTraverser; +use PhpParser\NodeVisitor; class NodeVisitor_NamespaceConverter extends \PhpParser\NodeVisitorAbstract { @@ -513,7 +513,7 @@ class NodeVisitor_NamespaceConverter extends \PhpParser\NodeVisitorAbstract return $node->stmts; } elseif ($node instanceof Stmt\Use_) { // remove use nodes altogether - return NodeTraverser::REMOVE_NODE; + return NodeVisitor::REMOVE_NODE; } } } diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index b338e981ce..710abe7e99 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -4,39 +4,24 @@ 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. + * @deprecated Use NodeVisitor::DONT_TRAVERSE_CHILDREN instead. */ - public const DONT_TRAVERSE_CHILDREN = 1; + public const DONT_TRAVERSE_CHILDREN = NodeVisitor::DONT_TRAVERSE_CHILDREN; /** - * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns - * STOP_TRAVERSAL, traversal is aborted. - * - * The afterTraverse() method will still be invoked. + * @deprecated Use NodeVisitor::STOP_TRAVERSAL instead. */ - public const STOP_TRAVERSAL = 2; + public const STOP_TRAVERSAL = NodeVisitor::STOP_TRAVERSAL; /** - * 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. + * @deprecated Use NodeVisitor::REMOVE_NODE instead. */ - public const REMOVE_NODE = 3; + public const REMOVE_NODE = NodeVisitor::REMOVE_NODE; /** - * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CURRENT_AND_CHILDREN, child nodes - * of the current node will not be traversed for any visitors. - * - * For subsequent visitors enterNode() will not be called as well. - * leaveNode() will be invoked for visitors that has enterNode() method invoked. + * @deprecated Use NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN instead. */ - public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4; + public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN; /** @var list Visitors */ protected $visitors = []; @@ -124,13 +109,13 @@ protected function traverseNode(Node $node): Node { if ($return instanceof Node) { $this->ensureReplacementReasonable($subNode, $return); $subNode = $return; - } elseif (self::DONT_TRAVERSE_CHILDREN === $return) { + } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { $traverseChildren = false; - } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { + } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { $traverseChildren = false; $breakVisitorIndex = $visitorIndex; break; - } elseif (self::STOP_TRAVERSAL === $return) { + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; } else { @@ -155,7 +140,7 @@ protected function traverseNode(Node $node): Node { if ($return instanceof Node) { $this->ensureReplacementReasonable($subNode, $return); $subNode = $return; - } elseif (self::STOP_TRAVERSAL === $return) { + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; } elseif (\is_array($return)) { @@ -204,16 +189,16 @@ protected function traverseArray(array $nodes): array { } elseif (\is_array($return)) { $doNodes[] = [$i, $return]; continue 2; - } elseif (self::REMOVE_NODE === $return) { + } elseif (NodeVisitor::REMOVE_NODE === $return) { $doNodes[] = [$i, []]; continue 2; - } elseif (self::DONT_TRAVERSE_CHILDREN === $return) { + } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { $traverseChildren = false; - } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { + } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { $traverseChildren = false; $breakVisitorIndex = $visitorIndex; break; - } elseif (self::STOP_TRAVERSAL === $return) { + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; } else { @@ -241,10 +226,10 @@ protected function traverseArray(array $nodes): array { } elseif (\is_array($return)) { $doNodes[] = [$i, $return]; break; - } elseif (self::REMOVE_NODE === $return) { + } elseif (NodeVisitor::REMOVE_NODE === $return) { $doNodes[] = [$i, []]; break; - } elseif (self::STOP_TRAVERSAL === $return) { + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; } else { diff --git a/lib/PhpParser/NodeVisitor.php b/lib/PhpParser/NodeVisitor.php index 06c694bf02..8acadba7f8 100644 --- a/lib/PhpParser/NodeVisitor.php +++ b/lib/PhpParser/NodeVisitor.php @@ -3,6 +3,41 @@ namespace PhpParser; interface NodeVisitor { + /** + * 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. + */ + public const DONT_TRAVERSE_CHILDREN = 1; + + /** + * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns + * STOP_TRAVERSAL, traversal is aborted. + * + * The afterTraverse() method will still be invoked. + */ + public const STOP_TRAVERSAL = 2; + + /** + * 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. + */ + public const REMOVE_NODE = 3; + + /** + * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CURRENT_AND_CHILDREN, child nodes + * of the current node will not be traversed for any visitors. + * + * For subsequent visitors enterNode() will not be called as well. + * leaveNode() will be invoked for visitors that has enterNode() method invoked. + */ + public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4; + /** * Called once before traversal. * diff --git a/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php index 2f7c101bed..497657af9a 100644 --- a/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ b/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php @@ -4,6 +4,7 @@ use PhpParser\Node; use PhpParser\NodeTraverser; +use PhpParser\NodeVisitor; use PhpParser\NodeVisitorAbstract; /** @@ -41,7 +42,7 @@ public function enterNode(Node $node) { $filterCallback = $this->filterCallback; if ($filterCallback($node)) { $this->foundNode = $node; - return NodeTraverser::STOP_TRAVERSAL; + return NodeVisitor::STOP_TRAVERSAL; } return null; diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index 26f3d12ba5..f7be308a3c 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -66,7 +66,7 @@ public function testRemoveFromLeave() { $str2Node = new String_('Bar'); $visitor = new NodeVisitorForTesting([ - ['leaveNode', $str1Node, NodeTraverser::REMOVE_NODE], + ['leaveNode', $str1Node, NodeVisitor::REMOVE_NODE], ]); $visitor2 = new NodeVisitorForTesting(); @@ -90,7 +90,7 @@ public function testRemoveFromEnter() { $str2Node = new String_('Bar'); $visitor = new NodeVisitorForTesting([ - ['enterNode', $str1Node, NodeTraverser::REMOVE_NODE], + ['enterNode', $str1Node, NodeVisitor::REMOVE_NODE], ]); $visitor2 = new NodeVisitorForTesting(); @@ -172,10 +172,10 @@ public function testDontTraverseChildren() { $stmts = [$printNode, $negNode]; $visitor1 = new NodeVisitorForTesting([ - ['enterNode', $printNode, NodeTraverser::DONT_TRAVERSE_CHILDREN], + ['enterNode', $printNode, NodeVisitor::DONT_TRAVERSE_CHILDREN], ]); $visitor2 = new NodeVisitorForTesting([ - ['enterNode', $mulNode, NodeTraverser::DONT_TRAVERSE_CHILDREN], + ['enterNode', $mulNode, NodeVisitor::DONT_TRAVERSE_CHILDREN], ]); $expectedTrace = [ @@ -209,8 +209,8 @@ public function testDontTraverseCurrentAndChildren() { $stmts = [$printNode, $negNode]; $visitor1 = new NodeVisitorForTesting([ - ['enterNode', $printNode, NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN], - ['enterNode', $mulNode, NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN], + ['enterNode', $printNode, NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN], + ['enterNode', $mulNode, NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN], ['leaveNode', $mulNode, $divNode], ]); $visitor2 = new NodeVisitorForTesting(); @@ -250,7 +250,7 @@ public function testStopTraversal() { // From enterNode() with array parent $visitor = new NodeVisitorForTesting([ - ['enterNode', $mulNode, NodeTraverser::STOP_TRAVERSAL], + ['enterNode', $mulNode, NodeVisitor::STOP_TRAVERSAL], ]); $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); @@ -263,7 +263,7 @@ public function testStopTraversal() { // From enterNode with Node parent $visitor = new NodeVisitorForTesting([ - ['enterNode', $varNode1, NodeTraverser::STOP_TRAVERSAL], + ['enterNode', $varNode1, NodeVisitor::STOP_TRAVERSAL], ]); $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); @@ -277,7 +277,7 @@ public function testStopTraversal() { // From leaveNode with Node parent $visitor = new NodeVisitorForTesting([ - ['leaveNode', $varNode1, NodeTraverser::STOP_TRAVERSAL], + ['leaveNode', $varNode1, NodeVisitor::STOP_TRAVERSAL], ]); $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); @@ -292,7 +292,7 @@ public function testStopTraversal() { // From leaveNode with array parent $visitor = new NodeVisitorForTesting([ - ['leaveNode', $mulNode, NodeTraverser::STOP_TRAVERSAL], + ['leaveNode', $mulNode, NodeVisitor::STOP_TRAVERSAL], ]); $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); @@ -310,8 +310,8 @@ public function testStopTraversal() { // Check that pending array modifications are still carried out $visitor = new NodeVisitorForTesting([ - ['leaveNode', $mulNode, NodeTraverser::REMOVE_NODE], - ['enterNode', $printNode, NodeTraverser::STOP_TRAVERSAL], + ['leaveNode', $mulNode, NodeVisitor::REMOVE_NODE], + ['enterNode', $printNode, NodeVisitor::STOP_TRAVERSAL], ]); $traverser = new NodeTraverser(); $traverser->addVisitor($visitor); diff --git a/tools/fuzzing/target.php b/tools/fuzzing/target.php index 1057a493b5..f876727a4e 100644 --- a/tools/fuzzing/target.php +++ b/tools/fuzzing/target.php @@ -5,6 +5,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; +use PhpParser\NodeVisitor; if (class_exists(PhpParser\Parser\Php7::class)) { echo "The PHP-Parser target can only be used with php-fuzzer.phar,\n"; @@ -51,7 +52,7 @@ public function beforeTraverse(array $nodes) { public function leaveNode(PhpParser\Node $node) { // We don't precisely preserve nop statements. if ($node instanceof Stmt\Nop) { - return PhpParser\NodeTraverser::REMOVE_NODE; + return NodeVisitor::REMOVE_NODE; } // We don't precisely preserve redundant trailing commas in array destructuring. From a5d4c1005ce0fca36056184f1959a4eb705c5243 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 May 2023 21:40:55 +0200 Subject: [PATCH 248/428] Remove some unused symbols --- lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php | 2 +- lib/PhpParser/Node/Stmt/Class_.php | 1 - lib/PhpParser/Node/UseItem.php | 1 - lib/PhpParser/NodeDumper.php | 1 - lib/PhpParser/NodeVisitor/FirstFindingVisitor.php | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php index 197f505280..9803f99688 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php @@ -45,7 +45,7 @@ private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { public function reverseEmulate(string $code, array $tokens): array { $keywordToken = $this->getKeywordToken(); - foreach ($tokens as $i => $token) { + foreach ($tokens as $token) { if ($token->id === $keywordToken) { $token->id = \T_STRING; } diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 98bf9fd7c0..711960653c 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -2,7 +2,6 @@ namespace PhpParser\Node\Stmt; -use PhpParser\Error; use PhpParser\Modifiers; use PhpParser\Node; diff --git a/lib/PhpParser/Node/UseItem.php b/lib/PhpParser/Node/UseItem.php index 8c8fb0656a..c0b36e004a 100644 --- a/lib/PhpParser/Node/UseItem.php +++ b/lib/PhpParser/Node/UseItem.php @@ -3,7 +3,6 @@ namespace PhpParser\Node; use PhpParser\Node; -use PhpParser\Node\Identifier; use PhpParser\Node\Stmt\Use_; class UseItem extends Node\Stmt { diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index 753f767c7a..a83dc2936e 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -3,7 +3,6 @@ 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\UseItem; diff --git a/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php index 497657af9a..14731556c1 100644 --- a/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ b/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php @@ -3,7 +3,6 @@ namespace PhpParser\NodeVisitor; use PhpParser\Node; -use PhpParser\NodeTraverser; use PhpParser\NodeVisitor; use PhpParser\NodeVisitorAbstract; From 74caed6446f707bd3d809b723d504693fcaf3f28 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 May 2023 21:55:53 +0200 Subject: [PATCH 249/428] Fix labelCharMap for DEL character This map is supposed to have string keys, not integer keys. --- lib/PhpParser/PrettyPrinterAbstract.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 3e3f825868..658a167562 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1249,7 +1249,7 @@ protected function initializeLabelCharMap(): void { } if ($this->phpVersion->allowsDelInIdentifiers()) { - $this->labelCharMap[0x7f] = true; + $this->labelCharMap["\x7f"] = true; } } From a9dad5c54e9a98d42ad3146a605e9f71b5fb56e5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 May 2023 22:01:01 +0200 Subject: [PATCH 250/428] Fix type of ClassConst::$type --- lib/PhpParser/Node/Stmt/ClassConst.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/Node/Stmt/ClassConst.php b/lib/PhpParser/Node/Stmt/ClassConst.php index 38527bb839..44f0cc31d2 100644 --- a/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/lib/PhpParser/Node/Stmt/ClassConst.php @@ -12,7 +12,7 @@ class ClassConst extends Node\Stmt { public $consts; /** @var Node\AttributeGroup[] PHP attribute groups */ public $attrGroups; - /** @var Node\Identifier|Node\Name|Node\ComplexType Type declaration */ + /** @var Node\Identifier|Node\Name|Node\ComplexType|null Type declaration */ public $type; /** @@ -35,7 +35,7 @@ public function __construct( $this->flags = $flags; $this->consts = $consts; $this->attrGroups = $attrGroups; - $this->type = $type; + $this->type = \is_string($type) ? new Node\Identifier($type) : $type; } public function getSubNodeNames(): array { From c23976a299f63073d365aab9c6e1fb145d0bccd4 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 May 2023 22:12:04 +0200 Subject: [PATCH 251/428] Stop accepting strings as types For types the use of a string is ambiguous -- it could be either an Identifier or a Name. Don't guess. Retain the implicit promotion to Identifier in places where only Identifier is legal, e.g. various symbol names. --- lib/PhpParser/Node/Expr/ArrowFunction.php | 5 ++--- lib/PhpParser/Node/Expr/Closure.php | 5 ++--- lib/PhpParser/Node/NullableType.php | 8 +++++--- lib/PhpParser/Node/Param.php | 7 ++++--- lib/PhpParser/Node/Stmt/ClassConst.php | 6 +++--- lib/PhpParser/Node/Stmt/ClassMethod.php | 5 ++--- lib/PhpParser/Node/Stmt/Function_.php | 5 ++--- lib/PhpParser/Node/Stmt/Property.php | 6 +++--- test/PhpParser/BuilderHelpersTest.php | 3 ++- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/lib/PhpParser/Node/Expr/ArrowFunction.php b/lib/PhpParser/Node/Expr/ArrowFunction.php index 98e24a5104..f9b4ec3667 100644 --- a/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -30,7 +30,7 @@ class ArrowFunction extends Expr implements FunctionLike { * static?: bool, * byRef?: bool, * params?: Node\Param[], - * returnType?: null|string|Node\Identifier|Node\Name|Node\ComplexType, + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, * attrGroups?: Node\AttributeGroup[] * } $subNodes Array of the following subnodes: * 'expr' : Expression body @@ -46,8 +46,7 @@ public function __construct(array $subNodes, array $attributes = []) { $this->static = $subNodes['static'] ?? false; $this->byRef = $subNodes['byRef'] ?? false; $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->expr = $subNodes['expr']; $this->attrGroups = $subNodes['attrGroups'] ?? []; } diff --git a/lib/PhpParser/Node/Expr/Closure.php b/lib/PhpParser/Node/Expr/Closure.php index ee257d49db..ddb4e0b7a2 100644 --- a/lib/PhpParser/Node/Expr/Closure.php +++ b/lib/PhpParser/Node/Expr/Closure.php @@ -31,7 +31,7 @@ class Closure extends Expr implements FunctionLike { * byRef?: bool, * params?: Node\Param[], * uses?: ClosureUse[], - * returnType?: null|string|Node\Identifier|Node\Name|Node\ComplexType, + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, * stmts?: Node\Stmt[], * attrGroups?: Node\AttributeGroup[], * } $subNodes Array of the following optional subnodes: @@ -50,8 +50,7 @@ public function __construct(array $subNodes = [], array $attributes = []) { $this->byRef = $subNodes['byRef'] ?? false; $this->params = $subNodes['params'] ?? []; $this->uses = $subNodes['uses'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } diff --git a/lib/PhpParser/Node/NullableType.php b/lib/PhpParser/Node/NullableType.php index e86d097424..847b65734a 100644 --- a/lib/PhpParser/Node/NullableType.php +++ b/lib/PhpParser/Node/NullableType.php @@ -2,6 +2,8 @@ namespace PhpParser\Node; +use PhpParser\Node; + class NullableType extends ComplexType { /** @var Identifier|Name Type */ public $type; @@ -9,12 +11,12 @@ class NullableType extends ComplexType { /** * Constructs a nullable type (wrapping another type). * - * @param string|Identifier|Name $type Type + * @param Identifier|Name $type Type * @param array $attributes Additional attributes */ - public function __construct($type, array $attributes = []) { + public function __construct(Node $type, array $attributes = []) { $this->attributes = $attributes; - $this->type = \is_string($type) ? new Identifier($type) : $type; + $this->type = $type; } public function getSubNodeNames(): array { diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index ef110531bb..0732c57437 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -3,6 +3,7 @@ namespace PhpParser\Node; use PhpParser\Modifiers; +use PhpParser\Node; use PhpParser\NodeAbstract; class Param extends NodeAbstract { @@ -26,7 +27,7 @@ class Param extends NodeAbstract { * * @param Expr\Variable|Expr\Error $var Parameter variable * @param null|Expr $default Default value - * @param null|string|Identifier|Name|ComplexType $type Type declaration + * @param null|Identifier|Name|ComplexType $type Type declaration * @param bool $byRef Whether is passed by reference * @param bool $variadic Whether this is a variadic argument * @param array $attributes Additional attributes @@ -34,14 +35,14 @@ class Param extends NodeAbstract { * @param list $attrGroups PHP attribute groups */ public function __construct( - $var, ?Expr $default = null, $type = null, + $var, ?Expr $default = null, ?Node $type = null, bool $byRef = false, bool $variadic = false, array $attributes = [], int $flags = 0, array $attrGroups = [] ) { $this->attributes = $attributes; - $this->type = \is_string($type) ? new Identifier($type) : $type; + $this->type = $type; $this->byRef = $byRef; $this->variadic = $variadic; $this->var = $var; diff --git a/lib/PhpParser/Node/Stmt/ClassConst.php b/lib/PhpParser/Node/Stmt/ClassConst.php index 44f0cc31d2..a5e467ab89 100644 --- a/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/lib/PhpParser/Node/Stmt/ClassConst.php @@ -22,20 +22,20 @@ class ClassConst extends Node\Stmt { * @param int $flags Modifiers * @param array $attributes Additional attributes * @param list $attrGroups PHP attribute groups - * @param null|string|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration + * @param null|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration */ public function __construct( array $consts, int $flags = 0, array $attributes = [], array $attrGroups = [], - $type = null + ?Node $type = null ) { $this->attributes = $attributes; $this->flags = $flags; $this->consts = $consts; $this->attrGroups = $attrGroups; - $this->type = \is_string($type) ? new Node\Identifier($type) : $type; + $this->type = $type; } public function getSubNodeNames(): array { diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index 3cadfd86d9..aa6424b6dc 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -51,7 +51,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike { * flags?: int, * byRef?: bool, * params?: Node\Param[], - * returnType?: null|string|Node\Identifier|Node\Name|Node\ComplexType, + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, * stmts?: Node\Stmt[]|null, * attrGroups?: Node\AttributeGroup[], * } $subNodes Array of the following optional subnodes: @@ -69,8 +69,7 @@ public function __construct($name, array $subNodes = [], array $attributes = []) $this->byRef = $subNodes['byRef'] ?? false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } diff --git a/lib/PhpParser/Node/Stmt/Function_.php b/lib/PhpParser/Node/Stmt/Function_.php index 8948e21112..feb5edfe7b 100644 --- a/lib/PhpParser/Node/Stmt/Function_.php +++ b/lib/PhpParser/Node/Stmt/Function_.php @@ -29,7 +29,7 @@ class Function_ extends Node\Stmt implements FunctionLike { * @param array{ * byRef?: bool, * params?: Node\Param[], - * returnType?: null|string|Node\Identifier|Node\Name|Node\ComplexType, + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, * stmts?: Node\Stmt[], * attrGroups?: Node\AttributeGroup[], * } $subNodes Array of the following optional subnodes: @@ -45,8 +45,7 @@ public function __construct($name, array $subNodes = [], array $attributes = []) $this->byRef = $subNodes['byRef'] ?? false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index 279207fd18..5d6682744a 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -25,14 +25,14 @@ class Property extends Node\Stmt { * @param int $flags Modifiers * @param PropertyItem[] $props Properties * @param array $attributes Additional attributes - * @param null|string|Identifier|Name|ComplexType $type Type declaration + * @param null|Identifier|Name|ComplexType $type Type declaration * @param Node\AttributeGroup[] $attrGroups PHP attribute groups */ - public function __construct(int $flags, array $props, array $attributes = [], $type = null, array $attrGroups = []) { + public function __construct(int $flags, array $props, array $attributes = [], ?Node $type = null, array $attrGroups = []) { $this->attributes = $attributes; $this->flags = $flags; $this->props = $props; - $this->type = \is_string($type) ? new Identifier($type) : $type; + $this->type = $type; $this->attrGroups = $attrGroups; } diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index 493e71e90a..d70be9d8ce 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -3,6 +3,7 @@ namespace PhpParser; use PhpParser\Builder\Class_; +use PhpParser\Node\Identifier; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; use PhpParser\Node\Expr; @@ -136,7 +137,7 @@ public function testNormalizeType() { $intName = new Node\Name('int'); $this->assertSame($intName, BuilderHelpers::normalizeType($intName)); - $intNullable = new Node\NullableType('int'); + $intNullable = new Node\NullableType(new Identifier('int')); $this->assertSame($intNullable, BuilderHelpers::normalizeType($intNullable)); $unionType = new Node\UnionType([new Node\Identifier('int'), new Node\Identifier('string')]); From fb2c3ac97c3ca6aeafac1a5d93f014f095407fde Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 May 2023 22:26:53 +0200 Subject: [PATCH 252/428] Fix emulative lexer with default error handler If no error handler is provided, explicitly create one, so we don't end up calling handleError() on null. --- lib/PhpParser/Lexer/Emulative.php | 4 ++++ test/PhpParser/LexerTest.php | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 054cc73486..8993144d5e 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -85,6 +85,10 @@ public function startLexing(string $code, ?ErrorHandler $errorHandler = null): v return; } + if ($errorHandler === null) { + $errorHandler = new ErrorHandler\Throwing(); + } + $this->patches = []; foreach ($emulators as $emulator) { $code = $emulator->preprocessCode($code, $this->patches); diff --git a/test/PhpParser/LexerTest.php b/test/PhpParser/LexerTest.php index 2d6b8c92c2..4538280c0b 100644 --- a/test/PhpParser/LexerTest.php +++ b/test/PhpParser/LexerTest.php @@ -47,6 +47,14 @@ public function provideTestError() { ]; } + public function testDefaultErrorHandler() { + $this->expectException(Error::class); + $this->expectExceptionMessage('Unterminated comment on line 1'); + $lexer = $this->getLexer(); + $lexer->startLexing("getNextToken(); + } + /** * @dataProvider provideTestLex */ From 8bc698248db9b6428d7ec3012fb9069a4ca9a02e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 May 2023 12:07:21 +0200 Subject: [PATCH 253/428] Ensure removing visitor does not leave holes --- lib/PhpParser/NodeTraverser.php | 8 +++----- test/PhpParser/NodeTraverserTest.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 710abe7e99..d91fe4c810 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -48,11 +48,9 @@ public function addVisitor(NodeVisitor $visitor): void { * @param NodeVisitor $visitor */ public function removeVisitor(NodeVisitor $visitor): void { - foreach ($this->visitors as $index => $storedVisitor) { - if ($storedVisitor === $visitor) { - unset($this->visitors[$index]); - break; - } + $index = array_search($visitor, $this->visitors); + if ($index !== false) { + array_splice($this->visitors, $index, 1, []); } } diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index f7be308a3c..b045adb8e7 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -348,7 +348,7 @@ public function testRemovingVisitor() { $traverser->removeVisitor($visitor2); - $postExpected = [0 => $visitor1, 2 => $visitor3]; + $postExpected = [$visitor1, $visitor3]; $this->assertSame($postExpected, $getVisitors()); } From 8490c0e82d8ee09e37a2e426af773da9661cbd29 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 May 2023 12:31:15 +0200 Subject: [PATCH 254/428] Call leaveNode() on visitors in reverse order Node visitation is now properly nested. The call sequence will now be $visitor1->enterNode($n); $visitor2->enterNode($n); $visitor2->leaveNode($n); $visitor1->leaveNode($n); rather than $visitor1->enterNode($n); $visitor2->enterNode($n); $visitor1->leaveNode($n); $visitor2->leaveNode($n); Fixes #899. --- lib/PhpParser/NodeTraverser.php | 23 ++++++++------------- test/PhpParser/NodeTraverserTest.php | 30 ++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index d91fe4c810..eff2a371b3 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -72,7 +72,8 @@ public function traverse(array $nodes): array { $nodes = $this->traverseArray($nodes); - foreach ($this->visitors as $visitor) { + for ($i = \count($this->visitors) - 1; $i >= 0; --$i) { + $visitor = $this->visitors[$i]; if (null !== $return = $visitor->afterTraverse($nodes)) { $nodes = $return; } @@ -99,7 +100,7 @@ protected function traverseNode(Node $node): Node { } } elseif ($subNode instanceof Node) { $traverseChildren = true; - $breakVisitorIndex = null; + $visitorIndex = -1; foreach ($this->visitors as $visitorIndex => $visitor) { $return = $visitor->enterNode($subNode); @@ -111,7 +112,6 @@ protected function traverseNode(Node $node): Node { $traverseChildren = false; } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { $traverseChildren = false; - $breakVisitorIndex = $visitorIndex; break; } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; @@ -131,7 +131,8 @@ protected function traverseNode(Node $node): Node { } } - foreach ($this->visitors as $visitorIndex => $visitor) { + for (; $visitorIndex >= 0; --$visitorIndex) { + $visitor = $this->visitors[$visitorIndex]; $return = $visitor->leaveNode($subNode); if (null !== $return) { @@ -152,10 +153,6 @@ protected function traverseNode(Node $node): Node { ); } } - - if ($breakVisitorIndex === $visitorIndex) { - break; - } } } } @@ -176,7 +173,7 @@ protected function traverseArray(array $nodes): array { foreach ($nodes as $i => &$node) { if ($node instanceof Node) { $traverseChildren = true; - $breakVisitorIndex = null; + $visitorIndex = -1; foreach ($this->visitors as $visitorIndex => $visitor) { $return = $visitor->enterNode($node); @@ -194,7 +191,6 @@ protected function traverseArray(array $nodes): array { $traverseChildren = false; } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { $traverseChildren = false; - $breakVisitorIndex = $visitorIndex; break; } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; @@ -214,7 +210,8 @@ protected function traverseArray(array $nodes): array { } } - foreach ($this->visitors as $visitorIndex => $visitor) { + for (; $visitorIndex >= 0; --$visitorIndex) { + $visitor = $this->visitors[$visitorIndex]; $return = $visitor->leaveNode($node); if (null !== $return) { @@ -236,10 +233,6 @@ protected function traverseArray(array $nodes): array { ); } } - - if ($breakVisitorIndex === $visitorIndex) { - break; - } } } elseif (\is_array($node)) { throw new \LogicException('Invalid node structure: Contains nested arrays'); diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index b045adb8e7..50a16cb9d4 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -34,8 +34,9 @@ public function testModifying() { $str2Node = new String_('Bar'); $printNode = new Expr\Print_($str1Node); - // first visitor changes the node, second verifies the change - $visitor1 = new NodeVisitorForTesting([ + // Visitor 2 performs changes, visitors 1 and 3 observe the changes. + $visitor1 = new NodeVisitorForTesting(); + $visitor2 = new NodeVisitorForTesting([ ['beforeTraverse', [], [$str1Node]], ['enterNode', $str1Node, $printNode], ['enterNode', $str1Node, $str2Node], @@ -43,22 +44,35 @@ public function testModifying() { ['leaveNode', $printNode, $str1Node], ['afterTraverse', [$str1Node], []], ]); - $visitor2 = new NodeVisitorForTesting(); + $visitor3 = new NodeVisitorForTesting(); $traverser = new NodeTraverser(); $traverser->addVisitor($visitor1); $traverser->addVisitor($visitor2); + $traverser->addVisitor($visitor3); // as all operations are reversed we end where we start $this->assertEquals([], $traverser->traverse([])); $this->assertEquals([ - ['beforeTraverse', [$str1Node]], - ['enterNode', $printNode], - ['enterNode', $str2Node], + // Sees nodes before changes on entry. + ['beforeTraverse', []], + ['enterNode', $str1Node], + ['enterNode', $str1Node], + // Sees nodes after changes on leave. ['leaveNode', $str1Node], ['leaveNode', $str1Node], ['afterTraverse', []], - ], $visitor2->trace); + ], $visitor1->trace); + $this->assertEquals([ + // Sees nodes after changes on entry. + ['beforeTraverse', [$str1Node]], + ['enterNode', $printNode], + ['enterNode', $str2Node], + // Sees nodes before changes on leave. + ['leaveNode', $str2Node], + ['leaveNode', $printNode], + ['afterTraverse', [$str1Node]], + ], $visitor3->trace); } public function testRemoveFromLeave() { @@ -71,8 +85,8 @@ public function testRemoveFromLeave() { $visitor2 = new NodeVisitorForTesting(); $traverser = new NodeTraverser(); - $traverser->addVisitor($visitor); $traverser->addVisitor($visitor2); + $traverser->addVisitor($visitor); $stmts = [$str1Node, $str2Node]; $this->assertEquals([$str2Node], $traverser->traverse($stmts)); From 289756d0568bef538cd0114f131daef6a7d626d8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 May 2023 15:12:43 +0200 Subject: [PATCH 255/428] Gracefully handle non-contiguous arrays in Differ Fixes #909. --- lib/PhpParser/Internal/Differ.php | 2 ++ test/PhpParser/Internal/DifferTest.php | 11 +++++++++++ test/code/formatPreservation/listRemoval.test | 14 +++++++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/Internal/Differ.php b/lib/PhpParser/Internal/Differ.php index bee9f07841..baaad87f46 100644 --- a/lib/PhpParser/Internal/Differ.php +++ b/lib/PhpParser/Internal/Differ.php @@ -33,6 +33,8 @@ public function __construct(callable $isEqual) { * @return DiffElem[] Diff (edit script) */ public function diff(array $old, array $new): array { + $old = \array_values($old); + $new = \array_values($new); list($trace, $x, $y) = $this->calculateTrace($old, $new); return $this->extractDiff($trace, $x, $y, $old, $new); } diff --git a/test/PhpParser/Internal/DifferTest.php b/test/PhpParser/Internal/DifferTest.php index 8ff3cb5c2e..8b84c1a0d5 100644 --- a/test/PhpParser/Internal/DifferTest.php +++ b/test/PhpParser/Internal/DifferTest.php @@ -65,4 +65,15 @@ public function provideTestDiffWithReplacements() { ['abcde', 'axyzue', 'a-b-c-d+x+y+z+ue'], ]; } + + public function testNonContiguousIndices() { + $differ = new Differ(function ($a, $b) { + return $a === $b; + }); + $diff = $differ->diff([0 => 'a', 2 => 'b'], [0 => 'a', 3 => 'b']); + $this->assertEquals([ + new DiffElem(DiffElem::TYPE_KEEP, 'a', 'a'), + new DiffElem(DiffElem::TYPE_KEEP, 'b', 'b'), + ], $diff); + } } diff --git a/test/code/formatPreservation/listRemoval.test b/test/code/formatPreservation/listRemoval.test index b08770242b..aa276844c3 100644 --- a/test/code/formatPreservation/listRemoval.test +++ b/test/code/formatPreservation/listRemoval.test @@ -207,4 +207,16 @@ class Foo function getBaz() { } -} \ No newline at end of file +} +----- +stmts[0]->traits[0]); +----- + Date: Sun, 21 May 2023 15:41:41 +0200 Subject: [PATCH 256/428] Add support for NodeVisitor::REPLACE_WITH_NULL Fixes #716. --- lib/PhpParser/NodeTraverser.php | 12 +++++++ lib/PhpParser/NodeVisitor.php | 23 +++++++++---- test/PhpParser/NodeTraverserTest.php | 49 ++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 6 deletions(-) diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index eff2a371b3..05e0a2c639 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -116,6 +116,9 @@ protected function traverseNode(Node $node): Node { } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + $subNode = null; + continue 2; } else { throw new \LogicException( 'enterNode() returned invalid value of type ' . gettype($return) @@ -142,6 +145,9 @@ protected function traverseNode(Node $node): Node { } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + $subNode = null; + break; } elseif (\is_array($return)) { throw new \LogicException( 'leaveNode() may only return an array ' . @@ -195,6 +201,9 @@ protected function traverseArray(array $nodes): array { } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + throw new \LogicException( + 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); } else { throw new \LogicException( 'enterNode() returned invalid value of type ' . gettype($return) @@ -227,6 +236,9 @@ protected function traverseArray(array $nodes): array { } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + throw new \LogicException( + 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); } else { throw new \LogicException( 'leaveNode() returned invalid value of type ' . gettype($return) diff --git a/lib/PhpParser/NodeVisitor.php b/lib/PhpParser/NodeVisitor.php index 8acadba7f8..0ec4f7beb2 100644 --- a/lib/PhpParser/NodeVisitor.php +++ b/lib/PhpParser/NodeVisitor.php @@ -38,6 +38,13 @@ interface NodeVisitor { */ public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4; + /** + * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns REPLACE_WITH_NULL, + * the node will be replaced with null. This is not a legal return value if the node is part + * of an array, rather than another node. + */ + public const REPLACE_WITH_NULL = 5; + /** * Called once before traversal. * @@ -59,14 +66,16 @@ public function beforeTraverse(array $nodes); * => $node stays as-is * * array (of Nodes) * => The return value is merged into the parent array (at the position of the $node) - * * NodeTraverser::REMOVE_NODE + * * NodeVisitor::REMOVE_NODE * => $node is removed from the parent array - * * NodeTraverser::DONT_TRAVERSE_CHILDREN + * * NodeVisitor::REPLACE_WITH_NULL + * => $node is replaced with null + * * NodeVisitor::DONT_TRAVERSE_CHILDREN * => Children of $node are not traversed. $node stays as-is - * * NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN + * * NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN * => Further visitors for the current node are skipped, and its children are not * traversed. $node stays as-is. - * * NodeTraverser::STOP_TRAVERSAL + * * NodeVisitor::STOP_TRAVERSAL * => Traversal is aborted. $node stays as-is * * otherwise * => $node is set to the return value @@ -83,9 +92,11 @@ public function enterNode(Node $node); * Return value semantics: * * null * => $node stays as-is - * * NodeTraverser::REMOVE_NODE + * * NodeVisitor::REMOVE_NODE * => $node is removed from the parent array - * * NodeTraverser::STOP_TRAVERSAL + * * NodeVisitor::REPLACE_WITH_NULL + * => $node is replaced with null + * * NodeVisitor::STOP_TRAVERSAL * => Traversal is aborted. $node stays as-is * * array (of Nodes) * => The return value is merged into the parent array (at the position of the $node) diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index 50a16cb9d4..6af99622df 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -3,7 +3,10 @@ namespace PhpParser; use PhpParser\Node\Expr; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; +use PhpParser\Node\Stmt\Else_; +use PhpParser\Node\Stmt\If_; class NodeTraverserTest extends \PHPUnit\Framework\TestCase { public function testNonModifying() { @@ -343,6 +346,44 @@ public function testStopTraversal() { ], $visitor->trace); } + public function testReplaceWithNull() { + $one = new Int_(1); + $else1 = new Else_(); + $else2 = new Else_(); + $if1 = new If_($one, ['else' => $else1]); + $if2 = new If_($one, ['else' => $else2]); + $stmts = [$if1, $if2]; + $visitor1 = new NodeVisitorForTesting([ + ['enterNode', $else1, NodeVisitor::REPLACE_WITH_NULL], + ['leaveNode', $else2, NodeVisitor::REPLACE_WITH_NULL], + ]); + $visitor2 = new NodeVisitorForTesting(); + $traverser = new NodeTraverser(); + $traverser->addVisitor($visitor1); + $traverser->addVisitor($visitor2); + $newStmts = $traverser->traverse($stmts); + $this->assertEquals([ + new If_($one), + new If_($one), + ], $newStmts); + $this->assertEquals([ + ['beforeTraverse', $stmts], + ['enterNode', $if1], + ['enterNode', $one], + // We never see the if1 Else node. + ['leaveNode', $one], + ['leaveNode', $if1], + ['enterNode', $if2], + ['enterNode', $one], + ['leaveNode', $one], + // We do see the if2 Else node, as it will only be replaced afterwards. + ['enterNode', $else2], + ['leaveNode', $else2], + ['leaveNode', $if2], + ['afterTraverse', $stmts], + ], $visitor2->trace); + } + public function testRemovingVisitor() { $visitor1 = new class () extends NodeVisitorAbstract {}; $visitor2 = new class () extends NodeVisitorAbstract {}; @@ -415,6 +456,12 @@ public function provideTestInvalidReturn() { $visitor8 = new NodeVisitorForTesting([ ['enterNode', $num, new Node\Stmt\Return_()], ]); + $visitor9 = new NodeVisitorForTesting([ + ['enterNode', $expr, NodeVisitor::REPLACE_WITH_NULL], + ]); + $visitor10 = new NodeVisitorForTesting([ + ['leaveNode', $expr, NodeVisitor::REPLACE_WITH_NULL], + ]); return [ [$stmts, $visitor1, 'enterNode() returned invalid value of type string'], @@ -425,6 +472,8 @@ public function provideTestInvalidReturn() { [$stmts, $visitor6, 'leaveNode() returned invalid value of type bool'], [$stmts, $visitor7, 'Trying to replace statement (Stmt_Expression) with expression (Scalar_Int). Are you missing a Stmt_Expression wrapper?'], [$stmts, $visitor8, 'Trying to replace expression (Scalar_Int) with statement (Stmt_Return)'], + [$stmts, $visitor9, 'REPLACE_WITH_NULL can not be used if the parent structure is an array'], + [$stmts, $visitor10, 'REPLACE_WITH_NULL can not be used if the parent structure is an array'], ]; } } From 5883189d61384e5b88c8b4630ae438d76eef16cc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 May 2023 15:51:27 +0200 Subject: [PATCH 257/428] Fix return type of Comment::getReformattedText() --- lib/PhpParser/Comment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index ff949d9b35..a869872f1c 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -153,9 +153,9 @@ public function __toString(): string { * without trailing whitespace on the first line, but with trailing whitespace * on all subsequent lines. * - * @return mixed|string + * @return string */ - public function getReformattedText() { + public function getReformattedText(): string { $text = $this->text; $newlinePos = strpos($text, "\n"); if (false === $newlinePos) { From ad8daa12b2de5f4aed2a7eb821d2744b22f75e46 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 May 2023 17:38:56 +0200 Subject: [PATCH 258/428] Normalize newlines in Comment::getReformattedText() Normalize CRLF to LF in getReformattedText(). That was, if the comment is pretty-printed, we will use proper LF newlines, rather than inserting indentation between the CR and LF. At the same time, this also makes it easier to emit actual CRLF newlines with a custom pretty printer. Fixes #599. --- lib/PhpParser/Comment.php | 12 ++++---- test/PhpParser/CommentTest.php | 54 ++++++++++++++-------------------- 2 files changed, 29 insertions(+), 37 deletions(-) diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index a869872f1c..87d3eabd24 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -150,19 +150,21 @@ public function __toString(): string { * * "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 + * without leading whitespace on the first line, but with leading whitespace * on all subsequent lines. * + * Additionally, this normalizes CRLF newlines to LF newlines. + * * @return string */ public function getReformattedText(): string { - $text = $this->text; + $text = str_replace("\r\n", "\n", $this->text); $newlinePos = strpos($text, "\n"); if (false === $newlinePos) { // Single line comments don't need further processing return $text; } - if (preg_match('((*BSR_ANYCRLF)(*ANYCRLF)^.*(?:\R\s+\*.*)+$)', $text)) { + if (preg_match('(^.*(?:\n\s+\*.*)+$)', $text)) { // Multi line comment of the type // // /* @@ -171,9 +173,9 @@ public function getReformattedText(): string { // */ // // is handled by replacing the whitespace sequences before the * by a single space - return preg_replace('(^\s+\*)m', ' *', $this->text); + return preg_replace('(^\s+\*)m', ' *', $text); } - if (preg_match('(^/\*\*?\s*[\r\n])', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { + if (preg_match('(^/\*\*?\s*\n)', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { // Multi line comment of the type // // /* diff --git a/test/PhpParser/CommentTest.php b/test/PhpParser/CommentTest.php index 49cf631ae4..7b3493deda 100644 --- a/test/PhpParser/CommentTest.php +++ b/test/PhpParser/CommentTest.php @@ -33,47 +33,37 @@ public function provideTestReformatting() { ['// Some text', '// Some text'], ['/* Some text */', '/* Some text */'], [ - '/** - * Some text. - * Some more text. - */', - '/** - * Some text. - * Some more text. - */' + "/**\n * Some text.\n * Some more text.\n */", + "/**\n * Some text.\n * Some more text.\n */" ], [ - '/* - Some text. - Some more text. - */', - '/* - Some text. - Some more text. -*/' + "/**\r\n * Some text.\r\n * Some more text.\r\n */", + "/**\n * Some text.\n * Some more text.\n */" ], [ - '/* Some text. - More text. - Even more text. */', - '/* Some text. - More text. - Even more text. */' + "/*\n Some text.\n Some more text.\n */", + "/*\n Some text.\n Some more text.\n*/" ], [ - '/* Some text. - More text. - Indented text. */', - '/* Some text. - More text. - Indented text. */', + "/*\r\n Some text.\r\n Some more text.\r\n */", + "/*\n Some text.\n Some more text.\n*/" + ], + [ + "/* Some text.\n More text.\n Even more text. */", + "/* Some text.\n More text.\n Even more text. */" + ], + [ + "/* Some text.\r\n More text.\r\n Even more text. */", + "/* Some text.\n More text.\n Even more text. */" + ], + [ + "/* Some text.\n More text.\n Indented text. */", + "/* Some text.\n More text.\n Indented text. */", ], // invalid comment -> no reformatting [ - 'hallo - world', - 'hallo - world', + "hello\n world", + "hello\n world", ], ]; } From d43edfbb319616dc305ce806b3653778fc13e76e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 May 2023 20:56:56 +0200 Subject: [PATCH 259/428] Support CRLF newlines in pretty printer Can be enabled using the "newlines" option. --- lib/PhpParser/PrettyPrinter/Standard.php | 16 ++++----- lib/PhpParser/PrettyPrinterAbstract.php | 34 ++++++++++++------ test/PhpParser/PrettyPrinterTest.php | 45 ++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 18 deletions(-) diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 230d6a7d35..ff75dfcbbd 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -134,12 +134,12 @@ protected function pScalar_String(Scalar\String_ $node): string { $label = $node->getAttribute('docLabel'); if ($label && !$this->containsEndLabel($node->value, $label)) { if ($node->value === '') { - return "<<<'$label'\n$label" . $this->docStringEndToken; + return "<<<'$label'{$this->newline}$label{$this->docStringEndToken}"; } // Make sure trailing \r is not combined with following \n into CRLF. if ($node->value[strlen($node->value) - 1] !== "\r") { - return "<<<'$label'\n$node->value\n$label" + return "<<<'$label'{$this->newline}{$node->value}{$this->newline}$label" . $this->docStringEndToken; } } @@ -152,10 +152,10 @@ protected function pScalar_String(Scalar\String_ $node): string { $escaped = $this->escapeString($node->value, null); if ($label && !$this->containsEndLabel($escaped, $label)) { if ($escaped === '') { - return "<<<$label\n$label" . $this->docStringEndToken; + return "<<<$label{$this->newline}$label{$this->docStringEndToken}"; } - return "<<<$label\n" . $escaped . "\n$label" + return "<<<$label{$this->newline}$escaped{$this->newline}$label" . $this->docStringEndToken; } /* break missing intentionally */ @@ -174,11 +174,11 @@ protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node): && $node->parts[0] instanceof Node\InterpolatedStringPart && $node->parts[0]->value === '' ) { - return "<<<$label\n$label" . $this->docStringEndToken; + return "<<<$label{$this->newline}$label{$this->docStringEndToken}"; } - return "<<<$label\n" . $this->pEncapsList($node->parts, null) . "\n$label" - . $this->docStringEndToken; + return "<<<$label{$this->newline}" . $this->pEncapsList($node->parts, null) + . "{$this->newline}$label{$this->docStringEndToken}"; } } return '"' . $this->pEncapsList($node->parts, '"') . '"'; @@ -993,7 +993,7 @@ protected function pStmt_Unset(Stmt\Unset_ $node): string { } protected function pStmt_InlineHTML(Stmt\InlineHTML $node): string { - $newline = $node->getAttribute('hasLeadingNewline', true) ? "\n" : ''; + $newline = $node->getAttribute('hasLeadingNewline', true) ? $this->newline : ''; return '?>' . $newline . $node->value . 'phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 1); + + $this->newline = $options['newline'] ?? "\n"; + if ($this->newline !== "\n" && $this->newline != "\r\n") { + throw new \LogicException('Option "newline" must be one of "\n" or "\r\n"'); + } + $this->shortArraySyntax = $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); $this->docStringEndToken = @@ -184,7 +195,7 @@ public function __construct(array $options = []) { */ protected function resetState(): void { $this->indentLevel = 0; - $this->nl = "\n"; + $this->nl = $this->newline; $this->origTokens = null; } @@ -195,7 +206,7 @@ protected function resetState(): void { */ protected function setIndentLevel(int $level): void { $this->indentLevel = $level; - $this->nl = "\n" . \str_repeat(' ', $level); + $this->nl = $this->newline . \str_repeat(' ', $level); } /** @@ -212,7 +223,7 @@ protected function indent(): void { protected function outdent(): void { assert($this->indentLevel >= 4); $this->indentLevel -= 4; - $this->nl = "\n" . str_repeat(' ', $this->indentLevel); + $this->nl = $this->newline . str_repeat(' ', $this->indentLevel); } /** @@ -250,13 +261,13 @@ public function prettyPrintExpr(Expr $node): string { */ public function prettyPrintFile(array $stmts): string { if (!$stmts) { - return "newline . $this->newline; } - $p = "prettyPrint($stmts); + $p = "newline . $this->newline . $this->prettyPrint($stmts); if ($stmts[0] instanceof Stmt\InlineHTML) { - $p = preg_replace('/^<\?php\s+\?>\n?/', '', $p); + $p = preg_replace('/^<\?php\s+\?>\r?\n?/', '', $p); } if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) { $p = preg_replace('/<\?php$/', '', rtrim($p)); @@ -290,8 +301,11 @@ protected function preprocessNodes(array $nodes): void { protected function handleMagicTokens(string $str): string { if ($this->docStringEndToken !== null) { // 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); + $str = str_replace( + $this->docStringEndToken . ';' . $this->newline, + ';' . $this->newline, + $str); + $str = str_replace($this->docStringEndToken, $this->newline, $str); } return $str; @@ -537,7 +551,7 @@ public function printFormatPreserving(array $stmts, array $origStmts, array $ori } else { // Fallback // TODO Add pStmts($stmts, false); + $result = "newline . $this->pStmts($stmts, false); } return $this->handleMagicTokens($result); diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 781256a1ef..d64b69cb6f 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -270,4 +270,49 @@ public function provideTestRoundTripPrint() { $this->getTests(__DIR__ . '/../code/parser', 'test') ); } + + public function testWindowsNewline() { + $prettyPrinter = new Standard(['newline' => "\r\n"]); + $stmts = [ + new Stmt\If_(new Int_(1), [ + 'stmts' => [ + new Stmt\Echo_([new String_('Hello')]), + new Stmt\Echo_([new String_('World')]), + ], + ]), + ]; + $code = $prettyPrinter->prettyPrint($stmts); + $this->assertSame("if (1) {\r\n echo 'Hello';\r\n echo 'World';\r\n}", $code); + $code = $prettyPrinter->prettyPrintFile($stmts); + $this->assertSame("prettyPrintFile($stmts); + $this->assertSame("Hello world", $code); + + $stmts = [ + new Stmt\Expression(new String_('Test', [ + 'kind' => String_::KIND_NOWDOC, + 'docLabel' => 'STR' + ])), + new Stmt\Expression(new String_('Test 2', [ + 'kind' => String_::KIND_HEREDOC, + 'docLabel' => 'STR' + ])), + new Stmt\Expression(new InterpolatedString([new InterpolatedStringPart('Test 3')], [ + 'kind' => String_::KIND_HEREDOC, + 'docLabel' => 'STR' + ])), + ]; + $code = $prettyPrinter->prettyPrint($stmts); + $this->assertSame( + "<<<'STR'\r\nTest\r\nSTR;\r\n<<expectException(\LogicException::class); + $this->expectExceptionMessage('Option "newline" must be one of "\n" or "\r\n"'); + new PrettyPrinter\Standard(['newline' => 'foo']); + } } From df3a7057ab28bc1bffe8d4227899ee7d4a91ebef Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 May 2023 21:22:47 +0200 Subject: [PATCH 260/428] Add Name::getParts(), deprecate Name::$parts In preparation for switching this to a plain string in PHP-Parser 5, deprecate direct access to the property and provide an API that will work on both versions. (cherry picked from commit c9e5a13d68486e9fd75f9be1b4639644e54e7f4f) --- lib/PhpParser/Node/Name.php | 14 +++++++++++++- test/PhpParser/Node/NameTest.php | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index 07bcbfd67b..0e198c63db 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -5,7 +5,10 @@ use PhpParser\NodeAbstract; class Name extends NodeAbstract { - /** @var string[] Parts of the name */ + /** + * @var string[] Parts of the name + * @deprecated Use getParts() instead + */ public $parts; /** @var array */ @@ -30,6 +33,15 @@ public function getSubNodeNames(): array { return ['parts']; } + /** + * Get parts of name (split by the namespace separator). + * + * @return string[] Parts of name + */ + public function getParts(): array { + return $this->parts; + } + /** * Gets the first part of the name, i.e. everything before the first namespace separator. * diff --git a/test/PhpParser/Node/NameTest.php b/test/PhpParser/Node/NameTest.php index 36121ec414..9c44847541 100644 --- a/test/PhpParser/Node/NameTest.php +++ b/test/PhpParser/Node/NameTest.php @@ -18,10 +18,12 @@ public function testGet() { $name = new Name('foo'); $this->assertSame('foo', $name->getFirst()); $this->assertSame('foo', $name->getLast()); + $this->assertSame(['foo'], $name->getParts()); $name = new Name('foo\bar'); $this->assertSame('foo', $name->getFirst()); $this->assertSame('bar', $name->getLast()); + $this->assertSame(['foo', 'bar'], $name->getParts()); } public function testToString() { From 23647573e86c491afff329f16c321a0721739e28 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 May 2023 21:14:50 +0200 Subject: [PATCH 261/428] Represent names using string rather than array of parts In most circumstances we are interested in the whole string, not the parts split by namespace separator. As names are common, this representation measurably improves memory usage and performance. --- lib/PhpParser/Node/Name.php | 67 ++++---- lib/PhpParser/PrettyPrinter/Standard.php | 6 +- test/PhpParser/Node/NameTest.php | 6 +- test/PhpParser/NodeDumperTest.php | 5 +- .../NodeVisitor/NameResolverTest.php | 2 +- .../formatPreservation/listInsertion.test | 2 +- test/code/parser/errorHandling/eofError.test | 8 +- test/code/parser/errorHandling/recovery.test | 148 +++++------------- test/code/parser/expr/arraySpread.test | 20 +-- test/code/parser/expr/assignNewByRef.test | 8 +- test/code/parser/expr/closure.test | 5 +- test/code/parser/expr/comparison.test | 4 +- test/code/parser/expr/constant_expr.test | 4 +- test/code/parser/expr/dynamicClassConst.test | 12 +- test/code/parser/expr/fetchAndCall/args.test | 20 +-- .../parser/expr/fetchAndCall/constFetch.test | 12 +- .../expr/fetchAndCall/constantDeref.test | 8 +- .../parser/expr/fetchAndCall/funcCall.test | 8 +- .../parser/expr/fetchAndCall/namedArgs.test | 8 +- .../parser/expr/fetchAndCall/newDeref.test | 16 +- .../parser/expr/fetchAndCall/staticCall.test | 28 +--- .../fetchAndCall/staticPropertyFetch.test | 20 +-- .../code/parser/expr/firstClassCallables.test | 16 +- test/code/parser/expr/issetAndEmpty.test | 4 +- .../parser/expr/keywordsInNamespacedName.test | 45 ++---- test/code/parser/expr/match.test | 4 +- test/code/parser/expr/new.test | 16 +- test/code/parser/expr/throw.test | 8 +- test/code/parser/expr/trailingCommas.test | 12 +- test/code/parser/expr/uvs/constDeref.test | 56 ++----- .../expr/uvs/globalNonSimpleVarError.test | 4 +- test/code/parser/expr/uvs/indirectCall.test | 20 +-- test/code/parser/expr/uvs/new.test | 4 +- test/code/parser/expr/uvs/staticProperty.test | 16 +- test/code/parser/expr/variable.test | 4 +- test/code/parser/scalar/numberSeparators.test | 36 ++--- test/code/parser/semiReserved.test | 64 ++------ test/code/parser/stmt/attributes.test | 56 ++----- test/code/parser/stmt/class/anonymous.test | 24 +-- test/code/parser/stmt/class/conditional.test | 4 +- test/code/parser/stmt/class/enum.test | 12 +- test/code/parser/stmt/class/interface.test | 8 +- test/code/parser/stmt/class/name.test | 36 ++--- .../code/parser/stmt/class/propertyTypes.test | 4 +- .../stmt/class/shortEchoAsIdentifier.test | 4 +- test/code/parser/stmt/class/simple.test | 16 +- test/code/parser/stmt/class/staticType.test | 4 +- test/code/parser/stmt/class/trait.test | 44 ++---- .../parser/stmt/class/typedConstants.test | 12 +- test/code/parser/stmt/const.test | 4 +- .../parser/stmt/function/conditional.test | 4 +- .../parser/stmt/function/defaultValues.test | 8 +- .../function/disjointNormalFormTypes.test | 60 ++----- .../stmt/function/intersectionTypes.test | 24 +-- .../stmt/function/nullFalseTrueTypes.test | 4 +- .../parser/stmt/function/nullableTypes.test | 8 +- .../stmt/function/readonlyFunction.test | 4 +- .../parser/stmt/function/returnTypes.test | 5 +- .../stmt/function/typeDeclarations.test | 4 +- .../parser/stmt/function/typeVersions.test | 112 ++++--------- .../code/parser/stmt/function/unionTypes.test | 12 +- test/code/parser/stmt/function/variadic.test | 8 +- test/code/parser/stmt/generator/basic.test | 8 +- .../stmt/generator/yieldPrecedence.test | 12 +- test/code/parser/stmt/haltCompiler.test | 4 +- test/code/parser/stmt/haltCompilerOffset.test | 8 +- test/code/parser/stmt/multiCatch.test | 17 +- test/code/parser/stmt/namespace/alias.test | 47 ++---- test/code/parser/stmt/namespace/braced.test | 13 +- .../stmt/namespace/commentAfterNamespace.test | 4 +- test/code/parser/stmt/namespace/groupUse.test | 80 +++------- .../parser/stmt/namespace/groupUseErrors.test | 32 +--- .../stmt/namespace/groupUsePositions.test | 9 +- .../stmt/namespace/groupUseTrailingComma.test | 16 +- .../parser/stmt/namespace/invalidName.test | 8 +- test/code/parser/stmt/namespace/mix.test | 16 +- test/code/parser/stmt/namespace/name.test | 19 +-- test/code/parser/stmt/namespace/nested.test | 8 +- .../code/parser/stmt/namespace/notBraced.test | 17 +- .../stmt/namespace/nsAfterHashbang.test | 4 +- .../parser/stmt/namespace/outsideStmt.test | 8 +- .../stmt/namespace/outsideStmtInvalid.test | 20 +-- test/code/parser/stmt/newInInitializer.test | 28 +--- test/code/parser/stmt/tryCatch.test | 28 +--- .../stmt/tryCatch_without_variable.test | 4 +- test/code/parser/stmt/tryWithoutCatch.test | 4 +- 86 files changed, 423 insertions(+), 1198 deletions(-) diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index 0e198c63db..e5a2ae0dd0 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -5,11 +5,8 @@ use PhpParser\NodeAbstract; class Name extends NodeAbstract { - /** - * @var string[] Parts of the name - * @deprecated Use getParts() instead - */ - public $parts; + /** @var string Name as string */ + public $name; /** @var array */ private static $specialClassNames = [ @@ -26,11 +23,11 @@ class Name extends NodeAbstract { */ final public function __construct($name, array $attributes = []) { $this->attributes = $attributes; - $this->parts = self::prepareName($name); + $this->name = self::prepareName($name); } public function getSubNodeNames(): array { - return ['parts']; + return ['name']; } /** @@ -39,7 +36,7 @@ public function getSubNodeNames(): array { * @return string[] Parts of name */ public function getParts(): array { - return $this->parts; + return \explode('\\', $this->name); } /** @@ -48,7 +45,10 @@ public function getParts(): array { * @return string First part of the name */ public function getFirst(): string { - return $this->parts[0]; + if (false !== $pos = \strpos($this->name, '\\')) { + return \substr($this->name, 0, $pos); + } + return $this->name; } /** @@ -57,7 +57,10 @@ public function getFirst(): string { * @return string Last part of the name */ public function getLast(): string { - return $this->parts[count($this->parts) - 1]; + if (false !== $pos = \strrpos($this->name, '\\')) { + return \substr($this->name, $pos + 1); + } + return $this->name; } /** @@ -66,7 +69,7 @@ public function getLast(): string { * @return bool Whether the name is unqualified */ public function isUnqualified(): bool { - return 1 === count($this->parts); + return false === \strpos($this->name, '\\'); } /** @@ -75,7 +78,7 @@ public function isUnqualified(): bool { * @return bool Whether the name is qualified */ public function isQualified(): bool { - return 1 < count($this->parts); + return false !== \strpos($this->name, '\\'); } /** @@ -103,7 +106,7 @@ public function isRelative(): bool { * @return string String representation */ public function toString(): string { - return implode('\\', $this->parts); + return $this->name; } /** @@ -123,7 +126,7 @@ public function toCodeString(): string { * @return string Lowercased string representation */ public function toLowerString(): string { - return strtolower(implode('\\', $this->parts)); + return strtolower($this->name); } /** @@ -132,8 +135,7 @@ public function toLowerString(): string { * @return bool Whether identifier is a special class name */ public function isSpecialClassName(): bool { - return count($this->parts) === 1 - && isset(self::$specialClassNames[strtolower($this->parts[0])]); + return isset(self::$specialClassNames[strtolower($this->name)]); } /** @@ -143,7 +145,7 @@ public function isSpecialClassName(): bool { * @return string String representation */ public function __toString(): string { - return implode('\\', $this->parts); + return $this->name; } /** @@ -163,7 +165,16 @@ public function __toString(): string { * @return static|null Sliced name */ public function slice(int $offset, ?int $length = null) { - $numParts = count($this->parts); + if ($offset === 1 && $length === null) { + // Short-circuit the common case. + if (false !== $pos = \strpos($this->name, '\\')) { + return new static(\substr($this->name, $pos + 1)); + } + return null; + } + + $parts = \explode('\\', $this->name); + $numParts = \count($parts); $realOffset = $offset < 0 ? $offset + $numParts : $offset; if ($realOffset < 0 || $realOffset > $numParts) { @@ -184,7 +195,7 @@ public function slice(int $offset, ?int $length = null) { return null; } - return new static(array_slice($this->parts, $realOffset, $realLength), $this->attributes); + return new static(array_slice($parts, $realOffset, $realLength), $this->attributes); } /** @@ -209,42 +220,42 @@ public static function concat($name1, $name2, array $attributes = []) { return null; } if (null === $name1) { - return new static(self::prepareName($name2), $attributes); + return new static($name2, $attributes); } if (null === $name2) { - return new static(self::prepareName($name1), $attributes); + return new static($name1, $attributes); } else { return new static( - array_merge(self::prepareName($name1), self::prepareName($name2)), $attributes + 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. + * it to a string. * * @param string|string[]|self $name Name to prepare * - * @return string[] Prepared name + * @return string Prepared name */ - private static function prepareName($name): array { + private static function prepareName($name): string { if (\is_string($name)) { if ('' === $name) { throw new \InvalidArgumentException('Name cannot be empty'); } - return explode('\\', $name); + return $name; } if (\is_array($name)) { if (empty($name)) { throw new \InvalidArgumentException('Name cannot be empty'); } - return $name; + return implode('\\', $name); } if ($name instanceof self) { - return $name->parts; + return $name->name; } throw new \InvalidArgumentException( diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index ff75dfcbbd..27b2f9fdeb 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -80,15 +80,15 @@ protected function pAttributeGroup(Node\AttributeGroup $node): string { // Names protected function pName(Name $node): string { - return implode('\\', $node->parts); + return $node->name; } protected function pName_FullyQualified(Name\FullyQualified $node): string { - return '\\' . implode('\\', $node->parts); + return '\\' . $node->name; } protected function pName_Relative(Name\Relative $node): string { - return 'namespace\\' . implode('\\', $node->parts); + return 'namespace\\' . $node->name; } // Magic Constants diff --git a/test/PhpParser/Node/NameTest.php b/test/PhpParser/Node/NameTest.php index 9c44847541..50df3624b7 100644 --- a/test/PhpParser/Node/NameTest.php +++ b/test/PhpParser/Node/NameTest.php @@ -5,13 +5,13 @@ class NameTest extends \PHPUnit\Framework\TestCase { public function testConstruct() { $name = new Name(['foo', 'bar']); - $this->assertSame(['foo', 'bar'], $name->parts); + $this->assertSame('foo\bar', $name->name); $name = new Name('foo\bar'); - $this->assertSame(['foo', 'bar'], $name->parts); + $this->assertSame('foo\bar', $name->name); $name = new Name($name); - $this->assertSame(['foo', 'bar'], $name->parts); + $this->assertSame('foo\bar', $name->name); } public function testGet() { diff --git a/test/PhpParser/NodeDumperTest.php b/test/PhpParser/NodeDumperTest.php index 70ca6f2152..79b2734542 100644 --- a/test/PhpParser/NodeDumperTest.php +++ b/test/PhpParser/NodeDumperTest.php @@ -34,10 +34,7 @@ public function provideTestDump() { [ new Node\Name(['Hallo', 'World']), 'Name( - parts: array( - 0: Hallo - 1: World - ) + name: Hallo\World )' ], [ diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index e7b986c55f..d38a90c826 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -460,7 +460,7 @@ public function testClassNameIsCaseInsensitive() { $stmt = $stmts[0]; $assign = $stmt->stmts[1]->expr; - $this->assertSame(['Bar', 'Baz'], $assign->expr->class->parts); + $this->assertSame('Bar\\Baz', $assign->expr->class->name); } public function testSpecialClassNamesAreCaseInsensitive() { diff --git a/test/code/formatPreservation/listInsertion.test b/test/code/formatPreservation/listInsertion.test index 30b129179b..05ae43a289 100644 --- a/test/code/formatPreservation/listInsertion.test +++ b/test/code/formatPreservation/listInsertion.test @@ -141,7 +141,7 @@ function test() { namespace Foo; ----- -$stmts[0]->name->parts[0] = 'Xyz'; +$stmts[0]->name->name = 'Xyz'; ----- Date: Sun, 21 May 2023 21:50:49 +0200 Subject: [PATCH 262/428] Update CHANGELOG and UPGRADING --- CHANGELOG.md | 34 ++++++++++++++++++++++++ UPGRADE-5.0.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 105 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b0442b1a5..738be3bdbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,37 @@ +Version 5.0.0-dev +----------------- + +See UPGRADE-5.0 for detailed migration instructions. + +### Added + +* [PHP 8.3] Added support for typed constants. +* [PHP 8.3] Added support for readonly anonymous classes. +* Added support for `NodeVisitor::REPLACE_WITH_NULL`. +* Added support for CRLF newlines in the pretty printer, using the new `newline` option. + +### Changed + +* Use PHP 7.1 as the default target version for the pretty printer. +* Print `else if { }` instead of `else { if { } }`. +* The `leaveNode()` method on visitors is now invoked in reverse order of `enterNode()`. +* Moved `NodeTraverser::REMOVE_NODE` etc. to `NodeVisitor::REMOVE_NODE`. The old constants are still + available for compatibility. +* The `Name` subnode `parts` has been replaced by `name`, which stores the name as a string rather + than an array of parts separated by namespace separators. The `getParts()` method returns the old + representation. +* No longer accept strings for types in Node constructors. Instead, either an `Identifier`, `Name` + or `ComplexType` must be passed. +* `Comment::getReformattedText()` now normalizes CRLF newlines to LF newlines. + +### Fixed + +* Don't trim leading whitespace in formatting preserving printer. +* Treat DEL as a label character in the formatting preserving printer depending on the targeted + PHP version. +* Fix error reporting in emulative lexer without explicitly specified error handler. +* Gracefully handle non-contiguous array indices in the `Differ`. + Version 5.0.0-alpha2 (2023-03-05) --------------------------------- diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index c4e40198d5..eab8de16cd 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -71,6 +71,17 @@ Now, destructuring is always represented using `Node\Expr\List_`. The `kind` att `Node\Expr\List_::KIND_LIST` or `Node\Expr\List_::KIND_ARRAY` specifies which syntax was actually used. +### Changes to the name representation + +Previously, `Name` nodes had a `parts` subnode, which stores an array of name parts, split by +namespace separators. Now, `Name` nodes instead have a `name` subnode, which stores a plain string. + +For example, the name `Foo\Bar` was previously represented by `Name(parts: ['Foo', 'Bar'])` and is +now represented by `Name(name: 'Foo\Bar')` instead. + +It is possible to convert the name to the previous representation using `$name->getParts()`. The +`Name` constructor continues to accept both the string and the array representation. + ### Renamed nodes A number of AST nodes have been renamed or moved in the AST hierarchy: @@ -104,6 +115,21 @@ PhpParser\Node\Stmt\Class_::MODIFIER_READONLY -> PhpParser\Modifiers::READONLY PhpParser\Node\Stmt\Class_::VISIBILITY_MODIFIER_MASK -> PhpParser\Modifiers::VISIBILITY_MASK ``` +### Changes to node constructors + +Node constructor arguments accepting types now longer accept plain strings. Either an `Identifier` or `Name` (or `ComplexType`) should be passed instead. This affects the following constructor arguments: + +* The `'returnType'` key of `$subNodes` argument of `Node\Expr\ArrowFunction`. +* The `'returnType'` key of `$subNodes` argument of `Node\Expr\Closure`. +* The `'returnType'` key of `$subNodes` argument of `Node\Stmt\ClassMethod`. +* The `'returnType'` key of `$subNodes` argument of `Node\Stmt\Function_`. +* The `$type` argument of `Node\NullableType`. +* The `$type` argument of `Node\Param`. +* The `$type` argument of `Node\Stmt\Property`. +* The `$type` argument of `Node\ClassConst` (new in PHP-Parser 5.0, listed for completeness only). + +To follow the previous behavior, an `Identifier` should be passed, which indicates a built-in type. + ### Changes to the pretty printer A number of changes to the standard pretty printer have been made, to make it match contemporary coding style conventions (and in particular PSR-12). Options to restore the previous behavior are not provided, but it is possible to override the formatting methods (such as `pStmt_ClassMethod`) with your preferred formatting. @@ -156,6 +182,22 @@ Backslashes in single-quoted strings are now only printed if they are necessary: '\\\\'; ``` +`else if` structures will now omit redundant parentheses: + +```php +# Before +else { + if ($x) { + // ... + } +} + +# After +else if ($x) { + // ... +} +``` + The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defaults to PHP 7.1. The pretty printer will make formatting choices to make the code valid for that version. It currently controls the following behavior: * For PHP >= 7.0 (default), short array syntax `[]` will be used by default. This does not affect nodes that specify an explicit array syntax using the `kind` attribute. @@ -196,6 +238,33 @@ protected function pExpr_UnaryPlus( The new `$precedence` and `$lhsPrecedence` arguments need to be passed down to the `pInfixOp()`, `pPrefixOp()` and `pPostfixOp()` methods. +### Changes to the node traverser + +If there are multiple visitors, the node traverser will now call `leaveNode()` and `afterTraverse()` methods in the reverse order of the corresponding `enterNode()` and `beforeTraverse()` calls: + +```php +# Before +$visitor1->enterNode($node); +$visitor2->enterNode($node); +$visitor1->leaveNode($node); +$visitor2->leaveNode($node); + +# After +$visitor1->enterNode($node); +$visitor2->enterNode($node); +$visitor2->leaveNode($node); +$visitor1->leaveNode($node); +``` + +Additionally, the special `NodeVisitor` return values have been moved from `NodeTraverser` to `NodeVisitor`. The old names are deprecated, but still available. + +```php +PhpParser\NodeTraverser::REMOVE_NODE -> PhpParser\NodeVisitor::REMOVE_NODE +PhpParser\NodeTraverser::DONT_TRAVERSE_CHILDREN -> PhpParser\NodeVisitor::DONT_TRAVERSE_CHILDREN +PhpParser\NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN -> PhpParser\NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN +PhpParser\NodeTraverser::STOP_TRAVERSAL -> PhpParser\NodeVisitor::STOP_TRAVERSAL +``` + ### Changes to token representation Tokens are now internally represented using the `PhpParser\Token` class, which exposes the same base interface as @@ -216,7 +285,8 @@ class Token { The `Lexer::getTokens()` method will now return an array of `Token`s, rather than an array of arrays and strings. Additionally, the token array is now terminated by a sentinel token with ID 0. -### Other removed functionality +### Miscellaneous changes * The deprecated `Builder\Param::setTypeHint()` method has been removed in favor of `Builder\Param::setType()`. * The deprecated `Error` constructor taking a start line has been removed. Pass `['startLine' => $startLine]` attributes instead. +* `Comment::getReformattedText()` now normalizes CRLF newlines to LF newlines. From 5b65f9fc92e6f59281a91d79fef11042872210a9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 27 May 2023 21:34:21 +0200 Subject: [PATCH 263/428] Some documentation updates --- README.md | 14 ++++++++--- doc/2_Usage_of_basic_components.markdown | 27 ++++++++++++-------- doc/component/Pretty_printing.markdown | 5 ++-- doc/component/Walking_the_AST.markdown | 32 ++++++++++++++++++------ 4 files changed, 55 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index ca7453681e..bb28f57cd8 100644 --- a/README.md +++ b/README.md @@ -70,12 +70,17 @@ This dumps an AST looking something like this: ``` array( 0: Stmt_Function( + attrGroups: array( + ) byRef: false name: Identifier( name: test ) params: array( 0: Param( + attrGroups: array( + ) + flags: 0 type: null byRef: false variadic: false @@ -90,12 +95,11 @@ array( 0: Stmt_Expression( expr: Expr_FuncCall( name: Name( - parts: array( - 0: var_dump - ) + name: var_dump ) args: array( 0: Arg( + name: null value: Expr_Variable( name: foo ) @@ -137,12 +141,16 @@ This gives us an AST where the `Function_::$stmts` are empty: ``` array( 0: Stmt_Function( + attrGroups: array( + ) byRef: false name: Identifier( name: test ) params: array( 0: Param( + attrGroups: array( + ) type: null byRef: false variadic: false diff --git a/doc/2_Usage_of_basic_components.markdown b/doc/2_Usage_of_basic_components.markdown index 22daa80341..3fd462dada 100644 --- a/doc/2_Usage_of_basic_components.markdown +++ b/doc/2_Usage_of_basic_components.markdown @@ -96,12 +96,17 @@ For the sample code from the previous section, this will produce the following o ``` array( 0: Stmt_Function( + attrGroups: array( + ) byRef: false name: Identifier( name: printLine ) params: array( 0: Param( + attrGroups: array( + ) + flags: 0 type: null byRef: false variadic: false @@ -129,12 +134,11 @@ array( 1: Stmt_Expression( expr: Expr_FuncCall( name: Name( - parts: array( - 0: printLine - ) + name: printLine ) args: array( 0: Arg( + name: null value: Scalar_String( value: Hello World!!! ) @@ -343,15 +347,18 @@ 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`, +The `enterNode()` method can additionally return the value `NodeVisitor::DONT_TRAVERSE_CHILDREN`, which instructs the traverser to skip all children of the current node. To furthermore prevent subsequent -visitors from visiting the current node, `NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN` can be used instead. +visitors from visiting the current node, `NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN` can be used instead. + +Both methods can additionally return the following values: -Both methods 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)`. + * `NodeVisitor::STOP_TRAVERSAL`, in which case no further nodes will be visited. + * `NodeVisitor::REMOVE_NODE`, in which case the current node will be removed from the parent array. + * `NodeVisitor::REPLACE_WITH_NULL`, in which case the current node will be replaced with `null`. + * 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. diff --git a/doc/component/Pretty_printing.markdown b/doc/component/Pretty_printing.markdown index ee7cac8a09..3e164e2045 100644 --- a/doc/component/Pretty_printing.markdown +++ b/doc/component/Pretty_printing.markdown @@ -32,10 +32,11 @@ Customizing the formatting -------------------------- The pretty printer respects a number of `kind` attributes used by some notes (e.g., whether an -integer should be printed as decimal, hexadecimal, etc). Additionally, it supports two options: +integer should be printed as decimal, hexadecimal, etc). Additionally, it supports three options: -* `phpVersion` (defaults to 7.0) allows opting into formatting that is not supported by older PHP +* `phpVersion` (defaults to 7.1) allows opting into formatting that is not supported by older PHP versions. +* `newline` (defaults to `"\n"`) can be set to `"\r\n"` in order to produce Windows newlines. * `shortArraySyntax` determines the used array syntax if the `kind` attribute is not set. This is a legacy option, and `phpVersion` should be used to control this behavior instead. diff --git a/doc/component/Walking_the_AST.markdown b/doc/component/Walking_the_AST.markdown index 3fd668c477..1673c1e01d 100644 --- a/doc/component/Walking_the_AST.markdown +++ b/doc/component/Walking_the_AST.markdown @@ -129,13 +129,13 @@ Now `$a && $b` will be replaced by `!($a && $b)`. Then the traverser will go int only) child of `!($a && $b)`, which is `$a && $b`. The transformation applies again and we end up with `!!($a && $b)`. This will continue until PHP hits the memory limit. -Finally, there are two special replacement types. The first is removal of a node: +Finally, there are three special replacement types. The first is removal of a node: ```php public function leaveNode(Node $node) { if ($node instanceof Node\Stmt\Return_) { // Remove all return statements - return NodeTraverser::REMOVE_NODE; + return NodeVisitor::REMOVE_NODE; } } ``` @@ -155,7 +155,7 @@ public function leaveNode(Node $node) { && $node->expr->name instanceof Node\Name && $node->expr->name->toString() === 'var_dump' ) { - return NodeTraverser::REMOVE_NODE; + return NodeVisitor::REMOVE_NODE; } } ``` @@ -164,6 +164,20 @@ This example will remove all calls to `var_dump()` which occur as expression sta that `var_dump($a);` will be removed, but `if (var_dump($a))` will not be removed (and there is no obvious way in which it can be removed). +Another way to remove nodes is to replace them with `null`. For example, all `else` statements could +be removed as follows: + +```php +public function leaveNode(Node $node) { + if ($node instanceof Node\Stmt\Else_) { + return NodeVisitor::REPLACE_WITH_NULL; + } +} +``` + +This is only safe to do if the subnode the node is stored in is nullable. `Node\Stmt\Else_` only +occurs inside `Node\Stmt\If_::$else`, which is nullable, so this particular replacement is safe. + Next to removing nodes, it is also possible to replace one node with multiple nodes. This only works if the parent structure is an array. @@ -197,7 +211,7 @@ private $classes = []; public function enterNode(Node $node) { if ($node instanceof Node\Stmt\Class_) { $this->classes[] = $node; - return NodeTraverser::DONT_TRAVERSE_CHILDREN; + return NodeVisitor::DONT_TRAVERSE_CHILDREN; } } ``` @@ -217,7 +231,7 @@ public function enterNode(Node $node) { $node->namespacedName->toString() === 'Foo\Bar\Baz' ) { $this->class = $node; - return NodeTraverser::STOP_TRAVERSAL; + return NodeVisitor::STOP_TRAVERSAL; } } ``` @@ -255,13 +269,14 @@ $visitorA->enterNode(Stmt_Return) $visitorB->enterNode(Stmt_Return) $visitorA->enterNode(Expr_Variable) $visitorB->enterNode(Expr_Variable) -$visitorA->leaveNode(Expr_Variable) $visitorB->leaveNode(Expr_Variable) -$visitorA->leaveNode(Stmt_Return) +$visitorA->leaveNode(Expr_Variable) $visitorB->leaveNode(Stmt_Return) +$visitorA->leaveNode(Stmt_Return) ``` -That is, when visiting a node, enterNode and leaveNode will always be called for all visitors. +That is, when visiting a node, `enterNode()` and `leaveNode()` will always be called for all +visitors, with the `leaveNode()` calls happening in the reverse order of the `enterNode()` calls. Running multiple visitors in parallel improves performance, as the AST only has to be traversed once. However, it is not always possible to write visitors in a way that allows interleaved execution. In this case, you can always fall back to performing multiple traversals: @@ -286,6 +301,7 @@ special enterNode/leaveNode return values: * If a visitor returns a replacement node, subsequent visitors will be passed the replacement node, not the original one. * If a visitor returns `REMOVE_NODE`, subsequent visitors will not see this node. + * If a visitor returns `REPLACE_WITH_NULL`, subsequent visitors will not see this node. * If a visitor returns an array of replacement nodes, subsequent visitors will see neither the node that was replaced, nor the replacement nodes. From 53f671732942db90e0fee73e9d2fc631b3311620 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 28 May 2023 21:51:45 +0200 Subject: [PATCH 264/428] Remove unnecessary Node return value from traverseNode() The node always stays the same: We may only change subnodes. --- lib/PhpParser/NodeTraverser.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 05e0a2c639..f3a28851a3 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -86,10 +86,8 @@ public function traverse(array $nodes): array { * Recursively traverse a node. * * @param Node $node Node to traverse. - * - * @return Node Result of traversal (may be original node or new one) */ - protected function traverseNode(Node $node): Node { + protected function traverseNode(Node $node): void { foreach ($node->getSubNodeNames() as $name) { $subNode =& $node->$name; @@ -128,7 +126,7 @@ protected function traverseNode(Node $node): Node { } if ($traverseChildren) { - $subNode = $this->traverseNode($subNode); + $this->traverseNode($subNode); if ($this->stopTraversal) { break; } @@ -162,8 +160,6 @@ protected function traverseNode(Node $node): Node { } } } - - return $node; } /** @@ -213,7 +209,7 @@ protected function traverseArray(array $nodes): array { } if ($traverseChildren) { - $node = $this->traverseNode($node); + $this->traverseNode($node); if ($this->stopTraversal) { break; } From 16c766eae1c3cd93c9e3631fa4fbc21a1d180cd5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 28 May 2023 21:54:07 +0200 Subject: [PATCH 265/428] Don't take subnodes by reference when traversing Explicitly assign the property where necessary to avoid the creation of unnecessary reference-wrappers everywhere. --- lib/PhpParser/NodeTraverser.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index f3a28851a3..c68be122b2 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -89,10 +89,10 @@ public function traverse(array $nodes): array { */ protected function traverseNode(Node $node): void { foreach ($node->getSubNodeNames() as $name) { - $subNode =& $node->$name; + $subNode = $node->$name; if (\is_array($subNode)) { - $subNode = $this->traverseArray($subNode); + $node->$name = $this->traverseArray($subNode); if ($this->stopTraversal) { break; } @@ -105,7 +105,7 @@ protected function traverseNode(Node $node): void { if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($subNode, $return); - $subNode = $return; + $subNode = $node->$name = $return; } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { $traverseChildren = false; } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { @@ -115,7 +115,7 @@ protected function traverseNode(Node $node): void { $this->stopTraversal = true; break 2; } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - $subNode = null; + $node->$name = null; continue 2; } else { throw new \LogicException( @@ -139,12 +139,12 @@ protected function traverseNode(Node $node): void { if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($subNode, $return); - $subNode = $return; + $subNode = $node->$name = $return; } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - $subNode = null; + $node->$name = null; break; } elseif (\is_array($return)) { throw new \LogicException( From 571ca90b7e048fa8446712d11255c80b23b78753 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 24 Jun 2023 17:48:52 +0200 Subject: [PATCH 266/428] Release PHP-Parser 5.0.0-alpha3 --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 738be3bdbd..ab07badcff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ -Version 5.0.0-dev ------------------ +Version 5.0.0-alpha3 (2023-06-24) +--------------------------------- See UPGRADE-5.0 for detailed migration instructions. From 3fb4b92f595b6bd77b111a6dd7440cd2e7b95ed4 Mon Sep 17 00:00:00 2001 From: Danny van der Sluijs Date: Tue, 13 Jun 2023 13:37:22 +0200 Subject: [PATCH 267/428] Update main.yml to use GitHub Actions V3 Updates the GitHub Actions from V2 to V3 (cherry picked from commit 1d0748ad35201d483816634dd4bfe55a6f26d857) --- .github/workflows/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dbe31d2e24..d5dec76ab7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: name: "PHP 7.1 Unit Tests (with coverage)" steps: - name: "Checkout" - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: @@ -42,7 +42,7 @@ jobs: - "8.2" steps: - name: "Checkout" - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: @@ -58,7 +58,7 @@ jobs: name: "PHP 7.3 Code on PHP 8.0 Integration Tests" steps: - name: "Checkout" - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: @@ -74,7 +74,7 @@ jobs: name: "PHP 8.2 Code on PHP 7.1 Integration Tests" steps: - name: "Checkout" - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: @@ -94,7 +94,7 @@ jobs: - "8.2" steps: - name: "Checkout" - uses: "actions/checkout@v2" + uses: "actions/checkout@v3" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: From eaa1d91b4e116df35af0895453ad99c664b9972e Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sun, 25 Jun 2023 23:38:11 +0700 Subject: [PATCH 268/428] Early return false after VariadicPlaceholder check on CallLike::isFirstClassCallable() (#924) VariadicPlaceholder can only occur as the first (and only) argument, so avoid a loop to check for it. --- lib/PhpParser/Node/Expr/CallLike.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/PhpParser/Node/Expr/CallLike.php b/lib/PhpParser/Node/Expr/CallLike.php index 7042f5f4d9..2af2245bab 100644 --- a/lib/PhpParser/Node/Expr/CallLike.php +++ b/lib/PhpParser/Node/Expr/CallLike.php @@ -19,12 +19,8 @@ abstract public function getRawArgs(): array; * Returns whether this call expression is actually a first class callable. */ public function isFirstClassCallable(): bool { - foreach ($this->getRawArgs() as $arg) { - if ($arg instanceof VariadicPlaceholder) { - return true; - } - } - return false; + $rawArgs = $this->getRawArgs(); + return count($rawArgs) === 1 && current($rawArgs) instanceof VariadicPlaceholder; } /** From 8b1371990caa4728d0a7ac214c9d4465f0e84484 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 2 Jul 2023 19:12:02 +0200 Subject: [PATCH 269/428] Minor documentation updates --- README.md | 2 +- doc/0_Introduction.markdown | 16 ++--- doc/2_Usage_of_basic_components.markdown | 14 ++-- doc/component/AST_builders.markdown | 11 +-- .../Constant_expression_evaluation.markdown | 5 +- doc/component/JSON_representation.markdown | 72 ++++++++++--------- doc/component/Lexer.markdown | 7 +- doc/component/Name_resolution.markdown | 8 +-- doc/component/Performance.markdown | 2 +- doc/component/Walking_the_AST.markdown | 32 ++++----- 10 files changed, 88 insertions(+), 81 deletions(-) diff --git a/README.md b/README.md index bb28f57cd8..7ddb880ac9 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ PHP Parser This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and manipulation. -[Documentation for version 5.x][doc_master] (in development; for running on PHP >= 7.1; for parsing PHP 7.0 to PHP 8.2, with limited support for parsing PHP 5.x). +[Documentation for version 5.x][doc_master] (in development; for running on PHP >= 7.1; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x). [**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.2). diff --git a/doc/0_Introduction.markdown b/doc/0_Introduction.markdown index 3f12e366b0..5a10999db9 100644 --- a/doc/0_Introduction.markdown +++ b/doc/0_Introduction.markdown @@ -13,14 +13,14 @@ application dealing with code programmatically. A parser constructs an [Abstract 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. +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 +would be in other, faster languages like C. Furthermore the people most likely wanting to do programmatic PHP code analysis are incidentally PHP developers, not C developers. What can it parse? @@ -43,7 +43,7 @@ following caveats: 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 8.0 source code running on PHP 7.1, for example. This emulation is not +This allows to parse PHP 8.3 source code running on PHP 7.1, for example. This emulation is not perfect, but works well in practice. Finally, it should be noted that the parser aims to accept all valid code, not reject all invalid @@ -81,16 +81,16 @@ However, it does retain accurate position information, which can be used to insp What else can it do? -------------------- -Apart from the parser itself this package also bundles support for some other, related features: +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 JSON + * Support for serializing and unserializing the node tree to JSON. * 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 + 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 diff --git a/doc/2_Usage_of_basic_components.markdown b/doc/2_Usage_of_basic_components.markdown index 3fd462dada..2bec6f5302 100644 --- a/doc/2_Usage_of_basic_components.markdown +++ b/doc/2_Usage_of_basic_components.markdown @@ -50,7 +50,7 @@ The `createXYZ()` methods optionally accept an array of lexer options. Some use customized lexer options are discussed in the [lexer documentation](component/Lexer.markdown). Subsequently, you can pass PHP code (including the opening `parse($code); // $stmts is an array of statement nodes } catch (Error $e) { - echo 'Parse Error: ', $e->getMessage(); + echo 'Parse Error: ', $e->getMessage(), "\n"; } ``` @@ -206,7 +206,7 @@ without the `PhpParser\Node\` prefix and `\` replaced with `_`. It also does not 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 +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 `getStartLine()` (instead of `getAttribute('startLine')`). @@ -244,7 +244,7 @@ try { echo $code; } catch (Error $e) { - echo 'Parse Error: ', $e->getMessage(); + echo 'Parse Error: ', $e->getMessage(), "\n"; } ``` @@ -252,7 +252,7 @@ The above code will output: echo 'Hello ', hi\getTarget(); -As you can see the source code was first parsed using `PhpParser\Parser->parse()`, then changed and then +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 @@ -393,7 +393,7 @@ declarations that contains the namespaced name instead of only the shortname tha Example: Converting namespaced code to pseudo namespaces -------------------------------------------------------- -A small example to understand the concept: We want to convert 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. @@ -445,7 +445,7 @@ foreach ($files as $file) { } ``` -Now lets start with the main code, the `NodeVisitor\NamespaceConverter`. One thing it needs to do +Now lets start with the main code, the `NamespaceConverter`. One thing it needs to do is convert `A\\B` style names to `A_B` style ones. ```php diff --git a/doc/component/AST_builders.markdown b/doc/component/AST_builders.markdown index 0be51e0fad..fc3533af6e 100644 --- a/doc/component/AST_builders.markdown +++ b/doc/component/AST_builders.markdown @@ -15,9 +15,10 @@ accessed through `getNode()`. Fluent builders are available for the following syntactic elements: * namespaces and use statements - * classes, interfaces and traits + * classes, interfaces, traits and enums * methods, functions and parameters - * properties + * properties, class constants and enum cases + * trait uses and trait use adaptations Here is an example: @@ -95,13 +96,13 @@ abstract class SomeOtherClass extends SomeClass implements A\Few, \Interfaces AnotherTrait::func insteadof SecondTrait; } protected $someProperty; - private $anotherProperty = array(1, 2, 3); + private $anotherProperty = [1, 2, 3]; /** * This method does something. * * @param SomeClass And takes a parameter */ - public abstract function someMethod(SomeClass $someParam): bool; + abstract public function someMethod(SomeClass $someParam): bool; protected function anotherMethod($someParam = 'test') { print $someParam; @@ -133,6 +134,8 @@ nodes. The following methods are currently available: * `propertyFetch($var, $name)`: Creates a property fetch node. Converts `$name` to an `Identifier` node. * `concat(...$exprs)`: Create a tree of `BinaryOp\Concat` nodes for the given expressions. + * `attribute($name, $args)`: Create a `Attribute` node. Converts `$name` to a `Name` node and + normalizes arguments. These methods may be expanded on an as-needed basis. Please open an issue or PR if a common operation is missing. diff --git a/doc/component/Constant_expression_evaluation.markdown b/doc/component/Constant_expression_evaluation.markdown index 48ec29652a..1a42a5272e 100644 --- a/doc/component/Constant_expression_evaluation.markdown +++ b/doc/component/Constant_expression_evaluation.markdown @@ -70,6 +70,7 @@ expressions, apart from the following: * `Expr\ConstFetch` (only null/false/true are handled) * `Expr\ClassConstFetch` * `Expr\New_` (since PHP 8.1) + * `Expr\PropertyFetch` (since PHP 8.2) Handling these expression types requires non-local information, such as which global constants are defined. By default, the evaluator will throw a `ConstExprEvaluationException` when it encounters @@ -84,7 +85,7 @@ specifying an evaluation fallback function: use PhpParser\{ConstExprEvaluator, ConstExprEvaluationException}; use PhpParser\Node\Expr; -$evalutator = new ConstExprEvaluator(function(Expr $expr) { +$evaluator = new ConstExprEvaluator(function(Expr $expr) { if ($expr instanceof Expr\ConstFetch) { return fetchConstantSomehow($expr); } @@ -97,7 +98,7 @@ $evalutator = new ConstExprEvaluator(function(Expr $expr) { }); try { - $evalutator->evaluateSilently($someExpr); + $evaluator->evaluateSilently($someExpr); } catch (ConstExprEvaluationException $e) { // Handle exception } diff --git a/doc/component/JSON_representation.markdown b/doc/component/JSON_representation.markdown index 8b4e95fde0..c6cc07d53b 100644 --- a/doc/component/JSON_representation.markdown +++ b/doc/component/JSON_representation.markdown @@ -35,78 +35,86 @@ This will result in the following output (which includes attributes): [ { "nodeType": "Stmt_Function", + "attributes": { + "startLine": 4, + "comments": [ + { + "nodeType": "Comment_Doc", + "text": "\/** @param string $msg *\/", + "line": 3, + "filePos": 7, + "tokenPos": 2, + "endLine": 3, + "endFilePos": 31, + "endTokenPos": 2 + } + ], + "endLine": 6 + }, "byRef": false, "name": { "nodeType": "Identifier", - "name": "printLine", "attributes": { "startLine": 4, "endLine": 4 - } + }, + "name": "printLine" }, "params": [ { "nodeType": "Param", + "attributes": { + "startLine": 4, + "endLine": 4 + }, "type": null, "byRef": false, "variadic": false, "var": { "nodeType": "Expr_Variable", - "name": "msg", "attributes": { "startLine": 4, "endLine": 4 - } + }, + "name": "msg" }, "default": null, - "attributes": { - "startLine": 4, - "endLine": 4 - } + "flags": 0, + "attrGroups": [] } ], "returnType": null, "stmts": [ { "nodeType": "Stmt_Echo", + "attributes": { + "startLine": 5, + "endLine": 5 + }, "exprs": [ { "nodeType": "Expr_Variable", - "name": "msg", "attributes": { "startLine": 5, "endLine": 5 - } + }, + "name": "msg" }, { "nodeType": "Scalar_String", - "value": "\n", "attributes": { "startLine": 5, - "endLine": 5, - "kind": 2 - } + "endLine": 5 + "kind": 2, + "rawValue": "\"\\n\"" + }, + "value": "\n" } - ], - "attributes": { - "startLine": 5, - "endLine": 5 - } + ] } ], - "attributes": { - "startLine": 4, - "comments": [ - { - "nodeType": "Comment_Doc", - "text": "\/** @param string $msg *\/", - "line": 3, - "filePos": 9, - "tokenPos": 2 - } - ], - "endLine": 6 - } + "attrGroups": [], + "namespacedName": null } ] ``` diff --git a/doc/component/Lexer.markdown b/doc/component/Lexer.markdown index 6a8527b5e5..3c54cfe0d7 100644 --- a/doc/component/Lexer.markdown +++ b/doc/component/Lexer.markdown @@ -99,12 +99,11 @@ other places (which is the case when using the pretty printer). Lexer extension --------------- -A lexer has to define the following public interface: +The primary public interface of the lexer consists of the following methods: ```php function startLexing(string $code, ErrorHandler $errorHandler = null): void; function getTokens(): array; -function handleHaltCompiler(): string; function getNextToken(string &$value = null, array &$startAttributes = null, array &$endAttributes = null): int; ``` @@ -116,9 +115,6 @@ The `getTokens()` method returns the current array of `PhpParser\Token`s, which class. 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 (in the sense of `Token::$id`). 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). @@ -139,7 +135,6 @@ 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 { diff --git a/doc/component/Name_resolution.markdown b/doc/component/Name_resolution.markdown index 33702869ff..c7416d5898 100644 --- a/doc/component/Name_resolution.markdown +++ b/doc/component/Name_resolution.markdown @@ -24,7 +24,7 @@ $stmts = $nodeTraverser->traverse($stmts); In the default configuration, the name resolver will perform three actions: - * Declarations of functions, classes, interfaces, traits and global constants will have a + * Declarations of functions, classes, interfaces, traits, enums and global constants will have a `namespacedName` property added, which contains the function/class/etc name including the namespace prefix. For historic reasons this is a **property** rather than an attribute. * Names will be replaced by fully qualified resolved names, which are instances of @@ -32,7 +32,7 @@ In the default configuration, the name resolver will perform three actions: * Unqualified function and constant names inside a namespace cannot be statically resolved. Inside a namespace `Foo`, a call to `strlen()` may either refer to the namespaced `\Foo\strlen()`, or the global `\strlen()`. Because PHP-Parser does not have the necessary context to decide this, - such names are left unresolved. Additionally a `namespacedName` **attribute** is added to the + such names are left unresolved. Additionally, a `namespacedName` **attribute** is added to the name node. The name resolver accepts an option array as the second argument, with the following default values: @@ -47,7 +47,7 @@ $nameResolver = new PhpParser\NodeVisitor\NameResolver(null, [ If the `preserveOriginalNames` option is enabled, then the resolved (fully qualified) name will have an `originalName` attribute, which contains the unresolved name. -If the `replaceNodes` option is disabled, then names will no longer be resolved in-place. Instead a +If the `replaceNodes` option is disabled, then names will no longer be resolved in-place. Instead, a `resolvedName` attribute will be added to each name, which contains the resolved (fully qualified) name. Once again, if an unqualified function or constant name cannot be resolved, then the `resolvedName` attribute will not be present, and instead a `namespacedName` attribute is added. @@ -75,7 +75,7 @@ class NameContext { } ``` -The `$type` parameters accept on of the `Stmt\Use_::TYPE_*` constants, which represent the three +The `$type` parameters accept one of the `Stmt\Use_::TYPE_*` constants, which represent the three basic symbol types in PHP (functions, constants and everything else). Next to name resolution, the `NameContext` also supports the reverse operation of finding a short diff --git a/doc/component/Performance.markdown b/doc/component/Performance.markdown index 47e8fea4b2..350b13637a 100644 --- a/doc/component/Performance.markdown +++ b/doc/component/Performance.markdown @@ -40,5 +40,5 @@ parse multiple files. When possible, objects should be reused rather than being newly instantiated for every use. Some objects have expensive initialization procedures, which will be unnecessarily repeated if the object -is not reused. (Currently two objects with particularly expensive setup are lexers and pretty +is not reused. (Currently two objects with particularly expensive setup are parsers and pretty printers, though the details might change between versions of this library.) diff --git a/doc/component/Walking_the_AST.markdown b/doc/component/Walking_the_AST.markdown index 1673c1e01d..bc73653612 100644 --- a/doc/component/Walking_the_AST.markdown +++ b/doc/component/Walking_the_AST.markdown @@ -47,20 +47,19 @@ For example, if we have the following excerpt of an AST ``` Expr_FuncCall( - name: Name( - parts: array( - 0: printLine - ) - ) - args: array( - 0: Arg( - value: Scalar_String( - value: Hello World!!! - ) - byRef: false - unpack: false - ) - ) + name: Name( + name: printLine + ) + args: array( + 0: Arg( + name: null + value: Scalar_String( + value: Hello World!!! + ) + byRef: false + unpack: false + ) + ) ) ``` @@ -348,5 +347,6 @@ be accessed: From parents to children. However, it can often be convenient to op reverse direction: When working on a node, you might want to check if the parent node satisfies a certain property. -PHP-Parser does not add parent (or sibling) references to nodes by itself, but you can easily -emulate this with a visitor. See the [FAQ](FAQ.markdown) for more information. +PHP-Parser does not add parent (or sibling) references to nodes by default, but you can enable them +using the `ParentConnectingVisitor` or `NodeConnectingVisitor`. See the [FAQ](FAQ.markdown) for +more information. From c48ee36f546c1157fe6c12ba324b71d2d31acffb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 9 Jul 2023 15:34:07 +0200 Subject: [PATCH 270/428] Allow passing visitors to NodeTraverser constructor --- doc/component/FAQ.markdown | 6 ++---- doc/component/Lexer.markdown | 3 +-- doc/component/Pretty_printing.markdown | 3 +-- doc/component/Walking_the_AST.markdown | 12 ++++++++++++ lib/PhpParser/NodeFinder.php | 6 ++---- lib/PhpParser/NodeTraverser.php | 9 +++++++-- test/PhpParser/CodeParsingTest.php | 3 +-- test/PhpParser/NodeTraverserTest.php | 5 +---- test/PhpParser/PrettyPrinterTest.php | 6 ++---- 9 files changed, 29 insertions(+), 24 deletions(-) diff --git a/doc/component/FAQ.markdown b/doc/component/FAQ.markdown index 7c4eccb20c..62c0970c31 100644 --- a/doc/component/FAQ.markdown +++ b/doc/component/FAQ.markdown @@ -16,8 +16,7 @@ use PhpParser\ParserFactory; $code = '...'; -$traverser = new NodeTraverser; -$traverser->addVisitor(new ParentConnectingVisitor); +$traverser = new NodeTraverser(new ParentConnectingVisitor); $parser = (new ParserFactory())->createForHostVersion(); $ast = $parser->parse($code); @@ -39,8 +38,7 @@ use PhpParser\ParserFactory; $code = '...'; -$traverser = new NodeTraverser; -$traverser->addVisitor(new NodeConnectingVisitor); +$traverser = new NodeTraverser(new NodeConnectingVisitor); $parser = (new ParserFactory())->createForHostVersion(); $ast = $parser->parse($code); diff --git a/doc/component/Lexer.markdown b/doc/component/Lexer.markdown index 3c54cfe0d7..f66cc17a47 100644 --- a/doc/component/Lexer.markdown +++ b/doc/component/Lexer.markdown @@ -81,8 +81,7 @@ $lexerOptions = array( $parser = (new PhpParser\ParserFactory())->createForHostVersion($lexerOptions); $visitor = new MyNodeVisitor(); -$traverser = new PhpParser\NodeTraverser(); -$traverser->addVisitor($visitor); +$traverser = new PhpParser\NodeTraverser($visitor); try { $stmts = $parser->parse($code); diff --git a/doc/component/Pretty_printing.markdown b/doc/component/Pretty_printing.markdown index 3e164e2045..16f3c0d2ca 100644 --- a/doc/component/Pretty_printing.markdown +++ b/doc/component/Pretty_printing.markdown @@ -75,8 +75,7 @@ $lexerOptions = new [ ]; $parser = (new ParserFactory())->createForHostVersion($lexerOptions); -$traverser = new NodeTraverser(); -$traverser->addVisitor(new NodeVisitor\CloningVisitor()); +$traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); $printer = new PrettyPrinter\Standard(); diff --git a/doc/component/Walking_the_AST.markdown b/doc/component/Walking_the_AST.markdown index bc73653612..675d79794d 100644 --- a/doc/component/Walking_the_AST.markdown +++ b/doc/component/Walking_the_AST.markdown @@ -21,6 +21,18 @@ $stmts = ...; $modifiedStmts = $traverser->traverse($stmts); ``` +Visitors can be either passed to the `NodeTraverser` constructor, or added using `addVisitor()`: + +```php +$traverser = new NodeTraverser($visitor1, $visitor2, $visitor3); + +// Equivalent to: +$traverser = new NodeTraverser(); +$traverser->addVisitor($visitor1); +$traverser->addVisitor($visitor2); +$traverser->addVisitor($visitor3); +``` + Node visitors ------------- diff --git a/lib/PhpParser/NodeFinder.php b/lib/PhpParser/NodeFinder.php index 079c4c1c25..8901ef92fa 100644 --- a/lib/PhpParser/NodeFinder.php +++ b/lib/PhpParser/NodeFinder.php @@ -21,8 +21,7 @@ public function find($nodes, callable $filter): array { $visitor = new FindingVisitor($filter); - $traverser = new NodeTraverser(); - $traverser->addVisitor($visitor); + $traverser = new NodeTraverser($visitor); $traverser->traverse($nodes); return $visitor->getFoundNodes(); @@ -59,8 +58,7 @@ public function findFirst($nodes, callable $filter): ?Node { $visitor = new FirstFindingVisitor($filter); - $traverser = new NodeTraverser(); - $traverser->addVisitor($visitor); + $traverser = new NodeTraverser($visitor); $traverser->traverse($nodes); return $visitor->getFoundNode(); diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index c68be122b2..edba55703f 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -29,8 +29,13 @@ class NodeTraverser implements NodeTraverserInterface { /** @var bool Whether traversal should be stopped */ protected $stopTraversal; - public function __construct() { - // for BC + /** + * Create a traverser with the given visitors. + * + * @param NodeVisitor ...$visitors Node visitors + */ + public function __construct(NodeVisitor... $visitors) { + $this->visitors = $visitors; } /** diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php index 076f536cf7..855e65e3ed 100644 --- a/test/PhpParser/CodeParsingTest.php +++ b/test/PhpParser/CodeParsingTest.php @@ -69,8 +69,7 @@ private function checkAttributes($stmts) { return; } - $traverser = new NodeTraverser(); - $traverser->addVisitor(new class () extends NodeVisitorAbstract { + $traverser = new NodeTraverser(new class () extends NodeVisitorAbstract { public function enterNode(Node $node) { $startLine = $node->getStartLine(); $endLine = $node->getEndLine(); diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index 6af99622df..255741da2c 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -49,10 +49,7 @@ public function testModifying() { ]); $visitor3 = new NodeVisitorForTesting(); - $traverser = new NodeTraverser(); - $traverser->addVisitor($visitor1); - $traverser->addVisitor($visitor2); - $traverser->addVisitor($visitor3); + $traverser = new NodeTraverser($visitor1, $visitor2, $visitor3); // as all operations are reversed we end where we start $this->assertEquals([], $traverser->traverse([])); diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index d64b69cb6f..28d192f35f 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -193,8 +193,7 @@ public function testFormatPreservingPrint($name, $code, $modification, $expected ]); $parser = new Parser\Php7($lexer); - $traverser = new NodeTraverser(); - $traverser->addVisitor(new NodeVisitor\CloningVisitor()); + $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); $printer = new PrettyPrinter\Standard(); @@ -244,8 +243,7 @@ public function testRoundTripPrint($name, $code, $expected, $modeLine) { $parser = new Php7($lexer); - $traverser = new NodeTraverser(); - $traverser->addVisitor(new NodeVisitor\CloningVisitor()); + $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); $printer = new PrettyPrinter\Standard(); From 748aab3365a0f21b0d10ff57217cbb4240a5192b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 9 Jul 2023 15:47:37 +0200 Subject: [PATCH 271/428] Don't set start attributes for whitespace These will get overwritten later anyway. --- lib/PhpParser/Lexer.php | 20 ++++++++++---------- test/PhpParser/NodeAbstractTest.php | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 2f78b7d114..5bf0ce4158 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -194,16 +194,6 @@ public function getNextToken(&$value = null, &$startAttributes = null, &$endAttr while (1) { $token = $this->tokens[++$this->pos]; - if ($this->attributeStartLineUsed) { - $startAttributes['startLine'] = $token->line; - } - if ($this->attributeStartTokenPosUsed) { - $startAttributes['startTokenPos'] = $this->pos; - } - if ($this->attributeStartFilePosUsed) { - $startAttributes['startFilePos'] = $token->pos; - } - $id = $token->id; if (isset($this->dropTokens[$id])) { if (\T_COMMENT === $id || \T_DOC_COMMENT === $id) { @@ -219,6 +209,16 @@ public function getNextToken(&$value = null, &$startAttributes = null, &$endAttr continue; } + if ($this->attributeStartLineUsed) { + $startAttributes['startLine'] = $token->line; + } + if ($this->attributeStartTokenPosUsed) { + $startAttributes['startTokenPos'] = $this->pos; + } + if ($this->attributeStartFilePosUsed) { + $startAttributes['startFilePos'] = $token->pos; + } + $value = $token->text; if (\T_CLOSE_TAG === $token->id) { $this->prevCloseTagHasNewline = false !== strpos($value, "\n") diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index 3efe72a96c..55680ab6d8 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -309,7 +309,6 @@ function functionName(&$a = 0, $b = 1.0) { "attrGroups": [], "namespacedName": null, "attributes": { - "startLine": 4, "comments": [ { "nodeType": "Comment", @@ -332,6 +331,7 @@ function functionName(&$a = 0, $b = 1.0) { "endTokenPos": 3 } ], + "startLine": 4, "endLine": 6 } } @@ -342,7 +342,6 @@ function functionName(&$a = 0, $b = 1.0) { { "nodeType": "Stmt_Function", "attributes": { - "startLine": 4, "comments": [ { "nodeType": "Comment", @@ -365,6 +364,7 @@ function functionName(&$a = 0, $b = 1.0) { "endTokenPos": 3 } ], + "startLine": 4, "endLine": 6 }, "byRef": false, From b20267c5adae9082e8ebce1b50183f8279a14543 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 9 Jul 2023 18:50:02 +0200 Subject: [PATCH 272/428] Make use of default actions For the default action $$ = $1, save the closure invocation. --- grammar/parser.template | 4 +- grammar/php.y | 158 ++++---- lib/PhpParser/Parser/Php7.php | 652 ++++++++----------------------- lib/PhpParser/Parser/Php8.php | 652 ++++++++----------------------- lib/PhpParser/ParserAbstract.php | 9 +- 5 files changed, 413 insertions(+), 1062 deletions(-) diff --git a/grammar/parser.template b/grammar/parser.template index 5d7da49f3f..41972f0e33 100644 --- a/grammar/parser.template +++ b/grammar/parser.template @@ -101,9 +101,7 @@ class #(-p) extends \PhpParser\ParserAbstract %b }, #noact - %n => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + %n => null, #endreduce ]; } diff --git a/grammar/php.y b/grammar/php.y index e5d6914bc3..d021c737dc 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -185,7 +185,7 @@ namespace_name: ; legacy_namespace_name: - namespace_name { $$ = $1; } + namespace_name | T_NAME_FULLY_QUALIFIED { $$ = Name[substr($1, 1)]; } ; @@ -229,13 +229,13 @@ attributes: optional_attributes: /* empty */ { $$ = []; } - | attributes { $$ = $1; } + | attributes ; top_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } + statement + | function_declaration_statement + | class_declaration_statement | T_HALT_COMPILER '(' ')' ';' { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; } | T_NAMESPACE namespace_declaration_name semi @@ -252,7 +252,7 @@ top_statement: $this->checkNamespace($$); } | T_USE use_declarations semi { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; } | T_USE use_type use_declarations semi { $$ = Stmt\Use_[$3, $2]; } - | group_use_declaration semi { $$ = $1; } + | group_use_declaration semi | T_CONST constant_declaration_list semi { $$ = Stmt\Const_[$2]; } ; @@ -269,7 +269,7 @@ group_use_declaration: ; unprefixed_use_declarations: - non_empty_unprefixed_use_declarations optional_comma { $$ = $1; } + non_empty_unprefixed_use_declarations optional_comma ; non_empty_unprefixed_use_declarations: @@ -279,7 +279,7 @@ non_empty_unprefixed_use_declarations: ; use_declarations: - non_empty_use_declarations no_comma { $$ = $1; } + non_empty_use_declarations no_comma ; non_empty_use_declarations: @@ -288,7 +288,7 @@ non_empty_use_declarations: ; inline_use_declarations: - non_empty_inline_use_declarations optional_comma { $$ = $1; } + non_empty_inline_use_declarations optional_comma ; non_empty_inline_use_declarations: @@ -317,7 +317,7 @@ inline_use_declaration: ; constant_declaration_list: - non_empty_constant_declaration_list no_comma { $$ = $1; } + non_empty_constant_declaration_list no_comma ; non_empty_constant_declaration_list: @@ -331,7 +331,7 @@ constant_declaration: ; class_const_list: - non_empty_class_const_list no_comma { $$ = $1; } + non_empty_class_const_list no_comma ; non_empty_class_const_list: @@ -358,9 +358,9 @@ inner_statement_list: ; inner_statement: - statement { $$ = $1; } - | function_declaration_statement { $$ = $1; } - | class_declaration_statement { $$ = $1; } + statement + | function_declaration_statement + | class_declaration_statement | T_HALT_COMPILER { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', attributes()); } ; @@ -417,7 +417,7 @@ non_empty_statement: ; statement: - non_empty_statement { $$ = $1; } + non_empty_statement | ';' { makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); if ($$ === null) $$ = array(); /* means: no statement */ } @@ -444,7 +444,7 @@ optional_finally: ; variables_list: - non_empty_variables_list optional_comma { $$ = $1; } + non_empty_variables_list optional_comma ; non_empty_variables_list: @@ -473,7 +473,7 @@ block_or_error: ; identifier_maybe_readonly: - identifier_not_reserved { $$ = $1; } + identifier_not_reserved | T_READONLY { $$ = Node\Identifier[$1]; } ; @@ -512,11 +512,11 @@ enum_case_expr: class_entry_type: T_CLASS { $$ = 0; } - | class_modifiers T_CLASS { $$ = $1; } + | class_modifiers T_CLASS ; class_modifiers: - class_modifier { $$ = $1; } + class_modifier | class_modifiers class_modifier { $this->checkClassModifier($1, $2, #2); $$ = $1 | $2; } ; @@ -542,7 +542,7 @@ implements_list: ; class_name_list: - non_empty_class_name_list no_comma { $$ = $1; } + non_empty_class_name_list no_comma ; non_empty_class_name_list: @@ -567,7 +567,7 @@ declare_statement: ; declare_list: - non_empty_declare_list no_comma { $$ = $1; } + non_empty_declare_list no_comma ; non_empty_declare_list: @@ -607,7 +607,7 @@ match: match_arm_list: /* empty */ { $$ = []; } - | non_empty_match_arm_list optional_comma { $$ = $1; } + | non_empty_match_arm_list optional_comma ; non_empty_match_arm_list: @@ -664,7 +664,7 @@ foreach_variable: ; parameter_list: - non_empty_parameter_list optional_comma { $$ = $1; } + non_empty_parameter_list optional_comma | /* empty */ { $$ = array(); } ; @@ -701,14 +701,14 @@ parameter: ; type_expr: - type { $$ = $1; } + type | '?' type { $$ = Node\NullableType[$2]; } | union_type { $$ = Node\UnionType[$1]; } - | intersection_type { $$ = $1; } + | intersection_type ; type: - type_without_static { $$ = $1; } + type_without_static | T_STATIC { $$ = Node\Name['static']; } ; @@ -719,8 +719,8 @@ type_without_static: ; union_type_element: - type { $$ = $1; } - | '(' intersection_type ')' { $$ = $2; } + type + | '(' intersection_type ')' { $$ = $2; } ; union_type: @@ -729,7 +729,7 @@ union_type: ; union_type_without_static_element: - type_without_static { $$ = $1; } + type_without_static | '(' intersection_type_without_static ')' { $$ = $2; } ; @@ -760,15 +760,15 @@ intersection_type_without_static: ; type_expr_without_static: - type_without_static { $$ = $1; } + type_without_static | '?' type_without_static { $$ = Node\NullableType[$2]; } | union_type_without_static { $$ = Node\UnionType[$1]; } - | intersection_type_without_static { $$ = $1; } + | intersection_type_without_static ; optional_type_without_static: /* empty */ { $$ = null; } - | type_expr_without_static { $$ = $1; } + | type_expr_without_static ; optional_return_type: @@ -801,7 +801,7 @@ argument: ; global_var_list: - non_empty_global_var_list no_comma { $$ = $1; } + non_empty_global_var_list no_comma ; non_empty_global_var_list: @@ -810,11 +810,11 @@ non_empty_global_var_list: ; global_var: - simple_variable { $$ = $1; } + simple_variable ; static_var_list: - non_empty_static_var_list no_comma { $$ = $1; } + non_empty_static_var_list no_comma ; non_empty_static_var_list: @@ -885,27 +885,27 @@ trait_method_reference_fully_qualified: name T_PAAMAYIM_NEKUDOTAYIM identifier_maybe_reserved { $$ = array($1, $3); } ; trait_method_reference: - trait_method_reference_fully_qualified { $$ = $1; } + trait_method_reference_fully_qualified | identifier_maybe_reserved { $$ = array(null, $1); } ; method_body: ';' /* abstract method */ { $$ = null; } - | block_or_error { $$ = $1; } + | block_or_error ; variable_modifiers: - non_empty_member_modifiers { $$ = $1; } + non_empty_member_modifiers | T_VAR { $$ = 0; } ; method_modifiers: /* empty */ { $$ = 0; } - | non_empty_member_modifiers { $$ = $1; } + | non_empty_member_modifiers ; non_empty_member_modifiers: - member_modifier { $$ = $1; } + member_modifier | non_empty_member_modifiers member_modifier { $this->checkModifier($1, $2, #2); $$ = $1 | $2; } ; @@ -920,7 +920,7 @@ member_modifier: ; property_declaration_list: - non_empty_property_declaration_list no_comma { $$ = $1; } + non_empty_property_declaration_list no_comma ; non_empty_property_declaration_list: @@ -939,11 +939,11 @@ property_declaration: ; expr_list_forbid_comma: - non_empty_expr_list no_comma { $$ = $1; } + non_empty_expr_list no_comma ; expr_list_allow_comma: - non_empty_expr_list optional_comma { $$ = $1; } + non_empty_expr_list optional_comma ; non_empty_expr_list: @@ -953,11 +953,11 @@ non_empty_expr_list: for_expr: /* empty */ { $$ = array(); } - | expr_list_forbid_comma { $$ = $1; } + | expr_list_forbid_comma ; expr: - variable { $$ = $1; } + variable | list_expr '=' expr { $$ = Expr\Assign[$1, $3]; } | array_short_syntax '=' expr { $$ = Expr\Assign[$this->fixupArrayDestructuring($1), $3]; } @@ -969,8 +969,8 @@ expr: $this->emitError(new Error('Cannot assign new by reference', attributes())); } } - | new_expr { $$ = $1; } - | match { $$ = $1; } + | new_expr + | match | 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]; } @@ -1047,7 +1047,7 @@ expr: $attrs['kind'] = strtolower($1) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $$ = new Expr\Exit_($2, $attrs); } | '@' expr { $$ = Expr\ErrorSuppress[$2]; } - | scalar { $$ = $1; } + | scalar | '`' backticks_expr '`' { $$ = Expr\ShellExec[$2]; } | T_PRINT expr { $$ = Expr\Print_[$2]; } | T_YIELD { $$ = Expr\Yield_[null, null]; } @@ -1093,7 +1093,7 @@ lexical_vars: ; lexical_var_list: - non_empty_lexical_var_list optional_comma { $$ = $1; } + non_empty_lexical_var_list optional_comma ; non_empty_lexical_var_list: @@ -1119,7 +1119,7 @@ function_call: class_name: T_STATIC { $$ = Name[$1]; } - | name { $$ = $1; } + | name ; name: @@ -1130,15 +1130,15 @@ name: ; class_name_reference: - class_name { $$ = $1; } - | new_variable { $$ = $1; } + class_name + | new_variable | '(' expr ')' { $$ = $2; } | error { $$ = Expr\Error[]; $this->errorState = 2; } ; class_name_or_var: - class_name { $$ = $1; } - | fully_dereferencable { $$ = $1; } + class_name + | fully_dereferencable ; exit_expr: @@ -1155,7 +1155,7 @@ backticks_expr: ctor_arguments: /* empty */ { $$ = array(); } - | argument_list { $$ = $1; } + | argument_list ; constant: @@ -1203,9 +1203,9 @@ scalar: T_LNUMBER { $$ = $this->parseLNumber($1, attributes(), $this->phpVersion->allowsInvalidOctals()); } | T_DNUMBER { $$ = Scalar\Float_::fromString($1, attributes()); } - | dereferencable_scalar { $$ = $1; } - | constant { $$ = $1; } - | class_constant { $$ = $1; } + | dereferencable_scalar + | constant + | class_constant | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC { $$ = $this->parseDocString($1, $2, $3, attributes(), stackAttributes(#3), true); } | T_START_HEREDOC T_END_HEREDOC @@ -1216,32 +1216,32 @@ scalar: optional_expr: /* empty */ { $$ = null; } - | expr { $$ = $1; } + | expr ; fully_dereferencable: - variable { $$ = $1; } + variable | '(' expr ')' { $$ = $2; } - | dereferencable_scalar { $$ = $1; } - | class_constant { $$ = $1; } + | dereferencable_scalar + | class_constant ; array_object_dereferencable: - fully_dereferencable { $$ = $1; } - | constant { $$ = $1; } + fully_dereferencable + | constant ; callable_expr: - callable_variable { $$ = $1; } + callable_variable | '(' expr ')' { $$ = $2; } - | dereferencable_scalar { $$ = $1; } + | dereferencable_scalar ; callable_variable: - simple_variable { $$ = $1; } + simple_variable | array_object_dereferencable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } | array_object_dereferencable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | function_call { $$ = $1; } + | function_call | array_object_dereferencable T_OBJECT_OPERATOR property_name argument_list { $$ = Expr\MethodCall[$1, $3, $4]; } | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list @@ -1250,12 +1250,12 @@ callable_variable: optional_plain_variable: /* empty */ { $$ = null; } - | plain_variable { $$ = $1; } + | plain_variable ; variable: - callable_variable { $$ = $1; } - | static_member { $$ = $1; } + callable_variable + | static_member | array_object_dereferencable T_OBJECT_OPERATOR property_name { $$ = Expr\PropertyFetch[$1, $3]; } | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name @@ -1263,7 +1263,7 @@ variable: ; simple_variable: - plain_variable { $$ = $1; } + plain_variable | '$' '{' expr '}' { $$ = Expr\Variable[$3]; } | '$' simple_variable { $$ = Expr\Variable[$2]; } | '$' error { $$ = Expr\Variable[Expr\Error[]]; $this->errorState = 2; } @@ -1280,7 +1280,7 @@ static_member: ; new_variable: - simple_variable { $$ = $1; } + simple_variable | 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]; } @@ -1292,15 +1292,15 @@ new_variable: ; member_name: - identifier_maybe_reserved { $$ = $1; } + identifier_maybe_reserved | '{' expr '}' { $$ = $2; } - | simple_variable { $$ = $1; } + | simple_variable ; property_name: - identifier_not_reserved { $$ = $1; } + identifier_not_reserved | '{' expr '}' { $$ = $2; } - | simple_variable { $$ = $1; } + | simple_variable | error { $$ = Expr\Error[]; $this->errorState = 2; } ; @@ -1357,7 +1357,7 @@ encaps_str_varname: ; encaps_var: - plain_variable { $$ = $1; } + plain_variable | plain_variable '[' encaps_var_offset ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } | plain_variable T_OBJECT_OPERATOR identifier_not_reserved { $$ = Expr\PropertyFetch[$1, $3]; } @@ -1374,7 +1374,7 @@ encaps_var_offset: T_STRING { $$ = Scalar\String_[$1]; } | T_NUM_STRING { $$ = $this->parseNumString($1, attributes()); } | '-' T_NUM_STRING { $$ = $this->parseNumString('-' . $2, attributes()); } - | plain_variable { $$ = $1; } + | plain_variable ; %% diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 7cb0471066..4c279b2ade 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1147,9 +1147,7 @@ class Php7 extends \PhpParser\ParserAbstract protected function initReduceCallbacks(): void { $this->reduceCallbacks = [ - 0 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 0 => null, 1 => function ($stackPos) { $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); }, @@ -1163,246 +1161,88 @@ protected function initReduceCallbacks(): void { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 5 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 6 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 7 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 8 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 9 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 10 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 11 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 12 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 13 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 14 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 15 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 16 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 17 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 18 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 19 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 20 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 21 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 22 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 23 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 24 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 25 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 26 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 27 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 28 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 29 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 30 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 31 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 32 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 33 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 34 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 35 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 36 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 37 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 38 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 39 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 40 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 41 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 42 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 43 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 44 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 45 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 46 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 47 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 48 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 49 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 50 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 51 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 52 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 53 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 54 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 55 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 56 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 57 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 58 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 59 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 60 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 61 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 62 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 63 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 64 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 65 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 66 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 67 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 68 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 69 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 70 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 71 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 72 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 73 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 74 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 75 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 5 => null, + 6 => null, + 7 => null, + 8 => null, + 9 => null, + 10 => null, + 11 => null, + 12 => null, + 13 => null, + 14 => null, + 15 => null, + 16 => null, + 17 => null, + 18 => null, + 19 => null, + 20 => null, + 21 => null, + 22 => null, + 23 => null, + 24 => null, + 25 => null, + 26 => null, + 27 => null, + 28 => null, + 29 => null, + 30 => null, + 31 => null, + 32 => null, + 33 => null, + 34 => null, + 35 => null, + 36 => null, + 37 => null, + 38 => null, + 39 => null, + 40 => null, + 41 => null, + 42 => null, + 43 => null, + 44 => null, + 45 => null, + 46 => null, + 47 => null, + 48 => null, + 49 => null, + 50 => null, + 51 => null, + 52 => null, + 53 => null, + 54 => null, + 55 => null, + 56 => null, + 57 => null, + 58 => null, + 59 => null, + 60 => null, + 61 => null, + 62 => null, + 63 => null, + 64 => null, + 65 => null, + 66 => null, + 67 => null, + 68 => null, + 69 => null, + 70 => null, + 71 => null, + 72 => null, + 73 => null, + 74 => null, + 75 => null, 76 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "emitError(new Error('Cannot use "startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 77 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 78 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 79 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 80 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 81 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 82 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 83 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 84 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 77 => null, + 78 => null, + 79 => null, + 80 => null, + 81 => null, + 82 => null, + 83 => null, + 84 => null, 85 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -1430,9 +1270,7 @@ protected function initReduceCallbacks(): void { 93 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 94 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 94 => null, 95 => function ($stackPos) { $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -1451,12 +1289,8 @@ protected function initReduceCallbacks(): void { 100 => function ($stackPos) { $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 101 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 102 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 101 => null, + 102 => null, 103 => function ($stackPos) { $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -1481,18 +1315,10 @@ protected function initReduceCallbacks(): void { 110 => function ($stackPos) { $this->semValue = []; }, - 111 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 112 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 113 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 114 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 111 => null, + 112 => null, + 113 => null, + 114 => null, 115 => function ($stackPos) { $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, @@ -1517,9 +1343,7 @@ protected function initReduceCallbacks(): void { 120 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 121 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 121 => null, 122 => function ($stackPos) { $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, @@ -1535,27 +1359,21 @@ protected function initReduceCallbacks(): void { 126 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 127 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 127 => null, 128 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 129 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 130 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 130 => null, 131 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 132 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 133 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 133 => null, 134 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -1580,9 +1398,7 @@ protected function initReduceCallbacks(): void { 141 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; }, - 142 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 142 => null, 143 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -1592,9 +1408,7 @@ protected function initReduceCallbacks(): void { 145 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 146 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 146 => null, 147 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -1617,15 +1431,9 @@ protected function initReduceCallbacks(): void { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 154 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 155 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 156 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 154 => null, + 155 => null, + 156 => null, 157 => function ($stackPos) { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -1717,9 +1525,7 @@ protected function initReduceCallbacks(): void { 181 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, - 182 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 182 => null, 183 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ @@ -1745,9 +1551,7 @@ protected function initReduceCallbacks(): void { 190 => function ($stackPos) { $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 191 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 191 => null, 192 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -1778,9 +1582,7 @@ protected function initReduceCallbacks(): void { 201 => function ($stackPos) { $this->semValue = []; }, - 202 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 202 => null, 203 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -1824,12 +1626,8 @@ protected function initReduceCallbacks(): void { 215 => function ($stackPos) { $this->semValue = 0; }, - 216 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 217 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 216 => null, + 217 => null, 218 => function ($stackPos) { $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, @@ -1860,9 +1658,7 @@ protected function initReduceCallbacks(): void { 227 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 228 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 228 => null, 229 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -1890,9 +1686,7 @@ protected function initReduceCallbacks(): void { 237 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 238 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 238 => null, 239 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -1926,21 +1720,15 @@ protected function initReduceCallbacks(): void { 249 => function ($stackPos) { $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 250 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 251 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 250 => null, + 251 => null, 252 => function ($stackPos) { $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 253 => function ($stackPos) { $this->semValue = []; }, - 254 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 254 => null, 255 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -2001,9 +1789,7 @@ protected function initReduceCallbacks(): void { 274 => function ($stackPos) { $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, - 275 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 275 => null, 276 => function ($stackPos) { $this->semValue = array(); }, @@ -2042,21 +1828,15 @@ protected function initReduceCallbacks(): void { 287 => function ($stackPos) { $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, - 288 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 288 => null, 289 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 290 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 291 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 292 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 291 => null, + 292 => null, 293 => function ($stackPos) { $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -2069,9 +1849,7 @@ protected function initReduceCallbacks(): void { 296 => function ($stackPos) { $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 297 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 297 => null, 298 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, @@ -2081,9 +1859,7 @@ protected function initReduceCallbacks(): void { 300 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 301 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 301 => null, 302 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, @@ -2111,24 +1887,18 @@ protected function initReduceCallbacks(): void { 310 => function ($stackPos) { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 311 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 311 => null, 312 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 313 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 314 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 314 => null, 315 => function ($stackPos) { $this->semValue = null; }, - 316 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 316 => null, 317 => function ($stackPos) { $this->semValue = null; }, @@ -2168,21 +1938,15 @@ protected function initReduceCallbacks(): void { 329 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, - 330 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 330 => null, 331 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 332 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 333 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 334 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 333 => null, + 334 => null, 335 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -2260,33 +2024,23 @@ protected function initReduceCallbacks(): void { 358 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 359 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 359 => null, 360 => function ($stackPos) { $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 361 => function ($stackPos) { $this->semValue = null; }, - 362 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 363 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 362 => null, + 363 => null, 364 => function ($stackPos) { $this->semValue = 0; }, 365 => function ($stackPos) { $this->semValue = 0; }, - 366 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 367 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 366 => null, + 367 => null, 368 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, @@ -2311,9 +2065,7 @@ protected function initReduceCallbacks(): void { 375 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 376 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 376 => null, 377 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -2329,12 +2081,8 @@ protected function initReduceCallbacks(): void { 381 => function ($stackPos) { $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 382 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 383 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 382 => null, + 383 => null, 384 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -2344,12 +2092,8 @@ protected function initReduceCallbacks(): void { 386 => function ($stackPos) { $this->semValue = array(); }, - 387 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 388 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 387 => null, + 388 => null, 389 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, @@ -2369,12 +2113,8 @@ protected function initReduceCallbacks(): void { } }, - 394 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 395 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 394 => null, + 395 => null, 396 => function ($stackPos) { $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, @@ -2589,9 +2329,7 @@ protected function initReduceCallbacks(): void { 465 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 466 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 466 => null, 467 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, @@ -2653,9 +2391,7 @@ protected function initReduceCallbacks(): void { 486 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 487 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 487 => null, 488 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -2683,9 +2419,7 @@ protected function initReduceCallbacks(): void { 496 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 497 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 497 => null, 498 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -2698,24 +2432,16 @@ protected function initReduceCallbacks(): void { 501 => function ($stackPos) { $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 502 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 503 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 502 => null, + 503 => null, 504 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 505 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, - 506 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 507 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 506 => null, + 507 => null, 508 => function ($stackPos) { $this->semValue = null; }, @@ -2734,9 +2460,7 @@ protected function initReduceCallbacks(): void { 513 => function ($stackPos) { $this->semValue = array(); }, - 514 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 514 => null, 515 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -2798,15 +2522,9 @@ protected function initReduceCallbacks(): void { 533 => function ($stackPos) { $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 534 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 535 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 536 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 534 => null, + 535 => null, + 536 => null, 537 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, @@ -2819,48 +2537,28 @@ protected function initReduceCallbacks(): void { 540 => function ($stackPos) { $this->semValue = null; }, - 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 541 => null, + 542 => null, 543 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 544 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 545 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 546 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 548 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 544 => null, + 545 => null, + 546 => null, + 547 => null, + 548 => null, 549 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 551 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 550 => null, + 551 => null, 552 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 553 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 554 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 554 => null, 555 => function ($stackPos) { $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, @@ -2870,24 +2568,16 @@ protected function initReduceCallbacks(): void { 557 => function ($stackPos) { $this->semValue = null; }, - 558 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 559 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 560 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 558 => null, + 559 => null, + 560 => null, 561 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 562 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 563 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 563 => null, 564 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, @@ -2903,9 +2593,7 @@ protected function initReduceCallbacks(): void { 568 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 569 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 569 => null, 570 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, @@ -2924,24 +2612,16 @@ protected function initReduceCallbacks(): void { 575 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 576 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 576 => null, 577 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 579 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 578 => null, + 579 => null, 580 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 581 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 581 => null, 582 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, @@ -2952,9 +2632,7 @@ protected function initReduceCallbacks(): void { 584 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, - 585 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 585 => null, 586 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, @@ -3009,9 +2687,7 @@ protected function initReduceCallbacks(): void { 602 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 603 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 603 => null, 604 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, @@ -3042,9 +2718,7 @@ protected function initReduceCallbacks(): void { 613 => function ($stackPos) { $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 614 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 614 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 009a8b6a72..2588f07beb 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1155,9 +1155,7 @@ class Php8 extends \PhpParser\ParserAbstract protected function initReduceCallbacks(): void { $this->reduceCallbacks = [ - 0 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 0 => null, 1 => function ($stackPos) { $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); }, @@ -1171,246 +1169,88 @@ protected function initReduceCallbacks(): void { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 5 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 6 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 7 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 8 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 9 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 10 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 11 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 12 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 13 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 14 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 15 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 16 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 17 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 18 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 19 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 20 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 21 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 22 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 23 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 24 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 25 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 26 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 27 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 28 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 29 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 30 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 31 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 32 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 33 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 34 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 35 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 36 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 37 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 38 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 39 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 40 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 41 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 42 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 43 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 44 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 45 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 46 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 47 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 48 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 49 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 50 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 51 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 52 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 53 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 54 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 55 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 56 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 57 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 58 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 59 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 60 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 61 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 62 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 63 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 64 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 65 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 66 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 67 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 68 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 69 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 70 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 71 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 72 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 73 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 74 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 75 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 5 => null, + 6 => null, + 7 => null, + 8 => null, + 9 => null, + 10 => null, + 11 => null, + 12 => null, + 13 => null, + 14 => null, + 15 => null, + 16 => null, + 17 => null, + 18 => null, + 19 => null, + 20 => null, + 21 => null, + 22 => null, + 23 => null, + 24 => null, + 25 => null, + 26 => null, + 27 => null, + 28 => null, + 29 => null, + 30 => null, + 31 => null, + 32 => null, + 33 => null, + 34 => null, + 35 => null, + 36 => null, + 37 => null, + 38 => null, + 39 => null, + 40 => null, + 41 => null, + 42 => null, + 43 => null, + 44 => null, + 45 => null, + 46 => null, + 47 => null, + 48 => null, + 49 => null, + 50 => null, + 51 => null, + 52 => null, + 53 => null, + 54 => null, + 55 => null, + 56 => null, + 57 => null, + 58 => null, + 59 => null, + 60 => null, + 61 => null, + 62 => null, + 63 => null, + 64 => null, + 65 => null, + 66 => null, + 67 => null, + 68 => null, + 69 => null, + 70 => null, + 71 => null, + 72 => null, + 73 => null, + 74 => null, + 75 => null, 76 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "emitError(new Error('Cannot use "startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 77 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 78 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 79 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 80 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 81 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 82 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 83 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 84 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 77 => null, + 78 => null, + 79 => null, + 80 => null, + 81 => null, + 82 => null, + 83 => null, + 84 => null, 85 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -1438,9 +1278,7 @@ protected function initReduceCallbacks(): void { 93 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 94 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 94 => null, 95 => function ($stackPos) { $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -1459,12 +1297,8 @@ protected function initReduceCallbacks(): void { 100 => function ($stackPos) { $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); }, - 101 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 102 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 101 => null, + 102 => null, 103 => function ($stackPos) { $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -1489,18 +1323,10 @@ protected function initReduceCallbacks(): void { 110 => function ($stackPos) { $this->semValue = []; }, - 111 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 112 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 113 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 114 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 111 => null, + 112 => null, + 113 => null, + 114 => null, 115 => function ($stackPos) { $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, @@ -1525,9 +1351,7 @@ protected function initReduceCallbacks(): void { 120 => function ($stackPos) { $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 121 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 121 => null, 122 => function ($stackPos) { $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, @@ -1543,27 +1367,21 @@ protected function initReduceCallbacks(): void { 126 => function ($stackPos) { $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, - 127 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 127 => null, 128 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 129 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 130 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 130 => null, 131 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 132 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 133 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 133 => null, 134 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -1588,9 +1406,7 @@ protected function initReduceCallbacks(): void { 141 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; }, - 142 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 142 => null, 143 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -1600,9 +1416,7 @@ protected function initReduceCallbacks(): void { 145 => function ($stackPos) { $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 146 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 146 => null, 147 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -1625,15 +1439,9 @@ protected function initReduceCallbacks(): void { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 154 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 155 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 156 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 154 => null, + 155 => null, + 156 => null, 157 => function ($stackPos) { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -1725,9 +1533,7 @@ protected function initReduceCallbacks(): void { 181 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, - 182 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 182 => null, 183 => function ($stackPos) { $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ @@ -1753,9 +1559,7 @@ protected function initReduceCallbacks(): void { 190 => function ($stackPos) { $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 191 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 191 => null, 192 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -1786,9 +1590,7 @@ protected function initReduceCallbacks(): void { 201 => function ($stackPos) { $this->semValue = []; }, - 202 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 202 => null, 203 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -1832,12 +1634,8 @@ protected function initReduceCallbacks(): void { 215 => function ($stackPos) { $this->semValue = 0; }, - 216 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 217 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 216 => null, + 217 => null, 218 => function ($stackPos) { $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, @@ -1868,9 +1666,7 @@ protected function initReduceCallbacks(): void { 227 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 228 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 228 => null, 229 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -1898,9 +1694,7 @@ protected function initReduceCallbacks(): void { 237 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 238 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 238 => null, 239 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -1934,21 +1728,15 @@ protected function initReduceCallbacks(): void { 249 => function ($stackPos) { $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 250 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 251 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 250 => null, + 251 => null, 252 => function ($stackPos) { $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); }, 253 => function ($stackPos) { $this->semValue = []; }, - 254 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 254 => null, 255 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -2009,9 +1797,7 @@ protected function initReduceCallbacks(): void { 274 => function ($stackPos) { $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, - 275 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 275 => null, 276 => function ($stackPos) { $this->semValue = array(); }, @@ -2050,21 +1836,15 @@ protected function initReduceCallbacks(): void { 287 => function ($stackPos) { $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, - 288 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 288 => null, 289 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 290 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 291 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 292 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 291 => null, + 292 => null, 293 => function ($stackPos) { $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -2077,9 +1857,7 @@ protected function initReduceCallbacks(): void { 296 => function ($stackPos) { $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 297 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 297 => null, 298 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, @@ -2089,9 +1867,7 @@ protected function initReduceCallbacks(): void { 300 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 301 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 301 => null, 302 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, @@ -2119,24 +1895,18 @@ protected function initReduceCallbacks(): void { 310 => function ($stackPos) { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 311 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 311 => null, 312 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 313 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 314 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 314 => null, 315 => function ($stackPos) { $this->semValue = null; }, - 316 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 316 => null, 317 => function ($stackPos) { $this->semValue = null; }, @@ -2176,21 +1946,15 @@ protected function initReduceCallbacks(): void { 329 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); }, - 330 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 330 => null, 331 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 332 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 333 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 334 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 333 => null, + 334 => null, 335 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -2268,33 +2032,23 @@ protected function initReduceCallbacks(): void { 358 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 359 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 359 => null, 360 => function ($stackPos) { $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 361 => function ($stackPos) { $this->semValue = null; }, - 362 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 363 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 362 => null, + 363 => null, 364 => function ($stackPos) { $this->semValue = 0; }, 365 => function ($stackPos) { $this->semValue = 0; }, - 366 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 367 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 366 => null, + 367 => null, 368 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, @@ -2319,9 +2073,7 @@ protected function initReduceCallbacks(): void { 375 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 376 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 376 => null, 377 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -2337,12 +2089,8 @@ protected function initReduceCallbacks(): void { 381 => function ($stackPos) { $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 382 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 383 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 382 => null, + 383 => null, 384 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -2352,12 +2100,8 @@ protected function initReduceCallbacks(): void { 386 => function ($stackPos) { $this->semValue = array(); }, - 387 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 388 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 387 => null, + 388 => null, 389 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, @@ -2377,12 +2121,8 @@ protected function initReduceCallbacks(): void { } }, - 394 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 395 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 394 => null, + 395 => null, 396 => function ($stackPos) { $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, @@ -2597,9 +2337,7 @@ protected function initReduceCallbacks(): void { 465 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 466 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 466 => null, 467 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, @@ -2661,9 +2399,7 @@ protected function initReduceCallbacks(): void { 486 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 487 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 487 => null, 488 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -2691,9 +2427,7 @@ protected function initReduceCallbacks(): void { 496 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 497 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 497 => null, 498 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -2706,24 +2440,16 @@ protected function initReduceCallbacks(): void { 501 => function ($stackPos) { $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 502 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 503 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 502 => null, + 503 => null, 504 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 505 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, - 506 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 507 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 506 => null, + 507 => null, 508 => function ($stackPos) { $this->semValue = null; }, @@ -2742,9 +2468,7 @@ protected function initReduceCallbacks(): void { 513 => function ($stackPos) { $this->semValue = array(); }, - 514 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 514 => null, 515 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, @@ -2806,15 +2530,9 @@ protected function initReduceCallbacks(): void { 533 => function ($stackPos) { $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 534 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 535 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 536 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 534 => null, + 535 => null, + 536 => null, 537 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, @@ -2827,48 +2545,28 @@ protected function initReduceCallbacks(): void { 540 => function ($stackPos) { $this->semValue = null; }, - 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 541 => null, + 542 => null, 543 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 544 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 545 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 546 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 548 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 544 => null, + 545 => null, + 546 => null, + 547 => null, + 548 => null, 549 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 551 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 550 => null, + 551 => null, 552 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 553 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 554 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 554 => null, 555 => function ($stackPos) { $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, @@ -2878,24 +2576,16 @@ protected function initReduceCallbacks(): void { 557 => function ($stackPos) { $this->semValue = null; }, - 558 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 559 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 560 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 558 => null, + 559 => null, + 560 => null, 561 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 562 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 563 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 563 => null, 564 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, @@ -2911,9 +2601,7 @@ protected function initReduceCallbacks(): void { 568 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 569 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 569 => null, 570 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, @@ -2932,24 +2620,16 @@ protected function initReduceCallbacks(): void { 575 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 576 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 576 => null, 577 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 579 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 578 => null, + 579 => null, 580 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 581 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 581 => null, 582 => function ($stackPos) { $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, @@ -2960,9 +2640,7 @@ protected function initReduceCallbacks(): void { 584 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, - 585 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 585 => null, 586 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, @@ -3017,9 +2695,7 @@ protected function initReduceCallbacks(): void { 602 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 603 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 603 => null, 604 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, @@ -3050,9 +2726,7 @@ protected function initReduceCallbacks(): void { 613 => function ($stackPos) { $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 614 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 614 => null, ]; } } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index f3e5eb2f10..8d2c56f74f 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -312,8 +312,14 @@ protected function doParse(): ?array { /* reduce */ //$this->traceReduce($rule); + $ruleLength = $this->ruleToLength[$rule]; try { - $this->reduceCallbacks[$rule]($stackPos); + $callback = $this->reduceCallbacks[$rule]; + if ($callback !== null) { + $callback($stackPos); + } elseif ($ruleLength > 0) { + $this->semValue = $this->semStack[$stackPos - $ruleLength + 1]; + } } catch (Error $e) { if (-1 === $e->getStartLine() && isset($startAttributes['startLine'])) { $e->setStartLine($startAttributes['startLine']); @@ -326,7 +332,6 @@ protected function doParse(): ?array { /* Goto - shift nonterminal */ $lastEndAttributes = $this->endAttributeStack[$stackPos]; - $ruleLength = $this->ruleToLength[$rule]; $stackPos -= $ruleLength; $nonTerminal = $this->ruleToNonTerminal[$rule]; $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos]; From 4b497045e062adba36db0bf37f938080ab92df25 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 29 Jul 2023 15:10:11 +0200 Subject: [PATCH 273/428] Move attribute handling into parser The Lexer now only provides the tokens to the parser, while the parser is responsible for determining which attributes are placed on notes. This only needs to be done when the attributes are actually needed, rather than for all tokens. This removes the usedAttributes lexer option (and lexer options entirely). The attributes are now enabled unconditionally. They have less overhead now, and the need to explicitly enable them for some use cases (e.g. formatting-preserving printing) doesn't seem like a good tradeoff anymore. There are some additional changes to the Lexer interface that should be done after this, and the docs / upgrading guide haven't been adjusted yet. --- bin/php-parse | 5 +- grammar/php.y | 19 +- grammar/phpyLang.php | 26 +- lib/PhpParser/Lexer.php | 151 ------- lib/PhpParser/Lexer/Emulative.php | 15 +- lib/PhpParser/Parser/Php7.php | 563 +++++++++++++------------ lib/PhpParser/Parser/Php8.php | 563 +++++++++++++------------ lib/PhpParser/ParserAbstract.php | 227 +++++++--- lib/PhpParser/ParserFactory.php | 20 +- test/PhpParser/CodeParsingTest.php | 9 +- test/PhpParser/Lexer/EmulativeTest.php | 103 +++-- test/PhpParser/LexerTest.php | 226 ++-------- test/PhpParser/NodeAbstractTest.php | 116 ++++- test/PhpParser/NodeDumperTest.php | 5 +- test/PhpParser/ParserTest.php | 22 +- test/PhpParser/PrettyPrinterTest.php | 17 +- test_old/run.php | 7 +- tools/fuzzing/target.php | 4 +- 18 files changed, 963 insertions(+), 1135 deletions(-) diff --git a/bin/php-parse b/bin/php-parse index cdf9584c5f..fc44f234c5 100755 --- a/bin/php-parse +++ b/bin/php-parse @@ -26,10 +26,7 @@ if (empty($files)) { showHelp("Must specify at least one file."); } -$lexerOptions = ['usedAttributes' => [ - 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments' -]]; -$parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version'], $lexerOptions); +$parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version']); $dumper = new PhpParser\NodeDumper([ 'dumpComments' => true, 'dumpPositions' => $attributes['with-positions'], diff --git a/grammar/php.y b/grammar/php.y index d021c737dc..e092792cde 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -134,7 +134,7 @@ top_statement_list_ex: top_statement_list: top_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); + { makeZeroLengthNop($nop); if ($nop !== null) { $1[] = $nop; } $$ = $1; } ; @@ -237,7 +237,7 @@ top_statement: | function_declaration_statement | class_declaration_statement | T_HALT_COMPILER '(' ')' ';' - { $$ = Stmt\HaltCompiler[$this->lexer->handleHaltCompiler()]; } + { $$ = Stmt\HaltCompiler[$this->handleHaltCompiler()]; } | T_NAMESPACE namespace_declaration_name semi { $$ = Stmt\Namespace_[$2, null]; $$->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); @@ -353,7 +353,7 @@ inner_statement_list_ex: inner_statement_list: inner_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); + { makeZeroLengthNop($nop); if ($nop !== null) { $1[] = $nop; } $$ = $1; } ; @@ -371,7 +371,7 @@ non_empty_statement: if ($2) { $$ = $2; prependLeadingComments($$); } else { - makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); + makeNop($$); if (null === $$) { $$ = array(); } } } @@ -390,7 +390,10 @@ non_empty_statement: | T_GLOBAL global_var_list semi { $$ = Stmt\Global_[$2]; } | T_STATIC static_var_list semi { $$ = Stmt\Static_[$2]; } | T_ECHO expr_list_forbid_comma semi { $$ = Stmt\Echo_[$2]; } - | T_INLINE_HTML { $$ = Stmt\InlineHTML[$1]; } + | T_INLINE_HTML { + $$ = Stmt\InlineHTML[$1]; + $$->setAttribute('hasLeadingNewline', $this->inlineHtmlHasLeadingNewline(#1)); + } | expr semi { $e = $1; if ($e instanceof Expr\Throw_) { @@ -419,7 +422,7 @@ non_empty_statement: statement: non_empty_statement | ';' - { makeNop($$, $this->startAttributeStack[#1], $this->endAttributes); + { makeNop($$); if ($$ === null) $$ = array(); /* means: no statement */ } ; @@ -834,7 +837,7 @@ class_statement_list_ex: class_statement_list: class_statement_list_ex - { makeZeroLengthNop($nop, $this->lookaheadStartAttributes); + { makeZeroLengthNop($nop); if ($nop !== null) { $1[] = $nop; } $$ = $1; } ; @@ -1337,7 +1340,7 @@ array_pair: | /* empty */ { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ - $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); + $attrs = $this->createEmptyElemAttributes($this->tokenPos); $$ = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); } ; diff --git a/grammar/phpyLang.php b/grammar/phpyLang.php index 7a41639601..c5fa54b0be 100644 --- a/grammar/phpyLang.php +++ b/grammar/phpyLang.php @@ -65,13 +65,13 @@ function ($matches) { if ('attributes' === $name) { assertArgs(0, $args, $name); - return '$this->startAttributeStack[#1] + $this->endAttributes'; + return '$this->getAttributes($this->tokenStartStack[#1], $this->tokenEndStack[$stackPos])'; } if ('stackAttributes' === $name) { assertArgs(1, $args, $name); - return '$this->startAttributeStack[' . $args[0] . ']' - . ' + $this->endAttributeStack[' . $args[0] . ']'; + return '$this->getAttributes($this->tokenStartStack[' . $args[0] . '], ' + . ' $this->tokenEndStack[' . $args[0] . '])'; } if ('init' === $name) { @@ -111,30 +111,24 @@ function ($matches) { } if ('makeNop' === $name) { - assertArgs(3, $args, $name); + assertArgs(1, $args, $name); - return '$startAttributes = ' . $args[1] . ';' - . ' if (isset($startAttributes[\'comments\']))' - . ' { ' . $args[0] . ' = new Stmt\Nop($startAttributes + ' . $args[2] . '); }' - . ' else { ' . $args[0] . ' = null; }'; + return $args[0] . ' = $this->maybeCreateNop($this->tokenStartStack[#1], $this->tokenEndStack[$stackPos])'; } if ('makeZeroLengthNop' == $name) { - assertArgs(2, $args, $name); + assertArgs(1, $args, $name); - return '$startAttributes = ' . $args[1] . ';' - . ' if (isset($startAttributes[\'comments\']))' - . ' { ' . $args[0] . ' = new Stmt\Nop($this->createCommentNopAttributes($startAttributes[\'comments\'])); }' - . ' else { ' . $args[0] . ' = null; }'; + return $args[0] . ' = $this->maybeCreateZeroLengthNop($this->tokenPos);'; } if ('prependLeadingComments' === $name) { assertArgs(1, $args, $name); - return '$attrs = $this->startAttributeStack[#1]; $stmts = ' . $args[0] . '; ' - . 'if (!empty($attrs[\'comments\'])) {' + return '$comments = $this->getCommentsBeforeToken($this->tokenStartStack[#1]); $stmts = ' . $args[0] . '; ' + . 'if (!empty($comments)) {' . '$stmts[0]->setAttribute(\'comments\', ' - . 'array_merge($attrs[\'comments\'], $stmts[0]->getAttribute(\'comments\', []))); }'; + . 'array_merge($comments, $stmts[0]->getAttribute(\'comments\', []))); }'; } return $matches[0]; diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 5bf0ce4158..9d4467fbac 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -5,60 +5,8 @@ require __DIR__ . '/compatibility_tokens.php'; class Lexer { - /** @var string Code being tokenized */ - protected $code; /** @var list List of tokens */ protected $tokens; - /** @var int Current position in the token array */ - protected $pos; - /** @var bool Whether the preceding closing PHP tag has a trailing newline */ - protected $prevCloseTagHasNewline; - /** @var array Map of tokens that should be dropped (like T_WHITESPACE) */ - protected $dropTokens; - - /** @var bool Whether to use the startLine attribute */ - private $attributeStartLineUsed; - /** @var bool Whether to use the endLine attribute */ - private $attributeEndLineUsed; - /** @var bool Whether to use the startTokenPos attribute */ - private $attributeStartTokenPosUsed; - /** @var bool Whether to use the endTokenPos attribute */ - private $attributeEndTokenPosUsed; - /** @var bool Whether to use the startFilePos attribute */ - private $attributeStartFilePosUsed; - /** @var bool Whether to use the endFilePos attribute */ - private $attributeEndFilePosUsed; - /** @var bool Whether to use the comments attribute */ - private $attributeCommentsUsed; - - /** - * Creates a Lexer. - * - * @param array{usedAttributes?: string[]} $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 = []) { - // 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( - [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], 1 - ); - - $defaultAttributes = ['comments', 'startLine', 'endLine']; - $usedAttributes = array_fill_keys($options['usedAttributes'] ?? $defaultAttributes, true); - - // Create individual boolean properties to make these checks faster. - $this->attributeStartLineUsed = isset($usedAttributes['startLine']); - $this->attributeEndLineUsed = isset($usedAttributes['endLine']); - $this->attributeStartTokenPosUsed = isset($usedAttributes['startTokenPos']); - $this->attributeEndTokenPosUsed = isset($usedAttributes['endTokenPos']); - $this->attributeStartFilePosUsed = isset($usedAttributes['startFilePos']); - $this->attributeEndFilePosUsed = isset($usedAttributes['endFilePos']); - $this->attributeCommentsUsed = isset($usedAttributes['comments']); - } /** * Initializes the lexer for lexing the provided source code. @@ -75,13 +23,6 @@ public function startLexing(string $code, ?ErrorHandler $errorHandler = null): v $errorHandler = new ErrorHandler\Throwing(); } - $this->code = $code; // keep the code around for __halt_compiler() handling - $this->pos = -1; - - // 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->tokens = @Token::tokenize($code); @@ -165,84 +106,6 @@ protected function postprocessTokens(ErrorHandler $errorHandler): void { $this->tokens[] = new Token(0, "\0", $lastToken->getEndLine(), $lastToken->getEndPos()); } - /** - * 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): int { - $startAttributes = []; - $endAttributes = []; - - while (1) { - $token = $this->tokens[++$this->pos]; - - $id = $token->id; - if (isset($this->dropTokens[$id])) { - if (\T_COMMENT === $id || \T_DOC_COMMENT === $id) { - if ($this->attributeCommentsUsed) { - $comment = \T_DOC_COMMENT === $id - ? new Comment\Doc($token->text, $token->line, $token->pos, $this->pos, - $token->getEndLine(), $token->getEndPos() - 1, $this->pos) - : new Comment($token->text, $token->line, $token->pos, $this->pos, - $token->getEndLine(), $token->getEndPos() - 1, $this->pos); - $startAttributes['comments'][] = $comment; - } - } - continue; - } - - if ($this->attributeStartLineUsed) { - $startAttributes['startLine'] = $token->line; - } - if ($this->attributeStartTokenPosUsed) { - $startAttributes['startTokenPos'] = $this->pos; - } - if ($this->attributeStartFilePosUsed) { - $startAttributes['startFilePos'] = $token->pos; - } - - $value = $token->text; - if (\T_CLOSE_TAG === $token->id) { - $this->prevCloseTagHasNewline = false !== strpos($value, "\n") - || false !== strpos($value, "\r"); - } elseif (\T_INLINE_HTML === $token->id) { - $startAttributes['hasLeadingNewline'] = $this->prevCloseTagHasNewline; - } - - // Fetch the end line/pos from the next token (if available) instead of recomputing it. - $nextToken = $this->tokens[$this->pos + 1] ?? null; - if ($this->attributeEndLineUsed) { - $endAttributes['endLine'] = $nextToken ? $nextToken->line : $token->getEndLine(); - } - if ($this->attributeEndTokenPosUsed) { - $endAttributes['endTokenPos'] = $this->pos; - } - if ($this->attributeEndFilePosUsed) { - $endAttributes['endFilePos'] = ($nextToken ? $nextToken->pos : $token->getEndPos()) - 1; - } - - return $id; - } - } - /** * Returns the token array for current code. * @@ -259,18 +122,4 @@ public function getNextToken(&$value = null, &$startAttributes = null, &$endAttr public function getTokens(): array { return $this->tokens; } - - /** - * Handles __halt_compiler() by returning the text after it. - * - * @return string Remaining text - */ - public function handleHaltCompiler(): string { - // Prevent the lexer from returning any further tokens. - $nextToken = $this->tokens[$this->pos + 1]; - $this->pos = \count($this->tokens) - 2; - - // Return text after __halt_compiler. - return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; - } } diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 8993144d5e..aaca61b452 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -33,20 +33,11 @@ class Emulative extends Lexer { private $hostPhpVersion; /** - * @param array{usedAttributes?: string[], phpVersion?: PhpVersion|string} $options Lexer options. - * In addition to the usual options, accepts a 'phpVersion' (PhpVersion object or string) - * that specifies the version to emulate. Defaults to newest supported. + * @param PhpVersion|null $phpVersion PHP version to emulate. Defaults to newest supported. */ - public function __construct(array $options = []) { - $version = $options['phpVersion'] ?? PhpVersion::getNewestSupported(); - if (!$version instanceof PhpVersion) { - $version = PhpVersion::fromString($version); - } - $this->targetPhpVersion = $version; + public function __construct(?PhpVersion $phpVersion = null) { + $this->targetPhpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); $this->hostPhpVersion = PhpVersion::getHostVersion(); - unset($options['phpVersion']); - - parent::__construct($options); $emulators = [ new FlexibleDocStringEmulator(), diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 4c279b2ade..2c462c3274 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1158,7 +1158,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 4 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 5 => null, @@ -1233,7 +1233,7 @@ protected function initReduceCallbacks(): void { 74 => null, 75 => null, 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "emitError(new Error('Cannot use "startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "emitError(new Error('Cannot use "getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); }, 77 => null, 78 => null, @@ -1244,38 +1244,38 @@ protected function initReduceCallbacks(): void { 83 => null, 84 => null, 85 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 88 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 89 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 90 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 91 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 92 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 93 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 94 => null, 95 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 96 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 97 => function ($stackPos) { /* nothing */ @@ -1287,15 +1287,15 @@ protected function initReduceCallbacks(): void { /* nothing */ }, 100 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->emitError(new Error('A trailing comma is not allowed here', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); }, 101 => null, 102 => null, 103 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 104 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 105 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); @@ -1304,7 +1304,7 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 107 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 108 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); @@ -1320,32 +1320,32 @@ protected function initReduceCallbacks(): void { 113 => null, 114 => null, 115 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\HaltCompiler($this->handleHaltCompiler(), $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 116 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); $this->checkNamespace($this->semValue); }, 117 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, 118 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, 119 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 120 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 121 => null, 122 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 123 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_FUNCTION; @@ -1354,10 +1354,10 @@ protected function initReduceCallbacks(): void { $this->semValue = Stmt\Use_::TYPE_CONSTANT; }, 125 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 126 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 127 => null, 128 => function ($stackPos) { @@ -1381,16 +1381,16 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 136 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 137 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 138 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 139 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 140 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; @@ -1406,7 +1406,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 145 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 146 => null, 147 => function ($stackPos) { @@ -1416,10 +1416,10 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 149 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributeStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 150 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributeStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 151 => function ($stackPos) { if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; @@ -1428,63 +1428,66 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 153 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 154 => null, 155 => null, 156 => null, 157 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 158 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; + $this->semValue = $this->semStack[$stackPos-(3-2)]; $comments = $this->getCommentsBeforeToken($this->tokenStartStack[$stackPos-(3-1)]); $stmts = $this->semValue; if (!empty($comments)) {$stmts[0]->setAttribute('comments', array_merge($comments, $stmts[0]->getAttribute('comments', []))); }; } else { - $startAttributes = $this->startAttributeStack[$stackPos-(3-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; + $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); if (null === $this->semValue) { $this->semValue = array(); } } }, 159 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 160 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, 161 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 162 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 163 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 164 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 165 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 166 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 167 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 168 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 169 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 170 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 171 => function ($stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + + $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue->setAttribute('hasLeadingNewline', $this->inlineHtmlHasLeadingNewline($stackPos-(1-1))); + }, 172 => function ($stackPos) { @@ -1492,42 +1495,42 @@ protected function initReduceCallbacks(): void { if ($e instanceof Expr\Throw_) { // For backwards-compatibility reasons, convert throw in statement position into // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_). - $this->semValue = new Stmt\Throw_($e->expr, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Stmt\Throw_($e->expr, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); } else { - $this->semValue = new Stmt\Expression($e, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Stmt\Expression($e, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); } }, 173 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 174 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 175 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 176 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-4)], $this->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 177 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 178 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); + $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->checkTryCatch($this->semValue); }, 179 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 180 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 181 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, 182 => null, 183 => function ($stackPos) { - $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; + $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, 184 => function ($stackPos) { @@ -1543,13 +1546,13 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 188 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 189 => function ($stackPos) { $this->semValue = null; }, 190 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 191 => null, 192 => function ($stackPos) { @@ -1584,31 +1587,31 @@ protected function initReduceCallbacks(): void { }, 202 => null, 203 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 204 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 205 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 206 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); $this->checkClass($this->semValue, $stackPos-(7-2)); }, 207 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); $this->checkClass($this->semValue, $stackPos-(8-3)); }, 208 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); $this->checkInterface($this->semValue, $stackPos-(7-3)); }, 209 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 210 => function ($stackPos) { - $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); $this->checkEnum($this->semValue, $stackPos-(8-3)); }, 211 => function ($stackPos) { @@ -1694,7 +1697,7 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 241 => function ($stackPos) { - $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 242 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; @@ -1715,15 +1718,15 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 248 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 249 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 250 => null, 251 => null, 252 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 253 => function ($stackPos) { $this->semValue = []; @@ -1736,10 +1739,10 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 257 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 258 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 259 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); @@ -1754,7 +1757,7 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 263 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 264 => function ($stackPos) { $this->semValue = array(); @@ -1763,19 +1766,19 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 266 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); }, 267 => function ($stackPos) { $this->semValue = null; }, 268 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 269 => function ($stackPos) { $this->semValue = null; }, 270 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); }, 271 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); @@ -1818,36 +1821,36 @@ protected function initReduceCallbacks(): void { $this->semValue = Modifiers::READONLY; }, 285 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, 286 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); $this->checkParam($this->semValue); }, 287 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = new Node\Param(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, 288 => null, 289 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 290 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 291 => null, 292 => null, 293 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Name('static', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 294 => function ($stackPos) { $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 295 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier('array', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 296 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier('callable', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 297 => null, 298 => function ($stackPos) { @@ -1876,7 +1879,7 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 307 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 308 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -1885,14 +1888,14 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 310 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 311 => null, 312 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 313 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 314 => null, 315 => function ($stackPos) { @@ -1918,7 +1921,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, 323 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\VariadicPlaceholder($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 324 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); @@ -1927,16 +1930,16 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 326 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 327 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 328 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 329 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(3-1)]); }, 330 => null, 331 => function ($stackPos) { @@ -1954,10 +1957,10 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 337 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 338 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 339 => function ($stackPos) { if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } @@ -1966,30 +1969,30 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 341 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 342 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, 343 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, 344 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); $this->checkClassConst($this->semValue, $stackPos-(6-2)); }, 345 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, 346 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 347 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 348 => function ($stackPos) { $this->semValue = null; /* will be skipped */ @@ -2007,19 +2010,19 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 353 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 354 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 355 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 356 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 357 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 358 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -2073,13 +2076,13 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 379 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 380 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 381 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 382 => null, 383 => null, @@ -2095,295 +2098,295 @@ protected function initReduceCallbacks(): void { 387 => null, 388 => null, 389 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 390 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 391 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 392 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 393 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); if (!$this->phpVersion->allowsAssignNewByReference()) { - $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); + $this->emitError(new Error('Cannot assign new by reference', $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]))); } }, 394 => null, 395 => null, 396 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 397 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 400 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 401 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 402 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 403 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 404 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 405 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 406 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 407 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 408 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 409 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 410 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 411 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 412 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 413 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 422 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 423 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 424 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 432 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 433 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 434 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 435 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 436 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 437 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 438 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 439 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 440 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 441 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 442 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 443 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 444 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 445 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 446 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 447 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 448 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 449 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 450 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 451 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 452 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 453 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 454 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 455 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 456 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 457 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 458 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, 459 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 460 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 461 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 462 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 463 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 464 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, 465 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 466 => null, 467 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 468 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 469 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 470 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 471 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 472 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 473 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 474 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 475 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 476 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 477 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 478 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 479 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, 480 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 481 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, 482 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, 483 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 484 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 485 => function ($stackPos) { $this->semValue = array(); @@ -2399,38 +2402,38 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 490 => function ($stackPos) { - $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 491 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 492 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 493 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 494 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 495 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 496 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 497 => null, 498 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 499 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 500 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 501 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 502 => null, 503 => null, @@ -2438,7 +2441,7 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 505 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, 506 => null, 507 => null, @@ -2452,7 +2455,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 511 => function ($stackPos) { - $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); }, 512 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2462,47 +2465,47 @@ protected function initReduceCallbacks(): void { }, 514 => null, 515 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 516 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Line($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 517 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\File($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 518 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Dir($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 519 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Class_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 520 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Trait_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 521 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Method($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 522 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Function_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 523 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Namespace_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 524 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 525 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 526 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)])), $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, 527 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, 528 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); $this->createdArrays->attach($this->semValue); }, @@ -2510,29 +2513,29 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, 530 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 531 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, 532 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->allowsInvalidOctals()); }, 533 => function ($stackPos) { - $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 534 => null, 535 => null, 536 => null, 537 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); }, 538 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-2)], $this->tokenEndStack[$stackPos-(2-2)]), true); }, 539 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); }, 540 => function ($stackPos) { $this->semValue = null; @@ -2553,17 +2556,17 @@ protected function initReduceCallbacks(): void { 550 => null, 551 => null, 552 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 553 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 554 => null, 555 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 556 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 557 => function ($stackPos) { $this->semValue = null; @@ -2572,45 +2575,45 @@ protected function initReduceCallbacks(): void { 559 => null, 560 => null, 561 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 562 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 563 => null, 564 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 565 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 566 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Variable(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, 567 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])) : $var; }, 568 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 569 => null, 570 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 571 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 572 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 573 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 574 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 575 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 576 => null, 577 => function ($stackPos) { @@ -2623,10 +2626,10 @@ protected function initReduceCallbacks(): void { }, 581 => null, 582 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, 583 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $this->postprocessList($this->semValue); }, 584 => function ($stackPos) { @@ -2643,30 +2646,30 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 589 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 590 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 591 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 592 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 593 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 594 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 595 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), true); }, 596 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ - $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); + $attrs = $this->createEmptyElemAttributes($this->tokenPos); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, 597 => function ($stackPos) { @@ -2682,41 +2685,41 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 601 => function ($stackPos) { - $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 602 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 603 => null, 604 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 605 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 606 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 607 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 608 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 609 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 610 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 611 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 612 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 613 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 614 => null, ]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 2588f07beb..9fa14fbeb8 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1166,7 +1166,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 4 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 5 => null, @@ -1241,7 +1241,7 @@ protected function initReduceCallbacks(): void { 74 => null, 75 => null, 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "emitError(new Error('Cannot use "startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "emitError(new Error('Cannot use "getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); }, 77 => null, 78 => null, @@ -1252,38 +1252,38 @@ protected function initReduceCallbacks(): void { 83 => null, 84 => null, 85 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 88 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 89 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 90 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 91 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 92 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 93 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 94 => null, 95 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 96 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 97 => function ($stackPos) { /* nothing */ @@ -1295,15 +1295,15 @@ protected function initReduceCallbacks(): void { /* nothing */ }, 100 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->emitError(new Error('A trailing comma is not allowed here', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); }, 101 => null, 102 => null, 103 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 104 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 105 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); @@ -1312,7 +1312,7 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 107 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 108 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); @@ -1328,32 +1328,32 @@ protected function initReduceCallbacks(): void { 113 => null, 114 => null, 115 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\HaltCompiler($this->handleHaltCompiler(), $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 116 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); $this->checkNamespace($this->semValue); }, 117 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, 118 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, 119 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 120 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 121 => null, 122 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 123 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_FUNCTION; @@ -1362,10 +1362,10 @@ protected function initReduceCallbacks(): void { $this->semValue = Stmt\Use_::TYPE_CONSTANT; }, 125 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 126 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 127 => null, 128 => function ($stackPos) { @@ -1389,16 +1389,16 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 136 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 137 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 138 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 139 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 140 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; @@ -1414,7 +1414,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 145 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 146 => null, 147 => function ($stackPos) { @@ -1424,10 +1424,10 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 149 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributeStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 150 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributeStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 151 => function ($stackPos) { if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; @@ -1436,63 +1436,66 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 153 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 154 => null, 155 => null, 156 => null, 157 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 158 => function ($stackPos) { if ($this->semStack[$stackPos-(3-2)]) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; + $this->semValue = $this->semStack[$stackPos-(3-2)]; $comments = $this->getCommentsBeforeToken($this->tokenStartStack[$stackPos-(3-1)]); $stmts = $this->semValue; if (!empty($comments)) {$stmts[0]->setAttribute('comments', array_merge($comments, $stmts[0]->getAttribute('comments', []))); }; } else { - $startAttributes = $this->startAttributeStack[$stackPos-(3-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; + $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); if (null === $this->semValue) { $this->semValue = array(); } } }, 159 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 160 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, 161 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 162 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 163 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 164 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 165 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 166 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 167 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 168 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 169 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 170 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 171 => function ($stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + + $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue->setAttribute('hasLeadingNewline', $this->inlineHtmlHasLeadingNewline($stackPos-(1-1))); + }, 172 => function ($stackPos) { @@ -1500,42 +1503,42 @@ protected function initReduceCallbacks(): void { if ($e instanceof Expr\Throw_) { // For backwards-compatibility reasons, convert throw in statement position into // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_). - $this->semValue = new Stmt\Throw_($e->expr, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Stmt\Throw_($e->expr, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); } else { - $this->semValue = new Stmt\Expression($e, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Stmt\Expression($e, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); } }, 173 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 174 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 175 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 176 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-4)], $this->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 177 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 178 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); + $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->checkTryCatch($this->semValue); }, 179 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 180 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 181 => function ($stackPos) { $this->semValue = array(); /* means: no statement */ }, 182 => null, 183 => function ($stackPos) { - $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; + $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, 184 => function ($stackPos) { @@ -1551,13 +1554,13 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 188 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 189 => function ($stackPos) { $this->semValue = null; }, 190 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 191 => null, 192 => function ($stackPos) { @@ -1592,31 +1595,31 @@ protected function initReduceCallbacks(): void { }, 202 => null, 203 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 204 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 205 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 206 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); $this->checkClass($this->semValue, $stackPos-(7-2)); }, 207 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); $this->checkClass($this->semValue, $stackPos-(8-3)); }, 208 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); $this->checkInterface($this->semValue, $stackPos-(7-3)); }, 209 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 210 => function ($stackPos) { - $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); $this->checkEnum($this->semValue, $stackPos-(8-3)); }, 211 => function ($stackPos) { @@ -1702,7 +1705,7 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 241 => function ($stackPos) { - $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 242 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; @@ -1723,15 +1726,15 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 248 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 249 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 250 => null, 251 => null, 252 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 253 => function ($stackPos) { $this->semValue = []; @@ -1744,10 +1747,10 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 257 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 258 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 259 => function ($stackPos) { $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); @@ -1762,7 +1765,7 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 263 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 264 => function ($stackPos) { $this->semValue = array(); @@ -1771,19 +1774,19 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 266 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); }, 267 => function ($stackPos) { $this->semValue = null; }, 268 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 269 => function ($stackPos) { $this->semValue = null; }, 270 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); }, 271 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); @@ -1826,36 +1829,36 @@ protected function initReduceCallbacks(): void { $this->semValue = Modifiers::READONLY; }, 285 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, 286 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); $this->checkParam($this->semValue); }, 287 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = new Node\Param(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, 288 => null, 289 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 290 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 291 => null, 292 => null, 293 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Name('static', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 294 => function ($stackPos) { $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 295 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier('array', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 296 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier('callable', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 297 => null, 298 => function ($stackPos) { @@ -1884,7 +1887,7 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 307 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 308 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -1893,14 +1896,14 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 310 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 311 => null, 312 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 313 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 314 => null, 315 => function ($stackPos) { @@ -1926,7 +1929,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, 323 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\VariadicPlaceholder($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 324 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); @@ -1935,16 +1938,16 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 326 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 327 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 328 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 329 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(3-1)]); }, 330 => null, 331 => function ($stackPos) { @@ -1962,10 +1965,10 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 337 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 338 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 339 => function ($stackPos) { if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } @@ -1974,30 +1977,30 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 341 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 342 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, 343 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, 344 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); $this->checkClassConst($this->semValue, $stackPos-(6-2)); }, 345 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, 346 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 347 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 348 => function ($stackPos) { $this->semValue = null; /* will be skipped */ @@ -2015,19 +2018,19 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 353 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 354 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 355 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 356 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 357 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 358 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -2081,13 +2084,13 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 379 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 380 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 381 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 382 => null, 383 => null, @@ -2103,295 +2106,295 @@ protected function initReduceCallbacks(): void { 387 => null, 388 => null, 389 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 390 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 391 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 392 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 393 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); if (!$this->phpVersion->allowsAssignNewByReference()) { - $this->emitError(new Error('Cannot assign new by reference', $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes)); + $this->emitError(new Error('Cannot assign new by reference', $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]))); } }, 394 => null, 395 => null, 396 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 397 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 400 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 401 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 402 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 403 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 404 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 405 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 406 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 407 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 408 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 409 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 410 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 411 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 412 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 413 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 422 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 423 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 424 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 432 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 433 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 434 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 435 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 436 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 437 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 438 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 439 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 440 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 441 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 442 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 443 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 444 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 445 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 446 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 447 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 448 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 449 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 450 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 451 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 452 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 453 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 454 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 455 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 456 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 457 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 458 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, 459 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 460 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 461 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 462 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 463 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 464 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, 465 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 466 => null, 467 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 468 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 469 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 470 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 471 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 472 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 473 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 474 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 475 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 476 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 477 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 478 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 479 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, 480 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 481 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, 482 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); + $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, 483 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 484 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 485 => function ($stackPos) { $this->semValue = array(); @@ -2407,38 +2410,38 @@ protected function initReduceCallbacks(): void { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 490 => function ($stackPos) { - $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 491 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 492 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 493 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 494 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 495 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 496 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 497 => null, 498 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 499 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 500 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 501 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 502 => null, 503 => null, @@ -2446,7 +2449,7 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 505 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, 506 => null, 507 => null, @@ -2460,7 +2463,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 511 => function ($stackPos) { - $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); }, 512 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2470,47 +2473,47 @@ protected function initReduceCallbacks(): void { }, 514 => null, 515 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 516 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Line($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 517 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\File($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 518 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Dir($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 519 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Class_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 520 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Trait_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 521 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Method($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 522 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Function_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 523 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\MagicConst\Namespace_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 524 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 525 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 526 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)])), $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, 527 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, 528 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); $this->createdArrays->attach($this->semValue); }, @@ -2518,29 +2521,29 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, 530 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 531 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, 532 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, $this->phpVersion->allowsInvalidOctals()); + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->allowsInvalidOctals()); }, 533 => function ($stackPos) { - $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 534 => null, 535 => null, 536 => null, 537 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); }, 538 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-2)], $this->tokenEndStack[$stackPos-(2-2)]), true); }, 539 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); }, 540 => function ($stackPos) { $this->semValue = null; @@ -2561,17 +2564,17 @@ protected function initReduceCallbacks(): void { 550 => null, 551 => null, 552 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 553 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 554 => null, 555 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 556 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 557 => function ($stackPos) { $this->semValue = null; @@ -2580,45 +2583,45 @@ protected function initReduceCallbacks(): void { 559 => null, 560 => null, 561 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 562 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 563 => null, 564 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 565 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 566 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Variable(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, 567 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])) : $var; }, 568 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 569 => null, 570 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 571 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 572 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 573 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 574 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 575 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 576 => null, 577 => function ($stackPos) { @@ -2631,10 +2634,10 @@ protected function initReduceCallbacks(): void { }, 581 => null, 582 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, 583 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $this->postprocessList($this->semValue); }, 584 => function ($stackPos) { @@ -2651,30 +2654,30 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 589 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 590 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 591 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 592 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 593 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 594 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 595 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), true); }, 596 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ - $attrs = $this->createEmptyElemAttributes($this->lookaheadStartAttributes); + $attrs = $this->createEmptyElemAttributes($this->tokenPos); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, 597 => function ($stackPos) { @@ -2690,41 +2693,41 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 601 => function ($stackPos) { - $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 602 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 603 => null, 604 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 605 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 606 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 607 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 608 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 609 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 610 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 611 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 612 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 613 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 614 => null, ]; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 8d2c56f74f..bc5a4bbb87 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -66,6 +66,8 @@ abstract class ParserAbstract implements Parser { /** @var int[] Map of PHP token IDs to internal symbols */ protected $phpTokenToSymbol; + /** @var array Map of PHP token IDs to drop */ + protected $dropTokens; /** @var int[] Map of external symbols (static::T_*) to internal symbols */ protected $tokenToSymbol; /** @var string[] Map of symbols to their names */ @@ -113,14 +115,10 @@ abstract class ParserAbstract implements Parser { protected $semValue; /** @var mixed[] 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 int[] Token start position stack */ + protected $tokenStartStack; + /** @var int[] Token end position stack */ + protected $tokenEndStack; /** @var ErrorHandler Error handler */ protected $errorHandler; @@ -130,6 +128,11 @@ abstract class ParserAbstract implements Parser { /** @var \SplObjectStorage|null Array nodes created during parsing, for postprocessing of empty elements. */ protected $createdArrays; + /** @var Token[] Tokens for the current parse */ + protected $tokens; + /** @var int Current position in token array */ + protected $tokenPos; + /** * Initialize $reduceCallbacks map. */ @@ -154,6 +157,9 @@ public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { $this->initReduceCallbacks(); $this->phpTokenToSymbol = $this->createTokenMap(); + $this->dropTokens = array_fill_keys( + [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], 1 + ); } /** @@ -174,6 +180,7 @@ public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array $this->createdArrays = new \SplObjectStorage(); $this->lexer->startLexing($code, $this->errorHandler); + $this->tokens = $this->lexer->getTokens(); $result = $this->doParse(); // Report errors for any empty elements used inside arrays. This is delayed until after the main parse, @@ -190,8 +197,9 @@ public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array // Clear out some of the interior state, so we don't hold onto unnecessary // memory between uses of the parser - $this->startAttributeStack = []; - $this->endAttributeStack = []; + $this->tokens = []; + $this->tokenStartStack = []; + $this->tokenEndStack = []; $this->semStack = []; $this->semValue = null; $this->createdArrays = null; @@ -207,17 +215,12 @@ public function getLexer(): Lexer { protected function doParse(): ?array { // 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 = []; - $endAttributes = []; - $this->endAttributes = $endAttributes; + $tokenValue = null; + $this->tokenPos = -1; // Keep stack of start and end attributes - $this->startAttributeStack = []; - $this->endAttributeStack = [$endAttributes]; + $this->tokenStartStack = []; + $this->tokenEndStack = [0]; // Start off in the initial state and keep a stack of previous states $state = 0; @@ -238,13 +241,13 @@ protected function doParse(): ?array { $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); + do { + $token = $this->tokens[++$this->tokenPos]; + $tokenId = $token->id; + } while (isset($this->dropTokens[$tokenId])); // Map the lexer token id to the internally used symbols. + $tokenValue = $token->text; if (!isset($this->phpTokenToSymbol[$tokenId])) { throw new \RangeException(sprintf( 'The lexer returned an invalid token (id=%d, value=%s)', @@ -253,9 +256,6 @@ protected function doParse(): ?array { } $symbol = $this->phpTokenToSymbol[$tokenId]; - // Allow productions to access the start attributes of the lookahead token. - $this->lookaheadStartAttributes = $startAttributes; - //$this->traceRead($symbol); } @@ -279,9 +279,8 @@ protected function doParse(): ?array { ++$stackPos; $stateStack[$stackPos] = $state = $action; $this->semStack[$stackPos] = $tokenValue; - $this->startAttributeStack[$stackPos] = $startAttributes; - $this->endAttributeStack[$stackPos] = $endAttributes; - $this->endAttributes = $endAttributes; + $this->tokenStartStack[$stackPos] = $this->tokenPos; + $this->tokenEndStack[$stackPos] = $this->tokenPos; $symbol = self::SYMBOL_NONE; if ($this->errorState) { @@ -321,8 +320,8 @@ protected function doParse(): ?array { $this->semValue = $this->semStack[$stackPos - $ruleLength + 1]; } } catch (Error $e) { - if (-1 === $e->getStartLine() && isset($startAttributes['startLine'])) { - $e->setStartLine($startAttributes['startLine']); + if (-1 === $e->getStartLine()) { + $e->setStartLine($this->tokens[$this->tokenPos]->line); } $this->emitError($e); @@ -331,7 +330,7 @@ protected function doParse(): ?array { } /* Goto - shift nonterminal */ - $lastEndAttributes = $this->endAttributeStack[$stackPos]; + $lastTokenEnd = $this->tokenEndStack[$stackPos]; $stackPos -= $ruleLength; $nonTerminal = $this->ruleToNonTerminal[$rule]; $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos]; @@ -344,17 +343,17 @@ protected function doParse(): ?array { ++$stackPos; $stateStack[$stackPos] = $state; $this->semStack[$stackPos] = $this->semValue; - $this->endAttributeStack[$stackPos] = $lastEndAttributes; + $this->tokenEndStack[$stackPos] = $lastTokenEnd; if ($ruleLength === 0) { // Empty productions use the start attributes of the lookahead token. - $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; + $this->tokenStartStack[$stackPos] = $this->tokenPos; } } else { /* error */ switch ($this->errorState) { case 0: $msg = $this->getErrorMessage($symbol, $state); - $this->emitError(new Error($msg, $startAttributes + $endAttributes)); + $this->emitError(new Error($msg, $this->getAttributesForToken($this->tokenPos))); // Break missing intentionally // no break case 1: @@ -383,9 +382,8 @@ protected function doParse(): ?array { // We treat the error symbol as being empty, so we reset the end attributes // to the end attributes of the last non-error symbol - $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; - $this->endAttributeStack[$stackPos] = $this->endAttributeStack[$stackPos - 1]; - $this->endAttributes = $this->endAttributeStack[$stackPos - 1]; + $this->tokenStartStack[$stackPos] = $this->tokenPos; + $this->tokenEndStack[$stackPos] = $this->tokenEndStack[$stackPos - 1]; break; case 3: @@ -468,6 +466,53 @@ protected function getExpectedTokens(int $state): array { return $expected; } + /** + * Get attributes for a node with the given start and end token positions. + * + * @param int $tokenStartPos Token position the node starts at + * @param int $tokenEndPos Token position the node ends at + * @return array Attributes + */ + protected function getAttributes(int $tokenStartPos, int $tokenEndPos): array { + $startToken = $this->tokens[$tokenStartPos]; + $afterEndToken = $this->tokens[$tokenEndPos + 1]; + $attributes = [ + 'startLine' => $startToken->line, + 'startTokenPos' => $tokenStartPos, + 'startFilePos' => $startToken->pos, + 'endLine' => $afterEndToken->line, + 'endTokenPos' => $tokenEndPos, + 'endFilePos' => $afterEndToken->pos - 1, + ]; + $comments = $this->getCommentsBeforeToken($tokenStartPos); + if (!empty($comments)) { + $attributes['comments'] = $comments; + } + return $attributes; + } + + protected function getAttributesForToken(int $tokenPos) { + if ($tokenPos < \count($this->tokens) - 1) { + return $this->getAttributes($tokenPos, $tokenPos); + } + + // Get attributes for the sentinel token. + $token = $this->tokens[$tokenPos]; + $attributes = [ + 'startLine' => $token->line, + 'startTokenPos' => $tokenPos, + 'startFilePos' => $token->pos, + 'endLine' => $token->line, + 'endTokenPos' => $tokenPos, + 'endFilePos' => $token->pos, + ]; + $comments = $this->getCommentsBeforeToken($tokenPos); + if (!empty($comments)) { + $attributes['comments'] = $comments; + } + return $attributes; + } + /* * Tracing functions used for debugging the parser. */ @@ -670,12 +715,12 @@ protected function handleBuiltinTypes(Name $name) { /** * Get combined start and end attributes at a stack location * - * @param int $pos Stack location + * @param int $stackPos Stack location * * @return array Combined start and end attributes */ - protected function getAttributesAt(int $pos): array { - return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; + protected function getAttributesAt(int $stackPos): array { + return $this->getAttributes($this->tokenStartStack[$stackPos], $this->tokenEndStack[$stackPos]); } protected function getFloatCastKind(string $cast): int { @@ -842,49 +887,93 @@ protected function parseDocString( } } + protected function createCommentFromToken(Token $token, int $tokenPos): Comment { + assert($token->id === \T_COMMENT || $token->id == \T_DOC_COMMENT); + return \T_DOC_COMMENT === $token->id + ? new Comment\Doc($token->text, $token->line, $token->pos, $tokenPos, + $token->getEndLine(), $token->getEndPos() - 1, $tokenPos) + : new Comment($token->text, $token->line, $token->pos, $tokenPos, + $token->getEndLine(), $token->getEndPos() - 1, $tokenPos); + } + + protected function getCommentsBeforeToken(int $tokenPos): array { + $comments = []; + while (--$tokenPos >= 0) { + $token = $this->tokens[$tokenPos]; + if (!isset($this->dropTokens[$token->id])) { + break; + } + + if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { + $comments[] = $this->createCommentFromToken($token, $tokenPos); + } + } + return \array_reverse($comments); + } + /** - * Create attributes for a zero-length common-capturing nop. + * Create a zero-length nop to capture preceding comments, if any. * * @param Comment[] $comments * @return array */ - protected function createCommentNopAttributes(array $comments): array { - $comment = $comments[count($comments) - 1]; + protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop { + $comments = $this->getCommentsBeforeToken($tokenPos); + if (empty($comments)) { + return null; + } + + $comment = $comments[\count($comments) - 1]; $commentEndLine = $comment->getEndLine(); $commentEndFilePos = $comment->getEndFilePos(); $commentEndTokenPos = $comment->getEndTokenPos(); + $attributes = [ + 'startLine' => $commentEndLine, + 'endLine' => $commentEndLine, + 'startFilePos' => $commentEndFilePos + 1, + 'endFilePos' => $commentEndFilePos, + 'startTokenPos' => $commentEndTokenPos + 1, + 'endTokenPos' => $commentEndTokenPos, + 'comments' => $comments, + ]; + return new Nop($attributes); + } - $attributes = ['comments' => $comments]; - if (-1 !== $commentEndLine) { - $attributes['startLine'] = $commentEndLine; - $attributes['endLine'] = $commentEndLine; + protected function maybeCreateNop(int $tokenStartPos, int $tokenEndPos): ?Nop { + $comments = $this->getCommentsBeforeToken($tokenStartPos); + if (empty($comments)) { + return null; } - if (-1 !== $commentEndFilePos) { - $attributes['startFilePos'] = $commentEndFilePos + 1; - $attributes['endFilePos'] = $commentEndFilePos; - } - if (-1 !== $commentEndTokenPos) { - $attributes['startTokenPos'] = $commentEndTokenPos + 1; - $attributes['endTokenPos'] = $commentEndTokenPos; + return new Nop($this->getAttributes($tokenStartPos, $tokenEndPos)); + } + + protected function handleHaltCompiler(): string { + // Prevent the lexer from returning any further tokens. + $nextToken = $this->tokens[$this->tokenPos + 1]; + $this->tokenPos = \count($this->tokens) - 2; + + // Return text after __halt_compiler. + return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; + } + + protected function inlineHtmlHasLeadingNewline(int $stackPos): bool { + $tokenPos = $this->tokenStartStack[$stackPos]; + $token = $this->tokens[$tokenPos]; + assert($token->id == \T_INLINE_HTML); + if ($tokenPos > 0) { + $prevToken = $this->tokens[$tokenPos - 1]; + assert($prevToken->id == \T_CLOSE_TAG); + return false !== strpos($prevToken->text, "\n") + || false !== strpos($prevToken->text, "\r"); } - return $attributes; + return true; } /** - * @param array $attrs * @return array */ - protected function createEmptyElemAttributes(array $attrs): array { - if (isset($attrs['startLine'])) { - $attrs['endLine'] = $attrs['startLine']; - } - if (isset($attrs['startFilePos'])) { - $attrs['endFilePos'] = $attrs['startFilePos']; - } - if (isset($attrs['startTokenPos'])) { - $attrs['endTokenPos'] = $attrs['startTokenPos']; - } - return $attrs; + protected function createEmptyElemAttributes(int $tokenPos): array { + return $this->getAttributesForToken($tokenPos); } protected function fixupArrayDestructuring(Array_ $node): Expr\List_ { diff --git a/lib/PhpParser/ParserFactory.php b/lib/PhpParser/ParserFactory.php index 0e0133982f..d3d44ea71d 100644 --- a/lib/PhpParser/ParserFactory.php +++ b/lib/PhpParser/ParserFactory.php @@ -38,14 +38,12 @@ public function create(int $kind, ?Lexer $lexer = null): Parser { * Create a parser targeting the given version on a best-effort basis. The parser will generally * accept code for the newest supported version, but will try to accommodate code that becomes * invalid in newer versions or changes in interpretation. - * - * @param array $lexerOptions Lexer options */ - public function createForVersion(PhpVersion $version, array $lexerOptions = []): Parser { + public function createForVersion(PhpVersion $version): Parser { if ($version->isHostVersion()) { - $lexer = new Lexer($lexerOptions); + $lexer = new Lexer(); } else { - $lexer = new Lexer\Emulative($lexerOptions + ['phpVersion' => $version]); + $lexer = new Lexer\Emulative($version); } if ($version->id >= 80000) { return new Php8($lexer, $version); @@ -57,20 +55,16 @@ public function createForVersion(PhpVersion $version, array $lexerOptions = []): * Create a parser targeting the newest version supported by this library. Code for older * versions will be accepted if there have been no relevant backwards-compatibility breaks in * PHP. - * - * @param array $lexerOptions Lexer options */ - public function createForNewestSupportedVersion(array $lexerOptions = []): Parser { - return $this->createForVersion(PhpVersion::getNewestSupported(), $lexerOptions); + public function createForNewestSupportedVersion(): Parser { + return $this->createForVersion(PhpVersion::getNewestSupported()); } /** * Create a parser targeting the host PHP version, that is the PHP version we're currently * running on. This parser will not use any token emulation. - * - * @param array $lexerOptions Lexer options */ - public function createForHostVersion(array $lexerOptions = []): Parser { - return $this->createForVersion(PhpVersion::getHostVersion(), $lexerOptions); + public function createForHostVersion(): Parser { + return $this->createForVersion(PhpVersion::getHostVersion()); } } diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php index 855e65e3ed..340967819e 100644 --- a/test/PhpParser/CodeParsingTest.php +++ b/test/PhpParser/CodeParsingTest.php @@ -22,14 +22,7 @@ public function createParser(?string $version): Parser { $factory = new ParserFactory(); $version = $version === null ? PhpVersion::getNewestSupported() : PhpVersion::fromString($version); - return $factory->createForVersion( - $version, - ['usedAttributes' => [ - 'startLine', 'endLine', - 'startFilePos', 'endFilePos', - 'startTokenPos', 'endTokenPos', - 'comments' - ]]); + return $factory->createForVersion($version); } // Must be public for updateTests.php diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index 15b121d5c6..4e69a92b36 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -5,34 +5,44 @@ use PhpParser\ErrorHandler; use PhpParser\Lexer; use PhpParser\LexerTest; +use PhpParser\Parser\Php7; +use PhpParser\PhpVersion; +use PhpParser\Token; require __DIR__ . '/../../../lib/PhpParser/compatibility_tokens.php'; class EmulativeTest extends LexerTest { - protected function getLexer(array $options = []) { - return new Emulative($options); + protected function getLexer() { + return new Emulative(); } /** * @dataProvider provideTestReplaceKeywords */ - public function testReplaceKeywords($keyword, $expectedToken) { + public function testReplaceKeywords(string $keyword, int $expectedToken) { $lexer = $this->getLexer(); - $lexer->startLexing('assertSame($expectedToken, $lexer->getNextToken()); - $this->assertSame(0, $lexer->getNextToken()); + $code = 'startLexing($code); + $this->assertEquals([ + new Token(\T_OPEN_TAG, 'getTokens()); } /** * @dataProvider provideTestReplaceKeywords */ - public function testReplaceKeywordsUppercase($keyword, $expectedToken) { + public function testReplaceKeywordsUppercase(string $keyword, int $expectedToken) { $lexer = $this->getLexer(); - $lexer->startLexing('assertSame($expectedToken, $lexer->getNextToken()); - $this->assertSame(0, $lexer->getNextToken()); + $code = 'startLexing($code); + + $this->assertEquals([ + new Token(\T_OPEN_TAG, 'getTokens()); } /** @@ -40,11 +50,15 @@ public function testReplaceKeywordsUppercase($keyword, $expectedToken) { */ public function testNoReplaceKeywordsAfterObjectOperator(string $keyword) { $lexer = $this->getLexer(); - $lexer->startLexing('' . $keyword); - - $this->assertSame(\T_OBJECT_OPERATOR, $lexer->getNextToken()); - $this->assertSame(\T_STRING, $lexer->getNextToken()); - $this->assertSame(0, $lexer->getNextToken()); + $code = '' . $keyword; + $lexer->startLexing($code); + + $this->assertEquals([ + new Token(\T_OPEN_TAG, '', 1, 6), + new Token(\T_STRING, $keyword, 1, 8), + new Token(0, "\0", 1, \strlen($code)), + ], $lexer->getTokens()); } /** @@ -52,11 +66,16 @@ public function testNoReplaceKeywordsAfterObjectOperator(string $keyword) { */ public function testNoReplaceKeywordsAfterObjectOperatorWithSpaces(string $keyword) { $lexer = $this->getLexer(); - $lexer->startLexing(' ' . $keyword); - - $this->assertSame(\T_OBJECT_OPERATOR, $lexer->getNextToken()); - $this->assertSame(\T_STRING, $lexer->getNextToken()); - $this->assertSame(0, $lexer->getNextToken()); + $code = ' ' . $keyword; + $lexer->startLexing($code); + + $this->assertEquals([ + new Token(\T_OPEN_TAG, '', 1, 6), + new Token(\T_WHITESPACE, ' ', 1, 8), + new Token(\T_STRING, $keyword, 1, 12), + new Token(0, "\0", 1, \strlen($code)), + ], $lexer->getTokens()); } /** @@ -64,11 +83,15 @@ public function testNoReplaceKeywordsAfterObjectOperatorWithSpaces(string $keywo */ public function testNoReplaceKeywordsAfterNullsafeObjectOperator(string $keyword) { $lexer = $this->getLexer(); - $lexer->startLexing('' . $keyword); - - $this->assertSame(\T_NULLSAFE_OBJECT_OPERATOR, $lexer->getNextToken()); - $this->assertSame(\T_STRING, $lexer->getNextToken()); - $this->assertSame(0, $lexer->getNextToken()); + $code = '' . $keyword; + $lexer->startLexing($code); + + $this->assertEquals([ + new Token(\T_OPEN_TAG, '', 1, 6), + new Token(\T_STRING, $keyword, 1, 9), + new Token(0, "\0", 1, \strlen($code)), + ], $lexer->getTokens()); } public function provideTestReplaceKeywords() { @@ -99,8 +122,11 @@ public function provideTestReplaceKeywords() { private function assertSameTokens(array $expectedTokens, Lexer $lexer) { $tokens = []; - while (0 !== $token = $lexer->getNextToken($text)) { - $tokens[] = [$token, $text]; + foreach ($lexer->getTokens() as $token) { + if ($token->id === 0 || $token->isIgnorable()) { + continue; + } + $tokens[] = [$token->id, $token->text]; } $this->assertSame($expectedTokens, $tokens); } @@ -108,7 +134,7 @@ private function assertSameTokens(array $expectedTokens, Lexer $lexer) { /** * @dataProvider provideTestLexNewFeatures */ - public function testLexNewFeatures($code, array $expectedTokens) { + public function testLexNewFeatures(string $code, array $expectedTokens) { $lexer = $this->getLexer(); $lexer->startLexing('assertSameTokens($expectedTokens, $lexer); @@ -117,15 +143,18 @@ public function testLexNewFeatures($code, array $expectedTokens) { /** * @dataProvider provideTestLexNewFeatures */ - public function testLeaveStuffAloneInStrings($code) { + public function testLeaveStuffAloneInStrings(string $code) { $stringifiedToken = '"' . addcslashes($code, '"\\') . '"'; $lexer = $this->getLexer(); - $lexer->startLexing('assertSame(\T_CONSTANT_ENCAPSED_STRING, $lexer->getNextToken($text)); - $this->assertSame($stringifiedToken, $text); - $this->assertSame(0, $lexer->getNextToken()); + $fullCode = 'startLexing($fullCode); + + $this->assertEquals([ + new Token(\T_OPEN_TAG, 'getTokens()); } /** @@ -375,7 +404,7 @@ public function provideTestLexNewFeatures() { * @dataProvider provideTestTargetVersion */ public function testTargetVersion(string $phpVersion, string $code, array $expectedTokens) { - $lexer = $this->getLexer(['phpVersion' => $phpVersion]); + $lexer = new Emulative(PhpVersion::fromString($phpVersion)); $lexer->startLexing('assertSameTokens($expectedTokens, $lexer); } diff --git a/test/PhpParser/LexerTest.php b/test/PhpParser/LexerTest.php index 4538280c0b..9077214604 100644 --- a/test/PhpParser/LexerTest.php +++ b/test/PhpParser/LexerTest.php @@ -6,8 +6,8 @@ class LexerTest extends \PHPUnit\Framework\TestCase { /* To allow overwriting in parent class */ - protected function getLexer(array $options = []) { - return new Lexer($options); + protected function getLexer() { + return new Lexer(); } /** @@ -19,9 +19,7 @@ public function testError($code, $messages) { } $errorHandler = new ErrorHandler\Collecting(); - $lexer = $this->getLexer(['usedAttributes' => [ - 'comments', 'startLine', 'endLine', 'startFilePos', 'endFilePos' - ]]); + $lexer = $this->getLexer(); $lexer->startLexing($code, $errorHandler); $errors = $errorHandler->getErrors(); @@ -52,230 +50,54 @@ public function testDefaultErrorHandler() { $this->expectExceptionMessage('Unterminated comment on line 1'); $lexer = $this->getLexer(); $lexer->startLexing("getNextToken(); } /** * @dataProvider provideTestLex */ - public function testLex($code, $options, $tokens) { - $lexer = $this->getLexer($options); + public function testLex($code, $expectedTokens) { + $lexer = $this->getLexer(); $lexer->startLexing($code); - while ($id = $lexer->getNextToken($value, $startAttributes, $endAttributes)) { - $token = array_shift($tokens); + $tokens = $lexer->getTokens(); + foreach ($tokens as $token) { + if ($token->id === 0 || $token->isIgnorable()) { + continue; + } + + $expectedToken = array_shift($expectedTokens); - $this->assertSame($token[0], $id); - $this->assertSame($token[1], $value); - $this->assertEquals($token[2], $startAttributes); - $this->assertEquals($token[3], $endAttributes); + $this->assertSame($expectedToken[0], $token->id); + $this->assertSame($expectedToken[1], $token->text); } } public function provideTestLex() { return [ - // tests conversion of closing PHP tag and drop of whitespace and opening tags - [ - 'plaintext', - [], - [ - [ - \T_STRING, 'tokens', - ['startLine' => 1], ['endLine' => 1] - ], - [ - \T_CLOSE_TAG, '?>', - ['startLine' => 1], ['endLine' => 1] - ], - [ - \T_INLINE_HTML, 'plaintext', - ['startLine' => 1, 'hasLeadingNewline' => false], - ['endLine' => 1] - ], - ] - ], - // tests line numbers - [ - ' 2], ['endLine' => 2] - ], - [ - \T_STRING, 'token', - ['startLine' => 2], ['endLine' => 2] - ], - [ - ord('$'), '$', - [ - 'startLine' => 3, - 'comments' => [ - new Comment\Doc('/** doc' . "\n" . 'comment */', - 2, 14, 5, - 3, 31, 5), - ] - ], - ['endLine' => 3] - ], - ] - ], - // tests comment extraction - [ - ' 2, - 'comments' => [ - new Comment('/* comment */', - 1, 6, 1, 1, 18, 1), - new Comment('// comment', - 1, 20, 3, 1, 29, 3), - new Comment\Doc('/** docComment 1 */', - 2, 31, 5, 2, 49, 5), - new Comment\Doc('/** docComment 2 */', - 2, 50, 6, 2, 68, 6), - ], - ], - ['endLine' => 2] - ], - ] - ], - // tests differing start and end line - [ - ' 1], ['endLine' => 2] - ], - ] - ], - // tests exact file offsets - [ - ' ['startFilePos', 'endFilePos']], - [ - [ - \T_CONSTANT_ENCAPSED_STRING, '"a"', - ['startFilePos' => 6], ['endFilePos' => 8] - ], - [ - ord(';'), ';', - ['startFilePos' => 9], ['endFilePos' => 9] - ], - [ - \T_CONSTANT_ENCAPSED_STRING, '"b"', - ['startFilePos' => 18], ['endFilePos' => 20] - ], - [ - ord(';'), ';', - ['startFilePos' => 21], ['endFilePos' => 21] - ], - ] - ], - // tests token offsets - [ - ' ['startTokenPos', 'endTokenPos']], - [ - [ - \T_CONSTANT_ENCAPSED_STRING, '"a"', - ['startTokenPos' => 1], ['endTokenPos' => 1] - ], - [ - ord(';'), ';', - ['startTokenPos' => 2], ['endTokenPos' => 2] - ], - [ - \T_CONSTANT_ENCAPSED_STRING, '"b"', - ['startTokenPos' => 6], ['endTokenPos' => 6] - ], - [ - ord(';'), ';', - ['startTokenPos' => 7], ['endTokenPos' => 7] - ], - ] - ], - // tests all attributes being disabled - [ - ' []], - [ - [ - \T_VARIABLE, '$bar', - [], [] - ], - [ - ord(';'), ';', - [], [] - ] - ] - ], - // tests no tokens - [ - '', - [], - [] - ], // tests PHP 8 T_NAME_* emulation [ ' []], [ - [\T_NAME_QUALIFIED, 'Foo\Bar', [], []], - [\T_NAME_FULLY_QUALIFIED, '\Foo\Bar', [], []], - [\T_NAME_RELATIVE, 'namespace\Foo\Bar', [], []], - [\T_NAME_QUALIFIED, 'Foo\Bar', [], []], - [\T_NS_SEPARATOR, '\\', [], []], + [\T_NAME_QUALIFIED, 'Foo\Bar'], + [\T_NAME_FULLY_QUALIFIED, '\Foo\Bar'], + [\T_NAME_RELATIVE, 'namespace\Foo\Bar'], + [\T_NAME_QUALIFIED, 'Foo\Bar'], + [\T_NS_SEPARATOR, '\\'], ] ], // tests PHP 8 T_NAME_* emulation with reserved keywords [ ' []], [ - [\T_NAME_QUALIFIED, 'fn\use', [], []], - [\T_NAME_FULLY_QUALIFIED, '\fn\use', [], []], - [\T_NAME_RELATIVE, 'namespace\fn\use', [], []], - [\T_NAME_QUALIFIED, 'fn\use', [], []], - [\T_NS_SEPARATOR, '\\', [], []], + [\T_NAME_QUALIFIED, 'fn\use'], + [\T_NAME_FULLY_QUALIFIED, '\fn\use'], + [\T_NAME_RELATIVE, 'namespace\fn\use'], + [\T_NAME_QUALIFIED, 'fn\use'], + [\T_NS_SEPARATOR, '\\'], ] ], ]; } - /** - * @dataProvider provideTestHaltCompiler - */ - public function testHandleHaltCompiler($code, $remaining) { - $lexer = $this->getLexer(); - $lexer->startLexing($code); - - while (\T_HALT_COMPILER !== $lexer->getNextToken()); - $lexer->getNextToken(); - $lexer->getNextToken(); - $lexer->getNextToken(); - - $this->assertSame($remaining, $lexer->handleHaltCompiler()); - $this->assertSame(0, $lexer->getNextToken()); - } - - public function provideTestHaltCompiler() { - return [ - ['Remaining Text', 'Remaining Text'], - ['create( - ParserFactory::ONLY_PHP7, - new Lexer(['usedAttributes' => ['startLine', 'endLine', 'startFilePos', 'endFilePos']]) - ); + $parser = (new ParserFactory())->createForHostVersion(); $dumper = new NodeDumper(['dumpPositions' => true]); $code = " [ - 'comments', 'startLine', 'endLine', - 'startTokenPos', 'endTokenPos', - ] - ]); + $lexer = new Lexer(); $code = <<<'EOC' 7, 'startTokenPos' => 3, 'endTokenPos' => 21, + 'startFilePos' => 25, + 'endFilePos' => 86, ], $fn->getAttributes()); $param = $fn->params[0]; @@ -75,6 +72,8 @@ function test($a) { 'endLine' => 3, 'startTokenPos' => 7, 'endTokenPos' => 7, + 'startFilePos' => 39, + 'endFilePos' => 40, ], $param->getAttributes()); /** @var Stmt\Echo_ $echo */ @@ -91,6 +90,8 @@ function test($a) { 'endLine' => 6, 'startTokenPos' => 16, 'endTokenPos' => 19, + 'startFilePos' => 77, + 'endFilePos' => 84, ], $echo->getAttributes()); /** @var \PhpParser\Node\Expr\Variable $var */ @@ -101,6 +102,8 @@ function test($a) { 'endLine' => 6, 'startTokenPos' => 18, 'endTokenPos' => 18, + 'startFilePos' => 82, + 'endFilePos' => 83, ], $var->getAttributes()); } @@ -194,8 +197,9 @@ public function testGetLexer() { } class InvalidTokenLexer extends Lexer { - public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null): int { - $value = 'foobar'; - return 999; + public function startLexing(string $code, ?ErrorHandler $errorHandler = null): void { + $this->tokens = [ + new Token(999, 'foobar', 42), + ]; } } diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 28d192f35f..4ce4fbc592 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -184,14 +184,7 @@ public function testPrettyPrintWithErrorInClassConstFetch() { * @covers \PhpParser\PrettyPrinter\Standard */ public function testFormatPreservingPrint($name, $code, $modification, $expected, $modeLine) { - $lexer = new Lexer\Emulative([ - 'usedAttributes' => [ - 'comments', - 'startLine', 'endLine', - 'startTokenPos', 'endTokenPos', - ], - ]); - + $lexer = new Lexer\Emulative(); $parser = new Parser\Php7($lexer); $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); @@ -233,13 +226,7 @@ public function testRoundTripPrint($name, $code, $expected, $modeLine) { * the pretty printer tests (i.e. returns the input if no changes occurred). */ - $lexer = new Lexer\Emulative([ - 'usedAttributes' => [ - 'comments', - 'startLine', 'endLine', - 'startTokenPos', 'endTokenPos', - ], - ]); + $lexer = new Lexer\Emulative(); $parser = new Php7($lexer); diff --git a/test_old/run.php b/test_old/run.php index e76c350b0f..fd527e8b29 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -127,12 +127,7 @@ function showHelp($error) { showHelp('Test type must be one of: PHP or Symfony'); } -$lexer = new PhpParser\Lexer\Emulative([ - 'usedAttributes' => [ - 'comments', 'startLine', 'endLine', 'startTokenPos', 'endTokenPos', - ], - 'phpVersion' => $phpVersion, -]); +$lexer = new PhpParser\Lexer\Emulative(\PhpParser\PhpVersion::fromString($phpVersion)); if (version_compare($phpVersion, '7.0', '>=')) { $parser = new PhpParser\Parser\Php7($lexer); } else { diff --git a/tools/fuzzing/target.php b/tools/fuzzing/target.php index f876727a4e..6a7b3ebc27 100644 --- a/tools/fuzzing/target.php +++ b/tools/fuzzing/target.php @@ -21,9 +21,7 @@ require $autoload; -$lexer = new PhpParser\Lexer([ - 'usedAttributes' => ['comments', 'startLine', 'endLine', 'startTokenPos'], -]); +$lexer = new PhpParser\Lexer(); $parser = new PhpParser\Parser\Php7($lexer); $prettyPrinter = new PhpParser\PrettyPrinter\Standard(); $nodeDumper = new PhpParser\NodeDumper(); From 62853b179cc8cba4c286ed4d07823ff817704859 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 13 Aug 2023 12:45:21 +0200 Subject: [PATCH 274/428] Fix PhpStan errors --- lib/PhpParser/ParserAbstract.php | 19 +++++++++++++------ phpstan-baseline.neon | 5 ----- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index bc5a4bbb87..b8ee836987 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -158,7 +158,7 @@ public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { $this->initReduceCallbacks(); $this->phpTokenToSymbol = $this->createTokenMap(); $this->dropTokens = array_fill_keys( - [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], 1 + [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], true ); } @@ -471,7 +471,7 @@ protected function getExpectedTokens(int $state): array { * * @param int $tokenStartPos Token position the node starts at * @param int $tokenEndPos Token position the node ends at - * @return array Attributes + * @return array Attributes */ protected function getAttributes(int $tokenStartPos, int $tokenEndPos): array { $startToken = $this->tokens[$tokenStartPos]; @@ -491,7 +491,12 @@ protected function getAttributes(int $tokenStartPos, int $tokenEndPos): array { return $attributes; } - protected function getAttributesForToken(int $tokenPos) { + /** + * Get attributes for a single token at the given token position. + * + * @return array Attributes + */ + protected function getAttributesForToken(int $tokenPos): array { if ($tokenPos < \count($this->tokens) - 1) { return $this->getAttributes($tokenPos, $tokenPos); } @@ -896,6 +901,11 @@ protected function createCommentFromToken(Token $token, int $tokenPos): Comment $token->getEndLine(), $token->getEndPos() - 1, $tokenPos); } + /** + * Get comments before the given token position. + * + * @return Comment[] Comments + */ protected function getCommentsBeforeToken(int $tokenPos): array { $comments = []; while (--$tokenPos >= 0) { @@ -913,9 +923,6 @@ protected function getCommentsBeforeToken(int $tokenPos): array { /** * Create a zero-length nop to capture preceding comments, if any. - * - * @param Comment[] $comments - * @return array */ protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop { $comments = $this->getCommentsBeforeToken($tokenPos); diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 2cc5fe7658..c9574b0e98 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -254,8 +254,3 @@ parameters: message: "#^Variable \\$action might not be defined\\.$#" count: 1 path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Variable \\$tokenValue might not be defined\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php From d1d784a5c6162b9c865aa47d57a91223cb34e865 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 13 Aug 2023 12:59:26 +0200 Subject: [PATCH 275/428] Fixup line numbers when applying emulator patches This fixes the test failures on PHP 7.2. --- lib/PhpParser/Lexer/Emulative.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index aaca61b452..82800410a9 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -132,10 +132,12 @@ private function fixupTokens(): void { // We use a manual loop over the tokens, because we modify the array on the fly $posDelta = 0; + $lineDelta = 0; for ($i = 0, $c = \count($this->tokens); $i < $c; $i++) { $token = $this->tokens[$i]; $pos = $token->pos; $token->pos += $posDelta; + $token->line += $lineDelta; $localPosDelta = 0; $len = \strlen($token->text); while ($patchPos >= $pos && $patchPos < $pos + $len) { @@ -153,12 +155,14 @@ private function fixupTokens(): void { ); $localPosDelta -= $patchTextLen; } + $lineDelta -= \substr_count($patchText, "\n"); } elseif ($patchType === 'add') { // Insert into the token string $token->text = substr_replace( $token->text, $patchText, $patchPos - $pos + $localPosDelta, 0 ); $localPosDelta += $patchTextLen; + $lineDelta += \substr_count($patchText, "\n"); } elseif ($patchType === 'replace') { // Replace inside the token string $token->text = substr_replace( From ba851243f4ddadc7c1ce46f4ae37d06780ac0c18 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 13 Aug 2023 16:03:26 +0200 Subject: [PATCH 276/428] Replace startLexing() with tokenize() For now Lexer::getTokens() still exists, but should probably be removed. --- doc/component/Pretty_printing.markdown | 11 ++------ lib/PhpParser/Lexer.php | 30 ++++++++++----------- lib/PhpParser/Lexer/Emulative.php | 9 ++++--- lib/PhpParser/Parser.php | 6 ++--- lib/PhpParser/ParserAbstract.php | 8 +++--- test/PhpParser/Lexer/EmulativeTest.php | 36 ++++++++++---------------- test/PhpParser/LexerTest.php | 10 +++---- test/PhpParser/ParserTest.php | 16 +++++++++--- 8 files changed, 58 insertions(+), 68 deletions(-) diff --git a/doc/component/Pretty_printing.markdown b/doc/component/Pretty_printing.markdown index 16f3c0d2ca..42a5cf3a57 100644 --- a/doc/component/Pretty_printing.markdown +++ b/doc/component/Pretty_printing.markdown @@ -66,21 +66,14 @@ Use of the formatting-preservation functionality requires some additional prepar ```php use PhpParser\{Lexer, NodeTraverser, NodeVisitor, ParserFactory, PrettyPrinter}; -$lexerOptions = new [ - 'usedAttributes' => [ - 'comments', - 'startLine', 'endLine', - 'startTokenPos', 'endTokenPos', - ], -]; -$parser = (new ParserFactory())->createForHostVersion($lexerOptions); +$parser = (new ParserFactory())->createForHostVersion(); $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); $printer = new PrettyPrinter\Standard(); $oldStmts = $parser->parse($code); -$oldTokens = $parser->getLexer()->getTokens(); +$oldTokens = $parser->getTokens(); $newStmts = $traverser->traverse($oldStmts); diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 9d4467fbac..6c2b2b5f31 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -9,16 +9,22 @@ class Lexer { protected $tokens; /** - * Initializes the lexer for lexing the provided source code. + * Tokenize the provided source code. * - * This function does not throw if lexing errors occur. Instead, errors may be retrieved using - * the getErrors() method. + * The token array is in the same format as provided by the PhpToken::tokenize() method in + * PHP 8.0. The tokens are instances of PhpParser\Token, to abstract over a polyfill + * implementation in earlier PHP version. * - * @param string $code The source code to lex + * The token array is terminated by a sentinel token with token ID 0. + * The token array does not discard any tokens (i.e. whitespace and comments are included). + * The token position attributes are against this token array. + * + * @param string $code The source code to tokenize. * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to - * ErrorHandler\Throwing + * ErrorHandler\Throwing. + * @return Token[] Tokens */ - public function startLexing(string $code, ?ErrorHandler $errorHandler = null): void { + public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array { if (null === $errorHandler) { $errorHandler = new ErrorHandler\Throwing(); } @@ -31,6 +37,8 @@ public function startLexing(string $code, ?ErrorHandler $errorHandler = null): v if (false !== $scream) { ini_set('xdebug.scream', $scream); } + + return $this->tokens; } private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler): void { @@ -107,15 +115,7 @@ protected function postprocessTokens(ErrorHandler $errorHandler): void { } /** - * Returns the token array for current code. - * - * The token array is in the same format as provided by the PhpToken::tokenize() method in - * PHP 8.0. The tokens are instances of PhpParser\Token, to abstract over a polyfill - * implementation in earlier PHP version. - * - * The token array is terminated by a sentinel token with token ID 0. - * The token array does not discard any tokens (i.e. whitespace and comments are included). - * The token position attributes are against this token array. + * Returns the token array for the last tokenized source code. * * @return Token[] Array of tokens */ diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 82800410a9..825e6103ef 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -65,15 +65,14 @@ public function __construct(?PhpVersion $phpVersion = null) { } } - public function startLexing(string $code, ?ErrorHandler $errorHandler = null): void { + public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array { $emulators = array_filter($this->emulators, function ($emulator) use ($code) { return $emulator->isEmulationNeeded($code); }); if (empty($emulators)) { // Nothing to emulate, yay - parent::startLexing($code, $errorHandler); - return; + return parent::tokenize($code, $errorHandler); } if ($errorHandler === null) { @@ -86,7 +85,7 @@ public function startLexing(string $code, ?ErrorHandler $errorHandler = null): v } $collector = new ErrorHandler\Collecting(); - parent::startLexing($code, $collector); + parent::tokenize($code, $collector); $this->sortPatches(); $this->fixupTokens(); @@ -101,6 +100,8 @@ public function startLexing(string $code, ?ErrorHandler $errorHandler = null): v foreach ($emulators as $emulator) { $this->tokens = $emulator->emulate($code, $this->tokens); } + + return $this->tokens; } private function isForwardEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { diff --git a/lib/PhpParser/Parser.php b/lib/PhpParser/Parser.php index 3d6e1be6c2..68954afea7 100644 --- a/lib/PhpParser/Parser.php +++ b/lib/PhpParser/Parser.php @@ -16,9 +16,9 @@ interface Parser { public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array; /** - * Return the lexer used by this parser instance. + * Return tokens for the last parse. * - * @return Lexer + * @return Token[] */ - public function getLexer(): Lexer; + public function getTokens(): array; } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index b8ee836987..e645496c0a 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -179,8 +179,7 @@ public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing(); $this->createdArrays = new \SplObjectStorage(); - $this->lexer->startLexing($code, $this->errorHandler); - $this->tokens = $this->lexer->getTokens(); + $this->tokens = $this->lexer->tokenize($code, $this->errorHandler); $result = $this->doParse(); // Report errors for any empty elements used inside arrays. This is delayed until after the main parse, @@ -197,7 +196,6 @@ public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array // Clear out some of the interior state, so we don't hold onto unnecessary // memory between uses of the parser - $this->tokens = []; $this->tokenStartStack = []; $this->tokenEndStack = []; $this->semStack = []; @@ -207,8 +205,8 @@ public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array return $result; } - public function getLexer(): Lexer { - return $this->lexer; + public function getTokens(): array { + return $this->tokens; } /** @return Stmt[]|null */ diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index 4e69a92b36..42101d8a81 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -22,12 +22,11 @@ protected function getLexer() { public function testReplaceKeywords(string $keyword, int $expectedToken) { $lexer = $this->getLexer(); $code = 'startLexing($code); $this->assertEquals([ new Token(\T_OPEN_TAG, 'getTokens()); + ], $lexer->tokenize($code)); } /** @@ -36,13 +35,12 @@ public function testReplaceKeywords(string $keyword, int $expectedToken) { public function testReplaceKeywordsUppercase(string $keyword, int $expectedToken) { $lexer = $this->getLexer(); $code = 'startLexing($code); $this->assertEquals([ new Token(\T_OPEN_TAG, 'getTokens()); + ], $lexer->tokenize($code)); } /** @@ -51,14 +49,13 @@ public function testReplaceKeywordsUppercase(string $keyword, int $expectedToken public function testNoReplaceKeywordsAfterObjectOperator(string $keyword) { $lexer = $this->getLexer(); $code = '' . $keyword; - $lexer->startLexing($code); $this->assertEquals([ new Token(\T_OPEN_TAG, '', 1, 6), new Token(\T_STRING, $keyword, 1, 8), new Token(0, "\0", 1, \strlen($code)), - ], $lexer->getTokens()); + ], $lexer->tokenize($code)); } /** @@ -67,7 +64,6 @@ public function testNoReplaceKeywordsAfterObjectOperator(string $keyword) { public function testNoReplaceKeywordsAfterObjectOperatorWithSpaces(string $keyword) { $lexer = $this->getLexer(); $code = ' ' . $keyword; - $lexer->startLexing($code); $this->assertEquals([ new Token(\T_OPEN_TAG, 'getTokens()); + ], $lexer->tokenize($code)); } /** @@ -84,14 +80,13 @@ public function testNoReplaceKeywordsAfterObjectOperatorWithSpaces(string $keywo public function testNoReplaceKeywordsAfterNullsafeObjectOperator(string $keyword) { $lexer = $this->getLexer(); $code = '' . $keyword; - $lexer->startLexing($code); $this->assertEquals([ new Token(\T_OPEN_TAG, '', 1, 6), new Token(\T_STRING, $keyword, 1, 9), new Token(0, "\0", 1, \strlen($code)), - ], $lexer->getTokens()); + ], $lexer->tokenize($code)); } public function provideTestReplaceKeywords() { @@ -120,15 +115,15 @@ public function provideTestReplaceKeywords() { ]; } - private function assertSameTokens(array $expectedTokens, Lexer $lexer) { - $tokens = []; - foreach ($lexer->getTokens() as $token) { + private function assertSameTokens(array $expectedTokens, array $tokens) { + $reducedTokens = []; + foreach ($tokens as $token) { if ($token->id === 0 || $token->isIgnorable()) { continue; } - $tokens[] = [$token->id, $token->text]; + $reducedTokens[] = [$token->id, $token->text]; } - $this->assertSame($expectedTokens, $tokens); + $this->assertSame($expectedTokens, $reducedTokens); } /** @@ -136,8 +131,7 @@ private function assertSameTokens(array $expectedTokens, Lexer $lexer) { */ public function testLexNewFeatures(string $code, array $expectedTokens) { $lexer = $this->getLexer(); - $lexer->startLexing('assertSameTokens($expectedTokens, $lexer); + $this->assertSameTokens($expectedTokens, $lexer->tokenize('getLexer(); $fullCode = 'startLexing($fullCode); $this->assertEquals([ new Token(\T_OPEN_TAG, 'getTokens()); + ], $lexer->tokenize($fullCode)); } /** @@ -163,7 +156,7 @@ public function testLeaveStuffAloneInStrings(string $code) { public function testErrorAfterEmulation($code) { $errorHandler = new ErrorHandler\Collecting(); $lexer = $this->getLexer(); - $lexer->startLexing('tokenize('getErrors(); $this->assertCount(1, $errors); @@ -405,8 +398,7 @@ public function provideTestLexNewFeatures() { */ public function testTargetVersion(string $phpVersion, string $code, array $expectedTokens) { $lexer = new Emulative(PhpVersion::fromString($phpVersion)); - $lexer->startLexing('assertSameTokens($expectedTokens, $lexer); + $this->assertSameTokens($expectedTokens, $lexer->tokenize('getLexer(); - $lexer->startLexing($code, $errorHandler); + $lexer->tokenize($code, $errorHandler); $errors = $errorHandler->getErrors(); $this->assertCount(count($messages), $errors); @@ -49,7 +49,7 @@ public function testDefaultErrorHandler() { $this->expectException(Error::class); $this->expectExceptionMessage('Unterminated comment on line 1'); $lexer = $this->getLexer(); - $lexer->startLexing("tokenize("getLexer(); - $lexer->startLexing($code); - $tokens = $lexer->getTokens(); + $tokens = $lexer->tokenize($code); foreach ($tokens as $token) { if ($token->id === 0 || $token->isIgnorable()) { continue; @@ -115,7 +114,6 @@ public function testGetTokens() { ]; $lexer = $this->getLexer(); - $lexer->startLexing($code); - $this->assertEquals($expectedTokens, $lexer->getTokens()); + $this->assertEquals($expectedTokens, $lexer->tokenize($code)); } } diff --git a/test/PhpParser/ParserTest.php b/test/PhpParser/ParserTest.php index 5d9c04cca2..48f5ffe8e5 100644 --- a/test/PhpParser/ParserTest.php +++ b/test/PhpParser/ParserTest.php @@ -189,16 +189,24 @@ public function testListKindAttribute() { $this->assertSame($stmts[1]->expr->var->items[0]->value->getAttribute('kind'), Expr\List_::KIND_ARRAY); } - public function testGetLexer() { + public function testGetTokens() { $lexer = new Lexer(); $parser = $this->getParser($lexer); - $this->assertSame($lexer, $parser->getLexer()); + $parser->parse('assertEquals([ + new Token(\T_OPEN_TAG, 'getTokens()); } } class InvalidTokenLexer extends Lexer { - public function startLexing(string $code, ?ErrorHandler $errorHandler = null): void { - $this->tokens = [ + public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array { + return [ new Token(999, 'foobar', 42), ]; } From ee3e7db3fc8313c9be88c7d45bee514ce7192412 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 16 Aug 2023 20:58:35 +0200 Subject: [PATCH 277/428] Raise minimum PHP version to PHP 7.4 --- .github/workflows/main.yml | 11 ++++------- README.md | 2 +- UPGRADE-5.0.md | 2 +- composer.json | 2 +- doc/0_Introduction.markdown | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d5dec76ab7..50ca01e932 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ on: jobs: tests_coverage: runs-on: "ubuntu-latest" - name: "PHP 7.1 Unit Tests (with coverage)" + name: "PHP 7.4 Unit Tests (with coverage)" steps: - name: "Checkout" uses: "actions/checkout@v3" @@ -15,7 +15,7 @@ jobs: uses: "shivammathur/setup-php@v2" with: coverage: "xdebug" - php-version: "7.1" + php-version: "7.4" tools: composer:v2 - name: "Install dependencies" run: | @@ -34,9 +34,6 @@ jobs: strategy: matrix: php-version: - - "7.2" - - "7.3" - - "7.4" - "8.0" - "8.1" - "8.2" @@ -71,7 +68,7 @@ jobs: run: "test_old/run-php-src.sh 7.3.21" test_old_80_70: runs-on: "ubuntu-latest" - name: "PHP 8.2 Code on PHP 7.1 Integration Tests" + name: "PHP 8.2 Code on PHP 7.3 Integration Tests" steps: - name: "Checkout" uses: "actions/checkout@v3" @@ -79,7 +76,7 @@ jobs: uses: "shivammathur/setup-php@v2" with: coverage: "none" - php-version: "7.1" + php-version: "7.3" tools: composer:v2 - name: "Install PHP 8 dependencies" run: "composer update --no-progress --prefer-dist" diff --git a/README.md b/README.md index 7ddb880ac9..74f80b0b05 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ PHP Parser This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and manipulation. -[Documentation for version 5.x][doc_master] (in development; for running on PHP >= 7.1; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x). +[Documentation for version 5.x][doc_master] (in development; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x). [**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.2). diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index eab8de16cd..a8cf03860f 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -3,7 +3,7 @@ Upgrading from PHP-Parser 4.x to 5.0 ### PHP version requirements -PHP-Parser now requires PHP 7.1 or newer to run. It is however still possible to *parse* code for older versions, while running on a newer version. +PHP-Parser now requires PHP 7.4 or newer to run. It is however still possible to *parse* code for older versions, while running on a newer version. ### PHP 5 parsing support diff --git a/composer.json b/composer.json index 4adefc3930..b4b1bca744 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ } ], "require": { - "php": ">=7.1", + "php": ">=7.4", "ext-tokenizer": "*", "ext-json": "*", "ext-ctype": "*" diff --git a/doc/0_Introduction.markdown b/doc/0_Introduction.markdown index 5a10999db9..efcf221e07 100644 --- a/doc/0_Introduction.markdown +++ b/doc/0_Introduction.markdown @@ -43,7 +43,7 @@ following caveats: 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 8.3 source code running on PHP 7.1, for example. This emulation is not +This allows to parse PHP 8.3 source code running on PHP 7.4, for example. This emulation is not perfect, but works well in practice. Finally, it should be noted that the parser aims to accept all valid code, not reject all invalid From 3c0432b09dfc0151d88abf5826f40fe798b33f74 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 16 Aug 2023 21:09:51 +0200 Subject: [PATCH 278/428] Remove emulation for unsupported PHP versions --- lib/PhpParser/Internal/TokenPolyfill.php | 35 ------- lib/PhpParser/Lexer/Emulative.php | 4 - .../CoaleseEqualTokenEmulator.php | 40 -------- .../FlexibleDocStringEmulator.php | 71 -------------- .../Lexer/TokenEmulator/FnTokenEmulator.php | 19 ---- .../NumericLiteralSeparatorEmulator.php | 95 ------------------- lib/PhpParser/compatibility_tokens.php | 4 - test/PhpParser/Lexer/EmulativeTest.php | 6 +- 8 files changed, 2 insertions(+), 272 deletions(-) delete mode 100644 lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php delete mode 100644 lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php delete mode 100644 lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php delete mode 100644 lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php diff --git a/lib/PhpParser/Internal/TokenPolyfill.php b/lib/PhpParser/Internal/TokenPolyfill.php index 381950980d..33aa9711e9 100644 --- a/lib/PhpParser/Internal/TokenPolyfill.php +++ b/lib/PhpParser/Internal/TokenPolyfill.php @@ -128,9 +128,6 @@ public static function tokenize(string $code, int $flags = 0): array { $line = 1; $pos = 0; $origTokens = \token_get_all($code, $flags); - if (\PHP_VERSION_ID < 70400) { - $origTokens = self::fixupBadCharacters($code, $origTokens); - } $numTokens = \count($origTokens); for ($i = 0; $i < $numTokens; $i++) { @@ -217,38 +214,6 @@ public static function tokenize(string $code, int $flags = 0): array { return $tokens; } - /** - * Prior to PHP 7.4, token_get_all() simply dropped invalid characters from the token stream. - * Detect such cases and replace them with T_BAD_CHARACTER. - */ - private static function fixupBadCharacters(string $code, array $origTokens): array { - $newTokens = []; - $pos = 0; - foreach ($origTokens as $token) { - $text = \is_string($token) ? $token : $token[1]; - $len = \strlen($text); - if (substr($code, $pos, $len) !== $text) { - $nextPos = strpos($code, $text, $pos); - for ($i = $pos; $i < $nextPos; $i++) { - // Don't bother including the line, we're not going to use it anyway. - $newTokens[] = [\T_BAD_CHARACTER, $code[$i]]; - } - $pos = $nextPos; - } - $pos += $len; - $newTokens[] = $token; - } - - // Handle trailing invalid characters. - $codeLen = \strlen($code); - if ($pos !== $codeLen) { - for ($i = $pos; $i < $codeLen; $i++) { - $newTokens[] = [\T_BAD_CHARACTER, $code[$i]]; - } - } - return $newTokens; - } - /** Initialize private static state needed by tokenize(). */ private static function init(): void { if (isset(self::$identifierTokens)) { diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 825e6103ef..11c2c191a8 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -40,11 +40,7 @@ public function __construct(?PhpVersion $phpVersion = null) { $this->hostPhpVersion = PhpVersion::getHostVersion(); $emulators = [ - new FlexibleDocStringEmulator(), - new FnTokenEmulator(), new MatchTokenEmulator(), - new CoaleseEqualTokenEmulator(), - new NumericLiteralSeparatorEmulator(), new NullsafeTokenEmulator(), new AttributeEmulator(), new EnumTokenEmulator(), diff --git a/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php deleted file mode 100644 index 99c988767d..0000000000 --- a/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +++ /dev/null @@ -1,40 +0,0 @@ -id === T_COALESCE && $tokens[$i + 1]->text === '=') { - array_splice($tokens, $i, 2, [ - new Token(\T_COALESCE_EQUAL, '??=', $token->line, $token->pos), - ]); - $c--; - continue; - } - } - } - - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - // ??= was not valid code previously, don't bother. - return $tokens; - } -} diff --git a/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php deleted file mode 100644 index 52e9897ffe..0000000000 --- a/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +++ /dev/null @@ -1,71 +0,0 @@ -\h*)\2(?![a-zA-Z0-9_\x80-\xff])(?(?:;?[\r\n])?)/x -REGEX; - - public function getPhpVersion(): PhpVersion { - return PhpVersion::fromComponents(7, 3); - } - - public function isEmulationNeeded(string $code): bool { - return strpos($code, '<<<') !== false; - } - - public function emulate(string $code, array $tokens): array { - // Handled by preprocessing + fixup. - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array { - // Not supported. - return $tokens; - } - - public function preprocessCode(string $code, array &$patches): string { - if (!preg_match_all(self::FLEXIBLE_DOC_STRING_REGEX, $code, $matches, PREG_SET_ORDER|PREG_OFFSET_CAPTURE)) { - // No heredoc/nowdoc found - return $code; - } - - // Keep track of how much we need to adjust string offsets due to the modifications we - // already made - $posDelta = 0; - foreach ($matches as $match) { - $indentation = $match['indentation'][0]; - $indentationStart = $match['indentation'][1]; - - $separator = $match['separator'][0]; - $separatorStart = $match['separator'][1]; - - if ($indentation === '' && $separator !== '') { - // Ordinary heredoc/nowdoc - continue; - } - - if ($indentation !== '') { - // Remove indentation - $indentationLen = strlen($indentation); - $code = substr_replace($code, '', $indentationStart + $posDelta, $indentationLen); - $patches[] = [$indentationStart + $posDelta, 'add', $indentation]; - $posDelta -= $indentationLen; - } - - if ($separator === '') { - // Insert newline as separator - $code = substr_replace($code, "\n", $separatorStart + $posDelta, 0); - $patches[] = [$separatorStart + $posDelta, 'remove', "\n"]; - $posDelta += 1; - } - } - - return $code; - } -} diff --git a/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php deleted file mode 100644 index 55b99f150e..0000000000 --- a/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +++ /dev/null @@ -1,19 +0,0 @@ -text); - - if ($token->id !== \T_LNUMBER && $token->id !== \T_DNUMBER) { - continue; - } - - $res = preg_match(self::NUMBER, $code, $matches, 0, $token->pos); - assert($res, "No number at number token position"); - - $match = $matches[0]; - $matchLen = \strlen($match); - if ($matchLen === $tokenLen) { - // Original token already holds the full number. - continue; - } - - $tokenKind = $this->resolveIntegerOrFloatToken($match); - $newTokens = [new Token($tokenKind, $match, $token->line, $token->pos)]; - - $numTokens = 1; - $len = $tokenLen; - while ($matchLen > $len) { - $nextToken = $tokens[$i + $numTokens]; - $nextTokenText = $nextToken->text; - $nextTokenLen = \strlen($nextTokenText); - - $numTokens++; - if ($matchLen < $len + $nextTokenLen) { - // Split trailing characters into a partial token. - $partialText = substr($nextTokenText, $matchLen - $len); - $newTokens[] = new Token($nextToken->id, $partialText, $nextToken->line, $nextToken->pos); - break; - } - - $len += $nextTokenLen; - } - - array_splice($tokens, $i, $numTokens, $newTokens); - $c -= $numTokens - \count($newTokens); - } - - return $tokens; - } - - private function resolveIntegerOrFloatToken(string $str): int { - $str = str_replace('_', '', $str); - - if (stripos($str, '0b') === 0) { - $num = bindec($str); - } elseif (stripos($str, '0x') === 0) { - $num = hexdec($str); - } elseif (stripos($str, '0') === 0 && ctype_digit($str)) { - $num = octdec($str); - } else { - $num = +$str; - } - - return is_float($num) ? T_DNUMBER : T_LNUMBER; - } - - public function reverseEmulate(string $code, array $tokens): array { - // Numeric separators were not legal code previously, don't bother. - return $tokens; - } -} diff --git a/lib/PhpParser/compatibility_tokens.php b/lib/PhpParser/compatibility_tokens.php index 4ca8b7f474..f33dd77d5c 100644 --- a/lib/PhpParser/compatibility_tokens.php +++ b/lib/PhpParser/compatibility_tokens.php @@ -5,10 +5,6 @@ if (!\function_exists('PhpParser\defineCompatibilityTokens')) { function defineCompatibilityTokens(): void { $compatTokens = [ - // PHP 7.4 - 'T_BAD_CHARACTER', - 'T_FN', - 'T_COALESCE_EQUAL', // PHP 8.0 'T_NAME_QUALIFIED', 'T_NAME_FULLY_QUALIFIED', diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index 42101d8a81..46ea65e449 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -406,10 +406,8 @@ public function provideTestTargetVersion() { ['8.0', 'match', [[\T_MATCH, 'match']]], ['7.4', 'match', [[\T_STRING, 'match']]], // Keywords are not case-sensitive. - ['7.4', 'fn', [[\T_FN, 'fn']]], - ['7.4', 'FN', [[\T_FN, 'FN']]], - ['7.3', 'fn', [[\T_STRING, 'fn']]], - ['7.3', 'FN', [[\T_STRING, 'FN']]], + ['8.0', 'MATCH', [[\T_MATCH, 'MATCH']]], + ['7.4', 'MATCH', [[\T_STRING, 'MATCH']]], // Tested here to skip testLeaveStuffAloneInStrings. ['8.0', '"$foo?->bar"', [ [ord('"'), '"'], From 502b09090064afd01355806e183404929643e5f6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 16 Aug 2023 21:18:30 +0200 Subject: [PATCH 279/428] Add property types Types omitted in two places where we violate them currently: Namespace_::$stmts can be null during parsing, and Enum_::$scalarType can be a complex type for invalid programs. --- lib/PhpParser/Builder/ClassConst.php | 8 +-- lib/PhpParser/Builder/Class_.php | 18 ++--- lib/PhpParser/Builder/Declaration.php | 2 +- lib/PhpParser/Builder/EnumCase.php | 4 +- lib/PhpParser/Builder/Enum_.php | 16 ++--- lib/PhpParser/Builder/FunctionLike.php | 4 +- lib/PhpParser/Builder/Function_.php | 6 +- lib/PhpParser/Builder/Interface_.php | 10 +-- lib/PhpParser/Builder/Method.php | 8 +-- lib/PhpParser/Builder/Namespace_.php | 4 +- lib/PhpParser/Builder/Param.php | 12 ++-- lib/PhpParser/Builder/Property.php | 10 +-- lib/PhpParser/Builder/TraitUse.php | 4 +- lib/PhpParser/Builder/TraitUseAdaptation.php | 12 ++-- lib/PhpParser/Builder/Trait_.php | 12 ++-- lib/PhpParser/Builder/Use_.php | 6 +- lib/PhpParser/Comment.php | 14 ++-- lib/PhpParser/Error.php | 4 +- lib/PhpParser/ErrorHandler/Collecting.php | 2 +- lib/PhpParser/Internal/DiffElem.php | 2 +- .../Internal/PrintableNewAnonClassNode.php | 10 +-- lib/PhpParser/Internal/TokenPolyfill.php | 12 ++-- lib/PhpParser/Internal/TokenStream.php | 4 +- lib/PhpParser/JsonDecoder.php | 2 +- lib/PhpParser/Lexer.php | 2 +- lib/PhpParser/Lexer/Emulative.php | 8 +-- .../Lexer/TokenEmulator/ReverseEmulator.php | 2 +- lib/PhpParser/NameContext.php | 8 +-- lib/PhpParser/Node/Arg.php | 8 +-- lib/PhpParser/Node/ArrayItem.php | 8 +-- lib/PhpParser/Node/Attribute.php | 4 +- lib/PhpParser/Node/AttributeGroup.php | 2 +- lib/PhpParser/Node/ClosureUse.php | 4 +- lib/PhpParser/Node/Const_.php | 6 +- lib/PhpParser/Node/DeclareItem.php | 4 +- lib/PhpParser/Node/Expr/ArrayDimFetch.php | 4 +- lib/PhpParser/Node/Expr/Array_.php | 2 +- lib/PhpParser/Node/Expr/ArrowFunction.php | 10 +-- lib/PhpParser/Node/Expr/Assign.php | 4 +- lib/PhpParser/Node/Expr/AssignOp.php | 4 +- lib/PhpParser/Node/Expr/AssignRef.php | 4 +- lib/PhpParser/Node/Expr/BinaryOp.php | 4 +- lib/PhpParser/Node/Expr/BitwiseNot.php | 2 +- lib/PhpParser/Node/Expr/BooleanNot.php | 2 +- lib/PhpParser/Node/Expr/Cast.php | 2 +- lib/PhpParser/Node/Expr/Clone_.php | 2 +- lib/PhpParser/Node/Expr/Closure.php | 12 ++-- lib/PhpParser/Node/Expr/ConstFetch.php | 2 +- lib/PhpParser/Node/Expr/Empty_.php | 2 +- lib/PhpParser/Node/Expr/ErrorSuppress.php | 2 +- lib/PhpParser/Node/Expr/Eval_.php | 2 +- lib/PhpParser/Node/Expr/Exit_.php | 2 +- lib/PhpParser/Node/Expr/Include_.php | 4 +- lib/PhpParser/Node/Expr/Instanceof_.php | 2 +- lib/PhpParser/Node/Expr/Isset_.php | 2 +- lib/PhpParser/Node/Expr/Match_.php | 4 +- lib/PhpParser/Node/Expr/MethodCall.php | 2 +- .../Node/Expr/NullsafeMethodCall.php | 2 +- .../Node/Expr/NullsafePropertyFetch.php | 2 +- lib/PhpParser/Node/Expr/PostDec.php | 2 +- lib/PhpParser/Node/Expr/PostInc.php | 2 +- lib/PhpParser/Node/Expr/PreDec.php | 2 +- lib/PhpParser/Node/Expr/PreInc.php | 2 +- lib/PhpParser/Node/Expr/Print_.php | 2 +- lib/PhpParser/Node/Expr/PropertyFetch.php | 2 +- lib/PhpParser/Node/Expr/Ternary.php | 6 +- lib/PhpParser/Node/Expr/Throw_.php | 2 +- lib/PhpParser/Node/Expr/UnaryMinus.php | 2 +- lib/PhpParser/Node/Expr/UnaryPlus.php | 2 +- lib/PhpParser/Node/Expr/YieldFrom.php | 2 +- lib/PhpParser/Node/Expr/Yield_.php | 4 +- lib/PhpParser/Node/Identifier.php | 4 +- lib/PhpParser/Node/InterpolatedStringPart.php | 2 +- lib/PhpParser/Node/MatchArm.php | 4 +- lib/PhpParser/Node/Name.php | 4 +- lib/PhpParser/Node/Param.php | 10 +-- lib/PhpParser/Node/PropertyItem.php | 4 +- lib/PhpParser/Node/Scalar/Float_.php | 2 +- lib/PhpParser/Node/Scalar/Int_.php | 2 +- lib/PhpParser/Node/Scalar/String_.php | 4 +- lib/PhpParser/Node/StaticVar.php | 4 +- lib/PhpParser/Node/Stmt/Break_.php | 2 +- lib/PhpParser/Node/Stmt/Case_.php | 4 +- lib/PhpParser/Node/Stmt/Catch_.php | 6 +- lib/PhpParser/Node/Stmt/ClassConst.php | 6 +- lib/PhpParser/Node/Stmt/ClassLike.php | 8 +-- lib/PhpParser/Node/Stmt/ClassMethod.php | 14 ++-- lib/PhpParser/Node/Stmt/Class_.php | 6 +- lib/PhpParser/Node/Stmt/Const_.php | 2 +- lib/PhpParser/Node/Stmt/Continue_.php | 2 +- lib/PhpParser/Node/Stmt/Declare_.php | 4 +- lib/PhpParser/Node/Stmt/Do_.php | 4 +- lib/PhpParser/Node/Stmt/Echo_.php | 2 +- lib/PhpParser/Node/Stmt/ElseIf_.php | 4 +- lib/PhpParser/Node/Stmt/Else_.php | 2 +- lib/PhpParser/Node/Stmt/EnumCase.php | 6 +- lib/PhpParser/Node/Stmt/Enum_.php | 2 +- lib/PhpParser/Node/Stmt/Expression.php | 2 +- lib/PhpParser/Node/Stmt/Finally_.php | 2 +- lib/PhpParser/Node/Stmt/For_.php | 8 +-- lib/PhpParser/Node/Stmt/Foreach_.php | 10 +-- lib/PhpParser/Node/Stmt/Function_.php | 12 ++-- lib/PhpParser/Node/Stmt/Global_.php | 2 +- lib/PhpParser/Node/Stmt/Goto_.php | 2 +- lib/PhpParser/Node/Stmt/GroupUse.php | 6 +- lib/PhpParser/Node/Stmt/HaltCompiler.php | 2 +- lib/PhpParser/Node/Stmt/If_.php | 8 +-- lib/PhpParser/Node/Stmt/InlineHTML.php | 2 +- lib/PhpParser/Node/Stmt/Interface_.php | 2 +- lib/PhpParser/Node/Stmt/Label.php | 2 +- lib/PhpParser/Node/Stmt/Namespace_.php | 2 +- lib/PhpParser/Node/Stmt/Property.php | 6 +- lib/PhpParser/Node/Stmt/Return_.php | 2 +- lib/PhpParser/Node/Stmt/Static_.php | 2 +- lib/PhpParser/Node/Stmt/Switch_.php | 4 +- lib/PhpParser/Node/Stmt/Throw_.php | 2 +- lib/PhpParser/Node/Stmt/TraitUse.php | 4 +- .../Node/Stmt/TraitUseAdaptation.php | 4 +- .../Node/Stmt/TraitUseAdaptation/Alias.php | 4 +- .../Stmt/TraitUseAdaptation/Precedence.php | 2 +- lib/PhpParser/Node/Stmt/TryCatch.php | 6 +- lib/PhpParser/Node/Stmt/Unset_.php | 2 +- lib/PhpParser/Node/Stmt/Use_.php | 4 +- lib/PhpParser/Node/Stmt/While_.php | 4 +- lib/PhpParser/Node/UseItem.php | 6 +- lib/PhpParser/NodeAbstract.php | 2 +- lib/PhpParser/NodeDumper.php | 6 +- lib/PhpParser/NodeTraverser.php | 4 +- lib/PhpParser/NodeVisitor/FindingVisitor.php | 2 +- .../NodeVisitor/FirstFindingVisitor.php | 2 +- lib/PhpParser/NodeVisitor/NameResolver.php | 12 ++-- .../NodeVisitor/NodeConnectingVisitor.php | 2 +- .../NodeVisitor/ParentConnectingVisitor.php | 2 +- lib/PhpParser/Parser/Php7.php | 42 ++++++------ lib/PhpParser/Parser/Php8.php | 42 ++++++------ lib/PhpParser/ParserAbstract.php | 68 +++++++++---------- lib/PhpParser/PhpVersion.php | 2 +- lib/PhpParser/PrettyPrinterAbstract.php | 46 ++++++------- test/PhpParser/NodeAbstractTest.php | 4 +- 139 files changed, 407 insertions(+), 409 deletions(-) diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index 13b4a7031d..452dc423d4 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -14,14 +14,14 @@ class ClassConst implements PhpParser\Builder { /** @var int */ - protected $flags = 0; + protected int $flags = 0; /** @var array */ - protected $attributes = []; + protected array $attributes = []; /** @var list */ - protected $constants = []; + protected array $constants = []; /** @var list */ - protected $attributeGroups = []; + protected array $attributeGroups = []; /** @var Identifier|Node\Name|Node\ComplexType */ protected $type; diff --git a/lib/PhpParser/Builder/Class_.php b/lib/PhpParser/Builder/Class_.php index 069362aa13..460606573c 100644 --- a/lib/PhpParser/Builder/Class_.php +++ b/lib/PhpParser/Builder/Class_.php @@ -11,25 +11,25 @@ class Class_ extends Declaration { /** @var string */ - protected $name; + protected string $name; /** @var Name|null */ - protected $extends = null; + protected ?Name $extends = null; /** @var list */ - protected $implements = []; + protected array $implements = []; /** @var int */ - protected $flags = 0; + protected int $flags = 0; /** @var list */ - protected $uses = []; + protected array $uses = []; /** @var list */ - protected $constants = []; + protected array $constants = []; /** @var list */ - protected $properties = []; + protected array $properties = []; /** @var list */ - protected $methods = []; + protected array $methods = []; /** @var list */ - protected $attributeGroups = []; + protected array $attributeGroups = []; /** * Creates a class builder. diff --git a/lib/PhpParser/Builder/Declaration.php b/lib/PhpParser/Builder/Declaration.php index e9e625a773..488b72131f 100644 --- a/lib/PhpParser/Builder/Declaration.php +++ b/lib/PhpParser/Builder/Declaration.php @@ -7,7 +7,7 @@ abstract class Declaration implements PhpParser\Builder { /** @var array */ - protected $attributes = []; + protected array $attributes = []; /** * Adds a statement. diff --git a/lib/PhpParser/Builder/EnumCase.php b/lib/PhpParser/Builder/EnumCase.php index 9c4633b86c..80846ec38c 100644 --- a/lib/PhpParser/Builder/EnumCase.php +++ b/lib/PhpParser/Builder/EnumCase.php @@ -16,10 +16,10 @@ class EnumCase implements PhpParser\Builder { /** @var ?Node\Expr */ protected $value = null; /** @var array */ - protected $attributes = []; + protected array $attributes = []; /** @var list */ - protected $attributeGroups = []; + protected array $attributeGroups = []; /** * Creates an enum case builder. diff --git a/lib/PhpParser/Builder/Enum_.php b/lib/PhpParser/Builder/Enum_.php index 3335493074..e02303ba70 100644 --- a/lib/PhpParser/Builder/Enum_.php +++ b/lib/PhpParser/Builder/Enum_.php @@ -11,21 +11,21 @@ class Enum_ extends Declaration { /** @var string */ - protected $name; + protected string $name; /** @var Identifier|null */ - protected $scalarType = null; + protected ?Identifier $scalarType = null; /** @var list */ - protected $implements = []; + protected array $implements = []; /** @var list */ - protected $uses = []; + protected array $uses = []; /** @var list */ - protected $enumCases = []; + protected array $enumCases = []; /** @var list */ - protected $constants = []; + protected array $constants = []; /** @var list */ - protected $methods = []; + protected array $methods = []; /** @var list */ - protected $attributeGroups = []; + protected array $attributeGroups = []; /** * Creates an enum builder. diff --git a/lib/PhpParser/Builder/FunctionLike.php b/lib/PhpParser/Builder/FunctionLike.php index b62ff223a8..4027f5ea7f 100644 --- a/lib/PhpParser/Builder/FunctionLike.php +++ b/lib/PhpParser/Builder/FunctionLike.php @@ -7,9 +7,9 @@ abstract class FunctionLike extends Declaration { /** @var bool */ - protected $returnByRef = false; + protected bool $returnByRef = false; /** @var Node\Param[] */ - protected $params = []; + protected array $params = []; /** @var Node\Identifier|Node\Name|Node\ComplexType|null */ protected $returnType = null; diff --git a/lib/PhpParser/Builder/Function_.php b/lib/PhpParser/Builder/Function_.php index db8c3baa5f..4bd2c445e9 100644 --- a/lib/PhpParser/Builder/Function_.php +++ b/lib/PhpParser/Builder/Function_.php @@ -9,12 +9,12 @@ class Function_ extends FunctionLike { /** @var string */ - protected $name; + protected string $name; /** @var list */ - protected $stmts = []; + protected array $stmts = []; /** @var list */ - protected $attributeGroups = []; + protected array $attributeGroups = []; /** * Creates a function builder. diff --git a/lib/PhpParser/Builder/Interface_.php b/lib/PhpParser/Builder/Interface_.php index a28a14d21d..281df9391e 100644 --- a/lib/PhpParser/Builder/Interface_.php +++ b/lib/PhpParser/Builder/Interface_.php @@ -10,15 +10,15 @@ class Interface_ extends Declaration { /** @var string */ - protected $name; + protected string $name; /** @var list */ - protected $extends = []; + protected array $extends = []; /** @var list */ - protected $constants = []; + protected array $constants = []; /** @var list */ - protected $methods = []; + protected array $methods = []; /** @var list */ - protected $attributeGroups = []; + protected array $attributeGroups = []; /** * Creates an interface builder. diff --git a/lib/PhpParser/Builder/Method.php b/lib/PhpParser/Builder/Method.php index 9f1df4a0ce..6076913cc7 100644 --- a/lib/PhpParser/Builder/Method.php +++ b/lib/PhpParser/Builder/Method.php @@ -10,15 +10,15 @@ class Method extends FunctionLike { /** @var string */ - protected $name; + protected string $name; /** @var int */ - protected $flags = 0; + protected int $flags = 0; /** @var list|null */ - protected $stmts = []; + protected ?array $stmts = []; /** @var list */ - protected $attributeGroups = []; + protected array $attributeGroups = []; /** * Creates a method builder. diff --git a/lib/PhpParser/Builder/Namespace_.php b/lib/PhpParser/Builder/Namespace_.php index 7c3b14d9cc..a197919143 100644 --- a/lib/PhpParser/Builder/Namespace_.php +++ b/lib/PhpParser/Builder/Namespace_.php @@ -9,9 +9,9 @@ class Namespace_ extends Declaration { /** @var Node\Name|null */ - private $name; + private ?Node\Name $name; /** @var Stmt[] */ - private $stmts = []; + private array $stmts = []; /** * Creates a namespace builder. diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index 1994a70982..29769e4d1d 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -9,19 +9,19 @@ class Param implements PhpParser\Builder { /** @var string */ - protected $name; + protected string $name; /** @var Node\Expr|null */ - protected $default = null; + protected ?Node\Expr $default = null; /** @var Node\Identifier|Node\Name|Node\ComplexType|null */ protected $type = null; /** @var bool */ - protected $byRef = false; + protected bool $byRef = false; /** @var int */ - protected $flags = 0; + protected int $flags = 0; /** @var bool */ - protected $variadic = false; + protected bool $variadic = false; /** @var list */ - protected $attributeGroups = []; + protected array $attributeGroups = []; /** * Creates a parameter builder. diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 93de442e5e..39110eaebc 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -13,17 +13,17 @@ class Property implements PhpParser\Builder { /** @var string */ - protected $name; + protected string $name; /** @var int */ - protected $flags = 0; + protected int $flags = 0; /** @var Node\Expr|null */ - protected $default = null; + protected ?Node\Expr $default = null; /** @var array */ - protected $attributes = []; + protected array $attributes = []; /** @var null|Identifier|Name|ComplexType */ protected $type; /** @var list */ - protected $attributeGroups = []; + protected array $attributeGroups = []; /** * Creates a property builder. diff --git a/lib/PhpParser/Builder/TraitUse.php b/lib/PhpParser/Builder/TraitUse.php index b9d49bd947..cf21c821ab 100644 --- a/lib/PhpParser/Builder/TraitUse.php +++ b/lib/PhpParser/Builder/TraitUse.php @@ -9,9 +9,9 @@ class TraitUse implements Builder { /** @var Node\Name[] */ - protected $traits = []; + protected array $traits = []; /** @var Stmt\TraitUseAdaptation[] */ - protected $adaptations = []; + protected array $adaptations = []; /** * Creates a trait use builder. diff --git a/lib/PhpParser/Builder/TraitUseAdaptation.php b/lib/PhpParser/Builder/TraitUseAdaptation.php index 6fceb1f0e4..b42e7ac325 100644 --- a/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -14,17 +14,17 @@ class TraitUseAdaptation implements Builder { private const TYPE_PRECEDENCE = 2; /** @var int Type of building adaptation */ - protected $type; + protected int $type; /** @var Node\Name|null */ - protected $trait; + protected ?Node\Name $trait; /** @var Node\Identifier */ - protected $method; + protected Node\Identifier $method; /** @var int|null */ - protected $modifier = null; + protected ?int $modifier = null; /** @var Node\Identifier|null */ - protected $alias = null; + protected ?Node\Identifier $alias = null; /** @var Node\Name[] */ - protected $insteadof = []; + protected array $insteadof = []; /** * Creates a trait use adaptation builder. diff --git a/lib/PhpParser/Builder/Trait_.php b/lib/PhpParser/Builder/Trait_.php index 9e622886ff..0a36e50d55 100644 --- a/lib/PhpParser/Builder/Trait_.php +++ b/lib/PhpParser/Builder/Trait_.php @@ -9,17 +9,17 @@ class Trait_ extends Declaration { /** @var string */ - protected $name; + protected string $name; /** @var list */ - protected $uses = []; + protected array $uses = []; /** @var list */ - protected $constants = []; + protected array $constants = []; /** @var list */ - protected $properties = []; + protected array $properties = []; /** @var list */ - protected $methods = []; + protected array $methods = []; /** @var list */ - protected $attributeGroups = []; + protected array $attributeGroups = []; /** * Creates an interface builder. diff --git a/lib/PhpParser/Builder/Use_.php b/lib/PhpParser/Builder/Use_.php index a57cfb9da5..dfccd24d01 100644 --- a/lib/PhpParser/Builder/Use_.php +++ b/lib/PhpParser/Builder/Use_.php @@ -9,11 +9,11 @@ class Use_ implements Builder { /** @var Node\Name */ - protected $name; + protected Node\Name $name; /** @var int */ - protected $type; + protected int $type; /** @var string|null */ - protected $alias = null; + protected ?string $alias = null; /** * Creates a name use (alias) builder. diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index 87d3eabd24..ea1d1239b3 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -4,19 +4,19 @@ class Comment implements \JsonSerializable { /** @var string string */ - protected $text; + protected string $text; /** @var int */ - protected $startLine; + protected int $startLine; /** @var int */ - protected $startFilePos; + protected int $startFilePos; /** @var int */ - protected $startTokenPos; + protected int $startTokenPos; /** @var int */ - protected $endLine; + protected int $endLine; /** @var int */ - protected $endFilePos; + protected int $endFilePos; /** @var int */ - protected $endTokenPos; + protected int $endTokenPos; /** * Constructs a comment node. diff --git a/lib/PhpParser/Error.php b/lib/PhpParser/Error.php index 544f466358..2dcbee9a5c 100644 --- a/lib/PhpParser/Error.php +++ b/lib/PhpParser/Error.php @@ -4,9 +4,9 @@ class Error extends \RuntimeException { /** @var string */ - protected $rawMessage; + protected string $rawMessage; /** @var array */ - protected $attributes; + protected array $attributes; /** * Creates an Exception signifying a parse error. diff --git a/lib/PhpParser/ErrorHandler/Collecting.php b/lib/PhpParser/ErrorHandler/Collecting.php index 9a297399bc..6d3f4175dd 100644 --- a/lib/PhpParser/ErrorHandler/Collecting.php +++ b/lib/PhpParser/ErrorHandler/Collecting.php @@ -12,7 +12,7 @@ */ class Collecting implements ErrorHandler { /** @var Error[] Collected errors */ - private $errors = []; + private array $errors = []; public function handleError(Error $error): void { $this->errors[] = $error; diff --git a/lib/PhpParser/Internal/DiffElem.php b/lib/PhpParser/Internal/DiffElem.php index b25925d2d4..7433b5d32a 100644 --- a/lib/PhpParser/Internal/DiffElem.php +++ b/lib/PhpParser/Internal/DiffElem.php @@ -12,7 +12,7 @@ class DiffElem { public const TYPE_REPLACE = 3; /** @var int One of the TYPE_* constants */ - public $type; + public int $type; /** @var mixed Is null for add operations */ public $old; /** @var mixed Is null for remove operations */ diff --git a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index e897bf13e5..89378d519f 100644 --- a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -17,17 +17,17 @@ */ class PrintableNewAnonClassNode extends Expr { /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** @var int Modifiers */ - public $flags; + public int $flags; /** @var (Node\Arg|Node\VariadicPlaceholder)[] Arguments */ public $args; /** @var null|Node\Name Name of extended class */ - public $extends; + public ?Node\Name $extends; /** @var Node\Name[] Names of implemented interfaces */ - public $implements; + public array $implements; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * @param Node\AttributeGroup[] $attrGroups PHP attribute groups diff --git a/lib/PhpParser/Internal/TokenPolyfill.php b/lib/PhpParser/Internal/TokenPolyfill.php index 33aa9711e9..36022d09a0 100644 --- a/lib/PhpParser/Internal/TokenPolyfill.php +++ b/lib/PhpParser/Internal/TokenPolyfill.php @@ -17,13 +17,13 @@ class TokenPolyfill extends \PhpToken { */ class TokenPolyfill { /** @var int The ID of the token. Either a T_* constant of a character code < 256. */ - public $id; + public int $id; /** @var string The textual content of the token. */ - public $text; + public string $text; /** @var int The 1-based starting line of the token (or -1 if unknown). */ - public $line; + public int $line; /** @var int The 0-based starting position of the token (or -1 if unknown). */ - public $pos; + public int $pos; /** @var array Tokens ignored by the PHP parser. */ private const IGNORABLE_TOKENS = [ @@ -33,8 +33,8 @@ class TokenPolyfill { \T_OPEN_TAG => true, ]; - /** @var array|null Tokens that may be part of a T_NAME_* identifier. */ - private static $identifierTokens; + /** @var array Tokens that may be part of a T_NAME_* identifier. */ + private static array $identifierTokens; /** * Create a Token with the given ID and text, as well optional line and position information. diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index 824cf7c04e..ec1f668670 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -11,9 +11,9 @@ */ class TokenStream { /** @var Token[] Tokens (in PhpToken::tokenize() format) */ - private $tokens; + private array $tokens; /** @var int[] Map from position to indentation */ - private $indentMap; + private array $indentMap; /** * Create token stream instance. diff --git a/lib/PhpParser/JsonDecoder.php b/lib/PhpParser/JsonDecoder.php index bd9d59c827..7be41426ef 100644 --- a/lib/PhpParser/JsonDecoder.php +++ b/lib/PhpParser/JsonDecoder.php @@ -4,7 +4,7 @@ class JsonDecoder { /** @var \ReflectionClass[] Node type to reflection class map */ - private $reflectionClassCache; + private array $reflectionClassCache; /** @return mixed */ public function decode(string $json) { diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index 6c2b2b5f31..adff5222a6 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -6,7 +6,7 @@ class Lexer { /** @var list List of tokens */ - protected $tokens; + protected array $tokens; /** * Tokenize the provided source code. diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 11c2c191a8..30590c4cf9 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -22,15 +22,15 @@ class Emulative extends Lexer { /** @var array{int, string, string}[] Patches used to reverse changes introduced in the code */ - private $patches = []; + private array $patches = []; /** @var list */ - private $emulators = []; + private array $emulators = []; /** @var PhpVersion */ - private $targetPhpVersion; + private PhpVersion $targetPhpVersion; /** @var PhpVersion */ - private $hostPhpVersion; + private PhpVersion $hostPhpVersion; /** * @param PhpVersion|null $phpVersion PHP version to emulate. Defaults to newest supported. diff --git a/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php index e73c87d4ec..851b5c4acf 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php @@ -9,7 +9,7 @@ */ final class ReverseEmulator extends TokenEmulator { /** @var TokenEmulator Inner emulator */ - private $emulator; + private TokenEmulator $emulator; public function __construct(TokenEmulator $emulator) { $this->emulator = $emulator; diff --git a/lib/PhpParser/NameContext.php b/lib/PhpParser/NameContext.php index 5c7f12f8e8..395d5d6862 100644 --- a/lib/PhpParser/NameContext.php +++ b/lib/PhpParser/NameContext.php @@ -8,16 +8,16 @@ class NameContext { /** @var null|Name Current namespace */ - protected $namespace; + protected ?Name $namespace; /** @var Name[][] Map of format [aliasType => [aliasName => originalName]] */ - protected $aliases = []; + protected array $aliases = []; /** @var Name[][] Same as $aliases but preserving original case */ - protected $origAliases = []; + protected array $origAliases = []; /** @var ErrorHandler Error handler */ - protected $errorHandler; + protected ErrorHandler $errorHandler; /** * Create a name context. diff --git a/lib/PhpParser/Node/Arg.php b/lib/PhpParser/Node/Arg.php index c049e49adc..c866a025a5 100644 --- a/lib/PhpParser/Node/Arg.php +++ b/lib/PhpParser/Node/Arg.php @@ -6,13 +6,13 @@ class Arg extends NodeAbstract { /** @var Identifier|null Parameter name (for named parameters) */ - public $name; + public ?Identifier $name; /** @var Expr Value to pass */ - public $value; + public Expr $value; /** @var bool Whether to pass by ref */ - public $byRef; + public bool $byRef; /** @var bool Whether to unpack the argument */ - public $unpack; + public bool $unpack; /** * Constructs a function call argument node. diff --git a/lib/PhpParser/Node/ArrayItem.php b/lib/PhpParser/Node/ArrayItem.php index f95ee81063..a466a3da68 100644 --- a/lib/PhpParser/Node/ArrayItem.php +++ b/lib/PhpParser/Node/ArrayItem.php @@ -6,13 +6,13 @@ class ArrayItem extends NodeAbstract { /** @var null|Expr Key */ - public $key; + public ?Expr $key; /** @var Expr Value */ - public $value; + public Expr $value; /** @var bool Whether to assign by reference */ - public $byRef; + public bool $byRef; /** @var bool Whether to unpack the argument */ - public $unpack; + public bool $unpack; /** * Constructs an array item node. diff --git a/lib/PhpParser/Node/Attribute.php b/lib/PhpParser/Node/Attribute.php index 701daebfe3..748b4b21b5 100644 --- a/lib/PhpParser/Node/Attribute.php +++ b/lib/PhpParser/Node/Attribute.php @@ -7,10 +7,10 @@ class Attribute extends NodeAbstract { /** @var Name Attribute name */ - public $name; + public Name $name; /** @var list Attribute arguments */ - public $args; + public array $args; /** * @param Node\Name $name Attribute name diff --git a/lib/PhpParser/Node/AttributeGroup.php b/lib/PhpParser/Node/AttributeGroup.php index eae5548a26..b9eb588d01 100644 --- a/lib/PhpParser/Node/AttributeGroup.php +++ b/lib/PhpParser/Node/AttributeGroup.php @@ -6,7 +6,7 @@ class AttributeGroup extends NodeAbstract { /** @var Attribute[] Attributes */ - public $attrs; + public array $attrs; /** * @param Attribute[] $attrs PHP attributes diff --git a/lib/PhpParser/Node/ClosureUse.php b/lib/PhpParser/Node/ClosureUse.php index fcfb387fac..e49d58af47 100644 --- a/lib/PhpParser/Node/ClosureUse.php +++ b/lib/PhpParser/Node/ClosureUse.php @@ -6,9 +6,9 @@ class ClosureUse extends NodeAbstract { /** @var Expr\Variable Variable to use */ - public $var; + public Expr\Variable $var; /** @var bool Whether to use by reference */ - public $byRef; + public bool $byRef; /** * Constructs a closure use node. diff --git a/lib/PhpParser/Node/Const_.php b/lib/PhpParser/Node/Const_.php index 5a80c1e578..eaac88d232 100644 --- a/lib/PhpParser/Node/Const_.php +++ b/lib/PhpParser/Node/Const_.php @@ -6,12 +6,12 @@ class Const_ extends NodeAbstract { /** @var Identifier Name */ - public $name; + public Identifier $name; /** @var Expr Value */ - public $value; + public Expr $value; /** @var Name|null Namespaced name (if using NameResolver) */ - public $namespacedName; + public ?Name $namespacedName; /** * Constructs a const node for use in class const and const statements. diff --git a/lib/PhpParser/Node/DeclareItem.php b/lib/PhpParser/Node/DeclareItem.php index 9500d9874e..4b00a91877 100644 --- a/lib/PhpParser/Node/DeclareItem.php +++ b/lib/PhpParser/Node/DeclareItem.php @@ -7,9 +7,9 @@ class DeclareItem extends NodeAbstract { /** @var Node\Identifier Key */ - public $key; + public Identifier $key; /** @var Node\Expr Value */ - public $value; + public Expr $value; /** * Constructs a declare key=>value pair node. diff --git a/lib/PhpParser/Node/Expr/ArrayDimFetch.php b/lib/PhpParser/Node/Expr/ArrayDimFetch.php index 884169ed72..ae31d96084 100644 --- a/lib/PhpParser/Node/Expr/ArrayDimFetch.php +++ b/lib/PhpParser/Node/Expr/ArrayDimFetch.php @@ -6,9 +6,9 @@ class ArrayDimFetch extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** @var null|Expr Array index / dim */ - public $dim; + public ?Expr $dim; /** * Constructs an array index fetch node. diff --git a/lib/PhpParser/Node/Expr/Array_.php b/lib/PhpParser/Node/Expr/Array_.php index 955c9d25da..6786a62d96 100644 --- a/lib/PhpParser/Node/Expr/Array_.php +++ b/lib/PhpParser/Node/Expr/Array_.php @@ -11,7 +11,7 @@ class Array_ extends Expr { public const KIND_SHORT = 2; // [] syntax /** @var ArrayItem[] Items */ - public $items; + public array $items; /** * Constructs an array node. diff --git a/lib/PhpParser/Node/Expr/ArrowFunction.php b/lib/PhpParser/Node/Expr/ArrowFunction.php index f9b4ec3667..e0452d2625 100644 --- a/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -8,21 +8,21 @@ class ArrowFunction extends Expr implements FunctionLike { /** @var bool */ - public $static; + public bool $static; /** @var bool */ - public $byRef; + public bool $byRef; /** @var Node\Param[] */ - public $params = []; + public array $params = []; /** @var null|Node\Identifier|Node\Name|Node\ComplexType */ public $returnType; /** @var Expr */ - public $expr; + public Expr $expr; /** @var Node\AttributeGroup[] */ - public $attrGroups; + public array $attrGroups; /** * @param array{ diff --git a/lib/PhpParser/Node/Expr/Assign.php b/lib/PhpParser/Node/Expr/Assign.php index 8a43226151..e06d7078ed 100644 --- a/lib/PhpParser/Node/Expr/Assign.php +++ b/lib/PhpParser/Node/Expr/Assign.php @@ -6,9 +6,9 @@ class Assign extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an assignment node. diff --git a/lib/PhpParser/Node/Expr/AssignOp.php b/lib/PhpParser/Node/Expr/AssignOp.php index acc37aa2aa..e21f34d2cf 100644 --- a/lib/PhpParser/Node/Expr/AssignOp.php +++ b/lib/PhpParser/Node/Expr/AssignOp.php @@ -6,9 +6,9 @@ abstract class AssignOp extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a compound assignment operation node. diff --git a/lib/PhpParser/Node/Expr/AssignRef.php b/lib/PhpParser/Node/Expr/AssignRef.php index 5cc6dede11..838a9e2aa7 100644 --- a/lib/PhpParser/Node/Expr/AssignRef.php +++ b/lib/PhpParser/Node/Expr/AssignRef.php @@ -6,9 +6,9 @@ class AssignRef extends Expr { /** @var Expr Variable reference is assigned to */ - public $var; + public Expr $var; /** @var Expr Variable which is referenced */ - public $expr; + public Expr $expr; /** * Constructs an assignment node. diff --git a/lib/PhpParser/Node/Expr/BinaryOp.php b/lib/PhpParser/Node/Expr/BinaryOp.php index ae5f8da9a7..82ac99b25c 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp.php +++ b/lib/PhpParser/Node/Expr/BinaryOp.php @@ -6,9 +6,9 @@ abstract class BinaryOp extends Expr { /** @var Expr The left hand side expression */ - public $left; + public Expr $left; /** @var Expr The right hand side expression */ - public $right; + public Expr $right; /** * Constructs a binary operator node. diff --git a/lib/PhpParser/Node/Expr/BitwiseNot.php b/lib/PhpParser/Node/Expr/BitwiseNot.php index 818f19702b..04b07fea83 100644 --- a/lib/PhpParser/Node/Expr/BitwiseNot.php +++ b/lib/PhpParser/Node/Expr/BitwiseNot.php @@ -6,7 +6,7 @@ class BitwiseNot extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a bitwise not node. diff --git a/lib/PhpParser/Node/Expr/BooleanNot.php b/lib/PhpParser/Node/Expr/BooleanNot.php index 6798db837a..55de28930c 100644 --- a/lib/PhpParser/Node/Expr/BooleanNot.php +++ b/lib/PhpParser/Node/Expr/BooleanNot.php @@ -6,7 +6,7 @@ class BooleanNot extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a boolean not node. diff --git a/lib/PhpParser/Node/Expr/Cast.php b/lib/PhpParser/Node/Expr/Cast.php index d286c21132..89843fc2fd 100644 --- a/lib/PhpParser/Node/Expr/Cast.php +++ b/lib/PhpParser/Node/Expr/Cast.php @@ -6,7 +6,7 @@ abstract class Cast extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a cast node. diff --git a/lib/PhpParser/Node/Expr/Clone_.php b/lib/PhpParser/Node/Expr/Clone_.php index b6110f62b9..bb12bf056a 100644 --- a/lib/PhpParser/Node/Expr/Clone_.php +++ b/lib/PhpParser/Node/Expr/Clone_.php @@ -6,7 +6,7 @@ class Clone_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a clone node. diff --git a/lib/PhpParser/Node/Expr/Closure.php b/lib/PhpParser/Node/Expr/Closure.php index ddb4e0b7a2..fb91b3cae8 100644 --- a/lib/PhpParser/Node/Expr/Closure.php +++ b/lib/PhpParser/Node/Expr/Closure.php @@ -9,19 +9,19 @@ class Closure extends Expr implements FunctionLike { /** @var bool Whether the closure is static */ - public $static; + public bool $static; /** @var bool Whether to return by reference */ - public $byRef; + public bool $byRef; /** @var Node\Param[] Parameters */ - public $params; + public array $params; /** @var ClosureUse[] use()s */ - public $uses; + public array $uses; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ public $returnType; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** * Constructs a lambda function node. diff --git a/lib/PhpParser/Node/Expr/ConstFetch.php b/lib/PhpParser/Node/Expr/ConstFetch.php index 99f781859b..a12291100a 100644 --- a/lib/PhpParser/Node/Expr/ConstFetch.php +++ b/lib/PhpParser/Node/Expr/ConstFetch.php @@ -7,7 +7,7 @@ class ConstFetch extends Expr { /** @var Name Constant name */ - public $name; + public Name $name; /** * Constructs a const fetch node. diff --git a/lib/PhpParser/Node/Expr/Empty_.php b/lib/PhpParser/Node/Expr/Empty_.php index ee55aaa08c..256567c709 100644 --- a/lib/PhpParser/Node/Expr/Empty_.php +++ b/lib/PhpParser/Node/Expr/Empty_.php @@ -6,7 +6,7 @@ class Empty_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an empty() node. diff --git a/lib/PhpParser/Node/Expr/ErrorSuppress.php b/lib/PhpParser/Node/Expr/ErrorSuppress.php index 4ba61f0f1a..47d48eceae 100644 --- a/lib/PhpParser/Node/Expr/ErrorSuppress.php +++ b/lib/PhpParser/Node/Expr/ErrorSuppress.php @@ -6,7 +6,7 @@ class ErrorSuppress extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an error suppress node. diff --git a/lib/PhpParser/Node/Expr/Eval_.php b/lib/PhpParser/Node/Expr/Eval_.php index 4030338475..98a048de17 100644 --- a/lib/PhpParser/Node/Expr/Eval_.php +++ b/lib/PhpParser/Node/Expr/Eval_.php @@ -6,7 +6,7 @@ class Eval_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an eval() node. diff --git a/lib/PhpParser/Node/Expr/Exit_.php b/lib/PhpParser/Node/Expr/Exit_.php index 315307d6c4..4a50e18aa3 100644 --- a/lib/PhpParser/Node/Expr/Exit_.php +++ b/lib/PhpParser/Node/Expr/Exit_.php @@ -10,7 +10,7 @@ class Exit_ extends Expr { public const KIND_DIE = 2; /** @var null|Expr Expression */ - public $expr; + public ?Expr $expr; /** * Constructs an exit() node. diff --git a/lib/PhpParser/Node/Expr/Include_.php b/lib/PhpParser/Node/Expr/Include_.php index 11cc9e20fd..f8d31e31df 100644 --- a/lib/PhpParser/Node/Expr/Include_.php +++ b/lib/PhpParser/Node/Expr/Include_.php @@ -11,9 +11,9 @@ class Include_ extends Expr { public const TYPE_REQUIRE_ONCE = 4; /** @var Expr Expression */ - public $expr; + public Expr $expr; /** @var int Type of include */ - public $type; + public int $type; /** * Constructs an include node. diff --git a/lib/PhpParser/Node/Expr/Instanceof_.php b/lib/PhpParser/Node/Expr/Instanceof_.php index 1017fad05c..016842bb03 100644 --- a/lib/PhpParser/Node/Expr/Instanceof_.php +++ b/lib/PhpParser/Node/Expr/Instanceof_.php @@ -7,7 +7,7 @@ class Instanceof_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** @var Name|Expr Class name */ public $class; diff --git a/lib/PhpParser/Node/Expr/Isset_.php b/lib/PhpParser/Node/Expr/Isset_.php index a812ae49df..6ffa50e7c0 100644 --- a/lib/PhpParser/Node/Expr/Isset_.php +++ b/lib/PhpParser/Node/Expr/Isset_.php @@ -6,7 +6,7 @@ class Isset_ extends Expr { /** @var Expr[] Variables */ - public $vars; + public array $vars; /** * Constructs an array node. diff --git a/lib/PhpParser/Node/Expr/Match_.php b/lib/PhpParser/Node/Expr/Match_.php index 3b5ce48ede..5a578d1747 100644 --- a/lib/PhpParser/Node/Expr/Match_.php +++ b/lib/PhpParser/Node/Expr/Match_.php @@ -7,9 +7,9 @@ class Match_ extends Node\Expr { /** @var Node\Expr */ - public $cond; + public Node\Expr $cond; /** @var MatchArm[] */ - public $arms; + public array $arms; /** * @param MatchArm[] $arms diff --git a/lib/PhpParser/Node/Expr/MethodCall.php b/lib/PhpParser/Node/Expr/MethodCall.php index 16c538b0a4..82a696cb13 100644 --- a/lib/PhpParser/Node/Expr/MethodCall.php +++ b/lib/PhpParser/Node/Expr/MethodCall.php @@ -9,7 +9,7 @@ class MethodCall extends CallLike { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Method name */ public $name; /** @var array Arguments */ diff --git a/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/lib/PhpParser/Node/Expr/NullsafeMethodCall.php index d36fefe83b..fc4093edd9 100644 --- a/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +++ b/lib/PhpParser/Node/Expr/NullsafeMethodCall.php @@ -9,7 +9,7 @@ class NullsafeMethodCall extends CallLike { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Method name */ public $name; /** @var array Arguments */ diff --git a/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php index 2a01f87224..8120f2350b 100644 --- a/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +++ b/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php @@ -7,7 +7,7 @@ class NullsafePropertyFetch extends Expr { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Property name */ public $name; diff --git a/lib/PhpParser/Node/Expr/PostDec.php b/lib/PhpParser/Node/Expr/PostDec.php index 1efc75aeb5..8545aa3e35 100644 --- a/lib/PhpParser/Node/Expr/PostDec.php +++ b/lib/PhpParser/Node/Expr/PostDec.php @@ -6,7 +6,7 @@ class PostDec extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a post decrement node. diff --git a/lib/PhpParser/Node/Expr/PostInc.php b/lib/PhpParser/Node/Expr/PostInc.php index 783071b2b1..21d09df20d 100644 --- a/lib/PhpParser/Node/Expr/PostInc.php +++ b/lib/PhpParser/Node/Expr/PostInc.php @@ -6,7 +6,7 @@ class PostInc extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a post increment node. diff --git a/lib/PhpParser/Node/Expr/PreDec.php b/lib/PhpParser/Node/Expr/PreDec.php index 72622ef47b..9bed3f33ab 100644 --- a/lib/PhpParser/Node/Expr/PreDec.php +++ b/lib/PhpParser/Node/Expr/PreDec.php @@ -6,7 +6,7 @@ class PreDec extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a pre decrement node. diff --git a/lib/PhpParser/Node/Expr/PreInc.php b/lib/PhpParser/Node/Expr/PreInc.php index 5e26fa9baf..5dc25be85b 100644 --- a/lib/PhpParser/Node/Expr/PreInc.php +++ b/lib/PhpParser/Node/Expr/PreInc.php @@ -6,7 +6,7 @@ class PreInc extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a pre increment node. diff --git a/lib/PhpParser/Node/Expr/Print_.php b/lib/PhpParser/Node/Expr/Print_.php index 2af35e1e69..298c4d6d0e 100644 --- a/lib/PhpParser/Node/Expr/Print_.php +++ b/lib/PhpParser/Node/Expr/Print_.php @@ -6,7 +6,7 @@ class Print_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an print() node. diff --git a/lib/PhpParser/Node/Expr/PropertyFetch.php b/lib/PhpParser/Node/Expr/PropertyFetch.php index a2fe758361..2bb084fc97 100644 --- a/lib/PhpParser/Node/Expr/PropertyFetch.php +++ b/lib/PhpParser/Node/Expr/PropertyFetch.php @@ -7,7 +7,7 @@ class PropertyFetch extends Expr { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Property name */ public $name; diff --git a/lib/PhpParser/Node/Expr/Ternary.php b/lib/PhpParser/Node/Expr/Ternary.php index d17a73967e..a7e8784efc 100644 --- a/lib/PhpParser/Node/Expr/Ternary.php +++ b/lib/PhpParser/Node/Expr/Ternary.php @@ -6,11 +6,11 @@ class Ternary extends Expr { /** @var Expr Condition */ - public $cond; + public Expr $cond; /** @var null|Expr Expression for true */ - public $if; + public ?Expr $if; /** @var Expr Expression for false */ - public $else; + public Expr $else; /** * Constructs a ternary operator node. diff --git a/lib/PhpParser/Node/Expr/Throw_.php b/lib/PhpParser/Node/Expr/Throw_.php index ef50d8582d..eda68bc52c 100644 --- a/lib/PhpParser/Node/Expr/Throw_.php +++ b/lib/PhpParser/Node/Expr/Throw_.php @@ -6,7 +6,7 @@ class Throw_ extends Node\Expr { /** @var Node\Expr Expression */ - public $expr; + public Node\Expr $expr; /** * Constructs a throw expression node. diff --git a/lib/PhpParser/Node/Expr/UnaryMinus.php b/lib/PhpParser/Node/Expr/UnaryMinus.php index e26dad44ab..3de64c46d8 100644 --- a/lib/PhpParser/Node/Expr/UnaryMinus.php +++ b/lib/PhpParser/Node/Expr/UnaryMinus.php @@ -6,7 +6,7 @@ class UnaryMinus extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a unary minus node. diff --git a/lib/PhpParser/Node/Expr/UnaryPlus.php b/lib/PhpParser/Node/Expr/UnaryPlus.php index 8fc93f0922..4f89284e5b 100644 --- a/lib/PhpParser/Node/Expr/UnaryPlus.php +++ b/lib/PhpParser/Node/Expr/UnaryPlus.php @@ -6,7 +6,7 @@ class UnaryPlus extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a unary plus node. diff --git a/lib/PhpParser/Node/Expr/YieldFrom.php b/lib/PhpParser/Node/Expr/YieldFrom.php index 0cb387d7e7..e632144567 100644 --- a/lib/PhpParser/Node/Expr/YieldFrom.php +++ b/lib/PhpParser/Node/Expr/YieldFrom.php @@ -6,7 +6,7 @@ class YieldFrom extends Expr { /** @var Expr Expression to yield from */ - public $expr; + public Expr $expr; /** * Constructs an "yield from" node. diff --git a/lib/PhpParser/Node/Expr/Yield_.php b/lib/PhpParser/Node/Expr/Yield_.php index 9a9ea2f960..065b1d2e39 100644 --- a/lib/PhpParser/Node/Expr/Yield_.php +++ b/lib/PhpParser/Node/Expr/Yield_.php @@ -6,9 +6,9 @@ class Yield_ extends Expr { /** @var null|Expr Key expression */ - public $key; + public ?Expr $key; /** @var null|Expr Value expression */ - public $value; + public ?Expr $value; /** * Constructs a yield expression node. diff --git a/lib/PhpParser/Node/Identifier.php b/lib/PhpParser/Node/Identifier.php index 000499957a..e0e28406f5 100644 --- a/lib/PhpParser/Node/Identifier.php +++ b/lib/PhpParser/Node/Identifier.php @@ -9,10 +9,10 @@ */ class Identifier extends NodeAbstract { /** @var string Identifier as string */ - public $name; + public string $name; /** @var array */ - private static $specialClassNames = [ + private static array $specialClassNames = [ 'self' => true, 'parent' => true, 'static' => true, diff --git a/lib/PhpParser/Node/InterpolatedStringPart.php b/lib/PhpParser/Node/InterpolatedStringPart.php index 407258e3c6..eddd7406ee 100644 --- a/lib/PhpParser/Node/InterpolatedStringPart.php +++ b/lib/PhpParser/Node/InterpolatedStringPart.php @@ -6,7 +6,7 @@ class InterpolatedStringPart extends NodeAbstract { /** @var string String value */ - public $value; + public string $value; /** * Constructs a node representing a string part of an interpolated string. diff --git a/lib/PhpParser/Node/MatchArm.php b/lib/PhpParser/Node/MatchArm.php index 1c8d7053a7..2927f029d6 100644 --- a/lib/PhpParser/Node/MatchArm.php +++ b/lib/PhpParser/Node/MatchArm.php @@ -7,9 +7,9 @@ class MatchArm extends NodeAbstract { /** @var null|list */ - public $conds; + public ?array $conds; /** @var Node\Expr */ - public $body; + public Expr $body; /** * @param null|list $conds diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index e5a2ae0dd0..8270c5dbec 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -6,10 +6,10 @@ class Name extends NodeAbstract { /** @var string Name as string */ - public $name; + public string $name; /** @var array */ - private static $specialClassNames = [ + private static array $specialClassNames = [ 'self' => true, 'parent' => true, 'static' => true, diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index 0732c57437..517ee4b65e 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -10,17 +10,17 @@ class Param extends NodeAbstract { /** @var null|Identifier|Name|ComplexType Type declaration */ public $type; /** @var bool Whether parameter is passed by reference */ - public $byRef; + public bool $byRef; /** @var bool Whether this is a variadic argument */ - public $variadic; + public bool $variadic; /** @var Expr\Variable|Expr\Error Parameter variable */ public $var; /** @var null|Expr Default value */ - public $default; + public ?Expr $default; /** @var int */ - public $flags; + public int $flags; /** @var AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** * Constructs a parameter node. diff --git a/lib/PhpParser/Node/PropertyItem.php b/lib/PhpParser/Node/PropertyItem.php index 804a507c5f..7ba36c2fb6 100644 --- a/lib/PhpParser/Node/PropertyItem.php +++ b/lib/PhpParser/Node/PropertyItem.php @@ -6,9 +6,9 @@ class PropertyItem extends Node\Stmt { /** @var Node\VarLikeIdentifier Name */ - public $name; + public VarLikeIdentifier $name; /** @var null|Node\Expr Default */ - public $default; + public ?Expr $default; /** * Constructs a class property item node. diff --git a/lib/PhpParser/Node/Scalar/Float_.php b/lib/PhpParser/Node/Scalar/Float_.php index 4dffb8c6f2..a33946b67a 100644 --- a/lib/PhpParser/Node/Scalar/Float_.php +++ b/lib/PhpParser/Node/Scalar/Float_.php @@ -6,7 +6,7 @@ class Float_ extends Scalar { /** @var float Number value */ - public $value; + public float $value; /** * Constructs a float number scalar node. diff --git a/lib/PhpParser/Node/Scalar/Int_.php b/lib/PhpParser/Node/Scalar/Int_.php index d6d0de637d..baa976dcd2 100644 --- a/lib/PhpParser/Node/Scalar/Int_.php +++ b/lib/PhpParser/Node/Scalar/Int_.php @@ -13,7 +13,7 @@ class Int_ extends Scalar { public const KIND_HEX = 16; /** @var int Number value */ - public $value; + public int $value; /** * Constructs an integer number scalar node. diff --git a/lib/PhpParser/Node/Scalar/String_.php b/lib/PhpParser/Node/Scalar/String_.php index 371c3b6cb0..f51a5f7805 100644 --- a/lib/PhpParser/Node/Scalar/String_.php +++ b/lib/PhpParser/Node/Scalar/String_.php @@ -13,10 +13,10 @@ class String_ extends Scalar { public const KIND_NOWDOC = 4; /** @var string String value */ - public $value; + public string $value; /** @var array Escaped character to its decoded value */ - protected static $replacements = [ + protected static array $replacements = [ '\\' => '\\', '$' => '$', 'n' => "\n", diff --git a/lib/PhpParser/Node/StaticVar.php b/lib/PhpParser/Node/StaticVar.php index 8dfb11a4c9..7d7d3037ac 100644 --- a/lib/PhpParser/Node/StaticVar.php +++ b/lib/PhpParser/Node/StaticVar.php @@ -7,9 +7,9 @@ class StaticVar extends NodeAbstract { /** @var Expr\Variable Variable */ - public $var; + public Expr\Variable $var; /** @var null|Node\Expr Default value */ - public $default; + public ?Expr $default; /** * Constructs a static variable node. diff --git a/lib/PhpParser/Node/Stmt/Break_.php b/lib/PhpParser/Node/Stmt/Break_.php index 11964ba117..a52fac8f12 100644 --- a/lib/PhpParser/Node/Stmt/Break_.php +++ b/lib/PhpParser/Node/Stmt/Break_.php @@ -6,7 +6,7 @@ class Break_ extends Node\Stmt { /** @var null|Node\Expr Number of loops to break */ - public $num; + public ?Node\Expr $num; /** * Constructs a break node. diff --git a/lib/PhpParser/Node/Stmt/Case_.php b/lib/PhpParser/Node/Stmt/Case_.php index 6f7a91888b..207ed0bcaa 100644 --- a/lib/PhpParser/Node/Stmt/Case_.php +++ b/lib/PhpParser/Node/Stmt/Case_.php @@ -6,9 +6,9 @@ class Case_ extends Node\Stmt { /** @var null|Node\Expr Condition (null for default) */ - public $cond; + public ?Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a case node. diff --git a/lib/PhpParser/Node/Stmt/Catch_.php b/lib/PhpParser/Node/Stmt/Catch_.php index 7f2cd7a911..9fa0add532 100644 --- a/lib/PhpParser/Node/Stmt/Catch_.php +++ b/lib/PhpParser/Node/Stmt/Catch_.php @@ -7,11 +7,11 @@ class Catch_ extends Node\Stmt { /** @var Node\Name[] Types of exceptions to catch */ - public $types; + public array $types; /** @var Expr\Variable|null Variable for exception */ - public $var; + public ?Expr\Variable $var; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a catch node. diff --git a/lib/PhpParser/Node/Stmt/ClassConst.php b/lib/PhpParser/Node/Stmt/ClassConst.php index a5e467ab89..525118dec6 100644 --- a/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/lib/PhpParser/Node/Stmt/ClassConst.php @@ -7,11 +7,11 @@ class ClassConst extends Node\Stmt { /** @var int Modifiers */ - public $flags; + public int $flags; /** @var Node\Const_[] Constant declarations */ - public $consts; + public array $consts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** @var Node\Identifier|Node\Name|Node\ComplexType|null Type declaration */ public $type; diff --git a/lib/PhpParser/Node/Stmt/ClassLike.php b/lib/PhpParser/Node/Stmt/ClassLike.php index 58b859cc83..fb9ba4f59a 100644 --- a/lib/PhpParser/Node/Stmt/ClassLike.php +++ b/lib/PhpParser/Node/Stmt/ClassLike.php @@ -7,14 +7,14 @@ abstract class ClassLike extends Node\Stmt { /** @var Node\Identifier|null Name */ - public $name; + public ?Node\Identifier $name; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** @var Node\Name|null Namespaced name (if using NameResolver) */ - public $namespacedName; + public ?Node\Name $namespacedName; /** * @return TraitUse[] diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index aa6424b6dc..65c3ab08ca 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -8,22 +8,22 @@ class ClassMethod extends Node\Stmt implements FunctionLike { /** @var int Flags */ - public $flags; + public int $flags; /** @var bool Whether to return by reference */ - public $byRef; + public bool $byRef; /** @var Node\Identifier Name */ - public $name; + public Node\Identifier $name; /** @var Node\Param[] Parameters */ - public $params; + public array $params; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ public $returnType; /** @var Node\Stmt[]|null Statements */ - public $stmts; + public ?array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** @var array */ - private static $magicNames = [ + private static array $magicNames = [ '__construct' => true, '__destruct' => true, '__call' => true, diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 711960653c..4350a358b6 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -25,11 +25,11 @@ class Class_ extends ClassLike { public const VISIBILITY_MODIFIER_MASK = 7; // 1 | 2 | 4 /** @var int Modifiers */ - public $flags; + public int $flags; /** @var null|Node\Name Name of extended class */ - public $extends; + public ?Node\Name $extends; /** @var Node\Name[] Names of implemented interfaces */ - public $implements; + public array $implements; /** * Constructs a class node. diff --git a/lib/PhpParser/Node/Stmt/Const_.php b/lib/PhpParser/Node/Stmt/Const_.php index 3a7b090ffe..8f7f7b0e87 100644 --- a/lib/PhpParser/Node/Stmt/Const_.php +++ b/lib/PhpParser/Node/Stmt/Const_.php @@ -6,7 +6,7 @@ class Const_ extends Node\Stmt { /** @var Node\Const_[] Constant declarations */ - public $consts; + public array $consts; /** * Constructs a const list node. diff --git a/lib/PhpParser/Node/Stmt/Continue_.php b/lib/PhpParser/Node/Stmt/Continue_.php index f74b7fc6bf..781f36144d 100644 --- a/lib/PhpParser/Node/Stmt/Continue_.php +++ b/lib/PhpParser/Node/Stmt/Continue_.php @@ -6,7 +6,7 @@ class Continue_ extends Node\Stmt { /** @var null|Node\Expr Number of loops to continue */ - public $num; + public ?Node\Expr $num; /** * Constructs a continue node. diff --git a/lib/PhpParser/Node/Stmt/Declare_.php b/lib/PhpParser/Node/Stmt/Declare_.php index 0c07eb3985..3b0a99f0cf 100644 --- a/lib/PhpParser/Node/Stmt/Declare_.php +++ b/lib/PhpParser/Node/Stmt/Declare_.php @@ -7,9 +7,9 @@ class Declare_ extends Node\Stmt { /** @var DeclareItem[] List of declares */ - public $declares; + public array $declares; /** @var Node\Stmt[]|null Statements */ - public $stmts; + public ?array $stmts; /** * Constructs a declare node. diff --git a/lib/PhpParser/Node/Stmt/Do_.php b/lib/PhpParser/Node/Stmt/Do_.php index 28d313983e..1657a75983 100644 --- a/lib/PhpParser/Node/Stmt/Do_.php +++ b/lib/PhpParser/Node/Stmt/Do_.php @@ -6,9 +6,9 @@ class Do_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** * Constructs a do while node. diff --git a/lib/PhpParser/Node/Stmt/Echo_.php b/lib/PhpParser/Node/Stmt/Echo_.php index b368b392ba..c812669cff 100644 --- a/lib/PhpParser/Node/Stmt/Echo_.php +++ b/lib/PhpParser/Node/Stmt/Echo_.php @@ -6,7 +6,7 @@ class Echo_ extends Node\Stmt { /** @var Node\Expr[] Expressions */ - public $exprs; + public array $exprs; /** * Constructs an echo node. diff --git a/lib/PhpParser/Node/Stmt/ElseIf_.php b/lib/PhpParser/Node/Stmt/ElseIf_.php index 66e590d428..22646103a5 100644 --- a/lib/PhpParser/Node/Stmt/ElseIf_.php +++ b/lib/PhpParser/Node/Stmt/ElseIf_.php @@ -6,9 +6,9 @@ class ElseIf_ extends Node\Stmt { /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs an elseif node. diff --git a/lib/PhpParser/Node/Stmt/Else_.php b/lib/PhpParser/Node/Stmt/Else_.php index 78c1ce86bf..dabca59a5f 100644 --- a/lib/PhpParser/Node/Stmt/Else_.php +++ b/lib/PhpParser/Node/Stmt/Else_.php @@ -6,7 +6,7 @@ class Else_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs an else node. diff --git a/lib/PhpParser/Node/Stmt/EnumCase.php b/lib/PhpParser/Node/Stmt/EnumCase.php index fddadb034c..7cf57ee745 100644 --- a/lib/PhpParser/Node/Stmt/EnumCase.php +++ b/lib/PhpParser/Node/Stmt/EnumCase.php @@ -7,11 +7,11 @@ class EnumCase extends Node\Stmt { /** @var Node\Identifier Enum case name */ - public $name; + public Node\Identifier $name; /** @var Node\Expr|null Enum case expression */ - public $expr; + public ?Node\Expr $expr; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** * @param string|Node\Identifier $name Enum case name diff --git a/lib/PhpParser/Node/Stmt/Enum_.php b/lib/PhpParser/Node/Stmt/Enum_.php index 429cda0273..ca87aeb18d 100644 --- a/lib/PhpParser/Node/Stmt/Enum_.php +++ b/lib/PhpParser/Node/Stmt/Enum_.php @@ -8,7 +8,7 @@ class Enum_ extends ClassLike { /** @var null|Node\Identifier Scalar Type */ public $scalarType; /** @var Node\Name[] Names of implemented interfaces */ - public $implements; + public array $implements; /** * @param string|Node\Identifier|null $name Name diff --git a/lib/PhpParser/Node/Stmt/Expression.php b/lib/PhpParser/Node/Stmt/Expression.php index 0f3f9a89b8..1f1b9f931c 100644 --- a/lib/PhpParser/Node/Stmt/Expression.php +++ b/lib/PhpParser/Node/Stmt/Expression.php @@ -9,7 +9,7 @@ */ class Expression extends Node\Stmt { /** @var Node\Expr Expression */ - public $expr; + public Node\Expr $expr; /** * Constructs an expression statement. diff --git a/lib/PhpParser/Node/Stmt/Finally_.php b/lib/PhpParser/Node/Stmt/Finally_.php index 02df135ac8..51a3602330 100644 --- a/lib/PhpParser/Node/Stmt/Finally_.php +++ b/lib/PhpParser/Node/Stmt/Finally_.php @@ -6,7 +6,7 @@ class Finally_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a finally node. diff --git a/lib/PhpParser/Node/Stmt/For_.php b/lib/PhpParser/Node/Stmt/For_.php index 00dbd14743..6f2fbb9e3a 100644 --- a/lib/PhpParser/Node/Stmt/For_.php +++ b/lib/PhpParser/Node/Stmt/For_.php @@ -6,13 +6,13 @@ class For_ extends Node\Stmt { /** @var Node\Expr[] Init expressions */ - public $init; + public array $init; /** @var Node\Expr[] Loop conditions */ - public $cond; + public array $cond; /** @var Node\Expr[] Loop expressions */ - public $loop; + public array $loop; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a for loop node. diff --git a/lib/PhpParser/Node/Stmt/Foreach_.php b/lib/PhpParser/Node/Stmt/Foreach_.php index c347d4e125..0530d4e1a0 100644 --- a/lib/PhpParser/Node/Stmt/Foreach_.php +++ b/lib/PhpParser/Node/Stmt/Foreach_.php @@ -6,15 +6,15 @@ class Foreach_ extends Node\Stmt { /** @var Node\Expr Expression to iterate */ - public $expr; + public Node\Expr $expr; /** @var null|Node\Expr Variable to assign key to */ - public $keyVar; + public ?Node\Expr $keyVar; /** @var bool Whether to assign value by reference */ - public $byRef; + public bool $byRef; /** @var Node\Expr Variable to assign value to */ - public $valueVar; + public Node\Expr $valueVar; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a foreach node. diff --git a/lib/PhpParser/Node/Stmt/Function_.php b/lib/PhpParser/Node/Stmt/Function_.php index feb5edfe7b..d508d59348 100644 --- a/lib/PhpParser/Node/Stmt/Function_.php +++ b/lib/PhpParser/Node/Stmt/Function_.php @@ -7,20 +7,20 @@ class Function_ extends Node\Stmt implements FunctionLike { /** @var bool Whether function returns by reference */ - public $byRef; + public bool $byRef; /** @var Node\Identifier Name */ - public $name; + public Node\Identifier $name; /** @var Node\Param[] Parameters */ - public $params; + public array $params; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ public $returnType; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** @var Node\Name|null Namespaced name (if using NameResolver) */ - public $namespacedName; + public ?Node\Name $namespacedName; /** * Constructs a function node. diff --git a/lib/PhpParser/Node/Stmt/Global_.php b/lib/PhpParser/Node/Stmt/Global_.php index 94155aa6a4..20b3ef10c1 100644 --- a/lib/PhpParser/Node/Stmt/Global_.php +++ b/lib/PhpParser/Node/Stmt/Global_.php @@ -6,7 +6,7 @@ class Global_ extends Node\Stmt { /** @var Node\Expr[] Variables */ - public $vars; + public array $vars; /** * Constructs a global variables list node. diff --git a/lib/PhpParser/Node/Stmt/Goto_.php b/lib/PhpParser/Node/Stmt/Goto_.php index 774e7c72c2..f59578040c 100644 --- a/lib/PhpParser/Node/Stmt/Goto_.php +++ b/lib/PhpParser/Node/Stmt/Goto_.php @@ -7,7 +7,7 @@ class Goto_ extends Stmt { /** @var Identifier Name of label to jump to */ - public $name; + public Identifier $name; /** * Constructs a goto node. diff --git a/lib/PhpParser/Node/Stmt/GroupUse.php b/lib/PhpParser/Node/Stmt/GroupUse.php index 4a0322a0af..29af580f85 100644 --- a/lib/PhpParser/Node/Stmt/GroupUse.php +++ b/lib/PhpParser/Node/Stmt/GroupUse.php @@ -8,11 +8,11 @@ class GroupUse extends Stmt { /** @var int Type of group use */ - public $type; + public int $type; /** @var Name Prefix for uses */ - public $prefix; + public Name $prefix; /** @var UseItem[] Uses */ - public $uses; + public array $uses; /** * Constructs a group use node. diff --git a/lib/PhpParser/Node/Stmt/HaltCompiler.php b/lib/PhpParser/Node/Stmt/HaltCompiler.php index 6fe7be35c6..59a8d3edca 100644 --- a/lib/PhpParser/Node/Stmt/HaltCompiler.php +++ b/lib/PhpParser/Node/Stmt/HaltCompiler.php @@ -6,7 +6,7 @@ class HaltCompiler extends Stmt { /** @var string Remaining text after halt compiler statement. */ - public $remaining; + public string $remaining; /** * Constructs a __halt_compiler node. diff --git a/lib/PhpParser/Node/Stmt/If_.php b/lib/PhpParser/Node/Stmt/If_.php index 7c9289e7eb..544390ff5e 100644 --- a/lib/PhpParser/Node/Stmt/If_.php +++ b/lib/PhpParser/Node/Stmt/If_.php @@ -6,13 +6,13 @@ class If_ extends Node\Stmt { /** @var Node\Expr Condition expression */ - public $cond; + public Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var ElseIf_[] Elseif clauses */ - public $elseifs; + public array $elseifs; /** @var null|Else_ Else clause */ - public $else; + public ?Else_ $else; /** * Constructs an if node. diff --git a/lib/PhpParser/Node/Stmt/InlineHTML.php b/lib/PhpParser/Node/Stmt/InlineHTML.php index 88d54c060a..17cc3fc9e1 100644 --- a/lib/PhpParser/Node/Stmt/InlineHTML.php +++ b/lib/PhpParser/Node/Stmt/InlineHTML.php @@ -6,7 +6,7 @@ class InlineHTML extends Stmt { /** @var string String */ - public $value; + public string $value; /** * Constructs an inline HTML node. diff --git a/lib/PhpParser/Node/Stmt/Interface_.php b/lib/PhpParser/Node/Stmt/Interface_.php index fa0ef46501..9359064f8e 100644 --- a/lib/PhpParser/Node/Stmt/Interface_.php +++ b/lib/PhpParser/Node/Stmt/Interface_.php @@ -6,7 +6,7 @@ class Interface_ extends ClassLike { /** @var Node\Name[] Extended interfaces */ - public $extends; + public array $extends; /** * Constructs a class node. diff --git a/lib/PhpParser/Node/Stmt/Label.php b/lib/PhpParser/Node/Stmt/Label.php index 9e30c19d90..3cc9259c1e 100644 --- a/lib/PhpParser/Node/Stmt/Label.php +++ b/lib/PhpParser/Node/Stmt/Label.php @@ -7,7 +7,7 @@ class Label extends Stmt { /** @var Identifier Name */ - public $name; + public Identifier $name; /** * Constructs a label node. diff --git a/lib/PhpParser/Node/Stmt/Namespace_.php b/lib/PhpParser/Node/Stmt/Namespace_.php index a7fe92487a..5d16a0630e 100644 --- a/lib/PhpParser/Node/Stmt/Namespace_.php +++ b/lib/PhpParser/Node/Stmt/Namespace_.php @@ -10,7 +10,7 @@ class Namespace_ extends Node\Stmt { public const KIND_BRACED = 2; /** @var null|Node\Name Name */ - public $name; + public ?Node\Name $name; /** @var Node\Stmt[] Statements */ public $stmts; diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index 5d6682744a..9ab40b5d2b 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -11,13 +11,13 @@ class Property extends Node\Stmt { /** @var int Modifiers */ - public $flags; + public int $flags; /** @var PropertyItem[] Properties */ - public $props; + public array $props; /** @var null|Identifier|Name|ComplexType Type declaration */ public $type; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** * Constructs a class property list node. diff --git a/lib/PhpParser/Node/Stmt/Return_.php b/lib/PhpParser/Node/Stmt/Return_.php index 35f49eff4d..87b9aae6ee 100644 --- a/lib/PhpParser/Node/Stmt/Return_.php +++ b/lib/PhpParser/Node/Stmt/Return_.php @@ -6,7 +6,7 @@ class Return_ extends Node\Stmt { /** @var null|Node\Expr Expression */ - public $expr; + public ?Node\Expr $expr; /** * Constructs a return node. diff --git a/lib/PhpParser/Node/Stmt/Static_.php b/lib/PhpParser/Node/Stmt/Static_.php index 7f565f74ec..d565bcde7e 100644 --- a/lib/PhpParser/Node/Stmt/Static_.php +++ b/lib/PhpParser/Node/Stmt/Static_.php @@ -7,7 +7,7 @@ class Static_ extends Stmt { /** @var StaticVar[] Variable definitions */ - public $vars; + public array $vars; /** * Constructs a static variables list node. diff --git a/lib/PhpParser/Node/Stmt/Switch_.php b/lib/PhpParser/Node/Stmt/Switch_.php index 5968306a33..e550ca7e66 100644 --- a/lib/PhpParser/Node/Stmt/Switch_.php +++ b/lib/PhpParser/Node/Stmt/Switch_.php @@ -6,9 +6,9 @@ class Switch_ extends Node\Stmt { /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** @var Case_[] Case list */ - public $cases; + public array $cases; /** * Constructs a case node. diff --git a/lib/PhpParser/Node/Stmt/Throw_.php b/lib/PhpParser/Node/Stmt/Throw_.php index 9772f79b30..173b9a8524 100644 --- a/lib/PhpParser/Node/Stmt/Throw_.php +++ b/lib/PhpParser/Node/Stmt/Throw_.php @@ -6,7 +6,7 @@ class Throw_ extends Node\Stmt { /** @var Node\Expr Expression */ - public $expr; + public Node\Expr $expr; /** * Constructs a legacy throw statement node. diff --git a/lib/PhpParser/Node/Stmt/TraitUse.php b/lib/PhpParser/Node/Stmt/TraitUse.php index 460c51f2b7..70ddab4518 100644 --- a/lib/PhpParser/Node/Stmt/TraitUse.php +++ b/lib/PhpParser/Node/Stmt/TraitUse.php @@ -6,9 +6,9 @@ class TraitUse extends Node\Stmt { /** @var Node\Name[] Traits */ - public $traits; + public array $traits; /** @var TraitUseAdaptation[] Adaptations */ - public $adaptations; + public array $adaptations; /** * Constructs a trait use node. diff --git a/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php b/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php index 601a265659..987bc88ed0 100644 --- a/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +++ b/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php @@ -6,7 +6,7 @@ abstract class TraitUseAdaptation extends Node\Stmt { /** @var Node\Name|null Trait name */ - public $trait; + public ?Node\Name $trait; /** @var Node\Identifier Method name */ - public $method; + public Node\Identifier $method; } diff --git a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php index 817cbc613f..395aec1d83 100644 --- a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +++ b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php @@ -6,9 +6,9 @@ class Alias extends Node\Stmt\TraitUseAdaptation { /** @var null|int New modifier */ - public $newModifier; + public ?int $newModifier; /** @var null|Node\Identifier New name */ - public $newName; + public ?Node\Identifier $newName; /** * Constructs a trait use precedence adaptation node. diff --git a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php index 7026150e3f..0daf86d4a1 100644 --- a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +++ b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php @@ -6,7 +6,7 @@ class Precedence extends Node\Stmt\TraitUseAdaptation { /** @var Node\Name[] Overwritten traits */ - public $insteadof; + public array $insteadof; /** * Constructs a trait use precedence adaptation node. diff --git a/lib/PhpParser/Node/Stmt/TryCatch.php b/lib/PhpParser/Node/Stmt/TryCatch.php index f051754893..02b7d3d230 100644 --- a/lib/PhpParser/Node/Stmt/TryCatch.php +++ b/lib/PhpParser/Node/Stmt/TryCatch.php @@ -6,11 +6,11 @@ class TryCatch extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Catch_[] Catches */ - public $catches; + public array $catches; /** @var null|Finally_ Optional finally node */ - public $finally; + public ?Finally_ $finally; /** * Constructs a try catch node. diff --git a/lib/PhpParser/Node/Stmt/Unset_.php b/lib/PhpParser/Node/Stmt/Unset_.php index 4da8036c56..d102c9006a 100644 --- a/lib/PhpParser/Node/Stmt/Unset_.php +++ b/lib/PhpParser/Node/Stmt/Unset_.php @@ -6,7 +6,7 @@ class Unset_ extends Node\Stmt { /** @var Node\Expr[] Variables to unset */ - public $vars; + public array $vars; /** * Constructs an unset node. diff --git a/lib/PhpParser/Node/Stmt/Use_.php b/lib/PhpParser/Node/Stmt/Use_.php index b95a58b2e2..4ef856808a 100644 --- a/lib/PhpParser/Node/Stmt/Use_.php +++ b/lib/PhpParser/Node/Stmt/Use_.php @@ -20,9 +20,9 @@ class Use_ extends Stmt { public const TYPE_CONSTANT = 3; /** @var int Type of alias */ - public $type; + public int $type; /** @var UseItem[] Aliases */ - public $uses; + public array $uses; /** * Constructs an alias (use) list node. diff --git a/lib/PhpParser/Node/Stmt/While_.php b/lib/PhpParser/Node/Stmt/While_.php index 7746abdf1a..1bb691884f 100644 --- a/lib/PhpParser/Node/Stmt/While_.php +++ b/lib/PhpParser/Node/Stmt/While_.php @@ -6,9 +6,9 @@ class While_ extends Node\Stmt { /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a while node. diff --git a/lib/PhpParser/Node/UseItem.php b/lib/PhpParser/Node/UseItem.php index c0b36e004a..fd102cb689 100644 --- a/lib/PhpParser/Node/UseItem.php +++ b/lib/PhpParser/Node/UseItem.php @@ -7,11 +7,11 @@ class UseItem extends Node\Stmt { /** @var int One of the Stmt\Use_::TYPE_* constants. Will only differ from TYPE_UNKNOWN for mixed group uses */ - public $type; + public int $type; /** @var Node\Name Namespace, class, function or constant to alias */ - public $name; + public Name $name; /** @var Identifier|null Alias */ - public $alias; + public ?Identifier $alias; /** * Constructs an alias (use) item node. diff --git a/lib/PhpParser/NodeAbstract.php b/lib/PhpParser/NodeAbstract.php index 1d3bf26b2b..7c3a36075c 100644 --- a/lib/PhpParser/NodeAbstract.php +++ b/lib/PhpParser/NodeAbstract.php @@ -4,7 +4,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable { /** @var array Attributes */ - protected $attributes; + protected array $attributes; /** * Creates a Node. diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index a83dc2936e..46fa64b9d7 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -9,11 +9,11 @@ class NodeDumper { /** @var bool */ - private $dumpComments; + private bool $dumpComments; /** @var bool */ - private $dumpPositions; + private bool $dumpPositions; /** @var string|null */ - private $code; + private ?string $code; /** * Constructs a NodeDumper. diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index edba55703f..a3652d8aa9 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -24,10 +24,10 @@ class NodeTraverser implements NodeTraverserInterface { public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN; /** @var list Visitors */ - protected $visitors = []; + protected array $visitors = []; /** @var bool Whether traversal should be stopped */ - protected $stopTraversal; + protected bool $stopTraversal; /** * Create a traverser with the given visitors. diff --git a/lib/PhpParser/NodeVisitor/FindingVisitor.php b/lib/PhpParser/NodeVisitor/FindingVisitor.php index db137f2fec..1f3f4bae88 100644 --- a/lib/PhpParser/NodeVisitor/FindingVisitor.php +++ b/lib/PhpParser/NodeVisitor/FindingVisitor.php @@ -13,7 +13,7 @@ class FindingVisitor extends NodeVisitorAbstract { /** @var callable Filter callback */ protected $filterCallback; /** @var Node[] Found nodes */ - protected $foundNodes; + protected array $foundNodes; public function __construct(callable $filterCallback) { $this->filterCallback = $filterCallback; diff --git a/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php index 14731556c1..05deed597a 100644 --- a/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ b/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php @@ -14,7 +14,7 @@ class FirstFindingVisitor extends NodeVisitorAbstract { /** @var callable Filter callback */ protected $filterCallback; /** @var null|Node Found node */ - protected $foundNode; + protected ?Node $foundNode; public function __construct(callable $filterCallback) { $this->filterCallback = $filterCallback; diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index e2db5d4457..160d0cbb4c 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -13,13 +13,13 @@ class NameResolver extends NodeVisitorAbstract { /** @var NameContext Naming context */ - protected $nameContext; + protected NameContext $nameContext; /** @var bool Whether to preserve original names */ - protected $preserveOriginalNames; + protected bool $preserveOriginalNames; /** @var bool Whether to replace resolved nodes in place, or to add resolvedNode attributes */ - protected $replaceNodes; + protected bool $replaceNodes; /** * Constructs a name resolution visitor. @@ -77,6 +77,8 @@ public function enterNode(Node $node) { $this->resolveAttrGroups($node); if (null !== $node->name) { $this->addNamespacedName($node); + } else { + $node->namespacedName = null; } } elseif ($node instanceof Stmt\Interface_) { foreach ($node->extends as &$interface) { @@ -91,9 +93,7 @@ public function enterNode(Node $node) { } $this->resolveAttrGroups($node); - if (null !== $node->name) { - $this->addNamespacedName($node); - } + $this->addNamespacedName($node); } elseif ($node instanceof Stmt\Trait_) { $this->resolveAttrGroups($node); $this->addNamespacedName($node); diff --git a/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php index 6ccc9f085a..38fedfd506 100644 --- a/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +++ b/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php @@ -18,7 +18,7 @@ final class NodeConnectingVisitor extends NodeVisitorAbstract { /** * @var Node[] */ - private $stack = []; + private array $stack = []; /** * @var ?Node diff --git a/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php index c890094d2d..1e7e9e8be5 100644 --- a/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +++ b/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php @@ -18,7 +18,7 @@ final class ParentConnectingVisitor extends NodeVisitorAbstract { /** * @var Node[] */ - private $stack = []; + private array $stack = []; public function beforeTraverse(array $nodes) { $this->stack = []; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 2c462c3274..c39c52f79f 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -159,19 +159,19 @@ class Php7 extends \PhpParser\ParserAbstract public const T_NAME_RELATIVE = 394; public const T_ATTRIBUTE = 395; - protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1260; - protected $gotoTableSize = 612; + protected int $tokenToSymbolMapSize = 396; + protected int $actionTableSize = 1260; + protected int $gotoTableSize = 612; - protected $invalidSymbol = 168; - protected $errorSymbol = 1; - protected $defaultAction = -32766; - protected $unexpectedTokenRule = 32767; + protected int $invalidSymbol = 168; + protected int $errorSymbol = 1; + protected int $defaultAction = -32766; + protected int $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 434; - protected $numNonLeafStates = 739; + protected int $YY2TBLSTATE = 434; + protected int $numNonLeafStates = 739; - protected $symbolToName = array( + protected array $symbolToName = array( "EOF", "error", "T_THROW", @@ -342,7 +342,7 @@ class Php7 extends \PhpParser\ParserAbstract "'$'" ); - protected $tokenToSymbol = array( + protected array $tokenToSymbol = array( 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, @@ -385,7 +385,7 @@ class Php7 extends \PhpParser\ParserAbstract 153, 154, 155, 156, 157, 158 ); - protected $action = array( + protected array $action = array( 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, 138, 38,-32766,-32766,-32766, 151,-32766,-32766,-32766,-32767, -32767,-32767,-32767, 102, 103, 104, 105, 106, 1111, 1112, @@ -514,7 +514,7 @@ class Php7 extends \PhpParser\ParserAbstract 1303, 1292, 1310, 1319, 0, 1206, 0, 1270, 0, 326 ); - protected $actionCheck = array( + protected array $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 9, 10, 11, 14, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, @@ -643,7 +643,7 @@ class Php7 extends \PhpParser\ParserAbstract 164, 164, 164, 164, -1, 165, -1, 166, -1, 167 ); - protected $actionBase = array( + protected array $actionBase = array( 0, -2, 152, 549, 764, 941, 981, 751, 617, 310, 123, 877, 556, 671, 671, 738, 671, 472, 626, 789, 63, 305, 305, 789, 305, 493, 493, 493, 658, 658, @@ -764,7 +764,7 @@ class Php7 extends \PhpParser\ParserAbstract 0, 813, 809 ); - protected $actionDefault = array( + protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767, 100,32767,32767,32767,32767, 596, 596, @@ -841,7 +841,7 @@ class Php7 extends \PhpParser\ParserAbstract 279, 184, 261, 264, 246, 246, 152, 351, 152 ); - protected $goto = array( + protected array $goto = array( 196, 196, 1033, 1064, 697, 430, 661, 621, 658, 319, 706, 424, 313, 314, 335, 576, 429, 336, 431, 638, 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, @@ -906,7 +906,7 @@ class Php7 extends \PhpParser\ParserAbstract 275, 324 ); - protected $gotoCheck = array( + protected array $gotoCheck = array( 42, 42, 72, 126, 72, 65, 65, 55, 55, 65, 9, 65, 65, 65, 65, 65, 65, 65, 65, 65, 85, 85, 26, 85, 85, 85, 27, 42, 42, 42, @@ -971,7 +971,7 @@ class Php7 extends \PhpParser\ParserAbstract 24, 24 ); - protected $gotoBase = array( + protected array $gotoBase = array( 0, 0, -254, 0, 0, 313, 188, 522, 178, -10, 0, 0, -73, -109, 13, -184, 26, -169, 92, 195, 95, 0, -77, 162, 344, 459, 18, 22, 102, 61, @@ -993,7 +993,7 @@ class Php7 extends \PhpParser\ParserAbstract -31, 5, 0, 0 ); - protected $gotoDefault = array( + protected array $gotoDefault = array( -32768, 511, 740, 4, 741, 934, 816, 825, 597, 529, 707, 347, 625, 421, 1302, 911, 1121, 578, 844, 1245, 1253, 456, 847, 330, 730, 893, 894, 895, 399, 385, @@ -1015,7 +1015,7 @@ class Php7 extends \PhpParser\ParserAbstract 1338, 342, 575, 613 ); - protected $ruleToNonTerminal = array( + protected array $ruleToNonTerminal = array( 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, @@ -1080,7 +1080,7 @@ class Php7 extends \PhpParser\ParserAbstract 180, 183, 183, 183, 183 ); - protected $ruleToLength = array( + protected array $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, diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 9fa14fbeb8..507ae070ad 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -159,19 +159,19 @@ class Php8 extends \PhpParser\ParserAbstract public const T_NAME_RELATIVE = 394; public const T_ATTRIBUTE = 395; - protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1260; - protected $gotoTableSize = 656; + protected int $tokenToSymbolMapSize = 396; + protected int $actionTableSize = 1260; + protected int $gotoTableSize = 656; - protected $invalidSymbol = 168; - protected $errorSymbol = 1; - protected $defaultAction = -32766; - protected $unexpectedTokenRule = 32767; + protected int $invalidSymbol = 168; + protected int $errorSymbol = 1; + protected int $defaultAction = -32766; + protected int $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 434; - protected $numNonLeafStates = 739; + protected int $YY2TBLSTATE = 434; + protected int $numNonLeafStates = 739; - protected $symbolToName = array( + protected array $symbolToName = array( "EOF", "error", "T_THROW", @@ -342,7 +342,7 @@ class Php8 extends \PhpParser\ParserAbstract "'$'" ); - protected $tokenToSymbol = array( + protected array $tokenToSymbol = array( 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, @@ -385,7 +385,7 @@ class Php8 extends \PhpParser\ParserAbstract 153, 154, 155, 156, 157, 158 ); - protected $action = array( + protected array $action = array( 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, 138, 38, 327,-32766,-32766,-32766,-32766,-32766,-32766, 837, 826,-32767,-32767,-32767,-32767, 102, 103, 104, 1111, 1112, @@ -514,7 +514,7 @@ class Php8 extends \PhpParser\ParserAbstract 1303, 1292, 1310, 1319, 0, 1206, 0, 1270, 0, 326 ); - protected $actionCheck = array( + protected array $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 70, 9, 10, 11, 9, 10, 11, 1, 80, 44, 45, 46, 47, 48, 49, 50, 116, 117, @@ -643,7 +643,7 @@ class Php8 extends \PhpParser\ParserAbstract 164, 164, 164, 164, -1, 165, -1, 166, -1, 167 ); - protected $actionBase = array( + protected array $actionBase = array( 0, -2, 152, 549, 764, 941, 981, 751, 555, 309, 560, 864, 626, 738, 738, 741, 738, 473, 671, 783, -60, 305, 305, 783, 305, 803, 803, 803, 658, 658, @@ -764,7 +764,7 @@ class Php8 extends \PhpParser\ParserAbstract 0, 779, 743 ); - protected $actionDefault = array( + protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767, 100,32767,32767,32767,32767, 596, 596, @@ -841,7 +841,7 @@ class Php8 extends \PhpParser\ParserAbstract 279, 184, 261, 264, 246, 246, 152, 351, 152 ); - protected $goto = array( + protected array $goto = array( 196, 196, 1033, 1064, 697, 430, 661, 621, 658, 319, 706, 424, 314, 315, 335, 576, 429, 336, 431, 638, 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, @@ -910,7 +910,7 @@ class Php8 extends \PhpParser\ParserAbstract 0, 0, 0, 0, 1012, 1012 ); - protected $gotoCheck = array( + protected array $gotoCheck = array( 42, 42, 72, 126, 72, 65, 65, 55, 55, 65, 9, 65, 65, 65, 65, 65, 65, 65, 65, 65, 85, 85, 26, 85, 85, 85, 27, 42, 42, 42, @@ -979,7 +979,7 @@ class Php8 extends \PhpParser\ParserAbstract -1, -1, -1, -1, 106, 106 ); - protected $gotoBase = array( + protected array $gotoBase = array( 0, 0, -183, 0, 0, 313, 188, 543, 178, -10, 0, 0, -27, -80, 13, -184, 26, -168, 114, 83, 97, 0, 6, 162, 219, 447, 18, 22, 115, 94, @@ -1001,7 +1001,7 @@ class Php8 extends \PhpParser\ParserAbstract 61, -105, 0, 0 ); - protected $gotoDefault = array( + protected array $gotoDefault = array( -32768, 511, 740, 4, 741, 934, 816, 825, 597, 529, 707, 347, 625, 421, 1302, 911, 1121, 578, 844, 1245, 1253, 456, 847, 330, 730, 893, 894, 895, 399, 385, @@ -1023,7 +1023,7 @@ class Php8 extends \PhpParser\ParserAbstract 1338, 342, 575, 613 ); - protected $ruleToNonTerminal = array( + protected array $ruleToNonTerminal = array( 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, @@ -1088,7 +1088,7 @@ class Php8 extends \PhpParser\ParserAbstract 180, 183, 183, 183, 183 ); - protected $ruleToLength = array( + protected array $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, diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index e645496c0a..6275ab0d48 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -35,77 +35,77 @@ abstract class ParserAbstract implements Parser { private const SYMBOL_NONE = -1; /** @var Lexer Lexer that is used when parsing */ - protected $lexer; + protected Lexer $lexer; /** @var PhpVersion PHP version to target on a best-effort basis */ - protected $phpVersion; + protected PhpVersion $phpVersion; /* * The following members will be filled with generated parsing data: */ /** @var int Size of $tokenToSymbol map */ - protected $tokenToSymbolMapSize; + protected int $tokenToSymbolMapSize; /** @var int Size of $action table */ - protected $actionTableSize; + protected int $actionTableSize; /** @var int Size of $goto table */ - protected $gotoTableSize; + protected int $gotoTableSize; /** @var int Symbol number signifying an invalid token */ - protected $invalidSymbol; + protected int $invalidSymbol; /** @var int Symbol number of error recovery token */ - protected $errorSymbol; + protected int $errorSymbol; /** @var int Action number signifying default action */ - protected $defaultAction; + protected int $defaultAction; /** @var int Rule number signifying that an unexpected token was encountered */ - protected $unexpectedTokenRule; + protected int $unexpectedTokenRule; /** @var int */ - protected $YY2TBLSTATE; + protected int $YY2TBLSTATE; /** @var int Number of non-leaf states */ - protected $numNonLeafStates; + protected int $numNonLeafStates; /** @var int[] Map of PHP token IDs to internal symbols */ - protected $phpTokenToSymbol; + protected array $phpTokenToSymbol; /** @var array Map of PHP token IDs to drop */ - protected $dropTokens; + protected array $dropTokens; /** @var int[] Map of external symbols (static::T_*) to internal symbols */ - protected $tokenToSymbol; + protected array $tokenToSymbol; /** @var string[] Map of symbols to their names */ - protected $symbolToName; + protected array $symbolToName; /** @var array Names of the production rules (only necessary for debugging) */ - protected $productions; + protected array $productions; /** @var int[] 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; + protected array $actionBase; /** @var int[] Table of actions. Indexed according to $actionBase comment. */ - protected $action; + protected array $action; /** @var int[] 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; + protected array $actionCheck; /** @var int[] Map of states to their default action */ - protected $actionDefault; + protected array $actionDefault; /** @var callable[] Semantic action callbacks */ - protected $reduceCallbacks; + protected array $reduceCallbacks; /** @var int[] 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; + protected array $gotoBase; /** @var int[] Table of states to goto after reduction. Indexed according to $gotoBase comment. */ - protected $goto; + protected array $goto; /** @var int[] 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; + protected array $gotoCheck; /** @var int[] Map of non-terminals to the default state to goto after their reduction */ - protected $gotoDefault; + protected array $gotoDefault; /** @var int[] 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; + protected array $ruleToNonTerminal; /** @var int[] 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; + protected array $ruleToLength; /* * The following members are part of the parser state: @@ -114,24 +114,24 @@ abstract class ParserAbstract implements Parser { /** @var mixed Temporary value containing the result of last semantic action (reduction) */ protected $semValue; /** @var mixed[] Semantic value stack (contains values of tokens and semantic action results) */ - protected $semStack; + protected array $semStack; /** @var int[] Token start position stack */ - protected $tokenStartStack; + protected array $tokenStartStack; /** @var int[] Token end position stack */ - protected $tokenEndStack; + protected array $tokenEndStack; /** @var ErrorHandler Error handler */ - protected $errorHandler; + protected ErrorHandler $errorHandler; /** @var int Error state, used to avoid error floods */ - protected $errorState; + protected int $errorState; /** @var \SplObjectStorage|null Array nodes created during parsing, for postprocessing of empty elements. */ protected $createdArrays; /** @var Token[] Tokens for the current parse */ - protected $tokens; + protected array $tokens; /** @var int Current position in token array */ - protected $tokenPos; + protected int $tokenPos; /** * Initialize $reduceCallbacks map. diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index 9dd168162f..745759c28f 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -7,7 +7,7 @@ */ class PhpVersion { /** @var int Version ID in PHP_VERSION_ID format */ - public $id; + public int $id; /** @var int[] Minimum versions for builtin types */ private const BUILTIN_TYPE_VERSIONS = [ diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 3eb03db03c..ae52e7e8ea 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -32,7 +32,7 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { protected const MAX_PRECEDENCE = 1000; /** @var array */ - protected $precedenceMap = [ + protected array $precedenceMap = [ // [precedence, precedenceLHS, precedenceRHS] // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, // where 1 is added to one of the sides depending on associativity. This information is not @@ -103,59 +103,59 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { ]; /** @var int Current indentation level. */ - protected $indentLevel; + protected int $indentLevel; /** @var string Newline style. Does not include current indentation. */ - protected $newline; + protected string $newline; /** @var string Newline including current indentation. */ - protected $nl; + protected string $nl; /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. * Null if flexible doc strings are used. */ - protected $docStringEndToken; + protected ?string $docStringEndToken; /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ - protected $canUseSemicolonNamespaces; + protected bool $canUseSemicolonNamespaces; /** @var bool Whether to use short array syntax if the node specifies no preference */ - protected $shortArraySyntax; + protected bool $shortArraySyntax; /** @var PhpVersion PHP version to target */ - protected $phpVersion; + protected PhpVersion $phpVersion; /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ - protected $origTokens; + protected ?TokenStream $origTokens; /** @var Internal\Differ|null Differ for node lists */ protected $nodeListDiffer; /** @var array Map determining whether a certain character is a label character */ - protected $labelCharMap; + protected array $labelCharMap; /** * @var array> Map from token classes and subnode names to FIXUP_* constants. * This is used during format-preserving prints to place additional parens/braces if necessary. */ - protected $fixupMap; + protected array $fixupMap; /** * @var array Map from "{$node->getType()}->{$subNode}" * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped * when removing this node. */ - protected $removalMap; + protected array $removalMap; /** * @var array Map from * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. * $find is an optional token after which the insertion occurs. $extraLeft/Right * are optionally added before/after the main insertions. */ - protected $insertionMap; + protected array $insertionMap; /** * @var array Map From "{$class}->{$subNode}" to string that should be inserted * between elements of this list subnode. */ - protected $listInsertionMap; + protected array $listInsertionMap; /** * @var array */ - protected $emptyListInsertionMap; + protected array $emptyListInsertionMap; /** @var array Map from "{$class}->{$subNode}" to [$printFn, $token] * where $printFn is the function to print the modifiers and $token is the token before which * the modifiers should be reprinted. */ - protected $modifierChangeMap; + protected array $modifierChangeMap; /** * Creates a pretty printer instance using the given options. @@ -1252,7 +1252,7 @@ protected function isMultiline(array $nodes): bool { * The label char map determines whether a certain character may occur in a label. */ protected function initializeLabelCharMap(): void { - if ($this->labelCharMap) { + if (isset($this->labelCharMap)) { return; } @@ -1293,7 +1293,7 @@ protected function initializeNodeListDiffer(): void { * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. */ protected function initializeFixupMap(): void { - if ($this->fixupMap) { + if (isset($this->fixupMap)) { return; } @@ -1382,7 +1382,7 @@ protected function initializeFixupMap(): void { * certain node is replaced by null. */ protected function initializeRemovalMap(): void { - if ($this->removalMap) { + if (isset($this->removalMap)) { return; } @@ -1430,7 +1430,7 @@ protected function initializeRemovalMap(): void { } protected function initializeInsertionMap(): void { - if ($this->insertionMap) { + if (isset($this->insertionMap)) { return; } @@ -1475,7 +1475,7 @@ protected function initializeInsertionMap(): void { } protected function initializeListInsertionMap(): void { - if ($this->listInsertionMap) { + if (isset($this->listInsertionMap)) { return; } @@ -1573,7 +1573,7 @@ protected function initializeListInsertionMap(): void { } protected function initializeEmptyListInsertionMap(): void { - if ($this->emptyListInsertionMap) { + if (isset($this->emptyListInsertionMap)) { return; } @@ -1638,7 +1638,7 @@ protected function initializeEmptyListInsertionMap(): void { } protected function initializeModifierChangeMap(): void { - if ($this->modifierChangeMap) { + if (isset($this->modifierChangeMap)) { return; } diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index fe4526288a..aff388176a 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -343,7 +343,6 @@ function functionName(&$a = 0, $b = 1.0) { } ], "attrGroups": [], - "namespacedName": null, "attributes": { "startLine": 4, "startTokenPos": 5, @@ -539,8 +538,7 @@ function functionName(&$a = 0, $b = 1.0) { ] } ], - "attrGroups": [], - "namespacedName": null + "attrGroups": [] } ] JSON; From 9a68468fdad39eb72453a332717faf6f9ad7c943 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 16 Aug 2023 21:38:27 +0200 Subject: [PATCH 280/428] Update phpstan baseline --- phpstan-baseline.neon | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index c9574b0e98..5a9a14ec88 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -65,16 +65,6 @@ parameters: count: 1 path: lib/PhpParser/ConstExprEvaluator.php - - - message: "#^Method PhpParser\\\\Internal\\\\TokenPolyfill\\:\\:fixupBadCharacters\\(\\) has parameter \\$origTokens with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/PhpParser/Internal/TokenPolyfill.php - - - - message: "#^Method PhpParser\\\\Internal\\\\TokenPolyfill\\:\\:fixupBadCharacters\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: lib/PhpParser/Internal/TokenPolyfill.php - - message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) has parameter \\$array with no value type specified in iterable type array\\.$#" count: 1 @@ -100,11 +90,6 @@ parameters: count: 1 path: lib/PhpParser/Lexer/Emulative.php - - - message: "#^Unary operation \"\\+\" on string results in an error\\.$#" - count: 1 - path: lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php - - message: "#^Method PhpParser\\\\NodeDumper\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" count: 1 From ea77807592d50bb8f18f28023ee42de6646514f6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 17 Aug 2023 21:35:48 +0200 Subject: [PATCH 281/428] Add more property types Some of these are not maximally accurate due to lack of union types. --- lib/PhpParser/Builder/ClassConst.php | 4 ++-- lib/PhpParser/Builder/EnumCase.php | 2 +- lib/PhpParser/Builder/FunctionLike.php | 2 +- lib/PhpParser/Builder/Param.php | 2 +- lib/PhpParser/Builder/Property.php | 2 +- .../Internal/PrintableNewAnonClassNode.php | 2 +- lib/PhpParser/Node/Expr/ArrowFunction.php | 2 +- lib/PhpParser/Node/Expr/ClassConstFetch.php | 7 ++++--- lib/PhpParser/Node/Expr/Closure.php | 2 +- lib/PhpParser/Node/Expr/FuncCall.php | 10 +++++----- lib/PhpParser/Node/Expr/Instanceof_.php | 9 +++++---- lib/PhpParser/Node/Expr/List_.php | 2 +- lib/PhpParser/Node/Expr/MethodCall.php | 11 ++++++----- lib/PhpParser/Node/Expr/New_.php | 10 +++++----- lib/PhpParser/Node/Expr/NullsafeMethodCall.php | 11 ++++++----- .../Node/Expr/NullsafePropertyFetch.php | 7 ++++--- lib/PhpParser/Node/Expr/PropertyFetch.php | 7 ++++--- lib/PhpParser/Node/Expr/ShellExec.php | 2 +- lib/PhpParser/Node/Expr/StaticCall.php | 14 +++++++------- lib/PhpParser/Node/Expr/StaticPropertyFetch.php | 11 ++++++----- lib/PhpParser/Node/IntersectionType.php | 2 +- lib/PhpParser/Node/NullableType.php | 2 +- lib/PhpParser/Node/Param.php | 16 ++++++++-------- lib/PhpParser/Node/Scalar/InterpolatedString.php | 2 +- lib/PhpParser/Node/Stmt/ClassConst.php | 2 +- lib/PhpParser/Node/Stmt/ClassMethod.php | 2 +- lib/PhpParser/Node/Stmt/Enum_.php | 2 +- lib/PhpParser/Node/Stmt/Function_.php | 2 +- lib/PhpParser/Node/Stmt/Property.php | 8 ++++---- lib/PhpParser/Node/UnionType.php | 2 +- lib/PhpParser/ParserAbstract.php | 2 +- lib/PhpParser/PrettyPrinterAbstract.php | 7 ++++--- test/PhpParser/Builder/FunctionTest.php | 2 +- test/PhpParser/Builder/MethodTest.php | 2 +- 34 files changed, 90 insertions(+), 82 deletions(-) diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index 452dc423d4..eee957f420 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -22,8 +22,8 @@ class ClassConst implements PhpParser\Builder { /** @var list */ protected array $attributeGroups = []; - /** @var Identifier|Node\Name|Node\ComplexType */ - protected $type; + /** @var Identifier|Node\Name|Node\ComplexType|null */ + protected ?Node $type = null; /** * Creates a class constant builder diff --git a/lib/PhpParser/Builder/EnumCase.php b/lib/PhpParser/Builder/EnumCase.php index 80846ec38c..acecdbe26f 100644 --- a/lib/PhpParser/Builder/EnumCase.php +++ b/lib/PhpParser/Builder/EnumCase.php @@ -14,7 +14,7 @@ class EnumCase implements PhpParser\Builder { /** @var Identifier|string */ protected $name; /** @var ?Node\Expr */ - protected $value = null; + protected ?Node\Expr $value = null; /** @var array */ protected array $attributes = []; diff --git a/lib/PhpParser/Builder/FunctionLike.php b/lib/PhpParser/Builder/FunctionLike.php index 4027f5ea7f..a8752814e0 100644 --- a/lib/PhpParser/Builder/FunctionLike.php +++ b/lib/PhpParser/Builder/FunctionLike.php @@ -12,7 +12,7 @@ abstract class FunctionLike extends Declaration { protected array $params = []; /** @var Node\Identifier|Node\Name|Node\ComplexType|null */ - protected $returnType = null; + protected ?Node $returnType = null; /** * Make the function return by reference. diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index 29769e4d1d..fcfe3c39fb 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -13,7 +13,7 @@ class Param implements PhpParser\Builder { /** @var Node\Expr|null */ protected ?Node\Expr $default = null; /** @var Node\Identifier|Node\Name|Node\ComplexType|null */ - protected $type = null; + protected ?Node $type = null; /** @var bool */ protected bool $byRef = false; /** @var int */ diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 39110eaebc..16f5eab10a 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -21,7 +21,7 @@ class Property implements PhpParser\Builder { /** @var array */ protected array $attributes = []; /** @var null|Identifier|Name|ComplexType */ - protected $type; + protected ?Node $type = null; /** @var list */ protected array $attributeGroups = []; diff --git a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index 89378d519f..b30a99a14b 100644 --- a/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -21,7 +21,7 @@ class PrintableNewAnonClassNode extends Expr { /** @var int Modifiers */ public int $flags; /** @var (Node\Arg|Node\VariadicPlaceholder)[] Arguments */ - public $args; + public array $args; /** @var null|Node\Name Name of extended class */ public ?Node\Name $extends; /** @var Node\Name[] Names of implemented interfaces */ diff --git a/lib/PhpParser/Node/Expr/ArrowFunction.php b/lib/PhpParser/Node/Expr/ArrowFunction.php index e0452d2625..f304a33ab3 100644 --- a/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -17,7 +17,7 @@ class ArrowFunction extends Expr implements FunctionLike { public array $params = []; /** @var null|Node\Identifier|Node\Name|Node\ComplexType */ - public $returnType; + public ?Node $returnType; /** @var Expr */ public Expr $expr; diff --git a/lib/PhpParser/Node/Expr/ClassConstFetch.php b/lib/PhpParser/Node/Expr/ClassConstFetch.php index 9b107c3975..7fdd40e411 100644 --- a/lib/PhpParser/Node/Expr/ClassConstFetch.php +++ b/lib/PhpParser/Node/Expr/ClassConstFetch.php @@ -2,15 +2,16 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\Name; class ClassConstFetch extends Expr { /** @var Name|Expr Class name */ - public $class; + public Node $class; /** @var Identifier|Expr|Error Constant name */ - public $name; + public Node $name; /** * Constructs a class const fetch node. @@ -19,7 +20,7 @@ class ClassConstFetch extends Expr { * @param string|Identifier|Expr|Error $name Constant name * @param array $attributes Additional attributes */ - public function __construct($class, $name, array $attributes = []) { + public function __construct(Node $class, $name, array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; diff --git a/lib/PhpParser/Node/Expr/Closure.php b/lib/PhpParser/Node/Expr/Closure.php index fb91b3cae8..0680446f34 100644 --- a/lib/PhpParser/Node/Expr/Closure.php +++ b/lib/PhpParser/Node/Expr/Closure.php @@ -17,7 +17,7 @@ class Closure extends Expr implements FunctionLike { /** @var ClosureUse[] use()s */ public array $uses; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ - public $returnType; + public ?Node $returnType; /** @var Node\Stmt[] Statements */ public array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ diff --git a/lib/PhpParser/Node/Expr/FuncCall.php b/lib/PhpParser/Node/Expr/FuncCall.php index c2f09760a4..0b85840d8e 100644 --- a/lib/PhpParser/Node/Expr/FuncCall.php +++ b/lib/PhpParser/Node/Expr/FuncCall.php @@ -7,18 +7,18 @@ class FuncCall extends CallLike { /** @var Node\Name|Expr Function name */ - public $name; + public Node $name; /** @var array Arguments */ - public $args; + public array $args; /** * Constructs a function call node. * - * @param Node\Name|Expr $name Function name - * @param array $args Arguments + * @param Node\Name|Expr $name Function name + * @param array $args Arguments * @param array $attributes Additional attributes */ - public function __construct($name, array $args = [], array $attributes = []) { + public function __construct(Node $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->name = $name; $this->args = $args; diff --git a/lib/PhpParser/Node/Expr/Instanceof_.php b/lib/PhpParser/Node/Expr/Instanceof_.php index 016842bb03..a2783cb3af 100644 --- a/lib/PhpParser/Node/Expr/Instanceof_.php +++ b/lib/PhpParser/Node/Expr/Instanceof_.php @@ -2,6 +2,7 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; @@ -9,16 +10,16 @@ class Instanceof_ extends Expr { /** @var Expr Expression */ public Expr $expr; /** @var Name|Expr Class name */ - public $class; + public Node $class; /** * Constructs an instanceof check node. * - * @param Expr $expr Expression - * @param Name|Expr $class Class name + * @param Expr $expr Expression + * @param Name|Expr $class Class name * @param array $attributes Additional attributes */ - public function __construct(Expr $expr, $class, array $attributes = []) { + public function __construct(Expr $expr, Node $class, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; $this->class = $class; diff --git a/lib/PhpParser/Node/Expr/List_.php b/lib/PhpParser/Node/Expr/List_.php index f988a465ae..dd0e596563 100644 --- a/lib/PhpParser/Node/Expr/List_.php +++ b/lib/PhpParser/Node/Expr/List_.php @@ -11,7 +11,7 @@ class List_ extends Expr { public const KIND_ARRAY = 2; // [] syntax /** @var (ArrayItem|null)[] List of items to assign to */ - public $items; + public array $items; /** * Constructs a list() destructuring node. diff --git a/lib/PhpParser/Node/Expr/MethodCall.php b/lib/PhpParser/Node/Expr/MethodCall.php index 82a696cb13..2703c75d88 100644 --- a/lib/PhpParser/Node/Expr/MethodCall.php +++ b/lib/PhpParser/Node/Expr/MethodCall.php @@ -2,6 +2,7 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; @@ -11,16 +12,16 @@ class MethodCall extends CallLike { /** @var Expr Variable holding object */ public Expr $var; /** @var Identifier|Expr Method name */ - public $name; + public Node $name; /** @var array Arguments */ - public $args; + public array $args; /** * Constructs a function call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/New_.php b/lib/PhpParser/Node/Expr/New_.php index e3ebc0be0f..eedaaa1e3b 100644 --- a/lib/PhpParser/Node/Expr/New_.php +++ b/lib/PhpParser/Node/Expr/New_.php @@ -9,18 +9,18 @@ class New_ extends CallLike { /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */ - public $class; + public Node $class; /** @var array Arguments */ - public $args; + public array $args; /** * Constructs a function call node. * - * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) - * @param array $args Arguments + * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) + * @param array $args Arguments * @param array $attributes Additional attributes */ - public function __construct($class, array $args = [], array $attributes = []) { + public function __construct(Node $class, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->args = $args; diff --git a/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/lib/PhpParser/Node/Expr/NullsafeMethodCall.php index fc4093edd9..a151f71528 100644 --- a/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +++ b/lib/PhpParser/Node/Expr/NullsafeMethodCall.php @@ -2,6 +2,7 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; @@ -11,16 +12,16 @@ class NullsafeMethodCall extends CallLike { /** @var Expr Variable holding object */ public Expr $var; /** @var Identifier|Expr Method name */ - public $name; + public Node $name; /** @var array Arguments */ - public $args; + public array $args; /** * Constructs a nullsafe method call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php index 8120f2350b..6f73a16d76 100644 --- a/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +++ b/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php @@ -2,6 +2,7 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; @@ -9,13 +10,13 @@ class NullsafePropertyFetch extends Expr { /** @var Expr Variable holding object */ public Expr $var; /** @var Identifier|Expr Property name */ - public $name; + public Node $name; /** * Constructs a nullsafe property fetch node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Property name + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Property name * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/PropertyFetch.php b/lib/PhpParser/Node/Expr/PropertyFetch.php index 2bb084fc97..8c416a8c40 100644 --- a/lib/PhpParser/Node/Expr/PropertyFetch.php +++ b/lib/PhpParser/Node/Expr/PropertyFetch.php @@ -2,6 +2,7 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; @@ -9,13 +10,13 @@ class PropertyFetch extends Expr { /** @var Expr Variable holding object */ public Expr $var; /** @var Identifier|Expr Property name */ - public $name; + public Node $name; /** * Constructs a function call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Property name + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Property name * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/ShellExec.php b/lib/PhpParser/Node/Expr/ShellExec.php index 5fe85d7168..e400351277 100644 --- a/lib/PhpParser/Node/Expr/ShellExec.php +++ b/lib/PhpParser/Node/Expr/ShellExec.php @@ -7,7 +7,7 @@ class ShellExec extends Expr { /** @var (Expr|InterpolatedStringPart)[] Interpolated string array */ - public $parts; + public array $parts; /** * Constructs a shell exec (backtick) node. diff --git a/lib/PhpParser/Node/Expr/StaticCall.php b/lib/PhpParser/Node/Expr/StaticCall.php index ef2006a4ae..707f34b669 100644 --- a/lib/PhpParser/Node/Expr/StaticCall.php +++ b/lib/PhpParser/Node/Expr/StaticCall.php @@ -10,21 +10,21 @@ class StaticCall extends CallLike { /** @var Node\Name|Expr Class name */ - public $class; + public Node $class; /** @var Identifier|Expr Method name */ - public $name; + public Node $name; /** @var array Arguments */ - public $args; + public array $args; /** * Constructs a static method call node. * - * @param Node\Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array $args Arguments + * @param Node\Name|Expr $class Class name + * @param string|Identifier|Expr $name Method name + * @param array $args Arguments * @param array $attributes Additional attributes */ - public function __construct($class, $name, array $args = [], array $attributes = []) { + public function __construct(Node $class, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; diff --git a/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/lib/PhpParser/Node/Expr/StaticPropertyFetch.php index d187917ba3..4836a65b23 100644 --- a/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +++ b/lib/PhpParser/Node/Expr/StaticPropertyFetch.php @@ -2,24 +2,25 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; use PhpParser\Node\VarLikeIdentifier; class StaticPropertyFetch extends Expr { /** @var Name|Expr Class name */ - public $class; + public Node $class; /** @var VarLikeIdentifier|Expr Property name */ - public $name; + public Node $name; /** * Constructs a static property fetch node. * - * @param Name|Expr $class Class name - * @param string|VarLikeIdentifier|Expr $name Property name + * @param Name|Expr $class Class name + * @param string|VarLikeIdentifier|Expr $name Property name * @param array $attributes Additional attributes */ - public function __construct($class, $name, array $attributes = []) { + public function __construct(Node $class, $name, array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; diff --git a/lib/PhpParser/Node/IntersectionType.php b/lib/PhpParser/Node/IntersectionType.php index 1562544610..b4783d0dc8 100644 --- a/lib/PhpParser/Node/IntersectionType.php +++ b/lib/PhpParser/Node/IntersectionType.php @@ -4,7 +4,7 @@ class IntersectionType extends ComplexType { /** @var (Identifier|Name)[] Types */ - public $types; + public array $types; /** * Constructs an intersection type. diff --git a/lib/PhpParser/Node/NullableType.php b/lib/PhpParser/Node/NullableType.php index 847b65734a..b99acd1351 100644 --- a/lib/PhpParser/Node/NullableType.php +++ b/lib/PhpParser/Node/NullableType.php @@ -6,7 +6,7 @@ class NullableType extends ComplexType { /** @var Identifier|Name Type */ - public $type; + public Node $type; /** * Constructs a nullable type (wrapping another type). diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index 517ee4b65e..3ea7547e6c 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -8,13 +8,13 @@ class Param extends NodeAbstract { /** @var null|Identifier|Name|ComplexType Type declaration */ - public $type; + public ?Node $type; /** @var bool Whether parameter is passed by reference */ public bool $byRef; /** @var bool Whether this is a variadic argument */ public bool $variadic; /** @var Expr\Variable|Expr\Error Parameter variable */ - public $var; + public Expr $var; /** @var null|Expr Default value */ public ?Expr $default; /** @var int */ @@ -25,17 +25,17 @@ class Param extends NodeAbstract { /** * Constructs a parameter node. * - * @param Expr\Variable|Expr\Error $var Parameter variable - * @param null|Expr $default Default value + * @param Expr\Variable|Expr\Error $var Parameter variable + * @param null|Expr $default Default value * @param null|Identifier|Name|ComplexType $type Type declaration - * @param bool $byRef Whether is passed by reference - * @param bool $variadic Whether this is a variadic argument + * @param bool $byRef Whether is passed by reference + * @param bool $variadic Whether this is a variadic argument * @param array $attributes Additional attributes - * @param int $flags Optional visibility flags + * @param int $flags Optional visibility flags * @param list $attrGroups PHP attribute groups */ public function __construct( - $var, ?Expr $default = null, ?Node $type = null, + Expr $var, ?Expr $default = null, ?Node $type = null, bool $byRef = false, bool $variadic = false, array $attributes = [], int $flags = 0, diff --git a/lib/PhpParser/Node/Scalar/InterpolatedString.php b/lib/PhpParser/Node/Scalar/InterpolatedString.php index 7d958993c4..88397bc402 100644 --- a/lib/PhpParser/Node/Scalar/InterpolatedString.php +++ b/lib/PhpParser/Node/Scalar/InterpolatedString.php @@ -8,7 +8,7 @@ class InterpolatedString extends Scalar { /** @var (Expr|InterpolatedStringPart)[] list of string parts */ - public $parts; + public array $parts; /** * Constructs an interpolated string node. diff --git a/lib/PhpParser/Node/Stmt/ClassConst.php b/lib/PhpParser/Node/Stmt/ClassConst.php index 525118dec6..87e7e39be7 100644 --- a/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/lib/PhpParser/Node/Stmt/ClassConst.php @@ -13,7 +13,7 @@ class ClassConst extends Node\Stmt { /** @var Node\AttributeGroup[] PHP attribute groups */ public array $attrGroups; /** @var Node\Identifier|Node\Name|Node\ComplexType|null Type declaration */ - public $type; + public ?Node $type; /** * Constructs a class const list node. diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index 65c3ab08ca..a7f9088903 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -16,7 +16,7 @@ class ClassMethod extends Node\Stmt implements FunctionLike { /** @var Node\Param[] Parameters */ public array $params; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ - public $returnType; + public ?Node $returnType; /** @var Node\Stmt[]|null Statements */ public ?array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ diff --git a/lib/PhpParser/Node/Stmt/Enum_.php b/lib/PhpParser/Node/Stmt/Enum_.php index ca87aeb18d..7eea6a6991 100644 --- a/lib/PhpParser/Node/Stmt/Enum_.php +++ b/lib/PhpParser/Node/Stmt/Enum_.php @@ -6,7 +6,7 @@ class Enum_ extends ClassLike { /** @var null|Node\Identifier Scalar Type */ - public $scalarType; + public ?Node $scalarType; /** @var Node\Name[] Names of implemented interfaces */ public array $implements; diff --git a/lib/PhpParser/Node/Stmt/Function_.php b/lib/PhpParser/Node/Stmt/Function_.php index d508d59348..2111bab749 100644 --- a/lib/PhpParser/Node/Stmt/Function_.php +++ b/lib/PhpParser/Node/Stmt/Function_.php @@ -13,7 +13,7 @@ class Function_ extends Node\Stmt implements FunctionLike { /** @var Node\Param[] Parameters */ public array $params; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ - public $returnType; + public ?Node $returnType; /** @var Node\Stmt[] Statements */ public array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index 9ab40b5d2b..5e76cb7d41 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -15,18 +15,18 @@ class Property extends Node\Stmt { /** @var PropertyItem[] Properties */ public array $props; /** @var null|Identifier|Name|ComplexType Type declaration */ - public $type; + public ?Node $type; /** @var Node\AttributeGroup[] PHP attribute groups */ public array $attrGroups; /** * Constructs a class property list node. * - * @param int $flags Modifiers - * @param PropertyItem[] $props Properties + * @param int $flags Modifiers + * @param PropertyItem[] $props Properties * @param array $attributes Additional attributes * @param null|Identifier|Name|ComplexType $type Type declaration - * @param Node\AttributeGroup[] $attrGroups PHP attribute groups + * @param Node\AttributeGroup[] $attrGroups PHP attribute groups */ public function __construct(int $flags, array $props, array $attributes = [], ?Node $type = null, array $attrGroups = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/UnionType.php b/lib/PhpParser/Node/UnionType.php index a2abea889c..d418ee3c5c 100644 --- a/lib/PhpParser/Node/UnionType.php +++ b/lib/PhpParser/Node/UnionType.php @@ -4,7 +4,7 @@ class UnionType extends ComplexType { /** @var (Identifier|Name|IntersectionType)[] Types */ - public $types; + public array $types; /** * Constructs a union type. diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 6275ab0d48..6cfb98d253 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -126,7 +126,7 @@ abstract class ParserAbstract implements Parser { protected int $errorState; /** @var \SplObjectStorage|null Array nodes created during parsing, for postprocessing of empty elements. */ - protected $createdArrays; + protected ?\SplObjectStorage $createdArrays; /** @var Token[] Tokens for the current parse */ protected array $tokens; diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index ae52e7e8ea..444264205c 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -3,6 +3,7 @@ namespace PhpParser; use PhpParser\Internal\DiffElem; +use PhpParser\Internal\Differ; use PhpParser\Internal\PrintableNewAnonClassNode; use PhpParser\Internal\TokenStream; use PhpParser\Node\AttributeGroup; @@ -120,8 +121,8 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ protected ?TokenStream $origTokens; - /** @var Internal\Differ|null Differ for node lists */ - protected $nodeListDiffer; + /** @var Internal\Differ Differ for node lists */ + protected Differ $nodeListDiffer; /** @var array Map determining whether a certain character is a label character */ protected array $labelCharMap; /** @@ -1273,7 +1274,7 @@ protected function initializeLabelCharMap(): void { * The node list differ is used to determine differences between two array subnodes. */ protected function initializeNodeListDiffer(): void { - if ($this->nodeListDiffer) { + if (isset($this->nodeListDiffer)) { return; } diff --git a/test/PhpParser/Builder/FunctionTest.php b/test/PhpParser/Builder/FunctionTest.php index 0152b30ab9..2fdecf7f6f 100644 --- a/test/PhpParser/Builder/FunctionTest.php +++ b/test/PhpParser/Builder/FunctionTest.php @@ -108,7 +108,7 @@ public function testReturnType() { ->getNode(); $this->assertEquals(new Stmt\Function_('test', [ - 'returnType' => 'void' + 'returnType' => new Identifier('void'), ], []), $node); } diff --git a/test/PhpParser/Builder/MethodTest.php b/test/PhpParser/Builder/MethodTest.php index 6381aaacb3..807072d735 100644 --- a/test/PhpParser/Builder/MethodTest.php +++ b/test/PhpParser/Builder/MethodTest.php @@ -149,7 +149,7 @@ public function testReturnType() { ->setReturnType('bool') ->getNode(); $this->assertEquals(new Stmt\ClassMethod('test', [ - 'returnType' => 'bool' + 'returnType' => new Identifier('bool'), ], []), $node); } From efe93a171b64ea98ecf26349a123f0f53bee5b07 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 17 Aug 2023 21:40:48 +0200 Subject: [PATCH 282/428] Update PHP versions in workflow --- .github/workflows/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 50ca01e932..29f7839eff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,7 @@ jobs: run: "php vendor/bin/phpunit" test_old_73_80: runs-on: "ubuntu-latest" - name: "PHP 7.3 Code on PHP 8.0 Integration Tests" + name: "PHP 7.4 Code on PHP 8.2 Integration Tests" steps: - name: "Checkout" uses: "actions/checkout@v3" @@ -60,15 +60,15 @@ jobs: uses: "shivammathur/setup-php@v2" with: coverage: "none" - php-version: "8.0" + php-version: "8.2" tools: composer:v2 - name: "Install PHP 8 dependencies" run: "composer update --no-progress --prefer-dist" - name: "Tests" - run: "test_old/run-php-src.sh 7.3.21" + run: "test_old/run-php-src.sh 7.4.33" test_old_80_70: runs-on: "ubuntu-latest" - name: "PHP 8.2 Code on PHP 7.3 Integration Tests" + name: "PHP 8.2 Code on PHP 7.4 Integration Tests" steps: - name: "Checkout" uses: "actions/checkout@v3" @@ -76,7 +76,7 @@ jobs: uses: "shivammathur/setup-php@v2" with: coverage: "none" - php-version: "7.3" + php-version: "7.4" tools: composer:v2 - name: "Install PHP 8 dependencies" run: "composer update --no-progress --prefer-dist" From 8d58380108c26cee0b4681795562251f8b27cc39 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 27 Aug 2023 21:26:47 +0200 Subject: [PATCH 283/428] Default pretty printer to PHP 7.4 --- UPGRADE-5.0.md | 4 +-- lib/PhpParser/PrettyPrinterAbstract.php | 4 +-- test/PhpParser/PrettyPrinterTest.php | 33 ++++++++++--------- test/code/prettyPrinter/expr/docStrings.test | 20 +++++++---- .../prettyPrinter/expr/stringEscaping.test | 4 +-- 5 files changed, 36 insertions(+), 29 deletions(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index a8cf03860f..0e0142491c 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -198,12 +198,12 @@ else if ($x) { } ``` -The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defaults to PHP 7.1. The pretty printer will make formatting choices to make the code valid for that version. It currently controls the following behavior: +The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defaults to PHP 7.4. The pretty printer will make formatting choices to make the code valid for that version. It currently controls the following behavior: * For PHP >= 7.0 (default), short array syntax `[]` will be used by default. This does not affect nodes that specify an explicit array syntax using the `kind` attribute. * For PHP >= 7.0 (default), parentheses around `yield` expressions will only be printed when necessary. Previously, parentheses were always printed, even if `yield` was used as a statement. * For PHP >= 7.1 (default), the short array syntax `[]` will be used for destructuring by default (instead of `list()`). This does not affect nodes that specify and explicit syntax using the `kind` attribute. -* For PHP >= 7.3, a newline is no longer forced after heredoc/nowdoc strings, as the requirement for this has been removed with the introduction of flexible heredoc/nowdoc strings. +* For PHP >= 7.3 (default), a newline is no longer forced after heredoc/nowdoc strings, as the requirement for this has been removed with the introduction of flexible heredoc/nowdoc strings. ### Changes to precedence handling in the pretty printer diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 444264205c..39d36c39b6 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -162,7 +162,7 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { * Creates a pretty printer instance using the given options. * * Supported options: - * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.1). This option + * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.4). This option * controls compatibility of the generated code with older PHP * versions in cases where a simple stylistic choice exists (e.g. * array() vs []). It is safe to pretty-print an AST for a newer @@ -178,7 +178,7 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { * } $options Dictionary of formatting options */ public function __construct(array $options = []) { - $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 1); + $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 4); $this->newline = $options['newline'] ?? "\n"; if ($this->newline !== "\n" && $this->newline != "\r\n") { diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 4ce4fbc592..c6aed9ee22 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -112,24 +112,24 @@ public function provideTestKindAttributes() { [new String_("\tSTR", $nowdoc), "'\tSTR'"], [new String_("STR\x80", $heredoc), '"STR\x80"'], // Doc string if label not contained (or not in ending position) - [new String_("foo", $nowdoc), "<<<'STR'\nfoo\nSTR\n"], - [new String_("foo", $heredoc), "<< "\r\n"]); + $prettyPrinter = new Standard([ + 'newline' => "\r\n", + 'phpVersion' => PhpVersion::fromComponents(7, 2), + ]); $stmts = [ new Stmt\If_(new Int_(1), [ 'stmts' => [ diff --git a/test/code/prettyPrinter/expr/docStrings.test b/test/code/prettyPrinter/expr/docStrings.test index 68ae472869..ca66bca808 100644 --- a/test/code/prettyPrinter/expr/docStrings.test +++ b/test/code/prettyPrinter/expr/docStrings.test @@ -70,11 +70,9 @@ a{$b} STR; call(<< Date: Sun, 27 Aug 2023 22:02:31 +0200 Subject: [PATCH 284/428] Indent heredoc/nowdoc when targeting PHP >= 7.3 --- UPGRADE-5.0.md | 1 + lib/PhpParser/PrettyPrinter/Standard.php | 29 ++++++++---- test/code/prettyPrinter/expr/docStrings.test | 50 ++++++++++++++++---- 3 files changed, 62 insertions(+), 18 deletions(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 0e0142491c..ef74692160 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -204,6 +204,7 @@ The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersio * For PHP >= 7.0 (default), parentheses around `yield` expressions will only be printed when necessary. Previously, parentheses were always printed, even if `yield` was used as a statement. * For PHP >= 7.1 (default), the short array syntax `[]` will be used for destructuring by default (instead of `list()`). This does not affect nodes that specify and explicit syntax using the `kind` attribute. * For PHP >= 7.3 (default), a newline is no longer forced after heredoc/nowdoc strings, as the requirement for this has been removed with the introduction of flexible heredoc/nowdoc strings. +* For PHP >= 7.3 (default), heredoc/nowdoc strings are now indented just like regular code. This was allowed with the introduction of flexible heredoc/nowdoc strings. ### Changes to precedence handling in the pretty printer diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 27b2f9fdeb..f3acef49ea 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -127,20 +127,26 @@ protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node): string { // Scalars + private function indentString(string $str): string { + return str_replace("\n", $this->nl, $str); + } + protected function pScalar_String(Scalar\String_ $node): string { $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)) { + $shouldIdent = $this->phpVersion->supportsFlexibleHeredoc(); + $nl = $shouldIdent ? $this->nl : $this->newline; if ($node->value === '') { - return "<<<'$label'{$this->newline}$label{$this->docStringEndToken}"; + return "<<<'$label'$nl$label{$this->docStringEndToken}"; } // Make sure trailing \r is not combined with following \n into CRLF. if ($node->value[strlen($node->value) - 1] !== "\r") { - return "<<<'$label'{$this->newline}{$node->value}{$this->newline}$label" - . $this->docStringEndToken; + $value = $shouldIdent ? $this->indentString($node->value) : $node->value; + return "<<<'$label'$nl$value$nl$label{$this->docStringEndToken}"; } } /* break missing intentionally */ @@ -151,12 +157,12 @@ protected function pScalar_String(Scalar\String_ $node): string { $label = $node->getAttribute('docLabel'); $escaped = $this->escapeString($node->value, null); if ($label && !$this->containsEndLabel($escaped, $label)) { + $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; if ($escaped === '') { - return "<<<$label{$this->newline}$label{$this->docStringEndToken}"; + return "<<<$label$nl$label{$this->docStringEndToken}"; } - return "<<<$label{$this->newline}$escaped{$this->newline}$label" - . $this->docStringEndToken; + return "<<<$label$nl$escaped$nl$label{$this->docStringEndToken}"; } /* break missing intentionally */ // no break @@ -170,15 +176,16 @@ protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node): if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) { $label = $node->getAttribute('docLabel'); if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { + $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; if (count($node->parts) === 1 && $node->parts[0] instanceof Node\InterpolatedStringPart && $node->parts[0]->value === '' ) { - return "<<<$label{$this->newline}$label{$this->docStringEndToken}"; + return "<<<$label$nl$label{$this->docStringEndToken}"; } - return "<<<$label{$this->newline}" . $this->pEncapsList($node->parts, null) - . "{$this->newline}$label{$this->docStringEndToken}"; + return "<<<$label$nl" . $this->pEncapsList($node->parts, null) + . "$nl$label{$this->docStringEndToken}"; } } return '"' . $this->pEncapsList($node->parts, '"') . '"'; @@ -1055,6 +1062,9 @@ protected function escapeString(string $string, ?string $quote): string { // But do escape isolated \r. Combined with the terminating newline, it might get // interpreted as \r\n and dropped from the string contents. $escaped = preg_replace('/\r(?!\n)/', '\\r', $escaped); + if ($this->phpVersion->supportsFlexibleHeredoc()) { + $escaped = $this->indentString($escaped); + } } else { $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\"); } @@ -1079,7 +1089,6 @@ protected function escapeString(string $string, ?string $quote): string { return preg_replace_callback($regex, function ($matches): string { assert(strlen($matches[0]) === 1); $hex = dechex(ord($matches[0])); - ; return '\\x' . str_pad($hex, 2, '0', \STR_PAD_LEFT); }, $escaped); } diff --git a/test/code/prettyPrinter/expr/docStrings.test b/test/code/prettyPrinter/expr/docStrings.test index ca66bca808..e8e903e72f 100644 --- a/test/code/prettyPrinter/expr/docStrings.test +++ b/test/code/prettyPrinter/expr/docStrings.test @@ -38,12 +38,27 @@ STR ); function test() { + <<<'STR' + STR; + <<<'STR' + Foo + Bar + Baz + STR; + << Date: Thu, 14 Sep 2023 10:03:42 +0200 Subject: [PATCH 285/428] Use more precise Use_::TYPE_* types (#945) For better static analysis support in consuming projects. --- lib/PhpParser/Builder/Use_.php | 6 +++--- lib/PhpParser/NameContext.php | 18 +++++++++--------- lib/PhpParser/Node/Stmt/GroupUse.php | 10 ++++++---- lib/PhpParser/Node/Stmt/Use_.php | 6 +++--- lib/PhpParser/Node/UseItem.php | 8 +++++--- lib/PhpParser/NodeVisitor/NameResolver.php | 5 +++-- 6 files changed, 29 insertions(+), 24 deletions(-) diff --git a/lib/PhpParser/Builder/Use_.php b/lib/PhpParser/Builder/Use_.php index dfccd24d01..60f8297621 100644 --- a/lib/PhpParser/Builder/Use_.php +++ b/lib/PhpParser/Builder/Use_.php @@ -10,7 +10,7 @@ class Use_ implements Builder { /** @var Node\Name */ protected Node\Name $name; - /** @var int */ + /** @var Stmt\Use_::TYPE_* */ protected int $type; /** @var string|null */ protected ?string $alias = null; @@ -18,8 +18,8 @@ class Use_ implements Builder { /** * 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 + * @param Node\Name|string $name Name of the entity (namespace, class, function, constant) to alias + * @param Stmt\Use_::TYPE_* $type One of the Stmt\Use_::TYPE_* constants */ public function __construct($name, int $type) { $this->name = BuilderHelpers::normalizeName($name); diff --git a/lib/PhpParser/NameContext.php b/lib/PhpParser/NameContext.php index 395d5d6862..2377ef9ee4 100644 --- a/lib/PhpParser/NameContext.php +++ b/lib/PhpParser/NameContext.php @@ -47,9 +47,9 @@ public function startNamespace(?Name $namespace = null): void { /** * Add an alias / import. * - * @param Name $name Original name - * @param string $aliasName Aliased name - * @param int $type One of Stmt\Use_::TYPE_* + * @param Name $name Original name + * @param string $aliasName Aliased name + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * @param array $errorAttrs Attributes to use to report an error */ public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void { @@ -93,8 +93,8 @@ public function getNamespace(): ?Name { /** * Get resolved name. * - * @param Name $name Name to resolve - * @param int $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} + * @param Name $name Name to resolve + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} * * @return null|Name Resolved name, or null if static resolution is not possible */ @@ -148,8 +148,8 @@ public function getResolvedClassName(Name $name): Name { /** * Get possible ways of writing a fully qualified name (e.g., by making use of aliases). * - * @param string $name Fully-qualified name (without leading namespace separator) - * @param int $type One of Stmt\Use_::TYPE_* + * @param string $name Fully-qualified name (without leading namespace separator) + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name[] Possible representations of the name */ @@ -204,8 +204,8 @@ public function getPossibleNames(string $name, int $type): array { /** * Get shortest representation of this fully-qualified name. * - * @param string $name Fully-qualified name (without leading namespace separator) - * @param int $type One of Stmt\Use_::TYPE_* + * @param string $name Fully-qualified name (without leading namespace separator) + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name Shortest representation */ diff --git a/lib/PhpParser/Node/Stmt/GroupUse.php b/lib/PhpParser/Node/Stmt/GroupUse.php index 29af580f85..8be8102a60 100644 --- a/lib/PhpParser/Node/Stmt/GroupUse.php +++ b/lib/PhpParser/Node/Stmt/GroupUse.php @@ -7,7 +7,9 @@ use PhpParser\Node\UseItem; class GroupUse extends Stmt { - /** @var int Type of group use */ + /** + * @var Use_::TYPE_* Type of group use + */ public int $type; /** @var Name Prefix for uses */ public Name $prefix; @@ -17,9 +19,9 @@ class GroupUse extends Stmt { /** * Constructs a group use node. * - * @param Name $prefix Prefix for uses - * @param UseItem[] $uses Uses - * @param int $type Type of group use + * @param Name $prefix Prefix for uses + * @param UseItem[] $uses Uses + * @param Use_::TYPE_* $type Type of group use * @param array $attributes Additional attributes */ public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Use_.php b/lib/PhpParser/Node/Stmt/Use_.php index 4ef856808a..399a7ef27d 100644 --- a/lib/PhpParser/Node/Stmt/Use_.php +++ b/lib/PhpParser/Node/Stmt/Use_.php @@ -19,7 +19,7 @@ class Use_ extends Stmt { /** Constant import */ public const TYPE_CONSTANT = 3; - /** @var int Type of alias */ + /** @var self::TYPE_* Type of alias */ public int $type; /** @var UseItem[] Aliases */ public array $uses; @@ -27,8 +27,8 @@ class Use_ extends Stmt { /** * Constructs an alias (use) list node. * - * @param UseItem[] $uses Aliases - * @param int $type Type of alias + * @param UseItem[] $uses Aliases + * @param Stmt\Use_::TYPE_* $type Type of alias * @param array $attributes Additional attributes */ public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { diff --git a/lib/PhpParser/Node/UseItem.php b/lib/PhpParser/Node/UseItem.php index fd102cb689..c2b371b2e6 100644 --- a/lib/PhpParser/Node/UseItem.php +++ b/lib/PhpParser/Node/UseItem.php @@ -6,7 +6,9 @@ use PhpParser\Node\Stmt\Use_; class UseItem extends Node\Stmt { - /** @var int One of the Stmt\Use_::TYPE_* constants. Will only differ from TYPE_UNKNOWN for mixed group uses */ + /** + * @var Use_::TYPE_* One of the Stmt\Use_::TYPE_* constants. Will only differ from TYPE_UNKNOWN for mixed group uses + */ public int $type; /** @var Node\Name Namespace, class, function or constant to alias */ public Name $name; @@ -18,8 +20,8 @@ class UseItem extends Node\Stmt { * * @param Node\Name $name Namespace/Class to alias * @param null|string|Identifier $alias Alias - * @param int $type Type of the use element (for mixed group use only) - * @param array $attributes Additional attributes + * @param Use_::TYPE_* $type Type of the use element (for mixed group use only) + * @param array $attributes Additional attributes */ public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index 160d0cbb4c..3149a6e1fd 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -160,6 +160,7 @@ public function enterNode(Node $node) { return null; } + /** @param Stmt\Use_::TYPE_* $type */ private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null): void { // Add prefix for group uses $name = $prefix ? Name::concat($prefix, $use->name) : $use->name; @@ -205,8 +206,8 @@ private function resolveType(?Node $node): ?Node { /** * Resolve name, according to name resolver options. * - * @param Name $name Function or constant name to resolve - * @param int $type One of Stmt\Use_::TYPE_* + * @param Name $name Function or constant name to resolve + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name Resolved name, or original name with attribute */ From 06c7ab51b7d4667226db22a408520f2e5d07802d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 16 Sep 2023 09:33:33 +0200 Subject: [PATCH 286/428] Drop Lexer::getTokens() method This doesn't make a lot of sense now that Lexer::tokenize() returns the tokens. The tokens for the last parse should be fetched via Parser::getTokens() instead. --- lib/PhpParser/Lexer.php | 39 +++++++++++----------------- lib/PhpParser/Lexer/Emulative.php | 24 ++++++++++------- test/PhpParser/PrettyPrinterTest.php | 4 +-- 3 files changed, 32 insertions(+), 35 deletions(-) diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index adff5222a6..fa0ff696c5 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -5,9 +5,6 @@ require __DIR__ . '/compatibility_tokens.php'; class Lexer { - /** @var list List of tokens */ - protected array $tokens; - /** * Tokenize the provided source code. * @@ -31,14 +28,14 @@ public function tokenize(string $code, ?ErrorHandler $errorHandler = null): arra $scream = ini_set('xdebug.scream', '0'); - $this->tokens = @Token::tokenize($code); - $this->postprocessTokens($errorHandler); + $tokens = @Token::tokenize($code); + $this->postprocessTokens($tokens, $errorHandler); if (false !== $scream) { ini_set('xdebug.scream', $scream); } - return $this->tokens; + return $tokens; } private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler): void { @@ -66,33 +63,36 @@ private function isUnterminatedComment(Token $token): bool { && substr($token->text, -2) !== '*/'; } - protected function postprocessTokens(ErrorHandler $errorHandler): void { + /** + * @param list $tokens + */ + protected function postprocessTokens(array &$tokens, ErrorHandler $errorHandler): void { // This function reports errors (bad characters and unterminated comments) in the token // array, and performs certain canonicalizations: // * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and // T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types. // * Add a sentinel token with ID 0. - $numTokens = \count($this->tokens); + $numTokens = \count($tokens); if ($numTokens === 0) { // Empty input edge case: Just add the sentinel token. - $this->tokens[] = new Token(0, "\0", 1, 0); + $tokens[] = [new Token(0, "\0", 1, 0)]; return; } for ($i = 0; $i < $numTokens; $i++) { - $token = $this->tokens[$i]; + $token = $tokens[$i]; if ($token->id === \T_BAD_CHARACTER) { $this->handleInvalidCharacter($token, $errorHandler); } if ($token->id === \ord('&')) { $next = $i + 1; - while (isset($this->tokens[$next]) && $this->tokens[$next]->id === \T_WHITESPACE) { + while (isset($tokens[$next]) && $tokens[$next]->id === \T_WHITESPACE) { $next++; } - $followedByVarOrVarArg = isset($this->tokens[$next]) && - $this->tokens[$next]->is([\T_VARIABLE, \T_ELLIPSIS]); + $followedByVarOrVarArg = isset($tokens[$next]) && + $tokens[$next]->is([\T_VARIABLE, \T_ELLIPSIS]); $token->id = $followedByVarOrVarArg ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; @@ -100,7 +100,7 @@ protected function postprocessTokens(ErrorHandler $errorHandler): void { } // Check for unterminated comment - $lastToken = $this->tokens[$numTokens - 1]; + $lastToken = $tokens[$numTokens - 1]; if ($this->isUnterminatedComment($lastToken)) { $errorHandler->handleError(new Error('Unterminated comment', [ 'startLine' => $lastToken->line, @@ -111,15 +111,6 @@ protected function postprocessTokens(ErrorHandler $errorHandler): void { } // Add sentinel token. - $this->tokens[] = new Token(0, "\0", $lastToken->getEndLine(), $lastToken->getEndPos()); - } - - /** - * Returns the token array for the last tokenized source code. - * - * @return Token[] Array of tokens - */ - public function getTokens(): array { - return $this->tokens; + $tokens[] = new Token(0, "\0", $lastToken->getEndLine(), $lastToken->getEndPos()); } } diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 30590c4cf9..eb561cbeaa 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -19,6 +19,7 @@ use PhpParser\Lexer\TokenEmulator\ReverseEmulator; use PhpParser\Lexer\TokenEmulator\TokenEmulator; use PhpParser\PhpVersion; +use PhpParser\Token; class Emulative extends Lexer { /** @var array{int, string, string}[] Patches used to reverse changes introduced in the code */ @@ -81,9 +82,9 @@ public function tokenize(string $code, ?ErrorHandler $errorHandler = null): arra } $collector = new ErrorHandler\Collecting(); - parent::tokenize($code, $collector); + $tokens = parent::tokenize($code, $collector); $this->sortPatches(); - $this->fixupTokens(); + $tokens = $this->fixupTokens($tokens); $errors = $collector->getErrors(); if (!empty($errors)) { @@ -94,10 +95,10 @@ public function tokenize(string $code, ?ErrorHandler $errorHandler = null): arra } foreach ($emulators as $emulator) { - $this->tokens = $emulator->emulate($code, $this->tokens); + $tokens = $emulator->emulate($code, $tokens); } - return $this->tokens; + return $tokens; } private function isForwardEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { @@ -118,9 +119,13 @@ private function sortPatches(): void { }); } - private function fixupTokens(): void { + /** + * @param list $tokens + * @return list + */ + private function fixupTokens(array $tokens): array { if (\count($this->patches) === 0) { - return; + return $tokens; } // Load first patch @@ -130,8 +135,8 @@ private function fixupTokens(): void { // We use a manual loop over the tokens, because we modify the array on the fly $posDelta = 0; $lineDelta = 0; - for ($i = 0, $c = \count($this->tokens); $i < $c; $i++) { - $token = $this->tokens[$i]; + for ($i = 0, $c = \count($tokens); $i < $c; $i++) { + $token = $tokens[$i]; $pos = $token->pos; $token->pos += $posDelta; $token->line += $lineDelta; @@ -142,7 +147,7 @@ private function fixupTokens(): void { if ($patchType === 'remove') { if ($patchPos === $pos && $patchTextLen === $len) { // Remove token entirely - array_splice($this->tokens, $i, 1, []); + array_splice($tokens, $i, 1, []); $i--; $c--; } else { @@ -182,6 +187,7 @@ private function fixupTokens(): void { $posDelta += $localPosDelta; } + return $tokens; } /** diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index c6aed9ee22..47272b9fa4 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -191,7 +191,7 @@ public function testFormatPreservingPrint($name, $code, $modification, $expected $printer = new PrettyPrinter\Standard(); $oldStmts = $parser->parse($code); - $oldTokens = $lexer->getTokens(); + $oldTokens = $parser->getTokens(); $newStmts = $traverser->traverse($oldStmts); @@ -241,7 +241,7 @@ public function testRoundTripPrint($name, $code, $expected, $modeLine) { return; } - $oldTokens = $lexer->getTokens(); + $oldTokens = $parser->getTokens(); $newStmts = $traverser->traverse($oldStmts); From b11fca031010a240f33bfa65f8e4b749889b02db Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 16 Sep 2023 09:54:10 +0200 Subject: [PATCH 287/428] Run integration test against PHP 8.3 --- .github/workflows/main.yml | 4 ++-- test_old/run.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 29f7839eff..75efd5733a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,7 +68,7 @@ jobs: run: "test_old/run-php-src.sh 7.4.33" test_old_80_70: runs-on: "ubuntu-latest" - name: "PHP 8.2 Code on PHP 7.4 Integration Tests" + name: "PHP 8.3 Code on PHP 7.4 Integration Tests" steps: - name: "Checkout" uses: "actions/checkout@v3" @@ -81,7 +81,7 @@ jobs: - name: "Install PHP 8 dependencies" run: "composer update --no-progress --prefer-dist" - name: "Tests" - run: "test_old/run-php-src.sh 8.2.3" + run: "test_old/run-php-src.sh 8.3.0RC2" phpstan: runs-on: "ubuntu-latest" name: "PHP ${{ matrix.php-version }} PHPStan" diff --git a/test_old/run.php b/test_old/run.php index fd527e8b29..2386e6154f 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -174,7 +174,7 @@ function showHelp($error) { $origStmts = $parser->parse($origCode); $parseTime += microtime(true) - $startTime; - $origTokens = $lexer->getTokens(); + $origTokens = $parser->getTokens(); $startTime = microtime(true); $stmts = $cloningTraverser->traverse($origStmts); From 21ead39056757258f376cc3694a2831c555b4bd5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 09:07:58 +0200 Subject: [PATCH 288/428] Update docs after lexer changes --- doc/2_Usage_of_basic_components.markdown | 10 +- doc/component/Error_handling.markdown | 21 +-- doc/component/Lexer.markdown | 161 ++++++++++------------- doc/component/Pretty_printing.markdown | 10 +- 4 files changed, 78 insertions(+), 124 deletions(-) diff --git a/doc/2_Usage_of_basic_components.markdown b/doc/2_Usage_of_basic_components.markdown index 2bec6f5302..462c8adf3e 100644 --- a/doc/2_Usage_of_basic_components.markdown +++ b/doc/2_Usage_of_basic_components.markdown @@ -206,11 +206,13 @@ without the `PhpParser\Node\` prefix and `\` replaced with `_`. It also does not 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. +By default, the parser adds the `startLine`, `endLine`, `startTokenPos`, `endTokenPos`, +`startFilePos`, `endFilePos` and `comments` attributes. `comments` is an array of +`PhpParser\Comment[\Doc]` instances. -The start line can also be accessed using `getStartLine()` (instead of `getAttribute('startLine')`). -The last doc comment from the `comments` attribute can be obtained using `getDocComment()`. +The pre-defined attributes can also be accessed using `getStartLine()` instead of +`getAttribute('startLine')`, and so on. The last doc comment from the `comments` attribute can be +obtained using `getDocComment()`. Pretty printer -------------- diff --git a/doc/component/Error_handling.markdown b/doc/component/Error_handling.markdown index ac8919b590..597bf0094d 100644 --- a/doc/component/Error_handling.markdown +++ b/doc/component/Error_handling.markdown @@ -4,29 +4,12 @@ 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. +How much location information is available depends on the origin of the error. 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 -$lexerOptions = array( - 'usedAttributes' => array('comments', 'startLine', 'endLine', 'startFilePos', 'endFilePos'), -); -$parser = (new PhpParser\ParserFactory())->createForHostVersion($lexerOptions); - -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: diff --git a/doc/component/Lexer.markdown b/doc/component/Lexer.markdown index f66cc17a47..1b8e4ce041 100644 --- a/doc/component/Lexer.markdown +++ b/doc/component/Lexer.markdown @@ -1,41 +1,79 @@ 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. +The lexer is responsible for providing tokens to the parser. Typical use of the library does not require direct +interaction with the lexer, as an appropriate lexer is created by `PhpParser\ParserFactory`. The tokens produced +by the lexer can then be retrieved using `PhpParser\Parser::getTokens()`. -This documentation discusses options available for the default lexers and explains how lexers can be extended. +Emulation +--------- -Lexer options -------------- +While this library implements a custom parser, it relies on PHP's `ext/tokenizer` extension to perform lexing. However, +this extension only supports lexing code for the PHP version you are running on, while this library also wants to support +parsing newer code. For that reason, the lexer performs additional "emulation" in three layers: -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: +First, PhpParser uses the `PhpToken` based representation introduced in PHP 8.0, rather than the array-based tokens from +previous versions. The `PhpParser\Token` class either extends `PhpToken` (on PHP 8.0) or a polyfill implementation. The +polyfill implementation will also perform two emulations that are required by the parser and cannot be disabled: + + * Single-line comments use the PHP 8.0 representation that does not include a trailing newline. The newline will be + part of a following `T_WHITESPACE` token. + * Namespaced names use the PHP 8.0 representation using `T_NAME_FULLY_QUALIFIED`, `T_NAME_QUALIFIED` and + `T_NAME_RELATIVE` tokens, rather than the previous representation using a sequence of `T_STRING` and `T_NS_SEPARATOR`. + This means that certain code that is legal on older versions (namespaced names including whitespace, such as `A \ B`) + will not be accepted by the parser. + +Second, the `PhpParser\Lexer` base class will convert `&` tokens into the PHP 8.1 representation of either +`T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG` or `T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG`. This is required by the parser +and cannot be disabled. + +Finally, `PhpParser\Lexer\Emulative` performs other, optional emulations. This lexer is parameterized by `PhpVersion` +and will try to emulate `ext/tokenizer` output for that version. This is done using separate `TokenEmulator`s for each +emulated feature. + +Emulation is usually used to support newer PHP versions, but there is also very limited support for reverse emulation to +older PHP versions, which can make keywords from newer versions non-reserved. + +Tokens, positions and attributes +-------------------------------- + +The `Lexer::tokenize()` method returns an array of `PhpParser\Token`s. The most important parts of the interface can be +summarized as follows: ```php -$lexer = new PhpParser\Lexer(array( - 'usedAttributes' => array( - 'comments', 'startLine', 'endLine' - ) -)); +class Token { + /** @var int Token ID, either T_* or ord($char) for single-character tokens. */ + public int $id; + /** @var string The textual content of the token. */ + public string $text; + /** @var int The 1-based starting line of the token (or -1 if unknown). */ + public int $line; + /** @var int The 0-based starting position of the token (or -1 if unknown). */ + public int $pos; + + /** @param int|string|(int|string)[] $kind Token ID or text (or array of them) */ + public function is($kind): bool; +} ``` -The attributes used in this example match the default behavior of the lexer. The following attributes are supported: +Unlike PHP's own `PhpToken::tokenize()` output, the token array is terminated by a sentinel token with ID 0. + +The lexer is normally invoked implicitly by the parser. In that case, the tokens for the last parse can be retrieved +using `Parser::getTokens()`. - * `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->getComments()` and `$node->getDocComment()` methods 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. Required for `$node->getEndLine()`. - * `startTokenPos`: Offset into the token array of the first token in the node. Required for `$node->getStartTokenPos()`. - * `endTokenPos`: Offset into the token array of the last token in the node. Required for `$node->getEndTokenPos()`. - * `startFilePos`: Offset into the code string of the first character that is part of the node. Required for `$node->getStartFilePos()`. - * `endFilePos`: Offset into the code string of the last character that is part of the node. Required for `$node->getEndFilePos()`. +Nodes in the AST produced by the parser always corresponds to some range of tokens. The parser adds a number of +positioning attributes to allow mapping nodes back to lines, tokens or file offsets: + + * `startLine`: Line in which the node starts. Used by `$node->getStartLine()`. + * `endLine`: Line in which the node ends. Used by `$node->getEndLine()`. + * `startTokenPos`: Offset into the token array of the first token in the node. Used by `$node->getStartTokenPos()`. + * `endTokenPos`: Offset into the token array of the last token in the node. Used by `$node->getEndTokenPos()`. + * `startFilePos`: Offset into the code string of the first character that is part of the node. Used by `$node->getStartFilePos()`. + * `endFilePos`: Offset into the code string of the last character that is part of the node. Used by `$node->getEndFilePos()`. + +Note that `start`/`end` here are closed rather than half-open ranges. This means that a node consisting of a single +token will have `startTokenPos == endTokenPos` rather than `startTokenPos + 1 == endTokenPos`. This also means that a +zero-length node will have `startTokenPos -1 == endTokenPos`. ### Using token positions @@ -73,11 +111,6 @@ class MyNodeVisitor extends PhpParser\NodeVisitorAbstract { } } -$lexerOptions = array( - 'usedAttributes' => array( - 'comments', 'startLine', 'endLine', 'startTokenPos', 'endTokenPos' - ) -); $parser = (new PhpParser\ParserFactory())->createForHostVersion($lexerOptions); $visitor = new MyNodeVisitor(); @@ -85,71 +118,9 @@ $traverser = new PhpParser\NodeTraverser($visitor); try { $stmts = $parser->parse($code); - $visitor->setTokens($lexer->getTokens()); + $visitor->setTokens($parser->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 ---------------- - -The primary public interface of the lexer consists of the following methods: - -```php -function startLexing(string $code, ErrorHandler $errorHandler = null): void; -function getTokens(): array; -function getNextToken(string &$value = null, array &$startAttributes = null, array &$endAttributes = null): int; -``` - -The `startLexing()` method is invoked whenever the `parse()` method of the parser is called and is passed the source -code that is to be lexed (including the opening tag). It can be used to reset state or preprocess the source code or tokens. The -passed `ErrorHandler` should be used to report lexing errors. - -The `getTokens()` method returns the current array of `PhpParser\Token`s, which are compatible with the PHP 8 `PhpToken` -class. This method is not used by the parser (which uses `getNextToken()`), but is useful in combination with the token -position attributes. - -The `getNextToken()` method returns the ID of the next token (in the sense of `Token::$id`). 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; - -class KeepOriginalValueLexer extends Lexer // or Lexer\Emulative -{ - public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) { - $tokenId = parent::getNextToken($value, $startAttributes, $endAttributes); - - if ($tokenId == \T_CONSTANT_ENCAPSED_STRING // non-interpolated string - || $tokenId == \T_ENCAPSED_AND_WHITESPACE // interpolated string - || $tokenId == \T_LNUMBER // integer - || $tokenId == \T_DNUMBER // floating point number - ) { - // could also use $startAttributes, doesn't really matter here - $endAttributes['originalValue'] = $value; - } - - return $tokenId; - } -} -``` diff --git a/doc/component/Pretty_printing.markdown b/doc/component/Pretty_printing.markdown index 42a5cf3a57..0a152dcae6 100644 --- a/doc/component/Pretty_printing.markdown +++ b/doc/component/Pretty_printing.markdown @@ -64,21 +64,19 @@ code which has been modified or newly inserted. Use of the formatting-preservation functionality requires some additional preparatory steps: ```php -use PhpParser\{Lexer, NodeTraverser, NodeVisitor, ParserFactory, PrettyPrinter}; +use PhpParser\{NodeTraverser, NodeVisitor, ParserFactory, PrettyPrinter}; $parser = (new ParserFactory())->createForHostVersion(); - -$traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); - -$printer = new PrettyPrinter\Standard(); - $oldStmts = $parser->parse($code); $oldTokens = $parser->getTokens(); +// Run CloningVisitor before making changes to the AST. +$traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); $newStmts = $traverser->traverse($oldStmts); // MODIFY $newStmts HERE +$printer = new PrettyPrinter\Standard(); $newCode = $printer->printFormatPreserving($newStmts, $oldStmts, $oldTokens); ``` From e395f042d223d154081d4fe6c4b743269bb85384 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 11:08:23 +0200 Subject: [PATCH 289/428] Add php-cs-fixer CI job --- .github/workflows/main.yml | 27 ++++++++++++++++++------ .php-cs-fixer.dist.php | 5 +++++ Makefile | 10 +++++++++ lib/PhpParser/Internal/Differ.php | 14 ++++++------ lib/PhpParser/Node/Scalar/String_.php | 8 +++---- lib/PhpParser/PrettyPrinter/Standard.php | 2 +- 6 files changed, 47 insertions(+), 19 deletions(-) create mode 100644 Makefile diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 75efd5733a..44665f523a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -84,11 +84,7 @@ jobs: run: "test_old/run-php-src.sh 8.3.0RC2" phpstan: runs-on: "ubuntu-latest" - name: "PHP ${{ matrix.php-version }} PHPStan" - strategy: - matrix: - php-version: - - "8.2" + name: "PHPStan" steps: - name: "Checkout" uses: "actions/checkout@v3" @@ -96,10 +92,27 @@ jobs: uses: "shivammathur/setup-php@v2" with: coverage: "none" - php-version: "${{ matrix.php-version }}" + php-version: "8.2" tools: composer:v2 - name: "Install dependencies" - run: | + run: | cd tools && composer install - name: "PHPStan" run: "php tools/vendor/bin/phpstan" + php-cs-fixer: + runs-on: "ubuntu-latest" + name: "PHP-CS-Fixer" + steps: + - name: "Checkout" + uses: "actions/checkout@v3" + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + coverage: "none" + php-version: "8.2" + tools: composer:v2 + - name: "Install dependencies" + run: | + cd tools && composer install + - name: "php-cs-fixer" + run: "php tools/vendor/bin/php-cs-fixer fix" diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 909c4561cb..f284d0318c 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -21,6 +21,11 @@ 'declare_strict_types' => true, // Keep argument formatting for now. 'method_argument_space' => ['on_multiline' => 'ignore'], + 'binary_operator_spaces' => [ + 'default' => 'at_least_single_space', + // Work around https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/7303. + 'operators' => ['=' => null], + ], ]) ->setFinder($finder) ; diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..9a7bdf2d2a --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +.PHONY: phpstan php-cs-fixer + +tools/vendor: + composer install -d tools + +phpstan: tools/vendor + tools/vendor/bin/phpstan + +php-cs-fixer: tools/vendor + tools/vendor/bin/php-cs-fixer fix diff --git a/lib/PhpParser/Internal/Differ.php b/lib/PhpParser/Internal/Differ.php index baaad87f46..10df48ff65 100644 --- a/lib/PhpParser/Internal/Differ.php +++ b/lib/PhpParser/Internal/Differ.php @@ -68,10 +68,10 @@ private function calculateTrace(array $old, array $new): array { for ($d = 0; $d <= $max; $d++) { $trace[] = $v; for ($k = -$d; $k <= $d; $k += 2) { - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { - $x = $v[$k+1]; + if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { + $x = $v[$k + 1]; } else { - $x = $v[$k-1] + 1; + $x = $v[$k - 1] + 1; } $y = $x - $k; @@ -103,7 +103,7 @@ private function extractDiff(array $trace, int $x, int $y, array $old, array $ne $v = $trace[$d]; $k = $x - $y; - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { + if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { $prevK = $k + 1; } else { $prevK = $k - 1; @@ -113,7 +113,7 @@ private function extractDiff(array $trace, int $x, int $y, array $old, array $ne $prevY = $prevX - $prevK; while ($x > $prevX && $y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_KEEP, $old[$x-1], $new[$y-1]); + $result[] = new DiffElem(DiffElem::TYPE_KEEP, $old[$x - 1], $new[$y - 1]); $x--; $y--; } @@ -123,12 +123,12 @@ private function extractDiff(array $trace, int $x, int $y, array $old, array $ne } while ($x > $prevX) { - $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $old[$x-1], null); + $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $old[$x - 1], null); $x--; } while ($y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $new[$y-1]); + $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $new[$y - 1]); $y--; } } diff --git a/lib/PhpParser/Node/Scalar/String_.php b/lib/PhpParser/Node/Scalar/String_.php index f51a5f7805..ddd8550488 100644 --- a/lib/PhpParser/Node/Scalar/String_.php +++ b/lib/PhpParser/Node/Scalar/String_.php @@ -143,14 +143,14 @@ private static function codePointToUtf8(int $num): string { return chr($num); } if ($num <= 0x7FF) { - return chr(($num>>6) + 0xC0) . chr(($num&0x3F) + 0x80); + 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); + 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); + 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'); } diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index f3acef49ea..3d67f37376 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -192,7 +192,7 @@ protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node): } protected function pScalar_Int(Scalar\Int_ $node): string { - if ($node->value === -\PHP_INT_MAX-1) { + if ($node->value === -\PHP_INT_MAX - 1) { // PHP_INT_MIN cannot be represented as a literal, // because the sign is not part of the literal return '(-' . \PHP_INT_MAX . '-1)'; From c91c8633a4ee9316ba1e86bf0c2d68b106854678 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 11:59:43 +0200 Subject: [PATCH 290/428] Add PHP 8.3 to CI matrix --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 44665f523a..237942dc82 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,6 +37,7 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" steps: - name: "Checkout" uses: "actions/checkout@v3" From 5a7753a930b8bad9fe898ffc10516bd13f877f7f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 15:28:40 +0200 Subject: [PATCH 291/428] Update changelog --- CHANGELOG.md | 25 +++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab07badcff..5ef8db8f93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,28 @@ +Version 5.0.0-beta1 (TBD) +------------------------- + +See UPGRADE-5.0 for detailed migration instructions. + +### Added + +* Visitors can now be passed directly to the `NodeTraverser` constructor. A separate call to + `addVisitor()` is no longer required. + +### Changed + +* The minimum host PHP version is now PHP 7.4. It is still possible to parse code from older + versions. Property types have been added where possible. +* The `Lexer` no longer accepts options. `Lexer\Emulative` only accepts a `PhpVersion`. The + `startLexing()`, `getTokens()` and `handleHaltCompiler()` methods have been removed. Instead, + there is a single method `tokenize()` returning the tokens. +* The `Parser::getLexer()` method has been replaced by `Parser::getTokens()`. +* Attribute handling has been moved from the lexer to the parser, and is no longer configurable. + The comments, startLine, endLine, startTokenPos, endTokenPos, startFilePos, and endFilePos + attributes will always be added. +* The pretty printer now defaults to PHP 7.4 as the target version. +* The pretty printer now indents heredoc/nowdoc strings if the target version is >= 7.3 + (flexible heredoc/nowdoc). + Version 5.0.0-alpha3 (2023-06-24) --------------------------------- diff --git a/README.md b/README.md index 74f80b0b05..63f0984332 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ manipulation. [Documentation for version 5.x][doc_master] (in development; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x). -[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.2). +[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3). [Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2). From 3c52ea9b6dafb6c2cb6fa0f37ae4ad1993cb6fc2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 15:52:03 +0200 Subject: [PATCH 292/428] Document phpVersion effect on pretty printer --- doc/component/Pretty_printing.markdown | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/component/Pretty_printing.markdown b/doc/component/Pretty_printing.markdown index 0a152dcae6..7fd4a0a4de 100644 --- a/doc/component/Pretty_printing.markdown +++ b/doc/component/Pretty_printing.markdown @@ -31,17 +31,29 @@ expression. Customizing the formatting -------------------------- -The pretty printer respects a number of `kind` attributes used by some notes (e.g., whether an +The pretty printer respects a number of `kind` attributes used by some nodes (e.g., whether an integer should be printed as decimal, hexadecimal, etc). Additionally, it supports three options: -* `phpVersion` (defaults to 7.1) allows opting into formatting that is not supported by older PHP +* `phpVersion` (defaults to 7.4) allows opting into formatting that is not supported by older PHP versions. * `newline` (defaults to `"\n"`) can be set to `"\r\n"` in order to produce Windows newlines. * `shortArraySyntax` determines the used array syntax if the `kind` attribute is not set. This is a legacy option, and `phpVersion` should be used to control this behavior instead. -However, the default pretty printer does not provide any functionality for fine-grained -customization of code formatting. +The behaviors controlled by `phpVersion` (defaults to PHP 7.4) are: + +* For PHP >= 7.0, short array syntax `[]` will be used by default. This does not affect nodes that + specify an explicit array syntax using the `kind` attribute. +* For PHP >= 7.0, parentheses around `yield` expressions will only be printed when necessary. +* For PHP >= 7.1, the short array syntax `[]` will be used for destructuring by default (instead of + `list()`). This does not affect nodes that specify and explicit syntax using the `kind` attribute. +* For PHP >= 7.3, a newline is no longer forced after heredoc/nowdoc strings, as the requirement + for this has been removed with the introduction of flexible heredoc/nowdoc strings. +* For PHP >= 7.3, heredoc/nowdoc strings are indented just like regular code. This was allowed with + the introduction of flexible heredoc/nowdoc strings. + +The default pretty printer does not provide functionality for fine-grained customization of code +formatting. If you want to make minor changes to the formatting, the easiest way is to extend the pretty printer and override the methods responsible for the node types you are interested in. From 2d3dd4e23e10f059f2e2a66258a5d972df6613fd Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 15:59:04 +0200 Subject: [PATCH 293/428] Don't align phpdoc tags I did this to start with, but then alignment kept being broken during refactorings, and at some point I switched to not aligning, and now we have a big mess. Add a php-cs-fixer rule to consistently not align phpdoc tags. --- .php-cs-fixer.dist.php | 1 + lib/PhpParser/Builder/ClassConst.php | 4 +- lib/PhpParser/Builder/EnumCase.php | 2 +- lib/PhpParser/Builder/TraitUseAdaptation.php | 2 +- lib/PhpParser/Builder/Use_.php | 2 +- lib/PhpParser/BuilderFactory.php | 26 +++---- lib/PhpParser/BuilderHelpers.php | 2 +- lib/PhpParser/Comment.php | 10 +-- lib/PhpParser/Error.php | 2 +- lib/PhpParser/Internal/TokenStream.php | 12 +-- lib/PhpParser/NameContext.php | 16 ++-- lib/PhpParser/Node.php | 4 +- lib/PhpParser/Node/Arg.php | 6 +- lib/PhpParser/Node/ArrayItem.php | 6 +- lib/PhpParser/Node/Attribute.php | 2 +- lib/PhpParser/Node/ClosureUse.php | 4 +- lib/PhpParser/Node/Const_.php | 4 +- lib/PhpParser/Node/DeclareItem.php | 4 +- lib/PhpParser/Node/Expr/ArrayDimFetch.php | 4 +- lib/PhpParser/Node/Expr/Array_.php | 2 +- lib/PhpParser/Node/Expr/Assign.php | 4 +- lib/PhpParser/Node/Expr/AssignOp.php | 4 +- lib/PhpParser/Node/Expr/AssignRef.php | 4 +- lib/PhpParser/Node/Expr/BinaryOp.php | 4 +- lib/PhpParser/Node/Expr/BitwiseNot.php | 2 +- lib/PhpParser/Node/Expr/BooleanNot.php | 2 +- lib/PhpParser/Node/Expr/Cast.php | 2 +- lib/PhpParser/Node/Expr/Clone_.php | 2 +- lib/PhpParser/Node/Expr/ConstFetch.php | 2 +- lib/PhpParser/Node/Expr/Empty_.php | 2 +- lib/PhpParser/Node/Expr/ErrorSuppress.php | 2 +- lib/PhpParser/Node/Expr/Eval_.php | 2 +- lib/PhpParser/Node/Expr/Exit_.php | 2 +- lib/PhpParser/Node/Expr/Include_.php | 4 +- lib/PhpParser/Node/Expr/Isset_.php | 2 +- lib/PhpParser/Node/Expr/List_.php | 2 +- lib/PhpParser/Node/Expr/PostDec.php | 2 +- lib/PhpParser/Node/Expr/PostInc.php | 2 +- lib/PhpParser/Node/Expr/PreDec.php | 2 +- lib/PhpParser/Node/Expr/PreInc.php | 2 +- lib/PhpParser/Node/Expr/Print_.php | 2 +- lib/PhpParser/Node/Expr/Ternary.php | 6 +- lib/PhpParser/Node/Expr/Throw_.php | 2 +- lib/PhpParser/Node/Expr/UnaryMinus.php | 2 +- lib/PhpParser/Node/Expr/UnaryPlus.php | 2 +- lib/PhpParser/Node/Expr/Variable.php | 2 +- lib/PhpParser/Node/Expr/YieldFrom.php | 2 +- lib/PhpParser/Node/Expr/Yield_.php | 4 +- lib/PhpParser/Node/Identifier.php | 2 +- lib/PhpParser/Node/InterpolatedStringPart.php | 2 +- lib/PhpParser/Node/IntersectionType.php | 2 +- lib/PhpParser/Node/Name.php | 8 +- lib/PhpParser/Node/PropertyItem.php | 4 +- lib/PhpParser/Node/Scalar/Float_.php | 2 +- lib/PhpParser/Node/Scalar/Int_.php | 8 +- .../Node/Scalar/InterpolatedString.php | 2 +- lib/PhpParser/Node/Scalar/String_.php | 4 +- lib/PhpParser/Node/StaticVar.php | 4 +- lib/PhpParser/Node/Stmt/Break_.php | 2 +- lib/PhpParser/Node/Stmt/Case_.php | 4 +- lib/PhpParser/Node/Stmt/Catch_.php | 6 +- lib/PhpParser/Node/Stmt/Const_.php | 2 +- lib/PhpParser/Node/Stmt/Continue_.php | 2 +- lib/PhpParser/Node/Stmt/Declare_.php | 4 +- lib/PhpParser/Node/Stmt/Do_.php | 4 +- lib/PhpParser/Node/Stmt/Echo_.php | 2 +- lib/PhpParser/Node/Stmt/ElseIf_.php | 4 +- lib/PhpParser/Node/Stmt/Else_.php | 2 +- lib/PhpParser/Node/Stmt/EnumCase.php | 4 +- lib/PhpParser/Node/Stmt/Expression.php | 2 +- lib/PhpParser/Node/Stmt/Finally_.php | 2 +- lib/PhpParser/Node/Stmt/Foreach_.php | 4 +- lib/PhpParser/Node/Stmt/Global_.php | 2 +- lib/PhpParser/Node/Stmt/Goto_.php | 2 +- lib/PhpParser/Node/Stmt/GroupUse.php | 6 +- lib/PhpParser/Node/Stmt/HaltCompiler.php | 2 +- lib/PhpParser/Node/Stmt/InlineHTML.php | 2 +- lib/PhpParser/Node/Stmt/Label.php | 2 +- lib/PhpParser/Node/Stmt/Namespace_.php | 4 +- lib/PhpParser/Node/Stmt/Return_.php | 2 +- lib/PhpParser/Node/Stmt/Static_.php | 2 +- lib/PhpParser/Node/Stmt/Switch_.php | 4 +- lib/PhpParser/Node/Stmt/Throw_.php | 2 +- lib/PhpParser/Node/Stmt/TraitUse.php | 4 +- .../Node/Stmt/TraitUseAdaptation/Alias.php | 10 +-- .../Stmt/TraitUseAdaptation/Precedence.php | 8 +- lib/PhpParser/Node/Stmt/TryCatch.php | 6 +- lib/PhpParser/Node/Stmt/Unset_.php | 2 +- lib/PhpParser/Node/Stmt/Use_.php | 4 +- lib/PhpParser/Node/Stmt/While_.php | 4 +- lib/PhpParser/Node/UnionType.php | 2 +- lib/PhpParser/Node/UseItem.php | 8 +- lib/PhpParser/NodeDumper.php | 2 +- lib/PhpParser/NodeFinder.php | 16 ++-- lib/PhpParser/NodeVisitor/NameResolver.php | 2 +- lib/PhpParser/ParserAbstract.php | 10 +-- lib/PhpParser/ParserFactory.php | 2 +- lib/PhpParser/PrettyPrinterAbstract.php | 74 +++++++++---------- 98 files changed, 227 insertions(+), 226 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index f284d0318c..563bf209a3 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -26,6 +26,7 @@ // Work around https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/7303. 'operators' => ['=' => null], ], + 'phpdoc_align' => ['align' => 'left'], ]) ->setFinder($finder) ; diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index eee957f420..07d4b79dff 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -28,7 +28,7 @@ class ClassConst implements PhpParser\Builder { /** * Creates a class constant builder * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * @param Node\Expr|bool|null|int|float|string|array $value Value */ public function __construct($name, $value) { @@ -38,7 +38,7 @@ public function __construct($name, $value) { /** * Add another constant to const group * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * @param Node\Expr|bool|null|int|float|string|array $value Value * * @return $this The builder instance (for fluid interface) diff --git a/lib/PhpParser/Builder/EnumCase.php b/lib/PhpParser/Builder/EnumCase.php index acecdbe26f..04058bf549 100644 --- a/lib/PhpParser/Builder/EnumCase.php +++ b/lib/PhpParser/Builder/EnumCase.php @@ -24,7 +24,7 @@ class EnumCase implements PhpParser\Builder { /** * Creates an enum case builder. * - * @param string|Identifier $name Name + * @param string|Identifier $name Name */ public function __construct($name) { $this->name = $name; diff --git a/lib/PhpParser/Builder/TraitUseAdaptation.php b/lib/PhpParser/Builder/TraitUseAdaptation.php index b42e7ac325..a138a10a28 100644 --- a/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -29,7 +29,7 @@ class TraitUseAdaptation implements Builder { /** * Creates a trait use adaptation builder. * - * @param Node\Name|string|null $trait Name of adapted trait + * @param Node\Name|string|null $trait Name of adapted trait * @param Node\Identifier|string $method Name of adapted method */ public function __construct($trait, $method) { diff --git a/lib/PhpParser/Builder/Use_.php b/lib/PhpParser/Builder/Use_.php index 60f8297621..322a083ea0 100644 --- a/lib/PhpParser/Builder/Use_.php +++ b/lib/PhpParser/Builder/Use_.php @@ -18,7 +18,7 @@ class Use_ implements Builder { /** * Creates a name use (alias) builder. * - * @param Node\Name|string $name Name of the entity (namespace, class, function, constant) to alias + * @param Node\Name|string $name Name of the entity (namespace, class, function, constant) to alias * @param Stmt\Use_::TYPE_* $type One of the Stmt\Use_::TYPE_* constants */ public function __construct($name, int $type) { diff --git a/lib/PhpParser/BuilderFactory.php b/lib/PhpParser/BuilderFactory.php index efc1bff612..8571e89682 100644 --- a/lib/PhpParser/BuilderFactory.php +++ b/lib/PhpParser/BuilderFactory.php @@ -15,7 +15,7 @@ class BuilderFactory { * Creates an attribute node. * * @param string|Name $name Name of the attribute - * @param array $args Attribute named arguments + * @param array $args Attribute named arguments * * @return Node\Attribute */ @@ -95,7 +95,7 @@ public function useTrait(...$traits): Builder\TraitUse { /** * Creates a trait use adaptation builder. * - * @param Node\Name|string|null $trait Trait name + * @param Node\Name|string|null $trait Trait name * @param Node\Identifier|string $method Method name * * @return Builder\TraitUseAdaptation The created trait use adaptation builder @@ -189,7 +189,7 @@ public function useConst($name): Builder\Use_ { /** * Creates a class constant builder. * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * @param Node\Expr|bool|null|int|float|string|array $value Value * * @return Builder\ClassConst The created use const builder @@ -201,7 +201,7 @@ public function classConst($name, $value): Builder\ClassConst { /** * Creates an enum case builder. * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * * @return Builder\EnumCase The created use const builder */ @@ -262,7 +262,7 @@ public function args(array $args): array { * Creates a function call node. * * @param string|Name|Expr $name Function name - * @param array $args Function arguments + * @param array $args Function arguments * * @return Expr\FuncCall */ @@ -276,9 +276,9 @@ public function funcCall($name, array $args = []): Expr\FuncCall { /** * Creates a method call node. * - * @param Expr $var Variable the method is called on + * @param Expr $var Variable the method is called on * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments + * @param array $args Method arguments * * @return Expr\MethodCall */ @@ -293,9 +293,9 @@ public function methodCall(Expr $var, $name, array $args = []): Expr\MethodCall /** * Creates a static method call node. * - * @param string|Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments + * @param string|Name|Expr $class Class name + * @param string|Identifier|Expr $name Method name + * @param array $args Method arguments * * @return Expr\StaticCall */ @@ -311,7 +311,7 @@ public function staticCall($class, $name, array $args = []): Expr\StaticCall { * Creates an object creation node. * * @param string|Name|Expr $class Class name - * @param array $args Constructor arguments + * @param array $args Constructor arguments * * @return Expr\New_ */ @@ -336,7 +336,7 @@ public function constFetch($name): Expr\ConstFetch { /** * Creates a property fetch node. * - * @param Expr $var Variable holding object + * @param Expr $var Variable holding object * @param string|Identifier|Expr $name Property name * * @return Expr\PropertyFetch @@ -349,7 +349,7 @@ public function propertyFetch(Expr $var, $name): Expr\PropertyFetch { * Creates a class constant fetch node. * * @param string|Name|Expr $class Class name - * @param string|Identifier|Expr $name Constant name + * @param string|Identifier|Expr $name Constant name * * @return Expr\ClassConstFetch */ diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index 8f95668aba..3e41b26fc7 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -313,7 +313,7 @@ public static function normalizeAttribute($attribute): Node\AttributeGroup { * Adds a modifier and returns new modifier bitmask. * * @param int $modifiers Existing modifiers - * @param int $modifier Modifier to set + * @param int $modifier Modifier to set * * @return int New modifiers */ diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index ea1d1239b3..e90ebeacc7 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -21,10 +21,10 @@ class Comment implements \JsonSerializable { /** * 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 - * @param int $startTokenPos Token offset the comment started on + * @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 + * @param int $startTokenPos Token offset the comment started on */ public function __construct( string $text, @@ -229,7 +229,7 @@ private function getShortestWhitespacePrefixLen(string $str): int { } /** - * @return array + * @return array * @psalm-return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} */ public function jsonSerialize(): array { diff --git a/lib/PhpParser/Error.php b/lib/PhpParser/Error.php index 2dcbee9a5c..afb9dc8e8e 100644 --- a/lib/PhpParser/Error.php +++ b/lib/PhpParser/Error.php @@ -144,7 +144,7 @@ public function getMessageWithColumnInfo(string $code): string { * Converts a file offset into a column. * * @param string $code Source code that $pos indexes into - * @param int $pos 0-based position in $code + * @param int $pos 0-based position in $code * * @return int 1-based column (relative to start of line) */ diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index ec1f668670..5277c08860 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -29,7 +29,7 @@ public function __construct(array $tokens) { * Whether the given position is immediately surrounded by parenthesis. * * @param int $startPos Start position - * @param int $endPos End position + * @param int $endPos End position * * @return bool */ @@ -42,7 +42,7 @@ public function haveParens(int $startPos, int $endPos): bool { * Whether the given position is immediately surrounded by braces. * * @param int $startPos Start position - * @param int $endPos End position + * @param int $endPos End position * * @return bool */ @@ -57,7 +57,7 @@ public function haveBraces(int $startPos, int $endPos): bool { * * During this check whitespace and comments are skipped. * - * @param int $pos Position before which the token should occur + * @param int $pos Position before which the token should occur * @param int|string $expectedTokenType Token to check for * * @return bool Whether the expected token was found @@ -82,7 +82,7 @@ public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType): bool { * * During this check whitespace and comments are skipped. * - * @param int $pos Position after which the token should occur + * @param int $pos Position after which the token should occur * @param int|string $expectedTokenType Token to check for * * @return bool Whether the expected token was found @@ -224,8 +224,8 @@ public function getIndentationBefore(int $pos): int { /** * Get the code corresponding to a token offset range, optionally adjusted for indentation. * - * @param int $from Token start position (inclusive) - * @param int $to Token end position (exclusive) + * @param int $from Token start position (inclusive) + * @param int $to Token end position (exclusive) * @param int $indent By how much the code should be indented (can be negative as well) * * @return string Code corresponding to token range, adjusted for indentation diff --git a/lib/PhpParser/NameContext.php b/lib/PhpParser/NameContext.php index 2377ef9ee4..292df691af 100644 --- a/lib/PhpParser/NameContext.php +++ b/lib/PhpParser/NameContext.php @@ -47,9 +47,9 @@ public function startNamespace(?Name $namespace = null): void { /** * Add an alias / import. * - * @param Name $name Original name - * @param string $aliasName Aliased name - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* + * @param Name $name Original name + * @param string $aliasName Aliased name + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * @param array $errorAttrs Attributes to use to report an error */ public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void { @@ -93,8 +93,8 @@ public function getNamespace(): ?Name { /** * Get resolved name. * - * @param Name $name Name to resolve - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} + * @param Name $name Name to resolve + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} * * @return null|Name Resolved name, or null if static resolution is not possible */ @@ -148,8 +148,8 @@ public function getResolvedClassName(Name $name): Name { /** * Get possible ways of writing a fully qualified name (e.g., by making use of aliases). * - * @param string $name Fully-qualified name (without leading namespace separator) - * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* + * @param string $name Fully-qualified name (without leading namespace separator) + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name[] Possible representations of the name */ @@ -204,7 +204,7 @@ public function getPossibleNames(string $name, int $type): array { /** * Get shortest representation of this fully-qualified name. * - * @param string $name Fully-qualified name (without leading namespace separator) + * @param string $name Fully-qualified name (without leading namespace separator) * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name Shortest representation diff --git a/lib/PhpParser/Node.php b/lib/PhpParser/Node.php index 43f9deb96b..4d82836a46 100644 --- a/lib/PhpParser/Node.php +++ b/lib/PhpParser/Node.php @@ -111,7 +111,7 @@ public function setDocComment(Comment\Doc $docComment): void; * Sets an attribute on a node. * * @param string $key - * @param mixed $value + * @param mixed $value */ public function setAttribute(string $key, $value): void; @@ -128,7 +128,7 @@ public function hasAttribute(string $key): bool; * Returns the value of an attribute. * * @param string $key - * @param mixed $default + * @param mixed $default * * @return mixed */ diff --git a/lib/PhpParser/Node/Arg.php b/lib/PhpParser/Node/Arg.php index c866a025a5..6680efac98 100644 --- a/lib/PhpParser/Node/Arg.php +++ b/lib/PhpParser/Node/Arg.php @@ -17,9 +17,9 @@ class Arg extends NodeAbstract { /** * 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 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 * @param Identifier|null $name Parameter name (for named parameters) */ diff --git a/lib/PhpParser/Node/ArrayItem.php b/lib/PhpParser/Node/ArrayItem.php index a466a3da68..fa1cff5276 100644 --- a/lib/PhpParser/Node/ArrayItem.php +++ b/lib/PhpParser/Node/ArrayItem.php @@ -17,9 +17,9 @@ class ArrayItem extends NodeAbstract { /** * Constructs an array item node. * - * @param Expr $value Value - * @param null|Expr $key Key - * @param bool $byRef Whether to assign by reference + * @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, bool $byRef = false, array $attributes = [], bool $unpack = false) { diff --git a/lib/PhpParser/Node/Attribute.php b/lib/PhpParser/Node/Attribute.php index 748b4b21b5..9d892436af 100644 --- a/lib/PhpParser/Node/Attribute.php +++ b/lib/PhpParser/Node/Attribute.php @@ -13,7 +13,7 @@ class Attribute extends NodeAbstract { public array $args; /** - * @param Node\Name $name Attribute name + * @param Node\Name $name Attribute name * @param list $args Attribute arguments * @param array $attributes Additional node attributes */ diff --git a/lib/PhpParser/Node/ClosureUse.php b/lib/PhpParser/Node/ClosureUse.php index e49d58af47..e313280b6c 100644 --- a/lib/PhpParser/Node/ClosureUse.php +++ b/lib/PhpParser/Node/ClosureUse.php @@ -13,8 +13,8 @@ class ClosureUse extends NodeAbstract { /** * Constructs a closure use node. * - * @param Expr\Variable $var Variable to use - * @param bool $byRef Whether to use by reference + * @param Expr\Variable $var Variable to use + * @param bool $byRef Whether to use by reference * @param array $attributes Additional attributes */ public function __construct(Expr\Variable $var, bool $byRef = false, array $attributes = []) { diff --git a/lib/PhpParser/Node/Const_.php b/lib/PhpParser/Node/Const_.php index eaac88d232..8b26ae86a4 100644 --- a/lib/PhpParser/Node/Const_.php +++ b/lib/PhpParser/Node/Const_.php @@ -16,8 +16,8 @@ class Const_ extends NodeAbstract { /** * Constructs a const node for use in class const and const statements. * - * @param string|Identifier $name Name - * @param Expr $value Value + * @param string|Identifier $name Name + * @param Expr $value Value * @param array $attributes Additional attributes */ public function __construct($name, Expr $value, array $attributes = []) { diff --git a/lib/PhpParser/Node/DeclareItem.php b/lib/PhpParser/Node/DeclareItem.php index 4b00a91877..55c1fe4f19 100644 --- a/lib/PhpParser/Node/DeclareItem.php +++ b/lib/PhpParser/Node/DeclareItem.php @@ -14,8 +14,8 @@ class DeclareItem extends NodeAbstract { /** * Constructs a declare key=>value pair node. * - * @param string|Node\Identifier $key Key - * @param Node\Expr $value Value + * @param string|Node\Identifier $key Key + * @param Node\Expr $value Value * @param array $attributes Additional attributes */ public function __construct($key, Node\Expr $value, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/ArrayDimFetch.php b/lib/PhpParser/Node/Expr/ArrayDimFetch.php index ae31d96084..24427bbc35 100644 --- a/lib/PhpParser/Node/Expr/ArrayDimFetch.php +++ b/lib/PhpParser/Node/Expr/ArrayDimFetch.php @@ -13,8 +13,8 @@ class ArrayDimFetch extends Expr { /** * Constructs an array index fetch node. * - * @param Expr $var Variable - * @param null|Expr $dim Array index / dim + * @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 = []) { diff --git a/lib/PhpParser/Node/Expr/Array_.php b/lib/PhpParser/Node/Expr/Array_.php index 6786a62d96..3c8c9c2fcf 100644 --- a/lib/PhpParser/Node/Expr/Array_.php +++ b/lib/PhpParser/Node/Expr/Array_.php @@ -16,7 +16,7 @@ class Array_ extends Expr { /** * Constructs an array node. * - * @param ArrayItem[] $items Items of the array + * @param ArrayItem[] $items Items of the array * @param array $attributes Additional attributes */ public function __construct(array $items = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Assign.php b/lib/PhpParser/Node/Expr/Assign.php index e06d7078ed..dcbf84dd41 100644 --- a/lib/PhpParser/Node/Expr/Assign.php +++ b/lib/PhpParser/Node/Expr/Assign.php @@ -13,8 +13,8 @@ class Assign extends Expr { /** * Constructs an assignment node. * - * @param Expr $var Variable - * @param Expr $expr Expression + * @param Expr $var Variable + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/AssignOp.php b/lib/PhpParser/Node/Expr/AssignOp.php index e21f34d2cf..5209a64b1f 100644 --- a/lib/PhpParser/Node/Expr/AssignOp.php +++ b/lib/PhpParser/Node/Expr/AssignOp.php @@ -13,8 +13,8 @@ abstract class AssignOp extends Expr { /** * Constructs a compound assignment operation node. * - * @param Expr $var Variable - * @param Expr $expr Expression + * @param Expr $var Variable + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/AssignRef.php b/lib/PhpParser/Node/Expr/AssignRef.php index 838a9e2aa7..9714650a54 100644 --- a/lib/PhpParser/Node/Expr/AssignRef.php +++ b/lib/PhpParser/Node/Expr/AssignRef.php @@ -13,8 +13,8 @@ class AssignRef extends Expr { /** * Constructs an assignment node. * - * @param Expr $var Variable - * @param Expr $expr Expression + * @param Expr $var Variable + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/BinaryOp.php b/lib/PhpParser/Node/Expr/BinaryOp.php index 82ac99b25c..1527999df6 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp.php +++ b/lib/PhpParser/Node/Expr/BinaryOp.php @@ -13,8 +13,8 @@ abstract class BinaryOp extends Expr { /** * Constructs a binary operator node. * - * @param Expr $left The left hand side expression - * @param Expr $right The right hand side expression + * @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 = []) { diff --git a/lib/PhpParser/Node/Expr/BitwiseNot.php b/lib/PhpParser/Node/Expr/BitwiseNot.php index 04b07fea83..b7175a7ae5 100644 --- a/lib/PhpParser/Node/Expr/BitwiseNot.php +++ b/lib/PhpParser/Node/Expr/BitwiseNot.php @@ -11,7 +11,7 @@ class BitwiseNot extends Expr { /** * Constructs a bitwise not node. * - * @param Expr $expr Expression + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/BooleanNot.php b/lib/PhpParser/Node/Expr/BooleanNot.php index 55de28930c..c66d23326d 100644 --- a/lib/PhpParser/Node/Expr/BooleanNot.php +++ b/lib/PhpParser/Node/Expr/BooleanNot.php @@ -11,7 +11,7 @@ class BooleanNot extends Expr { /** * Constructs a boolean not node. * - * @param Expr $expr Expression + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Cast.php b/lib/PhpParser/Node/Expr/Cast.php index 89843fc2fd..c2751de470 100644 --- a/lib/PhpParser/Node/Expr/Cast.php +++ b/lib/PhpParser/Node/Expr/Cast.php @@ -11,7 +11,7 @@ abstract class Cast extends Expr { /** * Constructs a cast node. * - * @param Expr $expr Expression + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Clone_.php b/lib/PhpParser/Node/Expr/Clone_.php index bb12bf056a..d85bc9ab42 100644 --- a/lib/PhpParser/Node/Expr/Clone_.php +++ b/lib/PhpParser/Node/Expr/Clone_.php @@ -11,7 +11,7 @@ class Clone_ extends Expr { /** * Constructs a clone node. * - * @param Expr $expr Expression + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/ConstFetch.php b/lib/PhpParser/Node/Expr/ConstFetch.php index a12291100a..47191c5f33 100644 --- a/lib/PhpParser/Node/Expr/ConstFetch.php +++ b/lib/PhpParser/Node/Expr/ConstFetch.php @@ -12,7 +12,7 @@ class ConstFetch extends Expr { /** * Constructs a const fetch node. * - * @param Name $name Constant name + * @param Name $name Constant name * @param array $attributes Additional attributes */ public function __construct(Name $name, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Empty_.php b/lib/PhpParser/Node/Expr/Empty_.php index 256567c709..d2f30506ba 100644 --- a/lib/PhpParser/Node/Expr/Empty_.php +++ b/lib/PhpParser/Node/Expr/Empty_.php @@ -11,7 +11,7 @@ class Empty_ extends Expr { /** * Constructs an empty() node. * - * @param Expr $expr Expression + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/ErrorSuppress.php b/lib/PhpParser/Node/Expr/ErrorSuppress.php index 47d48eceae..32625a2335 100644 --- a/lib/PhpParser/Node/Expr/ErrorSuppress.php +++ b/lib/PhpParser/Node/Expr/ErrorSuppress.php @@ -11,7 +11,7 @@ class ErrorSuppress extends Expr { /** * Constructs an error suppress node. * - * @param Expr $expr Expression + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Eval_.php b/lib/PhpParser/Node/Expr/Eval_.php index 98a048de17..5120b1b4f3 100644 --- a/lib/PhpParser/Node/Expr/Eval_.php +++ b/lib/PhpParser/Node/Expr/Eval_.php @@ -11,7 +11,7 @@ class Eval_ extends Expr { /** * Constructs an eval() node. * - * @param Expr $expr Expression + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Exit_.php b/lib/PhpParser/Node/Expr/Exit_.php index 4a50e18aa3..cf00246699 100644 --- a/lib/PhpParser/Node/Expr/Exit_.php +++ b/lib/PhpParser/Node/Expr/Exit_.php @@ -15,7 +15,7 @@ class Exit_ extends Expr { /** * Constructs an exit() node. * - * @param null|Expr $expr Expression + * @param null|Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(?Expr $expr = null, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Include_.php b/lib/PhpParser/Node/Expr/Include_.php index f8d31e31df..e1187b194f 100644 --- a/lib/PhpParser/Node/Expr/Include_.php +++ b/lib/PhpParser/Node/Expr/Include_.php @@ -18,8 +18,8 @@ class Include_ extends Expr { /** * Constructs an include node. * - * @param Expr $expr Expression - * @param int $type Type of include + * @param Expr $expr Expression + * @param int $type Type of include * @param array $attributes Additional attributes */ public function __construct(Expr $expr, int $type, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Isset_.php b/lib/PhpParser/Node/Expr/Isset_.php index 6ffa50e7c0..4f80fff723 100644 --- a/lib/PhpParser/Node/Expr/Isset_.php +++ b/lib/PhpParser/Node/Expr/Isset_.php @@ -11,7 +11,7 @@ class Isset_ extends Expr { /** * Constructs an array node. * - * @param Expr[] $vars Variables + * @param Expr[] $vars Variables * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/List_.php b/lib/PhpParser/Node/Expr/List_.php index dd0e596563..496b7b3853 100644 --- a/lib/PhpParser/Node/Expr/List_.php +++ b/lib/PhpParser/Node/Expr/List_.php @@ -16,7 +16,7 @@ class List_ extends Expr { /** * Constructs a list() destructuring node. * - * @param (ArrayItem|null)[] $items List of items to assign to + * @param (ArrayItem|null)[] $items List of items to assign to * @param array $attributes Additional attributes */ public function __construct(array $items, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/PostDec.php b/lib/PhpParser/Node/Expr/PostDec.php index 8545aa3e35..3dca8fdc5a 100644 --- a/lib/PhpParser/Node/Expr/PostDec.php +++ b/lib/PhpParser/Node/Expr/PostDec.php @@ -11,7 +11,7 @@ class PostDec extends Expr { /** * Constructs a post decrement node. * - * @param Expr $var Variable + * @param Expr $var Variable * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/PostInc.php b/lib/PhpParser/Node/Expr/PostInc.php index 21d09df20d..bc990c3030 100644 --- a/lib/PhpParser/Node/Expr/PostInc.php +++ b/lib/PhpParser/Node/Expr/PostInc.php @@ -11,7 +11,7 @@ class PostInc extends Expr { /** * Constructs a post increment node. * - * @param Expr $var Variable + * @param Expr $var Variable * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/PreDec.php b/lib/PhpParser/Node/Expr/PreDec.php index 9bed3f33ab..2f16873016 100644 --- a/lib/PhpParser/Node/Expr/PreDec.php +++ b/lib/PhpParser/Node/Expr/PreDec.php @@ -11,7 +11,7 @@ class PreDec extends Expr { /** * Constructs a pre decrement node. * - * @param Expr $var Variable + * @param Expr $var Variable * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/PreInc.php b/lib/PhpParser/Node/Expr/PreInc.php index 5dc25be85b..fd455f55b9 100644 --- a/lib/PhpParser/Node/Expr/PreInc.php +++ b/lib/PhpParser/Node/Expr/PreInc.php @@ -11,7 +11,7 @@ class PreInc extends Expr { /** * Constructs a pre increment node. * - * @param Expr $var Variable + * @param Expr $var Variable * @param array $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Print_.php b/lib/PhpParser/Node/Expr/Print_.php index 298c4d6d0e..605747604d 100644 --- a/lib/PhpParser/Node/Expr/Print_.php +++ b/lib/PhpParser/Node/Expr/Print_.php @@ -11,7 +11,7 @@ class Print_ extends Expr { /** * Constructs an print() node. * - * @param Expr $expr Expression + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Ternary.php b/lib/PhpParser/Node/Expr/Ternary.php index a7e8784efc..d4837e6402 100644 --- a/lib/PhpParser/Node/Expr/Ternary.php +++ b/lib/PhpParser/Node/Expr/Ternary.php @@ -15,9 +15,9 @@ class Ternary extends Expr { /** * Constructs a ternary operator node. * - * @param Expr $cond Condition - * @param null|Expr $if Expression for true - * @param Expr $else Expression for false + * @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, ?Expr $if, Expr $else, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Throw_.php b/lib/PhpParser/Node/Expr/Throw_.php index eda68bc52c..ee49f835fb 100644 --- a/lib/PhpParser/Node/Expr/Throw_.php +++ b/lib/PhpParser/Node/Expr/Throw_.php @@ -11,7 +11,7 @@ class Throw_ extends Node\Expr { /** * Constructs a throw expression node. * - * @param Node\Expr $expr Expression + * @param Node\Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/UnaryMinus.php b/lib/PhpParser/Node/Expr/UnaryMinus.php index 3de64c46d8..cd06f74bab 100644 --- a/lib/PhpParser/Node/Expr/UnaryMinus.php +++ b/lib/PhpParser/Node/Expr/UnaryMinus.php @@ -11,7 +11,7 @@ class UnaryMinus extends Expr { /** * Constructs a unary minus node. * - * @param Expr $expr Expression + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/UnaryPlus.php b/lib/PhpParser/Node/Expr/UnaryPlus.php index 4f89284e5b..1b44f7b3e7 100644 --- a/lib/PhpParser/Node/Expr/UnaryPlus.php +++ b/lib/PhpParser/Node/Expr/UnaryPlus.php @@ -11,7 +11,7 @@ class UnaryPlus extends Expr { /** * Constructs a unary plus node. * - * @param Expr $expr Expression + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Variable.php b/lib/PhpParser/Node/Expr/Variable.php index 43ad3e5db3..bab74920a1 100644 --- a/lib/PhpParser/Node/Expr/Variable.php +++ b/lib/PhpParser/Node/Expr/Variable.php @@ -11,7 +11,7 @@ class Variable extends Expr { /** * Constructs a variable node. * - * @param string|Expr $name Name + * @param string|Expr $name Name * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/YieldFrom.php b/lib/PhpParser/Node/Expr/YieldFrom.php index e632144567..5cff88f869 100644 --- a/lib/PhpParser/Node/Expr/YieldFrom.php +++ b/lib/PhpParser/Node/Expr/YieldFrom.php @@ -11,7 +11,7 @@ class YieldFrom extends Expr { /** * Constructs an "yield from" node. * - * @param Expr $expr Expression + * @param Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Expr/Yield_.php b/lib/PhpParser/Node/Expr/Yield_.php index 065b1d2e39..bd81e69b31 100644 --- a/lib/PhpParser/Node/Expr/Yield_.php +++ b/lib/PhpParser/Node/Expr/Yield_.php @@ -13,8 +13,8 @@ class Yield_ extends Expr { /** * Constructs a yield expression node. * - * @param null|Expr $value Value expression - * @param null|Expr $key Key expression + * @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 = []) { diff --git a/lib/PhpParser/Node/Identifier.php b/lib/PhpParser/Node/Identifier.php index e0e28406f5..266166cbb6 100644 --- a/lib/PhpParser/Node/Identifier.php +++ b/lib/PhpParser/Node/Identifier.php @@ -21,7 +21,7 @@ class Identifier extends NodeAbstract { /** * Constructs an identifier node. * - * @param string $name Identifier as string + * @param string $name Identifier as string * @param array $attributes Additional attributes */ public function __construct(string $name, array $attributes = []) { diff --git a/lib/PhpParser/Node/InterpolatedStringPart.php b/lib/PhpParser/Node/InterpolatedStringPart.php index eddd7406ee..576dac46f5 100644 --- a/lib/PhpParser/Node/InterpolatedStringPart.php +++ b/lib/PhpParser/Node/InterpolatedStringPart.php @@ -11,7 +11,7 @@ class InterpolatedStringPart extends NodeAbstract { /** * Constructs a node representing a string part of an interpolated string. * - * @param string $value String value + * @param string $value String value * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { diff --git a/lib/PhpParser/Node/IntersectionType.php b/lib/PhpParser/Node/IntersectionType.php index b4783d0dc8..3b39cf105b 100644 --- a/lib/PhpParser/Node/IntersectionType.php +++ b/lib/PhpParser/Node/IntersectionType.php @@ -9,7 +9,7 @@ class IntersectionType extends ComplexType { /** * Constructs an intersection type. * - * @param (Identifier|Name)[] $types Types + * @param (Identifier|Name)[] $types Types * @param array $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index 8270c5dbec..26b863e40b 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -18,7 +18,7 @@ class Name extends NodeAbstract { /** * Constructs a name node. * - * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) + * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) * @param array $attributes Additional attributes */ final public function __construct($name, array $attributes = []) { @@ -159,7 +159,7 @@ public function __toString(): string { * * 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 $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 @@ -209,8 +209,8 @@ public function slice(int $offset, ?int $length = null) { * Name::concat($namespace, $shortName) * where $namespace is a Name node or null will work as expected. * - * @param string|string[]|self|null $name1 The first name - * @param string|string[]|self|null $name2 The second name + * @param string|string[]|self|null $name1 The first name + * @param string|string[]|self|null $name2 The second name * @param array $attributes Attributes to assign to concatenated name * * @return static|null Concatenated name diff --git a/lib/PhpParser/Node/PropertyItem.php b/lib/PhpParser/Node/PropertyItem.php index 7ba36c2fb6..62ad5aa70a 100644 --- a/lib/PhpParser/Node/PropertyItem.php +++ b/lib/PhpParser/Node/PropertyItem.php @@ -13,8 +13,8 @@ class PropertyItem extends Node\Stmt { /** * Constructs a class property item node. * - * @param string|Node\VarLikeIdentifier $name Name - * @param null|Node\Expr $default Default value + * @param string|Node\VarLikeIdentifier $name Name + * @param null|Node\Expr $default Default value * @param array $attributes Additional attributes */ public function __construct($name, ?Node\Expr $default = null, array $attributes = []) { diff --git a/lib/PhpParser/Node/Scalar/Float_.php b/lib/PhpParser/Node/Scalar/Float_.php index a33946b67a..5af1319237 100644 --- a/lib/PhpParser/Node/Scalar/Float_.php +++ b/lib/PhpParser/Node/Scalar/Float_.php @@ -11,7 +11,7 @@ class Float_ extends Scalar { /** * Constructs a float number scalar node. * - * @param float $value Value of the number + * @param float $value Value of the number * @param array $attributes Additional attributes */ public function __construct(float $value, array $attributes = []) { diff --git a/lib/PhpParser/Node/Scalar/Int_.php b/lib/PhpParser/Node/Scalar/Int_.php index baa976dcd2..bcc257a6a1 100644 --- a/lib/PhpParser/Node/Scalar/Int_.php +++ b/lib/PhpParser/Node/Scalar/Int_.php @@ -18,7 +18,7 @@ class Int_ extends Scalar { /** * Constructs an integer number scalar node. * - * @param int $value Value of the number + * @param int $value Value of the number * @param array $attributes Additional attributes */ public function __construct(int $value, array $attributes = []) { @@ -33,9 +33,9 @@ public function getSubNodeNames(): array { /** * Constructs an Int 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) + * @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 Int_ The constructed LNumber, including kind attribute */ diff --git a/lib/PhpParser/Node/Scalar/InterpolatedString.php b/lib/PhpParser/Node/Scalar/InterpolatedString.php index 88397bc402..9336dfe4da 100644 --- a/lib/PhpParser/Node/Scalar/InterpolatedString.php +++ b/lib/PhpParser/Node/Scalar/InterpolatedString.php @@ -13,7 +13,7 @@ class InterpolatedString extends Scalar { /** * Constructs an interpolated string node. * - * @param (Expr|InterpolatedStringPart)[] $parts Interpolated string parts + * @param (Expr|InterpolatedStringPart)[] $parts Interpolated string parts * @param array $attributes Additional attributes */ public function __construct(array $parts, array $attributes = []) { diff --git a/lib/PhpParser/Node/Scalar/String_.php b/lib/PhpParser/Node/Scalar/String_.php index ddd8550488..c965366d43 100644 --- a/lib/PhpParser/Node/Scalar/String_.php +++ b/lib/PhpParser/Node/Scalar/String_.php @@ -30,7 +30,7 @@ class String_ extends Scalar { /** * Constructs a string scalar node. * - * @param string $value Value of the string + * @param string $value Value of the string * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { @@ -92,7 +92,7 @@ public static function parse(string $str, bool $parseUnicodeEscape = true): stri * * Parses escape sequences in strings (all string types apart from single quoted). * - * @param string $str String without quotes + * @param string $str String without quotes * @param null|string $quote Quote type * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes * diff --git a/lib/PhpParser/Node/StaticVar.php b/lib/PhpParser/Node/StaticVar.php index 7d7d3037ac..517c0edddd 100644 --- a/lib/PhpParser/Node/StaticVar.php +++ b/lib/PhpParser/Node/StaticVar.php @@ -14,8 +14,8 @@ class StaticVar extends NodeAbstract { /** * Constructs a static variable node. * - * @param Expr\Variable $var Name - * @param null|Node\Expr $default Default value + * @param Expr\Variable $var Name + * @param null|Node\Expr $default Default value * @param array $attributes Additional attributes */ public function __construct( diff --git a/lib/PhpParser/Node/Stmt/Break_.php b/lib/PhpParser/Node/Stmt/Break_.php index a52fac8f12..d2bcc5eb2d 100644 --- a/lib/PhpParser/Node/Stmt/Break_.php +++ b/lib/PhpParser/Node/Stmt/Break_.php @@ -11,7 +11,7 @@ class Break_ extends Node\Stmt { /** * Constructs a break node. * - * @param null|Node\Expr $num Number of loops to break + * @param null|Node\Expr $num Number of loops to break * @param array $attributes Additional attributes */ public function __construct(?Node\Expr $num = null, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Case_.php b/lib/PhpParser/Node/Stmt/Case_.php index 207ed0bcaa..a06ca1832e 100644 --- a/lib/PhpParser/Node/Stmt/Case_.php +++ b/lib/PhpParser/Node/Stmt/Case_.php @@ -13,8 +13,8 @@ class Case_ extends Node\Stmt { /** * Constructs a case node. * - * @param null|Node\Expr $cond Condition (null for default) - * @param Node\Stmt[] $stmts Statements + * @param null|Node\Expr $cond Condition (null for default) + * @param Node\Stmt[] $stmts Statements * @param array $attributes Additional attributes */ public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Catch_.php b/lib/PhpParser/Node/Stmt/Catch_.php index 9fa0add532..e8d39c9cce 100644 --- a/lib/PhpParser/Node/Stmt/Catch_.php +++ b/lib/PhpParser/Node/Stmt/Catch_.php @@ -16,9 +16,9 @@ class Catch_ extends Node\Stmt { /** * Constructs a catch node. * - * @param Node\Name[] $types Types of exceptions to catch - * @param Expr\Variable|null $var Variable for exception - * @param Node\Stmt[] $stmts Statements + * @param Node\Name[] $types Types of exceptions to catch + * @param Expr\Variable|null $var Variable for exception + * @param Node\Stmt[] $stmts Statements * @param array $attributes Additional attributes */ public function __construct( diff --git a/lib/PhpParser/Node/Stmt/Const_.php b/lib/PhpParser/Node/Stmt/Const_.php index 8f7f7b0e87..f1165fd0b0 100644 --- a/lib/PhpParser/Node/Stmt/Const_.php +++ b/lib/PhpParser/Node/Stmt/Const_.php @@ -11,7 +11,7 @@ class Const_ extends Node\Stmt { /** * Constructs a const list node. * - * @param Node\Const_[] $consts Constant declarations + * @param Node\Const_[] $consts Constant declarations * @param array $attributes Additional attributes */ public function __construct(array $consts, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Continue_.php b/lib/PhpParser/Node/Stmt/Continue_.php index 781f36144d..54e979ddaa 100644 --- a/lib/PhpParser/Node/Stmt/Continue_.php +++ b/lib/PhpParser/Node/Stmt/Continue_.php @@ -11,7 +11,7 @@ class Continue_ extends Node\Stmt { /** * Constructs a continue node. * - * @param null|Node\Expr $num Number of loops to continue + * @param null|Node\Expr $num Number of loops to continue * @param array $attributes Additional attributes */ public function __construct(?Node\Expr $num = null, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Declare_.php b/lib/PhpParser/Node/Stmt/Declare_.php index 3b0a99f0cf..3c0547bdf2 100644 --- a/lib/PhpParser/Node/Stmt/Declare_.php +++ b/lib/PhpParser/Node/Stmt/Declare_.php @@ -14,8 +14,8 @@ class Declare_ extends Node\Stmt { /** * Constructs a declare node. * - * @param DeclareItem[] $declares List of declares - * @param Node\Stmt[]|null $stmts Statements + * @param DeclareItem[] $declares List of declares + * @param Node\Stmt[]|null $stmts Statements * @param array $attributes Additional attributes */ public function __construct(array $declares, ?array $stmts = null, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Do_.php b/lib/PhpParser/Node/Stmt/Do_.php index 1657a75983..6124442881 100644 --- a/lib/PhpParser/Node/Stmt/Do_.php +++ b/lib/PhpParser/Node/Stmt/Do_.php @@ -13,8 +13,8 @@ class Do_ extends Node\Stmt { /** * Constructs a do while node. * - * @param Node\Expr $cond Condition - * @param Node\Stmt[] $stmts Statements + * @param Node\Expr $cond Condition + * @param Node\Stmt[] $stmts Statements * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Echo_.php b/lib/PhpParser/Node/Stmt/Echo_.php index c812669cff..4d42452353 100644 --- a/lib/PhpParser/Node/Stmt/Echo_.php +++ b/lib/PhpParser/Node/Stmt/Echo_.php @@ -11,7 +11,7 @@ class Echo_ extends Node\Stmt { /** * Constructs an echo node. * - * @param Node\Expr[] $exprs Expressions + * @param Node\Expr[] $exprs Expressions * @param array $attributes Additional attributes */ public function __construct(array $exprs, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/ElseIf_.php b/lib/PhpParser/Node/Stmt/ElseIf_.php index 22646103a5..b26d59ce5f 100644 --- a/lib/PhpParser/Node/Stmt/ElseIf_.php +++ b/lib/PhpParser/Node/Stmt/ElseIf_.php @@ -13,8 +13,8 @@ class ElseIf_ extends Node\Stmt { /** * Constructs an elseif node. * - * @param Node\Expr $cond Condition - * @param Node\Stmt[] $stmts Statements + * @param Node\Expr $cond Condition + * @param Node\Stmt[] $stmts Statements * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Else_.php b/lib/PhpParser/Node/Stmt/Else_.php index dabca59a5f..3d2b066ec9 100644 --- a/lib/PhpParser/Node/Stmt/Else_.php +++ b/lib/PhpParser/Node/Stmt/Else_.php @@ -11,7 +11,7 @@ class Else_ extends Node\Stmt { /** * Constructs an else node. * - * @param Node\Stmt[] $stmts Statements + * @param Node\Stmt[] $stmts Statements * @param array $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/EnumCase.php b/lib/PhpParser/Node/Stmt/EnumCase.php index 7cf57ee745..c071a0af13 100644 --- a/lib/PhpParser/Node/Stmt/EnumCase.php +++ b/lib/PhpParser/Node/Stmt/EnumCase.php @@ -14,8 +14,8 @@ class EnumCase extends Node\Stmt { public array $attrGroups; /** - * @param string|Node\Identifier $name Enum case name - * @param Node\Expr|null $expr Enum case expression + * @param string|Node\Identifier $name Enum case name + * @param Node\Expr|null $expr Enum case expression * @param list $attrGroups PHP attribute groups * @param array $attributes Additional attributes */ diff --git a/lib/PhpParser/Node/Stmt/Expression.php b/lib/PhpParser/Node/Stmt/Expression.php index 1f1b9f931c..89751fa2dc 100644 --- a/lib/PhpParser/Node/Stmt/Expression.php +++ b/lib/PhpParser/Node/Stmt/Expression.php @@ -14,7 +14,7 @@ class Expression extends Node\Stmt { /** * Constructs an expression statement. * - * @param Node\Expr $expr Expression + * @param Node\Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Finally_.php b/lib/PhpParser/Node/Stmt/Finally_.php index 51a3602330..69ecf25373 100644 --- a/lib/PhpParser/Node/Stmt/Finally_.php +++ b/lib/PhpParser/Node/Stmt/Finally_.php @@ -11,7 +11,7 @@ class Finally_ extends Node\Stmt { /** * Constructs a finally node. * - * @param Node\Stmt[] $stmts Statements + * @param Node\Stmt[] $stmts Statements * @param array $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Foreach_.php b/lib/PhpParser/Node/Stmt/Foreach_.php index 0530d4e1a0..c5d9a8b132 100644 --- a/lib/PhpParser/Node/Stmt/Foreach_.php +++ b/lib/PhpParser/Node/Stmt/Foreach_.php @@ -19,8 +19,8 @@ class Foreach_ extends Node\Stmt { /** * Constructs a foreach node. * - * @param Node\Expr $expr Expression to iterate - * @param Node\Expr $valueVar Variable to assign value to + * @param Node\Expr $expr Expression to iterate + * @param Node\Expr $valueVar Variable to assign value to * @param array{ * keyVar?: Node\Expr|null, * byRef?: bool, diff --git a/lib/PhpParser/Node/Stmt/Global_.php b/lib/PhpParser/Node/Stmt/Global_.php index 20b3ef10c1..d3ab12fc24 100644 --- a/lib/PhpParser/Node/Stmt/Global_.php +++ b/lib/PhpParser/Node/Stmt/Global_.php @@ -11,7 +11,7 @@ class Global_ extends Node\Stmt { /** * Constructs a global variables list node. * - * @param Node\Expr[] $vars Variables to unset + * @param Node\Expr[] $vars Variables to unset * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Goto_.php b/lib/PhpParser/Node/Stmt/Goto_.php index f59578040c..26a0d01eae 100644 --- a/lib/PhpParser/Node/Stmt/Goto_.php +++ b/lib/PhpParser/Node/Stmt/Goto_.php @@ -12,7 +12,7 @@ class Goto_ extends Stmt { /** * Constructs a goto node. * - * @param string|Identifier $name Name of label to jump to + * @param string|Identifier $name Name of label to jump to * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/GroupUse.php b/lib/PhpParser/Node/Stmt/GroupUse.php index 8be8102a60..0ec8e9d42b 100644 --- a/lib/PhpParser/Node/Stmt/GroupUse.php +++ b/lib/PhpParser/Node/Stmt/GroupUse.php @@ -19,9 +19,9 @@ class GroupUse extends Stmt { /** * Constructs a group use node. * - * @param Name $prefix Prefix for uses - * @param UseItem[] $uses Uses - * @param Use_::TYPE_* $type Type of group use + * @param Name $prefix Prefix for uses + * @param UseItem[] $uses Uses + * @param Use_::TYPE_* $type Type of group use * @param array $attributes Additional attributes */ public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/HaltCompiler.php b/lib/PhpParser/Node/Stmt/HaltCompiler.php index 59a8d3edca..665bacdee2 100644 --- a/lib/PhpParser/Node/Stmt/HaltCompiler.php +++ b/lib/PhpParser/Node/Stmt/HaltCompiler.php @@ -11,7 +11,7 @@ class HaltCompiler extends Stmt { /** * Constructs a __halt_compiler node. * - * @param string $remaining Remaining text after halt compiler statement. + * @param string $remaining Remaining text after halt compiler statement. * @param array $attributes Additional attributes */ public function __construct(string $remaining, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/InlineHTML.php b/lib/PhpParser/Node/Stmt/InlineHTML.php index 17cc3fc9e1..0515d02054 100644 --- a/lib/PhpParser/Node/Stmt/InlineHTML.php +++ b/lib/PhpParser/Node/Stmt/InlineHTML.php @@ -11,7 +11,7 @@ class InlineHTML extends Stmt { /** * Constructs an inline HTML node. * - * @param string $value String + * @param string $value String * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Label.php b/lib/PhpParser/Node/Stmt/Label.php index 3cc9259c1e..658468d2f6 100644 --- a/lib/PhpParser/Node/Stmt/Label.php +++ b/lib/PhpParser/Node/Stmt/Label.php @@ -12,7 +12,7 @@ class Label extends Stmt { /** * Constructs a label node. * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * @param array $attributes Additional attributes */ public function __construct($name, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Namespace_.php b/lib/PhpParser/Node/Stmt/Namespace_.php index 5d16a0630e..f5b59ad6e3 100644 --- a/lib/PhpParser/Node/Stmt/Namespace_.php +++ b/lib/PhpParser/Node/Stmt/Namespace_.php @@ -17,8 +17,8 @@ class Namespace_ extends Node\Stmt { /** * Constructs a namespace node. * - * @param null|Node\Name $name Name - * @param null|Node\Stmt[] $stmts Statements + * @param null|Node\Name $name Name + * @param null|Node\Stmt[] $stmts Statements * @param array $attributes Additional attributes */ public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Return_.php b/lib/PhpParser/Node/Stmt/Return_.php index 87b9aae6ee..9c44cca85c 100644 --- a/lib/PhpParser/Node/Stmt/Return_.php +++ b/lib/PhpParser/Node/Stmt/Return_.php @@ -11,7 +11,7 @@ class Return_ extends Node\Stmt { /** * Constructs a return node. * - * @param null|Node\Expr $expr Expression + * @param null|Node\Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(?Node\Expr $expr = null, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Static_.php b/lib/PhpParser/Node/Stmt/Static_.php index d565bcde7e..a84de106ac 100644 --- a/lib/PhpParser/Node/Stmt/Static_.php +++ b/lib/PhpParser/Node/Stmt/Static_.php @@ -12,7 +12,7 @@ class Static_ extends Stmt { /** * Constructs a static variables list node. * - * @param StaticVar[] $vars Variable definitions + * @param StaticVar[] $vars Variable definitions * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Switch_.php b/lib/PhpParser/Node/Stmt/Switch_.php index e550ca7e66..21e5efa569 100644 --- a/lib/PhpParser/Node/Stmt/Switch_.php +++ b/lib/PhpParser/Node/Stmt/Switch_.php @@ -13,8 +13,8 @@ class Switch_ extends Node\Stmt { /** * Constructs a case node. * - * @param Node\Expr $cond Condition - * @param Case_[] $cases Case list + * @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 = []) { diff --git a/lib/PhpParser/Node/Stmt/Throw_.php b/lib/PhpParser/Node/Stmt/Throw_.php index 173b9a8524..52a7ae403b 100644 --- a/lib/PhpParser/Node/Stmt/Throw_.php +++ b/lib/PhpParser/Node/Stmt/Throw_.php @@ -11,7 +11,7 @@ class Throw_ extends Node\Stmt { /** * Constructs a legacy throw statement node. * - * @param Node\Expr $expr Expression + * @param Node\Expr $expr Expression * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/TraitUse.php b/lib/PhpParser/Node/Stmt/TraitUse.php index 70ddab4518..7705a57057 100644 --- a/lib/PhpParser/Node/Stmt/TraitUse.php +++ b/lib/PhpParser/Node/Stmt/TraitUse.php @@ -13,9 +13,9 @@ class TraitUse extends Node\Stmt { /** * Constructs a trait use node. * - * @param Node\Name[] $traits Traits + * @param Node\Name[] $traits Traits * @param TraitUseAdaptation[] $adaptations Adaptations - * @param array $attributes Additional attributes + * @param array $attributes Additional attributes */ public function __construct(array $traits, array $adaptations = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php index 395aec1d83..449671e771 100644 --- a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +++ b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php @@ -13,11 +13,11 @@ class Alias extends Node\Stmt\TraitUseAdaptation { /** * Constructs a trait use precedence adaptation node. * - * @param null|Node\Name $trait Trait name - * @param string|Node\Identifier $method Method name - * @param null|int $newModifier New modifier - * @param null|string|Node\Identifier $newName New name - * @param array $attributes Additional attributes + * @param null|Node\Name $trait Trait name + * @param string|Node\Identifier $method Method name + * @param null|int $newModifier New modifier + * @param null|string|Node\Identifier $newName New name + * @param array $attributes Additional attributes */ public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php index 0daf86d4a1..7bc4083769 100644 --- a/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +++ b/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php @@ -11,10 +11,10 @@ class Precedence extends Node\Stmt\TraitUseAdaptation { /** * Constructs a trait use precedence adaptation node. * - * @param Node\Name $trait Trait name - * @param string|Node\Identifier $method Method name - * @param Node\Name[] $insteadof Overwritten traits - * @param array $attributes Additional attributes + * @param Node\Name $trait Trait name + * @param string|Node\Identifier $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 = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Stmt/TryCatch.php b/lib/PhpParser/Node/Stmt/TryCatch.php index 02b7d3d230..6414c46c94 100644 --- a/lib/PhpParser/Node/Stmt/TryCatch.php +++ b/lib/PhpParser/Node/Stmt/TryCatch.php @@ -15,9 +15,9 @@ class TryCatch extends Node\Stmt { /** * Constructs a try catch node. * - * @param Node\Stmt[] $stmts Statements - * @param Catch_[] $catches Catches - * @param null|Finally_ $finally Optional finally node + * @param Node\Stmt[] $stmts Statements + * @param Catch_[] $catches Catches + * @param null|Finally_ $finally Optional finally node * @param array $attributes Additional attributes */ public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Unset_.php b/lib/PhpParser/Node/Stmt/Unset_.php index d102c9006a..c211beb0c5 100644 --- a/lib/PhpParser/Node/Stmt/Unset_.php +++ b/lib/PhpParser/Node/Stmt/Unset_.php @@ -11,7 +11,7 @@ class Unset_ extends Node\Stmt { /** * Constructs an unset node. * - * @param Node\Expr[] $vars Variables to unset + * @param Node\Expr[] $vars Variables to unset * @param array $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/Use_.php b/lib/PhpParser/Node/Stmt/Use_.php index 399a7ef27d..5b2d864832 100644 --- a/lib/PhpParser/Node/Stmt/Use_.php +++ b/lib/PhpParser/Node/Stmt/Use_.php @@ -27,8 +27,8 @@ class Use_ extends Stmt { /** * Constructs an alias (use) list node. * - * @param UseItem[] $uses Aliases - * @param Stmt\Use_::TYPE_* $type Type of alias + * @param UseItem[] $uses Aliases + * @param Stmt\Use_::TYPE_* $type Type of alias * @param array $attributes Additional attributes */ public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { diff --git a/lib/PhpParser/Node/Stmt/While_.php b/lib/PhpParser/Node/Stmt/While_.php index 1bb691884f..2f7aed2343 100644 --- a/lib/PhpParser/Node/Stmt/While_.php +++ b/lib/PhpParser/Node/Stmt/While_.php @@ -13,8 +13,8 @@ class While_ extends Node\Stmt { /** * Constructs a while node. * - * @param Node\Expr $cond Condition - * @param Node\Stmt[] $stmts Statements + * @param Node\Expr $cond Condition + * @param Node\Stmt[] $stmts Statements * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { diff --git a/lib/PhpParser/Node/UnionType.php b/lib/PhpParser/Node/UnionType.php index d418ee3c5c..bad88d2b8b 100644 --- a/lib/PhpParser/Node/UnionType.php +++ b/lib/PhpParser/Node/UnionType.php @@ -9,7 +9,7 @@ class UnionType extends ComplexType { /** * Constructs a union type. * - * @param (Identifier|Name|IntersectionType)[] $types Types + * @param (Identifier|Name|IntersectionType)[] $types Types * @param array $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { diff --git a/lib/PhpParser/Node/UseItem.php b/lib/PhpParser/Node/UseItem.php index c2b371b2e6..6b3a66372e 100644 --- a/lib/PhpParser/Node/UseItem.php +++ b/lib/PhpParser/Node/UseItem.php @@ -18,10 +18,10 @@ class UseItem extends Node\Stmt { /** * Constructs an alias (use) item node. * - * @param Node\Name $name Namespace/Class to alias - * @param null|string|Identifier $alias Alias - * @param Use_::TYPE_* $type Type of the use element (for mixed group use only) - * @param array $attributes Additional attributes + * @param Node\Name $name Namespace/Class to alias + * @param null|string|Identifier $alias Alias + * @param Use_::TYPE_* $type Type of the use element (for mixed group use only) + * @param array $attributes Additional attributes */ public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index 46fa64b9d7..e382d4a06e 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -33,7 +33,7 @@ public function __construct(array $options = []) { /** * Dumps a node or array. * - * @param array|Node $node Node or array to dump + * @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. diff --git a/lib/PhpParser/NodeFinder.php b/lib/PhpParser/NodeFinder.php index 8901ef92fa..e5aa116506 100644 --- a/lib/PhpParser/NodeFinder.php +++ b/lib/PhpParser/NodeFinder.php @@ -9,8 +9,8 @@ class NodeFinder { /** * Find all nodes satisfying a filter callback. * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param callable $filter Filter callback: function(Node $node) : bool + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param callable $filter Filter callback: function(Node $node) : bool * * @return Node[] Found nodes satisfying the filter callback */ @@ -32,10 +32,10 @@ public function find($nodes, callable $filter): array { * @template TNode as Node * - * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param Node|Node[] $nodes Single node or array of nodes to search in * @param class-string $class Class name * - * @return TNode[] Found nodes (all instances of $class) + * @return TNode[] Found nodes (all instances of $class) */ public function findInstanceOf($nodes, string $class): array { return $this->find($nodes, function ($node) use ($class) { @@ -46,8 +46,8 @@ public function findInstanceOf($nodes, string $class): array { /** * Find first node satisfying a filter callback. * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param callable $filter Filter callback: function(Node $node) : bool + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param callable $filter Filter callback: function(Node $node) : bool * * @return null|Node Found node (or null if none found) */ @@ -69,10 +69,10 @@ public function findFirst($nodes, callable $filter): ?Node { * * @template TNode as Node * - * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param Node|Node[] $nodes Single node or array of nodes to search in * @param class-string $class Class name * - * @return null|TNode Found node, which is an instance of $class (or null if none found) + * @return null|TNode Found node, which is an instance of $class (or null if none found) */ public function findFirstInstanceOf($nodes, string $class): ?Node { return $this->findFirst($nodes, function ($node) use ($class) { diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index 3149a6e1fd..c808150679 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -206,7 +206,7 @@ private function resolveType(?Node $node): ?Node { /** * Resolve name, according to name resolver options. * - * @param Name $name Function or constant name to resolve + * @param Name $name Function or constant name to resolve * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name Resolved name, or original name with attribute diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 6cfb98d253..42eebc3f4a 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -146,10 +146,10 @@ abstract protected function initReduceCallbacks(): void; * * @param Lexer $lexer A lexer * @param PhpVersion $phpVersion PHP version to target, defaults to latest supported. This - * option is best-effort: Even if specified, parsing will generally assume the latest - * supported version and only adjust behavior in minor ways, for example by omitting - * errors in older versions and interpreting type hints as a name or identifier depending - * on version. + * option is best-effort: Even if specified, parsing will generally assume the latest + * supported version and only adjust behavior in minor ways, for example by omitting + * errors in older versions and interpreting type hints as a name or identifier depending + * on version. */ public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { $this->lexer = $lexer; @@ -416,7 +416,7 @@ protected function emitError(Error $error): void { * Format error message including expected tokens. * * @param int $symbol Unexpected symbol - * @param int $state State at time of error + * @param int $state State at time of error * * @return string Formatted error message */ diff --git a/lib/PhpParser/ParserFactory.php b/lib/PhpParser/ParserFactory.php index d3d44ea71d..b70991808d 100644 --- a/lib/PhpParser/ParserFactory.php +++ b/lib/PhpParser/ParserFactory.php @@ -12,7 +12,7 @@ class ParserFactory { /** * Creates a Parser instance, according to the provided kind. * - * @param int $kind One of ::PREFER_PHP7 or ::ONLY_PHP7 + * @param int $kind One of ::PREFER_PHP7 or ::ONLY_PHP7 * @param Lexer|null $lexer Lexer to use. Defaults to emulative lexer when not specified * * @return Parser The parser instance diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 39d36c39b6..9924d23a23 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -127,20 +127,20 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { protected array $labelCharMap; /** * @var array> Map from token classes and subnode names to FIXUP_* constants. - * This is used during format-preserving prints to place additional parens/braces if necessary. + * This is used during format-preserving prints to place additional parens/braces if necessary. */ protected array $fixupMap; /** * @var array Map from "{$node->getType()}->{$subNode}" - * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped - * when removing this node. + * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped + * when removing this node. */ protected array $removalMap; /** * @var array Map from - * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. - * $find is an optional token after which the insertion occurs. $extraLeft/Right - * are optionally added before/after the main insertions. + * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. + * $find is an optional token after which the insertion occurs. $extraLeft/Right + * are optionally added before/after the main insertions. */ protected array $insertionMap; /** @@ -315,8 +315,8 @@ protected function handleMagicTokens(string $str): string { /** * 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 + * @param Node[] $nodes Array of nodes + * @param bool $indent Whether to indent the printed nodes * * @return string Pretty printed statements */ @@ -348,12 +348,12 @@ protected function pStmts(array $nodes, bool $indent = true): string { /** * Pretty-print an infix operation while taking precedence into account. * - * @param string $class Node class of operator - * @param Node $leftNode Left-hand side node + * @param string $class Node class of operator + * @param Node $leftNode Left-hand side node * @param string $operatorString String representation of the operator - * @param Node $rightNode Right-hand side node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * @param Node $rightNode Right-hand side node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * * @return string Pretty printed infix operation */ @@ -376,11 +376,11 @@ protected function pInfixOp( /** * Pretty-print a prefix operation while taking precedence into account. * - * @param string $class Node class of operator + * @param string $class Node class of operator * @param string $operatorString String representation of the operator - * @param Node $node Node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * * @return string Pretty printed prefix operation */ @@ -406,11 +406,11 @@ protected function pPrefixOp(string $class, string $operatorString, Node $node, /** * Pretty-print a postfix operation while taking precedence into account. * - * @param string $class Node class of operator + * @param string $class Node class of operator * @param string $operatorString String representation of the operator - * @param Node $node Node - * @param int $precedence Precedence of parent operator - * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * * @return string Pretty printed postfix operation */ @@ -433,7 +433,7 @@ protected function pPostfixOp(string $class, Node $node, string $operatorString, * 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 + * @param string $glue Character to implode with * * @return string Imploded pretty printed nodes> $pre */ @@ -466,8 +466,8 @@ protected function pCommaSeparated(array $nodes): string { * * The result includes a leading newline and one level of indentation (same as pStmts). * - * @param Node[] $nodes Array of Nodes to be printed - * @param bool $trailingComma Whether to use a trailing comma + * @param Node[] $nodes Array of Nodes to be printed + * @param bool $trailingComma Whether to use a trailing comma * * @return string Comma separated pretty printed nodes in multiline style */ @@ -524,8 +524,8 @@ protected function pComments(array $comments): string { * * The CloningVisitor must be run on the AST prior to modification. * * The original tokens must be provided, using the getTokens() method on the lexer. * - * @param Node[] $stmts Modified AST with links to original AST - * @param Node[] $origStmts Original AST with token offset information + * @param Node[] $stmts Modified AST with links to original AST + * @param Node[] $origStmts Original AST with token offset information * @param Token[] $origTokens Tokens of the original code * * @return string @@ -743,13 +743,13 @@ protected function p( /** * Perform a format-preserving pretty print of an array. * - * @param Node[] $nodes New nodes - * @param Node[] $origNodes Original nodes - * @param int $pos Current token position (updated by reference) - * @param int $indentAdjustment Adjustment for indentation - * @param string $parentNodeClass Class of the containing node. - * @param string $subNodeName Name of array subnode. - * @param null|int $fixup Fixup information for array item nodes + * @param Node[] $nodes New nodes + * @param Node[] $origNodes Original nodes + * @param int $pos Current token position (updated by reference) + * @param int $indentAdjustment Adjustment for indentation + * @param string $parentNodeClass Class of the containing node. + * @param string $subNodeName Name of array subnode. + * @param null|int $fixup Fixup information for array item nodes * * @return null|string Result of pretty print or null if cannot preserve formatting */ @@ -1009,11 +1009,11 @@ protected function pArray( * are required to preserve program semantics in a certain context (e.g. to maintain precedence * or because only certain expressions are allowed in certain places). * - * @param int $fixup Fixup type - * @param Node $subNode Subnode to print + * @param int $fixup Fixup type + * @param Node $subNode Subnode to print * @param string|null $parentClass Class of parent node - * @param int $subStartPos Original start pos of subnode - * @param int $subEndPos Original end pos of subnode + * @param int $subStartPos Original start pos of subnode + * @param int $subEndPos Original end pos of subnode * * @return string Result of fixed-up print of subnode */ From 1b346f79353fb785203c102ee5e30290f0ba7282 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 16:30:28 +0200 Subject: [PATCH 294/428] Remove deprecated Comment methods --- CHANGELOG.md | 6 ++++++ UPGRADE-5.0.md | 3 ++- lib/PhpParser/Comment.php | 33 --------------------------------- test/PhpParser/CommentTest.php | 3 --- 4 files changed, 8 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ef8db8f93..367805cb4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,12 @@ See UPGRADE-5.0 for detailed migration instructions. * The pretty printer now indents heredoc/nowdoc strings if the target version is >= 7.3 (flexible heredoc/nowdoc). +### Removed + +* The deprecated `Comment::getLine()`, `Comment::getTokenPos()` and `Comment::getFilePos()` methods + have been removed. Use `Comment::getStartLine()`, `Comment::getStartTokenPos()` and + `Comment::getStartFilePos()` instead. + Version 5.0.0-alpha3 (2023-06-24) --------------------------------- diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index ef74692160..57462fe0a3 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -290,4 +290,5 @@ Additionally, the token array is now terminated by a sentinel token with ID 0. * The deprecated `Builder\Param::setTypeHint()` method has been removed in favor of `Builder\Param::setType()`. * The deprecated `Error` constructor taking a start line has been removed. Pass `['startLine' => $startLine]` attributes instead. -* `Comment::getReformattedText()` now normalizes CRLF newlines to LF newlines. + * The deprecated `Comment::getLine()`, `Comment::getTokenPos()` and `Comment::getFilePos()` methods have been removed. Use `Comment::getStartLine()`, `Comment::getStartTokenPos()` and `Comment::getStartFilePos()` instead. + * `Comment::getReformattedText()` now normalizes CRLF newlines to LF newlines. diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index e90ebeacc7..358fbdbf99 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -103,39 +103,6 @@ public function getEndTokenPos(): int { return $this->endTokenPos; } - /** - * Gets the line number the comment started on. - * - * @deprecated Use getStartLine() instead - * - * @return int Line number - */ - public function getLine(): int { - return $this->startLine; - } - - /** - * Gets the file offset the comment started on. - * - * @deprecated Use getStartFilePos() instead - * - * @return int File offset - */ - public function getFilePos(): int { - return $this->startFilePos; - } - - /** - * Gets the token offset the comment started on. - * - * @deprecated Use getStartTokenPos() instead - * - * @return int Token offset - */ - public function getTokenPos(): int { - return $this->startTokenPos; - } - /** * Gets the comment text. * diff --git a/test/PhpParser/CommentTest.php b/test/PhpParser/CommentTest.php index 7b3493deda..c97308d9f1 100644 --- a/test/PhpParser/CommentTest.php +++ b/test/PhpParser/CommentTest.php @@ -9,9 +9,6 @@ public function testGetters() { $this->assertSame('/* Some comment */', $comment->getText()); $this->assertSame('/* Some comment */', (string) $comment); - $this->assertSame(1, $comment->getLine()); - $this->assertSame(10, $comment->getFilePos()); - $this->assertSame(2, $comment->getTokenPos()); $this->assertSame(1, $comment->getStartLine()); $this->assertSame(10, $comment->getStartFilePos()); $this->assertSame(2, $comment->getStartTokenPos()); From 1873020bf79975fdff03b70584a939fd17b1994e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 16:32:10 +0200 Subject: [PATCH 295/428] Deprecate Node::getLine() in favor of Node::getStartLine() --- CHANGELOG.md | 4 ++++ UPGRADE-5.0.md | 1 + lib/PhpParser/Node.php | 2 ++ 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 367805cb4a..2137bd44d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,10 @@ See UPGRADE-5.0 for detailed migration instructions. have been removed. Use `Comment::getStartLine()`, `Comment::getStartTokenPos()` and `Comment::getStartFilePos()` instead. +### Deprecated + +* The `Node::getLine()` method has been deprecated. Use `Node::getStartLine()` instead. + Version 5.0.0-alpha3 (2023-06-24) --------------------------------- diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 57462fe0a3..5903130c2c 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -292,3 +292,4 @@ Additionally, the token array is now terminated by a sentinel token with ID 0. * The deprecated `Error` constructor taking a start line has been removed. Pass `['startLine' => $startLine]` attributes instead. * The deprecated `Comment::getLine()`, `Comment::getTokenPos()` and `Comment::getFilePos()` methods have been removed. Use `Comment::getStartLine()`, `Comment::getStartTokenPos()` and `Comment::getStartFilePos()` instead. * `Comment::getReformattedText()` now normalizes CRLF newlines to LF newlines. + * The `Node::getLine()` method has been deprecated. Use `Node::getStartLine()` instead. diff --git a/lib/PhpParser/Node.php b/lib/PhpParser/Node.php index 4d82836a46..fd93199f10 100644 --- a/lib/PhpParser/Node.php +++ b/lib/PhpParser/Node.php @@ -21,6 +21,8 @@ public function getSubNodeNames(): array; * Gets line the node started in (alias of getStartLine). * * @return int Start line (or -1 if not available) + * + * @deprecated Use getStartLine() instead */ public function getLine(): int; From ab51e9d35a4b90f326371ed10b31cdda5468240f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 18:22:52 +0200 Subject: [PATCH 296/428] Remove superfluous phpdoc tags These just specify a type that is already specified as a real PHP type. --- .php-cs-fixer.dist.php | 4 ++++ lib/PhpParser/Builder/ClassConst.php | 1 - lib/PhpParser/Builder/Class_.php | 5 ----- lib/PhpParser/Builder/Enum_.php | 2 -- lib/PhpParser/Builder/FunctionLike.php | 1 - lib/PhpParser/Builder/Function_.php | 1 - lib/PhpParser/Builder/Interface_.php | 1 - lib/PhpParser/Builder/Method.php | 3 +-- lib/PhpParser/Builder/Namespace_.php | 1 - lib/PhpParser/Builder/Param.php | 5 ----- lib/PhpParser/Builder/Property.php | 5 ++--- lib/PhpParser/Builder/TraitUseAdaptation.php | 5 ----- lib/PhpParser/Builder/Trait_.php | 1 - lib/PhpParser/Builder/Use_.php | 2 -- lib/PhpParser/BuilderFactory.php | 23 -------------------- lib/PhpParser/Comment.php | 12 +--------- lib/PhpParser/Error.php | 5 ----- lib/PhpParser/ErrorHandler/Collecting.php | 2 -- lib/PhpParser/Internal/Differ.php | 2 -- lib/PhpParser/Internal/TokenStream.php | 4 ---- lib/PhpParser/Lexer/Emulative.php | 3 +-- lib/PhpParser/Node.php | 6 ----- lib/PhpParser/Node/Expr/ArrowFunction.php | 3 --- lib/PhpParser/Node/Expr/BinaryOp.php | 2 -- lib/PhpParser/Node/Expr/Match_.php | 1 - lib/PhpParser/Node/FunctionLike.php | 2 -- lib/PhpParser/Node/Param.php | 1 - lib/PhpParser/Node/Stmt/ClassConst.php | 8 ------- lib/PhpParser/Node/Stmt/ClassMethod.php | 14 ------------ lib/PhpParser/Node/Stmt/Class_.php | 6 ----- lib/PhpParser/Node/Stmt/Property.php | 10 --------- lib/PhpParser/Node/UseItem.php | 2 -- lib/PhpParser/NodeDumper.php | 3 --- lib/PhpParser/NodeTraverser.php | 2 -- lib/PhpParser/NodeTraverserInterface.php | 2 -- lib/PhpParser/NodeVisitor/NameResolver.php | 2 -- lib/PhpParser/ParserAbstract.php | 1 - lib/PhpParser/PrettyPrinter.php | 2 -- lib/PhpParser/PrettyPrinter/Standard.php | 1 - lib/PhpParser/PrettyPrinterAbstract.php | 10 +-------- 40 files changed, 10 insertions(+), 156 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 563bf209a3..54d58e6f7c 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -27,6 +27,10 @@ 'operators' => ['=' => null], ], 'phpdoc_align' => ['align' => 'left'], + 'phpdoc_trim' => true, + 'no_empty_phpdoc' => true, + 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true], + 'no_extra_blank_lines' => true, ]) ->setFinder($finder) ; diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index 07d4b79dff..fa5dc10e1e 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -13,7 +13,6 @@ use PhpParser\Node\Stmt; class ClassConst implements PhpParser\Builder { - /** @var int */ protected int $flags = 0; /** @var array */ protected array $attributes = []; diff --git a/lib/PhpParser/Builder/Class_.php b/lib/PhpParser/Builder/Class_.php index 460606573c..6f394315ec 100644 --- a/lib/PhpParser/Builder/Class_.php +++ b/lib/PhpParser/Builder/Class_.php @@ -10,16 +10,11 @@ use PhpParser\Node\Stmt; class Class_ extends Declaration { - /** @var string */ protected string $name; - - /** @var Name|null */ protected ?Name $extends = null; /** @var list */ protected array $implements = []; - /** @var int */ protected int $flags = 0; - /** @var list */ protected array $uses = []; /** @var list */ diff --git a/lib/PhpParser/Builder/Enum_.php b/lib/PhpParser/Builder/Enum_.php index e02303ba70..c00df03f5b 100644 --- a/lib/PhpParser/Builder/Enum_.php +++ b/lib/PhpParser/Builder/Enum_.php @@ -10,9 +10,7 @@ use PhpParser\Node\Stmt; class Enum_ extends Declaration { - /** @var string */ protected string $name; - /** @var Identifier|null */ protected ?Identifier $scalarType = null; /** @var list */ protected array $implements = []; diff --git a/lib/PhpParser/Builder/FunctionLike.php b/lib/PhpParser/Builder/FunctionLike.php index a8752814e0..ff79cb6b4a 100644 --- a/lib/PhpParser/Builder/FunctionLike.php +++ b/lib/PhpParser/Builder/FunctionLike.php @@ -6,7 +6,6 @@ use PhpParser\Node; abstract class FunctionLike extends Declaration { - /** @var bool */ protected bool $returnByRef = false; /** @var Node\Param[] */ protected array $params = []; diff --git a/lib/PhpParser/Builder/Function_.php b/lib/PhpParser/Builder/Function_.php index 4bd2c445e9..48f5f69319 100644 --- a/lib/PhpParser/Builder/Function_.php +++ b/lib/PhpParser/Builder/Function_.php @@ -8,7 +8,6 @@ use PhpParser\Node\Stmt; class Function_ extends FunctionLike { - /** @var string */ protected string $name; /** @var list */ protected array $stmts = []; diff --git a/lib/PhpParser/Builder/Interface_.php b/lib/PhpParser/Builder/Interface_.php index 281df9391e..13dd3f7f9b 100644 --- a/lib/PhpParser/Builder/Interface_.php +++ b/lib/PhpParser/Builder/Interface_.php @@ -9,7 +9,6 @@ use PhpParser\Node\Stmt; class Interface_ extends Declaration { - /** @var string */ protected string $name; /** @var list */ protected array $extends = []; diff --git a/lib/PhpParser/Builder/Method.php b/lib/PhpParser/Builder/Method.php index 6076913cc7..8358dbe38f 100644 --- a/lib/PhpParser/Builder/Method.php +++ b/lib/PhpParser/Builder/Method.php @@ -9,9 +9,8 @@ use PhpParser\Node\Stmt; class Method extends FunctionLike { - /** @var string */ protected string $name; - /** @var int */ + protected int $flags = 0; /** @var list|null */ diff --git a/lib/PhpParser/Builder/Namespace_.php b/lib/PhpParser/Builder/Namespace_.php index a197919143..80fe6f8464 100644 --- a/lib/PhpParser/Builder/Namespace_.php +++ b/lib/PhpParser/Builder/Namespace_.php @@ -8,7 +8,6 @@ use PhpParser\Node\Stmt; class Namespace_ extends Declaration { - /** @var Node\Name|null */ private ?Node\Name $name; /** @var Stmt[] */ private array $stmts = []; diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index fcfe3c39fb..f439e87656 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -8,17 +8,12 @@ use PhpParser\Node; class Param implements PhpParser\Builder { - /** @var string */ protected string $name; - /** @var Node\Expr|null */ protected ?Node\Expr $default = null; /** @var Node\Identifier|Node\Name|Node\ComplexType|null */ protected ?Node $type = null; - /** @var bool */ protected bool $byRef = false; - /** @var int */ protected int $flags = 0; - /** @var bool */ protected bool $variadic = false; /** @var list */ protected array $attributeGroups = []; diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 16f5eab10a..3fc96d98c3 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -12,11 +12,10 @@ use PhpParser\Node\ComplexType; class Property implements PhpParser\Builder { - /** @var string */ protected string $name; - /** @var int */ + protected int $flags = 0; - /** @var Node\Expr|null */ + protected ?Node\Expr $default = null; /** @var array */ protected array $attributes = []; diff --git a/lib/PhpParser/Builder/TraitUseAdaptation.php b/lib/PhpParser/Builder/TraitUseAdaptation.php index a138a10a28..fee09583a6 100644 --- a/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -13,15 +13,10 @@ class TraitUseAdaptation implements Builder { private const TYPE_ALIAS = 1; private const TYPE_PRECEDENCE = 2; - /** @var int Type of building adaptation */ protected int $type; - /** @var Node\Name|null */ protected ?Node\Name $trait; - /** @var Node\Identifier */ protected Node\Identifier $method; - /** @var int|null */ protected ?int $modifier = null; - /** @var Node\Identifier|null */ protected ?Node\Identifier $alias = null; /** @var Node\Name[] */ protected array $insteadof = []; diff --git a/lib/PhpParser/Builder/Trait_.php b/lib/PhpParser/Builder/Trait_.php index 0a36e50d55..ffa1bd5cca 100644 --- a/lib/PhpParser/Builder/Trait_.php +++ b/lib/PhpParser/Builder/Trait_.php @@ -8,7 +8,6 @@ use PhpParser\Node\Stmt; class Trait_ extends Declaration { - /** @var string */ protected string $name; /** @var list */ protected array $uses = []; diff --git a/lib/PhpParser/Builder/Use_.php b/lib/PhpParser/Builder/Use_.php index 322a083ea0..b82cf1396a 100644 --- a/lib/PhpParser/Builder/Use_.php +++ b/lib/PhpParser/Builder/Use_.php @@ -8,11 +8,9 @@ use PhpParser\Node\Stmt; class Use_ implements Builder { - /** @var Node\Name */ protected Node\Name $name; /** @var Stmt\Use_::TYPE_* */ protected int $type; - /** @var string|null */ protected ?string $alias = null; /** diff --git a/lib/PhpParser/BuilderFactory.php b/lib/PhpParser/BuilderFactory.php index 8571e89682..b7efe5e9b5 100644 --- a/lib/PhpParser/BuilderFactory.php +++ b/lib/PhpParser/BuilderFactory.php @@ -16,8 +16,6 @@ class BuilderFactory { * * @param string|Name $name Name of the attribute * @param array $args Attribute named arguments - * - * @return Node\Attribute */ public function attribute($name, array $args = []): Node\Attribute { return new Node\Attribute( @@ -213,8 +211,6 @@ public function enumCase($name): Builder\EnumCase { * Creates node a for a literal value. * * @param Expr|bool|null|int|float|string|array $value $value - * - * @return Expr */ public function val($value): Expr { return BuilderHelpers::normalizeValue($value); @@ -224,8 +220,6 @@ public function val($value): Expr { * Creates variable node. * * @param string|Expr $name Name - * - * @return Expr\Variable */ public function var($name): Expr\Variable { if (!\is_string($name) && !$name instanceof Expr) { @@ -263,8 +257,6 @@ public function args(array $args): array { * * @param string|Name|Expr $name Function name * @param array $args Function arguments - * - * @return Expr\FuncCall */ public function funcCall($name, array $args = []): Expr\FuncCall { return new Expr\FuncCall( @@ -279,8 +271,6 @@ public function funcCall($name, array $args = []): Expr\FuncCall { * @param Expr $var Variable the method is called on * @param string|Identifier|Expr $name Method name * @param array $args Method arguments - * - * @return Expr\MethodCall */ public function methodCall(Expr $var, $name, array $args = []): Expr\MethodCall { return new Expr\MethodCall( @@ -296,8 +286,6 @@ public function methodCall(Expr $var, $name, array $args = []): Expr\MethodCall * @param string|Name|Expr $class Class name * @param string|Identifier|Expr $name Method name * @param array $args Method arguments - * - * @return Expr\StaticCall */ public function staticCall($class, $name, array $args = []): Expr\StaticCall { return new Expr\StaticCall( @@ -312,8 +300,6 @@ public function staticCall($class, $name, array $args = []): Expr\StaticCall { * * @param string|Name|Expr $class Class name * @param array $args Constructor arguments - * - * @return Expr\New_ */ public function new($class, array $args = []): Expr\New_ { return new Expr\New_( @@ -326,8 +312,6 @@ public function new($class, array $args = []): Expr\New_ { * Creates a constant fetch node. * * @param string|Name $name Constant name - * - * @return Expr\ConstFetch */ public function constFetch($name): Expr\ConstFetch { return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); @@ -338,8 +322,6 @@ public function constFetch($name): Expr\ConstFetch { * * @param Expr $var Variable holding object * @param string|Identifier|Expr $name Property name - * - * @return Expr\PropertyFetch */ public function propertyFetch(Expr $var, $name): Expr\PropertyFetch { return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name)); @@ -350,8 +332,6 @@ public function propertyFetch(Expr $var, $name): Expr\PropertyFetch { * * @param string|Name|Expr $class Class name * @param string|Identifier|Expr $name Constant name - * - * @return Expr\ClassConstFetch */ public function classConstFetch($class, $name): Expr\ClassConstFetch { return new Expr\ClassConstFetch( @@ -364,8 +344,6 @@ public function classConstFetch($class, $name): Expr\ClassConstFetch { * Creates nested Concat nodes from a list of expressions. * * @param Expr|string ...$exprs Expressions or literal strings - * - * @return Concat */ public function concat(...$exprs): Concat { $numExprs = count($exprs); @@ -382,7 +360,6 @@ public function concat(...$exprs): Concat { /** * @param string|Expr $expr - * @return Expr */ private function normalizeStringExpr($expr): Expr { if ($expr instanceof Expr) { diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index 358fbdbf99..17dc4c73a9 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -3,19 +3,12 @@ namespace PhpParser; class Comment implements \JsonSerializable { - /** @var string string */ protected string $text; - /** @var int */ protected int $startLine; - /** @var int */ protected int $startFilePos; - /** @var int */ protected int $startTokenPos; - /** @var int */ protected int $endLine; - /** @var int */ protected int $endFilePos; - /** @var int */ protected int $endTokenPos; /** @@ -121,8 +114,6 @@ public function __toString(): string { * on all subsequent lines. * * Additionally, this normalizes CRLF newlines to LF newlines. - * - * @return string */ public function getReformattedText(): string { $text = str_replace("\r\n", "\n", $this->text); @@ -196,8 +187,7 @@ private function getShortestWhitespacePrefixLen(string $str): int { } /** - * @return array - * @psalm-return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} + * @return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} */ public function jsonSerialize(): array { // Technically not a node, but we make it look like one anyway diff --git a/lib/PhpParser/Error.php b/lib/PhpParser/Error.php index afb9dc8e8e..02feace0c7 100644 --- a/lib/PhpParser/Error.php +++ b/lib/PhpParser/Error.php @@ -3,7 +3,6 @@ namespace PhpParser; class Error extends \RuntimeException { - /** @var string */ protected string $rawMessage; /** @var array */ protected array $attributes; @@ -90,8 +89,6 @@ public function setStartLine(int $line): void { * 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(): bool { return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']); @@ -101,7 +98,6 @@ public function hasColumnInfo(): bool { * 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(string $code): int { if (!$this->hasColumnInfo()) { @@ -115,7 +111,6 @@ public function getStartColumn(string $code): int { * 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(string $code): int { if (!$this->hasColumnInfo()) { diff --git a/lib/PhpParser/ErrorHandler/Collecting.php b/lib/PhpParser/ErrorHandler/Collecting.php index 6d3f4175dd..eee634924a 100644 --- a/lib/PhpParser/ErrorHandler/Collecting.php +++ b/lib/PhpParser/ErrorHandler/Collecting.php @@ -29,8 +29,6 @@ public function getErrors(): array { /** * Check whether there are any errors. - * - * @return bool */ public function hasErrors(): bool { return !empty($this->errors); diff --git a/lib/PhpParser/Internal/Differ.php b/lib/PhpParser/Internal/Differ.php index 10df48ff65..253e17574c 100644 --- a/lib/PhpParser/Internal/Differ.php +++ b/lib/PhpParser/Internal/Differ.php @@ -91,8 +91,6 @@ private function calculateTrace(array $old, array $new): array { /** * @param array> $trace - * @param int $x - * @param int $y * @param T[] $old * @param T[] $new * @return DiffElem[] diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index 5277c08860..2520df1f31 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -30,8 +30,6 @@ public function __construct(array $tokens) { * * @param int $startPos Start position * @param int $endPos End position - * - * @return bool */ public function haveParens(int $startPos, int $endPos): bool { return $this->haveTokenImmediatelyBefore($startPos, '(') @@ -43,8 +41,6 @@ public function haveParens(int $startPos, int $endPos): bool { * * @param int $startPos Start position * @param int $endPos End position - * - * @return bool */ public function haveBraces(int $startPos, int $endPos): bool { return ($this->haveTokenImmediatelyBefore($startPos, '{') diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index eb561cbeaa..934954cd34 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -28,9 +28,8 @@ class Emulative extends Lexer { /** @var list */ private array $emulators = []; - /** @var PhpVersion */ private PhpVersion $targetPhpVersion; - /** @var PhpVersion */ + private PhpVersion $hostPhpVersion; /** diff --git a/lib/PhpParser/Node.php b/lib/PhpParser/Node.php index fd93199f10..258e45160a 100644 --- a/lib/PhpParser/Node.php +++ b/lib/PhpParser/Node.php @@ -112,24 +112,18 @@ public function setDocComment(Comment\Doc $docComment): void; /** * Sets an attribute on a node. * - * @param string $key * @param mixed $value */ public function setAttribute(string $key, $value): void; /** * Returns whether an attribute exists. - * - * @param string $key - * - * @return bool */ public function hasAttribute(string $key): bool; /** * Returns the value of an attribute. * - * @param string $key * @param mixed $default * * @return mixed diff --git a/lib/PhpParser/Node/Expr/ArrowFunction.php b/lib/PhpParser/Node/Expr/ArrowFunction.php index f304a33ab3..85d66cb818 100644 --- a/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -7,10 +7,8 @@ use PhpParser\Node\FunctionLike; class ArrowFunction extends Expr implements FunctionLike { - /** @var bool */ public bool $static; - /** @var bool */ public bool $byRef; /** @var Node\Param[] */ @@ -19,7 +17,6 @@ class ArrowFunction extends Expr implements FunctionLike { /** @var null|Node\Identifier|Node\Name|Node\ComplexType */ public ?Node $returnType; - /** @var Expr */ public Expr $expr; /** @var Node\AttributeGroup[] */ public array $attrGroups; diff --git a/lib/PhpParser/Node/Expr/BinaryOp.php b/lib/PhpParser/Node/Expr/BinaryOp.php index 1527999df6..1b92bd4f50 100644 --- a/lib/PhpParser/Node/Expr/BinaryOp.php +++ b/lib/PhpParser/Node/Expr/BinaryOp.php @@ -32,8 +32,6 @@ public function getSubNodeNames(): array { * * In the case there are multiple possible sigils for an operator, this method does not * necessarily return the one used in the parsed code. - * - * @return string */ abstract public function getOperatorSigil(): string; } diff --git a/lib/PhpParser/Node/Expr/Match_.php b/lib/PhpParser/Node/Expr/Match_.php index 5a578d1747..66305915e1 100644 --- a/lib/PhpParser/Node/Expr/Match_.php +++ b/lib/PhpParser/Node/Expr/Match_.php @@ -6,7 +6,6 @@ use PhpParser\Node\MatchArm; class Match_ extends Node\Expr { - /** @var Node\Expr */ public Node\Expr $cond; /** @var MatchArm[] */ public array $arms; diff --git a/lib/PhpParser/Node/FunctionLike.php b/lib/PhpParser/Node/FunctionLike.php index 0b211d1175..58f653a89f 100644 --- a/lib/PhpParser/Node/FunctionLike.php +++ b/lib/PhpParser/Node/FunctionLike.php @@ -7,8 +7,6 @@ interface FunctionLike extends Node { /** * Whether to return by reference - * - * @return bool */ public function returnsByRef(): bool; diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index 3ea7547e6c..fe4d2f2cbb 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -17,7 +17,6 @@ class Param extends NodeAbstract { public Expr $var; /** @var null|Expr Default value */ public ?Expr $default; - /** @var int */ public int $flags; /** @var AttributeGroup[] PHP attribute groups */ public array $attrGroups; diff --git a/lib/PhpParser/Node/Stmt/ClassConst.php b/lib/PhpParser/Node/Stmt/ClassConst.php index 87e7e39be7..9bdce1f1db 100644 --- a/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/lib/PhpParser/Node/Stmt/ClassConst.php @@ -44,8 +44,6 @@ public function getSubNodeNames(): array { /** * Whether constant is explicitly or implicitly public. - * - * @return bool */ public function isPublic(): bool { return ($this->flags & Modifiers::PUBLIC) !== 0 @@ -54,8 +52,6 @@ public function isPublic(): bool { /** * Whether constant is protected. - * - * @return bool */ public function isProtected(): bool { return (bool) ($this->flags & Modifiers::PROTECTED); @@ -63,8 +59,6 @@ public function isProtected(): bool { /** * Whether constant is private. - * - * @return bool */ public function isPrivate(): bool { return (bool) ($this->flags & Modifiers::PRIVATE); @@ -72,8 +66,6 @@ public function isPrivate(): bool { /** * Whether constant is final. - * - * @return bool */ public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); diff --git a/lib/PhpParser/Node/Stmt/ClassMethod.php b/lib/PhpParser/Node/Stmt/ClassMethod.php index a7f9088903..59c0519ea6 100644 --- a/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -100,8 +100,6 @@ public function getAttrGroups(): array { /** * Whether the method is explicitly or implicitly public. - * - * @return bool */ public function isPublic(): bool { return ($this->flags & Modifiers::PUBLIC) !== 0 @@ -110,8 +108,6 @@ public function isPublic(): bool { /** * Whether the method is protected. - * - * @return bool */ public function isProtected(): bool { return (bool) ($this->flags & Modifiers::PROTECTED); @@ -119,8 +115,6 @@ public function isProtected(): bool { /** * Whether the method is private. - * - * @return bool */ public function isPrivate(): bool { return (bool) ($this->flags & Modifiers::PRIVATE); @@ -128,8 +122,6 @@ public function isPrivate(): bool { /** * Whether the method is abstract. - * - * @return bool */ public function isAbstract(): bool { return (bool) ($this->flags & Modifiers::ABSTRACT); @@ -137,8 +129,6 @@ public function isAbstract(): bool { /** * Whether the method is final. - * - * @return bool */ public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); @@ -146,8 +136,6 @@ public function isFinal(): bool { /** * Whether the method is static. - * - * @return bool */ public function isStatic(): bool { return (bool) ($this->flags & Modifiers::STATIC); @@ -155,8 +143,6 @@ public function isStatic(): bool { /** * Whether the method is magic. - * - * @return bool */ public function isMagic(): bool { return isset(self::$magicNames[$this->name->toLowerString()]); diff --git a/lib/PhpParser/Node/Stmt/Class_.php b/lib/PhpParser/Node/Stmt/Class_.php index 4350a358b6..3f492b7bb3 100644 --- a/lib/PhpParser/Node/Stmt/Class_.php +++ b/lib/PhpParser/Node/Stmt/Class_.php @@ -65,8 +65,6 @@ public function getSubNodeNames(): array { /** * Whether the class is explicitly abstract. - * - * @return bool */ public function isAbstract(): bool { return (bool) ($this->flags & Modifiers::ABSTRACT); @@ -74,8 +72,6 @@ public function isAbstract(): bool { /** * Whether the class is final. - * - * @return bool */ public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); @@ -87,8 +83,6 @@ public function isReadonly(): bool { /** * Whether the class is anonymous. - * - * @return bool */ public function isAnonymous(): bool { return null === $this->name; diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index 5e76cb7d41..872ea6b738 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -42,8 +42,6 @@ public function getSubNodeNames(): array { /** * Whether the property is explicitly or implicitly public. - * - * @return bool */ public function isPublic(): bool { return ($this->flags & Modifiers::PUBLIC) !== 0 @@ -52,8 +50,6 @@ public function isPublic(): bool { /** * Whether the property is protected. - * - * @return bool */ public function isProtected(): bool { return (bool) ($this->flags & Modifiers::PROTECTED); @@ -61,8 +57,6 @@ public function isProtected(): bool { /** * Whether the property is private. - * - * @return bool */ public function isPrivate(): bool { return (bool) ($this->flags & Modifiers::PRIVATE); @@ -70,8 +64,6 @@ public function isPrivate(): bool { /** * Whether the property is static. - * - * @return bool */ public function isStatic(): bool { return (bool) ($this->flags & Modifiers::STATIC); @@ -79,8 +71,6 @@ public function isStatic(): bool { /** * Whether the property is readonly. - * - * @return bool */ public function isReadonly(): bool { return (bool) ($this->flags & Modifiers::READONLY); diff --git a/lib/PhpParser/Node/UseItem.php b/lib/PhpParser/Node/UseItem.php index 6b3a66372e..40ecb9ced8 100644 --- a/lib/PhpParser/Node/UseItem.php +++ b/lib/PhpParser/Node/UseItem.php @@ -36,8 +36,6 @@ public function getSubNodeNames(): array { /** * Get alias. If not explicitly given this is the last component of the used name. - * - * @return Identifier */ public function getAlias(): Identifier { if (null !== $this->alias) { diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index e382d4a06e..07002831a6 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -8,11 +8,8 @@ use PhpParser\Node\UseItem; class NodeDumper { - /** @var bool */ private bool $dumpComments; - /** @var bool */ private bool $dumpPositions; - /** @var string|null */ private ?string $code; /** diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index a3652d8aa9..355dda3a0f 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -49,8 +49,6 @@ public function addVisitor(NodeVisitor $visitor): void { /** * Removes an added visitor. - * - * @param NodeVisitor $visitor */ public function removeVisitor(NodeVisitor $visitor): void { $index = array_search($visitor, $this->visitors); diff --git a/lib/PhpParser/NodeTraverserInterface.php b/lib/PhpParser/NodeTraverserInterface.php index 76863aa642..c3992b3dc4 100644 --- a/lib/PhpParser/NodeTraverserInterface.php +++ b/lib/PhpParser/NodeTraverserInterface.php @@ -12,8 +12,6 @@ public function addVisitor(NodeVisitor $visitor): void; /** * Removes an added visitor. - * - * @param NodeVisitor $visitor */ public function removeVisitor(NodeVisitor $visitor): void; diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index c808150679..3618fb9f8f 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -42,8 +42,6 @@ public function __construct(?ErrorHandler $errorHandler = null, array $options = /** * Get name resolution context. - * - * @return NameContext */ public function getNameContext(): NameContext { return $this->nameContext; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 42eebc3f4a..3795d2da15 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -59,7 +59,6 @@ abstract class ParserAbstract implements Parser { /** @var int Rule number signifying that an unexpected token was encountered */ protected int $unexpectedTokenRule; - /** @var int */ protected int $YY2TBLSTATE; /** @var int Number of non-leaf states */ protected int $numNonLeafStates; diff --git a/lib/PhpParser/PrettyPrinter.php b/lib/PhpParser/PrettyPrinter.php index ceaaba95e5..892c686e53 100644 --- a/lib/PhpParser/PrettyPrinter.php +++ b/lib/PhpParser/PrettyPrinter.php @@ -46,8 +46,6 @@ public function prettyPrintFile(array $stmts): string; * @param Node[] $stmts Modified AST with links to original AST * @param Node[] $origStmts Original AST with token offset information * @param Token[] $origTokens Tokens of the original code - * - * @return string */ public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string; } diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 3d67f37376..0fef3ae1a6 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -1145,7 +1145,6 @@ protected function pNewOperand(Node $node): string { /** * @param Node[] $nodes - * @return bool */ protected function hasNodeWithComments(array $nodes): bool { foreach ($nodes as $node) { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 9924d23a23..e45c40a3e2 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -294,10 +294,7 @@ protected function preprocessNodes(array $nodes): void { } /** - * Handles (and removes) no-indent and doc-string-end tokens. - * - * @param string $str - * @return string + * Handles (and removes) doc-string-end tokens. */ protected function handleMagicTokens(string $str): string { if ($this->docStringEndToken !== null) { @@ -527,8 +524,6 @@ protected function pComments(array $comments): string { * @param Node[] $stmts Modified AST with links to original AST * @param Node[] $origStmts Original AST with token offset information * @param Token[] $origTokens Tokens of the original code - * - * @return string */ public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { $this->initializeNodeListDiffer(); @@ -1094,9 +1089,6 @@ protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $ * * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". * Without safeAppend the result would be "echox", which does not preserve semantics. - * - * @param string $str - * @param string $append */ protected function safeAppend(string &$str, string $append): void { if ($str === "") { From ea5ba2674904fd4ff16e5045c8ce374d1c9cca52 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 20:17:54 +0200 Subject: [PATCH 297/428] Add upgrading notes for lexer changes --- UPGRADE-5.0.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 5903130c2c..2f705a0a42 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -45,7 +45,7 @@ For example, if you specify version `"8.0"`, then `class ReadOnly {}` is treated use PhpParser\ParserFactory; use PhpParser\PhpVersion; -$factory = new ParserFactory; +$factory = new ParserFactory(); # Before $parser = $factory->create(ParserFactory::PREFER_PHP7); @@ -126,7 +126,7 @@ Node constructor arguments accepting types now longer accept plain strings. Eith * The `$type` argument of `Node\NullableType`. * The `$type` argument of `Node\Param`. * The `$type` argument of `Node\Stmt\Property`. -* The `$type` argument of `Node\ClassConst` (new in PHP-Parser 5.0, listed for completeness only). +* The `$type` argument of `Node\ClassConst`. To follow the previous behavior, an `Identifier` should be passed, which indicates a built-in type. @@ -266,6 +266,17 @@ PhpParser\NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN -> PhpParser\NodeVis PhpParser\NodeTraverser::STOP_TRAVERSAL -> PhpParser\NodeVisitor::STOP_TRAVERSAL ``` +Visitors can now also be passed directly to the `NodeTraverser` constructor: + +```php +# Before (and still supported) +$traverser = new NodeTraverser(); +$traverser->addVisitor(new NameResolver()); + +# After +$traverser = new NodeTraverser(new NameResolver()); +``` + ### Changes to token representation Tokens are now internally represented using the `PhpParser\Token` class, which exposes the same base interface as @@ -283,9 +294,46 @@ class Token { } ``` -The `Lexer::getTokens()` method will now return an array of `Token`s, rather than an array of arrays and strings. +The token array is now an array of `Token`s, rather than an array of arrays and strings. Additionally, the token array is now terminated by a sentinel token with ID 0. +### Changes to the lexer + +The lexer API is reduced to a single `Lexer::tokenize()` method, which returns an array of tokens. The `startLexing()` and `getNextToken()` methods have been removed. + +Responsibility for determining start and end attributes for nodes has been moved from the lexer to the parser. The lexer no longer accepts an options array. The `usedAttributes` option has been removed without replacement, and the parser will now unconditionally add the `comments`, `startLine`, `endLine`, `startFilePos`, `startEndPos`, `startTokenPos` and `startEndPos` attributes. + +There should no longer be a need to directly interact with the `Lexer` for end users, as the `ParserFactory` will create an appropriate instance, and no additional configuration of the lexer is necessary. To use formatting-preserving pretty printing, the setup boilerplate changes as follows: + +```php +# Before + +$lexer = new Lexer\Emulative([ + 'usedAttributes' => [ + 'comments', + 'startLine', 'endLine', + 'startTokenPos', 'endTokenPos', + ], +]); + +$parser = new Parser\Php7($lexer); +$oldStmts = $parser->parse($code); +$oldTokens = $lexer->getTokens(); + +$traverser = new NodeTraverser(); +$traverser->addVisitor(new NodeVisitor\CloningVisitor()); +$newStmts = $traverser->traverse($oldStmts); + +# After + +$parser = (new ParserFactory())->createForNewestSupportedVersion(); +$oldStmts = $parser->parse($code); +$oldTokens = $lexer->getTokens(); + +$traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); +$newStmts = $traverser->traverse($oldStmts); +``` + ### Miscellaneous changes * The deprecated `Builder\Param::setTypeHint()` method has been removed in favor of `Builder\Param::setType()`. From edee19a5d2ec973b59d074830f772af7bde94808 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 20:19:48 +0200 Subject: [PATCH 298/428] Release PHP-Parser 5.0.0 Beta 1 --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2137bd44d7..6a4968d9ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ -Version 5.0.0-beta1 (TBD) -------------------------- +Version 5.0.0-beta1 (2023-09-17) +-------------------------------- See UPGRADE-5.0 for detailed migration instructions. From 0b3c7629391d2cb1f47d5b8aa14da2447ab2e49d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 20:26:35 +0200 Subject: [PATCH 299/428] Update docs table of contents --- README.md | 5 ++--- doc/README.md | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 63f0984332..756cffde64 100644 --- a/README.md +++ b/README.md @@ -213,9 +213,8 @@ Component documentation: * [AST builders](doc/component/AST_builders.markdown) * Fluent builders for AST nodes * [Lexer](doc/component/Lexer.markdown) - * Lexer options - * Token and file positions for nodes - * Custom attributes + * Emulation + * Tokens, positions and attributes * [Error handling](doc/component/Error_handling.markdown) * Column information for errors * Error recovery (parsing of syntactically incorrect code) diff --git a/doc/README.md b/doc/README.md index ac462f792b..0b4149f851 100644 --- a/doc/README.md +++ b/doc/README.md @@ -27,9 +27,8 @@ Component documentation * [AST builders](component/AST_builders.markdown) * Fluent builders for AST nodes * [Lexer](component/Lexer.markdown) - * Lexer options - * Token and file positions for nodes - * Custom attributes + * Emulation + * Tokens, positions and attributes * [Error handling](component/Error_handling.markdown) * Column information for errors * Error recovery (parsing of syntactically incorrect code) From 21fa9c98b3450541a6821658692ad5ade0868ca1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 20:28:02 +0200 Subject: [PATCH 300/428] Drop some @covers annotations --- test/PhpParser/PrettyPrinterTest.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 47272b9fa4..9af5510ca7 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -28,7 +28,6 @@ protected function doTestPrettyPrintMethod($method, $name, $code, $expected, $mo /** * @dataProvider provideTestPrettyPrint - * @covers \PhpParser\PrettyPrinter\Standard */ public function testPrettyPrint($name, $code, $expected, $mode) { $this->doTestPrettyPrintMethod('prettyPrint', $name, $code, $expected, $mode); @@ -36,7 +35,6 @@ public function testPrettyPrint($name, $code, $expected, $mode) { /** * @dataProvider provideTestPrettyPrintFile - * @covers \PhpParser\PrettyPrinter\Standard */ public function testPrettyPrintFile($name, $code, $expected, $mode) { $this->doTestPrettyPrintMethod('prettyPrintFile', $name, $code, $expected, $mode); @@ -181,7 +179,6 @@ public function testPrettyPrintWithErrorInClassConstFetch() { /** * @dataProvider provideTestFormatPreservingPrint - * @covers \PhpParser\PrettyPrinter\Standard */ public function testFormatPreservingPrint($name, $code, $modification, $expected, $modeLine) { $lexer = new Lexer\Emulative(); @@ -218,7 +215,6 @@ public function provideTestFormatPreservingPrint() { /** * @dataProvider provideTestRoundTripPrint - * @covers \PhpParser\PrettyPrinter\Standard */ public function testRoundTripPrint($name, $code, $expected, $modeLine) { /** From 8b9488e1e69968be354c3764be2be025db0c737b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Sep 2023 20:42:25 +0200 Subject: [PATCH 301/428] Explicit test new ParserFactory methods --- test/PhpParser/Node/Scalar/DNumberTest.php | 2 +- test/PhpParser/Node/Scalar/NumberTest.php | 2 +- test/PhpParser/Node/Scalar/StringTest.php | 2 +- .../NodeVisitor/NodeConnectingVisitorTest.php | 2 +- .../ParentConnectingVisitorTest.php | 2 +- test/PhpParser/ParserFactoryTest.php | 27 +++++++++---------- 6 files changed, 17 insertions(+), 20 deletions(-) diff --git a/test/PhpParser/Node/Scalar/DNumberTest.php b/test/PhpParser/Node/Scalar/DNumberTest.php index 6563a933ce..25212a96b1 100644 --- a/test/PhpParser/Node/Scalar/DNumberTest.php +++ b/test/PhpParser/Node/Scalar/DNumberTest.php @@ -8,7 +8,7 @@ class DNumberTest extends \PHPUnit\Framework\TestCase { public function testRawValue() { - $parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7); + $parser = (new ParserFactory())->createForNewestSupportedVersion(); $nodes = $parser->parse('create(ParserFactory::PREFER_PHP7); + $parser = (new ParserFactory())->createForNewestSupportedVersion(); $nodes = $parser->parse('create(ParserFactory::PREFER_PHP7); + $parser = (new ParserFactory())->createForNewestSupportedVersion(); $nodes = $parser->parse('create(ParserFactory::PREFER_PHP7)->parse( + $ast = (new ParserFactory())->createForNewestSupportedVersion()->parse( 'create(ParserFactory::PREFER_PHP7)->parse( + $ast = (new ParserFactory())->createForNewestSupportedVersion()->parse( 'assertInstanceOf($expected, (new ParserFactory())->create($kind, $lexer)); - } + public function testCreate() { + $factory = new ParserFactory(); - public function provideTestCreate() { $lexer = new Lexer(); - return [ - [ - ParserFactory::PREFER_PHP7, $lexer, - Parser\Php7::class - ], - [ - ParserFactory::ONLY_PHP7, null, - Parser\Php7::class - ], - ]; + $this->assertInstanceOf(Php7::class, $factory->create(ParserFactory::PREFER_PHP7, $lexer)); + $this->assertInstanceOf(Php7::class, $factory->create(ParserFactory::ONLY_PHP7, $lexer)); + $this->assertInstanceOf(Php7::class, $factory->create(ParserFactory::PREFER_PHP7)); + $this->assertInstanceOf(Php7::class, $factory->create(ParserFactory::ONLY_PHP7)); + + $this->assertInstanceOf(Php8::class, $factory->createForNewestSupportedVersion()); + $this->assertInstanceOf(Parser::class, $factory->createForHostVersion()); } } From f4961b89ac0289455295e2dc2169527098a6e11b Mon Sep 17 00:00:00 2001 From: RainX <101971+rainx@users.noreply.github.com> Date: Tue, 19 Sep 2023 03:16:54 +0800 Subject: [PATCH 302/428] Add missing phpdoc annotations in AST nodes (#946) --- lib/PhpParser/Node/Expr/ArrowFunction.php | 3 +++ lib/PhpParser/Node/Expr/Match_.php | 3 +++ lib/PhpParser/Node/Param.php | 1 + 3 files changed, 7 insertions(+) diff --git a/lib/PhpParser/Node/Expr/ArrowFunction.php b/lib/PhpParser/Node/Expr/ArrowFunction.php index 85d66cb818..0e98ce9f6b 100644 --- a/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -7,8 +7,10 @@ use PhpParser\Node\FunctionLike; class ArrowFunction extends Expr implements FunctionLike { + /** @var bool Whether the closure is static */ public bool $static; + /** @var bool Whether to return by reference */ public bool $byRef; /** @var Node\Param[] */ @@ -17,6 +19,7 @@ class ArrowFunction extends Expr implements FunctionLike { /** @var null|Node\Identifier|Node\Name|Node\ComplexType */ public ?Node $returnType; + /** @var Expr Expression body */ public Expr $expr; /** @var Node\AttributeGroup[] */ public array $attrGroups; diff --git a/lib/PhpParser/Node/Expr/Match_.php b/lib/PhpParser/Node/Expr/Match_.php index 66305915e1..cd028a2da7 100644 --- a/lib/PhpParser/Node/Expr/Match_.php +++ b/lib/PhpParser/Node/Expr/Match_.php @@ -6,12 +6,15 @@ use PhpParser\Node\MatchArm; class Match_ extends Node\Expr { + /** @var Node\Expr Condition */ public Node\Expr $cond; /** @var MatchArm[] */ public array $arms; /** + * @param Node\Expr $cond Condition * @param MatchArm[] $arms + * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) { $this->attributes = $attributes; diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index fe4d2f2cbb..0e9ff0e2d7 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -17,6 +17,7 @@ class Param extends NodeAbstract { public Expr $var; /** @var null|Expr Default value */ public ?Expr $default; + /** @var int Optional visibility flags */ public int $flags; /** @var AttributeGroup[] PHP attribute groups */ public array $attrGroups; From d8e80653134f085ed2f792838e7101a99761838b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 23 Sep 2023 17:35:51 +0200 Subject: [PATCH 303/428] Don't parse unicode escapes for PHP < 7.0 We still had the option for this but were hardcoding it to true. Make it conditional on the PHP version instead. --- UPGRADE-5.0.md | 1 + grammar/parser.template | 44 +++++++-------- grammar/php.y | 9 ++-- lib/PhpParser/Parser/Php7.php | 8 +-- lib/PhpParser/Parser/Php8.php | 8 +-- lib/PhpParser/PhpVersion.php | 9 +++- test/code/parser/scalar/unicodeEscape.test | 63 ++++++++++++++++++++-- 7 files changed, 102 insertions(+), 40 deletions(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 2f705a0a42..494d2cefc9 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -13,6 +13,7 @@ In particular, if an older `PhpVersion` is specified, then: * For versions before PHP 7.0, `$foo =& new Bar()` assignments are allowed without error. * For versions before PHP 7.0, invalid octal literals `089` are allowed without error. + * For versions before PHP 7.0, unicode escape sequences `\u{123}` in strings are not parsed. * Type hints are interpreted as a class `Name` or as a built-in `Identifier` depending on PHP version, for example `int` is treated as a class name on PHP 5.6 and as a built-in on PHP 7.0. diff --git a/grammar/parser.template b/grammar/parser.template index 41972f0e33..481930f511 100644 --- a/grammar/parser.template +++ b/grammar/parser.template @@ -28,68 +28,68 @@ class #(-p) extends \PhpParser\ParserAbstract public const %s = %n; #endtokenval - protected $tokenToSymbolMapSize = #(YYMAXLEX); - protected $actionTableSize = #(YYLAST); - protected $gotoTableSize = #(YYGLAST); + protected int $tokenToSymbolMapSize = #(YYMAXLEX); + protected int $actionTableSize = #(YYLAST); + protected int $gotoTableSize = #(YYGLAST); - protected $invalidSymbol = #(YYBADCH); - protected $errorSymbol = #(YYINTERRTOK); - protected $defaultAction = #(YYDEFAULT); - protected $unexpectedTokenRule = #(YYUNEXPECTED); + protected int $invalidSymbol = #(YYBADCH); + protected int $errorSymbol = #(YYINTERRTOK); + protected int $defaultAction = #(YYDEFAULT); + protected int $unexpectedTokenRule = #(YYUNEXPECTED); - protected $YY2TBLSTATE = #(YY2TBLSTATE); - protected $numNonLeafStates = #(YYNLSTATES); + protected int $YY2TBLSTATE = #(YY2TBLSTATE); + protected int $numNonLeafStates = #(YYNLSTATES); - protected $symbolToName = array( + protected array $symbolToName = array( #listvar terminals ); - protected $tokenToSymbol = array( + protected array $tokenToSymbol = array( #listvar yytranslate ); - protected $action = array( + protected array $action = array( #listvar yyaction ); - protected $actionCheck = array( + protected array $actionCheck = array( #listvar yycheck ); - protected $actionBase = array( + protected array $actionBase = array( #listvar yybase ); - protected $actionDefault = array( + protected array $actionDefault = array( #listvar yydefault ); - protected $goto = array( + protected array $goto = array( #listvar yygoto ); - protected $gotoCheck = array( + protected array $gotoCheck = array( #listvar yygcheck ); - protected $gotoBase = array( + protected array $gotoBase = array( #listvar yygbase ); - protected $gotoDefault = array( + protected array $gotoDefault = array( #listvar yygdefault ); - protected $ruleToNonTerminal = array( + protected array $ruleToNonTerminal = array( #listvar yylhs ); - protected $ruleToLength = array( + protected array $ruleToLength = array( #listvar yylen ); #if -t - protected $productions = array( + protected array $productions = array( #production-strings; ); #endif diff --git a/grammar/php.y b/grammar/php.y index e092792cde..15c0bad445 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1152,8 +1152,8 @@ exit_expr: backticks_expr: /* empty */ { $$ = array(); } | T_ENCAPSED_AND_WHITESPACE - { $$ = array(Node\InterpolatedStringPart[Scalar\String_::parseEscapeSequences($1, '`')]); } - | encaps_list { parseEncapsed($1, '`', true); $$ = $1; } + { $$ = array(Node\InterpolatedStringPart[Scalar\String_::parseEscapeSequences($1, '`', $this->phpVersion->supportsUnicodeEscapes())]); } + | encaps_list { parseEncapsed($1, '`', $this->phpVersion->supportsUnicodeEscapes()); $$ = $1; } ; ctor_arguments: @@ -1196,10 +1196,11 @@ dereferencable_scalar: $$ = new Expr\Array_($3, $attrs); $this->createdArrays->attach($$); } | array_short_syntax { $$ = $1; $this->createdArrays->attach($$); } - | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes()); } + | T_CONSTANT_ENCAPSED_STRING + { $$ = Scalar\String_::fromString($1, attributes(), $this->phpVersion->supportsUnicodeEscapes()); } | '"' encaps_list '"' { $attrs = attributes(); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - parseEncapsed($2, '"', true); $$ = new Scalar\InterpolatedString($2, $attrs); } + parseEncapsed($2, '"', $this->phpVersion->supportsUnicodeEscapes()); $$ = new Scalar\InterpolatedString($2, $attrs); } ; scalar: diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index c39c52f79f..5a6c435dbf 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2455,10 +2455,10 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 511 => function ($stackPos) { - $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); + $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', $this->phpVersion->supportsUnicodeEscapes()), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); }, 512 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 513 => function ($stackPos) { $this->semValue = array(); @@ -2513,11 +2513,11 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, 530 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->supportsUnicodeEscapes()); }, 531 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, 532 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->allowsInvalidOctals()); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 507ae070ad..3d3dec0a99 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2463,10 +2463,10 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 511 => function ($stackPos) { - $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); + $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', $this->phpVersion->supportsUnicodeEscapes()), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); }, 512 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 513 => function ($stackPos) { $this->semValue = array(); @@ -2521,11 +2521,11 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, 530 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->supportsUnicodeEscapes()); }, 531 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, 532 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->allowsInvalidOctals()); diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index 745759c28f..a6fbb58e47 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -149,9 +149,16 @@ public function allowsDelInIdentifiers(): bool { } /** - * Whether this version support yield in expression context without parentheses. + * Whether this version supports yield in expression context without parentheses. */ public function supportsYieldWithoutParentheses(): bool { return $this->id >= 70000; } + + /** + * Whether this version supports unicode escape sequences in strings. + */ + public function supportsUnicodeEscapes(): bool { + return $this->id >= 70000; + } } diff --git a/test/code/parser/scalar/unicodeEscape.test b/test/code/parser/scalar/unicodeEscape.test index 04ac1582d4..cda2ec20b8 100644 --- a/test/code/parser/scalar/unicodeEscape.test +++ b/test/code/parser/scalar/unicodeEscape.test @@ -3,8 +3,8 @@ Unicode escape sequence Date: Sat, 23 Sep 2023 18:38:52 +0200 Subject: [PATCH 304/428] Pass --dry-run to php-cs-fixer Apparently it only returns the correct exit code with the --dry-run option. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 237942dc82..8b7a3b22ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -116,4 +116,4 @@ jobs: run: | cd tools && composer install - name: "php-cs-fixer" - run: "php tools/vendor/bin/php-cs-fixer fix" + run: "php tools/vendor/bin/php-cs-fixer fix --dry-run" From 80851163a658bf3eb096049d1b463717f34be4d1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 23 Sep 2023 18:42:57 +0200 Subject: [PATCH 305/428] Assemble NodeDumper result in property Append to a property instead of returning strings. This is significantly faster when dumping large ASTs. This also fixes an inconsistency where the indentation level for strings and comments was off-by-one. --- lib/PhpParser/NodeDumper.php | 92 ++++++++++--------- phpstan-baseline.neon | 5 - test/code/parser/scalar/constantString.test | 4 +- .../code/parser/scalar/flexibleDocString.test | 36 ++++---- .../scalar/flexibleDocStringErrors.test | 4 +- test/code/parser/stmt/haltCompilerOffset.test | 2 +- 6 files changed, 72 insertions(+), 71 deletions(-) diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index 07002831a6..e452e98c48 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -11,6 +11,8 @@ class NodeDumper { private bool $dumpComments; private bool $dumpPositions; private ?string $code; + private string $res; + private string $nl; /** * Constructs a NodeDumper. @@ -39,72 +41,76 @@ public function __construct(array $options = []) { */ public function dump($node, ?string $code = null): string { $this->code = $code; - return $this->dumpRecursive($node); + $this->res = ''; + $this->nl = "\n"; + $this->dumpRecursive($node, false); + return $this->res; } - /** @param Node|Comment|array $node */ - protected function dumpRecursive($node): string { + /** @param mixed $node */ + protected function dumpRecursive($node, bool $indent = true): void { + if ($indent) { + $this->nl .= " "; + } if ($node instanceof Node) { - $r = $node->getType(); + $this->res .= $node->getType(); if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) { - $r .= $p; + $this->res .= $p; } - $r .= '('; + $this->res .= '('; foreach ($node->getSubNodeNames() as $key) { - $r .= "\n " . $key . ': '; + $this->res .= "$this->nl " . $key . ': '; $value = $node->$key; - if (null === $value) { - $r .= 'null'; - } elseif (false === $value) { - $r .= 'false'; - } elseif (true === $value) { - $r .= 'true'; - } elseif (is_scalar($value)) { + if (\is_int($value)) { if ('flags' === $key || 'newModifier' === $key) { - $r .= $this->dumpFlags($value); - } elseif ('type' === $key && $node instanceof Include_) { - $r .= $this->dumpIncludeType($value); - } elseif ('type' === $key + $this->res .= $this->dumpFlags($value); + continue; + } + if ('type' === $key && $node instanceof Include_) { + $this->res .= $this->dumpIncludeType($value); + continue; + } + if ('type' === $key && ($node instanceof Use_ || $node instanceof UseItem || $node instanceof GroupUse)) { - $r .= $this->dumpUseType($value); - } else { - $r .= $value; + $this->res .= $this->dumpUseType($value); + continue; } - } else { - $r .= str_replace("\n", "\n ", $this->dumpRecursive($value)); } + $this->dumpRecursive($value); } if ($this->dumpComments && $comments = $node->getComments()) { - $r .= "\n comments: " . str_replace("\n", "\n ", $this->dumpRecursive($comments)); + $this->res .= "$this->nl comments: "; + $this->dumpRecursive($comments); } - } elseif (is_array($node)) { - $r = 'array('; - + $this->res .= "$this->nl)"; + } elseif (\is_array($node)) { + $this->res .= '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)); - } + $this->res .= "$this->nl " . $key . ': '; + $this->dumpRecursive($value); } + $this->res .= "$this->nl)"; } elseif ($node instanceof Comment) { - return $node->getReformattedText(); + $this->res .= \str_replace("\n", $this->nl, $node->getReformattedText()); + } elseif (\is_string($node)) { + $this->res .= \str_replace("\n", $this->nl, (string)$node); + } elseif (\is_int($node) || \is_float($node)) { + $this->res .= $node; + } elseif (null === $node) { + $this->res .= 'null'; + } elseif (false === $node) { + $this->res .= 'false'; + } elseif (true === $node) { + $this->res .= 'true'; } else { throw new \InvalidArgumentException('Can only dump nodes and arrays.'); } - - return $r . "\n)"; + if ($indent) { + $this->nl = \substr($this->nl, 0, -4); + } } protected function dumpFlags(int $flags): string { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 5a9a14ec88..f9ea34d357 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -100,11 +100,6 @@ parameters: count: 1 path: lib/PhpParser/NodeDumper.php - - - message: "#^Method PhpParser\\\\NodeDumper\\:\\:dumpRecursive\\(\\) has parameter \\$node with no value type specified in iterable type array\\.$#" - count: 1 - path: lib/PhpParser/NodeDumper.php - - message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) has parameter \\$nodes with no value type specified in iterable type array\\.$#" count: 1 diff --git a/test/code/parser/scalar/constantString.test b/test/code/parser/scalar/constantString.test index 4084bdd03c..8ce1ec52af 100644 --- a/test/code/parser/scalar/constantString.test +++ b/test/code/parser/scalar/constantString.test @@ -75,7 +75,7 @@ array( 11: Stmt_Expression( expr: Scalar_String( value: !"!\!$! - !@@{ "\r" }@@!@@{ "\t" }@@!@@{ "\f" }@@!@@{ "\v" }@@!@@{ chr(27) /* "\e" */ }@@!\a + !@@{ "\r" }@@!@@{ "\t" }@@!@@{ "\f" }@@!@@{ "\v" }@@!@@{ chr(27) /* "\e" */ }@@!\a ) ) 12: Stmt_Expression( @@ -83,4 +83,4 @@ array( value: !@@{ chr(255) }@@!@@{ chr(255) }@@!@@{ chr(0) }@@!@@{ chr(0) }@@! ) ) -) \ No newline at end of file +) diff --git a/test/code/parser/scalar/flexibleDocString.test b/test/code/parser/scalar/flexibleDocString.test index a1daf4ee80..1b8d8ab5b3 100644 --- a/test/code/parser/scalar/flexibleDocString.test +++ b/test/code/parser/scalar/flexibleDocString.test @@ -155,12 +155,12 @@ array( 4: Stmt_Expression( expr: Scalar_String( value: a - b + b - c + c - d - e + d + e ) ) 5: Stmt_Expression( @@ -168,7 +168,7 @@ array( parts: array( 0: InterpolatedStringPart( value: a - b + b ) 1: Expr_Variable( @@ -176,8 +176,8 @@ array( ) 2: InterpolatedStringPart( value: - d - e + d + e ) ) ) @@ -185,15 +185,15 @@ array( 6: Stmt_Expression( expr: Scalar_String( value: - a + a - b + b - c + c - d + d - e + e ) ) @@ -203,9 +203,9 @@ array( 0: InterpolatedStringPart( value: a - @@{ "\t" }@@a + @@{ "\t" }@@a - b + b ) @@ -215,9 +215,9 @@ array( 2: InterpolatedStringPart( value: - d + d - e + e ) ) @@ -321,7 +321,7 @@ array( ) 1: InterpolatedStringPart( value: - - + - ) ) ) @@ -334,7 +334,7 @@ array( ) 1: InterpolatedStringPart( value: - - + - ) ) ) diff --git a/test/code/parser/scalar/flexibleDocStringErrors.test b/test/code/parser/scalar/flexibleDocStringErrors.test index 38e4d962a0..cb64e0fdd2 100644 --- a/test/code/parser/scalar/flexibleDocStringErrors.test +++ b/test/code/parser/scalar/flexibleDocStringErrors.test @@ -67,8 +67,8 @@ array( exprs: array( 0: Scalar_String( value: a - b - c + b + c ) ) ) diff --git a/test/code/parser/stmt/haltCompilerOffset.test b/test/code/parser/stmt/haltCompilerOffset.test index fc8b58da0a..86c55b8654 100644 --- a/test/code/parser/stmt/haltCompilerOffset.test +++ b/test/code/parser/stmt/haltCompilerOffset.test @@ -28,6 +28,6 @@ array( ) 1: Stmt_HaltCompiler( remaining: - Foo + Foo ) ) From 5edc190bdab5c4adbe408c10176dcae1c5803282 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 23 Sep 2023 20:57:47 +0200 Subject: [PATCH 306/428] Add support for dumping additional attributes --- lib/PhpParser/NodeDumper.php | 109 +++++++-- test/PhpParser/CodeParsingTest.php | 7 +- test/code/parser/formattingAttributes.test | 262 +++++++++++++++++++++ 3 files changed, 362 insertions(+), 16 deletions(-) create mode 100644 test/code/parser/formattingAttributes.test diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index e452e98c48..a2535de733 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -2,7 +2,12 @@ namespace PhpParser; +use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\Include_; +use PhpParser\Node\Expr\List_; +use PhpParser\Node\Scalar\Int_; +use PhpParser\Node\Scalar\InterpolatedString; +use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\GroupUse; use PhpParser\Node\Stmt\Use_; use PhpParser\Node\UseItem; @@ -10,10 +15,21 @@ class NodeDumper { private bool $dumpComments; private bool $dumpPositions; + private bool $dumpOtherAttributes; private ?string $code; private string $res; private string $nl; + private const IGNORE_ATTRIBUTES = [ + 'comments' => true, + 'startLine' => true, + 'endLine' => true, + 'startFilePos' => true, + 'endFilePos' => true, + 'startTokenPos' => true, + 'endTokenPos' => true, + ]; + /** * Constructs a NodeDumper. * @@ -21,12 +37,14 @@ class NodeDumper { * * 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(). + * * bool dumpOtherAttributes: Whether non-comment, non-position attributes should be dumped. * * @param array $options Options (see description) */ public function __construct(array $options = []) { $this->dumpComments = !empty($options['dumpComments']); $this->dumpPositions = !empty($options['dumpPositions']); + $this->dumpOtherAttributes = !empty($options['dumpOtherAttributes']); } /** @@ -85,6 +103,37 @@ protected function dumpRecursive($node, bool $indent = true): void { $this->res .= "$this->nl comments: "; $this->dumpRecursive($comments); } + + if ($this->dumpOtherAttributes) { + foreach ($node->getAttributes() as $key => $value) { + if (isset(self::IGNORE_ATTRIBUTES[$key])) { + continue; + } + + $this->res .= "$this->nl $key: "; + if (\is_int($value)) { + if ('kind' === $key) { + if ($node instanceof Int_) { + $this->res .= $this->dumpIntKind($value); + continue; + } + if ($node instanceof String_ || $node instanceof InterpolatedString) { + $this->res .= $this->dumpStringKind($value); + continue; + } + if ($node instanceof Array_) { + $this->res .= $this->dumpArrayKind($value); + continue; + } + if ($node instanceof List_) { + $this->res .= $this->dumpListKind($value); + continue; + } + } + } + $this->dumpRecursive($value); + } + } $this->res .= "$this->nl)"; } elseif (\is_array($node)) { $this->res .= 'array('; @@ -144,32 +193,62 @@ protected function dumpFlags(int $flags): string { } } - protected function dumpIncludeType(int $type): string { - $map = [ + /** @param array $map */ + private function dumpEnum(int $value, array $map): string { + if (!isset($map[$value])) { + return (string) $value; + } + return $map[$value] . ' (' . $value . ')'; + } + + private function dumpIncludeType(int $type): string { + return $this->dumpEnum($type, [ Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', Include_::TYPE_REQUIRE => 'TYPE_REQUIRE', Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQUIRE_ONCE', - ]; - - if (!isset($map[$type])) { - return (string) $type; - } - return $map[$type] . ' (' . $type . ')'; + ]); } - protected function dumpUseType(int $type): string { - $map = [ + private function dumpUseType(int $type): string { + return $this->dumpEnum($type, [ 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 (string) $type; - } - return $map[$type] . ' (' . $type . ')'; + private function dumpIntKind(int $kind): string { + return $this->dumpEnum($kind, [ + Int_::KIND_BIN => 'KIND_BIN', + Int_::KIND_OCT => 'KIND_OCT', + Int_::KIND_DEC => 'KIND_DEC', + Int_::KIND_HEX => 'KIND_HEX', + ]); + } + + private function dumpStringKind(int $kind): string { + return $this->dumpEnum($kind, [ + String_::KIND_SINGLE_QUOTED => 'KIND_SINGLE_QUOTED', + String_::KIND_DOUBLE_QUOTED => 'KIND_DOUBLE_QUOTED', + String_::KIND_HEREDOC => 'KIND_HEREDOC', + String_::KIND_NOWDOC => 'KIND_NOWDOC', + ]); + } + + private function dumpArrayKind(int $kind): string { + return $this->dumpEnum($kind, [ + Array_::KIND_LONG => 'KIND_LONG', + Array_::KIND_SHORT => 'KIND_SHORT', + ]); + } + + private function dumpListKind(int $kind): string { + return $this->dumpEnum($kind, [ + List_::KIND_LIST => 'KIND_LIST', + List_::KIND_ARRAY => 'KIND_ARRAY', + ]); } /** diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php index 340967819e..d4da650a26 100644 --- a/test/PhpParser/CodeParsingTest.php +++ b/test/PhpParser/CodeParsingTest.php @@ -28,6 +28,7 @@ public function createParser(?string $version): Parser { // Must be public for updateTests.php public function getParseOutput(Parser $parser, $code, array $modes) { $dumpPositions = isset($modes['positions']); + $dumpOtherAttributes = isset($modes['attributes']); $errors = new ErrorHandler\Collecting(); $stmts = $parser->parse($code, $errors); @@ -38,7 +39,11 @@ public function getParseOutput(Parser $parser, $code, array $modes) { } if (null !== $stmts) { - $dumper = new NodeDumper(['dumpComments' => true, 'dumpPositions' => $dumpPositions]); + $dumper = new NodeDumper([ + 'dumpComments' => true, + 'dumpPositions' => $dumpPositions, + 'dumpOtherAttributes' => $dumpOtherAttributes, + ]); $output .= $dumper->dump($stmts, $code); } diff --git a/test/code/parser/formattingAttributes.test b/test/code/parser/formattingAttributes.test new file mode 100644 index 0000000000..84141bba4a --- /dev/null +++ b/test/code/parser/formattingAttributes.test @@ -0,0 +1,262 @@ +Test formatting attributes +----- + Date: Sun, 24 Sep 2023 12:47:41 +0200 Subject: [PATCH 307/428] Add rawValue to InterpolatedStringPart and doc strings For doc strings, the rawValue (on either the String_ or InterpolatedStringPrts) does not include the leading indentation (which is available as docIndentation) or the trailing newline on the last part. --- grammar/php.y | 7 +- lib/PhpParser/Parser/Php7.php | 608 ++++++++++----------- lib/PhpParser/Parser/Php8.php | 608 +++++++++++---------- lib/PhpParser/ParserAbstract.php | 3 + test/code/parser/formattingAttributes.test | 74 ++- 5 files changed, 678 insertions(+), 622 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index 15c0bad445..7380d52755 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1151,8 +1151,8 @@ exit_expr: backticks_expr: /* empty */ { $$ = array(); } - | T_ENCAPSED_AND_WHITESPACE - { $$ = array(Node\InterpolatedStringPart[Scalar\String_::parseEscapeSequences($1, '`', $this->phpVersion->supportsUnicodeEscapes())]); } + | encaps_string_part + { $$ = array($1); parseEncapsed($$, '`', $this->phpVersion->supportsUnicodeEscapes()); } | encaps_list { parseEncapsed($1, '`', $this->phpVersion->supportsUnicodeEscapes()); $$ = $1; } ; @@ -1353,7 +1353,8 @@ encaps_list: ; encaps_string_part: - T_ENCAPSED_AND_WHITESPACE { $$ = Node\InterpolatedStringPart[$1]; } + T_ENCAPSED_AND_WHITESPACE + { $attrs = attributes(); $attrs['rawValue'] = $1; $$ = new Node\InterpolatedStringPart($1, $attrs); } ; encaps_str_varname: diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 5a6c435dbf..2919987f56 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -160,15 +160,15 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected int $tokenToSymbolMapSize = 396; - protected int $actionTableSize = 1260; - protected int $gotoTableSize = 612; + protected int $actionTableSize = 1258; + protected int $gotoTableSize = 618; protected int $invalidSymbol = 168; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 434; + protected int $YY2TBLSTATE = 435; protected int $numNonLeafStates = 739; protected array $symbolToName = array( @@ -393,14 +393,14 @@ class Php7 extends \PhpParser\ParserAbstract -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, -32767, 1244, 837,-32766, 1321, 754,-32766,-32766,-32766,-32766, -593,-32766,-32766,-32766, 104, 105, 106, -593, 1305, 265, - 139, 403, 758, 759, 760, 761, 989,-32766, 428,-32766, + 139, 404, 758, 759, 760, 761, 989,-32766, 429,-32766, -32766, -16,-32766, 242, 1026, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, - 794, 795, 783, 784, 344, 345, 786, 787, 772, 773, - 774, 776, 777, 778, 355, 818, 819, 820, 821, 822, + 794, 795, 783, 784, 345, 346, 786, 787, 772, 773, + 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, 584, 779, 780, 585, 586,-32766, 803, 801, 802, 814, 798, 799, 835, 826, 587, 588, 797, 589, 590, 591, - 592, 593, 594, 826, 458, 459, 460, 1035, 800, 595, + 592, 593, 594, 826, 459, 460, 461, 1035, 800, 595, 596, 940, 140, 2, 133, 134, 135, 582, 136, 137, 1059, 751, 752, 753, 138, 38, -327, -110, -110, 1325, 290, 23, -110,-32766,-32766,-32766, 1324, 35, -110, 1111, @@ -408,11 +408,11 @@ class Php7 extends \PhpParser\ParserAbstract 744, 107, 108, 109,-32766, 274,-32766,-32766,-32766,-32766, -32766,-32766,-32766, 828, 990, -193, 145, 110, 298, 754, 836, 75,-32766,-32766,-32766, 1350, 142, 326, 1351, -593, - 326, -593, 254, 265, 139, 403, 758, 759, 760, 761, - 82, -271, 428,-32766, 326,-32766,-32766,-32766,-32766, 815, + 326, -593, 254, 265, 139, 404, 758, 759, 760, 761, + 82, -271, 429,-32766, 326,-32766,-32766,-32766,-32766, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, - 791, 583, 792, 793, 794, 795, 783, 784, 344, 345, - 786, 787, 772, 773, 774, 776, 777, 778, 355, 818, + 791, 583, 792, 793, 794, 795, 783, 784, 345, 346, + 786, 787, 772, 773, 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, 584, 779, 780, 585, 586, 830, 803, 801, 802, 814, 798, 799, 712, 309, 587, 588, 797, 589, 590, 591, 592, 593, 594, -78, 83, 84, @@ -420,98 +420,98 @@ class Php7 extends \PhpParser\ParserAbstract 748, 749, 750, 725, 751, 752, 753, 788, 789, 37, -327, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 323, 274, 481,-32766,-32766, + 105, 106, 107, 108, 109, 323, 274, 482,-32766,-32766, -32766, -58,-32766,-32766,-32766, 958, 959, 127, 110, -193, 960, 339, 754,-32766,-32766,-32766, 954, -85, 291,-32766, 1087,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, 759, 760, 761, -192,-32766, 824,-32766,-32766,-32766, -366, - 428, -366, 815, 762, 763, 764, 765, 766, 767, 768, + 429, -366, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, 781, 782, -547, 803, 801, 802, 814, 798, 799, 340, 327, 790, 796, 797, 804, 805, 807, 806, 808, 809, - 1032, 390, 606, 7,-32766, 800, 811, 810, 50, 51, - 52, 512, 53, 54, 831, 1239, 1238, 1240, 55, 56, - -110, 57, 1035, 920, 1089, -110, 1035, -110, 291, 482, - 745, 744, 305, 381, 380, -110, -110, -110, -110, -110, - -110, -110, -110, 422, 920, 283, -547, -547, 152, 290, - 379, 380, 1244, 715, 466, 467, 58, 59, 369, 21, - 422, -544, 60, 555, 61, 248, 249, 62, 63, 64, - 65, 66, 67, 68, 69, -547, 28, 267, 70, 444, - 513, 1103, 373, -341, 1271, 1272, 514, -192, 835, 154, - 832, -543, 1269, 42, 25, 515, 388, 516, 241, 517, - 920, 518, 298, 1237, 519, 520, 910, 920, 440, 44, - 45, 445, 376, 375,-32766, 46, 521, 1022, 1021, 1020, - 1023, 367, 338, 441, 1277, -544, -544, 910, 1230, 442, - 523, 524, 525, 835, 1244, 835, 1035, 716, 1340, 1235, - -544, 155, 527, 528,-32766, 1258, 1259, 1260, 1261, 1255, + 1032, 391, 606, 7,-32766, 800, 811, 810, 50, 51, + 52, 513, 53, 54, 831, 1239, 1238, 1240, 55, 56, + -110, 57, 1035, 920, 1089, -110, 1035, -110, 291, 483, + 745, 744, 305, 382, 381, -110, -110, -110, -110, -110, + -110, -110, -110, 423, 920, 283, -547, -547, 152, 290, + 380, 381, 1244, 715, 467, 468, 58, 59, 370, 21, + 423, -544, 60, 556, 61, 248, 249, 62, 63, 64, + 65, 66, 67, 68, 69, -547, 28, 267, 70, 445, + 514, 1103, 374, -341, 1271, 1272, 515, -192, 835, 154, + 832, -543, 1269, 42, 25, 516, 389, 517, 241, 518, + 920, 519, 298, 1237, 520, 521, 910, 920, 441, 44, + 45, 446, 377, 376,-32766, 46, 522, 1022, 1021, 1020, + 1023, 368, 338, 442, 1277, -544, -544, 910, 1230, 443, + 524, 525, 526, 835, 1244, 835, 1035, 716, 1340, 1235, + -544, 155, 528, 529,-32766, 1258, 1259, 1260, 1261, 1255, 1256, 297, -550, 942, -544, -543, -543, 1262, 1257, 290, - 1034, 1239, 1238, 1240, 298, 443, 1035, 71, 1265, 841, + 1034, 1239, 1238, 1240, 298, 444, 1035, 71, 1265, 841, -543, 321, 322, 326, -153, -153, -153, 920, 1239, 1238, 1240, 922, -549, 910, -543, 710, 942, -590,-32766, -153, - 910, -153, 356, -153, -590, -153, 862, 1032, 863, 1088, - 36, 251, 922, 737, 156, 374, 710, 717, 862, -584, + 910, -153, 357, -153, -590, -153, 862, 1032, 863, 1088, + 36, 251, 922, 737, 156, 375, 710, 717, 862, -584, 863, -584, 75, 158, -545, 835, 958, 959, 326, 1035, - -57, 522, 920,-32766,-32766, 361, 896, 954, -110, -110, + -57, 523, 920,-32766,-32766, 362, 896, 954, -110, -110, -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 745, 744, 656, 26, 835, -110, -110, 720, 745, 744, -110, 33, 834, 922, 124, 910, -110, 710, -153, 125, 922, 675, 676, 130, 710, - -32766, 150, 406, 131, 1149, 1151, 48, 144, -545, -545, - 377, 378,-32766, 382, 383, -542, 28, 159, 1237, 920, + -32766, 150, 407, 131, 1149, 1151, 48, 144, -545, -545, + 378, 379,-32766, 383, 384, -542, 28, 159, 1237, 920, 160, 298, 1058, -545, 75,-32766,-32766,-32766, 835,-32766, 326,-32766, 1269,-32766, -87, 910,-32766, -545, 647, 648, 161,-32766,-32766,-32766, -4, 920, -84,-32766,-32766, 727, - 162, 287, 163,-32766, 419, -301, -78, -73, -72, -71, + 162, 287, 163,-32766, 420, -301, -78, -73, -72, -71, 141, 287,-32766, -70, 326, 975, 745, 744, 1230, 710, 299, 300, -69, -68, -67, -297, -590, -66, -590, -542, - -542, -65, 527, 528, -46, 1258, 1259, 1260, 1261, 1255, + -542, -65, 528, 529, -46, 1258, 1259, 1260, 1261, 1255, 1256, -18, 74, 148, -542, 273, 284, 1262, 1257, 126, -542, 726, 910,-32766, 729, 919, 147, 73, -542, 1237, 922, 690, 322, 326, 710, 279,-32766,-32766,-32766, 280, -32766, 285,-32766, 286,-32766, 332, 288,-32766, 910, 289, 292, 49,-32766,-32766,-32766, 293, 274, 1032,-32766,-32766, - 936, 110, -50, 685,-32766, 419, 146, 691, 826, 701, - 374, 703, 435,-32766, 1352, 20, 561, 296, 645, 1035, - 835, 958, 959, 1118, -542, -542, 522,-32766, 692, 693, - 557, 526, 954, -110, -110, -110, 132, 922, 834, -542, - 463, 710, 283, 662, 657,-32766, 1239, 1238, 1240, 678, - 304, 1237, 283, -542, 10, 301, 302, 492,-32766,-32766, + 936, 110, -50, 685,-32766, 420, 146, 691, 826, 701, + 375, 703, 436,-32766, 1352, 20, 561, 296, 645, 1035, + 835, 958, 959, 1118, -542, -542, 523,-32766, 692, 693, + 306, 527, 954, -110, -110, -110, 132, 922, 834, -542, + 464, 710, 283, 662, 657,-32766, 1239, 1238, 1240, 678, + 304, 1237, 283, -542, 10, 301, 302, 493,-32766,-32766, -32766, 663,-32766, 922,-32766, 679,-32766, 710, -4,-32766, - 372, 306, -507, 298,-32766,-32766,-32766, -578, 731,-32766, - -32766,-32766, 920, 303, 128, 1237,-32766, 419, 310, 0, - 567, 955,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, - -32766,-32766, 0,-32766, 0, 1276, 0, 0,-32766,-32766, - -32766,-32766, 1278, 0,-32766,-32766, -497, 1237, 8, 24, - -32766, 419, 920, 371,-32766,-32766,-32766, 938,-32766,-32766, - -32766, 610,-32766, -577, 40,-32766, 41, -576, 734, 487, + 373, 40, -507, 955,-32766,-32766,-32766, -274, 731,-32766, + -32766,-32766, 920, 303, 128, 1237,-32766, 420, 310, 0, + 567, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, + -32766,-32766, 0,-32766, 0, 1276, -497, 0,-32766,-32766, + -32766,-32766, 1278, 0,-32766,-32766, 8, 1237, 24, 372, + -32766, 420, 920, 1266,-32766,-32766,-32766, 610,-32766,-32766, + -32766, 938,-32766, 298, -578,-32766, 846, 41, 734, 488, -32766,-32766,-32766,-32766, 735, 854,-32766,-32766, 901, 1237, - 574, 999,-32766, 419, 976, 983,-32766,-32766,-32766, 973, + 574, 999,-32766, 420, 976, 983,-32766,-32766,-32766, 973, -32766,-32766,-32766, 984,-32766, 910, 899,-32766, 971, 1092, 1095, 1096,-32766,-32766,-32766, 1093, 1094, 1100,-32766,-32766, - 1266, -249, -249, -249,-32766, 419, 846, 374, 1291, 1309, - 28, 267, 1343,-32766, 650, -274, -550, -549, 958, 959, - -548, -491, 835, 522, 1, 910, 1269, 29, 896, 954, - -110, -110, -110, 30, 39, 43, 47, 72, 76, 77, - 78, -248, -248, -248, 79, 80, 81, 374, 143, 153, - 897, 157, 247, 328, 356, 357, 358, 359, 958, 959, - 922, 360, 1230, 522, 710, -249, 361, 362, 896, 954, - -110, -110, -110, 363, 364, 365, 366, 528, 28, 1258, - 1259, 1260, 1261, 1255, 1256, 368, 436, 554, -511, -272, - 835, 1262, 1257, -271, 1269, 13,-32766, 14, 15, 16, - 922, 73, 1237, 1347, 710, -248, 322, 326, 18,-32766, - -32766,-32766, 405,-32766, 483,-32766, 484,-32766, 491, 494, - -32766, 495, 496, 497, 501,-32766,-32766,-32766, 502, 503, - 1230,-32766,-32766, 510, 572, 696, 1248,-32766, 419, 1189, - 1267, 1061, 1060, 1041, 1225, 528,-32766, 1258, 1259, 1260, - 1261, 1255, 1256, 1037, -276, -102, 12, 17, 27, 1262, - 1257, 295, 404, 603, 607, 636, 702, 1193, 1243, 73, - 34, 1190, 1322, 0, 322, 326, 320, 370, 711, 714, - 718, 719, 721, 722, 723, 0, 724, 728, 713, 0, - 1349, 857, 856, 865, 948, 991, 864, 1348, 947, 945, - 946, 949, 1221, 929, 939, 927, 981, 982, 634, 1346, - 1303, 1292, 1310, 1319, 0, 1206, 0, 1270, 0, 326 + 1291, -249, -249, -249,-32766, 420, 1309, 375, 1343, 650, + 28, 267, -577,-32766, -576, -550, -549, -548, 958, 959, + -491, 1, 835, 523, 29, 910, 1269, 30, 896, 954, + -110, -110, -110, 39, 43, 47, 72, 76, 77, 78, + 79, -248, -248, -248, 80, 81, 143, 375, 153, 157, + 897, 247, 328, 357, 358, 359, 360, 361, 958, 959, + 922, 362, 1230, 523, 710, -249, 363, 364, 896, 954, + -110, -110, -110, 365, 366, 367, 369, 529, 28, 1258, + 1259, 1260, 1261, 1255, 1256, 437, 555, 1347, -272, -271, + 835, 1262, 1257, 13, 1269, 14,-32766, 15, 16, 18, + 922, 73, 1237, 1349, 710, -248, 322, 326, 406,-32766, + -32766,-32766, 484,-32766, 485,-32766, 492,-32766, 495, 496, + -32766, 497, 498, 502, 503,-32766,-32766,-32766, 504, 511, + 1230,-32766,-32766, 572, 696, 1248, 1189,-32766, 420, 1267, + 1061, 1060, 1041, 1225, 1037, 529,-32766, 1258, 1259, 1260, + 1261, 1255, 1256, -276, -102, 12, 17, 27, 295, 1262, + 1257, 405, 603, 607, 636, 702, 1193, 1243, 1190, 73, + 34, 1322, 0, 320, 322, 326, 371, 711, 714, 718, + 719, 721, 722, 723, 724, 0, 728, 713, 0, 857, + 856, 865, 948, 991, 864, 1348, 947, 945, 946, 949, + 1221, 929, 939, 927, 981, 982, 634, 1346, 1303, 1292, + 1310, 1319, 0, 1206, 0, 1270, 0, 326 ); protected array $actionCheck = array( @@ -604,30 +604,30 @@ class Php7 extends \PhpParser\ParserAbstract 38, 69, 31, 77, 115, 116, 70, 116, 80, 80, 106, 92, 108, 124, 83, 97, 89, 113, 113, 138, 82, 117, 118, 82, 134, 135, 122, 85, 137, 138, - 85, 127, 128, 129, 130, 131, 31, 159, 155, 149, + 114, 127, 128, 129, 130, 131, 31, 159, 155, 149, 97, 163, 161, 96, 90, 74, 155, 156, 157, 94, 133, 80, 161, 163, 150, 134, 135, 97, 87, 88, 89, 100, 91, 159, 93, 100, 95, 163, 164, 98, - 149, 114, 149, 158, 103, 104, 105, 161, 164, 74, + 149, 159, 149, 128, 103, 104, 105, 162, 164, 74, 109, 110, 1, 132, 163, 80, 115, 116, 132, -1, - 153, 128, 87, 88, 89, 124, 91, -1, 93, -1, - 95, 137, -1, 98, -1, 146, -1, -1, 103, 104, + 153, -1, 87, 88, 89, 124, 91, -1, 93, -1, + 95, 137, -1, 98, -1, 146, 149, -1, 103, 104, 105, 74, 146, -1, 109, 110, 149, 80, 149, 149, - 115, 116, 1, 149, 87, 88, 89, 154, 91, 124, - 93, 153, 95, 161, 159, 98, 159, 161, 159, 102, + 115, 116, 1, 160, 87, 88, 89, 153, 91, 124, + 93, 154, 95, 158, 161, 98, 160, 159, 159, 102, 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, 91, 124, 93, 159, 95, 84, 159, 98, 159, 159, 159, 159, 103, 104, 105, 159, 159, 159, 109, 110, 160, 100, 101, 102, 115, 116, 160, 106, 160, 160, - 70, 71, 160, 124, 160, 162, 161, 161, 117, 118, + 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, 161, 161, 82, 122, 161, 84, 86, 161, 127, 128, 129, 130, 131, 161, 161, 161, 161, 161, 161, 161, 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, 129, 130, 131, 161, 161, 161, 161, 137, 70, 139, - 140, 141, 142, 143, 144, 161, 161, 161, 165, 162, + 140, 141, 142, 143, 144, 161, 161, 164, 162, 162, 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, 88, 89, 162, 91, 162, 93, 162, 95, 162, 162, @@ -636,11 +636,11 @@ class Php7 extends \PhpParser\ParserAbstract 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, - 163, 162, 162, -1, 166, 167, 163, 163, 163, 163, - 163, 163, 163, 163, 163, -1, 163, 163, 163, -1, + 163, 162, -1, 163, 166, 167, 163, 163, 163, 163, + 163, 163, 163, 163, 163, -1, 163, 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, -1, 165, -1, 166, -1, 167 + 164, 164, -1, 165, -1, 166, -1, 167 ); protected array $actionBase = array( @@ -660,9 +660,9 @@ class Php7 extends \PhpParser\ParserAbstract 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 51, 45, 451, 692, 1039, 1045, - 1041, 1046, 1035, 1034, 1040, 1042, 1049, 1085, 1086, 795, - 1087, 1088, 1084, 1089, 1043, 894, 1036, 1044, 289, 289, + 1062, 1062, 1062, 1062, 51, 45, 451, 692, 1036, 1044, + 1040, 1045, 1034, 1033, 1039, 1041, 1046, 1083, 1084, 795, + 1085, 1086, 1082, 1087, 1042, 889, 1035, 1043, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 44, 343, 664, 3, 3, @@ -674,47 +674,47 @@ class Php7 extends \PhpParser\ParserAbstract -25, -25, 448, 741, 501, 408, 283, 338, 394, 334, 334, 14, 14, 531, 531, 9, 9, 531, 531, 531, 478, 478, 478, 478, 441, 471, 552, 428, 824, 53, - 53, 53, 53, 824, 824, 824, 824, 826, 1091, 824, + 53, 53, 53, 824, 824, 824, 824, 826, 1089, 824, 824, 824, 594, 750, 750, 781, 138, 138, 138, 750, - 540, 805, 503, 540, 238, 503, 67, 135, -78, 823, + 540, 503, 503, 540, 238, 503, 67, 135, -78, 805, 377, 499, -78, 362, 656, 636, 59, 743, 624, 743, - 1033, 481, 802, 514, 773, 746, 878, 1065, 1050, 821, - 1082, 825, 1083, 15, 370, 745, 1032, 1032, 1032, 1032, - 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1092, 443, 1033, - 384, 1092, 1092, 1092, 443, 443, 443, 443, 443, 443, - 443, 443, 443, 443, 647, 384, 622, 641, 384, 810, - 443, 51, 827, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 780, 316, 51, 45, 150, 150, 490, - 83, 150, 150, 150, 150, 51, 51, 51, 51, 624, - 799, 797, 627, 838, 375, 799, 799, 799, 270, 158, - 69, 197, 740, 760, 345, 788, 788, 801, 903, 903, - 788, 798, 788, 801, 915, 788, 788, 903, 903, 775, - 180, 550, 353, 524, 565, 903, 279, 788, 788, 788, - 788, 816, 571, 788, 214, 198, 788, 788, 816, 811, - 785, 145, 777, 903, 903, 903, 816, 500, 777, 777, - 777, 839, 845, 765, 784, 337, 297, 611, 169, 822, - 784, 784, 788, 538, 765, 784, 765, 784, 833, 784, - 784, 784, 765, 784, 798, 431, 784, 721, 607, 163, - 784, 6, 916, 917, 723, 918, 913, 919, 965, 923, - 924, 1055, 900, 931, 914, 925, 966, 912, 906, 794, - 693, 698, 829, 783, 899, 792, 792, 792, 895, 792, - 792, 792, 792, 792, 792, 792, 792, 693, 880, 834, - 787, 934, 702, 707, 1012, 819, 926, 963, 1090, 933, - 1014, 927, 835, 711, 986, 935, 774, 1053, 936, 940, - 990, 1017, 846, 1018, 979, 796, 1066, 1067, 886, 946, - 1056, 792, 916, 924, 735, 914, 925, 912, 906, 770, - 766, 762, 763, 761, 752, 747, 748, 782, 1019, 836, - 776, 888, 945, 896, 693, 889, 973, 1047, 992, 994, - 1054, 803, 791, 892, 1068, 952, 953, 954, 1057, 1020, - 1058, 837, 975, 893, 996, 820, 1069, 997, 999, 1000, - 1001, 1059, 1070, 1060, 832, 1061, 849, 814, 967, 807, - 1071, 1, 806, 808, 818, 964, 484, 932, 1063, 1072, - 1073, 1002, 1006, 1007, 1074, 1075, 928, 852, 976, 815, - 977, 971, 855, 856, 525, 813, 1021, 800, 804, 812, - 577, 640, 1076, 1077, 1078, 930, 790, 786, 860, 864, - 1022, 809, 1031, 1079, 649, 867, 724, 1080, 1013, 744, - 754, 281, 654, 335, 756, 779, 1064, 830, 817, 778, - 955, 754, 793, 869, 1081, 870, 871, 872, 1011, 876, + 1032, 481, 802, 802, 514, 773, 746, 878, 1064, 1049, + 821, 1080, 825, 1081, 15, 370, 745, 1031, 1031, 1031, + 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1090, 443, + 1032, 384, 1090, 1090, 1090, 443, 443, 443, 443, 443, + 443, 443, 443, 443, 443, 647, 384, 622, 641, 384, + 810, 443, 51, 817, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 780, 316, 51, 45, 150, 150, + 490, 83, 150, 150, 150, 150, 51, 51, 51, 51, + 624, 799, 797, 627, 834, 375, 799, 799, 799, 270, + 158, 69, 197, 740, 760, 345, 788, 788, 801, 900, + 900, 788, 798, 788, 801, 914, 788, 788, 900, 900, + 835, 180, 550, 353, 524, 565, 900, 279, 788, 788, + 788, 788, 816, 571, 788, 214, 198, 788, 788, 816, + 811, 785, 145, 777, 900, 900, 900, 816, 500, 777, + 777, 777, 839, 845, 765, 784, 337, 297, 611, 169, + 822, 784, 784, 788, 538, 765, 784, 765, 784, 837, + 784, 784, 784, 765, 784, 798, 431, 784, 721, 607, + 163, 784, 6, 915, 916, 723, 917, 912, 918, 964, + 919, 923, 1054, 899, 930, 913, 924, 965, 906, 903, + 794, 693, 698, 827, 783, 896, 792, 792, 792, 894, + 792, 792, 792, 792, 792, 792, 792, 792, 693, 823, + 830, 787, 933, 702, 707, 1011, 819, 926, 1088, 932, + 1013, 925, 772, 711, 977, 934, 774, 1050, 935, 936, + 986, 1014, 846, 1017, 963, 796, 979, 1065, 836, 945, + 1055, 792, 915, 923, 735, 913, 924, 906, 903, 770, + 766, 762, 763, 761, 752, 747, 748, 782, 1018, 893, + 833, 880, 940, 895, 693, 886, 971, 1047, 990, 992, + 1053, 803, 791, 888, 1066, 946, 952, 953, 1056, 1019, + 1057, 838, 973, 775, 994, 820, 1067, 996, 997, 999, + 1000, 1058, 1068, 1059, 891, 1060, 849, 814, 966, 807, + 1069, 1, 806, 808, 818, 955, 484, 931, 1061, 1070, + 1071, 1001, 1002, 1006, 1072, 1073, 927, 852, 975, 815, + 976, 967, 855, 856, 525, 813, 1020, 800, 804, 812, + 577, 640, 1074, 1075, 1076, 928, 790, 786, 860, 864, + 1021, 809, 1022, 1077, 649, 867, 724, 1078, 1012, 744, + 754, 281, 654, 335, 756, 779, 1063, 829, 776, 778, + 954, 754, 793, 869, 1079, 870, 871, 872, 1007, 876, 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, @@ -744,24 +744,24 @@ class Php7 extends \PhpParser\ParserAbstract 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 473, 473, 289, 289, 473, 289, 473, 473, 473, 473, 473, 473, 473, 473, 473, 0, 289, 289, 289, 289, - 289, 289, 289, 289, 473, 775, 473, 138, 138, 138, + 289, 289, 289, 289, 473, 835, 473, 138, 138, 138, 138, 473, 473, 473, -88, -88, 473, 238, 473, 473, 138, 138, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 0, 0, 384, 503, 473, 798, 798, 798, 798, 473, 473, 473, 473, 503, 503, 473, 473, 473, 0, 0, 0, 0, 0, 0, 0, 0, 384, - 503, 0, 384, 0, 0, 798, 798, 473, 238, 775, + 0, 0, 384, 0, 0, 798, 798, 473, 238, 835, 168, 473, 0, 0, 0, 0, 384, 798, 384, 443, - 788, 503, 788, 443, 443, 150, 51, 168, 620, 620, - 620, 620, 0, 0, 624, 775, 775, 775, 775, 775, - 775, 775, 775, 775, 775, 775, 798, 0, 775, 0, - 798, 798, 798, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 798, 0, - 0, 903, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 915, 0, 0, 0, 0, 0, 0, 798, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 792, - 803, 0, 803, 0, 792, 792, 792, 0, 0, 0, - 0, 813, 809 + 788, 503, 503, 788, 443, 443, 150, 51, 168, 620, + 620, 620, 620, 0, 0, 624, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 798, 0, 835, + 0, 798, 798, 798, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 798, + 0, 0, 900, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 914, 0, 0, 0, 0, 0, 0, + 798, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 792, 803, 0, 803, 0, 792, 792, 792, 0, 0, + 0, 0, 813, 809 ); protected array $actionDefault = array( @@ -799,28 +799,28 @@ class Php7 extends \PhpParser\ParserAbstract 32767, 100, 536, 411, 413, 503, 424, 425, 423, 392, 32767, 510,32767, 102,32767, 512,32767,32767,32767,32767, 32767,32767,32767, 535,32767, 542, 542,32767, 496, 100, - 194,32767,32767,32767, 194, 194,32767,32767,32767,32767, - 32767,32767,32767,32767, 603, 496, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110,32767, 194, 110, - 32767,32767,32767, 100, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 189,32767, 267, 269, 102, 557, - 194,32767, 515,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 508,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 496, - 434, 138,32767, 138, 542, 426, 427, 428, 498, 542, - 542, 542, 311, 288,32767,32767,32767,32767, 513, 513, - 100, 100, 100, 100, 508,32767,32767,32767,32767, 111, - 99, 99, 99, 99, 99, 103, 101,32767,32767,32767, - 32767, 222, 99,32767, 101, 101,32767,32767, 222, 224, - 211, 101, 226,32767, 561, 562, 222, 101, 226, 226, - 226, 246, 246, 485, 317, 101, 99, 101, 101, 196, - 317, 317,32767, 101, 485, 317, 485, 317, 198, 317, - 317, 317, 485, 317,32767, 101, 317, 213, 99, 99, - 317,32767,32767,32767, 498,32767,32767,32767,32767,32767, - 32767,32767, 221,32767,32767,32767,32767,32767,32767,32767, - 32767, 529,32767, 546, 559, 432, 433, 435, 544, 457, - 458, 459, 460, 461, 462, 463, 465, 591,32767, 502, - 32767,32767,32767, 337,32767, 601,32767, 601,32767,32767, + 194,32767,32767, 511,32767, 194, 194,32767,32767,32767, + 32767,32767,32767,32767,32767, 603, 496, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110,32767, 194, + 110,32767,32767,32767, 100, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 189,32767, 267, 269, 102, + 557, 194,32767, 515,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 508,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 496, 434, 138,32767, 138, 542, 426, 427, 428, 498, + 542, 542, 542, 311, 288,32767,32767,32767,32767, 513, + 513, 100, 100, 100, 100, 508,32767,32767,32767,32767, + 111, 99, 99, 99, 99, 99, 103, 101,32767,32767, + 32767,32767, 222, 99,32767, 101, 101,32767,32767, 222, + 224, 211, 101, 226,32767, 561, 562, 222, 101, 226, + 226, 226, 246, 246, 485, 317, 101, 99, 101, 101, + 196, 317, 317,32767, 101, 485, 317, 485, 317, 198, + 317, 317, 317, 485, 317,32767, 101, 317, 213, 99, + 99, 317,32767,32767,32767, 498,32767,32767,32767,32767, + 32767,32767,32767, 221,32767,32767,32767,32767,32767,32767, + 32767,32767, 529,32767, 546, 559, 432, 433, 435, 544, + 457, 458, 459, 460, 461, 462, 463, 465, 591,32767, + 502,32767,32767,32767, 337,32767, 601,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767, 602,32767, 542,32767,32767,32767, 32767, 431, 9, 74, 491, 42, 43, 51, 57, 519, @@ -842,74 +842,74 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $goto = array( - 196, 196, 1033, 1064, 697, 430, 661, 621, 658, 319, - 706, 424, 313, 314, 335, 576, 429, 336, 431, 638, - 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, + 196, 196, 1033, 974, 697, 431, 661, 621, 658, 319, + 706, 425, 313, 314, 335, 576, 430, 336, 432, 638, + 654, 655, 1064, 672, 673, 674, 852, 167, 167, 167, 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, - 189, 190, 191, 192, 218, 216, 219, 535, 536, 420, - 537, 539, 540, 541, 542, 543, 544, 545, 546, 1135, + 189, 190, 191, 192, 218, 216, 219, 536, 537, 421, + 538, 540, 541, 542, 543, 544, 545, 546, 547, 1135, 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, 258, 259, 260, 261, 262, 263, 264, 268, 269, 270, - 271, 281, 282, 316, 317, 318, 425, 426, 427, 581, + 271, 281, 282, 316, 317, 318, 426, 427, 428, 581, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, 200, 239, 188, 189, 190, 191, 192, 218, 1135, 201, 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, - 212, 213, 214, 855, 478, 278, 278, 278, 278, 623, - 623, 974, 480, 1268, 600, 1268, 1268, 1268, 1268, 1268, - 1268, 1268, 1268, 1268, 1286, 1286, 599, 1099, 1286, 709, - 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 507, - 700, 848, 1097, 418, 868, 559, 551, 860, 827, 909, - 904, 905, 918, 861, 906, 858, 907, 908, 859, 880, - 886, 912, 867, 833, 547, 547, 547, 547, 423, 604, - 611, 1086, 1081, 1082, 1083, 341, 551, 559, 568, 569, - 343, 579, 602, 616, 617, 407, 408, 573, 465, 465, - 670, 22, 671, 848, 411, 412, 413, 465, 684, 348, - 1236, 414, 1236, 350, 833, 346, 833, 1033, 1033, 1236, - 1326, 457, 1033, 995, 1033, 1033, 1336, 1336, 1033, 1033, + 212, 213, 214, 855, 466, 466, 278, 278, 278, 278, + 623, 623, 853, 466, 1268, 600, 1268, 1268, 1268, 1268, + 1268, 1268, 1268, 1268, 1268, 1286, 1286, 599, 1099, 1286, + 709, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, + 508, 700, 419, 1097, 351, 559, 552, 860, 827, 909, + 904, 905, 918, 861, 906, 858, 907, 908, 859, 848, + 886, 912, 354, 354, 354, 354, 396, 399, 560, 601, + 605, 1086, 1081, 1082, 1083, 341, 552, 559, 568, 569, + 344, 579, 602, 616, 617, 408, 409, 1231, 868, 458, + 670, 22, 671, 833, 412, 413, 414, 913, 684, 914, + 1236, 415, 1236, 880, 573, 347, 867, 1033, 1033, 1236, + 349, 848, 1033, 1326, 1033, 1033, 1106, 1107, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1318, - 1318, 1318, 1318, 1236, 1336, 930, 1122, 393, 1236, 1236, - 1236, 1236, 619, 571, 1236, 1236, 1236, 913, 1014, 914, - 354, 1339, 1337, 1337, 252, 252, 872, 439, 664, 993, - 354, 354, 1132, 925, 866, 1057, 5, 926, 6, 660, - 1337, 941, 1184, 941, 354, 354, 1226, 437, 354, 682, - 1353, 250, 250, 250, 250, 245, 253, 353, 353, 353, - 353, 553, 1284, 1284, 666, 354, 1284, 337, 1284, 1284, - 1284, 1284, 1284, 1284, 1284, 1284, 1284, 538, 538, 1106, - 1107, 538, 848, 538, 538, 538, 538, 538, 538, 538, - 538, 538, 566, 475, 1311, 1312, 733, 637, 639, 1039, - 1038, 659, 966, 409, 705, 683, 687, 1009, 695, 704, - 1005, 845, 1297, 609, 624, 627, 628, 629, 630, 651, - 652, 653, 708, 1215, 943, 1042, 1043, 1216, 1219, 944, - 1220, 325, 308, 686, 873, 552, 563, 449, 449, 449, - 552, 1308, 563, 1308, 957, 396, 461, 1012, 1012, 402, - 1308, 395, 398, 560, 601, 605, 870, 468, 580, 469, - 470, 1313, 1314, 878, 553, 615, 1344, 1345, 577, 614, - 549, 1227, 549, 851, 1070, 1320, 1320, 1320, 1320, 549, - 476, 998, 972, 972, 970, 972, 732, 881, 869, 1069, - 1073, 736, 876, 1017, 550, 1007, 1002, 1231, 977, 432, - 882, 979, 1304, 455, 432, 631, 633, 635, 968, 968, - 968, 968, 1040, 1040, 455, 962, 969, 665, 1051, 1047, - 1048, 1074, 967, 0, 1117, 351, 352, 1229, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 694, - 0, 449, 829, 1072, 1115, 885, 0, 1306, 1306, 1072, - 0, 694, 1232, 1233, 0, 694, 0, 0, 1036, 1036, - 843, 0, 681, 951, 255, 255, 1028, 1044, 1045, 499, - 0, 500, 0, 0, 0, 0, 0, 506, 1234, 1294, - 1295, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1318, 1318, 1318, 1236, 833, 440, 833, 995, 1236, 1236, + 1236, 1236, 1232, 1233, 1236, 1236, 1236, 500, 355, 501, + 843, 394, 252, 252, 479, 507, 1036, 1036, 355, 355, + 681, 951, 481, 925, 1028, 1044, 1045, 926, 1234, 1294, + 1295, 941, 355, 355, 941, 424, 355, 611, 1353, 250, + 250, 250, 250, 245, 253, 476, 1311, 1312, 5, 554, + 6, 1284, 1284, 355, 355, 1284, 571, 1284, 1284, 1284, + 1284, 1284, 1284, 1284, 1284, 1284, 539, 539, 342, 660, + 539, 1132, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 566, 1336, 1336, 1057, 733, 637, 639, 1039, 1038, + 659, 848, 343, 342, 683, 687, 1009, 695, 704, 1005, + 1336, 1297, 851, 548, 548, 548, 548, 1184, 604, 438, + 998, 972, 972, 970, 972, 732, 337, 1339, 1339, 966, + 410, 705, 686, 551, 1007, 1002, 553, 563, 450, 450, + 450, 553, 1308, 563, 1308, 682, 397, 462, 1215, 943, + 666, 1308, 1216, 1219, 944, 1220, 1042, 1043, 469, 580, + 470, 471, 845, 554, 878, 352, 353, 1344, 1345, 325, + 308, 550, 873, 550, 1313, 1314, 1320, 1320, 1320, 1320, + 550, 609, 624, 627, 628, 629, 630, 651, 652, 653, + 708, 577, 614, 876, 324, 275, 324, 631, 633, 635, + 930, 1122, 694, 1304, 456, 829, 403, 619, 957, 968, + 968, 968, 968, 1014, 694, 456, 962, 969, 694, 870, + 615, 872, 1017, 664, 993, 1227, 1229, 477, 1070, 866, + 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, + 450, 1226, 1074, 450, 882, 1072, 736, 433, 979, 1306, + 1306, 1072, 433, 881, 869, 1069, 1073, 1117, 0, 0, + 1040, 1040, 255, 255, 977, 665, 1051, 1047, 1048, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 967, 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, 324, - 275, 324 + 1115, 885, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1012, 1012 ); protected array $gotoCheck = array( - 42, 42, 72, 126, 72, 65, 65, 55, 55, 65, + 42, 42, 72, 49, 72, 65, 65, 55, 55, 65, 9, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 85, 85, 26, 85, 85, 85, 27, 42, 42, 42, + 85, 85, 126, 85, 85, 85, 26, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -923,96 +923,96 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 15, 83, 23, 23, 23, 23, 107, - 107, 49, 83, 107, 129, 107, 107, 107, 107, 107, - 107, 107, 107, 107, 168, 168, 8, 8, 168, 8, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 8, - 8, 22, 8, 43, 35, 75, 75, 15, 6, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 35, - 45, 15, 35, 12, 106, 106, 106, 106, 13, 106, - 13, 15, 15, 15, 15, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 81, 81, 170, 148, 148, - 81, 75, 81, 22, 81, 81, 81, 148, 81, 177, - 72, 81, 72, 96, 12, 81, 12, 72, 72, 72, - 179, 82, 72, 102, 72, 72, 180, 180, 72, 72, + 42, 42, 42, 15, 148, 148, 23, 23, 23, 23, + 107, 107, 27, 148, 107, 129, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 169, 169, 8, 8, 169, + 8, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 8, 8, 43, 8, 96, 75, 75, 15, 6, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 22, + 45, 15, 24, 24, 24, 24, 58, 58, 58, 58, + 58, 15, 15, 15, 15, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 81, 81, 20, 35, 82, + 81, 75, 81, 12, 81, 81, 81, 64, 81, 64, + 72, 81, 72, 35, 171, 81, 35, 72, 72, 72, + 178, 22, 72, 180, 72, 72, 143, 143, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 9, - 9, 9, 9, 72, 180, 17, 17, 61, 72, 72, - 72, 72, 17, 103, 72, 72, 72, 64, 17, 64, - 14, 180, 181, 181, 5, 5, 17, 82, 17, 17, - 14, 14, 149, 72, 17, 113, 46, 72, 46, 63, - 181, 9, 150, 9, 14, 14, 17, 112, 14, 115, - 14, 5, 5, 5, 5, 5, 5, 24, 24, 24, - 24, 14, 169, 169, 119, 14, 169, 29, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 171, 171, 143, - 143, 171, 22, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 48, 174, 174, 174, 48, 48, 48, 117, - 117, 48, 92, 92, 92, 48, 48, 48, 48, 48, - 48, 18, 14, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 78, 78, 118, 118, 78, 78, 78, - 78, 167, 167, 14, 39, 9, 9, 23, 23, 23, - 9, 129, 9, 129, 91, 9, 9, 106, 106, 28, - 129, 58, 58, 58, 58, 58, 37, 9, 9, 9, - 9, 176, 176, 9, 14, 79, 9, 9, 2, 2, - 19, 159, 19, 25, 128, 129, 129, 129, 129, 19, - 156, 25, 25, 25, 25, 25, 25, 16, 16, 16, - 16, 98, 9, 109, 25, 25, 25, 20, 16, 116, - 41, 95, 129, 19, 116, 84, 84, 84, 19, 19, - 19, 19, 116, 116, 19, 19, 19, 116, 116, 116, - 116, 131, 16, -1, 146, 96, 96, 14, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 7, - -1, 23, 7, 129, 16, 16, -1, 129, 129, 129, - -1, 7, 20, 20, -1, 7, -1, -1, 88, 88, - 20, -1, 88, 88, 5, 5, 88, 88, 88, 154, - -1, 154, -1, -1, -1, -1, -1, 154, 20, 20, - 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 9, 9, 9, 72, 12, 82, 12, 102, 72, 72, + 72, 72, 20, 20, 72, 72, 72, 154, 14, 154, + 20, 61, 5, 5, 83, 154, 88, 88, 14, 14, + 88, 88, 83, 72, 88, 88, 88, 72, 20, 20, + 20, 9, 14, 14, 9, 13, 14, 13, 14, 5, + 5, 5, 5, 5, 5, 175, 175, 175, 46, 14, + 46, 170, 170, 14, 14, 170, 103, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 172, 172, 167, 63, + 172, 149, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 48, 181, 181, 113, 48, 48, 48, 117, 117, + 48, 22, 167, 167, 48, 48, 48, 48, 48, 48, + 181, 14, 25, 106, 106, 106, 106, 150, 106, 112, + 25, 25, 25, 25, 25, 25, 29, 181, 181, 92, + 92, 92, 14, 25, 25, 25, 9, 9, 23, 23, + 23, 9, 129, 9, 129, 115, 9, 9, 78, 78, + 119, 129, 78, 78, 78, 78, 118, 118, 9, 9, + 9, 9, 18, 14, 9, 96, 96, 9, 9, 168, + 168, 19, 39, 19, 177, 177, 129, 129, 129, 129, + 19, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 2, 2, 9, 24, 24, 24, 84, 84, 84, + 17, 17, 7, 129, 19, 7, 28, 17, 91, 19, + 19, 19, 19, 17, 7, 19, 19, 19, 7, 37, + 79, 17, 109, 17, 17, 159, 14, 156, 128, 17, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 17, 131, 23, 41, 129, 98, 116, 95, 129, + 129, 129, 116, 16, 16, 16, 16, 146, -1, -1, + 116, 116, 5, 5, 16, 116, 116, 116, 116, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 16, -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, 24, - 24, 24 + 16, 16, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 106, 106 ); protected array $gotoBase = array( - 0, 0, -254, 0, 0, 313, 188, 522, 178, -10, - 0, 0, -73, -109, 13, -184, 26, -169, 92, 195, - 95, 0, -77, 162, 344, 459, 18, 22, 102, 61, - 0, 0, 0, 0, 0, -166, 0, 107, 0, 101, - 0, 50, -1, 184, 0, 197, -410, 0, -329, 153, - 0, 0, 0, 0, 0, -33, 0, 0, 396, 0, - 0, 255, 0, 87, 293, -236, 0, 0, 0, 0, - 0, 0, -5, 0, 0, -139, 0, 0, 6, 112, - 46, -245, -7, -304, 17, -698, 0, 0, 269, 0, - 0, 105, 88, 0, 0, 49, -219, 0, 75, 0, - 0, 0, 238, 260, 0, 0, 196, -72, 0, 114, - 0, 0, 60, 52, 0, 56, 217, 110, 130, 64, - 0, 0, 0, 0, 0, 0, 1, 0, 91, 166, - 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 94, 0, 0, 71, 0, 214, 77, - 58, 0, 0, 0, 65, 0, 31, 0, 0, 93, - 0, 0, 0, 0, 0, 0, 0, 100, -57, 111, - 218, 126, 0, 0, 83, 0, 80, 229, 0, 239, - -31, 5, 0, 0 + 0, 0, -231, 0, 0, 311, 188, 485, 179, -10, + 0, 0, -43, -2, 11, -185, 91, 25, 143, 196, + -146, 0, -59, 163, 219, 398, 22, 168, 159, 120, + 0, 0, 0, 0, 0, -123, 0, 170, 0, 139, + 0, 93, -1, 183, 0, 197, -388, 0, -330, -15, + 0, 0, 0, 0, 0, -33, 0, 0, 181, 0, + 0, 269, 0, 127, 243, -236, 0, 0, 0, 0, + 0, 0, -5, 0, 0, -140, 0, 0, 30, 166, + 113, -246, -29, -155, 8, -698, 0, 0, 37, 0, + 0, 169, 115, 0, 0, 95, -279, 0, 129, 0, + 0, 0, 262, 313, 0, 0, 375, -71, 0, 142, + 0, 0, 132, 111, 0, 152, 265, 109, 161, 150, + 0, 0, 0, 0, 0, 0, 20, 0, 144, 167, + 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 0, 103, 0, 130, 126, + 133, 0, 0, 0, -188, 0, 77, 0, 0, 146, + 0, 0, 0, 0, 0, 0, 0, 71, 138, -56, + 110, 235, 125, 0, 0, 45, 0, 92, 240, 0, + 242, 75, 0, 0 ); protected array $gotoDefault = array( - -32768, 511, 740, 4, 741, 934, 816, 825, 597, 529, - 707, 347, 625, 421, 1302, 911, 1121, 578, 844, 1245, - 1253, 456, 847, 330, 730, 893, 894, 895, 399, 385, - 391, 397, 649, 626, 493, 879, 452, 871, 485, 874, - 451, 883, 164, 417, 509, 887, 3, 890, 556, 921, - 386, 898, 387, 677, 900, 562, 902, 903, 394, 400, - 401, 1126, 570, 622, 915, 256, 564, 916, 384, 917, - 924, 389, 392, 688, 464, 504, 498, 410, 1101, 565, - 608, 646, 446, 472, 620, 632, 618, 479, 433, 415, - 329, 956, 964, 486, 462, 978, 349, 986, 738, 1134, - 640, 488, 994, 641, 1001, 1004, 530, 531, 477, 1016, - 272, 1019, 489, 19, 667, 1030, 1031, 668, 642, 1053, - 643, 669, 644, 1055, 471, 598, 1063, 453, 1071, 1290, - 454, 1075, 266, 1078, 277, 416, 434, 1084, 1085, 9, - 1091, 698, 699, 11, 276, 508, 1116, 689, 450, 1133, - 438, 1203, 1205, 558, 490, 1223, 1222, 680, 505, 1228, - 447, 1293, 448, 532, 473, 315, 533, 307, 333, 312, - 548, 294, 334, 534, 474, 1299, 1307, 331, 31, 1327, - 1338, 342, 575, 613 + -32768, 512, 740, 4, 741, 934, 816, 825, 597, 530, + 707, 348, 625, 422, 1302, 911, 1121, 578, 844, 1245, + 1253, 457, 847, 330, 730, 893, 894, 895, 400, 386, + 392, 398, 649, 626, 494, 879, 453, 871, 486, 874, + 452, 883, 164, 418, 510, 887, 3, 890, 557, 921, + 387, 898, 388, 677, 900, 562, 902, 903, 395, 401, + 402, 1126, 570, 622, 915, 256, 564, 916, 385, 917, + 924, 390, 393, 688, 465, 505, 499, 411, 1101, 565, + 608, 646, 447, 473, 620, 632, 618, 480, 434, 416, + 329, 956, 964, 487, 463, 978, 350, 986, 738, 1134, + 640, 489, 994, 641, 1001, 1004, 531, 532, 478, 1016, + 272, 1019, 490, 19, 667, 1030, 1031, 668, 642, 1053, + 643, 669, 644, 1055, 472, 598, 1063, 454, 1071, 1290, + 455, 1075, 266, 1078, 277, 417, 435, 1084, 1085, 9, + 1091, 698, 699, 11, 276, 509, 1116, 689, 451, 1133, + 439, 1203, 1205, 558, 491, 1223, 1222, 680, 506, 1228, + 448, 1293, 449, 533, 474, 315, 534, 1337, 307, 333, + 312, 549, 294, 334, 535, 475, 1299, 1307, 331, 31, + 1327, 1338, 575, 613 ); protected array $ruleToNonTerminal = array( @@ -1067,17 +1067,17 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 155, 149, 149, 154, 154, 157, 158, 158, 159, 160, 161, 161, 161, 161, 19, 19, 72, 72, 72, 72, 150, 150, 150, 150, 163, 163, 151, 151, - 153, 153, 153, 156, 156, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 169, 169, 169, 107, 171, 171, - 171, 171, 152, 152, 152, 152, 152, 152, 152, 152, - 58, 58, 166, 166, 166, 166, 172, 172, 162, 162, - 162, 173, 173, 173, 173, 173, 173, 73, 73, 65, - 65, 65, 65, 129, 129, 129, 129, 176, 175, 165, - 165, 165, 165, 165, 165, 165, 164, 164, 164, 174, - 174, 174, 174, 106, 170, 178, 178, 177, 177, 179, - 179, 179, 179, 179, 179, 179, 179, 167, 167, 167, - 167, 181, 182, 180, 180, 180, 180, 180, 180, 180, - 180, 183, 183, 183, 183 + 153, 153, 153, 156, 156, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 170, 170, 170, 107, 172, 172, + 172, 172, 152, 152, 152, 152, 152, 152, 152, 152, + 58, 58, 166, 166, 166, 166, 173, 173, 162, 162, + 162, 174, 174, 174, 174, 174, 174, 73, 73, 65, + 65, 65, 65, 129, 129, 129, 129, 177, 176, 165, + 165, 165, 165, 165, 165, 165, 164, 164, 164, 175, + 175, 175, 175, 106, 171, 179, 179, 178, 178, 180, + 180, 180, 180, 180, 180, 180, 180, 168, 168, 168, + 168, 167, 182, 181, 181, 181, 181, 181, 181, 181, + 181, 183, 183, 183, 183 ); protected array $ruleToLength = array( @@ -2455,7 +2455,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 511 => function ($stackPos) { - $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', $this->phpVersion->supportsUnicodeEscapes()), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); foreach ($this->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; }, 512 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2685,7 +2685,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 601 => function ($stackPos) { - $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); $attrs['rawValue'] = $this->semStack[$stackPos-(1-1)]; $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $attrs); }, 602 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 3d3dec0a99..bfe315f7ff 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -160,15 +160,15 @@ class Php8 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected int $tokenToSymbolMapSize = 396; - protected int $actionTableSize = 1260; - protected int $gotoTableSize = 656; + protected int $actionTableSize = 1257; + protected int $gotoTableSize = 707; protected int $invalidSymbol = 168; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 434; + protected int $YY2TBLSTATE = 435; protected int $numNonLeafStates = 739; protected array $symbolToName = array( @@ -392,39 +392,39 @@ class Php8 extends \PhpParser\ParserAbstract 1113, 1110, 1109, 1108, 1114, 745, 744,-32766, 1026,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, -32767, 1244,-32766,-32766, 1321, 754, 1111, 1112, 1113, 1110, - 1109, 1108, 1114, 458, 459, 460, 2, 989, 1305, 265, - 139, 403, 758, 759, 760, 761, 466, 467, 428, 835, + 1109, 1108, 1114, 459, 460, 461, 2, 989, 1305, 265, + 139, 404, 758, 759, 760, 761, 467, 468, 429, 835, 606, -16, 1340, 23, 292, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, - 794, 795, 783, 784, 344, 345, 786, 787, 772, 773, - 774, 776, 777, 778, 355, 818, 819, 820, 821, 822, + 794, 795, 783, 784, 345, 346, 786, 787, 772, 773, + 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, 584, 779, 780, 585, 586, 940, 803, 801, 802, 814, 798, 799, 835, 826, 587, 588, 797, 589, 590, 591, 592, 593, 594, -327, 36, 251, 35, -193, 800, 595, 596, -192, 140, -85, 133, 134, 135, 582, 136, 137, 1059, 751, 752, 753, 138, 38, 129, -110, -110, -584, -32766, -584, -110,-32766,-32766,-32766, 241, 836, -110, 145, - 958, 959,-32766,-32766,-32766, 960, -593,-32766, 481, 745, + 958, 959,-32766,-32766,-32766, 960, -593,-32766, 482, 745, 744, 954, 1035, -593,-32766, 990,-32766,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 299, 754, 831, 75,-32766,-32766,-32766, 291, 142, 326, 242, -85, - 326, 381, 380, 265, 139, 403, 758, 759, 760, 761, - 82, 422, 428,-32766, 326,-32766,-32766,-32766,-32766, 815, + 326, 382, 381, 265, 139, 404, 758, 759, 760, 761, + 82, 423, 429,-32766, 326,-32766,-32766,-32766,-32766, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, - 791, 583, 792, 793, 794, 795, 783, 784, 344, 345, - 786, 787, 772, 773, 774, 776, 777, 778, 355, 818, + 791, 583, 792, 793, 794, 795, 783, 784, 345, 346, + 786, 787, 772, 773, 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, 584, 779, 780, 585, 586, 254, 803, 801, 802, 814, 798, 799, 832, 725, 587, 588, 797, 589, 590, 591, 592, 593, 594, -327, 83, 84, 85, -193, 800, 595, 596, -192, 149, 775, 746, 747, 748, 749, 750, 151, 751, 752, 753, 788, 789, 37, - 482, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 483, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, -593, 274, -593,-32766,-32766, -32766,-32766,-32766,-32766, 310, 1088, 127, 312, 110, 737, 1325, 21, 754,-32766,-32766,-32766, -271, 1324,-32766,-32766, 1087,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, - 759, 760, 761, 1103,-32766, 824,-32766,-32766, -544, 428, + 759, 760, 761, 1103,-32766, 824,-32766,-32766, -544, 429, 1035, 323, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, @@ -432,86 +432,86 @@ class Php8 extends \PhpParser\ParserAbstract 781, 782, 1032, 803, 801, 802, 814, 798, 799, 745, 744, 790, 796, 797, 804, 805, 807, 806, 808, 809, 152,-32766, -544, -544, 1035, 800, 811, 810, 50, 51, - 52, 512, 53, 54, 1239, 1238, 1240, -544, 55, 56, - -110, 57,-32766, 1089, 920, -110, 555, -110, 292, -550, + 52, 513, 53, 54, 1239, 1238, 1240, -544, 55, 56, + -110, 57,-32766, 1089, 920, -110, 556, -110, 292, -550, 339, -544, 306, 103, 104, -110, -110, -110, -110, -110, -110, -110, -110, 105, 106, 107, 108, 109, 1244, 274, - 379, 380, -590, -366, 715, -366, 340, 58, 59, -590, - 422, 110, 60, 369, 61, 248, 249, 62, 63, 64, - 65, 66, 67, 68, 69, -543, 28, 267, 70, 444, - 513,-32766, 373, -341, 1271, 1272, 514, 1277, 835, 862, - 388, 863, 1269, 42, 25, 515, 942, 516, 942, 517, - 920, 518, 299, 1035, 519, 520, 1265, 910, 440, 44, - 45, 445, 376, 375,-32766, 46, 521, 1022, 1021, 1020, - 1023, 367, 338, 390, 1237, 7, 291, 441, 1230, 835, - 523, 524, 525, 442, 1244, 356, 1035, 361, 834, -543, - -543, 154, 527, 528, 443, 1258, 1259, 1260, 1261, 1255, + 380, 381, -590, -366, 715, -366, 340, 58, 59, -590, + 423, 110, 60, 370, 61, 248, 249, 62, 63, 64, + 65, 66, 67, 68, 69, -543, 28, 267, 70, 445, + 514,-32766, 374, -341, 1271, 1272, 515, 1277, 835, 862, + 389, 863, 1269, 42, 25, 516, 942, 517, 942, 518, + 920, 519, 299, 1035, 520, 521, 1265, 910, 441, 44, + 45, 446, 377, 376,-32766, 46, 522, 1022, 1021, 1020, + 1023, 368, 338, 391, 1237, 7, 291, 442, 1230, 835, + 524, 525, 526, 443, 1244, 357, 1035, 362, 834, -543, + -543, 154, 528, 529, 444, 1258, 1259, 1260, 1261, 1255, 1256, 298,-32766,-32766, -543, -547, 1058, 1262, 1257, 291, 1235, 1239, 1238, 1240, 299, 841, -549, 71, -543, 656, 26, 321, 322, 326, -153, -153, -153, 920, 612, 675, 676, 1034, 922, 910,-32766, 286, 710, 835, 155, -153, - 828, -153, 862, -153, 863, -153, 150, 406, 156, 1239, - 1238, 1240,-32766,-32766,-32766, 374, 1350, 716, 75, 1351, + 828, -153, 862, -153, 863, -153, 150, 407, 156, 1239, + 1238, 1240,-32766,-32766,-32766, 375, 1350, 716, 75, 1351, 158, -590, 33, -590, 326, 835, 958, 959, -78, -547, - -547, 522, 920,-32766, 377, 378, 896, 954, -110, -110, + -547, 523, 920,-32766, 378, 379, 896, 954, -110, -110, -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 745, 744, -58, -547, -57, - -110, -110, 717, 745, 744, -110, 382, 383, 922, 1032, + -110, -110, 717, 745, 744, -110, 383, 384, 922, 1032, 910, -110, 710, -153, 647, 648, 830, 124, 141, 125, -32766, 1032, 326, 712, 1149, 1151, 48, 130, 131, 144, 159, 1035,-32766, 160, 161, -542, 28, 162, 1237, 920, 163, 299, 920, 1035, 75,-32766,-32766,-32766, 835,-32766, 326,-32766, 1269,-32766, 282, 910,-32766, -87, -84, -78, -73,-32766,-32766,-32766, -4, 920, 282,-32766,-32766, 720, - -72, -71, 727,-32766, 419, -70, -69, -68, -67, -66, + -72, -71, 727,-32766, 420, -70, -69, -68, -67, -66, 287, 286,-32766, -65, -46, 922, 745, 744, 1230, 710, 300, 301, -545, -18, 148, -301, 273, 283, 726, -542, - -542, 729, 527, 528, 920, 1258, 1259, 1260, 1261, 1255, + -542, 729, 528, 529, 920, 1258, 1259, 1260, 1261, 1255, 1256, 919, 74, 147, -542, 288, 293, 1262, 1257, 126, -297, 280, 910,-32766, 281, 910, 284, 73, -542, 1237, 975, 690, 322, 326, 710, 285,-32766,-32766,-32766, 332, -32766, 274,-32766, 294,-32766, 936, 110,-32766, 910, 685, 835, -542,-32766,-32766,-32766, 826, -545, -545,-32766,-32766, - 146,-32766, -50, 701,-32766, 419, 703, 691, 20, 1118, - 374, -545, 435,-32766, 645, 1352, 1276, 297, 557,-32766, - 1278, 958, 959, 561, 662, -545, 522, 910, 692, 693, - 678, 526, 954, -110, -110, -110, 132, 922, 657, 463, - 922, 710, 492, -507, 710,-32766, 1239, 1238, 1240, 663, - 679, 1237, 282, 307, 10, -542, -542, 299,-32766,-32766, - -32766, 34,-32766, 922,-32766, 955,-32766, 710, -4,-32766, - -542, 305, 40, 304,-32766,-32766,-32766, 0, 0,-32766, - -32766,-32766, 920, 311, -542, 1237,-32766, 419, 567, 0, - 0, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, - -32766, -497, 922,-32766, 8, 24, 710, 371,-32766,-32766, - -32766,-32766, 610, 41,-32766,-32766, 938, 1237, 834, 734, - -32766, 419, 920, 735,-32766,-32766,-32766, 854,-32766,-32766, - -32766, 901,-32766, 999, 976,-32766, 49, 983, 973, 487, + 146,-32766, -50, 701,-32766, 420, 703, 691, 20, 1118, + 375, -545, 436,-32766, 645, 1352, 1276, 297, 657,-32766, + 1278, 958, 959, 561, 955, -545, 523, 910, 692, 693, + 678, 527, 954, -110, -110, -110, 132, 922, 662, 663, + 922, 710, 464, -507, 710,-32766, 1239, 1238, 1240, 493, + 679, 1237, 282, 938, 10, -542, -542, 40,-32766,-32766, + -32766, 731,-32766, 922,-32766, 307,-32766, 710, -4,-32766, + -542, 305, 41, 304,-32766,-32766,-32766, 0, 0,-32766, + -32766,-32766, 920, 0, -542, 1237,-32766, 420, 311, 0, + 567, 299,-32766,-32766,-32766,-32766,-32766, -497,-32766, 897, + -32766, 0, 922,-32766, 8, 0, 710, 24,-32766,-32766, + -32766,-32766, 372, 610,-32766,-32766, 834, 1237, 734, -274, + -32766, 420, 920, 735,-32766,-32766,-32766, 854,-32766,-32766, + -32766, 901,-32766, 999, 976,-32766, 49, 983, 973, 488, -32766,-32766,-32766,-32766, 984, 899,-32766,-32766, 971, 1237, - 574, 1092,-32766, 419, 1095, 1096,-32766,-32766,-32766, 1093, + 574, 1092,-32766, 420, 1095, 1096,-32766,-32766,-32766, 1093, -32766,-32766,-32766, 1094,-32766, 910, 1100,-32766, 1266, 846, - 1291, 1309,-32766,-32766,-32766, 1343, 650, 320,-32766,-32766, - -578, -249, -249, -249,-32766, 419, -577, 374, -576, -550, + 1291, 1309,-32766,-32766,-32766, 1343, 650, 34,-32766,-32766, + -578, -249, -249, -249,-32766, 420, -577, 375, -576, -550, 28, 267, -549,-32766, -548, -491, 1, 29, 958, 959, - 302, 303, 835, 522, 30, 910, 1269, 39, 896, 954, - -110, -110, -110, 43, 47, 372, 72, 76, 77, 78, - 79, -248, -248, -248, 80, 81, 143, 374, 153, 128, - -274, 157, 247, 328, 356, 357, 358, 359, 958, 959, - 922, 360, 1230, 522, 710, -249, 361, 362, 896, 954, - -110, -110, -110, 363, 364, 365, 366, 528, 28, 1258, - 1259, 1260, 1261, 1255, 1256, 368, 436, 554, -511, -272, - 835, 1262, 1257, -271, 1269, 13,-32766, 14, 15, 16, - 922, 73, 1237, 731, 710, -248, 322, 326, 18,-32766, - -32766,-32766, 405,-32766, 483,-32766, 484,-32766, 491, 494, - -32766, 495, 496, 497, 501,-32766,-32766,-32766, 502, 503, - 1230,-32766,-32766, 510, 572, 696, 1248,-32766, 419, 1189, - 1267, 1061, 1060, 1041, 1225, 528,-32766, 1258, 1259, 1260, - 1261, 1255, 1256, 1037, -276, -102, 12, 17, 27, 1262, - 1257, 296, 404, 603, 607, 636, 702, 1193, 1243, 73, - 370, 1190, 1322, 0, 322, 326, 711, 714, 718, 719, - 721, 722, 723, 724, 728, 0, 713, 0, 897, 1347, - 1349, 857, 856, 865, 948, 991, 864, 1348, 947, 945, - 946, 949, 1221, 929, 939, 927, 981, 982, 634, 1346, - 1303, 1292, 1310, 1319, 0, 1206, 0, 1270, 0, 326 + 302, 303, 835, 523, 30, 910, 1269, 39, 896, 954, + -110, -110, -110, 43, 47, 373, 72, 76, 77, 78, + 79, -248, -248, -248, 80, 81, 143, 375, 153, 128, + -272, 157, 247, 328, 357, 358, 359, 360, 958, 959, + 922, 361, 1230, 523, 710, -249, 362, 363, 896, 954, + -110, -110, -110, 364, 365, 366, 367, 529, 28, 1258, + 1259, 1260, 1261, 1255, 1256, 369, 437, 555, 1206, -271, + 835, 1262, 1257, 13, 1269, 14,-32766, 15, 16, 18, + 922, 73, 1237, 1347, 710, -248, 322, 326, 406,-32766, + -32766,-32766, 484,-32766, 485,-32766, 492,-32766, 495, 496, + -32766, 497, 498, 502, 503,-32766,-32766,-32766, 504, 511, + 1230,-32766,-32766, 572, 696, 1248, 1189,-32766, 420, 1267, + 1061, 1060, 1041, 1225, 1037, 529,-32766, 1258, 1259, 1260, + 1261, 1255, 1256, -276, -102, 12, 17, 27, 296, 1262, + 1257, 405, 603, 607, 636, 702, 1193, 1243, 1190, 73, + 320, 1322, 0, 371, 322, 326, 711, 714, 718, 719, + 721, 722, 723, 724, 728, 0, 713, 0, 1349, 857, + 856, 865, 948, 991, 864, 1348, 947, 945, 946, 949, + 1221, 929, 939, 927, 981, 982, 634, 1346, 1303, 1292, + 1310, 1319, 0, 0, 1270, 0, 326 ); protected array $actionCheck = array( @@ -602,17 +602,17 @@ class Php8 extends \PhpParser\ParserAbstract 91, 57, 93, 37, 95, 38, 69, 98, 84, 77, 82, 70, 103, 104, 105, 80, 134, 135, 109, 110, 70, 85, 31, 80, 115, 116, 92, 116, 97, 82, - 106, 149, 108, 124, 113, 83, 146, 113, 85, 137, - 146, 117, 118, 89, 96, 163, 122, 84, 137, 138, - 94, 127, 128, 129, 130, 131, 31, 159, 90, 97, - 159, 163, 97, 149, 163, 74, 155, 156, 157, 100, - 100, 80, 161, 114, 150, 134, 135, 158, 87, 88, - 89, 163, 91, 159, 93, 128, 95, 163, 164, 98, + 106, 149, 108, 124, 113, 83, 146, 113, 90, 137, + 146, 117, 118, 89, 128, 163, 122, 84, 137, 138, + 94, 127, 128, 129, 130, 131, 31, 159, 96, 100, + 159, 163, 97, 149, 163, 74, 155, 156, 157, 97, + 100, 80, 161, 154, 150, 134, 135, 159, 87, 88, + 89, 164, 91, 159, 93, 114, 95, 163, 164, 98, 149, 133, 159, 132, 103, 104, 105, -1, -1, 74, - 109, 110, 1, 132, 163, 80, 115, 116, 153, -1, - -1, -1, 87, 88, 89, 124, 91, -1, 93, -1, - 95, 149, 159, 98, 149, 149, 163, 149, 103, 104, - 105, 74, 153, 159, 109, 110, 154, 80, 155, 159, + 109, 110, 1, -1, 163, 80, 115, 116, 132, -1, + 153, 158, 87, 88, 89, 124, 91, 149, 93, 164, + 95, -1, 159, 98, 149, -1, 163, 149, 103, 104, + 105, 74, 149, 153, 109, 110, 155, 80, 159, 162, 115, 116, 1, 159, 87, 88, 89, 159, 91, 124, 93, 159, 95, 159, 159, 98, 70, 159, 159, 102, 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, @@ -636,11 +636,11 @@ class Php8 extends \PhpParser\ParserAbstract 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, - 163, 162, 162, -1, 166, 167, 163, 163, 163, 163, + 163, 162, -1, 163, 166, 167, 163, 163, 163, 163, 163, 163, 163, 163, 163, -1, 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, -1, 165, -1, 166, -1, 167 + 164, 164, -1, -1, 166, -1, 167 ); protected array $actionBase = array( @@ -660,9 +660,9 @@ class Php8 extends \PhpParser\ParserAbstract 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 18, 36, 79, 648, 1039, 1045, - 1041, 1046, 1035, 1034, 1040, 1042, 1049, 1085, 1086, 782, - 1087, 1088, 1084, 1089, 1043, 876, 1036, 1044, 289, 289, + 1062, 1062, 1062, 1062, 18, 36, 79, 648, 1036, 1044, + 1040, 1045, 1034, 1033, 1039, 1041, 1046, 1083, 1084, 782, + 1085, 1086, 1082, 1087, 1042, 876, 1035, 1043, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 195, 342, 43, 4, 4, @@ -674,47 +674,47 @@ class Php8 extends \PhpParser\ParserAbstract -23, -23, 448, 605, 497, 260, 397, 434, 54, 394, 593, 593, 316, 316, 415, 415, 316, 316, 316, 442, 442, 252, 252, 252, 252, 318, 455, 433, 391, 742, - 53, 53, 53, 53, 742, 742, 742, 742, 734, 1091, + 53, 53, 53, 53, 742, 742, 742, 742, 734, 1088, 742, 742, 742, 722, 781, 781, 926, 551, 551, 781, - 536, 793, -3, 536, 63, -3, 67, 576, 335, 797, - 115, 9, 335, 535, 656, 501, 185, 823, 568, 823, - 1033, 424, 776, 426, 753, 729, 867, 1063, 1050, 809, - 1082, 810, 1083, -66, -58, 728, 1032, 1032, 1032, 1032, - 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1092, 402, 1033, - 130, 1092, 1092, 1092, 402, 402, 402, 402, 402, 402, - 402, 402, 402, 402, 603, 130, 544, 554, 130, 804, - 402, 18, 812, 18, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 762, 157, 18, 36, 124, 124, 196, - 37, 124, 124, 124, 124, 18, 18, 18, 18, 568, - 784, 795, 600, 819, 143, 784, 784, 784, 122, 135, - 204, 139, 760, 785, 467, 775, 775, 787, 895, 895, - 775, 768, 775, 787, 913, 775, 775, 895, 895, 759, - 158, 550, 472, 524, 569, 895, 346, 775, 775, 775, - 775, 811, 575, 775, 271, 171, 775, 775, 811, 801, - 766, 58, 798, 895, 895, 895, 811, 505, 798, 798, - 798, 820, 824, 761, 765, 383, 349, 607, 138, 807, - 765, 765, 775, 532, 761, 765, 761, 765, 822, 765, - 765, 765, 761, 765, 768, 498, 765, 714, 586, 75, - 765, 6, 915, 916, 726, 917, 906, 918, 965, 919, - 923, 1053, 894, 931, 912, 924, 966, 903, 896, 780, - 701, 703, 815, 754, 893, 777, 777, 777, 888, 777, - 777, 777, 777, 777, 777, 777, 777, 701, 868, 818, - 794, 934, 711, 712, 1012, 730, 1064, 963, 1090, 933, - 1014, 925, 773, 713, 986, 935, 979, 874, 936, 940, - 990, 1017, 828, 1018, 1065, 790, 1066, 1067, 869, 946, + 536, -3, -3, 536, 63, -3, 67, 576, 335, 756, + 115, 9, 335, 535, 656, 501, 185, 821, 568, 821, + 1032, 424, 776, 776, 426, 753, 729, 867, 1063, 1049, + 799, 1080, 810, 1081, -66, -58, 728, 1031, 1031, 1031, + 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1089, 402, + 1032, 130, 1089, 1089, 1089, 402, 402, 402, 402, 402, + 402, 402, 402, 402, 402, 603, 130, 544, 554, 130, + 804, 402, 18, 808, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 762, 157, 18, 36, 124, 124, + 196, 37, 124, 124, 124, 124, 18, 18, 18, 18, + 568, 784, 797, 600, 820, 143, 784, 784, 784, 122, + 135, 204, 139, 760, 785, 467, 775, 775, 787, 895, + 895, 775, 768, 775, 787, 913, 775, 775, 895, 895, + 793, 158, 550, 472, 524, 569, 895, 346, 775, 775, + 775, 775, 816, 575, 775, 271, 171, 775, 775, 816, + 801, 766, 58, 798, 895, 895, 895, 816, 505, 798, + 798, 798, 819, 824, 761, 765, 383, 349, 607, 138, + 807, 765, 765, 775, 532, 761, 765, 761, 765, 759, + 765, 765, 765, 761, 765, 768, 498, 765, 714, 586, + 75, 765, 6, 915, 916, 726, 917, 906, 918, 965, + 919, 923, 1053, 894, 931, 912, 924, 966, 903, 896, + 780, 701, 703, 815, 754, 893, 777, 777, 777, 888, + 777, 777, 777, 777, 777, 777, 777, 777, 701, 868, + 823, 794, 934, 711, 712, 1011, 730, 795, 963, 933, + 1013, 925, 758, 713, 977, 935, 757, 1047, 936, 940, + 986, 1014, 828, 1017, 979, 790, 1064, 1065, 869, 946, 1054, 777, 915, 923, 727, 912, 924, 903, 896, 752, - 748, 746, 747, 745, 744, 739, 740, 763, 1019, 887, - 879, 870, 945, 891, 701, 871, 973, 758, 992, 994, - 1047, 802, 792, 875, 1068, 952, 953, 954, 1055, 1020, - 1056, 814, 975, 928, 996, 805, 1069, 997, 999, 1000, - 1001, 1057, 1070, 1058, 885, 1059, 832, 808, 967, 788, - 1071, 299, 791, 800, 806, 964, 436, 932, 1060, 1072, - 1073, 1002, 1006, 1007, 1074, 1075, 927, 834, 976, 796, - 977, 971, 835, 838, 577, 779, 1021, 786, 789, 778, - 624, 634, 1076, 1077, 1078, 930, 767, 772, 839, 845, - 1022, 743, 1031, 1079, 646, 846, 717, 1080, 1013, 718, - 721, 652, 683, 681, 724, 774, 1061, 816, 799, 771, - 955, 721, 770, 849, 1081, 852, 855, 856, 1011, 860, + 748, 746, 747, 745, 744, 739, 740, 763, 1018, 887, + 879, 870, 945, 891, 701, 871, 971, 874, 990, 992, + 1050, 805, 792, 875, 1066, 952, 953, 954, 1055, 1019, + 1056, 773, 973, 817, 994, 812, 1067, 996, 997, 999, + 1000, 1057, 1068, 1058, 885, 1059, 832, 788, 928, 802, + 1069, 299, 791, 800, 806, 964, 436, 932, 1060, 1070, + 1071, 1001, 1002, 1006, 1072, 1073, 927, 834, 975, 796, + 976, 967, 835, 838, 577, 779, 1020, 786, 789, 778, + 624, 634, 1074, 1075, 1076, 930, 767, 772, 839, 845, + 1021, 743, 1022, 1077, 646, 846, 717, 1078, 1012, 718, + 721, 652, 683, 681, 724, 774, 1061, 818, 811, 771, + 955, 721, 770, 849, 1079, 852, 855, 856, 1007, 860, 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, @@ -744,24 +744,24 @@ class Php8 extends \PhpParser\ParserAbstract 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 494, 494, 289, 289, 494, 289, 494, 494, 494, 494, 494, 494, 494, 494, 494, 0, 289, 289, 289, 289, - 289, 289, 289, 289, 494, 759, 494, 442, 442, 442, + 289, 289, 289, 289, 494, 793, 494, 442, 442, 442, 442, 494, 494, 494, -88, -88, 442, 494, 63, 494, 494, 494, 494, 494, 494, 494, 494, 494, 0, 0, 494, 494, 494, 494, 0, 0, 130, -3, 494, 768, 768, 768, 768, 494, 494, 494, 494, -3, -3, 494, 494, 494, 0, 0, 0, 0, 442, 442, 0, 130, - -3, 0, 130, 0, 0, 768, 768, 494, 63, 759, + 0, 0, 130, 0, 0, 768, 768, 494, 63, 793, 359, 494, 0, 0, 0, 0, 130, 768, 130, 402, - 775, -3, 775, 402, 402, 124, 18, 359, 545, 545, - 545, 545, 0, 0, 568, 759, 759, 759, 759, 759, - 759, 759, 759, 759, 759, 759, 768, 0, 759, 0, - 768, 768, 768, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 768, 0, - 0, 895, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 913, 0, 0, 0, 0, 0, 0, 768, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 777, - 802, 0, 802, 0, 777, 777, 777, 0, 0, 0, - 0, 779, 743 + 775, -3, -3, 775, 402, 402, 124, 18, 359, 545, + 545, 545, 545, 0, 0, 568, 793, 793, 793, 793, + 793, 793, 793, 793, 793, 793, 793, 768, 0, 793, + 0, 768, 768, 768, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 768, + 0, 0, 895, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 913, 0, 0, 0, 0, 0, 0, + 768, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 777, 805, 0, 805, 0, 777, 777, 777, 0, 0, + 0, 0, 779, 743 ); protected array $actionDefault = array( @@ -799,28 +799,28 @@ class Php8 extends \PhpParser\ParserAbstract 102,32767, 100, 536, 411, 413, 503, 424, 425, 392, 32767, 510,32767, 102,32767, 512,32767,32767,32767,32767, 32767,32767,32767, 535,32767, 542, 542,32767, 496, 100, - 194,32767,32767,32767, 194, 194,32767,32767,32767,32767, - 32767,32767,32767,32767, 603, 496, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110,32767, 194, 110, - 32767,32767,32767, 100, 194, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 189,32767, 267, 269, 102, 557, - 194,32767, 515,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 508,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 496, - 434, 138,32767, 138, 542, 426, 427, 428, 498, 542, - 542, 542, 311, 288,32767,32767,32767,32767, 513, 513, - 100, 100, 100, 100, 508,32767,32767,32767,32767, 111, - 99, 99, 99, 99, 99, 103, 101,32767,32767,32767, - 32767, 222, 99,32767, 101, 101,32767,32767, 222, 224, - 211, 101, 226,32767, 561, 562, 222, 101, 226, 226, - 226, 246, 246, 485, 317, 101, 99, 101, 101, 196, - 317, 317,32767, 101, 485, 317, 485, 317, 198, 317, - 317, 317, 485, 317,32767, 101, 317, 213, 99, 99, - 317,32767,32767,32767, 498,32767,32767,32767,32767,32767, - 32767,32767, 221,32767,32767,32767,32767,32767,32767,32767, - 32767, 529,32767, 546, 559, 432, 433, 435, 544, 457, - 458, 459, 460, 461, 462, 463, 465, 591,32767, 502, - 32767,32767,32767, 337,32767, 601,32767, 601,32767,32767, + 194,32767,32767, 511,32767, 194, 194,32767,32767,32767, + 32767,32767,32767,32767,32767, 603, 496, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110,32767, 194, + 110,32767,32767,32767, 100, 194, 194, 194, 194, 194, + 194, 194, 194, 194, 194, 189,32767, 267, 269, 102, + 557, 194,32767, 515,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 508,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 496, 434, 138,32767, 138, 542, 426, 427, 428, 498, + 542, 542, 542, 311, 288,32767,32767,32767,32767, 513, + 513, 100, 100, 100, 100, 508,32767,32767,32767,32767, + 111, 99, 99, 99, 99, 99, 103, 101,32767,32767, + 32767,32767, 222, 99,32767, 101, 101,32767,32767, 222, + 224, 211, 101, 226,32767, 561, 562, 222, 101, 226, + 226, 226, 246, 246, 485, 317, 101, 99, 101, 101, + 196, 317, 317,32767, 101, 485, 317, 485, 317, 198, + 317, 317, 317, 485, 317,32767, 101, 317, 213, 99, + 99, 317,32767,32767,32767, 498,32767,32767,32767,32767, + 32767,32767,32767, 221,32767,32767,32767,32767,32767,32767, + 32767,32767, 529,32767, 546, 559, 432, 433, 435, 544, + 457, 458, 459, 460, 461, 462, 463, 465, 591,32767, + 502,32767,32767,32767, 337,32767, 601,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767, 602,32767, 542,32767,32767,32767, 32767, 431, 9, 74, 491, 42, 43, 51, 57, 519, @@ -842,72 +842,77 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $goto = array( - 196, 196, 1033, 1064, 697, 430, 661, 621, 658, 319, - 706, 424, 314, 315, 335, 576, 429, 336, 431, 638, + 196, 196, 1033, 1064, 697, 431, 661, 621, 658, 319, + 706, 425, 314, 315, 335, 576, 430, 336, 432, 638, 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, - 189, 190, 191, 192, 218, 216, 219, 535, 536, 420, - 537, 539, 540, 541, 542, 543, 544, 545, 546, 1135, + 189, 190, 191, 192, 218, 216, 219, 536, 537, 421, + 538, 540, 541, 542, 543, 544, 545, 546, 547, 1135, 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, 258, 259, 260, 261, 262, 263, 264, 268, 269, 270, - 271, 277, 289, 290, 317, 318, 425, 426, 427, 581, + 271, 277, 289, 290, 317, 318, 426, 427, 428, 581, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, 200, 239, 188, 189, 190, 191, 192, 218, 1135, 201, 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, - 212, 213, 214, 855, 478, 279, 279, 279, 279, 623, - 623, 974, 480, 1268, 600, 1268, 1268, 1268, 1268, 1268, - 1268, 1268, 1268, 1268, 1286, 1286, 599, 1099, 1286, 709, - 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 507, - 700, 418, 1097, 1337, 1337, 559, 551, 860, 827, 909, - 904, 905, 918, 861, 906, 858, 907, 908, 859, 457, - 1337, 912, 353, 353, 353, 353, 395, 398, 560, 601, - 605, 1086, 1081, 1082, 1083, 341, 551, 559, 568, 569, - 343, 579, 602, 616, 617, 407, 408, 913, 868, 914, - 670, 22, 671, 350, 411, 412, 413, 423, 684, 611, - 1236, 414, 1236, 880, 439, 346, 867, 1033, 1033, 1236, - 833, 886, 5, 1033, 6, 1033, 1033, 1033, 1033, 1033, - 1033, 1033, 1033, 1033, 573, 848, 1033, 1033, 1033, 1033, - 1318, 1318, 1318, 1318, 1236, 348, 930, 1122, 1326, 1236, - 1236, 1236, 1236, 619, 995, 1236, 1236, 1236, 393, 1014, - 833, 354, 833, 571, 252, 252, 499, 872, 500, 664, - 993, 354, 354, 925, 506, 866, 660, 926, 475, 1311, - 1312, 941, 1132, 941, 354, 354, 848, 1226, 354, 1057, - 1353, 250, 250, 250, 250, 245, 253, 1184, 549, 437, - 549, 553, 1284, 1284, 682, 354, 1284, 549, 1284, 1284, - 1284, 1284, 1284, 1284, 1284, 1284, 1284, 538, 538, 1336, - 1336, 538, 666, 538, 538, 538, 538, 538, 538, 538, - 538, 538, 455, 966, 409, 705, 1336, 968, 968, 968, - 968, 337, 566, 455, 962, 969, 733, 637, 639, 1106, - 1107, 659, 1297, 1339, 957, 683, 687, 1009, 695, 704, - 1005, 609, 624, 627, 628, 629, 630, 651, 652, 653, - 708, 1039, 1038, 686, 845, 552, 563, 449, 449, 449, - 552, 1308, 563, 1308, 870, 396, 461, 631, 633, 635, - 1308, 547, 547, 547, 547, 873, 604, 468, 580, 469, - 470, 851, 402, 878, 553, 848, 1344, 1345, 1227, 998, - 972, 972, 970, 972, 732, 1017, 1320, 1320, 1320, 1320, - 1042, 1043, 550, 1007, 1002, 325, 309, 881, 869, 1069, - 1073, 432, 876, 615, 324, 275, 324, 432, 977, 1231, - 465, 465, 1304, 1040, 1040, 736, 1313, 1314, 476, 465, - 665, 1051, 1047, 1048, 1070, 351, 352, 1036, 1036, 681, - 951, 1074, 967, 1028, 1044, 1045, 882, 1229, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 577, - 614, 449, 0, 1072, 1115, 885, 1117, 1306, 1306, 1072, - 979, 0, 1215, 943, 1232, 1233, 1216, 1219, 944, 1220, - 694, 0, 843, 829, 255, 255, 0, 0, 0, 0, - 0, 0, 694, 0, 0, 0, 694, 0, 0, 0, - 1234, 1294, 1295, 0, 0, 0, 0, 0, 0, 0, + 212, 213, 214, 855, 1231, 974, 279, 279, 279, 279, + 623, 623, 419, 351, 1268, 600, 1268, 1268, 1268, 1268, + 1268, 1268, 1268, 1268, 1268, 1286, 1286, 599, 1099, 1286, + 709, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, + 508, 700, 827, 1097, 458, 559, 552, 860, 833, 909, + 904, 905, 918, 861, 906, 858, 907, 908, 859, 1232, + 1233, 912, 500, 886, 501, 252, 252, 843, 1106, 1107, + 507, 1086, 1081, 1082, 1083, 341, 552, 559, 568, 569, + 344, 579, 602, 616, 617, 1234, 1294, 1295, 833, 440, + 833, 22, 250, 250, 250, 250, 245, 253, 694, 573, + 1236, 829, 1236, 476, 1311, 1312, 349, 1033, 1033, 1236, + 694, 1326, 342, 1033, 694, 1033, 1033, 1033, 1033, 1033, + 1033, 1033, 1033, 1033, 848, 995, 1033, 1033, 1033, 1033, + 1318, 1318, 1318, 1318, 1236, 343, 342, 1039, 1038, 1236, + 1236, 1236, 1236, 851, 394, 1236, 1236, 1236, 571, 355, + 479, 998, 972, 972, 970, 972, 732, 1132, 481, 355, + 355, 466, 466, 925, 551, 1007, 1002, 926, 1042, 1043, + 466, 941, 355, 355, 941, 848, 355, 660, 1353, 609, + 624, 627, 628, 629, 630, 651, 652, 653, 708, 554, + 1057, 1284, 1284, 355, 355, 1284, 1184, 1284, 1284, 1284, + 1284, 1284, 1284, 1284, 1284, 1284, 539, 539, 438, 913, + 539, 914, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 566, 682, 1336, 1336, 733, 637, 639, 325, 309, + 659, 868, 577, 614, 683, 687, 1009, 695, 704, 1005, + 1336, 1297, 666, 408, 409, 424, 880, 611, 670, 867, + 671, 337, 412, 413, 414, 845, 684, 1339, 1339, 415, + 1313, 1314, 686, 347, 352, 353, 553, 563, 450, 450, + 450, 553, 1308, 563, 1308, 873, 397, 462, 966, 410, + 705, 1308, 354, 354, 354, 354, 957, 870, 469, 580, + 470, 471, 403, 554, 878, 848, 1227, 1344, 1345, 631, + 633, 635, 550, 615, 550, 255, 255, 1320, 1320, 1320, + 1320, 550, 548, 548, 548, 548, 5, 604, 6, 881, + 869, 1069, 1073, 876, 882, 396, 399, 560, 601, 605, + 977, 1017, 1070, 1304, 477, 736, 456, 1074, 0, 979, + 0, 968, 968, 968, 968, 1117, 0, 456, 962, 969, + 0, 0, 0, 0, 967, 0, 1229, 0, 0, 0, + 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, + 450, 930, 1122, 450, 0, 1072, 1115, 885, 619, 1306, + 1306, 1072, 1215, 943, 1014, 433, 1216, 1219, 944, 1220, + 0, 433, 872, 0, 664, 993, 0, 1040, 1040, 0, + 866, 0, 0, 0, 665, 1051, 1047, 1048, 1036, 1036, + 681, 951, 1226, 0, 1028, 1044, 1045, 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, 1012, 1012, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1012, 1012 + 0, 0, 0, 0, 324, 275, 324 ); protected array $gotoCheck = array( @@ -927,100 +932,105 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 15, 83, 23, 23, 23, 23, 107, - 107, 49, 83, 107, 129, 107, 107, 107, 107, 107, - 107, 107, 107, 107, 168, 168, 8, 8, 168, 8, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 8, - 8, 43, 8, 181, 181, 75, 75, 15, 6, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 82, - 181, 15, 24, 24, 24, 24, 58, 58, 58, 58, - 58, 15, 15, 15, 15, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 81, 81, 64, 35, 64, - 81, 75, 81, 96, 81, 81, 81, 13, 81, 13, - 72, 81, 72, 35, 82, 81, 35, 72, 72, 72, - 12, 45, 46, 72, 46, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 170, 22, 72, 72, 72, 72, - 9, 9, 9, 9, 72, 177, 17, 17, 179, 72, - 72, 72, 72, 17, 102, 72, 72, 72, 61, 17, - 12, 14, 12, 103, 5, 5, 154, 17, 154, 17, - 17, 14, 14, 72, 154, 17, 63, 72, 174, 174, - 174, 9, 149, 9, 14, 14, 22, 17, 14, 113, - 14, 5, 5, 5, 5, 5, 5, 150, 19, 112, - 19, 14, 169, 169, 115, 14, 169, 19, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 171, 171, 180, - 180, 171, 119, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 19, 92, 92, 92, 180, 19, 19, 19, - 19, 29, 48, 19, 19, 19, 48, 48, 48, 143, - 143, 48, 14, 180, 91, 48, 48, 48, 48, 48, - 48, 80, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 117, 117, 14, 18, 9, 9, 23, 23, 23, - 9, 129, 9, 129, 37, 9, 9, 84, 84, 84, - 129, 106, 106, 106, 106, 39, 106, 9, 9, 9, - 9, 25, 28, 9, 14, 22, 9, 9, 159, 25, - 25, 25, 25, 25, 25, 109, 129, 129, 129, 129, - 118, 118, 25, 25, 25, 167, 167, 16, 16, 16, - 16, 116, 9, 79, 24, 24, 24, 116, 16, 20, - 148, 148, 129, 116, 116, 98, 176, 176, 156, 148, - 116, 116, 116, 116, 128, 96, 96, 88, 88, 88, - 88, 131, 16, 88, 88, 88, 41, 14, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 2, - 2, 23, -1, 129, 16, 16, 146, 129, 129, 129, - 95, -1, 78, 78, 20, 20, 78, 78, 78, 78, - 7, -1, 20, 7, 5, 5, -1, -1, -1, -1, - -1, -1, 7, -1, -1, -1, 7, -1, -1, -1, - 20, 20, 20, -1, -1, -1, -1, -1, -1, -1, + 42, 42, 42, 15, 20, 49, 23, 23, 23, 23, + 107, 107, 43, 96, 107, 129, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 169, 169, 8, 8, 169, + 8, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 8, 8, 6, 8, 82, 75, 75, 15, 12, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 20, + 20, 15, 154, 45, 154, 5, 5, 20, 143, 143, + 154, 15, 15, 15, 15, 75, 75, 75, 75, 75, + 75, 75, 75, 75, 75, 20, 20, 20, 12, 82, + 12, 75, 5, 5, 5, 5, 5, 5, 7, 171, + 72, 7, 72, 175, 175, 175, 178, 72, 72, 72, + 7, 180, 167, 72, 7, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 22, 102, 72, 72, 72, 72, + 9, 9, 9, 9, 72, 167, 167, 117, 117, 72, + 72, 72, 72, 25, 61, 72, 72, 72, 103, 14, + 83, 25, 25, 25, 25, 25, 25, 149, 83, 14, + 14, 148, 148, 72, 25, 25, 25, 72, 118, 118, + 148, 9, 14, 14, 9, 22, 14, 63, 14, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 14, + 113, 170, 170, 14, 14, 170, 150, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 172, 172, 112, 64, + 172, 64, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 48, 115, 181, 181, 48, 48, 48, 168, 168, + 48, 35, 2, 2, 48, 48, 48, 48, 48, 48, + 181, 14, 119, 81, 81, 13, 35, 13, 81, 35, + 81, 29, 81, 81, 81, 18, 81, 181, 181, 81, + 177, 177, 14, 81, 96, 96, 9, 9, 23, 23, + 23, 9, 129, 9, 129, 39, 9, 9, 92, 92, + 92, 129, 24, 24, 24, 24, 91, 37, 9, 9, + 9, 9, 28, 14, 9, 22, 159, 9, 9, 84, + 84, 84, 19, 79, 19, 5, 5, 129, 129, 129, + 129, 19, 106, 106, 106, 106, 46, 106, 46, 16, + 16, 16, 16, 9, 41, 58, 58, 58, 58, 58, + 16, 109, 128, 129, 156, 98, 19, 131, -1, 95, + -1, 19, 19, 19, 19, 146, -1, 19, 19, 19, + -1, -1, -1, -1, 16, -1, 14, -1, -1, -1, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 17, 17, 23, -1, 129, 16, 16, 17, 129, + 129, 129, 78, 78, 17, 116, 78, 78, 78, 78, + -1, 116, 17, -1, 17, 17, -1, 116, 116, -1, + 17, -1, -1, -1, 116, 116, 116, 116, 88, 88, + 88, 88, 17, -1, 88, 88, 88, -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, 106, 106, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 106, 106 + -1, -1, -1, -1, 24, 24, 24 ); protected array $gotoBase = array( - 0, 0, -183, 0, 0, 313, 188, 543, 178, -10, - 0, 0, -27, -80, 13, -184, 26, -168, 114, 83, - 97, 0, 6, 162, 219, 447, 18, 22, 115, 94, - 0, 0, 0, 0, 0, -122, 0, 95, 0, 122, - 0, 76, -1, 182, 0, 248, -464, 0, -319, 153, - 0, 0, 0, 0, 0, -33, 0, 0, 181, 0, - 0, 266, 0, 84, 233, -236, 0, 0, 0, 0, - 0, 0, -5, 0, 0, -139, 0, 0, 135, 140, - 54, -245, -60, -304, -41, -698, 0, 0, 227, 0, - 0, 75, 78, 0, 0, 98, -229, 0, 89, 0, - 0, 0, 269, 270, 0, 0, 413, -72, 0, 96, - 0, 0, 71, 66, 0, 72, 209, 141, 186, 81, - 0, 0, 0, 0, 0, 0, 1, 0, 131, 166, - 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 124, 0, 0, 93, 0, 456, 87, - 73, 0, 0, 0, -178, 0, 59, 0, 0, 90, - 0, 0, 0, 0, 0, 0, 0, 154, -57, 111, - 255, 126, 0, 0, 27, 0, 125, 265, 0, 267, - 61, -105, 0, 0 + 0, 0, -320, 0, 0, 224, 182, 251, 179, -10, + 0, 0, -89, 68, 11, -185, 27, 66, 105, 197, + -229, 0, 5, 163, 439, 299, 18, 22, 115, 114, + 0, 0, 0, 0, 0, 20, 0, 108, 0, 112, + 0, 43, -1, 153, 0, 200, -260, 0, -330, 147, + 0, 0, 0, 0, 0, -33, 0, 0, 440, 0, + 0, 262, 0, 95, 355, -236, 0, 0, 0, 0, + 0, 0, -5, 0, 0, -140, 0, 0, 134, 119, + -19, -88, -75, -159, -20, -698, 0, 0, 288, 0, + 0, 117, 133, 0, 0, 56, -310, 0, 88, 0, + 0, 0, 250, 265, 0, 0, 444, -71, 0, 121, + 0, 0, 90, 77, 0, 100, 273, 17, 44, 111, + 0, 0, 0, 0, 0, 0, 1, 0, 118, 167, + 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -47, 0, 0, 61, 0, 287, 72, + 82, 0, 0, 0, -273, 0, 54, 0, 0, 87, + 0, 0, 0, 0, 0, 0, 0, -26, 67, -56, + 110, 230, 125, 0, 0, -38, 0, 48, 236, 0, + 240, 75, 0, 0 ); protected array $gotoDefault = array( - -32768, 511, 740, 4, 741, 934, 816, 825, 597, 529, - 707, 347, 625, 421, 1302, 911, 1121, 578, 844, 1245, - 1253, 456, 847, 330, 730, 893, 894, 895, 399, 385, - 391, 397, 649, 626, 493, 879, 452, 871, 485, 874, - 451, 883, 164, 417, 509, 887, 3, 890, 556, 921, - 386, 898, 387, 677, 900, 562, 902, 903, 394, 400, - 401, 1126, 570, 622, 915, 256, 564, 916, 384, 917, - 924, 389, 392, 688, 464, 504, 498, 410, 1101, 565, - 608, 646, 446, 472, 620, 632, 618, 479, 433, 415, - 329, 956, 964, 486, 462, 978, 349, 986, 738, 1134, - 640, 488, 994, 641, 1001, 1004, 530, 531, 477, 1016, - 272, 1019, 489, 19, 667, 1030, 1031, 668, 642, 1053, - 643, 669, 644, 1055, 471, 598, 1063, 453, 1071, 1290, - 454, 1075, 266, 1078, 278, 416, 434, 1084, 1085, 9, - 1091, 698, 699, 11, 276, 508, 1116, 689, 450, 1133, - 438, 1203, 1205, 558, 490, 1223, 1222, 680, 505, 1228, - 447, 1293, 448, 532, 473, 316, 533, 308, 333, 313, - 548, 295, 334, 534, 474, 1299, 1307, 331, 31, 1327, - 1338, 342, 575, 613 + -32768, 512, 740, 4, 741, 934, 816, 825, 597, 530, + 707, 348, 625, 422, 1302, 911, 1121, 578, 844, 1245, + 1253, 457, 847, 330, 730, 893, 894, 895, 400, 386, + 392, 398, 649, 626, 494, 879, 453, 871, 486, 874, + 452, 883, 164, 418, 510, 887, 3, 890, 557, 921, + 387, 898, 388, 677, 900, 562, 902, 903, 395, 401, + 402, 1126, 570, 622, 915, 256, 564, 916, 385, 917, + 924, 390, 393, 688, 465, 505, 499, 411, 1101, 565, + 608, 646, 447, 473, 620, 632, 618, 480, 434, 416, + 329, 956, 964, 487, 463, 978, 350, 986, 738, 1134, + 640, 489, 994, 641, 1001, 1004, 531, 532, 478, 1016, + 272, 1019, 490, 19, 667, 1030, 1031, 668, 642, 1053, + 643, 669, 644, 1055, 472, 598, 1063, 454, 1071, 1290, + 455, 1075, 266, 1078, 278, 417, 435, 1084, 1085, 9, + 1091, 698, 699, 11, 276, 509, 1116, 689, 451, 1133, + 439, 1203, 1205, 558, 491, 1223, 1222, 680, 506, 1228, + 448, 1293, 449, 533, 474, 316, 534, 1337, 308, 333, + 313, 549, 295, 334, 535, 475, 1299, 1307, 331, 31, + 1327, 1338, 575, 613 ); protected array $ruleToNonTerminal = array( @@ -1075,17 +1085,17 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 155, 149, 149, 154, 154, 157, 158, 158, 159, 160, 161, 161, 161, 161, 19, 19, 72, 72, 72, 72, 150, 150, 150, 150, 163, 163, 151, 151, - 153, 153, 153, 156, 156, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 169, 169, 169, 107, 171, 171, - 171, 171, 152, 152, 152, 152, 152, 152, 152, 152, - 58, 58, 166, 166, 166, 166, 172, 172, 162, 162, - 162, 173, 173, 173, 173, 173, 173, 73, 73, 65, - 65, 65, 65, 129, 129, 129, 129, 176, 175, 165, - 165, 165, 165, 165, 165, 165, 164, 164, 164, 174, - 174, 174, 174, 106, 170, 178, 178, 177, 177, 179, - 179, 179, 179, 179, 179, 179, 179, 167, 167, 167, - 167, 181, 182, 180, 180, 180, 180, 180, 180, 180, - 180, 183, 183, 183, 183 + 153, 153, 153, 156, 156, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 170, 170, 170, 107, 172, 172, + 172, 172, 152, 152, 152, 152, 152, 152, 152, 152, + 58, 58, 166, 166, 166, 166, 173, 173, 162, 162, + 162, 174, 174, 174, 174, 174, 174, 73, 73, 65, + 65, 65, 65, 129, 129, 129, 129, 177, 176, 165, + 165, 165, 165, 165, 165, 165, 164, 164, 164, 175, + 175, 175, 175, 106, 171, 179, 179, 178, 178, 180, + 180, 180, 180, 180, 180, 180, 180, 168, 168, 168, + 168, 167, 182, 181, 181, 181, 181, 181, 181, 181, + 181, 183, 183, 183, 183 ); protected array $ruleToLength = array( @@ -2463,7 +2473,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array(); }, 511 => function ($stackPos) { - $this->semValue = array(new Node\InterpolatedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', $this->phpVersion->supportsUnicodeEscapes()), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); foreach ($this->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; }, 512 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; @@ -2693,7 +2703,7 @@ protected function initReduceCallbacks(): void { $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 601 => function ($stackPos) { - $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); $attrs['rawValue'] = $this->semStack[$stackPos-(1-1)]; $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $attrs); }, 602 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 3795d2da15..3402e3e763 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -845,6 +845,7 @@ protected function parseDocString( if (\is_string($contents)) { if ($contents === '') { + $attributes['rawValue'] = $contents; return new String_('', $attributes); } @@ -852,6 +853,7 @@ protected function parseDocString( $contents, $indentLen, $indentChar, true, true, $attributes ); $contents = preg_replace('~(\r\n|\n|\r)\z~', '', $contents); + $attributes['rawValue'] = $contents; if ($kind === String_::KIND_HEREDOC) { $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape); @@ -878,6 +880,7 @@ protected function parseDocString( if ($isLast) { $part->value = preg_replace('~(\r\n|\n|\r)\z~', '', $part->value); } + $part->setAttribute('rawValue', $part->value); $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); if ('' === $part->value) { continue; diff --git a/test/code/parser/formattingAttributes.test b/test/code/parser/formattingAttributes.test index 84141bba4a..cb5370ac1c 100644 --- a/test/code/parser/formattingAttributes.test +++ b/test/code/parser/formattingAttributes.test @@ -15,7 +15,11 @@ Test formatting attributes bar"; "foo\nbar"; "foo\nbar{$x}"; +`foo\nbar`; `foo\nbar{$x}`; + +<<<'ABC' +ABC; <<<'ABC' foo bar ABC; @@ -23,16 +27,16 @@ ABC; foo bar ABC; << Date: Sun, 24 Sep 2023 20:27:30 +0200 Subject: [PATCH 308/428] Introduce Stmt\Block Stmt\Block will be created for { $a; } style blocks, unless these occur directly inside some structure that is usually combined with a block. For example if ($a) { $b; } will continue to use the old representation (plain array in in If_::$stmts), but a free-standing { $b; } will become a Stmt\Block. Fixes #590. --- grammar/php.y | 38 +- grammar/phpyLang.php | 18 +- lib/PhpParser/Internal/TokenStream.php | 6 - lib/PhpParser/Node/Stmt/Block.php | 29 + lib/PhpParser/Parser/Php7.php | 1533 ++++++++-------- lib/PhpParser/Parser/Php8.php | 1541 ++++++++--------- lib/PhpParser/PrettyPrinter/Standard.php | 4 + lib/PhpParser/PrettyPrinterAbstract.php | 11 +- test/code/formatPreservation/basic.test | 7 +- .../formatPreservation/listInsertion.test | 13 + test/code/formatPreservation/listRemoval.test | 8 +- test/code/parser/blockComments.test | 30 +- test/code/parser/errorHandling/recovery.test | 18 +- test/code/parser/nopPositions.test | 10 +- test/code/parser/stmt/class/name.test | 8 + .../stmt/class/readonlyAsClassName.test | 4 + test/code/parser/stmt/declare.test | 11 +- .../parser/stmt/namespace/groupUseErrors.test | 24 +- test/code/prettyPrinter/stmt/block.test | 28 + 19 files changed, 1700 insertions(+), 1641 deletions(-) create mode 100644 lib/PhpParser/Node/Stmt/Block.php create mode 100644 test/code/prettyPrinter/stmt/block.test diff --git a/grammar/php.y b/grammar/php.y index 7380d52755..719eb941c2 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -366,21 +366,13 @@ inner_statement: ; non_empty_statement: - '{' inner_statement_list '}' - { - if ($2) { - $$ = $2; prependLeadingComments($$); - } else { - makeNop($$); - if (null === $$) { $$ = array(); } - } - } - | T_IF '(' expr ')' statement elseif_list else_single - { $$ = Stmt\If_[$3, ['stmts' => toArray($5), 'elseifs' => $6, 'else' => $7]]; } + '{' inner_statement_list '}' { $$ = Stmt\Block[$2]; } + | T_IF '(' expr ')' blocklike_statement elseif_list else_single + { $$ = Stmt\If_[$3, ['stmts' => $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_DO blocklike_statement T_WHILE '(' expr ')' ';' { $$ = Stmt\Do_ [$5, $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]; } @@ -416,14 +408,16 @@ non_empty_statement: { $$ = Stmt\TryCatch[$3, $5, $6]; $this->checkTryCatch($$); } | T_GOTO identifier_not_reserved semi { $$ = Stmt\Goto_[$2]; } | identifier_not_reserved ':' { $$ = Stmt\Label[$1]; } - | error { $$ = array(); /* means: no statement */ } + | error { $$ = null; /* means: no statement */ } ; statement: non_empty_statement - | ';' - { makeNop($$); - if ($$ === null) $$ = array(); /* means: no statement */ } + | ';' { makeNop($$); } +; + +blocklike_statement: + statement { toBlock($1); } ; catches: @@ -554,17 +548,17 @@ non_empty_class_name_list: ; for_statement: - statement { $$ = toArray($1); } + blocklike_statement | ':' inner_statement_list T_ENDFOR ';' { $$ = $2; } ; foreach_statement: - statement { $$ = toArray($1); } + blocklike_statement | ':' inner_statement_list T_ENDFOREACH ';' { $$ = $2; } ; declare_statement: - non_empty_statement { $$ = toArray($1); } + non_empty_statement { toBlock($1); } | ';' { $$ = null; } | ':' inner_statement_list T_ENDDECLARE ';' { $$ = $2; } ; @@ -624,7 +618,7 @@ match_arm: ; while_statement: - statement { $$ = toArray($1); } + blocklike_statement { $$ = $1; } | ':' inner_statement_list T_ENDWHILE ';' { $$ = $2; } ; @@ -634,7 +628,7 @@ elseif_list: ; elseif: - T_ELSEIF '(' expr ')' statement { $$ = Stmt\ElseIf_[$3, toArray($5)]; } + T_ELSEIF '(' expr ')' blocklike_statement { $$ = Stmt\ElseIf_[$3, $5]; } ; new_elseif_list: @@ -649,7 +643,7 @@ new_elseif: else_single: /* empty */ { $$ = null; } - | T_ELSE statement { $$ = Stmt\Else_[toArray($2)]; } + | T_ELSE blocklike_statement { $$ = Stmt\Else_[$2]; } ; new_else_single: diff --git a/grammar/phpyLang.php b/grammar/phpyLang.php index c5fa54b0be..25f6e27812 100644 --- a/grammar/phpyLang.php +++ b/grammar/phpyLang.php @@ -87,14 +87,15 @@ function ($matches) { 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] . '; }'; + return 'if (' . $args[1] . ' !== null) { ' . $args[0] . '[] = ' . $args[1] . '; } $$ = ' . $args[0] . ';'; } - if ('toArray' == $name) { + if ('toBlock' == $name) { assertArgs(1, $args, $name); - return 'is_array(' . $args[0] . ') ? ' . $args[0] . ' : array(' . $args[0] . ')'; + return 'if (' . $args[0] . ' instanceof Stmt\Block) { $$ = ' . $args[0] . '->stmts; } ' + . 'else if (' . $args[0] . ' === null) { $$ = []; } ' + . 'else { $$ = [' . $args[0] . ']; }'; } if ('parseVar' === $name) { @@ -122,15 +123,6 @@ function ($matches) { return $args[0] . ' = $this->maybeCreateZeroLengthNop($this->tokenPos);'; } - if ('prependLeadingComments' === $name) { - assertArgs(1, $args, $name); - - return '$comments = $this->getCommentsBeforeToken($this->tokenStartStack[#1]); $stmts = ' . $args[0] . '; ' - . 'if (!empty($comments)) {' - . '$stmts[0]->setAttribute(\'comments\', ' - . 'array_merge($comments, $stmts[0]->getAttribute(\'comments\', []))); }'; - } - return $matches[0]; }, $code diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index 2520df1f31..8fba13124d 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -195,12 +195,6 @@ public function haveTokenInRange(int $startPos, int $endPos, $tokenType): bool { return false; } - public function haveBracesInRange(int $startPos, int $endPos): bool { - return $this->haveTokenInRange($startPos, $endPos, '{') - || $this->haveTokenInRange($startPos, $endPos, T_CURLY_OPEN) - || $this->haveTokenInRange($startPos, $endPos, '}'); - } - public function haveTagInRange(int $startPos, int $endPos): bool { return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG) || $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG); diff --git a/lib/PhpParser/Node/Stmt/Block.php b/lib/PhpParser/Node/Stmt/Block.php new file mode 100644 index 0000000000..073df2086f --- /dev/null +++ b/lib/PhpParser/Node/Stmt/Block.php @@ -0,0 +1,29 @@ + $attributes Additional attributes + */ + public function __construct(array $stmts, array $attributes = []) { + $this->attributes = $attributes; + $this->stmts = $stmts; + } + + public function getType(): string { + return 'Stmt_Block'; + } + + public function getSubNodeNames(): array { + return ['stmts']; + } +} diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 2919987f56..b20b7412c6 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -161,7 +161,7 @@ class Php7 extends \PhpParser\ParserAbstract protected int $tokenToSymbolMapSize = 396; protected int $actionTableSize = 1258; - protected int $gotoTableSize = 618; + protected int $gotoTableSize = 567; protected int $invalidSymbol = 168; protected int $errorSymbol = 1; @@ -388,28 +388,28 @@ class Php7 extends \PhpParser\ParserAbstract protected array $action = array( 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, 138, 38,-32766,-32766,-32766, 151,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 102, 103, 104, 105, 106, 1111, 1112, - 1113, 1110, 1109, 1108, 1114, 745, 744,-32766,-32766,-32766, + -32767,-32767,-32767, 102, 103, 104, 105, 106, 1112, 1113, + 1114, 1111, 1110, 1109, 1115, 745, 744,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1244, 837,-32766, 1321, 754,-32766,-32766,-32766,-32766, - -593,-32766,-32766,-32766, 104, 105, 106, -593, 1305, 265, - 139, 404, 758, 759, 760, 761, 989,-32766, 429,-32766, - -32766, -16,-32766, 242, 1026, 815, 762, 763, 764, 765, + -32767, 1245, 837,-32766, 1322, 754,-32766,-32766,-32766,-32766, + -594,-32766,-32766,-32766, 104, 105, 106, -594, 1306, 265, + 139, 404, 758, 759, 760, 761, 990,-32766, 429,-32766, + -32766, -16,-32766, 242, 1027, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, 794, 795, 783, 784, 345, 346, 786, 787, 772, 773, 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, 584, 779, 780, 585, 586,-32766, 803, 801, 802, 814, 798, 799, 835, 826, 587, 588, 797, 589, 590, 591, - 592, 593, 594, 826, 459, 460, 461, 1035, 800, 595, - 596, 940, 140, 2, 133, 134, 135, 582, 136, 137, - 1059, 751, 752, 753, 138, 38, -327, -110, -110, 1325, - 290, 23, -110,-32766,-32766,-32766, 1324, 35, -110, 1111, - 1112, 1113, 1110, 1109, 1108, 1114, 612,-32766, 129, 745, + 592, 593, 594, 826, 459, 460, 461, 1036, 800, 595, + 596, 941, 140, 2, 133, 134, 135, 582, 136, 137, + 1060, 751, 752, 753, 138, 38, -328, -110, -110, 1326, + 290, 23, -110,-32766,-32766,-32766, 1325, 35, -110, 1112, + 1113, 1114, 1111, 1110, 1109, 1115, 612,-32766, 129, 745, 744, 107, 108, 109,-32766, 274,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 828, 990, -193, 145, 110, 298, 754, - 836, 75,-32766,-32766,-32766, 1350, 142, 326, 1351, -593, - 326, -593, 254, 265, 139, 404, 758, 759, 760, 761, - 82, -271, 429,-32766, 326,-32766,-32766,-32766,-32766, 815, + -32766,-32766,-32766, 828, 991, -194, 145, 110, 298, 754, + 836, 75,-32766,-32766,-32766, 1351, 142, 326, 1352, -594, + 326, -594, 254, 265, 139, 404, 758, 759, 760, 761, + 82, -272, 429,-32766, 326,-32766,-32766,-32766,-32766, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, 794, 795, 783, 784, 345, 346, 786, 787, 772, 773, 774, 776, 777, 778, 356, 818, @@ -418,100 +418,100 @@ class Php7 extends \PhpParser\ParserAbstract 797, 589, 590, 591, 592, 593, 594, -78, 83, 84, 85, -85, 800, 595, 596, 311, 149, 775, 746, 747, 748, 749, 750, 725, 751, 752, 753, 788, 789, 37, - -327, 86, 87, 88, 89, 90, 91, 92, 93, 94, + -328, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 323, 274, 482,-32766,-32766, - -32766, -58,-32766,-32766,-32766, 958, 959, 127, 110, -193, - 960, 339, 754,-32766,-32766,-32766, 954, -85, 291,-32766, - 1087,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, - 759, 760, 761, -192,-32766, 824,-32766,-32766,-32766, -366, - 429, -366, 815, 762, 763, 764, 765, 766, 767, 768, + -32766, -58,-32766,-32766,-32766, 959, 960, 127, 110, -194, + 961, 339, 754,-32766,-32766,-32766, 955, -85, 291,-32766, + 1088,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, + 759, 760, 761, -193,-32766, 824,-32766,-32766,-32766, -367, + 429, -367, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, - 781, 782, -547, 803, 801, 802, 814, 798, 799, 340, + 781, 782, -548, 803, 801, 802, 814, 798, 799, 340, 327, 790, 796, 797, 804, 805, 807, 806, 808, 809, - 1032, 391, 606, 7,-32766, 800, 811, 810, 50, 51, - 52, 513, 53, 54, 831, 1239, 1238, 1240, 55, 56, - -110, 57, 1035, 920, 1089, -110, 1035, -110, 291, 483, + 1033, 391, 606, 7,-32766, 800, 811, 810, 50, 51, + 52, 513, 53, 54, 831, 1240, 1239, 1241, 55, 56, + -110, 57, 1036, 920, 1090, -110, 1036, -110, 291, 483, 745, 744, 305, 382, 381, -110, -110, -110, -110, -110, - -110, -110, -110, 423, 920, 283, -547, -547, 152, 290, - 380, 381, 1244, 715, 467, 468, 58, 59, 370, 21, - 423, -544, 60, 556, 61, 248, 249, 62, 63, 64, - 65, 66, 67, 68, 69, -547, 28, 267, 70, 445, - 514, 1103, 374, -341, 1271, 1272, 515, -192, 835, 154, - 832, -543, 1269, 42, 25, 516, 389, 517, 241, 518, - 920, 519, 298, 1237, 520, 521, 910, 920, 441, 44, - 45, 446, 377, 376,-32766, 46, 522, 1022, 1021, 1020, - 1023, 368, 338, 442, 1277, -544, -544, 910, 1230, 443, - 524, 525, 526, 835, 1244, 835, 1035, 716, 1340, 1235, - -544, 155, 528, 529,-32766, 1258, 1259, 1260, 1261, 1255, - 1256, 297, -550, 942, -544, -543, -543, 1262, 1257, 290, - 1034, 1239, 1238, 1240, 298, 444, 1035, 71, 1265, 841, - -543, 321, 322, 326, -153, -153, -153, 920, 1239, 1238, - 1240, 922, -549, 910, -543, 710, 942, -590,-32766, -153, - 910, -153, 357, -153, -590, -153, 862, 1032, 863, 1088, - 36, 251, 922, 737, 156, 375, 710, 717, 862, -584, - 863, -584, 75, 158, -545, 835, 958, 959, 326, 1035, - -57, 523, 920,-32766,-32766, 362, 896, 954, -110, -110, + -110, -110, -110, 423, 920, 283, -548, -548, 152, 290, + 380, 381, 1245, 715, 467, 468, 58, 59, 370, 21, + 423, -545, 60, 556, 61, 248, 249, 62, 63, 64, + 65, 66, 67, 68, 69, -548, 28, 267, 70, 445, + 514, 1104, 374, -342, 1272, 1273, 515, -193, 835, 154, + 832, -544, 1270, 42, 25, 516, 389, 517, 241, 518, + 920, 519, 298, 1238, 520, 521, 910, 920, 441, 44, + 45, 446, 377, 376,-32766, 46, 522, 1023, 1022, 1021, + 1024, 368, 338, 442, 1278, -545, -545, 910, 1231, 443, + 524, 525, 526, 835, 1245, 835, 1036, 716, 1341, 1236, + -545, 155, 528, 529,-32766, 1259, 1260, 1261, 1262, 1256, + 1257, 297, -551, 943, -545, -544, -544, 1263, 1258, 290, + 1035, 1240, 1239, 1241, 298, 444, 1036, 71, 1266, 841, + -544, 321, 322, 326, -153, -153, -153, 920, 1240, 1239, + 1241, 922, -550, 910, -544, 710, 943, -591,-32766, -153, + 910, -153, 357, -153, -591, -153, 862, 1033, 863, 1089, + 36, 251, 922, 737, 156, 375, 710, 717, 862, -585, + 863, -585, 75, 158, -546, 835, 959, 960, 326, 1036, + -57, 523, 920,-32766,-32766, 362, 896, 955, -110, -110, -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 745, 744, 656, 26, 835, -110, -110, 720, 745, 744, -110, 33, 834, 922, 124, 910, -110, 710, -153, 125, 922, 675, 676, 130, 710, - -32766, 150, 407, 131, 1149, 1151, 48, 144, -545, -545, - 378, 379,-32766, 383, 384, -542, 28, 159, 1237, 920, - 160, 298, 1058, -545, 75,-32766,-32766,-32766, 835,-32766, - 326,-32766, 1269,-32766, -87, 910,-32766, -545, 647, 648, + -32766, 150, 407, 131, 1150, 1152, 48, 144, -546, -546, + 378, 379,-32766, 383, 384, -543, 28, 159, 1238, 920, + 160, 298, 1059, -546, 75,-32766,-32766,-32766, 835,-32766, + 326,-32766, 1270,-32766, -87, 910,-32766, -546, 647, 648, 161,-32766,-32766,-32766, -4, 920, -84,-32766,-32766, 727, - 162, 287, 163,-32766, 420, -301, -78, -73, -72, -71, - 141, 287,-32766, -70, 326, 975, 745, 744, 1230, 710, - 299, 300, -69, -68, -67, -297, -590, -66, -590, -542, - -542, -65, 528, 529, -46, 1258, 1259, 1260, 1261, 1255, - 1256, -18, 74, 148, -542, 273, 284, 1262, 1257, 126, - -542, 726, 910,-32766, 729, 919, 147, 73, -542, 1237, + 162, 287, 163,-32766, 420, -302, -78, -73, -72, -71, + 141, 287,-32766, -70, 326, 976, 745, 744, 1231, 710, + 299, 300, -69, -68, -67, -298, -591, -66, -591, -543, + -543, -65, 528, 529, -46, 1259, 1260, 1261, 1262, 1256, + 1257, -18, 74, 148, -543, 273, 284, 1263, 1258, 126, + -543, 726, 910,-32766, 729, 919, 147, 73, -543, 1238, 922, 690, 322, 326, 710, 279,-32766,-32766,-32766, 280, -32766, 285,-32766, 286,-32766, 332, 288,-32766, 910, 289, - 292, 49,-32766,-32766,-32766, 293, 274, 1032,-32766,-32766, - 936, 110, -50, 685,-32766, 420, 146, 691, 826, 701, - 375, 703, 436,-32766, 1352, 20, 561, 296, 645, 1035, - 835, 958, 959, 1118, -542, -542, 523,-32766, 692, 693, - 306, 527, 954, -110, -110, -110, 132, 922, 834, -542, - 464, 710, 283, 662, 657,-32766, 1239, 1238, 1240, 678, - 304, 1237, 283, -542, 10, 301, 302, 493,-32766,-32766, + 292, 49,-32766,-32766,-32766, 293, 274, 1033,-32766,-32766, + 937, 110, -50, 685,-32766, 420, 146, 691, 826, 701, + 375, 703, 436,-32766, 1353, 20, 561, 296, 645, 1036, + 835, 959, 960, 1119, -543, -543, 523,-32766, 692, 693, + 306, 527, 955, -110, -110, -110, 132, 922, 834, -543, + 464, 710, 283, 662, 657,-32766, 1240, 1239, 1241, 678, + 304, 1238, 283, -543, 10, 301, 302, 493,-32766,-32766, -32766, 663,-32766, 922,-32766, 679,-32766, 710, -4,-32766, - 373, 40, -507, 955,-32766,-32766,-32766, -274, 731,-32766, - -32766,-32766, 920, 303, 128, 1237,-32766, 420, 310, 0, + 373, 40, -508, 956,-32766,-32766,-32766, -275, 731,-32766, + -32766,-32766, 920, 303, 128, 1238,-32766, 420, 310, 0, 567, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, - -32766,-32766, 0,-32766, 0, 1276, -497, 0,-32766,-32766, - -32766,-32766, 1278, 0,-32766,-32766, 8, 1237, 24, 372, - -32766, 420, 920, 1266,-32766,-32766,-32766, 610,-32766,-32766, - -32766, 938,-32766, 298, -578,-32766, 846, 41, 734, 488, - -32766,-32766,-32766,-32766, 735, 854,-32766,-32766, 901, 1237, - 574, 999,-32766, 420, 976, 983,-32766,-32766,-32766, 973, - -32766,-32766,-32766, 984,-32766, 910, 899,-32766, 971, 1092, - 1095, 1096,-32766,-32766,-32766, 1093, 1094, 1100,-32766,-32766, - 1291, -249, -249, -249,-32766, 420, 1309, 375, 1343, 650, - 28, 267, -577,-32766, -576, -550, -549, -548, 958, 959, - -491, 1, 835, 523, 29, 910, 1269, 30, 896, 954, + -32766,-32766, 0,-32766, 0, 1277, -498, 0,-32766,-32766, + -32766,-32766, 1279, 0,-32766,-32766, 8, 1238, 24, 372, + -32766, 420, 920, 1267,-32766,-32766,-32766, 610,-32766,-32766, + -32766, 939,-32766, 298, -579,-32766, 846, 41, 734, 488, + -32766,-32766,-32766,-32766, 735, 854,-32766,-32766, 901, 1238, + 574, 1000,-32766, 420, 977, 984,-32766,-32766,-32766, 974, + -32766,-32766,-32766, 985,-32766, 910, 899,-32766, 972, 1093, + 1096, 1097,-32766,-32766,-32766, 1094, 1095, 1101,-32766,-32766, + 1292, -250, -250, -250,-32766, 420, 1310, 375, 1344, 650, + 28, 267, -578,-32766, -577, -551, -550, -549, 959, 960, + -492, 1, 835, 523, 29, 910, 1270, 30, 896, 955, -110, -110, -110, 39, 43, 47, 72, 76, 77, 78, - 79, -248, -248, -248, 80, 81, 143, 375, 153, 157, - 897, 247, 328, 357, 358, 359, 360, 361, 958, 959, - 922, 362, 1230, 523, 710, -249, 363, 364, 896, 954, - -110, -110, -110, 365, 366, 367, 369, 529, 28, 1258, - 1259, 1260, 1261, 1255, 1256, 437, 555, 1347, -272, -271, - 835, 1262, 1257, 13, 1269, 14,-32766, 15, 16, 18, - 922, 73, 1237, 1349, 710, -248, 322, 326, 406,-32766, + 79, -249, -249, -249, 80, 81, 143, 375, 153, 157, + 897, 247, 328, 357, 358, 359, 360, 361, 959, 960, + 922, 362, 1231, 523, 710, -250, 363, 364, 896, 955, + -110, -110, -110, 365, 366, 367, 369, 529, 28, 1259, + 1260, 1261, 1262, 1256, 1257, 437, 555, 1348, -273, -272, + 835, 1263, 1258, 13, 1270, 14,-32766, 15, 16, 18, + 922, 73, 1238, 1350, 710, -249, 322, 326, 406,-32766, -32766,-32766, 484,-32766, 485,-32766, 492,-32766, 495, 496, -32766, 497, 498, 502, 503,-32766,-32766,-32766, 504, 511, - 1230,-32766,-32766, 572, 696, 1248, 1189,-32766, 420, 1267, - 1061, 1060, 1041, 1225, 1037, 529,-32766, 1258, 1259, 1260, - 1261, 1255, 1256, -276, -102, 12, 17, 27, 295, 1262, - 1257, 405, 603, 607, 636, 702, 1193, 1243, 1190, 73, - 34, 1322, 0, 320, 322, 326, 371, 711, 714, 718, + 1231,-32766,-32766, 572, 696, 1249, 1190,-32766, 420, 1268, + 1062, 1061, 1042, 1226, 1038, 529,-32766, 1259, 1260, 1261, + 1262, 1256, 1257, -277, -102, 12, 17, 27, 295, 1263, + 1258, 405, 603, 607, 636, 702, 1194, 1244, 1191, 73, + 34, 1323, 0, 320, 322, 326, 371, 711, 714, 718, 719, 721, 722, 723, 724, 0, 728, 713, 0, 857, - 856, 865, 948, 991, 864, 1348, 947, 945, 946, 949, - 1221, 929, 939, 927, 981, 982, 634, 1346, 1303, 1292, - 1310, 1319, 0, 1206, 0, 1270, 0, 326 + 856, 865, 949, 992, 864, 1349, 948, 946, 947, 950, + 1222, 930, 940, 928, 982, 983, 634, 1347, 1304, 1293, + 1311, 1320, 0, 1207, 0, 1271, 0, 326 ); protected array $actionCheck = array( @@ -767,10 +767,10 @@ class Php7 extends \PhpParser\ParserAbstract protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 100,32767,32767,32767,32767, 596, 596, - 596, 596,32767,32767, 253, 102,32767,32767, 469, 386, - 386, 386,32767,32767, 540, 540, 540, 540, 540, 540, - 32767,32767,32767,32767,32767,32767, 469,32767,32767,32767, + 32767,32767,32767, 100,32767,32767,32767,32767, 597, 597, + 597, 597,32767,32767, 254, 102,32767,32767, 470, 387, + 387, 387,32767,32767, 541, 541, 541, 541, 541, 541, + 32767,32767,32767,32767,32767,32767, 470,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, @@ -779,137 +779,132 @@ class Php7 extends \PhpParser\ParserAbstract 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, - 323,32767,32767,32767,32767, 102,32767,32767,32767,32767, + 324,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 589,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 590,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 473, 452, - 453, 455, 456, 385, 541, 595, 326, 592, 384, 145, - 338, 328, 241, 329, 257, 474, 258, 475, 478, 479, - 214, 286, 381, 149, 150, 416, 470, 418, 468, 472, - 417, 391, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 389, 390, 471, 449, 448, - 447,32767,32767, 414, 415,32767, 419,32767,32767,32767, - 32767,32767,32767,32767, 102,32767, 388, 422, 420, 421, - 438, 439, 436, 437, 440,32767,32767,32767, 441, 442, - 443, 444, 315,32767,32767, 365, 363, 315, 111,32767, - 32767, 429, 430,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 534, 446,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 474, 453, + 454, 456, 457, 386, 542, 596, 327, 593, 385, 145, + 339, 329, 242, 330, 258, 475, 259, 476, 479, 480, + 215, 287, 382, 149, 150, 417, 471, 419, 469, 473, + 418, 392, 398, 399, 400, 401, 402, 403, 404, 405, + 406, 407, 408, 409, 410, 390, 391, 472, 450, 449, + 448,32767,32767, 415, 416,32767, 420,32767,32767,32767, + 32767,32767,32767,32767, 102,32767, 389, 423, 421, 422, + 439, 440, 437, 438, 441,32767,32767,32767, 442, 443, + 444, 445, 316,32767,32767, 366, 364, 316, 111,32767, + 32767, 430, 431,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 535, 447,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 102, - 32767, 100, 536, 411, 413, 503, 424, 425, 423, 392, - 32767, 510,32767, 102,32767, 512,32767,32767,32767,32767, - 32767,32767,32767, 535,32767, 542, 542,32767, 496, 100, - 194,32767,32767, 511,32767, 194, 194,32767,32767,32767, - 32767,32767,32767,32767,32767, 603, 496, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110,32767, 194, - 110,32767,32767,32767, 100, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 189,32767, 267, 269, 102, - 557, 194,32767, 515,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 508,32767,32767,32767,32767,32767, + 32767, 100, 537, 412, 414, 504, 425, 426, 424, 393, + 32767, 511,32767, 102,32767, 513,32767,32767,32767,32767, + 32767,32767,32767, 536,32767, 543, 543,32767, 497, 100, + 195,32767,32767, 512,32767, 195, 195,32767,32767,32767, + 32767,32767,32767,32767,32767, 604, 497, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, + 110,32767,32767,32767, 100, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 190,32767, 268, 270, 102, + 558, 195,32767, 516,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 509,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 496, 434, 138,32767, 138, 542, 426, 427, 428, 498, - 542, 542, 542, 311, 288,32767,32767,32767,32767, 513, - 513, 100, 100, 100, 100, 508,32767,32767,32767,32767, + 497, 435, 138,32767, 138, 543, 427, 428, 429, 499, + 543, 543, 543, 312, 289,32767,32767,32767,32767, 514, + 514, 100, 100, 100, 100, 509,32767,32767,32767,32767, 111, 99, 99, 99, 99, 99, 103, 101,32767,32767, - 32767,32767, 222, 99,32767, 101, 101,32767,32767, 222, - 224, 211, 101, 226,32767, 561, 562, 222, 101, 226, - 226, 226, 246, 246, 485, 317, 101, 99, 101, 101, - 196, 317, 317,32767, 101, 485, 317, 485, 317, 198, - 317, 317, 317, 485, 317,32767, 101, 317, 213, 99, - 99, 317,32767,32767,32767, 498,32767,32767,32767,32767, - 32767,32767,32767, 221,32767,32767,32767,32767,32767,32767, - 32767,32767, 529,32767, 546, 559, 432, 433, 435, 544, - 457, 458, 459, 460, 461, 462, 463, 465, 591,32767, - 502,32767,32767,32767, 337,32767, 601,32767,32767,32767, + 32767,32767, 223, 99,32767, 101, 101,32767,32767, 223, + 225, 212, 101, 227,32767, 562, 563, 223, 101, 227, + 227, 227, 247, 247, 486, 318, 101, 99, 101, 101, + 197, 318, 318,32767, 101, 486, 318, 486, 318, 199, + 318, 318, 318, 486, 318,32767, 101, 318, 214, 99, + 99, 318,32767,32767,32767, 499,32767,32767,32767,32767, + 32767,32767,32767, 222,32767,32767,32767,32767,32767,32767, + 32767,32767, 530,32767, 547, 560, 433, 434, 436, 545, + 458, 459, 460, 461, 462, 463, 464, 466, 592,32767, + 503,32767,32767,32767, 338,32767, 602,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 602,32767, 542,32767,32767,32767, - 32767, 431, 9, 74, 491, 42, 43, 51, 57, 519, - 520, 521, 522, 516, 517, 523, 518,32767,32767, 524, - 567,32767,32767, 543, 594,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 603,32767, 543,32767,32767,32767, + 32767, 432, 9, 74, 492, 42, 43, 51, 57, 520, + 521, 522, 523, 517, 518, 524, 519,32767,32767, 525, + 568,32767,32767, 544, 595,32767,32767,32767,32767,32767, 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 529,32767, 136,32767,32767,32767,32767, - 32767,32767,32767,32767, 525,32767,32767,32767, 542,32767, - 32767,32767,32767, 313, 310,32767,32767,32767,32767,32767, + 32767,32767,32767, 530,32767, 136,32767,32767,32767,32767, + 32767,32767,32767,32767, 526,32767,32767,32767, 543,32767, + 32767,32767,32767, 314, 311,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 542,32767,32767,32767,32767,32767, 290,32767, 307, + 32767, 543,32767,32767,32767,32767,32767, 291,32767, 308, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 285,32767,32767, 380, - 498, 293, 295, 296,32767,32767,32767,32767, 359,32767, + 32767,32767,32767,32767,32767,32767, 286,32767,32767, 381, + 499, 294, 296, 297,32767,32767,32767,32767, 360,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 152, 152, 3, 3, 340, 152, 152, 152, 340, 340, - 152, 340, 340, 340, 152, 152, 152, 152, 152, 152, - 279, 184, 261, 264, 246, 246, 152, 351, 152 + 152, 152, 3, 3, 341, 152, 152, 152, 341, 341, + 152, 341, 341, 341, 152, 152, 152, 152, 152, 152, + 280, 185, 262, 265, 247, 247, 152, 352, 152 ); protected array $goto = array( - 196, 196, 1033, 974, 697, 431, 661, 621, 658, 319, + 196, 196, 1034, 1065, 697, 431, 661, 621, 658, 319, 706, 425, 313, 314, 335, 576, 430, 336, 432, 638, - 654, 655, 1064, 672, 673, 674, 852, 167, 167, 167, + 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, 189, 190, 191, 192, 218, 216, 219, 536, 537, 421, - 538, 540, 541, 542, 543, 544, 545, 546, 547, 1135, + 538, 540, 541, 542, 543, 544, 545, 546, 547, 1136, 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, 258, 259, 260, 261, 262, 263, 264, 268, 269, 270, 271, 281, 282, 316, 317, 318, 426, 427, 428, 581, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, - 200, 239, 188, 189, 190, 191, 192, 218, 1135, 201, + 200, 239, 188, 189, 190, 191, 192, 218, 1136, 201, 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, 212, 213, 214, 855, 466, 466, 278, 278, 278, 278, - 623, 623, 853, 466, 1268, 600, 1268, 1268, 1268, 1268, - 1268, 1268, 1268, 1268, 1268, 1286, 1286, 599, 1099, 1286, - 709, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, - 508, 700, 419, 1097, 351, 559, 552, 860, 827, 909, + 623, 623, 351, 466, 1269, 600, 1269, 1269, 1269, 1269, + 1269, 1269, 1269, 1269, 1269, 1287, 1287, 599, 1100, 1287, + 709, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, + 508, 700, 458, 1098, 975, 559, 552, 860, 419, 909, 904, 905, 918, 861, 906, 858, 907, 908, 859, 848, - 886, 912, 354, 354, 354, 354, 396, 399, 560, 601, - 605, 1086, 1081, 1082, 1083, 341, 552, 559, 568, 569, - 344, 579, 602, 616, 617, 408, 409, 1231, 868, 458, - 670, 22, 671, 833, 412, 413, 414, 913, 684, 914, - 1236, 415, 1236, 880, 573, 347, 867, 1033, 1033, 1236, - 349, 848, 1033, 1326, 1033, 1033, 1106, 1107, 1033, 1033, - 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1033, 1318, - 1318, 1318, 1318, 1236, 833, 440, 833, 995, 1236, 1236, - 1236, 1236, 1232, 1233, 1236, 1236, 1236, 500, 355, 501, - 843, 394, 252, 252, 479, 507, 1036, 1036, 355, 355, - 681, 951, 481, 925, 1028, 1044, 1045, 926, 1234, 1294, - 1295, 941, 355, 355, 941, 424, 355, 611, 1353, 250, - 250, 250, 250, 245, 253, 476, 1311, 1312, 5, 554, - 6, 1284, 1284, 355, 355, 1284, 571, 1284, 1284, 1284, - 1284, 1284, 1284, 1284, 1284, 1284, 539, 539, 342, 660, - 539, 1132, 539, 539, 539, 539, 539, 539, 539, 539, - 539, 566, 1336, 1336, 1057, 733, 637, 639, 1039, 1038, - 659, 848, 343, 342, 683, 687, 1009, 695, 704, 1005, - 1336, 1297, 851, 548, 548, 548, 548, 1184, 604, 438, - 998, 972, 972, 970, 972, 732, 337, 1339, 1339, 966, - 410, 705, 686, 551, 1007, 1002, 553, 563, 450, 450, - 450, 553, 1308, 563, 1308, 682, 397, 462, 1215, 943, - 666, 1308, 1216, 1219, 944, 1220, 1042, 1043, 469, 580, - 470, 471, 845, 554, 878, 352, 353, 1344, 1345, 325, - 308, 550, 873, 550, 1313, 1314, 1320, 1320, 1320, 1320, - 550, 609, 624, 627, 628, 629, 630, 651, 652, 653, - 708, 577, 614, 876, 324, 275, 324, 631, 633, 635, - 930, 1122, 694, 1304, 456, 829, 403, 619, 957, 968, - 968, 968, 968, 1014, 694, 456, 962, 969, 694, 870, - 615, 872, 1017, 664, 993, 1227, 1229, 477, 1070, 866, + 827, 912, 354, 354, 354, 354, 396, 399, 560, 601, + 605, 1087, 1082, 1083, 1084, 341, 552, 559, 568, 569, + 344, 579, 602, 616, 617, 408, 409, 1232, 440, 479, + 670, 22, 671, 886, 412, 413, 414, 481, 684, 349, + 1237, 415, 1237, 1107, 1108, 347, 833, 1034, 1034, 1237, + 573, 848, 1034, 1327, 1034, 1034, 1040, 1039, 1034, 1034, + 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1319, + 1319, 1319, 1319, 1237, 893, 851, 893, 893, 1237, 1237, + 1237, 1237, 1233, 1234, 1237, 1237, 1237, 833, 355, 833, + 843, 996, 252, 252, 1043, 1044, 1037, 1037, 355, 355, + 681, 952, 394, 926, 1029, 1045, 1046, 927, 1235, 1295, + 1296, 942, 355, 355, 942, 913, 355, 914, 1354, 250, + 250, 250, 250, 245, 253, 548, 548, 548, 548, 554, + 604, 1285, 1285, 355, 355, 1285, 571, 1285, 1285, 1285, + 1285, 1285, 1285, 1285, 1285, 1285, 539, 539, 342, 424, + 539, 611, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 566, 476, 1312, 1313, 733, 637, 639, 325, 308, + 659, 848, 343, 342, 683, 687, 1010, 695, 704, 1006, + 660, 1298, 609, 624, 627, 628, 629, 630, 651, 652, + 653, 708, 1216, 944, 1314, 1315, 1217, 1220, 945, 1221, + 1337, 1337, 686, 352, 353, 868, 553, 563, 450, 450, + 450, 553, 1309, 563, 1309, 1133, 397, 462, 1337, 1058, + 880, 1309, 1185, 867, 500, 5, 501, 6, 469, 580, + 470, 471, 507, 554, 878, 1340, 1340, 1345, 1346, 433, + 438, 550, 666, 550, 433, 682, 1321, 1321, 1321, 1321, + 550, 337, 1041, 1041, 931, 1123, 873, 665, 1052, 1048, + 1049, 619, 845, 876, 324, 275, 324, 1015, 967, 410, + 705, 577, 614, 1305, 456, 872, 403, 664, 994, 969, + 969, 969, 969, 866, 870, 456, 963, 970, 881, 869, + 1070, 1074, 631, 633, 635, 1227, 1230, 958, 615, 978, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, - 450, 1226, 1074, 450, 882, 1072, 736, 433, 979, 1306, - 1306, 1072, 433, 881, 869, 1069, 1073, 1117, 0, 0, - 1040, 1040, 255, 255, 977, 665, 1051, 1047, 1048, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 967, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1115, 885, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1012, 1012 + 450, 999, 1018, 450, 971, 1073, 732, 477, 1228, 1307, + 1307, 1073, 736, 968, 551, 1008, 1003, 882, 694, 1075, + 1071, 829, 255, 255, 980, 0, 1118, 0, 1013, 1013, + 694, 0, 0, 0, 694, 1116, 885 ); protected array $gotoCheck = array( - 42, 42, 72, 49, 72, 65, 65, 55, 55, 65, - 9, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 85, 85, 126, 85, 85, 85, 26, 42, 42, 42, + 42, 42, 73, 127, 73, 66, 66, 56, 56, 66, + 9, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 86, 86, 26, 86, 86, 86, 27, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -923,96 +918,91 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 15, 148, 148, 23, 23, 23, 23, - 107, 107, 27, 148, 107, 129, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 169, 169, 8, 8, 169, - 8, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 8, 8, 43, 8, 96, 75, 75, 15, 6, 15, + 42, 42, 42, 15, 149, 149, 23, 23, 23, 23, + 108, 108, 97, 149, 108, 130, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 170, 170, 8, 8, 170, + 8, 170, 170, 170, 170, 170, 170, 170, 170, 170, + 8, 8, 83, 8, 49, 76, 76, 15, 43, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 22, - 45, 15, 24, 24, 24, 24, 58, 58, 58, 58, - 58, 15, 15, 15, 15, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 81, 81, 20, 35, 82, - 81, 75, 81, 12, 81, 81, 81, 64, 81, 64, - 72, 81, 72, 35, 171, 81, 35, 72, 72, 72, - 178, 22, 72, 180, 72, 72, 143, 143, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, 72, 9, - 9, 9, 9, 72, 12, 82, 12, 102, 72, 72, - 72, 72, 20, 20, 72, 72, 72, 154, 14, 154, - 20, 61, 5, 5, 83, 154, 88, 88, 14, 14, - 88, 88, 83, 72, 88, 88, 88, 72, 20, 20, - 20, 9, 14, 14, 9, 13, 14, 13, 14, 5, - 5, 5, 5, 5, 5, 175, 175, 175, 46, 14, - 46, 170, 170, 14, 14, 170, 103, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 172, 172, 167, 63, - 172, 149, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 48, 181, 181, 113, 48, 48, 48, 117, 117, - 48, 22, 167, 167, 48, 48, 48, 48, 48, 48, - 181, 14, 25, 106, 106, 106, 106, 150, 106, 112, - 25, 25, 25, 25, 25, 25, 29, 181, 181, 92, - 92, 92, 14, 25, 25, 25, 9, 9, 23, 23, - 23, 9, 129, 9, 129, 115, 9, 9, 78, 78, - 119, 129, 78, 78, 78, 78, 118, 118, 9, 9, - 9, 9, 18, 14, 9, 96, 96, 9, 9, 168, - 168, 19, 39, 19, 177, 177, 129, 129, 129, 129, - 19, 80, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 2, 2, 9, 24, 24, 24, 84, 84, 84, - 17, 17, 7, 129, 19, 7, 28, 17, 91, 19, - 19, 19, 19, 17, 7, 19, 19, 19, 7, 37, - 79, 17, 109, 17, 17, 159, 14, 156, 128, 17, + 6, 15, 24, 24, 24, 24, 59, 59, 59, 59, + 59, 15, 15, 15, 15, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 82, 82, 20, 83, 84, + 82, 76, 82, 45, 82, 82, 82, 84, 82, 179, + 73, 82, 73, 144, 144, 82, 12, 73, 73, 73, + 172, 22, 73, 181, 73, 73, 118, 118, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 9, + 9, 9, 9, 73, 25, 25, 25, 25, 73, 73, + 73, 73, 20, 20, 73, 73, 73, 12, 14, 12, + 20, 103, 5, 5, 119, 119, 89, 89, 14, 14, + 89, 89, 62, 73, 89, 89, 89, 73, 20, 20, + 20, 9, 14, 14, 9, 65, 14, 65, 14, 5, + 5, 5, 5, 5, 5, 107, 107, 107, 107, 14, + 107, 171, 171, 14, 14, 171, 104, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 173, 173, 168, 13, + 173, 13, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 48, 176, 176, 176, 48, 48, 48, 169, 169, + 48, 22, 168, 168, 48, 48, 48, 48, 48, 48, + 64, 14, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 79, 79, 178, 178, 79, 79, 79, 79, + 182, 182, 14, 97, 97, 35, 9, 9, 23, 23, + 23, 9, 130, 9, 130, 150, 9, 9, 182, 114, + 35, 130, 151, 35, 155, 46, 155, 46, 9, 9, + 9, 9, 155, 14, 9, 182, 182, 9, 9, 117, + 113, 19, 120, 19, 117, 116, 130, 130, 130, 130, + 19, 29, 117, 117, 17, 17, 39, 117, 117, 117, + 117, 17, 18, 9, 24, 24, 24, 17, 93, 93, + 93, 2, 2, 130, 19, 17, 28, 17, 17, 19, + 19, 19, 19, 17, 37, 19, 19, 19, 16, 16, + 16, 16, 85, 85, 85, 17, 14, 92, 80, 16, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 17, 131, 23, 41, 129, 98, 116, 95, 129, - 129, 129, 116, 16, 16, 16, 16, 146, -1, -1, - 116, 116, 5, 5, 16, 116, 116, 116, 116, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 16, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 16, 16, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 106, 106 + 23, 50, 110, 23, 50, 130, 50, 157, 160, 130, + 130, 130, 99, 16, 50, 50, 50, 41, 7, 132, + 129, 7, 5, 5, 96, -1, 147, -1, 107, 107, + 7, -1, -1, -1, 7, 16, 16 ); protected array $gotoBase = array( - 0, 0, -231, 0, 0, 311, 188, 485, 179, -10, - 0, 0, -43, -2, 11, -185, 91, 25, 143, 196, - -146, 0, -59, 163, 219, 398, 22, 168, 159, 120, - 0, 0, 0, 0, 0, -123, 0, 170, 0, 139, - 0, 93, -1, 183, 0, 197, -388, 0, -330, -15, - 0, 0, 0, 0, 0, -33, 0, 0, 181, 0, - 0, 269, 0, 127, 243, -236, 0, 0, 0, 0, - 0, 0, -5, 0, 0, -140, 0, 0, 30, 166, - 113, -246, -29, -155, 8, -698, 0, 0, 37, 0, - 0, 169, 115, 0, 0, 95, -279, 0, 129, 0, - 0, 0, 262, 313, 0, 0, 375, -71, 0, 142, - 0, 0, 132, 111, 0, 152, 265, 109, 161, 150, - 0, 0, 0, 0, 0, 0, 20, 0, 144, 167, - 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 103, 0, 130, 126, - 133, 0, 0, 0, -188, 0, 77, 0, 0, 146, - 0, 0, 0, 0, 0, 0, 0, 71, 138, -56, - 110, 235, 125, 0, 0, 45, 0, 92, 240, 0, - 242, 75, 0, 0 + 0, 0, -221, 0, 0, 311, 200, 541, 179, -10, + 0, 0, -30, 32, 11, -185, 56, 9, 173, 196, + -146, 0, -59, 163, 219, 291, 18, 22, 159, 175, + 0, 0, 0, 0, 0, 54, 0, 165, 0, 153, + 0, 106, -1, 189, 0, 230, -291, 0, -330, 186, + 519, 0, 0, 0, 0, 0, -33, 0, 0, 181, + 0, 0, 280, 0, 158, 321, -236, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -140, 0, 0, 4, + 174, 44, -246, -76, -220, 33, -698, 0, 0, 37, + 0, 0, 188, 184, 0, 0, 111, -311, 0, 135, + 0, 0, 0, 276, 313, 0, 0, 317, -71, 0, + 162, 0, 0, 183, 166, 0, 182, 187, -3, 29, + 172, 0, 0, 0, 0, 0, 0, 1, 0, 176, + 167, 0, 107, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -12, 0, 0, 112, 0, 130, + 190, 168, 0, 0, 0, -51, 0, 97, 0, 0, + 169, 0, 0, 0, 0, 0, 0, 0, 71, 67, + -56, 110, 241, 125, 0, 0, 82, 0, 42, 229, + 0, 242, 113, 0, 0 ); protected array $gotoDefault = array( - -32768, 512, 740, 4, 741, 934, 816, 825, 597, 530, - 707, 348, 625, 422, 1302, 911, 1121, 578, 844, 1245, - 1253, 457, 847, 330, 730, 893, 894, 895, 400, 386, + -32768, 512, 740, 4, 741, 935, 816, 825, 597, 530, + 707, 348, 625, 422, 1303, 911, 1122, 578, 844, 1246, + 1254, 457, 847, 330, 730, 923, 894, 895, 400, 386, 392, 398, 649, 626, 494, 879, 453, 871, 486, 874, 452, 883, 164, 418, 510, 887, 3, 890, 557, 921, - 387, 898, 388, 677, 900, 562, 902, 903, 395, 401, - 402, 1126, 570, 622, 915, 256, 564, 916, 385, 917, - 924, 390, 393, 688, 465, 505, 499, 411, 1101, 565, - 608, 646, 447, 473, 620, 632, 618, 480, 434, 416, - 329, 956, 964, 487, 463, 978, 350, 986, 738, 1134, - 640, 489, 994, 641, 1001, 1004, 531, 532, 478, 1016, - 272, 1019, 490, 19, 667, 1030, 1031, 668, 642, 1053, - 643, 669, 644, 1055, 472, 598, 1063, 454, 1071, 1290, - 455, 1075, 266, 1078, 277, 417, 435, 1084, 1085, 9, - 1091, 698, 699, 11, 276, 509, 1116, 689, 451, 1133, - 439, 1203, 1205, 558, 491, 1223, 1222, 680, 506, 1228, - 448, 1293, 449, 533, 474, 315, 534, 1337, 307, 333, - 312, 549, 294, 334, 535, 475, 1299, 1307, 331, 31, - 1327, 1338, 575, 613 + 973, 387, 898, 388, 677, 900, 562, 902, 903, 395, + 401, 402, 1127, 570, 622, 915, 256, 564, 916, 385, + 917, 925, 390, 393, 688, 465, 505, 499, 411, 1102, + 565, 608, 646, 447, 473, 620, 632, 618, 480, 434, + 416, 329, 957, 965, 487, 463, 979, 350, 987, 738, + 1135, 640, 489, 995, 641, 1002, 1005, 531, 532, 478, + 1017, 272, 1020, 490, 19, 667, 1031, 1032, 668, 642, + 1054, 643, 669, 644, 1056, 472, 598, 1064, 454, 1072, + 1291, 455, 1076, 266, 1079, 277, 417, 435, 1085, 1086, + 9, 1092, 698, 699, 11, 276, 509, 1117, 689, 451, + 1134, 439, 1204, 1206, 558, 491, 1224, 1223, 680, 506, + 1229, 448, 1294, 449, 533, 474, 315, 534, 1338, 307, + 333, 312, 549, 294, 334, 535, 475, 1300, 1308, 331, + 31, 1328, 1339, 575, 613 ); protected array $ruleToNonTerminal = array( @@ -1034,27 +1024,27 @@ class Php7 extends \PhpParser\ParserAbstract 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, - 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, - 78, 78, 79, 79, 26, 26, 27, 27, 27, 27, - 27, 87, 87, 89, 89, 82, 82, 90, 90, 91, - 91, 91, 83, 83, 86, 86, 84, 84, 92, 93, - 93, 56, 56, 64, 64, 67, 67, 67, 66, 94, - 94, 95, 57, 57, 57, 57, 96, 96, 97, 97, - 98, 98, 99, 100, 100, 101, 101, 102, 102, 54, - 54, 50, 50, 104, 52, 52, 105, 51, 51, 53, - 53, 63, 63, 63, 63, 80, 80, 108, 108, 110, - 110, 111, 111, 111, 111, 109, 109, 109, 113, 113, - 113, 113, 88, 88, 116, 116, 116, 117, 117, 114, - 114, 118, 118, 120, 120, 121, 121, 115, 122, 122, - 119, 123, 123, 123, 123, 112, 112, 81, 81, 81, - 20, 20, 20, 125, 124, 124, 126, 126, 126, 126, - 59, 127, 127, 128, 60, 130, 130, 131, 131, 132, - 132, 85, 133, 133, 133, 133, 133, 133, 133, 138, - 138, 139, 139, 140, 140, 140, 140, 140, 141, 142, - 142, 137, 137, 134, 134, 136, 136, 144, 144, 143, - 143, 143, 143, 143, 143, 143, 135, 145, 145, 147, - 146, 146, 61, 103, 148, 148, 55, 55, 42, 42, + 49, 49, 25, 25, 50, 69, 69, 72, 72, 71, + 70, 70, 63, 75, 75, 76, 76, 77, 77, 78, + 78, 79, 79, 80, 80, 26, 26, 27, 27, 27, + 27, 27, 88, 88, 90, 90, 83, 83, 91, 91, + 92, 92, 92, 84, 84, 87, 87, 85, 85, 93, + 94, 94, 57, 57, 65, 65, 68, 68, 68, 67, + 95, 95, 96, 58, 58, 58, 58, 97, 97, 98, + 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, + 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, + 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, + 111, 111, 112, 112, 112, 112, 110, 110, 110, 114, + 114, 114, 114, 89, 89, 117, 117, 117, 118, 118, + 115, 115, 119, 119, 121, 121, 122, 122, 116, 123, + 123, 120, 124, 124, 124, 124, 113, 113, 82, 82, + 82, 20, 20, 20, 126, 125, 125, 127, 127, 127, + 127, 60, 128, 128, 129, 61, 131, 131, 132, 132, + 133, 133, 86, 134, 134, 134, 134, 134, 134, 134, + 139, 139, 140, 140, 141, 141, 141, 141, 141, 142, + 143, 143, 138, 138, 135, 135, 137, 137, 145, 145, + 144, 144, 144, 144, 144, 144, 144, 136, 146, 146, + 148, 147, 147, 62, 104, 149, 149, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1064,20 +1054,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 155, 149, 149, 154, 154, 157, 158, 158, - 159, 160, 161, 161, 161, 161, 19, 19, 72, 72, - 72, 72, 150, 150, 150, 150, 163, 163, 151, 151, - 153, 153, 153, 156, 156, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 170, 170, 170, 107, 172, 172, - 172, 172, 152, 152, 152, 152, 152, 152, 152, 152, - 58, 58, 166, 166, 166, 166, 173, 173, 162, 162, - 162, 174, 174, 174, 174, 174, 174, 73, 73, 65, - 65, 65, 65, 129, 129, 129, 129, 177, 176, 165, - 165, 165, 165, 165, 165, 165, 164, 164, 164, 175, - 175, 175, 175, 106, 171, 179, 179, 178, 178, 180, - 180, 180, 180, 180, 180, 180, 180, 168, 168, 168, - 168, 167, 182, 181, 181, 181, 181, 181, 181, 181, - 181, 183, 183, 183, 183 + 42, 42, 42, 156, 150, 150, 155, 155, 158, 159, + 159, 160, 161, 162, 162, 162, 162, 19, 19, 73, + 73, 73, 73, 151, 151, 151, 151, 164, 164, 152, + 152, 154, 154, 154, 157, 157, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 171, 171, 171, 108, 173, + 173, 173, 173, 153, 153, 153, 153, 153, 153, 153, + 153, 59, 59, 167, 167, 167, 167, 174, 174, 163, + 163, 163, 175, 175, 175, 175, 175, 175, 74, 74, + 66, 66, 66, 66, 130, 130, 130, 130, 178, 177, + 166, 166, 166, 166, 166, 166, 166, 165, 165, 165, + 176, 176, 176, 176, 107, 172, 180, 180, 179, 179, + 181, 181, 181, 181, 181, 181, 181, 181, 169, 169, + 169, 169, 168, 183, 182, 182, 182, 182, 182, 182, + 182, 182, 184, 184, 184, 184 ); protected array $ruleToLength = array( @@ -1099,50 +1089,50 @@ class Php7 extends \PhpParser\ParserAbstract 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, 6, 5, 6, 3, - 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, - 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, - 3, 1, 1, 1, 8, 9, 7, 8, 7, 6, - 8, 0, 2, 0, 2, 1, 2, 1, 2, 1, - 1, 1, 0, 2, 0, 2, 0, 2, 2, 1, - 3, 1, 4, 1, 4, 1, 1, 4, 2, 1, - 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, - 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, - 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, - 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, - 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, - 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, - 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, - 2, 4, 3, 1, 1, 3, 1, 2, 2, 3, - 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, - 0, 1, 5, 5, 6, 10, 3, 5, 1, 1, - 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, - 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, - 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, - 3, 3, 4, 4, 1, 1, 2, 3, 3, 3, + 2, 1, 1, 1, 1, 0, 2, 1, 3, 8, + 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, + 1, 3, 1, 1, 1, 8, 9, 7, 8, 7, + 6, 8, 0, 2, 0, 2, 1, 2, 1, 2, + 1, 1, 1, 0, 2, 0, 2, 0, 2, 2, + 1, 3, 1, 4, 1, 4, 1, 1, 4, 2, + 1, 3, 3, 3, 4, 4, 5, 0, 2, 4, + 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, + 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, + 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, + 0, 2, 1, 1, 1, 1, 6, 8, 6, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, + 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, + 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, + 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, + 2, 0, 1, 5, 5, 6, 10, 3, 5, 1, + 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, + 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, + 1, 1, 3, 2, 2, 3, 1, 0, 1, 1, + 3, 3, 3, 4, 4, 1, 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, 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, 2, 8, 9, 8, 9, 9, 10, - 9, 10, 8, 3, 2, 0, 4, 2, 1, 3, - 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 1, 1, 0, 3, - 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 5, 3, 3, 4, 1, - 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, - 0, 1, 1, 3, 1, 1, 1, 1, 1, 3, - 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, - 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, - 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, - 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, - 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, - 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, - 3, 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, + 10, 9, 10, 8, 3, 2, 0, 4, 2, 1, + 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, + 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, + 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, + 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 1, 1, 4, 4, 1, 4, 4, 0, 1, + 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, + 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, + 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, + 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, + 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, + 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1152,7 +1142,7 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); }, 2 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; }, 3 => function ($stackPos) { $this->semValue = array(); @@ -1422,7 +1412,7 @@ protected function initReduceCallbacks(): void { $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 151 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; }, 152 => function ($stackPos) { $this->semValue = array(); @@ -1438,17 +1428,10 @@ protected function initReduceCallbacks(): void { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 158 => function ($stackPos) { - - if ($this->semStack[$stackPos-(3-2)]) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; $comments = $this->getCommentsBeforeToken($this->tokenStartStack[$stackPos-(3-1)]); $stmts = $this->semValue; if (!empty($comments)) {$stmts[0]->setAttribute('comments', array_merge($comments, $stmts[0]->getAttribute('comments', []))); }; - } else { - $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); - if (null === $this->semValue) { $this->semValue = array(); } - } - + $this->semValue = new Stmt\Block($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 159 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => $this->semStack[$stackPos-(7-5)], 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 160 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); @@ -1457,7 +1440,7 @@ protected function initReduceCallbacks(): void { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 162 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 163 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); @@ -1526,889 +1509,884 @@ protected function initReduceCallbacks(): void { $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 181 => function ($stackPos) { - $this->semValue = array(); /* means: no statement */ + $this->semValue = null; /* means: no statement */ }, 182 => null, 183 => function ($stackPos) { $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); - if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, 184 => function ($stackPos) { - $this->semValue = array(); + if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; }, 185 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 186 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 187 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 188 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 189 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 190 => function ($stackPos) { + $this->semValue = null; + }, + 191 => function ($stackPos) { $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 191 => null, - 192 => function ($stackPos) { + 192 => null, + 193 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 193 => function ($stackPos) { + 194 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 194 => function ($stackPos) { + 195 => function ($stackPos) { $this->semValue = false; }, - 195 => function ($stackPos) { + 196 => function ($stackPos) { $this->semValue = true; }, - 196 => function ($stackPos) { + 197 => function ($stackPos) { $this->semValue = false; }, - 197 => function ($stackPos) { + 198 => function ($stackPos) { $this->semValue = true; }, - 198 => function ($stackPos) { + 199 => function ($stackPos) { $this->semValue = false; }, - 199 => function ($stackPos) { + 200 => function ($stackPos) { $this->semValue = true; }, - 200 => function ($stackPos) { + 201 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 201 => function ($stackPos) { + 202 => function ($stackPos) { $this->semValue = []; }, - 202 => null, - 203 => function ($stackPos) { + 203 => null, + 204 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 204 => function ($stackPos) { + 205 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, - 205 => function ($stackPos) { + 206 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, - 206 => function ($stackPos) { + 207 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); $this->checkClass($this->semValue, $stackPos-(7-2)); }, - 207 => function ($stackPos) { + 208 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); $this->checkClass($this->semValue, $stackPos-(8-3)); }, - 208 => function ($stackPos) { + 209 => function ($stackPos) { $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); $this->checkInterface($this->semValue, $stackPos-(7-3)); }, - 209 => function ($stackPos) { + 210 => function ($stackPos) { $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, - 210 => function ($stackPos) { + 211 => function ($stackPos) { $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); $this->checkEnum($this->semValue, $stackPos-(8-3)); }, - 211 => function ($stackPos) { + 212 => function ($stackPos) { $this->semValue = null; }, - 212 => function ($stackPos) { + 213 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 213 => function ($stackPos) { + 214 => function ($stackPos) { $this->semValue = null; }, - 214 => function ($stackPos) { + 215 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 215 => function ($stackPos) { + 216 => function ($stackPos) { $this->semValue = 0; }, - 216 => null, 217 => null, - 218 => function ($stackPos) { + 218 => null, + 219 => function ($stackPos) { $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 219 => function ($stackPos) { + 220 => function ($stackPos) { $this->semValue = Modifiers::ABSTRACT; }, - 220 => function ($stackPos) { + 221 => function ($stackPos) { $this->semValue = Modifiers::FINAL; }, - 221 => function ($stackPos) { + 222 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 222 => function ($stackPos) { + 223 => function ($stackPos) { $this->semValue = null; }, - 223 => function ($stackPos) { + 224 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 224 => function ($stackPos) { + 225 => function ($stackPos) { $this->semValue = array(); }, - 225 => function ($stackPos) { + 226 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 226 => function ($stackPos) { + 227 => function ($stackPos) { $this->semValue = array(); }, - 227 => function ($stackPos) { + 228 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 228 => null, - 229 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, + 229 => null, 230 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 231 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 232 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, + 232 => null, 233 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 234 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, + 234 => null, 235 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 236 => function ($stackPos) { - $this->semValue = null; + if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; }, 237 => function ($stackPos) { + $this->semValue = null; + }, + 238 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 238 => null, - 239 => function ($stackPos) { + 239 => null, + 240 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 240 => function ($stackPos) { + 241 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 241 => function ($stackPos) { + 242 => function ($stackPos) { $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 242 => function ($stackPos) { + 243 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 243 => function ($stackPos) { + 244 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 244 => function ($stackPos) { + 245 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 245 => function ($stackPos) { + 246 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(5-3)]; }, - 246 => function ($stackPos) { + 247 => function ($stackPos) { $this->semValue = array(); }, - 247 => function ($stackPos) { + 248 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 248 => function ($stackPos) { + 249 => function ($stackPos) { $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 249 => function ($stackPos) { + 250 => function ($stackPos) { $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 250 => null, 251 => null, - 252 => function ($stackPos) { + 252 => null, + 253 => function ($stackPos) { $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, - 253 => function ($stackPos) { + 254 => function ($stackPos) { $this->semValue = []; }, - 254 => null, - 255 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, + 255 => null, 256 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 257 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 258 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 259 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 260 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 261 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 262 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 263 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 264 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 265 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 266 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 267 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); }, 268 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = null; }, 269 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 270 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); + $this->semValue = null; }, 271 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); }, 272 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 273 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 274 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + }, + 275 => function ($stackPos) { $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, - 275 => null, - 276 => function ($stackPos) { + 276 => null, + 277 => function ($stackPos) { $this->semValue = array(); }, - 277 => function ($stackPos) { + 278 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 278 => function ($stackPos) { + 279 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 279 => function ($stackPos) { + 280 => function ($stackPos) { $this->semValue = 0; }, - 280 => function ($stackPos) { + 281 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 281 => function ($stackPos) { + 282 => function ($stackPos) { $this->semValue = Modifiers::PUBLIC; }, - 282 => function ($stackPos) { + 283 => function ($stackPos) { $this->semValue = Modifiers::PROTECTED; }, - 283 => function ($stackPos) { + 284 => function ($stackPos) { $this->semValue = Modifiers::PRIVATE; }, - 284 => function ($stackPos) { + 285 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 285 => function ($stackPos) { + 286 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, - 286 => function ($stackPos) { + 287 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); $this->checkParam($this->semValue); }, - 287 => function ($stackPos) { + 288 => function ($stackPos) { $this->semValue = new Node\Param(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, - 288 => null, - 289 => function ($stackPos) { + 289 => null, + 290 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 290 => function ($stackPos) { + 291 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 291 => null, 292 => null, - 293 => function ($stackPos) { + 293 => null, + 294 => function ($stackPos) { $this->semValue = new Node\Name('static', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 294 => function ($stackPos) { + 295 => function ($stackPos) { $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, - 295 => function ($stackPos) { + 296 => function ($stackPos) { $this->semValue = new Node\Identifier('array', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 296 => function ($stackPos) { + 297 => function ($stackPos) { $this->semValue = new Node\Identifier('callable', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 297 => null, - 298 => function ($stackPos) { + 298 => null, + 299 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 299 => function ($stackPos) { + 300 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 300 => function ($stackPos) { + 301 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 301 => null, - 302 => function ($stackPos) { + 302 => null, + 303 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 303 => function ($stackPos) { + 304 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 304 => function ($stackPos) { + 305 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 305 => function ($stackPos) { + 306 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 306 => function ($stackPos) { + 307 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 307 => function ($stackPos) { + 308 => function ($stackPos) { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 308 => function ($stackPos) { + 309 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 309 => function ($stackPos) { + 310 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 310 => function ($stackPos) { + 311 => function ($stackPos) { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 311 => null, - 312 => function ($stackPos) { + 312 => null, + 313 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 313 => function ($stackPos) { + 314 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 314 => null, - 315 => function ($stackPos) { + 315 => null, + 316 => function ($stackPos) { $this->semValue = null; }, - 316 => null, - 317 => function ($stackPos) { + 317 => null, + 318 => function ($stackPos) { $this->semValue = null; }, - 318 => function ($stackPos) { + 319 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 319 => function ($stackPos) { + 320 => function ($stackPos) { $this->semValue = null; }, - 320 => function ($stackPos) { + 321 => function ($stackPos) { $this->semValue = array(); }, - 321 => function ($stackPos) { + 322 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 322 => function ($stackPos) { + 323 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, - 323 => function ($stackPos) { + 324 => function ($stackPos) { $this->semValue = new Node\VariadicPlaceholder($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 324 => function ($stackPos) { + 325 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 325 => function ($stackPos) { + 326 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 326 => function ($stackPos) { + 327 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 327 => function ($stackPos) { + 328 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 328 => function ($stackPos) { + 329 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 329 => function ($stackPos) { + 330 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(3-1)]); }, - 330 => null, - 331 => function ($stackPos) { + 331 => null, + 332 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 332 => function ($stackPos) { + 333 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 333 => null, 334 => null, - 335 => function ($stackPos) { + 335 => null, + 336 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 336 => function ($stackPos) { + 337 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 337 => function ($stackPos) { + 338 => function ($stackPos) { $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 338 => function ($stackPos) { + 339 => function ($stackPos) { $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 339 => function ($stackPos) { + 340 => function ($stackPos) { if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, - 340 => function ($stackPos) { + 341 => function ($stackPos) { $this->semValue = array(); }, - 341 => function ($stackPos) { + 342 => function ($stackPos) { $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 342 => function ($stackPos) { + 343 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 343 => function ($stackPos) { + 344 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 344 => function ($stackPos) { + 345 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); $this->checkClassConst($this->semValue, $stackPos-(6-2)); }, - 345 => function ($stackPos) { + 346 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, - 346 => function ($stackPos) { + 347 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 347 => function ($stackPos) { + 348 => function ($stackPos) { $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, - 348 => function ($stackPos) { + 349 => function ($stackPos) { $this->semValue = null; /* will be skipped */ }, - 349 => function ($stackPos) { + 350 => function ($stackPos) { $this->semValue = array(); }, - 350 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, 351 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 352 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 353 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 354 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 355 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 356 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 357 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 358 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 359 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 359 => null, - 360 => function ($stackPos) { + 360 => null, + 361 => function ($stackPos) { $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, - 361 => function ($stackPos) { + 362 => function ($stackPos) { $this->semValue = null; }, - 362 => null, 363 => null, - 364 => function ($stackPos) { + 364 => null, + 365 => function ($stackPos) { $this->semValue = 0; }, - 365 => function ($stackPos) { + 366 => function ($stackPos) { $this->semValue = 0; }, - 366 => null, 367 => null, - 368 => function ($stackPos) { + 368 => null, + 369 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 369 => function ($stackPos) { + 370 => function ($stackPos) { $this->semValue = Modifiers::PUBLIC; }, - 370 => function ($stackPos) { + 371 => function ($stackPos) { $this->semValue = Modifiers::PROTECTED; }, - 371 => function ($stackPos) { + 372 => function ($stackPos) { $this->semValue = Modifiers::PRIVATE; }, - 372 => function ($stackPos) { + 373 => function ($stackPos) { $this->semValue = Modifiers::STATIC; }, - 373 => function ($stackPos) { + 374 => function ($stackPos) { $this->semValue = Modifiers::ABSTRACT; }, - 374 => function ($stackPos) { + 375 => function ($stackPos) { $this->semValue = Modifiers::FINAL; }, - 375 => function ($stackPos) { + 376 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 376 => null, - 377 => function ($stackPos) { + 377 => null, + 378 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 378 => function ($stackPos) { + 379 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 379 => function ($stackPos) { + 380 => function ($stackPos) { $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 380 => function ($stackPos) { + 381 => function ($stackPos) { $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 381 => function ($stackPos) { + 382 => function ($stackPos) { $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 382 => null, 383 => null, - 384 => function ($stackPos) { + 384 => null, + 385 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 385 => function ($stackPos) { + 386 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 386 => function ($stackPos) { + 387 => function ($stackPos) { $this->semValue = array(); }, - 387 => null, 388 => null, - 389 => function ($stackPos) { + 389 => null, + 390 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 390 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 391 => function ($stackPos) { + 392 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 392 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 393 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); if (!$this->phpVersion->allowsAssignNewByReference()) { $this->emitError(new Error('Cannot assign new by reference', $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]))); } }, - 394 => null, 395 => null, - 396 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, + 396 => null, 397 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 400 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 401 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 402 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 403 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 404 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 405 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 406 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 407 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 408 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 409 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 410 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 411 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 412 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 413 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 421 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 422 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 423 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 424 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 432 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 433 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 434 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 435 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 436 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 437 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 438 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 439 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 440 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 441 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 442 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 443 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 444 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 445 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 446 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 447 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 448 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 449 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 450 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 451 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 452 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 453 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 454 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 455 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 456 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 457 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 458 => function ($stackPos) { + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 459 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 459 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 460 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 461 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 462 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 463 => function ($stackPos) { + 464 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 464 => function ($stackPos) { + 465 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 465 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 466 => null, - 467 => function ($stackPos) { + 467 => null, + 468 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 468 => function ($stackPos) { + 469 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 469 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 470 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 471 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 472 => function ($stackPos) { + 473 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 473 => function ($stackPos) { + 474 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 474 => function ($stackPos) { + 475 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, - 475 => function ($stackPos) { + 476 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, - 476 => function ($stackPos) { + 477 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, - 477 => function ($stackPos) { + 478 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, - 478 => function ($stackPos) { + 479 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, - 479 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, - 480 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, - 481 => function ($stackPos) { + 482 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, - 482 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 483 => function ($stackPos) { + 484 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 484 => function ($stackPos) { + 485 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 485 => function ($stackPos) { + 486 => function ($stackPos) { $this->semValue = array(); }, - 486 => function ($stackPos) { + 487 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 487 => null, - 488 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, + 488 => null, 489 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 490 => function ($stackPos) { - $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 491 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 492 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 493 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); @@ -2417,311 +2395,314 @@ protected function initReduceCallbacks(): void { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 495 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 496 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 497 => null, - 498 => function ($stackPos) { + 497 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, + 498 => null, 499 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 500 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 501 => function ($stackPos) { + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 502 => function ($stackPos) { $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 502 => null, 503 => null, - 504 => function ($stackPos) { + 504 => null, + 505 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 505 => function ($stackPos) { + 506 => function ($stackPos) { $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, - 506 => null, 507 => null, - 508 => function ($stackPos) { + 508 => null, + 509 => function ($stackPos) { $this->semValue = null; }, - 509 => function ($stackPos) { + 510 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 510 => function ($stackPos) { + 511 => function ($stackPos) { $this->semValue = array(); }, - 511 => function ($stackPos) { + 512 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); foreach ($this->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; }, - 512 => function ($stackPos) { + 513 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 513 => function ($stackPos) { + 514 => function ($stackPos) { $this->semValue = array(); }, - 514 => null, - 515 => function ($stackPos) { + 515 => null, + 516 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 516 => function ($stackPos) { + 517 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 517 => function ($stackPos) { + 518 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 518 => function ($stackPos) { + 519 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 519 => function ($stackPos) { + 520 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 520 => function ($stackPos) { + 521 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 521 => function ($stackPos) { + 522 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 522 => function ($stackPos) { + 523 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 523 => function ($stackPos) { + 524 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 524 => function ($stackPos) { + 525 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 525 => function ($stackPos) { + 526 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, - 526 => function ($stackPos) { + 527 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)])), $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, - 527 => function ($stackPos) { + 528 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 528 => function ($stackPos) { + 529 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); $this->createdArrays->attach($this->semValue); }, - 529 => function ($stackPos) { + 530 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, - 530 => function ($stackPos) { + 531 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->supportsUnicodeEscapes()); }, - 531 => function ($stackPos) { + 532 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, - 532 => function ($stackPos) { + 533 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->allowsInvalidOctals()); }, - 533 => function ($stackPos) { + 534 => function ($stackPos) { $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 534 => null, 535 => null, 536 => null, - 537 => function ($stackPos) { + 537 => null, + 538 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); }, - 538 => function ($stackPos) { + 539 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-2)], $this->tokenEndStack[$stackPos-(2-2)]), true); }, - 539 => function ($stackPos) { + 540 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); }, - 540 => function ($stackPos) { + 541 => function ($stackPos) { $this->semValue = null; }, - 541 => null, 542 => null, - 543 => function ($stackPos) { + 543 => null, + 544 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 544 => null, 545 => null, 546 => null, 547 => null, 548 => null, - 549 => function ($stackPos) { + 549 => null, + 550 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 550 => null, 551 => null, - 552 => function ($stackPos) { + 552 => null, + 553 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 553 => function ($stackPos) { + 554 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 554 => null, - 555 => function ($stackPos) { + 555 => null, + 556 => function ($stackPos) { $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 556 => function ($stackPos) { + 557 => function ($stackPos) { $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 557 => function ($stackPos) { + 558 => function ($stackPos) { $this->semValue = null; }, - 558 => null, 559 => null, 560 => null, - 561 => function ($stackPos) { + 561 => null, + 562 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 562 => function ($stackPos) { + 563 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 563 => null, - 564 => function ($stackPos) { + 564 => null, + 565 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 565 => function ($stackPos) { + 566 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 566 => function ($stackPos) { + 567 => function ($stackPos) { $this->semValue = new Expr\Variable(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, - 567 => function ($stackPos) { + 568 => function ($stackPos) { $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])) : $var; }, - 568 => function ($stackPos) { + 569 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 569 => null, - 570 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, + 570 => null, 571 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 572 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 573 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 574 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 575 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 576 => null, - 577 => function ($stackPos) { + 576 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 577 => null, + 578 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 578 => null, 579 => null, - 580 => function ($stackPos) { + 580 => null, + 581 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 581 => null, - 582 => function ($stackPos) { + 582 => null, + 583 => function ($stackPos) { $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, - 583 => function ($stackPos) { + 584 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $this->postprocessList($this->semValue); }, - 584 => function ($stackPos) { + 585 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, - 585 => null, - 586 => function ($stackPos) { + 586 => null, + 587 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, - 587 => function ($stackPos) { + 588 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 588 => function ($stackPos) { + 589 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 589 => function ($stackPos) { + 590 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 590 => function ($stackPos) { + 591 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 591 => function ($stackPos) { + 592 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 592 => function ($stackPos) { + 593 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 593 => function ($stackPos) { + 594 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 594 => function ($stackPos) { + 595 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 595 => function ($stackPos) { + 596 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), true); }, - 596 => function ($stackPos) { + 597 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->tokenPos); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 597 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, 598 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 599 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 600 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 601 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); $attrs['rawValue'] = $this->semStack[$stackPos-(1-1)]; $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $attrs); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 602 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); $attrs['rawValue'] = $this->semStack[$stackPos-(1-1)]; $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $attrs); }, - 603 => null, - 604 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 603 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, + 604 => null, 605 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 606 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 607 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 608 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 609 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 610 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 611 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 612 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 613 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 614 => function ($stackPos) { $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 614 => null, + 615 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index bfe315f7ff..fcc3f0f1f2 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -161,7 +161,7 @@ class Php8 extends \PhpParser\ParserAbstract protected int $tokenToSymbolMapSize = 396; protected int $actionTableSize = 1257; - protected int $gotoTableSize = 707; + protected int $gotoTableSize = 657; protected int $invalidSymbol = 168; protected int $errorSymbol = 1; @@ -388,24 +388,24 @@ class Php8 extends \PhpParser\ParserAbstract protected array $action = array( 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, 138, 38, 327,-32766,-32766,-32766,-32766,-32766,-32766, 837, - 826,-32767,-32767,-32767,-32767, 102, 103, 104, 1111, 1112, - 1113, 1110, 1109, 1108, 1114, 745, 744,-32766, 1026,-32766, + 826,-32767,-32767,-32767,-32767, 102, 103, 104, 1112, 1113, + 1114, 1111, 1110, 1109, 1115, 745, 744,-32766, 1027,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1244,-32766,-32766, 1321, 754, 1111, 1112, 1113, 1110, - 1109, 1108, 1114, 459, 460, 461, 2, 989, 1305, 265, + -32767, 1245,-32766,-32766, 1322, 754, 1112, 1113, 1114, 1111, + 1110, 1109, 1115, 459, 460, 461, 2, 990, 1306, 265, 139, 404, 758, 759, 760, 761, 467, 468, 429, 835, - 606, -16, 1340, 23, 292, 815, 762, 763, 764, 765, + 606, -16, 1341, 23, 292, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, 794, 795, 783, 784, 345, 346, 786, 787, 772, 773, 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, - 584, 779, 780, 585, 586, 940, 803, 801, 802, 814, + 584, 779, 780, 585, 586, 941, 803, 801, 802, 814, 798, 799, 835, 826, 587, 588, 797, 589, 590, 591, - 592, 593, 594, -327, 36, 251, 35, -193, 800, 595, - 596, -192, 140, -85, 133, 134, 135, 582, 136, 137, - 1059, 751, 752, 753, 138, 38, 129, -110, -110, -584, - -32766, -584, -110,-32766,-32766,-32766, 241, 836, -110, 145, - 958, 959,-32766,-32766,-32766, 960, -593,-32766, 482, 745, - 744, 954, 1035, -593,-32766, 990,-32766,-32766,-32766,-32766, + 592, 593, 594, -328, 36, 251, 35, -194, 800, 595, + 596, -193, 140, -85, 133, 134, 135, 582, 136, 137, + 1060, 751, 752, 753, 138, 38, 129, -110, -110, -585, + -32766, -585, -110,-32766,-32766,-32766, 241, 836, -110, 145, + 959, 960,-32766,-32766,-32766, 961, -594,-32766, 482, 745, + 744, 955, 1036, -594,-32766, 991,-32766,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 299, 754, 831, 75,-32766,-32766,-32766, 291, 142, 326, 242, -85, 326, 382, 381, 265, 139, 404, 758, 759, 760, 761, @@ -415,103 +415,103 @@ class Php8 extends \PhpParser\ParserAbstract 786, 787, 772, 773, 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, 584, 779, 780, 585, 586, 254, 803, 801, 802, 814, 798, 799, 832, 725, 587, 588, - 797, 589, 590, 591, 592, 593, 594, -327, 83, 84, - 85, -193, 800, 595, 596, -192, 149, 775, 746, 747, + 797, 589, 590, 591, 592, 593, 594, -328, 83, 84, + 85, -194, 800, 595, 596, -193, 149, 775, 746, 747, 748, 749, 750, 151, 751, 752, 753, 788, 789, 37, 483, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, -593, 274, -593,-32766,-32766, - -32766,-32766,-32766,-32766, 310, 1088, 127, 312, 110, 737, - 1325, 21, 754,-32766,-32766,-32766, -271, 1324,-32766,-32766, - 1087,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, - 759, 760, 761, 1103,-32766, 824,-32766,-32766, -544, 429, - 1035, 323, 815, 762, 763, 764, 765, 766, 767, 768, + 105, 106, 107, 108, 109, -594, 274, -594,-32766,-32766, + -32766,-32766,-32766,-32766, 310, 1089, 127, 312, 110, 737, + 1326, 21, 754,-32766,-32766,-32766, -272, 1325,-32766,-32766, + 1088,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, + 759, 760, 761, 1104,-32766, 824,-32766,-32766, -545, 429, + 1036, 323, 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, - 781, 782, 1032, 803, 801, 802, 814, 798, 799, 745, + 781, 782, 1033, 803, 801, 802, 814, 798, 799, 745, 744, 790, 796, 797, 804, 805, 807, 806, 808, 809, - 152,-32766, -544, -544, 1035, 800, 811, 810, 50, 51, - 52, 513, 53, 54, 1239, 1238, 1240, -544, 55, 56, - -110, 57,-32766, 1089, 920, -110, 556, -110, 292, -550, - 339, -544, 306, 103, 104, -110, -110, -110, -110, -110, - -110, -110, -110, 105, 106, 107, 108, 109, 1244, 274, - 380, 381, -590, -366, 715, -366, 340, 58, 59, -590, + 152,-32766, -545, -545, 1036, 800, 811, 810, 50, 51, + 52, 513, 53, 54, 1240, 1239, 1241, -545, 55, 56, + -110, 57,-32766, 1090, 920, -110, 556, -110, 292, -551, + 339, -545, 306, 103, 104, -110, -110, -110, -110, -110, + -110, -110, -110, 105, 106, 107, 108, 109, 1245, 274, + 380, 381, -591, -367, 715, -367, 340, 58, 59, -591, 423, 110, 60, 370, 61, 248, 249, 62, 63, 64, - 65, 66, 67, 68, 69, -543, 28, 267, 70, 445, - 514,-32766, 374, -341, 1271, 1272, 515, 1277, 835, 862, - 389, 863, 1269, 42, 25, 516, 942, 517, 942, 518, - 920, 519, 299, 1035, 520, 521, 1265, 910, 441, 44, - 45, 446, 377, 376,-32766, 46, 522, 1022, 1021, 1020, - 1023, 368, 338, 391, 1237, 7, 291, 442, 1230, 835, - 524, 525, 526, 443, 1244, 357, 1035, 362, 834, -543, - -543, 154, 528, 529, 444, 1258, 1259, 1260, 1261, 1255, - 1256, 298,-32766,-32766, -543, -547, 1058, 1262, 1257, 291, - 1235, 1239, 1238, 1240, 299, 841, -549, 71, -543, 656, + 65, 66, 67, 68, 69, -544, 28, 267, 70, 445, + 514,-32766, 374, -342, 1272, 1273, 515, 1278, 835, 862, + 389, 863, 1270, 42, 25, 516, 943, 517, 943, 518, + 920, 519, 299, 1036, 520, 521, 1266, 910, 441, 44, + 45, 446, 377, 376,-32766, 46, 522, 1023, 1022, 1021, + 1024, 368, 338, 391, 1238, 7, 291, 442, 1231, 835, + 524, 525, 526, 443, 1245, 357, 1036, 362, 834, -544, + -544, 154, 528, 529, 444, 1259, 1260, 1261, 1262, 1256, + 1257, 298,-32766,-32766, -544, -548, 1059, 1263, 1258, 291, + 1236, 1240, 1239, 1241, 299, 841, -550, 71, -544, 656, 26, 321, 322, 326, -153, -153, -153, 920, 612, 675, - 676, 1034, 922, 910,-32766, 286, 710, 835, 155, -153, - 828, -153, 862, -153, 863, -153, 150, 407, 156, 1239, - 1238, 1240,-32766,-32766,-32766, 375, 1350, 716, 75, 1351, - 158, -590, 33, -590, 326, 835, 958, 959, -78, -547, - -547, 523, 920,-32766, 378, 379, 896, 954, -110, -110, + 676, 1035, 922, 910,-32766, 286, 710, 835, 155, -153, + 828, -153, 862, -153, 863, -153, 150, 407, 156, 1240, + 1239, 1241,-32766,-32766,-32766, 375, 1351, 716, 75, 1352, + 158, -591, 33, -591, 326, 835, 959, 960, -78, -548, + -548, 523, 920,-32766, 378, 379, 896, 955, -110, -110, -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 745, 744, -58, -547, -57, - -110, -110, 717, 745, 744, -110, 383, 384, 922, 1032, + 119, 120, 121, 122, 123, 745, 744, -58, -548, -57, + -110, -110, 717, 745, 744, -110, 383, 384, 922, 1033, 910, -110, 710, -153, 647, 648, 830, 124, 141, 125, - -32766, 1032, 326, 712, 1149, 1151, 48, 130, 131, 144, - 159, 1035,-32766, 160, 161, -542, 28, 162, 1237, 920, - 163, 299, 920, 1035, 75,-32766,-32766,-32766, 835,-32766, - 326,-32766, 1269,-32766, 282, 910,-32766, -87, -84, -78, + -32766, 1033, 326, 712, 1150, 1152, 48, 130, 131, 144, + 159, 1036,-32766, 160, 161, -543, 28, 162, 1238, 920, + 163, 299, 920, 1036, 75,-32766,-32766,-32766, 835,-32766, + 326,-32766, 1270,-32766, 282, 910,-32766, -87, -84, -78, -73,-32766,-32766,-32766, -4, 920, 282,-32766,-32766, 720, -72, -71, 727,-32766, 420, -70, -69, -68, -67, -66, - 287, 286,-32766, -65, -46, 922, 745, 744, 1230, 710, - 300, 301, -545, -18, 148, -301, 273, 283, 726, -542, - -542, 729, 528, 529, 920, 1258, 1259, 1260, 1261, 1255, - 1256, 919, 74, 147, -542, 288, 293, 1262, 1257, 126, - -297, 280, 910,-32766, 281, 910, 284, 73, -542, 1237, - 975, 690, 322, 326, 710, 285,-32766,-32766,-32766, 332, - -32766, 274,-32766, 294,-32766, 936, 110,-32766, 910, 685, - 835, -542,-32766,-32766,-32766, 826, -545, -545,-32766,-32766, - 146,-32766, -50, 701,-32766, 420, 703, 691, 20, 1118, - 375, -545, 436,-32766, 645, 1352, 1276, 297, 657,-32766, - 1278, 958, 959, 561, 955, -545, 523, 910, 692, 693, - 678, 527, 954, -110, -110, -110, 132, 922, 662, 663, - 922, 710, 464, -507, 710,-32766, 1239, 1238, 1240, 493, - 679, 1237, 282, 938, 10, -542, -542, 40,-32766,-32766, + 287, 286,-32766, -65, -46, 922, 745, 744, 1231, 710, + 300, 301, -546, -18, 148, -302, 273, 283, 726, -543, + -543, 729, 528, 529, 920, 1259, 1260, 1261, 1262, 1256, + 1257, 919, 74, 147, -543, 288, 293, 1263, 1258, 126, + -298, 280, 910,-32766, 281, 910, 284, 73, -543, 1238, + 976, 690, 322, 326, 710, 285,-32766,-32766,-32766, 332, + -32766, 274,-32766, 294,-32766, 937, 110,-32766, 910, 685, + 835, -543,-32766,-32766,-32766, 826, -546, -546,-32766,-32766, + 146,-32766, -50, 701,-32766, 420, 703, 691, 20, 1119, + 375, -546, 436,-32766, 645, 1353, 1277, 297, 657,-32766, + 1279, 959, 960, 561, 956, -546, 523, 910, 692, 693, + 678, 527, 955, -110, -110, -110, 132, 922, 662, 663, + 922, 710, 464, -508, 710,-32766, 1240, 1239, 1241, 493, + 679, 1238, 282, 939, 10, -543, -543, 40,-32766,-32766, -32766, 731,-32766, 922,-32766, 307,-32766, 710, -4,-32766, - -542, 305, 41, 304,-32766,-32766,-32766, 0, 0,-32766, - -32766,-32766, 920, 0, -542, 1237,-32766, 420, 311, 0, - 567, 299,-32766,-32766,-32766,-32766,-32766, -497,-32766, 897, + -543, 305, 41, 304,-32766,-32766,-32766, 0, 0,-32766, + -32766,-32766, 920, 0, -543, 1238,-32766, 420, 311, 0, + 567, 299,-32766,-32766,-32766,-32766,-32766, -498,-32766, 897, -32766, 0, 922,-32766, 8, 0, 710, 24,-32766,-32766, - -32766,-32766, 372, 610,-32766,-32766, 834, 1237, 734, -274, + -32766,-32766, 372, 610,-32766,-32766, 834, 1238, 734, -275, -32766, 420, 920, 735,-32766,-32766,-32766, 854,-32766,-32766, - -32766, 901,-32766, 999, 976,-32766, 49, 983, 973, 488, - -32766,-32766,-32766,-32766, 984, 899,-32766,-32766, 971, 1237, - 574, 1092,-32766, 420, 1095, 1096,-32766,-32766,-32766, 1093, - -32766,-32766,-32766, 1094,-32766, 910, 1100,-32766, 1266, 846, - 1291, 1309,-32766,-32766,-32766, 1343, 650, 34,-32766,-32766, - -578, -249, -249, -249,-32766, 420, -577, 375, -576, -550, - 28, 267, -549,-32766, -548, -491, 1, 29, 958, 959, - 302, 303, 835, 523, 30, 910, 1269, 39, 896, 954, + -32766, 901,-32766, 1000, 977,-32766, 49, 984, 974, 488, + -32766,-32766,-32766,-32766, 985, 899,-32766,-32766, 972, 1238, + 574, 1093,-32766, 420, 1096, 1097,-32766,-32766,-32766, 1094, + -32766,-32766,-32766, 1095,-32766, 910, 1101,-32766, 1267, 846, + 1292, 1310,-32766,-32766,-32766, 1344, 650, 34,-32766,-32766, + -579, -250, -250, -250,-32766, 420, -578, 375, -577, -551, + 28, 267, -550,-32766, -549, -492, 1, 29, 959, 960, + 302, 303, 835, 523, 30, 910, 1270, 39, 896, 955, -110, -110, -110, 43, 47, 373, 72, 76, 77, 78, - 79, -248, -248, -248, 80, 81, 143, 375, 153, 128, - -272, 157, 247, 328, 357, 358, 359, 360, 958, 959, - 922, 361, 1230, 523, 710, -249, 362, 363, 896, 954, - -110, -110, -110, 364, 365, 366, 367, 529, 28, 1258, - 1259, 1260, 1261, 1255, 1256, 369, 437, 555, 1206, -271, - 835, 1262, 1257, 13, 1269, 14,-32766, 15, 16, 18, - 922, 73, 1237, 1347, 710, -248, 322, 326, 406,-32766, + 79, -249, -249, -249, 80, 81, 143, 375, 153, 128, + -273, 157, 247, 328, 357, 358, 359, 360, 959, 960, + 922, 361, 1231, 523, 710, -250, 362, 363, 896, 955, + -110, -110, -110, 364, 365, 366, 367, 529, 28, 1259, + 1260, 1261, 1262, 1256, 1257, 369, 437, 555, 1207, -272, + 835, 1263, 1258, 13, 1270, 14,-32766, 15, 16, 18, + 922, 73, 1238, 1348, 710, -249, 322, 326, 406,-32766, -32766,-32766, 484,-32766, 485,-32766, 492,-32766, 495, 496, -32766, 497, 498, 502, 503,-32766,-32766,-32766, 504, 511, - 1230,-32766,-32766, 572, 696, 1248, 1189,-32766, 420, 1267, - 1061, 1060, 1041, 1225, 1037, 529,-32766, 1258, 1259, 1260, - 1261, 1255, 1256, -276, -102, 12, 17, 27, 296, 1262, - 1257, 405, 603, 607, 636, 702, 1193, 1243, 1190, 73, - 320, 1322, 0, 371, 322, 326, 711, 714, 718, 719, - 721, 722, 723, 724, 728, 0, 713, 0, 1349, 857, - 856, 865, 948, 991, 864, 1348, 947, 945, 946, 949, - 1221, 929, 939, 927, 981, 982, 634, 1346, 1303, 1292, - 1310, 1319, 0, 0, 1270, 0, 326 + 1231,-32766,-32766, 572, 696, 1249, 1190,-32766, 420, 1268, + 1062, 1061, 1042, 1226, 1038, 529,-32766, 1259, 1260, 1261, + 1262, 1256, 1257, -277, -102, 12, 17, 27, 296, 1263, + 1258, 405, 603, 607, 636, 702, 1194, 1244, 1191, 73, + 320, 1323, 0, 371, 322, 326, 711, 714, 718, 719, + 721, 722, 723, 724, 728, 0, 713, 0, 1350, 857, + 856, 865, 949, 992, 864, 1349, 948, 946, 947, 950, + 1222, 930, 940, 928, 982, 983, 634, 1347, 1304, 1293, + 1311, 1320, 0, 0, 1271, 0, 326 ); protected array $actionCheck = array( @@ -767,10 +767,10 @@ class Php8 extends \PhpParser\ParserAbstract protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 100,32767,32767,32767,32767, 596, 596, - 596, 596,32767,32767, 253, 102,32767,32767, 469, 386, - 386, 386,32767,32767, 540, 540, 540, 540, 540, 540, - 32767,32767,32767,32767,32767,32767, 469,32767,32767,32767, + 32767,32767,32767, 100,32767,32767,32767,32767, 597, 597, + 597, 597,32767,32767, 254, 102,32767,32767, 470, 387, + 387, 387,32767,32767, 541, 541, 541, 541, 541, 541, + 32767,32767,32767,32767,32767,32767, 470,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, @@ -779,146 +779,141 @@ class Php8 extends \PhpParser\ParserAbstract 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, - 323,32767,32767,32767,32767, 102,32767,32767,32767,32767, + 324,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 589,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 590,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 473, 452, - 453, 455, 456, 385, 541, 595, 326, 592, 384, 145, - 338, 328, 241, 329, 257, 474, 258, 475, 478, 479, - 214, 286, 381, 149, 150, 416, 470, 418, 468, 472, - 417, 391, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 389, 390, 471, 449, 448, - 447,32767,32767, 414, 415,32767, 419,32767,32767,32767, - 32767,32767,32767,32767, 102,32767, 388, 422, 420, 421, - 438, 439, 436, 437, 440,32767,32767,32767, 441, 442, - 443, 444, 315,32767,32767, 365, 363, 423, 315, 111, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 429, - 430,32767,32767,32767,32767, 534, 446,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 474, 453, + 454, 456, 457, 386, 542, 596, 327, 593, 385, 145, + 339, 329, 242, 330, 258, 475, 259, 476, 479, 480, + 215, 287, 382, 149, 150, 417, 471, 419, 469, 473, + 418, 392, 398, 399, 400, 401, 402, 403, 404, 405, + 406, 407, 408, 409, 410, 390, 391, 472, 450, 449, + 448,32767,32767, 415, 416,32767, 420,32767,32767,32767, + 32767,32767,32767,32767, 102,32767, 389, 423, 421, 422, + 439, 440, 437, 438, 441,32767,32767,32767, 442, 443, + 444, 445, 316,32767,32767, 366, 364, 424, 316, 111, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 430, + 431,32767,32767,32767,32767, 535, 447,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 102,32767, 100, 536, 411, 413, 503, 424, 425, 392, - 32767, 510,32767, 102,32767, 512,32767,32767,32767,32767, - 32767,32767,32767, 535,32767, 542, 542,32767, 496, 100, - 194,32767,32767, 511,32767, 194, 194,32767,32767,32767, - 32767,32767,32767,32767,32767, 603, 496, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110,32767, 194, - 110,32767,32767,32767, 100, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 189,32767, 267, 269, 102, - 557, 194,32767, 515,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 508,32767,32767,32767,32767,32767, + 102,32767, 100, 537, 412, 414, 504, 425, 426, 393, + 32767, 511,32767, 102,32767, 513,32767,32767,32767,32767, + 32767,32767,32767, 536,32767, 543, 543,32767, 497, 100, + 195,32767,32767, 512,32767, 195, 195,32767,32767,32767, + 32767,32767,32767,32767,32767, 604, 497, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, + 110,32767,32767,32767, 100, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 190,32767, 268, 270, 102, + 558, 195,32767, 516,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 509,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 496, 434, 138,32767, 138, 542, 426, 427, 428, 498, - 542, 542, 542, 311, 288,32767,32767,32767,32767, 513, - 513, 100, 100, 100, 100, 508,32767,32767,32767,32767, + 497, 435, 138,32767, 138, 543, 427, 428, 429, 499, + 543, 543, 543, 312, 289,32767,32767,32767,32767, 514, + 514, 100, 100, 100, 100, 509,32767,32767,32767,32767, 111, 99, 99, 99, 99, 99, 103, 101,32767,32767, - 32767,32767, 222, 99,32767, 101, 101,32767,32767, 222, - 224, 211, 101, 226,32767, 561, 562, 222, 101, 226, - 226, 226, 246, 246, 485, 317, 101, 99, 101, 101, - 196, 317, 317,32767, 101, 485, 317, 485, 317, 198, - 317, 317, 317, 485, 317,32767, 101, 317, 213, 99, - 99, 317,32767,32767,32767, 498,32767,32767,32767,32767, - 32767,32767,32767, 221,32767,32767,32767,32767,32767,32767, - 32767,32767, 529,32767, 546, 559, 432, 433, 435, 544, - 457, 458, 459, 460, 461, 462, 463, 465, 591,32767, - 502,32767,32767,32767, 337,32767, 601,32767,32767,32767, + 32767,32767, 223, 99,32767, 101, 101,32767,32767, 223, + 225, 212, 101, 227,32767, 562, 563, 223, 101, 227, + 227, 227, 247, 247, 486, 318, 101, 99, 101, 101, + 197, 318, 318,32767, 101, 486, 318, 486, 318, 199, + 318, 318, 318, 486, 318,32767, 101, 318, 214, 99, + 99, 318,32767,32767,32767, 499,32767,32767,32767,32767, + 32767,32767,32767, 222,32767,32767,32767,32767,32767,32767, + 32767,32767, 530,32767, 547, 560, 433, 434, 436, 545, + 458, 459, 460, 461, 462, 463, 464, 466, 592,32767, + 503,32767,32767,32767, 338,32767, 602,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 602,32767, 542,32767,32767,32767, - 32767, 431, 9, 74, 491, 42, 43, 51, 57, 519, - 520, 521, 522, 516, 517, 523, 518,32767,32767, 524, - 567,32767,32767, 543, 594,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 603,32767, 543,32767,32767,32767, + 32767, 432, 9, 74, 492, 42, 43, 51, 57, 520, + 521, 522, 523, 517, 518, 524, 519,32767,32767, 525, + 568,32767,32767, 544, 595,32767,32767,32767,32767,32767, 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 529,32767, 136,32767,32767,32767,32767, - 32767,32767,32767,32767, 525,32767,32767,32767, 542,32767, - 32767,32767,32767, 313, 310,32767,32767,32767,32767,32767, + 32767,32767,32767, 530,32767, 136,32767,32767,32767,32767, + 32767,32767,32767,32767, 526,32767,32767,32767, 543,32767, + 32767,32767,32767, 314, 311,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 542,32767,32767,32767,32767,32767, 290,32767, 307, + 32767, 543,32767,32767,32767,32767,32767, 291,32767, 308, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 285,32767,32767, 380, - 498, 293, 295, 296,32767,32767,32767,32767, 359,32767, + 32767,32767,32767,32767,32767,32767, 286,32767,32767, 381, + 499, 294, 296, 297,32767,32767,32767,32767, 360,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 152, 152, 3, 3, 340, 152, 152, 152, 340, 340, - 152, 340, 340, 340, 152, 152, 152, 152, 152, 152, - 279, 184, 261, 264, 246, 246, 152, 351, 152 + 152, 152, 3, 3, 341, 152, 152, 152, 341, 341, + 152, 341, 341, 341, 152, 152, 152, 152, 152, 152, + 280, 185, 262, 265, 247, 247, 152, 352, 152 ); protected array $goto = array( - 196, 196, 1033, 1064, 697, 431, 661, 621, 658, 319, + 196, 196, 1034, 1065, 697, 431, 661, 621, 658, 319, 706, 425, 314, 315, 335, 576, 430, 336, 432, 638, 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, 189, 190, 191, 192, 218, 216, 219, 536, 537, 421, - 538, 540, 541, 542, 543, 544, 545, 546, 547, 1135, + 538, 540, 541, 542, 543, 544, 545, 546, 547, 1136, 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, 258, 259, 260, 261, 262, 263, 264, 268, 269, 270, 271, 277, 289, 290, 317, 318, 426, 427, 428, 581, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, - 200, 239, 188, 189, 190, 191, 192, 218, 1135, 201, + 200, 239, 188, 189, 190, 191, 192, 218, 1136, 201, 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, - 212, 213, 214, 855, 1231, 974, 279, 279, 279, 279, - 623, 623, 419, 351, 1268, 600, 1268, 1268, 1268, 1268, - 1268, 1268, 1268, 1268, 1268, 1286, 1286, 599, 1099, 1286, - 709, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, - 508, 700, 827, 1097, 458, 559, 552, 860, 833, 909, - 904, 905, 918, 861, 906, 858, 907, 908, 859, 1232, - 1233, 912, 500, 886, 501, 252, 252, 843, 1106, 1107, - 507, 1086, 1081, 1082, 1083, 341, 552, 559, 568, 569, - 344, 579, 602, 616, 617, 1234, 1294, 1295, 833, 440, + 212, 213, 214, 855, 1232, 975, 279, 279, 279, 279, + 623, 623, 419, 351, 1269, 600, 1269, 1269, 1269, 1269, + 1269, 1269, 1269, 1269, 1269, 1287, 1287, 599, 1100, 1287, + 709, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, + 508, 700, 827, 1098, 458, 559, 552, 860, 833, 909, + 904, 905, 918, 861, 906, 858, 907, 908, 859, 1233, + 1234, 912, 500, 886, 501, 252, 252, 843, 1107, 1108, + 507, 1087, 1082, 1083, 1084, 341, 552, 559, 568, 569, + 344, 579, 602, 616, 617, 1235, 1295, 1296, 833, 440, 833, 22, 250, 250, 250, 250, 245, 253, 694, 573, - 1236, 829, 1236, 476, 1311, 1312, 349, 1033, 1033, 1236, - 694, 1326, 342, 1033, 694, 1033, 1033, 1033, 1033, 1033, - 1033, 1033, 1033, 1033, 848, 995, 1033, 1033, 1033, 1033, - 1318, 1318, 1318, 1318, 1236, 343, 342, 1039, 1038, 1236, - 1236, 1236, 1236, 851, 394, 1236, 1236, 1236, 571, 355, - 479, 998, 972, 972, 970, 972, 732, 1132, 481, 355, - 355, 466, 466, 925, 551, 1007, 1002, 926, 1042, 1043, - 466, 941, 355, 355, 941, 848, 355, 660, 1353, 609, + 1237, 829, 1237, 893, 851, 893, 893, 1034, 1034, 1237, + 694, 349, 342, 1034, 694, 1034, 1034, 1034, 1034, 1034, + 1034, 1034, 1034, 1034, 848, 1327, 1034, 1034, 1034, 1034, + 1319, 1319, 1319, 1319, 1237, 343, 342, 1040, 1039, 1237, + 1237, 1237, 1237, 868, 996, 1237, 1237, 1237, 913, 355, + 914, 354, 354, 354, 354, 466, 466, 479, 880, 355, + 355, 867, 394, 926, 466, 481, 571, 927, 967, 410, + 705, 942, 355, 355, 942, 848, 355, 660, 1354, 609, 624, 627, 628, 629, 630, 651, 652, 653, 708, 554, - 1057, 1284, 1284, 355, 355, 1284, 1184, 1284, 1284, 1284, - 1284, 1284, 1284, 1284, 1284, 1284, 539, 539, 438, 913, - 539, 914, 539, 539, 539, 539, 539, 539, 539, 539, - 539, 566, 682, 1336, 1336, 733, 637, 639, 325, 309, - 659, 868, 577, 614, 683, 687, 1009, 695, 704, 1005, - 1336, 1297, 666, 408, 409, 424, 880, 611, 670, 867, - 671, 337, 412, 413, 414, 845, 684, 1339, 1339, 415, - 1313, 1314, 686, 347, 352, 353, 553, 563, 450, 450, - 450, 553, 1308, 563, 1308, 873, 397, 462, 966, 410, - 705, 1308, 354, 354, 354, 354, 957, 870, 469, 580, - 470, 471, 403, 554, 878, 848, 1227, 1344, 1345, 631, - 633, 635, 550, 615, 550, 255, 255, 1320, 1320, 1320, - 1320, 550, 548, 548, 548, 548, 5, 604, 6, 881, - 869, 1069, 1073, 876, 882, 396, 399, 560, 601, 605, - 977, 1017, 1070, 1304, 477, 736, 456, 1074, 0, 979, - 0, 968, 968, 968, 968, 1117, 0, 456, 962, 969, - 0, 0, 0, 0, 967, 0, 1229, 0, 0, 0, + 1133, 1285, 1285, 355, 355, 1285, 1058, 1285, 1285, 1285, + 1285, 1285, 1285, 1285, 1285, 1285, 539, 539, 1185, 424, + 539, 611, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 566, 682, 1337, 1337, 733, 637, 639, 1043, 1044, + 659, 476, 1312, 1313, 683, 687, 1010, 695, 704, 1006, + 1337, 1298, 438, 408, 409, 631, 633, 635, 670, 5, + 671, 6, 412, 413, 414, 337, 684, 1340, 1340, 415, + 325, 309, 686, 347, 352, 353, 553, 563, 450, 450, + 450, 553, 1309, 563, 1309, 666, 397, 462, 845, 1314, + 1315, 1309, 548, 548, 548, 548, 873, 604, 469, 580, + 470, 471, 403, 554, 878, 848, 958, 1345, 1346, 577, + 614, 870, 550, 615, 550, 255, 255, 1321, 1321, 1321, + 1321, 550, 999, 1018, 477, 971, 1228, 732, 736, 881, + 869, 1070, 1074, 876, 882, 551, 1008, 1003, 1071, 1075, + 978, 980, 0, 1305, 1118, 0, 456, 0, 0, 0, + 0, 969, 969, 969, 969, 0, 0, 456, 963, 970, + 0, 0, 0, 0, 968, 0, 1230, 0, 0, 0, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, - 450, 930, 1122, 450, 0, 1072, 1115, 885, 619, 1306, - 1306, 1072, 1215, 943, 1014, 433, 1216, 1219, 944, 1220, - 0, 433, 872, 0, 664, 993, 0, 1040, 1040, 0, - 866, 0, 0, 0, 665, 1051, 1047, 1048, 1036, 1036, - 681, 951, 1226, 0, 1028, 1044, 1045, 0, 0, 0, + 450, 931, 1123, 450, 0, 1073, 1116, 885, 619, 1307, + 1307, 1073, 1216, 944, 1015, 433, 1217, 1220, 945, 1221, + 0, 433, 872, 0, 664, 994, 0, 1041, 1041, 0, + 866, 0, 0, 0, 665, 1052, 1048, 1049, 0, 0, + 0, 0, 1227, 324, 275, 324, 1037, 1037, 681, 952, + 0, 0, 1029, 1045, 1046, 396, 399, 560, 601, 605, 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, 1012, 1012, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 324, 275, 324 + 0, 0, 0, 0, 0, 1013, 1013 ); protected array $gotoCheck = array( - 42, 42, 72, 126, 72, 65, 65, 55, 55, 65, - 9, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 85, 85, 26, 85, 85, 85, 27, 42, 42, 42, + 42, 42, 73, 127, 73, 66, 66, 56, 56, 66, + 9, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 86, 86, 26, 86, 86, 86, 27, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -933,104 +928,99 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 15, 20, 49, 23, 23, 23, 23, - 107, 107, 43, 96, 107, 129, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 169, 169, 8, 8, 169, - 8, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 8, 8, 6, 8, 82, 75, 75, 15, 12, 15, + 108, 108, 43, 97, 108, 130, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 170, 170, 8, 8, 170, + 8, 170, 170, 170, 170, 170, 170, 170, 170, 170, + 8, 8, 6, 8, 83, 76, 76, 15, 12, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 20, - 20, 15, 154, 45, 154, 5, 5, 20, 143, 143, - 154, 15, 15, 15, 15, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 20, 20, 20, 12, 82, - 12, 75, 5, 5, 5, 5, 5, 5, 7, 171, - 72, 7, 72, 175, 175, 175, 178, 72, 72, 72, - 7, 180, 167, 72, 7, 72, 72, 72, 72, 72, - 72, 72, 72, 72, 22, 102, 72, 72, 72, 72, - 9, 9, 9, 9, 72, 167, 167, 117, 117, 72, - 72, 72, 72, 25, 61, 72, 72, 72, 103, 14, - 83, 25, 25, 25, 25, 25, 25, 149, 83, 14, - 14, 148, 148, 72, 25, 25, 25, 72, 118, 118, - 148, 9, 14, 14, 9, 22, 14, 63, 14, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 14, - 113, 170, 170, 14, 14, 170, 150, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 172, 172, 112, 64, - 172, 64, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 48, 115, 181, 181, 48, 48, 48, 168, 168, - 48, 35, 2, 2, 48, 48, 48, 48, 48, 48, - 181, 14, 119, 81, 81, 13, 35, 13, 81, 35, - 81, 29, 81, 81, 81, 18, 81, 181, 181, 81, - 177, 177, 14, 81, 96, 96, 9, 9, 23, 23, - 23, 9, 129, 9, 129, 39, 9, 9, 92, 92, - 92, 129, 24, 24, 24, 24, 91, 37, 9, 9, - 9, 9, 28, 14, 9, 22, 159, 9, 9, 84, - 84, 84, 19, 79, 19, 5, 5, 129, 129, 129, - 129, 19, 106, 106, 106, 106, 46, 106, 46, 16, - 16, 16, 16, 9, 41, 58, 58, 58, 58, 58, - 16, 109, 128, 129, 156, 98, 19, 131, -1, 95, - -1, 19, 19, 19, 19, 146, -1, 19, 19, 19, + 20, 15, 155, 45, 155, 5, 5, 20, 144, 144, + 155, 15, 15, 15, 15, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 20, 20, 20, 12, 83, + 12, 76, 5, 5, 5, 5, 5, 5, 7, 172, + 73, 7, 73, 25, 25, 25, 25, 73, 73, 73, + 7, 179, 168, 73, 7, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 22, 181, 73, 73, 73, 73, + 9, 9, 9, 9, 73, 168, 168, 118, 118, 73, + 73, 73, 73, 35, 103, 73, 73, 73, 65, 14, + 65, 24, 24, 24, 24, 149, 149, 84, 35, 14, + 14, 35, 62, 73, 149, 84, 104, 73, 93, 93, + 93, 9, 14, 14, 9, 22, 14, 64, 14, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 14, + 150, 171, 171, 14, 14, 171, 114, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 173, 173, 151, 13, + 173, 13, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 48, 116, 182, 182, 48, 48, 48, 119, 119, + 48, 176, 176, 176, 48, 48, 48, 48, 48, 48, + 182, 14, 113, 82, 82, 85, 85, 85, 82, 46, + 82, 46, 82, 82, 82, 29, 82, 182, 182, 82, + 169, 169, 14, 82, 97, 97, 9, 9, 23, 23, + 23, 9, 130, 9, 130, 120, 9, 9, 18, 178, + 178, 130, 107, 107, 107, 107, 39, 107, 9, 9, + 9, 9, 28, 14, 9, 22, 92, 9, 9, 2, + 2, 37, 19, 80, 19, 5, 5, 130, 130, 130, + 130, 19, 50, 110, 157, 50, 160, 50, 99, 16, + 16, 16, 16, 9, 41, 50, 50, 50, 129, 132, + 16, 96, -1, 130, 147, -1, 19, -1, -1, -1, + -1, 19, 19, 19, 19, -1, -1, 19, 19, 19, -1, -1, -1, -1, 16, -1, 14, -1, -1, -1, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 17, 17, 23, -1, 129, 16, 16, 17, 129, - 129, 129, 78, 78, 17, 116, 78, 78, 78, 78, - -1, 116, 17, -1, 17, 17, -1, 116, 116, -1, - 17, -1, -1, -1, 116, 116, 116, 116, 88, 88, - 88, 88, 17, -1, 88, 88, 88, -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, + 23, 17, 17, 23, -1, 130, 16, 16, 17, 130, + 130, 130, 79, 79, 17, 117, 79, 79, 79, 79, + -1, 117, 17, -1, 17, 17, -1, 117, 117, -1, + 17, -1, -1, -1, 117, 117, 117, 117, -1, -1, + -1, -1, 17, 24, 24, 24, 89, 89, 89, 89, + -1, -1, 89, 89, 89, 59, 59, 59, 59, 59, -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, 106, 106, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 24, 24, 24 + -1, -1, -1, -1, -1, 107, 107 ); protected array $gotoBase = array( - 0, 0, -320, 0, 0, 224, 182, 251, 179, -10, - 0, 0, -89, 68, 11, -185, 27, 66, 105, 197, - -229, 0, 5, 163, 439, 299, 18, 22, 115, 114, - 0, 0, 0, 0, 0, 20, 0, 108, 0, 112, - 0, 43, -1, 153, 0, 200, -260, 0, -330, 147, - 0, 0, 0, 0, 0, -33, 0, 0, 440, 0, - 0, 262, 0, 95, 355, -236, 0, 0, 0, 0, - 0, 0, -5, 0, 0, -140, 0, 0, 134, 119, - -19, -88, -75, -159, -20, -698, 0, 0, 288, 0, - 0, 117, 133, 0, 0, 56, -310, 0, 88, 0, - 0, 0, 250, 265, 0, 0, 444, -71, 0, 121, - 0, 0, 90, 77, 0, 100, 273, 17, 44, 111, - 0, 0, 0, 0, 0, 0, 1, 0, 118, 167, - 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -47, 0, 0, 61, 0, 287, 72, - 82, 0, 0, 0, -273, 0, 54, 0, 0, 87, - 0, 0, 0, 0, 0, 0, 0, -26, 67, -56, - 110, 230, 125, 0, 0, -38, 0, 48, 236, 0, - 240, 75, 0, 0 + 0, 0, -253, 0, 0, 224, 182, 251, 179, -10, + 0, 0, -89, 32, 11, -185, 27, 66, 128, 197, + -229, 0, 5, 163, 308, 260, 18, 22, 115, 118, + 0, 0, 0, 0, 0, -68, 0, 122, 0, 123, + 0, 43, -1, 153, 0, 200, -327, 0, -330, 147, + 460, 0, 0, 0, 0, 0, -33, 0, 0, 540, + 0, 0, 280, 0, 95, 294, -236, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -140, 0, 0, 134, + 119, -19, -88, -75, -152, -74, -698, 0, 0, 296, + 0, 0, 127, 23, 0, 0, 48, -310, 0, 71, + 0, 0, 0, 269, 283, 0, 0, 414, -71, 0, + 103, 0, 0, 124, 83, 0, 100, 273, 17, 104, + 144, 0, 0, 0, 0, 0, 0, 1, 0, 114, + 167, 0, 47, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -47, 0, 0, 50, 0, 281, + 105, 94, 0, 0, 0, -273, 0, 34, 0, 0, + 107, 0, 0, 0, 0, 0, 0, 0, -26, 99, + -56, 110, 230, 125, 0, 0, 90, 0, 67, 241, + 0, 254, 75, 0, 0 ); protected array $gotoDefault = array( - -32768, 512, 740, 4, 741, 934, 816, 825, 597, 530, - 707, 348, 625, 422, 1302, 911, 1121, 578, 844, 1245, - 1253, 457, 847, 330, 730, 893, 894, 895, 400, 386, + -32768, 512, 740, 4, 741, 935, 816, 825, 597, 530, + 707, 348, 625, 422, 1303, 911, 1122, 578, 844, 1246, + 1254, 457, 847, 330, 730, 923, 894, 895, 400, 386, 392, 398, 649, 626, 494, 879, 453, 871, 486, 874, 452, 883, 164, 418, 510, 887, 3, 890, 557, 921, - 387, 898, 388, 677, 900, 562, 902, 903, 395, 401, - 402, 1126, 570, 622, 915, 256, 564, 916, 385, 917, - 924, 390, 393, 688, 465, 505, 499, 411, 1101, 565, - 608, 646, 447, 473, 620, 632, 618, 480, 434, 416, - 329, 956, 964, 487, 463, 978, 350, 986, 738, 1134, - 640, 489, 994, 641, 1001, 1004, 531, 532, 478, 1016, - 272, 1019, 490, 19, 667, 1030, 1031, 668, 642, 1053, - 643, 669, 644, 1055, 472, 598, 1063, 454, 1071, 1290, - 455, 1075, 266, 1078, 278, 417, 435, 1084, 1085, 9, - 1091, 698, 699, 11, 276, 509, 1116, 689, 451, 1133, - 439, 1203, 1205, 558, 491, 1223, 1222, 680, 506, 1228, - 448, 1293, 449, 533, 474, 316, 534, 1337, 308, 333, - 313, 549, 295, 334, 535, 475, 1299, 1307, 331, 31, - 1327, 1338, 575, 613 + 973, 387, 898, 388, 677, 900, 562, 902, 903, 395, + 401, 402, 1127, 570, 622, 915, 256, 564, 916, 385, + 917, 925, 390, 393, 688, 465, 505, 499, 411, 1102, + 565, 608, 646, 447, 473, 620, 632, 618, 480, 434, + 416, 329, 957, 965, 487, 463, 979, 350, 987, 738, + 1135, 640, 489, 995, 641, 1002, 1005, 531, 532, 478, + 1017, 272, 1020, 490, 19, 667, 1031, 1032, 668, 642, + 1054, 643, 669, 644, 1056, 472, 598, 1064, 454, 1072, + 1291, 455, 1076, 266, 1079, 278, 417, 435, 1085, 1086, + 9, 1092, 698, 699, 11, 276, 509, 1117, 689, 451, + 1134, 439, 1204, 1206, 558, 491, 1224, 1223, 680, 506, + 1229, 448, 1294, 449, 533, 474, 316, 534, 1338, 308, + 333, 313, 549, 295, 334, 535, 475, 1300, 1308, 331, + 31, 1328, 1339, 575, 613 ); protected array $ruleToNonTerminal = array( @@ -1052,27 +1042,27 @@ class Php8 extends \PhpParser\ParserAbstract 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 25, 25, 68, 68, 71, 71, 70, 69, - 69, 62, 74, 74, 75, 75, 76, 76, 77, 77, - 78, 78, 79, 79, 26, 26, 27, 27, 27, 27, - 27, 87, 87, 89, 89, 82, 82, 90, 90, 91, - 91, 91, 83, 83, 86, 86, 84, 84, 92, 93, - 93, 56, 56, 64, 64, 67, 67, 67, 66, 94, - 94, 95, 57, 57, 57, 57, 96, 96, 97, 97, - 98, 98, 99, 100, 100, 101, 101, 102, 102, 54, - 54, 50, 50, 104, 52, 52, 105, 51, 51, 53, - 53, 63, 63, 63, 63, 80, 80, 108, 108, 110, - 110, 111, 111, 111, 111, 109, 109, 109, 113, 113, - 113, 113, 88, 88, 116, 116, 116, 117, 117, 114, - 114, 118, 118, 120, 120, 121, 121, 115, 122, 122, - 119, 123, 123, 123, 123, 112, 112, 81, 81, 81, - 20, 20, 20, 125, 124, 124, 126, 126, 126, 126, - 59, 127, 127, 128, 60, 130, 130, 131, 131, 132, - 132, 85, 133, 133, 133, 133, 133, 133, 133, 138, - 138, 139, 139, 140, 140, 140, 140, 140, 141, 142, - 142, 137, 137, 134, 134, 136, 136, 144, 144, 143, - 143, 143, 143, 143, 143, 143, 135, 145, 145, 147, - 146, 146, 61, 103, 148, 148, 55, 55, 42, 42, + 49, 49, 25, 25, 50, 69, 69, 72, 72, 71, + 70, 70, 63, 75, 75, 76, 76, 77, 77, 78, + 78, 79, 79, 80, 80, 26, 26, 27, 27, 27, + 27, 27, 88, 88, 90, 90, 83, 83, 91, 91, + 92, 92, 92, 84, 84, 87, 87, 85, 85, 93, + 94, 94, 57, 57, 65, 65, 68, 68, 68, 67, + 95, 95, 96, 58, 58, 58, 58, 97, 97, 98, + 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, + 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, + 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, + 111, 111, 112, 112, 112, 112, 110, 110, 110, 114, + 114, 114, 114, 89, 89, 117, 117, 117, 118, 118, + 115, 115, 119, 119, 121, 121, 122, 122, 116, 123, + 123, 120, 124, 124, 124, 124, 113, 113, 82, 82, + 82, 20, 20, 20, 126, 125, 125, 127, 127, 127, + 127, 60, 128, 128, 129, 61, 131, 131, 132, 132, + 133, 133, 86, 134, 134, 134, 134, 134, 134, 134, + 139, 139, 140, 140, 141, 141, 141, 141, 141, 142, + 143, 143, 138, 138, 135, 135, 137, 137, 145, 145, + 144, 144, 144, 144, 144, 144, 144, 136, 146, 146, + 148, 147, 147, 62, 104, 149, 149, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1082,20 +1072,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 155, 149, 149, 154, 154, 157, 158, 158, - 159, 160, 161, 161, 161, 161, 19, 19, 72, 72, - 72, 72, 150, 150, 150, 150, 163, 163, 151, 151, - 153, 153, 153, 156, 156, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 170, 170, 170, 107, 172, 172, - 172, 172, 152, 152, 152, 152, 152, 152, 152, 152, - 58, 58, 166, 166, 166, 166, 173, 173, 162, 162, - 162, 174, 174, 174, 174, 174, 174, 73, 73, 65, - 65, 65, 65, 129, 129, 129, 129, 177, 176, 165, - 165, 165, 165, 165, 165, 165, 164, 164, 164, 175, - 175, 175, 175, 106, 171, 179, 179, 178, 178, 180, - 180, 180, 180, 180, 180, 180, 180, 168, 168, 168, - 168, 167, 182, 181, 181, 181, 181, 181, 181, 181, - 181, 183, 183, 183, 183 + 42, 42, 42, 156, 150, 150, 155, 155, 158, 159, + 159, 160, 161, 162, 162, 162, 162, 19, 19, 73, + 73, 73, 73, 151, 151, 151, 151, 164, 164, 152, + 152, 154, 154, 154, 157, 157, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 171, 171, 171, 108, 173, + 173, 173, 173, 153, 153, 153, 153, 153, 153, 153, + 153, 59, 59, 167, 167, 167, 167, 174, 174, 163, + 163, 163, 175, 175, 175, 175, 175, 175, 74, 74, + 66, 66, 66, 66, 130, 130, 130, 130, 178, 177, + 166, 166, 166, 166, 166, 166, 166, 165, 165, 165, + 176, 176, 176, 176, 107, 172, 180, 180, 179, 179, + 181, 181, 181, 181, 181, 181, 181, 181, 169, 169, + 169, 169, 168, 183, 182, 182, 182, 182, 182, 182, + 182, 182, 184, 184, 184, 184 ); protected array $ruleToLength = array( @@ -1117,50 +1107,50 @@ class Php8 extends \PhpParser\ParserAbstract 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, 6, 5, 6, 3, - 2, 1, 1, 1, 0, 2, 1, 3, 8, 0, - 4, 2, 1, 3, 0, 1, 0, 1, 0, 1, - 3, 1, 1, 1, 8, 9, 7, 8, 7, 6, - 8, 0, 2, 0, 2, 1, 2, 1, 2, 1, - 1, 1, 0, 2, 0, 2, 0, 2, 2, 1, - 3, 1, 4, 1, 4, 1, 1, 4, 2, 1, - 3, 3, 3, 4, 4, 5, 0, 2, 4, 3, - 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, - 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, - 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, - 2, 1, 1, 1, 1, 6, 8, 6, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, - 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, - 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, - 2, 4, 3, 1, 1, 3, 1, 2, 2, 3, - 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, - 0, 1, 5, 5, 6, 10, 3, 5, 1, 1, - 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, - 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, - 1, 3, 2, 2, 3, 1, 0, 1, 1, 3, - 3, 3, 4, 4, 1, 1, 2, 3, 3, 3, + 2, 1, 1, 1, 1, 0, 2, 1, 3, 8, + 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, + 1, 3, 1, 1, 1, 8, 9, 7, 8, 7, + 6, 8, 0, 2, 0, 2, 1, 2, 1, 2, + 1, 1, 1, 0, 2, 0, 2, 0, 2, 2, + 1, 3, 1, 4, 1, 4, 1, 1, 4, 2, + 1, 3, 3, 3, 4, 4, 5, 0, 2, 4, + 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, + 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, + 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, + 0, 2, 1, 1, 1, 1, 6, 8, 6, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, + 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, + 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, + 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, + 2, 0, 1, 5, 5, 6, 10, 3, 5, 1, + 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, + 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, + 1, 1, 3, 2, 2, 3, 1, 0, 1, 1, + 3, 3, 3, 4, 4, 1, 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, 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, 2, 8, 9, 8, 9, 9, 10, - 9, 10, 8, 3, 2, 0, 4, 2, 1, 3, - 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 1, 1, 0, 3, - 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 5, 3, 3, 4, 1, - 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, - 0, 1, 1, 3, 1, 1, 1, 1, 1, 3, - 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, - 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, - 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, - 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, - 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, - 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, - 3, 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, + 10, 9, 10, 8, 3, 2, 0, 4, 2, 1, + 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, + 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, + 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, + 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 1, 1, 4, 4, 1, 4, 4, 0, 1, + 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, + 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, + 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, + 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, + 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, + 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1170,7 +1160,7 @@ protected function initReduceCallbacks(): void { $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); }, 2 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; }, 3 => function ($stackPos) { $this->semValue = array(); @@ -1440,7 +1430,7 @@ protected function initReduceCallbacks(): void { $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 151 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; }, 152 => function ($stackPos) { $this->semValue = array(); @@ -1456,17 +1446,10 @@ protected function initReduceCallbacks(): void { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 158 => function ($stackPos) { - - if ($this->semStack[$stackPos-(3-2)]) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; $comments = $this->getCommentsBeforeToken($this->tokenStartStack[$stackPos-(3-1)]); $stmts = $this->semValue; if (!empty($comments)) {$stmts[0]->setAttribute('comments', array_merge($comments, $stmts[0]->getAttribute('comments', []))); }; - } else { - $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); - if (null === $this->semValue) { $this->semValue = array(); } - } - + $this->semValue = new Stmt\Block($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 159 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => $this->semStack[$stackPos-(7-5)], 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 160 => function ($stackPos) { $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); @@ -1475,7 +1458,7 @@ protected function initReduceCallbacks(): void { $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 162 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 163 => function ($stackPos) { $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); @@ -1544,889 +1527,884 @@ protected function initReduceCallbacks(): void { $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 181 => function ($stackPos) { - $this->semValue = array(); /* means: no statement */ + $this->semValue = null; /* means: no statement */ }, 182 => null, 183 => function ($stackPos) { $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); - if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ }, 184 => function ($stackPos) { - $this->semValue = array(); + if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; }, 185 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 186 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 187 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 188 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 189 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 190 => function ($stackPos) { + $this->semValue = null; + }, + 191 => function ($stackPos) { $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 191 => null, - 192 => function ($stackPos) { + 192 => null, + 193 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 193 => function ($stackPos) { + 194 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 194 => function ($stackPos) { + 195 => function ($stackPos) { $this->semValue = false; }, - 195 => function ($stackPos) { + 196 => function ($stackPos) { $this->semValue = true; }, - 196 => function ($stackPos) { + 197 => function ($stackPos) { $this->semValue = false; }, - 197 => function ($stackPos) { + 198 => function ($stackPos) { $this->semValue = true; }, - 198 => function ($stackPos) { + 199 => function ($stackPos) { $this->semValue = false; }, - 199 => function ($stackPos) { + 200 => function ($stackPos) { $this->semValue = true; }, - 200 => function ($stackPos) { + 201 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 201 => function ($stackPos) { + 202 => function ($stackPos) { $this->semValue = []; }, - 202 => null, - 203 => function ($stackPos) { + 203 => null, + 204 => function ($stackPos) { $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 204 => function ($stackPos) { + 205 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, - 205 => function ($stackPos) { + 206 => function ($stackPos) { $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, - 206 => function ($stackPos) { + 207 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); $this->checkClass($this->semValue, $stackPos-(7-2)); }, - 207 => function ($stackPos) { + 208 => function ($stackPos) { $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); $this->checkClass($this->semValue, $stackPos-(8-3)); }, - 208 => function ($stackPos) { + 209 => function ($stackPos) { $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); $this->checkInterface($this->semValue, $stackPos-(7-3)); }, - 209 => function ($stackPos) { + 210 => function ($stackPos) { $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, - 210 => function ($stackPos) { + 211 => function ($stackPos) { $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); $this->checkEnum($this->semValue, $stackPos-(8-3)); }, - 211 => function ($stackPos) { + 212 => function ($stackPos) { $this->semValue = null; }, - 212 => function ($stackPos) { + 213 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 213 => function ($stackPos) { + 214 => function ($stackPos) { $this->semValue = null; }, - 214 => function ($stackPos) { + 215 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 215 => function ($stackPos) { + 216 => function ($stackPos) { $this->semValue = 0; }, - 216 => null, 217 => null, - 218 => function ($stackPos) { + 218 => null, + 219 => function ($stackPos) { $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 219 => function ($stackPos) { + 220 => function ($stackPos) { $this->semValue = Modifiers::ABSTRACT; }, - 220 => function ($stackPos) { + 221 => function ($stackPos) { $this->semValue = Modifiers::FINAL; }, - 221 => function ($stackPos) { + 222 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 222 => function ($stackPos) { + 223 => function ($stackPos) { $this->semValue = null; }, - 223 => function ($stackPos) { + 224 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 224 => function ($stackPos) { + 225 => function ($stackPos) { $this->semValue = array(); }, - 225 => function ($stackPos) { + 226 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 226 => function ($stackPos) { + 227 => function ($stackPos) { $this->semValue = array(); }, - 227 => function ($stackPos) { + 228 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 228 => null, - 229 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, + 229 => null, 230 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 231 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 232 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, + 232 => null, 233 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 234 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, + 234 => null, 235 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 236 => function ($stackPos) { - $this->semValue = null; + if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; }, 237 => function ($stackPos) { + $this->semValue = null; + }, + 238 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 238 => null, - 239 => function ($stackPos) { + 239 => null, + 240 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 240 => function ($stackPos) { + 241 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 241 => function ($stackPos) { + 242 => function ($stackPos) { $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 242 => function ($stackPos) { + 243 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 243 => function ($stackPos) { + 244 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 244 => function ($stackPos) { + 245 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 245 => function ($stackPos) { + 246 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(5-3)]; }, - 246 => function ($stackPos) { + 247 => function ($stackPos) { $this->semValue = array(); }, - 247 => function ($stackPos) { + 248 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 248 => function ($stackPos) { + 249 => function ($stackPos) { $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 249 => function ($stackPos) { + 250 => function ($stackPos) { $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 250 => null, 251 => null, - 252 => function ($stackPos) { + 252 => null, + 253 => function ($stackPos) { $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, - 253 => function ($stackPos) { + 254 => function ($stackPos) { $this->semValue = []; }, - 254 => null, - 255 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, + 255 => null, 256 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 257 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 258 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 259 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 260 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 261 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 262 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 263 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 264 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 265 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 266 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 267 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); }, 268 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = null; }, 269 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 270 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); + $this->semValue = null; }, 271 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); }, 272 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 273 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); }, 274 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + }, + 275 => function ($stackPos) { $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, - 275 => null, - 276 => function ($stackPos) { + 276 => null, + 277 => function ($stackPos) { $this->semValue = array(); }, - 277 => function ($stackPos) { + 278 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 278 => function ($stackPos) { + 279 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 279 => function ($stackPos) { + 280 => function ($stackPos) { $this->semValue = 0; }, - 280 => function ($stackPos) { + 281 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 281 => function ($stackPos) { + 282 => function ($stackPos) { $this->semValue = Modifiers::PUBLIC; }, - 282 => function ($stackPos) { + 283 => function ($stackPos) { $this->semValue = Modifiers::PROTECTED; }, - 283 => function ($stackPos) { + 284 => function ($stackPos) { $this->semValue = Modifiers::PRIVATE; }, - 284 => function ($stackPos) { + 285 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 285 => function ($stackPos) { + 286 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, - 286 => function ($stackPos) { + 287 => function ($stackPos) { $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); $this->checkParam($this->semValue); }, - 287 => function ($stackPos) { + 288 => function ($stackPos) { $this->semValue = new Node\Param(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, - 288 => null, - 289 => function ($stackPos) { + 289 => null, + 290 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 290 => function ($stackPos) { + 291 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 291 => null, 292 => null, - 293 => function ($stackPos) { + 293 => null, + 294 => function ($stackPos) { $this->semValue = new Node\Name('static', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 294 => function ($stackPos) { + 295 => function ($stackPos) { $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, - 295 => function ($stackPos) { + 296 => function ($stackPos) { $this->semValue = new Node\Identifier('array', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 296 => function ($stackPos) { + 297 => function ($stackPos) { $this->semValue = new Node\Identifier('callable', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 297 => null, - 298 => function ($stackPos) { + 298 => null, + 299 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 299 => function ($stackPos) { + 300 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 300 => function ($stackPos) { + 301 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 301 => null, - 302 => function ($stackPos) { + 302 => null, + 303 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 303 => function ($stackPos) { + 304 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 304 => function ($stackPos) { + 305 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 305 => function ($stackPos) { + 306 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 306 => function ($stackPos) { + 307 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 307 => function ($stackPos) { + 308 => function ($stackPos) { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 308 => function ($stackPos) { + 309 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 309 => function ($stackPos) { + 310 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 310 => function ($stackPos) { + 311 => function ($stackPos) { $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 311 => null, - 312 => function ($stackPos) { + 312 => null, + 313 => function ($stackPos) { $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 313 => function ($stackPos) { + 314 => function ($stackPos) { $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 314 => null, - 315 => function ($stackPos) { + 315 => null, + 316 => function ($stackPos) { $this->semValue = null; }, - 316 => null, - 317 => function ($stackPos) { + 317 => null, + 318 => function ($stackPos) { $this->semValue = null; }, - 318 => function ($stackPos) { + 319 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 319 => function ($stackPos) { + 320 => function ($stackPos) { $this->semValue = null; }, - 320 => function ($stackPos) { + 321 => function ($stackPos) { $this->semValue = array(); }, - 321 => function ($stackPos) { + 322 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 322 => function ($stackPos) { + 323 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, - 323 => function ($stackPos) { + 324 => function ($stackPos) { $this->semValue = new Node\VariadicPlaceholder($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 324 => function ($stackPos) { + 325 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 325 => function ($stackPos) { + 326 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 326 => function ($stackPos) { + 327 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 327 => function ($stackPos) { + 328 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 328 => function ($stackPos) { + 329 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 329 => function ($stackPos) { + 330 => function ($stackPos) { $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(3-1)]); }, - 330 => null, - 331 => function ($stackPos) { + 331 => null, + 332 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 332 => function ($stackPos) { + 333 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 333 => null, 334 => null, - 335 => function ($stackPos) { + 335 => null, + 336 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 336 => function ($stackPos) { + 337 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 337 => function ($stackPos) { + 338 => function ($stackPos) { $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 338 => function ($stackPos) { + 339 => function ($stackPos) { $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 339 => function ($stackPos) { + 340 => function ($stackPos) { if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, - 340 => function ($stackPos) { + 341 => function ($stackPos) { $this->semValue = array(); }, - 341 => function ($stackPos) { + 342 => function ($stackPos) { $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 342 => function ($stackPos) { + 343 => function ($stackPos) { $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, - 343 => function ($stackPos) { + 344 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, - 344 => function ($stackPos) { + 345 => function ($stackPos) { $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); $this->checkClassConst($this->semValue, $stackPos-(6-2)); }, - 345 => function ($stackPos) { + 346 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, - 346 => function ($stackPos) { + 347 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 347 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - }, 348 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 349 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; /* will be skipped */ }, 350 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = array(); }, 351 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 352 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 353 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 354 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 355 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 356 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 357 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 358 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 359 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 359 => null, - 360 => function ($stackPos) { + 360 => null, + 361 => function ($stackPos) { $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, - 361 => function ($stackPos) { + 362 => function ($stackPos) { $this->semValue = null; }, - 362 => null, 363 => null, - 364 => function ($stackPos) { + 364 => null, + 365 => function ($stackPos) { $this->semValue = 0; }, - 365 => function ($stackPos) { + 366 => function ($stackPos) { $this->semValue = 0; }, - 366 => null, 367 => null, - 368 => function ($stackPos) { + 368 => null, + 369 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, - 369 => function ($stackPos) { + 370 => function ($stackPos) { $this->semValue = Modifiers::PUBLIC; }, - 370 => function ($stackPos) { + 371 => function ($stackPos) { $this->semValue = Modifiers::PROTECTED; }, - 371 => function ($stackPos) { + 372 => function ($stackPos) { $this->semValue = Modifiers::PRIVATE; }, - 372 => function ($stackPos) { + 373 => function ($stackPos) { $this->semValue = Modifiers::STATIC; }, - 373 => function ($stackPos) { + 374 => function ($stackPos) { $this->semValue = Modifiers::ABSTRACT; }, - 374 => function ($stackPos) { + 375 => function ($stackPos) { $this->semValue = Modifiers::FINAL; }, - 375 => function ($stackPos) { + 376 => function ($stackPos) { $this->semValue = Modifiers::READONLY; }, - 376 => null, - 377 => function ($stackPos) { + 377 => null, + 378 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 378 => function ($stackPos) { + 379 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 379 => function ($stackPos) { + 380 => function ($stackPos) { $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 380 => function ($stackPos) { + 381 => function ($stackPos) { $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 381 => function ($stackPos) { + 382 => function ($stackPos) { $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 382 => null, 383 => null, - 384 => function ($stackPos) { + 384 => null, + 385 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 385 => function ($stackPos) { + 386 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 386 => function ($stackPos) { + 387 => function ($stackPos) { $this->semValue = array(); }, - 387 => null, 388 => null, - 389 => function ($stackPos) { + 389 => null, + 390 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 390 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 391 => function ($stackPos) { + 392 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 392 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 393 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); if (!$this->phpVersion->allowsAssignNewByReference()) { $this->emitError(new Error('Cannot assign new by reference', $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]))); } }, - 394 => null, 395 => null, - 396 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - }, + 396 => null, 397 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 400 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 401 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 402 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 403 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 404 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 405 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 406 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 407 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 408 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 409 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 410 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 411 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 412 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 413 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 421 => function ($stackPos) { $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 422 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 423 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 424 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 432 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 433 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 434 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 435 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 436 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 437 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 438 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 439 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 440 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 441 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 442 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 443 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 444 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 445 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 446 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 447 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 448 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 449 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 450 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 451 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 452 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 453 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 454 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 455 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 456 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 457 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 458 => function ($stackPos) { + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 459 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 459 => function ($stackPos) { + 460 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 460 => function ($stackPos) { + 461 => function ($stackPos) { $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 461 => function ($stackPos) { + 462 => function ($stackPos) { $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 462 => function ($stackPos) { + 463 => function ($stackPos) { $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 463 => function ($stackPos) { + 464 => function ($stackPos) { $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 464 => function ($stackPos) { + 465 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 465 => function ($stackPos) { + 466 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 466 => null, - 467 => function ($stackPos) { + 467 => null, + 468 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 468 => function ($stackPos) { + 469 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 469 => function ($stackPos) { + 470 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 470 => function ($stackPos) { + 471 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 471 => function ($stackPos) { + 472 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 472 => function ($stackPos) { + 473 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 473 => function ($stackPos) { + 474 => function ($stackPos) { $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 474 => function ($stackPos) { + 475 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, - 475 => function ($stackPos) { + 476 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, - 476 => function ($stackPos) { + 477 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, - 477 => function ($stackPos) { + 478 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, - 478 => function ($stackPos) { + 479 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, - 479 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, - 480 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, - 481 => function ($stackPos) { + 482 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, - 482 => function ($stackPos) { + 483 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])), $this->semStack[$stackPos-(8-3)]); $this->checkClass($this->semValue[0], -1); }, - 483 => function ($stackPos) { + 484 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 484 => function ($stackPos) { + 485 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 485 => function ($stackPos) { + 486 => function ($stackPos) { $this->semValue = array(); }, - 486 => function ($stackPos) { + 487 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 487 => null, - 488 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, + 488 => null, 489 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 490 => function ($stackPos) { - $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 491 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 492 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 493 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); @@ -2435,311 +2413,314 @@ protected function initReduceCallbacks(): void { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 495 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 496 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 497 => null, - 498 => function ($stackPos) { + 497 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, + 498 => null, 499 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 500 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 501 => function ($stackPos) { + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 502 => function ($stackPos) { $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 502 => null, 503 => null, - 504 => function ($stackPos) { + 504 => null, + 505 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 505 => function ($stackPos) { + 506 => function ($stackPos) { $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, - 506 => null, 507 => null, - 508 => function ($stackPos) { + 508 => null, + 509 => function ($stackPos) { $this->semValue = null; }, - 509 => function ($stackPos) { + 510 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 510 => function ($stackPos) { + 511 => function ($stackPos) { $this->semValue = array(); }, - 511 => function ($stackPos) { + 512 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); foreach ($this->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; }, - 512 => function ($stackPos) { + 513 => function ($stackPos) { foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 513 => function ($stackPos) { + 514 => function ($stackPos) { $this->semValue = array(); }, - 514 => null, - 515 => function ($stackPos) { + 515 => null, + 516 => function ($stackPos) { $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 516 => function ($stackPos) { + 517 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 517 => function ($stackPos) { + 518 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 518 => function ($stackPos) { + 519 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 519 => function ($stackPos) { + 520 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 520 => function ($stackPos) { + 521 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 521 => function ($stackPos) { + 522 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 522 => function ($stackPos) { + 523 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 523 => function ($stackPos) { + 524 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Namespace_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 524 => function ($stackPos) { + 525 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 525 => function ($stackPos) { + 526 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, - 526 => function ($stackPos) { + 527 => function ($stackPos) { $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)])), $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, - 527 => function ($stackPos) { + 528 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 528 => function ($stackPos) { + 529 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); $this->createdArrays->attach($this->semValue); }, - 529 => function ($stackPos) { + 530 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); }, - 530 => function ($stackPos) { + 531 => function ($stackPos) { $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->supportsUnicodeEscapes()); }, - 531 => function ($stackPos) { + 532 => function ($stackPos) { $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); }, - 532 => function ($stackPos) { + 533 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->allowsInvalidOctals()); }, - 533 => function ($stackPos) { + 534 => function ($stackPos) { $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 534 => null, 535 => null, 536 => null, - 537 => function ($stackPos) { + 537 => null, + 538 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); }, - 538 => function ($stackPos) { + 539 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-2)], $this->tokenEndStack[$stackPos-(2-2)]), true); }, - 539 => function ($stackPos) { + 540 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); }, - 540 => function ($stackPos) { + 541 => function ($stackPos) { $this->semValue = null; }, - 541 => null, 542 => null, - 543 => function ($stackPos) { + 543 => null, + 544 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 544 => null, 545 => null, 546 => null, 547 => null, 548 => null, - 549 => function ($stackPos) { + 549 => null, + 550 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 550 => null, 551 => null, - 552 => function ($stackPos) { + 552 => null, + 553 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 553 => function ($stackPos) { + 554 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 554 => null, - 555 => function ($stackPos) { + 555 => null, + 556 => function ($stackPos) { $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 556 => function ($stackPos) { + 557 => function ($stackPos) { $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 557 => function ($stackPos) { + 558 => function ($stackPos) { $this->semValue = null; }, - 558 => null, 559 => null, 560 => null, - 561 => function ($stackPos) { + 561 => null, + 562 => function ($stackPos) { $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 562 => function ($stackPos) { + 563 => function ($stackPos) { $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 563 => null, - 564 => function ($stackPos) { + 564 => null, + 565 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 565 => function ($stackPos) { + 566 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 566 => function ($stackPos) { + 567 => function ($stackPos) { $this->semValue = new Expr\Variable(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, - 567 => function ($stackPos) { + 568 => function ($stackPos) { $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])) : $var; }, - 568 => function ($stackPos) { + 569 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 569 => null, - 570 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - }, + 570 => null, 571 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 572 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 573 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 574 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 575 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 576 => null, - 577 => function ($stackPos) { + 576 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 577 => null, + 578 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 578 => null, 579 => null, - 580 => function ($stackPos) { + 580 => null, + 581 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 581 => null, - 582 => function ($stackPos) { + 582 => null, + 583 => function ($stackPos) { $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; }, - 583 => function ($stackPos) { + 584 => function ($stackPos) { $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $this->postprocessList($this->semValue); }, - 584 => function ($stackPos) { + 585 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); }, - 585 => null, - 586 => function ($stackPos) { + 586 => null, + 587 => function ($stackPos) { /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, - 587 => function ($stackPos) { + 588 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 588 => function ($stackPos) { + 589 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 589 => function ($stackPos) { + 590 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 590 => function ($stackPos) { + 591 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 591 => function ($stackPos) { + 592 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 592 => function ($stackPos) { + 593 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 593 => function ($stackPos) { + 594 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 594 => function ($stackPos) { + 595 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, - 595 => function ($stackPos) { + 596 => function ($stackPos) { $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), true); }, - 596 => function ($stackPos) { + 597 => function ($stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $this->createEmptyElemAttributes($this->tokenPos); $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 597 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, 598 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 599 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 600 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 601 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); $attrs['rawValue'] = $this->semStack[$stackPos-(1-1)]; $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $attrs); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 602 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); $attrs['rawValue'] = $this->semStack[$stackPos-(1-1)]; $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $attrs); }, - 603 => null, - 604 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 603 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, + 604 => null, 605 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 606 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 607 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 608 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 609 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 610 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 611 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 612 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 613 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 614 => function ($stackPos) { $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 614 => null, + 615 => null, ]; } } diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 0fef3ae1a6..69cb4c2a91 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -1012,6 +1012,10 @@ protected function pStmt_Nop(Stmt\Nop $node): string { return ''; } + protected function pStmt_Block(Stmt\Block $node): string { + return '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + // Helpers protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken): string { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index e45c40a3e2..8303c427aa 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -826,9 +826,8 @@ protected function pArray( } if ($skipRemovedNode) { - if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || - $this->origTokens->haveTagInRange($pos, $itemStartPos))) { - // We'd remove the brace of a code block. + if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { + // We'd remove an opening/closing PHP tag. // TODO: Preserve formatting. $this->setIndentLevel($origIndentLevel); return null; @@ -937,9 +936,8 @@ protected function pArray( $pos, $itemStartPos, $indentAdjustment); $skipRemovedNode = true; } else { - if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || - $this->origTokens->haveTagInRange($pos, $itemStartPos))) { - // We'd remove the brace of a code block. + if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { + // We'd remove an opening/closing PHP tag. // TODO: Preserve formatting. return null; } @@ -1540,6 +1538,7 @@ protected function initializeListInsertionMap(): void { Stmt\Function_::class . '->stmts' => "\n", Stmt\If_::class . '->stmts' => "\n", Stmt\Namespace_::class . '->stmts' => "\n", + Stmt\Block::class . '->stmts' => "\n", // Attribute groups Stmt\Class_::class . '->attrGroups' => "\n", diff --git a/test/code/formatPreservation/basic.test b/test/code/formatPreservation/basic.test index 98c8010926..e7c200c831 100644 --- a/test/code/formatPreservation/basic.test +++ b/test/code/formatPreservation/basic.test @@ -153,8 +153,9 @@ $stmts[1] = $tmp; * fallback. */ ----- expr->var->items, 1, 0, [null]); ----- stmts[] = new Stmt\Expression(new Expr\Variable('c')); +----- + Date: Mon, 25 Sep 2023 18:37:07 +0200 Subject: [PATCH 309/428] Remove Stmt\Throw This was a backwards-compatibility shim for Expr\Throw. --- grammar/php.y | 11 +------- lib/PhpParser/Node/Stmt/Throw_.php | 29 -------------------- lib/PhpParser/Parser/Php7.php | 11 +------- lib/PhpParser/Parser/Php8.php | 11 +------- lib/PhpParser/PrettyPrinter/Standard.php | 4 --- test/code/parser/errorHandling/recovery.test | 8 ++++-- test/code/parser/stmt/controlFlow.test | 8 ++++-- 7 files changed, 13 insertions(+), 69 deletions(-) delete mode 100644 lib/PhpParser/Node/Stmt/Throw_.php diff --git a/grammar/php.y b/grammar/php.y index 719eb941c2..05ebd13e7b 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -386,16 +386,7 @@ non_empty_statement: $$ = Stmt\InlineHTML[$1]; $$->setAttribute('hasLeadingNewline', $this->inlineHtmlHasLeadingNewline(#1)); } - | expr semi { - $e = $1; - if ($e instanceof Expr\Throw_) { - // For backwards-compatibility reasons, convert throw in statement position into - // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_). - $$ = Stmt\Throw_[$e->expr]; - } else { - $$ = Stmt\Expression[$e]; - } - } + | expr semi { $$ = Stmt\Expression[$1]; } | T_UNSET '(' variables_list ')' semi { $$ = Stmt\Unset_[$3]; } | T_FOREACH '(' expr T_AS foreach_variable ')' foreach_statement { $$ = Stmt\Foreach_[$3, $5[0], ['keyVar' => null, 'byRef' => $5[1], 'stmts' => $7]]; } diff --git a/lib/PhpParser/Node/Stmt/Throw_.php b/lib/PhpParser/Node/Stmt/Throw_.php deleted file mode 100644 index 52a7ae403b..0000000000 --- a/lib/PhpParser/Node/Stmt/Throw_.php +++ /dev/null @@ -1,29 +0,0 @@ - $attributes Additional attributes - */ - public function __construct(Node\Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames(): array { - return ['expr']; - } - - public function getType(): string { - return 'Stmt_Throw'; - } -} diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index b20b7412c6..e172902772 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1473,16 +1473,7 @@ protected function initReduceCallbacks(): void { }, 172 => function ($stackPos) { - - $e = $this->semStack[$stackPos-(2-1)]; - if ($e instanceof Expr\Throw_) { - // For backwards-compatibility reasons, convert throw in statement position into - // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_). - $this->semValue = new Stmt\Throw_($e->expr, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - } else { - $this->semValue = new Stmt\Expression($e, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - } - + $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 173 => function ($stackPos) { $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index fcc3f0f1f2..718af9cde9 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1491,16 +1491,7 @@ protected function initReduceCallbacks(): void { }, 172 => function ($stackPos) { - - $e = $this->semStack[$stackPos-(2-1)]; - if ($e instanceof Expr\Throw_) { - // For backwards-compatibility reasons, convert throw in statement position into - // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_). - $this->semValue = new Stmt\Throw_($e->expr, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - } else { - $this->semValue = new Stmt\Expression($e, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); - } - + $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 173 => function ($stackPos) { $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 69cb4c2a91..6a0349c75c 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -960,10 +960,6 @@ protected function pStmt_Return(Stmt\Return_ $node): string { return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';'; } - protected function pStmt_Throw(Stmt\Throw_ $node): string { - return 'throw ' . $this->p($node->expr) . ';'; - } - protected function pStmt_Label(Stmt\Label $node): string { return $node->name . ':'; } diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index 7fab35badf..1293ba551e 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -525,9 +525,11 @@ array( ) ) ) - 12: Stmt_Throw( - expr: Expr_Variable( - name: x + 12: Stmt_Expression( + expr: Expr_Throw( + expr: Expr_Variable( + name: x + ) ) ) 13: Stmt_Goto( diff --git a/test/code/parser/stmt/controlFlow.test b/test/code/parser/stmt/controlFlow.test index be786f9ada..bad95a547f 100644 --- a/test/code/parser/stmt/controlFlow.test +++ b/test/code/parser/stmt/controlFlow.test @@ -41,9 +41,11 @@ array( name: a ) ) - 6: Stmt_Throw( - expr: Expr_Variable( - name: e + 6: Stmt_Expression( + expr: Expr_Throw( + expr: Expr_Variable( + name: e + ) ) ) 7: Stmt_Label( From de84f76766866ad503cb2f4861e591aadf47b113 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 26 Sep 2023 20:25:37 +0200 Subject: [PATCH 310/428] Avoid by-reference iteration in NodeTraverser No need to create reference wrappers around every element in the array. --- lib/PhpParser/NodeTraverser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 355dda3a0f..854e24456e 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -175,7 +175,7 @@ protected function traverseNode(Node $node): void { protected function traverseArray(array $nodes): array { $doNodes = []; - foreach ($nodes as $i => &$node) { + foreach ($nodes as $i => $node) { if ($node instanceof Node) { $traverseChildren = true; $visitorIndex = -1; @@ -185,7 +185,7 @@ protected function traverseArray(array $nodes): array { if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($node, $return); - $node = $return; + $nodes[$i] = $node = $return; } elseif (\is_array($return)) { $doNodes[] = [$i, $return]; continue 2; @@ -225,7 +225,7 @@ protected function traverseArray(array $nodes): array { if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($node, $return); - $node = $return; + $nodes[$i] = $node = $return; } elseif (\is_array($return)) { $doNodes[] = [$i, $return]; break; From 4e27a17cd855b36abe0199efb81be143b144f40d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 6 Jun 2022 16:32:48 +0200 Subject: [PATCH 311/428] Use visitor to assign comments This fixes the long-standing issue where a comment would get assigned to all nodes with the same starting position, instead of only the outer-most one. Fixes #253. --- .../NodeVisitor/CommentAnnotatingVisitor.php | 82 +++++++++++++++++ lib/PhpParser/ParserAbstract.php | 40 ++++----- test/code/parser/blockComments.test | 3 - test/code/parser/comments.test | 6 -- test/code/parser/expr/arrayDef.test | 3 - test/code/parser/expr/assign.test | 33 ------- test/code/parser/expr/exprInIsset.test | 6 -- test/code/parser/expr/exprInList.test | 12 --- .../parser/expr/fetchAndCall/funcCall.test | 15 ---- .../expr/fetchAndCall/objectAccess.test | 21 ----- .../parser/expr/fetchAndCall/staticCall.test | 21 ----- .../fetchAndCall/staticPropertyFetch.test | 15 ---- .../code/parser/expr/firstClassCallables.test | 3 - test/code/parser/expr/logic.test | 21 ----- test/code/parser/expr/match.test | 3 - test/code/parser/expr/math.test | 30 ------- test/code/parser/expr/new.test | 6 -- test/code/parser/expr/ternaryAndCoalesce.test | 21 ----- test/code/parser/scalar/docString.test | 9 -- test/code/parser/scalar/float.test | 4 - test/code/parser/scalar/numberSeparators.test | 9 -- .../parser/stmt/function/typeVersions.test | 90 ------------------- test/code/parser/stmt/generator/basic.test | 15 ---- 23 files changed, 97 insertions(+), 371 deletions(-) create mode 100644 lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php diff --git a/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php b/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php new file mode 100644 index 0000000000..5e2aed313f --- /dev/null +++ b/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php @@ -0,0 +1,82 @@ + Token positions of comments */ + private array $commentPositions = []; + + /** + * Create a comment annotation visitor. + * + * @param Token[] $tokens Token array + */ + public function __construct(array $tokens) { + $this->tokens = $tokens; + + // Collect positions of comments. We use this to avoid traversing parts of the AST where + // there are no comments. + foreach ($tokens as $i => $token) { + if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { + $this->commentPositions[] = $i; + } + } + } + + public function enterNode(Node $node) { + $nextCommentPos = current($this->commentPositions); + if ($nextCommentPos === false) { + // No more comments. + return self::STOP_TRAVERSAL; + } + + $oldPos = $this->pos; + $this->pos = $pos = $node->getStartTokenPos(); + if ($nextCommentPos > $oldPos && $nextCommentPos < $pos) { + $comments = []; + while (--$pos >= $oldPos) { + $token = $this->tokens[$pos]; + if ($token->id === \T_DOC_COMMENT) { + $comments[] = new Comment\Doc( + $token->text, $token->line, $token->pos, $pos, + $token->getEndLine(), $token->getEndPos() - 1, $pos); + continue; + } + if ($token->id === \T_COMMENT) { + $comments[] = new Comment( + $token->text, $token->line, $token->pos, $pos, + $token->getEndLine(), $token->getEndPos() - 1, $pos); + continue; + } + if ($token->id !== \T_WHITESPACE) { + break; + } + } + if (!empty($comments)) { + $node->setAttribute('comments', array_reverse($comments)); + } + + do { + $nextCommentPos = next($this->commentPositions); + } while ($nextCommentPos !== false && $nextCommentPos < $this->pos); + } + + $endPos = $node->getEndTokenPos(); + if ($nextCommentPos > $endPos) { + // Skip children if there are no comments located inside this node. + $this->pos = $endPos; + return self::DONT_TRAVERSE_CHILDREN; + } + + return null; + } +} diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 3402e3e763..48092c595c 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -30,6 +30,7 @@ use PhpParser\Node\Stmt\Property; use PhpParser\Node\Stmt\TryCatch; use PhpParser\Node\UseItem; +use PhpParser\NodeVisitor\CommentAnnotatingVisitor; abstract class ParserAbstract implements Parser { private const SYMBOL_NONE = -1; @@ -201,6 +202,11 @@ public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array $this->semValue = null; $this->createdArrays = null; + if ($result !== null) { + $traverser = new NodeTraverser(new CommentAnnotatingVisitor($this->tokens)); + $traverser->traverse($result); + } + return $result; } @@ -473,7 +479,7 @@ protected function getExpectedTokens(int $state): array { protected function getAttributes(int $tokenStartPos, int $tokenEndPos): array { $startToken = $this->tokens[$tokenStartPos]; $afterEndToken = $this->tokens[$tokenEndPos + 1]; - $attributes = [ + return [ 'startLine' => $startToken->line, 'startTokenPos' => $tokenStartPos, 'startFilePos' => $startToken->pos, @@ -481,11 +487,6 @@ protected function getAttributes(int $tokenStartPos, int $tokenEndPos): array { 'endTokenPos' => $tokenEndPos, 'endFilePos' => $afterEndToken->pos - 1, ]; - $comments = $this->getCommentsBeforeToken($tokenStartPos); - if (!empty($comments)) { - $attributes['comments'] = $comments; - } - return $attributes; } /** @@ -500,7 +501,7 @@ protected function getAttributesForToken(int $tokenPos): array { // Get attributes for the sentinel token. $token = $this->tokens[$tokenPos]; - $attributes = [ + return [ 'startLine' => $token->line, 'startTokenPos' => $tokenPos, 'startFilePos' => $token->pos, @@ -508,11 +509,6 @@ protected function getAttributesForToken(int $tokenPos): array { 'endTokenPos' => $tokenPos, 'endFilePos' => $token->pos, ]; - $comments = $this->getCommentsBeforeToken($tokenPos); - if (!empty($comments)) { - $attributes['comments'] = $comments; - } - return $attributes; } /* @@ -902,12 +898,9 @@ protected function createCommentFromToken(Token $token, int $tokenPos): Comment } /** - * Get comments before the given token position. - * - * @return Comment[] Comments + * Get last comment before the given token position, if any */ - protected function getCommentsBeforeToken(int $tokenPos): array { - $comments = []; + protected function getCommentBeforeToken(int $tokenPos): ?Comment { while (--$tokenPos >= 0) { $token = $this->tokens[$tokenPos]; if (!isset($this->dropTokens[$token->id])) { @@ -915,22 +908,21 @@ protected function getCommentsBeforeToken(int $tokenPos): array { } if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { - $comments[] = $this->createCommentFromToken($token, $tokenPos); + return $this->createCommentFromToken($token, $tokenPos); } } - return \array_reverse($comments); + return null; } /** * Create a zero-length nop to capture preceding comments, if any. */ protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop { - $comments = $this->getCommentsBeforeToken($tokenPos); - if (empty($comments)) { + $comment = $this->getCommentBeforeToken($tokenPos); + if ($comment === null) { return null; } - $comment = $comments[\count($comments) - 1]; $commentEndLine = $comment->getEndLine(); $commentEndFilePos = $comment->getEndFilePos(); $commentEndTokenPos = $comment->getEndTokenPos(); @@ -941,14 +933,12 @@ protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop { 'endFilePos' => $commentEndFilePos, 'startTokenPos' => $commentEndTokenPos + 1, 'endTokenPos' => $commentEndTokenPos, - 'comments' => $comments, ]; return new Nop($attributes); } protected function maybeCreateNop(int $tokenStartPos, int $tokenEndPos): ?Nop { - $comments = $this->getCommentsBeforeToken($tokenStartPos); - if (empty($comments)) { + if ($this->getCommentBeforeToken($tokenStartPos) === null) { return null; } return new Nop($this->getAttributes($tokenStartPos, $tokenEndPos)); diff --git a/test/code/parser/blockComments.test b/test/code/parser/blockComments.test index 67616e8337..4d259a4361 100644 --- a/test/code/parser/blockComments.test +++ b/test/code/parser/blockComments.test @@ -22,9 +22,6 @@ array( 0: Stmt_Expression( expr: Expr_Variable( name: a - comments: array( - 0: // baz - ) ) comments: array( 0: // baz diff --git a/test/code/parser/comments.test b/test/code/parser/comments.test index 404cfaa899..6c88c159f0 100644 --- a/test/code/parser/comments.test +++ b/test/code/parser/comments.test @@ -24,12 +24,6 @@ array( 0: Stmt_Expression( expr: Expr_Variable( name: var - comments: array( - 0: /** doc 1 */ - 1: /* foobar 1 */ - 2: // foo 1 - 3: // bar 1 - ) ) comments: array( 0: /** doc 1 */ diff --git a/test/code/parser/expr/arrayDef.test b/test/code/parser/expr/arrayDef.test index 7c06801047..88cbb5895d 100644 --- a/test/code/parser/expr/arrayDef.test +++ b/test/code/parser/expr/arrayDef.test @@ -116,9 +116,6 @@ array( expr: Expr_Array( items: array( ) - comments: array( - 0: // short array syntax - ) ) comments: array( 0: // short array syntax diff --git a/test/code/parser/expr/assign.test b/test/code/parser/expr/assign.test index 971407e10b..4d34843af6 100644 --- a/test/code/parser/expr/assign.test +++ b/test/code/parser/expr/assign.test @@ -41,16 +41,10 @@ array( expr: Expr_Assign( var: Expr_Variable( name: a - comments: array( - 0: // simple assign - ) ) expr: Expr_Variable( name: b ) - comments: array( - 0: // simple assign - ) ) comments: array( 0: // simple assign @@ -60,16 +54,10 @@ array( expr: Expr_AssignOp_BitwiseAnd( var: Expr_Variable( name: a - comments: array( - 0: // combined assign - ) ) expr: Expr_Variable( name: b ) - comments: array( - 0: // combined assign - ) ) comments: array( 0: // combined assign @@ -199,9 +187,6 @@ array( expr: Expr_Assign( var: Expr_Variable( name: a - comments: array( - 0: // chained assign - ) ) expr: Expr_AssignOp_Mul( var: Expr_Variable( @@ -216,9 +201,6 @@ array( ) ) ) - comments: array( - 0: // chained assign - ) ) comments: array( 0: // chained assign @@ -228,16 +210,10 @@ array( expr: Expr_AssignRef( var: Expr_Variable( name: a - comments: array( - 0: // by ref assign - ) ) expr: Expr_Variable( name: b ) - comments: array( - 0: // by ref assign - ) ) comments: array( 0: // by ref assign @@ -256,16 +232,10 @@ array( unpack: false ) ) - comments: array( - 0: // list() assign - ) ) expr: Expr_Variable( name: b ) - comments: array( - 0: // list() assign - ) ) comments: array( 0: // list() assign @@ -349,9 +319,6 @@ array( var: Expr_Variable( name: a ) - comments: array( - 0: // inc/dec - ) ) comments: array( 0: // inc/dec diff --git a/test/code/parser/expr/exprInIsset.test b/test/code/parser/expr/exprInIsset.test index f8b678e87a..d675856d9f 100644 --- a/test/code/parser/expr/exprInIsset.test +++ b/test/code/parser/expr/exprInIsset.test @@ -17,9 +17,6 @@ array( name: b ) ) - comments: array( - 0: // This is legal. - ) ) comments: array( 0: // This is legal. @@ -37,9 +34,6 @@ array( ) ) ) - comments: array( - 0: // This is illegal, but not a syntax error. - ) ) comments: array( 0: // This is illegal, but not a syntax error. diff --git a/test/code/parser/expr/exprInList.test b/test/code/parser/expr/exprInList.test index b471528679..1f26703b39 100644 --- a/test/code/parser/expr/exprInList.test +++ b/test/code/parser/expr/exprInList.test @@ -29,16 +29,10 @@ array( unpack: false ) ) - comments: array( - 0: // This is legal. - ) ) expr: Expr_Variable( name: x ) - comments: array( - 0: // This is legal. - ) ) comments: array( 0: // This is legal. @@ -62,16 +56,10 @@ array( unpack: false ) ) - comments: array( - 0: // This is illegal, but not a syntax error. - ) ) expr: Expr_Variable( name: x ) - comments: array( - 0: // This is illegal, but not a syntax error. - ) ) comments: array( 0: // This is illegal, but not a syntax error. diff --git a/test/code/parser/expr/fetchAndCall/funcCall.test b/test/code/parser/expr/fetchAndCall/funcCall.test index 69d5a1200e..7f218fe37d 100644 --- a/test/code/parser/expr/fetchAndCall/funcCall.test +++ b/test/code/parser/expr/fetchAndCall/funcCall.test @@ -20,15 +20,9 @@ array( expr: Expr_FuncCall( name: Name( name: a - comments: array( - 0: // function name variations - ) ) args: array( ) - comments: array( - 0: // function name variations - ) ) comments: array( 0: // function name variations @@ -130,22 +124,13 @@ array( var: Expr_FuncCall( name: Name( name: a - comments: array( - 0: // array dereferencing - ) ) args: array( ) - comments: array( - 0: // array dereferencing - ) ) dim: Scalar_String( value: b ) - comments: array( - 0: // array dereferencing - ) ) comments: array( 0: // array dereferencing diff --git a/test/code/parser/expr/fetchAndCall/objectAccess.test b/test/code/parser/expr/fetchAndCall/objectAccess.test index 9772f2619a..f6ed4fc4d4 100644 --- a/test/code/parser/expr/fetchAndCall/objectAccess.test +++ b/test/code/parser/expr/fetchAndCall/objectAccess.test @@ -22,16 +22,10 @@ array( expr: Expr_PropertyFetch( var: Expr_Variable( name: a - comments: array( - 0: // property fetch variations - ) ) name: Identifier( name: b ) - comments: array( - 0: // property fetch variations - ) ) comments: array( 0: // property fetch variations @@ -71,18 +65,12 @@ array( expr: Expr_MethodCall( var: Expr_Variable( name: a - comments: array( - 0: // method call variations - ) ) name: Identifier( name: b ) args: array( ) - comments: array( - 0: // method call variations - ) ) comments: array( 0: // method call variations @@ -136,25 +124,16 @@ array( var: Expr_MethodCall( var: Expr_Variable( name: a - comments: array( - 0: // array dereferencing - ) ) name: Identifier( name: b ) args: array( ) - comments: array( - 0: // array dereferencing - ) ) dim: Scalar_String( value: c ) - comments: array( - 0: // array dereferencing - ) ) comments: array( 0: // array dereferencing diff --git a/test/code/parser/expr/fetchAndCall/staticCall.test b/test/code/parser/expr/fetchAndCall/staticCall.test index 602fe5a9b0..b88f19fce1 100644 --- a/test/code/parser/expr/fetchAndCall/staticCall.test +++ b/test/code/parser/expr/fetchAndCall/staticCall.test @@ -23,18 +23,12 @@ array( expr: Expr_StaticCall( class: Name( name: A - comments: array( - 0: // method name variations - ) ) name: Identifier( name: b ) args: array( ) - comments: array( - 0: // method name variations - ) ) comments: array( 0: // method name variations @@ -112,25 +106,16 @@ array( var: Expr_StaticCall( class: Name( name: A - comments: array( - 0: // array dereferencing - ) ) name: Identifier( name: b ) args: array( ) - comments: array( - 0: // array dereferencing - ) ) dim: Scalar_String( value: c ) - comments: array( - 0: // array dereferencing - ) ) comments: array( 0: // array dereferencing @@ -140,18 +125,12 @@ array( expr: Expr_StaticCall( class: Name( name: static - comments: array( - 0: // class name variations - ) ) name: Identifier( name: b ) args: array( ) - comments: array( - 0: // class name variations - ) ) comments: array( 0: // class name variations diff --git a/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test b/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test index 2387840999..1d66eb5ab9 100644 --- a/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test +++ b/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test @@ -18,16 +18,10 @@ array( expr: Expr_StaticPropertyFetch( class: Name( name: A - comments: array( - 0: // property name variations - ) ) name: VarLikeIdentifier( name: b ) - comments: array( - 0: // property name variations - ) ) comments: array( 0: // property name variations @@ -58,23 +52,14 @@ array( var: Expr_StaticPropertyFetch( class: Name( name: A - comments: array( - 0: // array access - ) ) name: VarLikeIdentifier( name: b ) - comments: array( - 0: // array access - ) ) dim: Scalar_String( value: c ) - comments: array( - 0: // array access - ) ) comments: array( 0: // array access diff --git a/test/code/parser/expr/firstClassCallables.test b/test/code/parser/expr/firstClassCallables.test index cf1933f39a..a3f628e371 100644 --- a/test/code/parser/expr/firstClassCallables.test +++ b/test/code/parser/expr/firstClassCallables.test @@ -61,9 +61,6 @@ array( 0: VariadicPlaceholder( ) ) - comments: array( - 0: // These are invalid, but accepted on the parser level. - ) ) comments: array( 0: // These are invalid, but accepted on the parser level. diff --git a/test/code/parser/expr/logic.test b/test/code/parser/expr/logic.test index 6b841f50f8..d1f61eab58 100644 --- a/test/code/parser/expr/logic.test +++ b/test/code/parser/expr/logic.test @@ -25,16 +25,10 @@ array( expr: Expr_BinaryOp_BooleanAnd( left: Expr_Variable( name: a - comments: array( - 0: // boolean ops - ) ) right: Expr_Variable( name: b ) - comments: array( - 0: // boolean ops - ) ) comments: array( 0: // boolean ops @@ -70,16 +64,10 @@ array( expr: Expr_BinaryOp_LogicalAnd( left: Expr_Variable( name: a - comments: array( - 0: // logical ops - ) ) right: Expr_Variable( name: b ) - comments: array( - 0: // logical ops - ) ) comments: array( 0: // logical ops @@ -110,16 +98,10 @@ array( 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( @@ -129,9 +111,6 @@ array( name: d ) ) - comments: array( - 0: // precedence - ) ) comments: array( 0: // precedence diff --git a/test/code/parser/expr/match.test b/test/code/parser/expr/match.test index cb2367e39f..d16a72f8b3 100644 --- a/test/code/parser/expr/match.test +++ b/test/code/parser/expr/match.test @@ -63,9 +63,6 @@ array( conds: array( 0: Scalar_Int( value: 0 - comments: array( - 0: // list of conditions - ) ) 1: Scalar_Int( value: 1 diff --git a/test/code/parser/expr/math.test b/test/code/parser/expr/math.test index 5d22bf8ef7..daf469b3e2 100644 --- a/test/code/parser/expr/math.test +++ b/test/code/parser/expr/math.test @@ -39,9 +39,6 @@ array( expr: Expr_Variable( name: a ) - comments: array( - 0: // unary ops - ) ) comments: array( 0: // unary ops @@ -65,16 +62,10 @@ array( expr: Expr_BinaryOp_BitwiseAnd( left: Expr_Variable( name: a - comments: array( - 0: // binary ops - ) ) right: Expr_Variable( name: b ) - comments: array( - 0: // binary ops - ) ) comments: array( 0: // binary ops @@ -195,23 +186,14 @@ array( 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 - ) ) comments: array( 0: // associativity @@ -236,9 +218,6 @@ array( expr: Expr_BinaryOp_Plus( left: Expr_Variable( name: a - comments: array( - 0: // precedence - ) ) right: Expr_BinaryOp_Mul( left: Expr_Variable( @@ -248,9 +227,6 @@ array( name: c ) ) - comments: array( - 0: // precedence - ) ) comments: array( 0: // precedence @@ -275,9 +251,6 @@ array( expr: Expr_BinaryOp_Pow( left: Expr_Variable( name: a - comments: array( - 0: // pow is special - ) ) right: Expr_BinaryOp_Pow( left: Expr_Variable( @@ -287,9 +260,6 @@ array( name: c ) ) - comments: array( - 0: // pow is special - ) ) comments: array( 0: // pow is special diff --git a/test/code/parser/expr/new.test b/test/code/parser/expr/new.test index dd9ef66ddc..cb29a92947 100644 --- a/test/code/parser/expr/new.test +++ b/test/code/parser/expr/new.test @@ -52,9 +52,6 @@ array( ) args: array( ) - comments: array( - 0: // class name variations - ) ) comments: array( 0: // class name variations @@ -100,9 +97,6 @@ array( ) args: array( ) - comments: array( - 0: // DNCR object access - ) ) comments: array( 0: // DNCR object access diff --git a/test/code/parser/expr/ternaryAndCoalesce.test b/test/code/parser/expr/ternaryAndCoalesce.test index 3d16308736..09be314da4 100644 --- a/test/code/parser/expr/ternaryAndCoalesce.test +++ b/test/code/parser/expr/ternaryAndCoalesce.test @@ -21,9 +21,6 @@ array( expr: Expr_Ternary( cond: Expr_Variable( name: a - comments: array( - 0: // ternary - ) ) if: Expr_Variable( name: b @@ -31,9 +28,6 @@ array( else: Expr_Variable( name: c ) - comments: array( - 0: // ternary - ) ) comments: array( 0: // ternary @@ -55,9 +49,6 @@ array( cond: Expr_Ternary( cond: Expr_Variable( name: a - comments: array( - 0: // precedence - ) ) if: Expr_Variable( name: b @@ -65,9 +56,6 @@ array( else: Expr_Variable( name: c ) - comments: array( - 0: // precedence - ) ) if: Expr_Variable( name: d @@ -75,9 +63,6 @@ array( else: Expr_Variable( name: e ) - comments: array( - 0: // precedence - ) ) comments: array( 0: // precedence @@ -108,16 +93,10 @@ array( expr: Expr_BinaryOp_Coalesce( left: Expr_Variable( name: a - comments: array( - 0: // null coalesce - ) ) right: Expr_Variable( name: b ) - comments: array( - 0: // null coalesce - ) ) comments: array( 0: // null coalesce diff --git a/test/code/parser/scalar/docString.test b/test/code/parser/scalar/docString.test index 2caefdf854..a7e7176187 100644 --- a/test/code/parser/scalar/docString.test +++ b/test/code/parser/scalar/docString.test @@ -37,9 +37,6 @@ array( 0: Stmt_Expression( expr: Scalar_String( value: - comments: array( - 0: // empty strings - ) ) comments: array( 0: // empty strings @@ -53,9 +50,6 @@ array( 2: Stmt_Expression( expr: Scalar_String( value: Test '" $a \n - comments: array( - 0: // constant encapsed strings - ) ) comments: array( 0: // constant encapsed strings @@ -77,9 +71,6 @@ array( name: a ) ) - comments: array( - 0: // encapsed strings - ) ) comments: array( 0: // encapsed strings diff --git a/test/code/parser/scalar/float.test b/test/code/parser/scalar/float.test index be8b914dd6..8899cd58bb 100644 --- a/test/code/parser/scalar/float.test +++ b/test/code/parser/scalar/float.test @@ -76,10 +76,6 @@ array( 10: Stmt_Expression( expr: Scalar_Float( value: 1.844674407371E+19 - comments: array( - 0: // various integer -> float overflows - 1: // (all are actually the same number, just in different representations) - ) ) comments: array( 0: // various integer -> float overflows diff --git a/test/code/parser/scalar/numberSeparators.test b/test/code/parser/scalar/numberSeparators.test index cbc16c3243..e7088b5dc8 100644 --- a/test/code/parser/scalar/numberSeparators.test +++ b/test/code/parser/scalar/numberSeparators.test @@ -59,12 +59,6 @@ array( expr: Expr_ConstFetch( name: Name( name: _100 - comments: array( - 0: // already a valid constant name - ) - ) - comments: array( - 0: // already a valid constant name ) ) comments: array( @@ -74,9 +68,6 @@ array( 6: Stmt_Expression( expr: Scalar_Int( value: 100 - comments: array( - 0: // syntax errors - ) ) comments: array( 0: // syntax errors diff --git a/test/code/parser/stmt/function/typeVersions.test b/test/code/parser/stmt/function/typeVersions.test index 54d21b0ecf..8ce360313f 100644 --- a/test/code/parser/stmt/function/typeVersions.test +++ b/test/code/parser/stmt/function/typeVersions.test @@ -83,9 +83,6 @@ array( flags: 0 type: Name( name: iterable - comments: array( - 0: // PHP 7.0 - ) ) byRef: false variadic: false @@ -103,9 +100,6 @@ array( flags: 0 type: Name( name: object - comments: array( - 0: // PHP 7.1 - ) ) byRef: false variadic: false @@ -123,9 +117,6 @@ array( flags: 0 type: Name( name: mixed - comments: array( - 0: // PHP 7.2 - ) ) byRef: false variadic: false @@ -143,9 +134,6 @@ array( flags: 0 type: Name( name: null - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false @@ -163,9 +151,6 @@ array( flags: 0 type: Name( name: false - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false @@ -292,9 +277,6 @@ array( flags: 0 type: Name( name: iterable - comments: array( - 0: // PHP 7.0 - ) ) byRef: false variadic: false @@ -312,9 +294,6 @@ array( flags: 0 type: Name( name: object - comments: array( - 0: // PHP 7.1 - ) ) byRef: false variadic: false @@ -332,9 +311,6 @@ array( flags: 0 type: Name( name: mixed - comments: array( - 0: // PHP 7.2 - ) ) byRef: false variadic: false @@ -352,9 +328,6 @@ array( flags: 0 type: Name( name: null - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false @@ -372,9 +345,6 @@ array( flags: 0 type: Name( name: false - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false @@ -501,9 +471,6 @@ array( flags: 0 type: Identifier( name: iterable - comments: array( - 0: // PHP 7.0 - ) ) byRef: false variadic: false @@ -521,9 +488,6 @@ array( flags: 0 type: Name( name: object - comments: array( - 0: // PHP 7.1 - ) ) byRef: false variadic: false @@ -541,9 +505,6 @@ array( flags: 0 type: Name( name: mixed - comments: array( - 0: // PHP 7.2 - ) ) byRef: false variadic: false @@ -561,9 +522,6 @@ array( flags: 0 type: Name( name: null - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false @@ -581,9 +539,6 @@ array( flags: 0 type: Name( name: false - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false @@ -710,9 +665,6 @@ array( flags: 0 type: Identifier( name: iterable - comments: array( - 0: // PHP 7.0 - ) ) byRef: false variadic: false @@ -730,9 +682,6 @@ array( flags: 0 type: Identifier( name: object - comments: array( - 0: // PHP 7.1 - ) ) byRef: false variadic: false @@ -750,9 +699,6 @@ array( flags: 0 type: Name( name: mixed - comments: array( - 0: // PHP 7.2 - ) ) byRef: false variadic: false @@ -770,9 +716,6 @@ array( flags: 0 type: Name( name: null - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false @@ -790,9 +733,6 @@ array( flags: 0 type: Name( name: false - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false @@ -919,9 +859,6 @@ array( flags: 0 type: Identifier( name: iterable - comments: array( - 0: // PHP 7.0 - ) ) byRef: false variadic: false @@ -939,9 +876,6 @@ array( flags: 0 type: Identifier( name: object - comments: array( - 0: // PHP 7.1 - ) ) byRef: false variadic: false @@ -959,9 +893,6 @@ array( flags: 0 type: Identifier( name: mixed - comments: array( - 0: // PHP 7.2 - ) ) byRef: false variadic: false @@ -979,9 +910,6 @@ array( flags: 0 type: Identifier( name: null - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false @@ -999,9 +927,6 @@ array( flags: 0 type: Identifier( name: false - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false @@ -1128,9 +1053,6 @@ array( flags: 0 type: Identifier( name: iterable - comments: array( - 0: // PHP 7.0 - ) ) byRef: false variadic: false @@ -1148,9 +1070,6 @@ array( flags: 0 type: Identifier( name: object - comments: array( - 0: // PHP 7.1 - ) ) byRef: false variadic: false @@ -1168,9 +1087,6 @@ array( flags: 0 type: Identifier( name: mixed - comments: array( - 0: // PHP 7.2 - ) ) byRef: false variadic: false @@ -1188,9 +1104,6 @@ array( flags: 0 type: Identifier( name: null - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false @@ -1208,9 +1121,6 @@ array( flags: 0 type: Identifier( name: false - comments: array( - 0: // PHP 8.0 - ) ) byRef: false variadic: false diff --git a/test/code/parser/stmt/generator/basic.test b/test/code/parser/stmt/generator/basic.test index 098e22599f..3c825a169b 100644 --- a/test/code/parser/stmt/generator/basic.test +++ b/test/code/parser/stmt/generator/basic.test @@ -47,9 +47,6 @@ array( expr: Expr_Yield( key: null value: null - comments: array( - 0: // statements - ) ) comments: array( 0: // statements @@ -77,17 +74,11 @@ array( expr: Expr_Assign( var: Expr_Variable( name: data - comments: array( - 0: // expressions - ) ) expr: Expr_Yield( key: null value: null ) - comments: array( - 0: // expressions - ) ) comments: array( 0: // expressions @@ -214,9 +205,6 @@ array( expr: Expr_FuncCall( name: Name( name: func - comments: array( - 0: // yield in function calls - ) ) args: array( 0: Arg( @@ -231,9 +219,6 @@ array( unpack: false ) ) - comments: array( - 0: // yield in function calls - ) ) comments: array( 0: // yield in function calls From 481fec47f47cb95050d7568169798d25654a0e61 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 7 Oct 2023 17:08:14 +0700 Subject: [PATCH 312/428] Improve performance of find() and findFirst() when passed $nodes is empty array --- lib/PhpParser/NodeFinder.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/PhpParser/NodeFinder.php b/lib/PhpParser/NodeFinder.php index e5aa116506..96c8452633 100644 --- a/lib/PhpParser/NodeFinder.php +++ b/lib/PhpParser/NodeFinder.php @@ -15,6 +15,10 @@ class NodeFinder { * @return Node[] Found nodes satisfying the filter callback */ public function find($nodes, callable $filter): array { + if ($nodes === []) { + return []; + } + if (!is_array($nodes)) { $nodes = [$nodes]; } @@ -52,6 +56,10 @@ public function findInstanceOf($nodes, string $class): array { * @return null|Node Found node (or null if none found) */ public function findFirst($nodes, callable $filter): ?Node { + if ($nodes === []) { + return null; + } + if (!is_array($nodes)) { $nodes = [$nodes]; } From 8d50e9d066fd857dc4d6354047bda9111f179b46 Mon Sep 17 00:00:00 2001 From: xjaja <5057757+xjaja@users.noreply.github.com> Date: Wed, 4 Oct 2023 05:00:18 +0800 Subject: [PATCH 313/428] Don't drop class statements before error (#952) When encountering a null statement (indicating that an error occurred), retain the preceding statements. These were accidentally dropped previously. (cherry picked from commit 54103d838734be0499172026525e38cbf6af2711) --- grammar/php.y | 2 +- lib/PhpParser/Parser/Php7.php | 2 +- lib/PhpParser/Parser/Php8.php | 2 +- test/code/parser/errorHandling/recovery.test | 17 ++++++++++++++++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index 05ebd13e7b..580c4f8095 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -816,7 +816,7 @@ static_var: ; class_statement_list_ex: - class_statement_list_ex class_statement { if ($2 !== null) { push($1, $2); } } + class_statement_list_ex class_statement { if ($2 !== null) { push($1, $2); } else { $$ = $1; } } | /* empty */ { init(); } ; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index e172902772..7d8cb10744 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1935,7 +1935,7 @@ protected function initReduceCallbacks(): void { $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 340 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } else { $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, 341 => function ($stackPos) { $this->semValue = array(); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 718af9cde9..76d52a8c77 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1953,7 +1953,7 @@ protected function initReduceCallbacks(): void { $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 340 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } else { $this->semValue = $this->semStack[$stackPos-(2-1)]; } }, 341 => function ($stackPos) { $this->semValue = array(); diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index 1293ba551e..f6a016eb4d 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -838,11 +838,12 @@ array( Date: Wed, 1 Nov 2023 13:43:02 +0100 Subject: [PATCH 314/428] Fix typo --- doc/component/Pretty_printing.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/component/Pretty_printing.markdown b/doc/component/Pretty_printing.markdown index 7fd4a0a4de..dcc55b6a3f 100644 --- a/doc/component/Pretty_printing.markdown +++ b/doc/component/Pretty_printing.markdown @@ -97,5 +97,5 @@ If you make use of the name resolution functionality, you will likely want to di the AST and causing spurious changes to the pretty printed code. For more information, see the [name resolution documentation](Name_resolution.markdown). -The formatting-preservation works on a best-effort basis and may sometimes reformat more code tha +The formatting-preservation works on a best-effort basis and may sometimes reformat more code than necessary. If you encounter problems while using this functionality, please open an issue. From acfccd9d744ef682a4b2d95850b2c5914adb9cd1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 1 Nov 2023 18:50:25 +0100 Subject: [PATCH 315/428] Run with updated php-cs-fixer --- .php-cs-fixer.dist.php | 5 ----- lib/PhpParser/NodeTraverser.php | 2 +- lib/PhpParser/ParserAbstract.php | 6 +++--- test/PhpParser/NodeAbstractTest.php | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 54d58e6f7c..314307ef83 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -21,11 +21,6 @@ 'declare_strict_types' => true, // Keep argument formatting for now. 'method_argument_space' => ['on_multiline' => 'ignore'], - 'binary_operator_spaces' => [ - 'default' => 'at_least_single_space', - // Work around https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/7303. - 'operators' => ['=' => null], - ], 'phpdoc_align' => ['align' => 'left'], 'phpdoc_trim' => true, 'no_empty_phpdoc' => true, diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 854e24456e..f5b868a1f8 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -34,7 +34,7 @@ class NodeTraverser implements NodeTraverserInterface { * * @param NodeVisitor ...$visitors Node visitors */ - public function __construct(NodeVisitor... $visitors) { + public function __construct(NodeVisitor ...$visitors) { $this->visitors = $visitors; } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 48092c595c..f0b1a50b13 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -581,7 +581,7 @@ protected function handleNamespaces(array $stmts): array { } else { // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts $resultStmts = []; - $targetStmts =& $resultStmts; + $targetStmts = &$resultStmts; $lastNs = null; foreach ($stmts as $stmt) { if ($stmt instanceof Node\Stmt\Namespace_) { @@ -590,12 +590,12 @@ protected function handleNamespaces(array $stmts): array { } if ($stmt->stmts === null) { $stmt->stmts = []; - $targetStmts =& $stmt->stmts; + $targetStmts = &$stmt->stmts; $resultStmts[] = $stmt; } else { // This handles the invalid case of mixed style namespaces $resultStmts[] = $stmt; - $targetStmts =& $resultStmts; + $targetStmts = &$resultStmts; } $lastNs = $stmt; } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index aff388176a..420c7dcefa 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -125,7 +125,7 @@ public function testChange(array $attributes, DummyNode $node) { $this->assertSame('newValue', $node->subNode1); // indirect modification - $subNode =& $node->subNode1; + $subNode = &$node->subNode1; $subNode = 'newNewValue'; $this->assertSame('newNewValue', $node->subNode1); From b54302f363fff6418239a1e383f3bbfc2c78e6d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Wed, 1 Nov 2023 21:07:32 +0100 Subject: [PATCH 316/428] build: Exclude grammar from export git artifact (cherry picked from commit 402b6cf3452c21c58aa11d9549cee6205d14e347) --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 1f8fb40416..0e1e1e9716 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,6 @@ /.github export-ignore /doc export-ignore +/grammar export-ignore /test export-ignore /test_old export-ignore /tools export-ignore From 3640d18b87c00d8cec6564f1b3a5f72c3cf7d229 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 12 Nov 2023 16:51:30 +0100 Subject: [PATCH 317/428] Remove ParserFactory::create() Don't try to keep backwards-compatibility with the old factory style, which doesn't map cleanly onto supported options (we only have ONLY_PHP7/PREFER_PHP7, which should probably create a Php8 parser in terms of how they are used, but this would no longer match their names). Instead, I have backported the new createForNewestSupportedVersion() and createForHostVersion() methods to PHP-Parser 4. --- lib/PhpParser/ParserFactory.php | 28 ---------------------------- test/PhpParser/ParserFactoryTest.php | 7 ------- 2 files changed, 35 deletions(-) diff --git a/lib/PhpParser/ParserFactory.php b/lib/PhpParser/ParserFactory.php index b70991808d..3a7586ea29 100644 --- a/lib/PhpParser/ParserFactory.php +++ b/lib/PhpParser/ParserFactory.php @@ -6,34 +6,6 @@ use PhpParser\Parser\Php8; class ParserFactory { - public const PREFER_PHP7 = 1; - public const ONLY_PHP7 = 3; - - /** - * Creates a Parser instance, according to the provided kind. - * - * @param int $kind One of ::PREFER_PHP7 or ::ONLY_PHP7 - * @param Lexer|null $lexer Lexer to use. Defaults to emulative lexer when not specified - * - * @return Parser The parser instance - * - * @deprecated Use createForVersion(), createForNewestSupportedVersion() or createForHostVersion() instead. - */ - public function create(int $kind, ?Lexer $lexer = null): Parser { - if (null === $lexer) { - $lexer = new Lexer\Emulative(); - } - switch ($kind) { - case self::PREFER_PHP7: - case self::ONLY_PHP7: - return new Parser\Php7($lexer); - default: - throw new \LogicException( - 'Kind must be one of ::PREFER_PHP7 or ::ONLY_PHP7' - ); - } - } - /** * Create a parser targeting the given version on a best-effort basis. The parser will generally * accept code for the newest supported version, but will try to accommodate code that becomes diff --git a/test/PhpParser/ParserFactoryTest.php b/test/PhpParser/ParserFactoryTest.php index c3ca3863fe..e0f5697a1d 100644 --- a/test/PhpParser/ParserFactoryTest.php +++ b/test/PhpParser/ParserFactoryTest.php @@ -11,13 +11,6 @@ class ParserFactoryTest extends \PHPUnit\Framework\TestCase { public function testCreate() { $factory = new ParserFactory(); - - $lexer = new Lexer(); - $this->assertInstanceOf(Php7::class, $factory->create(ParserFactory::PREFER_PHP7, $lexer)); - $this->assertInstanceOf(Php7::class, $factory->create(ParserFactory::ONLY_PHP7, $lexer)); - $this->assertInstanceOf(Php7::class, $factory->create(ParserFactory::PREFER_PHP7)); - $this->assertInstanceOf(Php7::class, $factory->create(ParserFactory::ONLY_PHP7)); - $this->assertInstanceOf(Php8::class, $factory->createForNewestSupportedVersion()); $this->assertInstanceOf(Parser::class, $factory->createForHostVersion()); } From d0b35126e75af09197d12cf2cfdfd0921b55af16 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 12 Nov 2023 17:06:58 +0100 Subject: [PATCH 318/428] Update CHANGELOG --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a4968d9ec..c58f6f10df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +Version 5.0.0-rc1 +----------------- + +See UPGRADE-5.0 for detailed migration instructions. + +### Added + +* Added support for printing additional attributes (like `kind`) in `NodeDumper`. +* Added `rawValue` attribute to `InterpolatedStringPart` and heredoc/nowdoc `String_`s, which + provides the original, unparsed value. It was previously only available for non-interpolated + single/double quoted strings. +* Added `Stmt\Block` to represent `{}` code blocks. Previously, such code blocks were flattened + into the parent statements array. `Stmt\Block` will not be created for structures that are + typically used with code blocks, for example `if ($x) { $y; }` will be represented as previously, + while `if ($x) { { $x; } }` will have an extra `Stmt\Block` wrapper. + +### Changed + +* Use visitor to assign comments. This fixes the long-standing issue where comments were assigned + to all nodes sharing a starting position. Now only the outer-most node will hold the comments. +* Don't parse unicode escape sequences when targeting PHP < 7.0. +* Improve NodeDumper performance for large dumps. + +### Removed + +* Removed `ParserFactory::create()`. + Version 5.0.0-beta1 (2023-09-17) -------------------------------- From f66650073c77b1741be5943638c376f94826398c Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Tue, 28 Nov 2023 14:15:16 +0100 Subject: [PATCH 319/428] Fix NameResolver for class constant native type --- lib/PhpParser/NodeVisitor/NameResolver.php | 3 +++ test/PhpParser/NodeVisitor/NameResolverTest.php | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index 3618fb9f8f..ccd014ebbd 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -115,6 +115,9 @@ public function enterNode(Node $node) { $this->addNamespacedName($const); } } elseif ($node instanceof Stmt\ClassConst) { + if (null !== $node->type) { + $node->type = $this->resolveType($node->type); + } $this->resolveAttrGroups($node); } elseif ($node instanceof Stmt\EnumCase) { $this->resolveAttrGroups($node); diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index d38a90c826..b0065968c7 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -188,7 +188,7 @@ class A extends B implements C, D { E::h as i; E::j insteadof F, G; } - + #[X] public float $php = 7.4; public ?Foo $person; @@ -197,6 +197,10 @@ class A extends B implements C, D { #[X] const C = 1; + + public const X A = X::Bar; + public const X\Foo B = X\Foo::Bar; + public const \X\Foo C = \X\Foo::Bar; } #[X] @@ -262,6 +266,9 @@ class A extends \NS\B implements \NS\C, \NS\D public \NS\A|\NS\B|int $prop; #[\NS\X] const C = 1; + public const \NS\X A = \NS\X::Bar; + public const \NS\X\Foo B = \NS\X\Foo::Bar; + public const \X\Foo C = \X\Foo::Bar; } #[\NS\X] interface A extends \NS\C, \NS\D From 13a41f05a753d1e7be82c995a840648a8ede4c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Mirtes?= Date: Sun, 17 Dec 2023 13:50:45 +0100 Subject: [PATCH 320/428] Fix typos in UPGRADE-5.0.md --- UPGRADE-5.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 494d2cefc9..bce6f80bdc 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -302,7 +302,7 @@ Additionally, the token array is now terminated by a sentinel token with ID 0. The lexer API is reduced to a single `Lexer::tokenize()` method, which returns an array of tokens. The `startLexing()` and `getNextToken()` methods have been removed. -Responsibility for determining start and end attributes for nodes has been moved from the lexer to the parser. The lexer no longer accepts an options array. The `usedAttributes` option has been removed without replacement, and the parser will now unconditionally add the `comments`, `startLine`, `endLine`, `startFilePos`, `startEndPos`, `startTokenPos` and `startEndPos` attributes. +Responsibility for determining start and end attributes for nodes has been moved from the lexer to the parser. The lexer no longer accepts an options array. The `usedAttributes` option has been removed without replacement, and the parser will now unconditionally add the `comments`, `startLine`, `endLine`, `startFilePos`, `endFilePos`, `startTokenPos` and `endTokenPos` attributes. There should no longer be a need to directly interact with the `Lexer` for end users, as the `ParserFactory` will create an appropriate instance, and no additional configuration of the lexer is necessary. To use formatting-preserving pretty printing, the setup boilerplate changes as follows: From f82a6365a58ed226185f2c303ba19c80a1376068 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 10 Dec 2023 21:56:52 +0100 Subject: [PATCH 321/428] Add upgrading nodes for changes since beta1 Fixes #965. Fixes #966. --- CHANGELOG.md | 1 + UPGRADE-5.0.md | 143 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c58f6f10df..b140f83cb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ See UPGRADE-5.0 for detailed migration instructions. ### Removed +* Removed `Stmt\Throw_` node, use `Expr\Throw_` inside `Stmt\Expression` instead. * Removed `ParserFactory::create()`. Version 5.0.0-beta1 (2023-09-17) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index bce6f80bdc..432d59ffe5 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -83,6 +83,149 @@ now represented by `Name(name: 'Foo\Bar')` instead. It is possible to convert the name to the previous representation using `$name->getParts()`. The `Name` constructor continues to accept both the string and the array representation. +### Changes to the block representation + +Previously, code blocks `{ ... }` were always flattened into their parent statement list. For +example `while ($x) { $a; { $b; } $c; }` would produce the same node structure as +`if ($x) { $a; $b; $c; }`, namely a `Stmt\While_` node whose `stmts` subnode is an array of four +statements. + +Now, the nested `{ $b; }` block is represented using an explicit `Stmt\Block` node. However, the +outer `{ $a; { $b; } $c; }` block is still represented using a simple array in the `stmts` subnode. + +```php +# Code +while ($x) { $a; { $b; } $c; } + +# Before +Stmt_While( + cond: Expr_Variable( + name: x + ) + stmts: array( + 0: Stmt_Expression( + expr: Expr_Variable( + name: a + ) + ) + 1: Stmt_Expression( + expr: Expr_Variable( + name: b + ) + ) + 2: Stmt_Expression( + expr: Expr_Variable( + name: c + ) + ) + ) +) + +# After +Stmt_While( + cond: Expr_Variable( + name: x + ) + stmts: array( + 0: Stmt_Expression( + expr: Expr_Variable( + name: a + ) + ) + 1: Stmt_Block( + stmts: array( + 0: Stmt_Expression( + expr: Expr_Variable( + name: b + ) + ) + ) + ) + 2: Stmt_Expression( + expr: Expr_Variable( + name: c + ) + ) + ) +) +``` + +### Changes to the throw representation + +Previously, `throw` statements like `throw $e;` were represented using the `Stmt\Throw_` class, +while uses inside other expressions (such as `$x ?? throw $e`) used the `Expr\Throw_` class. + +Now, `throw $e;` is represented as a `Stmt\Expression` that contains an `Expr\Throw_`. The +`Stmt\Throw_` class has been removed. + +```php +# Code +throw $e; + +# Before +Stmt_Throw( + expr: Expr_Variable( + name: e + ) +) + +# After +Stmt_Expression( + expr: Expr_Throw( + expr: Expr_Variable( + name: e + ) + ) +) +``` + +### Changes to comment assignment + +Previously, comments were assigned to all nodes starting at the same position. Now they will be +assigned to the outer-most node only. + +```php +# Code +// Comment +$a + $b; + +# Before +Stmt_Expression( + expr: Expr_BinaryOp_Plus( + left: Expr_Variable( + name: a + comments: array( + 0: // Comment + ) + ) + right: Expr_Variable( + name: b + ) + comments: array( + 0: // Comment + ) + ) + comments: array( + 0: // Comment + ) +) + +# After +Stmt_Expression( + expr: Expr_BinaryOp_Plus( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + comments: array( + 0: // Comment + ) +) +``` + ### Renamed nodes A number of AST nodes have been renamed or moved in the AST hierarchy: From f7d484aa0ee33e1acf2ba00cf43718a61fa4b0d9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 20 Dec 2023 21:51:46 +0100 Subject: [PATCH 322/428] Fix handling of empty input Fixes #967. --- lib/PhpParser/Lexer.php | 2 +- test/code/parser/emptyFile.test | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/code/parser/emptyFile.test diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index fa0ff696c5..5e2ece9617 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -76,7 +76,7 @@ protected function postprocessTokens(array &$tokens, ErrorHandler $errorHandler) $numTokens = \count($tokens); if ($numTokens === 0) { // Empty input edge case: Just add the sentinel token. - $tokens[] = [new Token(0, "\0", 1, 0)]; + $tokens[] = new Token(0, "\0", 1, 0); return; } diff --git a/test/code/parser/emptyFile.test b/test/code/parser/emptyFile.test new file mode 100644 index 0000000000..2f3acd0352 --- /dev/null +++ b/test/code/parser/emptyFile.test @@ -0,0 +1,6 @@ +Empty file +----- + +----- +array( +) From 255000ad4966539a12c3b045f839eb664d3377c1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 20 Dec 2023 22:32:29 +0100 Subject: [PATCH 323/428] Release PHP-Parser 5.0.0rc1 --- CHANGELOG.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b140f83cb4..8a46b5a7c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,12 @@ -Version 5.0.0-rc1 ------------------ +Version 5.0.0-rc1 (2023-12-20) +------------------------------ See UPGRADE-5.0 for detailed migration instructions. +### Fixed + +* Fixed parsing of empty files. + ### Added * Added support for printing additional attributes (like `kind`) in `NodeDumper`. From 1eeeb2d5252d6d8706c5a8d9d88b8d1e7ecf2109 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Fri, 22 Dec 2023 19:21:41 +0100 Subject: [PATCH 324/428] Fix parent class of PropertyItem and UseItem --- lib/PhpParser/Node/PropertyItem.php | 3 ++- lib/PhpParser/Node/UseItem.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/Node/PropertyItem.php b/lib/PhpParser/Node/PropertyItem.php index 62ad5aa70a..101611e6bc 100644 --- a/lib/PhpParser/Node/PropertyItem.php +++ b/lib/PhpParser/Node/PropertyItem.php @@ -3,8 +3,9 @@ namespace PhpParser\Node; use PhpParser\Node; +use PhpParser\NodeAbstract; -class PropertyItem extends Node\Stmt { +class PropertyItem extends NodeAbstract { /** @var Node\VarLikeIdentifier Name */ public VarLikeIdentifier $name; /** @var null|Node\Expr Default */ diff --git a/lib/PhpParser/Node/UseItem.php b/lib/PhpParser/Node/UseItem.php index 40ecb9ced8..a7d9fc447c 100644 --- a/lib/PhpParser/Node/UseItem.php +++ b/lib/PhpParser/Node/UseItem.php @@ -3,9 +3,10 @@ namespace PhpParser\Node; use PhpParser\Node; +use PhpParser\NodeAbstract; use PhpParser\Node\Stmt\Use_; -class UseItem extends Node\Stmt { +class UseItem extends NodeAbstract { /** * @var Use_::TYPE_* One of the Stmt\Use_::TYPE_* constants. Will only differ from TYPE_UNKNOWN for mixed group uses */ From f603e193364c7653c3665813319f31967327867f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 7 Jan 2024 17:46:24 +0100 Subject: [PATCH 325/428] Avoid PHPUnit deprecation warnings --- test/PhpParser/NodeAbstractTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index 420c7dcefa..3e7952aa5c 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -63,9 +63,9 @@ public function testConstruct(array $attributes, Node $node) { $this->assertSame('/** doc comment */', $node->getDocComment()->getText()); $this->assertSame('value1', $node->subNode1); $this->assertSame('value2', $node->subNode2); - $this->assertObjectHasAttribute('subNode1', $node); - $this->assertObjectHasAttribute('subNode2', $node); - $this->assertObjectNotHasAttribute('subNode3', $node); + $this->assertTrue(isset($node->subNode1)); + $this->assertTrue(isset($node->subNode2)); + $this->assertTrue(!isset($node->subNode3)); $this->assertSame($attributes, $node->getAttributes()); $this->assertSame($attributes['comments'], $node->getComments()); From 5cc5a67004ea96475ed54a144a821a0ab5011235 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 7 Jan 2024 18:04:23 +0100 Subject: [PATCH 326/428] Upgrading guide tweaks --- UPGRADE-5.0.md | 119 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 83 insertions(+), 36 deletions(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 432d59ffe5..ab282822ba 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -28,16 +28,17 @@ The following symbols are affected by this removal: * The `PhpParser\Parser\Php5` class has been removed. * The `PhpParser\Parser\Multiple` class has been removed. While not strictly related to PHP 5 support, this functionality is no longer useful without it. * The `PhpParser\ParserFactory::ONLY_PHP5` and `PREFER_PHP5` options have been removed. - * The `PhpParser\ParserFactory::PREFER_PHP7` option is now equivalent to `ONLY_PHP7`. ### Changes to the parser factory -The `ParserFactory::create()` method is deprecated in favor of three new methods that provide more fine-grained control over the PHP version being targeted: +The `ParserFactory::create()` method has been removed in favor of three new methods that provide more fine-grained control over the PHP version being targeted: * `createForNewestSupportedVersion()`: Use this if you don't know the PHP version of the code you're parsing. It's better to assume a too new version than a too old one. * `createForHostVersion()`: Use this if you're parsing code for the PHP version you're running on. * `createForVersion()`: Use this if you know the PHP version of the code you want to parse. +The `createForNewestSupportedVersion()` and `creatForHostVersion()` are available since PHP-Parser 4.18.0, to allow libraries to support PHP-Parser 4 and 5 at the same time more easily. + In all cases, the PHP version is a fairly weak hint that is only used on a best-effort basis. The parser will usually accept code for newer versions if it does not have any backwards-compatibility implications. For example, if you specify version `"8.0"`, then `class ReadOnly {}` is treated as a valid class declaration, while using `public readonly int $prop` will lead to a parse error. However, `final public const X = Y;` will be accepted in both cases. @@ -62,6 +63,35 @@ $parser = $factory->create(ParserFactory::ONLY_PHP5); $parser = $factory->createForVersion(PhpVersion::fromString("5.6")); ``` +### Changes to the throw representation + +Previously, `throw` statements like `throw $e;` were represented using the `Stmt\Throw_` class, +while uses inside other expressions (such as `$x ?? throw $e`) used the `Expr\Throw_` class. + +Now, `throw $e;` is represented as a `Stmt\Expression` that contains an `Expr\Throw_`. The +`Stmt\Throw_` class has been removed. + +```php +# Code +throw $e; + +# Before +Stmt_Throw( + expr: Expr_Variable( + name: e + ) +) + +# After +Stmt_Expression( + expr: Expr_Throw( + expr: Expr_Variable( + name: e + ) + ) +) +``` + ### Changes to the array destructuring representation Previously, the `list($x) = $y` destructuring syntax was represented using a `Node\Expr\List_` @@ -72,6 +102,49 @@ Now, destructuring is always represented using `Node\Expr\List_`. The `kind` att `Node\Expr\List_::KIND_LIST` or `Node\Expr\List_::KIND_ARRAY` specifies which syntax was actually used. +```php +# Code +[$x] = $y; + +# Before +Expr_Assign( + var: Expr_Array( + items: array( + 0: Expr_ArrayItem( + key: null + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) + ) + ) + expr: Expr_Variable( + name: y + ) +) + +# After +Expr_Assign( + var: Expr_List( + items: array( + 0: ArrayItem( + key: null + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) + ) + ) + expr: Expr_Variable( + name: y + ) +) +``` + ### Changes to the name representation Previously, `Name` nodes had a `parts` subnode, which stores an array of name parts, split by @@ -83,11 +156,14 @@ now represented by `Name(name: 'Foo\Bar')` instead. It is possible to convert the name to the previous representation using `$name->getParts()`. The `Name` constructor continues to accept both the string and the array representation. +The `Name::getParts()` method is available since PHP-Parser 4.16.0, to allow libraries to support +PHP-Parser 4 and 5 at the same time more easily. + ### Changes to the block representation Previously, code blocks `{ ... }` were always flattened into their parent statement list. For example `while ($x) { $a; { $b; } $c; }` would produce the same node structure as -`if ($x) { $a; $b; $c; }`, namely a `Stmt\While_` node whose `stmts` subnode is an array of four +`if ($x) { $a; $b; $c; }`, namely a `Stmt\While_` node whose `stmts` subnode is an array of three statements. Now, the nested `{ $b; }` block is represented using an explicit `Stmt\Block` node. However, the @@ -150,39 +226,10 @@ Stmt_While( ) ``` -### Changes to the throw representation - -Previously, `throw` statements like `throw $e;` were represented using the `Stmt\Throw_` class, -while uses inside other expressions (such as `$x ?? throw $e`) used the `Expr\Throw_` class. - -Now, `throw $e;` is represented as a `Stmt\Expression` that contains an `Expr\Throw_`. The -`Stmt\Throw_` class has been removed. - -```php -# Code -throw $e; - -# Before -Stmt_Throw( - expr: Expr_Variable( - name: e - ) -) - -# After -Stmt_Expression( - expr: Expr_Throw( - expr: Expr_Variable( - name: e - ) - ) -) -``` - ### Changes to comment assignment Previously, comments were assigned to all nodes starting at the same position. Now they will be -assigned to the outer-most node only. +assigned to the outermost node only. ```php # Code @@ -248,7 +295,7 @@ The old class names have been retained as aliases for backwards compatibility. H Modifier flags (as used by the `$flags` subnode of `Class_`, `ClassMethod`, `Property`, etc.) are now available as class constants on a separate `PhpParser\Modifiers` class, instead of being part of `PhpParser\Node\Stmt\Class_`, to make it clearer that these are used by many different nodes. The old constants are deprecated, but are still available. -``` +```php PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC -> PhpParser\Modifiers::PUBLIC PhpParser\Node\Stmt\Class_::MODIFIER_PROTECTED -> PhpParser\Modifiers::PROTECTED PhpParser\Node\Stmt\Class_::MODIFIER_PRIVATE -> PhpParser\Modifiers::PRIVATE @@ -346,7 +393,7 @@ The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersio * For PHP >= 7.0 (default), short array syntax `[]` will be used by default. This does not affect nodes that specify an explicit array syntax using the `kind` attribute. * For PHP >= 7.0 (default), parentheses around `yield` expressions will only be printed when necessary. Previously, parentheses were always printed, even if `yield` was used as a statement. -* For PHP >= 7.1 (default), the short array syntax `[]` will be used for destructuring by default (instead of `list()`). This does not affect nodes that specify and explicit syntax using the `kind` attribute. +* For PHP >= 7.1 (default), the short array syntax `[]` will be used for destructuring by default (instead of `list()`). This does not affect nodes that specify an explicit syntax using the `kind` attribute. * For PHP >= 7.3 (default), a newline is no longer forced after heredoc/nowdoc strings, as the requirement for this has been removed with the introduction of flexible heredoc/nowdoc strings. * For PHP >= 7.3 (default), heredoc/nowdoc strings are now indented just like regular code. This was allowed with the introduction of flexible heredoc/nowdoc strings. @@ -364,7 +411,7 @@ protected function p( The `$precedence` is the precedence of the direct parent operator (if any), while `$lhsPrecedence` is that precedence of the nearest binary operator on whose left-hand-side the node occurs. For unary operators, only the `$lhsPrecedence` is relevant. -Recursive calls in pretty-printer methods should generally continue calling `p()` without additional parameters. However, pretty-printer methods for operators that participate in precedence resolution need to be adjusted. For example, typical implementations for operators looks as follows now: +Recursive calls in pretty-printer methods should generally continue calling `p()` without additional parameters. However, pretty-printer methods for operators that participate in precedence resolution need to be adjusted. For example, typical implementations for operators look as follows now: ```php protected function pExpr_BinaryOp_Plus( From fba1d621c08a44a21f46552b3ea7044247e8c175 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 7 Jan 2024 18:14:20 +0100 Subject: [PATCH 327/428] Release PHP-Parser 5.0.0 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a46b5a7c7..db594bb92d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +Version 5.0.0 (2024-01-07) +-------------------------- + +See UPGRADE-5.0 for detailed migration instructions. + +### Fixed + +* Fixed parent class of `PropertyItem` and `UseItem`. + Version 5.0.0-rc1 (2023-12-20) ------------------------------ From 4a21235f7e56e713259a6f76bf4b5ea08502b9dc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 7 Jan 2024 18:17:35 +0100 Subject: [PATCH 328/428] Update documentation links in README --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 756cffde64..7555838e27 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,9 @@ PHP Parser This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and manipulation. -[Documentation for version 5.x][doc_master] (in development; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x). +[**Documentation for version 5.x**][doc_master] (current; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x). -[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3). - -[Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2). +[Documentation for version 4.x][doc_4_x] (supported; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3). Features -------- From eb036d5a09f782286820729b64b238db76917958 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 7 Jan 2024 18:54:10 +0100 Subject: [PATCH 329/428] Add instructions for adding new syntax support --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf558b7736..11d7d1469c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,3 +2,31 @@ This project uses PSR-12 with consistent brace placement. This means that the opening brace is always on the same line, even for class and method declarations. + +## Tools + +This project uses PHP-CS-Fixer and PHPStan. You can invoke them using `make`: + +```shell +make php-cs-fixer +make phpstan +``` + +## Adding support for new PHP syntax + +1. If necessary, add emulation support for new tokens. + * Add a new subclass of `Lexer\TokenEmulator`. Take inspiration from existing classes. + * Add the new class to the array in `Lexer\Emulative`. + * Add tests for the emulation in `Lexer\EmulativeTest`. You'll want to modify + `provideTestReplaceKeywords()` for new reserved keywords and `provideTestLexNewFeatures()` for + other emulations. +2. Add any new node classes that are needed. +3. Add support for the new syntax in `grammar/php.y`. Regenerate the parser by running + `php grammar/rebuildParsers.php`. Use `--debug` if there are conflicts. +4. Add pretty-printing support by implementing a `pFooBar()` method in `PrettyPrinter\Standard`. +5. Add tests both in `test/code/parser` and `test/code/prettyPrinter`. +6. Add support for formatting-preserving pretty-printing. This is done by modifying the data tables + at the end of `PrettyPrinterAbstract`. Add a test in `test/code/formatPreservation`. +7. Does the new syntax feature namespaced names? If so, add support for name resolution in + `NodeVisitor\NameResolver`. Test it in `NodeVisitor\NameResolverTest`. +8. Does the new syntax require any changes to builders? Is so, make them :) From d619c8b4e692d5fae76630a95c905e5ff8fbd01b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 9 Jan 2024 20:23:09 +0100 Subject: [PATCH 330/428] Fix typo in upgrading guide Fixes #973. --- UPGRADE-5.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index ab282822ba..3460934f42 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -519,7 +519,7 @@ $newStmts = $traverser->traverse($oldStmts); $parser = (new ParserFactory())->createForNewestSupportedVersion(); $oldStmts = $parser->parse($code); -$oldTokens = $lexer->getTokens(); +$oldTokens = $parser->getTokens(); $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); $newStmts = $traverser->traverse($oldStmts); From ff095c3c65c144f32a811685a81195c4df53fb99 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 10 Jan 2024 20:34:09 +0100 Subject: [PATCH 331/428] Check for tokens with non-integer ID Fixes #974. --- lib/PhpParser/compatibility_tokens.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/PhpParser/compatibility_tokens.php b/lib/PhpParser/compatibility_tokens.php index f33dd77d5c..273271ddb4 100644 --- a/lib/PhpParser/compatibility_tokens.php +++ b/lib/PhpParser/compatibility_tokens.php @@ -26,6 +26,13 @@ function defineCompatibilityTokens(): void { foreach ($compatTokens as $token) { if (\defined($token)) { $tokenId = \constant($token); + if (!\is_int($tokenId)) { + throw new \Error(sprintf( + 'Token %s has ID of type %s, should be int. ' . + 'You may be using a library with broken token emulation', + $token, \gettype($tokenId) + )); + } $clashingToken = $usedTokenIds[$tokenId] ?? null; if ($clashingToken !== null) { throw new \Error(sprintf( From ce019e9ad711e31ee87c2c4c72e538b5240970c3 Mon Sep 17 00:00:00 2001 From: sasezaki Date: Sun, 14 Jan 2024 11:17:25 +0900 Subject: [PATCH 332/428] Add dev tool files to export-ignore --- .gitattributes | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitattributes b/.gitattributes index 0e1e1e9716..5031accf24 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,7 +7,11 @@ .editorconfig export-ignore .gitattributes export-ignore .gitignore export-ignore +.php-cs-fixer.dist.php export-ignore +Makefile export-ignore CHANGELOG.md export-ignore CONTRIBUTING.md export-ignore +phpstan-baseline.neon export-ignore +phpstan.neon.dist export-ignore phpunit.xml.dist export-ignore UPGRADE-*.md export-ignore From 2218c2252c874a4624ab2f613d86ac32d227bc69 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 21 Feb 2024 20:24:10 +0100 Subject: [PATCH 333/428] Release PHP-Parser 5.0.1 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index db594bb92d..d8e002d74e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +Version 5.0.1 (2024-02-21) +-------------------------- + +### Changed + +* Added check to detect use of PHP-Parser with libraries that define `T_*` compatibility tokens + with incorrect type (such as string instead of int). This would lead to `TypeError`s down the + line. Now an `Error` will be thrown early to indicate the problem. + Version 5.0.0 (2024-01-07) -------------------------- From af14fdb282aa0e288bfe7eb3b57893484b68dc27 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 21 Feb 2024 21:11:36 +0100 Subject: [PATCH 334/428] Avoid cyclic reference in parser Pass $this as an explicit $self argument to the reduce callbacks, so we can make them static. This avoids a circular reference in the parser, so that it can be immediately destroyed when it goes out of scope. Fixes #980. --- grammar/parser.template | 6 +- grammar/phpyLang.php | 1 + lib/PhpParser/Parser/Php7.php | 1864 +++++++++++++++--------------- lib/PhpParser/Parser/Php8.php | 1864 +++++++++++++++--------------- lib/PhpParser/ParserAbstract.php | 2 +- 5 files changed, 1869 insertions(+), 1868 deletions(-) diff --git a/grammar/parser.template b/grammar/parser.template index 481930f511..339cecced3 100644 --- a/grammar/parser.template +++ b/grammar/parser.template @@ -1,7 +1,7 @@ semValue -#semval($,%t) $this->semValue +#semval($) $self->semValue +#semval($,%t) $self->semValue #semval(%n) $stackPos-(%l-%n) #semval(%n,%t) $stackPos-(%l-%n) @@ -97,7 +97,7 @@ class #(-p) extends \PhpParser\ParserAbstract protected function initReduceCallbacks(): void { $this->reduceCallbacks = [ #reduce - %n => function ($stackPos) { + %n => static function ($self, $stackPos) { %b }, #noact diff --git a/grammar/phpyLang.php b/grammar/phpyLang.php index 25f6e27812..ac51e2c85d 100644 --- a/grammar/phpyLang.php +++ b/grammar/phpyLang.php @@ -23,6 +23,7 @@ function preprocessGrammar($code) { $code = resolveNodes($code); $code = resolveMacros($code); $code = resolveStackAccess($code); + $code = str_replace('$this', '$self', $code); return $code; } diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 7d8cb10744..8015935116 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1138,18 +1138,18 @@ class Php7 extends \PhpParser\ParserAbstract protected function initReduceCallbacks(): void { $this->reduceCallbacks = [ 0 => null, - 1 => function ($stackPos) { - $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); + 1 => static function ($self, $stackPos) { + $self->semValue = $self->handleNamespaces($self->semStack[$stackPos-(1-1)]); }, - 2 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; + 2 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; }, - 3 => function ($stackPos) { - $this->semValue = array(); + 3 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 4 => function ($stackPos) { - $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + 4 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, 5 => null, 6 => null, @@ -1222,8 +1222,8 @@ protected function initReduceCallbacks(): void { 73 => null, 74 => null, 75 => null, - 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "emitError(new Error('Cannot use "getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); + 76 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; if ($self->semValue === "emitError(new Error('Cannot use "getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); }, 77 => null, 78 => null, @@ -1233,1465 +1233,1465 @@ protected function initReduceCallbacks(): void { 82 => null, 83 => null, 84 => null, - 85 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 85 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 86 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 87 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 88 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 88 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 89 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 89 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 90 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 90 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 91 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 91 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 92 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 92 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 93 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 93 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 94 => null, - 95 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 95 => static function ($self, $stackPos) { + $self->semValue = new Name(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 96 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 96 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 97 => function ($stackPos) { + 97 => static function ($self, $stackPos) { /* nothing */ }, - 98 => function ($stackPos) { + 98 => static function ($self, $stackPos) { /* nothing */ }, - 99 => function ($stackPos) { + 99 => static function ($self, $stackPos) { /* nothing */ }, - 100 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); + 100 => static function ($self, $stackPos) { + $self->emitError(new Error('A trailing comma is not allowed here', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); }, 101 => null, 102 => null, - 103 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 103 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos-(1-1)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 104 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 104 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 105 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 105 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 106 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 106 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 107 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 107 => static function ($self, $stackPos) { + $self->semValue = new Node\AttributeGroup($self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 108 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 108 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 109 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 109 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 110 => function ($stackPos) { - $this->semValue = []; + 110 => static function ($self, $stackPos) { + $self->semValue = []; }, 111 => null, 112 => null, 113 => null, 114 => null, - 115 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->handleHaltCompiler(), $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 115 => static function ($self, $stackPos) { + $self->semValue = new Stmt\HaltCompiler($self->handleHaltCompiler(), $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 116 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($this->semValue); + 116 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(3-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); + $self->checkNamespace($self->semValue); }, - 117 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); + 117 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); }, - 118 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); + 118 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_(null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); }, - 119 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 119 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 120 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 120 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 121 => null, - 122 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 122 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 123 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_FUNCTION; + 123 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_FUNCTION; }, - 124 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_CONSTANT; + 124 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_CONSTANT; }, - 125 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + 125 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 126 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + 126 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 127 => null, - 128 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 128 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 129 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 129 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 130 => null, - 131 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 131 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 132 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 132 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 133 => null, - 134 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 134 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 135 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 135 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 136 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + 136 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); }, - 137 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + 137 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); }, - 138 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + 138 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); }, - 139 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + 139 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); }, - 140 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; + 140 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL; }, - 141 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; + 141 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; $self->semValue->type = $self->semStack[$stackPos-(2-1)]; }, 142 => null, - 143 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 143 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 144 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 144 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 145 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 145 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 146 => null, - 147 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 147 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 148 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 148 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 149 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 149 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 150 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 150 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 151 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; + 151 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; }, - 152 => function ($stackPos) { - $this->semValue = array(); + 152 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 153 => function ($stackPos) { - $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + 153 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, 154 => null, 155 => null, 156 => null, - 157 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 157 => static function ($self, $stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 158 => function ($stackPos) { - $this->semValue = new Stmt\Block($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 158 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Block($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 159 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => $this->semStack[$stackPos-(7-5)], 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + 159 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos-(7-3)], ['stmts' => $self->semStack[$stackPos-(7-5)], 'elseifs' => $self->semStack[$stackPos-(7-6)], 'else' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 160 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); + 160 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos-(10-3)], ['stmts' => $self->semStack[$stackPos-(10-6)], 'elseifs' => $self->semStack[$stackPos-(10-7)], 'else' => $self->semStack[$stackPos-(10-8)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 161 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 161 => static function ($self, $stackPos) { + $self->semValue = new Stmt\While_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 162 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + 162 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Do_($self->semStack[$stackPos-(7-5)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 163 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 163 => static function ($self, $stackPos) { + $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos-(9-3)], 'cond' => $self->semStack[$stackPos-(9-5)], 'loop' => $self->semStack[$stackPos-(9-7)], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 164 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 164 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Switch_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 165 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 165 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Break_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 166 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 166 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Continue_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 167 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 167 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Return_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 168 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 168 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Global_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 169 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 169 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Static_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 170 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 170 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Echo_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 171 => function ($stackPos) { + 171 => static function ($self, $stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('hasLeadingNewline', $this->inlineHtmlHasLeadingNewline($stackPos-(1-1))); + $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos-(1-1))); }, - 172 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 172 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Expression($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 173 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 173 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Unset_($self->semStack[$stackPos-(5-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 174 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + 174 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos-(7-5)][1], 'stmts' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 175 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 175 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-7)][0], ['keyVar' => $self->semStack[$stackPos-(9-5)], 'byRef' => $self->semStack[$stackPos-(9-7)][1], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 176 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-4)], $this->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + 176 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(6-3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-4)], $self->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $self->semStack[$stackPos-(6-6)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 177 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 177 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Declare_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 178 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->checkTryCatch($this->semValue); + 178 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->checkTryCatch($self->semValue); }, - 179 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 179 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Goto_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 180 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 180 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Label($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 181 => function ($stackPos) { - $this->semValue = null; /* means: no statement */ + 181 => static function ($self, $stackPos) { + $self->semValue = null; /* means: no statement */ }, 182 => null, - 183 => function ($stackPos) { - $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); + 183 => static function ($self, $stackPos) { + $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); }, - 184 => function ($stackPos) { - if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; + 184 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 185 => function ($stackPos) { - $this->semValue = array(); + 185 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 186 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 186 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 187 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 187 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 188 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 188 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 189 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + 189 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Catch_($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-7)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 190 => function ($stackPos) { - $this->semValue = null; + 190 => static function ($self, $stackPos) { + $self->semValue = null; }, - 191 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 191 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Finally_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 192 => null, - 193 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 193 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 194 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 194 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 195 => function ($stackPos) { - $this->semValue = false; + 195 => static function ($self, $stackPos) { + $self->semValue = false; }, - 196 => function ($stackPos) { - $this->semValue = true; + 196 => static function ($self, $stackPos) { + $self->semValue = true; }, - 197 => function ($stackPos) { - $this->semValue = false; + 197 => static function ($self, $stackPos) { + $self->semValue = false; }, - 198 => function ($stackPos) { - $this->semValue = true; + 198 => static function ($self, $stackPos) { + $self->semValue = true; }, - 199 => function ($stackPos) { - $this->semValue = false; + 199 => static function ($self, $stackPos) { + $self->semValue = false; }, - 200 => function ($stackPos) { - $this->semValue = true; + 200 => static function ($self, $stackPos) { + $self->semValue = true; }, - 201 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 201 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 202 => function ($stackPos) { - $this->semValue = []; + 202 => static function ($self, $stackPos) { + $self->semValue = []; }, 203 => null, - 204 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 204 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 205 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + 205 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 206 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 206 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 207 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); - $this->checkClass($this->semValue, $stackPos-(7-2)); + 207 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos-(7-2)); }, - 208 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); - $this->checkClass($this->semValue, $stackPos-(8-3)); + 208 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos-(8-3)); }, - 209 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); - $this->checkInterface($this->semValue, $stackPos-(7-3)); + 209 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->checkInterface($self->semValue, $stackPos-(7-3)); }, - 210 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + 210 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 211 => function ($stackPos) { - $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); - $this->checkEnum($this->semValue, $stackPos-(8-3)); + 211 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkEnum($self->semValue, $stackPos-(8-3)); }, - 212 => function ($stackPos) { - $this->semValue = null; + 212 => static function ($self, $stackPos) { + $self->semValue = null; }, - 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 213 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 214 => function ($stackPos) { - $this->semValue = null; + 214 => static function ($self, $stackPos) { + $self->semValue = null; }, - 215 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 215 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 216 => function ($stackPos) { - $this->semValue = 0; + 216 => static function ($self, $stackPos) { + $self->semValue = 0; }, 217 => null, 218 => null, - 219 => function ($stackPos) { - $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + 219 => static function ($self, $stackPos) { + $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 220 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + 220 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; }, - 221 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + 221 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; }, - 222 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + 222 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; }, - 223 => function ($stackPos) { - $this->semValue = null; + 223 => static function ($self, $stackPos) { + $self->semValue = null; }, - 224 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 224 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 225 => function ($stackPos) { - $this->semValue = array(); + 225 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 226 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 226 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 227 => function ($stackPos) { - $this->semValue = array(); + 227 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 228 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 228 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, 229 => null, - 230 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 230 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 231 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 231 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 232 => null, - 233 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 233 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, 234 => null, - 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 235 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 236 => function ($stackPos) { - if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; + 236 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 237 => function ($stackPos) { - $this->semValue = null; + 237 => static function ($self, $stackPos) { + $self->semValue = null; }, - 238 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 238 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, 239 => null, - 240 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 240 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 241 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 241 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 242 => function ($stackPos) { - $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 242 => static function ($self, $stackPos) { + $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 243 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 243 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 244 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + 244 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 245 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 245 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 246 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + 246 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(5-3)]; }, - 247 => function ($stackPos) { - $this->semValue = array(); + 247 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 248 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 248 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 249 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 249 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 250 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 250 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 251 => null, 252 => null, - 253 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + 253 => static function ($self, $stackPos) { + $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 254 => function ($stackPos) { - $this->semValue = []; + 254 => static function ($self, $stackPos) { + $self->semValue = []; }, 255 => null, - 256 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 256 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 257 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 257 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 258 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 258 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 259 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 259 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 260 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 260 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 261 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 261 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 262 => function ($stackPos) { - $this->semValue = array(); + 262 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 263 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 263 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 264 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 264 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 265 => function ($stackPos) { - $this->semValue = array(); + 265 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 266 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 266 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 267 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); + 267 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 268 => function ($stackPos) { - $this->semValue = null; + 268 => static function ($self, $stackPos) { + $self->semValue = null; }, - 269 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 269 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 270 => function ($stackPos) { - $this->semValue = null; + 270 => static function ($self, $stackPos) { + $self->semValue = null; }, - 271 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); + 271 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 272 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + 272 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 273 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + 273 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(2-2)], true); }, - 274 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + 274 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 275 => function ($stackPos) { - $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); + 275 => static function ($self, $stackPos) { + $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); }, 276 => null, - 277 => function ($stackPos) { - $this->semValue = array(); + 277 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 278 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 278 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 279 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 279 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 280 => function ($stackPos) { - $this->semValue = 0; + 280 => static function ($self, $stackPos) { + $self->semValue = 0; }, - 281 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + 281 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 282 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + 282 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; }, - 283 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + 283 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; }, - 284 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + 284 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; }, - 285 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + 285 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; }, - 286 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); + 286 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos-(6-6)], null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); + $self->checkParam($self->semValue); }, - 287 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); - $this->checkParam($this->semValue); + 287 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-8)], $self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(8-2)], $self->semStack[$stackPos-(8-1)]); + $self->checkParam($self->semValue); }, - 288 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + 288 => static function ($self, $stackPos) { + $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, 289 => null, - 290 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 290 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 291 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 291 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 292 => null, 293 => null, - 294 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 294 => static function ($self, $stackPos) { + $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 295 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + 295 => static function ($self, $stackPos) { + $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 296 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 296 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 297 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 297 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 298 => null, - 299 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 299 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 300 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 300 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 301 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 301 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 302 => null, - 303 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 303 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 304 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 304 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 305 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 305 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 306 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 306 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 307 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 307 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 308 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 308 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 309 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 309 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 310 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 310 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 311 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 311 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 312 => null, - 313 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 313 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 314 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 314 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 315 => null, - 316 => function ($stackPos) { - $this->semValue = null; + 316 => static function ($self, $stackPos) { + $self->semValue = null; }, 317 => null, - 318 => function ($stackPos) { - $this->semValue = null; + 318 => static function ($self, $stackPos) { + $self->semValue = null; }, - 319 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 319 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 320 => function ($stackPos) { - $this->semValue = null; + 320 => static function ($self, $stackPos) { + $self->semValue = null; }, - 321 => function ($stackPos) { - $this->semValue = array(); + 321 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 322 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 322 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 323 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); + 323 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 324 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 324 => static function ($self, $stackPos) { + $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 325 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 325 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 326 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 326 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 327 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 327 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 328 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 328 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 329 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 329 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 330 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(3-1)]); + 330 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, 331 => null, - 332 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 332 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 333 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 333 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 334 => null, 335 => null, - 336 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 336 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 337 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 337 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 338 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 338 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 339 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 339 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 340 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } else { $this->semValue = $this->semStack[$stackPos-(2-1)]; } + 340 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 341 => function ($stackPos) { - $this->semValue = array(); + 341 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 342 => function ($stackPos) { - $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + 342 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 343 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); - $this->checkProperty($this->semValue, $stackPos-(5-2)); + 343 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); + $self->checkProperty($self->semValue, $stackPos-(5-2)); }, - 344 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-1)]); - $this->checkClassConst($this->semValue, $stackPos-(5-2)); + 344 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); + $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 345 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); - $this->checkClassConst($this->semValue, $stackPos-(6-2)); + 345 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); + $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 346 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); + 346 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); + $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 347 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 347 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 348 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 348 => static function ($self, $stackPos) { + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 349 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + 349 => static function ($self, $stackPos) { + $self->semValue = null; /* will be skipped */ }, - 350 => function ($stackPos) { - $this->semValue = array(); + 350 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 351 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 351 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 352 => function ($stackPos) { - $this->semValue = array(); + 352 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 353 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 353 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 354 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 354 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 355 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 355 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 356 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 356 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 357 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 357 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 358 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 358 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 359 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 359 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, 360 => null, - 361 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + 361 => static function ($self, $stackPos) { + $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 362 => function ($stackPos) { - $this->semValue = null; + 362 => static function ($self, $stackPos) { + $self->semValue = null; }, 363 => null, 364 => null, - 365 => function ($stackPos) { - $this->semValue = 0; + 365 => static function ($self, $stackPos) { + $self->semValue = 0; }, - 366 => function ($stackPos) { - $this->semValue = 0; + 366 => static function ($self, $stackPos) { + $self->semValue = 0; }, 367 => null, 368 => null, - 369 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + 369 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 370 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + 370 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; }, - 371 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + 371 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; }, - 372 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + 372 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; }, - 373 => function ($stackPos) { - $this->semValue = Modifiers::STATIC; + 373 => static function ($self, $stackPos) { + $self->semValue = Modifiers::STATIC; }, - 374 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + 374 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; }, - 375 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + 375 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; }, - 376 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + 376 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; }, 377 => null, - 378 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 378 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 379 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 379 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 380 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 380 => static function ($self, $stackPos) { + $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 381 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 381 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 382 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 382 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 383 => null, 384 => null, - 385 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 385 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 386 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 386 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 387 => function ($stackPos) { - $this->semValue = array(); + 387 => static function ($self, $stackPos) { + $self->semValue = array(); }, 388 => null, 389 => null, - 390 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 390 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 391 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 391 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 392 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 392 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 393 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 393 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 394 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - if (!$this->phpVersion->allowsAssignNewByReference()) { - $this->emitError(new Error('Cannot assign new by reference', $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]))); + 394 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + if (!$self->phpVersion->allowsAssignNewByReference()) { + $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, 395 => null, 396 => null, - 397 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 397 => static function ($self, $stackPos) { + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 398 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 399 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 400 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 400 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 401 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 401 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 402 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 402 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 403 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 403 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 404 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 404 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 405 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 405 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 406 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 406 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 407 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 407 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 408 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 408 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 409 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 409 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 410 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 410 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 411 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 411 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 412 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 412 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 413 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 413 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 414 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 414 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 415 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 416 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 417 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 418 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 419 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 420 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 421 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 422 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 422 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 423 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 423 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 424 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 424 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 425 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 426 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 427 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 428 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 429 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 430 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 431 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 432 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 432 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 433 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 433 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 434 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 434 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 435 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 435 => static function ($self, $stackPos) { + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 436 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 436 => static function ($self, $stackPos) { + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 437 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 437 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 438 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 438 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 439 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 439 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 440 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 440 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 441 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 441 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 442 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 442 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 443 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 443 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 444 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 444 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 445 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 445 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 446 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 446 => static function ($self, $stackPos) { + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 447 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 447 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 448 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 448 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 449 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 449 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 450 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 450 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 451 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 451 => static function ($self, $stackPos) { + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 452 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 452 => static function ($self, $stackPos) { + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 453 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 453 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 454 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 454 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 455 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 455 => static function ($self, $stackPos) { + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 456 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 456 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 457 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 457 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 458 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 458 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 459 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); + 459 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 460 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 460 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 461 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 461 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 462 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 462 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 463 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 463 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 464 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 464 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 465 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); + 465 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = strtolower($self->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $self->semValue = new Expr\Exit_($self->semStack[$stackPos-(2-2)], $attrs); }, - 466 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 466 => static function ($self, $stackPos) { + $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 467 => null, - 468 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 468 => static function ($self, $stackPos) { + $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 469 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 469 => static function ($self, $stackPos) { + $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 470 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 470 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 471 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 471 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 472 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 472 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 473 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 473 => static function ($self, $stackPos) { + $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 474 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 474 => static function ($self, $stackPos) { + $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 475 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + 475 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 476 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 476 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 477 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + 477 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 478 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 478 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 479 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 479 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 480 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); + 480 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 481 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 481 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 482 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); + 482 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 483 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); + 483 => static function ($self, $stackPos) { + $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); + $self->checkClass($self->semValue[0], -1); }, - 484 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 484 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 485 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 485 => static function ($self, $stackPos) { + list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 486 => function ($stackPos) { - $this->semValue = array(); + 486 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 487 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + 487 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-3)]; }, 488 => null, - 489 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 489 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 490 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 490 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 491 => function ($stackPos) { - $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 491 => static function ($self, $stackPos) { + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 492 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 492 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 493 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 493 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 494 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 494 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 495 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 496 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 496 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 497 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 497 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 498 => null, - 499 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 499 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 500 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 500 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 501 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 501 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 502 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 502 => static function ($self, $stackPos) { + $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 503 => null, 504 => null, - 505 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 505 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 506 => function ($stackPos) { - $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + 506 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, 507 => null, 508 => null, - 509 => function ($stackPos) { - $this->semValue = null; + 509 => static function ($self, $stackPos) { + $self->semValue = null; }, - 510 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 510 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 511 => function ($stackPos) { - $this->semValue = array(); + 511 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 512 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); foreach ($this->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; + 512 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 513 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + 513 => static function ($self, $stackPos) { + foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 514 => function ($stackPos) { - $this->semValue = array(); + 514 => static function ($self, $stackPos) { + $self->semValue = array(); }, 515 => null, - 516 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 516 => static function ($self, $stackPos) { + $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 517 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 517 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 518 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 518 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 519 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 519 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 520 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 520 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 521 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 521 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 522 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 522 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 523 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 523 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 524 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 524 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 525 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 525 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 526 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 526 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 527 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)])), $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + 527 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 528 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + 528 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; + $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 529 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - $this->createdArrays->attach($this->semValue); + 529 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; + $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); + $self->createdArrays->attach($self->semValue); }, - 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); + 530 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 531 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->supportsUnicodeEscapes()); + 531 => static function ($self, $stackPos) { + $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 532 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); + 532 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 533 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->allowsInvalidOctals()); + 533 => static function ($self, $stackPos) { + $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 534 => function ($stackPos) { - $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 534 => static function ($self, $stackPos) { + $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 535 => null, 536 => null, 537 => null, - 538 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); + 538 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 539 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-2)], $this->tokenEndStack[$stackPos-(2-2)]), true); + 539 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 540 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); + 540 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 541 => function ($stackPos) { - $this->semValue = null; + 541 => static function ($self, $stackPos) { + $self->semValue = null; }, 542 => null, 543 => null, - 544 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 544 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 545 => null, 546 => null, 547 => null, 548 => null, 549 => null, - 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 550 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 551 => null, 552 => null, - 553 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 553 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 554 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 554 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 555 => null, - 556 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 556 => static function ($self, $stackPos) { + $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 557 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 557 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 558 => function ($stackPos) { - $this->semValue = null; + 558 => static function ($self, $stackPos) { + $self->semValue = null; }, 559 => null, 560 => null, 561 => null, - 562 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 562 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 563 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 563 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 564 => null, - 565 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 565 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 566 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 566 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 567 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + 567 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 568 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])) : $var; + 568 => static function ($self, $stackPos) { + $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 569 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 569 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 570 => null, - 571 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 571 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 572 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 572 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 573 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 573 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 574 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 574 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 575 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 575 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 576 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 576 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 577 => null, - 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 578 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 579 => null, 580 => null, - 581 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 581 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 582 => null, - 583 => function ($stackPos) { - $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + 583 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 584 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); - $this->postprocessList($this->semValue); + 584 => static function ($self, $stackPos) { + $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $self->postprocessList($self->semValue); }, - 585 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); + 585 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, 586 => null, - 587 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + 587 => static function ($self, $stackPos) { + /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 588 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 588 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 589 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 589 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 590 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 590 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 591 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 591 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 592 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 592 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 593 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 593 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 594 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 594 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 595 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 595 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 596 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), true); + 596 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 597 => function ($stackPos) { + 597 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ - $attrs = $this->createEmptyElemAttributes($this->tokenPos); - $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); + $attrs = $self->createEmptyElemAttributes($self->tokenPos); + $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 598 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 598 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 599 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 599 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 600 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 600 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 601 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + 601 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 602 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); $attrs['rawValue'] = $this->semStack[$stackPos-(1-1)]; $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $attrs); + 602 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 603 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 603 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 604 => null, - 605 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 605 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 606 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 606 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 607 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 607 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 608 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 608 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 609 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 609 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 610 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + 610 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 611 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 611 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 612 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 612 => static function ($self, $stackPos) { + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 613 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 613 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 614 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 614 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 615 => null, ]; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 76d52a8c77..27154d248c 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1156,18 +1156,18 @@ class Php8 extends \PhpParser\ParserAbstract protected function initReduceCallbacks(): void { $this->reduceCallbacks = [ 0 => null, - 1 => function ($stackPos) { - $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); + 1 => static function ($self, $stackPos) { + $self->semValue = $self->handleNamespaces($self->semStack[$stackPos-(1-1)]); }, - 2 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; + 2 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; }, - 3 => function ($stackPos) { - $this->semValue = array(); + 3 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 4 => function ($stackPos) { - $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + 4 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, 5 => null, 6 => null, @@ -1240,8 +1240,8 @@ protected function initReduceCallbacks(): void { 73 => null, 74 => null, 75 => null, - 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "emitError(new Error('Cannot use "getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); + 76 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; if ($self->semValue === "emitError(new Error('Cannot use "getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); }, 77 => null, 78 => null, @@ -1251,1465 +1251,1465 @@ protected function initReduceCallbacks(): void { 82 => null, 83 => null, 84 => null, - 85 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 85 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 86 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 87 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 88 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 88 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 89 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 89 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 90 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 90 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 91 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 91 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 92 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 92 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 93 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 93 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 94 => null, - 95 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 95 => static function ($self, $stackPos) { + $self->semValue = new Name(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 96 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 96 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 97 => function ($stackPos) { + 97 => static function ($self, $stackPos) { /* nothing */ }, - 98 => function ($stackPos) { + 98 => static function ($self, $stackPos) { /* nothing */ }, - 99 => function ($stackPos) { + 99 => static function ($self, $stackPos) { /* nothing */ }, - 100 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); + 100 => static function ($self, $stackPos) { + $self->emitError(new Error('A trailing comma is not allowed here', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]))); }, 101 => null, 102 => null, - 103 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 103 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos-(1-1)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 104 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 104 => static function ($self, $stackPos) { + $self->semValue = new Node\Attribute($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 105 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 105 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 106 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 106 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 107 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 107 => static function ($self, $stackPos) { + $self->semValue = new Node\AttributeGroup($self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 108 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 108 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 109 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 109 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 110 => function ($stackPos) { - $this->semValue = []; + 110 => static function ($self, $stackPos) { + $self->semValue = []; }, 111 => null, 112 => null, 113 => null, 114 => null, - 115 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->handleHaltCompiler(), $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 115 => static function ($self, $stackPos) { + $self->semValue = new Stmt\HaltCompiler($self->handleHaltCompiler(), $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 116 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($this->semValue); + 116 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(3-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); + $self->checkNamespace($self->semValue); }, - 117 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); + 117 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); }, - 118 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); + 118 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Namespace_(null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $self->checkNamespace($self->semValue); }, - 119 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 119 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 120 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 120 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Use_($self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 121 => null, - 122 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 122 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 123 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_FUNCTION; + 123 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_FUNCTION; }, - 124 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_CONSTANT; + 124 => static function ($self, $stackPos) { + $self->semValue = Stmt\Use_::TYPE_CONSTANT; }, - 125 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + 125 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 126 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + 126 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 127 => null, - 128 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 128 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 129 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 129 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 130 => null, - 131 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 131 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 132 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 132 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 133 => null, - 134 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 134 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 135 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 135 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 136 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + 136 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); }, - 137 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + 137 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); }, - 138 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + 138 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); }, - 139 => function ($stackPos) { - $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + 139 => static function ($self, $stackPos) { + $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); }, - 140 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; + 140 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL; }, - 141 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; + 141 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; $self->semValue->type = $self->semStack[$stackPos-(2-1)]; }, 142 => null, - 143 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 143 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 144 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 144 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 145 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 145 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 146 => null, - 147 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 147 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 148 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 148 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 149 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 149 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 150 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 150 => static function ($self, $stackPos) { + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 151 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; + 151 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; }, - 152 => function ($stackPos) { - $this->semValue = array(); + 152 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 153 => function ($stackPos) { - $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + 153 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, 154 => null, 155 => null, 156 => null, - 157 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 157 => static function ($self, $stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 158 => function ($stackPos) { - $this->semValue = new Stmt\Block($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 158 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Block($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 159 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => $this->semStack[$stackPos-(7-5)], 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + 159 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos-(7-3)], ['stmts' => $self->semStack[$stackPos-(7-5)], 'elseifs' => $self->semStack[$stackPos-(7-6)], 'else' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 160 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); + 160 => static function ($self, $stackPos) { + $self->semValue = new Stmt\If_($self->semStack[$stackPos-(10-3)], ['stmts' => $self->semStack[$stackPos-(10-6)], 'elseifs' => $self->semStack[$stackPos-(10-7)], 'else' => $self->semStack[$stackPos-(10-8)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 161 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 161 => static function ($self, $stackPos) { + $self->semValue = new Stmt\While_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 162 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + 162 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Do_($self->semStack[$stackPos-(7-5)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 163 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 163 => static function ($self, $stackPos) { + $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos-(9-3)], 'cond' => $self->semStack[$stackPos-(9-5)], 'loop' => $self->semStack[$stackPos-(9-7)], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 164 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 164 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Switch_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 165 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 165 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Break_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 166 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 166 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Continue_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 167 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 167 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Return_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 168 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 168 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Global_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 169 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 169 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Static_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 170 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 170 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Echo_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 171 => function ($stackPos) { + 171 => static function ($self, $stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); - $this->semValue->setAttribute('hasLeadingNewline', $this->inlineHtmlHasLeadingNewline($stackPos-(1-1))); + $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos-(1-1))); }, - 172 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 172 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Expression($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 173 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 173 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Unset_($self->semStack[$stackPos-(5-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 174 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + 174 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos-(7-5)][1], 'stmts' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 175 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 175 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-7)][0], ['keyVar' => $self->semStack[$stackPos-(9-5)], 'byRef' => $self->semStack[$stackPos-(9-7)][1], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 176 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-4)], $this->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + 176 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(6-3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-4)], $self->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $self->semStack[$stackPos-(6-6)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 177 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 177 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Declare_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 178 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->checkTryCatch($this->semValue); + 178 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->checkTryCatch($self->semValue); }, - 179 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 179 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Goto_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 180 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 180 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Label($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 181 => function ($stackPos) { - $this->semValue = null; /* means: no statement */ + 181 => static function ($self, $stackPos) { + $self->semValue = null; /* means: no statement */ }, 182 => null, - 183 => function ($stackPos) { - $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); + 183 => static function ($self, $stackPos) { + $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); }, - 184 => function ($stackPos) { - if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; + 184 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 185 => function ($stackPos) { - $this->semValue = array(); + 185 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 186 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 186 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 187 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 187 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 188 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 188 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 189 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + 189 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Catch_($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-7)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 190 => function ($stackPos) { - $this->semValue = null; + 190 => static function ($self, $stackPos) { + $self->semValue = null; }, - 191 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 191 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Finally_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 192 => null, - 193 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 193 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 194 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 194 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 195 => function ($stackPos) { - $this->semValue = false; + 195 => static function ($self, $stackPos) { + $self->semValue = false; }, - 196 => function ($stackPos) { - $this->semValue = true; + 196 => static function ($self, $stackPos) { + $self->semValue = true; }, - 197 => function ($stackPos) { - $this->semValue = false; + 197 => static function ($self, $stackPos) { + $self->semValue = false; }, - 198 => function ($stackPos) { - $this->semValue = true; + 198 => static function ($self, $stackPos) { + $self->semValue = true; }, - 199 => function ($stackPos) { - $this->semValue = false; + 199 => static function ($self, $stackPos) { + $self->semValue = false; }, - 200 => function ($stackPos) { - $this->semValue = true; + 200 => static function ($self, $stackPos) { + $self->semValue = true; }, - 201 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 201 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 202 => function ($stackPos) { - $this->semValue = []; + 202 => static function ($self, $stackPos) { + $self->semValue = []; }, 203 => null, - 204 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 204 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 205 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + 205 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 206 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 206 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 207 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); - $this->checkClass($this->semValue, $stackPos-(7-2)); + 207 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos-(7-2)); }, - 208 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); - $this->checkClass($this->semValue, $stackPos-(8-3)); + 208 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkClass($self->semValue, $stackPos-(8-3)); }, - 209 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); - $this->checkInterface($this->semValue, $stackPos-(7-3)); + 209 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->checkInterface($self->semValue, $stackPos-(7-3)); }, - 210 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + 210 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 211 => function ($stackPos) { - $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); - $this->checkEnum($this->semValue, $stackPos-(8-3)); + 211 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkEnum($self->semValue, $stackPos-(8-3)); }, - 212 => function ($stackPos) { - $this->semValue = null; + 212 => static function ($self, $stackPos) { + $self->semValue = null; }, - 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 213 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 214 => function ($stackPos) { - $this->semValue = null; + 214 => static function ($self, $stackPos) { + $self->semValue = null; }, - 215 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 215 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 216 => function ($stackPos) { - $this->semValue = 0; + 216 => static function ($self, $stackPos) { + $self->semValue = 0; }, 217 => null, 218 => null, - 219 => function ($stackPos) { - $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + 219 => static function ($self, $stackPos) { + $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 220 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + 220 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; }, - 221 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + 221 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; }, - 222 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + 222 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; }, - 223 => function ($stackPos) { - $this->semValue = null; + 223 => static function ($self, $stackPos) { + $self->semValue = null; }, - 224 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 224 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 225 => function ($stackPos) { - $this->semValue = array(); + 225 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 226 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 226 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 227 => function ($stackPos) { - $this->semValue = array(); + 227 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 228 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 228 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, 229 => null, - 230 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 230 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 231 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 231 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 232 => null, - 233 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 233 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, 234 => null, - 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 235 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 236 => function ($stackPos) { - if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; + 236 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 237 => function ($stackPos) { - $this->semValue = null; + 237 => static function ($self, $stackPos) { + $self->semValue = null; }, - 238 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 238 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, 239 => null, - 240 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 240 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 241 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 241 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 242 => function ($stackPos) { - $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 242 => static function ($self, $stackPos) { + $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 243 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 243 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 244 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + 244 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 245 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 245 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 246 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; + 246 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(5-3)]; }, - 247 => function ($stackPos) { - $this->semValue = array(); + 247 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 248 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 248 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 249 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 249 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 250 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 250 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 251 => null, 252 => null, - 253 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + 253 => static function ($self, $stackPos) { + $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 254 => function ($stackPos) { - $this->semValue = []; + 254 => static function ($self, $stackPos) { + $self->semValue = []; }, 255 => null, - 256 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 256 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 257 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 257 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 258 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 258 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 259 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 259 => static function ($self, $stackPos) { + $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 260 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + 260 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 261 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 261 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 262 => function ($stackPos) { - $this->semValue = array(); + 262 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 263 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 263 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 264 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 264 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 265 => function ($stackPos) { - $this->semValue = array(); + 265 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 266 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 266 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 267 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); + 267 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 268 => function ($stackPos) { - $this->semValue = null; + 268 => static function ($self, $stackPos) { + $self->semValue = null; }, - 269 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 269 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 270 => function ($stackPos) { - $this->semValue = null; + 270 => static function ($self, $stackPos) { + $self->semValue = null; }, - 271 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); + 271 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 272 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + 272 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 273 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + 273 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(2-2)], true); }, - 274 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + 274 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 275 => function ($stackPos) { - $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); + 275 => static function ($self, $stackPos) { + $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); }, 276 => null, - 277 => function ($stackPos) { - $this->semValue = array(); + 277 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 278 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 278 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 279 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 279 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 280 => function ($stackPos) { - $this->semValue = 0; + 280 => static function ($self, $stackPos) { + $self->semValue = 0; }, - 281 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + 281 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 282 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + 282 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; }, - 283 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + 283 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; }, - 284 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + 284 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; }, - 285 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + 285 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; }, - 286 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - $this->checkParam($this->semValue); + 286 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos-(6-6)], null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); + $self->checkParam($self->semValue); }, - 287 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); - $this->checkParam($this->semValue); + 287 => static function ($self, $stackPos) { + $self->semValue = new Node\Param($self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-8)], $self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(8-2)], $self->semStack[$stackPos-(8-1)]); + $self->checkParam($self->semValue); }, - 288 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + 288 => static function ($self, $stackPos) { + $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, 289 => null, - 290 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 290 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 291 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 291 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 292 => null, 293 => null, - 294 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 294 => static function ($self, $stackPos) { + $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 295 => function ($stackPos) { - $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + 295 => static function ($self, $stackPos) { + $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 296 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 296 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 297 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 297 => static function ($self, $stackPos) { + $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 298 => null, - 299 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 299 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 300 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 300 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 301 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 301 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 302 => null, - 303 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 303 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 304 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 304 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 305 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 305 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 306 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 306 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 307 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 307 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 308 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 308 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 309 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 309 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 310 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 310 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 311 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 311 => static function ($self, $stackPos) { + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 312 => null, - 313 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 313 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 314 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 314 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 315 => null, - 316 => function ($stackPos) { - $this->semValue = null; + 316 => static function ($self, $stackPos) { + $self->semValue = null; }, 317 => null, - 318 => function ($stackPos) { - $this->semValue = null; + 318 => static function ($self, $stackPos) { + $self->semValue = null; }, - 319 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; + 319 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 320 => function ($stackPos) { - $this->semValue = null; + 320 => static function ($self, $stackPos) { + $self->semValue = null; }, - 321 => function ($stackPos) { - $this->semValue = array(); + 321 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 322 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; + 322 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 323 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-2)]); + 323 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 324 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 324 => static function ($self, $stackPos) { + $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 325 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 325 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 326 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 326 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 327 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 327 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 328 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 328 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 329 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 329 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 330 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(3-1)]); + 330 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, 331 => null, - 332 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 332 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 333 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 333 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 334 => null, 335 => null, - 336 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 336 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 337 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 337 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 338 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 338 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 339 => function ($stackPos) { - $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 339 => static function ($self, $stackPos) { + $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 340 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } else { $this->semValue = $this->semStack[$stackPos-(2-1)]; } + 340 => static function ($self, $stackPos) { + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 341 => function ($stackPos) { - $this->semValue = array(); + 341 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 342 => function ($stackPos) { - $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + 342 => static function ($self, $stackPos) { + $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; + if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 343 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); - $this->checkProperty($this->semValue, $stackPos-(5-2)); + 343 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); + $self->checkProperty($self->semValue, $stackPos-(5-2)); }, - 344 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-1)]); - $this->checkClassConst($this->semValue, $stackPos-(5-2)); + 344 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); + $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 345 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); - $this->checkClassConst($this->semValue, $stackPos-(6-2)); + 345 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); + $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 346 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); - $this->checkClassMethod($this->semValue, $stackPos-(10-2)); + 346 => static function ($self, $stackPos) { + $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); + $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 347 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 347 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 348 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 348 => static function ($self, $stackPos) { + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 349 => function ($stackPos) { - $this->semValue = null; /* will be skipped */ + 349 => static function ($self, $stackPos) { + $self->semValue = null; /* will be skipped */ }, - 350 => function ($stackPos) { - $this->semValue = array(); + 350 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 351 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 351 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 352 => function ($stackPos) { - $this->semValue = array(); + 352 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 353 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 353 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 354 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 354 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 355 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 355 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 356 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 356 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 357 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 357 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 358 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 358 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 359 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + 359 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, 360 => null, - 361 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + 361 => static function ($self, $stackPos) { + $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 362 => function ($stackPos) { - $this->semValue = null; + 362 => static function ($self, $stackPos) { + $self->semValue = null; }, 363 => null, 364 => null, - 365 => function ($stackPos) { - $this->semValue = 0; + 365 => static function ($self, $stackPos) { + $self->semValue = 0; }, - 366 => function ($stackPos) { - $this->semValue = 0; + 366 => static function ($self, $stackPos) { + $self->semValue = 0; }, 367 => null, 368 => null, - 369 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + 369 => static function ($self, $stackPos) { + $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 370 => function ($stackPos) { - $this->semValue = Modifiers::PUBLIC; + 370 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC; }, - 371 => function ($stackPos) { - $this->semValue = Modifiers::PROTECTED; + 371 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED; }, - 372 => function ($stackPos) { - $this->semValue = Modifiers::PRIVATE; + 372 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE; }, - 373 => function ($stackPos) { - $this->semValue = Modifiers::STATIC; + 373 => static function ($self, $stackPos) { + $self->semValue = Modifiers::STATIC; }, - 374 => function ($stackPos) { - $this->semValue = Modifiers::ABSTRACT; + 374 => static function ($self, $stackPos) { + $self->semValue = Modifiers::ABSTRACT; }, - 375 => function ($stackPos) { - $this->semValue = Modifiers::FINAL; + 375 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; }, - 376 => function ($stackPos) { - $this->semValue = Modifiers::READONLY; + 376 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; }, 377 => null, - 378 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 378 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 379 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 379 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 380 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 380 => static function ($self, $stackPos) { + $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 381 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 381 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 382 => function ($stackPos) { - $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 382 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 383 => null, 384 => null, - 385 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 385 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 386 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 386 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 387 => function ($stackPos) { - $this->semValue = array(); + 387 => static function ($self, $stackPos) { + $self->semValue = array(); }, 388 => null, 389 => null, - 390 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 390 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 391 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 391 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 392 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 392 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 393 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 393 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 394 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); - if (!$this->phpVersion->allowsAssignNewByReference()) { - $this->emitError(new Error('Cannot assign new by reference', $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]))); + 394 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + if (!$self->phpVersion->allowsAssignNewByReference()) { + $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, 395 => null, 396 => null, - 397 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 397 => static function ($self, $stackPos) { + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 398 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 399 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 400 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 400 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 401 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 401 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 402 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 402 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 403 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 403 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 404 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 404 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 405 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 405 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 406 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 406 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 407 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 407 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 408 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 408 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 409 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 409 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 410 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 410 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 411 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 411 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 412 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 412 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 413 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 413 => static function ($self, $stackPos) { + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 414 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 414 => static function ($self, $stackPos) { + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 415 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 416 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 417 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 418 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 419 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 420 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 421 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 422 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 422 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 423 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 423 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 424 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 424 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 425 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 426 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 427 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 428 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 429 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 430 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 431 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 432 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 432 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 433 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 433 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 434 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 434 => static function ($self, $stackPos) { + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 435 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 435 => static function ($self, $stackPos) { + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 436 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 436 => static function ($self, $stackPos) { + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 437 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 437 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 438 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 438 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 439 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 439 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 440 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 440 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 441 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 441 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 442 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 442 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 443 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 443 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 444 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 444 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 445 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 445 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 446 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 446 => static function ($self, $stackPos) { + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 447 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 447 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 448 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 448 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 449 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 449 => static function ($self, $stackPos) { + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 450 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 450 => static function ($self, $stackPos) { + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 451 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 451 => static function ($self, $stackPos) { + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 452 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 452 => static function ($self, $stackPos) { + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 453 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 453 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 454 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 454 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 455 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 455 => static function ($self, $stackPos) { + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 456 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 456 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 457 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 457 => static function ($self, $stackPos) { + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 458 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 458 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 459 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); + 459 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 460 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 460 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 461 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 461 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 462 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 462 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 463 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 463 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 464 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 464 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 465 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); + 465 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = strtolower($self->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $self->semValue = new Expr\Exit_($self->semStack[$stackPos-(2-2)], $attrs); }, - 466 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 466 => static function ($self, $stackPos) { + $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 467 => null, - 468 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 468 => static function ($self, $stackPos) { + $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 469 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 469 => static function ($self, $stackPos) { + $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 470 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 470 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 471 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 471 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 472 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 472 => static function ($self, $stackPos) { + $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 473 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 473 => static function ($self, $stackPos) { + $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 474 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 474 => static function ($self, $stackPos) { + $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 475 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + 475 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 476 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 476 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 477 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + 477 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 478 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 478 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 479 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 479 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 480 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); + 480 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 481 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + 481 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 482 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); + 482 => static function ($self, $stackPos) { + $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 483 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); + 483 => static function ($self, $stackPos) { + $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); + $self->checkClass($self->semValue[0], -1); }, - 484 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 484 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 485 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 485 => static function ($self, $stackPos) { + list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 486 => function ($stackPos) { - $this->semValue = array(); + 486 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 487 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + 487 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(4-3)]; }, 488 => null, - 489 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 489 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 490 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 490 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 491 => function ($stackPos) { - $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 491 => static function ($self, $stackPos) { + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 492 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 492 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 493 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 493 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 494 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 494 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 495 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 496 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 496 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 497 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 497 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 498 => null, - 499 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 499 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 500 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 500 => static function ($self, $stackPos) { + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 501 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 501 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 502 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 502 => static function ($self, $stackPos) { + $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 503 => null, 504 => null, - 505 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 505 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 506 => function ($stackPos) { - $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + 506 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, 507 => null, 508 => null, - 509 => function ($stackPos) { - $this->semValue = null; + 509 => static function ($self, $stackPos) { + $self->semValue = null; }, - 510 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 510 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 511 => function ($stackPos) { - $this->semValue = array(); + 511 => static function ($self, $stackPos) { + $self->semValue = array(); }, - 512 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); foreach ($this->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; + 512 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 513 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + 513 => static function ($self, $stackPos) { + foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 514 => function ($stackPos) { - $this->semValue = array(); + 514 => static function ($self, $stackPos) { + $self->semValue = array(); }, 515 => null, - 516 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 516 => static function ($self, $stackPos) { + $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 517 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 517 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 518 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 518 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 519 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 519 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 520 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 520 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 521 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 521 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 522 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 522 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 523 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 523 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 524 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 524 => static function ($self, $stackPos) { + $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 525 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 525 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 526 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + 526 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 527 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)])), $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + 527 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 528 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + 528 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; + $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 529 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - $this->createdArrays->attach($this->semValue); + 529 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; + $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); + $self->createdArrays->attach($self->semValue); }, - 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); + 530 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 531 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->supportsUnicodeEscapes()); + 531 => static function ($self, $stackPos) { + $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 532 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); + 532 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 533 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->allowsInvalidOctals()); + 533 => static function ($self, $stackPos) { + $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 534 => function ($stackPos) { - $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 534 => static function ($self, $stackPos) { + $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 535 => null, 536 => null, 537 => null, - 538 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); + 538 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 539 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-2)], $this->tokenEndStack[$stackPos-(2-2)]), true); + 539 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 540 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); + 540 => static function ($self, $stackPos) { + $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 541 => function ($stackPos) { - $this->semValue = null; + 541 => static function ($self, $stackPos) { + $self->semValue = null; }, 542 => null, 543 => null, - 544 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 544 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 545 => null, 546 => null, 547 => null, 548 => null, 549 => null, - 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 550 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 551 => null, 552 => null, - 553 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 553 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 554 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 554 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 555 => null, - 556 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 556 => static function ($self, $stackPos) { + $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 557 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 557 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 558 => function ($stackPos) { - $this->semValue = null; + 558 => static function ($self, $stackPos) { + $self->semValue = null; }, 559 => null, 560 => null, 561 => null, - 562 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 562 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 563 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 563 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 564 => null, - 565 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 565 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 566 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 566 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 567 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + 567 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 568 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])) : $var; + 568 => static function ($self, $stackPos) { + $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 569 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 569 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 570 => null, - 571 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 571 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 572 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 572 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 573 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 573 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 574 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 574 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 575 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 575 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 576 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 576 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 577 => null, - 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 578 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 579 => null, 580 => null, - 581 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 581 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 582 => null, - 583 => function ($stackPos) { - $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + 583 => static function ($self, $stackPos) { + $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 584 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); - $this->postprocessList($this->semValue); + 584 => static function ($self, $stackPos) { + $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $self->postprocessList($self->semValue); }, - 585 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); + 585 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, 586 => null, - 587 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + 587 => static function ($self, $stackPos) { + /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 588 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + 588 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 589 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 589 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 590 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 590 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 591 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 591 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 592 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 592 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 593 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 593 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 594 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 594 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 595 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 595 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 596 => function ($stackPos) { - $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), true); + 596 => static function ($self, $stackPos) { + $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 597 => function ($stackPos) { + 597 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ - $attrs = $this->createEmptyElemAttributes($this->tokenPos); - $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); + $attrs = $self->createEmptyElemAttributes($self->tokenPos); + $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 598 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 598 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 599 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + 599 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 600 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 600 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 601 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + 601 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 602 => function ($stackPos) { - $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); $attrs['rawValue'] = $this->semStack[$stackPos-(1-1)]; $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $attrs); + 602 => static function ($self, $stackPos) { + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 603 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 603 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 604 => null, - 605 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + 605 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 606 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 606 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 607 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 607 => static function ($self, $stackPos) { + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 608 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 608 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 609 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + 609 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 610 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + 610 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 611 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + 611 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 612 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 612 => static function ($self, $stackPos) { + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 613 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + 613 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 614 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + 614 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 615 => null, ]; diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index f0b1a50b13..42723313d6 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -318,7 +318,7 @@ protected function doParse(): ?array { try { $callback = $this->reduceCallbacks[$rule]; if ($callback !== null) { - $callback($stackPos); + $callback($this, $stackPos); } elseif ($ruleLength > 0) { $this->semValue = $this->semStack[$stackPos - $ruleLength + 1]; } From ec0261343206a4520826caef3eeb4d00a4661ddc Mon Sep 17 00:00:00 2001 From: Maarten Buis Date: Fri, 1 Mar 2024 23:37:53 +0100 Subject: [PATCH 335/428] Update `PhpVersion::getNewestSupported()` to PHP 8.3 --- lib/PhpParser/PhpVersion.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index a6fbb58e47..db85b1e54c 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -43,7 +43,7 @@ public static function fromComponents(int $major, int $minor): self { * if it is still under development. */ public static function getNewestSupported(): self { - return self::fromComponents(8, 2); + return self::fromComponents(8, 3); } /** From 70c96493b4caa5514b45429ec5fe6f412ea6cde6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 2 Mar 2024 18:59:44 +0100 Subject: [PATCH 336/428] Fix indentation detection after opening tag Fixes #982. --- lib/PhpParser/Internal/TokenStream.php | 6 +++++- test/code/formatPreservation/comments.test | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index 8fba13124d..c02844ac75 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -251,7 +251,7 @@ public function getTokenCode(int $from, int $to, int $indent): string { private function calcIndentMap(): array { $indentMap = []; $indent = 0; - foreach ($this->tokens as $token) { + foreach ($this->tokens as $i => $token) { $indentMap[] = $indent; if ($token->id === \T_WHITESPACE) { @@ -259,6 +259,10 @@ private function calcIndentMap(): array { $newlinePos = \strrpos($content, "\n"); if (false !== $newlinePos) { $indent = \strlen($content) - $newlinePos - 1; + } elseif ($i === 1 && $this->tokens[0]->id === \T_OPEN_TAG && + $this->tokens[0]->text[\strlen($this->tokens[0]->text) - 1] === "\n") { + // Special case: Newline at the end of opening tag followed by whitespace. + $indent = \strlen($content); } } } diff --git a/test/code/formatPreservation/comments.test b/test/code/formatPreservation/comments.test index 1b62ab391a..e57477cac9 100644 --- a/test/code/formatPreservation/comments.test +++ b/test/code/formatPreservation/comments.test @@ -50,3 +50,14 @@ class Test { // some code } } +----- +setDocComment(new Comment\Doc("/** foo */")); +----- + Date: Tue, 5 Mar 2024 21:51:40 +0100 Subject: [PATCH 337/428] Release PHP-Parser 5.0.2 --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8e002d74e..5a78be73f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +Version 5.0.2 (2024-03-05) +-------------------------- + +### Fixed + +* Fix handling of indentation on next line after opening PHP tag in formatting-preserving pretty +printer. + +### Changed + +* Avoid cyclic references in `Parser` objects. This means that no longer used parser objects are + immediately destroyed now, instead of requiring cycle GC. +* Update `PhpVersion::getNewestSupported()` to report PHP 8.3 instead of PHP 8.2. + Version 5.0.1 (2024-02-21) -------------------------- From 09691fc86e9e9bf2b936dcc9d1590a3061d223a7 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 13 Mar 2024 11:49:39 +0100 Subject: [PATCH 338/428] Prevent off-by-one errors in line-number related methods --- lib/PhpParser/Comment.php | 2 ++ lib/PhpParser/Error.php | 2 ++ lib/PhpParser/Node.php | 3 +++ lib/PhpParser/NodeAbstract.php | 3 +++ 4 files changed, 10 insertions(+) diff --git a/lib/PhpParser/Comment.php b/lib/PhpParser/Comment.php index 17dc4c73a9..01b341e438 100644 --- a/lib/PhpParser/Comment.php +++ b/lib/PhpParser/Comment.php @@ -46,6 +46,7 @@ public function getText(): string { * Gets the line number the comment started on. * * @return int Line number (or -1 if not available) + * @phpstan-return -1|positive-int */ public function getStartLine(): int { return $this->startLine; @@ -73,6 +74,7 @@ public function getStartTokenPos(): int { * Gets the line number the comment ends on. * * @return int Line number (or -1 if not available) + * @phpstan-return -1|positive-int */ public function getEndLine(): int { return $this->endLine; diff --git a/lib/PhpParser/Error.php b/lib/PhpParser/Error.php index 02feace0c7..f81f0c4202 100644 --- a/lib/PhpParser/Error.php +++ b/lib/PhpParser/Error.php @@ -32,6 +32,7 @@ public function getRawMessage(): string { * Gets the line the error starts in. * * @return int Error start line + * @phpstan-return -1|positive-int */ public function getStartLine(): int { return $this->attributes['startLine'] ?? -1; @@ -41,6 +42,7 @@ public function getStartLine(): int { * Gets the line the error ends in. * * @return int Error end line + * @phpstan-return -1|positive-int */ public function getEndLine(): int { return $this->attributes['endLine'] ?? -1; diff --git a/lib/PhpParser/Node.php b/lib/PhpParser/Node.php index 258e45160a..843e2ea66c 100644 --- a/lib/PhpParser/Node.php +++ b/lib/PhpParser/Node.php @@ -21,6 +21,7 @@ public function getSubNodeNames(): array; * Gets line the node started in (alias of getStartLine). * * @return int Start line (or -1 if not available) + * @phpstan-return -1|positive-int * * @deprecated Use getStartLine() instead */ @@ -32,6 +33,7 @@ public function getLine(): int; * Requires the 'startLine' attribute to be enabled in the lexer (enabled by default). * * @return int Start line (or -1 if not available) + * @phpstan-return -1|positive-int */ public function getStartLine(): int; @@ -41,6 +43,7 @@ public function getStartLine(): int; * Requires the 'endLine' attribute to be enabled in the lexer (enabled by default). * * @return int End line (or -1 if not available) + * @phpstan-return -1|positive-int */ public function getEndLine(): int; diff --git a/lib/PhpParser/NodeAbstract.php b/lib/PhpParser/NodeAbstract.php index 7c3a36075c..a6a50aea0f 100644 --- a/lib/PhpParser/NodeAbstract.php +++ b/lib/PhpParser/NodeAbstract.php @@ -19,6 +19,7 @@ public function __construct(array $attributes = []) { * Gets line the node started in (alias of getStartLine). * * @return int Start line (or -1 if not available) + * @phpstan-return -1|positive-int */ public function getLine(): int { return $this->attributes['startLine'] ?? -1; @@ -30,6 +31,7 @@ public function getLine(): int { * Requires the 'startLine' attribute to be enabled in the lexer (enabled by default). * * @return int Start line (or -1 if not available) + * @phpstan-return -1|positive-int */ public function getStartLine(): int { return $this->attributes['startLine'] ?? -1; @@ -41,6 +43,7 @@ public function getStartLine(): int { * Requires the 'endLine' attribute to be enabled in the lexer (enabled by default). * * @return int End line (or -1 if not available) + * @phpstan-return -1|positive-int */ public function getEndLine(): int { return $this->attributes['endLine'] ?? -1; From b43758e9e966a9abaf3ded09d918fe963a618f01 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Mar 2024 09:31:05 +0100 Subject: [PATCH 339/428] Remove PHPUnit 7 and 8 PHPUnit 9 supports all the PHP versions that we need. Also update the PHPUnit config schema. --- composer.json | 2 +- phpunit.xml.dist | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index b4b1bca744..b52f3ee57d 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "ext-ctype": "*" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^9.0", "ircmaxell/php-yacc": "^0.0.7" }, "extra": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5271264cbf..53bc091311 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -12,9 +12,9 @@ - - + + ./lib/PhpParser/ - - + + From f2e037f8ea4c4bac1a5a36b4d8334f2aa581491a Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sun, 17 Mar 2024 10:03:35 +0100 Subject: [PATCH 340/428] Make phpunit fail on deprecation warnings (#989) (cherry picked from commit 4d36e9c16f4820c2ed9360bc818982f3c02a08f5) --- .github/workflows/main.yml | 3 +++ phpunit.xml.dist | 1 + 2 files changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b7a3b22ec..fe456395b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,6 +46,7 @@ jobs: with: coverage: "none" php-version: "${{ matrix.php-version }}" + ini-file: "development" tools: composer:v2 - name: "Install dependencies" run: "composer update --no-progress --prefer-dist ${{ matrix.flags }}" @@ -62,6 +63,7 @@ jobs: with: coverage: "none" php-version: "8.2" + ini-file: "development" tools: composer:v2 - name: "Install PHP 8 dependencies" run: "composer update --no-progress --prefer-dist" @@ -78,6 +80,7 @@ jobs: with: coverage: "none" php-version: "7.4" + ini-file: "development" tools: composer:v2 - name: "Install PHP 8 dependencies" run: "composer update --no-progress --prefer-dist" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 53bc091311..daf6142cad 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -4,6 +4,7 @@ xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" backupGlobals="false" colors="true" + convertDeprecationsToExceptions="true" beStrictAboutTestsThatDoNotTestAnything="false" bootstrap="./test/bootstrap.php"> From 46be4560c4cd4bab2b74882c0da39a4548a5cfbe Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 17 Mar 2024 11:24:36 +0100 Subject: [PATCH 341/428] Use PHP 8.3 for more CI jobs --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe456395b2..dba8dbc1a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,7 +54,7 @@ jobs: run: "php vendor/bin/phpunit" test_old_73_80: runs-on: "ubuntu-latest" - name: "PHP 7.4 Code on PHP 8.2 Integration Tests" + name: "PHP 7.4 Code on PHP 8.3 Integration Tests" steps: - name: "Checkout" uses: "actions/checkout@v3" @@ -62,7 +62,7 @@ jobs: uses: "shivammathur/setup-php@v2" with: coverage: "none" - php-version: "8.2" + php-version: "8.3" ini-file: "development" tools: composer:v2 - name: "Install PHP 8 dependencies" @@ -96,7 +96,7 @@ jobs: uses: "shivammathur/setup-php@v2" with: coverage: "none" - php-version: "8.2" + php-version: "8.3" tools: composer:v2 - name: "Install dependencies" run: | @@ -113,7 +113,7 @@ jobs: uses: "shivammathur/setup-php@v2" with: coverage: "none" - php-version: "8.2" + php-version: "8.3" tools: composer:v2 - name: "Install dependencies" run: | From c5ee33df86c06b3278c670f64273b1ba768a0744 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 19 Apr 2024 14:04:10 +0200 Subject: [PATCH 342/428] Declare more precise phpdoc types (#993) --- .github/workflows/main.yml | 8 ++++---- lib/PhpParser/Node.php | 1 + lib/PhpParser/Node/Identifier.php | 12 +++++++++++- lib/PhpParser/Node/Name.php | 11 ++++++++++- test/PhpParser/Node/IdentifierTest.php | 5 +++++ 5 files changed, 31 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dba8dbc1a8..bf79544f54 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: - name: "Install dependencies" run: | composer require php-coveralls/php-coveralls:^2.2 --dev --no-update - composer update --no-progress --prefer-dist + COMPOSER_ROOT_VERSION=dev-master composer update --no-progress --prefer-dist - name: "Tests" run: "php vendor/bin/phpunit --coverage-clover build/logs/clover.xml" - name: Coveralls @@ -49,7 +49,7 @@ jobs: ini-file: "development" tools: composer:v2 - name: "Install dependencies" - run: "composer update --no-progress --prefer-dist ${{ matrix.flags }}" + run: "COMPOSER_ROOT_VERSION=dev-master composer update --no-progress --prefer-dist ${{ matrix.flags }}" - name: "PHPUnit" run: "php vendor/bin/phpunit" test_old_73_80: @@ -66,7 +66,7 @@ jobs: ini-file: "development" tools: composer:v2 - name: "Install PHP 8 dependencies" - run: "composer update --no-progress --prefer-dist" + run: "COMPOSER_ROOT_VERSION=dev-master composer update --no-progress --prefer-dist" - name: "Tests" run: "test_old/run-php-src.sh 7.4.33" test_old_80_70: @@ -83,7 +83,7 @@ jobs: ini-file: "development" tools: composer:v2 - name: "Install PHP 8 dependencies" - run: "composer update --no-progress --prefer-dist" + run: "COMPOSER_ROOT_VERSION=dev-master composer update --no-progress --prefer-dist" - name: "Tests" run: "test_old/run-php-src.sh 8.3.0RC2" phpstan: diff --git a/lib/PhpParser/Node.php b/lib/PhpParser/Node.php index 843e2ea66c..fd2a9b7247 100644 --- a/lib/PhpParser/Node.php +++ b/lib/PhpParser/Node.php @@ -6,6 +6,7 @@ interface Node { /** * Gets the type of the node. * + * @psalm-return non-empty-string * @return string Type of the node */ public function getType(): string; diff --git a/lib/PhpParser/Node/Identifier.php b/lib/PhpParser/Node/Identifier.php index 266166cbb6..01eebe5ca4 100644 --- a/lib/PhpParser/Node/Identifier.php +++ b/lib/PhpParser/Node/Identifier.php @@ -8,7 +8,10 @@ * Represents a non-namespaced name. Namespaced names are represented using Name nodes. */ class Identifier extends NodeAbstract { - /** @var string Identifier as string */ + /** + * @psalm-var non-empty-string + * @var string Identifier as string + */ public string $name; /** @var array */ @@ -25,6 +28,10 @@ class Identifier extends NodeAbstract { * @param array $attributes Additional attributes */ public function __construct(string $name, array $attributes = []) { + if ($name === '') { + throw new \InvalidArgumentException('Identifier name cannot be empty'); + } + $this->attributes = $attributes; $this->name = $name; } @@ -36,6 +43,7 @@ public function getSubNodeNames(): array { /** * Get identifier as string. * + * @psalm-return non-empty-string * @return string Identifier as string. */ public function toString(): string { @@ -45,6 +53,7 @@ public function toString(): string { /** * Get lowercased identifier as string. * + * @psalm-return non-empty-string * @return string Lowercased identifier as string */ public function toLowerString(): string { @@ -63,6 +72,7 @@ public function isSpecialClassName(): bool { /** * Get identifier as string. * + * @psalm-return non-empty-string * @return string Identifier as string */ public function __toString(): string { diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index 26b863e40b..aa2b90eb22 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -5,7 +5,10 @@ use PhpParser\NodeAbstract; class Name extends NodeAbstract { - /** @var string Name as string */ + /** + * @psalm-var non-empty-string + * @var string Name as string + */ public string $name; /** @var array */ @@ -33,6 +36,7 @@ public function getSubNodeNames(): array { /** * Get parts of name (split by the namespace separator). * + * @psalm-return non-empty-list * @return string[] Parts of name */ public function getParts(): array { @@ -103,6 +107,7 @@ public function isRelative(): bool { * Returns a string representation of the name itself, without taking the name type into * account (e.g., not including a leading backslash for fully qualified names). * + * @psalm-return non-empty-string * @return string String representation */ public function toString(): string { @@ -113,6 +118,7 @@ public function toString(): string { * Returns a string representation of the name as it would occur in code (e.g., including * leading backslash for fully qualified names. * + * @psalm-return non-empty-string * @return string String representation */ public function toCodeString(): string { @@ -123,6 +129,7 @@ public function toCodeString(): string { * Returns lowercased string representation of the name, without taking the name type into * account (e.g., no leading backslash for fully qualified names). * + * @psalm-return non-empty-string * @return string Lowercased string representation */ public function toLowerString(): string { @@ -142,6 +149,7 @@ public function isSpecialClassName(): bool { * Returns a string representation of the name by imploding the namespace parts with the * namespace separator. * + * @psalm-return non-empty-string * @return string String representation */ public function __toString(): string { @@ -237,6 +245,7 @@ public static function concat($name1, $name2, array $attributes = []) { * * @param string|string[]|self $name Name to prepare * + * @psalm-return non-empty-string * @return string Prepared name */ private static function prepareName($name): string { diff --git a/test/PhpParser/Node/IdentifierTest.php b/test/PhpParser/Node/IdentifierTest.php index 74e7de54ac..3b52806b9c 100644 --- a/test/PhpParser/Node/IdentifierTest.php +++ b/test/PhpParser/Node/IdentifierTest.php @@ -3,6 +3,11 @@ namespace PhpParser\Node; class IdentifierTest extends \PHPUnit\Framework\TestCase { + public function testConstructorThrows() { + self::expectException(\InvalidArgumentException::class); + new Identifier(''); + } + public function testToString() { $identifier = new Identifier('Foo'); From d327cf2acf22ad3d1fac5a382b7420bb6fd73bb8 Mon Sep 17 00:00:00 2001 From: Jorg Sowa Date: Tue, 21 May 2024 00:04:51 +0200 Subject: [PATCH 343/428] Updated actions/checkout to v4 --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bf79544f54..7a55358f33 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: name: "PHP 7.4 Unit Tests (with coverage)" steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: @@ -40,7 +40,7 @@ jobs: - "8.3" steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: @@ -57,7 +57,7 @@ jobs: name: "PHP 7.4 Code on PHP 8.3 Integration Tests" steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: @@ -74,7 +74,7 @@ jobs: name: "PHP 8.3 Code on PHP 7.4 Integration Tests" steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: @@ -91,7 +91,7 @@ jobs: name: "PHPStan" steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: @@ -108,7 +108,7 @@ jobs: name: "PHP-CS-Fixer" steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install PHP" uses: "shivammathur/setup-php@v2" with: From d57da64d7cf4ccf3711ed26b334307bbd4811e31 Mon Sep 17 00:00:00 2001 From: Jorg Adam Sowa Date: Fri, 31 May 2024 09:32:45 +0200 Subject: [PATCH 344/428] Add missing void return types (#997) --- test/PhpParser/Builder/ClassConstTest.php | 12 +++---- test/PhpParser/Builder/ClassTest.php | 22 ++++++------ test/PhpParser/Builder/EnumCaseTest.php | 6 ++-- test/PhpParser/Builder/EnumTest.php | 18 +++++----- test/PhpParser/Builder/FunctionTest.php | 18 +++++----- test/PhpParser/Builder/InterfaceTest.php | 18 +++++----- test/PhpParser/Builder/MethodTest.php | 20 +++++------ test/PhpParser/Builder/NamespaceTest.php | 2 +- test/PhpParser/Builder/ParamTest.php | 22 ++++++------ test/PhpParser/Builder/PropertyTest.php | 8 ++--- test/PhpParser/Builder/TraitTest.php | 10 +++--- .../Builder/TraitUseAdaptationTest.php | 16 ++++----- test/PhpParser/Builder/TraitUseTest.php | 6 ++-- test/PhpParser/Builder/UseTest.php | 2 +- test/PhpParser/BuilderFactoryTest.php | 36 +++++++++---------- test/PhpParser/BuilderHelpersTest.php | 32 ++++++++--------- test/PhpParser/CodeParsingTest.php | 6 ++-- test/PhpParser/CommentTest.php | 4 +-- test/PhpParser/CompatibilityTest.php | 4 +-- test/PhpParser/ConstExprEvaluatorTest.php | 8 ++--- .../PhpParser/ErrorHandler/CollectingTest.php | 2 +- test/PhpParser/ErrorHandler/ThrowingTest.php | 2 +- test/PhpParser/ErrorTest.php | 10 +++--- test/PhpParser/Internal/DifferTest.php | 6 ++-- test/PhpParser/JsonDecoderTest.php | 4 +-- test/PhpParser/Lexer/EmulativeTest.php | 20 +++++------ test/PhpParser/LexerTest.php | 8 ++--- test/PhpParser/NameContextTest.php | 2 +- test/PhpParser/Node/Expr/CallableLikeTest.php | 2 +- test/PhpParser/Node/IdentifierTest.php | 6 ++-- test/PhpParser/Node/NameTest.php | 30 ++++++++-------- test/PhpParser/Node/ParamTest.php | 4 +-- test/PhpParser/Node/Scalar/DNumberTest.php | 2 +- test/PhpParser/Node/Scalar/MagicConstTest.php | 2 +- test/PhpParser/Node/Scalar/NumberTest.php | 2 +- test/PhpParser/Node/Scalar/StringTest.php | 6 ++-- test/PhpParser/Node/Stmt/ClassConstTest.php | 4 +-- test/PhpParser/Node/Stmt/ClassMethodTest.php | 10 +++--- test/PhpParser/Node/Stmt/ClassTest.php | 16 ++++----- test/PhpParser/Node/Stmt/InterfaceTest.php | 4 +-- test/PhpParser/Node/Stmt/PropertyTest.php | 6 ++-- test/PhpParser/NodeAbstractTest.php | 12 +++---- test/PhpParser/NodeDumperTest.php | 6 ++-- test/PhpParser/NodeFinderTest.php | 8 ++--- test/PhpParser/NodeTraverserTest.php | 28 +++++++-------- .../NodeVisitor/FindingVisitorTest.php | 4 +-- .../NodeVisitor/FirstFindingVisitorTest.php | 4 +-- .../NodeVisitor/NameResolverTest.php | 20 +++++------ .../NodeVisitor/NodeConnectingVisitorTest.php | 2 +- .../ParentConnectingVisitorTest.php | 2 +- test/PhpParser/ParserFactoryTest.php | 2 +- test/PhpParser/ParserTest.php | 16 ++++----- test/PhpParser/PhpVersionTest.php | 6 ++-- test/PhpParser/PrettyPrinterTest.php | 26 +++++++------- test/PhpParser/TokenTest.php | 8 ++--- tools/fuzzing/target.php | 4 +-- 56 files changed, 283 insertions(+), 283 deletions(-) diff --git a/test/PhpParser/Builder/ClassConstTest.php b/test/PhpParser/Builder/ClassConstTest.php index 4a71e0fdd5..f0cccfd2c8 100644 --- a/test/PhpParser/Builder/ClassConstTest.php +++ b/test/PhpParser/Builder/ClassConstTest.php @@ -20,7 +20,7 @@ public function createClassConstBuilder($name, $value) { return new ClassConst($name, $value); } - public function testModifiers() { + public function testModifiers(): void { $node = $this->createClassConstBuilder("TEST", 1) ->makePrivate() ->getNode() @@ -82,7 +82,7 @@ public function testModifiers() { ); } - public function testDocComment() { + public function testDocComment(): void { $node = $this->createClassConstBuilder('TEST', 1) ->setDocComment('/** Test */') ->makePublic() @@ -102,7 +102,7 @@ public function testDocComment() { ); } - public function testAddConst() { + public function testAddConst(): void { $node = $this->createClassConstBuilder('FIRST_TEST', 1) ->addConst("SECOND_TEST", 2) ->getNode(); @@ -118,7 +118,7 @@ public function testAddConst() { ); } - public function testAddAttribute() { + public function testAddAttribute(): void { $attribute = new Attribute( new Name('Attr'), [new Arg(new Int_(1), false, false, [], new Identifier('name'))] @@ -142,7 +142,7 @@ public function testAddAttribute() { ); } - public function testType() { + public function testType(): void { $node = $this->createClassConstBuilder('TYPE', 1) ->setType('int') ->getNode(); @@ -157,7 +157,7 @@ public function testType() { /** * @dataProvider provideTestDefaultValues */ - public function testValues($value, $expectedValueNode) { + public function testValues($value, $expectedValueNode): void { $node = $this->createClassConstBuilder('TEST', $value) ->getNode() ; diff --git a/test/PhpParser/Builder/ClassTest.php b/test/PhpParser/Builder/ClassTest.php index 334a85382c..69866b7b79 100644 --- a/test/PhpParser/Builder/ClassTest.php +++ b/test/PhpParser/Builder/ClassTest.php @@ -18,7 +18,7 @@ protected function createClassBuilder($class) { return new Class_($class); } - public function testExtendsImplements() { + public function testExtendsImplements(): void { $node = $this->createClassBuilder('SomeLogger') ->extend('BaseLogger') ->implement('Namespaced\Logger', new Name('SomeInterface')) @@ -40,7 +40,7 @@ public function testExtendsImplements() { ); } - public function testAbstract() { + public function testAbstract(): void { $node = $this->createClassBuilder('Test') ->makeAbstract() ->getNode() @@ -54,7 +54,7 @@ public function testAbstract() { ); } - public function testFinal() { + public function testFinal(): void { $node = $this->createClassBuilder('Test') ->makeFinal() ->getNode() @@ -68,7 +68,7 @@ public function testFinal() { ); } - public function testReadonly() { + public function testReadonly(): void { $node = $this->createClassBuilder('Test') ->makeReadonly() ->getNode() @@ -82,7 +82,7 @@ public function testReadonly() { ); } - public function testStatementOrder() { + public function testStatementOrder(): void { $method = new Stmt\ClassMethod('testMethod'); $property = new Stmt\Property( Modifiers::PUBLIC, @@ -108,7 +108,7 @@ public function testStatementOrder() { ); } - public function testDocComment() { + public function testDocComment(): void { $docComment = <<<'DOC' /** * Test @@ -141,7 +141,7 @@ public function testDocComment() { ); } - public function testAddAttribute() { + public function testAddAttribute(): void { $attribute = new Attribute( new Name('Attr'), [new Arg(new Int_(1), false, false, [], new Identifier('name'))] @@ -162,7 +162,7 @@ public function testAddAttribute() { ); } - public function testInvalidStmtError() { + public function testInvalidStmtError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Unexpected node of type "Stmt_Echo"'); $this->createClassBuilder('Test') @@ -170,21 +170,21 @@ public function testInvalidStmtError() { ; } - public function testInvalidDocComment() { + public function testInvalidDocComment(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Doc comment must be a string or an instance of PhpParser\Comment\Doc'); $this->createClassBuilder('Test') ->setDocComment(new Comment('Test')); } - public function testEmptyName() { + public function testEmptyName(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Name cannot be empty'); $this->createClassBuilder('Test') ->extend(''); } - public function testInvalidName() { + public function testInvalidName(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Name must be a string or an instance of Node\Name'); $this->createClassBuilder('Test') diff --git a/test/PhpParser/Builder/EnumCaseTest.php b/test/PhpParser/Builder/EnumCaseTest.php index 66eb10c3dd..fb0ddfafab 100644 --- a/test/PhpParser/Builder/EnumCaseTest.php +++ b/test/PhpParser/Builder/EnumCaseTest.php @@ -17,7 +17,7 @@ public function createEnumCaseBuilder($name) { return new EnumCase($name); } - public function testDocComment() { + public function testDocComment(): void { $node = $this->createEnumCaseBuilder('TEST') ->setDocComment('/** Test */') ->getNode(); @@ -35,7 +35,7 @@ public function testDocComment() { ); } - public function testAddAttribute() { + public function testAddAttribute(): void { $attribute = new Attribute( new Name('Attr'), [new Arg(new Int_(1), false, false, [], new Identifier('name'))] @@ -59,7 +59,7 @@ public function testAddAttribute() { /** * @dataProvider provideTestDefaultValues */ - public function testValues($value, $expectedValueNode) { + public function testValues($value, $expectedValueNode): void { $node = $this->createEnumCaseBuilder('TEST') ->setValue($value) ->getNode() diff --git a/test/PhpParser/Builder/EnumTest.php b/test/PhpParser/Builder/EnumTest.php index c88a8d6069..f62392a26c 100644 --- a/test/PhpParser/Builder/EnumTest.php +++ b/test/PhpParser/Builder/EnumTest.php @@ -17,7 +17,7 @@ protected function createEnumBuilder($class) { return new Enum_($class); } - public function testImplements() { + public function testImplements(): void { $node = $this->createEnumBuilder('SomeEnum') ->implement('Namespaced\SomeInterface', new Name('OtherInterface')) ->getNode() @@ -34,7 +34,7 @@ public function testImplements() { ); } - public function testSetScalarType() { + public function testSetScalarType(): void { $node = $this->createEnumBuilder('Test') ->setScalarType('int') ->getNode() @@ -48,7 +48,7 @@ public function testSetScalarType() { ); } - public function testStatementOrder() { + public function testStatementOrder(): void { $method = new Stmt\ClassMethod('testMethod'); $enumCase = new Stmt\EnumCase( 'TEST_ENUM_CASE' @@ -73,7 +73,7 @@ public function testStatementOrder() { ); } - public function testDocComment() { + public function testDocComment(): void { $docComment = <<<'DOC' /** * Test @@ -106,7 +106,7 @@ public function testDocComment() { ); } - public function testAddAttribute() { + public function testAddAttribute(): void { $attribute = new Attribute( new Name('Attr'), [new Arg(new Int_(1), false, false, [], new Identifier('name'))] @@ -127,7 +127,7 @@ public function testAddAttribute() { ); } - public function testInvalidStmtError() { + public function testInvalidStmtError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Unexpected node of type "PropertyItem"'); $this->createEnumBuilder('Test') @@ -135,21 +135,21 @@ public function testInvalidStmtError() { ; } - public function testInvalidDocComment() { + public function testInvalidDocComment(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Doc comment must be a string or an instance of PhpParser\Comment\Doc'); $this->createEnumBuilder('Test') ->setDocComment(new Comment('Test')); } - public function testEmptyName() { + public function testEmptyName(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Name cannot be empty'); $this->createEnumBuilder('Test') ->implement(''); } - public function testInvalidName() { + public function testInvalidName(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Name must be a string or an instance of Node\Name'); $this->createEnumBuilder('Test') diff --git a/test/PhpParser/Builder/FunctionTest.php b/test/PhpParser/Builder/FunctionTest.php index 2fdecf7f6f..1b60112731 100644 --- a/test/PhpParser/Builder/FunctionTest.php +++ b/test/PhpParser/Builder/FunctionTest.php @@ -20,7 +20,7 @@ public function createFunctionBuilder($name) { return new Function_($name); } - public function testReturnByRef() { + public function testReturnByRef(): void { $node = $this->createFunctionBuilder('test') ->makeReturnByRef() ->getNode() @@ -34,7 +34,7 @@ public function testReturnByRef() { ); } - public function testParams() { + public function testParams(): void { $param1 = new Node\Param(new Variable('test1')); $param2 = new Node\Param(new Variable('test2')); $param3 = new Node\Param(new Variable('test3')); @@ -53,7 +53,7 @@ public function testParams() { ); } - public function testStmts() { + public function testStmts(): void { $stmt1 = new Print_(new String_('test1')); $stmt2 = new Print_(new String_('test2')); $stmt3 = new Print_(new String_('test3')); @@ -76,7 +76,7 @@ public function testStmts() { ); } - public function testDocComment() { + public function testDocComment(): void { $node = $this->createFunctionBuilder('test') ->setDocComment('/** Test */') ->getNode(); @@ -86,7 +86,7 @@ public function testDocComment() { ]), $node); } - public function testAddAttribute() { + public function testAddAttribute(): void { $attribute = new Attribute( new Name('Attr'), [new Arg(new Int_(1), false, false, [], new Identifier('name'))] @@ -102,7 +102,7 @@ public function testAddAttribute() { ], []), $node); } - public function testReturnType() { + public function testReturnType(): void { $node = $this->createFunctionBuilder('test') ->setReturnType('void') ->getNode(); @@ -112,13 +112,13 @@ public function testReturnType() { ], []), $node); } - public function testInvalidNullableVoidType() { + public function testInvalidNullableVoidType(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('void type cannot be nullable'); $this->createFunctionBuilder('test')->setReturnType('?void'); } - public function testInvalidParamError() { + public function testInvalidParamError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Expected parameter node, got "Name"'); $this->createFunctionBuilder('test') @@ -126,7 +126,7 @@ public function testInvalidParamError() { ; } - public function testAddNonStmt() { + public function testAddNonStmt(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Expected statement or expression node'); $this->createFunctionBuilder('test') diff --git a/test/PhpParser/Builder/InterfaceTest.php b/test/PhpParser/Builder/InterfaceTest.php index 71652f72c1..75f2ed7d27 100644 --- a/test/PhpParser/Builder/InterfaceTest.php +++ b/test/PhpParser/Builder/InterfaceTest.php @@ -23,13 +23,13 @@ private function dump($node) { return $pp->prettyPrint([$node]); } - public function testEmpty() { + public function testEmpty(): void { $contract = $this->createInterfaceBuilder()->getNode(); $this->assertInstanceOf(Stmt\Interface_::class, $contract); $this->assertEquals(new Node\Identifier('Contract'), $contract->name); } - public function testExtending() { + public function testExtending(): void { $contract = $this->createInterfaceBuilder() ->extend('Space\Root1', 'Root2')->getNode(); $this->assertEquals( @@ -42,13 +42,13 @@ public function testExtending() { ); } - public function testAddMethod() { + public function testAddMethod(): void { $method = new Stmt\ClassMethod('doSomething'); $contract = $this->createInterfaceBuilder()->addStmt($method)->getNode(); $this->assertSame([$method], $contract->stmts); } - public function testAddConst() { + public function testAddConst(): void { $const = new Stmt\ClassConst([ new Node\Const_('SPEED_OF_LIGHT', new Float_(299792458.0)) ]); @@ -56,7 +56,7 @@ public function testAddConst() { $this->assertSame(299792458.0, $contract->stmts[0]->consts[0]->value->value); } - public function testOrder() { + public function testOrder(): void { $const = new Stmt\ClassConst([ new Node\Const_('SPEED_OF_LIGHT', new Float_(299792458)) ]); @@ -71,7 +71,7 @@ public function testOrder() { $this->assertInstanceOf(Stmt\ClassMethod::class, $contract->stmts[1]); } - public function testDocComment() { + public function testDocComment(): void { $node = $this->createInterfaceBuilder() ->setDocComment('/** Test */') ->getNode(); @@ -81,7 +81,7 @@ public function testDocComment() { ]), $node); } - public function testAddAttribute() { + public function testAddAttribute(): void { $attribute = new Attribute( new Name('Attr'), [new Arg(new Int_(1), false, false, [], new Identifier('name'))] @@ -97,13 +97,13 @@ public function testAddAttribute() { ], []), $node); } - public function testInvalidStmtError() { + public function testInvalidStmtError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Unexpected node of type "PropertyItem"'); $this->createInterfaceBuilder()->addStmt(new Node\PropertyItem('invalid')); } - public function testFullFunctional() { + public function testFullFunctional(): void { $const = new Stmt\ClassConst([ new Node\Const_('SPEED_OF_LIGHT', new Float_(299792458)) ]); diff --git a/test/PhpParser/Builder/MethodTest.php b/test/PhpParser/Builder/MethodTest.php index 807072d735..a5ff8f7c80 100644 --- a/test/PhpParser/Builder/MethodTest.php +++ b/test/PhpParser/Builder/MethodTest.php @@ -21,7 +21,7 @@ public function createMethodBuilder($name) { return new Method($name); } - public function testModifiers() { + public function testModifiers(): void { $node = $this->createMethodBuilder('test') ->makePublic() ->makeAbstract() @@ -63,7 +63,7 @@ public function testModifiers() { ); } - public function testReturnByRef() { + public function testReturnByRef(): void { $node = $this->createMethodBuilder('test') ->makeReturnByRef() ->getNode() @@ -77,7 +77,7 @@ public function testReturnByRef() { ); } - public function testParams() { + public function testParams(): void { $param1 = new Node\Param(new Variable('test1')); $param2 = new Node\Param(new Variable('test2')); $param3 = new Node\Param(new Variable('test3')); @@ -96,7 +96,7 @@ public function testParams() { ); } - public function testStmts() { + public function testStmts(): void { $stmt1 = new Print_(new String_('test1')); $stmt2 = new Print_(new String_('test2')); $stmt3 = new Print_(new String_('test3')); @@ -118,7 +118,7 @@ public function testStmts() { $node ); } - public function testDocComment() { + public function testDocComment(): void { $node = $this->createMethodBuilder('test') ->setDocComment('/** Test */') ->getNode(); @@ -128,7 +128,7 @@ public function testDocComment() { ]), $node); } - public function testAddAttribute() { + public function testAddAttribute(): void { $attribute = new Attribute( new Name('Attr'), [new Arg(new Int_(1), false, false, [], new Identifier('name'))] @@ -144,7 +144,7 @@ public function testAddAttribute() { ], []), $node); } - public function testReturnType() { + public function testReturnType(): void { $node = $this->createMethodBuilder('test') ->setReturnType('bool') ->getNode(); @@ -153,7 +153,7 @@ public function testReturnType() { ], []), $node); } - public function testAddStmtToAbstractMethodError() { + public function testAddStmtToAbstractMethodError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Cannot add statements to an abstract method'); $this->createMethodBuilder('test') @@ -162,7 +162,7 @@ public function testAddStmtToAbstractMethodError() { ; } - public function testMakeMethodWithStmtsAbstractError() { + public function testMakeMethodWithStmtsAbstractError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Cannot make method with statements abstract'); $this->createMethodBuilder('test') @@ -171,7 +171,7 @@ public function testMakeMethodWithStmtsAbstractError() { ; } - public function testInvalidParamError() { + public function testInvalidParamError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Expected parameter node, got "Name"'); $this->createMethodBuilder('test') diff --git a/test/PhpParser/Builder/NamespaceTest.php b/test/PhpParser/Builder/NamespaceTest.php index 10a3870a83..2cce107f47 100644 --- a/test/PhpParser/Builder/NamespaceTest.php +++ b/test/PhpParser/Builder/NamespaceTest.php @@ -11,7 +11,7 @@ protected function createNamespaceBuilder($fqn) { return new Namespace_($fqn); } - public function testCreation() { + public function testCreation(): void { $stmt1 = new Stmt\Class_('SomeClass'); $stmt2 = new Stmt\Interface_('SomeInterface'); $stmt3 = new Stmt\Function_('someFunction'); diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index 58a6c04287..f1ac65bb8a 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -21,7 +21,7 @@ public function createParamBuilder($name) { /** * @dataProvider provideTestDefaultValues */ - public function testDefaultValues($value, $expectedValueNode) { + public function testDefaultValues($value, $expectedValueNode): void { $node = $this->createParamBuilder('test') ->setDefault($value) ->getNode() @@ -89,7 +89,7 @@ public function provideTestDefaultValues() { * @dataProvider provideTestNullableTypes * @dataProvider provideTestUnionTypes */ - public function testTypes($typeHint, $expectedType) { + public function testTypes($typeHint, $expectedType): void { $node = $this->createParamBuilder('test') ->setType($typeHint) ->getNode() @@ -169,19 +169,19 @@ public function provideTestUnionTypes() { ]; } - public function testVoidTypeError() { + public function testVoidTypeError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Parameter type cannot be void'); $this->createParamBuilder('test')->setType('void'); } - public function testInvalidTypeError() { + public function testInvalidTypeError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Type must be a string, or an instance of Name, Identifier or ComplexType'); $this->createParamBuilder('test')->setType(new \stdClass()); } - public function testByRef() { + public function testByRef(): void { $node = $this->createParamBuilder('test') ->makeByRef() ->getNode() @@ -193,7 +193,7 @@ public function testByRef() { ); } - public function testVariadic() { + public function testVariadic(): void { $node = $this->createParamBuilder('test') ->makeVariadic() ->getNode() @@ -205,7 +205,7 @@ public function testVariadic() { ); } - public function testMakePublic() { + public function testMakePublic(): void { $node = $this->createParamBuilder('test') ->makePublic() ->getNode() @@ -217,7 +217,7 @@ public function testMakePublic() { ); } - public function testMakeProtected() { + public function testMakeProtected(): void { $node = $this->createParamBuilder('test') ->makeProtected() ->getNode() @@ -229,7 +229,7 @@ public function testMakeProtected() { ); } - public function testMakePrivate() { + public function testMakePrivate(): void { $node = $this->createParamBuilder('test') ->makePrivate() ->getNode() @@ -241,7 +241,7 @@ public function testMakePrivate() { ); } - public function testMakeReadonly() { + public function testMakeReadonly(): void { $node = $this->createParamBuilder('test') ->makeReadonly() ->getNode() @@ -253,7 +253,7 @@ public function testMakeReadonly() { ); } - public function testAddAttribute() { + public function testAddAttribute(): void { $attribute = new Attribute( new Name('Attr'), [new Arg(new Int_(1), false, false, [], new Identifier('name'))] diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index 50fff0a8ac..b2983141cf 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -19,7 +19,7 @@ public function createPropertyBuilder($name) { return new Property($name); } - public function testModifiers() { + public function testModifiers(): void { $node = $this->createPropertyBuilder('test') ->makePrivate() ->makeStatic() @@ -82,7 +82,7 @@ public function testModifiers() { ); } - public function testDocComment() { + public function testDocComment(): void { $node = $this->createPropertyBuilder('test') ->setDocComment('/** Test */') ->getNode(); @@ -101,7 +101,7 @@ public function testDocComment() { /** * @dataProvider provideTestDefaultValues */ - public function testDefaultValues($value, $expectedValueNode) { + public function testDefaultValues($value, $expectedValueNode): void { $node = $this->createPropertyBuilder('test') ->setDefault($value) ->getNode() @@ -110,7 +110,7 @@ public function testDefaultValues($value, $expectedValueNode) { $this->assertEquals($expectedValueNode, $node->props[0]->default); } - public function testAddAttribute() { + public function testAddAttribute(): void { $attribute = new Attribute( new Name('Attr'), [new Arg(new Int_(1), false, false, [], new Identifier('name'))] diff --git a/test/PhpParser/Builder/TraitTest.php b/test/PhpParser/Builder/TraitTest.php index 850f198bbe..ddb9f9d631 100644 --- a/test/PhpParser/Builder/TraitTest.php +++ b/test/PhpParser/Builder/TraitTest.php @@ -23,7 +23,7 @@ protected function createTraitBuilder($class) { return new Trait_($class); } - public function testStmtAddition() { + public function testStmtAddition(): void { $method1 = new Stmt\ClassMethod('test1'); $method2 = new Stmt\ClassMethod('test2'); $method3 = new Stmt\ClassMethod('test3'); @@ -49,7 +49,7 @@ public function testStmtAddition() { ]), $trait); } - public function testInvalidStmtError() { + public function testInvalidStmtError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Unexpected node of type "Stmt_Echo"'); $this->createTraitBuilder('Test') @@ -57,7 +57,7 @@ public function testInvalidStmtError() { ; } - public function testGetMethods() { + public function testGetMethods(): void { $methods = [ new ClassMethod('foo'), new ClassMethod('bar'), @@ -77,7 +77,7 @@ public function testGetMethods() { $this->assertSame($methods, $trait->getMethods()); } - public function testGetProperties() { + public function testGetProperties(): void { $properties = [ new Property(Modifiers::PUBLIC, [new PropertyItem('foo')]), new Property(Modifiers::PUBLIC, [new PropertyItem('bar')]), @@ -95,7 +95,7 @@ public function testGetProperties() { $this->assertSame($properties, $trait->getProperties()); } - public function testAddAttribute() { + public function testAddAttribute(): void { $attribute = new Attribute( new Name('Attr'), [new Arg(new Int_(1), false, false, [], new Identifier('name'))] diff --git a/test/PhpParser/Builder/TraitUseAdaptationTest.php b/test/PhpParser/Builder/TraitUseAdaptationTest.php index d08850bd1f..56ab75f185 100644 --- a/test/PhpParser/Builder/TraitUseAdaptationTest.php +++ b/test/PhpParser/Builder/TraitUseAdaptationTest.php @@ -12,7 +12,7 @@ protected function createTraitUseAdaptationBuilder($trait, $method) { return new TraitUseAdaptation($trait, $method); } - public function testAsMake() { + public function testAsMake(): void { $builder = $this->createTraitUseAdaptationBuilder(null, 'foo'); $this->assertEquals( @@ -36,7 +36,7 @@ public function testAsMake() { ); } - public function testInsteadof() { + public function testInsteadof(): void { $node = $this->createTraitUseAdaptationBuilder('SomeTrait', 'foo') ->insteadof('AnotherTrait') ->getNode() @@ -52,7 +52,7 @@ public function testInsteadof() { ); } - public function testAsOnNotAlias() { + public function testAsOnNotAlias(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Cannot set alias for not alias adaptation buider'); $this->createTraitUseAdaptationBuilder('Test', 'foo') @@ -61,7 +61,7 @@ public function testAsOnNotAlias() { ; } - public function testInsteadofOnNotPrecedence() { + public function testInsteadofOnNotPrecedence(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Cannot add overwritten traits for not precedence adaptation buider'); $this->createTraitUseAdaptationBuilder('Test', 'foo') @@ -70,7 +70,7 @@ public function testInsteadofOnNotPrecedence() { ; } - public function testInsteadofWithoutTrait() { + public function testInsteadofWithoutTrait(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Precedence adaptation must have trait'); $this->createTraitUseAdaptationBuilder(null, 'foo') @@ -78,7 +78,7 @@ public function testInsteadofWithoutTrait() { ; } - public function testMakeOnNotAlias() { + public function testMakeOnNotAlias(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Cannot set access modifier for not alias adaptation buider'); $this->createTraitUseAdaptationBuilder('Test', 'foo') @@ -87,7 +87,7 @@ public function testMakeOnNotAlias() { ; } - public function testMultipleMake() { + public function testMultipleMake(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Multiple access type modifiers are not allowed'); $this->createTraitUseAdaptationBuilder(null, 'foo') @@ -96,7 +96,7 @@ public function testMultipleMake() { ; } - public function testUndefinedType() { + public function testUndefinedType(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Type of adaptation is not defined'); $this->createTraitUseAdaptationBuilder(null, 'foo') diff --git a/test/PhpParser/Builder/TraitUseTest.php b/test/PhpParser/Builder/TraitUseTest.php index b7bb527302..8101b777cb 100644 --- a/test/PhpParser/Builder/TraitUseTest.php +++ b/test/PhpParser/Builder/TraitUseTest.php @@ -10,7 +10,7 @@ protected function createTraitUseBuilder(...$traits) { return new TraitUse(...$traits); } - public function testAnd() { + public function testAnd(): void { $node = $this->createTraitUseBuilder('SomeTrait') ->and('AnotherTrait') ->getNode() @@ -25,7 +25,7 @@ public function testAnd() { ); } - public function testWith() { + public function testWith(): void { $node = $this->createTraitUseBuilder('SomeTrait') ->with(new Stmt\TraitUseAdaptation\Alias(null, 'foo', null, 'bar')) ->with((new TraitUseAdaptation(null, 'test'))->as('baz')) @@ -41,7 +41,7 @@ public function testWith() { ); } - public function testInvalidAdaptationNode() { + public function testInvalidAdaptationNode(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Adaptation must have type TraitUseAdaptation'); $this->createTraitUseBuilder('Test') diff --git a/test/PhpParser/Builder/UseTest.php b/test/PhpParser/Builder/UseTest.php index 2952d44099..5e5601589b 100644 --- a/test/PhpParser/Builder/UseTest.php +++ b/test/PhpParser/Builder/UseTest.php @@ -11,7 +11,7 @@ protected function createUseBuilder($name, $type = Stmt\Use_::TYPE_NORMAL) { return new Builder\Use_($name, $type); } - public function testCreation() { + public function testCreation(): void { $node = $this->createUseBuilder('Foo\Bar')->getNode(); $this->assertEquals(new Stmt\Use_([ new \PhpParser\Node\UseItem(new Name('Foo\Bar'), null) diff --git a/test/PhpParser/BuilderFactoryTest.php b/test/PhpParser/BuilderFactoryTest.php index a86e17e14f..8c08cc205e 100644 --- a/test/PhpParser/BuilderFactoryTest.php +++ b/test/PhpParser/BuilderFactoryTest.php @@ -15,7 +15,7 @@ class BuilderFactoryTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideTestFactory */ - public function testFactory($methodName, $className) { + public function testFactory($methodName, $className): void { $factory = new BuilderFactory(); $this->assertInstanceOf($className, $factory->$methodName('test')); } @@ -38,12 +38,12 @@ public function provideTestFactory() { ]; } - public function testFactoryClassConst() { + public function testFactoryClassConst(): void { $factory = new BuilderFactory(); $this->assertInstanceOf(Builder\ClassConst::class, $factory->classConst('TEST', 1)); } - public function testAttribute() { + public function testAttribute(): void { $factory = new BuilderFactory(); $this->assertEquals( new Attribute(new Name('AttributeName'), [new Arg( @@ -53,7 +53,7 @@ public function testAttribute() { ); } - public function testVal() { + public function testVal(): void { // This method is a wrapper around BuilderHelpers::normalizeValue(), // which is already tested elsewhere $factory = new BuilderFactory(); @@ -63,7 +63,7 @@ public function testVal() { ); } - public function testConcat() { + public function testConcat(): void { $factory = new BuilderFactory(); $varA = new Expr\Variable('a'); $varB = new Expr\Variable('b'); @@ -83,19 +83,19 @@ public function testConcat() { ); } - public function testConcatOneError() { + public function testConcatOneError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Expected at least two expressions'); (new BuilderFactory())->concat("a"); } - public function testConcatInvalidExpr() { + public function testConcatInvalidExpr(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Expected string or Expr'); (new BuilderFactory())->concat("a", 42); } - public function testArgs() { + public function testArgs(): void { $factory = new BuilderFactory(); $unpack = new Arg(new Expr\Variable('c'), false, true); $this->assertEquals( @@ -108,7 +108,7 @@ public function testArgs() { ); } - public function testNamedArgs() { + public function testNamedArgs(): void { $factory = new BuilderFactory(); $this->assertEquals( [ @@ -119,7 +119,7 @@ public function testNamedArgs() { ); } - public function testCalls() { + public function testCalls(): void { $factory = new BuilderFactory(); // Simple function call @@ -195,7 +195,7 @@ public function testCalls() { ); } - public function testConstFetches() { + public function testConstFetches(): void { $factory = new BuilderFactory(); $this->assertEquals( new Expr\ConstFetch(new Name('FOO')), @@ -215,7 +215,7 @@ public function testConstFetches() { ); } - public function testVar() { + public function testVar(): void { $factory = new BuilderFactory(); $this->assertEquals( new Expr\Variable("foo"), @@ -227,7 +227,7 @@ public function testVar() { ); } - public function testPropertyFetch() { + public function testPropertyFetch(): void { $f = new BuilderFactory(); $this->assertEquals( new Expr\PropertyFetch(new Expr\Variable('foo'), 'bar'), @@ -243,31 +243,31 @@ public function testPropertyFetch() { ); } - public function testInvalidIdentifier() { + public function testInvalidIdentifier(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Expected string or instance of Node\Identifier'); (new BuilderFactory())->classConstFetch('Foo', new Name('foo')); } - public function testInvalidIdentifierOrExpr() { + public function testInvalidIdentifierOrExpr(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Expected string or instance of Node\Identifier or Node\Expr'); (new BuilderFactory())->staticCall('Foo', new Name('bar')); } - public function testInvalidNameOrExpr() { + public function testInvalidNameOrExpr(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Name must be a string or an instance of Node\Name or Node\Expr'); (new BuilderFactory())->funcCall(new Node\Stmt\Return_()); } - public function testInvalidVar() { + public function testInvalidVar(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Variable name must be string or Expr'); (new BuilderFactory())->var(new Node\Stmt\Return_()); } - public function testIntegration() { + public function testIntegration(): void { $factory = new BuilderFactory(); $node = $factory->namespace('Name\Space') ->addStmt($factory->use('Foo\Bar\SomeOtherClass')) diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index d70be9d8ce..0e89e47fbb 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -9,7 +9,7 @@ use PhpParser\Node\Expr; class BuilderHelpersTest extends \PHPUnit\Framework\TestCase { - public function testNormalizeNode() { + public function testNormalizeNode(): void { $builder = new Class_('SomeClass'); $this->assertEquals($builder->getNode(), BuilderHelpers::normalizeNode($builder)); @@ -21,7 +21,7 @@ public function testNormalizeNode() { BuilderHelpers::normalizeNode('test'); } - public function testNormalizeStmt() { + public function testNormalizeStmt(): void { $stmt = new Node\Stmt\Class_('Class'); $this->assertSame($stmt, BuilderHelpers::normalizeStmt($stmt)); @@ -35,13 +35,13 @@ public function testNormalizeStmt() { BuilderHelpers::normalizeStmt(new Node\Attribute(new Node\Name('Test'))); } - public function testNormalizeStmtInvalidType() { + public function testNormalizeStmtInvalidType(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Expected node or builder object'); BuilderHelpers::normalizeStmt('test'); } - public function testNormalizeIdentifier() { + public function testNormalizeIdentifier(): void { $identifier = new Node\Identifier('fn'); $this->assertSame($identifier, BuilderHelpers::normalizeIdentifier($identifier)); $this->assertEquals($identifier, BuilderHelpers::normalizeIdentifier('fn')); @@ -51,7 +51,7 @@ public function testNormalizeIdentifier() { BuilderHelpers::normalizeIdentifier(1); } - public function testNormalizeIdentifierOrExpr() { + public function testNormalizeIdentifierOrExpr(): void { $identifier = new Node\Identifier('fn'); $this->assertSame($identifier, BuilderHelpers::normalizeIdentifierOrExpr($identifier)); @@ -64,7 +64,7 @@ public function testNormalizeIdentifierOrExpr() { BuilderHelpers::normalizeIdentifierOrExpr(1); } - public function testNormalizeName() { + public function testNormalizeName(): void { $name = new Node\Name('test'); $this->assertSame($name, BuilderHelpers::normalizeName($name)); $this->assertEquals( @@ -82,13 +82,13 @@ public function testNormalizeName() { BuilderHelpers::normalizeName(''); } - public function testNormalizeNameInvalidType() { + public function testNormalizeNameInvalidType(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Name must be a string or an instance of Node\Name'); BuilderHelpers::normalizeName(1); } - public function testNormalizeNameOrExpr() { + public function testNormalizeNameOrExpr(): void { $expr = new Expr\Variable('fn'); $this->assertSame($expr, BuilderHelpers::normalizeNameOrExpr($expr)); @@ -109,13 +109,13 @@ public function testNormalizeNameOrExpr() { BuilderHelpers::normalizeNameOrExpr(''); } - public function testNormalizeNameOrExpInvalidType() { + public function testNormalizeNameOrExpInvalidType(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Name must be a string or an instance of Node\Name or Node\Expr'); BuilderHelpers::normalizeNameOrExpr(1); } - public function testNormalizeType() { + public function testNormalizeType(): void { $this->assertEquals(new Node\Identifier('array'), BuilderHelpers::normalizeType('array')); $this->assertEquals(new Node\Identifier('callable'), BuilderHelpers::normalizeType('callable')); $this->assertEquals(new Node\Identifier('string'), BuilderHelpers::normalizeType('string')); @@ -156,25 +156,25 @@ public function testNormalizeType() { BuilderHelpers::normalizeType(1); } - public function testNormalizeTypeNullableVoid() { + public function testNormalizeTypeNullableVoid(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('void type cannot be nullable'); BuilderHelpers::normalizeType('?void'); } - public function testNormalizeTypeNullableMixed() { + public function testNormalizeTypeNullableMixed(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('mixed type cannot be nullable'); BuilderHelpers::normalizeType('?mixed'); } - public function testNormalizeTypeNullableNever() { + public function testNormalizeTypeNullableNever(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('never type cannot be nullable'); BuilderHelpers::normalizeType('?never'); } - public function testNormalizeValue() { + public function testNormalizeValue(): void { $expression = new Scalar\Int_(1); $this->assertSame($expression, BuilderHelpers::normalizeValue($expression)); @@ -200,7 +200,7 @@ public function testNormalizeValue() { BuilderHelpers::normalizeValue(new \stdClass()); } - public function testNormalizeDocComment() { + public function testNormalizeDocComment(): void { $docComment = new Comment\Doc('Some doc comment'); $this->assertSame($docComment, BuilderHelpers::normalizeDocComment($docComment)); @@ -211,7 +211,7 @@ public function testNormalizeDocComment() { BuilderHelpers::normalizeDocComment(1); } - public function testNormalizeAttribute() { + public function testNormalizeAttribute(): void { $attribute = new Node\Attribute(new Node\Name('Test')); $attributeGroup = new Node\AttributeGroup([$attribute]); diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php index d4da650a26..b843e2860a 100644 --- a/test/PhpParser/CodeParsingTest.php +++ b/test/PhpParser/CodeParsingTest.php @@ -9,7 +9,7 @@ class CodeParsingTest extends CodeTestAbstract { /** * @dataProvider provideTestParse */ - public function testParse($name, $code, $expected, $modeLine) { + public function testParse($name, $code, $expected, $modeLine): void { $modes = $this->parseModeLine($modeLine); $parser = $this->createParser($modes['version'] ?? null); list($stmts, $output) = $this->getParseOutput($parser, $code, $modes); @@ -62,13 +62,13 @@ private function formatErrorMessage(Error $e, $code) { return $e->getMessage(); } - private function checkAttributes($stmts) { + private function checkAttributes($stmts): void { if ($stmts === null) { return; } $traverser = new NodeTraverser(new class () extends NodeVisitorAbstract { - public function enterNode(Node $node) { + public function enterNode(Node $node): void { $startLine = $node->getStartLine(); $endLine = $node->getEndLine(); $startFilePos = $node->getStartFilePos(); diff --git a/test/PhpParser/CommentTest.php b/test/PhpParser/CommentTest.php index c97308d9f1..255eccb801 100644 --- a/test/PhpParser/CommentTest.php +++ b/test/PhpParser/CommentTest.php @@ -3,7 +3,7 @@ namespace PhpParser; class CommentTest extends \PHPUnit\Framework\TestCase { - public function testGetters() { + public function testGetters(): void { $comment = new Comment('/* Some comment */', 1, 10, 2, 1, 27, 2); @@ -20,7 +20,7 @@ public function testGetters() { /** * @dataProvider provideTestReformatting */ - public function testReformatting($commentText, $reformattedText) { + public function testReformatting($commentText, $reformattedText): void { $comment = new Comment($commentText); $this->assertSame($reformattedText, $comment->getReformattedText()); } diff --git a/test/PhpParser/CompatibilityTest.php b/test/PhpParser/CompatibilityTest.php index 71f1f236b8..9928e8d85f 100644 --- a/test/PhpParser/CompatibilityTest.php +++ b/test/PhpParser/CompatibilityTest.php @@ -13,7 +13,7 @@ class CompatibilityTest extends \PHPUnit\Framework\TestCase { * @runInSeparateProcess * @preserveGlobalState disabled */ - public function testAliases1() { + public function testAliases1(): void { $var = new Expr\Variable('x'); $node = new Node\ClosureUse($var); $this->assertTrue($node instanceof Expr\ClosureUse); @@ -41,7 +41,7 @@ public function testAliases1() { * @runInSeparateProcess * @preserveGlobalState disabled */ - public function testAliases2() { + public function testAliases2(): void { $var = new Expr\Variable('x'); $node = new Node\Expr\ClosureUse($var); $this->assertTrue($node instanceof Node\ClosureUse); diff --git a/test/PhpParser/ConstExprEvaluatorTest.php b/test/PhpParser/ConstExprEvaluatorTest.php index 9d78af88a9..0f5ac79420 100644 --- a/test/PhpParser/ConstExprEvaluatorTest.php +++ b/test/PhpParser/ConstExprEvaluatorTest.php @@ -7,7 +7,7 @@ class ConstExprEvaluatorTest extends \PHPUnit\Framework\TestCase { /** @dataProvider provideTestEvaluate */ - public function testEvaluate($exprString, $expected) { + public function testEvaluate($exprString, $expected): void { $parser = new Parser\Php7(new Lexer()); $expr = $parser->parse('expr; $evaluator = new ConstExprEvaluator(); @@ -74,14 +74,14 @@ public function provideTestEvaluate() { ]; } - public function testEvaluateFails() { + public function testEvaluateFails(): void { $this->expectException(ConstExprEvaluationException::class); $this->expectExceptionMessage('Expression of type Expr_Variable cannot be evaluated'); $evaluator = new ConstExprEvaluator(); $evaluator->evaluateDirectly(new Expr\Variable('a')); } - public function testEvaluateFallback() { + public function testEvaluateFallback(): void { $evaluator = new ConstExprEvaluator(function (Expr $expr) { if ($expr instanceof Scalar\MagicConst\Line) { return 42; @@ -98,7 +98,7 @@ public function testEvaluateFallback() { /** * @dataProvider provideTestEvaluateSilently */ - public function testEvaluateSilently($expr, $exception, $msg) { + public function testEvaluateSilently($expr, $exception, $msg): void { $evaluator = new ConstExprEvaluator(); try { diff --git a/test/PhpParser/ErrorHandler/CollectingTest.php b/test/PhpParser/ErrorHandler/CollectingTest.php index 83b1cbd0ac..631b0b0ba4 100644 --- a/test/PhpParser/ErrorHandler/CollectingTest.php +++ b/test/PhpParser/ErrorHandler/CollectingTest.php @@ -5,7 +5,7 @@ use PhpParser\Error; class CollectingTest extends \PHPUnit\Framework\TestCase { - public function testHandleError() { + public function testHandleError(): void { $errorHandler = new Collecting(); $this->assertFalse($errorHandler->hasErrors()); $this->assertEmpty($errorHandler->getErrors()); diff --git a/test/PhpParser/ErrorHandler/ThrowingTest.php b/test/PhpParser/ErrorHandler/ThrowingTest.php index 61efd7bcfd..8442600a63 100644 --- a/test/PhpParser/ErrorHandler/ThrowingTest.php +++ b/test/PhpParser/ErrorHandler/ThrowingTest.php @@ -5,7 +5,7 @@ use PhpParser\Error; class ThrowingTest extends \PHPUnit\Framework\TestCase { - public function testHandleError() { + public function testHandleError(): void { $this->expectException(Error::class); $this->expectExceptionMessage('Test'); $errorHandler = new Throwing(); diff --git a/test/PhpParser/ErrorTest.php b/test/PhpParser/ErrorTest.php index f378ab234d..b3ef521e67 100644 --- a/test/PhpParser/ErrorTest.php +++ b/test/PhpParser/ErrorTest.php @@ -22,7 +22,7 @@ public function testConstruct() { /** * @depends testConstruct */ - public function testSetMessageAndLine(Error $error) { + public function testSetMessageAndLine(Error $error): void { $error->setRawMessage('Some other error'); $this->assertSame('Some other error', $error->getRawMessage()); @@ -31,7 +31,7 @@ public function testSetMessageAndLine(Error $error) { $this->assertSame('Some other error on line 15', $error->getMessage()); } - public function testUnknownLine() { + public function testUnknownLine(): void { $error = new Error('Some error'); $this->assertSame(-1, $error->getStartLine()); @@ -40,7 +40,7 @@ public function testUnknownLine() { } /** @dataProvider provideTestColumnInfo */ - public function testColumnInfo($code, $startPos, $endPos, $startColumn, $endColumn) { + public function testColumnInfo($code, $startPos, $endPos, $startColumn, $endColumn): void { $error = new Error('Some error', [ 'startFilePos' => $startPos, 'endFilePos' => $endPos, @@ -72,7 +72,7 @@ public function provideTestColumnInfo() { ]; } - public function testNoColumnInfo() { + public function testNoColumnInfo(): void { $error = new Error('Some error', ['startLine' => 3]); $this->assertFalse($error->hasColumnInfo()); @@ -90,7 +90,7 @@ public function testNoColumnInfo() { } } - public function testInvalidPosInfo() { + public function testInvalidPosInfo(): void { $this->expectException(\RuntimeException::class); $this->expectExceptionMessage('Invalid position information'); $error = new Error('Some error', [ diff --git a/test/PhpParser/Internal/DifferTest.php b/test/PhpParser/Internal/DifferTest.php index 8b84c1a0d5..039335eee4 100644 --- a/test/PhpParser/Internal/DifferTest.php +++ b/test/PhpParser/Internal/DifferTest.php @@ -28,7 +28,7 @@ private function formatDiffString(array $diff) { } /** @dataProvider provideTestDiff */ - public function testDiff($oldStr, $newStr, $expectedDiffStr) { + public function testDiff($oldStr, $newStr, $expectedDiffStr): void { $differ = new Differ(function ($a, $b) { return $a === $b; }); @@ -49,7 +49,7 @@ public function provideTestDiff() { } /** @dataProvider provideTestDiffWithReplacements */ - public function testDiffWithReplacements($oldStr, $newStr, $expectedDiffStr) { + public function testDiffWithReplacements($oldStr, $newStr, $expectedDiffStr): void { $differ = new Differ(function ($a, $b) { return $a === $b; }); @@ -66,7 +66,7 @@ public function provideTestDiffWithReplacements() { ]; } - public function testNonContiguousIndices() { + public function testNonContiguousIndices(): void { $differ = new Differ(function ($a, $b) { return $a === $b; }); diff --git a/test/PhpParser/JsonDecoderTest.php b/test/PhpParser/JsonDecoderTest.php index 28fa4ed28b..3fb105f96d 100644 --- a/test/PhpParser/JsonDecoderTest.php +++ b/test/PhpParser/JsonDecoderTest.php @@ -3,7 +3,7 @@ namespace PhpParser; class JsonDecoderTest extends \PHPUnit\Framework\TestCase { - public function testRoundTrip() { + public function testRoundTrip(): void { $code = <<<'PHP' expectException(\RuntimeException::class); $this->expectExceptionMessage($expectedMessage); diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index 46ea65e449..f77da514be 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -19,7 +19,7 @@ protected function getLexer() { /** * @dataProvider provideTestReplaceKeywords */ - public function testReplaceKeywords(string $keyword, int $expectedToken) { + public function testReplaceKeywords(string $keyword, int $expectedToken): void { $lexer = $this->getLexer(); $code = 'assertEquals([ @@ -32,7 +32,7 @@ public function testReplaceKeywords(string $keyword, int $expectedToken) { /** * @dataProvider provideTestReplaceKeywords */ - public function testReplaceKeywordsUppercase(string $keyword, int $expectedToken) { + public function testReplaceKeywordsUppercase(string $keyword, int $expectedToken): void { $lexer = $this->getLexer(); $code = 'getLexer(); $code = '' . $keyword; @@ -61,7 +61,7 @@ public function testNoReplaceKeywordsAfterObjectOperator(string $keyword) { /** * @dataProvider provideTestReplaceKeywords */ - public function testNoReplaceKeywordsAfterObjectOperatorWithSpaces(string $keyword) { + public function testNoReplaceKeywordsAfterObjectOperatorWithSpaces(string $keyword): void { $lexer = $this->getLexer(); $code = ' ' . $keyword; @@ -77,7 +77,7 @@ public function testNoReplaceKeywordsAfterObjectOperatorWithSpaces(string $keywo /** * @dataProvider provideTestReplaceKeywords */ - public function testNoReplaceKeywordsAfterNullsafeObjectOperator(string $keyword) { + public function testNoReplaceKeywordsAfterNullsafeObjectOperator(string $keyword): void { $lexer = $this->getLexer(); $code = '' . $keyword; @@ -115,7 +115,7 @@ public function provideTestReplaceKeywords() { ]; } - private function assertSameTokens(array $expectedTokens, array $tokens) { + private function assertSameTokens(array $expectedTokens, array $tokens): void { $reducedTokens = []; foreach ($tokens as $token) { if ($token->id === 0 || $token->isIgnorable()) { @@ -129,7 +129,7 @@ private function assertSameTokens(array $expectedTokens, array $tokens) { /** * @dataProvider provideTestLexNewFeatures */ - public function testLexNewFeatures(string $code, array $expectedTokens) { + public function testLexNewFeatures(string $code, array $expectedTokens): void { $lexer = $this->getLexer(); $this->assertSameTokens($expectedTokens, $lexer->tokenize('getLexer(); @@ -153,7 +153,7 @@ public function testLeaveStuffAloneInStrings(string $code) { /** * @dataProvider provideTestLexNewFeatures */ - public function testErrorAfterEmulation($code) { + public function testErrorAfterEmulation($code): void { $errorHandler = new ErrorHandler\Collecting(); $lexer = $this->getLexer(); $lexer->tokenize('assertSameTokens($expectedTokens, $lexer->tokenize('markTestSkipped('HHVM does not throw warnings from token_get_all()'); } @@ -45,7 +45,7 @@ public function provideTestError() { ]; } - public function testDefaultErrorHandler() { + public function testDefaultErrorHandler(): void { $this->expectException(Error::class); $this->expectExceptionMessage('Unterminated comment on line 1'); $lexer = $this->getLexer(); @@ -55,7 +55,7 @@ public function testDefaultErrorHandler() { /** * @dataProvider provideTestLex */ - public function testLex($code, $expectedTokens) { + public function testLex($code, $expectedTokens): void { $lexer = $this->getLexer(); $tokens = $lexer->tokenize($code); foreach ($tokens as $token) { @@ -97,7 +97,7 @@ public function provideTestLex() { ]; } - public function testGetTokens() { + public function testGetTokens(): void { $code = 'startNamespace(new Name('NS')); $nameContext->addAlias(new Name('Foo'), 'Foo', Use_::TYPE_NORMAL); diff --git a/test/PhpParser/Node/Expr/CallableLikeTest.php b/test/PhpParser/Node/Expr/CallableLikeTest.php index 9a0349c3ac..c01bb8eb0a 100644 --- a/test/PhpParser/Node/Expr/CallableLikeTest.php +++ b/test/PhpParser/Node/Expr/CallableLikeTest.php @@ -11,7 +11,7 @@ class CallableLikeTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideTestIsFirstClassCallable */ - public function testIsFirstClassCallable(CallLike $node, bool $isFirstClassCallable) { + public function testIsFirstClassCallable(CallLike $node, bool $isFirstClassCallable): void { $this->assertSame($isFirstClassCallable, $node->isFirstClassCallable()); if (!$isFirstClassCallable) { $this->assertSame($node->getRawArgs(), $node->getArgs()); diff --git a/test/PhpParser/Node/IdentifierTest.php b/test/PhpParser/Node/IdentifierTest.php index 3b52806b9c..f8f328a709 100644 --- a/test/PhpParser/Node/IdentifierTest.php +++ b/test/PhpParser/Node/IdentifierTest.php @@ -3,12 +3,12 @@ namespace PhpParser\Node; class IdentifierTest extends \PHPUnit\Framework\TestCase { - public function testConstructorThrows() { + public function testConstructorThrows(): void { self::expectException(\InvalidArgumentException::class); new Identifier(''); } - public function testToString() { + public function testToString(): void { $identifier = new Identifier('Foo'); $this->assertSame('Foo', (string) $identifier); @@ -17,7 +17,7 @@ public function testToString() { } /** @dataProvider provideTestIsSpecialClassName */ - public function testIsSpecialClassName($identifier, $expected) { + public function testIsSpecialClassName($identifier, $expected): void { $identifier = new Identifier($identifier); $this->assertSame($expected, $identifier->isSpecialClassName()); } diff --git a/test/PhpParser/Node/NameTest.php b/test/PhpParser/Node/NameTest.php index 50df3624b7..262b95e2ed 100644 --- a/test/PhpParser/Node/NameTest.php +++ b/test/PhpParser/Node/NameTest.php @@ -3,7 +3,7 @@ namespace PhpParser\Node; class NameTest extends \PHPUnit\Framework\TestCase { - public function testConstruct() { + public function testConstruct(): void { $name = new Name(['foo', 'bar']); $this->assertSame('foo\bar', $name->name); @@ -14,7 +14,7 @@ public function testConstruct() { $this->assertSame('foo\bar', $name->name); } - public function testGet() { + public function testGet(): void { $name = new Name('foo'); $this->assertSame('foo', $name->getFirst()); $this->assertSame('foo', $name->getLast()); @@ -26,7 +26,7 @@ public function testGet() { $this->assertSame(['foo', 'bar'], $name->getParts()); } - public function testToString() { + public function testToString(): void { $name = new Name('Foo\Bar'); $this->assertSame('Foo\Bar', (string) $name); @@ -34,7 +34,7 @@ public function testToString() { $this->assertSame('foo\bar', $name->toLowerString()); } - public function testSlice() { + public function testSlice(): void { $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)); @@ -50,37 +50,37 @@ public function testSlice() { $this->assertNull($name->slice(-2, -2)); } - public function testSliceOffsetTooLarge() { + public function testSliceOffsetTooLarge(): void { $this->expectException(\OutOfBoundsException::class); $this->expectExceptionMessage('Offset 4 is out of bounds'); (new Name('foo\bar\baz'))->slice(4); } - public function testSliceOffsetTooSmall() { + public function testSliceOffsetTooSmall(): void { $this->expectException(\OutOfBoundsException::class); $this->expectExceptionMessage('Offset -4 is out of bounds'); (new Name('foo\bar\baz'))->slice(-4); } - public function testSliceLengthTooLarge() { + public function testSliceLengthTooLarge(): void { $this->expectException(\OutOfBoundsException::class); $this->expectExceptionMessage('Length 4 is out of bounds'); (new Name('foo\bar\baz'))->slice(0, 4); } - public function testSliceLengthTooSmall() { + public function testSliceLengthTooSmall(): void { $this->expectException(\OutOfBoundsException::class); $this->expectExceptionMessage('Length -4 is out of bounds'); (new Name('foo\bar\baz'))->slice(0, -4); } - public function testSliceLengthTooLargeWithOffset() { + public function testSliceLengthTooLargeWithOffset(): void { $this->expectException(\OutOfBoundsException::class); $this->expectExceptionMessage('Length 3 is out of bounds'); (new Name('foo\bar\baz'))->slice(1, 3); } - public function testConcat() { + public function testConcat(): void { $this->assertEquals(new Name('foo\bar\baz'), Name::concat('foo', 'bar\baz')); $this->assertEquals( new Name\FullyQualified('foo\bar'), @@ -98,7 +98,7 @@ public function testConcat() { $this->assertNull(Name::concat(null, null)); } - public function testNameTypes() { + public function testNameTypes(): void { $name = new Name('foo'); $this->assertTrue($name->isUnqualified()); $this->assertFalse($name->isQualified()); @@ -128,26 +128,26 @@ public function testNameTypes() { $this->assertSame('namespace\foo', $name->toCodeString()); } - public function testInvalidArg() { + public function testInvalidArg(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Expected string, array of parts or Name instance'); Name::concat('foo', new \stdClass()); } - public function testInvalidEmptyString() { + public function testInvalidEmptyString(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Name cannot be empty'); new Name(''); } - public function testInvalidEmptyArray() { + public function testInvalidEmptyArray(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Name cannot be empty'); new Name([]); } /** @dataProvider provideTestIsSpecialClassName */ - public function testIsSpecialClassName($name, $expected) { + public function testIsSpecialClassName($name, $expected): void { $name = new Name($name); $this->assertSame($expected, $name->isSpecialClassName()); } diff --git a/test/PhpParser/Node/ParamTest.php b/test/PhpParser/Node/ParamTest.php index ac0f3e79de..23b23ae052 100644 --- a/test/PhpParser/Node/ParamTest.php +++ b/test/PhpParser/Node/ParamTest.php @@ -6,7 +6,7 @@ use PhpParser\Node\Expr\Variable; class ParamTest extends \PHPUnit\Framework\TestCase { - public function testNoModifiers() { + public function testNoModifiers(): void { $node = new Param(new Variable('foo')); $this->assertFalse($node->isPromoted()); @@ -19,7 +19,7 @@ public function testNoModifiers() { /** * @dataProvider provideModifiers */ - public function testModifiers(string $modifier) { + public function testModifiers(string $modifier): void { $node = new Param(new Variable('foo')); $node->flags = constant(Modifiers::class . '::' . strtoupper($modifier)); $this->assertTrue($node->isPromoted()); diff --git a/test/PhpParser/Node/Scalar/DNumberTest.php b/test/PhpParser/Node/Scalar/DNumberTest.php index 25212a96b1..659fc61661 100644 --- a/test/PhpParser/Node/Scalar/DNumberTest.php +++ b/test/PhpParser/Node/Scalar/DNumberTest.php @@ -7,7 +7,7 @@ use PhpParser\ParserFactory; class DNumberTest extends \PHPUnit\Framework\TestCase { - public function testRawValue() { + public function testRawValue(): void { $parser = (new ParserFactory())->createForNewestSupportedVersion(); $nodes = $parser->parse('assertSame($name, $magicConst->getName()); } diff --git a/test/PhpParser/Node/Scalar/NumberTest.php b/test/PhpParser/Node/Scalar/NumberTest.php index c9f58acda9..db63ec2d12 100644 --- a/test/PhpParser/Node/Scalar/NumberTest.php +++ b/test/PhpParser/Node/Scalar/NumberTest.php @@ -6,7 +6,7 @@ use PhpParser\ParserFactory; class NumberTest extends \PHPUnit\Framework\TestCase { - public function testRawValue() { + public function testRawValue(): void { $parser = (new ParserFactory())->createForNewestSupportedVersion(); $nodes = $parser->parse('createForNewestSupportedVersion(); $nodes = $parser->parse('assertSame( $expected, String_::parseEscapeSequences($string, $quote) @@ -35,7 +35,7 @@ public function testParseEscapeSequences($expected, $string, $quote) { /** * @dataProvider provideTestParse */ - public function testCreate($expected, $string) { + public function testCreate($expected, $string): void { $this->assertSame( $expected, String_::parse($string) diff --git a/test/PhpParser/Node/Stmt/ClassConstTest.php b/test/PhpParser/Node/Stmt/ClassConstTest.php index 06e93279a7..789b9a9c79 100644 --- a/test/PhpParser/Node/Stmt/ClassConstTest.php +++ b/test/PhpParser/Node/Stmt/ClassConstTest.php @@ -8,7 +8,7 @@ class ClassConstTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideModifiers */ - public function testModifiers($modifier) { + public function testModifiers($modifier): void { $node = new ClassConst( [], // invalid constant(Modifiers::class . '::' . strtoupper($modifier)) @@ -17,7 +17,7 @@ public function testModifiers($modifier) { $this->assertTrue($node->{'is' . $modifier}()); } - public function testNoModifiers() { + public function testNoModifiers(): void { $node = new ClassConst([], 0); $this->assertTrue($node->isPublic()); diff --git a/test/PhpParser/Node/Stmt/ClassMethodTest.php b/test/PhpParser/Node/Stmt/ClassMethodTest.php index 0679bc557a..c3f779ea99 100644 --- a/test/PhpParser/Node/Stmt/ClassMethodTest.php +++ b/test/PhpParser/Node/Stmt/ClassMethodTest.php @@ -11,7 +11,7 @@ class ClassMethodTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideModifiers */ - public function testModifiers($modifier) { + public function testModifiers($modifier): void { $node = new ClassMethod('foo', [ 'type' => constant(Modifiers::class . '::' . strtoupper($modifier)) ]); @@ -19,7 +19,7 @@ public function testModifiers($modifier) { $this->assertTrue($node->{'is' . $modifier}()); } - public function testNoModifiers() { + public function testNoModifiers(): void { $node = new ClassMethod('foo', ['type' => 0]); $this->assertTrue($node->isPublic()); @@ -49,7 +49,7 @@ public function provideModifiers() { * * @param string $modifier Node type modifier */ - public function testImplicitPublic(string $modifier) { + public function testImplicitPublic(string $modifier): void { $node = new ClassMethod('foo', [ 'type' => constant(Modifiers::class . '::' . strtoupper($modifier)) ]); @@ -70,7 +70,7 @@ public function implicitPublicModifiers() { * * @param string $name Node name */ - public function testMagic(string $name) { + public function testMagic(string $name): void { $node = new ClassMethod($name); $this->assertTrue($node->isMagic(), 'Method should be magic'); } @@ -95,7 +95,7 @@ public function provideMagics() { ]; } - public function testFunctionLike() { + public function testFunctionLike(): void { $param = new Param(new Variable('a')); $type = new Name('Foo'); $return = new Return_(new Variable('a')); diff --git a/test/PhpParser/Node/Stmt/ClassTest.php b/test/PhpParser/Node/Stmt/ClassTest.php index f0295d2836..3f701b69d4 100644 --- a/test/PhpParser/Node/Stmt/ClassTest.php +++ b/test/PhpParser/Node/Stmt/ClassTest.php @@ -7,7 +7,7 @@ use PhpParser\Node\Scalar\String_; class ClassTest extends \PHPUnit\Framework\TestCase { - public function testIsAbstract() { + public function testIsAbstract(): void { $class = new Class_('Foo', ['type' => Modifiers::ABSTRACT]); $this->assertTrue($class->isAbstract()); @@ -15,7 +15,7 @@ public function testIsAbstract() { $this->assertFalse($class->isAbstract()); } - public function testIsFinal() { + public function testIsFinal(): void { $class = new Class_('Foo', ['type' => Modifiers::FINAL]); $this->assertTrue($class->isFinal()); @@ -23,7 +23,7 @@ public function testIsFinal() { $this->assertFalse($class->isFinal()); } - public function testGetTraitUses() { + public function testGetTraitUses(): void { $traitUses = [ new TraitUse([new Trait_('foo')]), new TraitUse([new Trait_('bar')]), @@ -39,7 +39,7 @@ public function testGetTraitUses() { $this->assertSame($traitUses, $class->getTraitUses()); } - public function testGetMethods() { + public function testGetMethods(): void { $methods = [ new ClassMethod('foo'), new ClassMethod('bar'), @@ -59,7 +59,7 @@ public function testGetMethods() { $this->assertSame($methods, $class->getMethods()); } - public function testGetConstants() { + public function testGetConstants(): void { $constants = [ new ClassConst([new \PhpParser\Node\Const_('foo', new String_('foo_value'))]), new ClassConst([new \PhpParser\Node\Const_('bar', new String_('bar_value'))]), @@ -76,7 +76,7 @@ public function testGetConstants() { $this->assertSame($constants, $class->getConstants()); } - public function testGetProperties() { + public function testGetProperties(): void { $properties = [ new Property(Modifiers::PUBLIC, [new PropertyItem('foo')]), new Property(Modifiers::PUBLIC, [new PropertyItem('bar')]), @@ -94,7 +94,7 @@ public function testGetProperties() { $this->assertSame($properties, $class->getProperties()); } - public function testGetProperty() { + public function testGetProperty(): void { $properties = [ $fooProp = new Property(Modifiers::PUBLIC, [new PropertyItem('foo1')]), $barProp = new Property(Modifiers::PUBLIC, [new PropertyItem('BAR1')]), @@ -119,7 +119,7 @@ public function testGetProperty() { $this->assertNull($class->getProperty('nonExisting')); } - public function testGetMethod() { + public function testGetMethod(): void { $methodConstruct = new ClassMethod('__CONSTRUCT'); $methodTest = new ClassMethod('test'); $class = new Class_('Foo', [ diff --git a/test/PhpParser/Node/Stmt/InterfaceTest.php b/test/PhpParser/Node/Stmt/InterfaceTest.php index 8d45e53add..5bb4a7840d 100644 --- a/test/PhpParser/Node/Stmt/InterfaceTest.php +++ b/test/PhpParser/Node/Stmt/InterfaceTest.php @@ -6,7 +6,7 @@ use PhpParser\Node\Scalar\String_; class InterfaceTest extends \PHPUnit\Framework\TestCase { - public function testGetMethods() { + public function testGetMethods(): void { $methods = [ new ClassMethod('foo'), new ClassMethod('bar'), @@ -24,7 +24,7 @@ public function testGetMethods() { $this->assertSame($methods, $interface->getMethods()); } - public function testGetConstants() { + public function testGetConstants(): void { $constants = [ new ClassConst([new \PhpParser\Node\Const_('foo', new String_('foo_value'))]), new ClassConst([new \PhpParser\Node\Const_('bar', new String_('bar_value'))]), diff --git a/test/PhpParser/Node/Stmt/PropertyTest.php b/test/PhpParser/Node/Stmt/PropertyTest.php index 712e93199a..8279aa7add 100644 --- a/test/PhpParser/Node/Stmt/PropertyTest.php +++ b/test/PhpParser/Node/Stmt/PropertyTest.php @@ -8,7 +8,7 @@ class PropertyTest extends \PHPUnit\Framework\TestCase { /** * @dataProvider provideModifiers */ - public function testModifiers($modifier) { + public function testModifiers($modifier): void { $node = new Property( constant(Modifiers::class . '::' . strtoupper($modifier)), [] // invalid @@ -17,7 +17,7 @@ public function testModifiers($modifier) { $this->assertTrue($node->{'is' . $modifier}()); } - public function testNoModifiers() { + public function testNoModifiers(): void { $node = new Property(0, []); $this->assertTrue($node->isPublic()); @@ -27,7 +27,7 @@ public function testNoModifiers() { $this->assertFalse($node->isReadonly()); } - public function testStaticImplicitlyPublic() { + public function testStaticImplicitlyPublic(): void { $node = new Property(Modifiers::STATIC, []); $this->assertTrue($node->isPublic()); $this->assertFalse($node->isProtected()); diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index 3e7952aa5c..2b7c1f8cd9 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -75,7 +75,7 @@ public function testConstruct(array $attributes, Node $node) { /** * @dataProvider provideNodes */ - public function testGetDocComment(array $attributes, Node $node) { + public function testGetDocComment(array $attributes, Node $node): void { $this->assertSame('/** doc comment */', $node->getDocComment()->getText()); $comments = $node->getComments(); @@ -88,7 +88,7 @@ public function testGetDocComment(array $attributes, Node $node) { $this->assertNull($node->getDocComment()); } - public function testSetDocComment() { + public function testSetDocComment(): void { $node = new DummyNode(null, null, null, []); // Add doc comment to node without comments @@ -119,7 +119,7 @@ public function testSetDocComment() { /** * @dataProvider provideNodes */ - public function testChange(array $attributes, DummyNode $node) { + public function testChange(array $attributes, DummyNode $node): void { // direct modification $node->subNode1 = 'newValue'; $this->assertSame('newValue', $node->subNode1); @@ -137,7 +137,7 @@ public function testChange(array $attributes, DummyNode $node) { /** * @dataProvider provideNodes */ - public function testIteration(array $attributes, Node $node) { + public function testIteration(array $attributes, Node $node): void { // Iteration is simple object iteration over properties, // not over subnodes $i = 0; @@ -159,7 +159,7 @@ public function testIteration(array $attributes, Node $node) { $this->assertSame(3, $i); } - public function testAttributes() { + public function testAttributes(): void { /** @var $node Node */ $node = $this->getMockForAbstractClass(NodeAbstract::class); @@ -201,7 +201,7 @@ public function testAttributes() { ); } - public function testJsonSerialization() { + public function testJsonSerialization(): void { $code = <<<'PHP' assertSame($this->canonicalize($dump), $this->canonicalize($dumper->dump($node))); @@ -57,7 +57,7 @@ public function provideTestDump() { ]; } - public function testDumpWithPositions() { + public function testDumpWithPositions(): void { $parser = (new ParserFactory())->createForHostVersion(); $dumper = new NodeDumper(['dumpPositions' => true]); @@ -90,7 +90,7 @@ public function testDumpWithPositions() { $this->assertSame($this->canonicalize($expected), $this->canonicalize($dump)); } - public function testError() { + public function testError(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Can only dump nodes and arrays.'); $dumper = new NodeDumper(); diff --git a/test/PhpParser/NodeFinderTest.php b/test/PhpParser/NodeFinderTest.php index dd0641edbd..2929c5f869 100644 --- a/test/PhpParser/NodeFinderTest.php +++ b/test/PhpParser/NodeFinderTest.php @@ -14,7 +14,7 @@ private function getStmtsAndVars() { return [$stmts, $vars]; } - public function testFind() { + public function testFind(): void { $finder = new NodeFinder(); list($stmts, $vars) = $this->getStmtsAndVars(); $varFilter = function (Node $node) { @@ -29,7 +29,7 @@ public function testFind() { $this->assertSame([], $finder->find($stmts, $noneFilter)); } - public function testFindInstanceOf() { + public function testFindInstanceOf(): void { $finder = new NodeFinder(); list($stmts, $vars) = $this->getStmtsAndVars(); $this->assertSame($vars, $finder->findInstanceOf($stmts, Expr\Variable::class)); @@ -37,7 +37,7 @@ public function testFindInstanceOf() { $this->assertSame([], $finder->findInstanceOf($stmts, Expr\BinaryOp\Mul::class)); } - public function testFindFirst() { + public function testFindFirst(): void { $finder = new NodeFinder(); list($stmts, $vars) = $this->getStmtsAndVars(); $varFilter = function (Node $node) { @@ -52,7 +52,7 @@ public function testFindFirst() { $this->assertNull($finder->findFirst($stmts, $noneFilter)); } - public function testFindFirstInstanceOf() { + public function testFindFirstInstanceOf(): void { $finder = new NodeFinder(); list($stmts, $vars) = $this->getStmtsAndVars(); $this->assertSame($vars[0], $finder->findFirstInstanceOf($stmts, Expr\Variable::class)); diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index 255741da2c..bc84600b6c 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -9,7 +9,7 @@ use PhpParser\Node\Stmt\If_; class NodeTraverserTest extends \PHPUnit\Framework\TestCase { - public function testNonModifying() { + public function testNonModifying(): void { $str1Node = new String_('Foo'); $str2Node = new String_('Bar'); $echoNode = new Node\Stmt\Echo_([$str1Node, $str2Node]); @@ -32,7 +32,7 @@ public function testNonModifying() { ], $visitor->trace); } - public function testModifying() { + public function testModifying(): void { $str1Node = new String_('Foo'); $str2Node = new String_('Bar'); $printNode = new Expr\Print_($str1Node); @@ -75,7 +75,7 @@ public function testModifying() { ], $visitor3->trace); } - public function testRemoveFromLeave() { + public function testRemoveFromLeave(): void { $str1Node = new String_('Foo'); $str2Node = new String_('Bar'); @@ -99,7 +99,7 @@ public function testRemoveFromLeave() { ], $visitor2->trace); } - public function testRemoveFromEnter() { + public function testRemoveFromEnter(): void { $str1Node = new String_('Foo'); $str2Node = new String_('Bar'); @@ -122,7 +122,7 @@ public function testRemoveFromEnter() { ], $visitor2->trace); } - public function testReturnArrayFromEnter() { + public function testReturnArrayFromEnter(): void { $str1Node = new String_('Str1'); $str2Node = new String_('Str2'); $str3Node = new String_('Str3'); @@ -147,7 +147,7 @@ public function testReturnArrayFromEnter() { ], $visitor2->trace); } - public function testMerge() { + public function testMerge(): void { $strStart = new String_('Start'); $strMiddle = new String_('End'); $strEnd = new String_('Middle'); @@ -167,7 +167,7 @@ public function testMerge() { ); } - public function testInvalidDeepArray() { + public function testInvalidDeepArray(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Invalid node structure: Contains nested arrays'); $strNode = new String_('Foo'); @@ -177,7 +177,7 @@ public function testInvalidDeepArray() { $this->assertEquals($stmts, $traverser->traverse($stmts)); } - public function testDontTraverseChildren() { + public function testDontTraverseChildren(): void { $strNode = new String_('str'); $printNode = new Expr\Print_($strNode); $varNode = new Expr\Variable('foo'); @@ -212,7 +212,7 @@ public function testDontTraverseChildren() { $this->assertEquals($expectedTrace, $visitor2->trace); } - public function testDontTraverseCurrentAndChildren() { + public function testDontTraverseCurrentAndChildren(): void { // print 'str'; -($foo * $foo); $strNode = new String_('str'); $printNode = new Expr\Print_($strNode); @@ -254,7 +254,7 @@ public function testDontTraverseCurrentAndChildren() { ], $visitor2->trace); } - public function testStopTraversal() { + public function testStopTraversal(): void { $varNode1 = new Expr\Variable('a'); $varNode2 = new Expr\Variable('b'); $varNode3 = new Expr\Variable('c'); @@ -343,7 +343,7 @@ public function testStopTraversal() { ], $visitor->trace); } - public function testReplaceWithNull() { + public function testReplaceWithNull(): void { $one = new Int_(1); $else1 = new Else_(); $else2 = new Else_(); @@ -381,7 +381,7 @@ public function testReplaceWithNull() { ], $visitor2->trace); } - public function testRemovingVisitor() { + public function testRemovingVisitor(): void { $visitor1 = new class () extends NodeVisitorAbstract {}; $visitor2 = new class () extends NodeVisitorAbstract {}; $visitor3 = new class () extends NodeVisitorAbstract {}; @@ -404,7 +404,7 @@ public function testRemovingVisitor() { $this->assertSame($postExpected, $getVisitors()); } - public function testNoCloneNodes() { + public function testNoCloneNodes(): void { $stmts = [new Node\Stmt\Echo_([new String_('Foo'), new String_('Bar')])]; $traverser = new NodeTraverser(); @@ -415,7 +415,7 @@ public function testNoCloneNodes() { /** * @dataProvider provideTestInvalidReturn */ - public function testInvalidReturn($stmts, $visitor, $message) { + public function testInvalidReturn($stmts, $visitor, $message): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage($message); diff --git a/test/PhpParser/NodeVisitor/FindingVisitorTest.php b/test/PhpParser/NodeVisitor/FindingVisitorTest.php index 4295249c9d..195074f1b0 100644 --- a/test/PhpParser/NodeVisitor/FindingVisitorTest.php +++ b/test/PhpParser/NodeVisitor/FindingVisitorTest.php @@ -7,7 +7,7 @@ use PhpParser\NodeTraverser; class FindingVisitorTest extends \PHPUnit\Framework\TestCase { - public function testFindVariables() { + public function testFindVariables(): void { $traverser = new NodeTraverser(); $visitor = new FindingVisitor(function (Node $node) { return $node instanceof Node\Expr\Variable; @@ -27,7 +27,7 @@ public function testFindVariables() { ], $visitor->getFoundNodes()); } - public function testFindAll() { + public function testFindAll(): void { $traverser = new NodeTraverser(); $visitor = new FindingVisitor(function (Node $node) { return true; // All nodes diff --git a/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php b/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php index b79e270f42..2163d9d470 100644 --- a/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php +++ b/test/PhpParser/NodeVisitor/FirstFindingVisitorTest.php @@ -7,7 +7,7 @@ use PhpParser\NodeTraverser; class FirstFindingVisitorTest extends \PHPUnit\Framework\TestCase { - public function testFindFirstVariable() { + public function testFindFirstVariable(): void { $traverser = new NodeTraverser(); $visitor = new FirstFindingVisitor(function (Node $node) { return $node instanceof Node\Expr\Variable; @@ -21,7 +21,7 @@ public function testFindFirstVariable() { $this->assertSame($assign->var, $visitor->getFoundNode()); } - public function testFindNone() { + public function testFindNone(): void { $traverser = new NodeTraverser(); $visitor = new FirstFindingVisitor(function (Node $node) { return $node instanceof Node\Expr\BinaryOp; diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index b0065968c7..449051fbf6 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -16,7 +16,7 @@ private function canonicalize($string) { /** * @covers \PhpParser\NodeVisitor\NameResolver */ - public function testResolveNames() { + public function testResolveNames(): void { $code = <<<'EOC' assertEquals($stmts, $traverser->traverse($stmts)); } - public function testAddDeclarationNamespacedName() { + public function testAddDeclarationNamespacedName(): void { $nsStmts = [ new Stmt\Class_('A'), new Stmt\Interface_('B'), @@ -372,7 +372,7 @@ public function testAddDeclarationNamespacedName() { $this->assertSame('F', (string) $stmts[0]->stmts[6]->namespacedName); } - public function testAddRuntimeResolvedNamespacedName() { + public function testAddRuntimeResolvedNamespacedName(): void { $stmts = [ new Stmt\Namespace_(new Name('NS'), [ new Expr\FuncCall(new Name('foo')), @@ -398,7 +398,7 @@ public function testAddRuntimeResolvedNamespacedName() { /** * @dataProvider provideTestError */ - public function testError(Node $stmt, $errorMsg) { + public function testError(Node $stmt, $errorMsg): void { $this->expectException(\PhpParser\Error::class); $this->expectExceptionMessage($errorMsg); @@ -449,7 +449,7 @@ public function provideTestError() { ]; } - public function testClassNameIsCaseInsensitive() { + public function testClassNameIsCaseInsensitive(): void { $source = <<<'EOC' assertSame('Bar\\Baz', $assign->expr->class->name); } - public function testSpecialClassNamesAreCaseInsensitive() { + public function testSpecialClassNamesAreCaseInsensitive(): void { $source = <<<'EOC' assertSame('STATIC', (string) $methodStmt->stmts[2]->expr->class); } - public function testAddOriginalNames() { + public function testAddOriginalNames(): void { $traverser = new PhpParser\NodeTraverser(); $traverser->addVisitor(new NameResolver(null, ['preserveOriginalNames' => true])); @@ -520,7 +520,7 @@ public function testAddOriginalNames() { $this->assertSame($n2, $stmts[0]->stmts[1]->name->getAttribute('originalName')); } - public function testAttributeOnlyMode() { + public function testAttributeOnlyMode(): void { $traverser = new PhpParser\NodeTraverser(); $traverser->addVisitor(new NameResolver(null, ['replaceNodes' => false])); diff --git a/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php b/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php index 3dcb2b45a4..eab58776cd 100644 --- a/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php +++ b/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php @@ -10,7 +10,7 @@ use PhpParser\ParserFactory; final class NodeConnectingVisitorTest extends \PHPUnit\Framework\TestCase { - public function testConnectsNodeToItsParentNodeAndItsSiblingNodes() { + public function testConnectsNodeToItsParentNodeAndItsSiblingNodes(): void { $ast = (new ParserFactory())->createForNewestSupportedVersion()->parse( 'createForNewestSupportedVersion()->parse( 'assertInstanceOf(Php8::class, $factory->createForNewestSupportedVersion()); $this->assertInstanceOf(Parser::class, $factory->createForHostVersion()); diff --git a/test/PhpParser/ParserTest.php b/test/PhpParser/ParserTest.php index 48f5ffe8e5..8096685901 100644 --- a/test/PhpParser/ParserTest.php +++ b/test/PhpParser/ParserTest.php @@ -11,28 +11,28 @@ abstract class ParserTest extends \PHPUnit\Framework\TestCase { /** @returns Parser */ abstract protected function getParser(Lexer $lexer); - public function testParserThrowsSyntaxError() { + public function testParserThrowsSyntaxError(): void { $this->expectException(Error::class); $this->expectExceptionMessage('Syntax error, unexpected EOF on line 1'); $parser = $this->getParser(new Lexer()); $parser->parse('expectException(Error::class); $this->expectExceptionMessage('Cannot use foo as self because \'self\' is a special class name on line 1'); $parser = $this->getParser(new Lexer()); $parser->parse('expectException(Error::class); $this->expectExceptionMessage('Unterminated comment on line 1'); $parser = $this->getParser(new Lexer()); $parser->parse('getAttributes()); } - public function testInvalidToken() { + public function testInvalidToken(): void { $this->expectException(\RangeException::class); $this->expectExceptionMessage('The lexer returned an invalid token (id=999, value=foobar)'); $lexer = new InvalidTokenLexer(); @@ -118,7 +118,7 @@ public function testInvalidToken() { /** * @dataProvider provideTestExtraAttributes */ - public function testExtraAttributes($code, $expectedAttributes) { + public function testExtraAttributes($code, $expectedAttributes): void { $parser = $this->getParser(new Lexer\Emulative()); $stmts = $parser->parse("expr : $stmts[0]; @@ -180,7 +180,7 @@ public function provideTestExtraAttributes() { ]; } - public function testListKindAttribute() { + public function testListKindAttribute(): void { $parser = $this->getParser(new Lexer\Emulative()); $stmts = $parser->parse('assertSame($stmts[0]->expr->var->getAttribute('kind'), Expr\List_::KIND_LIST); @@ -189,7 +189,7 @@ public function testListKindAttribute() { $this->assertSame($stmts[1]->expr->var->items[0]->value->getAttribute('kind'), Expr\List_::KIND_ARRAY); } - public function testGetTokens() { + public function testGetTokens(): void { $lexer = new Lexer(); $parser = $this->getParser($lexer); $parser->parse('assertSame(80200, $version->id); @@ -17,13 +17,13 @@ public function testConstruction() { $this->assertSame(80200, $version->id); } - public function testInvalidVersion() { + public function testInvalidVersion(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Invalid PHP version "8"'); PhpVersion::fromString('8'); } - public function testEquals() { + public function testEquals(): void { $php74 = PhpVersion::fromComponents(7, 4); $php81 = PhpVersion::fromComponents(8, 1); $php82 = PhpVersion::fromComponents(8, 2); diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 9af5510ca7..a937d74978 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -29,14 +29,14 @@ protected function doTestPrettyPrintMethod($method, $name, $code, $expected, $mo /** * @dataProvider provideTestPrettyPrint */ - public function testPrettyPrint($name, $code, $expected, $mode) { + public function testPrettyPrint($name, $code, $expected, $mode): void { $this->doTestPrettyPrintMethod('prettyPrint', $name, $code, $expected, $mode); } /** * @dataProvider provideTestPrettyPrintFile */ - public function testPrettyPrintFile($name, $code, $expected, $mode) { + public function testPrettyPrintFile($name, $code, $expected, $mode): void { $this->doTestPrettyPrintMethod('prettyPrintFile', $name, $code, $expected, $mode); } @@ -48,7 +48,7 @@ public function provideTestPrettyPrintFile() { return $this->getTests(__DIR__ . '/../code/prettyPrinter', 'file-test'); } - public function testPrettyPrintExpr() { + public function testPrettyPrintExpr(): void { $prettyPrinter = new Standard(); $expr = new Expr\BinaryOp\Mul( new Expr\BinaryOp\Plus(new Expr\Variable('a'), new Expr\Variable('b')), @@ -62,7 +62,7 @@ public function testPrettyPrintExpr() { $this->assertEquals("function () {\n return 'a\nb';\n}", $prettyPrinter->prettyPrintExpr($expr)); } - public function testCommentBeforeInlineHTML() { + public function testCommentBeforeInlineHTML(): void { $prettyPrinter = new PrettyPrinter\Standard(); $comment = new Comment\Doc("/**\n * This is a comment\n */"); $stmts = [new Stmt\InlineHTML('Hello World!', ['comments' => [$comment]])]; @@ -70,7 +70,7 @@ public function testCommentBeforeInlineHTML() { $this->assertSame($expected, $prettyPrinter->prettyPrintFile($stmts)); } - public function testArraySyntaxDefault() { + public function testArraySyntaxDefault(): void { $prettyPrinter = new Standard(['shortArraySyntax' => true]); $expr = new Expr\Array_([ new Node\ArrayItem(new String_('val'), new String_('key')) @@ -82,7 +82,7 @@ public function testArraySyntaxDefault() { /** * @dataProvider provideTestKindAttributes */ - public function testKindAttributes($node, $expected) { + public function testKindAttributes($node, $expected): void { $prttyPrinter = new PrettyPrinter\Standard(); $result = $prttyPrinter->prettyPrintExpr($node); $this->assertSame($expected, $result); @@ -138,7 +138,7 @@ public function provideTestKindAttributes() { } /** @dataProvider provideTestUnnaturalLiterals */ - public function testUnnaturalLiterals($node, $expected) { + public function testUnnaturalLiterals($node, $expected): void { $prttyPrinter = new PrettyPrinter\Standard(); $result = $prttyPrinter->prettyPrintExpr($node); $this->assertSame($expected, $result); @@ -157,7 +157,7 @@ public function provideTestUnnaturalLiterals() { ]; } - public function testPrettyPrintWithError() { + public function testPrettyPrintWithError(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Cannot pretty-print AST with Error nodes'); $stmts = [new Stmt\Expression( @@ -167,7 +167,7 @@ public function testPrettyPrintWithError() { $prettyPrinter->prettyPrint($stmts); } - public function testPrettyPrintWithErrorInClassConstFetch() { + public function testPrettyPrintWithErrorInClassConstFetch(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Cannot pretty-print AST with Error nodes'); $stmts = [new Stmt\Expression( @@ -180,7 +180,7 @@ public function testPrettyPrintWithErrorInClassConstFetch() { /** * @dataProvider provideTestFormatPreservingPrint */ - public function testFormatPreservingPrint($name, $code, $modification, $expected, $modeLine) { + public function testFormatPreservingPrint($name, $code, $modification, $expected, $modeLine): void { $lexer = new Lexer\Emulative(); $parser = new Parser\Php7($lexer); $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); @@ -216,7 +216,7 @@ public function provideTestFormatPreservingPrint() { /** * @dataProvider provideTestRoundTripPrint */ - public function testRoundTripPrint($name, $code, $expected, $modeLine) { + public function testRoundTripPrint($name, $code, $expected, $modeLine): void { /** * This test makes sure that the format-preserving pretty printer round-trips for all * the pretty printer tests (i.e. returns the input if no changes occurred). @@ -252,7 +252,7 @@ public function provideTestRoundTripPrint() { ); } - public function testWindowsNewline() { + public function testWindowsNewline(): void { $prettyPrinter = new Standard([ 'newline' => "\r\n", 'phpVersion' => PhpVersion::fromComponents(7, 2), @@ -294,7 +294,7 @@ public function testWindowsNewline() { $code); } - public function testInvalidNewline() { + public function testInvalidNewline(): void { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Option "newline" must be one of "\n" or "\r\n"'); new PrettyPrinter\Standard(['newline' => 'foo']); diff --git a/test/PhpParser/TokenTest.php b/test/PhpParser/TokenTest.php index 30787e686d..8297699c6e 100644 --- a/test/PhpParser/TokenTest.php +++ b/test/PhpParser/TokenTest.php @@ -3,14 +3,14 @@ namespace PhpParser; class TokenTest extends \PHPUnit\Framework\TestCase { - public function testGetTokenName() { + public function testGetTokenName(): void { $token = new Token(\ord(','), ','); $this->assertSame(',', $token->getTokenName()); $token = new Token(\T_WHITESPACE, ' '); $this->assertSame('T_WHITESPACE', $token->getTokenName()); } - public function testIs() { + public function testIs(): void { $token = new Token(\ord(','), ','); $this->assertTrue($token->is(\ord(','))); $this->assertFalse($token->is(\ord(';'))); @@ -23,7 +23,7 @@ public function testIs() { } /** @dataProvider provideTestIsIgnorable */ - public function testIsIgnorable(int $id, string $text, bool $isIgnorable) { + public function testIsIgnorable(int $id, string $text, bool $isIgnorable): void { $token = new Token($id, $text); $this->assertSame($isIgnorable, $token->isIgnorable()); } @@ -38,7 +38,7 @@ public function provideTestIsIgnorable() { ]; } - public function testToString() { + public function testToString(): void { $token = new Token(\ord(','), ','); $this->assertSame(',', (string) $token); $token = new Token(\T_STRING, 'foo'); diff --git a/tools/fuzzing/target.php b/tools/fuzzing/target.php index 6a7b3ebc27..8cbd619c16 100644 --- a/tools/fuzzing/target.php +++ b/tools/fuzzing/target.php @@ -39,11 +39,11 @@ private $tokens; public $hasProblematicConstruct; - public function setTokens(array $tokens) { + public function setTokens(array $tokens): void { $this->tokens = $tokens; } - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes): void { $this->hasProblematicConstruct = false; } From 7b0384cdbe03431c44bff3261bea2717743a2b53 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 25 May 2024 16:02:08 +0200 Subject: [PATCH 345/428] [8.4] Add support for new deref without parens RFC: https://wiki.php.net/rfc/new_without_parentheses --- CHANGELOG.md | 7 + grammar/php.y | 15 +- lib/PhpParser/Parser/Php7.php | 1302 +++++++++++++------------- lib/PhpParser/Parser/Php8.php | 1310 ++++++++++++++------------- test/code/parser/expr/newDeref.test | 318 +++++++ 5 files changed, 1676 insertions(+), 1276 deletions(-) create mode 100644 test/code/parser/expr/newDeref.test diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a78be73f0..74f7b5c321 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Version 5.1.0-dev +----------------- + +### Added + +* [8.4] Added support for dereferenceing `new` expressions without parentheses. + Version 5.0.2 (2024-03-05) -------------------------- diff --git a/grammar/php.y b/grammar/php.y index 580c4f8095..8255e96102 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1069,12 +1069,21 @@ anonymous_class: $this->checkClass($$[0], -1); } ; -new_expr: - T_NEW class_name_reference ctor_arguments { $$ = Expr\New_[$2, $3]; } +new_dereferenceable: + T_NEW class_name_reference argument_list { $$ = Expr\New_[$2, $3]; } | T_NEW anonymous_class { list($class, $ctorArgs) = $2; $$ = Expr\New_[$class, $ctorArgs]; } ; +new_non_dereferenceable: + T_NEW class_name_reference { $$ = Expr\New_[$2, []]; } +; + +new_expr: + new_dereferenceable + | new_non_dereferenceable +; + lexical_vars: /* empty */ { $$ = array(); } | T_USE '(' lexical_var_list ')' { $$ = $3; } @@ -1213,6 +1222,7 @@ fully_dereferencable: | '(' expr ')' { $$ = $2; } | dereferencable_scalar | class_constant + | new_dereferenceable ; array_object_dereferencable: @@ -1224,6 +1234,7 @@ callable_expr: callable_variable | '(' expr ')' { $$ = $2; } | dereferencable_scalar + | new_dereferenceable ; callable_variable: diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 8015935116..050f91e864 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -160,16 +160,16 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected int $tokenToSymbolMapSize = 396; - protected int $actionTableSize = 1258; - protected int $gotoTableSize = 567; + protected int $actionTableSize = 1268; + protected int $gotoTableSize = 730; protected int $invalidSymbol = 168; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 435; - protected int $numNonLeafStates = 739; + protected int $YY2TBLSTATE = 437; + protected int $numNonLeafStates = 743; protected array $symbolToName = array( "EOF", @@ -386,132 +386,133 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $action = array( - 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, + 133, 134, 135, 586, 136, 137, 0, 755, 756, 757, 138, 38,-32766,-32766,-32766, 151,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 102, 103, 104, 105, 106, 1112, 1113, - 1114, 1111, 1110, 1109, 1115, 745, 744,-32766,-32766,-32766, + -32767,-32767,-32767, 102, 103, 104, 105, 106, 1116, 1117, + 1118, 1115, 1114, 1113, 1119, 749, 748,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1245, 837,-32766, 1322, 754,-32766,-32766,-32766,-32766, - -594,-32766,-32766,-32766, 104, 105, 106, -594, 1306, 265, - 139, 404, 758, 759, 760, 761, 990,-32766, 429,-32766, - -32766, -16,-32766, 242, 1027, 815, 762, 763, 764, 765, - 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, - 794, 795, 783, 784, 345, 346, 786, 787, 772, 773, - 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, - 584, 779, 780, 585, 586,-32766, 803, 801, 802, 814, - 798, 799, 835, 826, 587, 588, 797, 589, 590, 591, - 592, 593, 594, 826, 459, 460, 461, 1036, 800, 595, - 596, 941, 140, 2, 133, 134, 135, 582, 136, 137, - 1060, 751, 752, 753, 138, 38, -328, -110, -110, 1326, - 290, 23, -110,-32766,-32766,-32766, 1325, 35, -110, 1112, - 1113, 1114, 1111, 1110, 1109, 1115, 612,-32766, 129, 745, - 744, 107, 108, 109,-32766, 274,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 828, 991, -194, 145, 110, 298, 754, - 836, 75,-32766,-32766,-32766, 1351, 142, 326, 1352, -594, - 326, -594, 254, 265, 139, 404, 758, 759, 760, 761, - 82, -272, 429,-32766, 326,-32766,-32766,-32766,-32766, 815, - 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, - 791, 583, 792, 793, 794, 795, 783, 784, 345, 346, - 786, 787, 772, 773, 774, 776, 777, 778, 356, 818, - 819, 820, 821, 822, 584, 779, 780, 585, 586, 830, - 803, 801, 802, 814, 798, 799, 712, 309, 587, 588, - 797, 589, 590, 591, 592, 593, 594, -78, 83, 84, - 85, -85, 800, 595, 596, 311, 149, 775, 746, 747, - 748, 749, 750, 725, 751, 752, 753, 788, 789, 37, + -32767, 1252, 841,-32766, 1331, 758,-32766,-32766,-32766,-32766, + -599,-32766,-32766,-32766, 104, 105, 106, -599, 1315, 265, + 139, 406, 762, 763, 764, 765, 994,-32766, 431,-32766, + -32766, -16,-32766, 242, 1031, 819, 766, 767, 768, 769, + 770, 771, 772, 773, 774, 775, 795, 587, 796, 797, + 798, 799, 787, 788, 347, 348, 790, 791, 776, 777, + 778, 780, 781, 782, 358, 822, 823, 824, 825, 826, + 588, 783, 784, 589, 590,-32766, 807, 805, 806, 818, + 802, 803, 839, 830, 591, 592, 801, 593, 594, 595, + 596, 597, 598, 830, 461, 462, 463, 1040, 804, 599, + 600, 945, 140, 2, 133, 134, 135, 586, 136, 137, + 1064, 755, 756, 757, 138, 38, -328, -110, -110, 1335, + 291, 23, -110,-32766,-32766,-32766, 1334, 35, -110, 1116, + 1117, 1118, 1115, 1114, 1113, 1119, 616,-32766, 129, 749, + 748, 107, 108, 109,-32766, 275,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 832, 995, -194, 145, 110, 300, 758, + 840, 75,-32766,-32766,-32766, 1360, 142, 328, 1361, -599, + 328, -599, 253, 265, 139, 406, 762, 763, 764, 765, + 82, -272, 431,-32766, 328,-32766,-32766,-32766,-32766, 819, + 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, + 795, 587, 796, 797, 798, 799, 787, 788, 347, 348, + 790, 791, 776, 777, 778, 780, 781, 782, 358, 822, + 823, 824, 825, 826, 588, 783, 784, 589, 590, 834, + 807, 805, 806, 818, 802, 803, 716, 311, 591, 592, + 801, 593, 594, 595, 596, 597, 598, -78, 83, 84, + 85, -85, 804, 599, 600, 313, 149, 779, 750, 751, + 752, 753, 754, 729, 755, 756, 757, 792, 793, 37, -328, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 323, 274, 482,-32766,-32766, - -32766, -58,-32766,-32766,-32766, 959, 960, 127, 110, -194, - 961, 339, 754,-32766,-32766,-32766, 955, -85, 291,-32766, - 1088,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, - 759, 760, 761, -193,-32766, 824,-32766,-32766,-32766, -367, - 429, -367, 815, 762, 763, 764, 765, 766, 767, 768, - 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, - 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, - 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, - 781, 782, -548, 803, 801, 802, 814, 798, 799, 340, - 327, 790, 796, 797, 804, 805, 807, 806, 808, 809, - 1033, 391, 606, 7,-32766, 800, 811, 810, 50, 51, - 52, 513, 53, 54, 831, 1240, 1239, 1241, 55, 56, - -110, 57, 1036, 920, 1090, -110, 1036, -110, 291, 483, - 745, 744, 305, 382, 381, -110, -110, -110, -110, -110, - -110, -110, -110, 423, 920, 283, -548, -548, 152, 290, - 380, 381, 1245, 715, 467, 468, 58, 59, 370, 21, - 423, -545, 60, 556, 61, 248, 249, 62, 63, 64, - 65, 66, 67, 68, 69, -548, 28, 267, 70, 445, - 514, 1104, 374, -342, 1272, 1273, 515, -193, 835, 154, - 832, -544, 1270, 42, 25, 516, 389, 517, 241, 518, - 920, 519, 298, 1238, 520, 521, 910, 920, 441, 44, - 45, 446, 377, 376,-32766, 46, 522, 1023, 1022, 1021, - 1024, 368, 338, 442, 1278, -545, -545, 910, 1231, 443, - 524, 525, 526, 835, 1245, 835, 1036, 716, 1341, 1236, - -545, 155, 528, 529,-32766, 1259, 1260, 1261, 1262, 1256, - 1257, 297, -551, 943, -545, -544, -544, 1263, 1258, 290, - 1035, 1240, 1239, 1241, 298, 444, 1036, 71, 1266, 841, - -544, 321, 322, 326, -153, -153, -153, 920, 1240, 1239, - 1241, 922, -550, 910, -544, 710, 943, -591,-32766, -153, - 910, -153, 357, -153, -591, -153, 862, 1033, 863, 1089, - 36, 251, 922, 737, 156, 375, 710, 717, 862, -585, - 863, -585, 75, 158, -546, 835, 959, 960, 326, 1036, - -57, 523, 920,-32766,-32766, 362, 896, 955, -110, -110, + 105, 106, 107, 108, 109, 325, 275, 485,-32766,-32766, + -32766, -58,-32766,-32766,-32766, 963, 964, 127, 110, -194, + 965, 341, 758,-32766,-32766,-32766, 959, -85, 292,-32766, + 1092,-32766,-32766,-32766,-32766,-32766, 759, 760, 761, 762, + 763, 764, 765, -193,-32766, 828,-32766,-32766,-32766, -367, + 431, -367, 819, 766, 767, 768, 769, 770, 771, 772, + 773, 774, 775, 795, 817, 796, 797, 798, 799, 787, + 788, 789, 816, 790, 791, 776, 777, 778, 780, 781, + 782, 821, 822, 823, 824, 825, 826, 827, 783, 784, + 785, 786, -552, 807, 805, 806, 818, 802, 803, 342, + 329, 794, 800, 801, 808, 809, 811, 810, 812, 813, + 1037, 866, 610, 867,-32766, 804, 815, 814, 50, 51, + 52, 516, 53, 54, 835, 1247, 1246, 1248, 55, 56, + -110, 57, 1040, 924, 1094, -110, 1040, -110, 292, 486, + 749, 748, 307, 384, 383, -110, -110, -110, -110, -110, + -110, -110, -110, 425, 924, 284, -552, -552, 372, 291, + 838, 924, 1252, 719, 470, 471, 58, 59,-32766,-32766, + 21, -550, 60, 560, 61, 247, 248, 62, 63, 64, + 65, 66, 67, 68, 69, -552, 28, 267, 70, 446, + 517, 720, 1108, -342, 1279, 1280, 518, -193, 839, 376, + 836, -548, 1277, 42, 25, 519, 391, 520, 241, 521, + 924, 522, 947, 1245, 523, 524, 914, 660, 26, 44, + 45, 447, 379, 378,-32766, 46, 525, 1027, 1026, 1025, + 1028, 370, 340, 442, 1285, -550, -550, 914, 1238, 947, + 527, 528, 529, 839, 914, 839, 1040, 443, 1350, 1243, + -550, 359, 531, 532, 444, 1266, 1267, 1268, 1269, 1263, + 1264, 299, -556, 445, -550, -548, -548, 1270, 1265, 291, + 1039, 1247, 1246, 1248, 300, 749, 748, 71, 364, 845, + -548, 323, 324, 328, -153, -153, -153, 152, 1247, 1246, + 1248, 926, -555, 914, -548, 714, 1063, 154,-32766, -153, + 1093, -153, 155, -153, 741, -153, 156, -596, 28, 268, + 36, 250, 926,-32766, -596, 377, 714, 679, 680, 926, + 839, 1273, 75, 714, 1277, 288, 963, 964, 328, -547, + 393, 526, 7, 1037, -57, 1040, 900, 959, -110, -110, -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 745, 744, 656, 26, 835, - -110, -110, 720, 745, 744, -110, 33, 834, 922, 124, - 910, -110, 710, -153, 125, 922, 675, 676, 130, 710, - -32766, 150, 407, 131, 1150, 1152, 48, 144, -546, -546, - 378, 379,-32766, 383, 384, -543, 28, 159, 1238, 920, - 160, 298, 1059, -546, 75,-32766,-32766,-32766, 835,-32766, - 326,-32766, 1270,-32766, -87, 910,-32766, -546, 647, 648, - 161,-32766,-32766,-32766, -4, 920, -84,-32766,-32766, 727, - 162, 287, 163,-32766, 420, -302, -78, -73, -72, -71, - 141, 287,-32766, -70, 326, 976, 745, 744, 1231, 710, - 299, 300, -69, -68, -67, -298, -591, -66, -591, -543, - -543, -65, 528, 529, -46, 1259, 1260, 1261, 1262, 1256, - 1257, -18, 74, 148, -543, 273, 284, 1263, 1258, 126, - -543, 726, 910,-32766, 729, 919, 147, 73, -543, 1238, - 922, 690, 322, 326, 710, 279,-32766,-32766,-32766, 280, - -32766, 285,-32766, 286,-32766, 332, 288,-32766, 910, 289, - 292, 49,-32766,-32766,-32766, 293, 274, 1033,-32766,-32766, - 937, 110, -50, 685,-32766, 420, 146, 691, 826, 701, - 375, 703, 436,-32766, 1353, 20, 561, 296, 645, 1036, - 835, 959, 960, 1119, -543, -543, 523,-32766, 692, 693, - 306, 527, 955, -110, -110, -110, 132, 922, 834, -543, - 464, 710, 283, 662, 657,-32766, 1240, 1239, 1241, 678, - 304, 1238, 283, -543, 10, 301, 302, 493,-32766,-32766, - -32766, 663,-32766, 922,-32766, 679,-32766, 710, -4,-32766, - 373, 40, -508, 956,-32766,-32766,-32766, -275, 731,-32766, - -32766,-32766, 920, 303, 128, 1238,-32766, 420, 310, 0, - 567, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, - -32766,-32766, 0,-32766, 0, 1277, -498, 0,-32766,-32766, - -32766,-32766, 1279, 0,-32766,-32766, 8, 1238, 24, 372, - -32766, 420, 920, 1267,-32766,-32766,-32766, 610,-32766,-32766, - -32766, 939,-32766, 298, -579,-32766, 846, 41, 734, 488, - -32766,-32766,-32766,-32766, 735, 854,-32766,-32766, 901, 1238, - 574, 1000,-32766, 420, 977, 984,-32766,-32766,-32766, 974, - -32766,-32766,-32766, 985,-32766, 910, 899,-32766, 972, 1093, - 1096, 1097,-32766,-32766,-32766, 1094, 1095, 1101,-32766,-32766, - 1292, -250, -250, -250,-32766, 420, 1310, 375, 1344, 650, - 28, 267, -578,-32766, -577, -551, -550, -549, 959, 960, - -492, 1, 835, 523, 29, 910, 1270, 30, 896, 955, - -110, -110, -110, 39, 43, 47, 72, 76, 77, 78, - 79, -249, -249, -249, 80, 81, 143, 375, 153, 157, - 897, 247, 328, 357, 358, 359, 360, 361, 959, 960, - 922, 362, 1231, 523, 710, -250, 363, 364, 896, 955, - -110, -110, -110, 365, 366, 367, 369, 529, 28, 1259, - 1260, 1261, 1262, 1256, 1257, 437, 555, 1348, -273, -272, - 835, 1263, 1258, 13, 1270, 14,-32766, 15, 16, 18, - 922, 73, 1238, 1350, 710, -249, 322, 326, 406,-32766, - -32766,-32766, 484,-32766, 485,-32766, 492,-32766, 495, 496, - -32766, 497, 498, 502, 503,-32766,-32766,-32766, 504, 511, - 1231,-32766,-32766, 572, 696, 1249, 1190,-32766, 420, 1268, - 1062, 1061, 1042, 1226, 1038, 529,-32766, 1259, 1260, 1261, - 1262, 1256, 1257, -277, -102, 12, 17, 27, 295, 1263, - 1258, 405, 603, 607, 636, 702, 1194, 1244, 1191, 73, - 34, 1323, 0, 320, 322, 326, 371, 711, 714, 718, - 719, 721, 722, 723, 724, 0, 728, 713, 0, 857, - 856, 865, 949, 992, 864, 1349, 948, 946, 947, 950, - 1222, 930, 940, 928, 982, 983, 634, 1347, 1304, 1293, - 1311, 1320, 0, 1207, 0, 1271, 0, 326 + 119, 120, 121, 122, 123, 1040, 158, 382, 383, 866, + 1238, 867, 924, 749, 748, 1252, 33, 425, 926, 150, + 409, 924, 714, -153, 531, 532, -87, 1266, 1267, 1268, + 1269, 1263, 1264, 124, 1154, 1156, -84, -4, 924, 1270, + 1265, 125, 721, -547, -547, -546, 130, 749, 748, 73, + -32766, 724, 839, -78, 324, 328, 1245, 131, -547, 300, + -590, 1037, -590,-32766,-32766,-32766, 144,-32766, 159,-32766, + -554,-32766, -547, 160,-32766, 380, 381, 924, 161,-32766, + -32766,-32766, 162, 1040,-32766,-32766,-32766, 385, 386, 163, + 1245,-32766, 422, 651, 652, 914, 839,-32766,-32766,-32766, + -32766,-32766, -73,-32766, 914,-32766, 284, 731,-32766, -546, + -546, -72, 48,-32766,-32766,-32766, -596, -71, -596,-32766, + -32766, 914, -70, -69, -546,-32766, 422, -68, -67, -66, + 74, -110, -110, 141,-32766, -50, -110, 328, -546, -65, + -46, -18, -110, 377, 148, 438, 274, 285, 730, 733, + 298,-32766, 923, 147, 963, 964, 289, 290, -549, 526, + 914, -302, -298, 280, 530, 959, -110, -110, -110, 132, + 980, 281, 300, 941, 714, 75, 301, 302,-32766, 926, + 286, 328, 287, 714, 1245, 334, 293, 10, 294, 275, + 1362,-32766,-32766,-32766, 110,-32766, 926,-32766, 707,-32766, + 714, -4,-32766, 146, 830, 126, 689,-32766,-32766,-32766, + 705, 20,-32766,-32766,-32766, 924, 839, 682, 1245,-32766, + 422, 1123, -549, -549, 649,-32766,-32766,-32766,-32766,-32766, + 565,-32766, 661,-32766, 467, 926,-32766, -549,-32766, 714, + 666,-32766,-32766,-32766,-32766, 496, 667,-32766,-32766,-32766, + 1245, -549, 683,-32766, 422, 924, 571,-32766,-32766,-32766, + 838,-32766,-32766,-32766, 306,-32766, 735, 1278,-32766, 308, + 0, 960, 491,-32766,-32766,-32766,-32766, 0, 0,-32766, + -32766, 0, 1245, 578, 0,-32766, 422, -546, 305,-32766, + -32766,-32766, 312,-32766,-32766,-32766, 0,-32766, 914, 40, + -32766, 0, 0, 1284, 1286,-32766,-32766,-32766, -511, 0, + -501,-32766,-32766, 8, -250, -250, -250,-32766, 422, 614, + 377, 24, 49, 28, 267, 374,-32766, 943, 41, 300, + -275, 963, 964, 738, 739, 839, 526, 858, 914, 1277, + 905, 900, 959, -110, -110, -110, 1004, 981, 988, 978, + 989, -546, -546, 903, -249, -249, -249, 976, 28, 268, + 377, 1274, 288, 1097, 1100, 1101, -546, 1098, 1099, 1105, + 839, 963, 964, 926, 1277, 1238, 526, 714, -250, 850, + -546, 900, 959, -110, -110, -110, 303, 304, 1301, 1319, + 532, 1353, 1266, 1267, 1268, 1269, 1263, 1264, 654, -273, + -584, 375, -583, -582, 1270, 1265, -556, -555, -554, -553, + 1238, -495, 694, 926, 73, 128, 1, 714, -249, 324, + 328, 29, 30, 39, 43, 532, 47, 1266, 1267, 1268, + 1269, 1263, 1264, 72, 76, 77, 78, 79, 80, 1270, + 1265, 81, 143, 153,-32766, 157, 245, 330, 695, 73, + 1245, 359, 360, 361, 324, 328, 362,-32766,-32766,-32766, + 363,-32766, 364,-32766, 365,-32766, 366, 367,-32766, 696, + 697, 368, 369,-32766,-32766,-32766, 371, 439, 559,-32766, + -32766, -272, 13, 14, 15,-32766, 422, 1247, 1246, 1248, + 16, 18, 408, 284,-32766, 487, 488, 495, 498, 499, + 500, 501, 505, 506, 507, 514, 576, 700, 1256, 1194, + 1275, 1066, 1065, 1046, 1233, 1042, -277, -102, 12, 17, + 27, 297, 407, 607, 611, 640, 706, 1198, 1251, 1195, + 1332, 0, 34, 0, 322, 373, 715, 718, 722, 723, + 725, 726, 727, 728, 732, 717, 0, 901, 1357, 1359, + 861, 860, 869, 953, 996, 868, 1358, 952, 950, 951, + 954, 1226, 934, 944, 932, 986, 987, 638, 1356, 1313, + 1302, 1320, 1329, 0, 1211, 0, 0, 328 ); protected array $actionCheck = array( @@ -564,163 +565,164 @@ class Php7 extends \PhpParser\ParserAbstract 4, 5, 6, 7, 80, 155, 156, 157, 12, 13, 101, 15, 138, 1, 164, 106, 138, 108, 30, 163, 37, 38, 113, 106, 107, 116, 117, 118, 119, 120, - 121, 122, 123, 116, 1, 161, 134, 135, 14, 161, - 106, 107, 1, 31, 134, 135, 50, 51, 8, 101, - 116, 70, 56, 85, 58, 59, 60, 61, 62, 63, + 121, 122, 123, 116, 1, 161, 134, 135, 8, 161, + 155, 1, 1, 31, 134, 135, 50, 51, 9, 10, + 101, 70, 56, 85, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 163, 70, 71, 72, 73, - 74, 123, 8, 164, 78, 79, 80, 162, 82, 14, + 74, 31, 123, 164, 78, 79, 80, 162, 82, 8, 156, 70, 86, 87, 88, 89, 8, 91, 97, 93, - 1, 95, 158, 80, 98, 99, 84, 1, 8, 103, + 1, 95, 122, 80, 98, 99, 84, 75, 76, 103, 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 8, 146, 134, 135, 84, 122, 8, - 124, 125, 126, 82, 1, 82, 138, 31, 85, 116, - 149, 14, 136, 137, 116, 139, 140, 141, 142, 143, - 144, 145, 161, 122, 163, 134, 135, 151, 152, 161, - 137, 155, 156, 157, 158, 8, 138, 161, 1, 8, - 149, 165, 166, 167, 75, 76, 77, 1, 155, 156, - 157, 159, 161, 84, 163, 163, 122, 1, 137, 90, - 84, 92, 161, 94, 8, 96, 106, 116, 108, 159, - 147, 148, 159, 163, 14, 106, 163, 31, 106, 160, - 108, 162, 161, 14, 70, 82, 117, 118, 167, 138, - 16, 122, 1, 9, 10, 161, 127, 128, 129, 130, + 122, 115, 116, 8, 146, 134, 135, 84, 122, 122, + 124, 125, 126, 82, 84, 82, 138, 8, 85, 116, + 149, 161, 136, 137, 8, 139, 140, 141, 142, 143, + 144, 145, 161, 8, 163, 134, 135, 151, 152, 161, + 137, 155, 156, 157, 158, 37, 38, 161, 161, 8, + 149, 165, 166, 167, 75, 76, 77, 14, 155, 156, + 157, 159, 161, 84, 163, 163, 1, 14, 137, 90, + 159, 92, 14, 94, 163, 96, 14, 1, 70, 71, + 147, 148, 159, 116, 8, 106, 163, 75, 76, 159, + 82, 1, 161, 163, 86, 30, 117, 118, 167, 70, + 106, 122, 108, 116, 16, 138, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 37, 38, 75, 76, 82, - 117, 118, 31, 37, 38, 122, 14, 155, 159, 16, - 84, 128, 163, 164, 16, 159, 75, 76, 16, 163, - 137, 101, 102, 16, 59, 60, 70, 16, 134, 135, - 106, 107, 74, 106, 107, 70, 70, 16, 80, 1, - 16, 158, 1, 149, 161, 87, 88, 89, 82, 91, - 167, 93, 86, 95, 31, 84, 98, 163, 111, 112, - 16, 103, 104, 105, 0, 1, 31, 109, 110, 31, - 16, 30, 16, 115, 116, 35, 31, 31, 31, 31, - 163, 30, 124, 31, 167, 159, 37, 38, 122, 163, - 134, 135, 31, 31, 31, 35, 160, 31, 162, 134, - 135, 31, 136, 137, 31, 139, 140, 141, 142, 143, - 144, 31, 154, 31, 149, 31, 31, 151, 152, 163, - 70, 31, 84, 74, 31, 31, 31, 161, 163, 80, - 159, 80, 166, 167, 163, 35, 87, 88, 89, 35, - 91, 35, 93, 35, 95, 35, 37, 98, 84, 37, - 37, 70, 103, 104, 105, 37, 57, 116, 109, 110, - 38, 69, 31, 77, 115, 116, 70, 116, 80, 80, - 106, 92, 108, 124, 83, 97, 89, 113, 113, 138, - 82, 117, 118, 82, 134, 135, 122, 85, 137, 138, - 114, 127, 128, 129, 130, 131, 31, 159, 155, 149, - 97, 163, 161, 96, 90, 74, 155, 156, 157, 94, - 133, 80, 161, 163, 150, 134, 135, 97, 87, 88, - 89, 100, 91, 159, 93, 100, 95, 163, 164, 98, - 149, 159, 149, 128, 103, 104, 105, 162, 164, 74, - 109, 110, 1, 132, 163, 80, 115, 116, 132, -1, - 153, -1, 87, 88, 89, 124, 91, -1, 93, -1, - 95, 137, -1, 98, -1, 146, 149, -1, 103, 104, - 105, 74, 146, -1, 109, 110, 149, 80, 149, 149, - 115, 116, 1, 160, 87, 88, 89, 153, 91, 124, - 93, 154, 95, 158, 161, 98, 160, 159, 159, 102, - 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, - 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, - 91, 124, 93, 159, 95, 84, 159, 98, 159, 159, - 159, 159, 103, 104, 105, 159, 159, 159, 109, 110, - 160, 100, 101, 102, 115, 116, 160, 106, 160, 160, - 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, - 161, 161, 82, 122, 161, 84, 86, 161, 127, 128, - 129, 130, 131, 161, 161, 161, 161, 161, 161, 161, - 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, - 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, - 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, - 129, 130, 131, 161, 161, 161, 161, 137, 70, 139, - 140, 141, 142, 143, 144, 161, 161, 164, 162, 162, - 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, - 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, - 88, 89, 162, 91, 162, 93, 162, 95, 162, 162, - 98, 162, 162, 162, 162, 103, 104, 105, 162, 162, - 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, - 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, - 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, - 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, - 163, 162, -1, 163, 166, 167, 163, 163, 163, 163, - 163, 163, 163, 163, 163, -1, 163, 163, -1, 164, + 25, 26, 27, 28, 29, 138, 14, 106, 107, 106, + 122, 108, 1, 37, 38, 1, 14, 116, 159, 101, + 102, 1, 163, 164, 136, 137, 31, 139, 140, 141, + 142, 143, 144, 16, 59, 60, 31, 0, 1, 151, + 152, 16, 31, 134, 135, 70, 16, 37, 38, 161, + 74, 31, 82, 31, 166, 167, 80, 16, 149, 158, + 160, 116, 162, 87, 88, 89, 16, 91, 16, 93, + 161, 95, 163, 16, 98, 106, 107, 1, 16, 103, + 104, 105, 16, 138, 74, 109, 110, 106, 107, 16, + 80, 115, 116, 111, 112, 84, 82, 87, 88, 89, + 124, 91, 31, 93, 84, 95, 161, 31, 98, 134, + 135, 31, 70, 103, 104, 105, 160, 31, 162, 109, + 110, 84, 31, 31, 149, 115, 116, 31, 31, 31, + 154, 117, 118, 163, 124, 31, 122, 167, 163, 31, + 31, 31, 128, 106, 31, 108, 31, 31, 31, 31, + 113, 137, 31, 31, 117, 118, 37, 37, 70, 122, + 84, 35, 35, 35, 127, 128, 129, 130, 131, 31, + 159, 35, 158, 38, 163, 161, 134, 135, 74, 159, + 35, 167, 35, 163, 80, 35, 37, 150, 37, 57, + 83, 87, 88, 89, 69, 91, 159, 93, 92, 95, + 163, 164, 98, 70, 80, 163, 77, 103, 104, 105, + 80, 97, 74, 109, 110, 1, 82, 94, 80, 115, + 116, 82, 134, 135, 113, 87, 88, 89, 124, 91, + 89, 93, 90, 95, 97, 159, 98, 149, 85, 163, + 96, 103, 104, 105, 74, 97, 100, 109, 110, 137, + 80, 163, 100, 115, 116, 1, 153, 87, 88, 89, + 155, 91, 124, 93, 133, 95, 164, 166, 98, 114, + -1, 128, 102, 103, 104, 105, 74, -1, -1, 109, + 110, -1, 80, 81, -1, 115, 116, 70, 132, 87, + 88, 89, 132, 91, 124, 93, -1, 95, 84, 159, + 98, -1, -1, 146, 146, 103, 104, 105, 149, -1, + 149, 109, 110, 149, 100, 101, 102, 115, 116, 153, + 106, 149, 70, 70, 71, 149, 124, 154, 159, 158, + 162, 117, 118, 159, 159, 82, 122, 159, 84, 86, + 159, 127, 128, 129, 130, 131, 159, 159, 159, 159, + 159, 134, 135, 159, 100, 101, 102, 159, 70, 71, + 106, 160, 30, 159, 159, 159, 149, 159, 159, 159, + 82, 117, 118, 159, 86, 122, 122, 163, 164, 160, + 163, 127, 128, 129, 130, 131, 134, 135, 160, 160, + 137, 160, 139, 140, 141, 142, 143, 144, 160, 162, + 161, 149, 161, 161, 151, 152, 161, 161, 161, 161, + 122, 161, 80, 159, 161, 163, 161, 163, 164, 166, + 167, 161, 161, 161, 161, 137, 161, 139, 140, 141, + 142, 143, 144, 161, 161, 161, 161, 161, 161, 151, + 152, 161, 161, 161, 74, 161, 161, 161, 116, 161, + 80, 161, 161, 161, 166, 167, 161, 87, 88, 89, + 161, 91, 161, 93, 161, 95, 161, 161, 98, 137, + 138, 161, 161, 103, 104, 105, 161, 161, 161, 109, + 110, 162, 162, 162, 162, 115, 116, 155, 156, 157, + 162, 162, 162, 161, 124, 162, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, -1, 163, -1, 163, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, -1, 165, -1, 166, -1, 167 + 164, 164, 164, -1, 165, -1, -1, 167 ); protected array $actionBase = array( - 0, -2, 152, 549, 764, 941, 981, 751, 617, 310, - 123, 877, 556, 671, 671, 738, 671, 472, 626, 789, - 63, 305, 305, 789, 305, 493, 493, 493, 658, 658, - 658, 658, 749, 749, 897, 897, 929, 865, 831, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 51, 45, 451, 692, 1036, 1044, - 1040, 1045, 1034, 1033, 1039, 1041, 1046, 1083, 1084, 795, - 1085, 1086, 1082, 1087, 1042, 889, 1035, 1043, 289, 289, + 0, -2, 152, 549, 727, 904, 944, 1022, 660, 310, + 123, 899, 500, 710, 710, 766, 710, 472, 701, 820, + 63, 305, 305, 820, 305, 493, 493, 493, 666, 666, + 666, 666, 700, 700, 860, 860, 892, 828, 794, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 51, 45, 451, 692, 1049, 1055, + 1051, 1056, 1047, 1046, 1050, 1052, 1057, 1094, 1095, 812, + 1096, 1097, 1093, 1098, 1053, 928, 1048, 1054, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 44, 343, 664, 3, 3, + 289, 289, 289, 289, 289, 44, 343, 499, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 52, 52, - 52, 666, 666, 47, 354, 980, 203, 1048, 1048, 1048, - 1048, 1048, 1048, 1048, 1048, 1048, 665, 339, 164, 164, - 7, 7, 7, 7, 7, 50, 369, 583, -25, -25, - -25, -25, 448, 741, 501, 408, 283, 338, 394, 334, - 334, 14, 14, 531, 531, 9, 9, 531, 531, 531, - 478, 478, 478, 478, 441, 471, 552, 428, 824, 53, - 53, 53, 53, 824, 824, 824, 824, 826, 1089, 824, - 824, 824, 594, 750, 750, 781, 138, 138, 138, 750, - 540, 503, 503, 540, 238, 503, 67, 135, -78, 805, - 377, 499, -78, 362, 656, 636, 59, 743, 624, 743, - 1032, 481, 802, 802, 514, 773, 746, 878, 1064, 1049, - 821, 1080, 825, 1081, 15, 370, 745, 1031, 1031, 1031, - 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1090, 443, - 1032, 384, 1090, 1090, 1090, 443, 443, 443, 443, 443, - 443, 443, 443, 443, 443, 647, 384, 622, 641, 384, - 810, 443, 51, 817, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 780, 316, 51, 45, 150, 150, - 490, 83, 150, 150, 150, 150, 51, 51, 51, 51, - 624, 799, 797, 627, 834, 375, 799, 799, 799, 270, - 158, 69, 197, 740, 760, 345, 788, 788, 801, 900, - 900, 788, 798, 788, 801, 914, 788, 788, 900, 900, - 835, 180, 550, 353, 524, 565, 900, 279, 788, 788, - 788, 788, 816, 571, 788, 214, 198, 788, 788, 816, - 811, 785, 145, 777, 900, 900, 900, 816, 500, 777, - 777, 777, 839, 845, 765, 784, 337, 297, 611, 169, - 822, 784, 784, 788, 538, 765, 784, 765, 784, 837, - 784, 784, 784, 765, 784, 798, 431, 784, 721, 607, - 163, 784, 6, 915, 916, 723, 917, 912, 918, 964, - 919, 923, 1054, 899, 930, 913, 924, 965, 906, 903, - 794, 693, 698, 827, 783, 896, 792, 792, 792, 894, - 792, 792, 792, 792, 792, 792, 792, 792, 693, 823, - 830, 787, 933, 702, 707, 1011, 819, 926, 1088, 932, - 1013, 925, 772, 711, 977, 934, 774, 1050, 935, 936, - 986, 1014, 846, 1017, 963, 796, 979, 1065, 836, 945, - 1055, 792, 915, 923, 735, 913, 924, 906, 903, 770, - 766, 762, 763, 761, 752, 747, 748, 782, 1018, 893, - 833, 880, 940, 895, 693, 886, 971, 1047, 990, 992, - 1053, 803, 791, 888, 1066, 946, 952, 953, 1056, 1019, - 1057, 838, 973, 775, 994, 820, 1067, 996, 997, 999, - 1000, 1058, 1068, 1059, 891, 1060, 849, 814, 966, 807, - 1069, 1, 806, 808, 818, 955, 484, 931, 1061, 1070, - 1071, 1001, 1002, 1006, 1072, 1073, 927, 852, 975, 815, - 976, 967, 855, 856, 525, 813, 1020, 800, 804, 812, - 577, 640, 1074, 1075, 1076, 928, 790, 786, 860, 864, - 1021, 809, 1022, 1077, 649, 867, 724, 1078, 1012, 744, - 754, 281, 654, 335, 756, 779, 1063, 829, 776, 778, - 954, 754, 793, 869, 1079, 870, 871, 872, 1007, 876, + 52, 578, 578, 47, 354, 978, 943, 978, 978, 978, + 978, 978, 978, 978, 978, 203, 665, 339, 164, 164, + 7, 7, 7, 7, 7, 50, 369, 704, 704, -25, + -25, -25, -25, 448, 635, 501, 409, 283, 338, 591, + 334, 334, 14, 14, 557, 557, 9, 9, 557, 557, + 557, 537, 537, 537, 537, 441, 471, 599, 345, 428, + 802, 53, 53, 53, 53, 802, 802, 802, 802, 848, + 791, 802, 802, 802, 778, 907, 907, 942, 138, 138, + 138, 907, 593, 503, 503, 593, 238, 503, 67, 135, + -78, 833, 377, 590, -78, 362, 732, 646, 59, 795, + 659, 795, 1045, 430, 843, 843, 457, 799, 761, 900, + 1072, 1058, 836, 1091, 842, 1092, 15, 370, 712, 1044, + 1044, 1044, 1044, 1044, 1044, 1044, 1044, 1044, 1044, 1044, + 1100, 443, 1045, 384, 1100, 1100, 1100, 443, 443, 443, + 443, 443, 443, 443, 443, 443, 443, 672, 384, 482, + 582, 384, 840, 443, 51, 851, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 800, 316, 51, 45, + 150, 150, 481, 83, 150, 150, 150, 150, 51, 51, + 51, 51, 659, 822, 793, 671, 856, 375, 822, 822, + 822, 270, 158, 69, 197, 816, 817, 564, 814, 814, + 829, 945, 814, 824, 814, 829, 955, 814, 814, 945, + 945, 861, 945, 180, 565, 353, 531, 579, 945, 279, + 814, 814, 814, 814, 850, 945, 586, 814, 214, 198, + 814, 814, 850, 846, 806, 145, 821, 945, 945, 945, + 850, 490, 821, 821, 821, 864, 865, 801, 805, 337, + 297, 611, 169, 825, 805, 805, 814, 538, 801, 805, + 801, 805, 863, 805, 805, 805, 801, 805, 824, 431, + 805, 742, 595, 163, 805, 6, 962, 963, 685, 964, + 952, 965, 1006, 966, 967, 1063, 940, 975, 953, 970, + 1007, 951, 950, 811, 707, 715, 854, 849, 938, 815, + 815, 815, 935, 936, 815, 815, 815, 815, 815, 815, + 815, 815, 707, 891, 866, 831, 981, 720, 731, 1034, + 847, 1073, 1099, 980, 1036, 971, 830, 740, 1019, 982, + 792, 1061, 985, 989, 1020, 1037, 868, 1038, 1074, 823, + 1075, 1076, 909, 993, 1064, 815, 962, 967, 695, 953, + 970, 951, 950, 798, 788, 786, 787, 782, 781, 770, + 776, 803, 1039, 932, 929, 918, 991, 937, 707, 919, + 1010, 1059, 1023, 1024, 1062, 827, 797, 921, 1077, 995, + 996, 1000, 1065, 1040, 1066, 859, 1011, 858, 1025, 838, + 1078, 1026, 1027, 1028, 1029, 1067, 1079, 1068, 931, 1069, + 871, 832, 927, 834, 1080, 1, 835, 837, 841, 1005, + 613, 976, 1070, 1081, 1082, 1030, 1031, 1032, 1083, 1084, + 972, 877, 1012, 813, 1018, 1009, 878, 879, 623, 839, + 1041, 818, 826, 810, 628, 632, 1085, 1086, 1087, 974, + 807, 819, 880, 881, 1042, 809, 1043, 1088, 682, 884, + 747, 1089, 1035, 752, 756, 281, 658, 335, 763, 796, + 1071, 862, 845, 804, 1001, 756, 808, 888, 1090, 894, + 895, 896, 1033, 898, 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, - 456, 456, 456, 456, 456, 456, 305, 305, 305, 305, - 305, 456, 456, 456, 456, 456, 456, 456, 305, 305, - 0, 0, 305, 0, 456, 456, 456, 456, 456, 456, + 0, 0, 0, 0, 456, 456, 456, 456, 456, 456, + 305, 305, 305, 305, 305, 456, 456, 456, 456, 456, + 456, 456, 305, 305, 0, 0, 305, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, @@ -734,42 +736,42 @@ class Php7 extends \PhpParser\ParserAbstract 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 289, 289, 289, 289, 289, 289, 289, + 456, 456, 456, 456, 456, 456, 456, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, + 0, 0, 0, 0, 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 473, 473, 289, 289, 473, 289, 473, 473, 473, 473, - 473, 473, 473, 473, 473, 0, 289, 289, 289, 289, - 289, 289, 289, 289, 473, 835, 473, 138, 138, 138, - 138, 473, 473, 473, -88, -88, 473, 238, 473, 473, - 138, 138, 473, 473, 473, 473, 473, 473, 473, 473, - 473, 473, 473, 0, 0, 384, 503, 473, 798, 798, - 798, 798, 473, 473, 473, 473, 503, 503, 473, 473, - 473, 0, 0, 0, 0, 0, 0, 0, 0, 384, - 0, 0, 384, 0, 0, 798, 798, 473, 238, 835, - 168, 473, 0, 0, 0, 0, 384, 798, 384, 443, - 788, 503, 503, 788, 443, 443, 150, 51, 168, 620, - 620, 620, 620, 0, 0, 624, 835, 835, 835, 835, - 835, 835, 835, 835, 835, 835, 835, 798, 0, 835, - 0, 798, 798, 798, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 798, - 0, 0, 900, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 914, 0, 0, 0, 0, 0, 0, - 798, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 792, 803, 0, 803, 0, 792, 792, 792, 0, 0, - 0, 0, 813, 809 + 289, 289, 289, 289, 473, 473, 289, 289, 473, 473, + 473, 473, 473, 473, 473, 473, 473, 473, 289, 0, + 289, 289, 289, 289, 289, 289, 289, 289, 473, 861, + 473, 473, 138, 138, 138, 138, 473, 473, 473, -88, + -88, 473, 238, 473, 473, 138, 138, 473, 473, 473, + 473, 473, 473, 473, 473, 473, 473, 473, 0, 0, + 0, 384, 503, 473, 824, 824, 824, 824, 473, 473, + 473, 473, 503, 503, 473, 473, 473, 0, 0, 0, + 0, 0, 0, 0, 0, 384, 0, 0, 384, 0, + 0, 824, 824, 473, 238, 861, 168, 473, 0, 0, + 0, 0, 384, 824, 384, 443, 814, 503, 503, 814, + 443, 443, 150, 51, 168, 608, 608, 608, 608, 0, + 0, 659, 861, 861, 861, 861, 861, 861, 861, 861, + 861, 861, 861, 824, 0, 861, 0, 824, 824, 824, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 824, 0, 0, 945, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 955, + 0, 0, 0, 0, 0, 0, 824, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 815, 827, 0, 827, + 0, 815, 815, 815, 0, 0, 0, 0, 839, 809 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 100,32767,32767,32767,32767, 597, 597, - 597, 597,32767,32767, 254, 102,32767,32767, 470, 387, - 387, 387,32767,32767, 541, 541, 541, 541, 541, 541, + 32767,32767,32767, 100,32767,32767,32767,32767, 602, 602, + 602, 602,32767,32767, 254, 102,32767,32767, 470, 387, + 387, 387,32767,32767, 544, 544, 544, 544, 544, 544, 32767,32767,32767,32767,32767,32767, 470,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, @@ -781,130 +783,147 @@ class Php7 extends \PhpParser\ParserAbstract 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, 324,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 590,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 595,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767, 474, 453, - 454, 456, 457, 386, 542, 596, 327, 593, 385, 145, + 454, 456, 457, 386, 545, 601, 327, 598, 385, 145, 339, 329, 242, 330, 258, 475, 259, 476, 479, 480, 215, 287, 382, 149, 150, 417, 471, 419, 469, 473, 418, 392, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 390, 391, 472, 450, 449, - 448,32767,32767, 415, 416,32767, 420,32767,32767,32767, - 32767,32767,32767,32767, 102,32767, 389, 423, 421, 422, - 439, 440, 437, 438, 441,32767,32767,32767, 442, 443, - 444, 445, 316,32767,32767, 366, 364, 316, 111,32767, - 32767, 430, 431,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 535, 447,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 102, - 32767, 100, 537, 412, 414, 504, 425, 426, 424, 393, - 32767, 511,32767, 102,32767, 513,32767,32767,32767,32767, - 32767,32767,32767, 536,32767, 543, 543,32767, 497, 100, - 195,32767,32767, 512,32767, 195, 195,32767,32767,32767, - 32767,32767,32767,32767,32767, 604, 497, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, - 110,32767,32767,32767, 100, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 190,32767, 268, 270, 102, - 558, 195,32767, 516,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 509,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 497, 435, 138,32767, 138, 543, 427, 428, 429, 499, - 543, 543, 543, 312, 289,32767,32767,32767,32767, 514, - 514, 100, 100, 100, 100, 509,32767,32767,32767,32767, - 111, 99, 99, 99, 99, 99, 103, 101,32767,32767, - 32767,32767, 223, 99,32767, 101, 101,32767,32767, 223, - 225, 212, 101, 227,32767, 562, 563, 223, 101, 227, - 227, 227, 247, 247, 486, 318, 101, 99, 101, 101, - 197, 318, 318,32767, 101, 486, 318, 486, 318, 199, - 318, 318, 318, 486, 318,32767, 101, 318, 214, 99, - 99, 318,32767,32767,32767, 499,32767,32767,32767,32767, - 32767,32767,32767, 222,32767,32767,32767,32767,32767,32767, - 32767,32767, 530,32767, 547, 560, 433, 434, 436, 545, - 458, 459, 460, 461, 462, 463, 464, 466, 592,32767, - 503,32767,32767,32767, 338,32767, 602,32767,32767,32767, + 448,32767,32767, 415, 416,32767,32767,32767,32767,32767, + 32767,32767,32767, 102,32767, 420, 389, 423, 421, 422, + 439, 440, 437, 438, 441,32767,32767,32767,32767, 442, + 443, 444, 445, 316,32767,32767, 366, 364, 316, 111, + 32767,32767, 430, 431,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 487, 538, 447,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 603,32767, 543,32767,32767,32767, - 32767, 432, 9, 74, 492, 42, 43, 51, 57, 520, - 521, 522, 523, 517, 518, 524, 519,32767,32767, 525, - 568,32767,32767, 544, 595,32767,32767,32767,32767,32767, - 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 530,32767, 136,32767,32767,32767,32767, - 32767,32767,32767,32767, 526,32767,32767,32767, 543,32767, - 32767,32767,32767, 314, 311,32767,32767,32767,32767,32767, + 32767, 102,32767, 100, 540, 412, 414, 507, 425, 426, + 424, 393,32767, 514,32767, 102,32767, 516,32767,32767, + 32767,32767,32767,32767,32767, 539,32767, 546, 546,32767, + 500, 100, 195,32767,32767, 515,32767, 195, 195,32767, + 32767,32767,32767,32767,32767,32767,32767, 609, 500, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 32767, 195, 110,32767,32767,32767, 100, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 190,32767, 268, + 270, 102, 563, 195,32767, 519,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 512,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 543,32767,32767,32767,32767,32767, 291,32767, 308, + 32767,32767, 500, 435, 138,32767, 138, 546, 427, 428, + 429, 502, 546, 546, 546, 312, 289,32767,32767,32767, + 32767, 517, 100, 100, 100, 100, 512,32767,32767,32767, + 32767, 111, 486, 99, 99, 99, 99, 99, 103, 101, + 32767,32767,32767,32767, 223,32767, 99,32767, 101, 101, + 32767,32767, 223, 225, 212, 101, 227,32767, 567, 568, + 223, 101, 227, 227, 227, 247, 247, 489, 318, 101, + 99, 101, 101, 197, 318, 318,32767, 101, 489, 318, + 489, 318, 199, 318, 318, 318, 489, 318,32767, 101, + 318, 214, 99, 99, 318,32767,32767,32767, 502,32767, + 32767,32767,32767,32767,32767,32767, 222,32767,32767,32767, + 32767,32767,32767,32767,32767, 533,32767, 551, 565, 433, + 434, 436, 550, 548, 458, 459, 460, 461, 462, 463, + 464, 466, 597,32767, 506,32767,32767,32767, 338,32767, + 607,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 608,32767, + 546,32767,32767,32767,32767, 432, 9, 74, 495, 42, + 43, 51, 57, 523, 524, 525, 526, 520, 521, 527, + 522,32767,32767, 528, 573,32767,32767, 547, 600,32767, + 32767,32767,32767,32767,32767, 138,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 533,32767, 136, + 32767,32767,32767,32767,32767,32767,32767,32767, 529,32767, + 32767,32767, 546,32767,32767,32767,32767, 314, 311,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 286,32767,32767, 381, - 499, 294, 296, 297,32767,32767,32767,32767, 360,32767, + 32767,32767,32767,32767,32767, 546,32767,32767,32767,32767, + 32767, 291,32767, 308,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 152, 152, 3, 3, 341, 152, 152, 152, 341, 341, - 152, 341, 341, 341, 152, 152, 152, 152, 152, 152, - 280, 185, 262, 265, 247, 247, 152, 352, 152 + 286,32767,32767, 381, 502, 294, 296, 297,32767,32767, + 32767,32767, 360,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 152, 152, 3, 3, 341, 152, + 152, 152, 341, 341, 152, 341, 341, 341, 152, 152, + 152, 152, 152, 152, 280, 185, 262, 265, 247, 247, + 152, 352, 152 ); protected array $goto = array( - 196, 196, 1034, 1065, 697, 431, 661, 621, 658, 319, - 706, 425, 313, 314, 335, 576, 430, 336, 432, 638, - 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, + 196, 196, 1038, 1069, 701, 353, 433, 665, 856, 710, + 427, 321, 315, 316, 337, 580, 432, 338, 434, 642, + 658, 659, 857, 676, 677, 678, 979, 167, 167, 167, 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, - 189, 190, 191, 192, 218, 216, 219, 536, 537, 421, - 538, 540, 541, 542, 543, 544, 545, 546, 547, 1136, + 189, 190, 191, 192, 218, 216, 219, 539, 540, 423, + 541, 544, 545, 546, 547, 548, 549, 550, 551, 1140, 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, - 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, - 258, 259, 260, 261, 262, 263, 264, 268, 269, 270, - 271, 281, 282, 316, 317, 318, 426, 427, 428, 581, + 176, 178, 215, 217, 220, 238, 243, 244, 255, 257, + 258, 259, 260, 261, 262, 263, 264, 269, 270, 271, + 272, 282, 283, 318, 319, 320, 428, 429, 430, 585, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, - 200, 239, 188, 189, 190, 191, 192, 218, 1136, 201, + 200, 239, 188, 189, 190, 191, 192, 218, 1140, 201, 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, - 212, 213, 214, 855, 466, 466, 278, 278, 278, 278, - 623, 623, 351, 466, 1269, 600, 1269, 1269, 1269, 1269, - 1269, 1269, 1269, 1269, 1269, 1287, 1287, 599, 1100, 1287, - 709, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - 508, 700, 458, 1098, 975, 559, 552, 860, 419, 909, - 904, 905, 918, 861, 906, 858, 907, 908, 859, 848, - 827, 912, 354, 354, 354, 354, 396, 399, 560, 601, - 605, 1087, 1082, 1083, 1084, 341, 552, 559, 568, 569, - 344, 579, 602, 616, 617, 408, 409, 1232, 440, 479, - 670, 22, 671, 886, 412, 413, 414, 481, 684, 349, - 1237, 415, 1237, 1107, 1108, 347, 833, 1034, 1034, 1237, - 573, 848, 1034, 1327, 1034, 1034, 1040, 1039, 1034, 1034, - 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1319, - 1319, 1319, 1319, 1237, 893, 851, 893, 893, 1237, 1237, - 1237, 1237, 1233, 1234, 1237, 1237, 1237, 833, 355, 833, - 843, 996, 252, 252, 1043, 1044, 1037, 1037, 355, 355, - 681, 952, 394, 926, 1029, 1045, 1046, 927, 1235, 1295, - 1296, 942, 355, 355, 942, 913, 355, 914, 1354, 250, - 250, 250, 250, 245, 253, 548, 548, 548, 548, 554, - 604, 1285, 1285, 355, 355, 1285, 571, 1285, 1285, 1285, - 1285, 1285, 1285, 1285, 1285, 1285, 539, 539, 342, 424, - 539, 611, 539, 539, 539, 539, 539, 539, 539, 539, - 539, 566, 476, 1312, 1313, 733, 637, 639, 325, 308, - 659, 848, 343, 342, 683, 687, 1010, 695, 704, 1006, - 660, 1298, 609, 624, 627, 628, 629, 630, 651, 652, - 653, 708, 1216, 944, 1314, 1315, 1217, 1220, 945, 1221, - 1337, 1337, 686, 352, 353, 868, 553, 563, 450, 450, - 450, 553, 1309, 563, 1309, 1133, 397, 462, 1337, 1058, - 880, 1309, 1185, 867, 500, 5, 501, 6, 469, 580, - 470, 471, 507, 554, 878, 1340, 1340, 1345, 1346, 433, - 438, 550, 666, 550, 433, 682, 1321, 1321, 1321, 1321, - 550, 337, 1041, 1041, 931, 1123, 873, 665, 1052, 1048, - 1049, 619, 845, 876, 324, 275, 324, 1015, 967, 410, - 705, 577, 614, 1305, 456, 872, 403, 664, 994, 969, - 969, 969, 969, 866, 870, 456, 963, 970, 881, 869, - 1070, 1074, 631, 633, 635, 1227, 1230, 958, 615, 978, - 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, - 450, 999, 1018, 450, 971, 1073, 732, 477, 1228, 1307, - 1307, 1073, 736, 968, 551, 1008, 1003, 882, 694, 1075, - 1071, 829, 255, 255, 980, 0, 1118, 0, 1013, 1013, - 694, 0, 0, 0, 694, 1116, 885 + 212, 213, 214, 859, 421, 1041, 1041, 625, 662, 685, + 956, 251, 251, 1033, 1049, 1050, 279, 279, 279, 279, + 344, 831, 852, 627, 627, 890, 604, 1276, 1276, 1276, + 1276, 1276, 1276, 1276, 1276, 1276, 1276, 351, 249, 249, + 249, 249, 246, 252, 345, 344, 577, 864, 460, 913, + 908, 909, 922, 865, 910, 862, 911, 912, 863, 469, + 469, 916, 897, 855, 897, 897, 357, 917, 469, 918, + 1336, 1091, 1086, 1087, 1088, 852, 357, 357, 613, 628, + 631, 632, 633, 634, 655, 656, 657, 712, 396, 698, + 357, 357, 833, 1000, 357, 441, 1363, 354, 355, 872, + 1244, 698, 1244, 1244, 426, 698, 615, 558, 1038, 1038, + 1244, 357, 357, 1038, 884, 1038, 1038, 871, 575, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1328, 1328, 1328, 1328, 1137, 1244, 356, 356, 356, 356, + 1244, 1244, 1244, 1244, 1111, 1112, 1244, 1244, 1244, 1220, + 948, 563, 556, 1221, 1224, 949, 1225, 1062, 554, 1307, + 554, 554, 482, 603, 1104, 930, 713, 465, 554, 931, + 484, 5, 946, 6, 1189, 946, 511, 704, 664, 1102, + 690, 343, 556, 563, 572, 573, 346, 583, 606, 620, + 621, 1044, 1043, 458, 852, 1047, 1048, 22, 973, 973, + 973, 973, 327, 310, 458, 967, 974, 1295, 1295, 440, + 558, 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, + 1295, 1292, 1292, 837, 686, 1292, 1292, 1292, 1292, 1292, + 1292, 1292, 1292, 1292, 1292, 543, 543, 1323, 1324, 543, + 543, 543, 543, 543, 543, 543, 543, 543, 543, 542, + 542, 254, 254, 542, 670, 542, 542, 542, 542, 542, + 542, 542, 542, 339, 837, 962, 837, 557, 567, 581, + 618, 557, 849, 567, 877, 1237, 399, 464, 451, 451, + 451, 451, 405, 1318, 619, 1318, 1318, 1239, 874, 472, + 584, 473, 474, 1318, 1235, 1075, 882, 570, 1022, 1354, + 1355, 737, 641, 643, 740, 1079, 663, 479, 1321, 1322, + 687, 691, 1014, 699, 708, 1010, 503, 886, 504, 1330, + 1330, 1330, 1330, 1122, 510, 880, 984, 410, 411, 0, + 1346, 1346, 674, 1261, 675, 0, 414, 415, 416, 0, + 688, 1240, 1241, 417, 0, 0, 1314, 349, 1346, 0, + 847, 885, 873, 1074, 1078, 552, 552, 552, 552, 0, + 608, 0, 0, 982, 0, 1349, 1349, 0, 0, 1242, + 1304, 1305, 451, 451, 451, 451, 451, 451, 451, 451, + 451, 451, 451, 935, 1127, 451, 0, 972, 1077, 0, + 623, 0, 1316, 1316, 1077, 0, 1019, 0, 326, 276, + 326, 326, 0, 0, 876, 0, 668, 998, 435, 1120, + 889, 0, 870, 435, 398, 401, 564, 605, 609, 0, + 1003, 1045, 1045, 975, 1234, 736, 669, 1056, 1052, 1053, + 971, 412, 709, 555, 1012, 1007, 635, 637, 639, 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, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1017, 1017 ); protected array $gotoCheck = array( - 42, 42, 73, 127, 73, 66, 66, 56, 56, 66, - 9, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 86, 86, 26, 86, 86, 86, 27, 42, 42, 42, + 42, 42, 73, 127, 73, 97, 66, 66, 26, 9, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 86, 86, 27, 86, 86, 86, 49, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -918,91 +937,107 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 15, 149, 149, 23, 23, 23, 23, - 108, 108, 97, 149, 108, 130, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 170, 170, 8, 8, 170, - 8, 170, 170, 170, 170, 170, 170, 170, 170, 170, - 8, 8, 83, 8, 49, 76, 76, 15, 43, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 22, - 6, 15, 24, 24, 24, 24, 59, 59, 59, 59, - 59, 15, 15, 15, 15, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 82, 82, 20, 83, 84, - 82, 76, 82, 45, 82, 82, 82, 84, 82, 179, - 73, 82, 73, 144, 144, 82, 12, 73, 73, 73, - 172, 22, 73, 181, 73, 73, 118, 118, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 9, - 9, 9, 9, 73, 25, 25, 25, 25, 73, 73, - 73, 73, 20, 20, 73, 73, 73, 12, 14, 12, - 20, 103, 5, 5, 119, 119, 89, 89, 14, 14, - 89, 89, 62, 73, 89, 89, 89, 73, 20, 20, - 20, 9, 14, 14, 9, 65, 14, 65, 14, 5, - 5, 5, 5, 5, 5, 107, 107, 107, 107, 14, - 107, 171, 171, 14, 14, 171, 104, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 173, 173, 168, 13, - 173, 13, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 48, 176, 176, 176, 48, 48, 48, 169, 169, - 48, 22, 168, 168, 48, 48, 48, 48, 48, 48, - 64, 14, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 79, 79, 178, 178, 79, 79, 79, 79, - 182, 182, 14, 97, 97, 35, 9, 9, 23, 23, - 23, 9, 130, 9, 130, 150, 9, 9, 182, 114, - 35, 130, 151, 35, 155, 46, 155, 46, 9, 9, - 9, 9, 155, 14, 9, 182, 182, 9, 9, 117, - 113, 19, 120, 19, 117, 116, 130, 130, 130, 130, - 19, 29, 117, 117, 17, 17, 39, 117, 117, 117, - 117, 17, 18, 9, 24, 24, 24, 17, 93, 93, - 93, 2, 2, 130, 19, 17, 28, 17, 17, 19, - 19, 19, 19, 17, 37, 19, 19, 19, 16, 16, - 16, 16, 85, 85, 85, 17, 14, 92, 80, 16, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 50, 110, 23, 50, 130, 50, 157, 160, 130, - 130, 130, 99, 16, 50, 50, 50, 41, 7, 132, - 129, 7, 5, 5, 96, -1, 147, -1, 107, 107, - 7, -1, -1, -1, 7, 16, 16 + 42, 42, 42, 15, 43, 89, 89, 56, 56, 89, + 89, 5, 5, 89, 89, 89, 23, 23, 23, 23, + 170, 6, 22, 108, 108, 45, 130, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 181, 5, 5, + 5, 5, 5, 5, 170, 170, 174, 15, 83, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 149, + 149, 15, 25, 25, 25, 25, 14, 65, 149, 65, + 183, 15, 15, 15, 15, 22, 14, 14, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 62, 7, + 14, 14, 7, 103, 14, 83, 14, 97, 97, 35, + 73, 7, 73, 73, 13, 7, 13, 14, 73, 73, + 73, 14, 14, 73, 35, 73, 73, 35, 104, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 9, 9, 9, 9, 150, 73, 24, 24, 24, 24, + 73, 73, 73, 73, 144, 144, 73, 73, 73, 79, + 79, 76, 76, 79, 79, 79, 79, 114, 19, 14, + 19, 19, 84, 8, 8, 73, 8, 151, 19, 73, + 84, 46, 9, 46, 151, 9, 8, 8, 64, 8, + 14, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 118, 118, 19, 22, 119, 119, 76, 19, 19, + 19, 19, 171, 171, 19, 19, 19, 172, 172, 113, + 14, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 173, 173, 12, 116, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 175, 175, 180, 180, 175, + 175, 175, 175, 175, 175, 175, 175, 175, 175, 158, + 158, 5, 5, 158, 120, 158, 158, 158, 158, 158, + 158, 158, 158, 29, 12, 92, 12, 9, 9, 2, + 2, 9, 18, 9, 39, 14, 9, 9, 23, 23, + 23, 23, 28, 130, 80, 130, 130, 20, 37, 9, + 9, 9, 9, 130, 162, 129, 9, 48, 110, 9, + 9, 48, 48, 48, 99, 132, 48, 178, 178, 178, + 48, 48, 48, 48, 48, 48, 155, 41, 155, 130, + 130, 130, 130, 147, 155, 9, 96, 82, 82, -1, + 184, 184, 82, 20, 82, -1, 82, 82, 82, -1, + 82, 20, 20, 82, -1, -1, 130, 82, 184, -1, + 20, 16, 16, 16, 16, 107, 107, 107, 107, -1, + 107, -1, -1, 16, -1, 184, 184, -1, -1, 20, + 20, 20, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 17, 17, 23, -1, 16, 130, -1, + 17, -1, 130, 130, 130, -1, 17, -1, 24, 24, + 24, 24, -1, -1, 17, -1, 17, 17, 117, 16, + 16, -1, 17, 117, 59, 59, 59, 59, 59, -1, + 50, 117, 117, 50, 17, 50, 117, 117, 117, 117, + 93, 93, 93, 50, 50, 50, 85, 85, 85, -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, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 107, 107 ); protected array $gotoBase = array( - 0, 0, -221, 0, 0, 311, 200, 541, 179, -10, - 0, 0, -30, 32, 11, -185, 56, 9, 173, 196, - -146, 0, -59, 163, 219, 291, 18, 22, 159, 175, - 0, 0, 0, 0, 0, 54, 0, 165, 0, 153, - 0, 106, -1, 189, 0, 230, -291, 0, -330, 186, - 519, 0, 0, 0, 0, 0, -33, 0, 0, 181, - 0, 0, 280, 0, 158, 321, -236, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -140, 0, 0, 4, - 174, 44, -246, -76, -220, 33, -698, 0, 0, 37, - 0, 0, 188, 184, 0, 0, 111, -311, 0, 135, - 0, 0, 0, 276, 313, 0, 0, 317, -71, 0, - 162, 0, 0, 183, 166, 0, 182, 187, -3, 29, - 172, 0, 0, 0, 0, 0, 0, 1, 0, 176, - 167, 0, 107, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -12, 0, 0, 112, 0, 130, - 190, 168, 0, 0, 0, -51, 0, 97, 0, 0, - 169, 0, 0, 0, 0, 0, 0, 0, 71, 67, - -56, 110, 241, 125, 0, 0, 82, 0, 42, 229, - 0, 242, 113, 0, 0 + 0, 0, -287, 0, 0, 170, 161, 242, 315, -11, + 0, 0, 85, -75, -73, -187, 57, 75, 121, 53, + 52, 0, -97, 173, 293, 219, 4, 18, 103, 125, + 0, 0, 0, 0, 0, -114, 0, 107, 0, 109, + 0, 35, -1, 145, 0, 162, -409, 0, -258, 8, + 568, 0, 0, 0, 0, 0, 127, 0, 0, 529, + 0, 0, 206, 0, 96, 213, -235, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -36, 0, 0, -101, + 98, -122, -7, -71, -150, 114, -702, 0, 0, -115, + 0, 0, 94, 284, 0, 0, 42, -481, 0, 55, + 0, 0, 0, 218, 235, 0, 0, 487, -58, 0, + 86, 0, 0, 91, 43, 0, 100, 295, 71, 69, + 123, 0, 0, 0, 0, 0, 0, 1, 0, 79, + 178, 0, 22, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 28, 0, 0, 38, 0, 185, + 48, 59, 0, 0, 0, -22, 0, 0, 168, 0, + 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, + -119, 39, 126, 140, 177, 154, 0, 0, 165, 0, + 23, 167, 0, 199, 181, 0, 0 ); protected array $gotoDefault = array( - -32768, 512, 740, 4, 741, 935, 816, 825, 597, 530, - 707, 348, 625, 422, 1303, 911, 1122, 578, 844, 1246, - 1254, 457, 847, 330, 730, 923, 894, 895, 400, 386, - 392, 398, 649, 626, 494, 879, 453, 871, 486, 874, - 452, 883, 164, 418, 510, 887, 3, 890, 557, 921, - 973, 387, 898, 388, 677, 900, 562, 902, 903, 395, - 401, 402, 1127, 570, 622, 915, 256, 564, 916, 385, - 917, 925, 390, 393, 688, 465, 505, 499, 411, 1102, - 565, 608, 646, 447, 473, 620, 632, 618, 480, 434, - 416, 329, 957, 965, 487, 463, 979, 350, 987, 738, - 1135, 640, 489, 995, 641, 1002, 1005, 531, 532, 478, - 1017, 272, 1020, 490, 19, 667, 1031, 1032, 668, 642, - 1054, 643, 669, 644, 1056, 472, 598, 1064, 454, 1072, - 1291, 455, 1076, 266, 1079, 277, 417, 435, 1085, 1086, - 9, 1092, 698, 699, 11, 276, 509, 1117, 689, 451, - 1134, 439, 1204, 1206, 558, 491, 1224, 1223, 680, 506, - 1229, 448, 1294, 449, 533, 474, 315, 534, 1338, 307, - 333, 312, 549, 294, 334, 535, 475, 1300, 1308, 331, - 31, 1328, 1339, 575, 613 + -32768, 515, 744, 4, 745, 939, 820, 829, 601, 533, + 711, 350, 629, 424, 1312, 915, 1126, 582, 848, 1253, + 1227, 459, 851, 332, 734, 927, 898, 899, 402, 388, + 394, 400, 653, 630, 497, 883, 455, 875, 489, 878, + 454, 887, 164, 420, 513, 891, 3, 894, 561, 925, + 977, 389, 902, 390, 681, 904, 566, 906, 907, 397, + 403, 404, 1131, 574, 626, 919, 256, 568, 920, 387, + 921, 929, 392, 395, 692, 468, 508, 502, 413, 1106, + 569, 612, 650, 448, 476, 624, 636, 622, 483, 436, + 418, 331, 961, 969, 490, 466, 983, 352, 991, 742, + 1139, 644, 492, 999, 645, 1006, 1009, 534, 535, 481, + 1021, 273, 1024, 493, 19, 671, 1035, 1036, 672, 646, + 1058, 647, 673, 648, 1060, 475, 602, 1068, 456, 1076, + 1300, 457, 1080, 266, 1083, 278, 419, 437, 1089, 1090, + 9, 1096, 702, 703, 11, 277, 512, 1121, 693, 453, + 1138, 452, 1208, 1210, 562, 494, 1228, 480, 295, 1231, + 684, 509, 1236, 449, 1303, 450, 536, 477, 317, 537, + 1347, 309, 335, 314, 553, 296, 336, 538, 478, 1309, + 1317, 333, 31, 1337, 1348, 579, 617 ); protected array $ruleToNonTerminal = array( @@ -1054,20 +1089,21 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 156, 150, 150, 155, 155, 158, 159, - 159, 160, 161, 162, 162, 162, 162, 19, 19, 73, - 73, 73, 73, 151, 151, 151, 151, 164, 164, 152, - 152, 154, 154, 154, 157, 157, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 171, 171, 171, 108, 173, - 173, 173, 173, 153, 153, 153, 153, 153, 153, 153, - 153, 59, 59, 167, 167, 167, 167, 174, 174, 163, - 163, 163, 175, 175, 175, 175, 175, 175, 74, 74, - 66, 66, 66, 66, 130, 130, 130, 130, 178, 177, - 166, 166, 166, 166, 166, 166, 166, 165, 165, 165, - 176, 176, 176, 176, 107, 172, 180, 180, 179, 179, - 181, 181, 181, 181, 181, 181, 181, 181, 169, 169, - 169, 169, 168, 183, 182, 182, 182, 182, 182, 182, - 182, 182, 184, 184, 184, 184 + 42, 42, 42, 156, 158, 158, 159, 150, 150, 155, + 155, 160, 161, 161, 162, 163, 164, 164, 164, 164, + 19, 19, 73, 73, 73, 73, 151, 151, 151, 151, + 166, 166, 152, 152, 154, 154, 154, 157, 157, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 173, 173, + 173, 108, 175, 175, 175, 175, 153, 153, 153, 153, + 153, 153, 153, 153, 59, 59, 169, 169, 169, 169, + 169, 176, 176, 165, 165, 165, 165, 177, 177, 177, + 177, 177, 177, 74, 74, 66, 66, 66, 66, 130, + 130, 130, 130, 180, 179, 168, 168, 168, 168, 168, + 168, 168, 167, 167, 167, 178, 178, 178, 178, 107, + 174, 182, 182, 181, 181, 183, 183, 183, 183, 183, + 183, 183, 183, 171, 171, 171, 171, 170, 185, 184, + 184, 184, 184, 184, 184, 184, 184, 186, 186, 186, + 186 ); protected array $ruleToLength = array( @@ -1119,20 +1155,21 @@ class Php7 extends \PhpParser\ParserAbstract 3, 4, 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, - 10, 9, 10, 8, 3, 2, 0, 4, 2, 1, - 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, - 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, - 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, - 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, - 3, 1, 1, 4, 4, 1, 4, 4, 0, 1, - 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, - 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, - 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, - 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, - 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, - 6, 3, 1, 1, 2, 1 + 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, + 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, + 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, + 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 1, 4, 4, + 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, + 4, 2, 2, 1, 3, 1, 4, 4, 3, 3, + 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, + 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, + 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, + 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, + 1 ); protected function initReduceCallbacks(): void { @@ -2361,339 +2398,346 @@ protected function initReduceCallbacks(): void { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 486 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 487 => null, + 488 => null, + 489 => static function ($self, $stackPos) { $self->semValue = array(); }, - 487 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 488 => null, - 489 => static function ($self, $stackPos) { + 491 => null, + 492 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 490 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 491 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 498 => null, - 499 => static function ($self, $stackPos) { + 501 => null, + 502 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 503 => null, - 504 => null, - 505 => static function ($self, $stackPos) { + 506 => null, + 507 => null, + 508 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 506 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 507 => null, - 508 => null, - 509 => static function ($self, $stackPos) { + 510 => null, + 511 => null, + 512 => static function ($self, $stackPos) { $self->semValue = null; }, - 510 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 511 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { $self->semValue = array(); }, - 512 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 513 => static function ($self, $stackPos) { + 516 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 514 => static function ($self, $stackPos) { + 517 => static function ($self, $stackPos) { $self->semValue = array(); }, - 515 => null, - 516 => static function ($self, $stackPos) { + 518 => null, + 519 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 517 => static function ($self, $stackPos) { + 520 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 518 => static function ($self, $stackPos) { + 521 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 519 => static function ($self, $stackPos) { + 522 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 520 => static function ($self, $stackPos) { + 523 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 521 => static function ($self, $stackPos) { + 524 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 522 => static function ($self, $stackPos) { + 525 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 523 => static function ($self, $stackPos) { + 526 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 524 => static function ($self, $stackPos) { + 527 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 525 => static function ($self, $stackPos) { + 528 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 526 => static function ($self, $stackPos) { + 529 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 527 => static function ($self, $stackPos) { + 530 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 528 => static function ($self, $stackPos) { + 531 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 529 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 530 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 531 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 532 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 533 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 534 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 535 => null, - 536 => null, - 537 => null, - 538 => static function ($self, $stackPos) { + 538 => null, + 539 => null, + 540 => null, + 541 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 539 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 540 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 541 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 542 => null, - 543 => null, 544 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = null; }, 545 => null, 546 => null, - 547 => null, - 548 => null, - 549 => null, - 550 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, + 548 => null, + 549 => null, + 550 => null, 551 => null, 552 => null, - 553 => static function ($self, $stackPos) { + 553 => null, + 554 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 555 => null, + 556 => null, + 557 => null, + 558 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 554 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 555 => null, - 556 => static function ($self, $stackPos) { + 560 => null, + 561 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 557 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 558 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = null; }, - 559 => null, - 560 => null, - 561 => null, - 562 => static function ($self, $stackPos) { + 564 => null, + 565 => null, + 566 => null, + 567 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 563 => static function ($self, $stackPos) { + 568 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 564 => null, - 565 => static function ($self, $stackPos) { + 569 => null, + 570 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 566 => static function ($self, $stackPos) { + 571 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 567 => static function ($self, $stackPos) { + 572 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 568 => static function ($self, $stackPos) { + 573 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 569 => static function ($self, $stackPos) { + 574 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 570 => null, - 571 => static function ($self, $stackPos) { + 575 => null, + 576 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 572 => static function ($self, $stackPos) { + 577 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 573 => static function ($self, $stackPos) { + 578 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 574 => static function ($self, $stackPos) { + 579 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 575 => static function ($self, $stackPos) { + 580 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 576 => static function ($self, $stackPos) { + 581 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 577 => null, - 578 => static function ($self, $stackPos) { + 582 => null, + 583 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 579 => null, - 580 => null, - 581 => static function ($self, $stackPos) { + 584 => null, + 585 => null, + 586 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 582 => null, - 583 => static function ($self, $stackPos) { + 587 => null, + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 584 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 585 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 586 => null, - 587 => static function ($self, $stackPos) { + 591 => null, + 592 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 588 => static function ($self, $stackPos) { + 593 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 589 => static function ($self, $stackPos) { + 594 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 590 => static function ($self, $stackPos) { + 595 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 591 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 592 => static function ($self, $stackPos) { + 597 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 593 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 594 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 595 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 597 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 598 => static function ($self, $stackPos) { + 603 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 599 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 600 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 601 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 602 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 603 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 604 => null, - 605 => static function ($self, $stackPos) { + 609 => null, + 610 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 606 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 607 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 608 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 609 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 610 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 611 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 612 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 613 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 615 => null, + 620 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 27154d248c..1317c54334 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -160,16 +160,16 @@ class Php8 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 395; protected int $tokenToSymbolMapSize = 396; - protected int $actionTableSize = 1257; - protected int $gotoTableSize = 657; + protected int $actionTableSize = 1272; + protected int $gotoTableSize = 689; protected int $invalidSymbol = 168; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 435; - protected int $numNonLeafStates = 739; + protected int $YY2TBLSTATE = 437; + protected int $numNonLeafStates = 743; protected array $symbolToName = array( "EOF", @@ -386,132 +386,134 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $action = array( - 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, - 138, 38, 327,-32766,-32766,-32766,-32766,-32766,-32766, 837, - 826,-32767,-32767,-32767,-32767, 102, 103, 104, 1112, 1113, - 1114, 1111, 1110, 1109, 1115, 745, 744,-32766, 1027,-32766, + 133, 134, 135, 586, 136, 137, 0, 755, 756, 757, + 138, 38, 329,-32766,-32766,-32766,-32766,-32766,-32766, 841, + 830,-32767,-32767,-32767,-32767, 102, 103, 104, 1116, 1117, + 1118, 1115, 1114, 1113, 1119, 749, 748,-32766, 1031,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1245,-32766,-32766, 1322, 754, 1112, 1113, 1114, 1111, - 1110, 1109, 1115, 459, 460, 461, 2, 990, 1306, 265, - 139, 404, 758, 759, 760, 761, 467, 468, 429, 835, - 606, -16, 1341, 23, 292, 815, 762, 763, 764, 765, - 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, - 794, 795, 783, 784, 345, 346, 786, 787, 772, 773, - 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, - 584, 779, 780, 585, 586, 941, 803, 801, 802, 814, - 798, 799, 835, 826, 587, 588, 797, 589, 590, 591, - 592, 593, 594, -328, 36, 251, 35, -194, 800, 595, - 596, -193, 140, -85, 133, 134, 135, 582, 136, 137, - 1060, 751, 752, 753, 138, 38, 129, -110, -110, -585, - -32766, -585, -110,-32766,-32766,-32766, 241, 836, -110, 145, - 959, 960,-32766,-32766,-32766, 961, -594,-32766, 482, 745, - 744, 955, 1036, -594,-32766, 991,-32766,-32766,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 299, 754, - 831, 75,-32766,-32766,-32766, 291, 142, 326, 242, -85, - 326, 382, 381, 265, 139, 404, 758, 759, 760, 761, - 82, 423, 429,-32766, 326,-32766,-32766,-32766,-32766, 815, - 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, - 791, 583, 792, 793, 794, 795, 783, 784, 345, 346, - 786, 787, 772, 773, 774, 776, 777, 778, 356, 818, - 819, 820, 821, 822, 584, 779, 780, 585, 586, 254, - 803, 801, 802, 814, 798, 799, 832, 725, 587, 588, - 797, 589, 590, 591, 592, 593, 594, -328, 83, 84, - 85, -194, 800, 595, 596, -193, 149, 775, 746, 747, - 748, 749, 750, 151, 751, 752, 753, 788, 789, 37, - 483, 86, 87, 88, 89, 90, 91, 92, 93, 94, + -32767, 1252,-32766,-32766, 1331, 758, 1116, 1117, 1118, 1115, + 1114, 1113, 1119, 461, 462, 463, 2, 994, 1315, 265, + 139, 406, 762, 763, 764, 765, 470, 471, 431, 839, + 610, -16, 1350, 23, 293, 819, 766, 767, 768, 769, + 770, 771, 772, 773, 774, 775, 795, 587, 796, 797, + 798, 799, 787, 788, 347, 348, 790, 791, 776, 777, + 778, 780, 781, 782, 358, 822, 823, 824, 825, 826, + 588, 783, 784, 589, 590, 945, 807, 805, 806, 818, + 802, 803, 839, 830, 591, 592, 801, 593, 594, 595, + 596, 597, 598, -328, 36, 250, 35, -194, 804, 599, + 600, -193, 140, -85, 133, 134, 135, 586, 136, 137, + 1064, 755, 756, 757, 138, 38, 129, -110, -110, -590, + -32766, -590, -110,-32766,-32766,-32766, 241, 840, -110, 145, + 963, 964,-32766,-32766,-32766, 965, -599,-32766, 485, 749, + 748, 959, 1040, -599,-32766, 995,-32766,-32766,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 301, 758, + 835, 75,-32766,-32766,-32766, 292, 142, 328, 242, -85, + 328, 384, 383, 265, 139, 406, 762, 763, 764, 765, + 82, 425, 431,-32766, 328,-32766,-32766,-32766,-32766, 819, + 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, + 795, 587, 796, 797, 798, 799, 787, 788, 347, 348, + 790, 791, 776, 777, 778, 780, 781, 782, 358, 822, + 823, 824, 825, 826, 588, 783, 784, 589, 590, 253, + 807, 805, 806, 818, 802, 803, 836, 729, 591, 592, + 801, 593, 594, 595, 596, 597, 598, -328, 83, 84, + 85, -194, 804, 599, 600, -193, 149, 779, 750, 751, + 752, 753, 754, 151, 755, 756, 757, 792, 793, 37, + 486, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, -594, 274, -594,-32766,-32766, - -32766,-32766,-32766,-32766, 310, 1089, 127, 312, 110, 737, - 1326, 21, 754,-32766,-32766,-32766, -272, 1325,-32766,-32766, - 1088,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, - 759, 760, 761, 1104,-32766, 824,-32766,-32766, -545, 429, - 1036, 323, 815, 762, 763, 764, 765, 766, 767, 768, - 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, - 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, - 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, - 781, 782, 1033, 803, 801, 802, 814, 798, 799, 745, - 744, 790, 796, 797, 804, 805, 807, 806, 808, 809, - 152,-32766, -545, -545, 1036, 800, 811, 810, 50, 51, - 52, 513, 53, 54, 1240, 1239, 1241, -545, 55, 56, - -110, 57,-32766, 1090, 920, -110, 556, -110, 292, -551, - 339, -545, 306, 103, 104, -110, -110, -110, -110, -110, - -110, -110, -110, 105, 106, 107, 108, 109, 1245, 274, - 380, 381, -591, -367, 715, -367, 340, 58, 59, -591, - 423, 110, 60, 370, 61, 248, 249, 62, 63, 64, - 65, 66, 67, 68, 69, -544, 28, 267, 70, 445, - 514,-32766, 374, -342, 1272, 1273, 515, 1278, 835, 862, - 389, 863, 1270, 42, 25, 516, 943, 517, 943, 518, - 920, 519, 299, 1036, 520, 521, 1266, 910, 441, 44, - 45, 446, 377, 376,-32766, 46, 522, 1023, 1022, 1021, - 1024, 368, 338, 391, 1238, 7, 291, 442, 1231, 835, - 524, 525, 526, 443, 1245, 357, 1036, 362, 834, -544, - -544, 154, 528, 529, 444, 1259, 1260, 1261, 1262, 1256, - 1257, 298,-32766,-32766, -544, -548, 1059, 1263, 1258, 291, - 1236, 1240, 1239, 1241, 299, 841, -550, 71, -544, 656, - 26, 321, 322, 326, -153, -153, -153, 920, 612, 675, - 676, 1035, 922, 910,-32766, 286, 710, 835, 155, -153, - 828, -153, 862, -153, 863, -153, 150, 407, 156, 1240, - 1239, 1241,-32766,-32766,-32766, 375, 1351, 716, 75, 1352, - 158, -591, 33, -591, 326, 835, 959, 960, -78, -548, - -548, 523, 920,-32766, 378, 379, 896, 955, -110, -110, + 105, 106, 107, 108, 109, -599, 275, -599,-32766,-32766, + -32766,-32766,-32766,-32766, 312, 1093, 127, 314, 110, 741, + 1335, 21, 758,-32766,-32766,-32766, -272, 1334,-32766,-32766, + 1092,-32766,-32766,-32766,-32766,-32766, 759, 760, 761, 762, + 763, 764, 765, 1108,-32766, 828,-32766,-32766, -550, 560, + 1040, 1273, 819, 766, 767, 768, 769, 770, 771, 772, + 773, 774, 775, 795, 817, 796, 797, 798, 799, 787, + 788, 789, 816, 790, 791, 776, 777, 778, 780, 781, + 782, 821, 822, 823, 824, 825, 826, 827, 783, 784, + 785, 786, 1037, 807, 805, 806, 818, 802, 803, 749, + 748, 794, 800, 801, 808, 809, 811, 810, 812, 813, + 1285, 325, -550, -550, 1040, 804, 815, 814, 50, 51, + 52, 516, 53, 54, 866, 341, 867, -550, 55, 56, + -110, 57, 839, 924, -367, -110, -367, -110, 293, -556, + 152, -550, 308, 103, 104, -110, -110, -110, -110, -110, + -110, -110, -110, 105, 106, 107, 108, 109, 947, 275, + 342, 924, 1252, 719,-32766,-32766,-32766, 58, 59, -549, + 372, 110, 60, 838, 61, 247, 248, 62, 63, 64, + 65, 66, 67, 68, 69,-32766, 28, 267, 70, 446, + 517, 720, 376, -342, 1279, 1280, 518, 359, 839, -548, + 391, -546, 1277, 42, 25, 519, 947, 520, 616, 521, + 924, 522, 442, 141, 523, 524, 914, 328, 443, 44, + 45, 447, 379, 378,-32766, 46, 525, 1027, 1026, 1025, + 1028, 370, 340, -549, -549, 444, 1360, 431, 1238, 1361, + 527, 528, 529, 839, 914, 364, 1040, 445, -549,-32766, + -32766,-32766, 531, 532, 845, 1266, 1267, 1268, 1269, 1263, + 1264, 300, -549, -548, -548, -546, -546, 1270, 1265, 292, + -32766, 1247, 1246, 1248, 301, 749, 748, 71, -548, -78, + -546, 323, 324, 328, -153, -153, -153, 393,-32766, 7, + -555, 926, -548, 914, -546, 714, 660, 26,-32766, -153, + 832, -153, 866, -153, 867, -153, 382, 383, 28, 268, + 1040, 154, 1247, 1246, 1248, 377, 425, 155, -596, 926, + 839, 1094, 75, 714, 1277, -596, 963, 964, 328, -547, + 156, 526, 158, 292, 1245, 33, 900, 959, -110, -110, -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 745, 744, -58, -548, -57, - -110, -110, 717, 745, 744, -110, 383, 384, 922, 1033, - 910, -110, 710, -153, 647, 648, 830, 124, 141, 125, - -32766, 1033, 326, 712, 1150, 1152, 48, 130, 131, 144, - 159, 1036,-32766, 160, 161, -543, 28, 162, 1238, 920, - 163, 299, 920, 1036, 75,-32766,-32766,-32766, 835,-32766, - 326,-32766, 1270,-32766, 282, 910,-32766, -87, -84, -78, - -73,-32766,-32766,-32766, -4, 920, 282,-32766,-32766, 720, - -72, -71, 727,-32766, 420, -70, -69, -68, -67, -66, - 287, 286,-32766, -65, -46, 922, 745, 744, 1231, 710, - 300, 301, -546, -18, 148, -302, 273, 283, 726, -543, - -543, 729, 528, 529, 920, 1259, 1260, 1261, 1262, 1256, - 1257, 919, 74, 147, -543, 288, 293, 1263, 1258, 126, - -298, 280, 910,-32766, 281, 910, 284, 73, -543, 1238, - 976, 690, 322, 326, 710, 285,-32766,-32766,-32766, 332, - -32766, 274,-32766, 294,-32766, 937, 110,-32766, 910, 685, - 835, -543,-32766,-32766,-32766, 826, -546, -546,-32766,-32766, - 146,-32766, -50, 701,-32766, 420, 703, 691, 20, 1119, - 375, -546, 436,-32766, 645, 1353, 1277, 297, 657,-32766, - 1279, 959, 960, 561, 956, -546, 523, 910, 692, 693, - 678, 527, 955, -110, -110, -110, 132, 922, 662, 663, - 922, 710, 464, -508, 710,-32766, 1240, 1239, 1241, 493, - 679, 1238, 282, 939, 10, -543, -543, 40,-32766,-32766, - -32766, 731,-32766, 922,-32766, 307,-32766, 710, -4,-32766, - -543, 305, 41, 304,-32766,-32766,-32766, 0, 0,-32766, - -32766,-32766, 920, 0, -543, 1238,-32766, 420, 311, 0, - 567, 299,-32766,-32766,-32766,-32766,-32766, -498,-32766, 897, - -32766, 0, 922,-32766, 8, 0, 710, 24,-32766,-32766, - -32766,-32766, 372, 610,-32766,-32766, 834, 1238, 734, -275, - -32766, 420, 920, 735,-32766,-32766,-32766, 854,-32766,-32766, - -32766, 901,-32766, 1000, 977,-32766, 49, 984, 974, 488, - -32766,-32766,-32766,-32766, 985, 899,-32766,-32766, 972, 1238, - 574, 1093,-32766, 420, 1096, 1097,-32766,-32766,-32766, 1094, - -32766,-32766,-32766, 1095,-32766, 910, 1101,-32766, 1267, 846, - 1292, 1310,-32766,-32766,-32766, 1344, 650, 34,-32766,-32766, - -579, -250, -250, -250,-32766, 420, -578, 375, -577, -551, - 28, 267, -550,-32766, -549, -492, 1, 29, 959, 960, - 302, 303, 835, 523, 30, 910, 1270, 39, 896, 955, - -110, -110, -110, 43, 47, 373, 72, 76, 77, 78, - 79, -249, -249, -249, 80, 81, 143, 375, 153, 128, - -273, 157, 247, 328, 357, 358, 359, 360, 959, 960, - 922, 361, 1231, 523, 710, -250, 362, 363, 896, 955, - -110, -110, -110, 364, 365, 366, 367, 529, 28, 1259, - 1260, 1261, 1262, 1256, 1257, 369, 437, 555, 1207, -272, - 835, 1263, 1258, 13, 1270, 14,-32766, 15, 16, 18, - 922, 73, 1238, 1348, 710, -249, 322, 326, 406,-32766, - -32766,-32766, 484,-32766, 485,-32766, 492,-32766, 495, 496, - -32766, 497, 498, 502, 503,-32766,-32766,-32766, 504, 511, - 1231,-32766,-32766, 572, 696, 1249, 1190,-32766, 420, 1268, - 1062, 1061, 1042, 1226, 1038, 529,-32766, 1259, 1260, 1261, - 1262, 1256, 1257, -277, -102, 12, 17, 27, 296, 1263, - 1258, 405, 603, 607, 636, 702, 1194, 1244, 1191, 73, - 320, 1323, 0, 371, 322, 326, 711, 714, 718, 719, - 721, 722, 723, 724, 728, 0, 713, 0, 1350, 857, - 856, 865, 949, 992, 864, 1349, 948, 946, 947, 950, - 1222, 930, 940, 928, 982, 983, 634, 1347, 1304, 1293, - 1311, 1320, 0, 0, 1271, 0, 326 + 119, 120, 121, 122, 123, 679, 680, -58, 301, -57, + 1238, 124, 924, 749, 748, 1252, 150, 409, 926, 125, + 1243, 924, 714, -153, 531, 532, 834, 1266, 1267, 1268, + 1269, 1263, 1264, 716, 1154, 1156, -87, -4, 924, 1270, + 1265, 1039, 721, -547, -547, -546, 130, 749, 748, 73, + -32766, 724, 131, -552, 324, 328, 1245, 144, -547, 1247, + 1246, 1248, 159,-32766,-32766,-32766, 1037,-32766, 160,-32766, + -554,-32766, -547, 161,-32766, 380, 381, 924, 162,-32766, + -32766,-32766, 163, 49,-32766,-32766,-32766, -84, 1040, -78, + 1245,-32766, 422, 48, 924, 914, 839,-32766,-32766,-32766, + -32766,-32766, -73,-32766, 914,-32766, -72, 731,-32766, -546, + -546, 283, -71,-32766,-32766,-32766, -70, -552, -552,-32766, + -32766, 914, 385, 386, -546,-32766, 422, -596, -69, -596, + 74, -110, -110, -68,-32766, -50, -110, -67, -546, 651, + 652, -66, -110, 377, -65, 438, -552, 304, 305, -46, + 299,-32766, -18, 148, 963, 964, 274, 302, 303, 526, + 914, 284, 375, 730, 530, 959, -110, -110, -110, 132, + 980, 733, 301, 923, 714, 75, 128, 914,-32766, 926, + 147, 328, -302, 714, 1245, -298, 126, 10, 1063, 281, + 282,-32766,-32766,-32766, 285,-32766, 926,-32766, 286,-32766, + 714, -4,-32766, 334, 288, 275, 289,-32766,-32766,-32766, + 294, 295,-32766,-32766,-32766, 924, 941, 287, 1245,-32766, + 422, 110, 689, 146, 830,-32766,-32766,-32766,-32766,-32766, + 565,-32766, 666,-32766, 1362, 926,-32766, 705, 839, 714, + 1123,-32766,-32766,-32766,-32766,-32766, 667,-32766,-32766, 309, + 1245, 661, 926,-32766, 422, 924, 714,-32766,-32766,-32766, + 682,-32766,-32766,-32766, 707,-32766, 306, 960,-32766, 313, + -32766, 683, 491,-32766,-32766,-32766,-32766, 20, 467,-32766, + -32766, 496, 1245, 578, 571,-32766, 422, 301, 649,-32766, + -32766,-32766, -511,-32766,-32766,-32766, 0,-32766, 914, 0, + -32766, 0, 0, 1037, 0,-32766,-32766,-32766, 1284, 307, + 1286,-32766,-32766, 0, -250, -250, -250,-32766, 422, 943, + 377, 0, 0, 28, 267, 1040,-32766, 0, -501, 0, + 614, 963, 964, 0, 8, 839, 526, 24, 914, 1277, + 374, 900, 959, -110, -110, -110, 1274, 838, 283, 40, + -584, 0, 41, 738, -249, -249, -249, 739, 28, 268, + 377, 850, 287, 858, 905, 1004, 981, 988, 978, 989, + 839, 963, 964, 926, 1277, 1238, 526, 714, -250, 903, + 976, 900, 959, -110, -110, -110, 1097, 1100, 1101, 1098, + 532, 1099, 1266, 1267, 1268, 1269, 1263, 1264, 1105, -583, + 1301, 1319, 1353, 654, 1270, 1265, -582, -556, -555, -554, + 1238, -553, 694, 926, 73, 34, -495, 714, -249, 324, + 328, 1, 29, 30, 39, 532, 43, 1266, 1267, 1268, + 1269, 1263, 1264, 47, 72, 76, 77, 78, 79, 1270, + 1265, 80, 81, 143,-32766, 153, 157, 245, 695, 73, + 1245, 330, 359, 360, 324, 328, 361,-32766,-32766,-32766, + 362,-32766, 363,-32766, 364,-32766, 365, 366,-32766, 696, + 697, 367, 368,-32766,-32766,-32766, 369, 371, 439,-32766, + -32766, 559, 322, -275, -273,-32766, 422, 1247, 1246, 1248, + -272, 13, 14, 283,-32766, 15, 16, 18, 408, 487, + 488, 495, 498, 499, 500, 501, 505, 506, 507, 514, + 576, 700, 1256, 1194, 1275, 1066, 1065, 1046, 1233, 1042, + -277, -102, 12, 17, 27, 298, 407, 607, 611, 640, + 706, 1198, 0, 1251, 1195, 1332, 0, 373, 715, 718, + 722, 723, 725, 726, 727, 728, 732, 717, 0, 735, + 901, 1357, 1359, 861, 860, 869, 953, 996, 868, 1358, + 952, 950, 951, 954, 1226, 934, 944, 932, 986, 987, + 638, 1356, 1313, 1302, 1320, 1329, 0, 1211, 0, 1278, + 0, 328 ); protected array $actionCheck = array( @@ -553,174 +555,176 @@ class Php8 extends \PhpParser\ParserAbstract 11, 9, 10, 11, 8, 159, 14, 8, 69, 163, 1, 101, 57, 9, 10, 11, 162, 8, 116, 30, 1, 32, 33, 34, 35, 36, 71, 72, 73, 74, - 75, 76, 77, 123, 30, 80, 32, 33, 70, 80, - 138, 8, 87, 88, 89, 90, 91, 92, 93, 94, + 75, 76, 77, 123, 30, 80, 32, 33, 70, 85, + 138, 1, 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, 116, 128, 129, 130, 131, 132, 133, 37, 38, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 14, 116, 134, 135, 138, 150, 151, 152, 2, 3, - 4, 5, 6, 7, 155, 156, 157, 149, 12, 13, - 101, 15, 137, 164, 1, 106, 85, 108, 30, 161, - 8, 163, 113, 49, 50, 116, 117, 118, 119, 120, - 121, 122, 123, 51, 52, 53, 54, 55, 1, 57, - 106, 107, 1, 106, 31, 108, 8, 51, 52, 8, - 116, 69, 56, 8, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 70, 70, 71, 72, 73, - 74, 116, 8, 164, 78, 79, 80, 146, 82, 106, - 8, 108, 86, 87, 88, 89, 122, 91, 122, 93, - 1, 95, 158, 138, 98, 99, 1, 84, 8, 103, + 146, 8, 134, 135, 138, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 106, 8, 108, 149, 12, 13, + 101, 15, 82, 1, 106, 106, 108, 108, 30, 161, + 14, 163, 113, 49, 50, 116, 117, 118, 119, 120, + 121, 122, 123, 51, 52, 53, 54, 55, 122, 57, + 8, 1, 1, 31, 9, 10, 11, 51, 52, 70, + 8, 69, 56, 155, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 30, 70, 71, 72, 73, + 74, 31, 8, 164, 78, 79, 80, 161, 82, 70, + 8, 70, 86, 87, 88, 89, 122, 91, 52, 93, + 1, 95, 8, 163, 98, 99, 84, 167, 8, 103, 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 106, 80, 108, 161, 8, 122, 82, - 124, 125, 126, 8, 1, 161, 138, 161, 155, 134, - 135, 14, 136, 137, 8, 139, 140, 141, 142, 143, - 144, 145, 51, 52, 149, 70, 1, 151, 152, 161, - 116, 155, 156, 157, 158, 8, 161, 161, 163, 75, - 76, 165, 166, 167, 75, 76, 77, 1, 52, 75, - 76, 137, 159, 84, 137, 30, 163, 82, 14, 90, - 80, 92, 106, 94, 108, 96, 101, 102, 14, 155, - 156, 157, 9, 10, 11, 106, 80, 31, 161, 83, - 14, 160, 14, 162, 167, 82, 117, 118, 16, 134, - 135, 122, 1, 30, 106, 107, 127, 128, 129, 130, + 122, 115, 116, 134, 135, 8, 80, 80, 122, 83, + 124, 125, 126, 82, 84, 161, 138, 8, 149, 116, + 51, 52, 136, 137, 8, 139, 140, 141, 142, 143, + 144, 145, 163, 134, 135, 134, 135, 151, 152, 161, + 137, 155, 156, 157, 158, 37, 38, 161, 149, 16, + 149, 165, 166, 167, 75, 76, 77, 106, 116, 108, + 161, 159, 163, 84, 163, 163, 75, 76, 137, 90, + 80, 92, 106, 94, 108, 96, 106, 107, 70, 71, + 138, 14, 155, 156, 157, 106, 116, 14, 1, 159, + 82, 164, 161, 163, 86, 8, 117, 118, 167, 70, + 14, 122, 14, 161, 80, 14, 127, 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 37, 38, 16, 163, 16, - 117, 118, 31, 37, 38, 122, 106, 107, 159, 116, - 84, 128, 163, 164, 111, 112, 156, 16, 163, 16, - 137, 116, 167, 163, 59, 60, 70, 16, 16, 16, - 16, 138, 74, 16, 16, 70, 70, 16, 80, 1, - 16, 158, 1, 138, 161, 87, 88, 89, 82, 91, - 167, 93, 86, 95, 161, 84, 98, 31, 31, 31, - 31, 103, 104, 105, 0, 1, 161, 109, 110, 31, - 31, 31, 31, 115, 116, 31, 31, 31, 31, 31, - 37, 30, 124, 31, 31, 159, 37, 38, 122, 163, - 134, 135, 70, 31, 31, 35, 31, 31, 31, 134, - 135, 31, 136, 137, 1, 139, 140, 141, 142, 143, - 144, 31, 154, 31, 149, 37, 37, 151, 152, 163, - 35, 35, 84, 74, 35, 84, 35, 161, 163, 80, - 159, 80, 166, 167, 163, 35, 87, 88, 89, 35, - 91, 57, 93, 37, 95, 38, 69, 98, 84, 77, - 82, 70, 103, 104, 105, 80, 134, 135, 109, 110, - 70, 85, 31, 80, 115, 116, 92, 116, 97, 82, - 106, 149, 108, 124, 113, 83, 146, 113, 90, 137, - 146, 117, 118, 89, 128, 163, 122, 84, 137, 138, - 94, 127, 128, 129, 130, 131, 31, 159, 96, 100, - 159, 163, 97, 149, 163, 74, 155, 156, 157, 97, - 100, 80, 161, 154, 150, 134, 135, 159, 87, 88, - 89, 164, 91, 159, 93, 114, 95, 163, 164, 98, - 149, 133, 159, 132, 103, 104, 105, -1, -1, 74, - 109, 110, 1, -1, 163, 80, 115, 116, 132, -1, - 153, 158, 87, 88, 89, 124, 91, 149, 93, 164, - 95, -1, 159, 98, 149, -1, 163, 149, 103, 104, - 105, 74, 149, 153, 109, 110, 155, 80, 159, 162, - 115, 116, 1, 159, 87, 88, 89, 159, 91, 124, - 93, 159, 95, 159, 159, 98, 70, 159, 159, 102, - 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, - 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, - 91, 124, 93, 159, 95, 84, 159, 98, 160, 160, - 160, 160, 103, 104, 105, 160, 160, 163, 109, 110, - 161, 100, 101, 102, 115, 116, 161, 106, 161, 161, - 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, - 134, 135, 82, 122, 161, 84, 86, 161, 127, 128, - 129, 130, 131, 161, 161, 149, 161, 161, 161, 161, - 161, 100, 101, 102, 161, 161, 161, 106, 161, 163, - 162, 161, 161, 161, 161, 161, 161, 161, 117, 118, - 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, - 129, 130, 131, 161, 161, 161, 161, 137, 70, 139, - 140, 141, 142, 143, 144, 161, 161, 161, 165, 162, - 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, - 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, - 88, 89, 162, 91, 162, 93, 162, 95, 162, 162, - 98, 162, 162, 162, 162, 103, 104, 105, 162, 162, - 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, - 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, - 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, - 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, - 163, 162, -1, 163, 166, 167, 163, 163, 163, 163, - 163, 163, 163, 163, 163, -1, 163, -1, 164, 164, + 25, 26, 27, 28, 29, 75, 76, 16, 158, 16, + 122, 16, 1, 37, 38, 1, 101, 102, 159, 16, + 116, 1, 163, 164, 136, 137, 156, 139, 140, 141, + 142, 143, 144, 163, 59, 60, 31, 0, 1, 151, + 152, 137, 31, 134, 135, 70, 16, 37, 38, 161, + 74, 31, 16, 70, 166, 167, 80, 16, 149, 155, + 156, 157, 16, 87, 88, 89, 116, 91, 16, 93, + 161, 95, 163, 16, 98, 106, 107, 1, 16, 103, + 104, 105, 16, 70, 74, 109, 110, 31, 138, 31, + 80, 115, 116, 70, 1, 84, 82, 87, 88, 89, + 124, 91, 31, 93, 84, 95, 31, 31, 98, 134, + 135, 161, 31, 103, 104, 105, 31, 134, 135, 109, + 110, 84, 106, 107, 149, 115, 116, 160, 31, 162, + 154, 117, 118, 31, 124, 31, 122, 31, 163, 111, + 112, 31, 128, 106, 31, 108, 163, 134, 135, 31, + 113, 137, 31, 31, 117, 118, 31, 134, 135, 122, + 84, 31, 149, 31, 127, 128, 129, 130, 131, 31, + 159, 31, 158, 31, 163, 161, 163, 84, 74, 159, + 31, 167, 35, 163, 80, 35, 163, 150, 1, 35, + 35, 87, 88, 89, 35, 91, 159, 93, 35, 95, + 163, 164, 98, 35, 37, 57, 37, 103, 104, 105, + 37, 37, 74, 109, 110, 1, 38, 30, 80, 115, + 116, 69, 77, 70, 80, 87, 88, 89, 124, 91, + 89, 93, 96, 95, 83, 159, 98, 80, 82, 163, + 82, 103, 104, 105, 74, 85, 100, 109, 110, 114, + 80, 90, 159, 115, 116, 1, 163, 87, 88, 89, + 94, 91, 124, 93, 92, 95, 132, 128, 98, 132, + 137, 100, 102, 103, 104, 105, 74, 97, 97, 109, + 110, 97, 80, 81, 153, 115, 116, 158, 113, 87, + 88, 89, 149, 91, 124, 93, -1, 95, 84, -1, + 98, -1, -1, 116, -1, 103, 104, 105, 146, 133, + 146, 109, 110, -1, 100, 101, 102, 115, 116, 154, + 106, -1, -1, 70, 71, 138, 124, -1, 149, -1, + 153, 117, 118, -1, 149, 82, 122, 149, 84, 86, + 149, 127, 128, 129, 130, 131, 160, 155, 161, 159, + 161, -1, 159, 159, 100, 101, 102, 159, 70, 71, + 106, 160, 30, 159, 159, 159, 159, 159, 159, 159, + 82, 117, 118, 159, 86, 122, 122, 163, 164, 159, + 159, 127, 128, 129, 130, 131, 159, 159, 159, 159, + 137, 159, 139, 140, 141, 142, 143, 144, 159, 161, + 160, 160, 160, 160, 151, 152, 161, 161, 161, 161, + 122, 161, 80, 159, 161, 163, 161, 163, 164, 166, + 167, 161, 161, 161, 161, 137, 161, 139, 140, 141, + 142, 143, 144, 161, 161, 161, 161, 161, 161, 151, + 152, 161, 161, 161, 74, 161, 161, 161, 116, 161, + 80, 161, 161, 161, 166, 167, 161, 87, 88, 89, + 161, 91, 161, 93, 161, 95, 161, 161, 98, 137, + 138, 161, 161, 103, 104, 105, 161, 161, 161, 109, + 110, 161, 163, 162, 162, 115, 116, 155, 156, 157, + 162, 162, 162, 161, 124, 162, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, + 162, 162, -1, 162, 162, 162, -1, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, -1, -1, 166, -1, 167 + 164, 164, 164, 164, 164, 164, -1, 165, -1, 166, + -1, 167 ); protected array $actionBase = array( - 0, -2, 152, 549, 764, 941, 981, 751, 555, 309, - 560, 864, 626, 738, 738, 741, 738, 473, 671, 783, - -60, 305, 305, 783, 305, 803, 803, 803, 658, 658, - 658, 658, 749, 749, 897, 897, 929, 865, 831, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, - 1062, 1062, 1062, 1062, 18, 36, 79, 648, 1036, 1044, - 1040, 1045, 1034, 1033, 1039, 1041, 1046, 1083, 1084, 782, - 1085, 1086, 1082, 1087, 1042, 876, 1035, 1043, 289, 289, + 0, -2, 152, 549, 727, 904, 944, 1022, 390, 497, + 560, 922, 500, 710, 710, 766, 710, 472, 701, 847, + -60, 305, 305, 847, 305, 783, 783, 783, 666, 666, + 666, 666, 700, 700, 860, 860, 892, 828, 794, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, + 1060, 1060, 1060, 1060, 18, 36, 79, 661, 1053, 1059, + 1055, 1061, 1051, 1050, 1054, 1056, 1062, 1097, 1098, 839, + 1099, 1100, 1096, 1101, 1057, 933, 1052, 1058, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 195, 342, 43, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 643, 643, - 643, 666, 666, 354, 173, 980, 203, 1048, 1048, 1048, - 1048, 1048, 1048, 1048, 1048, 1048, 665, 339, 164, 164, - 7, 7, 7, 7, 7, 50, 369, 583, -23, -23, - -23, -23, 448, 605, 497, 260, 397, 434, 54, 394, - 593, 593, 316, 316, 415, 415, 316, 316, 316, 442, - 442, 252, 252, 252, 252, 318, 455, 433, 391, 742, - 53, 53, 53, 53, 742, 742, 742, 742, 734, 1088, - 742, 742, 742, 722, 781, 781, 926, 551, 551, 781, - 536, -3, -3, 536, 63, -3, 67, 576, 335, 756, - 115, 9, 335, 535, 656, 501, 185, 821, 568, 821, - 1032, 424, 776, 776, 426, 753, 729, 867, 1063, 1049, - 799, 1080, 810, 1081, -66, -58, 728, 1031, 1031, 1031, - 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1089, 402, - 1032, 130, 1089, 1089, 1089, 402, 402, 402, 402, 402, - 402, 402, 402, 402, 402, 603, 130, 544, 554, 130, - 804, 402, 18, 808, 18, 18, 18, 18, 18, 18, - 18, 18, 18, 18, 762, 157, 18, 36, 124, 124, - 196, 37, 124, 124, 124, 124, 18, 18, 18, 18, - 568, 784, 797, 600, 820, 143, 784, 784, 784, 122, - 135, 204, 139, 760, 785, 467, 775, 775, 787, 895, - 895, 775, 768, 775, 787, 913, 775, 775, 895, 895, - 793, 158, 550, 472, 524, 569, 895, 346, 775, 775, - 775, 775, 816, 575, 775, 271, 171, 775, 775, 816, - 801, 766, 58, 798, 895, 895, 895, 816, 505, 798, - 798, 798, 819, 824, 761, 765, 383, 349, 607, 138, - 807, 765, 765, 775, 532, 761, 765, 761, 765, 759, - 765, 765, 765, 761, 765, 768, 498, 765, 714, 586, - 75, 765, 6, 915, 916, 726, 917, 906, 918, 965, - 919, 923, 1053, 894, 931, 912, 924, 966, 903, 896, - 780, 701, 703, 815, 754, 893, 777, 777, 777, 888, - 777, 777, 777, 777, 777, 777, 777, 777, 701, 868, - 823, 794, 934, 711, 712, 1011, 730, 795, 963, 933, - 1013, 925, 758, 713, 977, 935, 757, 1047, 936, 940, - 986, 1014, 828, 1017, 979, 790, 1064, 1065, 869, 946, - 1054, 777, 915, 923, 727, 912, 924, 903, 896, 752, - 748, 746, 747, 745, 744, 739, 740, 763, 1018, 887, - 879, 870, 945, 891, 701, 871, 971, 874, 990, 992, - 1050, 805, 792, 875, 1066, 952, 953, 954, 1055, 1019, - 1056, 773, 973, 817, 994, 812, 1067, 996, 997, 999, - 1000, 1057, 1068, 1058, 885, 1059, 832, 788, 928, 802, - 1069, 299, 791, 800, 806, 964, 436, 932, 1060, 1070, - 1071, 1001, 1002, 1006, 1072, 1073, 927, 834, 975, 796, - 976, 967, 835, 838, 577, 779, 1020, 786, 789, 778, - 624, 634, 1074, 1075, 1076, 930, 767, 772, 839, 845, - 1021, 743, 1022, 1077, 646, 846, 717, 1078, 1012, 718, - 721, 652, 683, 681, 724, 774, 1061, 818, 811, 771, - 955, 721, 770, 849, 1079, 852, 855, 856, 1007, 860, + 4, 4, 4, 4, 4, 4, 4, 4, 495, 495, + 495, 578, 578, 354, 173, 978, 943, 978, 978, 978, + 978, 978, 978, 978, 978, 203, 665, 339, 164, 164, + 7, 7, 7, 7, 7, 50, 369, 704, 704, -23, + -23, -23, -23, 448, 877, 501, 260, 368, 434, 54, + 540, 640, 640, 316, 316, 512, 512, 316, 316, 316, + 442, 442, 252, 252, 252, 252, 318, 469, 599, 358, + 304, 823, 53, 53, 53, 53, 823, 823, 823, 823, + 854, 1103, 823, 823, 823, 439, 471, 471, 703, 539, + 539, 471, 536, -3, -3, 536, 63, -3, 67, 496, + 473, 829, 115, 9, 473, 673, 713, 657, 185, 882, + 659, 882, 1049, 376, 850, 850, 424, 808, 761, 929, + 1074, 1063, 836, 1094, 861, 1095, -66, -58, 748, 1048, + 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, + 1104, 402, 1049, 130, 1104, 1104, 1104, 402, 402, 402, + 402, 402, 402, 402, 402, 402, 402, 718, 130, 561, + 620, 130, 858, 402, 18, 869, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 811, 157, 18, 36, + 124, 124, 196, 37, 124, 124, 124, 124, 18, 18, + 18, 18, 659, 838, 821, 706, 867, 143, 838, 838, + 838, 122, 135, 204, 139, 837, 840, 521, 834, 834, + 848, 950, 834, 846, 834, 848, 962, 834, 834, 950, + 950, 819, 950, 158, 544, 457, 524, 550, 950, 346, + 834, 834, 834, 834, 827, 950, 567, 834, 271, 171, + 834, 834, 827, 824, 820, 58, 866, 950, 950, 950, + 827, 502, 866, 866, 866, 884, 888, 865, 815, 443, + 349, 586, 138, 868, 815, 815, 834, 532, 865, 815, + 865, 815, 855, 815, 815, 815, 865, 815, 846, 492, + 815, 736, 579, 75, 815, 6, 963, 964, 695, 965, + 953, 966, 1007, 967, 970, 1065, 945, 976, 955, 971, + 1010, 952, 951, 832, 685, 693, 875, 833, 940, 842, + 842, 842, 936, 937, 842, 842, 842, 842, 842, 842, + 842, 842, 685, 876, 881, 831, 982, 720, 726, 1038, + 852, 1076, 1102, 981, 1040, 972, 880, 731, 1025, 985, + 1075, 1009, 989, 991, 1026, 1041, 894, 1042, 1077, 843, + 1078, 1079, 891, 995, 1066, 842, 963, 970, 746, 955, + 971, 952, 951, 803, 800, 792, 796, 787, 775, 765, + 771, 812, 1043, 935, 879, 930, 993, 938, 685, 931, + 1019, 942, 1027, 1028, 1064, 871, 841, 932, 1080, 996, + 1000, 1001, 1067, 1044, 1068, 883, 1020, 1011, 1029, 874, + 1081, 1030, 1031, 1032, 1033, 1069, 1082, 1070, 928, 1071, + 895, 851, 1012, 826, 1083, 299, 849, 853, 864, 1006, + 466, 980, 1072, 1084, 1085, 1034, 1035, 1036, 1086, 1087, + 974, 896, 1023, 856, 1024, 1018, 897, 898, 637, 863, + 1045, 844, 845, 859, 643, 656, 1088, 1089, 1090, 975, + 822, 835, 899, 900, 1046, 857, 1047, 1091, 658, 910, + 742, 1092, 1039, 747, 752, 603, 683, 681, 756, 862, + 1073, 878, 825, 870, 1005, 752, 830, 911, 1093, 917, + 918, 919, 1037, 920, 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, - 456, 456, 456, 456, 456, 456, 305, 305, 305, 305, - 305, 456, 456, 456, 456, 456, 456, 456, 305, 305, - 0, 0, 305, 0, 456, 456, 456, 456, 456, 456, + 0, 0, 0, 0, 456, 456, 456, 456, 456, 456, + 305, 305, 305, 305, 305, 456, 456, 456, 456, 456, + 456, 456, 305, 305, 0, 0, 305, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, @@ -734,42 +738,42 @@ class Php8 extends \PhpParser\ParserAbstract 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 289, 289, 289, 289, 289, 289, 289, + 456, 456, 456, 456, 456, 456, 456, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, + 0, 0, 0, 0, 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 494, 494, 289, 289, 494, 289, 494, 494, 494, 494, - 494, 494, 494, 494, 494, 0, 289, 289, 289, 289, - 289, 289, 289, 289, 494, 793, 494, 442, 442, 442, - 442, 494, 494, 494, -88, -88, 442, 494, 63, 494, - 494, 494, 494, 494, 494, 494, 494, 494, 0, 0, - 494, 494, 494, 494, 0, 0, 130, -3, 494, 768, - 768, 768, 768, 494, 494, 494, 494, -3, -3, 494, - 494, 494, 0, 0, 0, 0, 442, 442, 0, 130, - 0, 0, 130, 0, 0, 768, 768, 494, 63, 793, - 359, 494, 0, 0, 0, 0, 130, 768, 130, 402, - 775, -3, -3, 775, 402, 402, 124, 18, 359, 545, - 545, 545, 545, 0, 0, 568, 793, 793, 793, 793, - 793, 793, 793, 793, 793, 793, 793, 768, 0, 793, - 0, 768, 768, 768, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 768, - 0, 0, 895, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 913, 0, 0, 0, 0, 0, 0, - 768, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 777, 805, 0, 805, 0, 777, 777, 777, 0, 0, - 0, 0, 779, 743 + 289, 289, 289, 289, 594, 594, 289, 289, 594, 594, + 594, 594, 594, 594, 594, 594, 594, 594, 289, 0, + 289, 289, 289, 289, 289, 289, 289, 289, 594, 819, + 594, 594, 442, 442, 442, 442, 594, 594, 594, -88, + -88, 442, 594, 63, 594, 594, 594, 594, 594, 594, + 594, 594, 594, 0, 0, 594, 594, 594, 594, 0, + 0, 0, 130, -3, 594, 846, 846, 846, 846, 594, + 594, 594, 594, -3, -3, 594, 594, 594, 0, 0, + 0, 0, 442, 442, 0, 130, 0, 0, 130, 0, + 0, 846, 846, 594, 63, 819, 359, 594, 0, 0, + 0, 0, 130, 846, 130, 402, 834, -3, -3, 834, + 402, 402, 124, 18, 359, 605, 605, 605, 605, 0, + 0, 659, 819, 819, 819, 819, 819, 819, 819, 819, + 819, 819, 819, 846, 0, 819, 0, 846, 846, 846, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 846, 0, 0, 950, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 962, + 0, 0, 0, 0, 0, 0, 846, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 842, 871, 0, 871, + 0, 842, 842, 842, 0, 0, 0, 0, 863, 857 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 100,32767,32767,32767,32767, 597, 597, - 597, 597,32767,32767, 254, 102,32767,32767, 470, 387, - 387, 387,32767,32767, 541, 541, 541, 541, 541, 541, + 32767,32767,32767, 100,32767,32767,32767,32767, 602, 602, + 602, 602,32767,32767, 254, 102,32767,32767, 470, 387, + 387, 387,32767,32767, 544, 544, 544, 544, 544, 544, 32767,32767,32767,32767,32767,32767, 470,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, @@ -781,139 +785,143 @@ class Php8 extends \PhpParser\ParserAbstract 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, 324,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 590,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 595,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767, 474, 453, - 454, 456, 457, 386, 542, 596, 327, 593, 385, 145, + 454, 456, 457, 386, 545, 601, 327, 598, 385, 145, 339, 329, 242, 330, 258, 475, 259, 476, 479, 480, 215, 287, 382, 149, 150, 417, 471, 419, 469, 473, 418, 392, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 390, 391, 472, 450, 449, - 448,32767,32767, 415, 416,32767, 420,32767,32767,32767, - 32767,32767,32767,32767, 102,32767, 389, 423, 421, 422, - 439, 440, 437, 438, 441,32767,32767,32767, 442, 443, - 444, 445, 316,32767,32767, 366, 364, 424, 316, 111, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 430, - 431,32767,32767,32767,32767, 535, 447,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 102,32767, 100, 537, 412, 414, 504, 425, 426, 393, - 32767, 511,32767, 102,32767, 513,32767,32767,32767,32767, - 32767,32767,32767, 536,32767, 543, 543,32767, 497, 100, - 195,32767,32767, 512,32767, 195, 195,32767,32767,32767, - 32767,32767,32767,32767,32767, 604, 497, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, - 110,32767,32767,32767, 100, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 190,32767, 268, 270, 102, - 558, 195,32767, 516,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 509,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 497, 435, 138,32767, 138, 543, 427, 428, 429, 499, - 543, 543, 543, 312, 289,32767,32767,32767,32767, 514, - 514, 100, 100, 100, 100, 509,32767,32767,32767,32767, - 111, 99, 99, 99, 99, 99, 103, 101,32767,32767, - 32767,32767, 223, 99,32767, 101, 101,32767,32767, 223, - 225, 212, 101, 227,32767, 562, 563, 223, 101, 227, - 227, 227, 247, 247, 486, 318, 101, 99, 101, 101, - 197, 318, 318,32767, 101, 486, 318, 486, 318, 199, - 318, 318, 318, 486, 318,32767, 101, 318, 214, 99, - 99, 318,32767,32767,32767, 499,32767,32767,32767,32767, - 32767,32767,32767, 222,32767,32767,32767,32767,32767,32767, - 32767,32767, 530,32767, 547, 560, 433, 434, 436, 545, - 458, 459, 460, 461, 462, 463, 464, 466, 592,32767, - 503,32767,32767,32767, 338,32767, 602,32767,32767,32767, + 448,32767,32767, 415, 416,32767,32767,32767,32767,32767, + 32767,32767,32767, 102,32767, 420, 389, 423, 421, 422, + 439, 440, 437, 438, 441,32767,32767,32767,32767, 442, + 443, 444, 445, 316,32767,32767, 366, 364, 424, 316, + 111,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 430, 431,32767,32767,32767,32767, 487, 538, 447,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 603,32767, 543,32767,32767,32767, - 32767, 432, 9, 74, 492, 42, 43, 51, 57, 520, - 521, 522, 523, 517, 518, 524, 519,32767,32767, 525, - 568,32767,32767, 544, 595,32767,32767,32767,32767,32767, - 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 530,32767, 136,32767,32767,32767,32767, - 32767,32767,32767,32767, 526,32767,32767,32767, 543,32767, - 32767,32767,32767, 314, 311,32767,32767,32767,32767,32767, + 32767,32767, 102,32767, 100, 540, 412, 414, 507, 425, + 426, 393,32767, 514,32767, 102,32767, 516,32767,32767, + 32767,32767,32767,32767,32767, 539,32767, 546, 546,32767, + 500, 100, 195,32767,32767, 515,32767, 195, 195,32767, + 32767,32767,32767,32767,32767,32767,32767, 609, 500, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 32767, 195, 110,32767,32767,32767, 100, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 195, 190,32767, 268, + 270, 102, 563, 195,32767, 519,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 512,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 543,32767,32767,32767,32767,32767, 291,32767, 308, + 32767,32767, 500, 435, 138,32767, 138, 546, 427, 428, + 429, 502, 546, 546, 546, 312, 289,32767,32767,32767, + 32767, 517, 100, 100, 100, 100, 512,32767,32767,32767, + 32767, 111, 486, 99, 99, 99, 99, 99, 103, 101, + 32767,32767,32767,32767, 223,32767, 99,32767, 101, 101, + 32767,32767, 223, 225, 212, 101, 227,32767, 567, 568, + 223, 101, 227, 227, 227, 247, 247, 489, 318, 101, + 99, 101, 101, 197, 318, 318,32767, 101, 489, 318, + 489, 318, 199, 318, 318, 318, 489, 318,32767, 101, + 318, 214, 99, 99, 318,32767,32767,32767, 502,32767, + 32767,32767,32767,32767,32767,32767, 222,32767,32767,32767, + 32767,32767,32767,32767,32767, 533,32767, 551, 565, 433, + 434, 436, 550, 548, 458, 459, 460, 461, 462, 463, + 464, 466, 597,32767, 506,32767,32767,32767, 338,32767, + 607,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 608,32767, + 546,32767,32767,32767,32767, 432, 9, 74, 495, 42, + 43, 51, 57, 523, 524, 525, 526, 520, 521, 527, + 522,32767,32767, 528, 573,32767,32767, 547, 600,32767, + 32767,32767,32767,32767,32767, 138,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 533,32767, 136, + 32767,32767,32767,32767,32767,32767,32767,32767, 529,32767, + 32767,32767, 546,32767,32767,32767,32767, 314, 311,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 286,32767,32767, 381, - 499, 294, 296, 297,32767,32767,32767,32767, 360,32767, + 32767,32767,32767,32767,32767, 546,32767,32767,32767,32767, + 32767, 291,32767, 308,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 152, 152, 3, 3, 341, 152, 152, 152, 341, 341, - 152, 341, 341, 341, 152, 152, 152, 152, 152, 152, - 280, 185, 262, 265, 247, 247, 152, 352, 152 + 286,32767,32767, 381, 502, 294, 296, 297,32767,32767, + 32767,32767, 360,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 152, 152, 3, 3, 341, 152, + 152, 152, 341, 341, 152, 341, 341, 341, 152, 152, + 152, 152, 152, 152, 280, 185, 262, 265, 247, 247, + 152, 352, 152 ); protected array $goto = array( - 196, 196, 1034, 1065, 697, 431, 661, 621, 658, 319, - 706, 425, 314, 315, 335, 576, 430, 336, 432, 638, - 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, + 196, 196, 1038, 1069, 701, 353, 433, 665, 856, 710, + 427, 321, 316, 317, 337, 580, 432, 338, 434, 642, + 658, 659, 421, 676, 677, 678, 857, 167, 167, 167, 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, - 189, 190, 191, 192, 218, 216, 219, 536, 537, 421, - 538, 540, 541, 542, 543, 544, 545, 546, 547, 1136, + 189, 190, 191, 192, 218, 216, 219, 539, 540, 423, + 541, 544, 545, 546, 547, 548, 549, 550, 551, 1140, 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, - 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, - 258, 259, 260, 261, 262, 263, 264, 268, 269, 270, - 271, 277, 289, 290, 317, 318, 426, 427, 428, 581, + 176, 178, 215, 217, 220, 238, 243, 244, 255, 257, + 258, 259, 260, 261, 262, 263, 264, 269, 270, 271, + 272, 278, 290, 291, 319, 320, 428, 429, 430, 585, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, - 200, 239, 188, 189, 190, 191, 192, 218, 1136, 201, + 200, 239, 188, 189, 190, 191, 192, 218, 1140, 201, 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, - 212, 213, 214, 855, 1232, 975, 279, 279, 279, 279, - 623, 623, 419, 351, 1269, 600, 1269, 1269, 1269, 1269, - 1269, 1269, 1269, 1269, 1269, 1287, 1287, 599, 1100, 1287, - 709, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, - 508, 700, 827, 1098, 458, 559, 552, 860, 833, 909, - 904, 905, 918, 861, 906, 858, 907, 908, 859, 1233, - 1234, 912, 500, 886, 501, 252, 252, 843, 1107, 1108, - 507, 1087, 1082, 1083, 1084, 341, 552, 559, 568, 569, - 344, 579, 602, 616, 617, 1235, 1295, 1296, 833, 440, - 833, 22, 250, 250, 250, 250, 245, 253, 694, 573, - 1237, 829, 1237, 893, 851, 893, 893, 1034, 1034, 1237, - 694, 349, 342, 1034, 694, 1034, 1034, 1034, 1034, 1034, - 1034, 1034, 1034, 1034, 848, 1327, 1034, 1034, 1034, 1034, - 1319, 1319, 1319, 1319, 1237, 343, 342, 1040, 1039, 1237, - 1237, 1237, 1237, 868, 996, 1237, 1237, 1237, 913, 355, - 914, 354, 354, 354, 354, 466, 466, 479, 880, 355, - 355, 867, 394, 926, 466, 481, 571, 927, 967, 410, - 705, 942, 355, 355, 942, 848, 355, 660, 1354, 609, - 624, 627, 628, 629, 630, 651, 652, 653, 708, 554, - 1133, 1285, 1285, 355, 355, 1285, 1058, 1285, 1285, 1285, - 1285, 1285, 1285, 1285, 1285, 1285, 539, 539, 1185, 424, - 539, 611, 539, 539, 539, 539, 539, 539, 539, 539, - 539, 566, 682, 1337, 1337, 733, 637, 639, 1043, 1044, - 659, 476, 1312, 1313, 683, 687, 1010, 695, 704, 1006, - 1337, 1298, 438, 408, 409, 631, 633, 635, 670, 5, - 671, 6, 412, 413, 414, 337, 684, 1340, 1340, 415, - 325, 309, 686, 347, 352, 353, 553, 563, 450, 450, - 450, 553, 1309, 563, 1309, 666, 397, 462, 845, 1314, - 1315, 1309, 548, 548, 548, 548, 873, 604, 469, 580, - 470, 471, 403, 554, 878, 848, 958, 1345, 1346, 577, - 614, 870, 550, 615, 550, 255, 255, 1321, 1321, 1321, - 1321, 550, 999, 1018, 477, 971, 1228, 732, 736, 881, - 869, 1070, 1074, 876, 882, 551, 1008, 1003, 1071, 1075, - 978, 980, 0, 1305, 1118, 0, 456, 0, 0, 0, - 0, 969, 969, 969, 969, 0, 0, 456, 963, 970, - 0, 0, 0, 0, 968, 0, 1230, 0, 0, 0, - 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, - 450, 931, 1123, 450, 0, 1073, 1116, 885, 619, 1307, - 1307, 1073, 1216, 944, 1015, 433, 1217, 1220, 945, 1221, - 0, 433, 872, 0, 664, 994, 0, 1041, 1041, 0, - 866, 0, 0, 0, 665, 1052, 1048, 1049, 0, 0, - 0, 0, 1227, 324, 275, 324, 1037, 1037, 681, 952, - 0, 0, 1029, 1045, 1046, 396, 399, 560, 601, 605, + 212, 213, 214, 859, 613, 628, 631, 632, 633, 634, + 655, 656, 657, 712, 460, 979, 280, 280, 280, 280, + 479, 1321, 1322, 627, 627, 831, 604, 1276, 1276, 1276, + 1276, 1276, 1276, 1276, 1276, 1276, 1276, 398, 401, 564, + 605, 609, 890, 552, 552, 552, 552, 864, 608, 913, + 908, 909, 922, 865, 910, 862, 911, 912, 863, 465, + 441, 916, 1041, 1041, 685, 956, 1189, 357, 1033, 1049, + 1050, 1091, 1086, 1087, 1088, 1295, 1295, 357, 357, 1295, + 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, 698, + 357, 357, 833, 917, 357, 918, 1363, 354, 355, 577, + 1244, 698, 1244, 1244, 426, 698, 615, 558, 1038, 1038, + 1244, 357, 357, 5, 1038, 6, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 625, 662, 1038, 1038, 1038, + 1038, 1328, 1328, 1328, 1328, 351, 1244, 356, 356, 356, + 356, 1244, 1244, 1244, 1244, 1111, 1112, 1244, 1244, 1244, + 344, 563, 556, 897, 855, 897, 897, 1336, 554, 1307, + 554, 554, 482, 603, 1104, 930, 713, 1000, 554, 931, + 484, 396, 946, 345, 344, 946, 511, 704, 872, 1102, + 690, 343, 556, 563, 572, 573, 346, 583, 606, 620, + 621, 575, 852, 884, 458, 664, 871, 22, 1137, 973, + 973, 973, 973, 1044, 1043, 458, 967, 974, 1292, 1292, + 558, 1062, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, + 1292, 1292, 543, 543, 1047, 1048, 543, 543, 543, 543, + 543, 543, 543, 543, 543, 543, 570, 469, 469, 440, + 737, 641, 643, 670, 852, 663, 469, 327, 311, 687, + 691, 1014, 699, 708, 1010, 686, 1017, 1017, 1220, 948, + 1323, 1324, 1221, 1224, 949, 1225, 849, 557, 567, 581, + 618, 557, 339, 567, 877, 1237, 399, 464, 451, 451, + 451, 451, 405, 1318, 837, 1318, 1318, 251, 251, 472, + 584, 473, 474, 1318, 962, 1022, 882, 542, 542, 1354, + 1355, 542, 874, 542, 542, 542, 542, 542, 542, 542, + 542, 971, 412, 709, 249, 249, 249, 249, 246, 252, + 1330, 1330, 1330, 1330, 837, 880, 837, 410, 411, 635, + 637, 639, 674, 619, 675, 1075, 414, 415, 416, 1235, + 688, 740, 886, 417, 1079, 0, 1314, 349, 435, 984, + 885, 873, 1074, 1078, 435, 1122, 503, 0, 504, 1239, + 1045, 1045, 982, 852, 510, 0, 0, 669, 1056, 1052, + 1053, 0, 451, 451, 451, 451, 451, 451, 451, 451, + 451, 451, 451, 935, 1127, 451, 972, 0, 1077, 0, + 623, 0, 1316, 1316, 1077, 0, 1019, 0, 0, 326, + 276, 326, 326, 0, 876, 1261, 668, 998, 1120, 889, + 1346, 1346, 870, 1240, 1241, 1003, 0, 0, 975, 0, + 736, 0, 847, 0, 1234, 0, 0, 1346, 555, 1012, + 1007, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1242, 1304, 1305, 1349, 1349, 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, 1013, 1013 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 254, 254 ); protected array $gotoCheck = array( - 42, 42, 73, 127, 73, 66, 66, 56, 56, 66, - 9, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 86, 86, 26, 86, 86, 86, 27, 42, 42, 42, + 42, 42, 73, 127, 73, 97, 66, 66, 26, 9, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 86, 86, 43, 86, 86, 86, 27, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -927,100 +935,103 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 15, 20, 49, 23, 23, 23, 23, - 108, 108, 43, 97, 108, 130, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 170, 170, 8, 8, 170, - 8, 170, 170, 170, 170, 170, 170, 170, 170, 170, - 8, 8, 6, 8, 83, 76, 76, 15, 12, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 20, - 20, 15, 155, 45, 155, 5, 5, 20, 144, 144, - 155, 15, 15, 15, 15, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 76, 20, 20, 20, 12, 83, - 12, 76, 5, 5, 5, 5, 5, 5, 7, 172, - 73, 7, 73, 25, 25, 25, 25, 73, 73, 73, - 7, 179, 168, 73, 7, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 22, 181, 73, 73, 73, 73, - 9, 9, 9, 9, 73, 168, 168, 118, 118, 73, - 73, 73, 73, 35, 103, 73, 73, 73, 65, 14, - 65, 24, 24, 24, 24, 149, 149, 84, 35, 14, - 14, 35, 62, 73, 149, 84, 104, 73, 93, 93, - 93, 9, 14, 14, 9, 22, 14, 64, 14, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 14, - 150, 171, 171, 14, 14, 171, 114, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 173, 173, 151, 13, - 173, 13, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 48, 116, 182, 182, 48, 48, 48, 119, 119, - 48, 176, 176, 176, 48, 48, 48, 48, 48, 48, - 182, 14, 113, 82, 82, 85, 85, 85, 82, 46, - 82, 46, 82, 82, 82, 29, 82, 182, 182, 82, - 169, 169, 14, 82, 97, 97, 9, 9, 23, 23, - 23, 9, 130, 9, 130, 120, 9, 9, 18, 178, - 178, 130, 107, 107, 107, 107, 39, 107, 9, 9, - 9, 9, 28, 14, 9, 22, 92, 9, 9, 2, - 2, 37, 19, 80, 19, 5, 5, 130, 130, 130, - 130, 19, 50, 110, 157, 50, 160, 50, 99, 16, - 16, 16, 16, 9, 41, 50, 50, 50, 129, 132, - 16, 96, -1, 130, 147, -1, 19, -1, -1, -1, - -1, 19, 19, 19, 19, -1, -1, 19, 19, 19, - -1, -1, -1, -1, 16, -1, 14, -1, -1, -1, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 17, 17, 23, -1, 130, 16, 16, 17, 130, - 130, 130, 79, 79, 17, 117, 79, 79, 79, 79, - -1, 117, 17, -1, 17, 17, -1, 117, 117, -1, - 17, -1, -1, -1, 117, 117, 117, 117, -1, -1, - -1, -1, 17, 24, 24, 24, 89, 89, 89, 89, - -1, -1, 89, 89, 89, 59, 59, 59, 59, 59, + 42, 42, 42, 15, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 83, 49, 23, 23, 23, 23, + 178, 178, 178, 108, 108, 6, 130, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 59, 59, 59, + 59, 59, 45, 107, 107, 107, 107, 15, 107, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 151, + 83, 15, 89, 89, 89, 89, 151, 14, 89, 89, + 89, 15, 15, 15, 15, 172, 172, 14, 14, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 7, + 14, 14, 7, 65, 14, 65, 14, 97, 97, 174, + 73, 7, 73, 73, 13, 7, 13, 14, 73, 73, + 73, 14, 14, 46, 73, 46, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 56, 56, 73, 73, 73, + 73, 9, 9, 9, 9, 181, 73, 24, 24, 24, + 24, 73, 73, 73, 73, 144, 144, 73, 73, 73, + 170, 76, 76, 25, 25, 25, 25, 183, 19, 14, + 19, 19, 84, 8, 8, 73, 8, 103, 19, 73, + 84, 62, 9, 170, 170, 9, 8, 8, 35, 8, + 14, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 104, 22, 35, 19, 64, 35, 76, 150, 19, + 19, 19, 19, 118, 118, 19, 19, 19, 173, 173, + 14, 114, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 175, 175, 119, 119, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 48, 149, 149, 113, + 48, 48, 48, 120, 22, 48, 149, 171, 171, 48, + 48, 48, 48, 48, 48, 116, 107, 107, 79, 79, + 180, 180, 79, 79, 79, 79, 18, 9, 9, 2, + 2, 9, 29, 9, 39, 14, 9, 9, 23, 23, + 23, 23, 28, 130, 12, 130, 130, 5, 5, 9, + 9, 9, 9, 130, 92, 110, 9, 158, 158, 9, + 9, 158, 37, 158, 158, 158, 158, 158, 158, 158, + 158, 93, 93, 93, 5, 5, 5, 5, 5, 5, + 130, 130, 130, 130, 12, 9, 12, 82, 82, 85, + 85, 85, 82, 80, 82, 129, 82, 82, 82, 162, + 82, 99, 41, 82, 132, -1, 130, 82, 117, 96, + 16, 16, 16, 16, 117, 147, 155, -1, 155, 20, + 117, 117, 16, 22, 155, -1, -1, 117, 117, 117, + 117, -1, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 17, 17, 23, 16, -1, 130, -1, + 17, -1, 130, 130, 130, -1, 17, -1, -1, 24, + 24, 24, 24, -1, 17, 20, 17, 17, 16, 16, + 184, 184, 17, 20, 20, 50, -1, -1, 50, -1, + 50, -1, 20, -1, 17, -1, -1, 184, 50, 50, + 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 20, 20, 20, 184, 184, -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, 107, 107 + -1, -1, -1, -1, -1, -1, -1, 5, 5 ); protected array $gotoBase = array( - 0, 0, -253, 0, 0, 224, 182, 251, 179, -10, - 0, 0, -89, 32, 11, -185, 27, 66, 128, 197, - -229, 0, 5, 163, 308, 260, 18, 22, 115, 118, - 0, 0, 0, 0, 0, -68, 0, 122, 0, 123, - 0, 43, -1, 153, 0, 200, -327, 0, -330, 147, - 460, 0, 0, 0, 0, 0, -33, 0, 0, 540, - 0, 0, 280, 0, 95, 294, -236, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -140, 0, 0, 134, - 119, -19, -88, -75, -152, -74, -698, 0, 0, 296, - 0, 0, 127, 23, 0, 0, 48, -310, 0, 71, - 0, 0, 0, 269, 283, 0, 0, 414, -71, 0, - 103, 0, 0, 124, 83, 0, 100, 273, 17, 104, - 144, 0, 0, 0, 0, 0, 0, 1, 0, 114, - 167, 0, 47, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -47, 0, 0, 50, 0, 281, - 105, 94, 0, 0, 0, -273, 0, 34, 0, 0, - 107, 0, 0, 0, 0, 0, 0, 0, -26, 99, - -56, 110, 230, 125, 0, 0, 90, 0, 67, 241, - 0, 254, 75, 0, 0 + 0, 0, -287, 0, 0, 446, 165, 242, 315, -11, + 0, 0, 145, -75, -73, -187, 56, 75, 114, 53, + 124, 0, 72, 173, 294, 310, 4, 22, 103, 133, + 0, 0, 0, 0, 0, -35, 0, 121, 0, 109, + 0, 60, -1, 3, 0, 179, -467, 0, -319, 157, + 563, 0, 0, 0, 0, 0, 245, 0, 0, 152, + 0, 0, 289, 0, 113, 239, -235, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -36, 0, 0, 8, + 147, -196, -7, -106, -150, 7, -702, 0, 0, -59, + 0, 0, 123, 164, 0, 0, 65, -481, 0, 92, + 0, 0, 0, 292, 308, 0, 0, 175, -58, 0, + 83, 0, 0, 120, 97, 0, 132, 235, 82, 99, + 111, 0, 0, 0, 0, 0, 0, 1, 0, 119, + 178, 0, 61, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 29, 0, 0, 70, 0, 363, + 112, -49, 0, 0, 0, 18, 0, 0, 216, 0, + 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, + 10, 84, -6, 127, 230, 141, 0, 0, -123, 0, + 46, 265, 0, 286, 260, 0, 0 ); protected array $gotoDefault = array( - -32768, 512, 740, 4, 741, 935, 816, 825, 597, 530, - 707, 348, 625, 422, 1303, 911, 1122, 578, 844, 1246, - 1254, 457, 847, 330, 730, 923, 894, 895, 400, 386, - 392, 398, 649, 626, 494, 879, 453, 871, 486, 874, - 452, 883, 164, 418, 510, 887, 3, 890, 557, 921, - 973, 387, 898, 388, 677, 900, 562, 902, 903, 395, - 401, 402, 1127, 570, 622, 915, 256, 564, 916, 385, - 917, 925, 390, 393, 688, 465, 505, 499, 411, 1102, - 565, 608, 646, 447, 473, 620, 632, 618, 480, 434, - 416, 329, 957, 965, 487, 463, 979, 350, 987, 738, - 1135, 640, 489, 995, 641, 1002, 1005, 531, 532, 478, - 1017, 272, 1020, 490, 19, 667, 1031, 1032, 668, 642, - 1054, 643, 669, 644, 1056, 472, 598, 1064, 454, 1072, - 1291, 455, 1076, 266, 1079, 278, 417, 435, 1085, 1086, - 9, 1092, 698, 699, 11, 276, 509, 1117, 689, 451, - 1134, 439, 1204, 1206, 558, 491, 1224, 1223, 680, 506, - 1229, 448, 1294, 449, 533, 474, 316, 534, 1338, 308, - 333, 313, 549, 295, 334, 535, 475, 1300, 1308, 331, - 31, 1328, 1339, 575, 613 + -32768, 515, 744, 4, 745, 939, 820, 829, 601, 533, + 711, 350, 629, 424, 1312, 915, 1126, 582, 848, 1253, + 1227, 459, 851, 332, 734, 927, 898, 899, 402, 388, + 394, 400, 653, 630, 497, 883, 455, 875, 489, 878, + 454, 887, 164, 420, 513, 891, 3, 894, 561, 925, + 977, 389, 902, 390, 681, 904, 566, 906, 907, 397, + 403, 404, 1131, 574, 626, 919, 256, 568, 920, 387, + 921, 929, 392, 395, 692, 468, 508, 502, 413, 1106, + 569, 612, 650, 448, 476, 624, 636, 622, 483, 436, + 418, 331, 961, 969, 490, 466, 983, 352, 991, 742, + 1139, 644, 492, 999, 645, 1006, 1009, 534, 535, 481, + 1021, 273, 1024, 493, 19, 671, 1035, 1036, 672, 646, + 1058, 647, 673, 648, 1060, 475, 602, 1068, 456, 1076, + 1300, 457, 1080, 266, 1083, 279, 419, 437, 1089, 1090, + 9, 1096, 702, 703, 11, 277, 512, 1121, 693, 453, + 1138, 452, 1208, 1210, 562, 494, 1228, 480, 296, 1231, + 684, 509, 1236, 449, 1303, 450, 536, 477, 318, 537, + 1347, 310, 335, 315, 553, 297, 336, 538, 478, 1309, + 1317, 333, 31, 1337, 1348, 579, 617 ); protected array $ruleToNonTerminal = array( @@ -1072,20 +1083,21 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 156, 150, 150, 155, 155, 158, 159, - 159, 160, 161, 162, 162, 162, 162, 19, 19, 73, - 73, 73, 73, 151, 151, 151, 151, 164, 164, 152, - 152, 154, 154, 154, 157, 157, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 171, 171, 171, 108, 173, - 173, 173, 173, 153, 153, 153, 153, 153, 153, 153, - 153, 59, 59, 167, 167, 167, 167, 174, 174, 163, - 163, 163, 175, 175, 175, 175, 175, 175, 74, 74, - 66, 66, 66, 66, 130, 130, 130, 130, 178, 177, - 166, 166, 166, 166, 166, 166, 166, 165, 165, 165, - 176, 176, 176, 176, 107, 172, 180, 180, 179, 179, - 181, 181, 181, 181, 181, 181, 181, 181, 169, 169, - 169, 169, 168, 183, 182, 182, 182, 182, 182, 182, - 182, 182, 184, 184, 184, 184 + 42, 42, 42, 156, 158, 158, 159, 150, 150, 155, + 155, 160, 161, 161, 162, 163, 164, 164, 164, 164, + 19, 19, 73, 73, 73, 73, 151, 151, 151, 151, + 166, 166, 152, 152, 154, 154, 154, 157, 157, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 173, 173, + 173, 108, 175, 175, 175, 175, 153, 153, 153, 153, + 153, 153, 153, 153, 59, 59, 169, 169, 169, 169, + 169, 176, 176, 165, 165, 165, 165, 177, 177, 177, + 177, 177, 177, 74, 74, 66, 66, 66, 66, 130, + 130, 130, 130, 180, 179, 168, 168, 168, 168, 168, + 168, 168, 167, 167, 167, 178, 178, 178, 178, 107, + 174, 182, 182, 181, 181, 183, 183, 183, 183, 183, + 183, 183, 183, 171, 171, 171, 171, 170, 185, 184, + 184, 184, 184, 184, 184, 184, 184, 186, 186, 186, + 186 ); protected array $ruleToLength = array( @@ -1137,20 +1149,21 @@ class Php8 extends \PhpParser\ParserAbstract 3, 4, 4, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, - 10, 9, 10, 8, 3, 2, 0, 4, 2, 1, - 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, - 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, - 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, - 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, - 3, 1, 1, 4, 4, 1, 4, 4, 0, 1, - 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, - 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, - 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, - 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, - 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, - 6, 3, 1, 1, 2, 1 + 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, + 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, + 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, + 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 1, 4, 4, + 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, + 4, 2, 2, 1, 3, 1, 4, 4, 3, 3, + 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, + 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, + 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, + 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, + 1 ); protected function initReduceCallbacks(): void { @@ -2379,339 +2392,346 @@ protected function initReduceCallbacks(): void { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 486 => static function ($self, $stackPos) { + $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 487 => null, + 488 => null, + 489 => static function ($self, $stackPos) { $self->semValue = array(); }, - 487 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 488 => null, - 489 => static function ($self, $stackPos) { + 491 => null, + 492 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 490 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 491 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 498 => null, - 499 => static function ($self, $stackPos) { + 501 => null, + 502 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 503 => null, - 504 => null, - 505 => static function ($self, $stackPos) { + 506 => null, + 507 => null, + 508 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 506 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 507 => null, - 508 => null, - 509 => static function ($self, $stackPos) { + 510 => null, + 511 => null, + 512 => static function ($self, $stackPos) { $self->semValue = null; }, - 510 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 511 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { $self->semValue = array(); }, - 512 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 513 => static function ($self, $stackPos) { + 516 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 514 => static function ($self, $stackPos) { + 517 => static function ($self, $stackPos) { $self->semValue = array(); }, - 515 => null, - 516 => static function ($self, $stackPos) { + 518 => null, + 519 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 517 => static function ($self, $stackPos) { + 520 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 518 => static function ($self, $stackPos) { + 521 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 519 => static function ($self, $stackPos) { + 522 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 520 => static function ($self, $stackPos) { + 523 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 521 => static function ($self, $stackPos) { + 524 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 522 => static function ($self, $stackPos) { + 525 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 523 => static function ($self, $stackPos) { + 526 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 524 => static function ($self, $stackPos) { + 527 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 525 => static function ($self, $stackPos) { + 528 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 526 => static function ($self, $stackPos) { + 529 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 527 => static function ($self, $stackPos) { + 530 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 528 => static function ($self, $stackPos) { + 531 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 529 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 530 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 531 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 532 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 533 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 534 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 535 => null, - 536 => null, - 537 => null, - 538 => static function ($self, $stackPos) { + 538 => null, + 539 => null, + 540 => null, + 541 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 539 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 540 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 541 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 542 => null, - 543 => null, 544 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = null; }, 545 => null, 546 => null, - 547 => null, - 548 => null, - 549 => null, - 550 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, + 548 => null, + 549 => null, + 550 => null, 551 => null, 552 => null, - 553 => static function ($self, $stackPos) { + 553 => null, + 554 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 555 => null, + 556 => null, + 557 => null, + 558 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 554 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 555 => null, - 556 => static function ($self, $stackPos) { + 560 => null, + 561 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 557 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 558 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = null; }, - 559 => null, - 560 => null, - 561 => null, - 562 => static function ($self, $stackPos) { + 564 => null, + 565 => null, + 566 => null, + 567 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 563 => static function ($self, $stackPos) { + 568 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 564 => null, - 565 => static function ($self, $stackPos) { + 569 => null, + 570 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 566 => static function ($self, $stackPos) { + 571 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 567 => static function ($self, $stackPos) { + 572 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 568 => static function ($self, $stackPos) { + 573 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 569 => static function ($self, $stackPos) { + 574 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 570 => null, - 571 => static function ($self, $stackPos) { + 575 => null, + 576 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 572 => static function ($self, $stackPos) { + 577 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 573 => static function ($self, $stackPos) { + 578 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 574 => static function ($self, $stackPos) { + 579 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 575 => static function ($self, $stackPos) { + 580 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 576 => static function ($self, $stackPos) { + 581 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 577 => null, - 578 => static function ($self, $stackPos) { + 582 => null, + 583 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 579 => null, - 580 => null, - 581 => static function ($self, $stackPos) { + 584 => null, + 585 => null, + 586 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 582 => null, - 583 => static function ($self, $stackPos) { + 587 => null, + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 584 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 585 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 586 => null, - 587 => static function ($self, $stackPos) { + 591 => null, + 592 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 588 => static function ($self, $stackPos) { + 593 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 589 => static function ($self, $stackPos) { + 594 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 590 => static function ($self, $stackPos) { + 595 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 591 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 592 => static function ($self, $stackPos) { + 597 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 593 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 594 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 595 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 597 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 598 => static function ($self, $stackPos) { + 603 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 599 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 600 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 601 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 602 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 603 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 604 => null, - 605 => static function ($self, $stackPos) { + 609 => null, + 610 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 606 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 607 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 608 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 609 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 610 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 611 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 612 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 613 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 615 => null, + 620 => null, ]; } } diff --git a/test/code/parser/expr/newDeref.test b/test/code/parser/expr/newDeref.test new file mode 100644 index 0000000000..da24a245db --- /dev/null +++ b/test/code/parser/expr/newDeref.test @@ -0,0 +1,318 @@ +New dereference without parentheses +----- +foo; +new A()->foo(); +new A()::FOO; +new A()::foo(); +new A()::$foo; +new A()[0]; +new A(){0}; +new A()(); + +new class {}->foo; +new class {}->foo(); +new class {}::FOO; +new class {}::foo(); +new class {}::$foo; +new class {}[0]; +new class {}{0}; +new class {}(); +----- +array( + 0: Stmt_Expression( + expr: Expr_PropertyFetch( + var: Expr_New( + class: Name( + name: A + ) + args: array( + ) + ) + name: Identifier( + name: foo + ) + ) + ) + 1: Stmt_Expression( + expr: Expr_MethodCall( + var: Expr_New( + class: Name( + name: A + ) + args: array( + ) + ) + name: Identifier( + name: foo + ) + args: array( + ) + ) + ) + 2: Stmt_Expression( + expr: Expr_ClassConstFetch( + class: Expr_New( + class: Name( + name: A + ) + args: array( + ) + ) + name: Identifier( + name: FOO + ) + ) + ) + 3: Stmt_Expression( + expr: Expr_StaticCall( + class: Expr_New( + class: Name( + name: A + ) + args: array( + ) + ) + name: Identifier( + name: foo + ) + args: array( + ) + ) + ) + 4: Stmt_Expression( + expr: Expr_StaticPropertyFetch( + class: Expr_New( + class: Name( + name: A + ) + args: array( + ) + ) + name: VarLikeIdentifier( + name: foo + ) + ) + ) + 5: Stmt_Expression( + expr: Expr_ArrayDimFetch( + var: Expr_New( + class: Name( + name: A + ) + args: array( + ) + ) + dim: Scalar_Int( + value: 0 + ) + ) + ) + 6: Stmt_Expression( + expr: Expr_ArrayDimFetch( + var: Expr_New( + class: Name( + name: A + ) + args: array( + ) + ) + dim: Scalar_Int( + value: 0 + ) + ) + ) + 7: Stmt_Expression( + expr: Expr_FuncCall( + name: Expr_New( + class: Name( + name: A + ) + args: array( + ) + ) + args: array( + ) + ) + ) + 8: Stmt_Expression( + expr: Expr_PropertyFetch( + var: Expr_New( + class: Stmt_Class( + attrGroups: array( + ) + flags: 0 + name: null + extends: null + implements: array( + ) + stmts: array( + ) + ) + args: array( + ) + ) + name: Identifier( + name: foo + ) + ) + ) + 9: Stmt_Expression( + expr: Expr_MethodCall( + var: Expr_New( + class: Stmt_Class( + attrGroups: array( + ) + flags: 0 + name: null + extends: null + implements: array( + ) + stmts: array( + ) + ) + args: array( + ) + ) + name: Identifier( + name: foo + ) + args: array( + ) + ) + ) + 10: Stmt_Expression( + expr: Expr_ClassConstFetch( + class: Expr_New( + class: Stmt_Class( + attrGroups: array( + ) + flags: 0 + name: null + extends: null + implements: array( + ) + stmts: array( + ) + ) + args: array( + ) + ) + name: Identifier( + name: FOO + ) + ) + ) + 11: Stmt_Expression( + expr: Expr_StaticCall( + class: Expr_New( + class: Stmt_Class( + attrGroups: array( + ) + flags: 0 + name: null + extends: null + implements: array( + ) + stmts: array( + ) + ) + args: array( + ) + ) + name: Identifier( + name: foo + ) + args: array( + ) + ) + ) + 12: Stmt_Expression( + expr: Expr_StaticPropertyFetch( + class: Expr_New( + class: Stmt_Class( + attrGroups: array( + ) + flags: 0 + name: null + extends: null + implements: array( + ) + stmts: array( + ) + ) + args: array( + ) + ) + name: VarLikeIdentifier( + name: foo + ) + ) + ) + 13: Stmt_Expression( + expr: Expr_ArrayDimFetch( + var: Expr_New( + class: Stmt_Class( + attrGroups: array( + ) + flags: 0 + name: null + extends: null + implements: array( + ) + stmts: array( + ) + ) + args: array( + ) + ) + dim: Scalar_Int( + value: 0 + ) + ) + ) + 14: Stmt_Expression( + expr: Expr_ArrayDimFetch( + var: Expr_New( + class: Stmt_Class( + attrGroups: array( + ) + flags: 0 + name: null + extends: null + implements: array( + ) + stmts: array( + ) + ) + args: array( + ) + ) + dim: Scalar_Int( + value: 0 + ) + ) + ) + 15: Stmt_Expression( + expr: Expr_FuncCall( + name: Expr_New( + class: Stmt_Class( + attrGroups: array( + ) + flags: 0 + name: null + extends: null + implements: array( + ) + stmts: array( + ) + ) + args: array( + ) + ) + args: array( + ) + ) + ) +) From daaadc3bae458908aa477b90a8932e7da9253f22 Mon Sep 17 00:00:00 2001 From: Jorg Adam Sowa Date: Mon, 3 Jun 2024 08:24:19 +0200 Subject: [PATCH 346/428] Adjust tests to be compatible with PHPUnit 10 (#998) This avoids warnings on PHPUnit 10, without actually switching to PHPUnit 10. --- test/PhpParser/Builder/ClassConstTest.php | 2 +- test/PhpParser/Builder/EnumCaseTest.php | 2 +- test/PhpParser/Builder/ParamTest.php | 8 +++---- test/PhpParser/Builder/PropertyTest.php | 2 +- test/PhpParser/BuilderFactoryTest.php | 2 +- test/PhpParser/CodeParsingTest.php | 4 ++-- test/PhpParser/CodeTestAbstract.php | 2 +- test/PhpParser/CommentTest.php | 2 +- test/PhpParser/ConstExprEvaluatorTest.php | 4 ++-- test/PhpParser/ErrorTest.php | 2 +- test/PhpParser/Internal/DifferTest.php | 4 ++-- test/PhpParser/JsonDecoderTest.php | 2 +- test/PhpParser/Lexer/EmulativeTest.php | 6 ++--- test/PhpParser/LexerTest.php | 4 ++-- test/PhpParser/NameContextTest.php | 2 +- test/PhpParser/Node/Expr/CallableLikeTest.php | 2 +- test/PhpParser/Node/IdentifierTest.php | 2 +- test/PhpParser/Node/NameTest.php | 2 +- test/PhpParser/Node/ParamTest.php | 2 +- test/PhpParser/Node/Scalar/MagicConstTest.php | 2 +- test/PhpParser/Node/Scalar/StringTest.php | 6 ++--- test/PhpParser/Node/Stmt/ClassConstTest.php | 2 +- test/PhpParser/Node/Stmt/ClassMethodTest.php | 6 ++--- test/PhpParser/Node/Stmt/PropertyTest.php | 2 +- test/PhpParser/NodeAbstractTest.php | 2 +- test/PhpParser/NodeDumperTest.php | 2 +- test/PhpParser/NodeTraverserTest.php | 2 +- .../NodeVisitor/NameResolverTest.php | 2 +- test/PhpParser/Parser/Php7Test.php | 4 ++-- test/PhpParser/Parser/Php8Test.php | 4 ++-- ...{ParserTest.php => ParserTestAbstract.php} | 4 ++-- test/PhpParser/PrettyPrinterTest.php | 22 +++++++++---------- test/PhpParser/TokenTest.php | 2 +- 33 files changed, 59 insertions(+), 59 deletions(-) rename test/PhpParser/{ParserTest.php => ParserTestAbstract.php} (98%) diff --git a/test/PhpParser/Builder/ClassConstTest.php b/test/PhpParser/Builder/ClassConstTest.php index f0cccfd2c8..ac6590b417 100644 --- a/test/PhpParser/Builder/ClassConstTest.php +++ b/test/PhpParser/Builder/ClassConstTest.php @@ -165,7 +165,7 @@ public function testValues($value, $expectedValueNode): void { $this->assertEquals($expectedValueNode, $node->consts[0]->value); } - public function provideTestDefaultValues() { + public static function provideTestDefaultValues() { return [ [ null, diff --git a/test/PhpParser/Builder/EnumCaseTest.php b/test/PhpParser/Builder/EnumCaseTest.php index fb0ddfafab..04c032c118 100644 --- a/test/PhpParser/Builder/EnumCaseTest.php +++ b/test/PhpParser/Builder/EnumCaseTest.php @@ -68,7 +68,7 @@ public function testValues($value, $expectedValueNode): void { $this->assertEquals($expectedValueNode, $node->expr); } - public function provideTestDefaultValues() { + public static function provideTestDefaultValues() { return [ [ 31415, diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index f1ac65bb8a..0baeb1e7a0 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -30,7 +30,7 @@ public function testDefaultValues($value, $expectedValueNode): void { $this->assertEquals($expectedValueNode, $node->default); } - public function provideTestDefaultValues() { + public static function provideTestDefaultValues() { return [ [ null, @@ -107,7 +107,7 @@ public function testTypes($typeHint, $expectedType): void { $this->assertEquals($expectedType, $type); } - public function provideTestTypes() { + public static function provideTestTypes() { return [ ['array', new Node\Identifier('array')], ['callable', new Node\Identifier('callable')], @@ -127,7 +127,7 @@ public function provideTestTypes() { ]; } - public function provideTestNullableTypes() { + public static function provideTestNullableTypes() { return [ ['?array', new Node\NullableType(new Node\Identifier('array'))], ['?Some\Class', new Node\NullableType(new Node\Name('Some\Class'))], @@ -142,7 +142,7 @@ public function provideTestNullableTypes() { ]; } - public function provideTestUnionTypes() { + public static function provideTestUnionTypes() { return [ [ new Node\UnionType([ diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index b2983141cf..bbaced4d65 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -136,7 +136,7 @@ public function testAddAttribute(): void { ); } - public function provideTestDefaultValues() { + public static function provideTestDefaultValues() { return [ [ null, diff --git a/test/PhpParser/BuilderFactoryTest.php b/test/PhpParser/BuilderFactoryTest.php index 8c08cc205e..7597a1442e 100644 --- a/test/PhpParser/BuilderFactoryTest.php +++ b/test/PhpParser/BuilderFactoryTest.php @@ -20,7 +20,7 @@ public function testFactory($methodName, $className): void { $this->assertInstanceOf($className, $factory->$methodName('test')); } - public function provideTestFactory() { + public static function provideTestFactory() { return [ ['namespace', Builder\Namespace_::class], ['class', Builder\Class_::class], diff --git a/test/PhpParser/CodeParsingTest.php b/test/PhpParser/CodeParsingTest.php index b843e2860a..0c479a51be 100644 --- a/test/PhpParser/CodeParsingTest.php +++ b/test/PhpParser/CodeParsingTest.php @@ -50,8 +50,8 @@ public function getParseOutput(Parser $parser, $code, array $modes) { return [$stmts, canonicalize($output)]; } - public function provideTestParse() { - return $this->getTests(__DIR__ . '/../code/parser', 'test'); + public static function provideTestParse() { + return self::getTests(__DIR__ . '/../code/parser', 'test'); } private function formatErrorMessage(Error $e, $code) { diff --git a/test/PhpParser/CodeTestAbstract.php b/test/PhpParser/CodeTestAbstract.php index f11c11bae0..145f7dda2d 100644 --- a/test/PhpParser/CodeTestAbstract.php +++ b/test/PhpParser/CodeTestAbstract.php @@ -3,7 +3,7 @@ namespace PhpParser; abstract class CodeTestAbstract extends \PHPUnit\Framework\TestCase { - protected function getTests($directory, $fileExtension, $chunksPerTest = 2) { + protected static function getTests($directory, $fileExtension, $chunksPerTest = 2) { $parser = new CodeTestParser(); $allTests = []; foreach (filesInDir($directory, $fileExtension) as $fileName => $fileContents) { diff --git a/test/PhpParser/CommentTest.php b/test/PhpParser/CommentTest.php index 255eccb801..1d0f0ebd0f 100644 --- a/test/PhpParser/CommentTest.php +++ b/test/PhpParser/CommentTest.php @@ -25,7 +25,7 @@ public function testReformatting($commentText, $reformattedText): void { $this->assertSame($reformattedText, $comment->getReformattedText()); } - public function provideTestReformatting() { + public static function provideTestReformatting() { return [ ['// Some text', '// Some text'], ['/* Some text */', '/* Some text */'], diff --git a/test/PhpParser/ConstExprEvaluatorTest.php b/test/PhpParser/ConstExprEvaluatorTest.php index 0f5ac79420..fa0484ba8f 100644 --- a/test/PhpParser/ConstExprEvaluatorTest.php +++ b/test/PhpParser/ConstExprEvaluatorTest.php @@ -14,7 +14,7 @@ public function testEvaluate($exprString, $expected): void { $this->assertSame($expected, $evaluator->evaluateDirectly($expr)); } - public function provideTestEvaluate() { + public static function provideTestEvaluate() { return [ ['1', 1], ['1.0', 1.0], @@ -115,7 +115,7 @@ public function testEvaluateSilently($expr, $exception, $msg): void { } } - public function provideTestEvaluateSilently() { + public static function provideTestEvaluateSilently() { return [ [ new Expr\BinaryOp\Mod(new Scalar\Int_(42), new Scalar\Int_(0)), diff --git a/test/PhpParser/ErrorTest.php b/test/PhpParser/ErrorTest.php index b3ef521e67..b86412ee8b 100644 --- a/test/PhpParser/ErrorTest.php +++ b/test/PhpParser/ErrorTest.php @@ -51,7 +51,7 @@ public function testColumnInfo($code, $startPos, $endPos, $startColumn, $endColu $this->assertSame($endColumn, $error->getEndColumn($code)); } - public function provideTestColumnInfo() { + public static function provideTestColumnInfo() { return [ // Error at "bar" ["assertSame($expectedDiffStr, $this->formatDiffString($diff)); } - public function provideTestDiff() { + public static function provideTestDiff() { return [ ['abc', 'abc', 'abc'], ['abc', 'abcdef', 'abc+d+e+f'], @@ -57,7 +57,7 @@ public function testDiffWithReplacements($oldStr, $newStr, $expectedDiffStr): vo $this->assertSame($expectedDiffStr, $this->formatDiffString($diff)); } - public function provideTestDiffWithReplacements() { + public static function provideTestDiffWithReplacements() { return [ ['abcde', 'axyze', 'a/bx/cy/dze'], ['abcde', 'xbcdy', '/axbcd/ey'], diff --git a/test/PhpParser/JsonDecoderTest.php b/test/PhpParser/JsonDecoderTest.php index 3fb105f96d..9f1e837f18 100644 --- a/test/PhpParser/JsonDecoderTest.php +++ b/test/PhpParser/JsonDecoderTest.php @@ -30,7 +30,7 @@ public function testDecodingError($json, $expectedMessage): void { $jsonDecoder->decode($json); } - public function provideTestDecodingError() { + public static function provideTestDecodingError() { return [ ['???', 'JSON decoding error: Syntax error'], ['{"nodeType":123}', 'Node type must be a string'], diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index f77da514be..0549290f22 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -89,7 +89,7 @@ public function testNoReplaceKeywordsAfterNullsafeObjectOperator(string $keyword ], $lexer->tokenize($code)); } - public function provideTestReplaceKeywords() { + public static function provideTestReplaceKeywords() { return [ // PHP 8.0 ['match', \T_MATCH], @@ -173,7 +173,7 @@ public function testErrorAfterEmulation($code): void { $this->assertSame($expLine, $attrs['endLine']); } - public function provideTestLexNewFeatures() { + public static function provideTestLexNewFeatures() { return [ ['yield from', [ [\T_YIELD_FROM, 'yield from'], @@ -401,7 +401,7 @@ public function testTargetVersion(string $phpVersion, string $code, array $expec $this->assertSameTokens($expectedTokens, $lexer->tokenize('assertSame($expected, $identifier->isSpecialClassName()); } - public function provideTestIsSpecialClassName() { + public static function provideTestIsSpecialClassName() { return [ ['self', true], ['PARENT', true], diff --git a/test/PhpParser/Node/NameTest.php b/test/PhpParser/Node/NameTest.php index 262b95e2ed..eb25d04b1a 100644 --- a/test/PhpParser/Node/NameTest.php +++ b/test/PhpParser/Node/NameTest.php @@ -152,7 +152,7 @@ public function testIsSpecialClassName($name, $expected): void { $this->assertSame($expected, $name->isSpecialClassName()); } - public function provideTestIsSpecialClassName() { + public static function provideTestIsSpecialClassName() { return [ ['self', true], ['PARENT', true], diff --git a/test/PhpParser/Node/ParamTest.php b/test/PhpParser/Node/ParamTest.php index 23b23ae052..96d9de40d5 100644 --- a/test/PhpParser/Node/ParamTest.php +++ b/test/PhpParser/Node/ParamTest.php @@ -26,7 +26,7 @@ public function testModifiers(string $modifier): void { $this->assertTrue($node->{'is' . $modifier}()); } - public function provideModifiers() { + public static function provideModifiers() { return [ ['public'], ['protected'], diff --git a/test/PhpParser/Node/Scalar/MagicConstTest.php b/test/PhpParser/Node/Scalar/MagicConstTest.php index b7c48b3579..825b1b171a 100644 --- a/test/PhpParser/Node/Scalar/MagicConstTest.php +++ b/test/PhpParser/Node/Scalar/MagicConstTest.php @@ -10,7 +10,7 @@ public function testGetName(MagicConst $magicConst, $name): void { $this->assertSame($name, $magicConst->getName()); } - public function provideTestGetName() { + public static function provideTestGetName() { return [ [new MagicConst\Class_(), '__CLASS__'], [new MagicConst\Dir(), '__DIR__'], diff --git a/test/PhpParser/Node/Scalar/StringTest.php b/test/PhpParser/Node/Scalar/StringTest.php index 4b2c3b222d..cb0968c2e5 100644 --- a/test/PhpParser/Node/Scalar/StringTest.php +++ b/test/PhpParser/Node/Scalar/StringTest.php @@ -42,7 +42,7 @@ public function testCreate($expected, $string): void { ); } - public function provideTestParseEscapeSequences() { + public static function provideTestParseEscapeSequences() { return [ ['"', '\\"', '"'], ['\\"', '\\"', '`'], @@ -57,7 +57,7 @@ public function provideTestParseEscapeSequences() { ]; } - public function provideTestParse() { + public static function provideTestParse() { $tests = [ ['A', '\'A\''], ['A', 'b\'A\''], @@ -67,7 +67,7 @@ public function provideTestParse() { ['\'', '\'\\\'\''], ]; - foreach ($this->provideTestParseEscapeSequences() as $i => $test) { + foreach (self::provideTestParseEscapeSequences() as $i => $test) { // skip second and third tests, they aren't for double quotes if ($i !== 1 && $i !== 2) { $tests[] = [$test[0], '"' . $test[1] . '"']; diff --git a/test/PhpParser/Node/Stmt/ClassConstTest.php b/test/PhpParser/Node/Stmt/ClassConstTest.php index 789b9a9c79..7206ebf4c8 100644 --- a/test/PhpParser/Node/Stmt/ClassConstTest.php +++ b/test/PhpParser/Node/Stmt/ClassConstTest.php @@ -26,7 +26,7 @@ public function testNoModifiers(): void { $this->assertFalse($node->isFinal()); } - public function provideModifiers() { + public static function provideModifiers() { return [ ['public'], ['protected'], diff --git a/test/PhpParser/Node/Stmt/ClassMethodTest.php b/test/PhpParser/Node/Stmt/ClassMethodTest.php index c3f779ea99..17bb3ec508 100644 --- a/test/PhpParser/Node/Stmt/ClassMethodTest.php +++ b/test/PhpParser/Node/Stmt/ClassMethodTest.php @@ -31,7 +31,7 @@ public function testNoModifiers(): void { $this->assertFalse($node->isMagic()); } - public function provideModifiers() { + public static function provideModifiers() { return [ ['public'], ['protected'], @@ -57,7 +57,7 @@ public function testImplicitPublic(string $modifier): void { $this->assertTrue($node->isPublic(), 'Node should be implicitly public'); } - public function implicitPublicModifiers() { + public static function implicitPublicModifiers() { return [ ['abstract'], ['final'], @@ -75,7 +75,7 @@ public function testMagic(string $name): void { $this->assertTrue($node->isMagic(), 'Method should be magic'); } - public function provideMagics() { + public static function provideMagics() { return [ ['__construct'], ['__DESTRUCT'], diff --git a/test/PhpParser/Node/Stmt/PropertyTest.php b/test/PhpParser/Node/Stmt/PropertyTest.php index 8279aa7add..a55992c128 100644 --- a/test/PhpParser/Node/Stmt/PropertyTest.php +++ b/test/PhpParser/Node/Stmt/PropertyTest.php @@ -36,7 +36,7 @@ public function testStaticImplicitlyPublic(): void { $this->assertFalse($node->isReadonly()); } - public function provideModifiers() { + public static function provideModifiers() { return [ ['public'], ['protected'], diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index 2b7c1f8cd9..dc521c79a6 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -25,7 +25,7 @@ public function getType(): string { } class NodeAbstractTest extends \PHPUnit\Framework\TestCase { - public function provideNodes() { + public static function provideNodes() { $attributes = [ 'startLine' => 10, 'endLine' => 11, diff --git a/test/PhpParser/NodeDumperTest.php b/test/PhpParser/NodeDumperTest.php index 8b21948e37..f0e65cacdb 100644 --- a/test/PhpParser/NodeDumperTest.php +++ b/test/PhpParser/NodeDumperTest.php @@ -16,7 +16,7 @@ public function testDump($node, $dump): void { $this->assertSame($this->canonicalize($dump), $this->canonicalize($dumper->dump($node))); } - public function provideTestDump() { + public static function provideTestDump() { return [ [ [], diff --git a/test/PhpParser/NodeTraverserTest.php b/test/PhpParser/NodeTraverserTest.php index bc84600b6c..09ea8143f7 100644 --- a/test/PhpParser/NodeTraverserTest.php +++ b/test/PhpParser/NodeTraverserTest.php @@ -424,7 +424,7 @@ public function testInvalidReturn($stmts, $visitor, $message): void { $traverser->traverse($stmts); } - public function provideTestInvalidReturn() { + public static function provideTestInvalidReturn() { $num = new Node\Scalar\Int_(42); $expr = new Node\Stmt\Expression($num); $stmts = [$expr]; diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index 449051fbf6..84dc33e658 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -407,7 +407,7 @@ public function testError(Node $stmt, $errorMsg): void { $traverser->traverse([$stmt]); } - public function provideTestError() { + public static function provideTestError() { return [ [ new Stmt\Use_([ diff --git a/test/PhpParser/Parser/Php7Test.php b/test/PhpParser/Parser/Php7Test.php index 22a4c5190c..7b45cb14c6 100644 --- a/test/PhpParser/Parser/Php7Test.php +++ b/test/PhpParser/Parser/Php7Test.php @@ -3,9 +3,9 @@ namespace PhpParser\Parser; use PhpParser\Lexer; -use PhpParser\ParserTest; +use PhpParser\ParserTestAbstract; -class Php7Test extends ParserTest +class Php7Test extends ParserTestAbstract { protected function getParser(Lexer $lexer) { return new Php7($lexer); diff --git a/test/PhpParser/Parser/Php8Test.php b/test/PhpParser/Parser/Php8Test.php index f771672daf..769e8b798f 100644 --- a/test/PhpParser/Parser/Php8Test.php +++ b/test/PhpParser/Parser/Php8Test.php @@ -3,9 +3,9 @@ namespace PhpParser\Parser; use PhpParser\Lexer; -use PhpParser\ParserTest; +use PhpParser\ParserTestAbstract; -class Php8Test extends ParserTest +class Php8Test extends ParserTestAbstract { protected function getParser(Lexer $lexer) { return new Php8($lexer); diff --git a/test/PhpParser/ParserTest.php b/test/PhpParser/ParserTestAbstract.php similarity index 98% rename from test/PhpParser/ParserTest.php rename to test/PhpParser/ParserTestAbstract.php index 8096685901..9f083b2eee 100644 --- a/test/PhpParser/ParserTest.php +++ b/test/PhpParser/ParserTestAbstract.php @@ -7,7 +7,7 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -abstract class ParserTest extends \PHPUnit\Framework\TestCase { +abstract class ParserTestAbstract extends \PHPUnit\Framework\TestCase { /** @returns Parser */ abstract protected function getParser(Lexer $lexer); @@ -128,7 +128,7 @@ public function testExtraAttributes($code, $expectedAttributes): void { } } - public function provideTestExtraAttributes() { + public static function provideTestExtraAttributes() { return [ ['0', ['kind' => Scalar\Int_::KIND_DEC]], ['9', ['kind' => Scalar\Int_::KIND_DEC]], diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index a937d74978..eda8e5ddf2 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -40,12 +40,12 @@ public function testPrettyPrintFile($name, $code, $expected, $mode): void { $this->doTestPrettyPrintMethod('prettyPrintFile', $name, $code, $expected, $mode); } - public function provideTestPrettyPrint() { - return $this->getTests(__DIR__ . '/../code/prettyPrinter', 'test'); + public static function provideTestPrettyPrint() { + return self::getTests(__DIR__ . '/../code/prettyPrinter', 'test'); } - public function provideTestPrettyPrintFile() { - return $this->getTests(__DIR__ . '/../code/prettyPrinter', 'file-test'); + public static function provideTestPrettyPrintFile() { + return self::getTests(__DIR__ . '/../code/prettyPrinter', 'file-test'); } public function testPrettyPrintExpr(): void { @@ -88,7 +88,7 @@ public function testKindAttributes($node, $expected): void { $this->assertSame($expected, $result); } - public function provideTestKindAttributes() { + public static function provideTestKindAttributes() { $nowdoc = ['kind' => String_::KIND_NOWDOC, 'docLabel' => 'STR']; $heredoc = ['kind' => String_::KIND_HEREDOC, 'docLabel' => 'STR']; return [ @@ -144,7 +144,7 @@ public function testUnnaturalLiterals($node, $expected): void { $this->assertSame($expected, $result); } - public function provideTestUnnaturalLiterals() { + public static function provideTestUnnaturalLiterals() { return [ [new Int_(-1), '-1'], [new Int_(-PHP_INT_MAX - 1), '(-' . PHP_INT_MAX . '-1)'], @@ -209,8 +209,8 @@ public function testFormatPreservingPrint($name, $code, $modification, $expected $this->assertSame(canonicalize($expected), canonicalize($newCode), $name); } - public function provideTestFormatPreservingPrint() { - return $this->getTests(__DIR__ . '/../code/formatPreservation', 'test', 3); + public static function provideTestFormatPreservingPrint() { + return self::getTests(__DIR__ . '/../code/formatPreservation', 'test', 3); } /** @@ -245,10 +245,10 @@ public function testRoundTripPrint($name, $code, $expected, $modeLine): void { $this->assertSame(canonicalize($code), canonicalize($newCode), $name); } - public function provideTestRoundTripPrint() { + public static function provideTestRoundTripPrint() { return array_merge( - $this->getTests(__DIR__ . '/../code/prettyPrinter', 'test'), - $this->getTests(__DIR__ . '/../code/parser', 'test') + self::getTests(__DIR__ . '/../code/prettyPrinter', 'test'), + self::getTests(__DIR__ . '/../code/parser', 'test') ); } diff --git a/test/PhpParser/TokenTest.php b/test/PhpParser/TokenTest.php index 8297699c6e..c015d9fa0e 100644 --- a/test/PhpParser/TokenTest.php +++ b/test/PhpParser/TokenTest.php @@ -28,7 +28,7 @@ public function testIsIgnorable(int $id, string $text, bool $isIgnorable): void $this->assertSame($isIgnorable, $token->isIgnorable()); } - public function provideTestIsIgnorable() { + public static function provideTestIsIgnorable() { return [ [\T_STRING, 'foo', false], [\T_WHITESPACE, ' ', true], From db1963f9eaa6bef01be95dd06fd58e59919d85c1 Mon Sep 17 00:00:00 2001 From: "Jing Xu(RainX)" Date: Wed, 12 Jun 2024 23:42:53 +0800 Subject: [PATCH 347/428] Fix a typo: `Dereferenceing` to `Dereferencing` --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74f7b5c321..abd32bb6c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ Version 5.1.0-dev ### Added -* [8.4] Added support for dereferenceing `new` expressions without parentheses. +* [8.4] Added support for dereferencing `new` expressions without parentheses. Version 5.0.2 (2024-03-05) -------------------------- From 3ef0811e45ba7e91fb0f066af5af7d52c3b24469 Mon Sep 17 00:00:00 2001 From: "Jing Xu(RainX)" Date: Thu, 13 Jun 2024 00:24:52 +0800 Subject: [PATCH 348/428] Fix a typo: Dereferencable to Dereferenceable --- grammar/php.y | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index 8255e96102..cb1ba4a3c2 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1135,7 +1135,7 @@ class_name_reference: class_name_or_var: class_name - | fully_dereferencable + | fully_dereferenceable ; exit_expr: @@ -1184,7 +1184,7 @@ array_short_syntax: $$ = new Expr\Array_($2, $attrs); } ; -dereferencable_scalar: +dereferenceable_scalar: T_ARRAY '(' array_pair_list ')' { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG; $$ = new Expr\Array_($3, $attrs); @@ -1201,7 +1201,7 @@ scalar: T_LNUMBER { $$ = $this->parseLNumber($1, attributes(), $this->phpVersion->allowsInvalidOctals()); } | T_DNUMBER { $$ = Scalar\Float_::fromString($1, attributes()); } - | dereferencable_scalar + | dereferenceable_scalar | constant | class_constant | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC @@ -1217,34 +1217,34 @@ optional_expr: | expr ; -fully_dereferencable: +fully_dereferenceable: variable | '(' expr ')' { $$ = $2; } - | dereferencable_scalar + | dereferenceable_scalar | class_constant | new_dereferenceable ; -array_object_dereferencable: - fully_dereferencable +array_object_dereferenceable: + fully_dereferenceable | constant ; callable_expr: callable_variable | '(' expr ')' { $$ = $2; } - | dereferencable_scalar + | dereferenceable_scalar | new_dereferenceable ; callable_variable: simple_variable - | array_object_dereferencable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } - | array_object_dereferencable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | array_object_dereferenceable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } + | array_object_dereferenceable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } | function_call - | array_object_dereferencable T_OBJECT_OPERATOR property_name argument_list + | array_object_dereferenceable T_OBJECT_OPERATOR property_name argument_list { $$ = Expr\MethodCall[$1, $3, $4]; } - | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list + | array_object_dereferenceable T_NULLSAFE_OBJECT_OPERATOR property_name argument_list { $$ = Expr\NullsafeMethodCall[$1, $3, $4]; } ; @@ -1256,9 +1256,9 @@ optional_plain_variable: variable: callable_variable | static_member - | array_object_dereferencable T_OBJECT_OPERATOR property_name + | array_object_dereferenceable T_OBJECT_OPERATOR property_name { $$ = Expr\PropertyFetch[$1, $3]; } - | array_object_dereferencable T_NULLSAFE_OBJECT_OPERATOR property_name + | array_object_dereferenceable T_NULLSAFE_OBJECT_OPERATOR property_name { $$ = Expr\NullsafePropertyFetch[$1, $3]; } ; From a894652a3dd2331b9368541f5d8dde57e76157ca Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 1 Jul 2024 21:49:36 +0200 Subject: [PATCH 349/428] Fix ternary precedence printing The precedence table set the LHS and RHS precedence for the ternary to -1, which is the dummy value used for unary operators. Instead, it should be the same as the operator precedence, as the ternary is non-associative since PHP 8. Fixes #1009. --- lib/PhpParser/PrettyPrinterAbstract.php | 2 +- test/code/prettyPrinter/expr/parentheses.test | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 8303c427aa..17f27a15ea 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -76,7 +76,7 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { BinaryOp\BooleanAnd::class => [120, 121, 120], BinaryOp\BooleanOr::class => [130, 131, 130], BinaryOp\Coalesce::class => [140, 140, 141], - Expr\Ternary::class => [150, -1, -1], + Expr\Ternary::class => [150, 150, 150], Expr\Assign::class => [160, -1, -1], Expr\AssignRef::class => [160, -1, -1], AssignOp\Plus::class => [160, -1, -1], diff --git a/test/code/prettyPrinter/expr/parentheses.test b/test/code/prettyPrinter/expr/parentheses.test index 6468949bf7..be9a776481 100644 --- a/test/code/prettyPrinter/expr/parentheses.test +++ b/test/code/prettyPrinter/expr/parentheses.test @@ -19,6 +19,7 @@ $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 : $d; $a ?? $b ?? $c; ($a ?? $b) ?? $c; @@ -73,6 +74,7 @@ $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 : $d; $a ?? $b ?? $c; ($a ?? $b) ?? $c; $a ?? ($b ? $c : $d); From 683130c2ff8c2739f4822ff7ac5c873ec529abd1 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 1 Jul 2024 22:03:41 +0200 Subject: [PATCH 350/428] Release PHP-Parser 5.1.0 --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abd32bb6c1..ff432c4f16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,18 @@ -Version 5.1.0-dev ------------------ +Version 5.1.0 (2024-07-01) +-------------------------- ### Added * [8.4] Added support for dereferencing `new` expressions without parentheses. +### Fixed + +* Fixed redundant parentheses being added when pretty printing ternary expressions. + +### Changed + +* Made some phpdoc types more precise. + Version 5.0.2 (2024-03-05) -------------------------- From caf540443af9010cc5171b3f000d2733974559ae Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 13 Jul 2024 11:10:19 +0200 Subject: [PATCH 351/428] Declare PHP 8.4 as the newest supported version As the comment indicates, this includes partially supported versions. PHP-Parser includes support for all parts of PHP 8.4 that have landed in php-src. --- lib/PhpParser/PhpVersion.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index db85b1e54c..04ff6ddcbf 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -43,7 +43,7 @@ public static function fromComponents(int $major, int $minor): self { * if it is still under development. */ public static function getNewestSupported(): self { - return self::fromComponents(8, 3); + return self::fromComponents(8, 4); } /** From b917ba7b9c6c5587e40c108e17c008a555f70555 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 13 Jul 2024 11:11:15 +0200 Subject: [PATCH 352/428] Add PHP 8.4 to CI matrix Not using it in the integration tests yet. --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a55358f33..8d4367f870 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,6 +38,7 @@ jobs: - "8.1" - "8.2" - "8.3" + - "8.4" steps: - name: "Checkout" uses: "actions/checkout@v4" From 5973c30a46d899b32fa6f0dc5cf617fbd8765100 Mon Sep 17 00:00:00 2001 From: Amirreza Nasiri Date: Sat, 13 Jul 2024 16:58:32 +0330 Subject: [PATCH 353/428] Update JSON_representation.markdown Fix the invalid JSON structure --- doc/component/JSON_representation.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/component/JSON_representation.markdown b/doc/component/JSON_representation.markdown index c6cc07d53b..46684ebd1e 100644 --- a/doc/component/JSON_representation.markdown +++ b/doc/component/JSON_representation.markdown @@ -104,7 +104,7 @@ This will result in the following output (which includes attributes): "nodeType": "Scalar_String", "attributes": { "startLine": 5, - "endLine": 5 + "endLine": 5, "kind": 2, "rawValue": "\"\\n\"" }, From d8235a2701f77a19936e89650b05e6839b348903 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 14 Jul 2024 18:49:54 +0200 Subject: [PATCH 354/428] [8.4] Add support for __PROPERTY__ magic constant Part of property hooks RFC. --- grammar/php.y | 2 + lib/PhpParser/Lexer/Emulative.php | 6 +- .../Lexer/TokenEmulator/KeywordEmulator.php | 8 +- .../TokenEmulator/PropertyTokenEmulator.php | 19 + .../Node/Scalar/MagicConst/Property.php | 15 + lib/PhpParser/Parser/Php7.php | 1325 ++++++++-------- lib/PhpParser/Parser/Php8.php | 1327 +++++++++-------- lib/PhpParser/ParserAbstract.php | 1 + lib/PhpParser/PrettyPrinter/Standard.php | 4 + lib/PhpParser/compatibility_tokens.php | 2 + phpstan-baseline.neon | 15 + test/PhpParser/Lexer/EmulativeTest.php | 7 + test/code/parser/scalar/magicConst.test | 5 + test/code/prettyPrinter/expr/literals.test | 2 + 14 files changed, 1415 insertions(+), 1323 deletions(-) create mode 100644 lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php create mode 100644 lib/PhpParser/Node/Scalar/MagicConst/Property.php diff --git a/grammar/php.y b/grammar/php.y index cb1ba4a3c2..c9acbfa921 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -103,6 +103,7 @@ %token T_TRAIT_C %token T_METHOD_C %token T_FUNC_C +%token T_PROPERTY_C %token T_LINE %token T_FILE %token T_START_HEREDOC @@ -1165,6 +1166,7 @@ constant: | T_METHOD_C { $$ = Scalar\MagicConst\Method[]; } | T_FUNC_C { $$ = Scalar\MagicConst\Function_[]; } | T_NS_C { $$ = Scalar\MagicConst\Namespace_[]; } + | T_PROPERTY_C { $$ = Scalar\MagicConst\Property[]; } ; class_constant: diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index 934954cd34..de441f5e8d 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -7,13 +7,10 @@ use PhpParser\Lexer; use PhpParser\Lexer\TokenEmulator\AttributeEmulator; use PhpParser\Lexer\TokenEmulator\EnumTokenEmulator; -use PhpParser\Lexer\TokenEmulator\CoaleseEqualTokenEmulator; use PhpParser\Lexer\TokenEmulator\ExplicitOctalEmulator; -use PhpParser\Lexer\TokenEmulator\FlexibleDocStringEmulator; -use PhpParser\Lexer\TokenEmulator\FnTokenEmulator; use PhpParser\Lexer\TokenEmulator\MatchTokenEmulator; use PhpParser\Lexer\TokenEmulator\NullsafeTokenEmulator; -use PhpParser\Lexer\TokenEmulator\NumericLiteralSeparatorEmulator; +use PhpParser\Lexer\TokenEmulator\PropertyTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReadonlyFunctionTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReverseEmulator; @@ -47,6 +44,7 @@ public function __construct(?PhpVersion $phpVersion = null) { new ReadonlyTokenEmulator(), new ExplicitOctalEmulator(), new ReadonlyFunctionTokenEmulator(), + new PropertyTokenEmulator(), ]; // Collect emulators that are relevant for the PHP version we're running diff --git a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php index 9803f99688..066e7cd850 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php @@ -14,8 +14,12 @@ public function isEmulationNeeded(string $code): bool { /** @param Token[] $tokens */ protected function isKeywordContext(array $tokens, int $pos): bool { - $previousNonSpaceToken = $this->getPreviousNonSpaceToken($tokens, $pos); - return $previousNonSpaceToken === null || $previousNonSpaceToken->id !== \T_OBJECT_OPERATOR; + $prevToken = $this->getPreviousNonSpaceToken($tokens, $pos); + if ($prevToken === null) { + return false; + } + return $prevToken->id !== \T_OBJECT_OPERATOR + && $prevToken->id !== \T_NULLSAFE_OBJECT_OPERATOR; } public function emulate(string $code, array $tokens): array { diff --git a/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php new file mode 100644 index 0000000000..71b7fc232d --- /dev/null +++ b/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php @@ -0,0 +1,19 @@ +semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 528 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 529 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 530 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 531 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + }, + 532 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 532 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 533 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 534 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 535 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 536 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 537 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => null, 539 => null, 540 => null, - 541 => static function ($self, $stackPos) { + 541 => null, + 542 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 542 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 543 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 544 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = null; }, - 545 => null, 546 => null, - 547 => static function ($self, $stackPos) { + 547 => null, + 548 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 548 => null, 549 => null, 550 => null, 551 => null, 552 => null, 553 => null, - 554 => static function ($self, $stackPos) { + 554 => null, + 555 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 555 => null, 556 => null, 557 => null, - 558 => static function ($self, $stackPos) { + 558 => null, + 559 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 559 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 560 => null, - 561 => static function ($self, $stackPos) { + 561 => null, + 562 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 562 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 563 => static function ($self, $stackPos) { + 564 => static function ($self, $stackPos) { $self->semValue = null; }, - 564 => null, 565 => null, 566 => null, - 567 => static function ($self, $stackPos) { + 567 => null, + 568 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 568 => static function ($self, $stackPos) { + 569 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 569 => null, - 570 => static function ($self, $stackPos) { + 570 => null, + 571 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 571 => static function ($self, $stackPos) { + 572 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 572 => static function ($self, $stackPos) { + 573 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 573 => static function ($self, $stackPos) { + 574 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 574 => static function ($self, $stackPos) { + 575 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 575 => null, - 576 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, + 576 => null, 577 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 578 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 579 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 580 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 581 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 582 => null, - 583 => static function ($self, $stackPos) { + 582 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 583 => null, + 584 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 584 => null, 585 => null, - 586 => static function ($self, $stackPos) { + 586 => null, + 587 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 587 => null, - 588 => static function ($self, $stackPos) { + 588 => null, + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 589 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 590 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 591 => null, - 592 => static function ($self, $stackPos) { + 592 => null, + 593 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 593 => static function ($self, $stackPos) { + 594 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 594 => static function ($self, $stackPos) { + 595 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 595 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 597 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 597 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 598 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 599 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 600 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 601 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 602 => static function ($self, $stackPos) { + 603 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 603 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 604 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 605 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 606 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 607 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 608 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 609 => null, - 610 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 609 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 610 => null, 611 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 612 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 613 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 614 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 615 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 616 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 617 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 618 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 619 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 620 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 620 => null, + 621 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 1317c54334..b69bf2b64b 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -142,28 +142,29 @@ class Php8 extends \PhpParser\ParserAbstract public const T_TRAIT_C = 377; public const T_METHOD_C = 378; public const T_FUNC_C = 379; - public const T_LINE = 380; - public const T_FILE = 381; - public const T_START_HEREDOC = 382; - public const T_END_HEREDOC = 383; - public const T_DOLLAR_OPEN_CURLY_BRACES = 384; - public const T_CURLY_OPEN = 385; - public const T_PAAMAYIM_NEKUDOTAYIM = 386; - public const T_NAMESPACE = 387; - public const T_NS_C = 388; - public const T_DIR = 389; - public const T_NS_SEPARATOR = 390; - public const T_ELLIPSIS = 391; - public const T_NAME_FULLY_QUALIFIED = 392; - public const T_NAME_QUALIFIED = 393; - public const T_NAME_RELATIVE = 394; - public const T_ATTRIBUTE = 395; + public const T_PROPERTY_C = 380; + public const T_LINE = 381; + public const T_FILE = 382; + public const T_START_HEREDOC = 383; + public const T_END_HEREDOC = 384; + public const T_DOLLAR_OPEN_CURLY_BRACES = 385; + public const T_CURLY_OPEN = 386; + public const T_PAAMAYIM_NEKUDOTAYIM = 387; + public const T_NAMESPACE = 388; + public const T_NS_C = 389; + public const T_DIR = 390; + public const T_NS_SEPARATOR = 391; + public const T_ELLIPSIS = 392; + public const T_NAME_FULLY_QUALIFIED = 393; + public const T_NAME_QUALIFIED = 394; + public const T_NAME_RELATIVE = 395; + public const T_ATTRIBUTE = 396; - protected int $tokenToSymbolMapSize = 396; - protected int $actionTableSize = 1272; - protected int $gotoTableSize = 689; + protected int $tokenToSymbolMapSize = 397; + protected int $actionTableSize = 1276; + protected int $gotoTableSize = 706; - protected int $invalidSymbol = 168; + protected int $invalidSymbol = 169; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; @@ -315,6 +316,7 @@ class Php8 extends \PhpParser\ParserAbstract "T_TRAIT_C", "T_METHOD_C", "T_FUNC_C", + "T_PROPERTY_C", "T_LINE", "T_FILE", "T_START_HEREDOC", @@ -343,32 +345,32 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $tokenToSymbol = array( - 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 56, 166, 168, 167, 55, 168, 168, - 161, 162, 53, 51, 8, 52, 48, 54, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 31, 159, - 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 70, 168, 160, 36, 168, 165, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 163, 35, 164, 58, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, + 0, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 56, 167, 169, 168, 55, 169, 169, + 162, 163, 53, 51, 8, 52, 48, 54, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 31, 160, + 44, 16, 46, 30, 68, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 70, 169, 161, 36, 169, 166, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 164, 35, 165, 58, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 169, 169, 169, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, @@ -382,398 +384,398 @@ class Php8 extends \PhpParser\ParserAbstract 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158 + 153, 154, 155, 156, 157, 158, 159 ); protected array $action = array( - 133, 134, 135, 586, 136, 137, 0, 755, 756, 757, - 138, 38, 329,-32766,-32766,-32766,-32766,-32766,-32766, 841, - 830,-32767,-32767,-32767,-32767, 102, 103, 104, 1116, 1117, - 1118, 1115, 1114, 1113, 1119, 749, 748,-32766, 1031,-32766, + 133, 134, 135, 586, 136, 137, 1316, 755, 756, 757, + 138, 38,-32766,-32766,-32766, 945,-32766,-32766,-32766, 485, + 0, 384, 383, 830,-32767,-32767,-32767,-32767, 102, 103, + 104, 425, 239,-32766, 1093, 749, 748,-32766, 741,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1252,-32766,-32766, 1331, 758, 1116, 1117, 1118, 1115, - 1114, 1113, 1119, 461, 462, 463, 2, 994, 1315, 265, - 139, 406, 762, 763, 764, 765, 470, 471, 431, 839, - 610, -16, 1350, 23, 293, 819, 766, 767, 768, 769, + -32767,-32766,-32766,-32766, 24, 758,-32766,-32766,-32766, 1116, + 1117, 1118, 1115, 1114, 1113, 1119, -328, 1092, 1031, 265, + 139, 406, 762, 763, 764, 765, 1108,-32766, 431,-32766, + -32766,-32766,-32766,-32766, 610, 819, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 795, 587, 796, 797, 798, 799, 787, 788, 347, 348, 790, 791, 776, 777, 778, 780, 781, 782, 358, 822, 823, 824, 825, 826, - 588, 783, 784, 589, 590, 945, 807, 805, 806, 818, - 802, 803, 839, 830, 591, 592, 801, 593, 594, 595, - 596, 597, 598, -328, 36, 250, 35, -194, 804, 599, - 600, -193, 140, -85, 133, 134, 135, 586, 136, 137, - 1064, 755, 756, 757, 138, 38, 129, -110, -110, -590, - -32766, -590, -110,-32766,-32766,-32766, 241, 840, -110, 145, - 963, 964,-32766,-32766,-32766, 965, -599,-32766, 485, 749, - 748, 959, 1040, -599,-32766, 995,-32766,-32766,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 301, 758, - 835, 75,-32766,-32766,-32766, 292, 142, 328, 242, -85, - 328, 384, 383, 265, 139, 406, 762, 763, 764, 765, - 82, 425, 431,-32766, 328,-32766,-32766,-32766,-32766, 819, - 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, - 795, 587, 796, 797, 798, 799, 787, 788, 347, 348, - 790, 791, 776, 777, 778, 780, 781, 782, 358, 822, - 823, 824, 825, 826, 588, 783, 784, 589, 590, 253, - 807, 805, 806, 818, 802, 803, 836, 729, 591, 592, - 801, 593, 594, 595, 596, 597, 598, -328, 83, 84, - 85, -194, 804, 599, 600, -193, 149, 779, 750, 751, - 752, 753, 754, 151, 755, 756, 757, 792, 793, 37, - 486, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, -599, 275, -599,-32766,-32766, - -32766,-32766,-32766,-32766, 312, 1093, 127, 314, 110, 741, - 1335, 21, 758,-32766,-32766,-32766, -272, 1334,-32766,-32766, - 1092,-32766,-32766,-32766,-32766,-32766, 759, 760, 761, 762, - 763, 764, 765, 1108,-32766, 828,-32766,-32766, -550, 560, - 1040, 1273, 819, 766, 767, 768, 769, 770, 771, 772, - 773, 774, 775, 795, 817, 796, 797, 798, 799, 787, - 788, 789, 816, 790, 791, 776, 777, 778, 780, 781, - 782, 821, 822, 823, 824, 825, 826, 827, 783, 784, - 785, 786, 1037, 807, 805, 806, 818, 802, 803, 749, - 748, 794, 800, 801, 808, 809, 811, 810, 812, 813, - 1285, 325, -550, -550, 1040, 804, 815, 814, 50, 51, - 52, 516, 53, 54, 866, 341, 867, -550, 55, 56, - -110, 57, 839, 924, -367, -110, -367, -110, 293, -556, - 152, -550, 308, 103, 104, -110, -110, -110, -110, -110, - -110, -110, -110, 105, 106, 107, 108, 109, 947, 275, - 342, 924, 1252, 719,-32766,-32766,-32766, 58, 59, -549, - 372, 110, 60, 838, 61, 247, 248, 62, 63, 64, - 65, 66, 67, 68, 69,-32766, 28, 267, 70, 446, - 517, 720, 376, -342, 1279, 1280, 518, 359, 839, -548, - 391, -546, 1277, 42, 25, 519, 947, 520, 616, 521, - 924, 522, 442, 141, 523, 524, 914, 328, 443, 44, - 45, 447, 379, 378,-32766, 46, 525, 1027, 1026, 1025, - 1028, 370, 340, -549, -549, 444, 1360, 431, 1238, 1361, - 527, 528, 529, 839, 914, 364, 1040, 445, -549,-32766, - -32766,-32766, 531, 532, 845, 1266, 1267, 1268, 1269, 1263, - 1264, 300, -549, -548, -548, -546, -546, 1270, 1265, 292, - -32766, 1247, 1246, 1248, 301, 749, 748, 71, -548, -78, - -546, 323, 324, 328, -153, -153, -153, 393,-32766, 7, - -555, 926, -548, 914, -546, 714, 660, 26,-32766, -153, - 832, -153, 866, -153, 867, -153, 382, 383, 28, 268, - 1040, 154, 1247, 1246, 1248, 377, 425, 155, -596, 926, - 839, 1094, 75, 714, 1277, -596, 963, 964, 328, -547, - 156, 526, 158, 292, 1245, 33, 900, 959, -110, -110, - -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 679, 680, -58, 301, -57, - 1238, 124, 924, 749, 748, 1252, 150, 409, 926, 125, - 1243, 924, 714, -153, 531, 532, 834, 1266, 1267, 1268, - 1269, 1263, 1264, 716, 1154, 1156, -87, -4, 924, 1270, - 1265, 1039, 721, -547, -547, -546, 130, 749, 748, 73, - -32766, 724, 131, -552, 324, 328, 1245, 144, -547, 1247, - 1246, 1248, 159,-32766,-32766,-32766, 1037,-32766, 160,-32766, - -554,-32766, -547, 161,-32766, 380, 381, 924, 162,-32766, - -32766,-32766, 163, 49,-32766,-32766,-32766, -84, 1040, -78, - 1245,-32766, 422, 48, 924, 914, 839,-32766,-32766,-32766, - -32766,-32766, -73,-32766, 914,-32766, -72, 731,-32766, -546, - -546, 283, -71,-32766,-32766,-32766, -70, -552, -552,-32766, - -32766, 914, 385, 386, -546,-32766, 422, -596, -69, -596, - 74, -110, -110, -68,-32766, -50, -110, -67, -546, 651, - 652, -66, -110, 377, -65, 438, -552, 304, 305, -46, - 299,-32766, -18, 148, 963, 964, 274, 302, 303, 526, - 914, 284, 375, 730, 530, 959, -110, -110, -110, 132, - 980, 733, 301, 923, 714, 75, 128, 914,-32766, 926, - 147, 328, -302, 714, 1245, -298, 126, 10, 1063, 281, - 282,-32766,-32766,-32766, 285,-32766, 926,-32766, 286,-32766, - 714, -4,-32766, 334, 288, 275, 289,-32766,-32766,-32766, - 294, 295,-32766,-32766,-32766, 924, 941, 287, 1245,-32766, - 422, 110, 689, 146, 830,-32766,-32766,-32766,-32766,-32766, - 565,-32766, 666,-32766, 1362, 926,-32766, 705, 839, 714, - 1123,-32766,-32766,-32766,-32766,-32766, 667,-32766,-32766, 309, - 1245, 661, 926,-32766, 422, 924, 714,-32766,-32766,-32766, - 682,-32766,-32766,-32766, 707,-32766, 306, 960,-32766, 313, - -32766, 683, 491,-32766,-32766,-32766,-32766, 20, 467,-32766, - -32766, 496, 1245, 578, 571,-32766, 422, 301, 649,-32766, - -32766,-32766, -511,-32766,-32766,-32766, 0,-32766, 914, 0, - -32766, 0, 0, 1037, 0,-32766,-32766,-32766, 1284, 307, - 1286,-32766,-32766, 0, -250, -250, -250,-32766, 422, 943, - 377, 0, 0, 28, 267, 1040,-32766, 0, -501, 0, - 614, 963, 964, 0, 8, 839, 526, 24, 914, 1277, - 374, 900, 959, -110, -110, -110, 1274, 838, 283, 40, - -584, 0, 41, 738, -249, -249, -249, 739, 28, 268, - 377, 850, 287, 858, 905, 1004, 981, 988, 978, 989, - 839, 963, 964, 926, 1277, 1238, 526, 714, -250, 903, - 976, 900, 959, -110, -110, -110, 1097, 1100, 1101, 1098, - 532, 1099, 1266, 1267, 1268, 1269, 1263, 1264, 1105, -583, - 1301, 1319, 1353, 654, 1270, 1265, -582, -556, -555, -554, - 1238, -553, 694, 926, 73, 34, -495, 714, -249, 324, - 328, 1, 29, 30, 39, 532, 43, 1266, 1267, 1268, - 1269, 1263, 1264, 47, 72, 76, 77, 78, 79, 1270, - 1265, 80, 81, 143,-32766, 153, 157, 245, 695, 73, - 1245, 330, 359, 360, 324, 328, 361,-32766,-32766,-32766, - 362,-32766, 363,-32766, 364,-32766, 365, 366,-32766, 696, - 697, 367, 368,-32766,-32766,-32766, 369, 371, 439,-32766, - -32766, 559, 322, -275, -273,-32766, 422, 1247, 1246, 1248, - -272, 13, 14, 283,-32766, 15, 16, 18, 408, 487, - 488, 495, 498, 499, 500, 501, 505, 506, 507, 514, - 576, 700, 1256, 1194, 1275, 1066, 1065, 1046, 1233, 1042, - -277, -102, 12, 17, 27, 298, 407, 607, 611, 640, - 706, 1198, 0, 1251, 1195, 1332, 0, 373, 715, 718, - 722, 723, 725, 726, 727, 728, 732, 717, 0, 735, - 901, 1357, 1359, 861, 860, 869, 953, 996, 868, 1358, - 952, 950, 951, 954, 1226, 934, 944, 932, 986, 987, - 638, 1356, 1313, 1302, 1320, 1329, 0, 1211, 0, 1278, - 0, 328 + 588, 783, 784, 589, 590, -194, 807, 805, 806, 818, + 802, 803, 2, -193, 591, 592, 801, 593, 594, 595, + 596, 26, 597, 598, 382, 383, 461, 462, 463, 804, + 599, 600, 486, 140, 425, 133, 134, 135, 586, 136, + 137, 1064, 755, 756, 757, 138, 38, -110, 839, 82, + 35, 1351, -110, 328, -110,-32766,-32766,-32766, 729, 308, + 238, -272, -110, -110, -110, -110, -110, -110, -110, -110, + 749, 748,-32766,-32766,-32766, 129,-32766, 301,-32766,-32766, + -32766,-32766,-32766,-32766,-32766, 105, 106, 107, 108, 109, + 758, 275, 841,-32766,-32766,-32766,-32766,-32766,-32766, 832, + 145, -328, 835, 110, 265, 139, 406, 762, 763, 764, + 765, -342, 994, 431, 36, 249, 1040, 866, 252, 867, + 819, 766, 767, 768, 769, 770, 771, 772, 773, 774, + 775, 795, 587, 796, 797, 798, 799, 787, 788, 347, + 348, 790, 791, 776, 777, 778, 780, 781, 782, 358, + 822, 823, 824, 825, 826, 588, 783, 784, 589, 590, + -194, 807, 805, 806, 818, 802, 803, 838, -193, 591, + 592, 801, 593, 594, 595, 596, 834, 597, 598, 836, + 83, 84, 85, 716, 804, 599, 600, 312, 149, 779, + 750, 751, 752, 753, 754, -600, 755, 756, 757, 792, + 793, 37, -600, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109,-32766, 275,-32766, + -32766,-32766, 1116, 1117, 1118, 1115, 1114, 1113, 1119, 314, + 110, 995, 325, 1037, 758,-32766,-32766,-32766, -85, 1040, + -32766, 840,-32766,-32766,-32766,-32766,-32766, 1332, 759, 760, + 761, 762, 763, 764, 765, 1040,-32766, 828,-32766,-32766, + -551, 431, 1252, 292, 819, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 775, 795, 817, 796, 797, 798, + 799, 787, 788, 789, 816, 790, 791, 776, 777, 778, + 780, 781, 782, 821, 822, 823, 824, 825, 826, 827, + 783, 784, 785, 786, -85, 807, 805, 806, 818, 802, + 803,-32766, -553, 794, 800, 801, 808, 809, 811, 810, + 560, 812, 813, 947, -551, -551, 830, 947, 804, 815, + 814, 50, 51, 52, 516, 53, 54, 1247, 1246, 1248, + -551, 55, 56, 839, 57, -600, 1094, -600,-32766, -597, + 341, 293, -557, 342, -551, 616, -597, 963, 964,-32766, + -32766,-32766, 965, 359, 127, 1336, -549, 364, 959,-32766, + 372, 293, 1335, 749, 748, 1063, -553, -553,-32766,-32766, + 58, 59, 1286, 1361, -548, 60, 1362, 61, 246, 247, + 62, 63, 64, 65, 66, 67, 68, 69,-32766, 28, + 267, 70, 446, 517, 287, 376, -553, 1280, 1281, 518, + 142, 839, 391, 1274, 328, 1278, 42, 19, 519, -367, + 520, -367, 521, 75, 522, 924, 442, 523, 524, 328, + -549, -549, 44, 45, 447, 379, 378,-32766, 46, 525, + 1027, 1026, 1025, 1028, 370, 340, -549, 443, -548, -548, + 393, 1238, 7, 527, 528, 529, 1245,-32766, -556, 1040, + -549, 329, 103, 104, -548, 531, 532, 444, 1266, 1267, + 1268, 1269, 1271, 1263, 1264, 300, -555, 445, -548, 1040, + 48, 1270, 1265, 292, 151, 1247, 1246, 1248, 301, 845, + 1037, 71, 1243, 152, 839, 323, 324, 328, 924, -153, + -153, -153, 866, 292, 867, 660, 20, 154, 914, -597, + -78, -597, 1040, 1039, -153, -591, -153, -591, -153, -58, + -153, 924, 287, 28, 267, 470, 471, 155, 719, 156, + 377, 158, 1247, 1246, 1248, 839, 283, 749, 748, 1278, + 33, 963, 964, -57, 302, 303, 526, 679, 680, 924, + 124, 900, 959, -110, -110, -110, 32, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 28, 268, 694, 125, 126, 1238, 141, 150, 409, 720, + 328, 914, 839, 130, 926, 131, 1278, 144, 714, -153, + 532, 159, 1266, 1267, 1268, 1269, 1271, 1263, 1264, 1154, + 1156, 1037, 380, 381, 914, 1270, 1265, -550, 695, 160, + -547, 385, 386, 651, 652, 73, 161, 162, 163, -87, + 324, 328, 1238, 1040, -302, -84, -78, 749, 748, 696, + 697, -298, 914, 924, -4, 924, 531, 532, -73, 1266, + 1267, 1268, 1269, 1271, 1263, 1264, 924, 283, 1247, 1246, + 1248, -72, 1270, 1265, 283, -71, -70, 926, -69, 749, + 748, 714, 73, 721,-32766, 281, -68, 324, 328, -67, + 1245, -550, -550, -66, -547, -547, 724,-32766,-32766,-32766, + 926,-32766, -65,-32766, 714,-32766, -46, -550,-32766, 924, + -547, -18, 148,-32766,-32766,-32766,-32766, 274, 284,-32766, + -32766, -550, 1245, -547, -547,-32766, 422, 730, 926,-32766, + -32766,-32766, 714,-32766,-32766,-32766, 914,-32766, 914, 731, + -32766, 733, 923, 147, 282,-32766,-32766,-32766, 285, 914, + 286,-32766,-32766, 334, 288, 275, 289,-32766, 422, 294, + 377, 295, 438, 28, 268, 74,-32766, 299, 941, 110, + 830, 963, 964, 146, 689, 839, 526, 839, 565, 1278, + 707, 530, 959, -110, -110, -110, 705, -547, -547, 1123, + -32766, 661, 914, 49, 667, 666, 682, 1363, 649, 306, + 960, 23, 313, -547, 1285, 10, 309, -50, 1287, 307, + -32766, 943, 980, 467, 926, 1238, 714, -547, 714, -4, + 683, 1275, 496, 571, -511, 926, 40, -501, 8, 714, + 532, -275, 1266, 1267, 1268, 1269, 1271, 1263, 1264, 132, + 838, 27, 301, 850, 735, 1270, 1265, 0, 0, 0, + -32766, 0, 0, 0, 0, 73, 1245, 304, 305, 0, + 324, 328, 0,-32766,-32766,-32766, 0,-32766, 926,-32766, + 0,-32766, 714, 375,-32766, 614, 374, 0, 0,-32766, + -32766,-32766,-32766, 0, 0,-32766,-32766, 128, 1245, 41, + 924,-32766, 422, 738, 739,-32766,-32766,-32766, 858,-32766, + -32766,-32766, 905,-32766, 1004, 981,-32766, 988, 978, 924, + 989,-32766,-32766,-32766,-32766, 903, 976,-32766,-32766, 1097, + 1245, 1100, 1101,-32766, 422, 1098, 1099,-32766,-32766,-32766, + 1105,-32766,-32766,-32766, 1302,-32766, 1320, -273,-32766, 1354, + 654, 34, 491,-32766,-32766,-32766,-32766, -585, -584,-32766, + -32766, -583, 1245, 578, -557,-32766, 422, -556, -555,-32766, + -32766,-32766, -554,-32766,-32766,-32766, -495,-32766, 1, 29, + -32766, 30, 39, 914, 43,-32766,-32766,-32766, 47, 72, + 1252,-32766,-32766, 76, 77, 78, 79,-32766, 422, -250, + -250, -250, 914, 80, 81, 377,-32766, 1252, 143, 153, + 157, 244, 1279, 330, 359, 360, 963, 964, -249, -249, + -249, 526, 361, 362, 377, 363, 900, 959, -110, -110, + -110, 364, 365, 366, 367, 963, 964, -16, 368, 369, + 526, 371, 439, 559, 1211, 900, 959, -110, -110, -110, + -272, 12, 13, 14, 15,-32766, 17, 408, 487, 926, + 488, 1245, 322, 714, -250, 495, 498, 499,-32766,-32766, + -32766, 839,-32766, 500,-32766, 501,-32766, 505, 926,-32766, + 506, 901, 714, -249,-32766,-32766,-32766, 507, 839, 514, + -32766,-32766, 576, 700, 1256, 1194,-32766, 422, 1276, 1066, + 1065, 1046, 1233, 1042, -277,-32766, -110, -110, -102, 11, + 16, -110, 21, 298, 407, 607, 611, -110, 640, 706, + 1198, 1251, 1195, -110, -110, 1333,-32766, 373, -110, 715, + 718, 722, 723, 725, -110, 726, 727, 728, 732, 717, + 0, 1358, 1360,-32766, 861, 860, 328, 869, 301, 953, + 996, 75, 868, 1359, 0, 952, 950, 328, 951, 954, + 1226, 934, 944, 932, 986, 301, 987, 638, 75, 1357, + 1314, 0, 1303, 1321, 328, 1330 ); protected array $actionCheck = array( - 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 70, 9, 10, 11, 9, 10, 11, 1, - 80, 44, 45, 46, 47, 48, 49, 50, 116, 117, - 118, 119, 120, 121, 122, 37, 38, 30, 1, 32, + 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, + 12, 13, 9, 10, 11, 1, 9, 10, 11, 31, + 0, 106, 107, 80, 44, 45, 46, 47, 48, 49, + 50, 116, 14, 30, 160, 37, 38, 30, 164, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 1, 9, 10, 1, 57, 116, 117, 118, 119, - 120, 121, 122, 129, 130, 131, 8, 31, 1, 71, - 72, 73, 74, 75, 76, 77, 134, 135, 80, 82, - 1, 31, 85, 8, 30, 87, 88, 89, 90, 91, + 43, 9, 10, 11, 101, 57, 9, 10, 11, 116, + 117, 118, 119, 120, 121, 122, 8, 1, 1, 71, + 72, 73, 74, 75, 76, 77, 123, 30, 80, 32, + 33, 34, 35, 36, 1, 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, 1, 128, 129, 130, 131, - 132, 133, 82, 80, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 8, 147, 148, 8, 8, 150, 151, - 152, 8, 154, 31, 2, 3, 4, 5, 6, 7, - 162, 9, 10, 11, 12, 13, 8, 117, 118, 160, - 116, 162, 122, 9, 10, 11, 97, 159, 128, 8, - 117, 118, 9, 10, 11, 122, 1, 137, 31, 37, - 38, 128, 138, 8, 30, 159, 32, 33, 34, 35, - 36, 37, 38, 30, 9, 32, 33, 34, 158, 57, - 80, 161, 9, 10, 11, 161, 163, 167, 14, 97, - 167, 106, 107, 71, 72, 73, 74, 75, 76, 77, - 163, 116, 80, 30, 167, 32, 33, 34, 35, 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, 8, - 128, 129, 130, 131, 132, 133, 156, 163, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 162, 9, 10, - 11, 162, 150, 151, 152, 162, 154, 2, 3, 4, - 5, 6, 7, 14, 9, 10, 11, 12, 13, 30, - 163, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 160, 57, 162, 9, 10, - 11, 9, 10, 11, 8, 159, 14, 8, 69, 163, - 1, 101, 57, 9, 10, 11, 162, 8, 116, 30, - 1, 32, 33, 34, 35, 36, 71, 72, 73, 74, - 75, 76, 77, 123, 30, 80, 32, 33, 70, 85, - 138, 1, 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, 116, 128, 129, 130, 131, 132, 133, 37, - 38, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 146, 8, 134, 135, 138, 150, 151, 152, 2, 3, - 4, 5, 6, 7, 106, 8, 108, 149, 12, 13, - 101, 15, 82, 1, 106, 106, 108, 108, 30, 161, - 14, 163, 113, 49, 50, 116, 117, 118, 119, 120, - 121, 122, 123, 51, 52, 53, 54, 55, 122, 57, - 8, 1, 1, 31, 9, 10, 11, 51, 52, 70, - 8, 69, 56, 155, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 30, 70, 71, 72, 73, - 74, 31, 8, 164, 78, 79, 80, 161, 82, 70, - 8, 70, 86, 87, 88, 89, 122, 91, 52, 93, - 1, 95, 8, 163, 98, 99, 84, 167, 8, 103, - 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, - 122, 115, 116, 134, 135, 8, 80, 80, 122, 83, - 124, 125, 126, 82, 84, 161, 138, 8, 149, 116, - 51, 52, 136, 137, 8, 139, 140, 141, 142, 143, - 144, 145, 163, 134, 135, 134, 135, 151, 152, 161, - 137, 155, 156, 157, 158, 37, 38, 161, 149, 16, - 149, 165, 166, 167, 75, 76, 77, 106, 116, 108, - 161, 159, 163, 84, 163, 163, 75, 76, 137, 90, - 80, 92, 106, 94, 108, 96, 106, 107, 70, 71, - 138, 14, 155, 156, 157, 106, 116, 14, 1, 159, - 82, 164, 161, 163, 86, 8, 117, 118, 167, 70, - 14, 122, 14, 161, 80, 14, 127, 128, 129, 130, - 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 75, 76, 16, 158, 16, - 122, 16, 1, 37, 38, 1, 101, 102, 159, 16, - 116, 1, 163, 164, 136, 137, 156, 139, 140, 141, - 142, 143, 144, 163, 59, 60, 31, 0, 1, 151, - 152, 137, 31, 134, 135, 70, 16, 37, 38, 161, - 74, 31, 16, 70, 166, 167, 80, 16, 149, 155, - 156, 157, 16, 87, 88, 89, 116, 91, 16, 93, - 161, 95, 163, 16, 98, 106, 107, 1, 16, 103, - 104, 105, 16, 70, 74, 109, 110, 31, 138, 31, - 80, 115, 116, 70, 1, 84, 82, 87, 88, 89, - 124, 91, 31, 93, 84, 95, 31, 31, 98, 134, - 135, 161, 31, 103, 104, 105, 31, 134, 135, 109, - 110, 84, 106, 107, 149, 115, 116, 160, 31, 162, - 154, 117, 118, 31, 124, 31, 122, 31, 163, 111, - 112, 31, 128, 106, 31, 108, 163, 134, 135, 31, - 113, 137, 31, 31, 117, 118, 31, 134, 135, 122, - 84, 31, 149, 31, 127, 128, 129, 130, 131, 31, - 159, 31, 158, 31, 163, 161, 163, 84, 74, 159, - 31, 167, 35, 163, 80, 35, 163, 150, 1, 35, - 35, 87, 88, 89, 35, 91, 159, 93, 35, 95, - 163, 164, 98, 35, 37, 57, 37, 103, 104, 105, - 37, 37, 74, 109, 110, 1, 38, 30, 80, 115, - 116, 69, 77, 70, 80, 87, 88, 89, 124, 91, - 89, 93, 96, 95, 83, 159, 98, 80, 82, 163, - 82, 103, 104, 105, 74, 85, 100, 109, 110, 114, - 80, 90, 159, 115, 116, 1, 163, 87, 88, 89, - 94, 91, 124, 93, 92, 95, 132, 128, 98, 132, - 137, 100, 102, 103, 104, 105, 74, 97, 97, 109, - 110, 97, 80, 81, 153, 115, 116, 158, 113, 87, - 88, 89, 149, 91, 124, 93, -1, 95, 84, -1, - 98, -1, -1, 116, -1, 103, 104, 105, 146, 133, - 146, 109, 110, -1, 100, 101, 102, 115, 116, 154, - 106, -1, -1, 70, 71, 138, 124, -1, 149, -1, - 153, 117, 118, -1, 149, 82, 122, 149, 84, 86, - 149, 127, 128, 129, 130, 131, 160, 155, 161, 159, - 161, -1, 159, 159, 100, 101, 102, 159, 70, 71, - 106, 160, 30, 159, 159, 159, 159, 159, 159, 159, - 82, 117, 118, 159, 86, 122, 122, 163, 164, 159, - 159, 127, 128, 129, 130, 131, 159, 159, 159, 159, - 137, 159, 139, 140, 141, 142, 143, 144, 159, 161, - 160, 160, 160, 160, 151, 152, 161, 161, 161, 161, - 122, 161, 80, 159, 161, 163, 161, 163, 164, 166, - 167, 161, 161, 161, 161, 137, 161, 139, 140, 141, - 142, 143, 144, 161, 161, 161, 161, 161, 161, 151, - 152, 161, 161, 161, 74, 161, 161, 161, 116, 161, - 80, 161, 161, 161, 166, 167, 161, 87, 88, 89, - 161, 91, 161, 93, 161, 95, 161, 161, 98, 137, - 138, 161, 161, 103, 104, 105, 161, 161, 161, 109, - 110, 161, 163, 162, 162, 115, 116, 155, 156, 157, - 162, 162, 162, 161, 124, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, -1, 162, 162, 162, -1, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, -1, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, -1, 165, -1, 166, - -1, 167 + 122, 123, 124, 125, 126, 8, 128, 129, 130, 131, + 132, 133, 8, 8, 136, 137, 138, 139, 140, 141, + 142, 8, 144, 145, 106, 107, 129, 130, 131, 151, + 152, 153, 164, 155, 116, 2, 3, 4, 5, 6, + 7, 163, 9, 10, 11, 12, 13, 101, 82, 164, + 8, 85, 106, 168, 108, 9, 10, 11, 164, 113, + 97, 163, 116, 117, 118, 119, 120, 121, 122, 123, + 37, 38, 9, 10, 11, 8, 30, 159, 32, 33, + 34, 35, 36, 37, 38, 51, 52, 53, 54, 55, + 57, 57, 1, 30, 116, 32, 33, 34, 35, 80, + 8, 163, 80, 69, 71, 72, 73, 74, 75, 76, + 77, 165, 31, 80, 148, 149, 138, 106, 8, 108, + 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, + 163, 128, 129, 130, 131, 132, 133, 156, 163, 136, + 137, 138, 139, 140, 141, 142, 157, 144, 145, 157, + 9, 10, 11, 164, 151, 152, 153, 8, 155, 2, + 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, + 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 116, 57, 9, + 10, 11, 116, 117, 118, 119, 120, 121, 122, 8, + 69, 160, 8, 116, 57, 9, 10, 11, 31, 138, + 30, 160, 32, 33, 34, 9, 10, 1, 71, 72, + 73, 74, 75, 76, 77, 138, 30, 80, 32, 33, + 70, 80, 1, 162, 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, 97, 128, 129, 130, 131, 132, + 133, 9, 70, 136, 137, 138, 139, 140, 141, 142, + 85, 144, 145, 122, 134, 135, 80, 122, 151, 152, + 153, 2, 3, 4, 5, 6, 7, 156, 157, 158, + 150, 12, 13, 82, 15, 161, 165, 163, 116, 1, + 8, 30, 162, 8, 164, 52, 8, 117, 118, 9, + 10, 11, 122, 162, 14, 1, 70, 162, 128, 137, + 8, 30, 8, 37, 38, 1, 134, 135, 51, 52, + 51, 52, 147, 80, 70, 56, 83, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 137, 70, + 71, 72, 73, 74, 30, 8, 164, 78, 79, 80, + 164, 82, 8, 1, 168, 86, 87, 88, 89, 106, + 91, 108, 93, 162, 95, 1, 8, 98, 99, 168, + 134, 135, 103, 104, 105, 106, 107, 116, 109, 110, + 119, 120, 121, 122, 115, 116, 150, 8, 134, 135, + 106, 122, 108, 124, 125, 126, 80, 116, 162, 138, + 164, 70, 49, 50, 150, 136, 137, 8, 139, 140, + 141, 142, 143, 144, 145, 146, 162, 8, 164, 138, + 70, 152, 153, 162, 14, 156, 157, 158, 159, 8, + 116, 162, 116, 14, 82, 166, 167, 168, 1, 75, + 76, 77, 106, 162, 108, 75, 76, 14, 84, 161, + 16, 163, 138, 137, 90, 161, 92, 163, 94, 16, + 96, 1, 30, 70, 71, 134, 135, 14, 31, 14, + 106, 14, 156, 157, 158, 82, 162, 37, 38, 86, + 14, 117, 118, 16, 134, 135, 122, 75, 76, 1, + 16, 127, 128, 129, 130, 131, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 70, 71, 80, 16, 164, 122, 164, 101, 102, 31, + 168, 84, 82, 16, 160, 16, 86, 16, 164, 165, + 137, 16, 139, 140, 141, 142, 143, 144, 145, 59, + 60, 116, 106, 107, 84, 152, 153, 70, 116, 16, + 70, 106, 107, 111, 112, 162, 16, 16, 16, 31, + 167, 168, 122, 138, 35, 31, 31, 37, 38, 137, + 138, 35, 84, 1, 0, 1, 136, 137, 31, 139, + 140, 141, 142, 143, 144, 145, 1, 162, 156, 157, + 158, 31, 152, 153, 162, 31, 31, 160, 31, 37, + 38, 164, 162, 31, 74, 35, 31, 167, 168, 31, + 80, 134, 135, 31, 134, 135, 31, 87, 88, 89, + 160, 91, 31, 93, 164, 95, 31, 150, 98, 1, + 150, 31, 31, 103, 104, 105, 74, 31, 31, 109, + 110, 164, 80, 70, 164, 115, 116, 31, 160, 87, + 88, 89, 164, 91, 124, 93, 84, 95, 84, 31, + 98, 31, 31, 31, 35, 103, 104, 105, 35, 84, + 35, 109, 110, 35, 37, 57, 37, 115, 116, 37, + 106, 37, 108, 70, 71, 155, 124, 113, 38, 69, + 80, 117, 118, 70, 77, 82, 122, 82, 89, 86, + 92, 127, 128, 129, 130, 131, 80, 134, 135, 82, + 85, 90, 84, 70, 100, 96, 94, 83, 113, 132, + 128, 97, 132, 150, 147, 151, 114, 31, 147, 133, + 137, 155, 160, 97, 160, 122, 164, 164, 164, 165, + 100, 161, 97, 154, 150, 160, 160, 150, 150, 164, + 137, 163, 139, 140, 141, 142, 143, 144, 145, 31, + 156, 150, 159, 161, 165, 152, 153, -1, -1, -1, + 74, -1, -1, -1, -1, 162, 80, 134, 135, -1, + 167, 168, -1, 87, 88, 89, -1, 91, 160, 93, + -1, 95, 164, 150, 98, 154, 150, -1, -1, 103, + 104, 105, 74, -1, -1, 109, 110, 164, 80, 160, + 1, 115, 116, 160, 160, 87, 88, 89, 160, 91, + 124, 93, 160, 95, 160, 160, 98, 160, 160, 1, + 160, 103, 104, 105, 74, 160, 160, 109, 110, 160, + 80, 160, 160, 115, 116, 160, 160, 87, 88, 89, + 160, 91, 124, 93, 161, 95, 161, 163, 98, 161, + 161, 164, 102, 103, 104, 105, 74, 162, 162, 109, + 110, 162, 80, 81, 162, 115, 116, 162, 162, 87, + 88, 89, 162, 91, 124, 93, 162, 95, 162, 162, + 98, 162, 162, 84, 162, 103, 104, 105, 162, 162, + 1, 109, 110, 162, 162, 162, 162, 115, 116, 100, + 101, 102, 84, 162, 162, 106, 124, 1, 162, 162, + 162, 162, 167, 162, 162, 162, 117, 118, 100, 101, + 102, 122, 162, 162, 106, 162, 127, 128, 129, 130, + 131, 162, 162, 162, 162, 117, 118, 31, 162, 162, + 122, 162, 162, 162, 166, 127, 128, 129, 130, 131, + 163, 163, 163, 163, 163, 74, 163, 163, 163, 160, + 163, 80, 164, 164, 165, 163, 163, 163, 87, 88, + 89, 82, 91, 163, 93, 163, 95, 163, 160, 98, + 163, 165, 164, 165, 103, 104, 105, 163, 82, 163, + 109, 110, 163, 163, 163, 163, 115, 116, 163, 163, + 163, 163, 163, 163, 163, 124, 117, 118, 163, 163, + 163, 122, 163, 163, 163, 163, 163, 128, 163, 163, + 163, 163, 163, 117, 118, 163, 137, 164, 122, 164, + 164, 164, 164, 164, 128, 164, 164, 164, 164, 164, + -1, 165, 165, 137, 165, 165, 168, 165, 159, 165, + 165, 162, 165, 165, -1, 165, 165, 168, 165, 165, + 165, 165, 165, 165, 165, 159, 165, 165, 162, 165, + 165, -1, 165, 165, 168, 165 ); protected array $actionBase = array( - 0, -2, 152, 549, 727, 904, 944, 1022, 390, 497, - 560, 922, 500, 710, 710, 766, 710, 472, 701, 847, - -60, 305, 305, 847, 305, 783, 783, 783, 666, 666, - 666, 666, 700, 700, 860, 860, 892, 828, 794, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, - 1060, 1060, 1060, 1060, 18, 36, 79, 661, 1053, 1059, - 1055, 1061, 1051, 1050, 1054, 1056, 1062, 1097, 1098, 839, - 1099, 1100, 1096, 1101, 1057, 933, 1052, 1058, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 195, 342, 43, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 495, 495, - 495, 578, 578, 354, 173, 978, 943, 978, 978, 978, - 978, 978, 978, 978, 978, 203, 665, 339, 164, 164, - 7, 7, 7, 7, 7, 50, 369, 704, 704, -23, - -23, -23, -23, 448, 877, 501, 260, 368, 434, 54, - 540, 640, 640, 316, 316, 512, 512, 316, 316, 316, - 442, 442, 252, 252, 252, 252, 318, 469, 599, 358, - 304, 823, 53, 53, 53, 53, 823, 823, 823, 823, - 854, 1103, 823, 823, 823, 439, 471, 471, 703, 539, - 539, 471, 536, -3, -3, 536, 63, -3, 67, 496, - 473, 829, 115, 9, 473, 673, 713, 657, 185, 882, - 659, 882, 1049, 376, 850, 850, 424, 808, 761, 929, - 1074, 1063, 836, 1094, 861, 1095, -66, -58, 748, 1048, - 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, - 1104, 402, 1049, 130, 1104, 1104, 1104, 402, 402, 402, - 402, 402, 402, 402, 402, 402, 402, 718, 130, 561, - 620, 130, 858, 402, 18, 869, 18, 18, 18, 18, - 18, 18, 18, 18, 18, 18, 811, 157, 18, 36, - 124, 124, 196, 37, 124, 124, 124, 124, 18, 18, - 18, 18, 659, 838, 821, 706, 867, 143, 838, 838, - 838, 122, 135, 204, 139, 837, 840, 521, 834, 834, - 848, 950, 834, 846, 834, 848, 962, 834, 834, 950, - 950, 819, 950, 158, 544, 457, 524, 550, 950, 346, - 834, 834, 834, 834, 827, 950, 567, 834, 271, 171, - 834, 834, 827, 824, 820, 58, 866, 950, 950, 950, - 827, 502, 866, 866, 866, 884, 888, 865, 815, 443, - 349, 586, 138, 868, 815, 815, 834, 532, 865, 815, - 865, 815, 855, 815, 815, 815, 865, 815, 846, 492, - 815, 736, 579, 75, 815, 6, 963, 964, 695, 965, - 953, 966, 1007, 967, 970, 1065, 945, 976, 955, 971, - 1010, 952, 951, 832, 685, 693, 875, 833, 940, 842, - 842, 842, 936, 937, 842, 842, 842, 842, 842, 842, - 842, 842, 685, 876, 881, 831, 982, 720, 726, 1038, - 852, 1076, 1102, 981, 1040, 972, 880, 731, 1025, 985, - 1075, 1009, 989, 991, 1026, 1041, 894, 1042, 1077, 843, - 1078, 1079, 891, 995, 1066, 842, 963, 970, 746, 955, - 971, 952, 951, 803, 800, 792, 796, 787, 775, 765, - 771, 812, 1043, 935, 879, 930, 993, 938, 685, 931, - 1019, 942, 1027, 1028, 1064, 871, 841, 932, 1080, 996, - 1000, 1001, 1067, 1044, 1068, 883, 1020, 1011, 1029, 874, - 1081, 1030, 1031, 1032, 1033, 1069, 1082, 1070, 928, 1071, - 895, 851, 1012, 826, 1083, 299, 849, 853, 864, 1006, - 466, 980, 1072, 1084, 1085, 1034, 1035, 1036, 1086, 1087, - 974, 896, 1023, 856, 1024, 1018, 897, 898, 637, 863, - 1045, 844, 845, 859, 643, 656, 1088, 1089, 1090, 975, - 822, 835, 899, 900, 1046, 857, 1047, 1091, 658, 910, - 742, 1092, 1039, 747, 752, 603, 683, 681, 756, 862, - 1073, 878, 825, 870, 1005, 752, 830, 911, 1093, 917, - 918, 919, 1037, 920, 0, 0, 0, 0, 0, 0, + 0, -2, 153, 554, 764, 999, 1018, 622, 542, 311, + 139, 678, 775, 775, 818, 775, 627, 762, 876, 650, + 650, 650, 816, -57, 307, 307, 816, 307, 720, 720, + 720, 720, 752, 752, 950, 950, 982, 918, 886, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, + 1081, 1081, 1081, 1081, 211, 201, 83, 656, 1050, 1057, + 1052, 1058, 1047, 1046, 1051, 1053, 1059, 1104, 1105, 822, + 1107, 1108, 1102, 1110, 1055, 889, 1049, 1056, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 432, 480, 366, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 630, 630, + 3, 3, 3, 356, 803, 583, 803, 803, 803, 803, + 803, 803, 803, 803, 340, 183, 670, 47, 166, 166, + 7, 7, 7, 7, 7, 1106, 66, 1089, 1089, -20, + -20, -20, -20, 451, 504, 391, -47, 443, 543, 471, + 38, 615, 615, 247, 247, 231, 231, 247, 247, 247, + 154, 154, 98, 98, 98, 98, 320, 426, 444, 131, + 365, 783, 376, 376, 376, 376, 783, 783, 783, 783, + 771, 945, 783, 783, 783, 667, 763, 763, 833, 457, + 457, 763, 526, 86, 86, 526, 370, 86, 5, 433, + 362, 782, -85, 484, 362, 372, 540, 478, 314, 794, + 626, 794, 1045, 331, 815, 815, 335, 785, 737, 880, + 1075, 1062, 804, 1099, 830, 1101, 17, 521, 725, 1041, + 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, + 1078, 466, 1045, 142, 1078, 1078, 1078, 466, 466, 466, + 466, 466, 466, 466, 466, 466, 466, 632, 142, 560, + 602, 142, 828, 466, 211, 787, 211, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 790, -12, 211, 201, + 14, 14, -126, 67, 14, 14, 14, 14, 211, 211, + 211, 211, 626, 808, 779, 635, 831, 125, 808, 808, + 808, 337, 58, 18, 117, 719, 726, 474, 800, 800, + 817, 916, 800, 805, 800, 817, 926, 800, 800, 916, + 916, 793, 916, 187, 548, 472, 527, 569, 916, 299, + 800, 800, 800, 800, 780, 916, 589, 800, 230, 212, + 800, 800, 780, 777, 797, 124, 786, 916, 916, 916, + 780, 492, 786, 786, 786, 843, 844, 795, 796, 354, + 351, 611, 162, 840, 796, 796, 800, 534, 795, 796, + 795, 796, 766, 796, 796, 796, 795, 796, 805, 475, + 796, 705, 599, 133, 796, 20, 927, 931, 718, 932, + 920, 933, 980, 934, 941, 1065, 914, 949, 922, 942, + 981, 919, 917, 821, 664, 687, 788, 784, 910, 810, + 810, 810, 902, 905, 810, 810, 810, 810, 810, 810, + 810, 810, 664, 770, 836, 799, 953, 697, 699, 1029, + 767, 1016, 978, 952, 1031, 946, 776, 701, 993, 960, + 789, 998, 961, 963, 994, 1032, 848, 1035, 1076, 813, + 1077, 1079, 792, 970, 1066, 810, 927, 941, 724, 922, + 942, 919, 917, 781, 772, 765, 768, 757, 755, 750, + 754, 791, 1036, 899, 895, 883, 969, 906, 664, 885, + 988, 887, 995, 997, 1063, 826, 824, 888, 1080, 971, + 972, 976, 1067, 1037, 1068, 839, 989, 778, 1002, 835, + 1082, 1003, 1004, 1010, 1012, 1069, 1084, 1071, 896, 1072, + 852, 811, 884, 809, 1085, 600, 823, 825, 834, 979, + 609, 951, 1073, 1087, 1088, 1014, 1017, 1024, 1090, 1091, + 947, 854, 990, 812, 991, 987, 855, 857, 623, 832, + 1038, 760, 819, 829, 643, 645, 1093, 1094, 1095, 948, + 806, 807, 858, 860, 1039, 827, 1040, 1096, 647, 865, + 723, 1097, 1030, 730, 731, 624, 657, 633, 732, 798, + 1074, 801, 802, 814, 977, 731, 820, 866, 1098, 869, + 871, 872, 1026, 875, 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, 456, 456, 456, 456, 456, 456, - 305, 305, 305, 305, 305, 456, 456, 456, 456, 456, - 456, 456, 305, 305, 0, 0, 305, 0, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 459, 459, 459, 459, 459, 459, + 307, 307, 307, 307, 459, 459, 459, 459, 459, 459, + 459, 307, 459, 459, 459, 307, 307, 0, 0, 307, + 0, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 459, 459, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 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, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, - 289, 289, 289, 289, 594, 594, 289, 289, 594, 594, - 594, 594, 594, 594, 594, 594, 594, 594, 289, 0, - 289, 289, 289, 289, 289, 289, 289, 289, 594, 819, - 594, 594, 442, 442, 442, 442, 594, 594, 594, -88, - -88, 442, 594, 63, 594, 594, 594, 594, 594, 594, - 594, 594, 594, 0, 0, 594, 594, 594, 594, 0, - 0, 0, 130, -3, 594, 846, 846, 846, 846, 594, - 594, 594, 594, -3, -3, 594, 594, 594, 0, 0, - 0, 0, 442, 442, 0, 130, 0, 0, 130, 0, - 0, 846, 846, 594, 63, 819, 359, 594, 0, 0, - 0, 0, 130, 846, 130, 402, 834, -3, -3, 834, - 402, 402, 124, 18, 359, 605, 605, 605, 605, 0, - 0, 659, 819, 819, 819, 819, 819, 819, 819, 819, - 819, 819, 819, 846, 0, 819, 0, 846, 846, 846, + 0, 0, 0, 0, 0, 0, 0, 0, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 506, 506, 291, 291, 291, 291, 506, 506, 506, + 506, 506, 506, 506, 506, 506, 506, 291, 291, 0, + 291, 291, 291, 291, 291, 291, 291, 291, 506, 793, + 506, 506, 154, 154, 154, 154, 506, 506, 506, 236, + 236, 154, 506, 370, 506, 506, 506, 506, 506, 506, + 506, 506, 506, 0, 0, 506, 506, 506, 506, 0, + 0, 0, 142, 86, 506, 805, 805, 805, 805, 506, + 506, 506, 506, 86, 86, 506, 506, 506, 0, 0, + 0, 0, 154, 154, 0, 142, 0, 0, 142, 0, + 0, 805, 805, 506, 370, 793, 494, 506, 0, 0, + 0, 0, 142, 805, 142, 466, 800, 86, 86, 800, + 466, 466, 14, 211, 494, 606, 606, 606, 606, 0, + 0, 626, 793, 793, 793, 793, 793, 793, 793, 793, + 793, 793, 793, 805, 0, 793, 0, 805, 805, 805, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 846, 0, 0, 950, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 962, - 0, 0, 0, 0, 0, 0, 846, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 842, 871, 0, 871, - 0, 842, 842, 842, 0, 0, 0, 0, 863, 857 + 0, 0, 0, 0, 0, 805, 0, 0, 916, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 926, + 0, 0, 0, 0, 0, 0, 805, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 810, 826, 0, 826, + 0, 810, 810, 810, 0, 0, 0, 0, 832, 827 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 100,32767,32767,32767,32767, 602, 602, - 602, 602,32767,32767, 254, 102,32767,32767, 470, 387, - 387, 387,32767,32767, 544, 544, 544, 544, 544, 544, + 32767,32767,32767,32767,32767,32767, 100,32767, 603, 603, + 603, 603,32767,32767, 254, 102,32767,32767, 470, 387, + 387, 387,32767,32767, 545, 545, 545, 545, 545, 545, 32767,32767,32767,32767,32767,32767, 470,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, @@ -785,57 +787,57 @@ class Php8 extends \PhpParser\ParserAbstract 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, 324,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 595,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 596,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767, 474, 453, - 454, 456, 457, 386, 545, 601, 327, 598, 385, 145, + 454, 456, 457, 386, 546, 602, 327, 599, 385, 145, 339, 329, 242, 330, 258, 475, 259, 476, 479, 480, 215, 287, 382, 149, 150, 417, 471, 419, 469, 473, 418, 392, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 408, 409, 410, 390, 391, 472, 450, 449, - 448,32767,32767, 415, 416,32767,32767,32767,32767,32767, - 32767,32767,32767, 102,32767, 420, 389, 423, 421, 422, + 406, 407, 408, 409, 410, 390, 391, 472,32767,32767, + 450, 449, 448, 415,32767,32767,32767,32767,32767,32767, + 32767,32767, 102,32767, 416, 420, 389, 423, 421, 422, 439, 440, 437, 438, 441,32767,32767,32767,32767, 442, 443, 444, 445, 316,32767,32767, 366, 364, 424, 316, 111,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 430, 431,32767,32767,32767,32767, 487, 538, 447,32767, + 430, 431,32767,32767,32767,32767, 487, 539, 447,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 102,32767, 100, 540, 412, 414, 507, 425, + 32767,32767, 102,32767, 100, 541, 412, 414, 507, 425, 426, 393,32767, 514,32767, 102,32767, 516,32767,32767, - 32767,32767,32767,32767,32767, 539,32767, 546, 546,32767, + 32767,32767,32767,32767,32767, 540,32767, 547, 547,32767, 500, 100, 195,32767,32767, 515,32767, 195, 195,32767, - 32767,32767,32767,32767,32767,32767,32767, 609, 500, 110, + 32767,32767,32767,32767,32767,32767,32767, 610, 500, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 32767, 195, 110,32767,32767,32767, 100, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 190,32767, 268, - 270, 102, 563, 195,32767, 519,32767,32767,32767,32767, + 270, 102, 564, 195,32767, 519,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767, 512,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 500, 435, 138,32767, 138, 546, 427, 428, - 429, 502, 546, 546, 546, 312, 289,32767,32767,32767, + 32767,32767, 500, 435, 138,32767, 138, 547, 427, 428, + 429, 502, 547, 547, 547, 312, 289,32767,32767,32767, 32767, 517, 100, 100, 100, 100, 512,32767,32767,32767, 32767, 111, 486, 99, 99, 99, 99, 99, 103, 101, 32767,32767,32767,32767, 223,32767, 99,32767, 101, 101, - 32767,32767, 223, 225, 212, 101, 227,32767, 567, 568, + 32767,32767, 223, 225, 212, 101, 227,32767, 568, 569, 223, 101, 227, 227, 227, 247, 247, 489, 318, 101, 99, 101, 101, 197, 318, 318,32767, 101, 489, 318, 489, 318, 199, 318, 318, 318, 489, 318,32767, 101, 318, 214, 99, 99, 318,32767,32767,32767, 502,32767, 32767,32767,32767,32767,32767,32767, 222,32767,32767,32767, - 32767,32767,32767,32767,32767, 533,32767, 551, 565, 433, - 434, 436, 550, 548, 458, 459, 460, 461, 462, 463, - 464, 466, 597,32767, 506,32767,32767,32767, 338,32767, - 607,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 608,32767, - 546,32767,32767,32767,32767, 432, 9, 74, 495, 42, + 32767,32767,32767,32767,32767, 534,32767, 552, 566, 433, + 434, 436, 551, 549, 458, 459, 460, 461, 462, 463, + 464, 466, 598,32767, 506,32767,32767,32767, 338,32767, + 608,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 609,32767, + 547,32767,32767,32767,32767, 432, 9, 74, 495, 42, 43, 51, 57, 523, 524, 525, 526, 520, 521, 527, - 522,32767,32767, 528, 573,32767,32767, 547, 600,32767, + 522,32767,32767, 529, 574,32767,32767, 548, 601,32767, 32767,32767,32767,32767,32767, 138,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 533,32767, 136, - 32767,32767,32767,32767,32767,32767,32767,32767, 529,32767, - 32767,32767, 546,32767,32767,32767,32767, 314, 311,32767, + 32767,32767,32767,32767,32767,32767,32767, 534,32767, 136, + 32767,32767,32767,32767,32767,32767,32767,32767, 530,32767, + 32767,32767, 547,32767,32767,32767,32767, 314, 311,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 546,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 547,32767,32767,32767,32767, 32767, 291,32767, 308,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 286,32767,32767, 381, 502, 294, 296, 297,32767,32767, @@ -847,67 +849,69 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $goto = array( - 196, 196, 1038, 1069, 701, 353, 433, 665, 856, 710, - 427, 321, 316, 317, 337, 580, 432, 338, 434, 642, - 658, 659, 421, 676, 677, 678, 857, 167, 167, 167, + 196, 196, 1038, 1069, 701, 353, 856, 433, 665, 479, + 1322, 1323, 710, 427, 321, 316, 317, 337, 580, 432, + 338, 434, 642, 897, 855, 897, 897, 167, 167, 167, 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, 189, 190, 191, 192, 218, 216, 219, 539, 540, 423, 541, 544, 545, 546, 547, 548, 549, 550, 551, 1140, 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, - 176, 178, 215, 217, 220, 238, 243, 244, 255, 257, + 176, 178, 215, 217, 220, 240, 243, 254, 255, 257, 258, 259, 260, 261, 262, 263, 264, 269, 270, 271, 272, 278, 290, 291, 319, 320, 428, 429, 430, 585, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, - 200, 239, 188, 189, 190, 191, 192, 218, 1140, 201, - 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, + 200, 241, 188, 189, 190, 191, 192, 218, 1140, 201, + 182, 183, 184, 202, 198, 185, 242, 203, 201, 165, 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, 212, 213, 214, 859, 613, 628, 631, 632, 633, 634, - 655, 656, 657, 712, 460, 979, 280, 280, 280, 280, - 479, 1321, 1322, 627, 627, 831, 604, 1276, 1276, 1276, - 1276, 1276, 1276, 1276, 1276, 1276, 1276, 398, 401, 564, - 605, 609, 890, 552, 552, 552, 552, 864, 608, 913, - 908, 909, 922, 865, 910, 862, 911, 912, 863, 465, - 441, 916, 1041, 1041, 685, 956, 1189, 357, 1033, 1049, - 1050, 1091, 1086, 1087, 1088, 1295, 1295, 357, 357, 1295, - 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, 698, - 357, 357, 833, 917, 357, 918, 1363, 354, 355, 577, - 1244, 698, 1244, 1244, 426, 698, 615, 558, 1038, 1038, - 1244, 357, 357, 5, 1038, 6, 1038, 1038, 1038, 1038, - 1038, 1038, 1038, 1038, 1038, 625, 662, 1038, 1038, 1038, - 1038, 1328, 1328, 1328, 1328, 351, 1244, 356, 356, 356, - 356, 1244, 1244, 1244, 1244, 1111, 1112, 1244, 1244, 1244, - 344, 563, 556, 897, 855, 897, 897, 1336, 554, 1307, - 554, 554, 482, 603, 1104, 930, 713, 1000, 554, 931, - 484, 396, 946, 345, 344, 946, 511, 704, 872, 1102, + 655, 656, 657, 712, 469, 469, 280, 280, 280, 280, + 837, 627, 627, 469, 625, 662, 604, 1277, 1277, 1277, + 1277, 1277, 1277, 1277, 1277, 1277, 1277, 1041, 1041, 685, + 956, 465, 344, 1033, 1049, 1050, 857, 864, 1189, 913, + 908, 909, 922, 865, 910, 862, 911, 912, 863, 460, + 837, 916, 837, 935, 1127, 345, 344, 357, 1111, 1112, + 623, 1091, 1086, 1087, 1088, 979, 1019, 357, 357, 398, + 401, 564, 605, 609, 876, 421, 668, 998, 1044, 1043, + 357, 357, 870, 852, 357, 831, 1364, 354, 355, 917, + 1244, 918, 1244, 1244, 1234, 441, 577, 558, 1038, 1038, + 1244, 357, 357, 426, 1038, 615, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 327, 311, 1038, 1038, 1038, + 1038, 1329, 1329, 1329, 1329, 872, 1244, 356, 356, 356, + 356, 1244, 1244, 1244, 1244, 852, 890, 1244, 1244, 1244, + 884, 563, 556, 871, 603, 1104, 1047, 1048, 554, 1308, + 554, 554, 1324, 1325, 713, 930, 482, 351, 554, 931, + 511, 704, 946, 1102, 484, 946, 581, 618, 1347, 1347, 690, 343, 556, 563, 572, 573, 346, 583, 606, 620, - 621, 575, 852, 884, 458, 664, 871, 22, 1137, 973, - 973, 973, 973, 1044, 1043, 458, 967, 974, 1292, 1292, - 558, 1062, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, - 1292, 1292, 543, 543, 1047, 1048, 543, 543, 543, 543, - 543, 543, 543, 543, 543, 543, 570, 469, 469, 440, - 737, 641, 643, 670, 852, 663, 469, 327, 311, 687, - 691, 1014, 699, 708, 1010, 686, 1017, 1017, 1220, 948, - 1323, 1324, 1221, 1224, 949, 1225, 849, 557, 567, 581, - 618, 557, 339, 567, 877, 1237, 399, 464, 451, 451, - 451, 451, 405, 1318, 837, 1318, 1318, 251, 251, 472, - 584, 473, 474, 1318, 962, 1022, 882, 542, 542, 1354, - 1355, 542, 874, 542, 542, 542, 542, 542, 542, 542, - 542, 971, 412, 709, 249, 249, 249, 249, 246, 252, - 1330, 1330, 1330, 1330, 837, 880, 837, 410, 411, 635, - 637, 639, 674, 619, 675, 1075, 414, 415, 416, 1235, - 688, 740, 886, 417, 1079, 0, 1314, 349, 435, 984, - 885, 873, 1074, 1078, 435, 1122, 503, 0, 504, 1239, - 1045, 1045, 982, 852, 510, 0, 0, 669, 1056, 1052, - 1053, 0, 451, 451, 451, 451, 451, 451, 451, 451, - 451, 451, 451, 935, 1127, 451, 972, 0, 1077, 0, - 623, 0, 1316, 1316, 1077, 0, 1019, 0, 0, 326, - 276, 326, 326, 0, 876, 1261, 668, 998, 1120, 889, - 1346, 1346, 870, 1240, 1241, 1003, 0, 0, 975, 0, - 736, 0, 847, 0, 1234, 0, 0, 1346, 555, 1012, - 1007, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1242, 1304, 1305, 1349, 1349, 0, 0, 0, 0, + 621, 971, 412, 709, 458, 1347, 503, 25, 504, 973, + 973, 973, 973, 1337, 510, 458, 967, 974, 1296, 1296, + 558, 1000, 1350, 1350, 1296, 1296, 1296, 1296, 1296, 1296, + 1296, 1296, 1296, 1296, 1293, 1293, 635, 637, 639, 396, + 1293, 1293, 1293, 1293, 1293, 1293, 1293, 1293, 1293, 1293, + 543, 543, 5, 575, 6, 664, 543, 543, 543, 543, + 543, 543, 543, 543, 543, 543, 1137, 552, 552, 552, + 552, 1062, 608, 670, 852, 686, 339, 557, 567, 698, + 440, 557, 833, 567, 849, 1237, 399, 464, 451, 451, + 451, 451, 877, 1319, 698, 1319, 1319, 962, 698, 472, + 584, 473, 474, 1319, 405, 874, 882, 570, 619, 1355, + 1356, 737, 641, 643, 1235, 1075, 663, 250, 250, 1022, + 687, 691, 1014, 699, 708, 1010, 740, 886, 542, 542, + 1331, 1331, 1331, 1331, 542, 880, 542, 542, 542, 542, + 542, 542, 542, 542, 248, 248, 248, 248, 245, 251, + 410, 411, 435, 1239, 1079, 674, 1315, 675, 435, 414, + 415, 416, 984, 688, 1045, 1045, 417, 1122, 0, 0, + 349, 669, 1056, 1052, 1053, 658, 659, 0, 676, 677, + 678, 0, 451, 451, 451, 451, 451, 451, 451, 451, + 451, 451, 451, 0, 0, 451, 0, 0, 1077, 1261, + 0, 0, 1317, 1317, 1077, 0, 0, 1240, 1241, 326, + 276, 326, 326, 0, 0, 0, 847, 885, 873, 1074, + 1078, 0, 1003, 0, 0, 975, 0, 736, 0, 982, + 555, 1012, 1007, 0, 0, 1242, 1305, 1306, 0, 1220, + 948, 0, 0, 1221, 1224, 949, 1225, 0, 0, 0, + 0, 0, 0, 972, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1120, 889, 1017, 1017, 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, @@ -915,13 +919,13 @@ class Php8 extends \PhpParser\ParserAbstract 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, 254, 254 + 0, 0, 0, 0, 253, 253 ); protected array $gotoCheck = array( - 42, 42, 73, 127, 73, 97, 66, 66, 26, 9, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 86, 86, 43, 86, 86, 86, 27, 42, 42, 42, + 42, 42, 73, 127, 73, 97, 26, 66, 66, 178, + 178, 178, 9, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 25, 25, 25, 25, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -936,50 +940,52 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 15, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 83, 49, 23, 23, 23, 23, - 178, 178, 178, 108, 108, 6, 130, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 59, 59, 59, - 59, 59, 45, 107, 107, 107, 107, 15, 107, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 151, - 83, 15, 89, 89, 89, 89, 151, 14, 89, 89, - 89, 15, 15, 15, 15, 172, 172, 14, 14, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 7, - 14, 14, 7, 65, 14, 65, 14, 97, 97, 174, - 73, 7, 73, 73, 13, 7, 13, 14, 73, 73, - 73, 14, 14, 46, 73, 46, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 56, 56, 73, 73, 73, - 73, 9, 9, 9, 9, 181, 73, 24, 24, 24, - 24, 73, 73, 73, 73, 144, 144, 73, 73, 73, - 170, 76, 76, 25, 25, 25, 25, 183, 19, 14, - 19, 19, 84, 8, 8, 73, 8, 103, 19, 73, - 84, 62, 9, 170, 170, 9, 8, 8, 35, 8, + 81, 81, 81, 81, 149, 149, 23, 23, 23, 23, + 12, 108, 108, 149, 56, 56, 130, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 89, 89, 89, + 89, 151, 170, 89, 89, 89, 27, 15, 151, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 83, + 12, 15, 12, 17, 17, 170, 170, 14, 144, 144, + 17, 15, 15, 15, 15, 49, 17, 14, 14, 59, + 59, 59, 59, 59, 17, 43, 17, 17, 118, 118, + 14, 14, 17, 22, 14, 6, 14, 97, 97, 65, + 73, 65, 73, 73, 17, 83, 174, 14, 73, 73, + 73, 14, 14, 13, 73, 13, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 171, 171, 73, 73, 73, + 73, 9, 9, 9, 9, 35, 73, 24, 24, 24, + 24, 73, 73, 73, 73, 22, 45, 73, 73, 73, + 35, 76, 76, 35, 8, 8, 119, 119, 19, 14, + 19, 19, 180, 180, 8, 73, 84, 181, 19, 73, + 8, 8, 9, 8, 84, 9, 2, 2, 184, 184, 14, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 104, 22, 35, 19, 64, 35, 76, 150, 19, - 19, 19, 19, 118, 118, 19, 19, 19, 173, 173, - 14, 114, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 175, 175, 119, 119, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 48, 149, 149, 113, - 48, 48, 48, 120, 22, 48, 149, 171, 171, 48, - 48, 48, 48, 48, 48, 116, 107, 107, 79, 79, - 180, 180, 79, 79, 79, 79, 18, 9, 9, 2, - 2, 9, 29, 9, 39, 14, 9, 9, 23, 23, - 23, 23, 28, 130, 12, 130, 130, 5, 5, 9, - 9, 9, 9, 130, 92, 110, 9, 158, 158, 9, - 9, 158, 37, 158, 158, 158, 158, 158, 158, 158, - 158, 93, 93, 93, 5, 5, 5, 5, 5, 5, - 130, 130, 130, 130, 12, 9, 12, 82, 82, 85, - 85, 85, 82, 80, 82, 129, 82, 82, 82, 162, - 82, 99, 41, 82, 132, -1, 130, 82, 117, 96, - 16, 16, 16, 16, 117, 147, 155, -1, 155, 20, - 117, 117, 16, 22, 155, -1, -1, 117, 117, 117, - 117, -1, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 17, 17, 23, 16, -1, 130, -1, - 17, -1, 130, 130, 130, -1, 17, -1, -1, 24, - 24, 24, 24, -1, 17, 20, 17, 17, 16, 16, - 184, 184, 17, 20, 20, 50, -1, -1, 50, -1, - 50, -1, 20, -1, 17, -1, -1, 184, 50, 50, - 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, 20, 20, 184, 184, -1, -1, -1, -1, + 76, 93, 93, 93, 19, 184, 155, 76, 155, 19, + 19, 19, 19, 183, 155, 19, 19, 19, 172, 172, + 14, 103, 184, 184, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 173, 173, 85, 85, 85, 62, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 175, 175, 46, 104, 46, 64, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 150, 107, 107, 107, + 107, 114, 107, 120, 22, 116, 29, 9, 9, 7, + 113, 9, 7, 9, 18, 14, 9, 9, 23, 23, + 23, 23, 39, 130, 7, 130, 130, 92, 7, 9, + 9, 9, 9, 130, 28, 37, 9, 48, 80, 9, + 9, 48, 48, 48, 162, 129, 48, 5, 5, 110, + 48, 48, 48, 48, 48, 48, 99, 41, 158, 158, + 130, 130, 130, 130, 158, 9, 158, 158, 158, 158, + 158, 158, 158, 158, 5, 5, 5, 5, 5, 5, + 82, 82, 117, 20, 132, 82, 130, 82, 117, 82, + 82, 82, 96, 82, 117, 117, 82, 147, -1, -1, + 82, 117, 117, 117, 117, 86, 86, -1, 86, 86, + 86, -1, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, -1, -1, 23, -1, -1, 130, 20, + -1, -1, 130, 130, 130, -1, -1, 20, 20, 24, + 24, 24, 24, -1, -1, -1, 20, 16, 16, 16, + 16, -1, 50, -1, -1, 50, -1, 50, -1, 16, + 50, 50, 50, -1, -1, 20, 20, 20, -1, 79, + 79, -1, -1, 79, 79, 79, 79, -1, -1, -1, + -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 16, 16, 107, 107, -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, @@ -987,34 +993,34 @@ class Php8 extends \PhpParser\ParserAbstract -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, 5, 5 + -1, -1, -1, -1, 5, 5 ); protected array $gotoBase = array( - 0, 0, -287, 0, 0, 446, 165, 242, 315, -11, - 0, 0, 145, -75, -73, -187, 56, 75, 114, 53, - 124, 0, 72, 173, 294, 310, 4, 22, 103, 133, - 0, 0, 0, 0, 0, -35, 0, 121, 0, 109, - 0, 60, -1, 3, 0, 179, -467, 0, -319, 157, - 563, 0, 0, 0, 0, 0, 245, 0, 0, 152, - 0, 0, 289, 0, 113, 239, -235, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -36, 0, 0, 8, - 147, -196, -7, -106, -150, 7, -702, 0, 0, -59, - 0, 0, 123, 164, 0, 0, 65, -481, 0, 92, - 0, 0, 0, 292, 308, 0, 0, 175, -58, 0, - 83, 0, 0, 120, 97, 0, 132, 235, 82, 99, - 111, 0, 0, 0, 0, 0, 0, 1, 0, 119, + 0, 0, -380, 0, 0, 466, 232, 422, 306, -11, + 0, 0, -119, -66, -73, -187, 113, -245, 122, 53, + 108, 0, -27, 173, 294, 20, 2, 202, 115, 127, + 0, 0, 0, 0, 0, -78, 0, 114, 0, 117, + 0, 35, -1, 223, 0, 280, -338, 0, -258, 218, + 561, 0, 0, 0, 0, 0, 144, 0, 0, 194, + 0, 0, 347, 0, 166, 246, -231, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -36, 0, 0, 179, + 112, -196, 6, -61, -146, -96, -197, 0, 0, -84, + 0, 0, 116, 44, 0, 0, 68, -481, 0, 67, + 0, 0, 0, 336, 360, 0, 0, 389, -57, 0, + 97, 0, 0, 151, 147, 0, 142, 229, -33, 31, + 131, 0, 0, 0, 0, 0, 0, 1, 0, 89, 178, 0, 61, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 29, 0, 0, 70, 0, 363, - 112, -49, 0, 0, 0, 18, 0, 0, 216, 0, - 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, - 10, 84, -6, 127, 230, 141, 0, 0, -123, 0, - 46, 265, 0, 286, 260, 0, 0 + 0, 0, 0, 0, -48, 0, 0, 72, 0, 140, + 171, -67, 0, 0, 0, -142, 0, 0, 240, 0, + 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, + -98, -38, 130, 146, 237, 162, 0, 0, -294, 0, + -52, 297, 0, 332, 28, 0, 0 ); protected array $gotoDefault = array( -32768, 515, 744, 4, 745, 939, 820, 829, 601, 533, - 711, 350, 629, 424, 1312, 915, 1126, 582, 848, 1253, + 711, 350, 629, 424, 1313, 915, 1126, 582, 848, 1253, 1227, 459, 851, 332, 734, 927, 898, 899, 402, 388, 394, 400, 653, 630, 497, 883, 455, 875, 489, 878, 454, 887, 164, 420, 513, 891, 3, 894, 561, 925, @@ -1024,14 +1030,14 @@ class Php8 extends \PhpParser\ParserAbstract 569, 612, 650, 448, 476, 624, 636, 622, 483, 436, 418, 331, 961, 969, 490, 466, 983, 352, 991, 742, 1139, 644, 492, 999, 645, 1006, 1009, 534, 535, 481, - 1021, 273, 1024, 493, 19, 671, 1035, 1036, 672, 646, + 1021, 273, 1024, 493, 22, 671, 1035, 1036, 672, 646, 1058, 647, 673, 648, 1060, 475, 602, 1068, 456, 1076, - 1300, 457, 1080, 266, 1083, 279, 419, 437, 1089, 1090, - 9, 1096, 702, 703, 11, 277, 512, 1121, 693, 453, + 1301, 457, 1080, 266, 1083, 279, 419, 437, 1089, 1090, + 9, 1096, 702, 703, 18, 277, 512, 1121, 693, 453, 1138, 452, 1208, 1210, 562, 494, 1228, 480, 296, 1231, - 684, 509, 1236, 449, 1303, 450, 536, 477, 318, 537, - 1347, 310, 335, 315, 553, 297, 336, 538, 478, 1309, - 1317, 333, 31, 1337, 1348, 579, 617 + 684, 509, 1236, 449, 1304, 450, 536, 477, 318, 537, + 1348, 310, 335, 315, 553, 297, 336, 538, 478, 1310, + 1318, 333, 31, 1338, 1349, 579, 617 ); protected array $ruleToNonTerminal = array( @@ -1087,17 +1093,17 @@ class Php8 extends \PhpParser\ParserAbstract 155, 160, 161, 161, 162, 163, 164, 164, 164, 164, 19, 19, 73, 73, 73, 73, 151, 151, 151, 151, 166, 166, 152, 152, 154, 154, 154, 157, 157, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 173, 173, - 173, 108, 175, 175, 175, 175, 153, 153, 153, 153, - 153, 153, 153, 153, 59, 59, 169, 169, 169, 169, - 169, 176, 176, 165, 165, 165, 165, 177, 177, 177, - 177, 177, 177, 74, 74, 66, 66, 66, 66, 130, - 130, 130, 130, 180, 179, 168, 168, 168, 168, 168, - 168, 168, 167, 167, 167, 178, 178, 178, 178, 107, - 174, 182, 182, 181, 181, 183, 183, 183, 183, 183, - 183, 183, 183, 171, 171, 171, 171, 170, 185, 184, - 184, 184, 184, 184, 184, 184, 184, 186, 186, 186, - 186 + 172, 172, 172, 172, 172, 172, 172, 172, 172, 173, + 173, 173, 108, 175, 175, 175, 175, 153, 153, 153, + 153, 153, 153, 153, 153, 59, 59, 169, 169, 169, + 169, 169, 176, 176, 165, 165, 165, 165, 177, 177, + 177, 177, 177, 177, 74, 74, 66, 66, 66, 66, + 130, 130, 130, 130, 180, 179, 168, 168, 168, 168, + 168, 168, 168, 167, 167, 167, 178, 178, 178, 178, + 107, 174, 182, 182, 181, 181, 183, 183, 183, 183, + 183, 183, 183, 183, 171, 171, 171, 171, 170, 185, + 184, 184, 184, 184, 184, 184, 184, 184, 186, 186, + 186, 186 ); protected array $ruleToLength = array( @@ -1153,17 +1159,17 @@ class Php8 extends \PhpParser\ParserAbstract 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, - 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, - 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, - 1, 1, 1, 1, 3, 1, 1, 1, 4, 4, - 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, - 4, 2, 2, 1, 3, 1, 4, 4, 3, 3, - 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, - 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, - 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, - 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, - 1 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 5, 3, 3, 4, 1, 1, 3, 1, 1, 1, + 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, + 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, + 1, 4, 2, 2, 1, 3, 1, 4, 4, 3, + 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, + 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, + 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, + 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, + 2, 1 ); protected function initReduceCallbacks(): void { @@ -2500,238 +2506,241 @@ protected function initReduceCallbacks(): void { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 528 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 529 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 530 => static function ($self, $stackPos) { - $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 531 => static function ($self, $stackPos) { + $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; + }, + 532 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 532 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 533 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 534 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 535 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 536 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 537 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => null, 539 => null, 540 => null, - 541 => static function ($self, $stackPos) { + 541 => null, + 542 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 542 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 543 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 544 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = null; }, - 545 => null, 546 => null, - 547 => static function ($self, $stackPos) { + 547 => null, + 548 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 548 => null, 549 => null, 550 => null, 551 => null, 552 => null, 553 => null, - 554 => static function ($self, $stackPos) { + 554 => null, + 555 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 555 => null, 556 => null, 557 => null, - 558 => static function ($self, $stackPos) { + 558 => null, + 559 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 559 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 560 => null, - 561 => static function ($self, $stackPos) { + 561 => null, + 562 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 562 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 563 => static function ($self, $stackPos) { + 564 => static function ($self, $stackPos) { $self->semValue = null; }, - 564 => null, 565 => null, 566 => null, - 567 => static function ($self, $stackPos) { + 567 => null, + 568 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 568 => static function ($self, $stackPos) { + 569 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 569 => null, - 570 => static function ($self, $stackPos) { + 570 => null, + 571 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 571 => static function ($self, $stackPos) { + 572 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 572 => static function ($self, $stackPos) { + 573 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 573 => static function ($self, $stackPos) { + 574 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 574 => static function ($self, $stackPos) { + 575 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 575 => null, - 576 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, + 576 => null, 577 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 578 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 579 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 580 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 581 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 582 => null, - 583 => static function ($self, $stackPos) { + 582 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 583 => null, + 584 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 584 => null, 585 => null, - 586 => static function ($self, $stackPos) { + 586 => null, + 587 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 587 => null, - 588 => static function ($self, $stackPos) { + 588 => null, + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 589 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 590 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 591 => null, - 592 => static function ($self, $stackPos) { + 592 => null, + 593 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 593 => static function ($self, $stackPos) { + 594 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 594 => static function ($self, $stackPos) { + 595 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 595 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 597 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 597 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 598 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 599 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 600 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 601 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 602 => static function ($self, $stackPos) { + 603 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 603 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 604 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 605 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 606 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 607 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 608 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 609 => null, - 610 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 609 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 610 => null, 611 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 612 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 613 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 614 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 615 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 616 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 617 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 618 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 619 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 620 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 620 => null, + 621 => null, ]; } } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 42723313d6..b1bdf8a980 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -1224,6 +1224,7 @@ protected function createTokenMap(): array { $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = static::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; $tokenMap[\T_ENUM] = static::T_ENUM; $tokenMap[\T_READONLY] = static::T_READONLY; + $tokenMap[\T_PROPERTY_C] = static::T_PROPERTY_C; // We have create a map from PHP token IDs to external symbol IDs. // Now map them to the internal symbol ID. diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 6a0349c75c..61dad3a913 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -125,6 +125,10 @@ protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node): string { return '__TRAIT__'; } + protected function pScalar_MagicConst_Property(MagicConst\Property $node): string { + return '__PROPERTY__'; + } + // Scalars private function indentString(string $str): string { diff --git a/lib/PhpParser/compatibility_tokens.php b/lib/PhpParser/compatibility_tokens.php index 273271ddb4..bf01615702 100644 --- a/lib/PhpParser/compatibility_tokens.php +++ b/lib/PhpParser/compatibility_tokens.php @@ -17,6 +17,8 @@ function defineCompatibilityTokens(): void { 'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', 'T_READONLY', + // PHP 8.4 + 'T_PROPERTY_C', ]; // PHP-Parser might be used together with another library that also emulates some or all diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f9ea34d357..aeef7efa9d 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -90,6 +90,11 @@ parameters: count: 1 path: lib/PhpParser/Lexer/Emulative.php + - + message: "#^Constant T_PROPERTY_C not found\\.$#" + count: 1 + path: lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php + - message: "#^Method PhpParser\\\\NodeDumper\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" count: 1 @@ -220,11 +225,21 @@ parameters: count: 1 path: lib/PhpParser/ParserAbstract.php + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_PROPERTY_C\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_READONLY\\.$#" count: 1 path: lib/PhpParser/ParserAbstract.php + - + message: "#^Constant T_PROPERTY_C not found\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + - message: "#^Unary operation \"\\+\" on string results in an error\\.$#" count: 1 diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index 0549290f22..201b823858 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -91,6 +91,9 @@ public function testNoReplaceKeywordsAfterNullsafeObjectOperator(string $keyword public static function provideTestReplaceKeywords() { return [ + // PHP 8.4 + ['__PROPERTY__', \T_PROPERTY_C], + // PHP 8.0 ['match', \T_MATCH], @@ -424,6 +427,10 @@ public static function provideTestTargetVersion() { [\T_ENCAPSED_AND_WHITESPACE, ' baz'], [ord('"'), '"'], ]], + ['8.4', '__PROPERTY__', [[\T_PROPERTY_C, '__PROPERTY__']]], + ['8.3', '__PROPERTY__', [[\T_STRING, '__PROPERTY__']]], + ['8.4', '__property__', [[\T_PROPERTY_C, '__property__']]], + ['8.3', '__property__', [[\T_STRING, '__property__']]], ]; } } diff --git a/test/code/parser/scalar/magicConst.test b/test/code/parser/scalar/magicConst.test index c0980f1369..2766dba642 100644 --- a/test/code/parser/scalar/magicConst.test +++ b/test/code/parser/scalar/magicConst.test @@ -10,6 +10,7 @@ __LINE__; __METHOD__; __NAMESPACE__; __TRAIT__; +__PROPERTY__; ----- array( 0: Stmt_Expression( @@ -44,4 +45,8 @@ array( expr: Scalar_MagicConst_Trait( ) ) + 8: Stmt_Expression( + expr: Scalar_MagicConst_Property( + ) + ) ) diff --git a/test/code/prettyPrinter/expr/literals.test b/test/code/prettyPrinter/expr/literals.test index 3267b32018..b5968a05ee 100644 --- a/test/code/prettyPrinter/expr/literals.test +++ b/test/code/prettyPrinter/expr/literals.test @@ -11,6 +11,7 @@ __CLASS__; __TRAIT__; __METHOD__; __NAMESPACE__; +__PROPERTY__; // not actually literals, but close null; @@ -94,6 +95,7 @@ __CLASS__; __TRAIT__; __METHOD__; __NAMESPACE__; +__PROPERTY__; // not actually literals, but close null; true; From fadccead52e3c82fb0bb21c053fa81e72d94aa9a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 14 Jul 2024 20:51:46 +0200 Subject: [PATCH 355/428] Avoid compatibilty token list in parser Create the mapping using the entries in symbolToName, so we don't need to repeat the compatibility tokens in another place. --- lib/PhpParser/ParserAbstract.php | 48 ++++++-------------- phpstan-baseline.neon | 75 -------------------------------- 2 files changed, 14 insertions(+), 109 deletions(-) diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index b1bdf8a980..c3a1845731 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -1190,43 +1190,23 @@ protected function checkUseUse(UseItem $node, int $namePos): void { protected function createTokenMap(): array { $tokenMap = []; - for ($i = 0; $i < 1000; ++$i) { - if ($i < 256) { - // Single-char tokens use an identity mapping. - $tokenMap[$i] = $i; - } elseif (\T_DOUBLE_COLON === $i) { - // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM - $tokenMap[$i] = static::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] = static::T_ECHO; - } elseif (\T_CLOSE_TAG === $i) { - // T_CLOSE_TAG is equivalent to ';' - $tokenMap[$i] = ord(';'); - } elseif ('UNKNOWN' !== $name = token_name($i)) { - if (defined($name = static::class . '::' . $name)) { - // Other tokens can be mapped directly - $tokenMap[$i] = constant($name); - } + // Single-char tokens use an identity mapping. + for ($i = 0; $i < 256; ++$i) { + $tokenMap[$i] = $i; + } + + foreach ($this->symbolToName as $name) { + if ($name[0] === 'T') { + $tokenMap[\constant($name)] = constant(static::class . '::' . $name); } } - // Assign tokens for which we define compatibility constants, as token_name() does not know them. - $tokenMap[\T_FN] = static::T_FN; - $tokenMap[\T_COALESCE_EQUAL] = static::T_COALESCE_EQUAL; - $tokenMap[\T_NAME_QUALIFIED] = static::T_NAME_QUALIFIED; - $tokenMap[\T_NAME_FULLY_QUALIFIED] = static::T_NAME_FULLY_QUALIFIED; - $tokenMap[\T_NAME_RELATIVE] = static::T_NAME_RELATIVE; - $tokenMap[\T_MATCH] = static::T_MATCH; - $tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = static::T_NULLSAFE_OBJECT_OPERATOR; - $tokenMap[\T_ATTRIBUTE] = static::T_ATTRIBUTE; - $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = static::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = static::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_ENUM] = static::T_ENUM; - $tokenMap[\T_READONLY] = static::T_READONLY; - $tokenMap[\T_PROPERTY_C] = static::T_PROPERTY_C; - - // We have create a map from PHP token IDs to external symbol IDs. + // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO + $tokenMap[\T_OPEN_TAG_WITH_ECHO] = static::T_ECHO; + // T_CLOSE_TAG is equivalent to ';' + $tokenMap[\T_CLOSE_TAG] = ord(';'); + + // We have created a map from PHP token IDs to external symbol IDs. // Now map them to the internal symbol ID. $fullTokenMap = []; foreach ($tokenMap as $phpToken => $extSymbol) { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index aeef7efa9d..f8a9570baa 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -160,86 +160,11 @@ parameters: count: 1 path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ATTRIBUTE\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_COALESCE_EQUAL\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ECHO\\.$#" count: 1 path: lib/PhpParser/ParserAbstract.php - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ENUM\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_FN\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_MATCH\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_FULLY_QUALIFIED\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_QUALIFIED\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_RELATIVE\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NULLSAFE_OBJECT_OPERATOR\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_PAAMAYIM_NEKUDOTAYIM\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_PROPERTY_C\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_READONLY\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - - - message: "#^Constant T_PROPERTY_C not found\\.$#" - count: 1 - path: lib/PhpParser/ParserAbstract.php - - message: "#^Unary operation \"\\+\" on string results in an error\\.$#" count: 1 From beba9c528ff655cf99c6745990d071cbc8bc0423 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 19 Jul 2024 22:21:17 +0200 Subject: [PATCH 356/428] Remove support for alternative array syntax in PHP 8 parser We cannot support both this syntax and property hooks. Drop support for the alternative syntax in the PHP 8 parser. The PHP 7 parser still supports it. --- grammar/php.y | 4 + lib/PhpParser/Parser/Php8.php | 1203 ++++++++--------- .../parser/expr/alternative_array_syntax.test | 335 +++++ .../parser/expr/fetchAndCall/funcCall.test | 17 +- .../expr/fetchAndCall/objectAccess.test | 42 +- .../expr/fetchAndCall/simpleArrayAccess.test | 11 - .../fetchAndCall/staticPropertyFetch.test | 18 +- test/code/parser/expr/new.test | 20 - test/code/parser/expr/newDeref.test | 52 +- test/code/parser/expr/uvs/constDeref.test | 47 +- test/code/parser/expr/uvs/new.test | 21 +- 11 files changed, 954 insertions(+), 816 deletions(-) create mode 100644 test/code/parser/expr/alternative_array_syntax.test diff --git a/grammar/php.y b/grammar/php.y index c9acbfa921..53af51dfad 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1242,7 +1242,9 @@ callable_expr: callable_variable: simple_variable | array_object_dereferenceable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } +#if PHP7 | array_object_dereferenceable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } +#endif | function_call | array_object_dereferenceable T_OBJECT_OPERATOR property_name argument_list { $$ = Expr\MethodCall[$1, $3, $4]; } @@ -1284,7 +1286,9 @@ static_member: new_variable: simple_variable | new_variable '[' optional_expr ']' { $$ = Expr\ArrayDimFetch[$1, $3]; } +#if PHP7 | new_variable '{' expr '}' { $$ = Expr\ArrayDimFetch[$1, $3]; } +#endif | new_variable T_OBJECT_OPERATOR property_name { $$ = Expr\PropertyFetch[$1, $3]; } | new_variable T_NULLSAFE_OBJECT_OPERATOR property_name { $$ = Expr\NullsafePropertyFetch[$1, $3]; } | class_name T_PAAMAYIM_NEKUDOTAYIM static_member_prop_name diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index b69bf2b64b..710c46f8de 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -161,16 +161,16 @@ class Php8 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 396; protected int $tokenToSymbolMapSize = 397; - protected int $actionTableSize = 1276; - protected int $gotoTableSize = 706; + protected int $actionTableSize = 1278; + protected int $gotoTableSize = 631; protected int $invalidSymbol = 169; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 437; - protected int $numNonLeafStates = 743; + protected int $YY2TBLSTATE = 433; + protected int $numNonLeafStates = 739; protected array $symbolToName = array( "EOF", @@ -388,134 +388,134 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $action = array( - 133, 134, 135, 586, 136, 137, 1316, 755, 756, 757, - 138, 38,-32766,-32766,-32766, 945,-32766,-32766,-32766, 485, - 0, 384, 383, 830,-32767,-32767,-32767,-32767, 102, 103, - 104, 425, 239,-32766, 1093, 749, 748,-32766, 741,-32766, + 131, 132, 133, 582, 134, 135, 1311, 751, 752, 753, + 136, 38,-32766,-32766,-32766, 941,-32766,-32766,-32766, 481, + 0, 380, 379, 826,-32767,-32767,-32767,-32767, 102, 103, + 104, 421, 235,-32766, 1089, 745, 744,-32766, 737,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767,-32766,-32766,-32766, 24, 758,-32766,-32766,-32766, 1116, - 1117, 1118, 1115, 1114, 1113, 1119, -328, 1092, 1031, 265, - 139, 406, 762, 763, 764, 765, 1108,-32766, 431,-32766, - -32766,-32766,-32766,-32766, 610, 819, 766, 767, 768, 769, - 770, 771, 772, 773, 774, 775, 795, 587, 796, 797, - 798, 799, 787, 788, 347, 348, 790, 791, 776, 777, - 778, 780, 781, 782, 358, 822, 823, 824, 825, 826, - 588, 783, 784, 589, 590, -194, 807, 805, 806, 818, - 802, 803, 2, -193, 591, 592, 801, 593, 594, 595, - 596, 26, 597, 598, 382, 383, 461, 462, 463, 804, - 599, 600, 486, 140, 425, 133, 134, 135, 586, 136, - 137, 1064, 755, 756, 757, 138, 38, -110, 839, 82, - 35, 1351, -110, 328, -110,-32766,-32766,-32766, 729, 308, - 238, -272, -110, -110, -110, -110, -110, -110, -110, -110, - 749, 748,-32766,-32766,-32766, 129,-32766, 301,-32766,-32766, + -32767,-32766,-32766,-32766, 24, 754,-32766,-32766,-32766, 1112, + 1113, 1114, 1111, 1110, 1109, 1115, -328, 1088, 1027, 261, + 137, 402, 758, 759, 760, 761, 1104,-32766, 427,-32766, + -32766,-32766,-32766,-32766, 606, 815, 762, 763, 764, 765, + 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, + 794, 795, 783, 784, 341, 342, 786, 787, 772, 773, + 774, 776, 777, 778, 354, 818, 819, 820, 821, 822, + 584, 779, 780, 585, 586, -194, 803, 801, 802, 814, + 798, 799, 2, -193, 587, 588, 797, 589, 590, 591, + 592, 26, 593, 594, 378, 379, 457, 458, 459, 800, + 595, 596, 482, 138, 421, 131, 132, 133, 582, 134, + 135, 1060, 751, 752, 753, 136, 38, -110, 835, 82, + 35, 1345, -110, 319, -110,-32766,-32766,-32766, 725, 301, + 234, -272, -110, -110, -110, -110, -110, -110, -110, -110, + 745, 744,-32766,-32766,-32766, 127,-32766, 294,-32766,-32766, -32766,-32766,-32766,-32766,-32766, 105, 106, 107, 108, 109, - 758, 275, 841,-32766,-32766,-32766,-32766,-32766,-32766, 832, - 145, -328, 835, 110, 265, 139, 406, 762, 763, 764, - 765, -342, 994, 431, 36, 249, 1040, 866, 252, 867, - 819, 766, 767, 768, 769, 770, 771, 772, 773, 774, - 775, 795, 587, 796, 797, 798, 799, 787, 788, 347, - 348, 790, 791, 776, 777, 778, 780, 781, 782, 358, - 822, 823, 824, 825, 826, 588, 783, 784, 589, 590, - -194, 807, 805, 806, 818, 802, 803, 838, -193, 591, - 592, 801, 593, 594, 595, 596, 834, 597, 598, 836, - 83, 84, 85, 716, 804, 599, 600, 312, 149, 779, - 750, 751, 752, 753, 754, -600, 755, 756, 757, 792, - 793, 37, -600, 86, 87, 88, 89, 90, 91, 92, + 754, 271, 143,-32766,-32766,-32766,-32766,-32766,-32766, 828, + 248, -328, 831, 110, 261, 137, 402, 758, 759, 760, + 761, -342, 990, 427, 36, 245, 1036, 862,-32766, 863, + 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, + 771, 791, 583, 792, 793, 794, 795, 783, 784, 341, + 342, 786, 787, 772, 773, 774, 776, 777, 778, 354, + 818, 819, 820, 821, 822, 584, 779, 780, 585, 586, + -194, 803, 801, 802, 814, 798, 799, 834, -193, 587, + 588, 797, 589, 590, 591, 592, 830, 593, 594, 832, + 83, 84, 85, 712, 800, 595, 596, 305, 147, 775, + 746, 747, 748, 749, 750, 556, 751, 752, 753, 788, + 789, 37, 943, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109,-32766, 275,-32766, - -32766,-32766, 1116, 1117, 1118, 1115, 1114, 1113, 1119, 314, - 110, 995, 325, 1037, 758,-32766,-32766,-32766, -85, 1040, - -32766, 840,-32766,-32766,-32766,-32766,-32766, 1332, 759, 760, - 761, 762, 763, 764, 765, 1040,-32766, 828,-32766,-32766, - -551, 431, 1252, 292, 819, 766, 767, 768, 769, 770, - 771, 772, 773, 774, 775, 795, 817, 796, 797, 798, - 799, 787, 788, 789, 816, 790, 791, 776, 777, 778, - 780, 781, 782, 821, 822, 823, 824, 825, 826, 827, - 783, 784, 785, 786, -85, 807, 805, 806, 818, 802, - 803,-32766, -553, 794, 800, 801, 808, 809, 811, 810, - 560, 812, 813, 947, -551, -551, 830, 947, 804, 815, - 814, 50, 51, 52, 516, 53, 54, 1247, 1246, 1248, - -551, 55, 56, 839, 57, -600, 1094, -600,-32766, -597, - 341, 293, -557, 342, -551, 616, -597, 963, 964,-32766, - -32766,-32766, 965, 359, 127, 1336, -549, 364, 959,-32766, - 372, 293, 1335, 749, 748, 1063, -553, -553,-32766,-32766, - 58, 59, 1286, 1361, -548, 60, 1362, 61, 246, 247, + 103, 104, 105, 106, 107, 108, 109,-32766, 271,-32766, + -32766,-32766, 1112, 1113, 1114, 1111, 1110, 1109, 1115, 307, + 110, 991, 355, 1033, 754,-32766,-32766,-32766, 316, 1036, + -32766, 289,-32766,-32766,-32766, -85, 837, 1282, 755, 756, + 757, 758, 759, 760, 761, 1036,-32766, 824,-32766,-32766, + -551, 427, 1248, 288, 815, 762, 763, 764, 765, 766, + 767, 768, 769, 770, 771, 791, 813, 792, 793, 794, + 795, 783, 784, 785, 812, 786, 787, 772, 773, 774, + 776, 777, 778, 817, 818, 819, 820, 821, 822, 823, + 779, 780, 781, 782, 1033, 803, 801, 802, 814, 798, + 799, -85, 335, 790, 796, 797, 804, 805, 807, 806, + 336, 808, 809, 943, -551, -551, 1036,-32766, 800, 811, + 810, 50, 51, 52, 512, 53, 54, 1243, 1242, 1244, + -551, 55, 56, 835, 57,-32766, 1090, 920, 920, 1036, + 279, 289, -557, 959, 960, 612, 368, -367, 961, -367, + -32766,-32766,-32766, 360, 955, 126,-32766, 1330, 1326, 389, + 862, 7, 863, 288, 1329, 1059, 372, 715, 716, 387, + 58, 59, 284, 1355, 920, 60, 1356, 61, 242, 243, 62, 63, 64, 65, 66, 67, 68, 69,-32766, 28, - 267, 70, 446, 517, 287, 376, -553, 1280, 1281, 518, - 142, 839, 391, 1274, 328, 1278, 42, 19, 519, -367, - 520, -367, 521, 75, 522, 924, 442, 523, 524, 328, - -549, -549, 44, 45, 447, 379, 378,-32766, 46, 525, - 1027, 1026, 1025, 1028, 370, 340, -549, 443, -548, -548, - 393, 1238, 7, 527, 528, 529, 1245,-32766, -556, 1040, - -549, 329, 103, 104, -548, 531, 532, 444, 1266, 1267, - 1268, 1269, 1271, 1263, 1264, 300, -555, 445, -548, 1040, - 48, 1270, 1265, 292, 151, 1247, 1246, 1248, 301, 845, - 1037, 71, 1243, 152, 839, 323, 324, 328, 924, -153, - -153, -153, 866, 292, 867, 660, 20, 154, 914, -597, - -78, -597, 1040, 1039, -153, -591, -153, -591, -153, -58, - -153, 924, 287, 28, 267, 470, 471, 155, 719, 156, - 377, 158, 1247, 1246, 1248, 839, 283, 749, 748, 1278, - 33, 963, 964, -57, 302, 303, 526, 679, 680, 924, - 124, 900, 959, -110, -110, -110, 32, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 28, 268, 694, 125, 126, 1238, 141, 150, 409, 720, - 328, 914, 839, 130, 926, 131, 1278, 144, 714, -153, - 532, 159, 1266, 1267, 1268, 1269, 1271, 1263, 1264, 1154, - 1156, 1037, 380, 381, 914, 1270, 1265, -550, 695, 160, - -547, 385, 386, 651, 652, 73, 161, 162, 163, -87, - 324, 328, 1238, 1040, -302, -84, -78, 749, 748, 696, - 697, -298, 914, 924, -4, 924, 531, 532, -73, 1266, - 1267, 1268, 1269, 1271, 1263, 1264, 924, 283, 1247, 1246, - 1248, -72, 1270, 1265, 283, -71, -70, 926, -69, 749, - 748, 714, 73, 721,-32766, 281, -68, 324, 328, -67, - 1245, -550, -550, -66, -547, -547, 724,-32766,-32766,-32766, - 926,-32766, -65,-32766, 714,-32766, -46, -550,-32766, 924, - -547, -18, 148,-32766,-32766,-32766,-32766, 274, 284,-32766, - -32766, -550, 1245, -547, -547,-32766, 422, 730, 926,-32766, - -32766,-32766, 714,-32766,-32766,-32766, 914,-32766, 914, 731, - -32766, 733, 923, 147, 282,-32766,-32766,-32766, 285, 914, - 286,-32766,-32766, 334, 288, 275, 289,-32766, 422, 294, - 377, 295, 438, 28, 268, 74,-32766, 299, 941, 110, - 830, 963, 964, 146, 689, 839, 526, 839, 565, 1278, - 707, 530, 959, -110, -110, -110, 705, -547, -547, 1123, - -32766, 661, 914, 49, 667, 666, 682, 1363, 649, 306, - 960, 23, 313, -547, 1285, 10, 309, -50, 1287, 307, - -32766, 943, 980, 467, 926, 1238, 714, -547, 714, -4, - 683, 1275, 496, 571, -511, 926, 40, -501, 8, 714, - 532, -275, 1266, 1267, 1268, 1269, 1271, 1263, 1264, 132, - 838, 27, 301, 850, 735, 1270, 1265, 0, 0, 0, - -32766, 0, 0, 0, 0, 73, 1245, 304, 305, 0, - 324, 328, 0,-32766,-32766,-32766, 0,-32766, 926,-32766, - 0,-32766, 714, 375,-32766, 614, 374, 0, 0,-32766, - -32766,-32766,-32766, 0, 0,-32766,-32766, 128, 1245, 41, - 924,-32766, 422, 738, 739,-32766,-32766,-32766, 858,-32766, - -32766,-32766, 905,-32766, 1004, 981,-32766, 988, 978, 924, - 989,-32766,-32766,-32766,-32766, 903, 976,-32766,-32766, 1097, - 1245, 1100, 1101,-32766, 422, 1098, 1099,-32766,-32766,-32766, - 1105,-32766,-32766,-32766, 1302,-32766, 1320, -273,-32766, 1354, - 654, 34, 491,-32766,-32766,-32766,-32766, -585, -584,-32766, - -32766, -583, 1245, 578, -557,-32766, 422, -556, -555,-32766, - -32766,-32766, -554,-32766,-32766,-32766, -495,-32766, 1, 29, - -32766, 30, 39, 914, 43,-32766,-32766,-32766, 47, 72, - 1252,-32766,-32766, 76, 77, 78, 79,-32766, 422, -250, - -250, -250, 914, 80, 81, 377,-32766, 1252, 143, 153, - 157, 244, 1279, 330, 359, 360, 963, 964, -249, -249, - -249, 526, 361, 362, 377, 363, 900, 959, -110, -110, - -110, 364, 365, 366, 367, 963, 964, -16, 368, 369, - 526, 371, 439, 559, 1211, 900, 959, -110, -110, -110, - -272, 12, 13, 14, 15,-32766, 17, 408, 487, 926, - 488, 1245, 322, 714, -250, 495, 498, 499,-32766,-32766, - -32766, 839,-32766, 500,-32766, 501,-32766, 505, 926,-32766, - 506, 901, 714, -249,-32766,-32766,-32766, 507, 839, 514, - -32766,-32766, 576, 700, 1256, 1194,-32766, 422, 1276, 1066, - 1065, 1046, 1233, 1042, -277,-32766, -110, -110, -102, 11, - 16, -110, 21, 298, 407, 607, 611, -110, 640, 706, - 1198, 1251, 1195, -110, -110, 1333,-32766, 373, -110, 715, - 718, 722, 723, 725, -110, 726, 727, 728, 732, 717, - 0, 1358, 1360,-32766, 861, 860, 328, 869, 301, 953, - 996, 75, 868, 1359, 0, 952, 950, 328, 951, 954, - 1226, 934, 944, 932, 986, 301, 987, 638, 75, 1357, - 1314, 0, 1303, 1321, 328, 1330 + 263, 70, 442, 513, 283, 836, 438, 1276, 1277, 514, + 439, 835, -553, 440, 717, 1274, 42, 19, 515, 920, + 516, 441, 517, 75, 518, 920, 149, 519, 520, 319, + 910, 910, 44, 45, 443, 375, 374,-32766, 46, 521, + 1023, 1022, 1021, 1024, 366, 334, 1270, 826, -589, 720, + -589, 1234, 841, 523, 524, 525, 1241, -549, -78, 1036, + 745, 744,-32766,-32766, -548, 527, 528, 910, 1262, 1263, + 1264, 1265, 1267, 1259, 1260, 293, -553, -553, 745, 744, + 150, 1266, 1261, 288, 152, 1243, 1242, 1244, 294, 153, + 1033, 71, 1239, 28, 264, 314, 315, 319, 154, -153, + -153, -153, 910, 920, 156, 835, 922, 922, 910, 1274, + 710, 710, 1036, 1035, -153, 33, -153, -87, -153, -58, + -153, -549, -549, 103, 104, 656, 20, 835, -548, -548, + 373, 140, 1243, 1242, 1244, 319, 279, -549,-32766,-32766, + -57, 959, 960, 976, -548, 1234, 522, 710, 124, -556, + -84, 896, 955, -110, -110, -110, -555, 675, 676, 527, + 528, 125, 1262, 1263, 1264, 1265, 1267, 1259, 1260, 148, + 405, 745, 744, 128, 283, 1266, 1261, -550, 922, 376, + 377, 129, 710, -547, 922, 73, 910, 49, 710, -153, + 315, 319, 32, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 381, 382,-32766, 139, + -4, 920, 142, 319, 1241, 647, 648, 157, 745, 744, + 158,-32766,-32766,-32766, 690,-32766, -78,-32766, 48,-32766, + 159, 160,-32766, 161, 920, 1150, 1152,-32766,-32766,-32766, + -73, -550, -550,-32766,-32766, 285, -547, -547, -547,-32766, + 418, 297, 298, -72, -71,-32766, 320, -550,-32766, -70, + 691, 1241, 922, -547, 727, -69, 710, 371,-32766,-32766, + -32766, -68,-32766, -67,-32766, -66,-32766, -65, -46,-32766, + -18, 692, 693, 146,-32766,-32766,-32766, 270, 280, 74, + -32766,-32766, 295, 296, 910, 726,-32766, 418, 729, 919, + 1243, 1242, 1244, 145, -302,-32766, 279, 290, -298, 277, + -547, -547, 278, 28, 263, 281, 373, 910, 434, 282, + 466, 467, 325, 292, 937, 835, -547, 959, 960, 1274, + 291, 110, 522, 144, 826, 271, 685, 526, 955, -110, + -110, -110, 835, 1119, 561, 701, 28, 264, 657, 1357, + 23, 663, 645, 956, 300, 302,-32766,-32766, 835, 299, + 1281, 10, 1274, 306, 294, 1234, 1283, 703, -511, -583, + 922, 939, 40, 678, 710, -4, -501, 662, 567, 463, + 528, 0, 1262, 1263, 1264, 1265, 1267, 1259, 1260, 492, + -50, 679, 610, 922, -582, 1266, 1261, 710, 1234, -581, + 8, 834, 1207, 319, 0, 73, 0, 0, 41, 0, + 315, 319, 0, 528, 0, 1262, 1263, 1264, 1265, 1267, + 1259, 1260, 130, 0, 0, 0, 0, 0, 1266, 1261, + 0, 0, 0,-32766, 0, 27, 0, 0, 73, 1241, + 370, 0, 0, 315, 319, -557,-32766,-32766,-32766, 734, + -32766, -275,-32766, 0,-32766, 735, 854,-32766, 901, 1000, + 977, 984,-32766,-32766,-32766,-32766, 974, 985,-32766,-32766, + 899, 1241, 972, 920,-32766, 418, 1093, 1096,-32766,-32766, + -32766, 1097,-32766,-32766,-32766, 1094,-32766, 1095, 1101,-32766, + 1271, 846, 920, 1298,-32766,-32766,-32766,-32766, 1315, 1348, + -32766,-32766, 650, 1241, -556, -555,-32766, 418, -554, -495, + -32766,-32766,-32766, 1,-32766,-32766,-32766, 29,-32766, 30, + 39,-32766, 43, 47, 72, 487,-32766,-32766,-32766,-32766, + 76, 77,-32766,-32766, 78, 1241, 574, 79,-32766, 418, + 80, 81,-32766,-32766,-32766, 141,-32766,-32766,-32766, 151, + -32766, 155, 240,-32766, 321, 355, 910, 356,-32766,-32766, + -32766, 357, 358, 1248,-32766,-32766, 359, 360, 361, 362, + -32766, 418, -250, -250, -250, 910, 363, 364, 373,-32766, + 1248, 365, 367, 435, 555, 1275, 0, -273, -272, 959, + 960, -249, -249, -249, 522, 12, 13, 373, 14, 896, + 955, -110, -110, -110, 15, 17, 404, 483, 959, 960, + -16, 484, 491, 522, 494, 495, 496, 497, 896, 955, + -110, -110, -110, 501, 502, 503, 510, 572,-32766, 696, + 1252, 1190, 922, 1272, 1241, 34, 710, -250, 1062, 1061, + 1042,-32766,-32766,-32766, 835,-32766, 1229,-32766, 1038,-32766, + -277, 922,-32766, -102, 731, 710, -249,-32766,-32766,-32766, + 11, 835, 16,-32766,-32766, 21, 310, 403, 603,-32766, + 418, 607, 636, 702, 1194, 1247, 1191, 1327,-32766, -110, + -110, 313, 369, 711, -110, 714, 718, 719, 721, 722, + -110, 723, 724, 728, 713, 0, -110, -110, 897,-32766, + 1352, -110, 1354, 857, 856, 865, 949, -110, 992, 864, + 1353, 948, 946, 947, 950, 1222,-32766, 930, 940, 0, + 928, 294, 982, 983, 75, 634, 1351, 0, 1309, 1324, + 319, 0, 0, 0, 0, 0, 0, 0, 294, 0, + 0, 75, 0, 0, 0, 0, 0, 319 ); protected array $actionCheck = array( @@ -540,9 +540,9 @@ class Php8 extends \PhpParser\ParserAbstract 97, 163, 116, 117, 118, 119, 120, 121, 122, 123, 37, 38, 9, 10, 11, 8, 30, 159, 32, 33, 34, 35, 36, 37, 38, 51, 52, 53, 54, 55, - 57, 57, 1, 30, 116, 32, 33, 34, 35, 80, + 57, 57, 8, 30, 116, 32, 33, 34, 35, 80, 8, 163, 80, 69, 71, 72, 73, 74, 75, 76, - 77, 165, 31, 80, 148, 149, 138, 106, 8, 108, + 77, 165, 31, 80, 148, 149, 138, 106, 9, 108, 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, @@ -550,184 +550,183 @@ class Php8 extends \PhpParser\ParserAbstract 163, 128, 129, 130, 131, 132, 133, 156, 163, 136, 137, 138, 139, 140, 141, 142, 157, 144, 145, 157, 9, 10, 11, 164, 151, 152, 153, 8, 155, 2, - 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, - 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, + 3, 4, 5, 6, 7, 85, 9, 10, 11, 12, + 13, 30, 122, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 116, 57, 9, 10, 11, 116, 117, 118, 119, 120, 121, 122, 8, - 69, 160, 8, 116, 57, 9, 10, 11, 31, 138, - 30, 160, 32, 33, 34, 9, 10, 1, 71, 72, + 69, 160, 162, 116, 57, 9, 10, 11, 8, 138, + 30, 30, 32, 33, 34, 31, 1, 147, 71, 72, 73, 74, 75, 76, 77, 138, 30, 80, 32, 33, 70, 80, 1, 162, 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, 97, 128, 129, 130, 131, 132, - 133, 9, 70, 136, 137, 138, 139, 140, 141, 142, - 85, 144, 145, 122, 134, 135, 80, 122, 151, 152, + 123, 124, 125, 126, 116, 128, 129, 130, 131, 132, + 133, 97, 8, 136, 137, 138, 139, 140, 141, 142, + 8, 144, 145, 122, 134, 135, 138, 116, 151, 152, 153, 2, 3, 4, 5, 6, 7, 156, 157, 158, - 150, 12, 13, 82, 15, 161, 165, 163, 116, 1, - 8, 30, 162, 8, 164, 52, 8, 117, 118, 9, - 10, 11, 122, 162, 14, 1, 70, 162, 128, 137, - 8, 30, 8, 37, 38, 1, 134, 135, 51, 52, - 51, 52, 147, 80, 70, 56, 83, 58, 59, 60, + 150, 12, 13, 82, 15, 116, 165, 1, 1, 138, + 162, 30, 162, 117, 118, 52, 8, 106, 122, 108, + 9, 10, 11, 162, 128, 14, 137, 1, 1, 106, + 106, 108, 108, 162, 8, 1, 8, 31, 31, 8, + 51, 52, 37, 80, 1, 56, 83, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 137, 70, - 71, 72, 73, 74, 30, 8, 164, 78, 79, 80, - 164, 82, 8, 1, 168, 86, 87, 88, 89, 106, - 91, 108, 93, 162, 95, 1, 8, 98, 99, 168, - 134, 135, 103, 104, 105, 106, 107, 116, 109, 110, - 119, 120, 121, 122, 115, 116, 150, 8, 134, 135, - 106, 122, 108, 124, 125, 126, 80, 116, 162, 138, - 164, 70, 49, 50, 150, 136, 137, 8, 139, 140, - 141, 142, 143, 144, 145, 146, 162, 8, 164, 138, - 70, 152, 153, 162, 14, 156, 157, 158, 159, 8, - 116, 162, 116, 14, 82, 166, 167, 168, 1, 75, - 76, 77, 106, 162, 108, 75, 76, 14, 84, 161, - 16, 163, 138, 137, 90, 161, 92, 163, 94, 16, - 96, 1, 30, 70, 71, 134, 135, 14, 31, 14, - 106, 14, 156, 157, 158, 82, 162, 37, 38, 86, - 14, 117, 118, 16, 134, 135, 122, 75, 76, 1, - 16, 127, 128, 129, 130, 131, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 70, 71, 80, 16, 164, 122, 164, 101, 102, 31, - 168, 84, 82, 16, 160, 16, 86, 16, 164, 165, - 137, 16, 139, 140, 141, 142, 143, 144, 145, 59, - 60, 116, 106, 107, 84, 152, 153, 70, 116, 16, - 70, 106, 107, 111, 112, 162, 16, 16, 16, 31, - 167, 168, 122, 138, 35, 31, 31, 37, 38, 137, - 138, 35, 84, 1, 0, 1, 136, 137, 31, 139, - 140, 141, 142, 143, 144, 145, 1, 162, 156, 157, - 158, 31, 152, 153, 162, 31, 31, 160, 31, 37, - 38, 164, 162, 31, 74, 35, 31, 167, 168, 31, - 80, 134, 135, 31, 134, 135, 31, 87, 88, 89, - 160, 91, 31, 93, 164, 95, 31, 150, 98, 1, - 150, 31, 31, 103, 104, 105, 74, 31, 31, 109, - 110, 164, 80, 70, 164, 115, 116, 31, 160, 87, - 88, 89, 164, 91, 124, 93, 84, 95, 84, 31, - 98, 31, 31, 31, 35, 103, 104, 105, 35, 84, - 35, 109, 110, 35, 37, 57, 37, 115, 116, 37, - 106, 37, 108, 70, 71, 155, 124, 113, 38, 69, - 80, 117, 118, 70, 77, 82, 122, 82, 89, 86, - 92, 127, 128, 129, 130, 131, 80, 134, 135, 82, - 85, 90, 84, 70, 100, 96, 94, 83, 113, 132, - 128, 97, 132, 150, 147, 151, 114, 31, 147, 133, - 137, 155, 160, 97, 160, 122, 164, 164, 164, 165, - 100, 161, 97, 154, 150, 160, 160, 150, 150, 164, - 137, 163, 139, 140, 141, 142, 143, 144, 145, 31, - 156, 150, 159, 161, 165, 152, 153, -1, -1, -1, - 74, -1, -1, -1, -1, 162, 80, 134, 135, -1, - 167, 168, -1, 87, 88, 89, -1, 91, 160, 93, - -1, 95, 164, 150, 98, 154, 150, -1, -1, 103, - 104, 105, 74, -1, -1, 109, 110, 164, 80, 160, - 1, 115, 116, 160, 160, 87, 88, 89, 160, 91, - 124, 93, 160, 95, 160, 160, 98, 160, 160, 1, - 160, 103, 104, 105, 74, 160, 160, 109, 110, 160, - 80, 160, 160, 115, 116, 160, 160, 87, 88, 89, - 160, 91, 124, 93, 161, 95, 161, 163, 98, 161, - 161, 164, 102, 103, 104, 105, 74, 162, 162, 109, - 110, 162, 80, 81, 162, 115, 116, 162, 162, 87, - 88, 89, 162, 91, 124, 93, 162, 95, 162, 162, - 98, 162, 162, 84, 162, 103, 104, 105, 162, 162, - 1, 109, 110, 162, 162, 162, 162, 115, 116, 100, - 101, 102, 84, 162, 162, 106, 124, 1, 162, 162, - 162, 162, 167, 162, 162, 162, 117, 118, 100, 101, - 102, 122, 162, 162, 106, 162, 127, 128, 129, 130, - 131, 162, 162, 162, 162, 117, 118, 31, 162, 162, - 122, 162, 162, 162, 166, 127, 128, 129, 130, 131, - 163, 163, 163, 163, 163, 74, 163, 163, 163, 160, - 163, 80, 164, 164, 165, 163, 163, 163, 87, 88, - 89, 82, 91, 163, 93, 163, 95, 163, 160, 98, - 163, 165, 164, 165, 103, 104, 105, 163, 82, 163, - 109, 110, 163, 163, 163, 163, 115, 116, 163, 163, - 163, 163, 163, 163, 163, 124, 117, 118, 163, 163, - 163, 122, 163, 163, 163, 163, 163, 128, 163, 163, - 163, 163, 163, 117, 118, 163, 137, 164, 122, 164, - 164, 164, 164, 164, 128, 164, 164, 164, 164, 164, - -1, 165, 165, 137, 165, 165, 168, 165, 159, 165, - 165, 162, 165, 165, -1, 165, 165, 168, 165, 165, - 165, 165, 165, 165, 165, 159, 165, 165, 162, 165, - 165, -1, 165, 165, 168, 165 + 71, 72, 73, 74, 30, 160, 8, 78, 79, 80, + 8, 82, 70, 8, 31, 86, 87, 88, 89, 1, + 91, 8, 93, 162, 95, 1, 14, 98, 99, 168, + 84, 84, 103, 104, 105, 106, 107, 116, 109, 110, + 119, 120, 121, 122, 115, 116, 1, 80, 161, 31, + 163, 122, 8, 124, 125, 126, 80, 70, 16, 138, + 37, 38, 9, 10, 70, 136, 137, 84, 139, 140, + 141, 142, 143, 144, 145, 146, 134, 135, 37, 38, + 14, 152, 153, 162, 14, 156, 157, 158, 159, 14, + 116, 162, 116, 70, 71, 166, 167, 168, 14, 75, + 76, 77, 84, 1, 14, 82, 160, 160, 84, 86, + 164, 164, 138, 137, 90, 14, 92, 31, 94, 16, + 96, 134, 135, 49, 50, 75, 76, 82, 134, 135, + 106, 164, 156, 157, 158, 168, 162, 150, 51, 52, + 16, 117, 118, 160, 150, 122, 122, 164, 16, 162, + 31, 127, 128, 129, 130, 131, 162, 75, 76, 136, + 137, 16, 139, 140, 141, 142, 143, 144, 145, 101, + 102, 37, 38, 16, 30, 152, 153, 70, 160, 106, + 107, 16, 164, 70, 160, 162, 84, 70, 164, 165, + 167, 168, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 106, 107, 74, 164, + 0, 1, 16, 168, 80, 111, 112, 16, 37, 38, + 16, 87, 88, 89, 80, 91, 31, 93, 70, 95, + 16, 16, 98, 16, 1, 59, 60, 103, 104, 105, + 31, 134, 135, 109, 110, 37, 70, 134, 135, 115, + 116, 134, 135, 31, 31, 74, 70, 150, 124, 31, + 116, 80, 160, 150, 31, 31, 164, 150, 87, 88, + 89, 31, 91, 31, 93, 31, 95, 31, 31, 98, + 31, 137, 138, 31, 103, 104, 105, 31, 31, 155, + 109, 110, 134, 135, 84, 31, 115, 116, 31, 31, + 156, 157, 158, 31, 35, 124, 162, 37, 35, 35, + 134, 135, 35, 70, 71, 35, 106, 84, 108, 35, + 134, 135, 35, 113, 38, 82, 150, 117, 118, 86, + 37, 69, 122, 70, 80, 57, 77, 127, 128, 129, + 130, 131, 82, 82, 89, 80, 70, 71, 90, 83, + 97, 100, 113, 128, 133, 114, 85, 137, 82, 132, + 147, 151, 86, 132, 159, 122, 147, 92, 150, 162, + 160, 155, 160, 94, 164, 165, 150, 96, 154, 97, + 137, -1, 139, 140, 141, 142, 143, 144, 145, 97, + 31, 100, 154, 160, 162, 152, 153, 164, 122, 162, + 150, 156, 166, 168, -1, 162, -1, -1, 160, -1, + 167, 168, -1, 137, -1, 139, 140, 141, 142, 143, + 144, 145, 31, -1, -1, -1, -1, -1, 152, 153, + -1, -1, -1, 74, -1, 150, -1, -1, 162, 80, + 150, -1, -1, 167, 168, 162, 87, 88, 89, 160, + 91, 163, 93, -1, 95, 160, 160, 98, 160, 160, + 160, 160, 103, 104, 105, 74, 160, 160, 109, 110, + 160, 80, 160, 1, 115, 116, 160, 160, 87, 88, + 89, 160, 91, 124, 93, 160, 95, 160, 160, 98, + 161, 161, 1, 161, 103, 104, 105, 74, 161, 161, + 109, 110, 161, 80, 162, 162, 115, 116, 162, 162, + 87, 88, 89, 162, 91, 124, 93, 162, 95, 162, + 162, 98, 162, 162, 162, 102, 103, 104, 105, 74, + 162, 162, 109, 110, 162, 80, 81, 162, 115, 116, + 162, 162, 87, 88, 89, 162, 91, 124, 93, 162, + 95, 162, 162, 98, 162, 162, 84, 162, 103, 104, + 105, 162, 162, 1, 109, 110, 162, 162, 162, 162, + 115, 116, 100, 101, 102, 84, 162, 162, 106, 124, + 1, 162, 162, 162, 162, 167, -1, 163, 163, 117, + 118, 100, 101, 102, 122, 163, 163, 106, 163, 127, + 128, 129, 130, 131, 163, 163, 163, 163, 117, 118, + 31, 163, 163, 122, 163, 163, 163, 163, 127, 128, + 129, 130, 131, 163, 163, 163, 163, 163, 74, 163, + 163, 163, 160, 163, 80, 164, 164, 165, 163, 163, + 163, 87, 88, 89, 82, 91, 163, 93, 163, 95, + 163, 160, 98, 163, 165, 164, 165, 103, 104, 105, + 163, 82, 163, 109, 110, 163, 163, 163, 163, 115, + 116, 163, 163, 163, 163, 163, 163, 163, 124, 117, + 118, 164, 164, 164, 122, 164, 164, 164, 164, 164, + 128, 164, 164, 164, 164, -1, 117, 118, 165, 137, + 165, 122, 165, 165, 165, 165, 165, 128, 165, 165, + 165, 165, 165, 165, 165, 165, 137, 165, 165, -1, + 165, 159, 165, 165, 162, 165, 165, -1, 165, 165, + 168, -1, -1, -1, -1, -1, -1, -1, 159, -1, + -1, 162, -1, -1, -1, -1, -1, 168 ); protected array $actionBase = array( - 0, -2, 153, 554, 764, 999, 1018, 622, 542, 311, - 139, 678, 775, 775, 818, 775, 627, 762, 876, 650, - 650, 650, 816, -57, 307, 307, 816, 307, 720, 720, - 720, 720, 752, 752, 950, 950, 982, 918, 886, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 211, 201, 83, 656, 1050, 1057, - 1052, 1058, 1047, 1046, 1051, 1053, 1059, 1104, 1105, 822, - 1107, 1108, 1102, 1110, 1055, 889, 1049, 1056, 291, 291, + 0, -2, 153, 554, 740, 1002, 1021, 674, 575, 311, + 139, 477, 548, 548, 763, 548, 476, 513, 857, 632, + 632, 632, 795, -57, 307, 307, 795, 307, 664, 664, + 664, 664, 711, 711, 953, 953, 985, 921, 889, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 375, 201, 83, 631, 1033, 1041, 1035, 1042, + 1029, 1027, 1034, 1038, 1043, 1091, 1093, 802, 1090, 1094, + 1039, 871, 1032, 1040, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 432, 480, 366, 42, 42, + 291, 229, 481, 583, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 630, 630, - 3, 3, 3, 356, 803, 583, 803, 803, 803, 803, - 803, 803, 803, 803, 340, 183, 670, 47, 166, 166, - 7, 7, 7, 7, 7, 1106, 66, 1089, 1089, -20, - -20, -20, -20, 451, 504, 391, -47, 443, 543, 471, - 38, 615, 615, 247, 247, 231, 231, 247, 247, 247, - 154, 154, 98, 98, 98, 98, 320, 426, 444, 131, - 365, 783, 376, 376, 376, 376, 783, 783, 783, 783, - 771, 945, 783, 783, 783, 667, 763, 763, 833, 457, - 457, 763, 526, 86, 86, 526, 370, 86, 5, 433, - 362, 782, -85, 484, 362, 372, 540, 478, 314, 794, - 626, 794, 1045, 331, 815, 815, 335, 785, 737, 880, - 1075, 1062, 804, 1099, 830, 1101, 17, 521, 725, 1041, - 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, - 1078, 466, 1045, 142, 1078, 1078, 1078, 466, 466, 466, - 466, 466, 466, 466, 466, 466, 466, 632, 142, 560, - 602, 142, 828, 466, 211, 787, 211, 211, 211, 211, - 211, 211, 211, 211, 211, 211, 790, -12, 211, 201, - 14, 14, -126, 67, 14, 14, 14, 14, 211, 211, - 211, 211, 626, 808, 779, 635, 831, 125, 808, 808, - 808, 337, 58, 18, 117, 719, 726, 474, 800, 800, - 817, 916, 800, 805, 800, 817, 926, 800, 800, 916, - 916, 793, 916, 187, 548, 472, 527, 569, 916, 299, - 800, 800, 800, 800, 780, 916, 589, 800, 230, 212, - 800, 800, 780, 777, 797, 124, 786, 916, 916, 916, - 780, 492, 786, 786, 786, 843, 844, 795, 796, 354, - 351, 611, 162, 840, 796, 796, 800, 534, 795, 796, - 795, 796, 766, 796, 796, 796, 795, 796, 805, 475, - 796, 705, 599, 133, 796, 20, 927, 931, 718, 932, - 920, 933, 980, 934, 941, 1065, 914, 949, 922, 942, - 981, 919, 917, 821, 664, 687, 788, 784, 910, 810, - 810, 810, 902, 905, 810, 810, 810, 810, 810, 810, - 810, 810, 664, 770, 836, 799, 953, 697, 699, 1029, - 767, 1016, 978, 952, 1031, 946, 776, 701, 993, 960, - 789, 998, 961, 963, 994, 1032, 848, 1035, 1076, 813, - 1077, 1079, 792, 970, 1066, 810, 927, 941, 724, 922, - 942, 919, 917, 781, 772, 765, 768, 757, 755, 750, - 754, 791, 1036, 899, 895, 883, 969, 906, 664, 885, - 988, 887, 995, 997, 1063, 826, 824, 888, 1080, 971, - 972, 976, 1067, 1037, 1068, 839, 989, 778, 1002, 835, - 1082, 1003, 1004, 1010, 1012, 1069, 1084, 1071, 896, 1072, - 852, 811, 884, 809, 1085, 600, 823, 825, 834, 979, - 609, 951, 1073, 1087, 1088, 1014, 1017, 1024, 1090, 1091, - 947, 854, 990, 812, 991, 987, 855, 857, 623, 832, - 1038, 760, 819, 829, 643, 645, 1093, 1094, 1095, 948, - 806, 807, 858, 860, 1039, 827, 1040, 1096, 647, 865, - 723, 1097, 1030, 730, 731, 624, 657, 633, 732, 798, - 1074, 801, 802, 814, 977, 731, 820, 866, 1098, 869, - 871, 872, 1026, 875, 0, 0, 0, 0, 0, 0, + 42, 42, 42, 42, 553, 553, 3, 3, 3, 356, + 806, 773, 806, 806, 806, 806, 806, 806, 806, 806, + 340, 183, 47, 706, 166, 166, 7, 7, 7, 7, + 7, 1109, 66, 1092, 1092, -20, -20, -20, -20, 451, + 504, 391, -47, 381, 604, 341, 38, 318, 318, 247, + 247, 231, 231, 247, 247, 247, 154, 154, 98, 98, + 98, 98, 131, 230, 750, 497, 497, 497, 497, 750, + 750, 750, 750, 749, 948, 750, 750, 750, 320, 517, + 524, 617, 617, 394, 86, 86, 394, 366, 86, 5, + 433, 359, 755, -85, 417, 359, 637, 643, 643, 647, + 643, 643, 643, 775, 603, 775, 1020, 200, 801, 801, + 331, 777, 739, 858, 1060, 1044, 781, 1087, 821, 1088, + 17, 472, 688, 716, 725, 1017, 1017, 1017, 1017, 1017, + 1017, 1017, 1017, 1017, 1017, 1017, 765, 571, 1020, 142, + 765, 765, 765, 571, 571, 571, 571, 571, 571, 571, + 571, 571, 571, 634, 142, 580, 612, 142, 817, 571, + 375, 756, 375, 375, 375, 375, 375, 375, 375, 375, + 375, 375, 779, -12, 375, 201, 14, 14, -126, 67, + 14, 14, 14, 14, 375, 375, 375, 375, 603, 808, + 754, 630, 768, 125, 808, 808, 808, 344, 58, 18, + 117, 799, 803, 393, 784, 784, 791, 881, 784, 790, + 784, 791, 891, 784, 784, 881, 881, 735, 881, 187, + 528, 434, 498, 532, 881, 299, 784, 784, 784, 784, + 761, 881, 535, 784, 212, 204, 784, 784, 761, 757, + 787, 124, 751, 881, 881, 881, 761, 478, 751, 751, + 751, 819, 825, 769, 786, 360, 351, 574, 162, 816, + 786, 786, 784, 501, 769, 786, 769, 786, 746, 786, + 786, 786, 769, 786, 790, 442, 786, 731, 543, 133, + 786, 20, 892, 898, 616, 899, 888, 902, 951, 905, + 908, 1049, 877, 920, 890, 909, 952, 887, 885, 798, + 662, 675, 780, 748, 876, 792, 792, 792, 813, 872, + 792, 792, 792, 792, 792, 792, 792, 792, 662, 859, + 820, 785, 925, 687, 695, 994, 743, 1063, 766, 923, + 997, 913, 742, 726, 972, 929, 1019, 1047, 930, 934, + 973, 998, 826, 1000, 1065, 793, 1067, 1068, 860, 936, + 1051, 792, 892, 908, 649, 890, 909, 887, 885, 776, + 774, 770, 772, 764, 758, 752, 753, 782, 1005, 767, + 737, 862, 935, 873, 662, 867, 962, 1001, 974, 978, + 1048, 812, 796, 868, 1069, 937, 944, 945, 1052, 1006, + 1053, 778, 963, 818, 979, 822, 1070, 981, 982, 983, + 984, 1054, 1071, 1055, 762, 1057, 828, 788, 954, 811, + 1073, 542, 810, 814, 823, 950, 596, 922, 1058, 1074, + 1075, 990, 991, 992, 1076, 1077, 917, 829, 965, 809, + 971, 955, 830, 831, 600, 800, 1007, 804, 807, 738, + 605, 614, 1078, 1079, 1080, 919, 794, 789, 836, 837, + 1013, 475, 1015, 1082, 620, 840, 734, 1083, 996, 744, + 745, 572, 654, 633, 747, 805, 1059, 815, 771, 783, + 949, 745, 797, 842, 1085, 846, 847, 851, 993, 855, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 459, 459, 459, 459, 459, 459, - 307, 307, 307, 307, 459, 459, 459, 459, 459, 459, - 459, 307, 459, 459, 459, 307, 307, 0, 0, 307, - 0, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 459, 459, 459, 459, 459, 459, 307, 307, 307, 307, + 459, 459, 459, 459, 459, 459, 459, 307, 459, 459, + 459, 307, 307, 0, 0, 307, 0, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, @@ -740,41 +739,42 @@ class Php8 extends \PhpParser\ParserAbstract 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 291, 291, 291, 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, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 506, 506, 291, 291, 291, 291, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 291, 291, 0, - 291, 291, 291, 291, 291, 291, 291, 291, 506, 793, - 506, 506, 154, 154, 154, 154, 506, 506, 506, 236, - 236, 154, 506, 370, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 0, 0, 506, 506, 506, 506, 0, - 0, 0, 142, 86, 506, 805, 805, 805, 805, 506, - 506, 506, 506, 86, 86, 506, 506, 506, 0, 0, - 0, 0, 154, 154, 0, 142, 0, 0, 142, 0, - 0, 805, 805, 506, 370, 793, 494, 506, 0, 0, - 0, 0, 142, 805, 142, 466, 800, 86, 86, 800, - 466, 466, 14, 211, 494, 606, 606, 606, 606, 0, - 0, 626, 793, 793, 793, 793, 793, 793, 793, 793, - 793, 793, 793, 805, 0, 793, 0, 805, 805, 805, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 805, 0, 0, 916, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 926, - 0, 0, 0, 0, 0, 0, 805, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 810, 826, 0, 826, - 0, 810, 810, 810, 0, 0, 0, 0, 832, 827 + 291, 291, 291, 506, 506, 291, 291, 291, 291, 506, + 506, 506, 506, 506, 506, 506, 506, 506, 506, 291, + 291, 291, 0, 291, 291, 291, 291, 291, 291, 291, + 506, 735, 506, 506, 154, 154, 154, 154, 506, 506, + 506, 236, 236, 154, 506, 366, 506, 506, 506, 506, + 506, 506, 506, 506, 506, 0, 0, 506, 506, 506, + 506, 142, 86, 506, 790, 790, 790, 790, 506, 506, + 506, 506, 86, 86, 506, 506, 506, 0, 0, 0, + 154, 154, 142, 0, 0, 142, 0, 0, 790, 790, + 506, 366, 735, 496, 506, 0, 0, 0, 0, 0, + 0, 0, 142, 790, 142, 571, 784, 86, 86, 784, + 571, 571, 14, 375, 496, 598, 598, 598, 598, 0, + 0, 0, 0, 603, 735, 735, 735, 735, 735, 735, + 735, 735, 735, 735, 735, 790, 0, 735, 0, 790, + 790, 790, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 790, 0, 0, + 881, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 891, 0, 0, 0, 0, 0, 0, 790, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 792, 812, + 0, 812, 0, 792, 792, 792, 0, 0, 0, 0, + 800, 475 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 603, 603, - 603, 603,32767,32767, 254, 102,32767,32767, 470, 387, + 32767,32767,32767,32767,32767,32767, 100,32767, 601, 601, + 601, 601,32767,32767, 254, 102,32767,32767, 470, 387, 387, 387,32767,32767, 545, 545, 545, 545, 545, 545, 32767,32767,32767,32767,32767,32767, 470,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, @@ -783,149 +783,141 @@ class Php8 extends \PhpParser\ParserAbstract 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, 100, - 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, - 324,32767,32767,32767,32767, 102,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 100,32767,32767, + 32767, 36, 7, 8, 10, 11, 49, 17, 324,32767, + 32767,32767,32767, 102,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 594,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 596,32767,32767, + 32767,32767,32767,32767, 474, 453, 454, 456, 457, 386, + 546, 600, 327, 597, 385, 145, 339, 329, 242, 330, + 258, 475, 259, 476, 479, 480, 215, 287, 382, 149, + 150, 417, 471, 419, 469, 473, 418, 392, 398, 399, + 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, + 410, 390, 391, 472,32767,32767, 450, 449, 448, 415, + 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, + 416, 420, 423, 389, 421, 422, 439, 440, 437, 438, + 441,32767,32767,32767,32767, 442, 443, 444, 445, 316, + 32767,32767, 366, 364, 424, 316, 111,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 430, 431,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 474, 453, - 454, 456, 457, 386, 546, 602, 327, 599, 385, 145, - 339, 329, 242, 330, 258, 475, 259, 476, 479, 480, - 215, 287, 382, 149, 150, 417, 471, 419, 469, 473, - 418, 392, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 408, 409, 410, 390, 391, 472,32767,32767, - 450, 449, 448, 415,32767,32767,32767,32767,32767,32767, - 32767,32767, 102,32767, 416, 420, 389, 423, 421, 422, - 439, 440, 437, 438, 441,32767,32767,32767,32767, 442, - 443, 444, 445, 316,32767,32767, 366, 364, 424, 316, - 111,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 430, 431,32767,32767,32767,32767, 487, 539, 447,32767, + 32767,32767,32767,32767,32767, 102,32767, 100, 487, 539, + 447, 425, 426,32767, 514,32767, 102,32767, 516,32767, + 32767,32767,32767,32767,32767,32767, 541, 412, 414, 507, + 595, 393, 598,32767, 500, 100, 195,32767,32767, 515, + 32767, 195, 195,32767,32767,32767,32767,32767,32767,32767, + 32767, 540,32767, 608, 500, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110,32767, 195, 110,32767, + 32767,32767, 100, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 195, 190,32767, 268, 270, 102, 563, 195, + 32767, 519,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 512,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 500, 435, + 138,32767, 138, 547, 427, 428, 429, 502, 547, 547, + 547, 312, 289,32767,32767,32767,32767, 517, 100, 100, + 100, 100, 512,32767,32767,32767,32767, 111, 486, 99, + 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, + 223,32767, 99,32767, 101, 101,32767,32767, 223, 225, + 212, 101, 227,32767, 567, 568, 223, 101, 227, 227, + 227, 247, 247, 489, 318, 101, 99, 101, 101, 197, + 318, 318,32767, 101, 489, 318, 489, 318, 199, 318, + 318, 318, 489, 318,32767, 101, 318, 214, 99, 99, + 318,32767,32767,32767, 502,32767,32767,32767,32767,32767, + 32767,32767, 222,32767,32767,32767,32767,32767,32767,32767, + 32767, 534,32767, 552, 565, 433, 434, 436, 551, 549, + 458, 459, 460, 461, 462, 463, 464, 466, 596,32767, + 506,32767,32767,32767, 338,32767, 606,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 102,32767, 100, 541, 412, 414, 507, 425, - 426, 393,32767, 514,32767, 102,32767, 516,32767,32767, - 32767,32767,32767,32767,32767, 540,32767, 547, 547,32767, - 500, 100, 195,32767,32767, 515,32767, 195, 195,32767, - 32767,32767,32767,32767,32767,32767,32767, 610, 500, 110, - 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 32767, 195, 110,32767,32767,32767, 100, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 190,32767, 268, - 270, 102, 564, 195,32767, 519,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 512,32767,32767,32767, + 32767,32767,32767,32767, 607,32767, 547,32767,32767,32767, + 32767, 432, 9, 74, 495, 42, 43, 51, 57, 523, + 524, 525, 526, 520, 521, 527, 522,32767,32767, 529, + 573,32767,32767, 548, 599,32767,32767,32767,32767,32767, + 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 534,32767, 136,32767,32767,32767,32767, + 32767,32767,32767,32767, 530,32767,32767,32767, 547,32767, + 32767,32767,32767, 314, 311,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 500, 435, 138,32767, 138, 547, 427, 428, - 429, 502, 547, 547, 547, 312, 289,32767,32767,32767, - 32767, 517, 100, 100, 100, 100, 512,32767,32767,32767, - 32767, 111, 486, 99, 99, 99, 99, 99, 103, 101, - 32767,32767,32767,32767, 223,32767, 99,32767, 101, 101, - 32767,32767, 223, 225, 212, 101, 227,32767, 568, 569, - 223, 101, 227, 227, 227, 247, 247, 489, 318, 101, - 99, 101, 101, 197, 318, 318,32767, 101, 489, 318, - 489, 318, 199, 318, 318, 318, 489, 318,32767, 101, - 318, 214, 99, 99, 318,32767,32767,32767, 502,32767, - 32767,32767,32767,32767,32767,32767, 222,32767,32767,32767, - 32767,32767,32767,32767,32767, 534,32767, 552, 566, 433, - 434, 436, 551, 549, 458, 459, 460, 461, 462, 463, - 464, 466, 598,32767, 506,32767,32767,32767, 338,32767, - 608,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 609,32767, - 547,32767,32767,32767,32767, 432, 9, 74, 495, 42, - 43, 51, 57, 523, 524, 525, 526, 520, 521, 527, - 522,32767,32767, 529, 574,32767,32767, 548, 601,32767, - 32767,32767,32767,32767,32767, 138,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 534,32767, 136, - 32767,32767,32767,32767,32767,32767,32767,32767, 530,32767, - 32767,32767, 547,32767,32767,32767,32767, 314, 311,32767, + 32767, 547,32767,32767,32767,32767,32767, 291,32767, 308, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 547,32767,32767,32767,32767, - 32767, 291,32767, 308,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 286,32767,32767, 381, + 502, 294, 296, 297,32767,32767,32767,32767, 360,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 286,32767,32767, 381, 502, 294, 296, 297,32767,32767, - 32767,32767, 360,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 152, 152, 3, 3, 341, 152, - 152, 152, 341, 341, 152, 341, 341, 341, 152, 152, - 152, 152, 152, 152, 280, 185, 262, 265, 247, 247, - 152, 352, 152 + 152, 152, 3, 3, 341, 152, 152, 152, 341, 341, + 152, 341, 341, 341, 152, 152, 152, 152, 152, 152, + 280, 185, 262, 265, 247, 247, 152, 352, 152 ); protected array $goto = array( - 196, 196, 1038, 1069, 701, 353, 856, 433, 665, 479, - 1322, 1323, 710, 427, 321, 316, 317, 337, 580, 432, - 338, 434, 642, 897, 855, 897, 897, 167, 167, 167, - 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, - 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, - 189, 190, 191, 192, 218, 216, 219, 539, 540, 423, - 541, 544, 545, 546, 547, 548, 549, 550, 551, 1140, - 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, - 176, 178, 215, 217, 220, 240, 243, 254, 255, 257, - 258, 259, 260, 261, 262, 263, 264, 269, 270, 271, - 272, 278, 290, 291, 319, 320, 428, 429, 430, 585, - 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, - 200, 241, 188, 189, 190, 191, 192, 218, 1140, 201, - 182, 183, 184, 202, 198, 185, 242, 203, 201, 165, - 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, - 212, 213, 214, 859, 613, 628, 631, 632, 633, 634, - 655, 656, 657, 712, 469, 469, 280, 280, 280, 280, - 837, 627, 627, 469, 625, 662, 604, 1277, 1277, 1277, - 1277, 1277, 1277, 1277, 1277, 1277, 1277, 1041, 1041, 685, - 956, 465, 344, 1033, 1049, 1050, 857, 864, 1189, 913, - 908, 909, 922, 865, 910, 862, 911, 912, 863, 460, - 837, 916, 837, 935, 1127, 345, 344, 357, 1111, 1112, - 623, 1091, 1086, 1087, 1088, 979, 1019, 357, 357, 398, - 401, 564, 605, 609, 876, 421, 668, 998, 1044, 1043, - 357, 357, 870, 852, 357, 831, 1364, 354, 355, 917, - 1244, 918, 1244, 1244, 1234, 441, 577, 558, 1038, 1038, - 1244, 357, 357, 426, 1038, 615, 1038, 1038, 1038, 1038, - 1038, 1038, 1038, 1038, 1038, 327, 311, 1038, 1038, 1038, - 1038, 1329, 1329, 1329, 1329, 872, 1244, 356, 356, 356, - 356, 1244, 1244, 1244, 1244, 852, 890, 1244, 1244, 1244, - 884, 563, 556, 871, 603, 1104, 1047, 1048, 554, 1308, - 554, 554, 1324, 1325, 713, 930, 482, 351, 554, 931, - 511, 704, 946, 1102, 484, 946, 581, 618, 1347, 1347, - 690, 343, 556, 563, 572, 573, 346, 583, 606, 620, - 621, 971, 412, 709, 458, 1347, 503, 25, 504, 973, - 973, 973, 973, 1337, 510, 458, 967, 974, 1296, 1296, - 558, 1000, 1350, 1350, 1296, 1296, 1296, 1296, 1296, 1296, - 1296, 1296, 1296, 1296, 1293, 1293, 635, 637, 639, 396, - 1293, 1293, 1293, 1293, 1293, 1293, 1293, 1293, 1293, 1293, - 543, 543, 5, 575, 6, 664, 543, 543, 543, 543, - 543, 543, 543, 543, 543, 543, 1137, 552, 552, 552, - 552, 1062, 608, 670, 852, 686, 339, 557, 567, 698, - 440, 557, 833, 567, 849, 1237, 399, 464, 451, 451, - 451, 451, 877, 1319, 698, 1319, 1319, 962, 698, 472, - 584, 473, 474, 1319, 405, 874, 882, 570, 619, 1355, - 1356, 737, 641, 643, 1235, 1075, 663, 250, 250, 1022, - 687, 691, 1014, 699, 708, 1010, 740, 886, 542, 542, - 1331, 1331, 1331, 1331, 542, 880, 542, 542, 542, 542, - 542, 542, 542, 542, 248, 248, 248, 248, 245, 251, - 410, 411, 435, 1239, 1079, 674, 1315, 675, 435, 414, - 415, 416, 984, 688, 1045, 1045, 417, 1122, 0, 0, - 349, 669, 1056, 1052, 1053, 658, 659, 0, 676, 677, - 678, 0, 451, 451, 451, 451, 451, 451, 451, 451, - 451, 451, 451, 0, 0, 451, 0, 0, 1077, 1261, - 0, 0, 1317, 1317, 1077, 0, 0, 1240, 1241, 326, - 276, 326, 326, 0, 0, 0, 847, 885, 873, 1074, - 1078, 0, 1003, 0, 0, 975, 0, 736, 0, 982, - 555, 1012, 1007, 0, 0, 1242, 1305, 1306, 0, 1220, - 948, 0, 0, 1221, 1224, 949, 1225, 0, 0, 0, - 0, 0, 0, 972, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1120, 889, 1017, 1017, 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, + 192, 192, 1034, 1065, 697, 429, 661, 893, 851, 893, + 893, 423, 331, 327, 328, 330, 576, 428, 332, 430, + 638, 654, 655, 852, 672, 673, 674, 165, 165, 165, + 165, 217, 193, 189, 189, 175, 177, 212, 189, 189, + 189, 189, 189, 190, 190, 190, 190, 190, 190, 184, + 185, 186, 187, 188, 214, 212, 215, 535, 536, 419, + 537, 540, 541, 542, 543, 544, 545, 546, 547, 1136, + 166, 167, 168, 191, 169, 170, 171, 164, 172, 173, + 174, 176, 211, 213, 216, 236, 239, 250, 251, 252, + 254, 255, 256, 257, 258, 259, 260, 265, 266, 267, + 268, 274, 286, 287, 311, 312, 424, 425, 426, 581, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 194, 195, 196, 237, + 184, 185, 186, 187, 188, 214, 1136, 197, 178, 179, + 180, 198, 194, 181, 238, 199, 197, 163, 200, 201, + 182, 202, 203, 204, 183, 205, 206, 207, 208, 209, + 210, 706, 276, 276, 276, 276, 855, 338, 853, 623, + 623, 975, 1341, 1341, 600, 1273, 1273, 1273, 1273, 1273, + 1273, 1273, 1273, 1273, 1273, 1292, 1292, 1341, 339, 338, + 417, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, + 1292, 548, 548, 548, 548, 827, 604, 1344, 1344, 559, + 552, 886, 860, 456, 909, 904, 905, 918, 861, 906, + 858, 907, 908, 859, 465, 465, 912, 478, 350, 350, + 350, 350, 913, 465, 914, 480, 1087, 1082, 1083, 1084, + 848, 337, 552, 559, 568, 569, 340, 579, 602, 616, + 617, 573, 599, 1100, 437, 1331, 1240, 25, 1240, 1240, + 347, 422, 709, 611, 1034, 1034, 1240, 345, 507, 700, + 1034, 1098, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, + 1034, 461, 353, 1034, 1034, 1034, 1034, 848, 1185, 1240, + 621, 658, 353, 353, 1240, 1240, 1240, 1240, 996, 833, + 1240, 1240, 1240, 353, 353, 1107, 1108, 353, 550, 1358, + 550, 550, 5, 499, 6, 500, 926, 392, 550, 571, + 927, 506, 660, 554, 1289, 1289, 1133, 353, 353, 1058, + 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, + 833, 454, 833, 967, 408, 705, 969, 969, 969, 969, + 539, 539, 454, 963, 970, 436, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 566, 475, 1316, 1317, + 733, 637, 639, 1040, 1039, 659, 682, 1303, 333, 683, + 687, 1010, 695, 704, 1006, 246, 246, 1037, 1037, 681, + 952, 538, 538, 1029, 1045, 1046, 666, 538, 686, 538, + 538, 538, 538, 538, 538, 538, 538, 1013, 1013, 1043, + 1044, 848, 244, 244, 244, 244, 241, 247, 318, 304, + 447, 447, 447, 447, 631, 633, 635, 1314, 554, 1314, + 1314, 1318, 1319, 1323, 1323, 1323, 1323, 1314, 406, 407, + 845, 694, 873, 670, 829, 671, 958, 410, 411, 412, + 401, 684, 577, 614, 413, 870, 694, 1018, 343, 615, + 694, 1325, 1325, 1325, 1325, 609, 624, 627, 628, 629, + 630, 651, 652, 653, 708, 942, 1216, 944, 942, 1235, + 1217, 1220, 945, 1221, 868, 1310, 317, 272, 317, 317, + 1231, 882, 980, 1233, 1071, 881, 869, 1070, 1074, 880, + 999, 1075, 867, 971, 736, 732, 1118, 978, 551, 1008, + 1003, 0, 348, 349, 447, 447, 447, 447, 447, 447, + 447, 447, 447, 447, 447, 1257, 0, 447, 931, 1123, + 0, 968, 1073, 1236, 1237, 619, 1312, 1312, 1073, 0, + 0, 1015, 843, 394, 397, 560, 601, 605, 0, 872, + 0, 664, 994, 1116, 885, 0, 0, 866, 0, 0, + 0, 1238, 1300, 1301, 0, 0, 0, 0, 0, 1230, + 0, 431, 553, 563, 0, 0, 553, 431, 563, 0, + 0, 395, 460, 1041, 1041, 0, 0, 0, 0, 0, + 665, 1052, 1048, 1049, 468, 580, 469, 470, 0, 0, + 0, 878, 0, 0, 1349, 1350, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 249, 249, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 253, 253 + 876 ); protected array $gotoCheck = array( - 42, 42, 73, 127, 73, 97, 26, 66, 66, 178, - 178, 178, 9, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 25, 25, 25, 25, 42, 42, 42, + 42, 42, 73, 127, 73, 66, 66, 25, 25, 25, + 25, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 86, 86, 26, 86, 86, 86, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -939,105 +931,98 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 15, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 149, 149, 23, 23, 23, 23, - 12, 108, 108, 149, 56, 56, 130, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 89, 89, 89, - 89, 151, 170, 89, 89, 89, 27, 15, 151, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 83, - 12, 15, 12, 17, 17, 170, 170, 14, 144, 144, - 17, 15, 15, 15, 15, 49, 17, 14, 14, 59, - 59, 59, 59, 59, 17, 43, 17, 17, 118, 118, - 14, 14, 17, 22, 14, 6, 14, 97, 97, 65, - 73, 65, 73, 73, 17, 83, 174, 14, 73, 73, - 73, 14, 14, 13, 73, 13, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 171, 171, 73, 73, 73, - 73, 9, 9, 9, 9, 35, 73, 24, 24, 24, - 24, 73, 73, 73, 73, 22, 45, 73, 73, 73, - 35, 76, 76, 35, 8, 8, 119, 119, 19, 14, - 19, 19, 180, 180, 8, 73, 84, 181, 19, 73, - 8, 8, 9, 8, 84, 9, 2, 2, 184, 184, - 14, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 93, 93, 93, 19, 184, 155, 76, 155, 19, - 19, 19, 19, 183, 155, 19, 19, 19, 172, 172, - 14, 103, 184, 184, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 173, 173, 85, 85, 85, 62, + 42, 9, 23, 23, 23, 23, 15, 170, 27, 108, + 108, 49, 184, 184, 130, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 172, 172, 184, 170, 170, + 43, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 107, 107, 107, 107, 6, 107, 184, 184, 76, + 76, 45, 15, 83, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 149, 149, 15, 84, 24, 24, + 24, 24, 65, 149, 65, 84, 15, 15, 15, 15, + 22, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 174, 8, 8, 83, 183, 73, 76, 73, 73, + 97, 13, 8, 13, 73, 73, 73, 181, 8, 8, + 73, 8, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 151, 14, 73, 73, 73, 73, 22, 151, 73, + 56, 56, 14, 14, 73, 73, 73, 73, 103, 12, + 73, 73, 73, 14, 14, 144, 144, 14, 19, 14, + 19, 19, 46, 155, 46, 155, 73, 62, 19, 104, + 73, 155, 64, 14, 173, 173, 150, 14, 14, 114, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 175, 175, 46, 104, 46, 64, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 150, 107, 107, 107, - 107, 114, 107, 120, 22, 116, 29, 9, 9, 7, - 113, 9, 7, 9, 18, 14, 9, 9, 23, 23, - 23, 23, 39, 130, 7, 130, 130, 92, 7, 9, - 9, 9, 9, 130, 28, 37, 9, 48, 80, 9, - 9, 48, 48, 48, 162, 129, 48, 5, 5, 110, - 48, 48, 48, 48, 48, 48, 99, 41, 158, 158, - 130, 130, 130, 130, 158, 9, 158, 158, 158, 158, - 158, 158, 158, 158, 5, 5, 5, 5, 5, 5, - 82, 82, 117, 20, 132, 82, 130, 82, 117, 82, - 82, 82, 96, 82, 117, 117, 82, 147, -1, -1, - 82, 117, 117, 117, 117, 86, 86, -1, 86, 86, - 86, -1, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, -1, -1, 23, -1, -1, 130, 20, - -1, -1, 130, 130, 130, -1, -1, 20, 20, 24, - 24, 24, 24, -1, -1, -1, 20, 16, 16, 16, - 16, -1, 50, -1, -1, 50, -1, 50, -1, 16, - 50, 50, 50, -1, -1, 20, 20, 20, -1, 79, - 79, -1, -1, 79, 79, 79, 79, -1, -1, -1, - -1, -1, -1, 16, -1, -1, -1, -1, -1, -1, + 12, 19, 12, 93, 93, 93, 19, 19, 19, 19, + 175, 175, 19, 19, 19, 113, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 48, 178, 178, 178, + 48, 48, 48, 118, 118, 48, 116, 14, 29, 48, + 48, 48, 48, 48, 48, 5, 5, 89, 89, 89, + 89, 158, 158, 89, 89, 89, 120, 158, 14, 158, + 158, 158, 158, 158, 158, 158, 158, 107, 107, 119, + 119, 22, 5, 5, 5, 5, 5, 5, 171, 171, + 23, 23, 23, 23, 85, 85, 85, 130, 14, 130, + 130, 180, 180, 9, 9, 9, 9, 130, 82, 82, + 18, 7, 39, 82, 7, 82, 92, 82, 82, 82, + 28, 82, 2, 2, 82, 37, 7, 110, 82, 80, + 7, 130, 130, 130, 130, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 9, 79, 79, 9, 20, + 79, 79, 79, 79, 35, 130, 24, 24, 24, 24, + 162, 41, 96, 14, 129, 16, 16, 16, 16, 35, + 50, 132, 35, 50, 99, 50, 147, 16, 50, 50, + 50, -1, 97, 97, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 20, -1, 23, 17, 17, + -1, 16, 130, 20, 20, 17, 130, 130, 130, -1, + -1, 17, 20, 59, 59, 59, 59, 59, -1, 17, + -1, 17, 17, 16, 16, -1, -1, 17, -1, -1, + -1, 20, 20, 20, -1, -1, -1, -1, -1, 17, + -1, 117, 9, 9, -1, -1, 9, 117, 9, -1, + -1, 9, 9, 117, 117, -1, -1, -1, -1, -1, + 117, 117, 117, 117, 9, 9, 9, 9, -1, -1, + -1, 9, -1, -1, 9, 9, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 16, 16, 107, 107, -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, 5, 5 + 9 ); protected array $gotoBase = array( - 0, 0, -380, 0, 0, 466, 232, 422, 306, -11, - 0, 0, -119, -66, -73, -187, 113, -245, 122, 53, - 108, 0, -27, 173, 294, 20, 2, 202, 115, 127, - 0, 0, 0, 0, 0, -78, 0, 114, 0, 117, - 0, 35, -1, 223, 0, 280, -338, 0, -258, 218, - 561, 0, 0, 0, 0, 0, 144, 0, 0, 194, - 0, 0, 347, 0, 166, 246, -231, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -36, 0, 0, 179, - 112, -196, 6, -61, -146, -96, -197, 0, 0, -84, - 0, 0, 116, 44, 0, 0, 68, -481, 0, 67, - 0, 0, 0, 336, 360, 0, 0, 389, -57, 0, - 97, 0, 0, 151, 147, 0, 142, 229, -33, 31, - 131, 0, 0, 0, 0, 0, 0, 1, 0, 89, - 178, 0, 61, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, -48, 0, 0, 72, 0, 140, - 171, -67, 0, 0, 0, -142, 0, 0, 240, 0, - 0, 0, 93, 0, 0, 0, 0, 0, 0, 0, - -98, -38, 130, 146, 237, 162, 0, 0, -294, 0, - -52, 297, 0, 332, 28, 0, 0 + 0, 0, -260, 0, 0, 384, 182, 434, 244, 138, + 0, 0, 7, -72, -11, -178, 45, 64, 135, 47, + 88, 0, -36, 159, 225, 4, 19, 164, 117, 86, + 0, 0, 0, 0, 0, 115, 0, 120, 0, 126, + 0, 53, -1, 168, 0, 185, -424, 0, -345, 154, + 489, 0, 0, 0, 0, 0, 250, 0, 0, 498, + 0, 0, 275, 0, 87, 219, -229, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -132, 0, 0, 70, + 119, 109, -52, -63, -241, -54, -697, 0, 0, 110, + 0, 0, 124, 43, 0, 0, 52, -222, 0, 99, + 0, 0, 0, 263, 276, 0, 0, 173, -65, 0, + 89, 0, 0, 80, 59, 0, 97, 302, 96, 128, + 108, 0, 0, 0, 0, 0, 0, 1, 0, 122, + 166, 0, 62, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 33, 0, 0, 65, 0, 190, + 85, 17, 0, 0, 0, -181, 0, 0, 157, 0, + 0, 0, 123, 0, 0, 0, 0, 0, 0, 0, + -126, 104, -49, 90, 222, 116, 0, 0, 71, 0, + 61, 237, 0, 224, -131, 0, 0 ); protected array $gotoDefault = array( - -32768, 515, 744, 4, 745, 939, 820, 829, 601, 533, - 711, 350, 629, 424, 1313, 915, 1126, 582, 848, 1253, - 1227, 459, 851, 332, 734, 927, 898, 899, 402, 388, - 394, 400, 653, 630, 497, 883, 455, 875, 489, 878, - 454, 887, 164, 420, 513, 891, 3, 894, 561, 925, - 977, 389, 902, 390, 681, 904, 566, 906, 907, 397, - 403, 404, 1131, 574, 626, 919, 256, 568, 920, 387, - 921, 929, 392, 395, 692, 468, 508, 502, 413, 1106, - 569, 612, 650, 448, 476, 624, 636, 622, 483, 436, - 418, 331, 961, 969, 490, 466, 983, 352, 991, 742, - 1139, 644, 492, 999, 645, 1006, 1009, 534, 535, 481, - 1021, 273, 1024, 493, 22, 671, 1035, 1036, 672, 646, - 1058, 647, 673, 648, 1060, 475, 602, 1068, 456, 1076, - 1301, 457, 1080, 266, 1083, 279, 419, 437, 1089, 1090, - 9, 1096, 702, 703, 18, 277, 512, 1121, 693, 453, - 1138, 452, 1208, 1210, 562, 494, 1228, 480, 296, 1231, - 684, 509, 1236, 449, 1304, 450, 536, 477, 318, 537, - 1348, 310, 335, 315, 553, 297, 336, 538, 478, 1310, - 1318, 333, 31, 1338, 1349, 579, 617 + -32768, 511, 740, 4, 741, 935, 816, 825, 597, 529, + 707, 344, 625, 420, 1308, 911, 1122, 578, 844, 1249, + 1223, 455, 847, 323, 730, 923, 894, 895, 398, 384, + 390, 396, 649, 626, 493, 879, 451, 871, 485, 874, + 450, 883, 162, 416, 509, 887, 3, 890, 557, 921, + 973, 385, 898, 386, 677, 900, 562, 902, 903, 393, + 399, 400, 1127, 570, 622, 915, 253, 564, 916, 383, + 917, 925, 388, 391, 688, 464, 504, 498, 409, 1102, + 565, 608, 646, 444, 472, 620, 632, 618, 479, 432, + 414, 322, 957, 965, 486, 462, 979, 346, 987, 738, + 1135, 640, 488, 995, 641, 1002, 1005, 530, 531, 477, + 1017, 269, 1020, 489, 22, 667, 1031, 1032, 668, 642, + 1054, 643, 669, 644, 1056, 471, 598, 1064, 452, 1072, + 1297, 453, 1076, 262, 1079, 275, 415, 433, 1085, 1086, + 9, 1092, 698, 699, 18, 273, 508, 1117, 689, 449, + 1134, 448, 1204, 1206, 558, 490, 1224, 476, 308, 1227, + 680, 505, 1232, 445, 1299, 446, 532, 473, 329, 533, + 1342, 303, 351, 326, 549, 309, 352, 534, 474, 1305, + 1313, 324, 31, 1332, 1343, 575, 613 ); protected array $ruleToNonTerminal = array( @@ -1097,13 +1082,12 @@ class Php8 extends \PhpParser\ParserAbstract 173, 173, 108, 175, 175, 175, 175, 153, 153, 153, 153, 153, 153, 153, 153, 59, 59, 169, 169, 169, 169, 169, 176, 176, 165, 165, 165, 165, 177, 177, - 177, 177, 177, 177, 74, 74, 66, 66, 66, 66, - 130, 130, 130, 130, 180, 179, 168, 168, 168, 168, - 168, 168, 168, 167, 167, 167, 178, 178, 178, 178, - 107, 174, 182, 182, 181, 181, 183, 183, 183, 183, - 183, 183, 183, 183, 171, 171, 171, 171, 170, 185, - 184, 184, 184, 184, 184, 184, 184, 184, 186, 186, - 186, 186 + 177, 177, 177, 74, 74, 66, 66, 66, 66, 130, + 130, 130, 130, 180, 179, 168, 168, 168, 168, 168, + 168, 167, 167, 167, 178, 178, 178, 178, 107, 174, + 182, 182, 181, 181, 183, 183, 183, 183, 183, 183, + 183, 183, 171, 171, 171, 171, 170, 185, 184, 184, + 184, 184, 184, 184, 184, 184, 186, 186, 186, 186 ); protected array $ruleToLength = array( @@ -1163,13 +1147,12 @@ class Php8 extends \PhpParser\ParserAbstract 5, 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, - 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, - 1, 4, 2, 2, 1, 3, 1, 4, 4, 3, - 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, - 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, - 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, - 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, - 2, 1 + 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, + 4, 2, 2, 1, 3, 1, 4, 3, 3, 3, + 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, + 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, + 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, + 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -2577,170 +2560,164 @@ protected function initReduceCallbacks(): void { 559 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 560 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, - 561 => null, - 562 => static function ($self, $stackPos) { + 560 => null, + 561 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 563 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 564 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = null; }, + 564 => null, 565 => null, 566 => null, - 567 => null, - 568 => static function ($self, $stackPos) { + 567 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 569 => static function ($self, $stackPos) { + 568 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 570 => null, - 571 => static function ($self, $stackPos) { + 569 => null, + 570 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 572 => static function ($self, $stackPos) { + 571 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 573 => static function ($self, $stackPos) { + 572 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 574 => static function ($self, $stackPos) { + 573 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 575 => static function ($self, $stackPos) { + 574 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 576 => null, - 577 => static function ($self, $stackPos) { + 575 => null, + 576 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, + 577 => static function ($self, $stackPos) { + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, 578 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 579 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 580 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, - 581 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, + 581 => null, 582 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 583 => null, - 584 => static function ($self, $stackPos) { + 584 => null, + 585 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 585 => null, 586 => null, 587 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 588 => null, - 589 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 590 => static function ($self, $stackPos) { + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 591 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 592 => null, - 593 => static function ($self, $stackPos) { + 590 => null, + 591 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 594 => static function ($self, $stackPos) { + 592 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 595 => static function ($self, $stackPos) { + 593 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 596 => static function ($self, $stackPos) { + 594 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 597 => static function ($self, $stackPos) { + 595 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 598 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 599 => static function ($self, $stackPos) { + 597 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 600 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 601 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 602 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 603 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 604 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 605 => static function ($self, $stackPos) { + 603 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 606 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 607 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 608 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 609 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 610 => null, - 611 => static function ($self, $stackPos) { + 608 => null, + 609 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 612 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 613 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 615 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 616 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 617 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 618 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 619 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 620 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 621 => null, + 619 => null, ]; } } diff --git a/test/code/parser/expr/alternative_array_syntax.test b/test/code/parser/expr/alternative_array_syntax.test new file mode 100644 index 0000000000..7bd3fad4fd --- /dev/null +++ b/test/code/parser/expr/alternative_array_syntax.test @@ -0,0 +1,335 @@ +Alternative array syntax +----- +b{'c'}; +$a->b(){'c'}; +A::$b{'c'}; +A{0}; +A::B{0}; +new $array{'className'}; +new $a->b{'c'}(); +----- +!!version=7.4 +array( + 0: Stmt_Expression( + expr: Expr_ArrayDimFetch( + var: Expr_Variable( + name: a + ) + dim: Scalar_String( + value: b + ) + ) + ) + 1: Stmt_Expression( + expr: Expr_FuncCall( + name: Expr_ArrayDimFetch( + var: Expr_Variable( + name: a + ) + dim: Scalar_String( + value: b + ) + ) + args: array( + ) + ) + ) + 2: Stmt_Expression( + expr: Expr_ArrayDimFetch( + var: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: Identifier( + name: b + ) + ) + dim: Scalar_String( + value: c + ) + ) + ) + 3: Stmt_Expression( + expr: Expr_ArrayDimFetch( + var: Expr_MethodCall( + var: Expr_Variable( + name: a + ) + name: Identifier( + name: b + ) + args: array( + ) + ) + dim: Scalar_String( + value: c + ) + ) + ) + 4: Stmt_Expression( + expr: Expr_ArrayDimFetch( + var: Expr_StaticPropertyFetch( + class: Name( + name: A + ) + name: VarLikeIdentifier( + name: b + ) + ) + dim: Scalar_String( + value: c + ) + ) + ) + 5: Stmt_Expression( + expr: Expr_ArrayDimFetch( + var: Expr_ConstFetch( + name: Name( + name: A + ) + ) + dim: Scalar_Int( + value: 0 + ) + ) + ) + 6: Stmt_Expression( + expr: Expr_ArrayDimFetch( + var: Expr_ClassConstFetch( + class: Name( + name: A + ) + name: Identifier( + name: B + ) + ) + dim: Scalar_Int( + value: 0 + ) + ) + ) + 7: Stmt_Expression( + expr: Expr_New( + class: Expr_ArrayDimFetch( + var: Expr_Variable( + name: array + ) + dim: Scalar_String( + value: className + ) + ) + args: array( + ) + ) + ) + 8: Stmt_Expression( + expr: Expr_New( + class: Expr_ArrayDimFetch( + var: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: Identifier( + name: b + ) + ) + dim: Scalar_String( + value: c + ) + ) + args: array( + ) + ) + ) +) +----- +b{'c'}; +$a->b(){'c'}; +A::$b{'c'}; +A{0}; +A::B{0}; +new $array{'className'}; +new $a->b{'c'}(); +----- +Syntax error, unexpected '{' from 3:3 to 3:3 +Syntax error, unexpected '{' from 4:3 to 4:3 +Syntax error, unexpected '{' from 5:6 to 5:6 +Syntax error, unexpected '{' from 6:8 to 6:8 +Syntax error, unexpected '{' from 7:6 to 7:6 +Syntax error, unexpected '{' from 8:2 to 8:2 +Syntax error, unexpected '{' from 9:5 to 9:5 +Syntax error, unexpected '{' from 10:11 to 10:11 +Syntax error, unexpected '{' from 11:10 to 11:10 +array( + 0: Stmt_Expression( + expr: Expr_Variable( + name: a + ) + ) + 1: Stmt_Block( + stmts: array( + 0: Stmt_Expression( + expr: Scalar_String( + value: b + ) + ) + ) + ) + 2: Stmt_Expression( + expr: Expr_Variable( + name: a + ) + ) + 3: Stmt_Block( + stmts: array( + 0: Stmt_Expression( + expr: Scalar_String( + value: b + ) + ) + ) + ) + 4: Stmt_Expression( + expr: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: Identifier( + name: b + ) + ) + ) + 5: Stmt_Block( + stmts: array( + 0: Stmt_Expression( + expr: Scalar_String( + value: c + ) + ) + ) + ) + 6: Stmt_Expression( + expr: Expr_MethodCall( + var: Expr_Variable( + name: a + ) + name: Identifier( + name: b + ) + args: array( + ) + ) + ) + 7: Stmt_Block( + stmts: array( + 0: Stmt_Expression( + expr: Scalar_String( + value: c + ) + ) + ) + ) + 8: Stmt_Expression( + expr: Expr_StaticPropertyFetch( + class: Name( + name: A + ) + name: VarLikeIdentifier( + name: b + ) + ) + ) + 9: Stmt_Block( + stmts: array( + 0: Stmt_Expression( + expr: Scalar_String( + value: c + ) + ) + ) + ) + 10: Stmt_Expression( + expr: Expr_ConstFetch( + name: Name( + name: A + ) + ) + ) + 11: Stmt_Block( + stmts: array( + 0: Stmt_Expression( + expr: Scalar_Int( + value: 0 + ) + ) + ) + ) + 12: Stmt_Expression( + expr: Expr_ClassConstFetch( + class: Name( + name: A + ) + name: Identifier( + name: B + ) + ) + ) + 13: Stmt_Block( + stmts: array( + 0: Stmt_Expression( + expr: Scalar_Int( + value: 0 + ) + ) + ) + ) + 14: Stmt_Expression( + expr: Expr_New( + class: Expr_Variable( + name: array + ) + args: array( + ) + ) + ) + 15: Stmt_Block( + stmts: array( + 0: Stmt_Expression( + expr: Scalar_String( + value: className + ) + ) + ) + ) + 16: Stmt_Expression( + expr: Expr_New( + class: Expr_PropertyFetch( + var: Expr_Variable( + name: a + ) + name: Identifier( + name: b + ) + ) + args: array( + ) + ) + ) + 17: Stmt_Block( + stmts: array( + 0: Stmt_Expression( + expr: Scalar_String( + value: c + ) + ) + ) + ) +) diff --git a/test/code/parser/expr/fetchAndCall/funcCall.test b/test/code/parser/expr/fetchAndCall/funcCall.test index 7f218fe37d..dae9003c55 100644 --- a/test/code/parser/expr/fetchAndCall/funcCall.test +++ b/test/code/parser/expr/fetchAndCall/funcCall.test @@ -9,7 +9,6 @@ ${'a'}(); $$a(); $$$a(); $a['b'](); -$a{'b'}(); $a->b['c'](); // array dereferencing @@ -87,20 +86,6 @@ array( ) ) 6: Stmt_Expression( - expr: Expr_FuncCall( - name: Expr_ArrayDimFetch( - var: Expr_Variable( - name: a - ) - dim: Scalar_String( - value: b - ) - ) - args: array( - ) - ) - ) - 7: Stmt_Expression( expr: Expr_FuncCall( name: Expr_ArrayDimFetch( var: Expr_PropertyFetch( @@ -119,7 +104,7 @@ array( ) ) ) - 8: Stmt_Expression( + 7: Stmt_Expression( expr: Expr_ArrayDimFetch( var: Expr_FuncCall( name: Name( diff --git a/test/code/parser/expr/fetchAndCall/objectAccess.test b/test/code/parser/expr/fetchAndCall/objectAccess.test index f6ed4fc4d4..1e48031640 100644 --- a/test/code/parser/expr/fetchAndCall/objectAccess.test +++ b/test/code/parser/expr/fetchAndCall/objectAccess.test @@ -5,7 +5,6 @@ Object access // property fetch variations $a->b; $a->b['c']; -$a->b{'c'}; // method call variations $a->b(); @@ -15,7 +14,6 @@ $a->$b['c'](); // array dereferencing $a->b()['c']; -$a->b(){'c'}; ----- array( 0: Stmt_Expression( @@ -47,21 +45,6 @@ array( ) ) 2: Stmt_Expression( - expr: Expr_ArrayDimFetch( - var: Expr_PropertyFetch( - var: Expr_Variable( - name: a - ) - name: Identifier( - name: b - ) - ) - dim: Scalar_String( - value: c - ) - ) - ) - 3: Stmt_Expression( expr: Expr_MethodCall( var: Expr_Variable( name: a @@ -76,7 +59,7 @@ array( 0: // method call variations ) ) - 4: Stmt_Expression( + 3: Stmt_Expression( expr: Expr_MethodCall( var: Expr_Variable( name: a @@ -88,7 +71,7 @@ array( ) ) ) - 5: Stmt_Expression( + 4: Stmt_Expression( expr: Expr_MethodCall( var: Expr_Variable( name: a @@ -100,7 +83,7 @@ array( ) ) ) - 6: Stmt_Expression( + 5: Stmt_Expression( expr: Expr_FuncCall( name: Expr_ArrayDimFetch( var: Expr_PropertyFetch( @@ -119,7 +102,7 @@ array( ) ) ) - 7: Stmt_Expression( + 6: Stmt_Expression( expr: Expr_ArrayDimFetch( var: Expr_MethodCall( var: Expr_Variable( @@ -139,21 +122,4 @@ array( 0: // array dereferencing ) ) - 8: Stmt_Expression( - expr: Expr_ArrayDimFetch( - var: Expr_MethodCall( - var: Expr_Variable( - name: a - ) - name: Identifier( - name: b - ) - args: array( - ) - ) - dim: Scalar_String( - value: c - ) - ) - ) ) diff --git a/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test b/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test index 9cc88b9e3f..cd0dcc50a4 100644 --- a/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test +++ b/test/code/parser/expr/fetchAndCall/simpleArrayAccess.test @@ -5,7 +5,6 @@ Simple array access $a['b']; $a['b']['c']; $a[] = $b; -$a{'b'}; ${$a}['b']; ----- array( @@ -48,16 +47,6 @@ array( ) ) 3: Stmt_Expression( - expr: Expr_ArrayDimFetch( - var: Expr_Variable( - name: a - ) - dim: Scalar_String( - value: b - ) - ) - ) - 4: Stmt_Expression( expr: Expr_ArrayDimFetch( var: Expr_Variable( name: Expr_Variable( diff --git a/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test b/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test index 1d66eb5ab9..5256cf0991 100644 --- a/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test +++ b/test/code/parser/expr/fetchAndCall/staticPropertyFetch.test @@ -9,7 +9,6 @@ A::${'b'}; // array access A::$b['c']; -A::$b{'c'}; // class name variations can be found in staticCall.test ----- @@ -65,22 +64,7 @@ array( 0: // array access ) ) - 4: Stmt_Expression( - expr: Expr_ArrayDimFetch( - var: Expr_StaticPropertyFetch( - class: Name( - name: A - ) - name: VarLikeIdentifier( - name: b - ) - ) - dim: Scalar_String( - value: c - ) - ) - ) - 5: Stmt_Nop( + 4: Stmt_Nop( comments: array( 0: // class name variations can be found in staticCall.test ) diff --git a/test/code/parser/expr/new.test b/test/code/parser/expr/new.test index cb29a92947..c962fda34a 100644 --- a/test/code/parser/expr/new.test +++ b/test/code/parser/expr/new.test @@ -13,7 +13,6 @@ new A::$b(); new $a->b(); new $a->b->c(); new $a->b['c'](); -new $a->b{'c'}(); // test regression introduces by new dereferencing syntax (new A); @@ -141,25 +140,6 @@ array( ) ) 8: Stmt_Expression( - expr: Expr_New( - class: Expr_ArrayDimFetch( - var: Expr_PropertyFetch( - var: Expr_Variable( - name: a - ) - name: Identifier( - name: b - ) - ) - dim: Scalar_String( - value: c - ) - ) - args: array( - ) - ) - ) - 9: Stmt_Expression( expr: Expr_New( class: Name( name: A diff --git a/test/code/parser/expr/newDeref.test b/test/code/parser/expr/newDeref.test index da24a245db..9845f689fc 100644 --- a/test/code/parser/expr/newDeref.test +++ b/test/code/parser/expr/newDeref.test @@ -8,7 +8,6 @@ new A()::FOO; new A()::foo(); new A()::$foo; new A()[0]; -new A(){0}; new A()(); new class {}->foo; @@ -17,7 +16,6 @@ new class {}::FOO; new class {}::foo(); new class {}::$foo; new class {}[0]; -new class {}{0}; new class {}(); ----- array( @@ -110,20 +108,6 @@ array( ) ) 6: Stmt_Expression( - expr: Expr_ArrayDimFetch( - var: Expr_New( - class: Name( - name: A - ) - args: array( - ) - ) - dim: Scalar_Int( - value: 0 - ) - ) - ) - 7: Stmt_Expression( expr: Expr_FuncCall( name: Expr_New( class: Name( @@ -136,7 +120,7 @@ array( ) ) ) - 8: Stmt_Expression( + 7: Stmt_Expression( expr: Expr_PropertyFetch( var: Expr_New( class: Stmt_Class( @@ -158,7 +142,7 @@ array( ) ) ) - 9: Stmt_Expression( + 8: Stmt_Expression( expr: Expr_MethodCall( var: Expr_New( class: Stmt_Class( @@ -182,7 +166,7 @@ array( ) ) ) - 10: Stmt_Expression( + 9: Stmt_Expression( expr: Expr_ClassConstFetch( class: Expr_New( class: Stmt_Class( @@ -204,7 +188,7 @@ array( ) ) ) - 11: Stmt_Expression( + 10: Stmt_Expression( expr: Expr_StaticCall( class: Expr_New( class: Stmt_Class( @@ -228,7 +212,7 @@ array( ) ) ) - 12: Stmt_Expression( + 11: Stmt_Expression( expr: Expr_StaticPropertyFetch( class: Expr_New( class: Stmt_Class( @@ -250,29 +234,7 @@ array( ) ) ) - 13: Stmt_Expression( - expr: Expr_ArrayDimFetch( - var: Expr_New( - class: Stmt_Class( - attrGroups: array( - ) - flags: 0 - name: null - extends: null - implements: array( - ) - stmts: array( - ) - ) - args: array( - ) - ) - dim: Scalar_Int( - value: 0 - ) - ) - ) - 14: Stmt_Expression( + 12: Stmt_Expression( expr: Expr_ArrayDimFetch( var: Expr_New( class: Stmt_Class( @@ -294,7 +256,7 @@ array( ) ) ) - 15: Stmt_Expression( + 13: Stmt_Expression( expr: Expr_FuncCall( name: Expr_New( class: Stmt_Class( diff --git a/test/code/parser/expr/uvs/constDeref.test b/test/code/parser/expr/uvs/constDeref.test index 501b5b5858..6674610bb8 100644 --- a/test/code/parser/expr/uvs/constDeref.test +++ b/test/code/parser/expr/uvs/constDeref.test @@ -6,11 +6,9 @@ A->length; A->length(); A[0]; A[0][1][2]; -A{0}; A::B[0]; A::B[0][1][2]; -A::B{0}; A::B->length; A::B->length(); A::B::C; @@ -83,18 +81,6 @@ array( ) ) 4: Stmt_Expression( - expr: Expr_ArrayDimFetch( - var: Expr_ConstFetch( - name: Name( - name: A - ) - ) - dim: Scalar_Int( - value: 0 - ) - ) - ) - 5: Stmt_Expression( expr: Expr_ArrayDimFetch( var: Expr_ClassConstFetch( class: Name( @@ -109,7 +95,7 @@ array( ) ) ) - 6: Stmt_Expression( + 5: Stmt_Expression( expr: Expr_ArrayDimFetch( var: Expr_ArrayDimFetch( var: Expr_ArrayDimFetch( @@ -134,22 +120,7 @@ array( ) ) ) - 7: Stmt_Expression( - expr: Expr_ArrayDimFetch( - var: Expr_ClassConstFetch( - class: Name( - name: A - ) - name: Identifier( - name: B - ) - ) - dim: Scalar_Int( - value: 0 - ) - ) - ) - 8: Stmt_Expression( + 6: Stmt_Expression( expr: Expr_PropertyFetch( var: Expr_ClassConstFetch( class: Name( @@ -164,7 +135,7 @@ array( ) ) ) - 9: Stmt_Expression( + 7: Stmt_Expression( expr: Expr_MethodCall( var: Expr_ClassConstFetch( class: Name( @@ -181,7 +152,7 @@ array( ) ) ) - 10: Stmt_Expression( + 8: Stmt_Expression( expr: Expr_ClassConstFetch( class: Expr_ClassConstFetch( class: Name( @@ -196,7 +167,7 @@ array( ) ) ) - 11: Stmt_Expression( + 9: Stmt_Expression( expr: Expr_StaticPropertyFetch( class: Expr_ClassConstFetch( class: Name( @@ -211,7 +182,7 @@ array( ) ) ) - 12: Stmt_Expression( + 10: Stmt_Expression( expr: Expr_StaticCall( class: Expr_ClassConstFetch( class: Name( @@ -228,7 +199,7 @@ array( ) ) ) - 13: Stmt_Expression( + 11: Stmt_Expression( expr: Expr_ArrayDimFetch( var: Scalar_MagicConst_Function( ) @@ -237,7 +208,7 @@ array( ) ) ) - 14: Stmt_Expression( + 12: Stmt_Expression( expr: Expr_PropertyFetch( var: Scalar_MagicConst_Function( ) @@ -246,7 +217,7 @@ array( ) ) ) - 15: Stmt_Expression( + 13: Stmt_Expression( expr: Expr_MethodCall( var: Expr_ConstFetch( name: Name( diff --git a/test/code/parser/expr/uvs/new.test b/test/code/parser/expr/uvs/new.test index bb7888ff8f..403a15f85c 100644 --- a/test/code/parser/expr/uvs/new.test +++ b/test/code/parser/expr/uvs/new.test @@ -3,7 +3,6 @@ UVS new expressions className; new Test::$className; new $test::$className; @@ -34,20 +33,6 @@ array( ) ) 2: Stmt_Expression( - expr: Expr_New( - class: Expr_ArrayDimFetch( - var: Expr_Variable( - name: array - ) - dim: Scalar_String( - value: className - ) - ) - args: array( - ) - ) - ) - 3: Stmt_Expression( expr: Expr_New( class: Expr_PropertyFetch( var: Expr_Variable( @@ -61,7 +46,7 @@ array( ) ) ) - 4: Stmt_Expression( + 3: Stmt_Expression( expr: Expr_New( class: Expr_StaticPropertyFetch( class: Name( @@ -75,7 +60,7 @@ array( ) ) ) - 5: Stmt_Expression( + 4: Stmt_Expression( expr: Expr_New( class: Expr_StaticPropertyFetch( class: Expr_Variable( @@ -89,7 +74,7 @@ array( ) ) ) - 6: Stmt_Expression( + 5: Stmt_Expression( expr: Expr_New( class: Expr_StaticPropertyFetch( class: Expr_PropertyFetch( From d3ae2ed6795a3fb6ac214ceffcb0301f0950d6fa Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 Jul 2024 18:23:53 +0200 Subject: [PATCH 357/428] Respect version mode line in pretty printer tests By default parser uses newest supported and pretty printer uses its default version. If version is specified, it's used for both parser and printer. Additionally, parserVersion can be used to specify a different version for parser and printer. --- test/PhpParser/PrettyPrinterTest.php | 34 +++++++++---------- test/code/prettyPrinter/expr/parentheses.test | 2 +- test/code/prettyPrinter/expr/yield.test | 2 +- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index eda8e5ddf2..5b650f1373 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -10,18 +10,24 @@ use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt; -use PhpParser\Parser\Php7; use PhpParser\PrettyPrinter\Standard; class PrettyPrinterTest extends CodeTestAbstract { - protected function doTestPrettyPrintMethod($method, $name, $code, $expected, $modeLine) { - $lexer = new Lexer\Emulative(); - $parser = new Parser\Php7($lexer); - - $options = $this->parseModeLine($modeLine); - $version = isset($options['version']) ? PhpVersion::fromString($options['version']) : null; - $prettyPrinter = new Standard(['phpVersion' => $version]); + /** @return array{0: Parser, 1: PrettyPrinter} */ + private function createParserAndPrinter(array $options): array { + $parserVersion = $options['parserVersion'] ?? $options['version'] ?? null; + $printerVersion = $options['version'] ?? null; + $factory = new ParserFactory(); + $parser = $factory->createForVersion($parserVersion !== null + ? PhpVersion::fromString($parserVersion) : PhpVersion::getNewestSupported()); + $prettyPrinter = new Standard([ + 'phpVersion' => $printerVersion !== null ? PhpVersion::fromString($printerVersion) : null + ]); + return [$parser, $prettyPrinter]; + } + protected function doTestPrettyPrintMethod($method, $name, $code, $expected, $modeLine) { + [$parser, $prettyPrinter] = $this->createParserAndPrinter($this->parseModeLine($modeLine)); $output = canonicalize($prettyPrinter->$method($parser->parse($code))); $this->assertSame($expected, $output, $name); } @@ -181,12 +187,9 @@ public function testPrettyPrintWithErrorInClassConstFetch(): void { * @dataProvider provideTestFormatPreservingPrint */ public function testFormatPreservingPrint($name, $code, $modification, $expected, $modeLine): void { - $lexer = new Lexer\Emulative(); - $parser = new Parser\Php7($lexer); + [$parser, $printer] = $this->createParserAndPrinter($this->parseModeLine($modeLine)); $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); - $printer = new PrettyPrinter\Standard(); - $oldStmts = $parser->parse($code); $oldTokens = $parser->getTokens(); @@ -222,14 +225,9 @@ public function testRoundTripPrint($name, $code, $expected, $modeLine): void { * the pretty printer tests (i.e. returns the input if no changes occurred). */ - $lexer = new Lexer\Emulative(); - - $parser = new Php7($lexer); - + [$parser, $printer] = $this->createParserAndPrinter($this->parseModeLine($modeLine)); $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor()); - $printer = new PrettyPrinter\Standard(); - try { $oldStmts = $parser->parse($code); } catch (Error $e) { diff --git a/test/code/prettyPrinter/expr/parentheses.test b/test/code/prettyPrinter/expr/parentheses.test index be9a776481..9674858abd 100644 --- a/test/code/prettyPrinter/expr/parentheses.test +++ b/test/code/prettyPrinter/expr/parentheses.test @@ -5,7 +5,7 @@ Pretty printer generates least-parentheses output echo 'abc' . 'cde' . 'fgh'; echo 'abc' . ('cde' . 'fgh'); -echo 'abc' . 1 + 2 . 'fgh'; +echo ('abc' . 1) + 2 . 'fgh'; echo 'abc' . (1 + 2) . 'fgh'; echo 1 * 2 + 3 / 4 % 5 . 6; diff --git a/test/code/prettyPrinter/expr/yield.test b/test/code/prettyPrinter/expr/yield.test index 006fc79d1c..7a75891453 100644 --- a/test/code/prettyPrinter/expr/yield.test +++ b/test/code/prettyPrinter/expr/yield.test @@ -79,7 +79,7 @@ function gen() yield * $a; } ----- -!!version=5.6 +!!version=5.6,parserVersion=8.0 function gen() { yield; From 58de479119fdcbdf3b317ae2750875a7a21a64bd Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 21 Jul 2024 18:59:18 +0200 Subject: [PATCH 358/428] Remove error for abstract/final properties These are allowed since PHP 8.4, with the introduction of property hooks. (Abstract properties require hooks, which is not validated here.) --- grammar/php.y | 3 +- lib/PhpParser/Parser/Php7.php | 1 - lib/PhpParser/Parser/Php8.php | 1 - lib/PhpParser/ParserAbstract.php | 12 --- .../{modifier.test => modifier_error.test} | 66 --------------- .../parser/stmt/class/property_modifiers.test | 81 +++++++++++++++++++ 6 files changed, 82 insertions(+), 82 deletions(-) rename test/code/parser/stmt/class/{modifier.test => modifier_error.test} (79%) create mode 100644 test/code/parser/stmt/class/property_modifiers.test diff --git a/grammar/php.y b/grammar/php.y index 53af51dfad..d7a98e207b 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -829,8 +829,7 @@ class_statement_list: class_statement: optional_attributes variable_modifiers optional_type_without_static property_declaration_list semi - { $$ = new Stmt\Property($2, $4, attributes(), $3, $1); - $this->checkProperty($$, #2); } + { $$ = new Stmt\Property($2, $4, attributes(), $3, $1); } | optional_attributes method_modifiers T_CONST class_const_list semi { $$ = new Stmt\ClassConst($4, $2, attributes(), $1); $this->checkClassConst($$, #2); } diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index da5019daf8..c3ce3a6ae6 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1989,7 +1989,6 @@ protected function initReduceCallbacks(): void { }, 343 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); - $self->checkProperty($self->semValue, $stackPos-(5-2)); }, 344 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 710c46f8de..c9c53ff306 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1966,7 +1966,6 @@ protected function initReduceCallbacks(): void { }, 343 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); - $self->checkProperty($self->semValue, $stackPos-(5-2)); }, 344 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index c3a1845731..ad42606144 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -1154,18 +1154,6 @@ protected function checkClassConst(ClassConst $node, int $modifierPos): void { } } - protected function checkProperty(Property $node, int $modifierPos): void { - if ($node->flags & Modifiers::ABSTRACT) { - $this->emitError(new Error('Properties cannot be declared abstract', - $this->getAttributesAt($modifierPos))); - } - - if ($node->flags & Modifiers::FINAL) { - $this->emitError(new Error('Properties cannot be declared final', - $this->getAttributesAt($modifierPos))); - } - } - protected function checkUseUse(UseItem $node, int $namePos): void { if ($node->alias && $node->alias->isSpecialClassName()) { $this->emitError(new Error( diff --git a/test/code/parser/stmt/class/modifier.test b/test/code/parser/stmt/class/modifier_error.test similarity index 79% rename from test/code/parser/stmt/class/modifier.test rename to test/code/parser/stmt/class/modifier_error.test index 90147c9ad4..e6b6d90bbc 100644 --- a/test/code/parser/stmt/class/modifier.test +++ b/test/code/parser/stmt/class/modifier_error.test @@ -247,69 +247,3 @@ array( ) ) ) ------ - Date: Sun, 28 Jul 2024 17:08:58 +0200 Subject: [PATCH 359/428] Add Modifiers::toString() helper Convert an integer modifier into a string. --- lib/PhpParser/Modifiers.php | 51 +++++++++++++++++--------------- lib/PhpParser/ParserAbstract.php | 20 ++++--------- test/PhpParser/ModifiersTest.php | 18 +++++++++++ 3 files changed, 51 insertions(+), 38 deletions(-) create mode 100644 test/PhpParser/ModifiersTest.php diff --git a/lib/PhpParser/Modifiers.php b/lib/PhpParser/Modifiers.php index b7120eea3d..25cf3bef63 100644 --- a/lib/PhpParser/Modifiers.php +++ b/lib/PhpParser/Modifiers.php @@ -17,20 +17,32 @@ final class Modifiers { public const VISIBILITY_MASK = 1 | 2 | 4; + private const TO_STRING_MAP = [ + self::PUBLIC => 'public', + self::PROTECTED => 'protected', + self::PRIVATE => 'private', + self::STATIC => 'static', + self::ABSTRACT => 'abstract', + self::FINAL => 'final', + self::READONLY => 'readonly', + ]; + + public static function toString(int $modifier): string { + if (!isset(self::TO_STRING_MAP[$modifier])) { + throw new \InvalidArgumentException("Unknown modifier $modifier"); + } + return self::TO_STRING_MAP[$modifier]; + } + /** * @internal */ public static function verifyClassModifier(int $a, int $b): void { - if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { - throw new Error('Multiple abstract modifiers are not allowed'); - } - - if ($a & Modifiers::FINAL && $b & Modifiers::FINAL) { - throw new Error('Multiple final modifiers are not allowed'); - } - - if ($a & Modifiers::READONLY && $b & Modifiers::READONLY) { - throw new Error('Multiple readonly modifiers are not allowed'); + foreach ([Modifiers::ABSTRACT, Modifiers::FINAL, Modifiers::READONLY] as $modifier) { + if ($a & $modifier && $b & $modifier) { + throw new Error( + 'Multiple ' . self::toString($modifier) . ' modifiers are not allowed'); + } } if ($a & 48 && $b & 48) { @@ -46,20 +58,11 @@ public static function verifyModifier(int $a, int $b): void { throw new Error('Multiple access type modifiers are not allowed'); } - if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { - throw new Error('Multiple abstract modifiers are not allowed'); - } - - if ($a & Modifiers::STATIC && $b & Modifiers::STATIC) { - throw new Error('Multiple static modifiers are not allowed'); - } - - if ($a & Modifiers::FINAL && $b & Modifiers::FINAL) { - throw new Error('Multiple final modifiers are not allowed'); - } - - if ($a & Modifiers::READONLY && $b & Modifiers::READONLY) { - throw new Error('Multiple readonly modifiers are not allowed'); + foreach ([Modifiers::ABSTRACT, Modifiers::STATIC, Modifiers::FINAL, Modifiers::READONLY] as $modifier) { + if ($a & $modifier && $b & $modifier) { + throw new Error( + 'Multiple ' . self::toString($modifier) . ' modifiers are not allowed'); + } } if ($a & 48 && $b & 48) { diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index ad42606144..4026384be4 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -1137,20 +1137,12 @@ protected function checkClassMethod(ClassMethod $node, int $modifierPos): void { } protected function checkClassConst(ClassConst $node, int $modifierPos): void { - if ($node->flags & Modifiers::STATIC) { - $this->emitError(new Error( - "Cannot use 'static' as constant modifier", - $this->getAttributesAt($modifierPos))); - } - if ($node->flags & Modifiers::ABSTRACT) { - $this->emitError(new Error( - "Cannot use 'abstract' as constant modifier", - $this->getAttributesAt($modifierPos))); - } - if ($node->flags & Modifiers::READONLY) { - $this->emitError(new Error( - "Cannot use 'readonly' as constant modifier", - $this->getAttributesAt($modifierPos))); + foreach ([Modifiers::STATIC, Modifiers::ABSTRACT, Modifiers::READONLY] as $modifier) { + if ($node->flags & $modifier) { + $this->emitError(new Error( + "Cannot use '" . Modifiers::toString($modifier) . "' as constant modifier", + $this->getAttributesAt($modifierPos))); + } } } diff --git a/test/PhpParser/ModifiersTest.php b/test/PhpParser/ModifiersTest.php new file mode 100644 index 0000000000..1b10e8e102 --- /dev/null +++ b/test/PhpParser/ModifiersTest.php @@ -0,0 +1,18 @@ +assertSame('public', Modifiers::toString(Modifiers::PUBLIC)); + } + + public function testToStringInvalid() { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Unknown modifier 3'); + Modifiers::toString(Modifiers::PUBLIC | Modifiers::PROTECTED); + } +} From b11fc12ccee7e794b5b17d952b1cb0b606cf379b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 28 Jul 2024 18:11:46 +0200 Subject: [PATCH 360/428] Use ParserFactory in integration test So we actually use the PHP 8 parser on new versions. --- test_old/run.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test_old/run.php b/test_old/run.php index 2386e6154f..c875c87e4a 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -127,12 +127,7 @@ function showHelp($error) { showHelp('Test type must be one of: PHP or Symfony'); } -$lexer = new PhpParser\Lexer\Emulative(\PhpParser\PhpVersion::fromString($phpVersion)); -if (version_compare($phpVersion, '7.0', '>=')) { - $parser = new PhpParser\Parser\Php7($lexer); -} else { - $parser = new PhpParser\Parser\Php5($lexer); -} +$parser = (new PhpParser\ParserFactory())->createForVersion(PhpParser\PhpVersion::fromString($phpVersion)); $prettyPrinter = new PhpParser\PrettyPrinter\Standard; $nodeDumper = new PhpParser\NodeDumper; From 03caf4cc9946a04526b2494834aede03257dfbff Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 14 Jul 2024 21:29:58 +0200 Subject: [PATCH 361/428] [8.4] Add support for property hooks Add hooks subnode to Stmt\Property and Param, which contains an array of PropertyHook. The property hook support is considered experimental and subject to change. RFC: https://wiki.php.net/rfc/property-hooks --- grammar/php.y | 46 +- lib/PhpParser/Builder/Property.php | 42 +- lib/PhpParser/Node/Param.php | 9 +- lib/PhpParser/Node/PropertyHook.php | 78 + lib/PhpParser/Node/Stmt/Property.php | 8 +- lib/PhpParser/Parser/Php7.php | 1148 +++++------ lib/PhpParser/Parser/Php8.php | 1699 +++++++++-------- lib/PhpParser/ParserAbstract.php | 37 + lib/PhpParser/PrettyPrinter/Standard.php | 15 +- lib/PhpParser/PrettyPrinterAbstract.php | 8 + test/PhpParser/Builder/PropertyTest.php | 49 +- test/PhpParser/NodeAbstractTest.php | 12 +- .../formatPreservation/property_hooks.test | 128 ++ test/code/parser/commentAtEndOfClass.test | 2 + test/code/parser/errorHandling/recovery.test | 28 +- test/code/parser/expr/arrow_function.test | 20 + test/code/parser/expr/closure.test | 8 + test/code/parser/expr/uvs/indirectCall.test | 4 + test/code/parser/semiReserved.test | 4 + test/code/parser/stmt/attributes.test | 4 + test/code/parser/stmt/class/anonymous.test | 2 + .../parser/stmt/class/implicitPublic.test | 4 + .../parser/stmt/class/modifier_error.test | 8 + test/code/parser/stmt/class/php4Style.test | 2 + .../code/parser/stmt/class/propertyTypes.test | 8 + .../parser/stmt/class/property_hooks.test | 525 +++++ .../parser/stmt/class/property_modifiers.test | 8 + .../parser/stmt/class/property_promotion.test | 68 + test/code/parser/stmt/class/simple.test | 8 + .../function/builtinTypeDeclarations.test | 14 + test/code/parser/stmt/function/byRef.test | 4 + .../parser/stmt/function/defaultValues.test | 18 + .../function/disjointNormalFormTypes.test | 6 + .../stmt/function/intersectionTypes.test | 4 + .../parser/stmt/function/nullableTypes.test | 4 + .../function/parameters_trailing_comma.test | 8 + .../stmt/function/typeDeclarations.test | 8 + .../parser/stmt/function/typeVersions.test | 108 ++ .../code/parser/stmt/function/unionTypes.test | 4 + test/code/parser/stmt/function/variadic.test | 16 + .../stmt/function/variadicDefaultValue.test | 2 + test/code/parser/stmt/newInInitializer.test | 4 + .../prettyPrinter/stmt/property_hooks.test | 59 + 43 files changed, 2834 insertions(+), 1407 deletions(-) create mode 100644 lib/PhpParser/Node/PropertyHook.php create mode 100644 test/code/formatPreservation/property_hooks.test create mode 100644 test/code/parser/stmt/class/property_hooks.test create mode 100644 test/code/prettyPrinter/stmt/property_hooks.test diff --git a/grammar/php.y b/grammar/php.y index d7a98e207b..e55f6e03e1 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -677,12 +677,12 @@ property_modifier: parameter: optional_attributes optional_property_modifiers optional_type_without_static - optional_arg_ref optional_ellipsis plain_variable - { $$ = new Node\Param($6, null, $3, $4, $5, attributes(), $2, $1); + optional_arg_ref optional_ellipsis plain_variable optional_property_hook_list + { $$ = new Node\Param($6, null, $3, $4, $5, attributes(), $2, $1, $7); $this->checkParam($$); } | optional_attributes optional_property_modifiers optional_type_without_static - optional_arg_ref optional_ellipsis plain_variable '=' expr - { $$ = new Node\Param($6, $8, $3, $4, $5, attributes(), $2, $1); + optional_arg_ref optional_ellipsis plain_variable '=' expr optional_property_hook_list + { $$ = new Node\Param($6, $8, $3, $4, $5, attributes(), $2, $1, $9); $this->checkParam($$); } | optional_attributes optional_property_modifiers optional_type_without_static optional_arg_ref optional_ellipsis error @@ -830,6 +830,11 @@ class_statement_list: class_statement: optional_attributes variable_modifiers optional_type_without_static property_declaration_list semi { $$ = new Stmt\Property($2, $4, attributes(), $3, $1); } +#if PHP8 + | optional_attributes variable_modifiers optional_type_without_static property_declaration_list '{' property_hook_list '}' + { $$ = new Stmt\Property($2, $4, attributes(), $3, $1, $6); + $this->checkPropertyHookList($6, #5); } +#endif | optional_attributes method_modifiers T_CONST class_const_list semi { $$ = new Stmt\ClassConst($4, $2, attributes(), $1); $this->checkClassConst($$, #2); } @@ -926,6 +931,39 @@ property_declaration: | property_decl_name '=' expr { $$ = Node\PropertyItem[$1, $3]; } ; +property_hook_list: + /* empty */ { $$ = []; } + | property_hook_list property_hook { push($1, $2); } +; + +optional_property_hook_list: + /* empty */ { $$ = []; } +#if PHP8 + | '{' property_hook_list '}' { $$ = $2; $this->checkPropertyHookList($2, #1); } +#endif +; + +property_hook: + optional_attributes property_hook_modifiers optional_ref identifier_not_reserved property_hook_body + { $$ = Node\PropertyHook[$4, $5, ['flags' => $2, 'byRef' => $3, 'params' => [], 'attrGroups' => $1]]; + $this->checkPropertyHook($$, null); } + | optional_attributes property_hook_modifiers optional_ref identifier_not_reserved '(' parameter_list ')' property_hook_body + { $$ = Node\PropertyHook[$4, $8, ['flags' => $2, 'byRef' => $3, 'params' => $6, 'attrGroups' => $1]]; + $this->checkPropertyHook($$, #5); } +; + +property_hook_body: + ';' { $$ = null; } + | '{' inner_statement_list '}' { $$ = $2; } + | T_DOUBLE_ARROW expr ';' { $$ = $2; } +; + +property_hook_modifiers: + /* empty */ { $$ = 0; } + | property_hook_modifiers member_modifier + { $this->checkPropertyHookModifiers($1, $2, #2); $$ = $1 | $2; } +; + expr_list_forbid_comma: non_empty_expr_list no_comma ; diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 3fc96d98c3..55fd8b78e1 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -23,6 +23,8 @@ class Property implements PhpParser\Builder { protected ?Node $type = null; /** @var list */ protected array $attributeGroups = []; + /** @var list */ + protected array $hooks = []; /** * Creates a property builder. @@ -88,6 +90,28 @@ public function makeReadonly() { return $this; } + /** + * Makes the property abstract. Requires at least one property hook to be specified as well. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeAbstract() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT); + + return $this; + } + + /** + * Makes the property final. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeFinal() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); + + return $this; + } + /** * Sets default value for the property. * @@ -142,12 +166,27 @@ public function addAttribute($attribute) { return $this; } + /** + * Adds a property hook. + * + * @return $this The builder instance (for fluid interface) + */ + public function addHook(Node\PropertyHook $hook) { + $this->hooks[] = $hook; + + return $this; + } + /** * Returns the built class node. * * @return Stmt\Property The built property node */ public function getNode(): PhpParser\Node { + if ($this->flags & Modifiers::ABSTRACT && !$this->hooks) { + throw new PhpParser\Error('Only hooked properties may be declared abstract'); + } + return new Stmt\Property( $this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, [ @@ -155,7 +194,8 @@ public function getNode(): PhpParser\Node { ], $this->attributes, $this->type, - $this->attributeGroups + $this->attributeGroups, + $this->hooks ); } } diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index 0e9ff0e2d7..c844f6440e 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -21,6 +21,8 @@ class Param extends NodeAbstract { public int $flags; /** @var AttributeGroup[] PHP attribute groups */ public array $attrGroups; + /** @var PropertyHook[] Property hooks for promoted properties */ + public array $hooks; /** * Constructs a parameter node. @@ -33,13 +35,15 @@ class Param extends NodeAbstract { * @param array $attributes Additional attributes * @param int $flags Optional visibility flags * @param list $attrGroups PHP attribute groups + * @param PropertyHook[] $hooks Property hooks for promoted properties */ public function __construct( Expr $var, ?Expr $default = null, ?Node $type = null, bool $byRef = false, bool $variadic = false, array $attributes = [], int $flags = 0, - array $attrGroups = [] + array $attrGroups = [], + array $hooks = [] ) { $this->attributes = $attributes; $this->type = $type; @@ -49,10 +53,11 @@ public function __construct( $this->default = $default; $this->flags = $flags; $this->attrGroups = $attrGroups; + $this->hooks = $hooks; } public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default']; + return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default', 'hooks']; } public function getType(): string { diff --git a/lib/PhpParser/Node/PropertyHook.php b/lib/PhpParser/Node/PropertyHook.php new file mode 100644 index 0000000000..a8cde850f7 --- /dev/null +++ b/lib/PhpParser/Node/PropertyHook.php @@ -0,0 +1,78 @@ + false : Whether hook returns by reference + * 'params' => array(): Parameters + * 'attrGroups' => array(): PHP attribute groups + * @param array $attributes Additional attributes + */ + public function __construct($name, $body, array $subNodes = [], array $attributes = []) { + $this->attributes = $attributes; + $this->name = \is_string($name) ? new Identifier($name) : $name; + $this->body = $body; + $this->flags = $subNodes['flags'] ?? 0; + $this->byRef = $subNodes['byRef'] ?? false; + $this->params = $subNodes['params'] ?? []; + $this->attrGroups = $subNodes['attrGroups'] ?? []; + } + + public function returnsByRef(): bool { + return $this->byRef; + } + + public function getParams(): array { + return $this->params; + } + + public function getReturnType() { + return null; + } + + public function getStmts(): ?array { + if ($this->body instanceof Expr) { + return [new Return_($this->body)]; + } + return $this->body; + } + + public function getAttrGroups(): array { + return $this->attrGroups; + } + + public function getType(): string { + return 'PropertyHook'; + } + + public function getSubNodeNames(): array { + return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'body']; + } +} diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index 872ea6b738..edbd144e5d 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -18,6 +18,8 @@ class Property extends Node\Stmt { public ?Node $type; /** @var Node\AttributeGroup[] PHP attribute groups */ public array $attrGroups; + /** @var Node\PropertyHook[] Property hooks */ + public array $hooks; /** * Constructs a class property list node. @@ -27,17 +29,19 @@ class Property extends Node\Stmt { * @param array $attributes Additional attributes * @param null|Identifier|Name|ComplexType $type Type declaration * @param Node\AttributeGroup[] $attrGroups PHP attribute groups + * @param Node\PropertyHook[] $hooks Property hooks */ - public function __construct(int $flags, array $props, array $attributes = [], ?Node $type = null, array $attrGroups = []) { + public function __construct(int $flags, array $props, array $attributes = [], ?Node $type = null, array $attrGroups = [], array $hooks = []) { $this->attributes = $attributes; $this->flags = $flags; $this->props = $props; $this->type = $type; $this->attrGroups = $attrGroups; + $this->hooks = $hooks; } public function getSubNodeNames(): array { - return ['attrGroups', 'flags', 'type', 'props']; + return ['attrGroups', 'flags', 'type', 'props', 'hooks']; } /** diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index c3ce3a6ae6..5e558531ab 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -388,135 +388,135 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $action = array( - 133, 134, 135, 586, 136, 137, 1316, 755, 756, 757, + 133, 134, 135, 587, 136, 137, 1326, 755, 756, 757, 138, 38, 866, -367, 867, -367,-32766,-32766,-32766,-32767, -32767,-32767,-32767, 102, 103, 104, 105, 106, 1116, 1117, 1118, 1115, 1114, 1113, 1119, 749, 748,-32766, 0,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, -32767,-32766,-32766,-32766, 1031, 758,-32766,-32766,-32766, 945, - 292, -600, 838,-32766,-32766,-32766,-32766, 1092, -600, 265, + 292, -610, 838,-32766,-32766,-32766,-32766, 1092, -610, 265, 139, 406, 762, 763, 764, 765, 994,-32766, 431,-32766, -32766,-32766,-32766,-32766,-32766, 819, 766, 767, 768, 769, - 770, 771, 772, 773, 774, 775, 795, 587, 796, 797, + 770, 771, 772, 773, 774, 775, 795, 588, 796, 797, 798, 799, 787, 788, 347, 348, 790, 791, 776, 777, 778, 780, 781, 782, 358, 822, 823, 824, 825, 826, - 588, 783, 784, 589, 590,-32766, 807, 805, 806, 818, - 802, 803, -328, -194, 591, 592, 801, 593, 594, 595, - 596, 839, 597, 598, 1351, 1336,-32766, 1040, 841, 804, - 599, 600, 1335, 140, 2, 133, 134, 135, 586, 136, + 589, 783, 784, 590, 591,-32766, 807, 805, 806, 818, + 802, 803, -328, -194, 592, 593, 801, 594, 595, 596, + 597, 839, 598, 599, 1361, 1346,-32766, 1040, 841, 804, + 600, 601, 1345, 140, 2, 133, 134, 135, 587, 136, 137, 1064, 755, 756, 757, 138, 38, -110, 1040, 82, 485, 291, -110, 328, -110,-32766,-32766,-32766, 830, 307, -32766,-32766, -110, -110, -110, -110, -110, -110, -110, -110, 749, 748, 291, 107, 108, 109,-32766, 275,-32766,-32766, -32766,-32766,-32766,-32766,-32766, 995, 26, 36, 249, 110, 758,-32766,-32766,-32766, 1116, 1117, 1118, 1115, 1114, 1113, - 1119, -600, 729, -600, 265, 139, 406, 762, 763, 764, + 1119, -610, 729, -610, 265, 139, 406, 762, 763, 764, 765, -342,-32766, 431,-32766,-32766,-32766,-32766, 749, 748, 819, 766, 767, 768, 769, 770, 771, 772, 773, 774, - 775, 795, 587, 796, 797, 798, 799, 787, 788, 347, + 775, 795, 588, 796, 797, 798, 799, 787, 788, 347, 348, 790, 791, 776, 777, 778, 780, 781, 782, 358, - 822, 823, 824, 825, 826, 588, 783, 784, 589, 590, - 610, 807, 805, 806, 818, 802, 803, -328, -194, 591, - 592, 801, 593, 594, 595, 596, 35, 597, 598, 151, - 83, 84, 85, 486, 804, 599, 600, 840, 149, 779, - 750, 751, 752, 753, 754, -597, 755, 756, 757, 792, - 793, 37, -597, 86, 87, 88, 89, 90, 91, 92, + 822, 823, 824, 825, 826, 589, 783, 784, 590, 591, + 611, 807, 805, 806, 818, 802, 803, -328, -194, 592, + 593, 801, 594, 595, 596, 597, 35, 598, 599, 151, + 83, 84, 85, 486, 804, 600, 601, 840, 149, 779, + 750, 751, 752, 753, 754, -607, 755, 756, 757, 792, + 793, 37, -607, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 1037, 275,-32766, -32766,-32766, 963, 964,-32766,-32766,-32766, 965, -193, 127, 110, 384, 383, 959, 758,-32766,-32766,-32766, 129, 1040, - -32766, 425,-32766,-32766,-32766, 1252, 238, 145, 759, 760, + -32766, 425,-32766,-32766,-32766, 1262, 238, 145, 759, 760, 761, 762, 763, 764, 765, 252,-32766, 828,-32766,-32766, - -551, 560, 311, 284, 819, 766, 767, 768, 769, 770, + -561, 561, 311, 284, 819, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 795, 817, 796, 797, 798, 799, 787, 788, 789, 816, 790, 791, 776, 777, 778, 780, 781, 782, 821, 822, 823, 824, 825, 826, 827, - 783, 784, 785, 786, -553, 807, 805, 806, 818, 802, + 783, 784, 785, 786, -563, 807, 805, 806, 818, 802, 803, -85, 239, 794, 800, 801, 808, 809, 811, 810, - 947, 812, 813, 1286, -551, -551, 839, 616, 804, 815, - 814, 50, 51, 52, 516, 53, 54, 104, 105, 106, - -551, 55, 56, 924, 57, -597, 924, -597, 461, 462, - 463, 292, -557,-32766, -551, 393, 1361, 7, 313, 1362, - 359, 382, 383, 1093, 24, 947, -549, 741, -553, -553, + 947, 812, 813, 1296, -561, -561, 839, 617, 804, 815, + 814, 50, 51, 52, 517, 53, 54, 104, 105, 106, + -561, 55, 56, 924, 57, -607, 924, -607, 461, 462, + 463, 292, -567,-32766, -561, 393, 1371, 7, 313, 1372, + 359, 382, 383, 1093, 24, 947, -559, 741, -563, -563, 835, 425, 325, 719,-32766, 1063, 720, -85, 341, 58, - 59,-32766, 152, -193, -548, 60, 1108, 61, 246, 247, - 62, 63, 64, 65, 66, 67, 68, 69, -553, 28, - 267, 70, 446, 517, 288, 364, 75, 1280, 1281, 518, - 1332, 839, 328, 1274, 300, 1278, 42, 19, 519, 866, - 520, 867, 521, 342, 522, 924, 914, 523, 524, 914, - -549, -549, 44, 45, 447, 379, 378,-32766, 46, 525, - 1027, 1026, 1025, 1028, 370, 340, -549, 836, -548, -548, - -591, 1238, -591, 527, 528, 529, 1245,-32766, -556, 1040, - -549, -272, 1037, 832, -548, 531, 532, 372, 1266, 1267, - 1268, 1269, 1271, 1263, 1264, 299, -555, 376, -548, 1040, - 48, 1270, 1265, 291, 1040, 1247, 1246, 1248, 300, 830, - 1037, 71, 1243, 391, 839, 323, 324, 328, 924, -153, - -153, -153, 926, 660, 20, 926, 714, 442, 914, 714, - 679, 680, 1040, 1039, -153, 443, -153, 444, -153, 445, + 59,-32766, 152, -193, -558, 60, 1108, 61, 246, 247, + 62, 63, 64, 65, 66, 67, 68, 69, -563, 28, + 267, 70, 446, 518, 288, 364, 75, 1290, 1291, 519, + 1342, 839, 328, 1284, 300, 1288, 42, 19, 520, 866, + 521, 867, 522, 342, 523, 924, 914, 524, 525, 914, + -559, -559, 44, 45, 447, 379, 378,-32766, 46, 526, + 1027, 1026, 1025, 1028, 370, 340, -559, 836, -558, -558, + -601, 1248, -601, 528, 529, 530, 1255,-32766, -566, 1040, + -559, -272, 1037, 832, -558, 532, 533, 372, 1276, 1277, + 1278, 1279, 1281, 1273, 1274, 299, -565, 376, -558, 1040, + 48, 1280, 1275, 291, 1040, 1257, 1256, 1258, 300, 830, + 1037, 71, 1253, 391, 839, 323, 324, 328, 924, -153, + -153, -153, 926, 661, 20, 926, 714, 442, 914, 714, + 680, 681, 1040, 1039, -153, 443, -153, 444, -153, 445, -153, 845, 288, 28, 267, -87, 431, -84, 721, -78, - 377, 941, 1247, 1246, 1248, 839, 284, 749, 748, 1278, - 834, 963, 964, 154, 301, 302, 526, 716, 329, 924, + 377, 941, 1257, 1256, 1258, 839, 284, 749, 748, 1288, + 834, 963, 964, 154, 301, 302, 527, 716, 329, 924, 155, 900, 959, -110, -110, -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 28, 268, 694, 142, 126, 1238, 141, 328, 156, 724, - 328, 914, 839, 158, 926, 33, 1278, -73, 714, -153, - 532, -78, 1266, 1267, 1268, 1269, 1271, 1263, 1264, 1154, - 1156, -58, 1247, 1246, 1248, 1270, 1265, -550, 695, 924, - -547, 1094, 470, 471, -57, 73, 150, 409, 380, 381, - 324, 328, 1238, 385, 386, 651, 652, 749, 748, 696, - 697, 124, 914, 924, -4, 924, 531, 532, -72, 1266, - 1267, 1268, 1269, 1271, 1263, 1264, 125, 130, 1247, 1246, - 1248, 131, 1270, 1265, 284, 144, 159, 980, 160, 749, + 28, 268, 694, 142, 126, 1248, 141, 328, 156, 724, + 328, 914, 839, 158, 926, 33, 1288, -73, 714, -153, + 533, -78, 1276, 1277, 1278, 1279, 1281, 1273, 1274, 1164, + 1166, -58, 1257, 1256, 1258, 1280, 1275, -560, 695, 924, + -557, 1094, 470, 471, -57, 73, 150, 409, 380, 381, + 324, 328, 1248, 385, 386, 652, 653, 749, 748, 696, + 697, 124, 914, 924, -4, 924, 532, 533, -72, 1276, + 1277, 1278, 1279, 1281, 1273, 1274, 125, 130, 1257, 1256, + 1258, 131, 1280, 1275, 284, 144, 159, 980, 160, 749, 748, 714, 73, 731,-32766, 161, 162, 324, 328, 163, - 1245, -550, -550, -302, -547, -547, -71,-32766,-32766,-32766, - 289,-32766, -70,-32766, 290,-32766, -69, -550,-32766, -547, - -547, -68, 914,-32766,-32766,-32766,-32766, -67, -66,-32766, - -32766, -550, 1245, -65, -547,-32766, 422, -46, 926,-32766, + 1255, -560, -560, -302, -557, -557, -71,-32766,-32766,-32766, + 289,-32766, -70,-32766, 290,-32766, -69, -560,-32766, -557, + -557, -68, 914,-32766,-32766,-32766,-32766, -67, -66,-32766, + -32766, -560, 1255, -65, -557,-32766, 422, -46, 926,-32766, -32766,-32766, 714,-32766,-32766,-32766, 914,-32766, 914, -298, -32766, -18, 148, 274, 285,-32766,-32766,-32766, 730, 733, 923,-32766,-32766, 147, 275, 280, 281,-32766, 422, 286, 377, 287, 438, 28, 268, 74,-32766, 298, 334, 293, - 110, 963, 964, -547, -547, 839, 526, 294, 49, 1278, - 689, 530, 959, -110, -110, -110, 146, 830, 926, -547, - -32766, 839, 714, 682, 705, 565, 666, 1123, 667, 23, - 960, 649, 571, -547, 308, 10, 1363, -50, 305, 312, - 614, 306, 926, 1285, 926, 1238, 714, 661, 714, -4, - 707,-32766, 467, 943, -511, 1275, 496, 1211, 1287, -501, - 532, 683, 1266, 1267, 1268, 1269, 1271, 1263, 1264, 132, - 0, 8, 303, 304, 27, 1270, 1265, -585, 300, 1279, - -32766, 838, 0, 0, 0, 73, 1245, 0, 375, 0, + 110, 963, 964, -557, -557, 839, 527, 294, 49, 1288, + 690, 531, 959, -110, -110, -110, 146, 830, 926, -557, + -32766, 839, 714, 683, 705, 566, 667, 1123, 668, 23, + 960, 650, 572, -557, 308, 10, 1373, -50, 305, 312, + 615, 306, 926, 1295, 926, 1248, 714, 662, 714, -4, + 707,-32766, 467, 943, -521, 1285, 496, 1221, 1297, -511, + 533, 684, 1276, 1277, 1278, 1279, 1281, 1273, 1274, 132, + 0, 8, 303, 304, 27, 1280, 1275, -595, 300, 1289, + -32766, 838, 0, 0, 0, 73, 1255, 0, 375, 0, 324, 328, 0,-32766,-32766,-32766, 0,-32766, 0,-32766, 0,-32766, 128, 0,-32766, 0, 0, 0, 0,-32766, - -32766,-32766,-32766, 0, 374,-32766,-32766, 0, 1245, 0, + -32766,-32766,-32766, 0, 374,-32766,-32766, 0, 1255, 0, 924,-32766, 422, -275, 0,-32766,-32766,-32766, 40,-32766, -32766,-32766, 41,-32766, 738, 739,-32766, 858, 905, 924, 1004,-32766,-32766,-32766,-32766, 981, 988,-32766,-32766, 978, - 1245, 989, 903,-32766, 422, 976, 1097,-32766,-32766,-32766, + 1255, 989, 903,-32766, 422, 976, 1097,-32766,-32766,-32766, 1100,-32766,-32766,-32766, 1101,-32766, 850, 1098,-32766, 1099, - 1105, -273, 491,-32766,-32766,-32766,-32766, 1302, 1320,-32766, - -32766, 1354, 1245, 578, 654,-32766, 422, -584, -583,-32766, - -32766,-32766, -557,-32766,-32766,-32766, -556,-32766, -555, -554, - -32766, -495, 1, 914, 29,-32766,-32766,-32766, 30, 39, - 1252,-32766,-32766, 43, 47, 72, 76,-32766, 422, -250, - -250, -250, 914, 77, 78, 377,-32766, 1252, 79, 80, + 1105, -273, 491,-32766,-32766,-32766,-32766, 1312, 1330,-32766, + -32766, 1364, 1255, 579, 655,-32766, 422, -594, -593,-32766, + -32766,-32766, -567,-32766,-32766,-32766, -566,-32766, -565, -564, + -32766, -505, 1, 914, 29,-32766,-32766,-32766, 30, 39, + 1262,-32766,-32766, 43, 47, 72, 76,-32766, 422, -250, + -250, -250, 914, 77, 78, 377,-32766, 1262, 79, 80, 81, 143, 328, 153, 157, 244, 963, 964, -249, -249, - -249, 526, 330, 359, 377, 360, 900, 959, -110, -110, + -249, 527, 330, 359, 377, 360, 900, 959, -110, -110, -110, 361, 362, 363, 364, 963, 964, -16, 365, 366, - 526, 367, 368, 369, 0, 900, 959, -110, -110, -110, - 371, 439, 559, 0, -272,-32766, 12, 13, 14, 926, - 15, 1245, 34, 714, -250, 17, 408, 487,-32766,-32766, + 527, 367, 368, 369, 0, 900, 959, -110, -110, -110, + 371, 439, 560, 0, -272,-32766, 12, 13, 14, 926, + 15, 1255, 34, 714, -250, 17, 408, 487,-32766,-32766, -32766, 839,-32766, 488,-32766, 495,-32766, 498, 926,-32766, 499, 735, 714, -249,-32766,-32766,-32766, 500, 839, 501, - -32766,-32766, 505, 506, 507, 514,-32766, 422, 576, 700, - 1256, 1194, 1276, 1066, 1065,-32766, -110, -110, 1046, 1233, + -32766,-32766, 505, 506, 507, 515,-32766, 422, 577, 700, + 1266, 1204, 1286, 1066, 1065,-32766, -110, -110, 1046, 1243, 1042, -110, -277, -102, 11, 16, 21, -110, 297, 407, - 607, 611, 640, -110, -110, 706,-32766, 1198, -110, 1251, - 1195, 1333, 0, 322, -110, 373, 715, 718, 722, 723, + 608, 612, 641, -110, -110, 706,-32766, 1208, -110, 1261, + 1205, 1343, 0, 322, -110, 373, 715, 718, 722, 723, 725, 726, 727,-32766, 728, 0, 732, 717, 300, 901, - 1358, 75, 1360, 861, 0, 860, 869, 328, 953, 996, - 868, 1359, 952, 950, 951, 300, 954, 1226, 75, 934, - 944, 0, 932, 986, 328, 987, 638, 1357, 1314, 1303, - 1321, 1330 + 1368, 75, 1370, 861, 0, 860, 869, 328, 953, 996, + 868, 1369, 952, 950, 951, 300, 954, 1236, 75, 934, + 944, 0, 932, 986, 328, 987, 639, 1367, 1324, 1313, + 1331, 1340 ); protected array $actionCheck = array( @@ -703,25 +703,25 @@ class Php7 extends \PhpParser\ParserAbstract 787, 589, 788, 788, 788, 854, 855, 798, 822, 494, 480, 643, 288, 623, 822, 822, 817, 615, 798, 822, 798, 822, 778, 822, 822, 822, 798, 822, 819, 545, - 822, 770, 641, 198, 822, 38, 933, 934, 624, 941, - 927, 942, 989, 946, 947, 1072, 919, 953, 931, 948, - 990, 926, 922, 829, 745, 760, 801, 784, 917, 811, - 811, 811, 910, 914, 811, 811, 811, 811, 811, 811, - 811, 811, 745, 774, 844, 816, 963, 761, 765, 1035, - 776, 1084, 771, 961, 1037, 949, 848, 769, 1002, 969, - 1016, 1069, 970, 971, 1003, 1038, 857, 1039, 1085, 826, - 1087, 1088, 885, 976, 1073, 811, 933, 947, 626, 931, - 948, 926, 922, 802, 797, 790, 796, 785, 781, 737, - 775, 821, 1040, 906, 795, 896, 972, 916, 745, 897, - 993, 998, 1004, 1010, 1071, 835, 833, 900, 1090, 977, - 979, 980, 1074, 1041, 1075, 852, 994, 840, 1012, 839, - 1091, 1014, 1017, 1024, 1026, 1076, 1093, 1077, 905, 1078, - 858, 837, 888, 810, 1094, 285, 834, 836, 850, 988, - 498, 960, 1080, 1095, 1096, 1029, 1030, 1031, 1097, 1098, - 951, 860, 995, 809, 997, 991, 865, 866, 659, 842, - 1045, 830, 831, 777, 666, 694, 1099, 1101, 1102, 952, - 827, 813, 869, 871, 1046, 773, 1047, 1104, 699, 872, - 772, 1105, 1036, 779, 780, 705, 728, 715, 783, 838, + 822, 770, 772, 641, 198, 822, 38, 933, 934, 624, + 941, 927, 942, 989, 946, 947, 1072, 919, 953, 931, + 948, 990, 926, 922, 829, 745, 760, 801, 784, 917, + 811, 811, 811, 910, 914, 811, 811, 811, 811, 811, + 811, 811, 811, 745, 774, 844, 816, 963, 761, 765, + 1035, 776, 1084, 771, 961, 1037, 949, 848, 769, 1002, + 969, 1016, 1069, 970, 971, 1003, 1038, 857, 1039, 1085, + 826, 1087, 1088, 885, 976, 1073, 811, 933, 947, 626, + 931, 948, 926, 922, 802, 797, 790, 796, 785, 781, + 737, 775, 821, 1040, 906, 795, 896, 972, 916, 745, + 897, 993, 998, 1004, 1010, 1071, 835, 833, 900, 1090, + 977, 979, 980, 1074, 1041, 1075, 852, 994, 840, 1012, + 839, 1091, 1014, 1017, 1024, 1026, 1076, 1093, 1077, 905, + 1078, 858, 837, 888, 810, 1094, 285, 834, 836, 850, + 988, 498, 960, 1080, 1095, 1096, 1029, 1030, 1031, 1097, + 1098, 951, 860, 995, 809, 997, 991, 865, 866, 659, + 842, 1045, 830, 831, 777, 666, 694, 1099, 1101, 1102, + 952, 827, 813, 869, 871, 1046, 773, 1047, 1104, 699, + 872, 1105, 1036, 779, 780, 705, 728, 715, 783, 838, 1082, 804, 800, 812, 981, 780, 828, 875, 1107, 876, 880, 884, 1032, 887, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -775,10 +775,10 @@ class Php7 extends \PhpParser\ParserAbstract protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 603, 603, - 603, 603,32767,32767, 254, 102,32767,32767, 470, 387, - 387, 387,32767,32767, 545, 545, 545, 545, 545, 545, - 32767,32767,32767,32767,32767,32767, 470,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 613, 613, + 613, 613,32767,32767, 254, 102,32767,32767, 480, 397, + 397, 397,32767,32767, 555, 555, 555, 555, 555, 555, + 32767,32767,32767,32767,32767,32767, 480,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, @@ -789,60 +789,60 @@ class Php7 extends \PhpParser\ParserAbstract 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, 324,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 596,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 606,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 474, 453, - 454, 456, 457, 386, 546, 602, 327, 599, 385, 145, - 339, 329, 242, 330, 258, 475, 259, 476, 479, 480, - 215, 287, 382, 149, 150, 417, 471, 419, 469, 473, - 418, 392, 398, 399, 400, 401, 402, 403, 404, 405, - 406, 407, 408, 409, 410, 390, 391, 472,32767,32767, - 450, 449, 448, 415,32767,32767,32767,32767,32767,32767, - 32767,32767, 102,32767, 416, 420, 389, 423, 421, 422, - 439, 440, 437, 438, 441,32767,32767,32767,32767, 442, - 443, 444, 445, 316,32767,32767, 366, 364, 316, 111, - 32767,32767, 430, 431,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 487, 539, 447,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 385, 484, + 463, 464, 466, 467, 396, 556, 612, 327, 609, 395, + 145, 339, 329, 242, 330, 258, 485, 259, 486, 489, + 490, 215, 382, 149, 150, 427, 481, 429, 479, 483, + 428, 402, 408, 409, 410, 411, 412, 413, 414, 415, + 416, 417, 418, 419, 420, 400, 401, 482,32767,32767, + 460, 459, 458, 425,32767,32767,32767,32767,32767,32767, + 32767,32767, 102,32767, 426, 430, 399, 433, 431, 432, + 449, 450, 447, 448, 451,32767,32767,32767,32767, 452, + 453, 454, 455, 316,32767,32767, 366, 364, 316, 111, + 32767,32767, 440, 441,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 497, 549, 457,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 102,32767, 100, 541, 412, 414, 507, 425, 426, - 424, 393,32767, 514,32767, 102,32767, 516,32767,32767, - 32767,32767,32767,32767,32767, 540,32767, 547, 547,32767, - 500, 100, 195,32767,32767, 515,32767, 195, 195,32767, - 32767,32767,32767,32767,32767,32767,32767, 610, 500, 110, + 32767, 102,32767, 100, 551, 422, 424, 517, 435, 436, + 434, 403,32767, 524,32767, 102,32767, 526,32767,32767, + 32767,32767,32767,32767,32767, 550,32767, 557, 557,32767, + 510, 100, 195,32767,32767, 525,32767, 195, 195,32767, + 32767,32767,32767,32767,32767,32767,32767, 620, 510, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 32767, 195, 110,32767,32767,32767, 100, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 190,32767, 268, - 270, 102, 564, 195,32767, 519,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 512,32767,32767,32767, + 270, 102, 574, 195,32767, 529,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 522,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 500, 435, 138,32767, 138, 547, 427, 428, - 429, 502, 547, 547, 547, 312, 289,32767,32767,32767, - 32767, 517, 100, 100, 100, 100, 512,32767,32767,32767, - 32767, 111, 486, 99, 99, 99, 99, 99, 103, 101, + 32767,32767, 510, 445, 138,32767, 138, 557, 437, 438, + 439, 512, 557, 557, 557, 312, 289,32767,32767,32767, + 32767, 527, 100, 100, 100, 100, 522,32767,32767,32767, + 32767, 111, 496, 99, 99, 99, 99, 99, 103, 101, 32767,32767,32767,32767, 223,32767, 99,32767, 101, 101, - 32767,32767, 223, 225, 212, 101, 227,32767, 568, 569, - 223, 101, 227, 227, 227, 247, 247, 489, 318, 101, - 99, 101, 101, 197, 318, 318,32767, 101, 489, 318, - 489, 318, 199, 318, 318, 318, 489, 318,32767, 101, - 318, 214, 99, 99, 318,32767,32767,32767, 502,32767, - 32767,32767,32767,32767,32767,32767, 222,32767,32767,32767, - 32767,32767,32767,32767,32767, 534,32767, 552, 566, 433, - 434, 436, 551, 549, 458, 459, 460, 461, 462, 463, - 464, 466, 598,32767, 506,32767,32767,32767, 338,32767, - 608,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 609,32767, - 547,32767,32767,32767,32767, 432, 9, 74, 495, 42, - 43, 51, 57, 523, 524, 525, 526, 520, 521, 527, - 522,32767,32767, 529, 574,32767,32767, 548, 601,32767, - 32767,32767,32767,32767,32767, 138,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 534,32767, 136, - 32767,32767,32767,32767,32767,32767,32767,32767, 530,32767, - 32767,32767, 547,32767,32767,32767,32767, 314, 311,32767, + 32767,32767, 223, 225, 212, 101, 227,32767, 578, 579, + 223, 101, 227, 227, 227, 247, 247, 499, 318, 101, + 99, 101, 101, 197, 318, 318,32767, 101, 499, 318, + 499, 318, 199, 318, 318, 318, 499, 318,32767, 101, + 318, 214, 385, 99, 99, 318,32767,32767,32767, 512, + 32767,32767,32767,32767,32767,32767,32767, 222,32767,32767, + 32767,32767,32767,32767,32767,32767, 544,32767, 562, 576, + 443, 444, 446, 561, 559, 468, 469, 470, 471, 472, + 473, 474, 476, 608,32767, 516,32767,32767,32767, 338, + 32767, 618,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 619, + 32767, 557,32767,32767,32767,32767, 442, 9, 74, 505, + 42, 43, 51, 57, 533, 534, 535, 536, 530, 531, + 537, 532,32767,32767, 539, 584,32767,32767, 558, 611, + 32767,32767,32767,32767,32767,32767, 138,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 544,32767, + 136,32767,32767,32767,32767,32767,32767,32767,32767, 540, + 32767,32767,32767, 557,32767,32767,32767,32767, 314, 311, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 547,32767,32767,32767,32767, - 32767, 291,32767, 308,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 557,32767,32767,32767, + 32767,32767, 291,32767, 308,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 286,32767,32767, 381, 502, 294, 296, 297,32767,32767, + 32767,32767,32767, 381, 512, 294, 296, 297,32767,32767, 32767,32767, 360,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767, 152, 152, 3, 3, 341, 152, 152, 152, 341, 341, 152, 341, 341, 341, 152, 152, @@ -851,72 +851,72 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $goto = array( - 196, 196, 1038, 503, 701, 504, 1069, 433, 665, 625, - 662, 510, 710, 427, 321, 315, 316, 337, 580, 432, - 338, 434, 642, 897, 855, 897, 897, 167, 167, 167, - 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, - 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, - 189, 190, 191, 192, 218, 216, 219, 539, 540, 423, - 541, 544, 545, 546, 547, 548, 549, 550, 551, 1140, - 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, + 197, 197, 1038, 1069, 701, 353, 856, 433, 666, 479, + 1332, 1333, 710, 427, 321, 315, 316, 337, 581, 432, + 338, 434, 643, 897, 855, 897, 897, 167, 167, 167, + 167, 221, 198, 194, 194, 177, 179, 216, 194, 194, + 194, 194, 194, 195, 195, 195, 195, 195, 195, 189, + 190, 191, 192, 193, 218, 216, 219, 540, 541, 423, + 542, 545, 546, 547, 548, 549, 550, 551, 552, 1150, + 168, 169, 170, 196, 171, 172, 173, 166, 174, 175, 176, 178, 215, 217, 220, 240, 243, 254, 255, 257, 258, 259, 260, 261, 262, 263, 264, 269, 270, 271, - 272, 282, 283, 318, 319, 320, 428, 429, 430, 585, + 272, 282, 283, 318, 319, 320, 428, 429, 430, 586, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, - 200, 241, 188, 189, 190, 191, 192, 218, 1140, 201, - 182, 183, 184, 202, 198, 185, 242, 203, 201, 165, - 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, - 212, 213, 214, 859, 613, 628, 631, 632, 633, 634, - 655, 656, 657, 712, 856, 460, 279, 279, 279, 279, - 857, 627, 627, 479, 1322, 1323, 604, 1277, 1277, 1277, - 1277, 1277, 1277, 1277, 1277, 1277, 1277, 1220, 948, 465, - 852, 1221, 1224, 949, 1225, 979, 1189, 864, 421, 913, + 232, 233, 234, 235, 236, 180, 237, 181, 199, 200, + 201, 241, 189, 190, 191, 192, 193, 218, 1150, 202, + 182, 183, 184, 203, 199, 185, 242, 204, 202, 165, + 205, 206, 186, 207, 208, 209, 187, 210, 211, 188, + 212, 213, 214, 859, 614, 629, 632, 633, 634, 635, + 656, 657, 658, 712, 469, 469, 279, 279, 279, 279, + 857, 628, 628, 469, 626, 663, 605, 1287, 1287, 1287, + 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1230, 948, 852, + 482, 1231, 1234, 949, 1235, 1111, 1112, 864, 484, 913, 908, 909, 922, 865, 910, 862, 911, 912, 863, 1041, - 1041, 916, 441, 685, 956, 353, 357, 1033, 1049, 1050, - 831, 1091, 1086, 1087, 1088, 890, 357, 357, 356, 356, - 356, 356, 603, 1104, 552, 552, 552, 552, 577, 608, - 357, 357, 713, 852, 357, 837, 1364, 351, 511, 704, - 1244, 1102, 1244, 1244, 1337, 469, 469, 558, 1038, 1038, - 1244, 357, 357, 1038, 469, 1038, 1038, 1111, 1112, 1038, + 1041, 916, 979, 686, 956, 421, 357, 1033, 1049, 1050, + 831, 1091, 1086, 1087, 1088, 465, 357, 357, 356, 356, + 356, 356, 1199, 890, 553, 553, 553, 553, 578, 609, + 357, 357, 852, 344, 357, 837, 1374, 354, 355, 917, + 1254, 918, 1254, 1254, 971, 412, 709, 559, 1038, 1038, + 1254, 357, 357, 1038, 351, 1038, 1038, 345, 344, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - 1329, 1329, 1329, 1329, 698, 1244, 837, 833, 837, 1000, - 1244, 1244, 1244, 1244, 1044, 1043, 1244, 1244, 1244, 698, - 396, 563, 556, 698, 344, 872, 1347, 1347, 554, 1308, - 554, 554, 971, 412, 709, 930, 1047, 1048, 554, 931, - 884, 575, 946, 871, 1347, 946, 327, 310, 345, 344, - 690, 343, 556, 563, 572, 573, 346, 583, 606, 620, - 621, 1350, 1350, 458, 635, 637, 639, 25, 973, 973, - 973, 973, 664, 482, 458, 967, 974, 1296, 1296, 1137, - 558, 484, 852, 1296, 1296, 1296, 1296, 1296, 1296, 1296, - 1296, 1296, 1296, 1293, 1293, 917, 426, 918, 615, 1293, - 1293, 1293, 1293, 1293, 1293, 1293, 1293, 1293, 1293, 543, - 543, 5, 1062, 6, 440, 543, 543, 543, 543, 543, - 543, 543, 543, 543, 543, 1003, 1324, 1325, 975, 686, - 736, 581, 618, 555, 1012, 1007, 849, 557, 567, 670, - 339, 557, 877, 567, 962, 1237, 399, 464, 451, 451, - 451, 451, 874, 1319, 405, 1319, 1319, 1235, 619, 472, - 584, 473, 474, 1319, 1017, 1017, 882, 570, 1022, 1355, - 1356, 737, 641, 643, 1075, 886, 663, 740, 1079, 0, - 687, 691, 1014, 699, 708, 1010, 984, 354, 355, 1331, - 1331, 1331, 1331, 542, 542, 880, 250, 250, 1122, 542, - 0, 542, 542, 542, 542, 542, 542, 542, 542, 0, - 326, 276, 326, 326, 658, 659, 1315, 676, 677, 678, - 0, 0, 0, 248, 248, 248, 248, 245, 251, 398, - 401, 564, 605, 609, 0, 0, 1239, 0, 0, 0, - 0, 0, 451, 451, 451, 451, 451, 451, 451, 451, + 1339, 1339, 1339, 1339, 698, 1254, 837, 833, 837, 1347, + 1254, 1254, 1254, 1254, 1047, 1048, 1254, 1254, 1254, 698, + 1000, 564, 557, 698, 604, 1104, 1357, 1357, 555, 1318, + 555, 555, 1044, 1043, 713, 930, 327, 310, 555, 931, + 511, 704, 946, 1102, 1357, 946, 636, 638, 640, 460, + 512, 343, 557, 564, 573, 574, 346, 584, 607, 621, + 622, 1360, 1360, 458, 872, 582, 619, 25, 973, 973, + 973, 973, 1334, 1335, 458, 967, 974, 1306, 1306, 884, + 559, 852, 871, 1306, 1306, 1306, 1306, 1306, 1306, 1306, + 1306, 1306, 1306, 1303, 1303, 426, 441, 616, 396, 1303, + 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 544, + 544, 5, 576, 6, 665, 544, 544, 544, 544, 544, + 544, 544, 544, 544, 544, 1003, 1147, 1062, 975, 440, + 736, 687, 671, 556, 1012, 1007, 339, 558, 568, 849, + 877, 558, 962, 568, 405, 1247, 399, 464, 451, 451, + 451, 451, 620, 1329, 874, 1329, 1329, 1245, 1075, 472, + 585, 473, 474, 1329, 1017, 1017, 882, 571, 1022, 1365, + 1366, 737, 642, 644, 740, 886, 664, 1122, 1079, 0, + 688, 691, 1014, 699, 708, 1010, 984, 1029, 0, 1341, + 1341, 1341, 1341, 543, 543, 880, 250, 250, 0, 543, + 0, 543, 543, 543, 543, 543, 543, 543, 543, 0, + 326, 276, 326, 326, 0, 0, 1325, 435, 0, 0, + 1249, 0, 435, 248, 248, 248, 248, 245, 251, 0, + 1045, 1045, 503, 0, 504, 670, 1056, 1052, 1053, 0, + 510, 0, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 0, 0, 451, 0, 0, 1077, 0, - 410, 411, 1317, 1317, 1077, 674, 0, 675, 0, 414, - 415, 416, 0, 688, 935, 1127, 417, 0, 0, 0, - 349, 623, 1261, 0, 0, 0, 0, 1019, 0, 0, - 1240, 1241, 0, 0, 0, 876, 0, 668, 998, 847, - 0, 0, 0, 870, 885, 873, 1074, 1078, 435, 0, - 0, 0, 0, 435, 0, 1234, 982, 0, 1242, 1305, - 1306, 1045, 1045, 0, 0, 0, 669, 1056, 1052, 1053, + 410, 411, 1327, 1327, 1077, 675, 1271, 676, 0, 414, + 415, 416, 0, 689, 1250, 1251, 417, 935, 1137, 0, + 0, 349, 0, 847, 624, 885, 873, 1074, 1078, 0, + 1019, 659, 660, 0, 677, 678, 679, 982, 876, 0, + 669, 998, 1252, 1315, 1316, 0, 870, 398, 401, 565, + 606, 610, 0, 0, 0, 0, 0, 0, 1244, 0, + 0, 972, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1120, 889, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 972, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1120, 889, 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, @@ -927,8 +927,8 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $gotoCheck = array( - 42, 42, 73, 155, 73, 155, 127, 66, 66, 56, - 56, 155, 9, 66, 66, 66, 66, 66, 66, 66, + 42, 42, 73, 128, 73, 97, 26, 66, 66, 183, + 183, 183, 9, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 25, 25, 25, 25, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -944,55 +944,55 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 15, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 26, 83, 23, 23, 23, 23, - 27, 108, 108, 178, 178, 178, 130, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 79, 79, 151, - 22, 79, 79, 79, 79, 49, 151, 15, 43, 15, + 81, 81, 81, 81, 154, 154, 23, 23, 23, 23, + 27, 108, 108, 154, 56, 56, 131, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 79, 79, 22, + 84, 79, 79, 79, 79, 145, 145, 15, 84, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 89, - 89, 15, 83, 89, 89, 97, 14, 89, 89, 89, - 6, 15, 15, 15, 15, 45, 14, 14, 24, 24, - 24, 24, 8, 8, 107, 107, 107, 107, 174, 107, - 14, 14, 8, 22, 14, 12, 14, 181, 8, 8, - 73, 8, 73, 73, 183, 149, 149, 14, 73, 73, - 73, 14, 14, 73, 149, 73, 73, 144, 144, 73, + 89, 15, 49, 89, 89, 43, 14, 89, 89, 89, + 6, 15, 15, 15, 15, 156, 14, 14, 24, 24, + 24, 24, 156, 45, 107, 107, 107, 107, 179, 107, + 14, 14, 22, 175, 14, 12, 14, 97, 97, 65, + 73, 65, 73, 73, 93, 93, 93, 14, 73, 73, + 73, 14, 14, 73, 186, 73, 73, 175, 175, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 9, 9, 9, 9, 7, 73, 12, 7, 12, 103, - 73, 73, 73, 73, 118, 118, 73, 73, 73, 7, - 62, 76, 76, 7, 170, 35, 184, 184, 19, 14, - 19, 19, 93, 93, 93, 73, 119, 119, 19, 73, - 35, 104, 9, 35, 184, 9, 171, 171, 170, 170, + 9, 9, 9, 9, 7, 73, 12, 7, 12, 188, + 73, 73, 73, 73, 120, 120, 73, 73, 73, 7, + 103, 76, 76, 7, 8, 8, 189, 189, 19, 14, + 19, 19, 119, 119, 8, 73, 176, 176, 19, 73, + 8, 8, 9, 8, 189, 9, 85, 85, 85, 83, 14, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 184, 184, 19, 85, 85, 85, 76, 19, 19, - 19, 19, 64, 84, 19, 19, 19, 172, 172, 150, - 14, 84, 22, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 173, 173, 65, 13, 65, 13, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 175, - 175, 46, 114, 46, 113, 175, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 50, 180, 180, 50, 116, - 50, 2, 2, 50, 50, 50, 18, 9, 9, 120, - 29, 9, 39, 9, 92, 14, 9, 9, 23, 23, - 23, 23, 37, 130, 28, 130, 130, 162, 80, 9, - 9, 9, 9, 130, 107, 107, 9, 48, 110, 9, - 9, 48, 48, 48, 129, 41, 48, 99, 132, -1, - 48, 48, 48, 48, 48, 48, 96, 97, 97, 130, - 130, 130, 130, 158, 158, 9, 5, 5, 147, 158, - -1, 158, 158, 158, 158, 158, 158, 158, 158, -1, - 24, 24, 24, 24, 86, 86, 130, 86, 86, 86, - -1, -1, -1, 5, 5, 5, 5, 5, 5, 59, - 59, 59, 59, 59, -1, -1, 20, -1, -1, -1, - -1, -1, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, -1, -1, 23, -1, -1, 130, -1, - 82, 82, 130, 130, 130, 82, -1, 82, -1, 82, - 82, 82, -1, 82, 17, 17, 82, -1, -1, -1, - 82, 17, 20, -1, -1, -1, -1, 17, -1, -1, - 20, 20, -1, -1, -1, 17, -1, 17, 17, 20, - -1, -1, -1, 17, 16, 16, 16, 16, 117, -1, - -1, -1, -1, 117, -1, 17, 16, -1, 20, 20, - 20, 117, 117, -1, -1, -1, 117, 117, 117, 117, + 76, 189, 189, 19, 35, 2, 2, 76, 19, 19, + 19, 19, 185, 185, 19, 19, 19, 177, 177, 35, + 14, 22, 35, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 178, 178, 13, 83, 13, 62, 178, + 178, 178, 178, 178, 178, 178, 178, 178, 178, 180, + 180, 46, 104, 46, 64, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 180, 50, 155, 115, 50, 113, + 50, 117, 121, 50, 50, 50, 29, 9, 9, 18, + 39, 9, 92, 9, 28, 14, 9, 9, 23, 23, + 23, 23, 80, 131, 37, 131, 131, 167, 130, 9, + 9, 9, 9, 131, 107, 107, 9, 48, 110, 9, + 9, 48, 48, 48, 99, 41, 48, 148, 133, -1, + 48, 48, 48, 48, 48, 48, 96, 114, -1, 131, + 131, 131, 131, 163, 163, 9, 5, 5, -1, 163, + -1, 163, 163, 163, 163, 163, 163, 163, 163, -1, + 24, 24, 24, 24, -1, -1, 131, 118, -1, -1, + 20, -1, 118, 5, 5, 5, 5, 5, 5, -1, + 118, 118, 160, -1, 160, 118, 118, 118, 118, -1, + 160, -1, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, -1, -1, 23, -1, -1, 131, -1, + 82, 82, 131, 131, 131, 82, 20, 82, -1, 82, + 82, 82, -1, 82, 20, 20, 82, 17, 17, -1, + -1, 82, -1, 20, 17, 16, 16, 16, 16, -1, + 17, 86, 86, -1, 86, 86, 86, 16, 17, -1, + 17, 17, 20, 20, 20, -1, 17, 59, 59, 59, + 59, 59, -1, -1, -1, -1, -1, -1, 17, -1, + -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 16, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 16, 16, -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, @@ -1003,47 +1003,49 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $gotoBase = array( - 0, 0, -295, 0, 0, 485, 207, 287, 234, -11, - 0, 0, -43, 47, -73, -187, 140, 96, 115, 53, - 131, 0, -79, 173, 235, 20, 170, 176, 105, 132, - 0, 0, 0, 0, 0, -58, 0, 101, 0, 107, - 0, 23, -1, 186, 0, 209, -339, 0, -258, 188, - 404, 0, 0, 0, 0, 0, -31, 0, 0, 474, - 0, 0, 268, 0, 123, 372, -231, 0, 0, 0, + 0, 0, -361, 0, 0, 485, 207, 287, 306, -11, + 0, 0, -43, 46, -73, -187, 121, 99, 118, 53, + 115, 0, -80, 173, 235, 20, 2, 176, 95, 128, + 0, 0, 0, 0, 0, -19, 0, 103, 0, 105, + 0, 23, -1, 203, 0, 217, -339, 0, -258, 205, + 404, 0, 0, 0, 0, 0, 144, 0, 0, 552, + 0, 0, 346, 0, 165, 246, -231, 0, 0, 0, 0, 0, 0, -5, 0, 0, -36, 0, 0, -213, - 102, -196, 56, -104, -109, -128, -218, 0, 0, -61, - 0, 0, 103, 16, 0, 0, 32, -261, 0, 58, - 0, 0, 0, 264, 288, 0, 0, 216, -57, 0, - 86, 0, 0, 126, 128, 0, 135, 325, 24, 40, - 138, 0, 0, 0, 0, 0, 0, 4, 0, 88, - 178, 0, 25, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 43, 0, 231, - 124, -69, 0, 0, 0, -495, 0, 0, 245, 0, - 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, - 15, 13, 129, 145, 219, 161, 0, 0, -119, 0, - 42, 227, 0, 233, 7, 0, 0 + 96, -196, 56, 60, -272, -146, -141, 0, 0, -61, + 0, 0, 101, -42, 0, 0, 32, -481, 0, 55, + 0, 0, 0, 275, 359, 0, 0, 216, -57, 0, + 86, 0, 0, 141, -35, 143, 0, 137, 234, 42, + 18, 131, 0, 0, 0, 0, 0, 0, 1, 0, + 72, 178, 0, 25, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -71, 0, 0, 22, 0, + 0, 0, 0, 0, 140, 171, -33, 0, 0, 0, + 24, 0, 0, 245, 0, 0, 0, 76, 0, 0, + 0, 0, 0, 0, 0, -46, 3, 129, 145, 219, + 161, 0, 0, -293, 0, -12, 244, 0, 268, 7, + 0, 0 ); protected array $gotoDefault = array( - -32768, 515, 744, 4, 745, 939, 820, 829, 601, 533, - 711, 350, 629, 424, 1313, 915, 1126, 582, 848, 1253, - 1227, 459, 851, 332, 734, 927, 898, 899, 402, 388, - 394, 400, 653, 630, 497, 883, 455, 875, 489, 878, - 454, 887, 164, 420, 513, 891, 3, 894, 561, 925, - 977, 389, 902, 390, 681, 904, 566, 906, 907, 397, - 403, 404, 1131, 574, 626, 919, 256, 568, 920, 387, + -32768, 516, 744, 4, 745, 939, 820, 829, 602, 534, + 711, 350, 630, 424, 1323, 915, 1136, 583, 848, 1263, + 1237, 459, 851, 332, 734, 927, 898, 899, 402, 388, + 394, 400, 654, 631, 497, 883, 455, 875, 489, 878, + 454, 887, 164, 420, 514, 891, 3, 894, 562, 925, + 977, 389, 902, 390, 682, 904, 567, 906, 907, 397, + 403, 404, 1141, 575, 627, 919, 256, 569, 920, 387, 921, 929, 392, 395, 692, 468, 508, 502, 413, 1106, - 569, 612, 650, 448, 476, 624, 636, 622, 483, 436, + 570, 613, 651, 448, 476, 625, 637, 623, 483, 436, 418, 331, 961, 969, 490, 466, 983, 352, 991, 742, - 1139, 644, 492, 999, 645, 1006, 1009, 534, 535, 481, - 1021, 273, 1024, 493, 22, 671, 1035, 1036, 672, 646, - 1058, 647, 673, 648, 1060, 475, 602, 1068, 456, 1076, - 1301, 457, 1080, 266, 1083, 278, 419, 437, 1089, 1090, - 9, 1096, 702, 703, 18, 277, 512, 1121, 693, 453, - 1138, 452, 1208, 1210, 562, 494, 1228, 480, 295, 1231, - 684, 509, 1236, 449, 1304, 450, 536, 477, 317, 537, - 1348, 309, 335, 314, 553, 296, 336, 538, 478, 1310, - 1318, 333, 31, 1338, 1349, 579, 617 + 1149, 645, 492, 999, 646, 1006, 1009, 535, 536, 481, + 1021, 273, 1024, 493, 1030, 22, 672, 1035, 1036, 673, + 647, 1058, 648, 674, 649, 1060, 475, 603, 1068, 456, + 1076, 1311, 457, 1080, 266, 1083, 278, 419, 437, 1089, + 1090, 9, 1096, 702, 703, 18, 277, 513, 1121, 693, + -32768,-32768,-32768,-32768, 453, 1148, 452, 1218, 1220, 563, + 494, 1238, 480, 295, 1241, 685, 509, 1246, 449, 1314, + 450, 537, 477, 317, 538, 1358, 309, 335, 314, 554, + 296, 336, 539, 478, 1320, 1328, 333, 31, 1348, 1359, + 580, 618 ); protected array $ruleToNonTerminal = array( @@ -1075,17 +1077,18 @@ class Php7 extends \PhpParser\ParserAbstract 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, - 111, 111, 112, 112, 112, 112, 110, 110, 110, 114, - 114, 114, 114, 89, 89, 117, 117, 117, 118, 118, - 115, 115, 119, 119, 121, 121, 122, 122, 116, 123, - 123, 120, 124, 124, 124, 124, 113, 113, 82, 82, - 82, 20, 20, 20, 126, 125, 125, 127, 127, 127, - 127, 60, 128, 128, 129, 61, 131, 131, 132, 132, - 133, 133, 86, 134, 134, 134, 134, 134, 134, 134, - 139, 139, 140, 140, 141, 141, 141, 141, 141, 142, - 143, 143, 138, 138, 135, 135, 137, 137, 145, 145, - 144, 144, 144, 144, 144, 144, 144, 136, 146, 146, - 148, 147, 147, 62, 104, 149, 149, 56, 56, 42, + 111, 111, 112, 112, 112, 112, 110, 110, 110, 115, + 115, 115, 115, 89, 89, 118, 118, 118, 119, 119, + 116, 116, 120, 120, 122, 122, 123, 123, 117, 124, + 124, 121, 125, 125, 125, 125, 113, 113, 82, 82, + 82, 20, 20, 20, 127, 126, 126, 128, 128, 128, + 128, 60, 129, 129, 130, 61, 132, 132, 133, 133, + 134, 134, 86, 135, 135, 135, 135, 135, 135, 135, + 140, 140, 141, 141, 142, 142, 142, 142, 142, 143, + 144, 144, 139, 139, 136, 136, 138, 138, 146, 146, + 145, 145, 145, 145, 145, 145, 145, 137, 147, 147, + 149, 148, 148, 150, 150, 114, 151, 151, 153, 153, + 153, 152, 152, 62, 104, 154, 154, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1095,21 +1098,21 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 156, 158, 158, 159, 150, 150, 155, - 155, 160, 161, 161, 162, 163, 164, 164, 164, 164, - 19, 19, 73, 73, 73, 73, 151, 151, 151, 151, - 166, 166, 152, 152, 154, 154, 154, 157, 157, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 173, - 173, 173, 108, 175, 175, 175, 175, 153, 153, 153, - 153, 153, 153, 153, 153, 59, 59, 169, 169, 169, - 169, 169, 176, 176, 165, 165, 165, 165, 177, 177, - 177, 177, 177, 177, 74, 74, 66, 66, 66, 66, - 130, 130, 130, 130, 180, 179, 168, 168, 168, 168, - 168, 168, 168, 167, 167, 167, 178, 178, 178, 178, - 107, 174, 182, 182, 181, 181, 183, 183, 183, 183, - 183, 183, 183, 183, 171, 171, 171, 171, 170, 185, - 184, 184, 184, 184, 184, 184, 184, 184, 186, 186, - 186, 186 + 42, 42, 42, 161, 163, 163, 164, 155, 155, 160, + 160, 165, 166, 166, 167, 168, 169, 169, 169, 169, + 19, 19, 73, 73, 73, 73, 156, 156, 156, 156, + 171, 171, 157, 157, 159, 159, 159, 162, 162, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 178, + 178, 178, 108, 180, 180, 180, 180, 158, 158, 158, + 158, 158, 158, 158, 158, 59, 59, 174, 174, 174, + 174, 174, 181, 181, 170, 170, 170, 170, 182, 182, + 182, 182, 182, 182, 74, 74, 66, 66, 66, 66, + 131, 131, 131, 131, 185, 184, 173, 173, 173, 173, + 173, 173, 173, 172, 172, 172, 183, 183, 183, 183, + 107, 179, 187, 187, 186, 186, 188, 188, 188, 188, + 188, 188, 188, 188, 176, 176, 176, 176, 175, 190, + 189, 189, 189, 189, 189, 189, 189, 189, 191, 191, + 191, 191 ); protected array $ruleToLength = array( @@ -1141,7 +1144,7 @@ class Php7 extends \PhpParser\ParserAbstract 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, - 0, 2, 1, 1, 1, 1, 6, 8, 6, 1, + 0, 2, 1, 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, @@ -1151,7 +1154,8 @@ class Php7 extends \PhpParser\ParserAbstract 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, - 1, 1, 3, 2, 2, 3, 1, 0, 1, 1, + 1, 1, 3, 0, 2, 0, 5, 8, 1, 3, + 3, 0, 2, 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, 4, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, @@ -1836,11 +1840,11 @@ protected function initReduceCallbacks(): void { $self->semValue = Modifiers::READONLY; }, 286 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(6-6)], null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); + $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); }, 287 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-8)], $self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(8-2)], $self->semStack[$stackPos-(8-1)]); + $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); }, 288 => static function ($self, $stackPos) { @@ -2098,654 +2102,686 @@ protected function initReduceCallbacks(): void { 382 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 383 => null, - 384 => null, + 383 => static function ($self, $stackPos) { + $self->semValue = []; + }, + 384 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + }, 385 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = []; }, 386 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, null); }, 387 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); + }, + 388 => static function ($self, $stackPos) { + $self->semValue = null; + }, + 389 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 388 => null, - 389 => null, 390 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 391 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = 0; }, 392 => static function ($self, $stackPos) { + $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 393 => null, + 394 => null, + 395 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 396 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 397 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 398 => null, + 399 => null, + 400 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 401 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 402 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 393 => static function ($self, $stackPos) { + 403 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 394 => static function ($self, $stackPos) { + 404 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 395 => null, - 396 => null, - 397 => static function ($self, $stackPos) { + 405 => null, + 406 => null, + 407 => static function ($self, $stackPos) { $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 398 => static function ($self, $stackPos) { + 408 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 399 => static function ($self, $stackPos) { + 409 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 400 => static function ($self, $stackPos) { + 410 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 401 => static function ($self, $stackPos) { + 411 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 402 => static function ($self, $stackPos) { + 412 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 403 => static function ($self, $stackPos) { + 413 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 404 => static function ($self, $stackPos) { + 414 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 405 => static function ($self, $stackPos) { + 415 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 406 => static function ($self, $stackPos) { + 416 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 407 => static function ($self, $stackPos) { + 417 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 408 => static function ($self, $stackPos) { + 418 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 409 => static function ($self, $stackPos) { + 419 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 410 => static function ($self, $stackPos) { + 420 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 411 => static function ($self, $stackPos) { + 421 => static function ($self, $stackPos) { $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 412 => static function ($self, $stackPos) { + 422 => static function ($self, $stackPos) { $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 413 => static function ($self, $stackPos) { + 423 => static function ($self, $stackPos) { $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 414 => static function ($self, $stackPos) { + 424 => static function ($self, $stackPos) { $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 415 => static function ($self, $stackPos) { + 425 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 416 => static function ($self, $stackPos) { + 426 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 417 => static function ($self, $stackPos) { + 427 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 418 => static function ($self, $stackPos) { + 428 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 419 => static function ($self, $stackPos) { + 429 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 420 => static function ($self, $stackPos) { + 430 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 421 => static function ($self, $stackPos) { + 431 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 422 => static function ($self, $stackPos) { + 432 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 423 => static function ($self, $stackPos) { + 433 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 424 => static function ($self, $stackPos) { + 434 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 425 => static function ($self, $stackPos) { + 435 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 426 => static function ($self, $stackPos) { + 436 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 427 => static function ($self, $stackPos) { + 437 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 428 => static function ($self, $stackPos) { + 438 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 429 => static function ($self, $stackPos) { + 439 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 430 => static function ($self, $stackPos) { + 440 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 431 => static function ($self, $stackPos) { + 441 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 432 => static function ($self, $stackPos) { + 442 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 433 => static function ($self, $stackPos) { + 443 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 434 => static function ($self, $stackPos) { + 444 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 435 => static function ($self, $stackPos) { + 445 => static function ($self, $stackPos) { $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 436 => static function ($self, $stackPos) { + 446 => static function ($self, $stackPos) { $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 437 => static function ($self, $stackPos) { + 447 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 438 => static function ($self, $stackPos) { + 448 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 439 => static function ($self, $stackPos) { + 449 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 440 => static function ($self, $stackPos) { + 450 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 441 => static function ($self, $stackPos) { + 451 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 442 => static function ($self, $stackPos) { + 452 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 443 => static function ($self, $stackPos) { + 453 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 444 => static function ($self, $stackPos) { + 454 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 445 => static function ($self, $stackPos) { + 455 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 446 => static function ($self, $stackPos) { + 456 => static function ($self, $stackPos) { $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 447 => static function ($self, $stackPos) { + 457 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 448 => static function ($self, $stackPos) { + 458 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 449 => static function ($self, $stackPos) { + 459 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 450 => static function ($self, $stackPos) { + 460 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 451 => static function ($self, $stackPos) { + 461 => static function ($self, $stackPos) { $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 452 => static function ($self, $stackPos) { + 462 => static function ($self, $stackPos) { $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 453 => static function ($self, $stackPos) { + 463 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 454 => static function ($self, $stackPos) { + 464 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 455 => static function ($self, $stackPos) { + 465 => static function ($self, $stackPos) { $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 456 => static function ($self, $stackPos) { + 466 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 457 => static function ($self, $stackPos) { + 467 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 458 => static function ($self, $stackPos) { + 468 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 459 => static function ($self, $stackPos) { + 469 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 460 => static function ($self, $stackPos) { + 470 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 461 => static function ($self, $stackPos) { + 471 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 462 => static function ($self, $stackPos) { + 472 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 463 => static function ($self, $stackPos) { + 473 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 464 => static function ($self, $stackPos) { + 474 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 465 => static function ($self, $stackPos) { + 475 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = strtolower($self->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $self->semValue = new Expr\Exit_($self->semStack[$stackPos-(2-2)], $attrs); }, - 466 => static function ($self, $stackPos) { + 476 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 467 => null, - 468 => static function ($self, $stackPos) { + 477 => null, + 478 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 469 => static function ($self, $stackPos) { + 479 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 470 => static function ($self, $stackPos) { + 480 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 471 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 472 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 473 => static function ($self, $stackPos) { + 483 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 474 => static function ($self, $stackPos) { + 484 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 475 => static function ($self, $stackPos) { + 485 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 476 => static function ($self, $stackPos) { + 486 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 477 => static function ($self, $stackPos) { + 487 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 478 => static function ($self, $stackPos) { + 488 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 479 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 480 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 481 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 483 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 484 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 485 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 486 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 487 => null, - 488 => null, - 489 => static function ($self, $stackPos) { + 497 => null, + 498 => null, + 499 => static function ($self, $stackPos) { $self->semValue = array(); }, - 490 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 491 => null, - 492 => static function ($self, $stackPos) { + 501 => null, + 502 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 493 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 494 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 507 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 508 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 510 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 501 => null, - 502 => static function ($self, $stackPos) { + 511 => null, + 512 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 505 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 506 => null, - 507 => null, - 508 => static function ($self, $stackPos) { + 516 => null, + 517 => null, + 518 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 509 => static function ($self, $stackPos) { + 519 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 510 => null, - 511 => null, - 512 => static function ($self, $stackPos) { + 520 => null, + 521 => null, + 522 => static function ($self, $stackPos) { $self->semValue = null; }, - 513 => static function ($self, $stackPos) { + 523 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 514 => static function ($self, $stackPos) { + 524 => static function ($self, $stackPos) { $self->semValue = array(); }, - 515 => static function ($self, $stackPos) { + 525 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 516 => static function ($self, $stackPos) { + 526 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 517 => static function ($self, $stackPos) { + 527 => static function ($self, $stackPos) { $self->semValue = array(); }, - 518 => null, - 519 => static function ($self, $stackPos) { + 528 => null, + 529 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 520 => static function ($self, $stackPos) { + 530 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 521 => static function ($self, $stackPos) { + 531 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 522 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 523 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 524 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 525 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 526 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 527 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 528 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 529 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 530 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 531 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 532 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 533 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 534 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 535 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 536 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 537 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 538 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => null, - 540 => null, - 541 => null, - 542 => static function ($self, $stackPos) { + 549 => null, + 550 => null, + 551 => null, + 552 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 543 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 544 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 545 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = null; }, - 546 => null, - 547 => null, - 548 => static function ($self, $stackPos) { + 556 => null, + 557 => null, + 558 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 549 => null, - 550 => null, - 551 => null, - 552 => null, - 553 => null, - 554 => null, - 555 => static function ($self, $stackPos) { + 559 => null, + 560 => null, + 561 => null, + 562 => null, + 563 => null, + 564 => null, + 565 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 556 => null, - 557 => null, - 558 => null, - 559 => static function ($self, $stackPos) { + 566 => null, + 567 => null, + 568 => null, + 569 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 560 => static function ($self, $stackPos) { + 570 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 561 => null, - 562 => static function ($self, $stackPos) { + 571 => null, + 572 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 563 => static function ($self, $stackPos) { + 573 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 564 => static function ($self, $stackPos) { + 574 => static function ($self, $stackPos) { $self->semValue = null; }, - 565 => null, - 566 => null, - 567 => null, - 568 => static function ($self, $stackPos) { + 575 => null, + 576 => null, + 577 => null, + 578 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 569 => static function ($self, $stackPos) { + 579 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 570 => null, - 571 => static function ($self, $stackPos) { + 580 => null, + 581 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 572 => static function ($self, $stackPos) { + 582 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 573 => static function ($self, $stackPos) { + 583 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 574 => static function ($self, $stackPos) { + 584 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 575 => static function ($self, $stackPos) { + 585 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 576 => null, - 577 => static function ($self, $stackPos) { + 586 => null, + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 578 => static function ($self, $stackPos) { + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 579 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 580 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 581 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 582 => static function ($self, $stackPos) { + 592 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 583 => null, - 584 => static function ($self, $stackPos) { + 593 => null, + 594 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 585 => null, - 586 => null, - 587 => static function ($self, $stackPos) { + 595 => null, + 596 => null, + 597 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 588 => null, - 589 => static function ($self, $stackPos) { + 598 => null, + 599 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 590 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 591 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 592 => null, - 593 => static function ($self, $stackPos) { + 602 => null, + 603 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 594 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 595 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 596 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 597 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 598 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 599 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 600 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 601 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 602 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 603 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 604 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 605 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 606 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 607 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 608 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 609 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 610 => null, - 611 => static function ($self, $stackPos) { + 620 => null, + 621 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 612 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 613 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 624 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 615 => static function ($self, $stackPos) { + 625 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 616 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 617 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 618 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 619 => static function ($self, $stackPos) { + 629 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 620 => static function ($self, $stackPos) { + 630 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 621 => null, + 631 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index c9c53ff306..adaec8c91c 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -162,15 +162,15 @@ class Php8 extends \PhpParser\ParserAbstract protected int $tokenToSymbolMapSize = 397; protected int $actionTableSize = 1278; - protected int $gotoTableSize = 631; + protected int $gotoTableSize = 660; protected int $invalidSymbol = 169; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 433; - protected int $numNonLeafStates = 739; + protected int $YY2TBLSTATE = 442; + protected int $numNonLeafStates = 754; protected array $symbolToName = array( "EOF", @@ -388,240 +388,240 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $action = array( - 131, 132, 133, 582, 134, 135, 1311, 751, 752, 753, - 136, 38,-32766,-32766,-32766, 941,-32766,-32766,-32766, 481, - 0, 380, 379, 826,-32767,-32767,-32767,-32767, 102, 103, - 104, 421, 235,-32766, 1089, 745, 744,-32766, 737,-32766, + 131, 132, 133, 592, 134, 135, 1338, 766, 767, 768, + 136, 38,-32766,-32766,-32766, 1005,-32766,-32766,-32766,-32766, + -32766, 389, 388, 841,-32767,-32767,-32767,-32767, 102, 103, + 104, 430, 956,-32766, 0, 760, 759,-32766, 852,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767,-32766,-32766,-32766, 24, 754,-32766,-32766,-32766, 1112, - 1113, 1114, 1111, 1110, 1109, 1115, -328, 1088, 1027, 261, - 137, 402, 758, 759, 760, 761, 1104,-32766, 427,-32766, - -32766,-32766,-32766,-32766, 606, 815, 762, 763, 764, 765, - 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, - 794, 795, 783, 784, 341, 342, 786, 787, 772, 773, - 774, 776, 777, 778, 354, 818, 819, 820, 821, 822, - 584, 779, 780, 585, 586, -194, 803, 801, 802, 814, - 798, 799, 2, -193, 587, 588, 797, 589, 590, 591, - 592, 26, 593, 594, 378, 379, 457, 458, 459, 800, - 595, 596, 482, 138, 421, 131, 132, 133, 582, 134, - 135, 1060, 751, 752, 753, 136, 38, -110, 835, 82, - 35, 1345, -110, 319, -110,-32766,-32766,-32766, 725, 301, - 234, -272, -110, -110, -110, -110, -110, -110, -110, -110, - 745, 744,-32766,-32766,-32766, 127,-32766, 294,-32766,-32766, + -32767,-32766,-32766,-32766, 24, 769,-32766,-32766,-32766, 1128, + 1129, 1130, 1127, 1126, 1125, 1131, -328, 1104, 843, 263, + 137, 411, 773, 774, 775, 776, 1120,-32766, 436,-32766, + -32766,-32766,-32766,-32766, 158, 830, 777, 778, 779, 780, + 781, 782, 783, 784, 785, 786, 806, 593, 807, 808, + 809, 810, 798, 799, 345, 346, 801, 802, 787, 788, + 789, 791, 792, 793, 360, 833, 834, 835, 836, 837, + 594, 794, 795, 595, 596, -194, 818, 816, 817, 829, + 813, 814,-32766, 1042, 597, 598, 812, 599, 600, 601, + 602, -193, 603, 604, 1006, 845, 466, 467, 468, 815, + 605, 606, 723, 138, 1051, 131, 132, 133, 592, 134, + 135, 1075, 766, 767, 768, 136, 38, -110, 850, 82, + -85, 1372, -110, 322, -110,-32766,-32766,-32766, 291, 304, + 760, 759, -110, -110, -110, -110, -110, -110, -110, -110, + 760, 759,-32766,-32766,-32766, 736,-32766, 851,-32766,-32766, -32766,-32766,-32766,-32766,-32766, 105, 106, 107, 108, 109, - 754, 271, 143,-32766,-32766,-32766,-32766,-32766,-32766, 828, - 248, -328, 831, 110, 261, 137, 402, 758, 759, 760, - 761, -342, 990, 427, 36, 245, 1036, 862,-32766, 863, - 815, 762, 763, 764, 765, 766, 767, 768, 769, 770, - 771, 791, 583, 792, 793, 794, 795, 783, 784, 341, - 342, 786, 787, 772, 773, 774, 776, 777, 778, 354, - 818, 819, 820, 821, 822, 584, 779, 780, 585, 586, - -194, 803, 801, 802, 814, 798, 799, 834, -193, 587, - 588, 797, 589, 590, 591, 592, 830, 593, 594, 832, - 83, 84, 85, 712, 800, 595, 596, 305, 147, 775, - 746, 747, 748, 749, 750, 556, 751, 752, 753, 788, - 789, 37, 943, 86, 87, 88, 89, 90, 91, 92, + 769, 273, 237,-32766, 2,-32766,-32766,-32766,-32766, 103, + 104, -328, 1297, 110, 263, 137, 411, 773, 774, 775, + 776, -342, 751, 436, 36, 247, -85, 877, 846, 878, + 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, + 786, 806, 593, 807, 808, 809, 810, 798, 799, 345, + 346, 801, 802, 787, 788, 789, 791, 792, 793, 360, + 833, 834, 835, 836, 837, 594, 794, 795, 595, 596, + -194, 818, 816, 817, 829, 813, 814, 849, -562, 597, + 598, 812, 599, 600, 601, 602, -193, 603, 604,-32766, + 83, 84, 85, 850, 815, 605, 606, 162, 147, 790, + 761, 762, 763, 764, 765, 847, 766, 767, 768, 803, + 804, 37, 26, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109,-32766, 271,-32766, - -32766,-32766, 1112, 1113, 1114, 1111, 1110, 1109, 1115, 307, - 110, 991, 355, 1033, 754,-32766,-32766,-32766, 316, 1036, - -32766, 289,-32766,-32766,-32766, -85, 837, 1282, 755, 756, - 757, 758, 759, 760, 761, 1036,-32766, 824,-32766,-32766, - -551, 427, 1248, 288, 815, 762, 763, 764, 765, 766, - 767, 768, 769, 770, 771, 791, 813, 792, 793, 794, - 795, 783, 784, 785, 812, 786, 787, 772, 773, 774, - 776, 777, 778, 817, 818, 819, 820, 821, 822, 823, - 779, 780, 781, 782, 1033, 803, 801, 802, 814, 798, - 799, -85, 335, 790, 796, 797, 804, 805, 807, 806, - 336, 808, 809, 943, -551, -551, 1036,-32766, 800, 811, - 810, 50, 51, 52, 512, 53, 54, 1243, 1242, 1244, - -551, 55, 56, 835, 57,-32766, 1090, 920, 920, 1036, - 279, 289, -557, 959, 960, 612, 368, -367, 961, -367, - -32766,-32766,-32766, 360, 955, 126,-32766, 1330, 1326, 389, - 862, 7, 863, 288, 1329, 1059, 372, 715, 716, 387, - 58, 59, 284, 1355, 920, 60, 1356, 61, 242, 243, + 103, 104, 105, 106, 107, 108, 109, 1048, 273,-32766, + -32766,-32766, -562, -562, 616, 387, 388,-32766,-32766,-32766, + 110, -272, 126, 35, 769, 430, 974, 975, -562, 1051, + -32766, 976,-32766,-32766,-32766, 490, 127, 970, 770, 771, + 772, 773, 774, 775, 776, 139, 1105, 839, 143, 322, + 749, 436, 1275, 282, 830, 777, 778, 779, 780, 781, + 782, 783, 784, 785, 786, 806, 828, 807, 808, 809, + 810, 798, 799, 800, 827, 801, 802, 787, 788, 789, + 791, 792, 793, 832, 833, 834, 835, 836, 837, 838, + 794, 795, 796, 797, 149, 818, 816, 817, 829, 813, + 814, 566, -565, 805, 811, 812, 819, 820, 822, 821, + 236, 823, 824, 1144,-32766,-32766,-32766, 741, 815, 826, + 825, 50, 51, 52, 522, 53, 54, 1270, 1269, 1271, + -32766, 55, 56, 850, 57,-32766, 1106,-32766,-32766, 1048, + 150, 292, 1128, 1129, 1130, 1127, 1126, 1125, 1131, 250, + 974, 975, 1051, 1357, 308, 976, -563, -601, 1353, -601, + 1356, 1051, -368, 1309, -368, 1074, -565, -565, 491, 310, + 58, 59, 622, 319, 935, 60, 958, 61, 244, 245, 62, 63, 64, 65, 66, 67, 68, 69,-32766, 28, - 263, 70, 442, 513, 283, 836, 438, 1276, 1277, 514, - 439, 835, -553, 440, 717, 1274, 42, 19, 515, 920, - 516, 441, 517, 75, 518, 920, 149, 519, 520, 319, - 910, 910, 44, 45, 443, 375, 374,-32766, 46, 521, - 1023, 1022, 1021, 1024, 366, 334, 1270, 826, -589, 720, - -589, 1234, 841, 523, 524, 525, 1241, -549, -78, 1036, - 745, 744,-32766,-32766, -548, 527, 528, 910, 1262, 1263, - 1264, 1265, 1267, 1259, 1260, 293, -553, -553, 745, 744, - 150, 1266, 1261, 288, 152, 1243, 1242, 1244, 294, 153, - 1033, 71, 1239, 28, 264, 314, 315, 319, 154, -153, - -153, -153, 910, 920, 156, 835, 922, 922, 910, 1274, - 710, 710, 1036, 1035, -153, 33, -153, -87, -153, -58, - -153, -549, -549, 103, 104, 656, 20, 835, -548, -548, - 373, 140, 1243, 1242, 1244, 319, 279, -549,-32766,-32766, - -57, 959, 960, 976, -548, 1234, 522, 710, 124, -556, - -84, 896, 955, -110, -110, -110, -555, 675, 676, 527, - 528, 125, 1262, 1263, 1264, 1265, 1267, 1259, 1260, 148, - 405, 745, 744, 128, 283, 1266, 1261, -550, 922, 376, - 377, 129, 710, -547, 922, 73, 910, 49, 710, -153, - 315, 319, 32, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 381, 382,-32766, 139, - -4, 920, 142, 319, 1241, 647, 648, 157, 745, 744, - 158,-32766,-32766,-32766, 690,-32766, -78,-32766, 48,-32766, - 159, 160,-32766, 161, 920, 1150, 1152,-32766,-32766,-32766, - -73, -550, -550,-32766,-32766, 285, -547, -547, -547,-32766, - 418, 297, 298, -72, -71,-32766, 320, -550,-32766, -70, - 691, 1241, 922, -547, 727, -69, 710, 371,-32766,-32766, - -32766, -68,-32766, -67,-32766, -66,-32766, -65, -46,-32766, - -18, 692, 693, 146,-32766,-32766,-32766, 270, 280, 74, - -32766,-32766, 295, 296, 910, 726,-32766, 418, 729, 919, - 1243, 1242, 1244, 145, -302,-32766, 279, 290, -298, 277, - -547, -547, 278, 28, 263, 281, 373, 910, 434, 282, - 466, 467, 325, 292, 937, 835, -547, 959, 960, 1274, - 291, 110, 522, 144, 826, 271, 685, 526, 955, -110, - -110, -110, 835, 1119, 561, 701, 28, 264, 657, 1357, - 23, 663, 645, 956, 300, 302,-32766,-32766, 835, 299, - 1281, 10, 1274, 306, 294, 1234, 1283, 703, -511, -583, - 922, 939, 40, 678, 710, -4, -501, 662, 567, 463, - 528, 0, 1262, 1263, 1264, 1265, 1267, 1259, 1260, 492, - -50, 679, 610, 922, -582, 1266, 1261, 710, 1234, -581, - 8, 834, 1207, 319, 0, 73, 0, 0, 41, 0, - 315, 319, 0, 528, 0, 1262, 1263, 1264, 1265, 1267, - 1259, 1260, 130, 0, 0, 0, 0, 0, 1266, 1261, - 0, 0, 0,-32766, 0, 27, 0, 0, 73, 1241, - 370, 0, 0, 315, 319, -557,-32766,-32766,-32766, 734, - -32766, -275,-32766, 0,-32766, 735, 854,-32766, 901, 1000, - 977, 984,-32766,-32766,-32766,-32766, 974, 985,-32766,-32766, - 899, 1241, 972, 920,-32766, 418, 1093, 1096,-32766,-32766, - -32766, 1097,-32766,-32766,-32766, 1094,-32766, 1095, 1101,-32766, - 1271, 846, 920, 1298,-32766,-32766,-32766,-32766, 1315, 1348, - -32766,-32766, 650, 1241, -556, -555,-32766, 418, -554, -495, - -32766,-32766,-32766, 1,-32766,-32766,-32766, 29,-32766, 30, - 39,-32766, 43, 47, 72, 487,-32766,-32766,-32766,-32766, - 76, 77,-32766,-32766, 78, 1241, 574, 79,-32766, 418, - 80, 81,-32766,-32766,-32766, 141,-32766,-32766,-32766, 151, - -32766, 155, 240,-32766, 321, 355, 910, 356,-32766,-32766, - -32766, 357, 358, 1248,-32766,-32766, 359, 360, 361, 362, - -32766, 418, -250, -250, -250, 910, 363, 364, 373,-32766, - 1248, 365, 367, 435, 555, 1275, 0, -273, -272, 959, - 960, -249, -249, -249, 522, 12, 13, 373, 14, 896, - 955, -110, -110, -110, 15, 17, 404, 483, 959, 960, - -16, 484, 491, 522, 494, 495, 496, 497, 896, 955, - -110, -110, -110, 501, 502, 503, 510, 572,-32766, 696, - 1252, 1190, 922, 1272, 1241, 34, 710, -250, 1062, 1061, - 1042,-32766,-32766,-32766, 835,-32766, 1229,-32766, 1038,-32766, - -277, 922,-32766, -102, 731, 710, -249,-32766,-32766,-32766, - 11, 835, 16,-32766,-32766, 21, 310, 403, 603,-32766, - 418, 607, 636, 702, 1194, 1247, 1191, 1327,-32766, -110, - -110, 313, 369, 711, -110, 714, 718, 719, 721, 722, - -110, 723, 724, 728, 713, 0, -110, -110, 897,-32766, - 1352, -110, 1354, 857, 856, 865, 949, -110, 992, 864, - 1353, 948, 946, 947, 950, 1222,-32766, 930, 940, 0, - 928, 294, 982, 983, 75, 634, 1351, 0, 1309, 1324, - 319, 0, 0, 0, 0, 0, 0, 0, 294, 0, - 0, 75, 0, 0, 0, 0, 0, 319 + 265, 70, 451, 523, 286,-32766,-32766, 1303, 1304, 524, + 1382, 850, 48, 1383, 726, 1301, 42, 19, 525, 935, + 526, 339, 527, 75, 528, 935, 361, 529, 530, 322, + -563, -563, 44, 45, 452, 384, 383,-32766, 46, 531, + 1038, 1037, 1036, 1039, 373, 338, -563, 841, 340, 727, + 398, 1261, 7, 533, 534, 535, 1268, -561, -569, 1051, + 760, 759, 323,-32766, -560, 537, 538, 925, 1289, 1290, + 1291, 1292, 1294, 1286, 1287, 296, 298, 299, 877, 958, + 878, 1293, 1288, 291,-32766, 1270, 1269, 1271, 297, 375, + 1048, 71, 1266, 28, 266, 317, 318, 322, 381, -153, + -153, -153, 925, 935, 396, 850, 666, 20, 925, 1301, + 685, 686, 1051, 1050, -153, 447, -153, 448, -153, 366, + -153, -561, -561, 148, 414, 152, 475, 476, -560, -560, + 382, 140, 1270, 1269, 1271, 322, 282, -561, 385, 386, + 449, 974, 975, 937, -560, 1261, 532, 721, 450, -568, + 856, 911, 970, -110, -110, -110, -567, 390, 391, 537, + 538, 153, 1289, 1290, 1291, 1292, 1294, 1286, 1287, 657, + 658, 760, 759, 154, 286, 1293, 1288, 156, 937, 33, + -78, -87, 721, -559, 937, 73, 925, 49, 721, -153, + 318, 322, 32, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, -58, -57,-32766, 124, + -4, 935, 292, 125, 1268, 128, 129, 142, 760, 759, + 157,-32766,-32766,-32766, 699,-32766, -84,-32766, 159,-32766, + 160, 161,-32766, -78, 935, 1177, 1179,-32766,-32766,-32766, + -73, 935, -72,-32766,-32766, 287, -559, -559, -559,-32766, + 427, 300, 301, -71, -70,-32766, -69, -68,-32766, -67, + 700, 1268, 937, -559, 728, -66, 721, 380,-32766,-32766, + -32766, 731,-32766, 935,-32766, -65,-32766, -46, -18,-32766, + 146, 701, 702, 272,-32766,-32766,-32766, 283, 737, 74, + -32766,-32766, 740, 934, 925, 145,-32766, 427,-32766, 273, + 1270, 1269, 1271, 738, -302,-32766, 282, 288, -298, 280, + -559, -559, 281, 28, 265, 284, 382, 925, 443, 285, + 1051, 328, 293, 295, 925, 850, -559, 974, 975, 1301, + 294, 695, 532, 952, 110, 841, 144, 536, 970, -110, + -110, -110, 850, 710, 291, 712, 28, 266, 571, 1135, + 673, 1384, 688, 305, 655, 970, 925, 971, 850, 577, + -32766, 10, 1301, 302, 309, 1261, 1308, 672, 667, 303, + 937, 1310,-32766, 954, 721, -4, 23, 849, 472, 501, + 538, 1298, 1289, 1290, 1291, 1292, 1294, 1286, 1287, 689, + -50, 620, -595, 991, 0, 1293, 1288, 721, 1261, 861, + 937, -523, 0, 0, 721, 73, 1325, 297, 0, 0, + 318, 322, 0, 538, 0, 1289, 1290, 1291, 1292, 1294, + 1286, 1287, 130, 0, 0, 0, 0, 0, 1293, 1288, + 0, 0, 937,-32766, 0, 0, 721, -513, 73, 1268, + 8, 27, 379, 318, 322, -594,-32766,-32766,-32766, 1342, + -32766, 0,-32766, 0,-32766, 1375, 40,-32766, 41, 746, + 747, 869,-32766,-32766,-32766,-32766, 916, 1015,-32766,-32766, + 992, 1268, 999, 935,-32766, 427, 989, 1000,-32766,-32766, + -32766, 914,-32766,-32766,-32766, 987,-32766, 1109, 1112,-32766, + 1113, 1110, 935, 1146,-32766,-32766,-32766,-32766, 1111, 1117, + -32766,-32766, 660, 1268, -593, -569,-32766, 427, -568, -567, + -32766,-32766,-32766, -566,-32766,-32766,-32766, -507,-32766, 1, + 29,-32766, 30, 39, 43, 496,-32766,-32766,-32766,-32766, + 47, 72,-32766,-32766, 76, 1268, 584, 77,-32766, 427, + 78, 79,-32766,-32766,-32766, 80,-32766,-32766,-32766, 81, + -32766, 141, 151,-32766, 155, 242, 925, 324,-32766,-32766, + -32766, 361, 362, 1275,-32766,-32766, 363, 364, 365, 366, + -32766, 427, -250, -250, -250, 925, 367, 368, 382,-32766, + 1275, 369, 370, 371, 374, 1302, 444, 565, 372, 974, + 975, -249, -249, -249, 532, -275, -273, 382, -272, 911, + 970, -110, -110, -110, 12, 13, 14, 15, 974, 975, + -16, 17, 355, 532, 413, 492, 493, 500, 911, 970, + -110, -110, -110, 503, 504, 505, 506, 510,-32766, 511, + 512, 519, 937, 582, 1268, 34, 721, -250, 705, 1279, + 1217,-32766,-32766,-32766, 850,-32766, 1299,-32766, 1077,-32766, + 1076, 937,-32766, 1057, 743, 721, -249,-32766,-32766,-32766, + 1256, 850, 1053,-32766,-32766, -277, -102, 11, 16,-32766, + 427, 21, 313, 412, 613, 617, 646, 711,-32766, -110, + -110, 1221, 1274, 1218, -110, 1354, 912, 316, 376, 722, + -110, 725, 729, 730, 732, 733, -110, -110, 734,-32766, + 735, -110, 739, 751, 724, 752, 0, -110, 1379, 1381, + 872, 871, 880, 964, 1007, 879,-32766, 1380, 963, 322, + 961, 297, 962, 965, 75, 1249, 945, 0, 955, 943, + 322, 1145, 1141, 1098, 997, 998, 644, 1378, 297, 1336, + 1351, 75, 1234, 0, 0, 0, 0, 322 ); protected array $actionCheck = array( 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, - 12, 13, 9, 10, 11, 1, 9, 10, 11, 31, - 0, 106, 107, 80, 44, 45, 46, 47, 48, 49, - 50, 116, 14, 30, 160, 37, 38, 30, 164, 32, + 12, 13, 9, 10, 11, 31, 9, 10, 11, 9, + 10, 106, 107, 80, 44, 45, 46, 47, 48, 49, + 50, 116, 1, 30, 0, 37, 38, 30, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 9, 10, 11, 101, 57, 9, 10, 11, 116, - 117, 118, 119, 120, 121, 122, 8, 1, 1, 71, + 117, 118, 119, 120, 121, 122, 8, 1, 80, 71, 72, 73, 74, 75, 76, 77, 123, 30, 80, 32, - 33, 34, 35, 36, 1, 87, 88, 89, 90, 91, + 33, 34, 35, 36, 16, 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, 8, 128, 129, 130, 131, - 132, 133, 8, 8, 136, 137, 138, 139, 140, 141, - 142, 8, 144, 145, 106, 107, 129, 130, 131, 151, - 152, 153, 164, 155, 116, 2, 3, 4, 5, 6, + 132, 133, 116, 1, 136, 137, 138, 139, 140, 141, + 142, 8, 144, 145, 160, 157, 129, 130, 131, 151, + 152, 153, 164, 155, 138, 2, 3, 4, 5, 6, 7, 163, 9, 10, 11, 12, 13, 101, 82, 164, - 8, 85, 106, 168, 108, 9, 10, 11, 164, 113, - 97, 163, 116, 117, 118, 119, 120, 121, 122, 123, - 37, 38, 9, 10, 11, 8, 30, 159, 32, 33, + 31, 85, 106, 168, 108, 9, 10, 11, 162, 113, + 37, 38, 116, 117, 118, 119, 120, 121, 122, 123, + 37, 38, 9, 10, 11, 164, 30, 160, 32, 33, 34, 35, 36, 37, 38, 51, 52, 53, 54, 55, - 57, 57, 8, 30, 116, 32, 33, 34, 35, 80, - 8, 163, 80, 69, 71, 72, 73, 74, 75, 76, - 77, 165, 31, 80, 148, 149, 138, 106, 9, 108, + 57, 57, 14, 30, 8, 32, 33, 34, 35, 49, + 50, 163, 1, 69, 71, 72, 73, 74, 75, 76, + 77, 165, 164, 80, 148, 149, 97, 106, 80, 108, 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, - 163, 128, 129, 130, 131, 132, 133, 156, 163, 136, - 137, 138, 139, 140, 141, 142, 157, 144, 145, 157, - 9, 10, 11, 164, 151, 152, 153, 8, 155, 2, - 3, 4, 5, 6, 7, 85, 9, 10, 11, 12, - 13, 30, 122, 32, 33, 34, 35, 36, 37, 38, + 163, 128, 129, 130, 131, 132, 133, 156, 70, 136, + 137, 138, 139, 140, 141, 142, 163, 144, 145, 9, + 9, 10, 11, 82, 151, 152, 153, 14, 155, 2, + 3, 4, 5, 6, 7, 157, 9, 10, 11, 12, + 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 116, 57, 9, - 10, 11, 116, 117, 118, 119, 120, 121, 122, 8, - 69, 160, 162, 116, 57, 9, 10, 11, 8, 138, - 30, 30, 32, 33, 34, 31, 1, 147, 71, 72, - 73, 74, 75, 76, 77, 138, 30, 80, 32, 33, - 70, 80, 1, 162, 87, 88, 89, 90, 91, 92, + 10, 11, 134, 135, 1, 106, 107, 9, 10, 11, + 69, 163, 14, 8, 57, 116, 117, 118, 150, 138, + 30, 122, 32, 33, 34, 31, 8, 128, 71, 72, + 73, 74, 75, 76, 77, 164, 160, 80, 8, 168, + 164, 80, 1, 162, 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, 116, 128, 129, 130, 131, 132, - 133, 97, 8, 136, 137, 138, 139, 140, 141, 142, - 8, 144, 145, 122, 134, 135, 138, 116, 151, 152, + 123, 124, 125, 126, 14, 128, 129, 130, 131, 132, + 133, 85, 70, 136, 137, 138, 139, 140, 141, 142, + 97, 144, 145, 160, 9, 10, 11, 164, 151, 152, 153, 2, 3, 4, 5, 6, 7, 156, 157, 158, - 150, 12, 13, 82, 15, 116, 165, 1, 1, 138, - 162, 30, 162, 117, 118, 52, 8, 106, 122, 108, - 9, 10, 11, 162, 128, 14, 137, 1, 1, 106, - 106, 108, 108, 162, 8, 1, 8, 31, 31, 8, - 51, 52, 37, 80, 1, 56, 83, 58, 59, 60, + 116, 12, 13, 82, 15, 30, 165, 32, 33, 116, + 14, 30, 116, 117, 118, 119, 120, 121, 122, 8, + 117, 118, 138, 1, 8, 122, 70, 161, 1, 163, + 8, 138, 106, 147, 108, 1, 134, 135, 164, 8, + 51, 52, 52, 8, 1, 56, 122, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 137, 70, - 71, 72, 73, 74, 30, 160, 8, 78, 79, 80, - 8, 82, 70, 8, 31, 86, 87, 88, 89, 1, - 91, 8, 93, 162, 95, 1, 14, 98, 99, 168, - 84, 84, 103, 104, 105, 106, 107, 116, 109, 110, - 119, 120, 121, 122, 115, 116, 1, 80, 161, 31, - 163, 122, 8, 124, 125, 126, 80, 70, 16, 138, - 37, 38, 9, 10, 70, 136, 137, 84, 139, 140, - 141, 142, 143, 144, 145, 146, 134, 135, 37, 38, - 14, 152, 153, 162, 14, 156, 157, 158, 159, 14, - 116, 162, 116, 70, 71, 166, 167, 168, 14, 75, - 76, 77, 84, 1, 14, 82, 160, 160, 84, 86, - 164, 164, 138, 137, 90, 14, 92, 31, 94, 16, - 96, 134, 135, 49, 50, 75, 76, 82, 134, 135, - 106, 164, 156, 157, 158, 168, 162, 150, 51, 52, - 16, 117, 118, 160, 150, 122, 122, 164, 16, 162, - 31, 127, 128, 129, 130, 131, 162, 75, 76, 136, - 137, 16, 139, 140, 141, 142, 143, 144, 145, 101, - 102, 37, 38, 16, 30, 152, 153, 70, 160, 106, - 107, 16, 164, 70, 160, 162, 84, 70, 164, 165, + 71, 72, 73, 74, 30, 51, 52, 78, 79, 80, + 80, 82, 70, 83, 31, 86, 87, 88, 89, 1, + 91, 8, 93, 162, 95, 1, 162, 98, 99, 168, + 134, 135, 103, 104, 105, 106, 107, 116, 109, 110, + 119, 120, 121, 122, 115, 116, 150, 80, 8, 31, + 106, 122, 108, 124, 125, 126, 80, 70, 162, 138, + 37, 38, 70, 116, 70, 136, 137, 84, 139, 140, + 141, 142, 143, 144, 145, 146, 134, 135, 106, 122, + 108, 152, 153, 162, 137, 156, 157, 158, 159, 8, + 116, 162, 116, 70, 71, 166, 167, 168, 8, 75, + 76, 77, 84, 1, 8, 82, 75, 76, 84, 86, + 75, 76, 138, 137, 90, 8, 92, 8, 94, 162, + 96, 134, 135, 101, 102, 14, 134, 135, 134, 135, + 106, 164, 156, 157, 158, 168, 162, 150, 106, 107, + 8, 117, 118, 160, 150, 122, 122, 164, 8, 162, + 8, 127, 128, 129, 130, 131, 162, 106, 107, 136, + 137, 14, 139, 140, 141, 142, 143, 144, 145, 111, + 112, 37, 38, 14, 30, 152, 153, 14, 160, 14, + 16, 31, 164, 70, 160, 162, 84, 70, 164, 165, 167, 168, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 106, 107, 74, 164, - 0, 1, 16, 168, 80, 111, 112, 16, 37, 38, - 16, 87, 88, 89, 80, 91, 31, 93, 70, 95, - 16, 16, 98, 16, 1, 59, 60, 103, 104, 105, - 31, 134, 135, 109, 110, 37, 70, 134, 135, 115, - 116, 134, 135, 31, 31, 74, 70, 150, 124, 31, + 24, 25, 26, 27, 28, 29, 16, 16, 74, 16, + 0, 1, 30, 16, 80, 16, 16, 16, 37, 38, + 16, 87, 88, 89, 80, 91, 31, 93, 16, 95, + 16, 16, 98, 31, 1, 59, 60, 103, 104, 105, + 31, 1, 31, 109, 110, 37, 70, 134, 135, 115, + 116, 134, 135, 31, 31, 74, 31, 31, 124, 31, 116, 80, 160, 150, 31, 31, 164, 150, 87, 88, - 89, 31, 91, 31, 93, 31, 95, 31, 31, 98, + 89, 31, 91, 1, 93, 31, 95, 31, 31, 98, 31, 137, 138, 31, 103, 104, 105, 31, 31, 155, - 109, 110, 134, 135, 84, 31, 115, 116, 31, 31, + 109, 110, 31, 31, 84, 31, 115, 116, 116, 57, 156, 157, 158, 31, 35, 124, 162, 37, 35, 35, 134, 135, 35, 70, 71, 35, 106, 84, 108, 35, - 134, 135, 35, 113, 38, 82, 150, 117, 118, 86, - 37, 69, 122, 70, 80, 57, 77, 127, 128, 129, - 130, 131, 82, 82, 89, 80, 70, 71, 90, 83, - 97, 100, 113, 128, 133, 114, 85, 137, 82, 132, - 147, 151, 86, 132, 159, 122, 147, 92, 150, 162, - 160, 155, 160, 94, 164, 165, 150, 96, 154, 97, - 137, -1, 139, 140, 141, 142, 143, 144, 145, 97, - 31, 100, 154, 160, 162, 152, 153, 164, 122, 162, - 150, 156, 166, 168, -1, 162, -1, -1, 160, -1, + 138, 35, 37, 113, 84, 82, 150, 117, 118, 86, + 37, 77, 122, 38, 69, 80, 70, 127, 128, 129, + 130, 131, 82, 80, 162, 92, 70, 71, 89, 82, + 100, 83, 94, 114, 113, 128, 84, 128, 82, 154, + 85, 151, 86, 132, 132, 122, 147, 96, 90, 133, + 160, 147, 137, 155, 164, 165, 97, 156, 97, 97, + 137, 161, 139, 140, 141, 142, 143, 144, 145, 100, + 31, 154, 162, 160, -1, 152, 153, 164, 122, 161, + 160, 150, -1, -1, 164, 162, 161, 159, -1, -1, 167, 168, -1, 137, -1, 139, 140, 141, 142, 143, 144, 145, 31, -1, -1, -1, -1, -1, 152, 153, - -1, -1, -1, 74, -1, 150, -1, -1, 162, 80, - 150, -1, -1, 167, 168, 162, 87, 88, 89, 160, - 91, 163, 93, -1, 95, 160, 160, 98, 160, 160, + -1, -1, 160, 74, -1, -1, 164, 150, 162, 80, + 150, 150, 150, 167, 168, 162, 87, 88, 89, 161, + 91, -1, 93, -1, 95, 161, 160, 98, 160, 160, 160, 160, 103, 104, 105, 74, 160, 160, 109, 110, 160, 80, 160, 1, 115, 116, 160, 160, 87, 88, 89, 160, 91, 124, 93, 160, 95, 160, 160, 98, - 161, 161, 1, 161, 103, 104, 105, 74, 161, 161, + 160, 160, 1, 160, 103, 104, 105, 74, 160, 160, 109, 110, 161, 80, 162, 162, 115, 116, 162, 162, 87, 88, 89, 162, 91, 124, 93, 162, 95, 162, 162, 98, 162, 162, 162, 102, 103, 104, 105, 74, @@ -630,7 +630,7 @@ class Php8 extends \PhpParser\ParserAbstract 95, 162, 162, 98, 162, 162, 84, 162, 103, 104, 105, 162, 162, 1, 109, 110, 162, 162, 162, 162, 115, 116, 100, 101, 102, 84, 162, 162, 106, 124, - 1, 162, 162, 162, 162, 167, -1, 163, 163, 117, + 1, 162, 162, 162, 162, 167, 162, 162, 162, 117, 118, 100, 101, 102, 122, 163, 163, 106, 163, 127, 128, 129, 130, 131, 163, 163, 163, 163, 117, 118, 31, 163, 163, 122, 163, 163, 163, 163, 127, 128, @@ -640,19 +640,19 @@ class Php8 extends \PhpParser\ParserAbstract 163, 160, 98, 163, 165, 164, 165, 103, 104, 105, 163, 82, 163, 109, 110, 163, 163, 163, 163, 115, 116, 163, 163, 163, 163, 163, 163, 163, 124, 117, - 118, 164, 164, 164, 122, 164, 164, 164, 164, 164, - 128, 164, 164, 164, 164, -1, 117, 118, 165, 137, - 165, 122, 165, 165, 165, 165, 165, 128, 165, 165, - 165, 165, 165, 165, 165, 165, 137, 165, 165, -1, + 118, 163, 163, 163, 122, 163, 165, 164, 164, 164, + 128, 164, 164, 164, 164, 164, 117, 118, 164, 137, + 164, 122, 164, 164, 164, 164, -1, 128, 165, 165, + 165, 165, 165, 165, 165, 165, 137, 165, 165, 168, 165, 159, 165, 165, 162, 165, 165, -1, 165, 165, - 168, -1, -1, -1, -1, -1, -1, -1, 159, -1, - -1, 162, -1, -1, -1, -1, -1, 168 + 168, 165, 165, 165, 165, 165, 165, 165, 159, 165, + 165, 162, 166, -1, -1, -1, -1, 168 ); protected array $actionBase = array( - 0, -2, 153, 554, 740, 1002, 1021, 674, 575, 311, - 139, 477, 548, 548, 763, 548, 476, 513, 857, 632, - 632, 632, 795, -57, 307, 307, 795, 307, 664, 664, + 0, -2, 153, 554, 740, 1002, 1021, 674, 221, 311, + -12, 548, 770, 770, 802, 770, 513, 763, 868, 632, + 632, 632, 793, -57, 307, 307, 793, 307, 664, 664, 664, 664, 711, 711, 953, 953, 985, 921, 889, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, @@ -666,68 +666,69 @@ class Php8 extends \PhpParser\ParserAbstract 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 375, 201, 83, 631, 1033, 1041, 1035, 1042, - 1029, 1027, 1034, 1038, 1043, 1091, 1093, 802, 1090, 1094, - 1039, 871, 1032, 1040, 291, 291, 291, 291, 291, 291, + 1084, 1084, 1084, 37, -16, 353, 1069, 695, 1039, 1048, + 1041, 1049, 1035, 1034, 1040, 1042, 1050, 1102, 1104, 794, + 1101, 1105, 1043, 871, 1038, 1044, 863, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 229, 481, 583, 42, 42, 42, 42, 42, 42, + 291, 291, 291, 290, 348, 10, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 553, 553, 3, 3, 3, 356, - 806, 773, 806, 806, 806, 806, 806, 806, 806, 806, - 340, 183, 47, 706, 166, 166, 7, 7, 7, 7, - 7, 1109, 66, 1092, 1092, -20, -20, -20, -20, 451, - 504, 391, -47, 381, 604, 341, 38, 318, 318, 247, - 247, 231, 231, 247, 247, 247, 154, 154, 98, 98, - 98, 98, 131, 230, 750, 497, 497, 497, 497, 750, - 750, 750, 750, 749, 948, 750, 750, 750, 320, 517, - 524, 617, 617, 394, 86, 86, 394, 366, 86, 5, - 433, 359, 755, -85, 417, 359, 637, 643, 643, 647, - 643, 643, 643, 775, 603, 775, 1020, 200, 801, 801, - 331, 777, 739, 858, 1060, 1044, 781, 1087, 821, 1088, - 17, 472, 688, 716, 725, 1017, 1017, 1017, 1017, 1017, - 1017, 1017, 1017, 1017, 1017, 1017, 765, 571, 1020, 142, - 765, 765, 765, 571, 571, 571, 571, 571, 571, 571, - 571, 571, 571, 634, 142, 580, 612, 142, 817, 571, - 375, 756, 375, 375, 375, 375, 375, 375, 375, 375, - 375, 375, 779, -12, 375, 201, 14, 14, -126, 67, - 14, 14, 14, 14, 375, 375, 375, 375, 603, 808, - 754, 630, 768, 125, 808, 808, 808, 344, 58, 18, - 117, 799, 803, 393, 784, 784, 791, 881, 784, 790, - 784, 791, 891, 784, 784, 881, 881, 735, 881, 187, - 528, 434, 498, 532, 881, 299, 784, 784, 784, 784, - 761, 881, 535, 784, 212, 204, 784, 784, 761, 757, - 787, 124, 751, 881, 881, 881, 761, 478, 751, 751, - 751, 819, 825, 769, 786, 360, 351, 574, 162, 816, - 786, 786, 784, 501, 769, 786, 769, 786, 746, 786, - 786, 786, 769, 786, 790, 442, 786, 731, 543, 133, - 786, 20, 892, 898, 616, 899, 888, 902, 951, 905, - 908, 1049, 877, 920, 890, 909, 952, 887, 885, 798, - 662, 675, 780, 748, 876, 792, 792, 792, 813, 872, - 792, 792, 792, 792, 792, 792, 792, 792, 662, 859, - 820, 785, 925, 687, 695, 994, 743, 1063, 766, 923, - 997, 913, 742, 726, 972, 929, 1019, 1047, 930, 934, - 973, 998, 826, 1000, 1065, 793, 1067, 1068, 860, 936, - 1051, 792, 892, 908, 649, 890, 909, 887, 885, 776, - 774, 770, 772, 764, 758, 752, 753, 782, 1005, 767, - 737, 862, 935, 873, 662, 867, 962, 1001, 974, 978, - 1048, 812, 796, 868, 1069, 937, 944, 945, 1052, 1006, - 1053, 778, 963, 818, 979, 822, 1070, 981, 982, 983, - 984, 1054, 1071, 1055, 762, 1057, 828, 788, 954, 811, - 1073, 542, 810, 814, 823, 950, 596, 922, 1058, 1074, - 1075, 990, 991, 992, 1076, 1077, 917, 829, 965, 809, - 971, 955, 830, 831, 600, 800, 1007, 804, 807, 738, - 605, 614, 1078, 1079, 1080, 919, 794, 789, 836, 837, - 1013, 475, 1015, 1082, 620, 840, 734, 1083, 996, 744, - 745, 572, 654, 633, 747, 805, 1059, 815, 771, 783, - 949, 745, 797, 842, 1085, 846, 847, 851, 993, 855, + 42, 42, 42, 42, 42, 42, 553, 553, 3, 3, + 3, 445, 806, 773, 806, 806, 806, 806, 806, 806, + 806, 806, 340, 183, 47, 706, 166, 166, 7, 7, + 7, 7, 7, 1109, 66, 1092, 1092, -20, -20, -20, + -20, 451, 504, 391, -47, 143, 396, 170, 712, 249, + 231, 231, 363, 363, 16, 16, 363, 363, 363, 154, + 154, 354, 354, 354, 354, 131, 356, 765, 497, 497, + 497, 497, 765, 765, 765, 765, 754, 948, 765, 765, + 765, 426, 517, 524, 484, 484, 502, 86, 86, 502, + 757, 86, 5, 460, 477, 759, -85, 336, 477, 956, + 218, 643, 643, 647, 643, 643, 643, 751, 562, 751, + 1033, 394, 805, 805, 487, 776, 739, 869, 1070, 1052, + 780, 1099, 819, 1100, 1071, 293, 17, 372, 472, 522, + 732, 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032, + 1032, 1032, 1032, 1081, 143, 1033, 158, 1097, 1098, 1081, + 1081, 1081, 143, 143, 143, 143, 143, 143, 143, 143, + 143, 143, 588, 158, 561, 565, 158, 816, 143, 37, + 817, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 777, 344, 37, -16, 31, 31, 226, 132, 31, + 31, 31, 68, 31, 37, 37, 37, 562, 772, 735, + 581, 767, 133, 772, 772, 772, 139, 58, 198, 117, + 799, 803, 474, 785, 785, 797, 887, 785, 790, 785, + 797, 898, 785, 785, 887, 887, 778, 887, 368, 637, + 543, 620, 639, 887, 486, 785, 785, 785, 785, 762, + 887, 662, 785, 481, 380, 785, 785, 762, 761, 786, + 206, 766, 887, 887, 887, 762, 611, 766, 766, 766, + 829, 830, 771, 782, 505, 501, 672, 355, 825, 782, + 782, 785, 626, 771, 782, 771, 782, 748, 782, 782, + 782, 771, 782, 790, 570, 782, 734, 670, 314, 782, + 785, 34, 899, 902, 680, 905, 891, 908, 954, 909, + 913, 1055, 885, 923, 892, 917, 955, 890, 888, 792, + 723, 727, 820, 781, 881, 795, 795, 795, 873, 876, + 795, 795, 795, 795, 795, 795, 795, 795, 723, 750, + 822, 789, 930, 729, 730, 1000, 749, 1051, 1106, 929, + 1006, 919, 826, 731, 978, 934, 1019, 1053, 935, 936, + 981, 1007, 831, 1013, 1073, 796, 1074, 1075, 768, 944, + 1057, 795, 899, 913, 725, 892, 917, 890, 888, 774, + 764, 756, 758, 755, 753, 741, 752, 779, 1015, 872, + 760, 775, 937, 877, 723, 818, 971, 1001, 982, 983, + 1054, 811, 798, 824, 1076, 945, 949, 950, 1058, 1017, + 1059, 828, 972, 962, 984, 812, 1077, 990, 991, 992, + 993, 1060, 1078, 1061, 813, 1064, 836, 808, 963, 801, + 1079, 420, 810, 814, 823, 952, 466, 925, 1066, 1080, + 1082, 994, 996, 997, 1083, 1085, 920, 837, 973, 788, + 974, 965, 840, 842, 641, 815, 1020, 804, 807, 800, + 677, 689, 1087, 1088, 1090, 922, 787, 784, 846, 847, + 1027, 738, 1029, 1091, 693, 851, 1093, 1005, 742, 744, + 694, 721, 720, 745, 783, 1068, 821, 769, 809, 951, + 744, 791, 855, 1094, 857, 858, 860, 998, 861, 979, + 1096, 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, - 459, 459, 459, 459, 459, 459, 307, 307, 307, 307, - 459, 459, 459, 459, 459, 459, 459, 307, 459, 459, - 459, 307, 307, 0, 0, 307, 0, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 0, 0, 0, 0, 0, 459, 459, 459, 459, 459, + 459, 307, 307, 307, 307, 459, 459, 459, 459, 459, + 459, 459, 307, 459, 459, 459, 307, 307, 0, 0, + 307, 0, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, @@ -740,43 +741,44 @@ class Php8 extends \PhpParser\ParserAbstract 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 459, 459, 459, 459, 459, 459, 459, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 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, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 506, 506, 291, 291, 291, 291, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 506, 291, - 291, 291, 0, 291, 291, 291, 291, 291, 291, 291, - 506, 735, 506, 506, 154, 154, 154, 154, 506, 506, - 506, 236, 236, 154, 506, 366, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 0, 0, 506, 506, 506, - 506, 142, 86, 506, 790, 790, 790, 790, 506, 506, - 506, 506, 86, 86, 506, 506, 506, 0, 0, 0, - 154, 154, 142, 0, 0, 142, 0, 0, 790, 790, - 506, 366, 735, 496, 506, 0, 0, 0, 0, 0, - 0, 0, 142, 790, 142, 571, 784, 86, 86, 784, - 571, 571, 14, 375, 496, 598, 598, 598, 598, 0, - 0, 0, 0, 603, 735, 735, 735, 735, 735, 735, - 735, 735, 735, 735, 735, 790, 0, 735, 0, 790, - 790, 790, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 790, 0, 0, - 881, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 891, 0, 0, 0, 0, 0, 0, 790, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 792, 812, - 0, 812, 0, 792, 792, 792, 0, 0, 0, 0, - 800, 475 + 506, 506, 291, 291, 291, 291, 506, 506, 506, 506, + 506, 506, 506, 506, 506, 506, 291, 291, 291, 0, + 291, 291, 291, 291, 291, 291, 291, 506, 778, 506, + 506, 154, 154, 154, 154, 506, 506, 506, 366, 366, + 366, 154, 506, 778, 506, 506, 506, 506, 506, 506, + 506, 506, 506, 0, 0, 506, 506, 506, 506, 158, + 86, 506, 790, 790, 790, 790, 506, 506, 506, 506, + 86, 86, 506, 506, 506, 0, 0, 0, 154, 154, + 158, 0, 0, 158, 373, 0, 790, 790, 506, 373, + 778, 492, 506, 293, 0, 0, 0, 0, 0, 0, + 0, 158, 790, 158, 143, 785, 86, 86, 785, 143, + 143, 31, 37, 492, 552, 552, 552, 552, 37, 0, + 0, 0, 0, 0, 562, 778, 778, 778, 778, 778, + 778, 778, 778, 778, 778, 778, 778, 790, 0, 778, + 0, 778, 778, 790, 790, 790, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 790, 0, 0, 887, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 898, 0, 0, 0, 0, + 0, 0, 790, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 795, 811, 0, 811, 0, 795, 795, 795, + 0, 0, 0, 0, 815, 738 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 601, 601, - 601, 601,32767,32767, 254, 102,32767,32767, 470, 387, - 387, 387,32767,32767, 545, 545, 545, 545, 545, 545, - 32767,32767,32767,32767,32767,32767, 470,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 613, 613, + 613, 613,32767,32767, 254, 102,32767,32767, 482, 399, + 399, 399,32767,32767, 557, 557, 557, 557, 557, 557, + 32767,32767,32767,32767,32767,32767, 482,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, @@ -787,137 +789,141 @@ class Php8 extends \PhpParser\ParserAbstract 32767, 36, 7, 8, 10, 11, 49, 17, 324,32767, 32767,32767,32767, 102,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 594,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 386, 606,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 474, 453, 454, 456, 457, 386, - 546, 600, 327, 597, 385, 145, 339, 329, 242, 330, - 258, 475, 259, 476, 479, 480, 215, 287, 382, 149, - 150, 417, 471, 419, 469, 473, 418, 392, 398, 399, - 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, - 410, 390, 391, 472,32767,32767, 450, 449, 448, 415, + 32767,32767,32767,32767,32767,32767,32767, 486, 465, 466, + 468, 469, 398, 558, 612, 327, 609, 397, 145, 339, + 329, 242, 330, 258, 487, 259, 488, 491, 492, 215, + 383, 149, 150, 429, 483, 431, 481, 485, 430, 404, + 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 402, 403, 484,32767,32767, 462, 461, + 460, 427,32767,32767,32767,32767,32767,32767,32767,32767, + 102,32767, 428, 432, 435, 401, 433, 434, 451, 452, + 449, 450, 453,32767,32767,32767,32767, 454, 455, 456, + 457, 316,32767,32767, 367, 195, 365, 436, 316, 111, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 442, + 443,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, - 416, 420, 423, 389, 421, 422, 439, 440, 437, 438, - 441,32767,32767,32767,32767, 442, 443, 444, 445, 316, - 32767,32767, 366, 364, 424, 316, 111,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 430, 431,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 102,32767, 100, 487, 539, - 447, 425, 426,32767, 514,32767, 102,32767, 516,32767, - 32767,32767,32767,32767,32767,32767, 541, 412, 414, 507, - 595, 393, 598,32767, 500, 100, 195,32767,32767, 515, - 32767, 195, 195,32767,32767,32767,32767,32767,32767,32767, - 32767, 540,32767, 608, 500, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110,32767, 195, 110,32767, - 32767,32767, 100, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 190,32767, 268, 270, 102, 563, 195, - 32767, 519,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 512,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 500, 435, - 138,32767, 138, 547, 427, 428, 429, 502, 547, 547, - 547, 312, 289,32767,32767,32767,32767, 517, 100, 100, - 100, 100, 512,32767,32767,32767,32767, 111, 486, 99, - 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, - 223,32767, 99,32767, 101, 101,32767,32767, 223, 225, - 212, 101, 227,32767, 567, 568, 223, 101, 227, 227, - 227, 247, 247, 489, 318, 101, 99, 101, 101, 197, - 318, 318,32767, 101, 489, 318, 489, 318, 199, 318, - 318, 318, 489, 318,32767, 101, 318, 214, 99, 99, - 318,32767,32767,32767, 502,32767,32767,32767,32767,32767, + 100, 499, 551, 459, 437, 438,32767, 526,32767, 102, + 32767, 528,32767,32767,32767,32767,32767,32767,32767,32767, + 553, 424, 426, 519, 607, 405, 610,32767, 512, 100, + 195,32767,32767, 527,32767, 195, 195,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 552,32767, 620, + 512, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110,32767, 195, 110,32767, 110, 110,32767, + 32767, 100, 195, 195, 195, 195, 195, 195, 195, 195, + 195, 195, 190,32767, 268, 270, 102, 575, 195,32767, + 531,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 524,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 386,32767,32767,32767,32767, 512, 447, 138, + 32767, 138, 559, 439, 440, 441, 514, 559, 559, 559, + 312, 289,32767,32767,32767,32767, 529, 100, 100, 100, + 100, 524,32767,32767,32767,32767, 111, 498, 99, 99, + 99, 99, 99, 103, 101,32767,32767,32767,32767, 223, + 32767, 99,32767, 101, 101,32767,32767, 223, 225, 212, + 101, 227,32767, 579, 580, 223, 101, 227, 227, 227, + 247, 247, 501, 318, 101, 99, 101, 101, 197, 318, + 318,32767, 101, 501, 318, 501, 318, 199, 318, 318, + 318, 501, 318,32767, 101, 318, 214, 99, 99, 318, + 32767,32767,32767,32767, 514,32767,32767,32767,32767,32767, 32767,32767, 222,32767,32767,32767,32767,32767,32767,32767, - 32767, 534,32767, 552, 565, 433, 434, 436, 551, 549, - 458, 459, 460, 461, 462, 463, 464, 466, 596,32767, - 506,32767,32767,32767, 338,32767, 606,32767,32767,32767, + 32767, 546,32767, 564, 577, 445, 446, 448, 563, 561, + 470, 471, 472, 473, 474, 475, 476, 478, 608,32767, + 518,32767,32767,32767, 338,32767, 618,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 607,32767, 547,32767,32767,32767, - 32767, 432, 9, 74, 495, 42, 43, 51, 57, 523, - 524, 525, 526, 520, 521, 527, 522,32767,32767, 529, - 573,32767,32767, 548, 599,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 619,32767, 559,32767,32767,32767, + 32767, 444, 9, 74, 507, 42, 43, 51, 57, 535, + 536, 537, 538, 532, 533, 539, 534,32767,32767, 541, + 585,32767,32767, 560, 611,32767,32767,32767,32767,32767, 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 534,32767, 136,32767,32767,32767,32767, - 32767,32767,32767,32767, 530,32767,32767,32767, 547,32767, + 32767,32767,32767, 546,32767, 136,32767,32767,32767,32767, + 32767,32767,32767,32767, 542,32767,32767,32767, 559,32767, 32767,32767,32767, 314, 311,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 547,32767,32767,32767,32767,32767, 291,32767, 308, + 32767, 559,32767,32767,32767,32767,32767, 291,32767, 308, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 286,32767,32767, 381, - 502, 294, 296, 297,32767,32767,32767,32767, 360,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 382, 514, + 294, 296, 297,32767,32767,32767,32767, 361,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 152, 152, 3, 3, 341, 152, 152, 152, 341, 341, - 152, 341, 341, 341, 152, 152, 152, 152, 152, 152, - 280, 185, 262, 265, 247, 247, 152, 352, 152 + 32767, 152, 152, 3, 3, 341, 152, 152, 152, 341, + 341, 152, 341, 341, 341, 152, 152, 152, 152, 152, + 152, 152, 280, 185, 262, 265, 247, 247, 152, 353, + 152, 384, 384, 393 ); protected array $goto = array( - 192, 192, 1034, 1065, 697, 429, 661, 893, 851, 893, - 893, 423, 331, 327, 328, 330, 576, 428, 332, 430, - 638, 654, 655, 852, 672, 673, 674, 165, 165, 165, - 165, 217, 193, 189, 189, 175, 177, 212, 189, 189, - 189, 189, 189, 190, 190, 190, 190, 190, 190, 184, - 185, 186, 187, 188, 214, 212, 215, 535, 536, 419, - 537, 540, 541, 542, 543, 544, 545, 546, 547, 1136, - 166, 167, 168, 191, 169, 170, 171, 164, 172, 173, - 174, 176, 211, 213, 216, 236, 239, 250, 251, 252, - 254, 255, 256, 257, 258, 259, 260, 265, 266, 267, - 268, 274, 286, 287, 311, 312, 424, 425, 426, 581, - 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 194, 195, 196, 237, - 184, 185, 186, 187, 188, 214, 1136, 197, 178, 179, - 180, 198, 194, 181, 238, 199, 197, 163, 200, 201, - 182, 202, 203, 204, 183, 205, 206, 207, 208, 209, - 210, 706, 276, 276, 276, 276, 855, 338, 853, 623, - 623, 975, 1341, 1341, 600, 1273, 1273, 1273, 1273, 1273, - 1273, 1273, 1273, 1273, 1273, 1292, 1292, 1341, 339, 338, - 417, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, 1292, - 1292, 548, 548, 548, 548, 827, 604, 1344, 1344, 559, - 552, 886, 860, 456, 909, 904, 905, 918, 861, 906, - 858, 907, 908, 859, 465, 465, 912, 478, 350, 350, - 350, 350, 913, 465, 914, 480, 1087, 1082, 1083, 1084, - 848, 337, 552, 559, 568, 569, 340, 579, 602, 616, - 617, 573, 599, 1100, 437, 1331, 1240, 25, 1240, 1240, - 347, 422, 709, 611, 1034, 1034, 1240, 345, 507, 700, - 1034, 1098, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, - 1034, 461, 353, 1034, 1034, 1034, 1034, 848, 1185, 1240, - 621, 658, 353, 353, 1240, 1240, 1240, 1240, 996, 833, - 1240, 1240, 1240, 353, 353, 1107, 1108, 353, 550, 1358, - 550, 550, 5, 499, 6, 500, 926, 392, 550, 571, - 927, 506, 660, 554, 1289, 1289, 1133, 353, 353, 1058, - 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, - 833, 454, 833, 967, 408, 705, 969, 969, 969, 969, - 539, 539, 454, 963, 970, 436, 539, 539, 539, 539, - 539, 539, 539, 539, 539, 539, 566, 475, 1316, 1317, - 733, 637, 639, 1040, 1039, 659, 682, 1303, 333, 683, - 687, 1010, 695, 704, 1006, 246, 246, 1037, 1037, 681, - 952, 538, 538, 1029, 1045, 1046, 666, 538, 686, 538, - 538, 538, 538, 538, 538, 538, 538, 1013, 1013, 1043, - 1044, 848, 244, 244, 244, 244, 241, 247, 318, 304, - 447, 447, 447, 447, 631, 633, 635, 1314, 554, 1314, - 1314, 1318, 1319, 1323, 1323, 1323, 1323, 1314, 406, 407, - 845, 694, 873, 670, 829, 671, 958, 410, 411, 412, - 401, 684, 577, 614, 413, 870, 694, 1018, 343, 615, - 694, 1325, 1325, 1325, 1325, 609, 624, 627, 628, 629, - 630, 651, 652, 653, 708, 942, 1216, 944, 942, 1235, - 1217, 1220, 945, 1221, 868, 1310, 317, 272, 317, 317, - 1231, 882, 980, 1233, 1071, 881, 869, 1070, 1074, 880, - 999, 1075, 867, 971, 736, 732, 1118, 978, 551, 1008, - 1003, 0, 348, 349, 447, 447, 447, 447, 447, 447, - 447, 447, 447, 447, 447, 1257, 0, 447, 931, 1123, - 0, 968, 1073, 1236, 1237, 619, 1312, 1312, 1073, 0, - 0, 1015, 843, 394, 397, 560, 601, 605, 0, 872, - 0, 664, 994, 1116, 885, 0, 0, 866, 0, 0, - 0, 1238, 1300, 1301, 0, 0, 0, 0, 0, 1230, - 0, 431, 553, 563, 0, 0, 553, 431, 563, 0, - 0, 395, 460, 1041, 1041, 0, 0, 0, 0, 0, - 665, 1052, 1048, 1049, 468, 580, 469, 470, 0, 0, - 0, 878, 0, 0, 1349, 1350, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 249, 249, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 876 + 195, 195, 1049, 928, 706, 929, 1080, 438, 671, 279, + 279, 279, 279, 432, 335, 331, 332, 334, 586, 437, + 336, 439, 648, 908, 866, 908, 908, 167, 167, 167, + 167, 219, 196, 192, 192, 177, 179, 214, 192, 192, + 192, 192, 192, 193, 193, 193, 193, 193, 193, 187, + 188, 189, 190, 191, 216, 214, 217, 545, 546, 428, + 547, 550, 551, 552, 553, 554, 555, 556, 557, 1163, + 168, 169, 170, 194, 171, 172, 173, 165, 174, 175, + 176, 178, 213, 215, 218, 238, 241, 252, 253, 254, + 256, 257, 258, 259, 260, 261, 262, 267, 268, 269, + 270, 277, 289, 290, 314, 315, 433, 434, 435, 591, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 197, 198, 199, 239, + 187, 188, 189, 190, 191, 216, 1163, 200, 180, 181, + 182, 201, 197, 183, 240, 202, 200, 164, 203, 204, + 184, 205, 206, 207, 185, 208, 209, 166, 210, 211, + 212, 186, 715, 870, 610, 1014, 848, 867, 986, 1097, + 744, 342, 576, 561, 1023, 1018, 745, 647, 649, 1055, + 1054, 669, 863, 868, 359, 693, 696, 1025, 704, 713, + 1021, 720, 343, 342, 359, 359, 1052, 1052, 691, 967, + 631, 668, 1044, 1060, 1061, 359, 359, 487, 848, 359, + 848, 1385, 990, 351, 875, 489, 924, 919, 920, 933, + 876, 921, 873, 922, 923, 874, 564, 426, 927, 863, + 359, 359, 403, 406, 570, 611, 615, 520, 842, 1103, + 1099, 1100, 619, 634, 637, 638, 639, 640, 661, 662, + 663, 717, 719, 356, 356, 356, 356, 508, 1267, 509, + 1267, 1267, 1123, 1148, 1124, 515, 1049, 1049, 1267, 456, + 456, 456, 456, 1049, 901, 1049, 1049, 1049, 1049, 1049, + 1049, 1049, 1049, 1049, 465, 1330, 1049, 1049, 1049, 1049, + 664, 665, 1267, 682, 683, 684, 583, 1267, 1267, 1267, + 1267, 349, 470, 1267, 1267, 1267, 422, 569, 562, 1212, + 248, 248, 558, 558, 558, 558, 431, 614, 621, 941, + 633, 633, 5, 942, 6, 446, 1300, 1300, 1300, 1300, + 1300, 1300, 1300, 1300, 1300, 1300, 564, 246, 246, 246, + 246, 243, 249, 1358, 341, 562, 569, 578, 579, 344, + 589, 612, 626, 627, 1011, 474, 474, 1243, 959, 863, + 25, 1244, 1247, 960, 474, 1248, 401, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 1368, + 1368, 456, 581, 456, 456, 670, 560, 1160, 560, 560, + 484, 1343, 1344, 1073, 1368, 445, 560, 1319, 1319, 703, + 692, 1260, 844, 1319, 1319, 1319, 1319, 1319, 1319, 1319, + 1319, 1319, 1319, 676, 703, 1371, 1371, 860, 703, 1341, + 463, 1341, 1341, 321, 307, 984, 984, 984, 984, 1341, + 337, 463, 978, 985, 888, 1316, 1316, 1350, 1350, 1350, + 1350, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, + 1316, 973, 549, 549, 1352, 1352, 1352, 1352, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 352, 353, + 982, 417, 714, 641, 643, 645, 548, 548, 1337, 410, + 957, 625, 548, 957, 548, 548, 548, 548, 548, 548, + 548, 548, 415, 416, 1262, 1058, 1059, 680, 885, 681, + 1143, 419, 420, 421, 1258, 694, 1086, 883, 423, 1033, + 946, 1150, 347, 320, 274, 320, 320, 629, 587, 624, + 1028, 1028, 748, 1030, 895, 1345, 1346, 882, 897, 1088, + 1090, 887, 1040, 674, 1009, 1339, 1339, 1088, 995, 881, + 1284, 378, 1134, 0, 0, 251, 251, 0, 1263, 1264, + 0, 1257, 609, 1116, 0, 0, 0, 858, 896, 884, + 1085, 1089, 718, 0, 0, 0, 0, 0, 516, 709, + 993, 1114, 0, 0, 0, 0, 1265, 1327, 1328, 0, + 0, 0, 563, 573, 0, 0, 563, 0, 573, 0, + 0, 404, 469, 0, 983, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 477, 590, 478, 479, 0, 0, + 0, 893, 440, 0, 1376, 1377, 1132, 900, 0, 440, + 0, 0, 0, 0, 0, 1056, 1056, 753, 753, 0, + 0, 0, 675, 1067, 1063, 1064, 0, 0, 0, 0, + 891, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 329 ); protected array $gotoCheck = array( - 42, 42, 73, 127, 73, 66, 66, 25, 25, 25, - 25, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 86, 86, 26, 86, 86, 86, 42, 42, 42, + 42, 42, 73, 65, 73, 65, 128, 66, 66, 23, + 23, 23, 23, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 25, 25, 25, 25, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -931,98 +937,102 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 9, 23, 23, 23, 23, 15, 170, 27, 108, - 108, 49, 184, 184, 130, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 172, 172, 184, 170, 170, - 43, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 107, 107, 107, 107, 6, 107, 184, 184, 76, - 76, 45, 15, 83, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 149, 149, 15, 84, 24, 24, - 24, 24, 65, 149, 65, 84, 15, 15, 15, 15, - 22, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 174, 8, 8, 83, 183, 73, 76, 73, 73, - 97, 13, 8, 13, 73, 73, 73, 181, 8, 8, - 73, 8, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 151, 14, 73, 73, 73, 73, 22, 151, 73, - 56, 56, 14, 14, 73, 73, 73, 73, 103, 12, - 73, 73, 73, 14, 14, 144, 144, 14, 19, 14, - 19, 19, 46, 155, 46, 155, 73, 62, 19, 104, - 73, 155, 64, 14, 173, 173, 150, 14, 14, 114, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 12, 19, 12, 93, 93, 93, 19, 19, 19, 19, - 175, 175, 19, 19, 19, 113, 175, 175, 175, 175, - 175, 175, 175, 175, 175, 175, 48, 178, 178, 178, - 48, 48, 48, 118, 118, 48, 116, 14, 29, 48, - 48, 48, 48, 48, 48, 5, 5, 89, 89, 89, - 89, 158, 158, 89, 89, 89, 120, 158, 14, 158, - 158, 158, 158, 158, 158, 158, 158, 107, 107, 119, - 119, 22, 5, 5, 5, 5, 5, 5, 171, 171, - 23, 23, 23, 23, 85, 85, 85, 130, 14, 130, - 130, 180, 180, 9, 9, 9, 9, 130, 82, 82, - 18, 7, 39, 82, 7, 82, 92, 82, 82, 82, - 28, 82, 2, 2, 82, 37, 7, 110, 82, 80, - 7, 130, 130, 130, 130, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 9, 79, 79, 9, 20, - 79, 79, 79, 79, 35, 130, 24, 24, 24, 24, - 162, 41, 96, 14, 129, 16, 16, 16, 16, 35, - 50, 132, 35, 50, 99, 50, 147, 16, 50, 50, - 50, -1, 97, 97, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 20, -1, 23, 17, 17, - -1, 16, 130, 20, 20, 17, 130, 130, 130, -1, - -1, 17, 20, 59, 59, 59, 59, 59, -1, 17, - -1, 17, 17, 16, 16, -1, -1, 17, -1, -1, - -1, 20, 20, 20, -1, -1, -1, -1, -1, 17, - -1, 117, 9, 9, -1, -1, 9, 117, 9, -1, - -1, 9, 9, 117, 117, -1, -1, -1, -1, -1, - 117, 117, 117, 117, 9, 9, 9, 9, -1, -1, - -1, 9, -1, -1, 9, 9, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 5, 5, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 9 + 42, 42, 9, 15, 131, 50, 12, 26, 50, 15, + 50, 175, 48, 50, 50, 50, 48, 48, 48, 119, + 119, 48, 22, 27, 14, 48, 48, 48, 48, 48, + 48, 48, 175, 175, 14, 14, 89, 89, 89, 89, + 56, 56, 89, 89, 89, 14, 14, 84, 12, 14, + 12, 14, 49, 97, 15, 84, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 14, 43, 15, 22, + 14, 14, 59, 59, 59, 59, 59, 76, 6, 15, + 15, 15, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 24, 24, 24, 24, 160, 73, 160, + 73, 73, 146, 146, 146, 160, 73, 73, 73, 23, + 23, 23, 23, 73, 45, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 83, 14, 73, 73, 73, 73, + 86, 86, 73, 86, 86, 86, 179, 73, 73, 73, + 73, 186, 156, 73, 73, 73, 14, 76, 76, 156, + 5, 5, 107, 107, 107, 107, 13, 107, 13, 73, + 108, 108, 46, 73, 46, 83, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 14, 5, 5, 5, + 5, 5, 5, 188, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 103, 154, 154, 79, 79, 22, + 76, 79, 79, 79, 154, 79, 62, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 189, + 189, 23, 104, 23, 23, 64, 19, 155, 19, 19, + 183, 183, 183, 115, 189, 113, 19, 177, 177, 7, + 117, 14, 7, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 121, 7, 189, 189, 18, 7, 131, + 19, 131, 131, 176, 176, 19, 19, 19, 19, 131, + 29, 19, 19, 19, 39, 178, 178, 9, 9, 9, + 9, 178, 178, 178, 178, 178, 178, 178, 178, 178, + 178, 92, 180, 180, 131, 131, 131, 131, 180, 180, + 180, 180, 180, 180, 180, 180, 180, 180, 97, 97, + 93, 93, 93, 85, 85, 85, 163, 163, 131, 28, + 9, 80, 163, 9, 163, 163, 163, 163, 163, 163, + 163, 163, 82, 82, 20, 120, 120, 82, 37, 82, + 153, 82, 82, 82, 167, 82, 130, 35, 82, 110, + 17, 17, 82, 24, 24, 24, 24, 17, 2, 2, + 107, 107, 99, 17, 35, 185, 185, 35, 41, 131, + 133, 17, 114, 17, 17, 131, 131, 131, 96, 17, + 20, 138, 149, -1, -1, 5, 5, -1, 20, 20, + -1, 17, 8, 8, -1, -1, -1, 20, 16, 16, + 16, 16, 8, -1, -1, -1, -1, -1, 8, 8, + 16, 8, -1, -1, -1, -1, 20, 20, 20, -1, + -1, -1, 9, 9, -1, -1, 9, -1, 9, -1, + -1, 9, 9, -1, 16, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 9, 9, 9, 9, -1, -1, + -1, 9, 118, -1, 9, 9, 16, 16, -1, 118, + -1, -1, -1, -1, -1, 118, 118, 24, 24, -1, + -1, -1, 118, 118, 118, 118, -1, -1, -1, -1, + 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 9 ); protected array $gotoBase = array( - 0, 0, -260, 0, 0, 384, 182, 434, 244, 138, - 0, 0, 7, -72, -11, -178, 45, 64, 135, 47, - 88, 0, -36, 159, 225, 4, 19, 164, 117, 86, - 0, 0, 0, 0, 0, 115, 0, 120, 0, 126, - 0, 53, -1, 168, 0, 185, -424, 0, -345, 154, - 489, 0, 0, 0, 0, 0, 250, 0, 0, 498, - 0, 0, 275, 0, 87, 219, -229, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -132, 0, 0, 70, - 119, 109, -52, -63, -241, -54, -697, 0, 0, 110, - 0, 0, 124, 43, 0, 0, 52, -222, 0, 99, - 0, 0, 0, 263, 276, 0, 0, 173, -65, 0, - 89, 0, 0, 80, 59, 0, 97, 302, 96, 128, - 108, 0, 0, 0, 0, 0, 0, 1, 0, 122, - 166, 0, 62, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 33, 0, 0, 65, 0, 190, - 85, 17, 0, 0, 0, -181, 0, 0, 157, 0, - 0, 0, 123, 0, 0, 0, 0, 0, 0, 0, - -126, 104, -49, 90, 222, 116, 0, 0, 71, 0, - 61, 237, 0, 224, -131, 0, 0 + 0, 0, -205, 0, 0, 309, 215, 392, 544, 139, + 0, 0, -129, -21, -112, -185, 99, 37, 109, 123, + 94, 0, -97, 6, 250, 20, 163, 179, 142, 135, + 0, 0, 0, 0, 0, 131, 0, 159, 0, 115, + 0, 81, -1, 205, 0, 248, -426, 0, -550, 195, + 154, 0, 0, 0, 0, 0, 160, 0, 0, 187, + 0, 0, 324, 0, 148, -10, -229, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -38, 0, 0, -58, + 137, -120, -7, 5, -270, -14, -439, 0, 0, -84, + 0, 0, 126, 167, 0, 0, 89, -278, 0, 108, + 0, 0, 0, 319, 339, 0, 0, 284, 84, 0, + 134, 0, 0, 117, 110, 121, 0, 118, 341, -101, + 211, 122, 0, 0, 0, 0, 0, 0, 4, 0, + 125, 156, 0, 82, 0, 0, 0, 0, -211, 0, + 0, 0, 0, 0, 0, 0, -12, 0, 0, 92, + 0, 0, 0, 145, 321, 144, 36, 0, 0, 0, + -246, 0, 0, 240, 0, 0, 0, 130, 0, 0, + 0, 0, 0, 0, 0, -125, 106, 161, 199, 267, + 216, 0, 0, 91, 0, 146, 271, 0, 312, 73, + 0, 0 ); protected array $gotoDefault = array( - -32768, 511, 740, 4, 741, 935, 816, 825, 597, 529, - 707, 344, 625, 420, 1308, 911, 1122, 578, 844, 1249, - 1223, 455, 847, 323, 730, 923, 894, 895, 398, 384, - 390, 396, 649, 626, 493, 879, 451, 871, 485, 874, - 450, 883, 162, 416, 509, 887, 3, 890, 557, 921, - 973, 385, 898, 386, 677, 900, 562, 902, 903, 393, - 399, 400, 1127, 570, 622, 915, 253, 564, 916, 383, - 917, 925, 388, 391, 688, 464, 504, 498, 409, 1102, - 565, 608, 646, 444, 472, 620, 632, 618, 479, 432, - 414, 322, 957, 965, 486, 462, 979, 346, 987, 738, - 1135, 640, 488, 995, 641, 1002, 1005, 530, 531, 477, - 1017, 269, 1020, 489, 22, 667, 1031, 1032, 668, 642, - 1054, 643, 669, 644, 1056, 471, 598, 1064, 452, 1072, - 1297, 453, 1076, 262, 1079, 275, 415, 433, 1085, 1086, - 9, 1092, 698, 699, 18, 273, 508, 1117, 689, 449, - 1134, 448, 1204, 1206, 558, 490, 1224, 476, 308, 1227, - 680, 505, 1232, 445, 1299, 446, 532, 473, 329, 533, - 1342, 303, 351, 326, 549, 309, 352, 534, 474, 1305, - 1313, 324, 31, 1332, 1343, 575, 613 + -32768, 521, 755, 4, 756, 950, 831, 840, 607, 539, + 716, 348, 635, 429, 1335, 926, 1149, 588, 859, 1276, + 1250, 464, 862, 326, 742, 938, 909, 910, 407, 393, + 399, 405, 659, 636, 502, 894, 460, 886, 494, 889, + 459, 898, 163, 425, 518, 902, 3, 905, 567, 936, + 988, 394, 913, 395, 687, 915, 572, 917, 918, 402, + 408, 409, 1154, 580, 632, 930, 255, 574, 931, 392, + 932, 940, 397, 400, 697, 473, 513, 507, 418, 1118, + 575, 618, 656, 453, 481, 630, 642, 628, 488, 441, + 424, 325, 972, 980, 495, 471, 994, 350, 1002, 750, + 1162, 650, 497, 1010, 651, 1017, 1020, 540, 541, 486, + 1032, 271, 1035, 498, 1041, 22, 677, 1046, 1047, 678, + 652, 1069, 653, 679, 654, 1071, 480, 608, 1079, 461, + 1087, 1324, 462, 1091, 264, 1094, 278, 354, 377, 442, + 1101, 1102, 9, 1108, 707, 708, 18, 276, 517, 1133, + 698, 1139, 275, 1142, 458, 1161, 457, 1231, 1233, 568, + 499, 1251, 485, 311, 1254, 690, 514, 1259, 454, 1326, + 455, 542, 482, 333, 543, 1369, 306, 357, 330, 559, + 312, 358, 544, 483, 1332, 1340, 327, 31, 1359, 1370, + 585, 623 ); protected array $ruleToNonTerminal = array( @@ -1054,17 +1064,19 @@ class Php8 extends \PhpParser\ParserAbstract 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, - 111, 111, 112, 112, 112, 112, 110, 110, 110, 114, - 114, 114, 114, 89, 89, 117, 117, 117, 118, 118, - 115, 115, 119, 119, 121, 121, 122, 122, 116, 123, - 123, 120, 124, 124, 124, 124, 113, 113, 82, 82, - 82, 20, 20, 20, 126, 125, 125, 127, 127, 127, - 127, 60, 128, 128, 129, 61, 131, 131, 132, 132, - 133, 133, 86, 134, 134, 134, 134, 134, 134, 134, - 139, 139, 140, 140, 141, 141, 141, 141, 141, 142, - 143, 143, 138, 138, 135, 135, 137, 137, 145, 145, - 144, 144, 144, 144, 144, 144, 144, 136, 146, 146, - 148, 147, 147, 62, 104, 149, 149, 56, 56, 42, + 111, 111, 112, 112, 112, 112, 110, 110, 110, 115, + 115, 115, 115, 89, 89, 118, 118, 118, 119, 119, + 116, 116, 120, 120, 122, 122, 123, 123, 117, 124, + 124, 121, 125, 125, 125, 125, 113, 113, 82, 82, + 82, 20, 20, 20, 127, 126, 126, 128, 128, 128, + 128, 60, 129, 129, 130, 61, 132, 132, 133, 133, + 134, 134, 86, 135, 135, 135, 135, 135, 135, 135, + 135, 141, 141, 142, 142, 143, 143, 143, 143, 143, + 144, 145, 145, 140, 140, 136, 136, 139, 139, 147, + 147, 146, 146, 146, 146, 146, 146, 146, 137, 148, + 148, 150, 149, 149, 138, 138, 114, 114, 151, 151, + 153, 153, 153, 152, 152, 62, 104, 154, 154, 56, + 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1073,21 +1085,21 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 156, 158, 158, 159, 150, 150, 155, - 155, 160, 161, 161, 162, 163, 164, 164, 164, 164, - 19, 19, 73, 73, 73, 73, 151, 151, 151, 151, - 166, 166, 152, 152, 154, 154, 154, 157, 157, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 173, - 173, 173, 108, 175, 175, 175, 175, 153, 153, 153, - 153, 153, 153, 153, 153, 59, 59, 169, 169, 169, - 169, 169, 176, 176, 165, 165, 165, 165, 177, 177, - 177, 177, 177, 74, 74, 66, 66, 66, 66, 130, - 130, 130, 130, 180, 179, 168, 168, 168, 168, 168, - 168, 167, 167, 167, 178, 178, 178, 178, 107, 174, - 182, 182, 181, 181, 183, 183, 183, 183, 183, 183, - 183, 183, 171, 171, 171, 171, 170, 185, 184, 184, - 184, 184, 184, 184, 184, 184, 186, 186, 186, 186 + 42, 42, 42, 42, 42, 161, 163, 163, 164, 155, + 155, 160, 160, 165, 166, 166, 167, 168, 169, 169, + 169, 169, 19, 19, 73, 73, 73, 73, 156, 156, + 156, 156, 171, 171, 157, 157, 159, 159, 159, 162, + 162, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 178, 178, 178, 108, 180, 180, 180, 180, 158, + 158, 158, 158, 158, 158, 158, 158, 59, 59, 174, + 174, 174, 174, 174, 181, 181, 170, 170, 170, 170, + 182, 182, 182, 182, 182, 74, 74, 66, 66, 66, + 66, 131, 131, 131, 131, 185, 184, 173, 173, 173, + 173, 173, 173, 172, 172, 172, 183, 183, 183, 183, + 107, 179, 187, 187, 186, 186, 188, 188, 188, 188, + 188, 188, 188, 188, 176, 176, 176, 176, 175, 190, + 189, 189, 189, 189, 189, 189, 189, 189, 191, 191, + 191, 191 ); protected array $ruleToLength = array( @@ -1119,40 +1131,42 @@ class Php8 extends \PhpParser\ParserAbstract 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, - 0, 2, 1, 1, 1, 1, 6, 8, 6, 1, + 0, 2, 1, 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, - 2, 0, 1, 5, 5, 6, 10, 3, 5, 1, - 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, - 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, - 1, 1, 3, 2, 2, 3, 1, 0, 1, 1, - 3, 3, 3, 4, 4, 1, 1, 2, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, + 2, 0, 1, 5, 7, 5, 6, 10, 3, 5, + 1, 1, 3, 0, 2, 4, 5, 4, 4, 4, + 3, 1, 1, 1, 1, 1, 1, 0, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 3, 1, 1, 3, 0, 2, 0, 3, 5, 8, + 1, 3, 3, 0, 2, 2, 2, 3, 1, 0, + 1, 1, 3, 3, 3, 4, 4, 1, 1, 2, 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, 2, 8, 9, 8, 9, 9, - 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, - 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 5, 3, 3, 4, 1, 1, 3, 1, 1, 1, - 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, - 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, - 4, 2, 2, 1, 3, 1, 4, 3, 3, 3, - 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, - 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, - 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, - 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 + 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, 2, 8, 9, 8, + 9, 9, 10, 9, 10, 8, 3, 2, 2, 1, + 1, 0, 4, 2, 1, 3, 2, 1, 2, 2, + 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 1, 1, 1, 0, 3, 0, 1, 1, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 5, 3, 3, 4, 1, 1, 3, 1, + 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, + 3, 1, 1, 1, 1, 1, 1, 3, 1, 1, + 1, 4, 1, 4, 4, 0, 1, 1, 1, 3, + 3, 1, 4, 2, 2, 1, 3, 1, 4, 3, + 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, + 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, + 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, + 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, + 2, 1 ); protected function initReduceCallbacks(): void { @@ -1813,11 +1827,11 @@ protected function initReduceCallbacks(): void { $self->semValue = Modifiers::READONLY; }, 286 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(6-6)], null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); + $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); }, 287 => static function ($self, $stackPos) { - $self->semValue = new Node\Param($self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-8)], $self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(8-2)], $self->semStack[$stackPos-(8-1)]); + $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); }, 288 => static function ($self, $stackPos) { @@ -1968,755 +1982,794 @@ protected function initReduceCallbacks(): void { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, 344 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); + $self->checkPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); + }, + 345 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 345 => static function ($self, $stackPos) { + 346 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 346 => static function ($self, $stackPos) { + 347 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 347 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, 348 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 349 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 350 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = null; /* will be skipped */ }, 351 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = array(); }, 352 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 353 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + $self->semValue = array(); }, 354 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 355 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 356 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 357 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 358 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 359 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 360 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 360 => null, - 361 => static function ($self, $stackPos) { + 361 => null, + 362 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 362 => static function ($self, $stackPos) { + 363 => static function ($self, $stackPos) { $self->semValue = null; }, - 363 => null, 364 => null, - 365 => static function ($self, $stackPos) { + 365 => null, + 366 => static function ($self, $stackPos) { $self->semValue = 0; }, - 366 => static function ($self, $stackPos) { + 367 => static function ($self, $stackPos) { $self->semValue = 0; }, - 367 => null, 368 => null, - 369 => static function ($self, $stackPos) { + 369 => null, + 370 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 370 => static function ($self, $stackPos) { + 371 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 371 => static function ($self, $stackPos) { + 372 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 372 => static function ($self, $stackPos) { + 373 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 373 => static function ($self, $stackPos) { + 374 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 374 => static function ($self, $stackPos) { + 375 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 375 => static function ($self, $stackPos) { + 376 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 376 => static function ($self, $stackPos) { + 377 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 377 => null, - 378 => static function ($self, $stackPos) { + 378 => null, + 379 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 379 => static function ($self, $stackPos) { + 380 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 380 => static function ($self, $stackPos) { + 381 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 381 => static function ($self, $stackPos) { + 382 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 382 => static function ($self, $stackPos) { + 383 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 383 => null, - 384 => null, + 384 => static function ($self, $stackPos) { + $self->semValue = []; + }, 385 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 386 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semValue = []; }, 387 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); + }, + 388 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, null); + }, + 389 => static function ($self, $stackPos) { + $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 388 => null, - 389 => null, 390 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = null; }, 391 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 392 => static function ($self, $stackPos) { - $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 393 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = 0; }, 394 => static function ($self, $stackPos) { + $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; + }, + 395 => null, + 396 => null, + 397 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 398 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 399 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 400 => null, + 401 => null, + 402 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 403 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 404 => static function ($self, $stackPos) { + $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 405 => static function ($self, $stackPos) { + $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 406 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 395 => null, - 396 => null, - 397 => static function ($self, $stackPos) { + 407 => null, + 408 => null, + 409 => static function ($self, $stackPos) { $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 398 => static function ($self, $stackPos) { + 410 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 399 => static function ($self, $stackPos) { + 411 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 400 => static function ($self, $stackPos) { + 412 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 401 => static function ($self, $stackPos) { + 413 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 402 => static function ($self, $stackPos) { + 414 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 403 => static function ($self, $stackPos) { + 415 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 404 => static function ($self, $stackPos) { + 416 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 405 => static function ($self, $stackPos) { + 417 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 406 => static function ($self, $stackPos) { + 418 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 407 => static function ($self, $stackPos) { + 419 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 408 => static function ($self, $stackPos) { + 420 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 409 => static function ($self, $stackPos) { + 421 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 410 => static function ($self, $stackPos) { + 422 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 411 => static function ($self, $stackPos) { + 423 => static function ($self, $stackPos) { $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 412 => static function ($self, $stackPos) { + 424 => static function ($self, $stackPos) { $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 413 => static function ($self, $stackPos) { + 425 => static function ($self, $stackPos) { $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 414 => static function ($self, $stackPos) { + 426 => static function ($self, $stackPos) { $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 415 => static function ($self, $stackPos) { + 427 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 416 => static function ($self, $stackPos) { + 428 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 417 => static function ($self, $stackPos) { + 429 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 418 => static function ($self, $stackPos) { + 430 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 419 => static function ($self, $stackPos) { + 431 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 420 => static function ($self, $stackPos) { + 432 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 421 => static function ($self, $stackPos) { + 433 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 422 => static function ($self, $stackPos) { + 434 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 423 => static function ($self, $stackPos) { + 435 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 424 => static function ($self, $stackPos) { + 436 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 425 => static function ($self, $stackPos) { + 437 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 426 => static function ($self, $stackPos) { + 438 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 427 => static function ($self, $stackPos) { + 439 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 428 => static function ($self, $stackPos) { + 440 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 429 => static function ($self, $stackPos) { + 441 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 430 => static function ($self, $stackPos) { + 442 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 431 => static function ($self, $stackPos) { + 443 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 432 => static function ($self, $stackPos) { + 444 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 433 => static function ($self, $stackPos) { + 445 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 434 => static function ($self, $stackPos) { + 446 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 435 => static function ($self, $stackPos) { + 447 => static function ($self, $stackPos) { $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 436 => static function ($self, $stackPos) { + 448 => static function ($self, $stackPos) { $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 437 => static function ($self, $stackPos) { + 449 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 438 => static function ($self, $stackPos) { + 450 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 439 => static function ($self, $stackPos) { + 451 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 440 => static function ($self, $stackPos) { + 452 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 441 => static function ($self, $stackPos) { + 453 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 442 => static function ($self, $stackPos) { + 454 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 443 => static function ($self, $stackPos) { + 455 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 444 => static function ($self, $stackPos) { + 456 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 445 => static function ($self, $stackPos) { + 457 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 446 => static function ($self, $stackPos) { + 458 => static function ($self, $stackPos) { $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 447 => static function ($self, $stackPos) { + 459 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 448 => static function ($self, $stackPos) { + 460 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 449 => static function ($self, $stackPos) { + 461 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 450 => static function ($self, $stackPos) { + 462 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 451 => static function ($self, $stackPos) { + 463 => static function ($self, $stackPos) { $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 452 => static function ($self, $stackPos) { + 464 => static function ($self, $stackPos) { $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 453 => static function ($self, $stackPos) { + 465 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 454 => static function ($self, $stackPos) { + 466 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 455 => static function ($self, $stackPos) { + 467 => static function ($self, $stackPos) { $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 456 => static function ($self, $stackPos) { + 468 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 457 => static function ($self, $stackPos) { + 469 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 458 => static function ($self, $stackPos) { + 470 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 459 => static function ($self, $stackPos) { + 471 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 460 => static function ($self, $stackPos) { + 472 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 461 => static function ($self, $stackPos) { + 473 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 462 => static function ($self, $stackPos) { + 474 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 463 => static function ($self, $stackPos) { + 475 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 464 => static function ($self, $stackPos) { + 476 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 465 => static function ($self, $stackPos) { + 477 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = strtolower($self->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $self->semValue = new Expr\Exit_($self->semStack[$stackPos-(2-2)], $attrs); }, - 466 => static function ($self, $stackPos) { + 478 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 467 => null, - 468 => static function ($self, $stackPos) { + 479 => null, + 480 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 469 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 470 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 471 => static function ($self, $stackPos) { + 483 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 472 => static function ($self, $stackPos) { + 484 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 473 => static function ($self, $stackPos) { + 485 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 474 => static function ($self, $stackPos) { + 486 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 475 => static function ($self, $stackPos) { + 487 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 476 => static function ($self, $stackPos) { + 488 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 477 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 478 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 479 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 480 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 481 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 483 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 484 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 485 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 486 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 487 => null, - 488 => null, - 489 => static function ($self, $stackPos) { + 499 => null, + 500 => null, + 501 => static function ($self, $stackPos) { $self->semValue = array(); }, - 490 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 491 => null, - 492 => static function ($self, $stackPos) { + 503 => null, + 504 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 493 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 494 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 507 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 508 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 510 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 511 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 512 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 501 => null, - 502 => static function ($self, $stackPos) { + 513 => null, + 514 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 516 => static function ($self, $stackPos) { $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 505 => static function ($self, $stackPos) { + 517 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 506 => null, - 507 => null, - 508 => static function ($self, $stackPos) { + 518 => null, + 519 => null, + 520 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 509 => static function ($self, $stackPos) { + 521 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 510 => null, - 511 => null, - 512 => static function ($self, $stackPos) { + 522 => null, + 523 => null, + 524 => static function ($self, $stackPos) { $self->semValue = null; }, - 513 => static function ($self, $stackPos) { + 525 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 514 => static function ($self, $stackPos) { + 526 => static function ($self, $stackPos) { $self->semValue = array(); }, - 515 => static function ($self, $stackPos) { + 527 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 516 => static function ($self, $stackPos) { + 528 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 517 => static function ($self, $stackPos) { + 529 => static function ($self, $stackPos) { $self->semValue = array(); }, - 518 => null, - 519 => static function ($self, $stackPos) { + 530 => null, + 531 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 520 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 521 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 522 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 523 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 524 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 525 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 526 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 527 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 528 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 529 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 530 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 531 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 532 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 533 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 534 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 535 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 536 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 537 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 538 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => null, - 540 => null, - 541 => null, - 542 => static function ($self, $stackPos) { + 551 => null, + 552 => null, + 553 => null, + 554 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 543 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 544 => static function ($self, $stackPos) { + 556 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 545 => static function ($self, $stackPos) { + 557 => static function ($self, $stackPos) { $self->semValue = null; }, - 546 => null, - 547 => null, - 548 => static function ($self, $stackPos) { + 558 => null, + 559 => null, + 560 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 549 => null, - 550 => null, - 551 => null, - 552 => null, - 553 => null, - 554 => null, - 555 => static function ($self, $stackPos) { + 561 => null, + 562 => null, + 563 => null, + 564 => null, + 565 => null, + 566 => null, + 567 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 556 => null, - 557 => null, - 558 => null, - 559 => static function ($self, $stackPos) { + 568 => null, + 569 => null, + 570 => null, + 571 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 560 => null, - 561 => static function ($self, $stackPos) { + 572 => null, + 573 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 562 => static function ($self, $stackPos) { + 574 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 563 => static function ($self, $stackPos) { + 575 => static function ($self, $stackPos) { $self->semValue = null; }, - 564 => null, - 565 => null, - 566 => null, - 567 => static function ($self, $stackPos) { + 576 => null, + 577 => null, + 578 => null, + 579 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 568 => static function ($self, $stackPos) { + 580 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 569 => null, - 570 => static function ($self, $stackPos) { + 581 => null, + 582 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 571 => static function ($self, $stackPos) { + 583 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 572 => static function ($self, $stackPos) { + 584 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 573 => static function ($self, $stackPos) { + 585 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 574 => static function ($self, $stackPos) { + 586 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 575 => null, - 576 => static function ($self, $stackPos) { + 587 => null, + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 577 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 578 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 579 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 580 => static function ($self, $stackPos) { + 592 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 581 => null, - 582 => static function ($self, $stackPos) { + 593 => null, + 594 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 583 => null, - 584 => null, - 585 => static function ($self, $stackPos) { + 595 => null, + 596 => null, + 597 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 586 => null, - 587 => static function ($self, $stackPos) { + 598 => null, + 599 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 588 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 589 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 590 => null, - 591 => static function ($self, $stackPos) { + 602 => null, + 603 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 592 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 593 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 594 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 595 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 597 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 598 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 599 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 600 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 601 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 602 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 603 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 604 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 605 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 606 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 607 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 608 => null, - 609 => static function ($self, $stackPos) { + 620 => null, + 621 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 610 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 611 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 612 => static function ($self, $stackPos) { + 624 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 613 => static function ($self, $stackPos) { + 625 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 615 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 616 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 617 => static function ($self, $stackPos) { + 629 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 618 => static function ($self, $stackPos) { + 630 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 619 => null, + 631 => null, ]; } } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 4026384be4..68bf0e5e70 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -14,6 +14,7 @@ use PhpParser\Node\InterpolatedStringPart; use PhpParser\Node\Name; use PhpParser\Node\Param; +use PhpParser\Node\PropertyHook; use PhpParser\Node\Scalar\InterpolatedString; use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; @@ -1158,6 +1159,42 @@ protected function checkUseUse(UseItem $node, int $namePos): void { } } + /** @param PropertyHook[] $hooks */ + protected function checkPropertyHookList(array $hooks, int $hookPos): void { + if (empty($hooks)) { + $this->emitError(new Error( + 'Property hook list cannot be empty', $this->getAttributesAt($hookPos))); + } + } + + protected function checkPropertyHook(PropertyHook $hook, ?int $paramListPos): void { + $name = $hook->name->toLowerString(); + if ($name !== 'get' && $name !== 'set') { + $this->emitError(new Error( + 'Unknown hook "' . $hook->name . '", expected "get" or "set"', + $hook->name->getAttributes())); + } + if ($name === 'get' && $paramListPos !== null) { + $this->emitError(new Error( + 'get hook must not have a parameter list', $this->getAttributesAt($paramListPos))); + } + } + + protected function checkPropertyHookModifiers(int $a, int $b, int $modifierPos): void { + try { + Modifiers::verifyModifier($a, $b); + } catch (Error $error) { + $error->setAttributes($this->getAttributesAt($modifierPos)); + $this->emitError($error); + } + + if ($b != Modifiers::FINAL) { + $this->emitError(new Error( + 'Cannot use the ' . Modifiers::toString($b) . ' modifier on a property hook', + $this->getAttributesAt($modifierPos))); + } + } + /** * Creates the token map. * diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 61dad3a913..51c54f7de6 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -23,7 +23,8 @@ protected function pParam(Node\Param $node): string { . ($node->byRef ? '&' : '') . ($node->variadic ? '...' : '') . $this->p($node->var) - . ($node->default ? ' = ' . $this->p($node->default) : ''); + . ($node->default ? ' = ' . $this->p($node->default) : '') + . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : ''); } protected function pArg(Node\Arg $node): string { @@ -831,7 +832,8 @@ protected function pStmt_Property(Stmt\Property $node): string { return $this->pAttrGroups($node->attrGroups) . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . ($node->type ? $this->p($node->type) . ' ' : '') - . $this->pCommaSeparated($node->props) . ';'; + . $this->pCommaSeparated($node->props) + . ($node->hooks ? ' {' . $this->pStmts($node->hooks) . $this->nl . '}' : ';'); } protected function pPropertyItem(Node\PropertyItem $node): string { @@ -839,6 +841,15 @@ protected function pPropertyItem(Node\PropertyItem $node): string { . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } + protected function pPropertyHook(Node\PropertyHook $node): string { + return $this->pAttrGroups($node->attrGroups) + . $this->pModifiers($node->flags) + . ($node->byRef ? '&' : '') . $node->name + . ($node->params ? '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' : '') + . (\is_array($node->body) ? ' {' . $this->pStmts($node->body) . $this->nl . '}' + : ($node->body !== null ? ' => ' . $this->p($node->body) : '') . ';'); + } + protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 17f27a15ea..1dbd21f587 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -14,6 +14,7 @@ use PhpParser\Node\IntersectionType; use PhpParser\Node\MatchArm; use PhpParser\Node\Param; +use PhpParser\Node\PropertyHook; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; use PhpParser\Node\UnionType; @@ -1517,6 +1518,7 @@ protected function initializeListInsertionMap(): void { Stmt\UseUse::class . '->uses' => ', ', MatchArm::class . '->conds' => ', ', AttributeGroup::class . '->attrs' => ', ', + PropertyHook::class . '->params' => ', ', // statement lists Expr\Closure::class . '->stmts' => "\n", @@ -1554,10 +1556,15 @@ protected function initializeListInsertionMap(): void { Expr\Closure::class . '->attrGroups' => ' ', Expr\ArrowFunction::class . '->attrGroups' => ' ', Param::class . '->attrGroups' => ' ', + PropertyHook::class . '->attrGroups' => ' ', + Stmt\Switch_::class . '->cases' => "\n", Stmt\TraitUse::class . '->adaptations' => "\n", Stmt\TryCatch::class . '->stmts' => "\n", Stmt\While_::class . '->stmts' => "\n", + PropertyHook::class . '->body' => "\n", + Stmt\Property::class . '->hooks' => "\n", + Param::class . '->hooks' => "\n", // dummy for top-level context 'File->stmts' => "\n", @@ -1641,6 +1648,7 @@ protected function initializeModifierChangeMap(): void { Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], PrintableNewAnonClassNode::class . '->flags' => ['pModifiers', \T_CLASS], Param::class . '->flags' => ['pModifiers', \T_VARIABLE], + PropertyHook::class . '->flags' => ['pModifiers', \T_STRING], Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index bbaced4d65..4a37e82796 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -3,6 +3,7 @@ namespace PhpParser\Builder; use PhpParser\Comment; +use PhpParser\Error; use PhpParser\Modifiers; use PhpParser\Node\Arg; use PhpParser\Node\Attribute; @@ -10,6 +11,8 @@ use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\Name; +use PhpParser\Node\PropertyHook; +use PhpParser\Node\PropertyItem; use PhpParser\Node\Scalar; use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt; @@ -29,9 +32,7 @@ public function testModifiers(): void { $this->assertEquals( new Stmt\Property( Modifiers::PRIVATE | Modifiers::STATIC, - [ - new \PhpParser\Node\PropertyItem('test') - ] + [new PropertyItem('test')] ), $node ); @@ -44,9 +45,7 @@ public function testModifiers(): void { $this->assertEquals( new Stmt\Property( Modifiers::PROTECTED, - [ - new \PhpParser\Node\PropertyItem('test') - ] + [new PropertyItem('test')] ), $node ); @@ -59,9 +58,7 @@ public function testModifiers(): void { $this->assertEquals( new Stmt\Property( Modifiers::PUBLIC, - [ - new \PhpParser\Node\PropertyItem('test') - ] + [new PropertyItem('test')] ), $node ); @@ -74,12 +71,23 @@ public function testModifiers(): void { $this->assertEquals( new Stmt\Property( Modifiers::READONLY, - [ - new \PhpParser\Node\PropertyItem('test') - ] + [new PropertyItem('test')] ), $node ); + + $node = $this->createPropertyBuilder('test') + ->makeFinal() + ->getNode(); + $this->assertEquals( + new Stmt\Property(Modifiers::FINAL, [new PropertyItem('test')]), + $node); + } + + public function testAbstractWithoutHook() { + $this->expectException(Error::class); + $this->expectExceptionMessage('Only hooked properties may be declared abstract'); + $this->createPropertyBuilder('test')->makeAbstract()->getNode(); } public function testDocComment(): void { @@ -136,6 +144,23 @@ public function testAddAttribute(): void { ); } + public function testAddHook(): void { + $get = new PropertyHook('get', null); + $set = new PropertyHook('set', null); + $node = $this->createPropertyBuilder('test') + ->addHook($get) + ->addHook($set) + ->makeAbstract() + ->getNode(); + $this->assertEquals( + new Stmt\Property( + Modifiers::ABSTRACT, + [new PropertyItem('test')], + [], null, [], + [$get, $set]), + $node); + } + public static function provideTestDefaultValues() { return [ [ diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index dc521c79a6..5c28e5fa81 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -260,7 +260,8 @@ function functionName(&$a = 0, $b = 1.0) { } }, "flags": 0, - "attrGroups": [], + "attrGroups": [],, + "hooks": [] "attributes": { "startLine": 4, "startTokenPos": 9, @@ -301,7 +302,8 @@ function functionName(&$a = 0, $b = 1.0) { } }, "flags": 0, - "attrGroups": [], + "attrGroups": [],, + "hooks": [] "attributes": { "startLine": 4, "startTokenPos": 17, @@ -464,7 +466,8 @@ function functionName(&$a = 0, $b = 1.0) { "value": 0 }, "flags": 0, - "attrGroups": [] + "attrGroups": [], + "hooks": [] }, { "nodeType": "Param", @@ -505,7 +508,8 @@ function functionName(&$a = 0, $b = 1.0) { "value": 1 }, "flags": 0, - "attrGroups": [] + "attrGroups": [], + "hooks": [] } ], "returnType": null, diff --git a/test/code/formatPreservation/property_hooks.test b/test/code/formatPreservation/property_hooks.test new file mode 100644 index 0000000000..b6e3c6ed8c --- /dev/null +++ b/test/code/formatPreservation/property_hooks.test @@ -0,0 +1,128 @@ +Property hooks +----- + 42; + } +} +----- +$stmts[0]->stmts[0]->hooks[] = new Node\PropertyHook('set', new Scalar\Int_(123)); +----- + 42; + set => 123; + } +} +----- + 42; } + ) {} +} +----- +$stmts[0]->stmts[0]->params[0]->hooks[] = new Node\PropertyHook('set', new Scalar\Int_(123)); +----- + 42; + set => 123; } + ) {} +} +----- +stmts[0]->hooks[0]->body[] = new Stmt\Expression(new Expr\Variable('b')); +----- + 42; + } +} +----- +$stmts[0]->stmts[0]->hooks[0]->flags = Modifiers::FINAL; +----- + 42; + } +} +----- + 42; + } +} +----- +$stmts[0]->stmts[0]->hooks[0]->body = [new Stmt\Return_(new Scalar\Int_(24))]; +----- +stmts[0]->hooks[0]->body = new Scalar\Int_(24); +$stmts[0]->stmts[1]->hooks[0]->body = [new Stmt\Return_(new Scalar\Int_(24))]; +----- + 24; + } + public $prop2 { + &get { + return 24; + } + } +} diff --git a/test/code/parser/commentAtEndOfClass.test b/test/code/parser/commentAtEndOfClass.test index 8e353ad6d5..e287451dad 100644 --- a/test/code/parser/commentAtEndOfClass.test +++ b/test/code/parser/commentAtEndOfClass.test @@ -31,6 +31,8 @@ array( default: null ) ) + hooks: array( + ) ) 1: Stmt_Nop( comments: array( diff --git a/test/code/parser/errorHandling/recovery.test b/test/code/parser/errorHandling/recovery.test index f6a016eb4d..49e9b277bc 100644 --- a/test/code/parser/errorHandling/recovery.test +++ b/test/code/parser/errorHandling/recovery.test @@ -714,6 +714,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) @@ -869,6 +871,8 @@ array( default: null ) ) + hooks: array( + ) ) 1: Stmt_Property( attrGroups: array( @@ -883,6 +887,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) @@ -984,6 +990,8 @@ array( var: Expr_Error( ) default: null + hooks: array( + ) ) ) returnType: null @@ -1016,6 +1024,8 @@ array( name: foo ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -1029,6 +1039,8 @@ array( var: Expr_Error( ) default: null + hooks: array( + ) ) ) returnType: null @@ -1058,6 +1070,8 @@ array( var: Expr_Error( ) default: null + hooks: array( + ) ) ) returnType: null @@ -1087,6 +1101,8 @@ array( var: Expr_Error( ) default: null + hooks: array( + ) ) ) returnType: null @@ -1118,6 +1134,8 @@ array( var: Expr_Error( ) default: null + hooks: array( + ) ) ) returnType: null @@ -1156,6 +1174,8 @@ array( var: Expr_Error( ) default: null + hooks: array( + ) ) ) returnType: null @@ -1183,6 +1203,8 @@ array( var: Expr_Error( ) default: null + hooks: array( + ) ) ) uses: array( @@ -1352,7 +1374,7 @@ class B { const X = 1 } ----- -Syntax error, unexpected T_PUBLIC, expecting ';' from 6:5 to 6:10 +Syntax error, unexpected T_PUBLIC, expecting ';' or '{' from 6:5 to 6:10 Syntax error, unexpected '}', expecting ';' from 12:1 to 12:1 array( 0: Stmt_Class( @@ -1379,6 +1401,8 @@ array( default: null ) ) + hooks: array( + ) comments: array( 0: /** @var ?string */ ) @@ -1405,6 +1429,8 @@ array( name: s ) default: null + hooks: array( + ) ) ) returnType: null diff --git a/test/code/parser/expr/arrow_function.test b/test/code/parser/expr/arrow_function.test index 3ab9e2711b..f81dde44f4 100644 --- a/test/code/parser/expr/arrow_function.test +++ b/test/code/parser/expr/arrow_function.test @@ -32,6 +32,8 @@ array( name: a ) default: null + hooks: array( + ) ) ) returnType: null @@ -60,6 +62,8 @@ array( default: Scalar_Int( value: 42 ) + hooks: array( + ) ) ) returnType: null @@ -86,6 +90,8 @@ array( name: x ) default: null + hooks: array( + ) ) ) returnType: null @@ -112,6 +118,8 @@ array( name: x ) default: null + hooks: array( + ) ) ) returnType: null @@ -138,6 +146,8 @@ array( name: x ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -150,6 +160,8 @@ array( name: rest ) default: null + hooks: array( + ) ) ) returnType: null @@ -192,6 +204,8 @@ array( name: a ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -204,6 +218,8 @@ array( name: b ) default: null + hooks: array( + ) ) ) returnType: null @@ -235,6 +251,8 @@ array( name: a ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -247,6 +265,8 @@ array( name: b ) default: null + hooks: array( + ) ) ) returnType: null diff --git a/test/code/parser/expr/closure.test b/test/code/parser/expr/closure.test index 304603b38d..a4177068c1 100644 --- a/test/code/parser/expr/closure.test +++ b/test/code/parser/expr/closure.test @@ -28,6 +28,8 @@ array( name: a ) default: null + hooks: array( + ) ) ) uses: array( @@ -60,6 +62,8 @@ array( name: a ) default: null + hooks: array( + ) ) ) uses: array( @@ -120,6 +124,8 @@ array( name: a ) default: null + hooks: array( + ) ) ) uses: array( @@ -162,6 +168,8 @@ array( name: a ) default: null + hooks: array( + ) ) ) uses: array( diff --git a/test/code/parser/expr/uvs/indirectCall.test b/test/code/parser/expr/uvs/indirectCall.test index 08535cf5d9..d2cfa99aa2 100644 --- a/test/code/parser/expr/uvs/indirectCall.test +++ b/test/code/parser/expr/uvs/indirectCall.test @@ -211,6 +211,8 @@ array( name: x ) default: null + hooks: array( + ) ) ) uses: array( @@ -289,6 +291,8 @@ array( name: null ) ) + hooks: array( + ) ) ) uses: array( diff --git a/test/code/parser/semiReserved.test b/test/code/parser/semiReserved.test index 5b361cb711..e7731aedc4 100644 --- a/test/code/parser/semiReserved.test +++ b/test/code/parser/semiReserved.test @@ -133,6 +133,8 @@ array( default: null ) ) + hooks: array( + ) ) 5: Stmt_Property( attrGroups: array( @@ -147,6 +149,8 @@ array( default: null ) ) + hooks: array( + ) ) 6: Stmt_ClassConst( attrGroups: array( diff --git a/test/code/parser/stmt/attributes.test b/test/code/parser/stmt/attributes.test index 2a0d2d28db..f15057aff9 100644 --- a/test/code/parser/stmt/attributes.test +++ b/test/code/parser/stmt/attributes.test @@ -159,6 +159,8 @@ array( name: param ) default: null + hooks: array( + ) ) ) returnType: null @@ -189,6 +191,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) diff --git a/test/code/parser/stmt/class/anonymous.test b/test/code/parser/stmt/class/anonymous.test index 0af0e7695a..6ac4c8a178 100644 --- a/test/code/parser/stmt/class/anonymous.test +++ b/test/code/parser/stmt/class/anonymous.test @@ -102,6 +102,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) diff --git a/test/code/parser/stmt/class/implicitPublic.test b/test/code/parser/stmt/class/implicitPublic.test index 6a6ad1eaba..f42dc6c6e5 100644 --- a/test/code/parser/stmt/class/implicitPublic.test +++ b/test/code/parser/stmt/class/implicitPublic.test @@ -37,6 +37,8 @@ array( default: null ) ) + hooks: array( + ) ) 1: Stmt_Property( attrGroups: array( @@ -51,6 +53,8 @@ array( default: null ) ) + hooks: array( + ) ) 2: Stmt_ClassMethod( attrGroups: array( diff --git a/test/code/parser/stmt/class/modifier_error.test b/test/code/parser/stmt/class/modifier_error.test index e6b6d90bbc..4257c2f281 100644 --- a/test/code/parser/stmt/class/modifier_error.test +++ b/test/code/parser/stmt/class/modifier_error.test @@ -28,6 +28,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) @@ -61,6 +63,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) @@ -94,6 +98,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) @@ -159,6 +165,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) diff --git a/test/code/parser/stmt/class/php4Style.test b/test/code/parser/stmt/class/php4Style.test index c59f2f36b6..abf5151237 100644 --- a/test/code/parser/stmt/class/php4Style.test +++ b/test/code/parser/stmt/class/php4Style.test @@ -33,6 +33,8 @@ array( default: null ) ) + hooks: array( + ) ) 1: Stmt_ClassMethod( attrGroups: array( diff --git a/test/code/parser/stmt/class/propertyTypes.test b/test/code/parser/stmt/class/propertyTypes.test index bc301d1256..8a6f1bc753 100644 --- a/test/code/parser/stmt/class/propertyTypes.test +++ b/test/code/parser/stmt/class/propertyTypes.test @@ -36,6 +36,8 @@ array( default: null ) ) + hooks: array( + ) ) 1: Stmt_Property( attrGroups: array( @@ -52,6 +54,8 @@ array( default: null ) ) + hooks: array( + ) ) 2: Stmt_Property( attrGroups: array( @@ -70,6 +74,8 @@ array( default: null ) ) + hooks: array( + ) ) 3: Stmt_Property( attrGroups: array( @@ -88,6 +94,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) diff --git a/test/code/parser/stmt/class/property_hooks.test b/test/code/parser/stmt/class/property_hooks.test new file mode 100644 index 0000000000..f53211c6ff --- /dev/null +++ b/test/code/parser/stmt/class/property_hooks.test @@ -0,0 +1,525 @@ +Property hooks +----- + 42; + set => $value; + } + abstract $prop3 { + &get; + set; + } + public $prop4 { + final get { return 42; } + set(string $value) { } + } +} +----- +array( + 0: Stmt_Class( + attrGroups: array( + ) + flags: 0 + name: Identifier( + name: Test + ) + extends: null + implements: array( + ) + stmts: array( + 0: Stmt_Property( + attrGroups: array( + ) + flags: PUBLIC (1) + type: null + props: array( + 0: PropertyItem( + name: VarLikeIdentifier( + name: prop + ) + default: null + ) + ) + hooks: array( + 0: PropertyHook( + attrGroups: array( + ) + flags: 0 + byRef: false + name: Identifier( + name: get + ) + params: array( + ) + body: array( + 0: Stmt_Return( + expr: Scalar_Int( + value: 42 + ) + ) + ) + ) + 1: PropertyHook( + attrGroups: array( + ) + flags: 0 + byRef: false + name: Identifier( + name: set + ) + params: array( + ) + body: array( + 0: Stmt_Echo( + exprs: array( + 0: Expr_Variable( + name: value + ) + ) + ) + ) + ) + ) + ) + 1: Stmt_Property( + attrGroups: array( + ) + flags: PRIVATE (4) + type: null + props: array( + 0: PropertyItem( + name: VarLikeIdentifier( + name: prop2 + ) + default: null + ) + ) + hooks: array( + 0: PropertyHook( + attrGroups: array( + ) + flags: 0 + byRef: false + name: Identifier( + name: get + ) + params: array( + ) + body: Scalar_Int( + value: 42 + ) + ) + 1: PropertyHook( + attrGroups: array( + ) + flags: 0 + byRef: false + name: Identifier( + name: set + ) + params: array( + ) + body: Expr_Variable( + name: value + ) + ) + ) + ) + 2: Stmt_Property( + attrGroups: array( + ) + flags: ABSTRACT (16) + type: null + props: array( + 0: PropertyItem( + name: VarLikeIdentifier( + name: prop3 + ) + default: null + ) + ) + hooks: array( + 0: PropertyHook( + attrGroups: array( + ) + flags: 0 + byRef: true + name: Identifier( + name: get + ) + params: array( + ) + body: null + ) + 1: PropertyHook( + attrGroups: array( + ) + flags: 0 + byRef: false + name: Identifier( + name: set + ) + params: array( + ) + body: null + ) + ) + ) + 3: Stmt_Property( + attrGroups: array( + ) + flags: PUBLIC (1) + type: null + props: array( + 0: PropertyItem( + name: VarLikeIdentifier( + name: prop4 + ) + default: null + ) + ) + hooks: array( + 0: PropertyHook( + attrGroups: array( + ) + flags: FINAL (32) + byRef: false + name: Identifier( + name: get + ) + params: array( + ) + body: array( + 0: Stmt_Return( + expr: Scalar_Int( + value: 42 + ) + ) + ) + ) + 1: PropertyHook( + attrGroups: array( + ) + flags: 0 + byRef: false + name: Identifier( + name: set + ) + params: array( + 0: Param( + attrGroups: array( + ) + flags: 0 + type: Identifier( + name: string + ) + byRef: false + variadic: false + var: Expr_Variable( + name: value + ) + default: null + hooks: array( + ) + ) + ) + body: array( + ) + ) + ) + ) + ) + ) +) +----- + 42; + } +} +----- +get hook must not have a parameter list from 4:12 to 4:12 +array( + 0: Stmt_Class( + attrGroups: array( + ) + flags: 0 + name: Identifier( + name: Test + ) + extends: null + implements: array( + ) + stmts: array( + 0: Stmt_Property( + attrGroups: array( + ) + flags: PUBLIC (1) + type: null + props: array( + 0: PropertyItem( + name: VarLikeIdentifier( + name: prop + ) + default: null + ) + ) + hooks: array( + 0: PropertyHook( + attrGroups: array( + ) + flags: 0 + byRef: false + name: Identifier( + name: get + ) + params: array( + ) + body: Scalar_Int( + value: 42 + ) + ) + ) + ) + ) + ) +) +----- + bar; } +} +----- +Unknown hook "FOO", expected "get" or "set" from 3:20 to 3:22 +array( + 0: Stmt_Class( + attrGroups: array( + ) + flags: 0 + name: Identifier( + name: Test + ) + extends: null + implements: array( + ) + stmts: array( + 0: Stmt_Property( + attrGroups: array( + ) + flags: PUBLIC (1) + type: null + props: array( + 0: PropertyItem( + name: VarLikeIdentifier( + name: prop + ) + default: null + ) + ) + hooks: array( + 0: PropertyHook( + attrGroups: array( + ) + flags: 0 + byRef: false + name: Identifier( + name: FOO + ) + params: array( + ) + body: Expr_ConstFetch( + name: Name( + name: bar + ) + ) + ) + ) + ) + ) + ) +) +----- + $value; }, + public $g = 1 { get => 2; }, ) {} } ----- @@ -47,6 +49,8 @@ array( default: Scalar_Float( value: 0 ) + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -64,6 +68,8 @@ array( items: array( ) ) + hooks: array( + ) ) 2: Param( attrGroups: array( @@ -80,6 +86,8 @@ array( default: Scalar_String( value: hello ) + hooks: array( + ) ) 3: Param( attrGroups: array( @@ -96,6 +104,66 @@ array( default: Scalar_Int( value: 0 ) + hooks: array( + ) + ) + 4: Param( + attrGroups: array( + ) + flags: PUBLIC (1) + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: h + ) + default: null + hooks: array( + 0: PropertyHook( + attrGroups: array( + ) + flags: 0 + byRef: false + name: Identifier( + name: set + ) + params: array( + ) + body: Expr_Variable( + name: value + ) + ) + ) + ) + 5: Param( + attrGroups: array( + ) + flags: PUBLIC (1) + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: g + ) + default: Scalar_Int( + value: 1 + ) + hooks: array( + 0: PropertyHook( + attrGroups: array( + ) + flags: 0 + byRef: false + name: Identifier( + name: get + ) + params: array( + ) + body: Scalar_Int( + value: 2 + ) + ) + ) ) ) returnType: null diff --git a/test/code/parser/stmt/class/simple.test b/test/code/parser/stmt/class/simple.test index c601f0cfd0..18e5193747 100644 --- a/test/code/parser/stmt/class/simple.test +++ b/test/code/parser/stmt/class/simple.test @@ -83,6 +83,8 @@ array( ) ) ) + hooks: array( + ) ) 2: Stmt_Property( attrGroups: array( @@ -97,6 +99,8 @@ array( default: null ) ) + hooks: array( + ) ) 3: Stmt_Property( attrGroups: array( @@ -111,6 +115,8 @@ array( default: null ) ) + hooks: array( + ) ) 4: Stmt_ClassMethod( attrGroups: array( @@ -146,6 +152,8 @@ array( name: a ) default: null + hooks: array( + ) ) ) returnType: null diff --git a/test/code/parser/stmt/function/builtinTypeDeclarations.test b/test/code/parser/stmt/function/builtinTypeDeclarations.test index 64cbedcffe..4267777bca 100644 --- a/test/code/parser/stmt/function/builtinTypeDeclarations.test +++ b/test/code/parser/stmt/function/builtinTypeDeclarations.test @@ -25,6 +25,8 @@ array( name: a ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -39,6 +41,8 @@ array( name: b ) default: null + hooks: array( + ) ) 2: Param( attrGroups: array( @@ -53,6 +57,8 @@ array( name: c ) default: null + hooks: array( + ) ) 3: Param( attrGroups: array( @@ -67,6 +73,8 @@ array( name: d ) default: null + hooks: array( + ) ) 4: Param( attrGroups: array( @@ -81,6 +89,8 @@ array( name: e ) default: null + hooks: array( + ) ) 5: Param( attrGroups: array( @@ -95,6 +105,8 @@ array( name: f ) default: null + hooks: array( + ) ) 6: Param( attrGroups: array( @@ -109,6 +121,8 @@ array( name: g ) default: null + hooks: array( + ) ) ) returnType: Identifier( diff --git a/test/code/parser/stmt/function/byRef.test b/test/code/parser/stmt/function/byRef.test index ae01214c83..98fc5fb1f9 100644 --- a/test/code/parser/stmt/function/byRef.test +++ b/test/code/parser/stmt/function/byRef.test @@ -25,6 +25,8 @@ array( name: b ) default: null + hooks: array( + ) ) ) returnType: null @@ -50,6 +52,8 @@ array( name: b ) default: null + hooks: array( + ) ) ) returnType: null diff --git a/test/code/parser/stmt/function/defaultValues.test b/test/code/parser/stmt/function/defaultValues.test index 952b64c46e..9a243f70df 100644 --- a/test/code/parser/stmt/function/defaultValues.test +++ b/test/code/parser/stmt/function/defaultValues.test @@ -38,6 +38,8 @@ array( name: null ) ) + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -52,6 +54,8 @@ array( default: Scalar_String( value: foo ) + hooks: array( + ) ) 2: Param( attrGroups: array( @@ -71,6 +75,8 @@ array( name: B ) ) + hooks: array( + ) ) 3: Param( attrGroups: array( @@ -87,6 +93,8 @@ array( value: 1 ) ) + hooks: array( + ) ) 4: Param( attrGroups: array( @@ -103,6 +111,8 @@ array( value: 1 ) ) + hooks: array( + ) ) 5: Param( attrGroups: array( @@ -118,6 +128,8 @@ array( items: array( ) ) + hooks: array( + ) ) 6: Param( attrGroups: array( @@ -133,6 +145,8 @@ array( items: array( ) ) + hooks: array( + ) ) 7: Param( attrGroups: array( @@ -156,6 +170,8 @@ array( ) ) ) + hooks: array( + ) ) 8: Param( attrGroups: array( @@ -189,6 +205,8 @@ array( ) ) ) + hooks: array( + ) ) ) returnType: null diff --git a/test/code/parser/stmt/function/disjointNormalFormTypes.test b/test/code/parser/stmt/function/disjointNormalFormTypes.test index 3ad9503e18..f515f96875 100644 --- a/test/code/parser/stmt/function/disjointNormalFormTypes.test +++ b/test/code/parser/stmt/function/disjointNormalFormTypes.test @@ -57,6 +57,8 @@ array( default: null ) ) + hooks: array( + ) ) 1: Stmt_Property( attrGroups: array( @@ -87,6 +89,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) @@ -132,6 +136,8 @@ array( name: a ) default: null + hooks: array( + ) ) ) returnType: UnionType( diff --git a/test/code/parser/stmt/function/intersectionTypes.test b/test/code/parser/stmt/function/intersectionTypes.test index c7a01f3bc8..b640b9f797 100644 --- a/test/code/parser/stmt/function/intersectionTypes.test +++ b/test/code/parser/stmt/function/intersectionTypes.test @@ -42,6 +42,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) @@ -73,6 +75,8 @@ array( name: a ) default: null + hooks: array( + ) ) ) returnType: IntersectionType( diff --git a/test/code/parser/stmt/function/nullableTypes.test b/test/code/parser/stmt/function/nullableTypes.test index a2c2e9aad9..0804ae5319 100644 --- a/test/code/parser/stmt/function/nullableTypes.test +++ b/test/code/parser/stmt/function/nullableTypes.test @@ -29,6 +29,8 @@ array( name: bar ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -45,6 +47,8 @@ array( name: foo ) default: null + hooks: array( + ) ) ) returnType: NullableType( diff --git a/test/code/parser/stmt/function/parameters_trailing_comma.test b/test/code/parser/stmt/function/parameters_trailing_comma.test index f80ba1f413..d2e4bec7e9 100644 --- a/test/code/parser/stmt/function/parameters_trailing_comma.test +++ b/test/code/parser/stmt/function/parameters_trailing_comma.test @@ -25,6 +25,8 @@ array( name: bar ) default: null + hooks: array( + ) ) ) returnType: null @@ -74,6 +76,8 @@ array( name: name ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -86,6 +90,8 @@ array( name: value ) default: null + hooks: array( + ) ) ) returnType: null @@ -118,6 +124,8 @@ array( name: foo ) default: null + hooks: array( + ) ) ) returnType: null diff --git a/test/code/parser/stmt/function/typeDeclarations.test b/test/code/parser/stmt/function/typeDeclarations.test index 07ce52e44f..97f09171ca 100644 --- a/test/code/parser/stmt/function/typeDeclarations.test +++ b/test/code/parser/stmt/function/typeDeclarations.test @@ -24,6 +24,8 @@ array( name: b ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -38,6 +40,8 @@ array( name: c ) default: null + hooks: array( + ) ) 2: Param( attrGroups: array( @@ -52,6 +56,8 @@ array( name: d ) default: null + hooks: array( + ) ) 3: Param( attrGroups: array( @@ -66,6 +72,8 @@ array( name: f ) default: null + hooks: array( + ) ) ) returnType: null diff --git a/test/code/parser/stmt/function/typeVersions.test b/test/code/parser/stmt/function/typeVersions.test index 8ce360313f..4bee4e36e3 100644 --- a/test/code/parser/stmt/function/typeVersions.test +++ b/test/code/parser/stmt/function/typeVersions.test @@ -34,6 +34,8 @@ array( name: a1 ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -48,6 +50,8 @@ array( name: a2 ) default: null + hooks: array( + ) ) 2: Param( attrGroups: array( @@ -62,6 +66,8 @@ array( name: a3 ) default: null + hooks: array( + ) ) 3: Param( attrGroups: array( @@ -76,6 +82,8 @@ array( name: a4 ) default: null + hooks: array( + ) ) 4: Param( attrGroups: array( @@ -90,6 +98,8 @@ array( name: a5 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.0 ) @@ -107,6 +117,8 @@ array( name: a6 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.1 ) @@ -124,6 +136,8 @@ array( name: a7 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.2 ) @@ -141,6 +155,8 @@ array( name: a8 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) @@ -158,6 +174,8 @@ array( name: a9 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) @@ -228,6 +246,8 @@ array( name: a1 ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -242,6 +262,8 @@ array( name: a2 ) default: null + hooks: array( + ) ) 2: Param( attrGroups: array( @@ -256,6 +278,8 @@ array( name: a3 ) default: null + hooks: array( + ) ) 3: Param( attrGroups: array( @@ -270,6 +294,8 @@ array( name: a4 ) default: null + hooks: array( + ) ) 4: Param( attrGroups: array( @@ -284,6 +310,8 @@ array( name: a5 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.0 ) @@ -301,6 +329,8 @@ array( name: a6 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.1 ) @@ -318,6 +348,8 @@ array( name: a7 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.2 ) @@ -335,6 +367,8 @@ array( name: a8 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) @@ -352,6 +386,8 @@ array( name: a9 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) @@ -422,6 +458,8 @@ array( name: a1 ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -436,6 +474,8 @@ array( name: a2 ) default: null + hooks: array( + ) ) 2: Param( attrGroups: array( @@ -450,6 +490,8 @@ array( name: a3 ) default: null + hooks: array( + ) ) 3: Param( attrGroups: array( @@ -464,6 +506,8 @@ array( name: a4 ) default: null + hooks: array( + ) ) 4: Param( attrGroups: array( @@ -478,6 +522,8 @@ array( name: a5 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.0 ) @@ -495,6 +541,8 @@ array( name: a6 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.1 ) @@ -512,6 +560,8 @@ array( name: a7 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.2 ) @@ -529,6 +579,8 @@ array( name: a8 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) @@ -546,6 +598,8 @@ array( name: a9 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) @@ -616,6 +670,8 @@ array( name: a1 ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -630,6 +686,8 @@ array( name: a2 ) default: null + hooks: array( + ) ) 2: Param( attrGroups: array( @@ -644,6 +702,8 @@ array( name: a3 ) default: null + hooks: array( + ) ) 3: Param( attrGroups: array( @@ -658,6 +718,8 @@ array( name: a4 ) default: null + hooks: array( + ) ) 4: Param( attrGroups: array( @@ -672,6 +734,8 @@ array( name: a5 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.0 ) @@ -689,6 +753,8 @@ array( name: a6 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.1 ) @@ -706,6 +772,8 @@ array( name: a7 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.2 ) @@ -723,6 +791,8 @@ array( name: a8 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) @@ -740,6 +810,8 @@ array( name: a9 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) @@ -810,6 +882,8 @@ array( name: a1 ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -824,6 +898,8 @@ array( name: a2 ) default: null + hooks: array( + ) ) 2: Param( attrGroups: array( @@ -838,6 +914,8 @@ array( name: a3 ) default: null + hooks: array( + ) ) 3: Param( attrGroups: array( @@ -852,6 +930,8 @@ array( name: a4 ) default: null + hooks: array( + ) ) 4: Param( attrGroups: array( @@ -866,6 +946,8 @@ array( name: a5 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.0 ) @@ -883,6 +965,8 @@ array( name: a6 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.1 ) @@ -900,6 +984,8 @@ array( name: a7 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.2 ) @@ -917,6 +1003,8 @@ array( name: a8 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) @@ -934,6 +1022,8 @@ array( name: a9 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) @@ -1004,6 +1094,8 @@ array( name: a1 ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -1018,6 +1110,8 @@ array( name: a2 ) default: null + hooks: array( + ) ) 2: Param( attrGroups: array( @@ -1032,6 +1126,8 @@ array( name: a3 ) default: null + hooks: array( + ) ) 3: Param( attrGroups: array( @@ -1046,6 +1142,8 @@ array( name: a4 ) default: null + hooks: array( + ) ) 4: Param( attrGroups: array( @@ -1060,6 +1158,8 @@ array( name: a5 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.0 ) @@ -1077,6 +1177,8 @@ array( name: a6 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.1 ) @@ -1094,6 +1196,8 @@ array( name: a7 ) default: null + hooks: array( + ) comments: array( 0: // PHP 7.2 ) @@ -1111,6 +1215,8 @@ array( name: a8 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) @@ -1128,6 +1234,8 @@ array( name: a9 ) default: null + hooks: array( + ) comments: array( 0: // PHP 8.0 ) diff --git a/test/code/parser/stmt/function/unionTypes.test b/test/code/parser/stmt/function/unionTypes.test index 5be08e24fe..461c1f769f 100644 --- a/test/code/parser/stmt/function/unionTypes.test +++ b/test/code/parser/stmt/function/unionTypes.test @@ -45,6 +45,8 @@ array( default: null ) ) + hooks: array( + ) ) ) ) @@ -76,6 +78,8 @@ array( name: a ) default: null + hooks: array( + ) ) ) returnType: UnionType( diff --git a/test/code/parser/stmt/function/variadic.test b/test/code/parser/stmt/function/variadic.test index 76cbb862be..7120bbb915 100644 --- a/test/code/parser/stmt/function/variadic.test +++ b/test/code/parser/stmt/function/variadic.test @@ -26,6 +26,8 @@ array( name: a ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -38,6 +40,8 @@ array( name: b ) default: null + hooks: array( + ) ) ) returnType: null @@ -63,6 +67,8 @@ array( name: a ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -75,6 +81,8 @@ array( name: b ) default: null + hooks: array( + ) ) ) returnType: null @@ -100,6 +108,8 @@ array( name: a ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -114,6 +124,8 @@ array( name: b ) default: null + hooks: array( + ) ) ) returnType: null @@ -139,6 +151,8 @@ array( name: a ) default: null + hooks: array( + ) ) 1: Param( attrGroups: array( @@ -153,6 +167,8 @@ array( name: b ) default: null + hooks: array( + ) ) ) returnType: null diff --git a/test/code/parser/stmt/function/variadicDefaultValue.test b/test/code/parser/stmt/function/variadicDefaultValue.test index 45b7df696e..07fbc317fe 100644 --- a/test/code/parser/stmt/function/variadicDefaultValue.test +++ b/test/code/parser/stmt/function/variadicDefaultValue.test @@ -27,6 +27,8 @@ array( items: array( ) ) + hooks: array( + ) ) ) returnType: null diff --git a/test/code/parser/stmt/newInInitializer.test b/test/code/parser/stmt/newInInitializer.test index 74b43fd1c6..f8f9127307 100644 --- a/test/code/parser/stmt/newInInitializer.test +++ b/test/code/parser/stmt/newInInitializer.test @@ -56,6 +56,8 @@ array( args: array( ) ) + hooks: array( + ) ) ) returnType: null @@ -151,6 +153,8 @@ array( ) ) ) + hooks: array( + ) ) ) ) diff --git a/test/code/prettyPrinter/stmt/property_hooks.test b/test/code/prettyPrinter/stmt/property_hooks.test new file mode 100644 index 0000000000..9f39c61ff0 --- /dev/null +++ b/test/code/prettyPrinter/stmt/property_hooks.test @@ -0,0 +1,59 @@ +Property hooks +----- +prop + 1; + } + set { + $this->prop = $value - 1; + } + } + public $prop = 1 { + #[Attr] + &get => $this->prop; + final set($value) => $value - 1; + } + abstract public $prop { + get; + set; + } + + // TODO: Force multiline for hooks? + public function __construct( + public $foo { + get => 42; + set => 123; + }, + public $bar + ) {} +} +----- +class Test +{ + public int $prop { + get { + return $this->prop + 1; + } + set { + $this->prop = $value - 1; + } + } + public $prop = 1 { + #[Attr] + &get => $this->prop; + final set($value) => $value - 1; + } + abstract public $prop { + get; + set; + } + // TODO: Force multiline for hooks? + public function __construct(public $foo { + get => 42; + set => 123; + }, public $bar) + { + } +} From e3f223f623980cdc074f770eb3d54aafb3af5346 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 28 Jul 2024 19:05:16 +0200 Subject: [PATCH 362/428] Fix expected json dump for old PHP versions --- test/PhpParser/NodeAbstractTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/PhpParser/NodeAbstractTest.php b/test/PhpParser/NodeAbstractTest.php index 5c28e5fa81..cdd193a978 100644 --- a/test/PhpParser/NodeAbstractTest.php +++ b/test/PhpParser/NodeAbstractTest.php @@ -260,8 +260,8 @@ function functionName(&$a = 0, $b = 1.0) { } }, "flags": 0, - "attrGroups": [],, - "hooks": [] + "attrGroups": [], + "hooks": [], "attributes": { "startLine": 4, "startTokenPos": 9, @@ -302,8 +302,8 @@ function functionName(&$a = 0, $b = 1.0) { } }, "flags": 0, - "attrGroups": [],, - "hooks": [] + "attrGroups": [], + "hooks": [], "attributes": { "startLine": 4, "startTokenPos": 17, From 6a970612651625ffb56a339187ec7cd36f6d8c78 Mon Sep 17 00:00:00 2001 From: Ruud Kamphuis Date: Sat, 10 Aug 2024 20:03:26 +0200 Subject: [PATCH 363/428] Normalize enum value to ClassConstFetch Fixes #930 (cherry picked from commit 8a21ec3182533ee6448a4efb8d238a4163b89297) --- lib/PhpParser/Builder/ClassConst.php | 4 ++-- lib/PhpParser/BuilderFactory.php | 2 +- lib/PhpParser/BuilderHelpers.php | 7 ++++++- test/PhpParser/BuilderHelpersTest.php | 11 +++++++++++ test/fixtures/Suit.php | 8 ++++++++ 5 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 test/fixtures/Suit.php diff --git a/lib/PhpParser/Builder/ClassConst.php b/lib/PhpParser/Builder/ClassConst.php index fa5dc10e1e..138fa638c1 100644 --- a/lib/PhpParser/Builder/ClassConst.php +++ b/lib/PhpParser/Builder/ClassConst.php @@ -28,7 +28,7 @@ class ClassConst implements PhpParser\Builder { * Creates a class constant builder * * @param string|Identifier $name Name - * @param Node\Expr|bool|null|int|float|string|array $value Value + * @param Node\Expr|bool|null|int|float|string|array|\UnitEnum $value Value */ public function __construct($name, $value) { $this->constants = [new Const_($name, BuilderHelpers::normalizeValue($value))]; @@ -38,7 +38,7 @@ public function __construct($name, $value) { * Add another constant to const group * * @param string|Identifier $name Name - * @param Node\Expr|bool|null|int|float|string|array $value Value + * @param Node\Expr|bool|null|int|float|string|array|\UnitEnum $value Value * * @return $this The builder instance (for fluid interface) */ diff --git a/lib/PhpParser/BuilderFactory.php b/lib/PhpParser/BuilderFactory.php index b7efe5e9b5..07642f92fa 100644 --- a/lib/PhpParser/BuilderFactory.php +++ b/lib/PhpParser/BuilderFactory.php @@ -210,7 +210,7 @@ public function enumCase($name): Builder\EnumCase { /** * Creates node a for a literal value. * - * @param Expr|bool|null|int|float|string|array $value $value + * @param Expr|bool|null|int|float|string|array|\UnitEnum $value $value */ public function val($value): Expr { return BuilderHelpers::normalizeValue($value); diff --git a/lib/PhpParser/BuilderHelpers.php b/lib/PhpParser/BuilderHelpers.php index 3e41b26fc7..f29a69153d 100644 --- a/lib/PhpParser/BuilderHelpers.php +++ b/lib/PhpParser/BuilderHelpers.php @@ -6,6 +6,7 @@ use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\Name; +use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\NullableType; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; @@ -214,7 +215,7 @@ public static function normalizeType($type) { * Normalizes a value: Converts nulls, booleans, integers, * floats, strings and arrays into their respective nodes * - * @param Node\Expr|bool|null|int|float|string|array $value The value to normalize + * @param Node\Expr|bool|null|int|float|string|array|\UnitEnum $value The value to normalize * * @return Expr The normalized value */ @@ -268,6 +269,10 @@ public static function normalizeValue($value): Expr { return new Expr\Array_($items); } + if ($value instanceof \UnitEnum) { + return new Expr\ClassConstFetch(new FullyQualified(\get_class($value)), new Identifier($value->name)); + } + throw new \LogicException('Invalid value'); } diff --git a/test/PhpParser/BuilderHelpersTest.php b/test/PhpParser/BuilderHelpersTest.php index 0e89e47fbb..776f6e4515 100644 --- a/test/PhpParser/BuilderHelpersTest.php +++ b/test/PhpParser/BuilderHelpersTest.php @@ -4,6 +4,7 @@ use PhpParser\Builder\Class_; use PhpParser\Node\Identifier; +use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; use PhpParser\Node\Expr; @@ -222,4 +223,14 @@ public function testNormalizeAttribute(): void { $this->expectExceptionMessage('Attribute must be an instance of PhpParser\Node\Attribute or PhpParser\Node\AttributeGroup'); BuilderHelpers::normalizeAttribute('test'); } + + public function testNormalizeValueEnum() { + if (\PHP_VERSION_ID <= 80100) { + $this->markTestSkipped('Enums are supported since PHP 8.1'); + } + + include __DIR__ . '/../fixtures/Suit.php'; + + $this->assertEquals(new Expr\ClassConstFetch(new FullyQualified(\Suit::class), new Identifier('Hearts')), BuilderHelpers::normalizeValue(\Suit::Hearts)); + } } diff --git a/test/fixtures/Suit.php b/test/fixtures/Suit.php new file mode 100644 index 0000000000..5a9c9a523e --- /dev/null +++ b/test/fixtures/Suit.php @@ -0,0 +1,8 @@ + Date: Sun, 11 Aug 2024 17:03:56 +0200 Subject: [PATCH 364/428] Fix for new php-cs-fixer version --- lib/PhpParser/Builder/EnumCase.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/PhpParser/Builder/EnumCase.php b/lib/PhpParser/Builder/EnumCase.php index 04058bf549..c766321ba3 100644 --- a/lib/PhpParser/Builder/EnumCase.php +++ b/lib/PhpParser/Builder/EnumCase.php @@ -13,7 +13,6 @@ class EnumCase implements PhpParser\Builder { /** @var Identifier|string */ protected $name; - /** @var ?Node\Expr */ protected ?Node\Expr $value = null; /** @var array */ protected array $attributes = []; From 4a22c15169dbe4904b372c529e81a267da885396 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 11 Aug 2024 17:08:58 +0200 Subject: [PATCH 365/428] Validate options in test_old Regularly try to use this one with --version instead of --php-version, which fails in a non-obvious way. --- test_old/run.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test_old/run.php b/test_old/run.php index c875c87e4a..8ad60ce3ed 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -26,6 +26,12 @@ function showHelp($error) { ); } +$allowedOptions = [ + '--no-progress' => true, + '--verbose' => true, + '--php-version' => true, +]; + $options = array(); $arguments = array(); @@ -35,7 +41,11 @@ function showHelp($error) { foreach ($argv as $arg) { if ('-' === $arg[0]) { $parts = explode('=', $arg); - $options[$parts[0]] = $parts[1] ?? true; + $name = $parts[0]; + if (!isset($allowedOptions[$name])) { + showHelp("Unknown option \"$name\""); + } + $options[$name] = $parts[1] ?? true; } else { $arguments[] = $arg; } From ba144371652fc11abb104affdb29a1040a0f41ed Mon Sep 17 00:00:00 2001 From: evenevent Date: Wed, 14 Aug 2024 00:17:46 +0800 Subject: [PATCH 366/428] chore: fix comment Signed-off-by: evenevent --- lib/PhpParser/NameContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PhpParser/NameContext.php b/lib/PhpParser/NameContext.php index 292df691af..2265ecce82 100644 --- a/lib/PhpParser/NameContext.php +++ b/lib/PhpParser/NameContext.php @@ -185,7 +185,7 @@ public function getPossibleNames(string $name, int $type): array { // Check for relevant type-specific use statements foreach ($this->origAliases[$type] as $alias => $orig) { if ($type === Stmt\Use_::TYPE_CONSTANT) { - // Constants are are complicated-sensitive + // Constants are complicated-sensitive $normalizedOrig = $this->normalizeConstName($orig->toString()); if ($normalizedOrig === $this->normalizeConstName($name)) { $possibleNames[] = new Name($alias); From 018da15f3a113c6553d57afc0016ac266150ae1b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 31 Aug 2024 20:39:05 +0200 Subject: [PATCH 367/428] Add token emulation support for asymmetric visibility modifiers --- lib/PhpParser/Lexer/Emulative.php | 2 + .../AsymmetricVisibilityTokenEmulator.php | 93 +++++++++++++++++++ lib/PhpParser/compatibility_tokens.php | 3 + phpstan-baseline.neon | 15 +++ test/PhpParser/Lexer/EmulativeTest.php | 40 ++++++++ 5 files changed, 153 insertions(+) create mode 100644 lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index de441f5e8d..c9b3b6d306 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -5,6 +5,7 @@ use PhpParser\Error; use PhpParser\ErrorHandler; use PhpParser\Lexer; +use PhpParser\Lexer\TokenEmulator\AsymmetricVisibilityTokenEmulator; use PhpParser\Lexer\TokenEmulator\AttributeEmulator; use PhpParser\Lexer\TokenEmulator\EnumTokenEmulator; use PhpParser\Lexer\TokenEmulator\ExplicitOctalEmulator; @@ -45,6 +46,7 @@ public function __construct(?PhpVersion $phpVersion = null) { new ExplicitOctalEmulator(), new ReadonlyFunctionTokenEmulator(), new PropertyTokenEmulator(), + new AsymmetricVisibilityTokenEmulator(), ]; // Collect emulators that are relevant for the PHP version we're running diff --git a/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php new file mode 100644 index 0000000000..084bb75dcc --- /dev/null +++ b/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php @@ -0,0 +1,93 @@ + \T_PUBLIC_SET, + \T_PROTECTED => \T_PROTECTED_SET, + \T_PRIVATE => \T_PRIVATE_SET, + ]; + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if (isset($map[$token->id]) && $i + 3 < $c && $tokens[$i + 1]->text === '(' && + $tokens[$i + 2]->id === \T_STRING && \strtolower($tokens[$i + 2]->text) === 'set' && + $tokens[$i + 3]->text === ')' && + $this->isKeywordContext($tokens, $i) + ) { + array_splice($tokens, $i, 4, [ + new Token( + $map[$token->id], $token->text . '(' . $tokens[$i + 2]->text . ')', + $token->line, $token->pos), + ]); + $c -= 3; + } + } + + return $tokens; + } + + public function reverseEmulate(string $code, array $tokens): array { + $reverseMap = [ + \T_PUBLIC_SET => \T_PUBLIC, + \T_PROTECTED_SET => \T_PROTECTED, + \T_PRIVATE_SET => \T_PRIVATE, + ]; + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if (isset($reverseMap[$token->id]) && + \preg_match('/(public|protected|private)\((set)\)/i', $token->text, $matches) + ) { + [, $modifier, $set] = $matches; + $modifierLen = \strlen($modifier); + array_splice($tokens, $i, 1, [ + new Token($reverseMap[$token->id], $modifier, $token->line, $token->pos), + new Token(\ord('('), '(', $token->line, $token->pos + $modifierLen), + new Token(\T_STRING, $set, $token->line, $token->pos + $modifierLen + 1), + new Token(\ord(')'), ')', $token->line, $token->pos + $modifierLen + 4), + ]); + $i += 3; + $c += 3; + } + } + + return $tokens; + } + + /** @param Token[] $tokens */ + protected function isKeywordContext(array $tokens, int $pos): bool { + $prevToken = $this->getPreviousNonSpaceToken($tokens, $pos); + if ($prevToken === null) { + return false; + } + return $prevToken->id !== \T_OBJECT_OPERATOR + && $prevToken->id !== \T_NULLSAFE_OBJECT_OPERATOR; + } + + /** @param Token[] $tokens */ + private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { + for ($i = $start - 1; $i >= 0; --$i) { + if ($tokens[$i]->id === T_WHITESPACE) { + continue; + } + + return $tokens[$i]; + } + + return null; + } +} diff --git a/lib/PhpParser/compatibility_tokens.php b/lib/PhpParser/compatibility_tokens.php index bf01615702..13576c42fa 100644 --- a/lib/PhpParser/compatibility_tokens.php +++ b/lib/PhpParser/compatibility_tokens.php @@ -19,6 +19,9 @@ function defineCompatibilityTokens(): void { 'T_READONLY', // PHP 8.4 'T_PROPERTY_C', + 'T_PUBLIC_SET', + 'T_PROTECTED_SET', + 'T_PRIVATE_SET', ]; // PHP-Parser might be used together with another library that also emulates some or all diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index f8a9570baa..60320107ca 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -90,6 +90,21 @@ parameters: count: 1 path: lib/PhpParser/Lexer/Emulative.php + - + message: "#^Constant T_PRIVATE_SET not found\\.$#" + count: 2 + path: lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php + + - + message: "#^Constant T_PROTECTED_SET not found\\.$#" + count: 2 + path: lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php + + - + message: "#^Constant T_PUBLIC_SET not found\\.$#" + count: 2 + path: lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php + - message: "#^Constant T_PROPERTY_C not found\\.$#" count: 1 diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index 201b823858..6bb52ec79e 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -393,6 +393,37 @@ public static function provideTestLexNewFeatures() { [\T_READONLY, 'readonly'], [ord('('), '('], ]], + + // PHP 8.4: Asymmetric visibility modifiers + ['private(set)', [ + [\T_PRIVATE_SET, 'private(set)'] + ]], + ['PROTECTED(SET)', [ + [\T_PROTECTED_SET, 'PROTECTED(SET)'] + ]], + ['Public(Set)', [ + [\T_PUBLIC_SET, 'Public(Set)'] + ]], + ['public (set)', [ + [\T_PUBLIC, 'public'], + [\ord('('), '('], + [\T_STRING, 'set'], + [\ord(')'), ')'], + ]], + ['->public(set)', [ + [\T_OBJECT_OPERATOR, '->'], + [\T_STRING, 'public'], + [\ord('('), '('], + [\T_STRING, 'set'], + [\ord(')'), ')'], + ]], + ['?-> public(set)', [ + [\T_NULLSAFE_OBJECT_OPERATOR, '?->'], + [\T_STRING, 'public'], + [\ord('('), '('], + [\T_STRING, 'set'], + [\ord(')'), ')'], + ]], ]; } @@ -431,6 +462,15 @@ public static function provideTestTargetVersion() { ['8.3', '__PROPERTY__', [[\T_STRING, '__PROPERTY__']]], ['8.4', '__property__', [[\T_PROPERTY_C, '__property__']]], ['8.3', '__property__', [[\T_STRING, '__property__']]], + ['8.4', 'public(set)', [ + [\T_PUBLIC_SET, 'public(set)'], + ]], + ['8.3', 'public(set)', [ + [\T_PUBLIC, 'public'], + [\ord('('), '('], + [\T_STRING, 'set'], + [\ord(')'), ')'] + ]], ]; } } From cde9bab3bb5a5ddaf513d2093ef33000a9f11fc9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 1 Sep 2024 12:35:12 +0200 Subject: [PATCH 368/428] Add support for PHP 8.4 exit function For backwards-compatibility, parse the simple single argument case into an Exit_ node as previously. For more complex expressions generate a function call. --- grammar/php.y | 11 +- lib/PhpParser/Parser/Php7.php | 1116 +++++++++++++++-------------- lib/PhpParser/Parser/Php8.php | 1124 +++++++++++++++--------------- lib/PhpParser/ParserAbstract.php | 27 + test/code/parser/expr/exit.test | 121 ++++ 5 files changed, 1259 insertions(+), 1140 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index e55f6e03e1..6cb5b78ea8 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1068,10 +1068,8 @@ expr: | 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); } + | T_EXIT ctor_arguments + { $$ = $this->createExitExpr($1, #1, $2, attributes()); } | '@' expr { $$ = Expr\ErrorSuppress[$2]; } | scalar | '`' backticks_expr '`' { $$ = Expr\ShellExec[$2]; } @@ -1176,11 +1174,6 @@ class_name_or_var: | fully_dereferenceable ; -exit_expr: - /* empty */ { $$ = null; } - | '(' optional_expr ')' { $$ = $2; } -; - backticks_expr: /* empty */ { $$ = array(); } | encaps_string_part diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 5e558531ab..15d6cbf7ad 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -161,16 +161,16 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 396; protected int $tokenToSymbolMapSize = 397; - protected int $actionTableSize = 1282; - protected int $gotoTableSize = 725; + protected int $actionTableSize = 1279; + protected int $gotoTableSize = 723; protected int $invalidSymbol = 169; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 437; - protected int $numNonLeafStates = 743; + protected int $YY2TBLSTATE = 436; + protected int $numNonLeafStates = 741; protected array $symbolToName = array( "EOF", @@ -388,135 +388,134 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $action = array( - 133, 134, 135, 587, 136, 137, 1326, 755, 756, 757, - 138, 38, 866, -367, 867, -367,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 102, 103, 104, 105, 106, 1116, 1117, - 1118, 1115, 1114, 1113, 1119, 749, 748,-32766, 0,-32766, + 128, 129, 130, 564, 131, 132, 1322, 753, 754, 755, + 133, 38, 864, -367, 865, -367,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 101, 102, 103, 104, 105, 1114, 1115, + 1116, 1113, 1112, 1111, 1117, 747, 746,-32766, 0,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767,-32766,-32766,-32766, 1031, 758,-32766,-32766,-32766, 945, - 292, -610, 838,-32766,-32766,-32766,-32766, 1092, -610, 265, - 139, 406, 762, 763, 764, 765, 994,-32766, 431,-32766, - -32766,-32766,-32766,-32766,-32766, 819, 766, 767, 768, 769, - 770, 771, 772, 773, 774, 775, 795, 588, 796, 797, - 798, 799, 787, 788, 347, 348, 790, 791, 776, 777, - 778, 780, 781, 782, 358, 822, 823, 824, 825, 826, - 589, 783, 784, 590, 591,-32766, 807, 805, 806, 818, - 802, 803, -328, -194, 592, 593, 801, 594, 595, 596, - 597, 839, 598, 599, 1361, 1346,-32766, 1040, 841, 804, - 600, 601, 1345, 140, 2, 133, 134, 135, 587, 136, - 137, 1064, 755, 756, 757, 138, 38, -110, 1040, 82, - 485, 291, -110, 328, -110,-32766,-32766,-32766, 830, 307, + -32767,-32766,-32766,-32766, 1029, 756,-32766,-32766,-32766, 943, + 291, -608, 836,-32766,-32766,-32766,-32766, 1090, -608, 264, + 134, 384, 760, 761, 762, 763, 992,-32766, 425,-32766, + -32766,-32766,-32766,-32766,-32766, 817, 764, 765, 766, 767, + 768, 769, 770, 771, 772, 773, 793, 565, 794, 795, + 796, 797, 785, 786, 345, 346, 788, 789, 774, 775, + 776, 778, 779, 780, 357, 820, 821, 822, 823, 824, + 566, 781, 782, 567, 568,-32766, 805, 803, 804, 816, + 800, 801, -328, -194, 569, 570, 799, 571, 572, 573, + 574, 837, 575, 576, 1357, 1342,-32766, 1038, 839, 802, + 577, 578, 1341, 135, 2, 128, 129, 130, 564, 131, + 132, 1062, 753, 754, 755, 133, 38, -110, 1038, 81, + 484, 290, -110, 327, -110,-32766,-32766,-32766, 828, 306, -32766,-32766, -110, -110, -110, -110, -110, -110, -110, -110, - 749, 748, 291, 107, 108, 109,-32766, 275,-32766,-32766, - -32766,-32766,-32766,-32766,-32766, 995, 26, 36, 249, 110, - 758,-32766,-32766,-32766, 1116, 1117, 1118, 1115, 1114, 1113, - 1119, -610, 729, -610, 265, 139, 406, 762, 763, 764, - 765, -342,-32766, 431,-32766,-32766,-32766,-32766, 749, 748, - 819, 766, 767, 768, 769, 770, 771, 772, 773, 774, - 775, 795, 588, 796, 797, 798, 799, 787, 788, 347, - 348, 790, 791, 776, 777, 778, 780, 781, 782, 358, - 822, 823, 824, 825, 826, 589, 783, 784, 590, 591, - 611, 807, 805, 806, 818, 802, 803, -328, -194, 592, - 593, 801, 594, 595, 596, 597, 35, 598, 599, 151, - 83, 84, 85, 486, 804, 600, 601, 840, 149, 779, - 750, 751, 752, 753, 754, -607, 755, 756, 757, 792, - 793, 37, -607, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 1037, 275,-32766, - -32766,-32766, 963, 964,-32766,-32766,-32766, 965, -193, 127, - 110, 384, 383, 959, 758,-32766,-32766,-32766, 129, 1040, - -32766, 425,-32766,-32766,-32766, 1262, 238, 145, 759, 760, - 761, 762, 763, 764, 765, 252,-32766, 828,-32766,-32766, - -561, 561, 311, 284, 819, 766, 767, 768, 769, 770, - 771, 772, 773, 774, 775, 795, 817, 796, 797, 798, - 799, 787, 788, 789, 816, 790, 791, 776, 777, 778, - 780, 781, 782, 821, 822, 823, 824, 825, 826, 827, - 783, 784, 785, 786, -563, 807, 805, 806, 818, 802, - 803, -85, 239, 794, 800, 801, 808, 809, 811, 810, - 947, 812, 813, 1296, -561, -561, 839, 617, 804, 815, - 814, 50, 51, 52, 517, 53, 54, 104, 105, 106, - -561, 55, 56, 924, 57, -607, 924, -607, 461, 462, - 463, 292, -567,-32766, -561, 393, 1371, 7, 313, 1372, - 359, 382, 383, 1093, 24, 947, -559, 741, -563, -563, - 835, 425, 325, 719,-32766, 1063, 720, -85, 341, 58, - 59,-32766, 152, -193, -558, 60, 1108, 61, 246, 247, - 62, 63, 64, 65, 66, 67, 68, 69, -563, 28, - 267, 70, 446, 518, 288, 364, 75, 1290, 1291, 519, - 1342, 839, 328, 1284, 300, 1288, 42, 19, 520, 866, - 521, 867, 522, 342, 523, 924, 914, 524, 525, 914, - -559, -559, 44, 45, 447, 379, 378,-32766, 46, 526, - 1027, 1026, 1025, 1028, 370, 340, -559, 836, -558, -558, - -601, 1248, -601, 528, 529, 530, 1255,-32766, -566, 1040, - -559, -272, 1037, 832, -558, 532, 533, 372, 1276, 1277, - 1278, 1279, 1281, 1273, 1274, 299, -565, 376, -558, 1040, - 48, 1280, 1275, 291, 1040, 1257, 1256, 1258, 300, 830, - 1037, 71, 1253, 391, 839, 323, 324, 328, 924, -153, - -153, -153, 926, 661, 20, 926, 714, 442, 914, 714, - 680, 681, 1040, 1039, -153, 443, -153, 444, -153, 445, - -153, 845, 288, 28, 267, -87, 431, -84, 721, -78, - 377, 941, 1257, 1256, 1258, 839, 284, 749, 748, 1288, - 834, 963, 964, 154, 301, 302, 527, 716, 329, 924, - 155, 900, 959, -110, -110, -110, 32, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 28, 268, 694, 142, 126, 1248, 141, 328, 156, 724, - 328, 914, 839, 158, 926, 33, 1288, -73, 714, -153, - 533, -78, 1276, 1277, 1278, 1279, 1281, 1273, 1274, 1164, - 1166, -58, 1257, 1256, 1258, 1280, 1275, -560, 695, 924, - -557, 1094, 470, 471, -57, 73, 150, 409, 380, 381, - 324, 328, 1248, 385, 386, 652, 653, 749, 748, 696, - 697, 124, 914, 924, -4, 924, 532, 533, -72, 1276, - 1277, 1278, 1279, 1281, 1273, 1274, 125, 130, 1257, 1256, - 1258, 131, 1280, 1275, 284, 144, 159, 980, 160, 749, - 748, 714, 73, 731,-32766, 161, 162, 324, 328, 163, - 1255, -560, -560, -302, -557, -557, -71,-32766,-32766,-32766, - 289,-32766, -70,-32766, 290,-32766, -69, -560,-32766, -557, - -557, -68, 914,-32766,-32766,-32766,-32766, -67, -66,-32766, - -32766, -560, 1255, -65, -557,-32766, 422, -46, 926,-32766, - -32766,-32766, 714,-32766,-32766,-32766, 914,-32766, 914, -298, - -32766, -18, 148, 274, 285,-32766,-32766,-32766, 730, 733, - 923,-32766,-32766, 147, 275, 280, 281,-32766, 422, 286, - 377, 287, 438, 28, 268, 74,-32766, 298, 334, 293, - 110, 963, 964, -557, -557, 839, 527, 294, 49, 1288, - 690, 531, 959, -110, -110, -110, 146, 830, 926, -557, - -32766, 839, 714, 683, 705, 566, 667, 1123, 668, 23, - 960, 650, 572, -557, 308, 10, 1373, -50, 305, 312, - 615, 306, 926, 1295, 926, 1248, 714, 662, 714, -4, - 707,-32766, 467, 943, -521, 1285, 496, 1221, 1297, -511, - 533, 684, 1276, 1277, 1278, 1279, 1281, 1273, 1274, 132, - 0, 8, 303, 304, 27, 1280, 1275, -595, 300, 1289, - -32766, 838, 0, 0, 0, 73, 1255, 0, 375, 0, - 324, 328, 0,-32766,-32766,-32766, 0,-32766, 0,-32766, - 0,-32766, 128, 0,-32766, 0, 0, 0, 0,-32766, - -32766,-32766,-32766, 0, 374,-32766,-32766, 0, 1255, 0, - 924,-32766, 422, -275, 0,-32766,-32766,-32766, 40,-32766, - -32766,-32766, 41,-32766, 738, 739,-32766, 858, 905, 924, - 1004,-32766,-32766,-32766,-32766, 981, 988,-32766,-32766, 978, - 1255, 989, 903,-32766, 422, 976, 1097,-32766,-32766,-32766, - 1100,-32766,-32766,-32766, 1101,-32766, 850, 1098,-32766, 1099, - 1105, -273, 491,-32766,-32766,-32766,-32766, 1312, 1330,-32766, - -32766, 1364, 1255, 579, 655,-32766, 422, -594, -593,-32766, - -32766,-32766, -567,-32766,-32766,-32766, -566,-32766, -565, -564, - -32766, -505, 1, 914, 29,-32766,-32766,-32766, 30, 39, - 1262,-32766,-32766, 43, 47, 72, 76,-32766, 422, -250, - -250, -250, 914, 77, 78, 377,-32766, 1262, 79, 80, - 81, 143, 328, 153, 157, 244, 963, 964, -249, -249, - -249, 527, 330, 359, 377, 360, 900, 959, -110, -110, - -110, 361, 362, 363, 364, 963, 964, -16, 365, 366, - 527, 367, 368, 369, 0, 900, 959, -110, -110, -110, - 371, 439, 560, 0, -272,-32766, 12, 13, 14, 926, - 15, 1255, 34, 714, -250, 17, 408, 487,-32766,-32766, - -32766, 839,-32766, 488,-32766, 495,-32766, 498, 926,-32766, - 499, 735, 714, -249,-32766,-32766,-32766, 500, 839, 501, - -32766,-32766, 505, 506, 507, 515,-32766, 422, 577, 700, - 1266, 1204, 1286, 1066, 1065,-32766, -110, -110, 1046, 1243, - 1042, -110, -277, -102, 11, 16, 21, -110, 297, 407, - 608, 612, 641, -110, -110, 706,-32766, 1208, -110, 1261, - 1205, 1343, 0, 322, -110, 373, 715, 718, 722, 723, - 725, 726, 727,-32766, 728, 0, 732, 717, 300, 901, - 1368, 75, 1370, 861, 0, 860, 869, 328, 953, 996, - 868, 1369, 952, 950, 951, 300, 954, 1236, 75, 934, - 944, 0, 932, 986, 328, 987, 639, 1367, 1324, 1313, - 1331, 1340 + 747, 746, 290, 106, 107, 108,-32766, 274,-32766,-32766, + -32766,-32766,-32766,-32766,-32766, 993, 26, 36, 248, 109, + 756,-32766,-32766,-32766, 1114, 1115, 1116, 1113, 1112, 1111, + 1117, -608, 727, -608, 264, 134, 384, 760, 761, 762, + 763, -342,-32766, 425,-32766,-32766,-32766,-32766, 747, 746, + 817, 764, 765, 766, 767, 768, 769, 770, 771, 772, + 773, 793, 565, 794, 795, 796, 797, 785, 786, 345, + 346, 788, 789, 774, 775, 776, 778, 779, 780, 357, + 820, 821, 822, 823, 824, 566, 781, 782, 567, 568, + 610, 805, 803, 804, 816, 800, 801, -328, -194, 569, + 570, 799, 571, 572, 573, 574, 35, 575, 576, 150, + 82, 83, 84, 485, 802, 577, 578, 838, 148, 777, + 748, 749, 750, 751, 752, -605, 753, 754, 755, 790, + 791, 37, -605, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 1035, 274,-32766, + -32766,-32766, 961, 962,-32766,-32766,-32766, 963, -193, 126, + 109, 383, 382, 957, 756,-32766,-32766,-32766, 136, 1038, + -32766, 424,-32766,-32766,-32766, 1260, 237, 145, 757, 758, + 759, 760, 761, 762, 763, 251,-32766, 826,-32766,-32766, + -559, 560, 310, 283, 817, 764, 765, 766, 767, 768, + 769, 770, 771, 772, 773, 793, 815, 794, 795, 796, + 797, 785, 786, 787, 814, 788, 789, 774, 775, 776, + 778, 779, 780, 819, 820, 821, 822, 823, 824, 825, + 781, 782, 783, 784, -561, 805, 803, 804, 816, 800, + 801, -85, 238, 792, 798, 799, 806, 807, 809, 808, + 945, 810, 811, 1292, -559, -559, 837, 616, 802, 813, + 812, 49, 50, 51, 516, 52, 53, 103, 104, 105, + -559, 54, 55, 922, 56, -605, 922, -605, 460, 461, + 462, 291, -565,-32766, -559, 393, 1367, 7, 312, 1368, + 358, 381, 382, 1091, 24, 945, -557, 739, -561, -561, + 833, 424, 324, 717,-32766, 1061, 718, -85, 340, 57, + 58,-32766, 151, -193, -556, 59, 1106, 60, 245, 246, + 61, 62, 63, 64, 65, 66, 67, 68, -561, 28, + 266, 69, 440, 517, 287, 363, 74, 1286, 1287, 518, + 1338, 837, 327, 1280, 299, 1284, 42, 19, 519, 864, + 520, 865, 521, 341, 522, 922, 912, 523, 524, 912, + -557, -557, 44, 45, 446, 378, 377,-32766, 46, 525, + 1025, 1024, 1023, 1026, 369, 339, -557, 834, -556, -556, + -599, 1246, -599, 527, 528, 529, 1253,-32766, -564, 1038, + -557, -272, 1035, 830, -556, 531, 532, 371, 1272, 1273, + 1274, 1275, 1277, 1269, 1270, 298, -563, 375, -556, 1038, + 47, 1276, 1271, 290, 1038, 1255, 1254, 1256, 299, 828, + 1035, 70, 1251, 391, 837, 322, 323, 327, 922, -153, + -153, -153, 924, 659, 20, 924, 712, 442, 912, 712, + 678, 679, 1038, 1037, -153, 443, -153, 444, -153, 445, + -153, 843, 287, 28, 266, -87, 425, -84, 719, -78, + 376, 939, 1255, 1254, 1256, 837, 283, 747, 746, 1284, + 832, 961, 962, 153, 300, 301, 526, 714, 328, 922, + 154, 898, 957, -110, -110, -110, 32, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 28, 267, 692, 141, 125, 1246, 140, 327, 155, 722, + 327, 912, 837, 157, 924, 33, 1284, -73, 712, -153, + 532, -78, 1272, 1273, 1274, 1275, 1277, 1269, 1270, 1162, + 1164, -58, 1255, 1254, 1256, 1276, 1271, -558, 693, 922, + -555, 1092, 470, 471, -57, 72, 149, 408, 379, 380, + 323, 327, 1246, 385, 386, 650, 651, 747, 746, 694, + 695, 123, 912, 922, -4, 922, 531, 532, -72, 1272, + 1273, 1274, 1275, 1277, 1269, 1270, 124, 137, 1255, 1254, + 1256, 138, 1276, 1271, 283, 144, 158, 978, 159, 747, + 746, 712, 72, 729,-32766, 160, 161, 323, 327, 162, + 1253, -558, -558, -302, -555, -555, -71,-32766,-32766,-32766, + 288,-32766, -70,-32766, 289,-32766, -69, -558,-32766, -555, + -555, -68, 912,-32766,-32766,-32766,-32766, -67, -66,-32766, + -32766, -558, 1253, -65, -555,-32766, 421, -46, 924,-32766, + -32766,-32766, 712,-32766,-32766,-32766, 912,-32766, 912, -298, + -32766, -18, 142, 273, 284,-32766,-32766,-32766, 728, 731, + 921,-32766,-32766, 147, 274, 279, 280,-32766, 421, 285, + 376, 286, 437, 28, 267, 73,-32766, 297, 333, 292, + 109, 961, 962, -555, -555, 837, 526, 293, 48, 1284, + 688, 530, 957, -110, -110, -110, 146, 828, 924, -555, + -32766, 837, 712, 681, 703, 581, 665, 1121, 666, 23, + 958, 648, 587, -555, 307, 10, 1369, -50, 304, 311, + 614, 305, 924, 1291, 924, 1246, 712, 660, 712, -4, + 705,-32766, 467, 941, -521, 1281, 495, 1219, 1293, -511, + 532, 682, 1272, 1273, 1274, 1275, 1277, 1269, 1270, 139, + 0, 8, 302, 303, 27, 1276, 1271, -593, 299, 1285, + -32766, 836, 0, 0, 0, 72, 1253, 0, 374, 0, + 323, 327, 0,-32766,-32766,-32766, 0,-32766, 0,-32766, + 0,-32766, 127, 0,-32766, 0, 0, 0, 0,-32766, + -32766,-32766,-32766, 0, 373,-32766,-32766, 0, 1253, 0, + 922,-32766, 421, -275, 0,-32766,-32766,-32766, 40,-32766, + -32766,-32766, 41,-32766, 736, 737,-32766, 856, 903, 922, + 1002,-32766,-32766,-32766,-32766, 979, 986,-32766,-32766, 976, + 1253, 987, 901,-32766, 421, 974, 1095,-32766,-32766,-32766, + 1098,-32766,-32766,-32766, 1099,-32766, 848, 1096,-32766, 1097, + 1103, -273, 490,-32766,-32766,-32766,-32766, 1308, 1326,-32766, + -32766, 1360, 1253, 594, 653,-32766, 421, -592, -591,-32766, + -32766,-32766, -565,-32766,-32766,-32766, -564,-32766, -563, -562, + -32766, -505, 1, 912, 29,-32766,-32766,-32766, 30, 39, + 1260,-32766,-32766, 43, 71, 75, 76,-32766, 421, -250, + -250, -250, 912, 77, 78, 376,-32766, 1260, 79, 80, + 143, 152, 327, 156, 243, 329, 961, 962, -249, -249, + -249, 526, 358, 359, 376, 360, 898, 957, -110, -110, + -110, 361, 362, 363, 364, 961, 962, -16, 365, 366, + 526, 367, 368, 370, 0, 898, 957, -110, -110, -110, + 438, 559, 733, -272, 12,-32766, 13, 14, 15, 924, + 17, 1253, 34, 712, -250, 407, 486, 487,-32766,-32766, + -32766, 837,-32766, 494,-32766, 497,-32766, 498, 924,-32766, + 499, 899, 712, -249,-32766,-32766,-32766, 500, 837, 504, + -32766,-32766, 505, 506, 514, 592,-32766, 421, 698, 1064, + 1202, 1282, 1063, 1044, 1241,-32766, -110, -110, 1040, -277, + -102, -110, 11, 16, 21, 296, 406, -110, 606, 611, + 639, 704, 1206, -110, -110, 1259,-32766, 1203, -110, 1339, + 1364, 321, 372, 713, -110, 716, 720, 721, 723, 724, + 725, 726, 730,-32766, 715, 0, 0, 1366, 299, 859, + 858, 74, 867, 951, 0, 994, 866, 327, 1365, 950, + 948, 949, 952, 1234, 932, 299, 942, 930, 74, 984, + 985, 0, 637, 1363, 327, 1320, 1309, 1327, 1336 ); protected array $actionCheck = array( @@ -635,7 +634,7 @@ class Php7 extends \PhpParser\ParserAbstract 102, 122, 162, 162, 106, 162, 127, 128, 129, 130, 131, 162, 162, 162, 162, 117, 118, 31, 162, 162, 122, 162, 162, 162, -1, 127, 128, 129, 130, 131, - 162, 162, 162, -1, 163, 74, 163, 163, 163, 160, + 162, 162, 165, 163, 163, 74, 163, 163, 163, 160, 163, 80, 164, 164, 165, 163, 163, 163, 87, 88, 89, 82, 91, 163, 93, 163, 95, 163, 160, 98, 163, 165, 164, 165, 103, 104, 105, 163, 82, 163, @@ -643,12 +642,11 @@ class Php7 extends \PhpParser\ParserAbstract 163, 163, 163, 163, 163, 124, 117, 118, 163, 163, 163, 122, 163, 163, 163, 163, 163, 128, 163, 163, 163, 163, 163, 117, 118, 163, 137, 163, 122, 163, - 163, 163, -1, 164, 128, 164, 164, 164, 164, 164, - 164, 164, 164, 137, 164, -1, 164, 164, 159, 165, + 165, 164, 164, 164, 128, 164, 164, 164, 164, 164, + 164, 164, 164, 137, 164, -1, -1, 165, 159, 165, 165, 162, 165, 165, -1, 165, 165, 168, 165, 165, 165, 165, 165, 165, 165, 159, 165, 165, 162, 165, - 165, -1, 165, 165, 168, 165, 165, 165, 165, 165, - 165, 165 + 165, -1, 165, 165, 168, 165, 165, 165, 165 ); protected array $actionBase = array( @@ -668,68 +666,67 @@ class Php7 extends \PhpParser\ParserAbstract 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 147, 45, 279, 701, 1055, 1064, - 1057, 1066, 1052, 1051, 1056, 1058, 1067, 1112, 1113, 832, - 1114, 1115, 1111, 1116, 1059, 903, 1053, 1062, 291, 291, + 1081, 1081, 1081, 147, 45, 279, 701, 1052, 1059, 1055, + 1062, 1050, 1049, 1053, 1056, 1064, 1108, 1110, 832, 1111, + 1112, 1107, 1113, 1057, 903, 1051, 1058, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 57, 345, 171, 42, 42, + 291, 291, 291, 291, 57, 345, 171, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 630, 630, - 54, 54, 54, 356, 803, 583, 803, 803, 803, 803, - 803, 803, 803, 803, 340, 202, 670, 47, 166, 166, - 7, 7, 7, 7, 7, 1106, 66, 1089, 1089, -25, - -25, -25, -25, 451, 504, 374, 393, -93, 30, 385, - 231, 231, 417, 417, 476, 476, 9, 9, 476, 476, - 476, 471, 471, 471, 471, 320, 426, 444, -94, 306, - 794, 539, 539, 539, 539, 794, 794, 794, 794, 791, - 792, 794, 794, 794, 667, 749, 749, 818, 140, 140, - 140, 749, 443, 59, 59, 443, 235, 59, 5, 406, - 367, 782, 255, 419, 367, 364, 540, 314, 60, 805, - 642, 805, 1050, 328, 815, 815, 373, 806, 686, 890, - 1083, 1068, 808, 1108, 841, 1110, 349, 608, 628, 1049, - 1049, 1049, 1049, 1049, 1049, 1049, 1049, 1049, 1049, 1049, - 944, 201, 1050, 420, 944, 944, 944, 201, 201, 201, - 201, 201, 201, 201, 201, 201, 201, 644, 420, 558, + 42, 42, 42, 42, 42, 42, 42, 630, 630, 54, + 54, 54, 356, 803, 583, 803, 803, 803, 803, 803, + 803, 803, 803, 340, 202, 670, 47, 166, 166, 7, + 7, 7, 7, 7, 1106, 66, 1089, 1089, -25, -25, + -25, -25, 451, 504, 374, 393, -93, 30, 385, 231, + 231, 417, 417, 476, 476, 9, 9, 476, 476, 476, + 471, 471, 471, 471, 320, 426, 444, -94, 306, 794, + 539, 539, 539, 539, 794, 794, 794, 794, 791, 792, + 794, 794, 794, 667, 749, 749, 818, 140, 140, 140, + 749, 443, 59, 59, 443, 235, 59, 5, 406, 367, + 782, 255, 419, 367, 364, 540, 314, 60, 805, 642, + 805, 1047, 328, 815, 815, 806, 686, 373, 890, 1080, + 1066, 808, 1104, 841, 1105, 349, 608, 628, 1046, 1046, + 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 944, + 201, 1047, 420, 944, 944, 944, 201, 201, 201, 201, + 201, 201, 201, 201, 820, 201, 201, 644, 420, 558, 565, 420, 843, 201, 147, 789, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 820, 139, 147, 45, - 58, 58, 333, 53, 58, 58, 58, 58, 147, 147, - 147, 147, 642, 807, 758, 647, 766, 350, 807, 807, - 807, 410, 124, 428, 125, 768, 814, 379, 817, 817, - 825, 920, 817, 819, 817, 825, 932, 817, 817, 920, - 920, 799, 920, 360, 629, 500, 599, 637, 920, 384, - 817, 817, 817, 817, 787, 920, 639, 817, 377, 369, - 817, 817, 787, 786, 823, 146, 788, 920, 920, 920, - 787, 589, 788, 788, 788, 854, 855, 798, 822, 494, - 480, 643, 288, 623, 822, 822, 817, 615, 798, 822, - 798, 822, 778, 822, 822, 822, 798, 822, 819, 545, - 822, 770, 772, 641, 198, 822, 38, 933, 934, 624, - 941, 927, 942, 989, 946, 947, 1072, 919, 953, 931, - 948, 990, 926, 922, 829, 745, 760, 801, 784, 917, - 811, 811, 811, 910, 914, 811, 811, 811, 811, 811, - 811, 811, 811, 745, 774, 844, 816, 963, 761, 765, - 1035, 776, 1084, 771, 961, 1037, 949, 848, 769, 1002, - 969, 1016, 1069, 970, 971, 1003, 1038, 857, 1039, 1085, - 826, 1087, 1088, 885, 976, 1073, 811, 933, 947, 626, - 931, 948, 926, 922, 802, 797, 790, 796, 785, 781, - 737, 775, 821, 1040, 906, 795, 896, 972, 916, 745, - 897, 993, 998, 1004, 1010, 1071, 835, 833, 900, 1090, - 977, 979, 980, 1074, 1041, 1075, 852, 994, 840, 1012, - 839, 1091, 1014, 1017, 1024, 1026, 1076, 1093, 1077, 905, - 1078, 858, 837, 888, 810, 1094, 285, 834, 836, 850, - 988, 498, 960, 1080, 1095, 1096, 1029, 1030, 1031, 1097, - 1098, 951, 860, 995, 809, 997, 991, 865, 866, 659, - 842, 1045, 830, 831, 777, 666, 694, 1099, 1101, 1102, - 952, 827, 813, 869, 871, 1046, 773, 1047, 1104, 699, - 872, 1105, 1036, 779, 780, 705, 728, 715, 783, 838, - 1082, 804, 800, 812, 981, 780, 828, 875, 1107, 876, - 880, 884, 1032, 887, 0, 0, 0, 0, 0, 0, + 147, 147, 147, 147, 147, 147, 139, 147, 45, 58, + 58, 333, 53, 58, 58, 58, 58, 147, 147, 147, + 147, 642, 807, 758, 647, 410, 766, 350, 807, 807, + 807, 124, 428, 125, 768, 814, 379, 817, 817, 825, + 920, 920, 817, 819, 817, 825, 817, 817, 920, 920, + 799, 920, 360, 629, 500, 599, 637, 920, 384, 817, + 817, 817, 817, 787, 920, 146, 639, 817, 377, 369, + 817, 817, 787, 786, 823, 788, 920, 920, 920, 787, + 589, 788, 788, 788, 854, 855, 798, 822, 494, 480, + 643, 288, 623, 822, 822, 817, 615, 798, 822, 798, + 822, 778, 822, 822, 822, 798, 822, 819, 545, 822, + 770, 772, 641, 198, 822, 38, 932, 933, 624, 934, + 927, 941, 988, 942, 946, 1069, 919, 952, 931, 947, + 989, 926, 922, 829, 745, 760, 801, 784, 917, 811, + 811, 811, 910, 914, 811, 811, 811, 811, 811, 811, + 811, 811, 745, 774, 844, 816, 961, 761, 765, 1032, + 776, 1016, 771, 960, 932, 946, 626, 931, 947, 926, + 922, 802, 797, 790, 796, 785, 781, 737, 775, 821, + 1036, 948, 848, 769, 997, 963, 987, 1067, 969, 970, + 1002, 1037, 857, 1038, 1065, 826, 1082, 1084, 885, 972, + 1071, 811, 906, 795, 896, 971, 916, 745, 897, 1039, + 991, 998, 1003, 1004, 1068, 835, 833, 900, 1085, 976, + 977, 979, 1072, 1073, 852, 993, 840, 1010, 839, 1087, + 1012, 1014, 1017, 1024, 1074, 1088, 1075, 905, 1076, 858, + 837, 888, 810, 1090, 285, 834, 836, 850, 981, 498, + 953, 1077, 1091, 1093, 1026, 1029, 1030, 1094, 1095, 949, + 860, 994, 809, 995, 990, 865, 866, 659, 842, 1040, + 830, 831, 777, 666, 694, 1096, 1097, 1098, 951, 827, + 813, 869, 871, 1041, 773, 1045, 1099, 699, 872, 1101, + 1035, 779, 780, 705, 728, 715, 783, 838, 1078, 804, + 800, 812, 980, 780, 828, 875, 1102, 876, 880, 884, + 1031, 887, 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, 459, 459, 459, 459, 459, 459, - 307, 307, 307, 307, 459, 459, 459, 459, 459, 459, - 459, 307, 459, 459, 459, 307, 307, 0, 0, 307, - 0, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 0, 0, 459, 459, 459, 459, 459, 459, 307, 307, + 307, 307, 459, 459, 459, 459, 459, 459, 459, 307, + 459, 459, 459, 307, 307, 0, 0, 307, 0, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, @@ -742,180 +739,181 @@ class Php7 extends \PhpParser\ParserAbstract 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 291, 291, 291, 291, 291, 291, 291, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 506, 506, 291, 291, 291, 291, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 291, 291, 0, - 291, 291, 291, 291, 291, 291, 291, 291, 506, 799, - 506, 506, 140, 140, 140, 140, 506, 506, 506, -88, - -88, 506, 235, 506, 506, 140, 140, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 506, 506, 0, 0, - 0, 420, 59, 506, 819, 819, 819, 819, 506, 506, - 506, 506, 59, 59, 506, 506, 506, 0, 0, 0, - 0, 0, 0, 0, 0, 420, 0, 0, 420, 0, - 0, 819, 819, 506, 235, 799, 144, 506, 0, 0, - 0, 0, 420, 819, 420, 201, 817, 59, 59, 817, - 201, 201, 58, 147, 144, 645, 645, 645, 645, 0, - 0, 642, 799, 799, 799, 799, 799, 799, 799, 799, - 799, 799, 799, 819, 0, 799, 0, 819, 819, 819, + 291, 291, 291, 291, 291, 291, 291, 291, 506, 506, + 291, 291, 291, 291, 506, 506, 506, 506, 506, 506, + 506, 506, 506, 506, 291, 291, 0, 291, 291, 291, + 291, 291, 291, 291, 291, 506, 799, 506, 506, 140, + 140, 140, 140, 506, 506, 506, -88, -88, 506, 235, + 506, 506, 140, 140, 506, 506, 506, 506, 506, 506, + 506, 506, 506, 506, 506, 0, 0, 0, 420, 59, + 506, 819, 819, 819, 819, 506, 506, 506, 506, 59, + 59, 506, 506, 506, 0, 0, 0, 0, 0, 0, + 0, 0, 420, 0, 0, 420, 0, 0, 819, 819, + 506, 235, 799, 144, 506, 0, 0, 0, 0, 420, + 819, 420, 201, 817, 59, 59, 201, 201, 817, 58, + 147, 144, 645, 645, 645, 645, 0, 0, 642, 799, + 799, 799, 799, 799, 799, 799, 799, 799, 799, 799, + 819, 0, 799, 0, 819, 819, 819, 0, 0, 0, + 0, 0, 0, 0, 0, 920, 0, 0, 0, 0, + 0, 0, 0, 819, 0, 0, 920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 819, 0, 0, 920, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 932, - 0, 0, 0, 0, 0, 0, 819, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 811, 835, 0, 835, - 0, 811, 811, 811, 0, 0, 0, 0, 842, 773 + 0, 0, 0, 819, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 811, 835, 0, 0, 835, 0, 811, + 811, 811, 0, 0, 0, 842, 773 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 613, 613, - 613, 613,32767,32767, 254, 102,32767,32767, 480, 397, - 397, 397,32767,32767, 555, 555, 555, 555, 555, 555, - 32767,32767,32767,32767,32767,32767, 480,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 611, 611, + 611, 611,32767,32767, 254, 102,32767,32767, 480, 397, + 397, 397,32767,32767, 553, 553, 553, 553, 553,32767, + 32767,32767,32767,32767,32767, 480,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, 36, 7, + 8, 10, 11, 49, 17, 324, 100,32767,32767,32767, + 32767,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, - 324,32767,32767,32767,32767, 102,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 604,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 606,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 385, 484, 463, + 464, 466, 467, 396, 554, 610, 327, 607, 329, 395, + 145, 339, 330, 242, 258, 485, 259, 486, 489, 490, + 215, 382, 149, 150, 427, 481, 429, 479, 483, 428, + 402, 408, 409, 410, 411, 412, 413, 414, 415, 416, + 417, 418, 419, 420, 400, 401, 482,32767,32767, 460, + 459, 458, 425,32767,32767,32767,32767,32767,32767,32767, + 32767, 102,32767, 426, 430, 399, 433, 431, 432, 449, + 450, 447, 448, 451,32767,32767,32767,32767, 452, 453, + 454, 455, 316,32767,32767, 366, 364, 316, 111,32767, + 32767, 440, 441,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 497, 547, 457,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 385, 484, - 463, 464, 466, 467, 396, 556, 612, 327, 609, 395, - 145, 339, 329, 242, 330, 258, 485, 259, 486, 489, - 490, 215, 382, 149, 150, 427, 481, 429, 479, 483, - 428, 402, 408, 409, 410, 411, 412, 413, 414, 415, - 416, 417, 418, 419, 420, 400, 401, 482,32767,32767, - 460, 459, 458, 425,32767,32767,32767,32767,32767,32767, - 32767,32767, 102,32767, 426, 430, 399, 433, 431, 432, - 449, 450, 447, 448, 451,32767,32767,32767,32767, 452, - 453, 454, 455, 316,32767,32767, 366, 364, 316, 111, - 32767,32767, 440, 441,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 497, 549, 457,32767,32767, + 102,32767, 100, 549, 422, 424, 517, 435, 436, 434, + 403,32767, 522,32767, 102,32767, 524,32767,32767,32767, + 32767,32767,32767,32767, 548,32767, 555, 555,32767, 510, + 100, 195,32767,32767, 523, 195, 195,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 618, 510, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, + 195, 110,32767,32767,32767, 100, 195, 195, 195, 195, + 195, 195, 195, 195, 525, 195, 195, 190,32767, 268, + 270, 102, 572, 195,32767, 527,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 102,32767, 100, 551, 422, 424, 517, 435, 436, - 434, 403,32767, 524,32767, 102,32767, 526,32767,32767, - 32767,32767,32767,32767,32767, 550,32767, 557, 557,32767, - 510, 100, 195,32767,32767, 525,32767, 195, 195,32767, - 32767,32767,32767,32767,32767,32767,32767, 620, 510, 110, - 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 32767, 195, 110,32767,32767,32767, 100, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 195, 190,32767, 268, - 270, 102, 574, 195,32767, 529,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 522,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 510, 445, 138,32767, 138, 557, 437, 438, - 439, 512, 557, 557, 557, 312, 289,32767,32767,32767, - 32767, 527, 100, 100, 100, 100, 522,32767,32767,32767, - 32767, 111, 496, 99, 99, 99, 99, 99, 103, 101, - 32767,32767,32767,32767, 223,32767, 99,32767, 101, 101, - 32767,32767, 223, 225, 212, 101, 227,32767, 578, 579, - 223, 101, 227, 227, 227, 247, 247, 499, 318, 101, - 99, 101, 101, 197, 318, 318,32767, 101, 499, 318, - 499, 318, 199, 318, 318, 318, 499, 318,32767, 101, - 318, 214, 385, 99, 99, 318,32767,32767,32767, 512, - 32767,32767,32767,32767,32767,32767,32767, 222,32767,32767, - 32767,32767,32767,32767,32767,32767, 544,32767, 562, 576, - 443, 444, 446, 561, 559, 468, 469, 470, 471, 472, - 473, 474, 476, 608,32767, 516,32767,32767,32767, 338, - 32767, 618,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 619, - 32767, 557,32767,32767,32767,32767, 442, 9, 74, 505, - 42, 43, 51, 57, 533, 534, 535, 536, 530, 531, - 537, 532,32767,32767, 539, 584,32767,32767, 558, 611, - 32767,32767,32767,32767,32767,32767, 138,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 544,32767, - 136,32767,32767,32767,32767,32767,32767,32767,32767, 540, - 32767,32767,32767, 557,32767,32767,32767,32767, 314, 311, + 32767, 510, 445, 138,32767, 512, 138, 555, 437, 438, + 439, 555, 555, 555, 312, 289,32767,32767,32767,32767, + 525, 525, 100, 100, 100, 100,32767,32767,32767,32767, + 111, 496, 99, 99, 99, 99, 99, 103, 101,32767, + 32767,32767,32767, 223,32767, 101, 99,32767, 101, 101, + 32767,32767, 223, 225, 212, 227,32767, 576, 577, 223, + 101, 227, 227, 227, 247, 247, 499, 318, 101, 99, + 101, 101, 197, 318, 318,32767, 101, 499, 318, 499, + 318, 199, 318, 318, 318, 499, 318,32767, 101, 318, + 214, 385, 99, 99, 318,32767,32767,32767, 512,32767, + 32767,32767,32767,32767,32767,32767, 222,32767,32767,32767, + 32767,32767,32767,32767,32767, 542,32767, 560, 574, 443, + 444, 446, 559, 557, 468, 469, 470, 471, 472, 473, + 474, 476, 606,32767, 516,32767,32767,32767, 338,32767, + 616,32767,32767,32767, 9, 74, 505, 42, 43, 51, + 57, 531, 532, 533, 534, 528, 529, 535, 530,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 557,32767,32767,32767, - 32767,32767, 291,32767, 308,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 617,32767, 555,32767,32767,32767, + 32767, 442, 537, 582,32767,32767, 556, 609,32767,32767, + 32767,32767,32767,32767,32767, 138,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 542,32767, 136,32767, + 32767,32767,32767,32767,32767,32767,32767, 538,32767,32767, + 32767, 555,32767,32767,32767,32767, 314, 311,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 381, 512, 294, 296, 297,32767,32767, - 32767,32767, 360,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 152, 152, 3, 3, 341, 152, - 152, 152, 341, 341, 152, 341, 341, 341, 152, 152, - 152, 152, 152, 152, 280, 185, 262, 265, 247, 247, - 152, 352, 152 + 32767,32767,32767,32767, 555,32767,32767,32767,32767,32767, + 291,32767, 308,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 381, 512, 294, 296, 297,32767,32767,32767,32767, + 360,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 152, 152, 3, 3, 341, 152, 152, 152, + 341, 341, 152, 341, 341, 341, 152, 152, 152, 152, + 152, 152, 280, 185, 262, 265, 247, 247, 152, 352, + 152 ); protected array $goto = array( - 197, 197, 1038, 1069, 701, 353, 856, 433, 666, 479, - 1332, 1333, 710, 427, 321, 315, 316, 337, 581, 432, - 338, 434, 643, 897, 855, 897, 897, 167, 167, 167, - 167, 221, 198, 194, 194, 177, 179, 216, 194, 194, - 194, 194, 194, 195, 195, 195, 195, 195, 195, 189, - 190, 191, 192, 193, 218, 216, 219, 540, 541, 423, - 542, 545, 546, 547, 548, 549, 550, 551, 552, 1150, - 168, 169, 170, 196, 171, 172, 173, 166, 174, 175, - 176, 178, 215, 217, 220, 240, 243, 254, 255, 257, - 258, 259, 260, 261, 262, 263, 264, 269, 270, 271, - 272, 282, 283, 318, 319, 320, 428, 429, 430, 586, + 196, 196, 1036, 502, 699, 503, 1067, 432, 664, 624, + 661, 509, 708, 427, 320, 314, 315, 336, 596, 431, + 337, 433, 641, 895, 853, 895, 895, 166, 166, 166, + 166, 220, 197, 193, 193, 176, 178, 215, 193, 193, + 193, 193, 193, 194, 194, 194, 194, 194, 188, 189, + 190, 191, 192, 217, 215, 218, 539, 540, 422, 541, + 544, 545, 546, 547, 548, 549, 550, 551, 1148, 167, + 168, 169, 195, 170, 171, 172, 165, 173, 174, 175, + 177, 214, 216, 219, 239, 242, 253, 254, 256, 257, + 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, + 281, 282, 317, 318, 319, 428, 429, 430, 601, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 180, 237, 181, 199, 200, - 201, 241, 189, 190, 191, 192, 193, 218, 1150, 202, - 182, 183, 184, 203, 199, 185, 242, 204, 202, 165, - 205, 206, 186, 207, 208, 209, 187, 210, 211, 188, - 212, 213, 214, 859, 614, 629, 632, 633, 634, 635, - 656, 657, 658, 712, 469, 469, 279, 279, 279, 279, - 857, 628, 628, 469, 626, 663, 605, 1287, 1287, 1287, - 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1230, 948, 852, - 482, 1231, 1234, 949, 1235, 1111, 1112, 864, 484, 913, - 908, 909, 922, 865, 910, 862, 911, 912, 863, 1041, - 1041, 916, 979, 686, 956, 421, 357, 1033, 1049, 1050, - 831, 1091, 1086, 1087, 1088, 465, 357, 357, 356, 356, - 356, 356, 1199, 890, 553, 553, 553, 553, 578, 609, - 357, 357, 852, 344, 357, 837, 1374, 354, 355, 917, - 1254, 918, 1254, 1254, 971, 412, 709, 559, 1038, 1038, - 1254, 357, 357, 1038, 351, 1038, 1038, 345, 344, 1038, - 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, - 1339, 1339, 1339, 1339, 698, 1254, 837, 833, 837, 1347, - 1254, 1254, 1254, 1254, 1047, 1048, 1254, 1254, 1254, 698, - 1000, 564, 557, 698, 604, 1104, 1357, 1357, 555, 1318, - 555, 555, 1044, 1043, 713, 930, 327, 310, 555, 931, - 511, 704, 946, 1102, 1357, 946, 636, 638, 640, 460, - 512, 343, 557, 564, 573, 574, 346, 584, 607, 621, - 622, 1360, 1360, 458, 872, 582, 619, 25, 973, 973, - 973, 973, 1334, 1335, 458, 967, 974, 1306, 1306, 884, - 559, 852, 871, 1306, 1306, 1306, 1306, 1306, 1306, 1306, - 1306, 1306, 1306, 1303, 1303, 426, 441, 616, 396, 1303, - 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 544, - 544, 5, 576, 6, 665, 544, 544, 544, 544, 544, - 544, 544, 544, 544, 544, 1003, 1147, 1062, 975, 440, - 736, 687, 671, 556, 1012, 1007, 339, 558, 568, 849, - 877, 558, 962, 568, 405, 1247, 399, 464, 451, 451, - 451, 451, 620, 1329, 874, 1329, 1329, 1245, 1075, 472, - 585, 473, 474, 1329, 1017, 1017, 882, 571, 1022, 1365, - 1366, 737, 642, 644, 740, 886, 664, 1122, 1079, 0, - 688, 691, 1014, 699, 708, 1010, 984, 1029, 0, 1341, - 1341, 1341, 1341, 543, 543, 880, 250, 250, 0, 543, - 0, 543, 543, 543, 543, 543, 543, 543, 543, 0, - 326, 276, 326, 326, 0, 0, 1325, 435, 0, 0, - 1249, 0, 435, 248, 248, 248, 248, 245, 251, 0, - 1045, 1045, 503, 0, 504, 670, 1056, 1052, 1053, 0, - 510, 0, 451, 451, 451, 451, 451, 451, 451, 451, - 451, 451, 451, 0, 0, 451, 0, 0, 1077, 0, - 410, 411, 1327, 1327, 1077, 675, 1271, 676, 0, 414, - 415, 416, 0, 689, 1250, 1251, 417, 935, 1137, 0, - 0, 349, 0, 847, 624, 885, 873, 1074, 1078, 0, - 1019, 659, 660, 0, 677, 678, 679, 982, 876, 0, - 669, 998, 1252, 1315, 1316, 0, 870, 398, 401, 565, - 606, 610, 0, 0, 0, 0, 0, 0, 1244, 0, - 0, 972, 0, 0, 0, 0, 0, 0, 0, 0, + 232, 233, 234, 235, 179, 236, 180, 188, 189, 190, + 191, 192, 217, 1148, 198, 199, 200, 201, 240, 181, + 182, 202, 183, 203, 199, 184, 241, 198, 164, 204, + 205, 185, 206, 207, 208, 186, 209, 210, 187, 211, + 212, 213, 857, 613, 627, 630, 631, 632, 633, 654, + 655, 656, 710, 352, 854, 343, 278, 278, 278, 278, + 835, 626, 626, 478, 1328, 1329, 603, 1283, 1283, 1283, + 1283, 1283, 1283, 1283, 1283, 1283, 1283, 1228, 946, 344, + 343, 1229, 1232, 947, 1233, 855, 915, 862, 916, 911, + 906, 907, 920, 863, 908, 860, 909, 910, 861, 1001, + 914, 835, 973, 835, 734, 356, 977, 555, 1010, 1005, + 1089, 1084, 1085, 1086, 420, 356, 356, 355, 355, 355, + 355, 602, 1102, 657, 658, 481, 675, 676, 677, 356, + 356, 711, 483, 356, 829, 1370, 459, 510, 702, 1252, + 1100, 1252, 1252, 888, 469, 469, 558, 1036, 1036, 1252, + 356, 356, 1036, 469, 1036, 1036, 1109, 1110, 1036, 1036, + 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1335, + 1335, 1335, 1335, 696, 1252, 870, 831, 464, 593, 1252, + 1252, 1252, 1252, 441, 1197, 1252, 1252, 1252, 696, 563, + 556, 882, 696, 554, 869, 554, 554, 1039, 1039, 1314, + 350, 684, 954, 554, 928, 1031, 1047, 1048, 929, 1343, + 426, 944, 615, 1353, 1353, 5, 944, 6, 998, 511, + 342, 556, 563, 588, 589, 347, 599, 605, 457, 620, + 621, 1353, 396, 971, 971, 971, 971, 25, 591, 457, + 965, 972, 969, 411, 707, 1302, 1302, 1060, 1356, 1356, + 558, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, + 1302, 1299, 1299, 398, 401, 604, 608, 1299, 1299, 1299, + 1299, 1299, 1299, 1299, 1299, 1299, 1299, 543, 543, 1042, + 1041, 850, 663, 543, 543, 543, 543, 543, 543, 543, + 543, 543, 543, 634, 636, 638, 552, 552, 552, 552, + 1145, 607, 1045, 1046, 353, 354, 557, 583, 439, 326, + 309, 557, 685, 583, 1245, 399, 463, 450, 450, 450, + 450, 847, 1325, 669, 1325, 1325, 1330, 1331, 472, 600, + 473, 474, 1325, 338, 850, 960, 880, 586, 875, 1361, + 1362, 735, 640, 642, 597, 618, 662, 872, 405, 619, + 686, 689, 1012, 697, 706, 1008, 1020, 1073, 1337, 1337, + 1337, 1337, 542, 542, 878, 249, 249, 1243, 542, 738, + 542, 542, 542, 542, 542, 542, 542, 542, 325, 275, + 325, 325, 479, 1077, 884, 1321, 0, 982, 1027, 1120, + 1247, 0, 247, 247, 247, 247, 244, 250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1120, 889, 0, 0, 0, 0, + 0, 450, 450, 450, 450, 450, 450, 450, 450, 450, + 450, 450, 0, 0, 450, 0, 0, 1075, 0, 409, + 410, 1323, 1323, 1075, 673, 0, 674, 0, 413, 414, + 415, 0, 687, 1248, 1249, 416, 1235, 0, 0, 0, + 348, 609, 845, 850, 933, 1135, 0, 0, 0, 1235, + 0, 0, 883, 871, 1072, 1076, 1017, 0, 0, 0, + 0, 1250, 1311, 1312, 874, 980, 667, 996, 0, 0, + 0, 0, 868, 434, 0, 0, 0, 0, 434, 0, + 0, 0, 0, 0, 1242, 0, 1043, 1043, 970, 0, + 0, 668, 1054, 1050, 1051, 1015, 1015, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1118, 887, 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, @@ -923,12 +921,12 @@ class Php7 extends \PhpParser\ParserAbstract 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, 253, 253 + 0, 252, 252 ); protected array $gotoCheck = array( - 42, 42, 73, 128, 73, 97, 26, 66, 66, 183, - 183, 183, 9, 66, 66, 66, 66, 66, 66, 66, + 42, 42, 73, 160, 73, 160, 128, 66, 66, 56, + 56, 160, 9, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 25, 25, 25, 25, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -943,55 +941,55 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 15, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 154, 154, 23, 23, 23, 23, - 27, 108, 108, 154, 56, 56, 131, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 79, 79, 22, - 84, 79, 79, 79, 79, 145, 145, 15, 84, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 89, - 89, 15, 49, 89, 89, 43, 14, 89, 89, 89, - 6, 15, 15, 15, 15, 156, 14, 14, 24, 24, - 24, 24, 156, 45, 107, 107, 107, 107, 179, 107, - 14, 14, 22, 175, 14, 12, 14, 97, 97, 65, - 73, 65, 73, 73, 93, 93, 93, 14, 73, 73, - 73, 14, 14, 73, 186, 73, 73, 175, 175, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 9, 9, 9, 9, 7, 73, 12, 7, 12, 188, - 73, 73, 73, 73, 120, 120, 73, 73, 73, 7, - 103, 76, 76, 7, 8, 8, 189, 189, 19, 14, - 19, 19, 119, 119, 8, 73, 176, 176, 19, 73, - 8, 8, 9, 8, 189, 9, 85, 85, 85, 83, - 14, 76, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 189, 189, 19, 35, 2, 2, 76, 19, 19, - 19, 19, 185, 185, 19, 19, 19, 177, 177, 35, - 14, 22, 35, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 178, 178, 13, 83, 13, 62, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 180, - 180, 46, 104, 46, 64, 180, 180, 180, 180, 180, - 180, 180, 180, 180, 180, 50, 155, 115, 50, 113, - 50, 117, 121, 50, 50, 50, 29, 9, 9, 18, - 39, 9, 92, 9, 28, 14, 9, 9, 23, 23, - 23, 23, 80, 131, 37, 131, 131, 167, 130, 9, - 9, 9, 9, 131, 107, 107, 9, 48, 110, 9, - 9, 48, 48, 48, 99, 41, 48, 148, 133, -1, - 48, 48, 48, 48, 48, 48, 96, 114, -1, 131, - 131, 131, 131, 163, 163, 9, 5, 5, -1, 163, - -1, 163, 163, 163, 163, 163, 163, 163, 163, -1, - 24, 24, 24, 24, -1, -1, 131, 118, -1, -1, - 20, -1, 118, 5, 5, 5, 5, 5, 5, -1, - 118, 118, 160, -1, 160, 118, 118, 118, 118, -1, - 160, -1, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, -1, -1, 23, -1, -1, 131, -1, - 82, 82, 131, 131, 131, 82, 20, 82, -1, 82, - 82, 82, -1, 82, 20, 20, 82, 17, 17, -1, - -1, 82, -1, 20, 17, 16, 16, 16, 16, -1, - 17, 86, 86, -1, 86, 86, 86, 16, 17, -1, - 17, 17, 20, 20, 20, -1, 17, 59, 59, 59, - 59, 59, -1, -1, -1, -1, -1, -1, 17, -1, - -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, + 42, 42, 15, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 97, 26, 174, 23, 23, 23, 23, + 12, 108, 108, 182, 182, 182, 131, 108, 108, 108, + 108, 108, 108, 108, 108, 108, 108, 79, 79, 174, + 174, 79, 79, 79, 79, 27, 65, 15, 65, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 50, + 15, 12, 50, 12, 50, 14, 49, 50, 50, 50, + 15, 15, 15, 15, 43, 14, 14, 24, 24, 24, + 24, 8, 8, 86, 86, 84, 86, 86, 86, 14, + 14, 8, 84, 14, 6, 14, 83, 8, 8, 73, + 8, 73, 73, 45, 154, 154, 14, 73, 73, 73, + 14, 14, 73, 154, 73, 73, 145, 145, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 9, + 9, 9, 9, 7, 73, 35, 7, 156, 178, 73, + 73, 73, 73, 83, 156, 73, 73, 73, 7, 76, + 76, 35, 7, 19, 35, 19, 19, 89, 89, 14, + 185, 89, 89, 19, 73, 89, 89, 89, 73, 187, + 13, 9, 13, 188, 188, 46, 9, 46, 103, 14, + 76, 76, 76, 76, 76, 76, 76, 76, 19, 76, + 76, 188, 62, 19, 19, 19, 19, 76, 104, 19, + 19, 19, 93, 93, 93, 176, 176, 115, 188, 188, + 14, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 177, 177, 59, 59, 59, 59, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 179, 179, 119, + 119, 22, 64, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 179, 85, 85, 85, 107, 107, 107, 107, + 155, 107, 120, 120, 97, 97, 9, 9, 113, 175, + 175, 9, 117, 9, 14, 9, 9, 23, 23, 23, + 23, 18, 131, 121, 131, 131, 184, 184, 9, 9, + 9, 9, 131, 29, 22, 92, 9, 48, 39, 9, + 9, 48, 48, 48, 2, 2, 48, 37, 28, 80, + 48, 48, 48, 48, 48, 48, 110, 130, 131, 131, + 131, 131, 162, 162, 9, 5, 5, 166, 162, 99, + 162, 162, 162, 162, 162, 162, 162, 162, 24, 24, + 24, 24, 157, 133, 41, 131, -1, 96, 114, 148, + 20, -1, 5, 5, 5, 5, 5, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 16, 16, -1, -1, -1, -1, + -1, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, -1, -1, 23, -1, -1, 131, -1, 82, + 82, 131, 131, 131, 82, -1, 82, -1, 82, 82, + 82, -1, 82, 20, 20, 82, 20, -1, -1, -1, + 82, 17, 20, 22, 17, 17, -1, -1, -1, 20, + -1, -1, 16, 16, 16, 16, 17, -1, -1, -1, + -1, 20, 20, 20, 17, 16, 17, 17, -1, -1, + -1, -1, 17, 118, -1, -1, -1, -1, 118, -1, + -1, -1, -1, -1, 17, -1, 118, 118, 16, -1, + -1, 118, 118, 118, 118, 107, 107, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 16, 16, -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, @@ -999,53 +997,53 @@ class Php7 extends \PhpParser\ParserAbstract -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, 5, 5 + -1, 5, 5 ); protected array $gotoBase = array( - 0, 0, -361, 0, 0, 485, 207, 287, 306, -11, - 0, 0, -43, 46, -73, -187, 121, 99, 118, 53, - 115, 0, -80, 173, 235, 20, 2, 176, 95, 128, - 0, 0, 0, 0, 0, -19, 0, 103, 0, 105, - 0, 23, -1, 203, 0, 217, -339, 0, -258, 205, - 404, 0, 0, 0, 0, 0, 144, 0, 0, 552, - 0, 0, 346, 0, 165, 246, -231, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -36, 0, 0, -213, - 96, -196, 56, 60, -272, -146, -141, 0, 0, -61, - 0, 0, 101, -42, 0, 0, 32, -481, 0, 55, - 0, 0, 0, 275, 359, 0, 0, 216, -57, 0, - 86, 0, 0, 141, -35, 143, 0, 137, 234, 42, - 18, 131, 0, 0, 0, 0, 0, 0, 1, 0, - 72, 178, 0, 25, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -71, 0, 0, 22, 0, - 0, 0, 0, 0, 140, 171, -33, 0, 0, 0, - 24, 0, 0, 245, 0, 0, 0, 76, 0, 0, - 0, 0, 0, 0, 0, -46, 3, 129, 145, 219, - 161, 0, 0, -293, 0, -12, 244, 0, 268, 7, - 0, 0 + 0, 0, -250, 0, 0, 484, 231, 286, 233, -11, + 0, 0, -117, -8, -73, -187, 129, 106, 131, 49, + 115, 0, 123, 173, 234, 20, 170, 201, 130, 156, + 0, 0, 0, 0, 0, -77, 0, 127, 0, 134, + 0, 62, -1, 212, 0, 237, -403, 0, -256, 209, + 208, 0, 0, 0, 0, 0, -31, 0, 0, 338, + 0, 0, 310, 0, 164, 193, -230, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -36, 0, 0, -212, + 122, -196, 56, -22, -227, -68, -477, 0, 0, 38, + 0, 0, 125, 57, 0, 0, 63, -312, 0, 81, + 0, 0, 0, 303, 315, 0, 0, 388, -56, 0, + 105, 0, 0, 151, -3, 94, 0, 149, 331, 120, + 137, 153, 0, 0, 0, 0, 0, 0, 4, 0, + 102, 178, 0, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 0, 0, 64, 0, + 0, 0, 0, 0, 230, 176, 30, 61, 0, 0, + -494, 0, 245, 0, 0, 0, 117, 0, 0, 0, + 0, 0, 0, 0, -123, 107, 128, 144, 269, 160, + 0, 0, -118, 0, 73, 290, 0, 298, 25, 0, + 0 ); protected array $gotoDefault = array( - -32768, 516, 744, 4, 745, 939, 820, 829, 602, 534, - 711, 350, 630, 424, 1323, 915, 1136, 583, 848, 1263, - 1237, 459, 851, 332, 734, 927, 898, 899, 402, 388, - 394, 400, 654, 631, 497, 883, 455, 875, 489, 878, - 454, 887, 164, 420, 514, 891, 3, 894, 562, 925, - 977, 389, 902, 390, 682, 904, 567, 906, 907, 397, - 403, 404, 1141, 575, 627, 919, 256, 569, 920, 387, - 921, 929, 392, 395, 692, 468, 508, 502, 413, 1106, - 570, 613, 651, 448, 476, 625, 637, 623, 483, 436, - 418, 331, 961, 969, 490, 466, 983, 352, 991, 742, - 1149, 645, 492, 999, 646, 1006, 1009, 535, 536, 481, - 1021, 273, 1024, 493, 1030, 22, 672, 1035, 1036, 673, - 647, 1058, 648, 674, 649, 1060, 475, 603, 1068, 456, - 1076, 1311, 457, 1080, 266, 1083, 278, 419, 437, 1089, - 1090, 9, 1096, 702, 703, 18, 277, 513, 1121, 693, - -32768,-32768,-32768,-32768, 453, 1148, 452, 1218, 1220, 563, - 494, 1238, 480, 295, 1241, 685, 509, 1246, 449, 1314, - 450, 537, 477, 317, 538, 1358, 309, 335, 314, 554, - 296, 336, 539, 478, 1320, 1328, 333, 31, 1348, 1359, - 580, 618 + -32768, 515, 742, 4, 743, 937, 818, 827, 579, 533, + 709, 349, 628, 423, 1319, 913, 1134, 598, 846, 1261, + 1267, 458, 849, 331, 732, 925, 896, 897, 402, 388, + 394, 400, 652, 629, 496, 881, 454, 873, 488, 876, + 453, 885, 163, 419, 513, 889, 3, 892, 561, 923, + 975, 389, 900, 390, 680, 902, 582, 904, 905, 397, + 403, 404, 1139, 590, 625, 917, 255, 584, 918, 387, + 919, 927, 392, 395, 690, 468, 507, 501, 412, 1104, + 585, 612, 649, 447, 475, 623, 635, 622, 482, 435, + 417, 330, 959, 967, 489, 466, 981, 351, 989, 740, + 1147, 643, 491, 997, 644, 1004, 1007, 534, 535, 480, + 1019, 272, 1022, 492, 1028, 22, 670, 1033, 1034, 671, + 645, 1056, 646, 672, 647, 1058, 465, 580, 1066, 455, + 1074, 1307, 456, 1078, 265, 1081, 277, 418, 436, 1087, + 1088, 9, 1094, 700, 701, 18, 276, 512, 1119, 691, + -32768,-32768,-32768,-32768, 452, 1146, 451, 1216, 1218, 562, + 493, 1236, 294, 1239, 683, 508, 1244, 448, 1310, 449, + 536, 476, 316, 537, 1354, 308, 334, 313, 553, 295, + 335, 538, 477, 1316, 1324, 332, 31, 1344, 1355, 595, + 617 ); protected array $ruleToNonTerminal = array( @@ -1098,21 +1096,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 161, 163, 163, 164, 155, 155, 160, - 160, 165, 166, 166, 167, 168, 169, 169, 169, 169, + 42, 42, 42, 161, 162, 162, 163, 155, 155, 160, + 160, 164, 165, 165, 166, 167, 168, 168, 168, 168, 19, 19, 73, 73, 73, 73, 156, 156, 156, 156, - 171, 171, 157, 157, 159, 159, 159, 162, 162, 177, - 177, 177, 177, 177, 177, 177, 177, 177, 177, 178, - 178, 178, 108, 180, 180, 180, 180, 158, 158, 158, - 158, 158, 158, 158, 158, 59, 59, 174, 174, 174, - 174, 174, 181, 181, 170, 170, 170, 170, 182, 182, - 182, 182, 182, 182, 74, 74, 66, 66, 66, 66, - 131, 131, 131, 131, 185, 184, 173, 173, 173, 173, - 173, 173, 173, 172, 172, 172, 183, 183, 183, 183, - 107, 179, 187, 187, 186, 186, 188, 188, 188, 188, - 188, 188, 188, 188, 176, 176, 176, 176, 175, 190, - 189, 189, 189, 189, 189, 189, 189, 189, 191, 191, - 191, 191 + 170, 170, 159, 159, 159, 157, 157, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 177, 177, 177, + 108, 179, 179, 179, 179, 158, 158, 158, 158, 158, + 158, 158, 158, 59, 59, 173, 173, 173, 173, 173, + 180, 180, 169, 169, 169, 169, 181, 181, 181, 181, + 181, 181, 74, 74, 66, 66, 66, 66, 131, 131, + 131, 131, 184, 183, 172, 172, 172, 172, 172, 172, + 172, 171, 171, 171, 182, 182, 182, 182, 107, 178, + 186, 186, 185, 185, 187, 187, 187, 187, 187, 187, + 187, 187, 175, 175, 175, 175, 174, 189, 188, 188, + 188, 188, 188, 188, 188, 188, 190, 190, 190, 190 ); protected array $ruleToLength = array( @@ -1168,18 +1165,17 @@ class Php7 extends \PhpParser\ParserAbstract 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 0, 3, 0, 1, 1, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 5, 3, 3, 4, 1, 1, 3, 1, 1, 1, - 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, - 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, - 1, 4, 2, 2, 1, 3, 1, 4, 4, 3, - 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, - 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, - 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, - 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, - 2, 1 + 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, + 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 4, 4, 1, + 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, + 2, 2, 1, 3, 1, 4, 4, 3, 3, 3, + 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, + 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, + 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, + 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -2375,9 +2371,7 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 475 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = strtolower($self->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $self->semValue = new Expr\Exit_($self->semStack[$stackPos-(2-2)], $attrs); + $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 476 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2501,287 +2495,281 @@ protected function initReduceCallbacks(): void { 520 => null, 521 => null, 522 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 523 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 524 => static function ($self, $stackPos) { $self->semValue = array(); }, - 525 => static function ($self, $stackPos) { + 523 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 526 => static function ($self, $stackPos) { + 524 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 527 => static function ($self, $stackPos) { + 525 => static function ($self, $stackPos) { $self->semValue = array(); }, - 528 => null, - 529 => static function ($self, $stackPos) { + 526 => null, + 527 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 530 => static function ($self, $stackPos) { + 528 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 531 => static function ($self, $stackPos) { + 529 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 532 => static function ($self, $stackPos) { + 530 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 533 => static function ($self, $stackPos) { + 531 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 534 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 535 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 536 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 537 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 540 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 541 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 542 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 543 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 544 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 545 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 546 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 547 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 548 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 547 => null, + 548 => null, 549 => null, - 550 => null, - 551 => null, - 552 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 553 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 554 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 555 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = null; }, - 556 => null, - 557 => null, - 558 => static function ($self, $stackPos) { + 554 => null, + 555 => null, + 556 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, + 557 => null, + 558 => null, 559 => null, 560 => null, 561 => null, 562 => null, - 563 => null, - 564 => null, - 565 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, + 564 => null, + 565 => null, 566 => null, - 567 => null, - 568 => null, - 569 => static function ($self, $stackPos) { + 567 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 570 => static function ($self, $stackPos) { + 568 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 571 => null, - 572 => static function ($self, $stackPos) { + 569 => null, + 570 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 573 => static function ($self, $stackPos) { + 571 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 574 => static function ($self, $stackPos) { + 572 => static function ($self, $stackPos) { $self->semValue = null; }, + 573 => null, + 574 => null, 575 => null, - 576 => null, - 577 => null, - 578 => static function ($self, $stackPos) { + 576 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 579 => static function ($self, $stackPos) { + 577 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 580 => null, - 581 => static function ($self, $stackPos) { + 578 => null, + 579 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 582 => static function ($self, $stackPos) { + 580 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 583 => static function ($self, $stackPos) { + 581 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 584 => static function ($self, $stackPos) { + 582 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 585 => static function ($self, $stackPos) { + 583 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 586 => null, - 587 => static function ($self, $stackPos) { + 584 => null, + 585 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 588 => static function ($self, $stackPos) { + 586 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 589 => static function ($self, $stackPos) { + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 590 => static function ($self, $stackPos) { + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 591 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 592 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, + 591 => null, + 592 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, 593 => null, - 594 => static function ($self, $stackPos) { + 594 => null, + 595 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 595 => null, 596 => null, 597 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 598 => null, - 599 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 600 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 601 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 602 => null, - 603 => static function ($self, $stackPos) { + 600 => null, + 601 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 604 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 605 => static function ($self, $stackPos) { + 603 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 606 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 607 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 608 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 609 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 610 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 611 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 612 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 613 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 614 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 615 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 616 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 617 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 618 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 619 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 620 => null, - 621 => static function ($self, $stackPos) { + 618 => null, + 619 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 622 => static function ($self, $stackPos) { + 620 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 623 => static function ($self, $stackPos) { + 621 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 624 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 625 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 626 => static function ($self, $stackPos) { + 624 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 627 => static function ($self, $stackPos) { + 625 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 628 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 629 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 630 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 631 => null, + 629 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index adaec8c91c..2f3627b964 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -162,15 +162,15 @@ class Php8 extends \PhpParser\ParserAbstract protected int $tokenToSymbolMapSize = 397; protected int $actionTableSize = 1278; - protected int $gotoTableSize = 660; + protected int $gotoTableSize = 658; protected int $invalidSymbol = 169; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 442; - protected int $numNonLeafStates = 754; + protected int $YY2TBLSTATE = 441; + protected int $numNonLeafStates = 752; protected array $symbolToName = array( "EOF", @@ -388,134 +388,134 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $action = array( - 131, 132, 133, 592, 134, 135, 1338, 766, 767, 768, - 136, 38,-32766,-32766,-32766, 1005,-32766,-32766,-32766,-32766, - -32766, 389, 388, 841,-32767,-32767,-32767,-32767, 102, 103, - 104, 430, 956,-32766, 0, 760, 759,-32766, 852,-32766, + 126, 127, 128, 569, 129, 130, 1334, 764, 765, 766, + 131, 38,-32766,-32766,-32766, 1003,-32766,-32766,-32766,-32766, + -32766, 388, 387, 839,-32767,-32767,-32767,-32767, 101, 102, + 103, 429, 954,-32766, 0, 758, 757,-32766, 850,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767,-32766,-32766,-32766, 24, 769,-32766,-32766,-32766, 1128, - 1129, 1130, 1127, 1126, 1125, 1131, -328, 1104, 843, 263, - 137, 411, 773, 774, 775, 776, 1120,-32766, 436,-32766, - -32766,-32766,-32766,-32766, 158, 830, 777, 778, 779, 780, - 781, 782, 783, 784, 785, 786, 806, 593, 807, 808, - 809, 810, 798, 799, 345, 346, 801, 802, 787, 788, - 789, 791, 792, 793, 360, 833, 834, 835, 836, 837, - 594, 794, 795, 595, 596, -194, 818, 816, 817, 829, - 813, 814,-32766, 1042, 597, 598, 812, 599, 600, 601, - 602, -193, 603, 604, 1006, 845, 466, 467, 468, 815, - 605, 606, 723, 138, 1051, 131, 132, 133, 592, 134, - 135, 1075, 766, 767, 768, 136, 38, -110, 850, 82, - -85, 1372, -110, 322, -110,-32766,-32766,-32766, 291, 304, - 760, 759, -110, -110, -110, -110, -110, -110, -110, -110, - 760, 759,-32766,-32766,-32766, 736,-32766, 851,-32766,-32766, - -32766,-32766,-32766,-32766,-32766, 105, 106, 107, 108, 109, - 769, 273, 237,-32766, 2,-32766,-32766,-32766,-32766, 103, - 104, -328, 1297, 110, 263, 137, 411, 773, 774, 775, - 776, -342, 751, 436, 36, 247, -85, 877, 846, 878, - 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, - 786, 806, 593, 807, 808, 809, 810, 798, 799, 345, - 346, 801, 802, 787, 788, 789, 791, 792, 793, 360, - 833, 834, 835, 836, 837, 594, 794, 795, 595, 596, - -194, 818, 816, 817, 829, 813, 814, 849, -562, 597, - 598, 812, 599, 600, 601, 602, -193, 603, 604,-32766, - 83, 84, 85, 850, 815, 605, 606, 162, 147, 790, - 761, 762, 763, 764, 765, 847, 766, 767, 768, 803, - 804, 37, 26, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 1048, 273,-32766, - -32766,-32766, -562, -562, 616, 387, 388,-32766,-32766,-32766, - 110, -272, 126, 35, 769, 430, 974, 975, -562, 1051, - -32766, 976,-32766,-32766,-32766, 490, 127, 970, 770, 771, - 772, 773, 774, 775, 776, 139, 1105, 839, 143, 322, - 749, 436, 1275, 282, 830, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 786, 806, 828, 807, 808, 809, - 810, 798, 799, 800, 827, 801, 802, 787, 788, 789, - 791, 792, 793, 832, 833, 834, 835, 836, 837, 838, - 794, 795, 796, 797, 149, 818, 816, 817, 829, 813, - 814, 566, -565, 805, 811, 812, 819, 820, 822, 821, - 236, 823, 824, 1144,-32766,-32766,-32766, 741, 815, 826, - 825, 50, 51, 52, 522, 53, 54, 1270, 1269, 1271, - -32766, 55, 56, 850, 57,-32766, 1106,-32766,-32766, 1048, - 150, 292, 1128, 1129, 1130, 1127, 1126, 1125, 1131, 250, - 974, 975, 1051, 1357, 308, 976, -563, -601, 1353, -601, - 1356, 1051, -368, 1309, -368, 1074, -565, -565, 491, 310, - 58, 59, 622, 319, 935, 60, 958, 61, 244, 245, - 62, 63, 64, 65, 66, 67, 68, 69,-32766, 28, - 265, 70, 451, 523, 286,-32766,-32766, 1303, 1304, 524, - 1382, 850, 48, 1383, 726, 1301, 42, 19, 525, 935, - 526, 339, 527, 75, 528, 935, 361, 529, 530, 322, - -563, -563, 44, 45, 452, 384, 383,-32766, 46, 531, - 1038, 1037, 1036, 1039, 373, 338, -563, 841, 340, 727, - 398, 1261, 7, 533, 534, 535, 1268, -561, -569, 1051, - 760, 759, 323,-32766, -560, 537, 538, 925, 1289, 1290, - 1291, 1292, 1294, 1286, 1287, 296, 298, 299, 877, 958, - 878, 1293, 1288, 291,-32766, 1270, 1269, 1271, 297, 375, - 1048, 71, 1266, 28, 266, 317, 318, 322, 381, -153, - -153, -153, 925, 935, 396, 850, 666, 20, 925, 1301, - 685, 686, 1051, 1050, -153, 447, -153, 448, -153, 366, - -153, -561, -561, 148, 414, 152, 475, 476, -560, -560, - 382, 140, 1270, 1269, 1271, 322, 282, -561, 385, 386, - 449, 974, 975, 937, -560, 1261, 532, 721, 450, -568, - 856, 911, 970, -110, -110, -110, -567, 390, 391, 537, - 538, 153, 1289, 1290, 1291, 1292, 1294, 1286, 1287, 657, - 658, 760, 759, 154, 286, 1293, 1288, 156, 937, 33, - -78, -87, 721, -559, 937, 73, 925, 49, 721, -153, - 318, 322, 32, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, -58, -57,-32766, 124, - -4, 935, 292, 125, 1268, 128, 129, 142, 760, 759, - 157,-32766,-32766,-32766, 699,-32766, -84,-32766, 159,-32766, - 160, 161,-32766, -78, 935, 1177, 1179,-32766,-32766,-32766, - -73, 935, -72,-32766,-32766, 287, -559, -559, -559,-32766, - 427, 300, 301, -71, -70,-32766, -69, -68,-32766, -67, - 700, 1268, 937, -559, 728, -66, 721, 380,-32766,-32766, - -32766, 731,-32766, 935,-32766, -65,-32766, -46, -18,-32766, - 146, 701, 702, 272,-32766,-32766,-32766, 283, 737, 74, - -32766,-32766, 740, 934, 925, 145,-32766, 427,-32766, 273, - 1270, 1269, 1271, 738, -302,-32766, 282, 288, -298, 280, - -559, -559, 281, 28, 265, 284, 382, 925, 443, 285, - 1051, 328, 293, 295, 925, 850, -559, 974, 975, 1301, - 294, 695, 532, 952, 110, 841, 144, 536, 970, -110, - -110, -110, 850, 710, 291, 712, 28, 266, 571, 1135, - 673, 1384, 688, 305, 655, 970, 925, 971, 850, 577, - -32766, 10, 1301, 302, 309, 1261, 1308, 672, 667, 303, - 937, 1310,-32766, 954, 721, -4, 23, 849, 472, 501, - 538, 1298, 1289, 1290, 1291, 1292, 1294, 1286, 1287, 689, - -50, 620, -595, 991, 0, 1293, 1288, 721, 1261, 861, - 937, -523, 0, 0, 721, 73, 1325, 297, 0, 0, - 318, 322, 0, 538, 0, 1289, 1290, 1291, 1292, 1294, - 1286, 1287, 130, 0, 0, 0, 0, 0, 1293, 1288, - 0, 0, 937,-32766, 0, 0, 721, -513, 73, 1268, - 8, 27, 379, 318, 322, -594,-32766,-32766,-32766, 1342, - -32766, 0,-32766, 0,-32766, 1375, 40,-32766, 41, 746, - 747, 869,-32766,-32766,-32766,-32766, 916, 1015,-32766,-32766, - 992, 1268, 999, 935,-32766, 427, 989, 1000,-32766,-32766, - -32766, 914,-32766,-32766,-32766, 987,-32766, 1109, 1112,-32766, - 1113, 1110, 935, 1146,-32766,-32766,-32766,-32766, 1111, 1117, - -32766,-32766, 660, 1268, -593, -569,-32766, 427, -568, -567, - -32766,-32766,-32766, -566,-32766,-32766,-32766, -507,-32766, 1, - 29,-32766, 30, 39, 43, 496,-32766,-32766,-32766,-32766, - 47, 72,-32766,-32766, 76, 1268, 584, 77,-32766, 427, - 78, 79,-32766,-32766,-32766, 80,-32766,-32766,-32766, 81, - -32766, 141, 151,-32766, 155, 242, 925, 324,-32766,-32766, - -32766, 361, 362, 1275,-32766,-32766, 363, 364, 365, 366, - -32766, 427, -250, -250, -250, 925, 367, 368, 382,-32766, - 1275, 369, 370, 371, 374, 1302, 444, 565, 372, 974, - 975, -249, -249, -249, 532, -275, -273, 382, -272, 911, - 970, -110, -110, -110, 12, 13, 14, 15, 974, 975, - -16, 17, 355, 532, 413, 492, 493, 500, 911, 970, - -110, -110, -110, 503, 504, 505, 506, 510,-32766, 511, - 512, 519, 937, 582, 1268, 34, 721, -250, 705, 1279, - 1217,-32766,-32766,-32766, 850,-32766, 1299,-32766, 1077,-32766, - 1076, 937,-32766, 1057, 743, 721, -249,-32766,-32766,-32766, - 1256, 850, 1053,-32766,-32766, -277, -102, 11, 16,-32766, - 427, 21, 313, 412, 613, 617, 646, 711,-32766, -110, - -110, 1221, 1274, 1218, -110, 1354, 912, 316, 376, 722, - -110, 725, 729, 730, 732, 733, -110, -110, 734,-32766, - 735, -110, 739, 751, 724, 752, 0, -110, 1379, 1381, - 872, 871, 880, 964, 1007, 879,-32766, 1380, 963, 322, - 961, 297, 962, 965, 75, 1249, 945, 0, 955, 943, - 322, 1145, 1141, 1098, 997, 998, 644, 1378, 297, 1336, - 1351, 75, 1234, 0, 0, 0, 0, 322 + -32767,-32766,-32766,-32766, 24, 767,-32766,-32766,-32766, 1126, + 1127, 1128, 1125, 1124, 1123, 1129, -328, 1102, 841, 262, + 132, 389, 771, 772, 773, 774, 1118,-32766, 430,-32766, + -32766,-32766,-32766,-32766, 157, 828, 775, 776, 777, 778, + 779, 780, 781, 782, 783, 784, 804, 570, 805, 806, + 807, 808, 796, 797, 343, 344, 799, 800, 785, 786, + 787, 789, 790, 791, 359, 831, 832, 833, 834, 835, + 571, 792, 793, 572, 573, -194, 816, 814, 815, 827, + 811, 812,-32766, 1040, 574, 575, 810, 576, 577, 578, + 579, -193, 580, 581, 1004, 843, 465, 466, 467, 813, + 582, 583, 721, 133, 1049, 126, 127, 128, 569, 129, + 130, 1073, 764, 765, 766, 131, 38, -110, 848, 81, + -85, 1368, -110, 321, -110,-32766,-32766,-32766, 290, 303, + 758, 757, -110, -110, -110, -110, -110, -110, -110, -110, + 758, 757,-32766,-32766,-32766, 734,-32766, 849,-32766,-32766, + -32766,-32766,-32766,-32766,-32766, 104, 105, 106, 107, 108, + 767, 272, 236,-32766, 2,-32766,-32766,-32766,-32766, 102, + 103, -328, 1293, 109, 262, 132, 389, 771, 772, 773, + 774, -342, 749, 430, 36, 246, -85, 875, 844, 876, + 828, 775, 776, 777, 778, 779, 780, 781, 782, 783, + 784, 804, 570, 805, 806, 807, 808, 796, 797, 343, + 344, 799, 800, 785, 786, 787, 789, 790, 791, 359, + 831, 832, 833, 834, 835, 571, 792, 793, 572, 573, + -194, 816, 814, 815, 827, 811, 812, 847, -560, 574, + 575, 810, 576, 577, 578, 579, -193, 580, 581,-32766, + 82, 83, 84, 848, 813, 582, 583, 161, 146, 788, + 759, 760, 761, 762, 763, 845, 764, 765, 766, 801, + 802, 37, 26, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 1046, 272,-32766, + -32766,-32766, -560, -560, 615, 386, 387,-32766,-32766,-32766, + 109, -272, 125, 35, 767, 429, 972, 973, -560, 1049, + -32766, 974,-32766,-32766,-32766, 489, 134, 968, 768, 769, + 770, 771, 772, 773, 774, 138, 1103, 837, 143, 321, + 747, 430, 1273, 281, 828, 775, 776, 777, 778, 779, + 780, 781, 782, 783, 784, 804, 826, 805, 806, 807, + 808, 796, 797, 798, 825, 799, 800, 785, 786, 787, + 789, 790, 791, 830, 831, 832, 833, 834, 835, 836, + 792, 793, 794, 795, 148, 816, 814, 815, 827, 811, + 812, 565, -563, 803, 809, 810, 817, 818, 820, 819, + 235, 821, 822, 1142,-32766,-32766,-32766, 739, 813, 824, + 823, 49, 50, 51, 521, 52, 53, 1268, 1267, 1269, + -32766, 54, 55, 848, 56,-32766, 1104,-32766,-32766, 1046, + 149, 291, 1126, 1127, 1128, 1125, 1124, 1123, 1129, 249, + 972, 973, 1049, 1353, 307, 974, -561, -599, 1349, -599, + 1352, 1049, -368, 1305, -368, 1072, -563, -563, 490, 309, + 57, 58, 621, 318, 933, 59, 956, 60, 243, 244, + 61, 62, 63, 64, 65, 66, 67, 68,-32766, 28, + 264, 69, 445, 522, 285,-32766,-32766, 1299, 1300, 523, + 1378, 848, 47, 1379, 724, 1297, 42, 19, 524, 933, + 525, 338, 526, 74, 527, 933, 360, 528, 529, 321, + -561, -561, 44, 45, 451, 383, 382,-32766, 46, 530, + 1036, 1035, 1034, 1037, 372, 337, -561, 839, 339, 725, + 398, 1259, 7, 532, 533, 534, 1266, -559, -567, 1049, + 758, 757, 322,-32766, -558, 536, 537, 923, 1285, 1286, + 1287, 1288, 1290, 1282, 1283, 295, 297, 298, 875, 956, + 876, 1289, 1284, 290,-32766, 1268, 1267, 1269, 296, 374, + 1046, 70, 1264, 28, 265, 316, 317, 321, 380, -153, + -153, -153, 923, 933, 396, 848, 664, 20, 923, 1297, + 683, 684, 1049, 1048, -153, 447, -153, 448, -153, 365, + -153, -559, -559, 147, 413, 151, 475, 476, -558, -558, + 381, 139, 1268, 1267, 1269, 321, 281, -559, 384, 385, + 449, 972, 973, 935, -558, 1259, 531, 719, 450, -566, + 854, 909, 968, -110, -110, -110, -565, 390, 391, 536, + 537, 152, 1285, 1286, 1287, 1288, 1290, 1282, 1283, 655, + 656, 758, 757, 153, 285, 1289, 1284, 155, 935, 33, + -78, -87, 719, -557, 935, 72, 923, 48, 719, -153, + 317, 321, 32, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, -58, -57,-32766, 123, + -4, 933, 291, 124, 1266, 135, 136, 142, 758, 757, + 156,-32766,-32766,-32766, 697,-32766, -84,-32766, 158,-32766, + 159, 160,-32766, -78, 933, 1175, 1177,-32766,-32766,-32766, + -73, 933, -72,-32766,-32766, 286, -557, -557, -557,-32766, + 426, 299, 300, -71, -70,-32766, -69, -68,-32766, -67, + 698, 1266, 935, -557, 726, -66, 719, 379,-32766,-32766, + -32766, 729,-32766, 933,-32766, -65,-32766, -46, -18,-32766, + 140, 699, 700, 271,-32766,-32766,-32766, 282, 735, 73, + -32766,-32766, 738, 932, 923, 145,-32766, 426,-32766, 272, + 1268, 1267, 1269, 736, -302,-32766, 281, 287, -298, 279, + -557, -557, 280, 28, 264, 283, 381, 923, 442, 284, + 1049, 327, 292, 294, 923, 848, -557, 972, 973, 1297, + 293, 693, 531, 950, 109, 839, 144, 535, 968, -110, + -110, -110, 848, 708, 290, 710, 28, 265, 586, 1133, + 671, 1380, 686, 304, 653, 968, 923, 969, 848, 592, + -32766, 10, 1297, 301, 308, 1259, 1304, 670, 665, 302, + 935, 1306,-32766, 952, 719, -4, 23, 847, 472, 500, + 537, 1294, 1285, 1286, 1287, 1288, 1290, 1282, 1283, 687, + -50, 619, -593, 989, 0, 1289, 1284, 719, 1259, 859, + 935, -523, 0, 0, 719, 72, 1321, 296, 0, 0, + 317, 321, 0, 537, 0, 1285, 1286, 1287, 1288, 1290, + 1282, 1283, 137, 0, 0, 0, 0, 0, 1289, 1284, + 0, 0, 935,-32766, 0, 0, 719, -513, 72, 1266, + 8, 27, 378, 317, 321, -592,-32766,-32766,-32766, 1338, + -32766, 0,-32766, 0,-32766, 1371, 40,-32766, 41, 744, + 745, 867,-32766,-32766,-32766,-32766, 914, 1013,-32766,-32766, + 990, 1266, 997, 933,-32766, 426, 987, 998,-32766,-32766, + -32766, 912,-32766,-32766,-32766, 985,-32766, 1107, 1110,-32766, + 1111, 1108, 933, 1144,-32766,-32766,-32766,-32766, 1109, 1115, + -32766,-32766, 658, 1266, -591, -567,-32766, 426, -566, -565, + -32766,-32766,-32766, -564,-32766,-32766,-32766, -507,-32766, 1, + 29,-32766, 30, 39, 43, 495,-32766,-32766,-32766,-32766, + 71, 75,-32766,-32766, 76, 1266, 599, 77,-32766, 426, + 78, 79,-32766,-32766,-32766, 80,-32766,-32766,-32766, 141, + -32766, 150, 154,-32766, 241, 323, 923, 360,-32766,-32766, + -32766, 361, 362, 1273,-32766,-32766, 363, 364, 365, 366, + -32766, 426, -250, -250, -250, 923, 367, 368, 381,-32766, + 1273, 369, 370, 373, 443, 1298, 564, 371, 0, 972, + 973, -249, -249, -249, 531, -275, -273, 381, -272, 909, + 968, -110, -110, -110, 12, 13, 14, 15, 972, 973, + -16, 17, 354, 531, 412, 491, 492, 499, 909, 968, + -110, -110, -110, 502, 503, 504, 505, 509,-32766, 510, + 511, 518, 935, 597, 1266, 34, 719, -250, 703, 1075, + 1215,-32766,-32766,-32766, 848,-32766, 1295,-32766, 1074,-32766, + 1055, 935,-32766, 1254, 741, 719, -249,-32766,-32766,-32766, + 1051, 848, -277,-32766,-32766, -102, 11, 16, 21,-32766, + 426, 312, 411, 611, 616, 644, 709, 1219,-32766, -110, + -110, 1272, 1216, 1350, -110, 315, 375, 720, 723, 727, + -110, 728, 730, 731, 732, 733, -110, -110, 737,-32766, + 749, -110, 722, 750, 0, 910, 1375, -110, 1377, 870, + 869, 878, 962, 1005, 877, 1376,-32766, 961, 959, 321, + 960, 296, 963, 1247, 74, 943, 953, 0, 941, 1143, + 321, 1139, 1096, 995, 996, 642, 1374, 1332, 296, 1347, + 0, 74, 1232, 0, 0, 0, 0, 321 ); protected array $actionCheck = array( @@ -630,7 +630,7 @@ class Php8 extends \PhpParser\ParserAbstract 95, 162, 162, 98, 162, 162, 84, 162, 103, 104, 105, 162, 162, 1, 109, 110, 162, 162, 162, 162, 115, 116, 100, 101, 102, 84, 162, 162, 106, 124, - 1, 162, 162, 162, 162, 167, 162, 162, 162, 117, + 1, 162, 162, 162, 162, 167, 162, 162, -1, 117, 118, 100, 101, 102, 122, 163, 163, 106, 163, 127, 128, 129, 130, 131, 163, 163, 163, 163, 117, 118, 31, 163, 163, 122, 163, 163, 163, 163, 127, 128, @@ -640,13 +640,13 @@ class Php8 extends \PhpParser\ParserAbstract 163, 160, 98, 163, 165, 164, 165, 103, 104, 105, 163, 82, 163, 109, 110, 163, 163, 163, 163, 115, 116, 163, 163, 163, 163, 163, 163, 163, 124, 117, - 118, 163, 163, 163, 122, 163, 165, 164, 164, 164, + 118, 163, 163, 163, 122, 164, 164, 164, 164, 164, 128, 164, 164, 164, 164, 164, 117, 118, 164, 137, - 164, 122, 164, 164, 164, 164, -1, 128, 165, 165, + 164, 122, 164, 164, -1, 165, 165, 128, 165, 165, 165, 165, 165, 165, 165, 165, 137, 165, 165, 168, 165, 159, 165, 165, 162, 165, 165, -1, 165, 165, 168, 165, 165, 165, 165, 165, 165, 165, 159, 165, - 165, 162, 166, -1, -1, -1, -1, 168 + -1, 162, 166, -1, -1, -1, -1, 168 ); protected array $actionBase = array( @@ -666,69 +666,68 @@ class Php8 extends \PhpParser\ParserAbstract 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 37, -16, 353, 1069, 695, 1039, 1048, - 1041, 1049, 1035, 1034, 1040, 1042, 1050, 1102, 1104, 794, - 1101, 1105, 1043, 871, 1038, 1044, 863, 291, 291, 291, + 1084, 1084, 37, -16, 353, 1066, 695, 1038, 1044, 1040, + 1048, 1034, 1033, 1039, 1041, 1049, 1101, 1102, 794, 1100, + 1104, 1042, 871, 1035, 1043, 863, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 290, 348, 10, 42, 42, 42, 42, + 291, 291, 290, 348, 10, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 553, 553, 3, 3, - 3, 445, 806, 773, 806, 806, 806, 806, 806, 806, - 806, 806, 340, 183, 47, 706, 166, 166, 7, 7, - 7, 7, 7, 1109, 66, 1092, 1092, -20, -20, -20, - -20, 451, 504, 391, -47, 143, 396, 170, 712, 249, - 231, 231, 363, 363, 16, 16, 363, 363, 363, 154, - 154, 354, 354, 354, 354, 131, 356, 765, 497, 497, - 497, 497, 765, 765, 765, 765, 754, 948, 765, 765, - 765, 426, 517, 524, 484, 484, 502, 86, 86, 502, - 757, 86, 5, 460, 477, 759, -85, 336, 477, 956, - 218, 643, 643, 647, 643, 643, 643, 751, 562, 751, - 1033, 394, 805, 805, 487, 776, 739, 869, 1070, 1052, - 780, 1099, 819, 1100, 1071, 293, 17, 372, 472, 522, - 732, 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032, 1032, - 1032, 1032, 1032, 1081, 143, 1033, 158, 1097, 1098, 1081, - 1081, 1081, 143, 143, 143, 143, 143, 143, 143, 143, + 42, 42, 42, 42, 42, 553, 553, 3, 3, 3, + 445, 806, 773, 806, 806, 806, 806, 806, 806, 806, + 806, 340, 183, 47, 706, 166, 166, 7, 7, 7, + 7, 7, 1109, 66, 1092, 1092, -20, -20, -20, -20, + 451, 504, 391, -47, 143, 396, 170, 712, 249, 231, + 231, 363, 363, 16, 16, 363, 363, 363, 154, 154, + 354, 354, 354, 354, 131, 356, 765, 497, 497, 497, + 497, 765, 765, 765, 765, 754, 948, 765, 765, 765, + 426, 517, 524, 484, 484, 502, 86, 86, 502, 757, + 86, 5, 460, 477, 759, -85, 336, 477, 955, 218, + 643, 643, 647, 643, 643, 643, 751, 562, 751, 1032, + 394, 805, 805, 776, 739, 487, 869, 1068, 1050, 780, + 1098, 819, 1099, 1069, 293, 17, 372, 472, 522, 732, + 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, + 1029, 1029, 1081, 143, 1032, 158, 1096, 1097, 1081, 1081, + 1081, 143, 143, 143, 143, 143, 143, 143, 143, 777, 143, 143, 588, 158, 561, 565, 158, 816, 143, 37, 817, 37, 37, 37, 37, 37, 37, 37, 37, 37, - 37, 777, 344, 37, -16, 31, 31, 226, 132, 31, - 31, 31, 68, 31, 37, 37, 37, 562, 772, 735, - 581, 767, 133, 772, 772, 772, 139, 58, 198, 117, - 799, 803, 474, 785, 785, 797, 887, 785, 790, 785, - 797, 898, 785, 785, 887, 887, 778, 887, 368, 637, - 543, 620, 639, 887, 486, 785, 785, 785, 785, 762, - 887, 662, 785, 481, 380, 785, 785, 762, 761, 786, - 206, 766, 887, 887, 887, 762, 611, 766, 766, 766, - 829, 830, 771, 782, 505, 501, 672, 355, 825, 782, - 782, 785, 626, 771, 782, 771, 782, 748, 782, 782, - 782, 771, 782, 790, 570, 782, 734, 670, 314, 782, - 785, 34, 899, 902, 680, 905, 891, 908, 954, 909, - 913, 1055, 885, 923, 892, 917, 955, 890, 888, 792, - 723, 727, 820, 781, 881, 795, 795, 795, 873, 876, - 795, 795, 795, 795, 795, 795, 795, 795, 723, 750, - 822, 789, 930, 729, 730, 1000, 749, 1051, 1106, 929, - 1006, 919, 826, 731, 978, 934, 1019, 1053, 935, 936, - 981, 1007, 831, 1013, 1073, 796, 1074, 1075, 768, 944, - 1057, 795, 899, 913, 725, 892, 917, 890, 888, 774, - 764, 756, 758, 755, 753, 741, 752, 779, 1015, 872, - 760, 775, 937, 877, 723, 818, 971, 1001, 982, 983, - 1054, 811, 798, 824, 1076, 945, 949, 950, 1058, 1017, - 1059, 828, 972, 962, 984, 812, 1077, 990, 991, 992, - 993, 1060, 1078, 1061, 813, 1064, 836, 808, 963, 801, - 1079, 420, 810, 814, 823, 952, 466, 925, 1066, 1080, - 1082, 994, 996, 997, 1083, 1085, 920, 837, 973, 788, - 974, 965, 840, 842, 641, 815, 1020, 804, 807, 800, - 677, 689, 1087, 1088, 1090, 922, 787, 784, 846, 847, - 1027, 738, 1029, 1091, 693, 851, 1093, 1005, 742, 744, - 694, 721, 720, 745, 783, 1068, 821, 769, 809, 951, - 744, 791, 855, 1094, 857, 858, 860, 998, 861, 979, - 1096, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 37, 344, 37, -16, 31, 31, 226, 132, 31, 31, + 31, 68, 31, 37, 37, 37, 562, 772, 735, 581, + 139, 767, 133, 772, 772, 772, 58, 198, 117, 799, + 803, 474, 785, 785, 797, 887, 887, 785, 790, 785, + 797, 785, 785, 887, 887, 778, 887, 368, 637, 543, + 620, 639, 887, 486, 785, 785, 785, 785, 762, 887, + 206, 662, 785, 481, 380, 785, 785, 762, 761, 786, + 766, 887, 887, 887, 762, 611, 766, 766, 766, 829, + 830, 771, 782, 505, 501, 672, 355, 825, 782, 782, + 785, 626, 771, 782, 771, 782, 748, 782, 782, 782, + 771, 782, 790, 570, 782, 734, 670, 314, 782, 785, + 34, 898, 899, 680, 902, 891, 905, 952, 908, 909, + 1053, 885, 922, 892, 913, 954, 890, 888, 792, 723, + 727, 820, 781, 881, 795, 795, 795, 873, 876, 795, + 795, 795, 795, 795, 795, 795, 795, 723, 750, 822, + 789, 929, 729, 730, 1000, 749, 1070, 1106, 925, 898, + 909, 725, 892, 913, 890, 888, 774, 764, 756, 758, + 755, 753, 741, 752, 779, 1006, 917, 826, 731, 978, + 930, 1019, 1051, 934, 935, 981, 1007, 831, 1013, 1071, + 796, 1073, 1074, 768, 937, 1054, 795, 872, 760, 775, + 936, 877, 723, 818, 1015, 971, 1001, 982, 983, 1052, + 811, 798, 824, 1075, 944, 945, 949, 1055, 1057, 828, + 972, 962, 984, 812, 1076, 990, 991, 992, 993, 1058, + 1077, 1059, 813, 1060, 836, 808, 963, 801, 1078, 420, + 810, 814, 823, 951, 466, 923, 1061, 1079, 1080, 994, + 996, 997, 1082, 1083, 919, 837, 973, 788, 974, 965, + 840, 842, 641, 815, 1017, 804, 807, 800, 677, 689, + 1085, 1087, 1088, 920, 787, 784, 846, 847, 1020, 738, + 1027, 1090, 693, 851, 1091, 1005, 742, 744, 694, 721, + 720, 745, 783, 1064, 821, 769, 809, 950, 744, 791, + 855, 1093, 857, 858, 860, 998, 861, 979, 1094, 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, 459, 459, 459, 459, 459, - 459, 307, 307, 307, 307, 459, 459, 459, 459, 459, - 459, 459, 307, 459, 459, 459, 307, 307, 0, 0, - 307, 0, 459, 459, 459, 459, 459, 459, 459, 459, + 0, 0, 0, 459, 459, 459, 459, 459, 459, 307, + 307, 307, 307, 459, 459, 459, 459, 459, 459, 459, + 307, 459, 459, 459, 307, 307, 0, 0, 307, 0, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, @@ -741,187 +740,188 @@ class Php8 extends \PhpParser\ParserAbstract 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 291, 291, 291, 291, 291, 291, 291, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 506, 506, 291, 291, 291, 291, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 506, 291, 291, 291, 0, - 291, 291, 291, 291, 291, 291, 291, 506, 778, 506, - 506, 154, 154, 154, 154, 506, 506, 506, 366, 366, - 366, 154, 506, 778, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 0, 0, 506, 506, 506, 506, 158, - 86, 506, 790, 790, 790, 790, 506, 506, 506, 506, - 86, 86, 506, 506, 506, 0, 0, 0, 154, 154, - 158, 0, 0, 158, 373, 0, 790, 790, 506, 373, - 778, 492, 506, 293, 0, 0, 0, 0, 0, 0, - 0, 158, 790, 158, 143, 785, 86, 86, 785, 143, - 143, 31, 37, 492, 552, 552, 552, 552, 37, 0, - 0, 0, 0, 0, 562, 778, 778, 778, 778, 778, - 778, 778, 778, 778, 778, 778, 778, 790, 0, 778, - 0, 778, 778, 790, 790, 790, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 790, 0, 0, 887, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 898, 0, 0, 0, 0, - 0, 0, 790, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 795, 811, 0, 811, 0, 795, 795, 795, - 0, 0, 0, 0, 815, 738 + 0, 0, 0, 0, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 291, 291, 291, 291, 291, 506, 506, 291, + 291, 291, 291, 506, 506, 506, 506, 506, 506, 506, + 506, 506, 506, 291, 291, 291, 0, 291, 291, 291, + 291, 291, 291, 291, 506, 778, 506, 506, 154, 154, + 154, 154, 506, 506, 506, 366, 366, 366, 154, 506, + 778, 506, 506, 506, 506, 506, 506, 506, 506, 506, + 0, 0, 506, 506, 506, 506, 158, 86, 506, 790, + 790, 790, 790, 506, 506, 506, 506, 86, 86, 506, + 506, 506, 0, 0, 0, 154, 154, 158, 0, 0, + 158, 373, 0, 790, 790, 506, 373, 778, 492, 506, + 293, 0, 0, 0, 0, 0, 0, 0, 158, 790, + 158, 143, 785, 86, 86, 143, 143, 785, 31, 37, + 492, 552, 552, 552, 552, 37, 0, 0, 0, 0, + 0, 562, 778, 778, 778, 778, 778, 778, 778, 778, + 778, 778, 778, 778, 790, 0, 778, 0, 778, 778, + 790, 790, 790, 0, 0, 0, 0, 0, 0, 0, + 0, 887, 0, 0, 0, 0, 0, 0, 0, 790, + 0, 0, 887, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 790, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 795, + 811, 0, 0, 811, 0, 795, 795, 795, 0, 0, + 0, 815, 738 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 613, 613, - 613, 613,32767,32767, 254, 102,32767,32767, 482, 399, - 399, 399,32767,32767, 557, 557, 557, 557, 557, 557, - 32767,32767,32767,32767,32767,32767, 482,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 611, 611, + 611, 611,32767,32767, 254, 102,32767,32767, 482, 399, + 399, 399,32767,32767, 555, 555, 555, 555, 555,32767, + 32767,32767,32767,32767,32767, 482,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, 100,32767,32767, - 32767, 36, 7, 8, 10, 11, 49, 17, 324,32767, + 32767,32767,32767,32767,32767,32767, 36, 7, 8, 10, + 11, 49, 17, 324, 100,32767,32767,32767,32767,32767, 32767,32767,32767, 102,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 386, 606,32767,32767, + 32767,32767,32767,32767,32767, 386, 604,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 486, 465, 466, - 468, 469, 398, 558, 612, 327, 609, 397, 145, 339, - 329, 242, 330, 258, 487, 259, 488, 491, 492, 215, - 383, 149, 150, 429, 483, 431, 481, 485, 430, 404, - 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, - 420, 421, 422, 402, 403, 484,32767,32767, 462, 461, - 460, 427,32767,32767,32767,32767,32767,32767,32767,32767, - 102,32767, 428, 432, 435, 401, 433, 434, 451, 452, - 449, 450, 453,32767,32767,32767,32767, 454, 455, 456, - 457, 316,32767,32767, 367, 195, 365, 436, 316, 111, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 442, - 443,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, - 100, 499, 551, 459, 437, 438,32767, 526,32767, 102, - 32767, 528,32767,32767,32767,32767,32767,32767,32767,32767, - 553, 424, 426, 519, 607, 405, 610,32767, 512, 100, - 195,32767,32767, 527,32767, 195, 195,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 552,32767, 620, - 512, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110,32767, 195, 110,32767, 110, 110,32767, - 32767, 100, 195, 195, 195, 195, 195, 195, 195, 195, - 195, 195, 190,32767, 268, 270, 102, 575, 195,32767, - 531,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 524,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 386,32767,32767,32767,32767, 512, 447, 138, - 32767, 138, 559, 439, 440, 441, 514, 559, 559, 559, - 312, 289,32767,32767,32767,32767, 529, 100, 100, 100, - 100, 524,32767,32767,32767,32767, 111, 498, 99, 99, - 99, 99, 99, 103, 101,32767,32767,32767,32767, 223, - 32767, 99,32767, 101, 101,32767,32767, 223, 225, 212, - 101, 227,32767, 579, 580, 223, 101, 227, 227, 227, - 247, 247, 501, 318, 101, 99, 101, 101, 197, 318, - 318,32767, 101, 501, 318, 501, 318, 199, 318, 318, - 318, 501, 318,32767, 101, 318, 214, 99, 99, 318, - 32767,32767,32767,32767, 514,32767,32767,32767,32767,32767, - 32767,32767, 222,32767,32767,32767,32767,32767,32767,32767, - 32767, 546,32767, 564, 577, 445, 446, 448, 563, 561, - 470, 471, 472, 473, 474, 475, 476, 478, 608,32767, - 518,32767,32767,32767, 338,32767, 618,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 486, 465, 466, 468, + 469, 398, 556, 610, 327, 607, 329, 397, 145, 339, + 330, 242, 258, 487, 259, 488, 491, 492, 215, 383, + 149, 150, 429, 483, 431, 481, 485, 430, 404, 410, + 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, + 421, 422, 402, 403, 484,32767,32767, 462, 461, 460, + 427,32767,32767,32767,32767,32767,32767,32767,32767, 102, + 32767, 428, 432, 435, 401, 433, 434, 451, 452, 449, + 450, 453,32767,32767,32767,32767, 454, 455, 456, 457, + 316,32767,32767, 367, 195, 365, 436, 316, 111,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 442, 443, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 619,32767, 559,32767,32767,32767, - 32767, 444, 9, 74, 507, 42, 43, 51, 57, 535, - 536, 537, 538, 532, 533, 539, 534,32767,32767, 541, - 585,32767,32767, 560, 611,32767,32767,32767,32767,32767, - 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 546,32767, 136,32767,32767,32767,32767, - 32767,32767,32767,32767, 542,32767,32767,32767, 559,32767, - 32767,32767,32767, 314, 311,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 102,32767, 100, + 499, 549, 459, 437, 438,32767, 524,32767, 102,32767, + 526,32767,32767,32767,32767,32767,32767,32767,32767, 551, + 424, 426, 519, 605, 405, 608,32767, 512, 100, 195, + 32767,32767, 525, 195, 195,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 550,32767, 618, 512, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110,32767, 195, 110,32767, 110, 110,32767,32767, + 100, 195, 195, 195, 195, 195, 195, 195, 195, 527, + 195, 195, 190,32767, 268, 270, 102, 573, 195,32767, + 529,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 559,32767,32767,32767,32767,32767, 291,32767, 308, + 32767, 386,32767,32767,32767,32767, 512, 447, 138,32767, + 514, 138, 557, 439, 440, 441, 557, 557, 557, 312, + 289,32767,32767,32767,32767, 527, 527, 100, 100, 100, + 100,32767,32767,32767,32767, 111, 498, 99, 99, 99, + 99, 99, 103, 101,32767,32767,32767,32767, 223,32767, + 101, 99,32767, 101, 101,32767,32767, 223, 225, 212, + 227,32767, 577, 578, 223, 101, 227, 227, 227, 247, + 247, 501, 318, 101, 99, 101, 101, 197, 318, 318, + 32767, 101, 501, 318, 501, 318, 199, 318, 318, 318, + 501, 318,32767, 101, 318, 214, 99, 99, 318,32767, + 32767,32767,32767, 514,32767,32767,32767,32767,32767,32767, + 32767, 222,32767,32767,32767,32767,32767,32767,32767,32767, + 544,32767, 562, 575, 445, 446, 448, 561, 559, 470, + 471, 472, 473, 474, 475, 476, 478, 606,32767, 518, + 32767,32767,32767, 338,32767, 616,32767,32767,32767, 9, + 74, 507, 42, 43, 51, 57, 533, 534, 535, 536, + 530, 531, 537, 532,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 617, + 32767, 557,32767,32767,32767,32767, 444, 539, 583,32767, + 32767, 558, 609,32767,32767,32767,32767,32767,32767,32767, + 138,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 544,32767, 136,32767,32767,32767,32767,32767,32767, + 32767,32767, 540,32767,32767,32767, 557,32767,32767,32767, + 32767, 314, 311,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 557, + 32767,32767,32767,32767,32767, 291,32767, 308,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 382, 514, - 294, 296, 297,32767,32767,32767,32767, 361,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 152, 152, 3, 3, 341, 152, 152, 152, 341, - 341, 152, 341, 341, 341, 152, 152, 152, 152, 152, - 152, 152, 280, 185, 262, 265, 247, 247, 152, 353, - 152, 384, 384, 393 + 32767,32767,32767,32767,32767,32767, 382, 514, 294, 296, + 297,32767,32767,32767,32767, 361,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 152, + 152, 3, 3, 341, 152, 152, 152, 341, 341, 152, + 341, 341, 341, 152, 152, 152, 152, 152, 152, 152, + 280, 185, 262, 265, 247, 247, 152, 353, 152, 384, + 384, 393 ); protected array $goto = array( - 195, 195, 1049, 928, 706, 929, 1080, 438, 671, 279, - 279, 279, 279, 432, 335, 331, 332, 334, 586, 437, - 336, 439, 648, 908, 866, 908, 908, 167, 167, 167, - 167, 219, 196, 192, 192, 177, 179, 214, 192, 192, - 192, 192, 192, 193, 193, 193, 193, 193, 193, 187, - 188, 189, 190, 191, 216, 214, 217, 545, 546, 428, - 547, 550, 551, 552, 553, 554, 555, 556, 557, 1163, - 168, 169, 170, 194, 171, 172, 173, 165, 174, 175, - 176, 178, 213, 215, 218, 238, 241, 252, 253, 254, - 256, 257, 258, 259, 260, 261, 262, 267, 268, 269, - 270, 277, 289, 290, 314, 315, 433, 434, 435, 591, + 194, 194, 1047, 431, 704, 620, 1078, 437, 669, 278, + 278, 278, 278, 432, 334, 330, 331, 333, 601, 436, + 335, 438, 646, 906, 864, 906, 906, 166, 166, 166, + 166, 218, 195, 191, 191, 176, 178, 213, 191, 191, + 191, 191, 191, 192, 192, 192, 192, 192, 186, 187, + 188, 189, 190, 215, 213, 216, 544, 545, 427, 546, + 549, 550, 551, 552, 553, 554, 555, 556, 1161, 167, + 168, 169, 193, 170, 171, 172, 164, 173, 174, 175, + 177, 212, 214, 217, 237, 240, 251, 252, 253, 255, + 256, 257, 258, 259, 260, 261, 266, 267, 268, 269, + 276, 288, 289, 313, 314, 433, 434, 435, 606, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, 234, 235, 197, 198, 199, 239, - 187, 188, 189, 190, 191, 216, 1163, 200, 180, 181, - 182, 201, 197, 183, 240, 202, 200, 164, 203, 204, - 184, 205, 206, 207, 185, 208, 209, 166, 210, 211, - 212, 186, 715, 870, 610, 1014, 848, 867, 986, 1097, - 744, 342, 576, 561, 1023, 1018, 745, 647, 649, 1055, - 1054, 669, 863, 868, 359, 693, 696, 1025, 704, 713, - 1021, 720, 343, 342, 359, 359, 1052, 1052, 691, 967, - 631, 668, 1044, 1060, 1061, 359, 359, 487, 848, 359, - 848, 1385, 990, 351, 875, 489, 924, 919, 920, 933, - 876, 921, 873, 922, 923, 874, 564, 426, 927, 863, - 359, 359, 403, 406, 570, 611, 615, 520, 842, 1103, - 1099, 1100, 619, 634, 637, 638, 639, 640, 661, 662, - 663, 717, 719, 356, 356, 356, 356, 508, 1267, 509, - 1267, 1267, 1123, 1148, 1124, 515, 1049, 1049, 1267, 456, - 456, 456, 456, 1049, 901, 1049, 1049, 1049, 1049, 1049, - 1049, 1049, 1049, 1049, 465, 1330, 1049, 1049, 1049, 1049, - 664, 665, 1267, 682, 683, 684, 583, 1267, 1267, 1267, - 1267, 349, 470, 1267, 1267, 1267, 422, 569, 562, 1212, - 248, 248, 558, 558, 558, 558, 431, 614, 621, 941, - 633, 633, 5, 942, 6, 446, 1300, 1300, 1300, 1300, - 1300, 1300, 1300, 1300, 1300, 1300, 564, 246, 246, 246, - 246, 243, 249, 1358, 341, 562, 569, 578, 579, 344, - 589, 612, 626, 627, 1011, 474, 474, 1243, 959, 863, - 25, 1244, 1247, 960, 474, 1248, 401, 456, 456, 456, - 456, 456, 456, 456, 456, 456, 456, 456, 456, 1368, - 1368, 456, 581, 456, 456, 670, 560, 1160, 560, 560, - 484, 1343, 1344, 1073, 1368, 445, 560, 1319, 1319, 703, - 692, 1260, 844, 1319, 1319, 1319, 1319, 1319, 1319, 1319, - 1319, 1319, 1319, 676, 703, 1371, 1371, 860, 703, 1341, - 463, 1341, 1341, 321, 307, 984, 984, 984, 984, 1341, - 337, 463, 978, 985, 888, 1316, 1316, 1350, 1350, 1350, - 1350, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, - 1316, 973, 549, 549, 1352, 1352, 1352, 1352, 549, 549, - 549, 549, 549, 549, 549, 549, 549, 549, 352, 353, - 982, 417, 714, 641, 643, 645, 548, 548, 1337, 410, - 957, 625, 548, 957, 548, 548, 548, 548, 548, 548, - 548, 548, 415, 416, 1262, 1058, 1059, 680, 885, 681, - 1143, 419, 420, 421, 1258, 694, 1086, 883, 423, 1033, - 946, 1150, 347, 320, 274, 320, 320, 629, 587, 624, - 1028, 1028, 748, 1030, 895, 1345, 1346, 882, 897, 1088, - 1090, 887, 1040, 674, 1009, 1339, 1339, 1088, 995, 881, - 1284, 378, 1134, 0, 0, 251, 251, 0, 1263, 1264, - 0, 1257, 609, 1116, 0, 0, 0, 858, 896, 884, - 1085, 1089, 718, 0, 0, 0, 0, 0, 516, 709, - 993, 1114, 0, 0, 0, 0, 1265, 1327, 1328, 0, - 0, 0, 563, 573, 0, 0, 563, 0, 573, 0, - 0, 404, 469, 0, 983, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 477, 590, 478, 479, 0, 0, - 0, 893, 440, 0, 1376, 1377, 1132, 900, 0, 440, - 0, 0, 0, 0, 0, 1056, 1056, 753, 753, 0, - 0, 0, 675, 1067, 1063, 1064, 0, 0, 0, 0, - 891, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 329 + 230, 231, 232, 233, 234, 186, 187, 188, 189, 190, + 215, 1161, 196, 197, 198, 199, 238, 179, 180, 200, + 181, 201, 197, 182, 239, 196, 163, 202, 203, 183, + 204, 205, 206, 184, 207, 208, 165, 209, 210, 211, + 185, 713, 868, 608, 341, 591, 469, 865, 1095, 743, + 645, 647, 866, 1210, 667, 350, 629, 666, 691, 694, + 1023, 702, 711, 1019, 718, 342, 341, 988, 358, 557, + 557, 557, 557, 926, 612, 927, 1364, 1364, 358, 358, + 1050, 1050, 689, 965, 425, 486, 1042, 1058, 1059, 358, + 358, 1364, 488, 358, 873, 1381, 922, 917, 918, 931, + 874, 919, 871, 920, 921, 872, 861, 925, 474, 474, + 563, 840, 1367, 1367, 358, 358, 519, 474, 1101, 1097, + 1098, 618, 632, 635, 636, 637, 638, 659, 660, 661, + 715, 717, 355, 355, 355, 355, 5, 1265, 6, 1265, + 1265, 403, 406, 609, 613, 1047, 1047, 1265, 455, 455, + 455, 455, 1047, 861, 1047, 1047, 1047, 1047, 1047, 1047, + 1047, 1047, 1047, 899, 846, 1047, 1047, 1047, 1047, 598, + 1326, 1265, 701, 1053, 1052, 842, 1265, 1265, 1265, 1265, + 1056, 1057, 1265, 1265, 1265, 568, 561, 701, 1241, 957, + 421, 701, 1242, 1245, 958, 1354, 1246, 559, 939, 559, + 559, 881, 940, 631, 631, 348, 846, 559, 846, 1296, + 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 893, + 464, 563, 880, 340, 561, 568, 593, 594, 345, 604, + 610, 462, 625, 626, 320, 306, 982, 982, 982, 982, + 25, 1009, 462, 976, 983, 401, 455, 455, 455, 455, + 455, 455, 455, 455, 455, 455, 455, 455, 1315, 1315, + 455, 446, 455, 455, 1315, 1315, 1315, 1315, 1315, 1315, + 1315, 1315, 1315, 1315, 247, 247, 1026, 1026, 602, 623, + 1312, 1312, 596, 861, 1158, 1258, 1312, 1312, 1312, 1312, + 1312, 1312, 1312, 1312, 1312, 1312, 1071, 1337, 444, 1337, + 1337, 245, 245, 245, 245, 242, 248, 1337, 668, 351, + 352, 1341, 1342, 548, 548, 1346, 1346, 1346, 1346, 548, + 548, 548, 548, 548, 548, 548, 548, 548, 548, 674, + 547, 547, 1348, 1348, 1348, 1348, 547, 690, 547, 547, + 547, 547, 547, 547, 547, 547, 336, 1260, 662, 663, + 886, 680, 681, 682, 858, 971, 1333, 883, 955, 414, + 415, 1141, 410, 955, 678, 624, 679, 439, 418, 419, + 420, 1256, 692, 1031, 439, 422, 507, 1084, 508, 346, + 1054, 1054, 746, 1038, 514, 484, 1088, 673, 1065, 1061, + 1062, 319, 273, 319, 319, 614, 895, 993, 944, 1148, + 1261, 1262, 1132, 1248, 1121, 1146, 1122, 1086, 377, 856, + 1028, 0, 0, 1335, 1335, 1086, 1248, 0, 885, 0, + 672, 1007, 894, 882, 1083, 1087, 879, 0, 1263, 1323, + 1324, 607, 1114, 0, 0, 991, 0, 0, 1255, 0, + 0, 716, 483, 1339, 1340, 0, 1012, 515, 707, 984, + 1112, 742, 0, 0, 560, 1021, 1016, 0, 981, 0, + 562, 588, 980, 416, 712, 562, 0, 588, 0, 404, + 468, 639, 641, 643, 0, 0, 0, 0, 0, 0, + 1130, 898, 477, 605, 478, 479, 0, 0, 0, 0, + 891, 0, 0, 1372, 1373, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 751, 751, 0, 250, 250, + 0, 0, 0, 0, 0, 0, 0, 0, 889, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 328 ); protected array $gotoCheck = array( - 42, 42, 73, 65, 73, 65, 128, 66, 66, 23, + 42, 42, 73, 13, 73, 13, 128, 66, 66, 23, 23, 23, 23, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 25, 25, 25, 25, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -937,102 +937,102 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 9, 15, 131, 50, 12, 26, 50, 15, - 50, 175, 48, 50, 50, 50, 48, 48, 48, 119, - 119, 48, 22, 27, 14, 48, 48, 48, 48, 48, - 48, 48, 175, 175, 14, 14, 89, 89, 89, 89, - 56, 56, 89, 89, 89, 14, 14, 84, 12, 14, - 12, 14, 49, 97, 15, 84, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 14, 43, 15, 22, - 14, 14, 59, 59, 59, 59, 59, 76, 6, 15, - 15, 15, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 24, 24, 24, 24, 160, 73, 160, - 73, 73, 146, 146, 146, 160, 73, 73, 73, 23, - 23, 23, 23, 73, 45, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 83, 14, 73, 73, 73, 73, - 86, 86, 73, 86, 86, 86, 179, 73, 73, 73, - 73, 186, 156, 73, 73, 73, 14, 76, 76, 156, - 5, 5, 107, 107, 107, 107, 13, 107, 13, 73, - 108, 108, 46, 73, 46, 83, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 14, 5, 5, 5, - 5, 5, 5, 188, 76, 76, 76, 76, 76, 76, - 76, 76, 76, 76, 103, 154, 154, 79, 79, 22, - 76, 79, 79, 79, 154, 79, 62, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 189, - 189, 23, 104, 23, 23, 64, 19, 155, 19, 19, - 183, 183, 183, 115, 189, 113, 19, 177, 177, 7, - 117, 14, 7, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 121, 7, 189, 189, 18, 7, 131, - 19, 131, 131, 176, 176, 19, 19, 19, 19, 131, - 29, 19, 19, 19, 39, 178, 178, 9, 9, 9, - 9, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 92, 180, 180, 131, 131, 131, 131, 180, 180, - 180, 180, 180, 180, 180, 180, 180, 180, 97, 97, - 93, 93, 93, 85, 85, 85, 163, 163, 131, 28, - 9, 80, 163, 9, 163, 163, 163, 163, 163, 163, - 163, 163, 82, 82, 20, 120, 120, 82, 37, 82, - 153, 82, 82, 82, 167, 82, 130, 35, 82, 110, - 17, 17, 82, 24, 24, 24, 24, 17, 2, 2, - 107, 107, 99, 17, 35, 185, 185, 35, 41, 131, - 133, 17, 114, 17, 17, 131, 131, 131, 96, 17, - 20, 138, 149, -1, -1, 5, 5, -1, 20, 20, - -1, 17, 8, 8, -1, -1, -1, 20, 16, 16, - 16, 16, 8, -1, -1, -1, -1, -1, 8, 8, - 16, 8, -1, -1, -1, -1, 20, 20, 20, -1, - -1, -1, 9, 9, -1, -1, 9, -1, 9, -1, - -1, 9, 9, -1, 16, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 9, 9, 9, 9, -1, -1, - -1, 9, 118, -1, 9, 9, 16, 16, -1, 118, - -1, -1, -1, -1, -1, 118, 118, 24, 24, -1, - -1, -1, 118, 118, 118, 118, -1, -1, -1, -1, - 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 9 + 42, 9, 15, 131, 174, 48, 156, 26, 15, 48, + 48, 48, 27, 156, 48, 97, 56, 56, 48, 48, + 48, 48, 48, 48, 48, 174, 174, 49, 14, 107, + 107, 107, 107, 65, 107, 65, 188, 188, 14, 14, + 89, 89, 89, 89, 43, 84, 89, 89, 89, 14, + 14, 188, 84, 14, 15, 14, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 22, 15, 154, 154, + 14, 6, 188, 188, 14, 14, 76, 154, 15, 15, + 15, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 24, 24, 24, 24, 46, 73, 46, 73, + 73, 59, 59, 59, 59, 73, 73, 73, 23, 23, + 23, 23, 73, 22, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 45, 12, 73, 73, 73, 73, 178, + 14, 73, 7, 119, 119, 7, 73, 73, 73, 73, + 120, 120, 73, 73, 73, 76, 76, 7, 79, 79, + 14, 7, 79, 79, 79, 187, 79, 19, 73, 19, + 19, 35, 73, 108, 108, 185, 12, 19, 12, 108, + 108, 108, 108, 108, 108, 108, 108, 108, 108, 35, + 83, 14, 35, 76, 76, 76, 76, 76, 76, 76, + 76, 19, 76, 76, 175, 175, 19, 19, 19, 19, + 76, 103, 19, 19, 19, 62, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 176, 176, + 23, 83, 23, 23, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 5, 5, 107, 107, 2, 2, + 177, 177, 104, 22, 155, 14, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 115, 131, 113, 131, + 131, 5, 5, 5, 5, 5, 5, 131, 64, 97, + 97, 184, 184, 179, 179, 9, 9, 9, 9, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 121, + 162, 162, 131, 131, 131, 131, 162, 117, 162, 162, + 162, 162, 162, 162, 162, 162, 29, 20, 86, 86, + 39, 86, 86, 86, 18, 92, 131, 37, 9, 82, + 82, 153, 28, 9, 82, 80, 82, 118, 82, 82, + 82, 166, 82, 110, 118, 82, 160, 130, 160, 82, + 118, 118, 99, 114, 160, 157, 133, 118, 118, 118, + 118, 24, 24, 24, 24, 17, 41, 96, 17, 17, + 20, 20, 149, 20, 146, 146, 146, 131, 138, 20, + 17, -1, -1, 131, 131, 131, 20, -1, 17, -1, + 17, 17, 16, 16, 16, 16, 17, -1, 20, 20, + 20, 8, 8, -1, -1, 16, -1, -1, 17, -1, + -1, 8, 182, 182, 182, -1, 50, 8, 8, 50, + 8, 50, -1, -1, 50, 50, 50, -1, 16, -1, + 9, 9, 93, 93, 93, 9, -1, 9, -1, 9, + 9, 85, 85, 85, -1, -1, -1, -1, -1, -1, + 16, 16, 9, 9, 9, 9, -1, -1, -1, -1, + 9, -1, -1, 9, 9, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 24, 24, -1, 5, 5, + -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 9 ); protected array $gotoBase = array( - 0, 0, -205, 0, 0, 309, 215, 392, 544, 139, - 0, 0, -129, -21, -112, -185, 99, 37, 109, 123, - 94, 0, -97, 6, 250, 20, 163, 179, 142, 135, - 0, 0, 0, 0, 0, 131, 0, 159, 0, 115, - 0, 81, -1, 205, 0, 248, -426, 0, -550, 195, - 154, 0, 0, 0, 0, 0, 160, 0, 0, 187, - 0, 0, 324, 0, 148, -10, -229, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -38, 0, 0, -58, - 137, -120, -7, 5, -270, -14, -439, 0, 0, -84, - 0, 0, 126, 167, 0, 0, 89, -278, 0, 108, - 0, 0, 0, 319, 339, 0, 0, 284, 84, 0, - 134, 0, 0, 117, 110, 121, 0, 118, 341, -101, - 211, 122, 0, 0, 0, 0, 0, 0, 4, 0, - 125, 156, 0, 82, 0, 0, 0, 0, -211, 0, - 0, 0, 0, 0, 0, 0, -12, 0, 0, 92, - 0, 0, 0, 145, 321, 144, 36, 0, 0, 0, - -246, 0, 0, 240, 0, 0, 0, 130, 0, 0, - 0, 0, 0, 0, 0, -125, 106, 161, 199, 267, - 216, 0, 0, 91, 0, 146, 271, 0, 312, 73, - 0, 0 + 0, 0, -323, 0, 0, 393, 208, 285, 543, 138, + 0, 0, -10, -333, -107, -185, 84, 45, 167, 55, + 67, 0, -52, 6, 249, 20, 163, 168, 146, 172, + 0, 0, 0, 0, 0, -54, 0, 139, 0, 152, + 0, 69, -1, 182, 0, 257, -490, 0, -555, 170, + 555, 0, 0, 0, 0, 0, 136, 0, 0, 216, + 0, 0, 323, 0, 192, 180, -228, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -38, 0, 0, -106, + 140, -120, -19, 62, -272, 105, -259, 0, 0, -79, + 0, 0, 151, 280, 0, 0, 68, -315, 0, 89, + 0, 0, 0, 326, 359, 0, 0, 161, 88, 0, + 119, 0, 0, 141, 82, 145, 0, 176, 217, 14, + 17, 159, 0, 0, 0, 0, 0, 0, 4, 0, + 117, 155, 0, 58, 0, 0, 0, 0, -222, 0, + 0, 0, 0, 0, 0, 0, 251, 0, 0, 72, + 0, 0, 0, 127, 194, 162, -99, 59, 0, 0, + -6, 0, 215, 0, 0, 0, 118, 0, 0, 0, + 0, 0, 0, 0, -131, 38, 143, 165, 260, 198, + 0, 0, 264, 0, 53, 295, 0, 284, -109, 0, + 0 ); protected array $gotoDefault = array( - -32768, 521, 755, 4, 756, 950, 831, 840, 607, 539, - 716, 348, 635, 429, 1335, 926, 1149, 588, 859, 1276, - 1250, 464, 862, 326, 742, 938, 909, 910, 407, 393, - 399, 405, 659, 636, 502, 894, 460, 886, 494, 889, - 459, 898, 163, 425, 518, 902, 3, 905, 567, 936, - 988, 394, 913, 395, 687, 915, 572, 917, 918, 402, - 408, 409, 1154, 580, 632, 930, 255, 574, 931, 392, - 932, 940, 397, 400, 697, 473, 513, 507, 418, 1118, - 575, 618, 656, 453, 481, 630, 642, 628, 488, 441, - 424, 325, 972, 980, 495, 471, 994, 350, 1002, 750, - 1162, 650, 497, 1010, 651, 1017, 1020, 540, 541, 486, - 1032, 271, 1035, 498, 1041, 22, 677, 1046, 1047, 678, - 652, 1069, 653, 679, 654, 1071, 480, 608, 1079, 461, - 1087, 1324, 462, 1091, 264, 1094, 278, 354, 377, 442, - 1101, 1102, 9, 1108, 707, 708, 18, 276, 517, 1133, - 698, 1139, 275, 1142, 458, 1161, 457, 1231, 1233, 568, - 499, 1251, 485, 311, 1254, 690, 514, 1259, 454, 1326, - 455, 542, 482, 333, 543, 1369, 306, 357, 330, 559, - 312, 358, 544, 483, 1332, 1340, 327, 31, 1359, 1370, - 585, 623 + -32768, 520, 753, 4, 754, 948, 829, 838, 584, 538, + 714, 347, 633, 428, 1331, 924, 1147, 603, 857, 1274, + 1280, 463, 860, 325, 740, 936, 907, 908, 407, 393, + 399, 405, 657, 634, 501, 892, 459, 884, 493, 887, + 458, 896, 162, 424, 517, 900, 3, 903, 566, 934, + 986, 394, 911, 395, 685, 913, 587, 915, 916, 402, + 408, 409, 1152, 595, 630, 928, 254, 589, 929, 392, + 930, 938, 397, 400, 695, 473, 512, 506, 417, 1116, + 590, 617, 654, 452, 480, 628, 640, 627, 487, 440, + 423, 324, 970, 978, 494, 471, 992, 349, 1000, 748, + 1160, 648, 496, 1008, 649, 1015, 1018, 539, 540, 485, + 1030, 270, 1033, 497, 1039, 22, 675, 1044, 1045, 676, + 650, 1067, 651, 677, 652, 1069, 470, 585, 1077, 460, + 1085, 1320, 461, 1089, 263, 1092, 277, 353, 376, 441, + 1099, 1100, 9, 1106, 705, 706, 18, 275, 516, 1131, + 696, 1137, 274, 1140, 457, 1159, 456, 1229, 1231, 567, + 498, 1249, 310, 1252, 688, 513, 1257, 453, 1322, 454, + 541, 481, 332, 542, 1365, 305, 356, 329, 558, 311, + 357, 543, 482, 1328, 1336, 326, 31, 1355, 1366, 600, + 622 ); protected array $ruleToNonTerminal = array( @@ -1085,21 +1085,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 161, 163, 163, 164, 155, - 155, 160, 160, 165, 166, 166, 167, 168, 169, 169, - 169, 169, 19, 19, 73, 73, 73, 73, 156, 156, - 156, 156, 171, 171, 157, 157, 159, 159, 159, 162, - 162, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 177, 178, 178, 178, 108, 180, 180, 180, 180, 158, - 158, 158, 158, 158, 158, 158, 158, 59, 59, 174, - 174, 174, 174, 174, 181, 181, 170, 170, 170, 170, - 182, 182, 182, 182, 182, 74, 74, 66, 66, 66, - 66, 131, 131, 131, 131, 185, 184, 173, 173, 173, - 173, 173, 173, 172, 172, 172, 183, 183, 183, 183, - 107, 179, 187, 187, 186, 186, 188, 188, 188, 188, - 188, 188, 188, 188, 176, 176, 176, 176, 175, 190, - 189, 189, 189, 189, 189, 189, 189, 189, 191, 191, - 191, 191 + 42, 42, 42, 42, 42, 161, 162, 162, 163, 155, + 155, 160, 160, 164, 165, 165, 166, 167, 168, 168, + 168, 168, 19, 19, 73, 73, 73, 73, 156, 156, + 156, 156, 170, 170, 159, 159, 159, 157, 157, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 177, + 177, 177, 108, 179, 179, 179, 179, 158, 158, 158, + 158, 158, 158, 158, 158, 59, 59, 173, 173, 173, + 173, 173, 180, 180, 169, 169, 169, 169, 181, 181, + 181, 181, 181, 74, 74, 66, 66, 66, 66, 131, + 131, 131, 131, 184, 183, 172, 172, 172, 172, 172, + 172, 171, 171, 171, 182, 182, 182, 182, 107, 178, + 186, 186, 185, 185, 187, 187, 187, 187, 187, 187, + 187, 187, 175, 175, 175, 175, 174, 189, 188, 188, + 188, 188, 188, 188, 188, 188, 190, 190, 190, 190 ); protected array $ruleToLength = array( @@ -1155,18 +1154,17 @@ class Php8 extends \PhpParser\ParserAbstract 9, 9, 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 1, 1, 1, 0, 3, 0, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 5, 3, 3, 4, 1, 1, 3, 1, - 1, 1, 1, 1, 3, 2, 3, 0, 1, 1, - 3, 1, 1, 1, 1, 1, 1, 3, 1, 1, - 1, 4, 1, 4, 4, 0, 1, 1, 1, 3, - 3, 1, 4, 2, 2, 1, 3, 1, 4, 3, - 3, 3, 3, 1, 3, 1, 1, 3, 1, 1, - 4, 1, 1, 1, 3, 1, 1, 2, 1, 3, - 4, 3, 2, 0, 2, 2, 1, 2, 1, 1, - 1, 4, 3, 3, 3, 3, 6, 3, 1, 1, - 2, 1 + 3, 1, 1, 1, 0, 1, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 5, 3, 3, 4, 1, 1, 3, 1, 1, 1, + 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, + 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, + 4, 2, 2, 1, 3, 1, 4, 3, 3, 3, + 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, + 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, + 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, + 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -2369,9 +2367,7 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 477 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); - $attrs['kind'] = strtolower($self->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $self->semValue = new Expr\Exit_($self->semStack[$stackPos-(2-2)], $attrs); + $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 478 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2495,281 +2491,275 @@ protected function initReduceCallbacks(): void { 522 => null, 523 => null, 524 => static function ($self, $stackPos) { - $self->semValue = null; - }, - 525 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 526 => static function ($self, $stackPos) { $self->semValue = array(); }, - 527 => static function ($self, $stackPos) { + 525 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 528 => static function ($self, $stackPos) { + 526 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 529 => static function ($self, $stackPos) { + 527 => static function ($self, $stackPos) { $self->semValue = array(); }, - 530 => null, - 531 => static function ($self, $stackPos) { + 528 => null, + 529 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 532 => static function ($self, $stackPos) { + 530 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 533 => static function ($self, $stackPos) { + 531 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 534 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 535 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 536 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 537 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 540 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 541 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 542 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 543 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 544 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 545 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 546 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 547 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 548 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 549 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 550 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 549 => null, + 550 => null, 551 => null, - 552 => null, - 553 => null, - 554 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 555 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 556 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 557 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = null; }, - 558 => null, - 559 => null, - 560 => static function ($self, $stackPos) { + 556 => null, + 557 => null, + 558 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, + 559 => null, + 560 => null, 561 => null, 562 => null, 563 => null, 564 => null, - 565 => null, - 566 => null, - 567 => static function ($self, $stackPos) { + 565 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, + 566 => null, + 567 => null, 568 => null, - 569 => null, - 570 => null, - 571 => static function ($self, $stackPos) { + 569 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 572 => null, - 573 => static function ($self, $stackPos) { + 570 => null, + 571 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 574 => static function ($self, $stackPos) { + 572 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 575 => static function ($self, $stackPos) { + 573 => static function ($self, $stackPos) { $self->semValue = null; }, + 574 => null, + 575 => null, 576 => null, - 577 => null, - 578 => null, - 579 => static function ($self, $stackPos) { + 577 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 580 => static function ($self, $stackPos) { + 578 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 581 => null, - 582 => static function ($self, $stackPos) { + 579 => null, + 580 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 583 => static function ($self, $stackPos) { + 581 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 584 => static function ($self, $stackPos) { + 582 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 585 => static function ($self, $stackPos) { + 583 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 586 => static function ($self, $stackPos) { + 584 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 587 => null, - 588 => static function ($self, $stackPos) { + 585 => null, + 586 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 589 => static function ($self, $stackPos) { + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 590 => static function ($self, $stackPos) { + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 591 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 592 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, + 591 => null, + 592 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, 593 => null, - 594 => static function ($self, $stackPos) { + 594 => null, + 595 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 595 => null, 596 => null, 597 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 598 => null, - 599 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 600 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 601 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 602 => null, - 603 => static function ($self, $stackPos) { + 600 => null, + 601 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 604 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 605 => static function ($self, $stackPos) { + 603 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 606 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 607 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 608 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 609 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 610 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 611 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 612 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 613 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 614 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 615 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 616 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 617 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 618 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 619 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 620 => null, - 621 => static function ($self, $stackPos) { + 618 => null, + 619 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 622 => static function ($self, $stackPos) { + 620 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 623 => static function ($self, $stackPos) { + 621 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 624 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 625 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 626 => static function ($self, $stackPos) { + 624 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 627 => static function ($self, $stackPos) { + 625 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 628 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 629 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 630 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 631 => null, + 629 => null, ]; } } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 68bf0e5e70..3d1e4eed20 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -7,6 +7,7 @@ * turn is based on work by Masato Bito. */ +use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\Cast\Double; @@ -1195,6 +1196,32 @@ protected function checkPropertyHookModifiers(int $a, int $b, int $modifierPos): } } + /** @param array $args */ + private function isSimpleExit(array $args): bool { + if (\count($args) === 0) { + return true; + } + if (\count($args) === 1) { + $arg = $args[0]; + return $arg instanceof Arg && $arg->name === null && + $arg->byRef === false && $arg->unpack === false; + } + return false; + } + + /** + * @param array $args + * @param array $attrs + */ + protected function createExitExpr(string $name, int $namePos, array $args, array $attrs): Expr { + if ($this->isSimpleExit($args)) { + // Create Exit node for backwards compatibility. + $attrs['kind'] = strtolower($name) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + return new Expr\Exit_(\count($args) === 1 ? $args[0]->value : null, $attrs); + } + return new Expr\FuncCall(new Name($name, $this->getAttributesAt($namePos)), $args, $attrs); + } + /** * Creates the token map. * diff --git a/test/code/parser/expr/exit.test b/test/code/parser/expr/exit.test index ced97a4d0e..623a41b8e7 100644 --- a/test/code/parser/expr/exit.test +++ b/test/code/parser/expr/exit.test @@ -7,6 +7,13 @@ exit('Die!'); die; die(); die('Exit!'); + +exit(status: 42); +exit(...$args); +exit($a, $b); +\exit($a); +exit(...); +DIE($a, $b); ----- array( 0: Stmt_Expression( @@ -43,4 +50,118 @@ array( ) ) ) + 6: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: exit + ) + args: array( + 0: Arg( + name: Identifier( + name: status + ) + value: Scalar_Int( + value: 42 + ) + byRef: false + unpack: false + ) + ) + ) + ) + 7: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: exit + ) + args: array( + 0: Arg( + name: null + value: Expr_Variable( + name: args + ) + byRef: false + unpack: true + ) + ) + ) + ) + 8: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: exit + ) + args: array( + 0: Arg( + name: null + value: Expr_Variable( + name: a + ) + byRef: false + unpack: false + ) + 1: Arg( + name: null + value: Expr_Variable( + name: b + ) + byRef: false + unpack: false + ) + ) + ) + ) + 9: Stmt_Expression( + expr: Expr_FuncCall( + name: Name_FullyQualified( + name: exit + ) + args: array( + 0: Arg( + name: null + value: Expr_Variable( + name: a + ) + byRef: false + unpack: false + ) + ) + ) + ) + 10: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: exit + ) + args: array( + 0: VariadicPlaceholder( + ) + ) + ) + ) + 11: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: DIE + ) + args: array( + 0: Arg( + name: null + value: Expr_Variable( + name: a + ) + byRef: false + unpack: false + ) + 1: Arg( + name: null + value: Expr_Variable( + name: b + ) + byRef: false + unpack: false + ) + ) + ) + ) ) From 54139ca49b3b45fcf09257727611caa52cd0c00b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 1 Sep 2024 12:48:37 +0200 Subject: [PATCH 369/428] Disable fail-fast PHP 8.4 currently fails because the version is installed version is too old. Avoid cancelling other CI jobs because of that. --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8d4367f870..c75ec72934 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,7 @@ jobs: - "8.2" - "8.3" - "8.4" + fail-fast: false steps: - name: "Checkout" uses: "actions/checkout@v4" From b493c51cce9490f613b33a71385d4b6a54f37648 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 31 Aug 2024 20:58:06 +0200 Subject: [PATCH 370/428] [8.4] Add support for asymmetric visibility modifiers Represented using new PRIVATE_SET, PROTECTED_SET and PUBLIC_SET bits in Modifiers. RFC: https://wiki.php.net/rfc/asymmetric-visibility-v2 --- grammar/php.y | 11 +- lib/PhpParser/Builder/Param.php | 22 + lib/PhpParser/Builder/Property.php | 22 + lib/PhpParser/Modifiers.php | 37 +- lib/PhpParser/Node/Param.php | 21 + lib/PhpParser/Node/Stmt/Property.php | 21 + lib/PhpParser/NodeDumper.php | 9 + lib/PhpParser/Parser/Php7.php | 2066 ++++++++-------- lib/PhpParser/Parser/Php8.php | 2074 +++++++++-------- lib/PhpParser/PrettyPrinterAbstract.php | 3 + test/PhpParser/Builder/ParamTest.php | 20 + test/PhpParser/Builder/PropertyTest.php | 14 + test/PhpParser/Node/ParamTest.php | 13 + test/PhpParser/Node/Stmt/PropertyTest.php | 12 + .../stmt/class/asymmetric_visibility.test | 191 ++ .../stmt/asymmetric_visibility.test | 25 + 16 files changed, 2501 insertions(+), 2060 deletions(-) create mode 100644 test/code/parser/stmt/class/asymmetric_visibility.test create mode 100644 test/code/prettyPrinter/stmt/asymmetric_visibility.test diff --git a/grammar/php.y b/grammar/php.y index 6cb5b78ea8..0a57b06184 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -81,7 +81,10 @@ %token T_USE %token T_INSTEADOF %token T_GLOBAL -%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC T_READONLY +%token T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC T_READONLY +%token T_PUBLIC_SET +%token T_PROTECTED_SET +%token T_PRIVATE_SET %token T_VAR %token T_UNSET %token T_ISSET @@ -672,6 +675,9 @@ property_modifier: T_PUBLIC { $$ = Modifiers::PUBLIC; } | T_PROTECTED { $$ = Modifiers::PROTECTED; } | T_PRIVATE { $$ = Modifiers::PRIVATE; } + | T_PUBLIC_SET { $$ = Modifiers::PUBLIC_SET; } + | T_PROTECTED_SET { $$ = Modifiers::PROTECTED_SET; } + | T_PRIVATE_SET { $$ = Modifiers::PRIVATE_SET; } | T_READONLY { $$ = Modifiers::READONLY; } ; @@ -906,6 +912,9 @@ member_modifier: T_PUBLIC { $$ = Modifiers::PUBLIC; } | T_PROTECTED { $$ = Modifiers::PROTECTED; } | T_PRIVATE { $$ = Modifiers::PRIVATE; } + | T_PUBLIC_SET { $$ = Modifiers::PUBLIC_SET; } + | T_PROTECTED_SET { $$ = Modifiers::PROTECTED_SET; } + | T_PRIVATE_SET { $$ = Modifiers::PRIVATE_SET; } | T_STATIC { $$ = Modifiers::STATIC; } | T_ABSTRACT { $$ = Modifiers::ABSTRACT; } | T_FINAL { $$ = Modifiers::FINAL; } diff --git a/lib/PhpParser/Builder/Param.php b/lib/PhpParser/Builder/Param.php index f439e87656..324a32b05f 100644 --- a/lib/PhpParser/Builder/Param.php +++ b/lib/PhpParser/Builder/Param.php @@ -122,6 +122,28 @@ public function makeReadonly() { return $this; } + /** + * Gives the promoted property private(set) visibility. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivateSet() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE_SET); + + return $this; + } + + /** + * Gives the promoted property protected(set) visibility. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtectedSet() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED_SET); + + return $this; + } + /** * Adds an attribute group. * diff --git a/lib/PhpParser/Builder/Property.php b/lib/PhpParser/Builder/Property.php index 55fd8b78e1..c80fe481bd 100644 --- a/lib/PhpParser/Builder/Property.php +++ b/lib/PhpParser/Builder/Property.php @@ -112,6 +112,28 @@ public function makeFinal() { return $this; } + /** + * Gives the property private(set) visibility. + * + * @return $this The builder instance (for fluid interface) + */ + public function makePrivateSet() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE_SET); + + return $this; + } + + /** + * Gives the property protected(set) visibility. + * + * @return $this The builder instance (for fluid interface) + */ + public function makeProtectedSet() { + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED_SET); + + return $this; + } + /** * Sets default value for the property. * diff --git a/lib/PhpParser/Modifiers.php b/lib/PhpParser/Modifiers.php index 25cf3bef63..0f0f22d6bb 100644 --- a/lib/PhpParser/Modifiers.php +++ b/lib/PhpParser/Modifiers.php @@ -14,8 +14,13 @@ final class Modifiers { public const ABSTRACT = 16; public const FINAL = 32; public const READONLY = 64; + public const PUBLIC_SET = 128; + public const PROTECTED_SET = 256; + public const PRIVATE_SET = 512; - public const VISIBILITY_MASK = 1 | 2 | 4; + public const VISIBILITY_MASK = self::PUBLIC | self::PROTECTED | self::PRIVATE; + + public const VISIBILITY_SET_MASK = self::PUBLIC_SET | self::PROTECTED_SET | self::PRIVATE_SET; private const TO_STRING_MAP = [ self::PUBLIC => 'public', @@ -25,6 +30,9 @@ final class Modifiers { self::ABSTRACT => 'abstract', self::FINAL => 'final', self::READONLY => 'readonly', + self::PUBLIC_SET => 'public(set)', + self::PROTECTED_SET => 'protected(set)', + self::PRIVATE_SET => 'private(set)', ]; public static function toString(int $modifier): string { @@ -34,15 +42,19 @@ public static function toString(int $modifier): string { return self::TO_STRING_MAP[$modifier]; } + private static function isValidModifier(int $modifier): bool { + $isPow2 = ($modifier & ($modifier - 1)) == 0 && $modifier != 0; + return $isPow2 && $modifier <= self::PRIVATE_SET; + } + /** * @internal */ public static function verifyClassModifier(int $a, int $b): void { - foreach ([Modifiers::ABSTRACT, Modifiers::FINAL, Modifiers::READONLY] as $modifier) { - if ($a & $modifier && $b & $modifier) { - throw new Error( - 'Multiple ' . self::toString($modifier) . ' modifiers are not allowed'); - } + assert(self::isValidModifier($b)); + if (($a & $b) != 0) { + throw new Error( + 'Multiple ' . self::toString($b) . ' modifiers are not allowed'); } if ($a & 48 && $b & 48) { @@ -54,15 +66,16 @@ public static function verifyClassModifier(int $a, int $b): void { * @internal */ public static function verifyModifier(int $a, int $b): void { - if ($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK) { + assert(self::isValidModifier($b)); + if (($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK) || + ($a & Modifiers::VISIBILITY_SET_MASK && $b & Modifiers::VISIBILITY_SET_MASK) + ) { throw new Error('Multiple access type modifiers are not allowed'); } - foreach ([Modifiers::ABSTRACT, Modifiers::STATIC, Modifiers::FINAL, Modifiers::READONLY] as $modifier) { - if ($a & $modifier && $b & $modifier) { - throw new Error( - 'Multiple ' . self::toString($modifier) . ' modifiers are not allowed'); - } + if (($a & $b) != 0) { + throw new Error( + 'Multiple ' . self::toString($b) . ' modifiers are not allowed'); } if ($a & 48 && $b & 48) { diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index c844f6440e..a277ca0a15 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -86,4 +86,25 @@ public function isPrivate(): bool { public function isReadonly(): bool { return (bool) ($this->flags & Modifiers::READONLY); } + + /** + * Whether the promoted property has explicit public(set) visibility. + */ + public function isPublicSet(): bool { + return (bool) ($this->flags & Modifiers::PUBLIC_SET); + } + + /** + * Whether the promoted property has explicit protected(set) visibility. + */ + public function isProtectedSet(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED_SET); + } + + /** + * Whether the promoted property has explicit private(set) visibility. + */ + public function isPrivateSet(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE_SET); + } } diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index edbd144e5d..3b238c76a9 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -80,6 +80,27 @@ public function isReadonly(): bool { return (bool) ($this->flags & Modifiers::READONLY); } + /** + * Whether the property has explicit public(set) visibility. + */ + public function isPublicSet(): bool { + return (bool) ($this->flags & Modifiers::PUBLIC_SET); + } + + /** + * Whether the property has explicit protected(set) visibility. + */ + public function isProtectedSet(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED_SET); + } + + /** + * Whether the property has explicit private(set) visibility. + */ + public function isPrivateSet(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE_SET); + } + public function getType(): string { return 'Stmt_Property'; } diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index a2535de733..39ce86aa23 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -185,6 +185,15 @@ protected function dumpFlags(int $flags): string { if ($flags & Modifiers::READONLY) { $strs[] = 'READONLY'; } + if ($flags & Modifiers::PUBLIC_SET) { + $strs[] = 'PUBLIC_SET'; + } + if ($flags & Modifiers::PROTECTED_SET) { + $strs[] = 'PROTECTED_SET'; + } + if ($flags & Modifiers::PRIVATE_SET) { + $strs[] = 'PRIVATE_SET'; + } if ($strs) { return implode(' | ', $strs) . ' (' . $flags . ')'; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 15d6cbf7ad..a08e597669 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -122,49 +122,52 @@ class Php7 extends \PhpParser\ParserAbstract public const T_PROTECTED = 357; public const T_PUBLIC = 358; public const T_READONLY = 359; - public const T_VAR = 360; - public const T_UNSET = 361; - public const T_ISSET = 362; - public const T_EMPTY = 363; - public const T_HALT_COMPILER = 364; - public const T_CLASS = 365; - public const T_TRAIT = 366; - public const T_INTERFACE = 367; - public const T_ENUM = 368; - public const T_EXTENDS = 369; - public const T_IMPLEMENTS = 370; - public const T_OBJECT_OPERATOR = 371; - public const T_NULLSAFE_OBJECT_OPERATOR = 372; - public const T_LIST = 373; - public const T_ARRAY = 374; - public const T_CALLABLE = 375; - public const T_CLASS_C = 376; - public const T_TRAIT_C = 377; - public const T_METHOD_C = 378; - public const T_FUNC_C = 379; - public const T_PROPERTY_C = 380; - public const T_LINE = 381; - public const T_FILE = 382; - public const T_START_HEREDOC = 383; - public const T_END_HEREDOC = 384; - public const T_DOLLAR_OPEN_CURLY_BRACES = 385; - public const T_CURLY_OPEN = 386; - public const T_PAAMAYIM_NEKUDOTAYIM = 387; - public const T_NAMESPACE = 388; - public const T_NS_C = 389; - public const T_DIR = 390; - public const T_NS_SEPARATOR = 391; - public const T_ELLIPSIS = 392; - public const T_NAME_FULLY_QUALIFIED = 393; - public const T_NAME_QUALIFIED = 394; - public const T_NAME_RELATIVE = 395; - public const T_ATTRIBUTE = 396; + public const T_PUBLIC_SET = 360; + public const T_PROTECTED_SET = 361; + public const T_PRIVATE_SET = 362; + public const T_VAR = 363; + public const T_UNSET = 364; + public const T_ISSET = 365; + public const T_EMPTY = 366; + public const T_HALT_COMPILER = 367; + public const T_CLASS = 368; + public const T_TRAIT = 369; + public const T_INTERFACE = 370; + public const T_ENUM = 371; + public const T_EXTENDS = 372; + public const T_IMPLEMENTS = 373; + public const T_OBJECT_OPERATOR = 374; + public const T_NULLSAFE_OBJECT_OPERATOR = 375; + public const T_LIST = 376; + public const T_ARRAY = 377; + public const T_CALLABLE = 378; + public const T_CLASS_C = 379; + public const T_TRAIT_C = 380; + public const T_METHOD_C = 381; + public const T_FUNC_C = 382; + public const T_PROPERTY_C = 383; + public const T_LINE = 384; + public const T_FILE = 385; + public const T_START_HEREDOC = 386; + public const T_END_HEREDOC = 387; + public const T_DOLLAR_OPEN_CURLY_BRACES = 388; + public const T_CURLY_OPEN = 389; + public const T_PAAMAYIM_NEKUDOTAYIM = 390; + public const T_NAMESPACE = 391; + public const T_NS_C = 392; + public const T_DIR = 393; + public const T_NS_SEPARATOR = 394; + public const T_ELLIPSIS = 395; + public const T_NAME_FULLY_QUALIFIED = 396; + public const T_NAME_QUALIFIED = 397; + public const T_NAME_RELATIVE = 398; + public const T_ATTRIBUTE = 399; - protected int $tokenToSymbolMapSize = 397; - protected int $actionTableSize = 1279; - protected int $gotoTableSize = 723; + protected int $tokenToSymbolMapSize = 400; + protected int $actionTableSize = 1287; + protected int $gotoTableSize = 643; - protected int $invalidSymbol = 169; + protected int $invalidSymbol = 172; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; @@ -296,6 +299,9 @@ class Php7 extends \PhpParser\ParserAbstract "T_PROTECTED", "T_PUBLIC", "T_READONLY", + "T_PUBLIC_SET", + "T_PROTECTED_SET", + "T_PRIVATE_SET", "T_VAR", "T_UNSET", "T_ISSET", @@ -345,32 +351,32 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $tokenToSymbol = array( - 0, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 56, 167, 169, 168, 55, 169, 169, - 162, 163, 53, 50, 8, 51, 52, 54, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 31, 160, - 44, 16, 46, 30, 68, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 70, 169, 161, 36, 169, 166, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 164, 35, 165, 58, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 1, 2, 3, 4, + 0, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 56, 170, 172, 171, 55, 172, 172, + 165, 166, 53, 50, 8, 51, 52, 54, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 31, 163, + 44, 16, 46, 30, 68, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 70, 172, 164, 36, 172, 169, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 167, 35, 168, 58, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, @@ -384,399 +390,401 @@ class Php7 extends \PhpParser\ParserAbstract 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159 + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162 ); protected array $action = array( - 128, 129, 130, 564, 131, 132, 1322, 753, 754, 755, - 133, 38, 864, -367, 865, -367,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 101, 102, 103, 104, 105, 1114, 1115, - 1116, 1113, 1112, 1111, 1117, 747, 746,-32766, 0,-32766, + 128, 129, 130, 564, 131, 132, 943, 753, 754, 755, + 133, 38, 837, 484, 560, 1363,-32766,-32766,-32766, 0, + 828, 1120, 1121, 1122, 1116, 1115, 1114, 1123, 1117, 1118, + 1119,-32766,-32766,-32766, -331, 747, 746,-32766, 839,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767,-32766,-32766,-32766, 1029, 756,-32766,-32766,-32766, 943, - 291, -608, 836,-32766,-32766,-32766,-32766, 1090, -608, 264, - 134, 384, 760, 761, 762, 763, 992,-32766, 425,-32766, - -32766,-32766,-32766,-32766,-32766, 817, 764, 765, 766, 767, + -32767, 24,-32766, 1032, -567, 756, 1120, 1121, 1122, 1116, + 1115, 1114, 1123, 1117, 1118, 1119, 2, 381, 382, 265, + 134, 384, 760, 761, 762, 763, 1109, 424, 425, 1298, + 328, 36, 248, 26, 291, 817, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 793, 565, 794, 795, 796, 797, 785, 786, 345, 346, 788, 789, 774, 775, 776, 778, 779, 780, 357, 820, 821, 822, 823, 824, - 566, 781, 782, 567, 568,-32766, 805, 803, 804, 816, - 800, 801, -328, -194, 569, 570, 799, 571, 572, 573, - 574, 837, 575, 576, 1357, 1342,-32766, 1038, 839, 802, - 577, 578, 1341, 135, 2, 128, 129, 130, 564, 131, - 132, 1062, 753, 754, 755, 133, 38, -110, 1038, 81, - 484, 290, -110, 327, -110,-32766,-32766,-32766, 828, 306, - -32766,-32766, -110, -110, -110, -110, -110, -110, -110, -110, - 747, 746, 290, 106, 107, 108,-32766, 274,-32766,-32766, - -32766,-32766,-32766,-32766,-32766, 993, 26, 36, 248, 109, - 756,-32766,-32766,-32766, 1114, 1115, 1116, 1113, 1112, 1111, - 1117, -608, 727, -608, 264, 134, 384, 760, 761, 762, - 763, -342,-32766, 425,-32766,-32766,-32766,-32766, 747, 746, + 566, -567, -567, 299, 781, 782, 567, 568, -194, 805, + 803, 804, 816, 800, 801, 35, -193, 569, 570, 799, + 571, 572, 573, 574,-32766, 575, 576, 470, 471, 485, + 238, -567, 802, 577, 578, -370, 135, -370, 128, 129, + 130, 564, 131, 132, 1065, 753, 754, 755, 133, 38, + -32766, 136, 727, 1025, 1024, 1023, 1029, 1026, 1027, 1028, + -32766,-32766,-32766,-32767,-32767,-32767,-32767, 101, 102, 103, + 104, 105, -331, 747, 746, 1041, 922,-32766,-32766,-32766, + 838,-32766, 145,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 756,-32766,-32766,-32766, 610,-32766, 290, + -32766,-32766,-32766,-32766,-32766, 833, 717, 265, 134, 384, + 760, 761, 762, 763, -614,-32766, 425,-32766,-32766,-32766, + -32766, -614, 251, 817, 764, 765, 766, 767, 768, 769, + 770, 771, 772, 773, 793, 565, 794, 795, 796, 797, + 785, 786, 345, 346, 788, 789, 774, 775, 776, 778, + 779, 780, 357, 820, 821, 822, 823, 824, 566, 912, + 425, 310, 781, 782, 567, 568, -194, 805, 803, 804, + 816, 800, 801, 1286, -193, 569, 570, 799, 571, 572, + 573, 574, -272, 575, 576, 834, 82, 83, 84, -85, + 802, 577, 578, 237, 148, 777, 748, 749, 750, 751, + 752, 945, 753, 754, 755, 790, 791, 37,-32766, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 1041, 276,-32766,-32766,-32766, 924, 1261, + 1260, 1262, 712, 830, 358, 393, 109, 7, 1095, 47, + 756,-32766,-32766,-32766, 837, -85,-32766, 1093,-32766,-32766, + -32766, 1266,-32766,-32766, 757, 758, 759, 760, 761, 762, + 763, 992,-32766, 826,-32766,-32766, 922, -614, 312, -614, 817, 764, 765, 766, 767, 768, 769, 770, 771, 772, - 773, 793, 565, 794, 795, 796, 797, 785, 786, 345, - 346, 788, 789, 774, 775, 776, 778, 779, 780, 357, - 820, 821, 822, 823, 824, 566, 781, 782, 567, 568, - 610, 805, 803, 804, 816, 800, 801, -328, -194, 569, - 570, 799, 571, 572, 573, 574, 35, 575, 576, 150, - 82, 83, 84, 485, 802, 577, 578, 838, 148, 777, - 748, 749, 750, 751, 752, -605, 753, 754, 755, 790, - 791, 37, -605, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 1035, 274,-32766, - -32766,-32766, 961, 962,-32766,-32766,-32766, 963, -193, 126, - 109, 383, 382, 957, 756,-32766,-32766,-32766, 136, 1038, - -32766, 424,-32766,-32766,-32766, 1260, 237, 145, 757, 758, - 759, 760, 761, 762, 763, 251,-32766, 826,-32766,-32766, - -559, 560, 310, 283, 817, 764, 765, 766, 767, 768, - 769, 770, 771, 772, 773, 793, 815, 794, 795, 796, - 797, 785, 786, 787, 814, 788, 789, 774, 775, 776, - 778, 779, 780, 819, 820, 821, 822, 823, 824, 825, - 781, 782, 783, 784, -561, 805, 803, 804, 816, 800, - 801, -85, 238, 792, 798, 799, 806, 807, 809, 808, - 945, 810, 811, 1292, -559, -559, 837, 616, 802, 813, - 812, 49, 50, 51, 516, 52, 53, 103, 104, 105, - -559, 54, 55, 922, 56, -605, 922, -605, 460, 461, - 462, 291, -565,-32766, -559, 393, 1367, 7, 312, 1368, - 358, 381, 382, 1091, 24, 945, -557, 739, -561, -561, - 833, 424, 324, 717,-32766, 1061, 718, -85, 340, 57, - 58,-32766, 151, -193, -556, 59, 1106, 60, 245, 246, - 61, 62, 63, 64, 65, 66, 67, 68, -561, 28, - 266, 69, 440, 517, 287, 363, 74, 1286, 1287, 518, - 1338, 837, 327, 1280, 299, 1284, 42, 19, 519, 864, - 520, 865, 521, 341, 522, 922, 912, 523, 524, 912, - -557, -557, 44, 45, 446, 378, 377,-32766, 46, 525, - 1025, 1024, 1023, 1026, 369, 339, -557, 834, -556, -556, - -599, 1246, -599, 527, 528, 529, 1253,-32766, -564, 1038, - -557, -272, 1035, 830, -556, 531, 532, 371, 1272, 1273, - 1274, 1275, 1277, 1269, 1270, 298, -563, 375, -556, 1038, - 47, 1276, 1271, 290, 1038, 1255, 1254, 1256, 299, 828, - 1035, 70, 1251, 391, 837, 322, 323, 327, 922, -153, - -153, -153, 924, 659, 20, 924, 712, 442, 912, 712, - 678, 679, 1038, 1037, -153, 443, -153, 444, -153, 445, - -153, 843, 287, 28, 266, -87, 425, -84, 719, -78, - 376, 939, 1255, 1254, 1256, 837, 283, 747, 746, 1284, - 832, 961, 962, 153, 300, 301, 526, 714, 328, 922, - 154, 898, 957, -110, -110, -110, 32, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 28, 267, 692, 141, 125, 1246, 140, 327, 155, 722, - 327, 912, 837, 157, 924, 33, 1284, -73, 712, -153, - 532, -78, 1272, 1273, 1274, 1275, 1277, 1269, 1270, 1162, - 1164, -58, 1255, 1254, 1256, 1276, 1271, -558, 693, 922, - -555, 1092, 470, 471, -57, 72, 149, 408, 379, 380, - 323, 327, 1246, 385, 386, 650, 651, 747, 746, 694, - 695, 123, 912, 922, -4, 922, 531, 532, -72, 1272, - 1273, 1274, 1275, 1277, 1269, 1270, 124, 137, 1255, 1254, - 1256, 138, 1276, 1271, 283, 144, 158, 978, 159, 747, - 746, 712, 72, 729,-32766, 160, 161, 323, 327, 162, - 1253, -558, -558, -302, -555, -555, -71,-32766,-32766,-32766, - 288,-32766, -70,-32766, 289,-32766, -69, -558,-32766, -555, - -555, -68, 912,-32766,-32766,-32766,-32766, -67, -66,-32766, - -32766, -558, 1253, -65, -555,-32766, 421, -46, 924,-32766, - -32766,-32766, 712,-32766,-32766,-32766, 912,-32766, 912, -298, - -32766, -18, 142, 273, 284,-32766,-32766,-32766, 728, 731, - 921,-32766,-32766, 147, 274, 279, 280,-32766, 421, 285, - 376, 286, 437, 28, 267, 73,-32766, 297, 333, 292, - 109, 961, 962, -555, -555, 837, 526, 293, 48, 1284, - 688, 530, 957, -110, -110, -110, 146, 828, 924, -555, - -32766, 837, 712, 681, 703, 581, 665, 1121, 666, 23, - 958, 648, 587, -555, 307, 10, 1369, -50, 304, 311, - 614, 305, 924, 1291, 924, 1246, 712, 660, 712, -4, - 705,-32766, 467, 941, -521, 1281, 495, 1219, 1293, -511, - 532, 682, 1272, 1273, 1274, 1275, 1277, 1269, 1270, 139, - 0, 8, 302, 303, 27, 1276, 1271, -593, 299, 1285, - -32766, 836, 0, 0, 0, 72, 1253, 0, 374, 0, - 323, 327, 0,-32766,-32766,-32766, 0,-32766, 0,-32766, - 0,-32766, 127, 0,-32766, 0, 0, 0, 0,-32766, - -32766,-32766,-32766, 0, 373,-32766,-32766, 0, 1253, 0, - 922,-32766, 421, -275, 0,-32766,-32766,-32766, 40,-32766, - -32766,-32766, 41,-32766, 736, 737,-32766, 856, 903, 922, - 1002,-32766,-32766,-32766,-32766, 979, 986,-32766,-32766, 976, - 1253, 987, 901,-32766, 421, 974, 1095,-32766,-32766,-32766, - 1098,-32766,-32766,-32766, 1099,-32766, 848, 1096,-32766, 1097, - 1103, -273, 490,-32766,-32766,-32766,-32766, 1308, 1326,-32766, - -32766, 1360, 1253, 594, 653,-32766, 421, -592, -591,-32766, - -32766,-32766, -565,-32766,-32766,-32766, -564,-32766, -563, -562, - -32766, -505, 1, 912, 29,-32766,-32766,-32766, 30, 39, - 1260,-32766,-32766, 43, 71, 75, 76,-32766, 421, -250, - -250, -250, 912, 77, 78, 376,-32766, 1260, 79, 80, - 143, 152, 327, 156, 243, 329, 961, 962, -249, -249, - -249, 526, 358, 359, 376, 360, 898, 957, -110, -110, - -110, 361, 362, 363, 364, 961, 962, -16, 365, 366, - 526, 367, 368, 370, 0, 898, 957, -110, -110, -110, - 438, 559, 733, -272, 12,-32766, 13, 14, 15, 924, - 17, 1253, 34, 712, -250, 407, 486, 487,-32766,-32766, - -32766, 837,-32766, 494,-32766, 497,-32766, 498, 924,-32766, - 499, 899, 712, -249,-32766,-32766,-32766, 500, 837, 504, - -32766,-32766, 505, 506, 514, 592,-32766, 421, 698, 1064, - 1202, 1282, 1063, 1044, 1241,-32766, -110, -110, 1040, -277, - -102, -110, 11, 16, 21, 296, 406, -110, 606, 611, - 639, 704, 1206, -110, -110, 1259,-32766, 1203, -110, 1339, - 1364, 321, 372, 713, -110, 716, 720, 721, 723, 724, - 725, 726, 730,-32766, 715, 0, 0, 1366, 299, 859, - 858, 74, 867, 951, 0, 994, 866, 327, 1365, 950, - 948, 949, 952, 1234, 932, 299, 942, 930, 74, 984, - 985, 0, 637, 1363, 327, 1320, 1309, 1327, 1336 + 773, 793, 815, 794, 795, 796, 797, 785, 786, 787, + 814, 788, 789, 774, 775, 776, 778, 779, 780, 819, + 820, 821, 822, 823, 824, 825, 300, 301, 324, 781, + 782, 783, 784, 832, 805, 803, 804, 816, 800, 801, + 714, 1038, 792, 798, 799, 806, 807, 809, 808, 140, + 810, 811, 837, 327, 340,-32766, 125, 802, 813, 812, + 49, 50, 51, 516, 52, 53, 1041, -110, 341, 912, + 54, 55, -110, 56, -110, -565,-32766,-32766,-32766, 306, + 1041, 126, -110, -110, -110, -110, -110, -110, -110, -110, + -110, -110, -110, -611, 1094, 106, 107, 108, 739, 276, + -611, 961, 962,-32766, 290, 287, 963, 1328, 57, 58, + -32766, 109, 371, 993, 59, 957, 60, 245, 246, 61, + 62, 63, 64, 65, 66, 67, 68,-32766, 28, 267, + 69, 440, 517, 375, -345, 74, 1292, 1293, 518, 391, + 837, 327, -565, -565, 1290, 42, 20, 519, 924, 520, + 922, 521, 712, 522, -563, 692, 523, 524, -565, 922, + 442, 44, 45, 446, 378, 377, 945, 46, 525, 922, + -571, 443, -565, 369, 339, 1344, 103, 104, 105, -562, + 1252, 922, 383, 382, 444, 527, 528, 529, 864, 718, + 865, 693, 424, 460, 461, 462, 445, 531, 532, 719, + 1278, 1279, 1280, 1281, 1283, 1275, 1276, 298, 864, 363, + 865, 722, 843, 1282, 1277, 694, 695, 1261, 1260, 1262, + 299, -563, -563, 70, -153, -153, -153, 322, 323, 327, + -78, -4, 922, 912, 1261, 1260, 1262, -563, 150, -153, + 283, -153, 912, -153, 151, -153, -562, -562, 153, -570, + 1348, -563, 912, -58, 828, 376, -611, 1347, -611, 747, + 746, 836, -562, -605, 912, -605, 961, 962, 154, 747, + 746, 526, 616, 81, -569, 1038, -562, 327, 155, 898, + 957, -110, -110, -110, 32, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 157, -564, + 1041, 1373, 28, 268, 1374, 33, 922, -87, 659, 21, + 678, 679, 924, -57, 837, 912, 712, -153, 1290, 149, + 408, 924, 379, 380, 283, 712, 123, 1168, 1170, 385, + 386, 978, 124, 137, 138, 712, 729, 376, -561, 437, + 1064, 141, 144, 924, 297, 327, 158, 712, 961, 962, + 650, 651, 159, 526, 1252, -84, 160, 161, 747, 746, + 162, 530, 957, -110, -110, -110, -564, -564, -78, 287, + 1266, 531, 532, -73, 1278, 1279, 1280, 1281, 1283, 1275, + 1276, -72, -564, -71, -70, 11, 1259, 1282, 1277, 912, + -69, 747, 746, -68, 924,-32766, -564, 72, 712, -4, + -16, 1259, 323, 327, -67, -561, -561, 291,-32766,-32766, + -32766, -66,-32766, -65,-32766, -46,-32766, -18, 142,-32766, + 275, -561, 1257, 284,-32766,-32766,-32766, 728,-32766, 731, + -32766,-32766, 921, 147, 1259, -561,-32766, 421, 28, 267, + -305,-32766,-32766,-32766, -301,-32766, 1040,-32766,-32766,-32766, + 837, 837,-32766, 288, 1290, 1038, 279,-32766,-32766,-32766, + 280, 285, 286,-32766,-32766, 1261, 1260, 1262, 924,-32766, + 421, 333, 712, 28, 268, 289, 292, 293, 146, 73, + 1041,-32766, 939, 109, 688, 837, -110, -110, -561, 1290, + 1252, -110, 276,-32766, 837, 828, 1375, 703, 705, 581, + -110, 1127, 307, 648, 283,-32766, 958, 665, 532,-32766, + 1278, 1279, 1280, 1281, 1283, 1275, 1276, 681, 1041, 660, + -50, 10, 666, 1282, 1277, 1252, 304, 467, 495, 311, + 941, 299, 682, 72, 74, 305, -527,-32766, 323, 327, + 327, 299, 290, 532, 836, 1278, 1279, 1280, 1281, 1283, + 1275, 1276, 587, 139, 1297, -561, -561, 614, 1282, 1277, + 34, 0, 0,-32766, 0, 0, 0, 0, 72, 1259, + 0, -561, 0, 323, 327, 0,-32766,-32766,-32766, 0, + -32766, -517,-32766, 1299,-32766, -561, 0,-32766, 0, 0, + 8, 0,-32766,-32766,-32766, 922,-32766, 40,-32766,-32766, + 27, 373, 1259, 0,-32766, 421, 41, -599, 736,-32766, + -32766,-32766, 737,-32766, 856,-32766,-32766,-32766, 922, 903, + -32766, 1002, 979, 986, 976,-32766,-32766,-32766, 987,-32766, + 901,-32766,-32766, 974, 1098, 1259, 1101,-32766, 421, 48, + 1102, 1099,-32766,-32766,-32766, 1100,-32766, 1106,-32766,-32766, + -32766, 1287, 848,-32766, 1314, 1332, 1366, 490,-32766,-32766, + -32766, 653,-32766, -598,-32766,-32766, -597, -571, 1259, 594, + -32766, 421, -570, -569, 1266,-32766,-32766,-32766, 912,-32766, + -568,-32766,-32766,-32766, -511, 1,-32766, -275, 29, 30, + 39,-32766,-32766,-32766, -250, -250, -250,-32766,-32766, 43, + 376, 912, 71,-32766, 421, 75, 302, 303, 76, 77, + 78, 961, 962, 79, 80,-32766, 526, -249, -249, -249, + -273, 143, 374, 376, 898, 957, -110, -110, -110, 152, + 156, 243, 329, 358, 961, 962, 127, 359, 360, 526, + 361, 362, 363, 364, 365, 366, 367, 898, 957, -110, + -110, -110,-32766, -272, 368, 837, 370, 924, 1259, 13, + 438, 712, -250, 559, 321,-32766,-32766,-32766, 14,-32766, + 15,-32766, 16,-32766, 18, 407,-32766, 486, 487, 494, + 924,-32766,-32766,-32766, 712, -249, 497,-32766,-32766, 498, + -110, -110, 499,-32766, 421, -110, 500, 504, 505, 506, + 514, 592, 698, 1067, -110,-32766, 1208, 1288, 1066, 1047, + 1247, 1043, -277,-32766, -102, 12, 17, 22, 296, 406, + 606, 611, 639, 704, 1212, 1265, 1209, 1345, 0, 372, + 713, 716, 720, 721, 723, 299, 724, 725, 74, 726, + 1225, 730, 715, 0, 327, 733, 1291, 899, 1370, 1372, + 859, 858, 867, 951, 994, 866, 1371, 950, 948, 949, + 952, 1240, 932, 942, 930, 984, 985, 637, 1369, 1326, + 1315, 1333, 1342, 0, 0, 0, 327 ); protected array $actionCheck = array( 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, - 12, 13, 106, 106, 108, 108, 9, 10, 11, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, - 118, 119, 120, 121, 122, 37, 38, 30, 0, 32, + 12, 13, 82, 31, 85, 85, 9, 10, 11, 0, + 80, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 9, 10, 11, 8, 37, 38, 30, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 9, 10, 11, 1, 57, 9, 10, 11, 1, - 30, 1, 156, 9, 10, 11, 9, 1, 8, 71, - 72, 73, 74, 75, 76, 77, 31, 30, 80, 32, - 33, 34, 35, 36, 30, 87, 88, 89, 90, 91, + 43, 101, 30, 1, 70, 57, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 8, 106, 107, 71, + 72, 73, 74, 75, 76, 77, 126, 116, 80, 150, + 70, 151, 152, 8, 30, 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, 116, 128, 129, 130, 131, - 132, 133, 8, 8, 136, 137, 138, 139, 140, 141, - 142, 82, 144, 145, 85, 1, 116, 138, 1, 151, - 152, 153, 8, 155, 8, 2, 3, 4, 5, 6, - 7, 163, 9, 10, 11, 12, 13, 101, 138, 164, - 31, 162, 106, 168, 108, 9, 10, 11, 80, 113, - 9, 10, 116, 117, 118, 119, 120, 121, 122, 123, - 37, 38, 162, 53, 54, 55, 30, 57, 32, 33, - 34, 35, 36, 37, 38, 160, 8, 148, 149, 69, - 57, 9, 10, 11, 116, 117, 118, 119, 120, 121, - 122, 161, 164, 163, 71, 72, 73, 74, 75, 76, - 77, 165, 30, 80, 32, 33, 34, 35, 37, 38, + 122, 137, 138, 162, 126, 127, 128, 129, 8, 131, + 132, 133, 134, 135, 136, 8, 8, 139, 140, 141, + 142, 143, 144, 145, 9, 147, 148, 137, 138, 167, + 14, 167, 154, 155, 156, 106, 158, 108, 2, 3, + 4, 5, 6, 7, 166, 9, 10, 11, 12, 13, + 116, 8, 167, 119, 120, 121, 122, 123, 124, 125, + 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 166, 37, 38, 141, 1, 9, 10, 11, + 163, 30, 8, 32, 33, 34, 35, 36, 37, 38, + 9, 10, 11, 57, 9, 10, 11, 1, 30, 165, + 32, 33, 34, 35, 36, 80, 31, 71, 72, 73, + 74, 75, 76, 77, 1, 30, 80, 32, 33, 34, + 35, 8, 8, 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, 84, + 80, 8, 126, 127, 128, 129, 166, 131, 132, 133, + 134, 135, 136, 1, 166, 139, 140, 141, 142, 143, + 144, 145, 166, 147, 148, 160, 9, 10, 11, 31, + 154, 155, 156, 97, 158, 2, 3, 4, 5, 6, + 7, 122, 9, 10, 11, 12, 13, 30, 116, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 141, 57, 9, 10, 11, 163, 159, + 160, 161, 167, 80, 165, 106, 69, 108, 168, 70, + 57, 9, 10, 11, 82, 97, 30, 1, 32, 33, + 34, 1, 9, 10, 71, 72, 73, 74, 75, 76, + 77, 31, 30, 80, 32, 33, 1, 164, 8, 166, 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, - 1, 128, 129, 130, 131, 132, 133, 163, 163, 136, - 137, 138, 139, 140, 141, 142, 8, 144, 145, 14, - 9, 10, 11, 164, 151, 152, 153, 160, 155, 2, - 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, - 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 116, 57, 9, - 10, 11, 117, 118, 9, 10, 11, 122, 8, 14, - 69, 106, 107, 128, 57, 9, 10, 11, 8, 138, - 30, 116, 32, 33, 34, 1, 97, 8, 71, 72, - 73, 74, 75, 76, 77, 8, 30, 80, 32, 33, - 70, 85, 8, 162, 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, 70, 128, 129, 130, 131, 132, - 133, 31, 14, 136, 137, 138, 139, 140, 141, 142, - 122, 144, 145, 147, 134, 135, 82, 51, 151, 152, - 153, 2, 3, 4, 5, 6, 7, 50, 51, 52, - 150, 12, 13, 1, 15, 161, 1, 163, 129, 130, - 131, 30, 162, 116, 164, 106, 80, 108, 8, 83, - 162, 106, 107, 160, 101, 122, 70, 164, 134, 135, - 80, 116, 8, 31, 137, 1, 31, 97, 8, 50, - 51, 137, 14, 163, 70, 56, 123, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 164, 70, - 71, 72, 73, 74, 30, 162, 162, 78, 79, 80, - 1, 82, 168, 1, 159, 86, 87, 88, 89, 106, - 91, 108, 93, 8, 95, 1, 84, 98, 99, 84, - 134, 135, 103, 104, 105, 106, 107, 116, 109, 110, - 119, 120, 121, 122, 115, 116, 150, 157, 134, 135, - 161, 122, 163, 124, 125, 126, 80, 116, 162, 138, - 164, 163, 116, 80, 150, 136, 137, 8, 139, 140, - 141, 142, 143, 144, 145, 146, 162, 8, 164, 138, - 70, 152, 153, 162, 138, 156, 157, 158, 159, 80, - 116, 162, 116, 8, 82, 166, 167, 168, 1, 75, - 76, 77, 160, 75, 76, 160, 164, 8, 84, 164, - 75, 76, 138, 137, 90, 8, 92, 8, 94, 8, - 96, 8, 30, 70, 71, 31, 80, 31, 31, 31, - 106, 38, 156, 157, 158, 82, 162, 37, 38, 86, - 157, 117, 118, 14, 134, 135, 122, 164, 70, 1, - 14, 127, 128, 129, 130, 131, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 70, 71, 80, 164, 164, 122, 164, 168, 14, 31, - 168, 84, 82, 14, 160, 14, 86, 31, 164, 165, - 137, 16, 139, 140, 141, 142, 143, 144, 145, 59, - 60, 16, 156, 157, 158, 152, 153, 70, 116, 1, - 70, 165, 134, 135, 16, 162, 101, 102, 106, 107, - 167, 168, 122, 106, 107, 111, 112, 37, 38, 137, - 138, 16, 84, 1, 0, 1, 136, 137, 31, 139, - 140, 141, 142, 143, 144, 145, 16, 16, 156, 157, - 158, 16, 152, 153, 162, 16, 16, 160, 16, 37, - 38, 164, 162, 31, 74, 16, 16, 167, 168, 16, - 80, 134, 135, 35, 134, 135, 31, 87, 88, 89, - 37, 91, 31, 93, 37, 95, 31, 150, 98, 70, - 150, 31, 84, 103, 104, 105, 74, 31, 31, 109, - 110, 164, 80, 31, 164, 115, 116, 31, 160, 87, - 88, 89, 164, 91, 124, 93, 84, 95, 84, 35, - 98, 31, 31, 31, 31, 103, 104, 105, 31, 31, - 31, 109, 110, 31, 57, 35, 35, 115, 116, 35, - 106, 35, 108, 70, 71, 155, 124, 113, 35, 37, - 69, 117, 118, 134, 135, 82, 122, 37, 70, 86, - 77, 127, 128, 129, 130, 131, 70, 80, 160, 150, - 85, 82, 164, 94, 80, 89, 96, 82, 100, 97, - 128, 113, 154, 164, 114, 151, 83, 31, 132, 132, - 154, 133, 160, 147, 160, 122, 164, 90, 164, 165, - 92, 137, 97, 155, 150, 161, 97, 166, 147, 150, - 137, 100, 139, 140, 141, 142, 143, 144, 145, 31, - -1, 150, 134, 135, 150, 152, 153, 162, 159, 167, - 74, 156, -1, -1, -1, 162, 80, -1, 150, -1, - 167, 168, -1, 87, 88, 89, -1, 91, -1, 93, - -1, 95, 164, -1, 98, -1, -1, -1, -1, 103, - 104, 105, 74, -1, 150, 109, 110, -1, 80, -1, - 1, 115, 116, 163, -1, 87, 88, 89, 160, 91, - 124, 93, 160, 95, 160, 160, 98, 160, 160, 1, - 160, 103, 104, 105, 74, 160, 160, 109, 110, 160, - 80, 160, 160, 115, 116, 160, 160, 87, 88, 89, - 160, 91, 124, 93, 160, 95, 161, 160, 98, 160, - 160, 163, 102, 103, 104, 105, 74, 161, 161, 109, - 110, 161, 80, 81, 161, 115, 116, 162, 162, 87, - 88, 89, 162, 91, 124, 93, 162, 95, 162, 162, - 98, 162, 162, 84, 162, 103, 104, 105, 162, 162, - 1, 109, 110, 162, 162, 162, 162, 115, 116, 100, - 101, 102, 84, 162, 162, 106, 124, 1, 162, 162, - 162, 162, 168, 162, 162, 162, 117, 118, 100, 101, - 102, 122, 162, 162, 106, 162, 127, 128, 129, 130, - 131, 162, 162, 162, 162, 117, 118, 31, 162, 162, - 122, 162, 162, 162, -1, 127, 128, 129, 130, 131, - 162, 162, 165, 163, 163, 74, 163, 163, 163, 160, - 163, 80, 164, 164, 165, 163, 163, 163, 87, 88, - 89, 82, 91, 163, 93, 163, 95, 163, 160, 98, - 163, 165, 164, 165, 103, 104, 105, 163, 82, 163, - 109, 110, 163, 163, 163, 163, 115, 116, 163, 163, - 163, 163, 163, 163, 163, 124, 117, 118, 163, 163, - 163, 122, 163, 163, 163, 163, 163, 128, 163, 163, - 163, 163, 163, 117, 118, 163, 137, 163, 122, 163, - 165, 164, 164, 164, 128, 164, 164, 164, 164, 164, - 164, 164, 164, 137, 164, -1, -1, 165, 159, 165, - 165, 162, 165, 165, -1, 165, 165, 168, 165, 165, - 165, 165, 165, 165, 165, 159, 165, 165, 162, 165, - 165, -1, 165, 165, 168, 165, 165, 165, 165 + 117, 118, 119, 120, 121, 122, 137, 138, 8, 126, + 127, 128, 129, 160, 131, 132, 133, 134, 135, 136, + 167, 116, 139, 140, 141, 142, 143, 144, 145, 167, + 147, 148, 82, 171, 8, 116, 167, 154, 155, 156, + 2, 3, 4, 5, 6, 7, 141, 101, 8, 84, + 12, 13, 106, 15, 108, 70, 9, 10, 11, 113, + 141, 14, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 1, 163, 53, 54, 55, 167, 57, + 8, 117, 118, 116, 165, 30, 122, 1, 50, 51, + 140, 69, 8, 163, 56, 131, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 140, 70, 71, + 72, 73, 74, 8, 168, 165, 78, 79, 80, 8, + 82, 171, 137, 138, 86, 87, 88, 89, 163, 91, + 1, 93, 167, 95, 70, 80, 98, 99, 153, 1, + 8, 103, 104, 105, 106, 107, 122, 109, 110, 1, + 165, 8, 167, 115, 116, 1, 50, 51, 52, 70, + 122, 1, 106, 107, 8, 127, 128, 129, 106, 31, + 108, 116, 116, 132, 133, 134, 8, 139, 140, 31, + 142, 143, 144, 145, 146, 147, 148, 149, 106, 165, + 108, 31, 8, 155, 156, 140, 141, 159, 160, 161, + 162, 137, 138, 165, 75, 76, 77, 169, 170, 171, + 16, 0, 1, 84, 159, 160, 161, 153, 14, 90, + 165, 92, 84, 94, 14, 96, 137, 138, 14, 165, + 1, 167, 84, 16, 80, 106, 164, 8, 166, 37, + 38, 159, 153, 164, 84, 166, 117, 118, 14, 37, + 38, 122, 51, 167, 165, 116, 167, 171, 14, 130, + 131, 132, 133, 134, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 14, 70, + 141, 80, 70, 71, 83, 14, 1, 31, 75, 76, + 75, 76, 163, 16, 82, 84, 167, 168, 86, 101, + 102, 163, 106, 107, 165, 167, 16, 59, 60, 106, + 107, 163, 16, 16, 16, 167, 31, 106, 70, 108, + 1, 167, 16, 163, 113, 171, 16, 167, 117, 118, + 111, 112, 16, 122, 122, 31, 16, 16, 37, 38, + 16, 130, 131, 132, 133, 134, 137, 138, 31, 30, + 1, 139, 140, 31, 142, 143, 144, 145, 146, 147, + 148, 31, 153, 31, 31, 154, 80, 155, 156, 84, + 31, 37, 38, 31, 163, 74, 167, 165, 167, 168, + 31, 80, 170, 171, 31, 137, 138, 30, 87, 88, + 89, 31, 91, 31, 93, 31, 95, 31, 31, 98, + 31, 153, 116, 31, 103, 104, 105, 31, 74, 31, + 109, 110, 31, 31, 80, 167, 115, 116, 70, 71, + 35, 87, 88, 89, 35, 91, 140, 93, 127, 95, + 82, 82, 98, 37, 86, 116, 35, 103, 104, 105, + 35, 35, 35, 109, 110, 159, 160, 161, 163, 115, + 116, 35, 167, 70, 71, 37, 37, 37, 70, 158, + 141, 127, 38, 69, 77, 82, 117, 118, 70, 86, + 122, 122, 57, 116, 82, 80, 83, 80, 92, 89, + 131, 82, 114, 113, 165, 85, 131, 96, 140, 140, + 142, 143, 144, 145, 146, 147, 148, 94, 141, 90, + 31, 97, 100, 155, 156, 122, 135, 97, 97, 135, + 158, 162, 100, 165, 165, 136, 153, 140, 170, 171, + 171, 162, 165, 140, 159, 142, 143, 144, 145, 146, + 147, 148, 157, 31, 150, 137, 138, 157, 155, 156, + 167, -1, -1, 74, -1, -1, -1, -1, 165, 80, + -1, 153, -1, 170, 171, -1, 87, 88, 89, -1, + 91, 153, 93, 150, 95, 167, -1, 98, -1, -1, + 153, -1, 103, 104, 105, 1, 74, 163, 109, 110, + 153, 153, 80, -1, 115, 116, 163, 165, 163, 87, + 88, 89, 163, 91, 163, 93, 127, 95, 1, 163, + 98, 163, 163, 163, 163, 103, 104, 105, 163, 74, + 163, 109, 110, 163, 163, 80, 163, 115, 116, 70, + 163, 163, 87, 88, 89, 163, 91, 163, 93, 127, + 95, 164, 164, 98, 164, 164, 164, 102, 103, 104, + 105, 164, 74, 165, 109, 110, 165, 165, 80, 81, + 115, 116, 165, 165, 1, 87, 88, 89, 84, 91, + 165, 93, 127, 95, 165, 165, 98, 166, 165, 165, + 165, 103, 104, 105, 100, 101, 102, 109, 110, 165, + 106, 84, 165, 115, 116, 165, 137, 138, 165, 165, + 165, 117, 118, 165, 165, 127, 122, 100, 101, 102, + 166, 165, 153, 106, 130, 131, 132, 133, 134, 165, + 165, 165, 165, 165, 117, 118, 167, 165, 165, 122, + 165, 165, 165, 165, 165, 165, 165, 130, 131, 132, + 133, 134, 74, 166, 165, 82, 165, 163, 80, 166, + 165, 167, 168, 165, 167, 87, 88, 89, 166, 91, + 166, 93, 166, 95, 166, 166, 98, 166, 166, 166, + 163, 103, 104, 105, 167, 168, 166, 109, 110, 166, + 117, 118, 166, 115, 116, 122, 166, 166, 166, 166, + 166, 166, 166, 166, 131, 127, 166, 166, 166, 166, + 166, 166, 166, 140, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, -1, 167, + 167, 167, 167, 167, 167, 162, 167, 167, 165, 167, + 169, 167, 167, -1, 171, 168, 170, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, -1, -1, -1, 171 ); protected array $actionBase = array( - 0, -2, 153, 554, 764, 999, 1018, 622, 542, 576, - 513, 475, 678, 678, 762, 678, 472, 627, 889, 738, - 738, 738, 824, 98, 307, 307, 824, 307, 720, 720, - 720, 720, 752, 752, 950, 950, 982, 918, 886, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, 1081, - 1081, 1081, 1081, 147, 45, 279, 701, 1052, 1059, 1055, - 1062, 1050, 1049, 1053, 1056, 1064, 1108, 1110, 832, 1111, - 1112, 1107, 1113, 1057, 903, 1051, 1058, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 57, 345, 171, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 630, 630, 54, - 54, 54, 356, 803, 583, 803, 803, 803, 803, 803, - 803, 803, 803, 340, 202, 670, 47, 166, 166, 7, - 7, 7, 7, 7, 1106, 66, 1089, 1089, -25, -25, - -25, -25, 451, 504, 374, 393, -93, 30, 385, 231, - 231, 417, 417, 476, 476, 9, 9, 476, 476, 476, - 471, 471, 471, 471, 320, 426, 444, -94, 306, 794, - 539, 539, 539, 539, 794, 794, 794, 794, 791, 792, - 794, 794, 794, 667, 749, 749, 818, 140, 140, 140, - 749, 443, 59, 59, 443, 235, 59, 5, 406, 367, - 782, 255, 419, 367, 364, 540, 314, 60, 805, 642, - 805, 1047, 328, 815, 815, 806, 686, 373, 890, 1080, - 1066, 808, 1104, 841, 1105, 349, 608, 628, 1046, 1046, - 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 944, - 201, 1047, 420, 944, 944, 944, 201, 201, 201, 201, - 201, 201, 201, 201, 820, 201, 201, 644, 420, 558, - 565, 420, 843, 201, 147, 789, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 139, 147, 45, 58, - 58, 333, 53, 58, 58, 58, 58, 147, 147, 147, - 147, 642, 807, 758, 647, 410, 766, 350, 807, 807, - 807, 124, 428, 125, 768, 814, 379, 817, 817, 825, - 920, 920, 817, 819, 817, 825, 817, 817, 920, 920, - 799, 920, 360, 629, 500, 599, 637, 920, 384, 817, - 817, 817, 817, 787, 920, 146, 639, 817, 377, 369, - 817, 817, 787, 786, 823, 788, 920, 920, 920, 787, - 589, 788, 788, 788, 854, 855, 798, 822, 494, 480, - 643, 288, 623, 822, 822, 817, 615, 798, 822, 798, - 822, 778, 822, 822, 822, 798, 822, 819, 545, 822, - 770, 772, 641, 198, 822, 38, 932, 933, 624, 934, - 927, 941, 988, 942, 946, 1069, 919, 952, 931, 947, - 989, 926, 922, 829, 745, 760, 801, 784, 917, 811, - 811, 811, 910, 914, 811, 811, 811, 811, 811, 811, - 811, 811, 745, 774, 844, 816, 961, 761, 765, 1032, - 776, 1016, 771, 960, 932, 946, 626, 931, 947, 926, - 922, 802, 797, 790, 796, 785, 781, 737, 775, 821, - 1036, 948, 848, 769, 997, 963, 987, 1067, 969, 970, - 1002, 1037, 857, 1038, 1065, 826, 1082, 1084, 885, 972, - 1071, 811, 906, 795, 896, 971, 916, 745, 897, 1039, - 991, 998, 1003, 1004, 1068, 835, 833, 900, 1085, 976, - 977, 979, 1072, 1073, 852, 993, 840, 1010, 839, 1087, - 1012, 1014, 1017, 1024, 1074, 1088, 1075, 905, 1076, 858, - 837, 888, 810, 1090, 285, 834, 836, 850, 981, 498, - 953, 1077, 1091, 1093, 1026, 1029, 1030, 1094, 1095, 949, - 860, 994, 809, 995, 990, 865, 866, 659, 842, 1040, - 830, 831, 777, 666, 694, 1096, 1097, 1098, 951, 827, - 813, 869, 871, 1041, 773, 1045, 1099, 699, 872, 1101, - 1035, 779, 780, 705, 728, 715, 783, 838, 1078, 804, - 800, 812, 980, 780, 828, 875, 1102, 876, 880, 884, - 1031, 887, 0, 0, 0, 0, 0, 0, 0, 0, + 0, -2, 156, 559, 641, 1004, 1027, 485, 292, 200, + -60, 283, 568, 590, 590, 715, 590, 195, 578, 892, + 395, 395, 395, 827, 313, 313, 827, 313, 731, 731, + 731, 731, 764, 764, 965, 965, 998, 932, 899, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 37, 360, 216, 701, 1062, 1068, 1064, + 1069, 1060, 1059, 1063, 1065, 1070, 1110, 1111, 812, 1112, + 1113, 1109, 1114, 1066, 907, 1061, 1067, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 135, 477, 373, 201, 201, 201, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, 201, 201, 201, 201, 642, 642, 22, + 22, 22, 362, 813, 778, 813, 813, 813, 813, 813, + 813, 813, 813, 346, 205, 678, 188, 171, 171, 7, + 7, 7, 7, 7, 376, 779, 54, 1083, 1083, 139, + 139, 139, 139, -50, 49, 749, 380, 787, -39, 569, + 569, 536, 536, 335, 335, 349, 349, 335, 335, 335, + 212, 212, 212, 212, 415, 494, 519, 512, -71, 807, + 584, 584, 584, 584, 807, 807, 807, 807, 843, 1086, + 807, 807, 807, 639, 828, 828, 979, 452, 452, 452, + 828, 492, -70, -70, 492, 394, -70, 516, 631, 397, + 785, 486, 509, 397, -16, 299, 502, 233, 795, 626, + 795, 1058, 199, 830, 830, 794, 752, 454, 894, 1085, + 1071, 832, 1107, 842, 1108, 471, 10, 747, 1056, 1056, + 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1115, + 632, 1058, 145, 1115, 1115, 1115, 632, 632, 632, 632, + 632, 632, 632, 632, 796, 632, 632, 649, 145, 643, + 645, 145, 846, 632, 37, 838, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, -18, 37, 360, 5, + 5, 341, 52, 5, 5, 5, 5, 37, 37, 37, + 37, 626, 845, 805, 633, 278, 810, 128, 845, 845, + 845, 26, 136, 120, 815, 819, 259, 825, 825, 829, + 930, 930, 825, 822, 825, 829, 825, 825, 930, 930, + 789, 930, 163, 562, 456, 535, 573, 930, 273, 825, + 825, 825, 825, 804, 930, 58, 586, 825, 234, 194, + 825, 825, 804, 801, 802, 809, 930, 930, 930, 804, + 514, 809, 809, 809, 855, 859, 800, 799, 430, 390, + 614, 127, 854, 799, 799, 825, 541, 800, 799, 800, + 799, 782, 799, 799, 799, 800, 799, 822, 470, 799, + 740, 746, 598, 75, 799, 19, 947, 950, 686, 953, + 935, 954, 1005, 955, 958, 1073, 929, 976, 944, 959, + 1008, 934, 933, 811, 720, 726, 847, 793, 925, 824, + 824, 824, 912, 917, 824, 824, 824, 824, 824, 824, + 824, 824, 720, 897, 858, 820, 982, 727, 728, 1045, + 814, 1089, 1081, 978, 947, 958, 734, 944, 959, 934, + 933, 792, 790, 772, 783, 769, 763, 760, 762, 797, + 1047, 966, 844, 736, 1018, 983, 1087, 1007, 985, 986, + 1019, 1050, 861, 1051, 1090, 818, 1091, 1092, 898, 988, + 1074, 824, 911, 852, 900, 987, 918, 720, 901, 1052, + 1003, 803, 1021, 1022, 1072, 840, 823, 902, 1093, 989, + 990, 991, 1075, 1076, 853, 1012, 931, 1023, 841, 1094, + 1030, 1033, 1036, 1040, 1077, 1095, 1079, 908, 1080, 866, + 839, 964, 821, 1096, 634, 836, 837, 850, 1001, 640, + 977, 1082, 1097, 1098, 1041, 1042, 1043, 1099, 1100, 974, + 868, 1014, 833, 1016, 997, 869, 870, 644, 849, 1053, + 831, 835, 848, 664, 674, 1101, 1102, 1103, 975, 806, + 817, 871, 875, 1054, 826, 1055, 1104, 694, 877, 1105, + 1046, 750, 751, 624, 707, 647, 754, 816, 1084, 857, + 798, 834, 999, 751, 808, 880, 1106, 881, 883, 887, + 1044, 888, 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, 459, 459, 459, 459, 459, 459, 307, 307, - 307, 307, 459, 459, 459, 459, 459, 459, 459, 307, - 459, 459, 459, 307, 307, 0, 0, 307, 0, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 0, 0, + 0, 0, 468, 468, 468, 468, 468, 468, 313, 313, + 313, 313, 313, 468, 468, 468, 468, 468, 468, 468, + 313, 468, 468, 468, 313, 0, 0, 313, 0, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 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, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 506, 506, - 291, 291, 291, 291, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 291, 291, 0, 291, 291, 291, - 291, 291, 291, 291, 291, 506, 799, 506, 506, 140, - 140, 140, 140, 506, 506, 506, -88, -88, 506, 235, - 506, 506, 140, 140, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 506, 506, 0, 0, 0, 420, 59, - 506, 819, 819, 819, 819, 506, 506, 506, 506, 59, - 59, 506, 506, 506, 0, 0, 0, 0, 0, 0, - 0, 0, 420, 0, 0, 420, 0, 0, 819, 819, - 506, 235, 799, 144, 506, 0, 0, 0, 0, 420, - 819, 420, 201, 817, 59, 59, 201, 201, 817, 58, - 147, 144, 645, 645, 645, 645, 0, 0, 642, 799, - 799, 799, 799, 799, 799, 799, 799, 799, 799, 799, - 819, 0, 799, 0, 819, 819, 819, 0, 0, 0, - 0, 0, 0, 0, 0, 920, 0, 0, 0, 0, - 0, 0, 0, 819, 0, 0, 920, 0, 0, 0, + 0, 0, 0, 0, 0, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 716, 716, + 297, 297, 297, 297, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 297, 297, 0, 297, 297, 297, + 297, 297, 297, 297, 297, 789, 716, 716, 716, 716, + 452, 452, 452, 452, -95, -95, 716, 716, 716, 394, + 716, 716, 452, 452, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 0, 0, 0, 145, -70, + 716, 822, 822, 822, 822, 716, 716, 716, 716, -70, + -70, 716, 716, 716, 0, 0, 0, 0, 0, 0, + 0, 0, 145, 0, 0, 145, 0, 0, 822, 822, + 716, 394, 789, 659, 716, 0, 0, 0, 0, 145, + 822, 145, 632, 825, -70, -70, 632, 632, 825, 5, + 37, 659, 628, 628, 628, 628, 0, 0, 626, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 822, 0, 789, 0, 822, 822, 822, 0, 0, 0, + 0, 0, 0, 0, 0, 930, 0, 0, 0, 0, + 0, 0, 0, 822, 0, 0, 930, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 819, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 811, 835, 0, 0, 835, 0, 811, - 811, 811, 0, 0, 0, 842, 773 + 0, 0, 0, 822, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 824, 840, 0, 0, 840, 0, 824, + 824, 824, 0, 0, 0, 849, 826 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 611, 611, - 611, 611,32767,32767, 254, 102,32767,32767, 480, 397, - 397, 397,32767,32767, 553, 553, 553, 553, 553,32767, - 32767,32767,32767,32767,32767, 480,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 617, 617, + 617, 617,32767,32767, 254, 102,32767,32767, 486, 403, + 403, 403,32767,32767, 559, 559, 559, 559, 559,32767, + 32767,32767,32767,32767,32767, 486,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, @@ -784,150 +792,142 @@ class Php7 extends \PhpParser\ParserAbstract 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, 36, 7, - 8, 10, 11, 49, 17, 324, 100,32767,32767,32767, + 8, 10, 11, 49, 17, 327, 100,32767,32767,32767, 32767,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 604,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 610,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 385, 484, 463, - 464, 466, 467, 396, 554, 610, 327, 607, 329, 395, - 145, 339, 330, 242, 258, 485, 259, 486, 489, 490, - 215, 382, 149, 150, 427, 481, 429, 479, 483, 428, - 402, 408, 409, 410, 411, 412, 413, 414, 415, 416, - 417, 418, 419, 420, 400, 401, 482,32767,32767, 460, - 459, 458, 425,32767,32767,32767,32767,32767,32767,32767, - 32767, 102,32767, 426, 430, 399, 433, 431, 432, 449, - 450, 447, 448, 451,32767,32767,32767,32767, 452, 453, - 454, 455, 316,32767,32767, 366, 364, 316, 111,32767, - 32767, 440, 441,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 497, 547, 457,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 391, 490, 469, + 470, 472, 473, 402, 560, 616, 330, 613, 332, 401, + 145, 342, 333, 242, 258, 491, 259, 492, 495, 496, + 215, 388, 149, 150, 433, 487, 435, 485, 489, 434, + 408, 414, 415, 416, 417, 418, 419, 420, 421, 422, + 423, 424, 425, 426, 406, 407, 488,32767,32767, 466, + 465, 464, 431,32767,32767,32767,32767,32767,32767,32767, + 32767, 102,32767, 432, 436, 405, 439, 437, 438, 455, + 456, 453, 454, 457,32767,32767, 319,32767,32767, 458, + 459, 460, 461, 369, 367,32767,32767, 319, 111,32767, + 32767, 446, 447,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 503, 553, 463,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 102,32767, 100, 549, 422, 424, 517, 435, 436, 434, - 403,32767, 522,32767, 102,32767, 524,32767,32767,32767, - 32767,32767,32767,32767, 548,32767, 555, 555,32767, 510, - 100, 195,32767,32767, 523, 195, 195,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 618, 510, 110, 110, + 102,32767, 100, 555, 428, 430, 523, 441, 442, 440, + 409,32767, 528,32767, 102,32767, 530,32767,32767,32767, + 32767,32767,32767,32767, 554,32767, 561, 561,32767, 516, + 100, 195,32767,32767, 529, 195, 195,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 624, 516, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, 110,32767,32767,32767, 100, 195, 195, 195, 195, - 195, 195, 195, 195, 525, 195, 195, 190,32767, 268, - 270, 102, 572, 195,32767, 527,32767,32767,32767,32767, + 195, 195, 195, 195, 531, 195, 195, 190,32767, 268, + 270, 102, 578, 195,32767, 533,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, 510, 445, 138,32767, 512, 138, 555, 437, 438, - 439, 555, 555, 555, 312, 289,32767,32767,32767,32767, - 525, 525, 100, 100, 100, 100,32767,32767,32767,32767, - 111, 496, 99, 99, 99, 99, 99, 103, 101,32767, + 32767, 516, 451, 138,32767, 518, 138, 561, 443, 444, + 445, 561, 561, 561, 315, 292,32767,32767,32767,32767, + 531, 531, 100, 100, 100, 100,32767,32767,32767,32767, + 111, 502, 99, 99, 99, 99, 99, 103, 101,32767, 32767,32767,32767, 223,32767, 101, 99,32767, 101, 101, - 32767,32767, 223, 225, 212, 227,32767, 576, 577, 223, - 101, 227, 227, 227, 247, 247, 499, 318, 101, 99, - 101, 101, 197, 318, 318,32767, 101, 499, 318, 499, - 318, 199, 318, 318, 318, 499, 318,32767, 101, 318, - 214, 385, 99, 99, 318,32767,32767,32767, 512,32767, + 32767,32767, 223, 225, 212, 227,32767, 582, 583, 223, + 101, 227, 227, 227, 247, 247, 505, 321, 101, 99, + 101, 101, 197, 321, 321,32767, 101, 505, 321, 505, + 321, 199, 321, 321, 321, 505, 321,32767, 101, 321, + 214, 391, 99, 99, 321,32767,32767,32767, 518,32767, 32767,32767,32767,32767,32767,32767, 222,32767,32767,32767, - 32767,32767,32767,32767,32767, 542,32767, 560, 574, 443, - 444, 446, 559, 557, 468, 469, 470, 471, 472, 473, - 474, 476, 606,32767, 516,32767,32767,32767, 338,32767, - 616,32767,32767,32767, 9, 74, 505, 42, 43, 51, - 57, 531, 532, 533, 534, 528, 529, 535, 530,32767, + 32767,32767,32767,32767,32767, 548,32767, 566, 580, 449, + 450, 452, 565, 563, 474, 475, 476, 477, 478, 479, + 480, 482, 612,32767, 522,32767,32767,32767, 341,32767, + 622,32767,32767,32767, 9, 74, 511, 42, 43, 51, + 57, 537, 538, 539, 540, 534, 535, 541, 536,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 617,32767, 555,32767,32767,32767, - 32767, 442, 537, 582,32767,32767, 556, 609,32767,32767, + 32767,32767,32767,32767, 623,32767, 561,32767,32767,32767, + 32767, 448, 543, 588,32767,32767, 562, 615,32767,32767, 32767,32767,32767,32767,32767, 138,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 542,32767, 136,32767, - 32767,32767,32767,32767,32767,32767,32767, 538,32767,32767, - 32767, 555,32767,32767,32767,32767, 314, 311,32767,32767, + 32767,32767,32767,32767,32767,32767, 548,32767, 136,32767, + 32767,32767,32767,32767,32767,32767,32767, 544,32767,32767, + 32767, 561,32767,32767,32767,32767, 317, 314,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 555,32767,32767,32767,32767,32767, - 291,32767, 308,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 561,32767,32767,32767,32767,32767, + 294,32767, 311,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 381, 512, 294, 296, 297,32767,32767,32767,32767, - 360,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 152, 152, 3, 3, 341, 152, 152, 152, - 341, 341, 152, 341, 341, 341, 152, 152, 152, 152, - 152, 152, 280, 185, 262, 265, 247, 247, 152, 352, + 32767, 387, 518, 297, 299, 300,32767,32767,32767,32767, + 363,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 152, 152, 3, 3, 344, 152, 152, 152, + 344, 344, 152, 344, 344, 344, 152, 152, 152, 152, + 152, 152, 280, 185, 262, 265, 247, 247, 152, 355, 152 ); protected array $goto = array( - 196, 196, 1036, 502, 699, 503, 1067, 432, 664, 624, - 661, 509, 708, 427, 320, 314, 315, 336, 596, 431, - 337, 433, 641, 895, 853, 895, 895, 166, 166, 166, + 196, 196, 1039, 1070, 699, 464, 586, 469, 469, 854, + 735, 640, 642, 1203, 855, 662, 469, 352, 708, 686, + 689, 1012, 697, 706, 1008, 624, 661, 166, 166, 166, 166, 220, 197, 193, 193, 176, 178, 215, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 188, 189, 190, 191, 192, 217, 215, 218, 539, 540, 422, 541, - 544, 545, 546, 547, 548, 549, 550, 551, 1148, 167, + 544, 545, 546, 547, 548, 549, 550, 551, 1154, 167, 168, 169, 195, 170, 171, 172, 165, 173, 174, 175, 177, 214, 216, 219, 239, 242, 253, 254, 256, 257, - 258, 259, 260, 261, 262, 263, 268, 269, 270, 271, + 258, 259, 260, 261, 262, 263, 269, 270, 271, 272, 281, 282, 317, 318, 319, 428, 429, 430, 601, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 179, 236, 180, 188, 189, 190, - 191, 192, 217, 1148, 198, 199, 200, 201, 240, 181, + 191, 192, 217, 1154, 198, 199, 200, 201, 240, 181, 182, 202, 183, 203, 199, 184, 241, 198, 164, 204, 205, 185, 206, 207, 208, 186, 209, 210, 187, 211, - 212, 213, 857, 613, 627, 630, 631, 632, 633, 654, - 655, 656, 710, 352, 854, 343, 278, 278, 278, 278, - 835, 626, 626, 478, 1328, 1329, 603, 1283, 1283, 1283, - 1283, 1283, 1283, 1283, 1283, 1283, 1283, 1228, 946, 344, - 343, 1229, 1232, 947, 1233, 855, 915, 862, 916, 911, - 906, 907, 920, 863, 908, 860, 909, 910, 861, 1001, - 914, 835, 973, 835, 734, 356, 977, 555, 1010, 1005, - 1089, 1084, 1085, 1086, 420, 356, 356, 355, 355, 355, - 355, 602, 1102, 657, 658, 481, 675, 676, 677, 356, - 356, 711, 483, 356, 829, 1370, 459, 510, 702, 1252, - 1100, 1252, 1252, 888, 469, 469, 558, 1036, 1036, 1252, - 356, 356, 1036, 469, 1036, 1036, 1109, 1110, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1335, - 1335, 1335, 1335, 696, 1252, 870, 831, 464, 593, 1252, - 1252, 1252, 1252, 441, 1197, 1252, 1252, 1252, 696, 563, - 556, 882, 696, 554, 869, 554, 554, 1039, 1039, 1314, - 350, 684, 954, 554, 928, 1031, 1047, 1048, 929, 1343, - 426, 944, 615, 1353, 1353, 5, 944, 6, 998, 511, - 342, 556, 563, 588, 589, 347, 599, 605, 457, 620, - 621, 1353, 396, 971, 971, 971, 971, 25, 591, 457, - 965, 972, 969, 411, 707, 1302, 1302, 1060, 1356, 1356, - 558, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, 1302, - 1302, 1299, 1299, 398, 401, 604, 608, 1299, 1299, 1299, - 1299, 1299, 1299, 1299, 1299, 1299, 1299, 543, 543, 1042, - 1041, 850, 663, 543, 543, 543, 543, 543, 543, 543, - 543, 543, 543, 634, 636, 638, 552, 552, 552, 552, - 1145, 607, 1045, 1046, 353, 354, 557, 583, 439, 326, - 309, 557, 685, 583, 1245, 399, 463, 450, 450, 450, - 450, 847, 1325, 669, 1325, 1325, 1330, 1331, 472, 600, - 473, 474, 1325, 338, 850, 960, 880, 586, 875, 1361, - 1362, 735, 640, 642, 597, 618, 662, 872, 405, 619, - 686, 689, 1012, 697, 706, 1008, 1020, 1073, 1337, 1337, - 1337, 1337, 542, 542, 878, 249, 249, 1243, 542, 738, - 542, 542, 542, 542, 542, 542, 542, 542, 325, 275, - 325, 325, 479, 1077, 884, 1321, 0, 982, 1027, 1120, - 1247, 0, 247, 247, 247, 247, 244, 250, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 450, 450, 450, 450, 450, 450, 450, 450, 450, - 450, 450, 0, 0, 450, 0, 0, 1075, 0, 409, - 410, 1323, 1323, 1075, 673, 0, 674, 0, 413, 414, - 415, 0, 687, 1248, 1249, 416, 1235, 0, 0, 0, - 348, 609, 845, 850, 933, 1135, 0, 0, 0, 1235, - 0, 0, 883, 871, 1072, 1076, 1017, 0, 0, 0, - 0, 1250, 1311, 1312, 874, 980, 667, 996, 0, 0, - 0, 0, 868, 434, 0, 0, 0, 0, 434, 0, - 0, 0, 0, 0, 1242, 0, 1043, 1043, 970, 0, - 0, 668, 1054, 1050, 1051, 1015, 1015, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1118, 887, 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, + 212, 213, 278, 278, 278, 278, 857, 1112, 1113, 1359, + 1359, 603, 613, 627, 630, 631, 632, 633, 654, 655, + 656, 710, 356, 895, 853, 895, 895, 1359, 432, 664, + 977, 459, 356, 356, 427, 320, 314, 315, 336, 596, + 431, 337, 433, 641, 1362, 1362, 356, 356, 563, 556, + 356, 862, 1376, 911, 906, 907, 920, 863, 908, 860, + 909, 910, 861, 558, 914, 1234, 946, 356, 356, 1235, + 1238, 947, 1239, 829, 1092, 1087, 1088, 1089, 441, 342, + 556, 563, 588, 589, 347, 599, 605, 420, 620, 621, + 355, 355, 355, 355, 657, 658, 25, 675, 676, 677, + 1258, 1039, 1258, 1258, 398, 401, 604, 608, 353, 354, + 1039, 1258, 1039, 696, 1039, 1039, 1320, 831, 1039, 1039, + 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 696, + 850, 481, 696, 888, 1258, 343, 511, 870, 483, 1258, + 1258, 1258, 1258, 593, 835, 1258, 1258, 1258, 1341, 1341, + 1341, 1341, 554, 882, 554, 554, 869, 1045, 1044, 344, + 343, 1048, 1049, 554, 928, 626, 626, 558, 929, 1336, + 1337, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, + 1289, 350, 915, 850, 916, 835, 457, 835, 326, 309, + 944, 971, 971, 971, 971, 944, 1349, 457, 965, 972, + 1308, 1308, 478, 1334, 1335, 998, 1308, 1308, 1308, 1308, + 1308, 1308, 1308, 1308, 1308, 1308, 502, 426, 503, 615, + 552, 552, 552, 552, 509, 607, 1305, 1305, 634, 636, + 638, 1251, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, + 1305, 1305, 543, 543, 396, 249, 249, 591, 543, 543, + 543, 543, 543, 543, 543, 543, 543, 543, 1253, 969, + 411, 707, 663, 450, 450, 1151, 450, 450, 1331, 1063, + 1331, 1331, 247, 247, 247, 247, 244, 250, 439, 1331, + 602, 1105, 5, 685, 6, 557, 583, 597, 618, 338, + 557, 711, 583, 847, 399, 463, 510, 702, 669, 1103, + 875, 960, 850, 1343, 1343, 1343, 1343, 472, 600, 473, + 474, 1254, 1255, 405, 1241, 880, 619, 872, 1367, 1368, + 845, 1249, 1076, 542, 542, 738, 1020, 1241, 884, 542, + 1327, 542, 542, 542, 542, 542, 542, 542, 542, 1256, + 1317, 1318, 1080, 878, 479, 1126, 982, 1030, 0, 0, + 0, 273, 325, 0, 325, 325, 0, 450, 450, 450, + 450, 450, 450, 450, 450, 450, 450, 450, 0, 0, + 450, 0, 1078, 0, 409, 410, 1329, 1329, 1078, 673, + 0, 674, 0, 413, 414, 415, 0, 687, 609, 0, + 416, 933, 1141, 0, 0, 348, 883, 871, 1075, 1079, + 0, 434, 0, 1017, 0, 0, 0, 0, 0, 980, + 0, 874, 434, 667, 996, 0, 0, 0, 0, 868, + 1046, 1046, 0, 0, 0, 668, 1057, 1053, 1054, 1015, + 1015, 1248, 970, 1042, 1042, 0, 0, 684, 954, 0, + 0, 1034, 1050, 1051, 1001, 0, 0, 973, 0, 734, + 0, 0, 555, 1010, 1005, 1124, 887, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 252 ); protected array $gotoCheck = array( - 42, 42, 73, 160, 73, 160, 128, 66, 66, 56, - 56, 160, 9, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 25, 25, 25, 25, 42, 42, 42, + 42, 42, 73, 128, 73, 156, 48, 154, 154, 26, + 48, 48, 48, 156, 27, 48, 154, 97, 9, 48, + 48, 48, 48, 48, 48, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -941,108 +941,100 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 15, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 97, 26, 174, 23, 23, 23, 23, - 12, 108, 108, 182, 182, 182, 131, 108, 108, 108, - 108, 108, 108, 108, 108, 108, 108, 79, 79, 174, - 174, 79, 79, 79, 79, 27, 65, 15, 65, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 50, - 15, 12, 50, 12, 50, 14, 49, 50, 50, 50, - 15, 15, 15, 15, 43, 14, 14, 24, 24, 24, - 24, 8, 8, 86, 86, 84, 86, 86, 86, 14, - 14, 8, 84, 14, 6, 14, 83, 8, 8, 73, - 8, 73, 73, 45, 154, 154, 14, 73, 73, 73, - 14, 14, 73, 154, 73, 73, 145, 145, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 9, - 9, 9, 9, 7, 73, 35, 7, 156, 178, 73, - 73, 73, 73, 83, 156, 73, 73, 73, 7, 76, - 76, 35, 7, 19, 35, 19, 19, 89, 89, 14, - 185, 89, 89, 19, 73, 89, 89, 89, 73, 187, - 13, 9, 13, 188, 188, 46, 9, 46, 103, 14, - 76, 76, 76, 76, 76, 76, 76, 76, 19, 76, - 76, 188, 62, 19, 19, 19, 19, 76, 104, 19, - 19, 19, 93, 93, 93, 176, 176, 115, 188, 188, - 14, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 177, 177, 59, 59, 59, 59, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 179, 179, 119, - 119, 22, 64, 179, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 85, 85, 85, 107, 107, 107, 107, - 155, 107, 120, 120, 97, 97, 9, 9, 113, 175, - 175, 9, 117, 9, 14, 9, 9, 23, 23, 23, - 23, 18, 131, 121, 131, 131, 184, 184, 9, 9, - 9, 9, 131, 29, 22, 92, 9, 48, 39, 9, - 9, 48, 48, 48, 2, 2, 48, 37, 28, 80, - 48, 48, 48, 48, 48, 48, 110, 130, 131, 131, - 131, 131, 162, 162, 9, 5, 5, 166, 162, 99, - 162, 162, 162, 162, 162, 162, 162, 162, 24, 24, - 24, 24, 157, 133, 41, 131, -1, 96, 114, 148, - 20, -1, 5, 5, 5, 5, 5, 5, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, -1, -1, 23, -1, -1, 131, -1, 82, - 82, 131, 131, 131, 82, -1, 82, -1, 82, 82, - 82, -1, 82, 20, 20, 82, 20, -1, -1, -1, - 82, 17, 20, 22, 17, 17, -1, -1, -1, 20, - -1, -1, 16, 16, 16, 16, 17, -1, -1, -1, - -1, 20, 20, 20, 17, 16, 17, 17, -1, -1, - -1, -1, 17, 118, -1, -1, -1, -1, 118, -1, - -1, -1, -1, -1, 17, -1, 118, 118, 16, -1, - -1, 118, 118, 118, 118, 107, 107, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 16, 16, -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, + 42, 42, 23, 23, 23, 23, 15, 145, 145, 188, + 188, 131, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 14, 25, 25, 25, 25, 188, 66, 66, + 49, 83, 14, 14, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 188, 188, 14, 14, 76, 76, + 14, 15, 14, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 14, 15, 79, 79, 14, 14, 79, + 79, 79, 79, 6, 15, 15, 15, 15, 83, 76, + 76, 76, 76, 76, 76, 76, 76, 43, 76, 76, + 24, 24, 24, 24, 86, 86, 76, 86, 86, 86, + 73, 73, 73, 73, 59, 59, 59, 59, 97, 97, + 73, 73, 73, 7, 73, 73, 14, 7, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 7, + 22, 84, 7, 45, 73, 174, 14, 35, 84, 73, + 73, 73, 73, 178, 12, 73, 73, 73, 9, 9, + 9, 9, 19, 35, 19, 19, 35, 119, 119, 174, + 174, 120, 120, 19, 73, 108, 108, 14, 73, 184, + 184, 108, 108, 108, 108, 108, 108, 108, 108, 108, + 108, 185, 65, 22, 65, 12, 19, 12, 175, 175, + 9, 19, 19, 19, 19, 9, 187, 19, 19, 19, + 176, 176, 182, 182, 182, 103, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 160, 13, 160, 13, + 107, 107, 107, 107, 160, 107, 177, 177, 85, 85, + 85, 14, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 179, 179, 62, 5, 5, 104, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 20, 93, + 93, 93, 64, 23, 23, 155, 23, 23, 131, 115, + 131, 131, 5, 5, 5, 5, 5, 5, 113, 131, + 8, 8, 46, 117, 46, 9, 9, 2, 2, 29, + 9, 8, 9, 18, 9, 9, 8, 8, 121, 8, + 39, 92, 22, 131, 131, 131, 131, 9, 9, 9, + 9, 20, 20, 28, 20, 9, 80, 37, 9, 9, + 20, 166, 130, 162, 162, 99, 110, 20, 41, 162, + 131, 162, 162, 162, 162, 162, 162, 162, 162, 20, + 20, 20, 133, 9, 157, 148, 96, 114, -1, -1, + -1, 24, 24, -1, 24, 24, -1, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, -1, -1, + 23, -1, 131, -1, 82, 82, 131, 131, 131, 82, + -1, 82, -1, 82, 82, 82, -1, 82, 17, -1, + 82, 17, 17, -1, -1, 82, 16, 16, 16, 16, + -1, 118, -1, 17, -1, -1, -1, -1, -1, 16, + -1, 17, 118, 17, 17, -1, -1, -1, -1, 17, + 118, 118, -1, -1, -1, 118, 118, 118, 118, 107, + 107, 17, 16, 89, 89, -1, -1, 89, 89, -1, + -1, 89, 89, 89, 50, -1, -1, 50, -1, 50, + -1, -1, 50, 50, 50, 16, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 5 ); protected array $gotoBase = array( - 0, 0, -250, 0, 0, 484, 231, 286, 233, -11, - 0, 0, -117, -8, -73, -187, 129, 106, 131, 49, - 115, 0, 123, 173, 234, 20, 170, 201, 130, 156, - 0, 0, 0, 0, 0, -77, 0, 127, 0, 134, - 0, 62, -1, 212, 0, 237, -403, 0, -256, 209, - 208, 0, 0, 0, 0, 0, -31, 0, 0, 338, - 0, 0, 310, 0, 164, 193, -230, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -36, 0, 0, -212, - 122, -196, 56, -22, -227, -68, -477, 0, 0, 38, - 0, 0, 125, 57, 0, 0, 63, -312, 0, 81, - 0, 0, 0, 303, 315, 0, 0, 388, -56, 0, - 105, 0, 0, 151, -3, 94, 0, 149, 331, 120, - 137, 153, 0, 0, 0, 0, 0, 0, 4, 0, - 102, 178, 0, 60, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 0, 64, 0, - 0, 0, 0, 0, 230, 176, 30, 61, 0, 0, - -494, 0, 245, 0, 0, 0, 117, 0, 0, 0, - 0, 0, 0, 0, -123, 107, 128, 144, 269, 160, - 0, 0, -118, 0, 73, 290, 0, 298, 25, 0, + 0, 0, -267, 0, 0, 404, 223, 266, 432, 8, + 0, 0, 7, 39, -116, -183, 103, 83, 143, 47, + 23, 0, 12, 159, 247, 180, 5, 10, 135, 152, + 0, 0, 0, 0, 0, -75, 0, 137, 0, 136, + 0, 46, -1, 224, 0, 267, -296, 0, -707, 172, + 592, 0, 0, 0, 0, 0, -15, 0, 0, 219, + 0, 0, 362, 0, 184, 328, -49, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -137, 0, 0, -184, + 129, -187, 41, -87, -181, -93, -466, 0, 0, 314, + 0, 0, 131, 114, 0, 0, 62, -468, 0, 77, + 0, 0, 0, 330, 364, 0, 0, 352, 88, 0, + 115, 0, 0, 161, -4, 154, 0, 160, 295, 38, + 36, 168, 0, 0, 0, 0, 0, 0, 1, 0, + 107, 163, 0, 59, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -106, 0, 0, 60, 0, + 0, 0, 0, 0, -27, 181, -263, 63, 0, 0, + -121, 0, 246, 0, 0, 0, 111, 0, 0, 0, + 0, 0, 0, 0, -3, 26, 123, 149, 274, 165, + 0, 0, 61, 0, -44, 311, 0, 325, -139, 0, 0 ); protected array $gotoDefault = array( -32768, 515, 742, 4, 743, 937, 818, 827, 579, 533, - 709, 349, 628, 423, 1319, 913, 1134, 598, 846, 1261, - 1267, 458, 849, 331, 732, 925, 896, 897, 402, 388, + 709, 349, 628, 423, 1325, 913, 1140, 598, 846, 1267, + 1273, 458, 849, 331, 732, 925, 896, 897, 402, 388, 394, 400, 652, 629, 496, 881, 454, 873, 488, 876, 453, 885, 163, 419, 513, 889, 3, 892, 561, 923, 975, 389, 900, 390, 680, 902, 582, 904, 905, 397, - 403, 404, 1139, 590, 625, 917, 255, 584, 918, 387, - 919, 927, 392, 395, 690, 468, 507, 501, 412, 1104, + 403, 404, 1145, 590, 625, 917, 255, 584, 918, 387, + 919, 927, 392, 395, 690, 468, 507, 501, 412, 1107, 585, 612, 649, 447, 475, 623, 635, 622, 482, 435, 417, 330, 959, 967, 489, 466, 981, 351, 989, 740, - 1147, 643, 491, 997, 644, 1004, 1007, 534, 535, 480, - 1019, 272, 1022, 492, 1028, 22, 670, 1033, 1034, 671, - 645, 1056, 646, 672, 647, 1058, 465, 580, 1066, 455, - 1074, 1307, 456, 1078, 265, 1081, 277, 418, 436, 1087, - 1088, 9, 1094, 700, 701, 18, 276, 512, 1119, 691, - -32768,-32768,-32768,-32768, 452, 1146, 451, 1216, 1218, 562, - 493, 1236, 294, 1239, 683, 508, 1244, 448, 1310, 449, - 536, 476, 316, 537, 1354, 308, 334, 313, 553, 295, - 335, 538, 477, 1316, 1324, 332, 31, 1344, 1355, 595, + 1153, 643, 491, 997, 644, 1004, 1007, 534, 535, 480, + 1019, 266, 1022, 492, 1031, 23, 670, 1036, 1037, 671, + 645, 1059, 646, 672, 647, 1061, 465, 580, 1069, 455, + 1077, 1313, 456, 1081, 264, 1084, 277, 418, 436, 1090, + 1091, 9, 1097, 700, 701, 19, 274, 512, 1125, 691, + -32768,-32768,-32768,-32768, 452, 1152, 451, 1222, 1224, 562, + 493, 1242, 294, 1245, 683, 508, 1250, 448, 1316, 449, + 536, 476, 316, 537, 1360, 308, 334, 313, 553, 295, + 335, 538, 477, 1322, 1330, 332, 31, 1350, 1361, 595, 617 ); @@ -1075,19 +1067,19 @@ class Php7 extends \PhpParser\ParserAbstract 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, - 111, 111, 112, 112, 112, 112, 110, 110, 110, 115, - 115, 115, 115, 89, 89, 118, 118, 118, 119, 119, - 116, 116, 120, 120, 122, 122, 123, 123, 117, 124, - 124, 121, 125, 125, 125, 125, 113, 113, 82, 82, - 82, 20, 20, 20, 127, 126, 126, 128, 128, 128, - 128, 60, 129, 129, 130, 61, 132, 132, 133, 133, - 134, 134, 86, 135, 135, 135, 135, 135, 135, 135, - 140, 140, 141, 141, 142, 142, 142, 142, 142, 143, - 144, 144, 139, 139, 136, 136, 138, 138, 146, 146, - 145, 145, 145, 145, 145, 145, 145, 137, 147, 147, - 149, 148, 148, 150, 150, 114, 151, 151, 153, 153, - 153, 152, 152, 62, 104, 154, 154, 56, 56, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 111, 111, 112, 112, 112, 112, 112, 112, 112, 110, + 110, 110, 115, 115, 115, 115, 89, 89, 118, 118, + 118, 119, 119, 116, 116, 120, 120, 122, 122, 123, + 123, 117, 124, 124, 121, 125, 125, 125, 125, 113, + 113, 82, 82, 82, 20, 20, 20, 127, 126, 126, + 128, 128, 128, 128, 60, 129, 129, 130, 61, 132, + 132, 133, 133, 134, 134, 86, 135, 135, 135, 135, + 135, 135, 135, 140, 140, 141, 141, 142, 142, 142, + 142, 142, 143, 144, 144, 139, 139, 136, 136, 138, + 138, 146, 146, 145, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 137, 147, 147, 149, 148, 148, 150, + 150, 114, 151, 151, 153, 153, 153, 152, 152, 62, + 104, 154, 154, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1096,20 +1088,21 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 161, 162, 162, 163, 155, 155, 160, - 160, 164, 165, 165, 166, 167, 168, 168, 168, 168, - 19, 19, 73, 73, 73, 73, 156, 156, 156, 156, - 170, 170, 159, 159, 159, 157, 157, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 177, 177, 177, - 108, 179, 179, 179, 179, 158, 158, 158, 158, 158, - 158, 158, 158, 59, 59, 173, 173, 173, 173, 173, - 180, 180, 169, 169, 169, 169, 181, 181, 181, 181, - 181, 181, 74, 74, 66, 66, 66, 66, 131, 131, - 131, 131, 184, 183, 172, 172, 172, 172, 172, 172, - 172, 171, 171, 171, 182, 182, 182, 182, 107, 178, - 186, 186, 185, 185, 187, 187, 187, 187, 187, 187, - 187, 187, 175, 175, 175, 175, 174, 189, 188, 188, - 188, 188, 188, 188, 188, 188, 190, 190, 190, 190 + 42, 42, 42, 42, 42, 42, 42, 42, 42, 161, + 162, 162, 163, 155, 155, 160, 160, 164, 165, 165, + 166, 167, 168, 168, 168, 168, 19, 19, 73, 73, + 73, 73, 156, 156, 156, 156, 170, 170, 159, 159, + 159, 157, 157, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 177, 177, 177, 108, 179, 179, 179, + 179, 158, 158, 158, 158, 158, 158, 158, 158, 59, + 59, 173, 173, 173, 173, 173, 180, 180, 169, 169, + 169, 169, 181, 181, 181, 181, 181, 181, 74, 74, + 66, 66, 66, 66, 131, 131, 131, 131, 184, 183, + 172, 172, 172, 172, 172, 172, 172, 171, 171, 171, + 182, 182, 182, 182, 107, 178, 186, 186, 185, 185, + 187, 187, 187, 187, 187, 187, 187, 187, 175, 175, + 175, 175, 174, 189, 188, 188, 188, 188, 188, 188, + 188, 188, 190, 190, 190, 190 ); protected array $ruleToLength = array( @@ -1141,41 +1134,42 @@ class Php7 extends \PhpParser\ParserAbstract 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, - 0, 2, 1, 1, 1, 1, 7, 9, 6, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, - 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, - 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, - 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, - 2, 0, 1, 5, 5, 6, 10, 3, 5, 1, - 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, - 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, - 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, - 1, 1, 3, 0, 2, 0, 5, 8, 1, 3, - 3, 0, 2, 2, 2, 3, 1, 0, 1, 1, - 3, 3, 3, 4, 4, 1, 1, 2, 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, 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, 2, 8, 9, 8, 9, 9, - 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, - 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, - 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, - 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 4, 4, 1, - 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, - 2, 2, 1, 3, 1, 4, 4, 3, 3, 3, - 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, - 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, - 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, - 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 + 0, 2, 1, 1, 1, 1, 1, 1, 1, 7, + 9, 6, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, + 3, 1, 3, 3, 1, 1, 2, 1, 1, 0, + 1, 0, 2, 2, 2, 4, 3, 1, 1, 3, + 1, 2, 2, 3, 2, 3, 1, 1, 2, 3, + 1, 1, 3, 2, 0, 1, 5, 5, 6, 10, + 3, 5, 1, 1, 3, 0, 2, 4, 5, 4, + 4, 4, 3, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 1, 3, 1, 1, 3, 0, + 2, 0, 5, 8, 1, 3, 3, 0, 2, 2, + 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, + 4, 1, 1, 2, 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, 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, + 2, 8, 9, 8, 9, 9, 10, 9, 10, 8, + 3, 2, 2, 1, 1, 0, 4, 2, 1, 3, + 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 1, 0, 1, + 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 5, 3, 3, 4, 1, 1, + 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, + 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 4, 4, 1, 4, 4, 0, 1, + 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, + 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, + 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, + 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, + 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, + 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1833,68 +1827,68 @@ protected function initReduceCallbacks(): void { $self->semValue = Modifiers::PRIVATE; }, 285 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; + $self->semValue = Modifiers::PUBLIC_SET; }, 286 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, + 287 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, + 288 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, + 289 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); }, - 287 => static function ($self, $stackPos) { + 290 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); }, - 288 => static function ($self, $stackPos) { + 291 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, - 289 => null, - 290 => static function ($self, $stackPos) { + 292 => null, + 293 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 291 => static function ($self, $stackPos) { + 294 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 292 => null, - 293 => null, - 294 => static function ($self, $stackPos) { + 295 => null, + 296 => null, + 297 => static function ($self, $stackPos) { $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 295 => static function ($self, $stackPos) { + 298 => static function ($self, $stackPos) { $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 296 => static function ($self, $stackPos) { + 299 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 297 => static function ($self, $stackPos) { + 300 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 298 => null, - 299 => static function ($self, $stackPos) { + 301 => null, + 302 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 300 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 301 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 302 => null, 303 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 304 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 305 => static function ($self, $stackPos) { + 304 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, + 305 => null, 306 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 307 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, 308 => static function ($self, $stackPos) { - $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 309 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); @@ -1905,871 +1899,889 @@ protected function initReduceCallbacks(): void { 311 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 312 => null, + 312 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, 313 => static function ($self, $stackPos) { - $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 314 => static function ($self, $stackPos) { - $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 315 => null, 316 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 317 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 318 => null, + 319 => static function ($self, $stackPos) { $self->semValue = null; }, - 317 => null, - 318 => static function ($self, $stackPos) { + 320 => null, + 321 => static function ($self, $stackPos) { $self->semValue = null; }, - 319 => static function ($self, $stackPos) { + 322 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 320 => static function ($self, $stackPos) { + 323 => static function ($self, $stackPos) { $self->semValue = null; }, - 321 => static function ($self, $stackPos) { + 324 => static function ($self, $stackPos) { $self->semValue = array(); }, - 322 => static function ($self, $stackPos) { + 325 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 323 => static function ($self, $stackPos) { + 326 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 324 => static function ($self, $stackPos) { + 327 => static function ($self, $stackPos) { $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 325 => static function ($self, $stackPos) { + 328 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 326 => static function ($self, $stackPos) { + 329 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 327 => static function ($self, $stackPos) { + 330 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 328 => static function ($self, $stackPos) { + 331 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 329 => static function ($self, $stackPos) { + 332 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 330 => static function ($self, $stackPos) { + 333 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, - 331 => null, - 332 => static function ($self, $stackPos) { + 334 => null, + 335 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 333 => static function ($self, $stackPos) { + 336 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 334 => null, - 335 => null, - 336 => static function ($self, $stackPos) { + 337 => null, + 338 => null, + 339 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 337 => static function ($self, $stackPos) { + 340 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 338 => static function ($self, $stackPos) { + 341 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 339 => static function ($self, $stackPos) { + 342 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 340 => static function ($self, $stackPos) { + 343 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 341 => static function ($self, $stackPos) { + 344 => static function ($self, $stackPos) { $self->semValue = array(); }, - 342 => static function ($self, $stackPos) { + 345 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 343 => static function ($self, $stackPos) { + 346 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 344 => static function ($self, $stackPos) { + 347 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 345 => static function ($self, $stackPos) { + 348 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 346 => static function ($self, $stackPos) { + 349 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 347 => static function ($self, $stackPos) { + 350 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 348 => static function ($self, $stackPos) { + 351 => static function ($self, $stackPos) { $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 349 => static function ($self, $stackPos) { + 352 => static function ($self, $stackPos) { $self->semValue = null; /* will be skipped */ }, - 350 => static function ($self, $stackPos) { + 353 => static function ($self, $stackPos) { $self->semValue = array(); }, - 351 => static function ($self, $stackPos) { + 354 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 352 => static function ($self, $stackPos) { + 355 => static function ($self, $stackPos) { $self->semValue = array(); }, - 353 => static function ($self, $stackPos) { + 356 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 354 => static function ($self, $stackPos) { + 357 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 355 => static function ($self, $stackPos) { + 358 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 356 => static function ($self, $stackPos) { + 359 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 357 => static function ($self, $stackPos) { + 360 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 358 => static function ($self, $stackPos) { + 361 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 359 => static function ($self, $stackPos) { + 362 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 360 => null, - 361 => static function ($self, $stackPos) { + 363 => null, + 364 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 362 => static function ($self, $stackPos) { + 365 => static function ($self, $stackPos) { $self->semValue = null; }, - 363 => null, - 364 => null, - 365 => static function ($self, $stackPos) { + 366 => null, + 367 => null, + 368 => static function ($self, $stackPos) { $self->semValue = 0; }, - 366 => static function ($self, $stackPos) { + 369 => static function ($self, $stackPos) { $self->semValue = 0; }, - 367 => null, - 368 => null, - 369 => static function ($self, $stackPos) { + 370 => null, + 371 => null, + 372 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 370 => static function ($self, $stackPos) { + 373 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 371 => static function ($self, $stackPos) { + 374 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 372 => static function ($self, $stackPos) { + 375 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 373 => static function ($self, $stackPos) { + 376 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC_SET; + }, + 377 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, + 378 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, + 379 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 374 => static function ($self, $stackPos) { + 380 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 375 => static function ($self, $stackPos) { + 381 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 376 => static function ($self, $stackPos) { + 382 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 377 => null, - 378 => static function ($self, $stackPos) { + 383 => null, + 384 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 379 => static function ($self, $stackPos) { + 385 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 380 => static function ($self, $stackPos) { + 386 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 381 => static function ($self, $stackPos) { + 387 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 382 => static function ($self, $stackPos) { + 388 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 383 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semValue = []; }, - 384 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 385 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semValue = []; }, - 386 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 387 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 388 => static function ($self, $stackPos) { + 394 => static function ($self, $stackPos) { $self->semValue = null; }, - 389 => static function ($self, $stackPos) { + 395 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 390 => static function ($self, $stackPos) { + 396 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 391 => static function ($self, $stackPos) { + 397 => static function ($self, $stackPos) { $self->semValue = 0; }, - 392 => static function ($self, $stackPos) { + 398 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 393 => null, - 394 => null, - 395 => static function ($self, $stackPos) { + 399 => null, + 400 => null, + 401 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 396 => static function ($self, $stackPos) { + 402 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 397 => static function ($self, $stackPos) { + 403 => static function ($self, $stackPos) { $self->semValue = array(); }, - 398 => null, - 399 => null, - 400 => static function ($self, $stackPos) { + 404 => null, + 405 => null, + 406 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 401 => static function ($self, $stackPos) { + 407 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 402 => static function ($self, $stackPos) { + 408 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 403 => static function ($self, $stackPos) { + 409 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 404 => static function ($self, $stackPos) { + 410 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 405 => null, - 406 => null, - 407 => static function ($self, $stackPos) { + 411 => null, + 412 => null, + 413 => static function ($self, $stackPos) { $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 408 => static function ($self, $stackPos) { + 414 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 409 => static function ($self, $stackPos) { + 415 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 410 => static function ($self, $stackPos) { + 416 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 411 => static function ($self, $stackPos) { + 417 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 412 => static function ($self, $stackPos) { + 418 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 413 => static function ($self, $stackPos) { + 419 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 414 => static function ($self, $stackPos) { + 420 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 415 => static function ($self, $stackPos) { + 421 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 416 => static function ($self, $stackPos) { + 422 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 417 => static function ($self, $stackPos) { + 423 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 418 => static function ($self, $stackPos) { + 424 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 419 => static function ($self, $stackPos) { + 425 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 420 => static function ($self, $stackPos) { + 426 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 421 => static function ($self, $stackPos) { + 427 => static function ($self, $stackPos) { $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 422 => static function ($self, $stackPos) { + 428 => static function ($self, $stackPos) { $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 423 => static function ($self, $stackPos) { + 429 => static function ($self, $stackPos) { $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 424 => static function ($self, $stackPos) { + 430 => static function ($self, $stackPos) { $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 425 => static function ($self, $stackPos) { + 431 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 426 => static function ($self, $stackPos) { + 432 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 427 => static function ($self, $stackPos) { + 433 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 428 => static function ($self, $stackPos) { + 434 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 429 => static function ($self, $stackPos) { + 435 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 430 => static function ($self, $stackPos) { + 436 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 431 => static function ($self, $stackPos) { + 437 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 432 => static function ($self, $stackPos) { + 438 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 433 => static function ($self, $stackPos) { + 439 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 434 => static function ($self, $stackPos) { + 440 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 435 => static function ($self, $stackPos) { + 441 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 436 => static function ($self, $stackPos) { + 442 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 437 => static function ($self, $stackPos) { + 443 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 438 => static function ($self, $stackPos) { + 444 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 439 => static function ($self, $stackPos) { + 445 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 440 => static function ($self, $stackPos) { + 446 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 441 => static function ($self, $stackPos) { + 447 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 442 => static function ($self, $stackPos) { + 448 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 443 => static function ($self, $stackPos) { + 449 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 444 => static function ($self, $stackPos) { + 450 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 445 => static function ($self, $stackPos) { + 451 => static function ($self, $stackPos) { $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 446 => static function ($self, $stackPos) { + 452 => static function ($self, $stackPos) { $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 447 => static function ($self, $stackPos) { + 453 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 448 => static function ($self, $stackPos) { + 454 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 449 => static function ($self, $stackPos) { + 455 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 450 => static function ($self, $stackPos) { + 456 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 451 => static function ($self, $stackPos) { + 457 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 452 => static function ($self, $stackPos) { + 458 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 453 => static function ($self, $stackPos) { + 459 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 454 => static function ($self, $stackPos) { + 460 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 455 => static function ($self, $stackPos) { + 461 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 456 => static function ($self, $stackPos) { + 462 => static function ($self, $stackPos) { $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 457 => static function ($self, $stackPos) { + 463 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 458 => static function ($self, $stackPos) { + 464 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 459 => static function ($self, $stackPos) { + 465 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 460 => static function ($self, $stackPos) { + 466 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 461 => static function ($self, $stackPos) { + 467 => static function ($self, $stackPos) { $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 462 => static function ($self, $stackPos) { + 468 => static function ($self, $stackPos) { $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 463 => static function ($self, $stackPos) { + 469 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 464 => static function ($self, $stackPos) { + 470 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 465 => static function ($self, $stackPos) { + 471 => static function ($self, $stackPos) { $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 466 => static function ($self, $stackPos) { + 472 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 467 => static function ($self, $stackPos) { + 473 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 468 => static function ($self, $stackPos) { + 474 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 469 => static function ($self, $stackPos) { + 475 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 470 => static function ($self, $stackPos) { + 476 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 471 => static function ($self, $stackPos) { + 477 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 472 => static function ($self, $stackPos) { + 478 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 473 => static function ($self, $stackPos) { + 479 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 474 => static function ($self, $stackPos) { + 480 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 475 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 476 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 477 => null, - 478 => static function ($self, $stackPos) { + 483 => null, + 484 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 479 => static function ($self, $stackPos) { + 485 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 480 => static function ($self, $stackPos) { + 486 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 481 => static function ($self, $stackPos) { + 487 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 488 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 483 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 484 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 485 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 486 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 487 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 488 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 489 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 490 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 494 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 497 => null, - 498 => null, - 499 => static function ($self, $stackPos) { + 503 => null, + 504 => null, + 505 => static function ($self, $stackPos) { $self->semValue = array(); }, - 500 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 501 => null, - 502 => static function ($self, $stackPos) { + 507 => null, + 508 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 503 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 504 => static function ($self, $stackPos) { + 510 => static function ($self, $stackPos) { $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 505 => static function ($self, $stackPos) { + 511 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 506 => static function ($self, $stackPos) { + 512 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 507 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 508 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 509 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 510 => static function ($self, $stackPos) { + 516 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 511 => null, - 512 => static function ($self, $stackPos) { + 517 => null, + 518 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 513 => static function ($self, $stackPos) { + 519 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 514 => static function ($self, $stackPos) { + 520 => static function ($self, $stackPos) { $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 515 => static function ($self, $stackPos) { + 521 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 516 => null, - 517 => null, - 518 => static function ($self, $stackPos) { + 522 => null, + 523 => null, + 524 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 519 => static function ($self, $stackPos) { + 525 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 520 => null, - 521 => null, - 522 => static function ($self, $stackPos) { + 526 => null, + 527 => null, + 528 => static function ($self, $stackPos) { $self->semValue = array(); }, - 523 => static function ($self, $stackPos) { + 529 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 524 => static function ($self, $stackPos) { + 530 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 525 => static function ($self, $stackPos) { + 531 => static function ($self, $stackPos) { $self->semValue = array(); }, - 526 => null, - 527 => static function ($self, $stackPos) { + 532 => null, + 533 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 528 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 529 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 530 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 531 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 532 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 533 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 534 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 535 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 536 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 537 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 538 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 540 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 541 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 542 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 543 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 544 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 545 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 546 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 547 => null, - 548 => null, - 549 => null, - 550 => static function ($self, $stackPos) { + 553 => null, + 554 => null, + 555 => null, + 556 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 551 => static function ($self, $stackPos) { + 557 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 552 => static function ($self, $stackPos) { + 558 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 553 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $self->semValue = null; }, - 554 => null, - 555 => null, - 556 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 557 => null, - 558 => null, - 559 => null, 560 => null, 561 => null, - 562 => null, - 563 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, + 563 => null, 564 => null, 565 => null, 566 => null, - 567 => static function ($self, $stackPos) { + 567 => null, + 568 => null, + 569 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 570 => null, + 571 => null, + 572 => null, + 573 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 568 => static function ($self, $stackPos) { + 574 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 569 => null, - 570 => static function ($self, $stackPos) { + 575 => null, + 576 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 571 => static function ($self, $stackPos) { + 577 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 572 => static function ($self, $stackPos) { + 578 => static function ($self, $stackPos) { $self->semValue = null; }, - 573 => null, - 574 => null, - 575 => null, - 576 => static function ($self, $stackPos) { + 579 => null, + 580 => null, + 581 => null, + 582 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 577 => static function ($self, $stackPos) { + 583 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 578 => null, - 579 => static function ($self, $stackPos) { + 584 => null, + 585 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 580 => static function ($self, $stackPos) { + 586 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 581 => static function ($self, $stackPos) { + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 582 => static function ($self, $stackPos) { + 588 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 583 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 584 => null, - 585 => static function ($self, $stackPos) { + 590 => null, + 591 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 586 => static function ($self, $stackPos) { + 592 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 587 => static function ($self, $stackPos) { + 593 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 588 => static function ($self, $stackPos) { + 594 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 589 => static function ($self, $stackPos) { + 595 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 590 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 591 => null, - 592 => static function ($self, $stackPos) { + 597 => null, + 598 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 593 => null, - 594 => null, - 595 => static function ($self, $stackPos) { + 599 => null, + 600 => null, + 601 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 596 => null, - 597 => static function ($self, $stackPos) { + 602 => null, + 603 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 598 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 599 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 600 => null, - 601 => static function ($self, $stackPos) { + 606 => null, + 607 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 602 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 603 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 604 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 605 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 606 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 607 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 608 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 609 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 610 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 611 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 612 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 613 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 614 => static function ($self, $stackPos) { + 620 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 615 => static function ($self, $stackPos) { + 621 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 616 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 617 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 618 => null, - 619 => static function ($self, $stackPos) { + 624 => null, + 625 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 620 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 621 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 622 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 623 => static function ($self, $stackPos) { + 629 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 624 => static function ($self, $stackPos) { + 630 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 625 => static function ($self, $stackPos) { + 631 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 626 => static function ($self, $stackPos) { + 632 => static function ($self, $stackPos) { $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 627 => static function ($self, $stackPos) { + 633 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 628 => static function ($self, $stackPos) { + 634 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 629 => null, + 635 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 2f3627b964..8c34240def 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -122,49 +122,52 @@ class Php8 extends \PhpParser\ParserAbstract public const T_PROTECTED = 357; public const T_PUBLIC = 358; public const T_READONLY = 359; - public const T_VAR = 360; - public const T_UNSET = 361; - public const T_ISSET = 362; - public const T_EMPTY = 363; - public const T_HALT_COMPILER = 364; - public const T_CLASS = 365; - public const T_TRAIT = 366; - public const T_INTERFACE = 367; - public const T_ENUM = 368; - public const T_EXTENDS = 369; - public const T_IMPLEMENTS = 370; - public const T_OBJECT_OPERATOR = 371; - public const T_NULLSAFE_OBJECT_OPERATOR = 372; - public const T_LIST = 373; - public const T_ARRAY = 374; - public const T_CALLABLE = 375; - public const T_CLASS_C = 376; - public const T_TRAIT_C = 377; - public const T_METHOD_C = 378; - public const T_FUNC_C = 379; - public const T_PROPERTY_C = 380; - public const T_LINE = 381; - public const T_FILE = 382; - public const T_START_HEREDOC = 383; - public const T_END_HEREDOC = 384; - public const T_DOLLAR_OPEN_CURLY_BRACES = 385; - public const T_CURLY_OPEN = 386; - public const T_PAAMAYIM_NEKUDOTAYIM = 387; - public const T_NAMESPACE = 388; - public const T_NS_C = 389; - public const T_DIR = 390; - public const T_NS_SEPARATOR = 391; - public const T_ELLIPSIS = 392; - public const T_NAME_FULLY_QUALIFIED = 393; - public const T_NAME_QUALIFIED = 394; - public const T_NAME_RELATIVE = 395; - public const T_ATTRIBUTE = 396; + public const T_PUBLIC_SET = 360; + public const T_PROTECTED_SET = 361; + public const T_PRIVATE_SET = 362; + public const T_VAR = 363; + public const T_UNSET = 364; + public const T_ISSET = 365; + public const T_EMPTY = 366; + public const T_HALT_COMPILER = 367; + public const T_CLASS = 368; + public const T_TRAIT = 369; + public const T_INTERFACE = 370; + public const T_ENUM = 371; + public const T_EXTENDS = 372; + public const T_IMPLEMENTS = 373; + public const T_OBJECT_OPERATOR = 374; + public const T_NULLSAFE_OBJECT_OPERATOR = 375; + public const T_LIST = 376; + public const T_ARRAY = 377; + public const T_CALLABLE = 378; + public const T_CLASS_C = 379; + public const T_TRAIT_C = 380; + public const T_METHOD_C = 381; + public const T_FUNC_C = 382; + public const T_PROPERTY_C = 383; + public const T_LINE = 384; + public const T_FILE = 385; + public const T_START_HEREDOC = 386; + public const T_END_HEREDOC = 387; + public const T_DOLLAR_OPEN_CURLY_BRACES = 388; + public const T_CURLY_OPEN = 389; + public const T_PAAMAYIM_NEKUDOTAYIM = 390; + public const T_NAMESPACE = 391; + public const T_NS_C = 392; + public const T_DIR = 393; + public const T_NS_SEPARATOR = 394; + public const T_ELLIPSIS = 395; + public const T_NAME_FULLY_QUALIFIED = 396; + public const T_NAME_QUALIFIED = 397; + public const T_NAME_RELATIVE = 398; + public const T_ATTRIBUTE = 399; - protected int $tokenToSymbolMapSize = 397; - protected int $actionTableSize = 1278; - protected int $gotoTableSize = 658; + protected int $tokenToSymbolMapSize = 400; + protected int $actionTableSize = 1289; + protected int $gotoTableSize = 685; - protected int $invalidSymbol = 169; + protected int $invalidSymbol = 172; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; @@ -296,6 +299,9 @@ class Php8 extends \PhpParser\ParserAbstract "T_PROTECTED", "T_PUBLIC", "T_READONLY", + "T_PUBLIC_SET", + "T_PROTECTED_SET", + "T_PRIVATE_SET", "T_VAR", "T_UNSET", "T_ISSET", @@ -345,32 +351,32 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $tokenToSymbol = array( - 0, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 56, 167, 169, 168, 55, 169, 169, - 162, 163, 53, 51, 8, 52, 48, 54, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 31, 160, - 44, 16, 46, 30, 68, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 70, 169, 161, 36, 169, 166, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 164, 35, 165, 58, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 169, 169, 169, 169, 169, 1, 2, 3, 4, + 0, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 56, 170, 172, 171, 55, 172, 172, + 165, 166, 53, 51, 8, 52, 48, 54, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 31, 163, + 44, 16, 46, 30, 68, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 70, 172, 164, 36, 172, 169, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 167, 35, 168, 58, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, + 172, 172, 172, 172, 172, 172, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, @@ -384,401 +390,403 @@ class Php8 extends \PhpParser\ParserAbstract 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159 + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162 ); protected array $action = array( - 126, 127, 128, 569, 129, 130, 1334, 764, 765, 766, - 131, 38,-32766,-32766,-32766, 1003,-32766,-32766,-32766,-32766, - -32766, 388, 387, 839,-32767,-32767,-32767,-32767, 101, 102, - 103, 429, 954,-32766, 0, 758, 757,-32766, 850,-32766, + 126, 127, 128, 569, 129, 130, 954, 764, 765, 766, + 131, 38, 848, -85,-32766, 1374,-32766,-32766,-32766, 0, + 839, 1132, 1133, 1134, 1128, 1127, 1126, 1135, 1129, 1130, + 1131,-32766,-32766,-32766, 850, 758, 757,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767,-32766,-32766,-32766, 24, 767,-32766,-32766,-32766, 1126, - 1127, 1128, 1125, 1124, 1123, 1129, -328, 1102, 841, 262, - 132, 389, 771, 772, 773, 774, 1118,-32766, 430,-32766, - -32766,-32766,-32766,-32766, 157, 828, 775, 776, 777, 778, + -32767, 1003,-32766, 1043, -569, 767, 1132, 1133, 1134, 1128, + 1127, 1126, 1135, 1129, 1130, 1131, 388, 387, 841, 263, + 132, 389, 771, 772, 773, 774, 429,-32766, 430, -85, + 956, 36, 246, 47, 291, 828, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 804, 570, 805, 806, 807, 808, 796, 797, 343, 344, 799, 800, 785, 786, 787, 789, 790, 791, 359, 831, 832, 833, 834, 835, - 571, 792, 793, 572, 573, -194, 816, 814, 815, 827, - 811, 812,-32766, 1040, 574, 575, 810, 576, 577, 578, - 579, -193, 580, 581, 1004, 843, 465, 466, 467, 813, - 582, 583, 721, 133, 1049, 126, 127, 128, 569, 129, - 130, 1073, 764, 765, 766, 131, 38, -110, 848, 81, - -85, 1368, -110, 321, -110,-32766,-32766,-32766, 290, 303, - 758, 757, -110, -110, -110, -110, -110, -110, -110, -110, - 758, 757,-32766,-32766,-32766, 734,-32766, 849,-32766,-32766, - -32766,-32766,-32766,-32766,-32766, 104, 105, 106, 107, 108, - 767, 272, 236,-32766, 2,-32766,-32766,-32766,-32766, 102, - 103, -328, 1293, 109, 262, 132, 389, 771, 772, 773, - 774, -342, 749, 430, 36, 246, -85, 875, 844, 876, + 571, -569, -569, 360, 792, 793, 572, 573, -331, 816, + 814, 815, 827, 811, 812, 2, -194, 574, 575, 810, + 576, 577, 578, 579, 322, 580, 581, 875, 843, 876, + 297, 298, 813, 582, 583, 721, 133, 236, 126, 127, + 128, 569, 129, 130, 1076, 764, 765, 766, 131, 38, + -32766, 26, 734, 1036, 1035, 1034, 1040, 1037, 1038, 1039, + -32766,-32766,-32766, 1004, 104, 105, 106, 107, 108, 35, + 275, 956,-32766, 758, 757, 1052, 849,-32766,-32766,-32766, + 847,-32766, 109,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + 148, 475, 476, 767,-32766,-32766,-32766, 1052,-32766, 290, + -32766,-32766,-32766,-32766,-32766, 615, 134, 263, 132, 389, + 771, 772, 773, 774, 365,-32766, 430,-32766,-32766,-32766, + -32766, 290, 143, 828, 775, 776, 777, 778, 779, 780, + 781, 782, 783, 784, 804, 570, 805, 806, 807, 808, + 796, 797, 343, 344, 799, 800, 785, 786, 787, 789, + 790, 791, 359, 831, 832, 833, 834, 835, 571,-32766, + -32766,-32766, 792, 793, 572, 573, -331, 816, 814, 815, + 827, 811, 812, 1299, -194, 574, 575, 810, 576, 577, + 578, 579, 844, 580, 581, 149, 82, 83, 84, -272, + 813, 582, 583, 249, 146, 788, 759, 760, 761, 762, + 763, 235, 764, 765, 766, 801, 802, 37, 307, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 157, 275,-32766,-32766,-32766,-32767,-32767, + -32767,-32767, 101, 102, 103, 1106, 109, 309, 621, 747, + 767,-32766,-32766,-32766, 848, 318,-32766, 1105,-32766,-32766, + -32766, 338, 845, 1355, 768, 769, 770, 771, 772, 773, + 774, 339,-32766, 837,-32766,-32766, 1384, 374, 1279, 1385, 828, 775, 776, 777, 778, 779, 780, 781, 782, 783, - 784, 804, 570, 805, 806, 807, 808, 796, 797, 343, - 344, 799, 800, 785, 786, 787, 789, 790, 791, 359, - 831, 832, 833, 834, 835, 571, 792, 793, 572, 573, - -194, 816, 814, 815, 827, 811, 812, 847, -560, 574, - 575, 810, 576, 577, 578, 579, -193, 580, 581,-32766, - 82, 83, 84, 848, 813, 582, 583, 161, 146, 788, - 759, 760, 761, 762, 763, 845, 764, 765, 766, 801, - 802, 37, 26, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 1046, 272,-32766, - -32766,-32766, -560, -560, 615, 386, 387,-32766,-32766,-32766, - 109, -272, 125, 35, 767, 429, 972, 973, -560, 1049, - -32766, 974,-32766,-32766,-32766, 489, 134, 968, 768, 769, - 770, 771, 772, 773, 774, 138, 1103, 837, 143, 321, - 747, 430, 1273, 281, 828, 775, 776, 777, 778, 779, - 780, 781, 782, 783, 784, 804, 826, 805, 806, 807, - 808, 796, 797, 798, 825, 799, 800, 785, 786, 787, - 789, 790, 791, 830, 831, 832, 833, 834, 835, 836, - 792, 793, 794, 795, 148, 816, 814, 815, 827, 811, - 812, 565, -563, 803, 809, 810, 817, 818, 820, 819, - 235, 821, 822, 1142,-32766,-32766,-32766, 739, 813, 824, - 823, 49, 50, 51, 521, 52, 53, 1268, 1267, 1269, - -32766, 54, 55, 848, 56,-32766, 1104,-32766,-32766, 1046, - 149, 291, 1126, 1127, 1128, 1125, 1124, 1123, 1129, 249, - 972, 973, 1049, 1353, 307, 974, -561, -599, 1349, -599, - 1352, 1049, -368, 1305, -368, 1072, -563, -563, 490, 309, - 57, 58, 621, 318, 933, 59, 956, 60, 243, 244, - 61, 62, 63, 64, 65, 66, 67, 68,-32766, 28, - 264, 69, 445, 522, 285,-32766,-32766, 1299, 1300, 523, - 1378, 848, 47, 1379, 724, 1297, 42, 19, 524, 933, - 525, 338, 526, 74, 527, 933, 360, 528, 529, 321, - -561, -561, 44, 45, 451, 383, 382,-32766, 46, 530, - 1036, 1035, 1034, 1037, 372, 337, -561, 839, 339, 725, - 398, 1259, 7, 532, 533, 534, 1266, -559, -567, 1049, - 758, 757, 322,-32766, -558, 536, 537, 923, 1285, 1286, - 1287, 1288, 1290, 1282, 1283, 295, 297, 298, 875, 956, - 876, 1289, 1284, 290,-32766, 1268, 1267, 1269, 296, 374, - 1046, 70, 1264, 28, 265, 316, 317, 321, 380, -153, - -153, -153, 923, 933, 396, 848, 664, 20, 923, 1297, - 683, 684, 1049, 1048, -153, 447, -153, 448, -153, 365, - -153, -559, -559, 147, 413, 151, 475, 476, -558, -558, - 381, 139, 1268, 1267, 1269, 321, 281, -559, 384, 385, - 449, 972, 973, 935, -558, 1259, 531, 719, 450, -566, - 854, 909, 968, -110, -110, -110, -565, 390, 391, 536, - 537, 152, 1285, 1286, 1287, 1288, 1290, 1282, 1283, 655, - 656, 758, 757, 153, 285, 1289, 1284, 155, 935, 33, - -78, -87, 719, -557, 935, 72, 923, 48, 719, -153, - 317, 321, 32, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, -58, -57,-32766, 123, - -4, 933, 291, 124, 1266, 135, 136, 142, 758, 757, - 156,-32766,-32766,-32766, 697,-32766, -84,-32766, 158,-32766, - 159, 160,-32766, -78, 933, 1175, 1177,-32766,-32766,-32766, - -73, 933, -72,-32766,-32766, 286, -557, -557, -557,-32766, - 426, 299, 300, -71, -70,-32766, -69, -68,-32766, -67, - 698, 1266, 935, -557, 726, -66, 719, 379,-32766,-32766, - -32766, 729,-32766, 933,-32766, -65,-32766, -46, -18,-32766, - 140, 699, 700, 271,-32766,-32766,-32766, 282, 735, 73, - -32766,-32766, 738, 932, 923, 145,-32766, 426,-32766, 272, - 1268, 1267, 1269, 736, -302,-32766, 281, 287, -298, 279, - -557, -557, 280, 28, 264, 283, 381, 923, 442, 284, - 1049, 327, 292, 294, 923, 848, -557, 972, 973, 1297, - 293, 693, 531, 950, 109, 839, 144, 535, 968, -110, - -110, -110, 848, 708, 290, 710, 28, 265, 586, 1133, - 671, 1380, 686, 304, 653, 968, 923, 969, 848, 592, - -32766, 10, 1297, 301, 308, 1259, 1304, 670, 665, 302, - 935, 1306,-32766, 952, 719, -4, 23, 847, 472, 500, - 537, 1294, 1285, 1286, 1287, 1288, 1290, 1282, 1283, 687, - -50, 619, -593, 989, 0, 1289, 1284, 719, 1259, 859, - 935, -523, 0, 0, 719, 72, 1321, 296, 0, 0, - 317, 321, 0, 537, 0, 1285, 1286, 1287, 1288, 1290, - 1282, 1283, 137, 0, 0, 0, 0, 0, 1289, 1284, - 0, 0, 935,-32766, 0, 0, 719, -513, 72, 1266, - 8, 27, 378, 317, 321, -592,-32766,-32766,-32766, 1338, - -32766, 0,-32766, 0,-32766, 1371, 40,-32766, 41, 744, - 745, 867,-32766,-32766,-32766,-32766, 914, 1013,-32766,-32766, - 990, 1266, 997, 933,-32766, 426, 987, 998,-32766,-32766, - -32766, 912,-32766,-32766,-32766, 985,-32766, 1107, 1110,-32766, - 1111, 1108, 933, 1144,-32766,-32766,-32766,-32766, 1109, 1115, - -32766,-32766, 658, 1266, -591, -567,-32766, 426, -566, -565, - -32766,-32766,-32766, -564,-32766,-32766,-32766, -507,-32766, 1, - 29,-32766, 30, 39, 43, 495,-32766,-32766,-32766,-32766, - 71, 75,-32766,-32766, 76, 1266, 599, 77,-32766, 426, - 78, 79,-32766,-32766,-32766, 80,-32766,-32766,-32766, 141, - -32766, 150, 154,-32766, 241, 323, 923, 360,-32766,-32766, - -32766, 361, 362, 1273,-32766,-32766, 363, 364, 365, 366, - -32766, 426, -250, -250, -250, 923, 367, 368, 381,-32766, - 1273, 369, 370, 373, 443, 1298, 564, 371, 0, 972, - 973, -249, -249, -249, 531, -275, -273, 381, -272, 909, - 968, -110, -110, -110, 12, 13, 14, 15, 972, 973, - -16, 17, 354, 531, 412, 491, 492, 499, 909, 968, - -110, -110, -110, 502, 503, 504, 505, 509,-32766, 510, - 511, 518, 935, 597, 1266, 34, 719, -250, 703, 1075, - 1215,-32766,-32766,-32766, 848,-32766, 1295,-32766, 1074,-32766, - 1055, 935,-32766, 1254, 741, 719, -249,-32766,-32766,-32766, - 1051, 848, -277,-32766,-32766, -102, 11, 16, 21,-32766, - 426, 312, 411, 611, 616, 644, 709, 1219,-32766, -110, - -110, 1272, 1216, 1350, -110, 315, 375, 720, 723, 727, - -110, 728, 730, 731, 732, 733, -110, -110, 737,-32766, - 749, -110, 722, 750, 0, 910, 1375, -110, 1377, 870, - 869, 878, 962, 1005, 877, 1376,-32766, 961, 959, 321, - 960, 296, 963, 1247, 74, 943, 953, 0, 941, 1143, - 321, 1139, 1096, 995, 996, 642, 1374, 1332, 296, 1347, - 0, 74, 1232, 0, 0, 0, 0, 321 + 784, 804, 826, 805, 806, 807, 808, 796, 797, 798, + 825, 799, 800, 785, 786, 787, 789, 790, 791, 830, + 831, 832, 833, 834, 835, 836, 1075, 430, -566, 792, + 793, 794, 795, 1359, 816, 814, 815, 827, 811, 812, + 1358, -193, 803, 809, 810, 817, 818, 820, 819, 138, + 821, 822, 839, 321, 380, 285, 24, 813, 824, 823, + 49, 50, 51, 521, 52, 53, -371, -110, -371, 848, + 54, 55, -110, 56, -110,-32766,-32766,-32766, 1340, 303, + 125, 1121, -110, -110, -110, -110, -110, -110, -110, -110, + -110, -110, -110, 161, 749, -566, -566, 291, 972, 973, + 465, 466, 467, 974, 396, 285, 1274, 1273, 1275, 57, + 58, -566, 565, 447, 59, 1107, 60, 243, 244, 61, + 62, 63, 64, 65, 66, 67, 68,-32766, 28, 265, + 69, 445, 522, 489, -345, 448, 1305, 1306, 523, 139, + 848, 1049, 449, 321, 1303, 42, 20, 524, 933, 525, + 933, 526, 74, 527, -567, 697, 528, 529, 321, 386, + 387, 44, 45, 451, 383, 382, 1052, 46, 530, 429, + 972, 973, 450, 372, 337, 974, 1279, 1311, 724, 933, + 1265,-32766,-32766,-32766, 968, 532, 533, 534, 854, 933, + 281, 698, -78, -565, 1272, 758, 757, 536, 537, -193, + 1291, 1292, 1293, 1294, 1296, 1288, 1289, 295, 1052, 725, + 398, 151, 7, 1295, 1290, 699, 700, 1274, 1273, 1275, + 296, -567, -567, 70, -153, -153, -153, 316, 317, 321, + 1270, 923, 290, 923, 1274, 1273, 1275, -567, 1049, -153, + 281, -153, 1148, -153, 81, -153, 739, 152, 321, -573, + 153, 758, 757,-32766, 1051, 381, 875, 848, 876, 155, + -565, -565, 923, 1052, 1049, 33, 972, 973, -58, 490, + -57, 531, 923, 1274, 1273, 1275, -565, 123, 1052, 909, + 968, -110, -110, -110, 28, 266, 124, 281, -572, 1052, + 102, 103, -110, -110,-32766,-32766, 848, -110, 135, -563, + 1303, 136, -605, 142, -605, 156, -110, 664, 21, 158, + 935, 159, 935, 160, 719,-32766, 719, -153, -305, 48, + 32, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 683, 684, 1265, 296, 758, 757, + 74, 935, -87, 933, -84, 719, 321, -4, 933, -78, + 933, 935, -73, 536, 537, 719, 1291, 1292, 1293, 1294, + 1296, 1288, 1289, 1181, 1183, 933, -563, -563, -564, 1295, + 1290, 758, 757, 726, -563,-32766, 147, 413, -301, 72, + 729, 1272, -563, -72, 317, 321, 299, 300,-32766,-32766, + -32766, -71,-32766, -70,-32766, 736,-32766, 384, 385,-32766, + 390, 391, 379, -69,-32766,-32766,-32766, -68,-32766, -67, + -32766,-32766, -66, -65, 1272, -46,-32766, 426, 28, 265, + -18,-32766,-32766,-32766, 140,-32766, 923,-32766,-32766,-32766, + 848, 923,-32766, 923, 1303, -564, -564,-32766,-32766,-32766, + 274, -563, -563,-32766,-32766, 282, 655, 656, 923,-32766, + 426, -564, 735, 381, 738, 442, 932, -563, 145, 73, + 294,-32766, 950, -571, 972, 973, 279, 280, 283, 531, + 1265, 28, 266, 284, 327, 275, 109, 535, 968, -110, + -110, -110, 286, 848, 287, 292, 293, 1303, 537, 144, + 1291, 1292, 1293, 1294, 1296, 1288, 1289, 693, 848, 1139, + -32766, 11, 839, 1295, 1290, 989, 708, 686, 670, 719, + 935, 1386, 935, 72, 719, -4, 719, 653, 317, 321, + -50, 710, 304, 1265, 586, 968, 665, 935, 969, 1310, + 671, 719, 302, 301, 10, 308, 1312, 472, 500,-32766, + -529, 537, 687, 1291, 1292, 1293, 1294, 1296, 1288, 1289, + 952, 40, 592, 137, 41, -519, 1295, 1290, 8, 27, + 619, 321, 0,-32766, 378, 0, 72, 0, 0, 1272, + 0, 317, 321, 744, 0, 0,-32766,-32766,-32766, 0, + -32766, 0,-32766, 0,-32766, 0, 0,-32766, 0, 0, + 0, 0,-32766,-32766,-32766, 933,-32766, 745,-32766,-32766, + 0, 0, 1272, 847,-32766, 426, 867, 0, 296,-32766, + -32766,-32766, 0,-32766, 914,-32766,-32766,-32766, 933, 1013, + -32766, 990, 997, 987, 998,-32766,-32766,-32766, 912,-32766, + 985,-32766,-32766, 1110, 1113, 1272, 1114,-32766, 426, 1111, + 1150, 1112,-32766,-32766,-32766, 1118,-32766, 1300,-32766,-32766, + -32766, 859, 1327,-32766, 1344, 1377, 658, 495,-32766,-32766, + -32766, -599,-32766, -598,-32766,-32766, -597, -573, 1272, 599, + -32766, 426, -572, -571, -570,-32766,-32766,-32766, 923,-32766, + -513,-32766,-32766,-32766, 1, 29,-32766, -275, 30, 39, + 43,-32766,-32766,-32766, -250, -250, -250,-32766,-32766, 71, + 381, 923, 75,-32766, 426, 76, 77, 78, 1279, 79, + 80, 972, 973, 141, 150,-32766, 531, -249, -249, -249, + -273, 154, 241, 381, 909, 968, -110, -110, -110, 323, + 360, 361, 362, 363, 972, 973, 364, 365, -16, 531, + 366, 367, 368, 369, 370, 373, 443, 909, 968, -110, + -110, -110,-32766, -272, 564, 371, 1304, 935, 1272, 13, + 741, 719, -250, 14, 15,-32766,-32766,-32766, 16,-32766, + 18,-32766, 354,-32766, 412, 491,-32766, 492, 499, 502, + 935,-32766,-32766,-32766, 719, -249, 503,-32766,-32766, 848, + 504, 505, 509,-32766, 426, 510, 511, 518, 597, 703, + 1078, 1221, 1301, 1077, 1058,-32766, 1260, 1054, -277, -102, + 12, 17, 22, 312, 411, 611, 616, 644, 709, 1225, + 1278, 1222, 1356, 0, -110, -110, 34, 315, 375, -110, + 720, 723, 727, 728, 730, 731, 732, 733, -110, 737, + 749, 722, 750, 0, 910, 1381, 0,-32766, 1383, 870, + 869, 878, 962, 1005, 877, 1382, 961, 959, 960, 963, + 1253, 943, 953, 941, 1149, 1145, 1099, 995, 996, 296, + 642, 1380, 74, 1338, 1353, 0, 0, 1238, 321 ); protected array $actionCheck = array( 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, - 12, 13, 9, 10, 11, 31, 9, 10, 11, 9, - 10, 106, 107, 80, 44, 45, 46, 47, 48, 49, - 50, 116, 1, 30, 0, 37, 38, 30, 1, 32, + 12, 13, 82, 31, 116, 85, 9, 10, 11, 0, + 80, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 9, 10, 11, 1, 37, 38, 30, 140, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 9, 10, 11, 101, 57, 9, 10, 11, 116, - 117, 118, 119, 120, 121, 122, 8, 1, 80, 71, - 72, 73, 74, 75, 76, 77, 123, 30, 80, 32, - 33, 34, 35, 36, 16, 87, 88, 89, 90, 91, + 43, 31, 30, 1, 70, 57, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 106, 107, 80, 71, + 72, 73, 74, 75, 76, 77, 116, 9, 80, 97, + 122, 151, 152, 70, 30, 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, 8, 128, 129, 130, 131, - 132, 133, 116, 1, 136, 137, 138, 139, 140, 141, - 142, 8, 144, 145, 160, 157, 129, 130, 131, 151, - 152, 153, 164, 155, 138, 2, 3, 4, 5, 6, - 7, 163, 9, 10, 11, 12, 13, 101, 82, 164, - 31, 85, 106, 168, 108, 9, 10, 11, 162, 113, - 37, 38, 116, 117, 118, 119, 120, 121, 122, 123, - 37, 38, 9, 10, 11, 164, 30, 160, 32, 33, - 34, 35, 36, 37, 38, 51, 52, 53, 54, 55, - 57, 57, 14, 30, 8, 32, 33, 34, 35, 49, - 50, 163, 1, 69, 71, 72, 73, 74, 75, 76, - 77, 165, 164, 80, 148, 149, 97, 106, 80, 108, + 122, 137, 138, 165, 126, 127, 128, 129, 8, 131, + 132, 133, 134, 135, 136, 8, 8, 139, 140, 141, + 142, 143, 144, 145, 70, 147, 148, 106, 160, 108, + 137, 138, 154, 155, 156, 167, 158, 14, 2, 3, + 4, 5, 6, 7, 166, 9, 10, 11, 12, 13, + 116, 8, 167, 119, 120, 121, 122, 123, 124, 125, + 9, 10, 11, 163, 51, 52, 53, 54, 55, 8, + 57, 122, 116, 37, 38, 141, 163, 9, 10, 11, + 159, 30, 69, 32, 33, 34, 35, 36, 37, 38, + 14, 137, 138, 57, 9, 10, 11, 141, 30, 165, + 32, 33, 34, 35, 36, 1, 8, 71, 72, 73, + 74, 75, 76, 77, 165, 30, 80, 32, 33, 34, + 35, 165, 8, 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, 9, + 10, 11, 126, 127, 128, 129, 166, 131, 132, 133, + 134, 135, 136, 1, 166, 139, 140, 141, 142, 143, + 144, 145, 80, 147, 148, 14, 9, 10, 11, 166, + 154, 155, 156, 8, 158, 2, 3, 4, 5, 6, + 7, 97, 9, 10, 11, 12, 13, 30, 8, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 16, 57, 9, 10, 11, 44, 45, + 46, 47, 48, 49, 50, 163, 69, 8, 52, 167, + 57, 9, 10, 11, 82, 8, 30, 1, 32, 33, + 34, 8, 160, 1, 71, 72, 73, 74, 75, 76, + 77, 8, 30, 80, 32, 33, 80, 8, 1, 83, 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, - 163, 128, 129, 130, 131, 132, 133, 156, 70, 136, - 137, 138, 139, 140, 141, 142, 163, 144, 145, 9, - 9, 10, 11, 82, 151, 152, 153, 14, 155, 2, - 3, 4, 5, 6, 7, 157, 9, 10, 11, 12, - 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 116, 57, 9, - 10, 11, 134, 135, 1, 106, 107, 9, 10, 11, - 69, 163, 14, 8, 57, 116, 117, 118, 150, 138, - 30, 122, 32, 33, 34, 31, 8, 128, 71, 72, - 73, 74, 75, 76, 77, 164, 160, 80, 8, 168, - 164, 80, 1, 162, 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, 14, 128, 129, 130, 131, 132, - 133, 85, 70, 136, 137, 138, 139, 140, 141, 142, - 97, 144, 145, 160, 9, 10, 11, 164, 151, 152, - 153, 2, 3, 4, 5, 6, 7, 156, 157, 158, - 116, 12, 13, 82, 15, 30, 165, 32, 33, 116, - 14, 30, 116, 117, 118, 119, 120, 121, 122, 8, - 117, 118, 138, 1, 8, 122, 70, 161, 1, 163, - 8, 138, 106, 147, 108, 1, 134, 135, 164, 8, - 51, 52, 52, 8, 1, 56, 122, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 137, 70, - 71, 72, 73, 74, 30, 51, 52, 78, 79, 80, - 80, 82, 70, 83, 31, 86, 87, 88, 89, 1, - 91, 8, 93, 162, 95, 1, 162, 98, 99, 168, - 134, 135, 103, 104, 105, 106, 107, 116, 109, 110, - 119, 120, 121, 122, 115, 116, 150, 80, 8, 31, - 106, 122, 108, 124, 125, 126, 80, 70, 162, 138, - 37, 38, 70, 116, 70, 136, 137, 84, 139, 140, - 141, 142, 143, 144, 145, 146, 134, 135, 106, 122, - 108, 152, 153, 162, 137, 156, 157, 158, 159, 8, - 116, 162, 116, 70, 71, 166, 167, 168, 8, 75, - 76, 77, 84, 1, 8, 82, 75, 76, 84, 86, - 75, 76, 138, 137, 90, 8, 92, 8, 94, 162, - 96, 134, 135, 101, 102, 14, 134, 135, 134, 135, - 106, 164, 156, 157, 158, 168, 162, 150, 106, 107, - 8, 117, 118, 160, 150, 122, 122, 164, 8, 162, - 8, 127, 128, 129, 130, 131, 162, 106, 107, 136, - 137, 14, 139, 140, 141, 142, 143, 144, 145, 111, - 112, 37, 38, 14, 30, 152, 153, 14, 160, 14, - 16, 31, 164, 70, 160, 162, 84, 70, 164, 165, - 167, 168, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 16, 16, 74, 16, - 0, 1, 30, 16, 80, 16, 16, 16, 37, 38, - 16, 87, 88, 89, 80, 91, 31, 93, 16, 95, - 16, 16, 98, 31, 1, 59, 60, 103, 104, 105, - 31, 1, 31, 109, 110, 37, 70, 134, 135, 115, - 116, 134, 135, 31, 31, 74, 31, 31, 124, 31, - 116, 80, 160, 150, 31, 31, 164, 150, 87, 88, - 89, 31, 91, 1, 93, 31, 95, 31, 31, 98, - 31, 137, 138, 31, 103, 104, 105, 31, 31, 155, - 109, 110, 31, 31, 84, 31, 115, 116, 116, 57, - 156, 157, 158, 31, 35, 124, 162, 37, 35, 35, - 134, 135, 35, 70, 71, 35, 106, 84, 108, 35, - 138, 35, 37, 113, 84, 82, 150, 117, 118, 86, - 37, 77, 122, 38, 69, 80, 70, 127, 128, 129, - 130, 131, 82, 80, 162, 92, 70, 71, 89, 82, - 100, 83, 94, 114, 113, 128, 84, 128, 82, 154, - 85, 151, 86, 132, 132, 122, 147, 96, 90, 133, - 160, 147, 137, 155, 164, 165, 97, 156, 97, 97, - 137, 161, 139, 140, 141, 142, 143, 144, 145, 100, - 31, 154, 162, 160, -1, 152, 153, 164, 122, 161, - 160, 150, -1, -1, 164, 162, 161, 159, -1, -1, - 167, 168, -1, 137, -1, 139, 140, 141, 142, 143, - 144, 145, 31, -1, -1, -1, -1, -1, 152, 153, - -1, -1, 160, 74, -1, -1, 164, 150, 162, 80, - 150, 150, 150, 167, 168, 162, 87, 88, 89, 161, - 91, -1, 93, -1, 95, 161, 160, 98, 160, 160, - 160, 160, 103, 104, 105, 74, 160, 160, 109, 110, - 160, 80, 160, 1, 115, 116, 160, 160, 87, 88, - 89, 160, 91, 124, 93, 160, 95, 160, 160, 98, - 160, 160, 1, 160, 103, 104, 105, 74, 160, 160, - 109, 110, 161, 80, 162, 162, 115, 116, 162, 162, - 87, 88, 89, 162, 91, 124, 93, 162, 95, 162, - 162, 98, 162, 162, 162, 102, 103, 104, 105, 74, - 162, 162, 109, 110, 162, 80, 81, 162, 115, 116, - 162, 162, 87, 88, 89, 162, 91, 124, 93, 162, - 95, 162, 162, 98, 162, 162, 84, 162, 103, 104, - 105, 162, 162, 1, 109, 110, 162, 162, 162, 162, - 115, 116, 100, 101, 102, 84, 162, 162, 106, 124, - 1, 162, 162, 162, 162, 167, 162, 162, -1, 117, - 118, 100, 101, 102, 122, 163, 163, 106, 163, 127, - 128, 129, 130, 131, 163, 163, 163, 163, 117, 118, - 31, 163, 163, 122, 163, 163, 163, 163, 127, 128, - 129, 130, 131, 163, 163, 163, 163, 163, 74, 163, - 163, 163, 160, 163, 80, 164, 164, 165, 163, 163, - 163, 87, 88, 89, 82, 91, 163, 93, 163, 95, - 163, 160, 98, 163, 165, 164, 165, 103, 104, 105, - 163, 82, 163, 109, 110, 163, 163, 163, 163, 115, - 116, 163, 163, 163, 163, 163, 163, 163, 124, 117, - 118, 163, 163, 163, 122, 164, 164, 164, 164, 164, - 128, 164, 164, 164, 164, 164, 117, 118, 164, 137, - 164, 122, 164, 164, -1, 165, 165, 128, 165, 165, - 165, 165, 165, 165, 165, 165, 137, 165, 165, 168, - 165, 159, 165, 165, 162, 165, 165, -1, 165, 165, - 168, 165, 165, 165, 165, 165, 165, 165, 159, 165, - -1, 162, 166, -1, -1, -1, -1, 168 + 117, 118, 119, 120, 121, 122, 1, 80, 70, 126, + 127, 128, 129, 1, 131, 132, 133, 134, 135, 136, + 8, 8, 139, 140, 141, 142, 143, 144, 145, 167, + 147, 148, 80, 171, 8, 30, 101, 154, 155, 156, + 2, 3, 4, 5, 6, 7, 106, 101, 108, 82, + 12, 13, 106, 15, 108, 9, 10, 11, 1, 113, + 14, 126, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 14, 167, 137, 138, 30, 117, 118, + 132, 133, 134, 122, 8, 30, 159, 160, 161, 51, + 52, 153, 85, 8, 56, 168, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 140, 70, 71, + 72, 73, 74, 31, 168, 8, 78, 79, 80, 167, + 82, 116, 8, 171, 86, 87, 88, 89, 1, 91, + 1, 93, 165, 95, 70, 80, 98, 99, 171, 106, + 107, 103, 104, 105, 106, 107, 141, 109, 110, 116, + 117, 118, 8, 115, 116, 122, 1, 150, 31, 1, + 122, 9, 10, 116, 131, 127, 128, 129, 8, 1, + 165, 116, 16, 70, 80, 37, 38, 139, 140, 166, + 142, 143, 144, 145, 146, 147, 148, 149, 141, 31, + 106, 14, 108, 155, 156, 140, 141, 159, 160, 161, + 162, 137, 138, 165, 75, 76, 77, 169, 170, 171, + 116, 84, 165, 84, 159, 160, 161, 153, 116, 90, + 165, 92, 163, 94, 167, 96, 167, 14, 171, 165, + 14, 37, 38, 116, 140, 106, 106, 82, 108, 14, + 137, 138, 84, 141, 116, 14, 117, 118, 16, 167, + 16, 122, 84, 159, 160, 161, 153, 16, 141, 130, + 131, 132, 133, 134, 70, 71, 16, 165, 165, 141, + 49, 50, 117, 118, 51, 52, 82, 122, 16, 70, + 86, 16, 164, 16, 166, 16, 131, 75, 76, 16, + 163, 16, 163, 16, 167, 140, 167, 168, 35, 70, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 75, 76, 122, 162, 37, 38, + 165, 163, 31, 1, 31, 167, 171, 0, 1, 31, + 1, 163, 31, 139, 140, 167, 142, 143, 144, 145, + 146, 147, 148, 59, 60, 1, 137, 138, 70, 155, + 156, 37, 38, 31, 70, 74, 101, 102, 35, 165, + 31, 80, 153, 31, 170, 171, 137, 138, 87, 88, + 89, 31, 91, 31, 93, 31, 95, 106, 107, 98, + 106, 107, 153, 31, 103, 104, 105, 31, 74, 31, + 109, 110, 31, 31, 80, 31, 115, 116, 70, 71, + 31, 87, 88, 89, 31, 91, 84, 93, 127, 95, + 82, 84, 98, 84, 86, 137, 138, 103, 104, 105, + 31, 137, 138, 109, 110, 31, 111, 112, 84, 115, + 116, 153, 31, 106, 31, 108, 31, 153, 31, 158, + 113, 127, 38, 165, 117, 118, 35, 35, 35, 122, + 122, 70, 71, 35, 35, 57, 69, 130, 131, 132, + 133, 134, 37, 82, 37, 37, 37, 86, 140, 70, + 142, 143, 144, 145, 146, 147, 148, 77, 82, 82, + 85, 154, 80, 155, 156, 163, 80, 94, 96, 167, + 163, 83, 163, 165, 167, 168, 167, 113, 170, 171, + 31, 92, 114, 122, 89, 131, 90, 163, 131, 150, + 100, 167, 136, 135, 97, 135, 150, 97, 97, 140, + 153, 140, 100, 142, 143, 144, 145, 146, 147, 148, + 158, 163, 157, 31, 163, 153, 155, 156, 153, 153, + 157, 171, -1, 74, 153, -1, 165, -1, -1, 80, + -1, 170, 171, 163, -1, -1, 87, 88, 89, -1, + 91, -1, 93, -1, 95, -1, -1, 98, -1, -1, + -1, -1, 103, 104, 105, 1, 74, 163, 109, 110, + -1, -1, 80, 159, 115, 116, 163, -1, 162, 87, + 88, 89, -1, 91, 163, 93, 127, 95, 1, 163, + 98, 163, 163, 163, 163, 103, 104, 105, 163, 74, + 163, 109, 110, 163, 163, 80, 163, 115, 116, 163, + 163, 163, 87, 88, 89, 163, 91, 164, 93, 127, + 95, 164, 164, 98, 164, 164, 164, 102, 103, 104, + 105, 165, 74, 165, 109, 110, 165, 165, 80, 81, + 115, 116, 165, 165, 165, 87, 88, 89, 84, 91, + 165, 93, 127, 95, 165, 165, 98, 166, 165, 165, + 165, 103, 104, 105, 100, 101, 102, 109, 110, 165, + 106, 84, 165, 115, 116, 165, 165, 165, 1, 165, + 165, 117, 118, 165, 165, 127, 122, 100, 101, 102, + 166, 165, 165, 106, 130, 131, 132, 133, 134, 165, + 165, 165, 165, 165, 117, 118, 165, 165, 31, 122, + 165, 165, 165, 165, 165, 165, 165, 130, 131, 132, + 133, 134, 74, 166, 165, 165, 170, 163, 80, 166, + 168, 167, 168, 166, 166, 87, 88, 89, 166, 91, + 166, 93, 166, 95, 166, 166, 98, 166, 166, 166, + 163, 103, 104, 105, 167, 168, 166, 109, 110, 82, + 166, 166, 166, 115, 116, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 127, 166, 166, 166, 166, + 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, -1, 117, 118, 167, 167, 167, 122, + 167, 167, 167, 167, 167, 167, 167, 167, 131, 167, + 167, 167, 167, -1, 168, 168, -1, 140, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 162, + 168, 168, 165, 168, 168, -1, -1, 169, 171 ); protected array $actionBase = array( - 0, -2, 153, 554, 740, 1002, 1021, 674, 221, 311, - -12, 548, 770, 770, 802, 770, 513, 763, 868, 632, - 632, 632, 793, -57, 307, 307, 793, 307, 664, 664, - 664, 664, 711, 711, 953, 953, 985, 921, 889, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 37, -16, 353, 1066, 695, 1038, 1044, 1040, - 1048, 1034, 1033, 1039, 1041, 1049, 1101, 1102, 794, 1100, - 1104, 1042, 871, 1035, 1043, 863, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 290, 348, 10, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 553, 553, 3, 3, 3, - 445, 806, 773, 806, 806, 806, 806, 806, 806, 806, - 806, 340, 183, 47, 706, 166, 166, 7, 7, 7, - 7, 7, 1109, 66, 1092, 1092, -20, -20, -20, -20, - 451, 504, 391, -47, 143, 396, 170, 712, 249, 231, - 231, 363, 363, 16, 16, 363, 363, 363, 154, 154, - 354, 354, 354, 354, 131, 356, 765, 497, 497, 497, - 497, 765, 765, 765, 765, 754, 948, 765, 765, 765, - 426, 517, 524, 484, 484, 502, 86, 86, 502, 757, - 86, 5, 460, 477, 759, -85, 336, 477, 955, 218, - 643, 643, 647, 643, 643, 643, 751, 562, 751, 1032, - 394, 805, 805, 776, 739, 487, 869, 1068, 1050, 780, - 1098, 819, 1099, 1069, 293, 17, 372, 472, 522, 732, - 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, 1029, - 1029, 1029, 1081, 143, 1032, 158, 1096, 1097, 1081, 1081, - 1081, 143, 143, 143, 143, 143, 143, 143, 143, 777, - 143, 143, 588, 158, 561, 565, 158, 816, 143, 37, - 817, 37, 37, 37, 37, 37, 37, 37, 37, 37, - 37, 344, 37, -16, 31, 31, 226, 132, 31, 31, - 31, 68, 31, 37, 37, 37, 562, 772, 735, 581, - 139, 767, 133, 772, 772, 772, 58, 198, 117, 799, - 803, 474, 785, 785, 797, 887, 887, 785, 790, 785, - 797, 785, 785, 887, 887, 778, 887, 368, 637, 543, - 620, 639, 887, 486, 785, 785, 785, 785, 762, 887, - 206, 662, 785, 481, 380, 785, 785, 762, 761, 786, - 766, 887, 887, 887, 762, 611, 766, 766, 766, 829, - 830, 771, 782, 505, 501, 672, 355, 825, 782, 782, - 785, 626, 771, 782, 771, 782, 748, 782, 782, 782, - 771, 782, 790, 570, 782, 734, 670, 314, 782, 785, - 34, 898, 899, 680, 902, 891, 905, 952, 908, 909, - 1053, 885, 922, 892, 913, 954, 890, 888, 792, 723, - 727, 820, 781, 881, 795, 795, 795, 873, 876, 795, - 795, 795, 795, 795, 795, 795, 795, 723, 750, 822, - 789, 929, 729, 730, 1000, 749, 1070, 1106, 925, 898, - 909, 725, 892, 913, 890, 888, 774, 764, 756, 758, - 755, 753, 741, 752, 779, 1006, 917, 826, 731, 978, - 930, 1019, 1051, 934, 935, 981, 1007, 831, 1013, 1071, - 796, 1073, 1074, 768, 937, 1054, 795, 872, 760, 775, - 936, 877, 723, 818, 1015, 971, 1001, 982, 983, 1052, - 811, 798, 824, 1075, 944, 945, 949, 1055, 1057, 828, - 972, 962, 984, 812, 1076, 990, 991, 992, 993, 1058, - 1077, 1059, 813, 1060, 836, 808, 963, 801, 1078, 420, - 810, 814, 823, 951, 466, 923, 1061, 1079, 1080, 994, - 996, 997, 1082, 1083, 919, 837, 973, 788, 974, 965, - 840, 842, 641, 815, 1017, 804, 807, 800, 677, 689, - 1085, 1087, 1088, 920, 787, 784, 846, 847, 1020, 738, - 1027, 1090, 693, 851, 1091, 1005, 742, 744, 694, 721, - 720, 745, 783, 1064, 821, 769, 809, 950, 744, 791, - 855, 1093, 857, 858, 860, 998, 861, 979, 1094, 0, + 0, -2, 156, 559, 757, 1004, 1027, 485, 292, 357, + -60, -12, 588, 759, 759, 774, 759, 557, 752, 888, + 598, 598, 598, 836, 313, 313, 836, 313, 711, 711, + 711, 711, 744, 744, 965, 965, 998, 932, 899, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, + 1088, 1088, 33, 20, 224, 1083, 661, 1057, 1063, 1059, + 1064, 1055, 1054, 1058, 1060, 1065, 1113, 1115, 837, 1112, + 1116, 1061, 902, 1056, 1062, 887, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 68, 476, 582, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 624, 624, 22, 22, 22, + 362, 811, 758, 811, 811, 811, 811, 811, 811, 811, + 811, 346, 205, 188, 714, 171, 171, 7, 7, 7, + 7, 7, 376, 1117, 54, 585, 585, 314, 314, 314, + 314, 365, 568, 370, 435, 397, 651, 477, 463, 532, + 532, 558, 558, 76, 76, 558, 558, 558, 133, 133, + 547, 547, 547, 547, 41, 437, 809, 382, 382, 382, + 382, 809, 809, 809, 809, 796, 996, 809, 809, 809, + 494, 533, 708, 653, 653, 560, -70, -70, 560, 804, + -70, 487, 316, -102, 807, -40, 548, -102, 1000, 368, + 639, 639, 659, 639, 639, 639, 854, 701, 854, 1053, + -42, 825, 825, 794, 731, 69, 892, 1084, 1066, 840, + 1109, 852, 1110, 1085, 489, 378, -16, 13, 74, 728, + 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 800, 568, 1053, 222, 1107, 1108, 800, 800, + 800, 568, 568, 568, 568, 568, 568, 568, 568, 799, + 568, 568, 745, 222, 642, 669, 222, 849, 568, 33, + 812, 33, 33, 33, 33, 33, 33, 33, 33, 33, + 33, 512, 33, 20, 5, 5, 202, 52, 5, 5, + 5, 337, 5, 33, 33, 33, 701, 828, 805, 704, + -18, 813, 443, 828, 828, 828, 120, 143, 128, 693, + 753, 514, 832, 832, 827, 929, 929, 832, 826, 832, + 827, 832, 832, 929, 929, 856, 929, 218, 515, 373, + 456, 537, 929, 320, 832, 832, 832, 832, 810, 929, + 127, 544, 832, 305, 234, 832, 832, 810, 808, 824, + 806, 929, 929, 929, 810, 389, 806, 806, 806, 820, + 844, 814, 819, 367, 359, 590, 181, 834, 819, 819, + 832, 506, 814, 819, 814, 819, 802, 819, 819, 819, + 814, 819, 826, 383, 819, 699, 574, 163, 819, 832, + 19, 944, 947, 721, 950, 934, 951, 991, 952, 954, + 1073, 925, 967, 935, 955, 999, 933, 930, 835, 671, + 680, 815, 797, 919, 817, 817, 817, 912, 917, 817, + 817, 817, 817, 817, 817, 817, 817, 671, 893, 821, + 845, 976, 692, 695, 1042, 789, 1086, 1118, 975, 944, + 954, 723, 935, 955, 933, 930, 792, 791, 786, 788, + 782, 772, 762, 770, 803, 1044, 958, 798, 697, 1014, + 977, 1002, 1070, 978, 981, 1018, 1045, 853, 1046, 1087, + 829, 1090, 1091, 897, 985, 1074, 817, 911, 906, 898, + 982, 918, 671, 900, 1047, 1003, 1069, 1019, 1021, 1071, + 850, 838, 901, 1092, 986, 987, 988, 1075, 1076, 801, + 1007, 931, 1022, 851, 1093, 1023, 1030, 1034, 1035, 1077, + 1094, 1078, 908, 1079, 861, 846, 964, 822, 1095, 196, + 843, 848, 859, 990, 291, 974, 1080, 1096, 1097, 1036, + 1039, 1040, 1098, 1099, 959, 866, 1008, 823, 1012, 997, + 868, 869, 607, 858, 1048, 841, 842, 857, 643, 646, + 1100, 1101, 1102, 966, 831, 830, 870, 871, 1050, 855, + 1051, 1103, 655, 875, 1104, 1043, 703, 705, 586, 664, + 662, 707, 839, 1082, 816, 818, 847, 989, 705, 833, + 877, 1105, 880, 881, 883, 1041, 886, 1016, 1106, 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, 459, 459, 459, 459, 459, 459, 307, - 307, 307, 307, 459, 459, 459, 459, 459, 459, 459, - 307, 459, 459, 459, 307, 307, 0, 0, 307, 0, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 0, 0, + 0, 0, 0, 468, 468, 468, 468, 468, 468, 313, + 313, 313, 313, 313, 468, 468, 468, 468, 468, 468, + 468, 313, 468, 468, 468, 313, 0, 0, 313, 0, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 468, 468, 468, 468, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 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, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 506, 506, 291, - 291, 291, 291, 506, 506, 506, 506, 506, 506, 506, - 506, 506, 506, 291, 291, 291, 0, 291, 291, 291, - 291, 291, 291, 291, 506, 778, 506, 506, 154, 154, - 154, 154, 506, 506, 506, 366, 366, 366, 154, 506, - 778, 506, 506, 506, 506, 506, 506, 506, 506, 506, - 0, 0, 506, 506, 506, 506, 158, 86, 506, 790, - 790, 790, 790, 506, 506, 506, 506, 86, 86, 506, - 506, 506, 0, 0, 0, 154, 154, 158, 0, 0, - 158, 373, 0, 790, 790, 506, 373, 778, 492, 506, - 293, 0, 0, 0, 0, 0, 0, 0, 158, 790, - 158, 143, 785, 86, 86, 143, 143, 785, 31, 37, - 492, 552, 552, 552, 552, 37, 0, 0, 0, 0, - 0, 562, 778, 778, 778, 778, 778, 778, 778, 778, - 778, 778, 778, 778, 790, 0, 778, 0, 778, 778, - 790, 790, 790, 0, 0, 0, 0, 0, 0, 0, - 0, 887, 0, 0, 0, 0, 0, 0, 0, 790, - 0, 0, 887, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 790, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 795, - 811, 0, 0, 811, 0, 795, 795, 795, 0, 0, - 0, 815, 738 + 0, 0, 0, 0, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 524, 524, 297, + 297, 297, 297, 524, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 297, 297, 297, 0, 297, 297, 297, + 297, 297, 297, 297, 856, 524, 524, 524, 524, 133, + 133, 133, 133, -95, -95, -95, 524, 524, 133, 524, + 856, 524, 524, 524, 524, 524, 524, 524, 524, 524, + 0, 0, 524, 524, 524, 524, 222, -70, 524, 826, + 826, 826, 826, 524, 524, 524, 524, -70, -70, 524, + 524, 524, 0, 0, 0, 133, 133, 222, 0, 0, + 222, 391, 0, 826, 826, 524, 391, 856, 442, 524, + 489, 0, 0, 0, 0, 0, 0, 0, 222, 826, + 222, 568, 832, -70, -70, 568, 568, 832, 5, 33, + 442, 685, 685, 685, 685, 33, 0, 0, 0, 0, + 0, 701, 856, 856, 856, 856, 856, 856, 856, 856, + 856, 856, 856, 856, 826, 0, 856, 0, 856, 856, + 826, 826, 826, 0, 0, 0, 0, 0, 0, 0, + 0, 929, 0, 0, 0, 0, 0, 0, 0, 826, + 0, 0, 929, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 826, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 817, + 850, 0, 0, 850, 0, 817, 817, 817, 0, 0, + 0, 858, 855 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 611, 611, - 611, 611,32767,32767, 254, 102,32767,32767, 482, 399, - 399, 399,32767,32767, 555, 555, 555, 555, 555,32767, - 32767,32767,32767,32767,32767, 482,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 617, 617, + 617, 617,32767,32767, 254, 102,32767,32767, 488, 405, + 405, 405,32767,32767, 561, 561, 561, 561, 561,32767, + 32767,32767,32767,32767,32767, 488,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, @@ -786,144 +794,147 @@ class Php8 extends \PhpParser\ParserAbstract 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, 36, 7, 8, 10, - 11, 49, 17, 324, 100,32767,32767,32767,32767,32767, + 11, 49, 17, 327, 100,32767,32767,32767,32767,32767, 32767,32767,32767, 102,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 386, 604,32767,32767,32767, + 32767,32767,32767,32767,32767, 392, 610,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 486, 465, 466, 468, - 469, 398, 556, 610, 327, 607, 329, 397, 145, 339, - 330, 242, 258, 487, 259, 488, 491, 492, 215, 383, - 149, 150, 429, 483, 431, 481, 485, 430, 404, 410, - 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, - 421, 422, 402, 403, 484,32767,32767, 462, 461, 460, - 427,32767,32767,32767,32767,32767,32767,32767,32767, 102, - 32767, 428, 432, 435, 401, 433, 434, 451, 452, 449, - 450, 453,32767,32767,32767,32767, 454, 455, 456, 457, - 316,32767,32767, 367, 195, 365, 436, 316, 111,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 442, 443, + 32767,32767,32767,32767,32767,32767, 492, 471, 472, 474, + 475, 404, 562, 616, 330, 613, 332, 403, 145, 342, + 333, 242, 258, 493, 259, 494, 497, 498, 215, 389, + 149, 150, 435, 489, 437, 487, 491, 436, 410, 416, + 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, + 427, 428, 408, 409, 490,32767,32767, 468, 467, 466, + 433,32767,32767,32767,32767,32767,32767,32767,32767, 102, + 32767, 434, 438, 441, 407, 439, 440, 457, 458, 455, + 456, 459,32767,32767, 319,32767,32767, 460, 461, 462, + 463, 370, 195, 368,32767,32767, 442, 319, 111,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 448, 449, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767, 102,32767, 100, - 499, 549, 459, 437, 438,32767, 524,32767, 102,32767, - 526,32767,32767,32767,32767,32767,32767,32767,32767, 551, - 424, 426, 519, 605, 405, 608,32767, 512, 100, 195, - 32767,32767, 525, 195, 195,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 550,32767, 618, 512, + 505, 555, 465, 443, 444,32767, 530,32767, 102,32767, + 532,32767,32767,32767,32767,32767,32767,32767,32767, 557, + 430, 432, 525, 611, 411, 614,32767, 518, 100, 195, + 32767,32767, 531, 195, 195,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 556,32767, 624, 518, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, 110,32767, 110, 110,32767,32767, - 100, 195, 195, 195, 195, 195, 195, 195, 195, 527, - 195, 195, 190,32767, 268, 270, 102, 573, 195,32767, - 529,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 100, 195, 195, 195, 195, 195, 195, 195, 195, 533, + 195, 195, 190,32767, 268, 270, 102, 579, 195,32767, + 535,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 386,32767,32767,32767,32767, 512, 447, 138,32767, - 514, 138, 557, 439, 440, 441, 557, 557, 557, 312, - 289,32767,32767,32767,32767, 527, 527, 100, 100, 100, - 100,32767,32767,32767,32767, 111, 498, 99, 99, 99, + 32767, 392,32767,32767,32767,32767, 518, 453, 138,32767, + 520, 138, 563, 445, 446, 447, 563, 563, 563, 315, + 292,32767,32767,32767,32767, 533, 533, 100, 100, 100, + 100,32767,32767,32767,32767, 111, 504, 99, 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, 223,32767, 101, 99,32767, 101, 101,32767,32767, 223, 225, 212, - 227,32767, 577, 578, 223, 101, 227, 227, 227, 247, - 247, 501, 318, 101, 99, 101, 101, 197, 318, 318, - 32767, 101, 501, 318, 501, 318, 199, 318, 318, 318, - 501, 318,32767, 101, 318, 214, 99, 99, 318,32767, - 32767,32767,32767, 514,32767,32767,32767,32767,32767,32767, + 227,32767, 583, 584, 223, 101, 227, 227, 227, 247, + 247, 507, 321, 101, 99, 101, 101, 197, 321, 321, + 32767, 101, 507, 321, 507, 321, 199, 321, 321, 321, + 507, 321,32767, 101, 321, 214, 99, 99, 321,32767, + 32767,32767,32767, 520,32767,32767,32767,32767,32767,32767, 32767, 222,32767,32767,32767,32767,32767,32767,32767,32767, - 544,32767, 562, 575, 445, 446, 448, 561, 559, 470, - 471, 472, 473, 474, 475, 476, 478, 606,32767, 518, - 32767,32767,32767, 338,32767, 616,32767,32767,32767, 9, - 74, 507, 42, 43, 51, 57, 533, 534, 535, 536, - 530, 531, 537, 532,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 617, - 32767, 557,32767,32767,32767,32767, 444, 539, 583,32767, - 32767, 558, 609,32767,32767,32767,32767,32767,32767,32767, + 550,32767, 568, 581, 451, 452, 454, 567, 565, 476, + 477, 478, 479, 480, 481, 482, 484, 612,32767, 524, + 32767,32767,32767, 341,32767, 622,32767,32767,32767, 9, + 74, 513, 42, 43, 51, 57, 539, 540, 541, 542, + 536, 537, 543, 538,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 623, + 32767, 563,32767,32767,32767,32767, 450, 545, 589,32767, + 32767, 564, 615,32767,32767,32767,32767,32767,32767,32767, 138,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 544,32767, 136,32767,32767,32767,32767,32767,32767, - 32767,32767, 540,32767,32767,32767, 557,32767,32767,32767, - 32767, 314, 311,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 557, - 32767,32767,32767,32767,32767, 291,32767, 308,32767,32767, + 32767, 550,32767, 136,32767,32767,32767,32767,32767,32767, + 32767,32767, 546,32767,32767,32767, 563,32767,32767,32767, + 32767, 317, 314,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 563, + 32767,32767,32767,32767,32767, 294,32767, 311,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 382, 514, 294, 296, - 297,32767,32767,32767,32767, 361,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 388, 520, 297, 299, + 300,32767,32767,32767,32767, 364,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 152, - 152, 3, 3, 341, 152, 152, 152, 341, 341, 152, - 341, 341, 341, 152, 152, 152, 152, 152, 152, 152, - 280, 185, 262, 265, 247, 247, 152, 353, 152, 384, - 384, 393 + 152, 3, 3, 344, 152, 152, 152, 344, 344, 152, + 344, 344, 344, 152, 152, 152, 152, 152, 152, 152, + 280, 185, 262, 265, 247, 247, 152, 356, 152, 390, + 390, 399 ); protected array $goto = array( - 194, 194, 1047, 431, 704, 620, 1078, 437, 669, 278, - 278, 278, 278, 432, 334, 330, 331, 333, 601, 436, - 335, 438, 646, 906, 864, 906, 906, 166, 166, 166, + 194, 194, 1050, 486, 704, 278, 278, 278, 278, 1081, + 488, 547, 547, 906, 864, 906, 906, 547, 713, 547, + 547, 547, 547, 547, 547, 547, 547, 166, 166, 166, 166, 218, 195, 191, 191, 176, 178, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 186, 187, 188, 189, 190, 215, 213, 216, 544, 545, 427, 546, - 549, 550, 551, 552, 553, 554, 555, 556, 1161, 167, + 549, 550, 551, 552, 553, 554, 555, 556, 1167, 167, 168, 169, 193, 170, 171, 172, 164, 173, 174, 175, 177, 212, 214, 217, 237, 240, 251, 252, 253, 255, - 256, 257, 258, 259, 260, 261, 266, 267, 268, 269, + 256, 257, 258, 259, 260, 261, 267, 268, 269, 270, 276, 288, 289, 313, 314, 433, 434, 435, 606, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 186, 187, 188, 189, 190, - 215, 1161, 196, 197, 198, 199, 238, 179, 180, 200, + 215, 1167, 196, 197, 198, 199, 238, 179, 180, 200, 181, 201, 197, 182, 239, 196, 163, 202, 203, 183, 204, 205, 206, 184, 207, 208, 165, 209, 210, 211, - 185, 713, 868, 608, 341, 591, 469, 865, 1095, 743, - 645, 647, 866, 1210, 667, 350, 629, 666, 691, 694, - 1023, 702, 711, 1019, 718, 342, 341, 988, 358, 557, - 557, 557, 557, 926, 612, 927, 1364, 1364, 358, 358, - 1050, 1050, 689, 965, 425, 486, 1042, 1058, 1059, 358, - 358, 1364, 488, 358, 873, 1381, 922, 917, 918, 931, - 874, 919, 871, 920, 921, 872, 861, 925, 474, 474, - 563, 840, 1367, 1367, 358, 358, 519, 474, 1101, 1097, - 1098, 618, 632, 635, 636, 637, 638, 659, 660, 661, - 715, 717, 355, 355, 355, 355, 5, 1265, 6, 1265, - 1265, 403, 406, 609, 613, 1047, 1047, 1265, 455, 455, - 455, 455, 1047, 861, 1047, 1047, 1047, 1047, 1047, 1047, - 1047, 1047, 1047, 899, 846, 1047, 1047, 1047, 1047, 598, - 1326, 1265, 701, 1053, 1052, 842, 1265, 1265, 1265, 1265, - 1056, 1057, 1265, 1265, 1265, 568, 561, 701, 1241, 957, - 421, 701, 1242, 1245, 958, 1354, 1246, 559, 939, 559, - 559, 881, 940, 631, 631, 348, 846, 559, 846, 1296, - 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 893, - 464, 563, 880, 340, 561, 568, 593, 594, 345, 604, - 610, 462, 625, 626, 320, 306, 982, 982, 982, 982, - 25, 1009, 462, 976, 983, 401, 455, 455, 455, 455, - 455, 455, 455, 455, 455, 455, 455, 455, 1315, 1315, - 455, 446, 455, 455, 1315, 1315, 1315, 1315, 1315, 1315, - 1315, 1315, 1315, 1315, 247, 247, 1026, 1026, 602, 623, - 1312, 1312, 596, 861, 1158, 1258, 1312, 1312, 1312, 1312, - 1312, 1312, 1312, 1312, 1312, 1312, 1071, 1337, 444, 1337, - 1337, 245, 245, 245, 245, 242, 248, 1337, 668, 351, - 352, 1341, 1342, 548, 548, 1346, 1346, 1346, 1346, 548, - 548, 548, 548, 548, 548, 548, 548, 548, 548, 674, - 547, 547, 1348, 1348, 1348, 1348, 547, 690, 547, 547, - 547, 547, 547, 547, 547, 547, 336, 1260, 662, 663, - 886, 680, 681, 682, 858, 971, 1333, 883, 955, 414, - 415, 1141, 410, 955, 678, 624, 679, 439, 418, 419, - 420, 1256, 692, 1031, 439, 422, 507, 1084, 508, 346, - 1054, 1054, 746, 1038, 514, 484, 1088, 673, 1065, 1061, - 1062, 319, 273, 319, 319, 614, 895, 993, 944, 1148, - 1261, 1262, 1132, 1248, 1121, 1146, 1122, 1086, 377, 856, - 1028, 0, 0, 1335, 1335, 1086, 1248, 0, 885, 0, - 672, 1007, 894, 882, 1083, 1087, 879, 0, 1263, 1323, - 1324, 607, 1114, 0, 0, 991, 0, 0, 1255, 0, - 0, 716, 483, 1339, 1340, 0, 1012, 515, 707, 984, - 1112, 742, 0, 0, 560, 1021, 1016, 0, 981, 0, - 562, 588, 980, 416, 712, 562, 0, 588, 0, 404, - 468, 639, 641, 643, 0, 0, 0, 0, 0, 0, - 1130, 898, 477, 605, 478, 479, 0, 0, 0, 0, - 891, 0, 0, 1372, 1373, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 751, 751, 0, 250, 250, - 0, 0, 0, 0, 0, 0, 0, 0, 889, 0, + 185, 868, 247, 247, 591, 474, 474, 1098, 743, 645, + 647, 865, 608, 667, 474, 866, 469, 691, 694, 1023, + 702, 711, 1019, 718, 464, 1216, 881, 358, 840, 245, + 245, 245, 245, 242, 248, 1370, 1370, 358, 358, 350, + 557, 557, 557, 557, 893, 612, 341, 880, 358, 358, + 1370, 988, 358, 873, 1387, 922, 917, 918, 931, 874, + 919, 871, 920, 921, 872, 446, 925, 342, 341, 563, + 425, 1373, 1373, 358, 358, 899, 861, 1104, 1100, 1101, + 437, 669, 403, 406, 609, 613, 432, 334, 330, 331, + 333, 601, 436, 335, 438, 646, 629, 666, 1271, 1050, + 1271, 1271, 1056, 1055, 455, 455, 598, 455, 455, 1050, + 1271, 348, 1050, 519, 1050, 1050, 1050, 1050, 1050, 1050, + 1050, 1050, 1050, 861, 1360, 1050, 1050, 1050, 1050, 1332, + 1009, 1271, 507, 926, 508, 927, 1271, 1271, 1271, 1271, + 514, 401, 1271, 1271, 1271, 1352, 1352, 1352, 1352, 421, + 355, 355, 355, 355, 1124, 1152, 1125, 596, 939, 631, + 631, 668, 940, 439, 1164, 1302, 1302, 1302, 1302, 1302, + 1302, 1302, 1302, 1302, 1302, 1074, 439, 483, 1345, 1346, + 563, 444, 1057, 1057, 568, 561, 1059, 1060, 955, 673, + 1068, 1064, 1065, 955, 662, 663, 846, 680, 681, 682, + 320, 306, 455, 455, 455, 455, 455, 455, 455, 455, + 455, 455, 455, 455, 690, 5, 455, 6, 455, 455, + 602, 623, 340, 561, 568, 593, 594, 345, 604, 610, + 674, 625, 626, 980, 416, 712, 250, 250, 846, 25, + 846, 1347, 1348, 559, 1264, 559, 559, 1026, 1026, 336, + 1321, 1321, 431, 861, 620, 559, 1321, 1321, 1321, 1321, + 1321, 1321, 1321, 1321, 1321, 1321, 858, 1343, 886, 1343, + 1343, 639, 641, 643, 410, 971, 462, 883, 1262, 1343, + 624, 982, 982, 982, 982, 1031, 1147, 462, 976, 983, + 562, 588, 701, 351, 352, 562, 842, 588, 1087, 404, + 468, 1354, 1354, 1354, 1354, 746, 1041, 895, 701, 1138, + 484, 701, 477, 605, 478, 479, 1091, 377, 993, 0, + 891, 1318, 1318, 1378, 1379, 1339, 0, 1318, 1318, 1318, + 1318, 1318, 1318, 1318, 1318, 1318, 1318, 0, 0, 0, + 0, 0, 0, 548, 548, 1266, 0, 0, 889, 548, + 548, 548, 548, 548, 548, 548, 548, 548, 548, 414, + 415, 0, 0, 0, 678, 0, 679, 328, 418, 419, + 420, 0, 692, 0, 0, 422, 1089, 0, 0, 346, + 0, 0, 1341, 1341, 1089, 618, 632, 635, 636, 637, + 638, 659, 660, 661, 715, 717, 0, 0, 1267, 1268, + 0, 1254, 894, 882, 1086, 1090, 0, 856, 0, 271, + 319, 0, 319, 319, 1254, 991, 614, 1247, 957, 944, + 1154, 1248, 1251, 958, 0, 1252, 1269, 1329, 1330, 0, + 0, 1028, 0, 0, 0, 0, 0, 0, 981, 885, + 0, 672, 1007, 1053, 1053, 689, 965, 879, 0, 1045, + 1061, 1062, 607, 1117, 0, 0, 0, 0, 0, 1261, + 1136, 898, 0, 716, 0, 0, 0, 1012, 515, 707, + 984, 1115, 742, 0, 0, 560, 1021, 1016, 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, 328 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 751, 751 ); protected array $gotoCheck = array( - 42, 42, 73, 13, 73, 13, 128, 66, 66, 23, - 23, 23, 23, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 25, 25, 25, 25, 42, 42, 42, + 42, 42, 73, 84, 73, 23, 23, 23, 23, 128, + 84, 162, 162, 25, 25, 25, 25, 162, 9, 162, + 162, 162, 162, 162, 162, 162, 162, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -937,101 +948,104 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 9, 15, 131, 174, 48, 156, 26, 15, 48, - 48, 48, 27, 156, 48, 97, 56, 56, 48, 48, - 48, 48, 48, 48, 48, 174, 174, 49, 14, 107, - 107, 107, 107, 65, 107, 65, 188, 188, 14, 14, - 89, 89, 89, 89, 43, 84, 89, 89, 89, 14, - 14, 188, 84, 14, 15, 14, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 22, 15, 154, 154, - 14, 6, 188, 188, 14, 14, 76, 154, 15, 15, - 15, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 24, 24, 24, 24, 46, 73, 46, 73, - 73, 59, 59, 59, 59, 73, 73, 73, 23, 23, - 23, 23, 73, 22, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 45, 12, 73, 73, 73, 73, 178, - 14, 73, 7, 119, 119, 7, 73, 73, 73, 73, - 120, 120, 73, 73, 73, 76, 76, 7, 79, 79, - 14, 7, 79, 79, 79, 187, 79, 19, 73, 19, - 19, 35, 73, 108, 108, 185, 12, 19, 12, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 35, - 83, 14, 35, 76, 76, 76, 76, 76, 76, 76, - 76, 19, 76, 76, 175, 175, 19, 19, 19, 19, - 76, 103, 19, 19, 19, 62, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 176, 176, - 23, 83, 23, 23, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 5, 5, 107, 107, 2, 2, - 177, 177, 104, 22, 155, 14, 177, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 115, 131, 113, 131, - 131, 5, 5, 5, 5, 5, 5, 131, 64, 97, - 97, 184, 184, 179, 179, 9, 9, 9, 9, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 121, - 162, 162, 131, 131, 131, 131, 162, 117, 162, 162, - 162, 162, 162, 162, 162, 162, 29, 20, 86, 86, - 39, 86, 86, 86, 18, 92, 131, 37, 9, 82, - 82, 153, 28, 9, 82, 80, 82, 118, 82, 82, - 82, 166, 82, 110, 118, 82, 160, 130, 160, 82, - 118, 118, 99, 114, 160, 157, 133, 118, 118, 118, - 118, 24, 24, 24, 24, 17, 41, 96, 17, 17, - 20, 20, 149, 20, 146, 146, 146, 131, 138, 20, - 17, -1, -1, 131, 131, 131, 20, -1, 17, -1, - 17, 17, 16, 16, 16, 16, 17, -1, 20, 20, - 20, 8, 8, -1, -1, 16, -1, -1, 17, -1, - -1, 8, 182, 182, 182, -1, 50, 8, 8, 50, - 8, 50, -1, -1, 50, 50, 50, -1, 16, -1, - 9, 9, 93, 93, 93, 9, -1, 9, -1, 9, - 9, 85, 85, 85, -1, -1, -1, -1, -1, -1, - 16, 16, 9, 9, 9, 9, -1, -1, -1, -1, - 9, -1, -1, 9, 9, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 24, 24, -1, 5, 5, - -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, + 42, 15, 5, 5, 48, 154, 154, 15, 48, 48, + 48, 26, 131, 48, 154, 27, 156, 48, 48, 48, + 48, 48, 48, 48, 83, 156, 35, 14, 6, 5, + 5, 5, 5, 5, 5, 188, 188, 14, 14, 97, + 107, 107, 107, 107, 35, 107, 174, 35, 14, 14, + 188, 49, 14, 15, 14, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 83, 15, 174, 174, 14, + 43, 188, 188, 14, 14, 45, 22, 15, 15, 15, + 66, 66, 59, 59, 59, 59, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 56, 56, 73, 73, + 73, 73, 119, 119, 23, 23, 178, 23, 23, 73, + 73, 185, 73, 76, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 22, 187, 73, 73, 73, 73, 14, + 103, 73, 160, 65, 160, 65, 73, 73, 73, 73, + 160, 62, 73, 73, 73, 9, 9, 9, 9, 14, + 24, 24, 24, 24, 146, 146, 146, 104, 73, 108, + 108, 64, 73, 118, 155, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 115, 118, 182, 182, 182, + 14, 113, 118, 118, 76, 76, 120, 120, 9, 118, + 118, 118, 118, 9, 86, 86, 12, 86, 86, 86, + 175, 175, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 117, 46, 23, 46, 23, 23, + 2, 2, 76, 76, 76, 76, 76, 76, 76, 76, + 121, 76, 76, 93, 93, 93, 5, 5, 12, 76, + 12, 184, 184, 19, 14, 19, 19, 107, 107, 29, + 176, 176, 13, 22, 13, 19, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 18, 131, 39, 131, + 131, 85, 85, 85, 28, 92, 19, 37, 166, 131, + 80, 19, 19, 19, 19, 110, 153, 19, 19, 19, + 9, 9, 7, 97, 97, 9, 7, 9, 130, 9, + 9, 131, 131, 131, 131, 99, 114, 41, 7, 149, + 157, 7, 9, 9, 9, 9, 133, 138, 96, -1, + 9, 177, 177, 9, 9, 131, -1, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, -1, -1, -1, + -1, -1, -1, 179, 179, 20, -1, -1, 9, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 82, + 82, -1, -1, -1, 82, -1, 82, 9, 82, 82, + 82, -1, 82, -1, -1, 82, 131, -1, -1, 82, + -1, -1, 131, 131, 131, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, -1, -1, 20, 20, + -1, 20, 16, 16, 16, 16, -1, 20, -1, 24, + 24, -1, 24, 24, 20, 16, 17, 79, 79, 17, + 17, 79, 79, 79, -1, 79, 20, 20, 20, -1, + -1, 17, -1, -1, -1, -1, -1, -1, 16, 17, + -1, 17, 17, 89, 89, 89, 89, 17, -1, 89, + 89, 89, 8, 8, -1, -1, -1, -1, -1, 17, + 16, 16, -1, 8, -1, -1, -1, 50, 8, 8, + 50, 8, 50, -1, -1, 50, 50, 50, -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, 9 + -1, -1, -1, 24, 24 ); protected array $gotoBase = array( - 0, 0, -323, 0, 0, 393, 208, 285, 543, 138, - 0, 0, -10, -333, -107, -185, 84, 45, 167, 55, - 67, 0, -52, 6, 249, 20, 163, 168, 146, 172, - 0, 0, 0, 0, 0, -54, 0, 139, 0, 152, - 0, 69, -1, 182, 0, 257, -490, 0, -555, 170, - 555, 0, 0, 0, 0, 0, 136, 0, 0, 216, - 0, 0, 323, 0, 192, 180, -228, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -38, 0, 0, -106, - 140, -120, -19, 62, -272, 105, -259, 0, 0, -79, - 0, 0, 151, 280, 0, 0, 68, -315, 0, 89, - 0, 0, 0, 326, 359, 0, 0, 161, 88, 0, - 119, 0, 0, 141, 82, 145, 0, 176, 217, 14, - 17, 159, 0, 0, 0, 0, 0, 0, 4, 0, - 117, 155, 0, 58, 0, 0, 0, 0, -222, 0, - 0, 0, 0, 0, 0, 0, 251, 0, 0, 72, - 0, 0, 0, 127, 194, 162, -99, 59, 0, 0, - -6, 0, 215, 0, 0, 0, 118, 0, 0, 0, - 0, 0, 0, 0, -131, 38, 143, 165, 260, 198, - 0, 0, 264, 0, 53, 295, 0, 284, -109, 0, + 0, 0, -341, 0, 0, 161, 178, 445, 604, 8, + 0, 0, 62, 76, -108, -186, 104, 106, 119, 140, + 105, 0, -42, 2, 307, 10, 167, 171, 98, 115, + 0, 0, 0, 0, 0, -189, 0, 99, 0, 110, + 0, 20, -1, 207, 0, 209, -371, 0, -556, 193, + 615, 0, 0, 0, 0, 0, 216, 0, 0, 197, + 0, 0, 259, 0, 85, 279, 5, 0, 0, 0, + 0, 0, 0, -5, 0, 0, 1, 0, 0, 163, + 95, 184, 21, -94, -474, -55, -373, 0, 0, 324, + 0, 0, 111, 91, 0, 0, 29, -291, 0, 52, + 0, 0, 0, 255, 274, 0, 0, 172, 84, 0, + 71, 0, 0, 64, 45, 61, 0, 93, 59, -17, + 63, 100, 0, 0, 0, 0, 0, 0, 7, 0, + 78, 164, 0, 28, 0, 0, 0, 0, -273, 0, + 0, 0, 0, 0, 0, 0, 43, 0, 0, 19, + 0, 0, 0, 92, 131, 82, -90, 24, 0, 0, + -210, 0, -224, 0, 0, 0, 65, 0, 0, 0, + 0, 0, 0, 0, -89, 44, 175, 246, 237, 268, + 0, 0, 39, 0, 23, 241, 0, 253, -110, 0, 0 ); protected array $gotoDefault = array( -32768, 520, 753, 4, 754, 948, 829, 838, 584, 538, - 714, 347, 633, 428, 1331, 924, 1147, 603, 857, 1274, - 1280, 463, 860, 325, 740, 936, 907, 908, 407, 393, + 714, 347, 633, 428, 1337, 924, 1153, 603, 857, 1280, + 1286, 463, 860, 325, 740, 936, 907, 908, 407, 393, 399, 405, 657, 634, 501, 892, 459, 884, 493, 887, 458, 896, 162, 424, 517, 900, 3, 903, 566, 934, 986, 394, 911, 395, 685, 913, 587, 915, 916, 402, - 408, 409, 1152, 595, 630, 928, 254, 589, 929, 392, - 930, 938, 397, 400, 695, 473, 512, 506, 417, 1116, + 408, 409, 1158, 595, 630, 928, 254, 589, 929, 392, + 930, 938, 397, 400, 695, 473, 512, 506, 417, 1119, 590, 617, 654, 452, 480, 628, 640, 627, 487, 440, 423, 324, 970, 978, 494, 471, 992, 349, 1000, 748, - 1160, 648, 496, 1008, 649, 1015, 1018, 539, 540, 485, - 1030, 270, 1033, 497, 1039, 22, 675, 1044, 1045, 676, - 650, 1067, 651, 677, 652, 1069, 470, 585, 1077, 460, - 1085, 1320, 461, 1089, 263, 1092, 277, 353, 376, 441, - 1099, 1100, 9, 1106, 705, 706, 18, 275, 516, 1131, - 696, 1137, 274, 1140, 457, 1159, 456, 1229, 1231, 567, - 498, 1249, 310, 1252, 688, 513, 1257, 453, 1322, 454, - 541, 481, 332, 542, 1365, 305, 356, 329, 558, 311, - 357, 543, 482, 1328, 1336, 326, 31, 1355, 1366, 600, + 1166, 648, 496, 1008, 649, 1015, 1018, 539, 540, 485, + 1030, 264, 1033, 497, 1042, 23, 675, 1047, 1048, 676, + 650, 1070, 651, 677, 652, 1072, 470, 585, 1080, 460, + 1088, 1326, 461, 1092, 262, 1095, 277, 353, 376, 441, + 1102, 1103, 9, 1109, 705, 706, 19, 273, 516, 1137, + 696, 1143, 272, 1146, 457, 1165, 456, 1235, 1237, 567, + 498, 1255, 310, 1258, 688, 513, 1263, 453, 1328, 454, + 541, 481, 332, 542, 1371, 305, 356, 329, 558, 311, + 357, 543, 482, 1334, 1342, 326, 31, 1361, 1372, 600, 622 ); @@ -1064,19 +1078,19 @@ class Php8 extends \PhpParser\ParserAbstract 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, - 111, 111, 112, 112, 112, 112, 110, 110, 110, 115, - 115, 115, 115, 89, 89, 118, 118, 118, 119, 119, - 116, 116, 120, 120, 122, 122, 123, 123, 117, 124, - 124, 121, 125, 125, 125, 125, 113, 113, 82, 82, - 82, 20, 20, 20, 127, 126, 126, 128, 128, 128, - 128, 60, 129, 129, 130, 61, 132, 132, 133, 133, - 134, 134, 86, 135, 135, 135, 135, 135, 135, 135, - 135, 141, 141, 142, 142, 143, 143, 143, 143, 143, - 144, 145, 145, 140, 140, 136, 136, 139, 139, 147, - 147, 146, 146, 146, 146, 146, 146, 146, 137, 148, - 148, 150, 149, 149, 138, 138, 114, 114, 151, 151, - 153, 153, 153, 152, 152, 62, 104, 154, 154, 56, - 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 111, 111, 112, 112, 112, 112, 112, 112, 112, 110, + 110, 110, 115, 115, 115, 115, 89, 89, 118, 118, + 118, 119, 119, 116, 116, 120, 120, 122, 122, 123, + 123, 117, 124, 124, 121, 125, 125, 125, 125, 113, + 113, 82, 82, 82, 20, 20, 20, 127, 126, 126, + 128, 128, 128, 128, 60, 129, 129, 130, 61, 132, + 132, 133, 133, 134, 134, 86, 135, 135, 135, 135, + 135, 135, 135, 135, 141, 141, 142, 142, 143, 143, + 143, 143, 143, 144, 145, 145, 140, 140, 136, 136, + 139, 139, 147, 147, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 137, 148, 148, 150, 149, 149, + 138, 138, 114, 114, 151, 151, 153, 153, 153, 152, + 152, 62, 104, 154, 154, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1085,20 +1099,21 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 161, 162, 162, 163, 155, - 155, 160, 160, 164, 165, 165, 166, 167, 168, 168, - 168, 168, 19, 19, 73, 73, 73, 73, 156, 156, - 156, 156, 170, 170, 159, 159, 159, 157, 157, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 177, - 177, 177, 108, 179, 179, 179, 179, 158, 158, 158, - 158, 158, 158, 158, 158, 59, 59, 173, 173, 173, - 173, 173, 180, 180, 169, 169, 169, 169, 181, 181, - 181, 181, 181, 74, 74, 66, 66, 66, 66, 131, - 131, 131, 131, 184, 183, 172, 172, 172, 172, 172, - 172, 171, 171, 171, 182, 182, 182, 182, 107, 178, - 186, 186, 185, 185, 187, 187, 187, 187, 187, 187, - 187, 187, 175, 175, 175, 175, 174, 189, 188, 188, - 188, 188, 188, 188, 188, 188, 190, 190, 190, 190 + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 161, 162, 162, 163, 155, 155, 160, 160, 164, + 165, 165, 166, 167, 168, 168, 168, 168, 19, 19, + 73, 73, 73, 73, 156, 156, 156, 156, 170, 170, + 159, 159, 159, 157, 157, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 177, 177, 177, 108, 179, + 179, 179, 179, 158, 158, 158, 158, 158, 158, 158, + 158, 59, 59, 173, 173, 173, 173, 173, 180, 180, + 169, 169, 169, 169, 181, 181, 181, 181, 181, 74, + 74, 66, 66, 66, 66, 131, 131, 131, 131, 184, + 183, 172, 172, 172, 172, 172, 172, 171, 171, 171, + 182, 182, 182, 182, 107, 178, 186, 186, 185, 185, + 187, 187, 187, 187, 187, 187, 187, 187, 175, 175, + 175, 175, 174, 189, 188, 188, 188, 188, 188, 188, + 188, 188, 190, 190, 190, 190 ); protected array $ruleToLength = array( @@ -1130,41 +1145,42 @@ class Php8 extends \PhpParser\ParserAbstract 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, - 0, 2, 1, 1, 1, 1, 7, 9, 6, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, - 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, - 2, 2, 4, 3, 1, 1, 3, 1, 2, 2, - 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, - 2, 0, 1, 5, 7, 5, 6, 10, 3, 5, - 1, 1, 3, 0, 2, 4, 5, 4, 4, 4, - 3, 1, 1, 1, 1, 1, 1, 0, 1, 1, - 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 3, 1, 1, 3, 0, 2, 0, 3, 5, 8, - 1, 3, 3, 0, 2, 2, 2, 3, 1, 0, - 1, 1, 3, 3, 3, 4, 4, 1, 1, 2, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, + 0, 2, 1, 1, 1, 1, 1, 1, 1, 7, + 9, 6, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, + 3, 1, 3, 3, 1, 1, 2, 1, 1, 0, + 1, 0, 2, 2, 2, 4, 3, 1, 1, 3, + 1, 2, 2, 3, 2, 3, 1, 1, 2, 3, + 1, 1, 3, 2, 0, 1, 5, 7, 5, 6, + 10, 3, 5, 1, 1, 3, 0, 2, 4, 5, + 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, + 0, 2, 0, 3, 5, 8, 1, 3, 3, 0, + 2, 2, 2, 3, 1, 0, 1, 1, 3, 3, + 3, 4, 4, 1, 1, 2, 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, 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, 2, 8, 9, 8, - 9, 9, 10, 9, 10, 8, 3, 2, 2, 1, - 1, 0, 4, 2, 1, 3, 2, 1, 2, 2, - 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 1, 1, 1, 0, 1, 1, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 5, 3, 3, 4, 1, 1, 3, 1, 1, 1, - 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, - 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, - 4, 2, 2, 1, 3, 1, 4, 3, 3, 3, - 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, - 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, - 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, - 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, 10, 9, + 10, 8, 3, 2, 2, 1, 1, 0, 4, 2, + 1, 3, 2, 1, 2, 2, 2, 4, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, + 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, + 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 4, 1, 4, 4, 0, + 1, 1, 1, 3, 3, 1, 4, 2, 2, 1, + 3, 1, 4, 3, 3, 3, 3, 1, 3, 1, + 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, + 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, + 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, + 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1822,68 +1838,68 @@ protected function initReduceCallbacks(): void { $self->semValue = Modifiers::PRIVATE; }, 285 => static function ($self, $stackPos) { - $self->semValue = Modifiers::READONLY; + $self->semValue = Modifiers::PUBLIC_SET; }, 286 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, + 287 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, + 288 => static function ($self, $stackPos) { + $self->semValue = Modifiers::READONLY; + }, + 289 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); }, - 287 => static function ($self, $stackPos) { + 290 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); }, - 288 => static function ($self, $stackPos) { + 291 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, - 289 => null, - 290 => static function ($self, $stackPos) { + 292 => null, + 293 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 291 => static function ($self, $stackPos) { + 294 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 292 => null, - 293 => null, - 294 => static function ($self, $stackPos) { + 295 => null, + 296 => null, + 297 => static function ($self, $stackPos) { $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 295 => static function ($self, $stackPos) { + 298 => static function ($self, $stackPos) { $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 296 => static function ($self, $stackPos) { + 299 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 297 => static function ($self, $stackPos) { + 300 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 298 => null, - 299 => static function ($self, $stackPos) { + 301 => null, + 302 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 300 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); - }, - 301 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, - 302 => null, 303 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 304 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 305 => static function ($self, $stackPos) { + 304 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, + 305 => null, 306 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 307 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, 308 => static function ($self, $stackPos) { - $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 309 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); @@ -1894,872 +1910,890 @@ protected function initReduceCallbacks(): void { 311 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 312 => null, + 312 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); + }, 313 => static function ($self, $stackPos) { - $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 314 => static function ($self, $stackPos) { - $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 315 => null, 316 => static function ($self, $stackPos) { + $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 317 => static function ($self, $stackPos) { + $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 318 => null, + 319 => static function ($self, $stackPos) { $self->semValue = null; }, - 317 => null, - 318 => static function ($self, $stackPos) { + 320 => null, + 321 => static function ($self, $stackPos) { $self->semValue = null; }, - 319 => static function ($self, $stackPos) { + 322 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 320 => static function ($self, $stackPos) { + 323 => static function ($self, $stackPos) { $self->semValue = null; }, - 321 => static function ($self, $stackPos) { + 324 => static function ($self, $stackPos) { $self->semValue = array(); }, - 322 => static function ($self, $stackPos) { + 325 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 323 => static function ($self, $stackPos) { + 326 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 324 => static function ($self, $stackPos) { + 327 => static function ($self, $stackPos) { $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 325 => static function ($self, $stackPos) { + 328 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 326 => static function ($self, $stackPos) { + 329 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 327 => static function ($self, $stackPos) { + 330 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 328 => static function ($self, $stackPos) { + 331 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 329 => static function ($self, $stackPos) { + 332 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 330 => static function ($self, $stackPos) { + 333 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, - 331 => null, - 332 => static function ($self, $stackPos) { + 334 => null, + 335 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 333 => static function ($self, $stackPos) { + 336 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 334 => null, - 335 => null, - 336 => static function ($self, $stackPos) { + 337 => null, + 338 => null, + 339 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 337 => static function ($self, $stackPos) { + 340 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 338 => static function ($self, $stackPos) { + 341 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 339 => static function ($self, $stackPos) { + 342 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 340 => static function ($self, $stackPos) { + 343 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 341 => static function ($self, $stackPos) { + 344 => static function ($self, $stackPos) { $self->semValue = array(); }, - 342 => static function ($self, $stackPos) { + 345 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 343 => static function ($self, $stackPos) { + 346 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 344 => static function ($self, $stackPos) { + 347 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); $self->checkPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); }, - 345 => static function ($self, $stackPos) { + 348 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 346 => static function ($self, $stackPos) { + 349 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 347 => static function ($self, $stackPos) { + 350 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 348 => static function ($self, $stackPos) { + 351 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 349 => static function ($self, $stackPos) { + 352 => static function ($self, $stackPos) { $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 350 => static function ($self, $stackPos) { + 353 => static function ($self, $stackPos) { $self->semValue = null; /* will be skipped */ }, - 351 => static function ($self, $stackPos) { + 354 => static function ($self, $stackPos) { $self->semValue = array(); }, - 352 => static function ($self, $stackPos) { + 355 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 353 => static function ($self, $stackPos) { + 356 => static function ($self, $stackPos) { $self->semValue = array(); }, - 354 => static function ($self, $stackPos) { + 357 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 355 => static function ($self, $stackPos) { + 358 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 356 => static function ($self, $stackPos) { + 359 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 357 => static function ($self, $stackPos) { + 360 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 358 => static function ($self, $stackPos) { + 361 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 359 => static function ($self, $stackPos) { + 362 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 360 => static function ($self, $stackPos) { + 363 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 361 => null, - 362 => static function ($self, $stackPos) { + 364 => null, + 365 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 363 => static function ($self, $stackPos) { + 366 => static function ($self, $stackPos) { $self->semValue = null; }, - 364 => null, - 365 => null, - 366 => static function ($self, $stackPos) { + 367 => null, + 368 => null, + 369 => static function ($self, $stackPos) { $self->semValue = 0; }, - 367 => static function ($self, $stackPos) { + 370 => static function ($self, $stackPos) { $self->semValue = 0; }, - 368 => null, - 369 => null, - 370 => static function ($self, $stackPos) { + 371 => null, + 372 => null, + 373 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 371 => static function ($self, $stackPos) { + 374 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 372 => static function ($self, $stackPos) { + 375 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 373 => static function ($self, $stackPos) { + 376 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 374 => static function ($self, $stackPos) { + 377 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PUBLIC_SET; + }, + 378 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PROTECTED_SET; + }, + 379 => static function ($self, $stackPos) { + $self->semValue = Modifiers::PRIVATE_SET; + }, + 380 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 375 => static function ($self, $stackPos) { + 381 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 376 => static function ($self, $stackPos) { + 382 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 377 => static function ($self, $stackPos) { + 383 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 378 => null, - 379 => static function ($self, $stackPos) { + 384 => null, + 385 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 380 => static function ($self, $stackPos) { + 386 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 381 => static function ($self, $stackPos) { + 387 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 382 => static function ($self, $stackPos) { + 388 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 383 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 384 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semValue = []; }, - 385 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 386 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semValue = []; }, - 387 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); }, - 388 => static function ($self, $stackPos) { + 394 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 389 => static function ($self, $stackPos) { + 395 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 390 => static function ($self, $stackPos) { + 396 => static function ($self, $stackPos) { $self->semValue = null; }, - 391 => static function ($self, $stackPos) { + 397 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 392 => static function ($self, $stackPos) { + 398 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 393 => static function ($self, $stackPos) { + 399 => static function ($self, $stackPos) { $self->semValue = 0; }, - 394 => static function ($self, $stackPos) { + 400 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 395 => null, - 396 => null, - 397 => static function ($self, $stackPos) { + 401 => null, + 402 => null, + 403 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 398 => static function ($self, $stackPos) { + 404 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 399 => static function ($self, $stackPos) { + 405 => static function ($self, $stackPos) { $self->semValue = array(); }, - 400 => null, - 401 => null, - 402 => static function ($self, $stackPos) { + 406 => null, + 407 => null, + 408 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 403 => static function ($self, $stackPos) { + 409 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 404 => static function ($self, $stackPos) { + 410 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 405 => static function ($self, $stackPos) { + 411 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 406 => static function ($self, $stackPos) { + 412 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 407 => null, - 408 => null, - 409 => static function ($self, $stackPos) { + 413 => null, + 414 => null, + 415 => static function ($self, $stackPos) { $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 410 => static function ($self, $stackPos) { + 416 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 411 => static function ($self, $stackPos) { + 417 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 412 => static function ($self, $stackPos) { + 418 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 413 => static function ($self, $stackPos) { + 419 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 414 => static function ($self, $stackPos) { + 420 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 415 => static function ($self, $stackPos) { + 421 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 416 => static function ($self, $stackPos) { + 422 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 417 => static function ($self, $stackPos) { + 423 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 418 => static function ($self, $stackPos) { + 424 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 419 => static function ($self, $stackPos) { + 425 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 420 => static function ($self, $stackPos) { + 426 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 421 => static function ($self, $stackPos) { + 427 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 422 => static function ($self, $stackPos) { + 428 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 423 => static function ($self, $stackPos) { + 429 => static function ($self, $stackPos) { $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 424 => static function ($self, $stackPos) { + 430 => static function ($self, $stackPos) { $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 425 => static function ($self, $stackPos) { + 431 => static function ($self, $stackPos) { $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 426 => static function ($self, $stackPos) { + 432 => static function ($self, $stackPos) { $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 427 => static function ($self, $stackPos) { + 433 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 428 => static function ($self, $stackPos) { + 434 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 429 => static function ($self, $stackPos) { + 435 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 430 => static function ($self, $stackPos) { + 436 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 431 => static function ($self, $stackPos) { + 437 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 432 => static function ($self, $stackPos) { + 438 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 433 => static function ($self, $stackPos) { + 439 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 434 => static function ($self, $stackPos) { + 440 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 435 => static function ($self, $stackPos) { + 441 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 436 => static function ($self, $stackPos) { + 442 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 437 => static function ($self, $stackPos) { + 443 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 438 => static function ($self, $stackPos) { + 444 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 439 => static function ($self, $stackPos) { + 445 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 440 => static function ($self, $stackPos) { + 446 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 441 => static function ($self, $stackPos) { + 447 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 442 => static function ($self, $stackPos) { + 448 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 443 => static function ($self, $stackPos) { + 449 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 444 => static function ($self, $stackPos) { + 450 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 445 => static function ($self, $stackPos) { + 451 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 446 => static function ($self, $stackPos) { + 452 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 447 => static function ($self, $stackPos) { + 453 => static function ($self, $stackPos) { $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 448 => static function ($self, $stackPos) { + 454 => static function ($self, $stackPos) { $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 449 => static function ($self, $stackPos) { + 455 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 450 => static function ($self, $stackPos) { + 456 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 451 => static function ($self, $stackPos) { + 457 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 452 => static function ($self, $stackPos) { + 458 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 453 => static function ($self, $stackPos) { + 459 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 454 => static function ($self, $stackPos) { + 460 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 455 => static function ($self, $stackPos) { + 461 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 456 => static function ($self, $stackPos) { + 462 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 457 => static function ($self, $stackPos) { + 463 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 458 => static function ($self, $stackPos) { + 464 => static function ($self, $stackPos) { $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 459 => static function ($self, $stackPos) { + 465 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 460 => static function ($self, $stackPos) { + 466 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 461 => static function ($self, $stackPos) { + 467 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 462 => static function ($self, $stackPos) { + 468 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 463 => static function ($self, $stackPos) { + 469 => static function ($self, $stackPos) { $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 464 => static function ($self, $stackPos) { + 470 => static function ($self, $stackPos) { $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 465 => static function ($self, $stackPos) { + 471 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 466 => static function ($self, $stackPos) { + 472 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 467 => static function ($self, $stackPos) { + 473 => static function ($self, $stackPos) { $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 468 => static function ($self, $stackPos) { + 474 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 469 => static function ($self, $stackPos) { + 475 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 470 => static function ($self, $stackPos) { + 476 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 471 => static function ($self, $stackPos) { + 477 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 472 => static function ($self, $stackPos) { + 478 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 473 => static function ($self, $stackPos) { + 479 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 474 => static function ($self, $stackPos) { + 480 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 475 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 476 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 477 => static function ($self, $stackPos) { + 483 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 478 => static function ($self, $stackPos) { + 484 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 479 => null, - 480 => static function ($self, $stackPos) { + 485 => null, + 486 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 481 => static function ($self, $stackPos) { + 487 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 488 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 483 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 484 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 485 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 486 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 487 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 488 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 489 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 490 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 496 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 499 => null, - 500 => null, - 501 => static function ($self, $stackPos) { + 505 => null, + 506 => null, + 507 => static function ($self, $stackPos) { $self->semValue = array(); }, - 502 => static function ($self, $stackPos) { + 508 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 503 => null, - 504 => static function ($self, $stackPos) { + 509 => null, + 510 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 505 => static function ($self, $stackPos) { + 511 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 506 => static function ($self, $stackPos) { + 512 => static function ($self, $stackPos) { $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 507 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 508 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 509 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 510 => static function ($self, $stackPos) { + 516 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 511 => static function ($self, $stackPos) { + 517 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 512 => static function ($self, $stackPos) { + 518 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 513 => null, - 514 => static function ($self, $stackPos) { + 519 => null, + 520 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 515 => static function ($self, $stackPos) { + 521 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 516 => static function ($self, $stackPos) { + 522 => static function ($self, $stackPos) { $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 517 => static function ($self, $stackPos) { + 523 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 518 => null, - 519 => null, - 520 => static function ($self, $stackPos) { + 524 => null, + 525 => null, + 526 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 521 => static function ($self, $stackPos) { + 527 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 522 => null, - 523 => null, - 524 => static function ($self, $stackPos) { + 528 => null, + 529 => null, + 530 => static function ($self, $stackPos) { $self->semValue = array(); }, - 525 => static function ($self, $stackPos) { + 531 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 526 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 527 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = array(); }, - 528 => null, - 529 => static function ($self, $stackPos) { + 534 => null, + 535 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 530 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 531 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 532 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 533 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 534 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 535 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 536 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 537 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 540 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 541 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 542 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 543 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 544 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 545 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 546 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 547 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 548 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 549 => null, - 550 => null, - 551 => null, - 552 => static function ($self, $stackPos) { + 555 => null, + 556 => null, + 557 => null, + 558 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 553 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 554 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 555 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $self->semValue = null; }, - 556 => null, - 557 => null, - 558 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; - }, - 559 => null, - 560 => null, - 561 => null, 562 => null, 563 => null, - 564 => null, - 565 => static function ($self, $stackPos) { + 564 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, + 565 => null, 566 => null, 567 => null, 568 => null, - 569 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, + 569 => null, 570 => null, 571 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(3-2)]; + }, + 572 => null, + 573 => null, + 574 => null, + 575 => static function ($self, $stackPos) { + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 576 => null, + 577 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 572 => static function ($self, $stackPos) { + 578 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 573 => static function ($self, $stackPos) { + 579 => static function ($self, $stackPos) { $self->semValue = null; }, - 574 => null, - 575 => null, - 576 => null, - 577 => static function ($self, $stackPos) { + 580 => null, + 581 => null, + 582 => null, + 583 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 578 => static function ($self, $stackPos) { + 584 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 579 => null, - 580 => static function ($self, $stackPos) { + 585 => null, + 586 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 581 => static function ($self, $stackPos) { + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 582 => static function ($self, $stackPos) { + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 583 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 584 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 585 => null, - 586 => static function ($self, $stackPos) { + 591 => null, + 592 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 587 => static function ($self, $stackPos) { + 593 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 588 => static function ($self, $stackPos) { + 594 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 589 => static function ($self, $stackPos) { + 595 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 590 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 591 => null, - 592 => static function ($self, $stackPos) { + 597 => null, + 598 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 593 => null, - 594 => null, - 595 => static function ($self, $stackPos) { + 599 => null, + 600 => null, + 601 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 596 => null, - 597 => static function ($self, $stackPos) { + 602 => null, + 603 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 598 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 599 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 600 => null, - 601 => static function ($self, $stackPos) { + 606 => null, + 607 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 602 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 603 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 604 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 605 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 606 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 607 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 608 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 609 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 610 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 611 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 612 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 613 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 614 => static function ($self, $stackPos) { + 620 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 615 => static function ($self, $stackPos) { + 621 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 616 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 617 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 618 => null, - 619 => static function ($self, $stackPos) { + 624 => null, + 625 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 620 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 621 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 622 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 623 => static function ($self, $stackPos) { + 629 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 624 => static function ($self, $stackPos) { + 630 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 625 => static function ($self, $stackPos) { + 631 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 626 => static function ($self, $stackPos) { + 632 => static function ($self, $stackPos) { $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 627 => static function ($self, $stackPos) { + 633 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 628 => static function ($self, $stackPos) { + 634 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 629 => null, + 635 => null, ]; } } diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 1dbd21f587..1367a4bfee 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1196,6 +1196,9 @@ protected function pModifiers(int $modifiers): string { . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') + . ($modifiers & Modifiers::PUBLIC_SET ? 'public(set) ' : '') + . ($modifiers & Modifiers::PROTECTED_SET ? 'protected(set) ' : '') + . ($modifiers & Modifiers::PRIVATE_SET ? 'private(set) ' : '') . ($modifiers & Modifiers::STATIC ? 'static ' : '') . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); } diff --git a/test/PhpParser/Builder/ParamTest.php b/test/PhpParser/Builder/ParamTest.php index 0baeb1e7a0..56eee0a726 100644 --- a/test/PhpParser/Builder/ParamTest.php +++ b/test/PhpParser/Builder/ParamTest.php @@ -227,6 +227,16 @@ public function testMakeProtected(): void { new Node\Param(new Expr\Variable('test'), null, null, false, false, [], Modifiers::PROTECTED), $node ); + + $node = $this->createParamBuilder('test') + ->makeProtectedSet() + ->getNode() + ; + + $this->assertEquals( + new Node\Param(new Expr\Variable('test'), null, null, false, false, [], Modifiers::PROTECTED_SET), + $node + ); } public function testMakePrivate(): void { @@ -239,6 +249,16 @@ public function testMakePrivate(): void { new Node\Param(new Expr\Variable('test'), null, null, false, false, [], Modifiers::PRIVATE), $node ); + + $node = $this->createParamBuilder('test') + ->makePrivateSet() + ->getNode() + ; + + $this->assertEquals( + new Node\Param(new Expr\Variable('test'), null, null, false, false, [], Modifiers::PRIVATE_SET), + $node + ); } public function testMakeReadonly(): void { diff --git a/test/PhpParser/Builder/PropertyTest.php b/test/PhpParser/Builder/PropertyTest.php index 4a37e82796..0505327a7b 100644 --- a/test/PhpParser/Builder/PropertyTest.php +++ b/test/PhpParser/Builder/PropertyTest.php @@ -82,6 +82,20 @@ public function testModifiers(): void { $this->assertEquals( new Stmt\Property(Modifiers::FINAL, [new PropertyItem('test')]), $node); + + $node = $this->createPropertyBuilder('test') + ->makePrivateSet() + ->getNode(); + $this->assertEquals( + new Stmt\Property(Modifiers::PRIVATE_SET, [new PropertyItem('test')]), + $node); + + $node = $this->createPropertyBuilder('test') + ->makeProtectedSet() + ->getNode(); + $this->assertEquals( + new Stmt\Property(Modifiers::PROTECTED_SET, [new PropertyItem('test')]), + $node); } public function testAbstractWithoutHook() { diff --git a/test/PhpParser/Node/ParamTest.php b/test/PhpParser/Node/ParamTest.php index 96d9de40d5..93bbf92cdb 100644 --- a/test/PhpParser/Node/ParamTest.php +++ b/test/PhpParser/Node/ParamTest.php @@ -14,6 +14,9 @@ public function testNoModifiers(): void { $this->assertFalse($node->isProtected()); $this->assertFalse($node->isPrivate()); $this->assertFalse($node->isReadonly()); + $this->assertFalse($node->isPublicSet()); + $this->assertFalse($node->isProtectedSet()); + $this->assertFalse($node->isPrivateSet()); } /** @@ -34,4 +37,14 @@ public static function provideModifiers() { ['readonly'], ]; } + + public function testSetVisibility() { + $node = new Param(new Variable('foo')); + $node->flags = Modifiers::PRIVATE_SET; + $this->assertTrue($node->isPrivateSet()); + $node->flags = Modifiers::PROTECTED_SET; + $this->assertTrue($node->isProtectedSet()); + $node->flags = Modifiers::PUBLIC_SET; + $this->assertTrue($node->isPublicSet()); + } } diff --git a/test/PhpParser/Node/Stmt/PropertyTest.php b/test/PhpParser/Node/Stmt/PropertyTest.php index a55992c128..3b4f31c730 100644 --- a/test/PhpParser/Node/Stmt/PropertyTest.php +++ b/test/PhpParser/Node/Stmt/PropertyTest.php @@ -25,6 +25,9 @@ public function testNoModifiers(): void { $this->assertFalse($node->isPrivate()); $this->assertFalse($node->isStatic()); $this->assertFalse($node->isReadonly()); + $this->assertFalse($node->isPublicSet()); + $this->assertFalse($node->isProtectedSet()); + $this->assertFalse($node->isPrivateSet()); } public function testStaticImplicitlyPublic(): void { @@ -45,4 +48,13 @@ public static function provideModifiers() { ['readonly'], ]; } + + public function testSetVisibility() { + $node = new Property(Modifiers::PRIVATE_SET, []); + $this->assertTrue($node->isPrivateSet()); + $node = new Property(Modifiers::PROTECTED_SET, []); + $this->assertTrue($node->isProtectedSet()); + $node = new Property(Modifiers::PUBLIC_SET, []); + $this->assertTrue($node->isPublicSet()); + } } diff --git a/test/code/parser/stmt/class/asymmetric_visibility.test b/test/code/parser/stmt/class/asymmetric_visibility.test new file mode 100644 index 0000000000..0877f1bfcd --- /dev/null +++ b/test/code/parser/stmt/class/asymmetric_visibility.test @@ -0,0 +1,191 @@ +Asymmetric visibility modifiers +----- + Date: Thu, 5 Sep 2024 21:41:03 +0200 Subject: [PATCH 371/428] Exclude integration test --- test_old/run.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_old/run.php b/test_old/run.php index 8ad60ce3ed..758f250a3d 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -119,6 +119,8 @@ function showHelp($error) { | Zend.tests.grammar.regression_010 # not worth emulating on old PHP versions | Zend.tests.type_declarations.intersection_types.parsing_comment +# comments in property fetch syntax, not emulated on old PHP versions +| Zend.tests.gh14961 )\.phpt$~x', $file)) { return null; } From d0826bd3e4fb32898f7766028f120fe7c89fac47 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 15 Sep 2024 18:28:36 +0200 Subject: [PATCH 372/428] Add changelog entries --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff432c4f16..8ec8633ed3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +Version 5.2.0-dev +----------------- + +### Added + +* [8.4] Added support for `__PROPERTY__` magic constant, represented using a + `Node\Scalar\MagicConst\Property` node. +* [8.4] Added support for property hooks, which are represented using a new `hooks` subnode on + `Node\Stmt\Property` and `Node\Param`, which contains an array of `Node\PropertyHook`. +* [8.4] Added support for asymmetric visibility modifiers. Property `flags` can now hold the + additional bits `Modifiers::PUBLIC_SET`, `Modifiers::PROTECTED_SET` and `Modifiers::PRIVATE_SET`. +* [8.4] Added support for generalized exit function. For backwards compatibility, exit without + argument or a single plain argument continues to use a `Node\Expr\Exit_` node. Otherwise (e.g. + if a named argument is used) it will be represented as a plain `Node\Expr\FuncCall`. +* Added support for passing enum values to various builder methods, like `BuilderFactory::val()`. + +### Removed + +* Removed support for alternative array syntax `$array{0}` from the PHP 8 parser. It is still + supported by the PHP 7 parser. This is necessary in order to support property hooks. + Version 5.1.0 (2024-07-01) -------------------------- From b9c8374498bd7d9b5c11bdd994bd5360f45b3841 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 15 Sep 2024 18:32:49 +0200 Subject: [PATCH 373/428] Run PHP 8.4 integration tests --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c75ec72934..8ff508c594 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -73,7 +73,7 @@ jobs: run: "test_old/run-php-src.sh 7.4.33" test_old_80_70: runs-on: "ubuntu-latest" - name: "PHP 8.3 Code on PHP 7.4 Integration Tests" + name: "PHP 8.4 Code on PHP 7.4 Integration Tests" steps: - name: "Checkout" uses: "actions/checkout@v4" @@ -87,7 +87,7 @@ jobs: - name: "Install PHP 8 dependencies" run: "COMPOSER_ROOT_VERSION=dev-master composer update --no-progress --prefer-dist" - name: "Tests" - run: "test_old/run-php-src.sh 8.3.0RC2" + run: "test_old/run-php-src.sh 8.4.0beta5" phpstan: runs-on: "ubuntu-latest" name: "PHPStan" From 23c79fbbfb725fb92af9bcf41065c8e9a0d49ddb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 15 Sep 2024 18:40:33 +0200 Subject: [PATCH 374/428] Release PHP-Parser 5.2.0 --- CHANGELOG.md | 4 ++-- README.md | 2 +- doc/0_Introduction.markdown | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ec8633ed3..0fac7acf1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ -Version 5.2.0-dev ------------------ +Version 5.2.0 (2024-09-15) +-------------------------- ### Added diff --git a/README.md b/README.md index 7555838e27..edb3ed32f3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ PHP Parser This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and manipulation. -[**Documentation for version 5.x**][doc_master] (current; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x). +[**Documentation for version 5.x**][doc_master] (current; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.4, with limited support for parsing PHP 5.x). [Documentation for version 4.x][doc_4_x] (supported; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3). diff --git a/doc/0_Introduction.markdown b/doc/0_Introduction.markdown index efcf221e07..3c1de6fc38 100644 --- a/doc/0_Introduction.markdown +++ b/doc/0_Introduction.markdown @@ -43,7 +43,7 @@ following caveats: 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 8.3 source code running on PHP 7.4, for example. This emulation is not +This allows to parse PHP 8.4 source code running on PHP 7.4, for example. This emulation is not perfect, but works well in practice. Finally, it should be noted that the parser aims to accept all valid code, not reject all invalid From 8d09ba87f4a845decbfc9dd05e42b9d2aa0da8ee Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 17 Sep 2024 21:33:51 +0200 Subject: [PATCH 375/428] Support PropertyHooks in NameResolver --- lib/PhpParser/NodeVisitor/NameResolver.php | 6 +++++ .../NodeVisitor/NameResolverTest.php | 26 ++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index ccd014ebbd..99449c496f 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -110,6 +110,12 @@ public function enterNode(Node $node) { $node->type = $this->resolveType($node->type); } $this->resolveAttrGroups($node); + } elseif ($node instanceof Node\PropertyHook) { + foreach ($node->params as $param) { + $param->type = $this->resolveType($param->type); + $this->resolveAttrGroups($param); + } + $this->resolveAttrGroups($node); } elseif ($node instanceof Stmt\Const_) { foreach ($node->consts as $const) { $this->addNamespacedName($const); diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index 84dc33e658..e2d5c0386a 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -201,6 +201,18 @@ class A extends B implements C, D { public const X A = X::Bar; public const X\Foo B = X\Foo::Bar; public const \X\Foo C = \X\Foo::Bar; + + public Foo $foo { + #[X] + set(#[X] Bar $v) {} + } + + public function __construct( + public Foo $bar { + #[X] + set(#[X] Bar $v) {} + } + ) {} } #[X] @@ -269,6 +281,18 @@ class A extends \NS\B implements \NS\C, \NS\D public const \NS\X A = \NS\X::Bar; public const \NS\X\Foo B = \NS\X\Foo::Bar; public const \X\Foo C = \X\Foo::Bar; + public \NS\Foo $foo { + #[\NS\X] + set(#[\NS\X] \NS\Bar $v) { + } + } + public function __construct(public \NS\Foo $bar { + #[\NS\X] + set(#[\NS\X] \NS\Bar $v) { + } + }) + { + } } #[\NS\X] interface A extends \NS\C, \NS\D @@ -543,7 +567,7 @@ public function testAttributeOnlyMode(): void { } private function parseAndResolve(string $code): array { - $parser = new PhpParser\Parser\Php7(new PhpParser\Lexer\Emulative()); + $parser = new PhpParser\Parser\Php8(new PhpParser\Lexer\Emulative()); $traverser = new PhpParser\NodeTraverser(); $traverser->addVisitor(new NameResolver()); From aedfcc23cd9ad6b89da179ad95220aec2994b69c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 21 Sep 2024 15:55:21 +0200 Subject: [PATCH 376/428] Include trailing semicolon in GroupUse Fixes https://github.com/nikic/PHP-Parser/issues/1026. --- grammar/php.y | 6 +- lib/PhpParser/Parser/Php7.php | 706 +++++++++-------- lib/PhpParser/Parser/Php8.php | 736 +++++++++--------- test/code/formatPreservation/group_use.test | 9 + .../stmt/namespace/groupUsePositions.test | 2 +- 5 files changed, 727 insertions(+), 732 deletions(-) create mode 100644 test/code/formatPreservation/group_use.test diff --git a/grammar/php.y b/grammar/php.y index 0a57b06184..9b682e6f39 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -256,7 +256,7 @@ top_statement: $this->checkNamespace($$); } | T_USE use_declarations semi { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; } | T_USE use_type use_declarations semi { $$ = Stmt\Use_[$3, $2]; } - | group_use_declaration semi + | group_use_declaration | T_CONST constant_declaration_list semi { $$ = Stmt\Const_[$2]; } ; @@ -266,9 +266,9 @@ use_type: ; group_use_declaration: - T_USE use_type legacy_namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations '}' + T_USE use_type legacy_namespace_name T_NS_SEPARATOR '{' unprefixed_use_declarations '}' semi { $$ = Stmt\GroupUse[$3, $6, $2]; } - | T_USE legacy_namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}' + | T_USE legacy_namespace_name T_NS_SEPARATOR '{' inline_use_declarations '}' semi { $$ = Stmt\GroupUse[$2, $5, Stmt\Use_::TYPE_UNKNOWN]; } ; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index a08e597669..60bc49a1eb 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -165,15 +165,15 @@ class Php7 extends \PhpParser\ParserAbstract protected int $tokenToSymbolMapSize = 400; protected int $actionTableSize = 1287; - protected int $gotoTableSize = 643; + protected int $gotoTableSize = 618; protected int $invalidSymbol = 172; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 436; - protected int $numNonLeafStates = 741; + protected int $YY2TBLSTATE = 437; + protected int $numNonLeafStates = 742; protected array $symbolToName = array( "EOF", @@ -394,135 +394,135 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $action = array( - 128, 129, 130, 564, 131, 132, 943, 753, 754, 755, - 133, 38, 837, 484, 560, 1363,-32766,-32766,-32766, 0, - 828, 1120, 1121, 1122, 1116, 1115, 1114, 1123, 1117, 1118, - 1119,-32766,-32766,-32766, -331, 747, 746,-32766, 839,-32766, + 128, 129, 130, 565, 131, 132, 944, 754, 755, 756, + 133, 38, 838, 485, 561, 1364,-32766,-32766,-32766, 0, + 829, 1121, 1122, 1123, 1117, 1116, 1115, 1124, 1118, 1119, + 1120,-32766,-32766,-32766, -331, 748, 747,-32766, 840,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 24,-32766, 1032, -567, 756, 1120, 1121, 1122, 1116, - 1115, 1114, 1123, 1117, 1118, 1119, 2, 381, 382, 265, - 134, 384, 760, 761, 762, 763, 1109, 424, 425, 1298, - 328, 36, 248, 26, 291, 817, 764, 765, 766, 767, - 768, 769, 770, 771, 772, 773, 793, 565, 794, 795, - 796, 797, 785, 786, 345, 346, 788, 789, 774, 775, - 776, 778, 779, 780, 357, 820, 821, 822, 823, 824, - 566, -567, -567, 299, 781, 782, 567, 568, -194, 805, - 803, 804, 816, 800, 801, 35, -193, 569, 570, 799, - 571, 572, 573, 574,-32766, 575, 576, 470, 471, 485, - 238, -567, 802, 577, 578, -370, 135, -370, 128, 129, - 130, 564, 131, 132, 1065, 753, 754, 755, 133, 38, - -32766, 136, 727, 1025, 1024, 1023, 1029, 1026, 1027, 1028, + -32767, 24,-32766, 1033, -567, 757, 1121, 1122, 1123, 1117, + 1116, 1115, 1124, 1118, 1119, 1120, 2, 381, 382, 265, + 134, 384, 761, 762, 763, 764, 1110, 425, 426, 1299, + 328, 36, 248, 26, 291, 818, 765, 766, 767, 768, + 769, 770, 771, 772, 773, 774, 794, 566, 795, 796, + 797, 798, 786, 787, 345, 346, 789, 790, 775, 776, + 777, 779, 780, 781, 357, 821, 822, 823, 824, 825, + 567, -567, -567, 299, 782, 783, 568, 569, -194, 806, + 804, 805, 817, 801, 802, 35, -193, 570, 571, 800, + 572, 573, 574, 575,-32766, 576, 577, 471, 472, 486, + 238, -567, 803, 578, 579, -370, 135, -370, 128, 129, + 130, 565, 131, 132, 1066, 754, 755, 756, 133, 38, + -32766, 136, 728, 1026, 1025, 1024, 1030, 1027, 1028, 1029, -32766,-32766,-32766,-32767,-32767,-32767,-32767, 101, 102, 103, - 104, 105, -331, 747, 746, 1041, 922,-32766,-32766,-32766, - 838,-32766, 145,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 756,-32766,-32766,-32766, 610,-32766, 290, - -32766,-32766,-32766,-32766,-32766, 833, 717, 265, 134, 384, - 760, 761, 762, 763, -614,-32766, 425,-32766,-32766,-32766, - -32766, -614, 251, 817, 764, 765, 766, 767, 768, 769, - 770, 771, 772, 773, 793, 565, 794, 795, 796, 797, - 785, 786, 345, 346, 788, 789, 774, 775, 776, 778, - 779, 780, 357, 820, 821, 822, 823, 824, 566, 912, - 425, 310, 781, 782, 567, 568, -194, 805, 803, 804, - 816, 800, 801, 1286, -193, 569, 570, 799, 571, 572, - 573, 574, -272, 575, 576, 834, 82, 83, 84, -85, - 802, 577, 578, 237, 148, 777, 748, 749, 750, 751, - 752, 945, 753, 754, 755, 790, 791, 37,-32766, 85, + 104, 105, -331, 748, 747, 1042, 923,-32766,-32766,-32766, + 839,-32766, 145,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 757,-32766,-32766,-32766, 611,-32766, 290, + -32766,-32766,-32766,-32766,-32766, 834, 718, 265, 134, 384, + 761, 762, 763, 764, -614,-32766, 426,-32766,-32766,-32766, + -32766, -614, 251, 818, 765, 766, 767, 768, 769, 770, + 771, 772, 773, 774, 794, 566, 795, 796, 797, 798, + 786, 787, 345, 346, 789, 790, 775, 776, 777, 779, + 780, 781, 357, 821, 822, 823, 824, 825, 567, 913, + 426, 310, 782, 783, 568, 569, -194, 806, 804, 805, + 817, 801, 802, 1287, -193, 570, 571, 800, 572, 573, + 574, 575, -272, 576, 577, 835, 82, 83, 84, -85, + 803, 578, 579, 237, 148, 778, 749, 750, 751, 752, + 753, 946, 754, 755, 756, 791, 792, 37,-32766, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 1041, 276,-32766,-32766,-32766, 924, 1261, - 1260, 1262, 712, 830, 358, 393, 109, 7, 1095, 47, - 756,-32766,-32766,-32766, 837, -85,-32766, 1093,-32766,-32766, - -32766, 1266,-32766,-32766, 757, 758, 759, 760, 761, 762, - 763, 992,-32766, 826,-32766,-32766, 922, -614, 312, -614, - 817, 764, 765, 766, 767, 768, 769, 770, 771, 772, - 773, 793, 815, 794, 795, 796, 797, 785, 786, 787, - 814, 788, 789, 774, 775, 776, 778, 779, 780, 819, - 820, 821, 822, 823, 824, 825, 300, 301, 324, 781, - 782, 783, 784, 832, 805, 803, 804, 816, 800, 801, - 714, 1038, 792, 798, 799, 806, 807, 809, 808, 140, - 810, 811, 837, 327, 340,-32766, 125, 802, 813, 812, - 49, 50, 51, 516, 52, 53, 1041, -110, 341, 912, + 106, 107, 108, 1042, 276,-32766,-32766,-32766, 925, 1262, + 1261, 1263, 713, 831, 358, 393, 109, 7, 1096, 47, + 757,-32766,-32766,-32766, 838, -85,-32766, 1094,-32766,-32766, + -32766, 1267,-32766,-32766, 758, 759, 760, 761, 762, 763, + 764, 993,-32766, 827,-32766,-32766, 923, -614, 312, -614, + 818, 765, 766, 767, 768, 769, 770, 771, 772, 773, + 774, 794, 816, 795, 796, 797, 798, 786, 787, 788, + 815, 789, 790, 775, 776, 777, 779, 780, 781, 820, + 821, 822, 823, 824, 825, 826, 300, 301, 324, 782, + 783, 784, 785, 833, 806, 804, 805, 817, 801, 802, + 715, 1039, 793, 799, 800, 807, 808, 810, 809, 140, + 811, 812, 838, 327, 340,-32766, 125, 803, 814, 813, + 49, 50, 51, 517, 52, 53, 1042, -110, 341, 913, 54, 55, -110, 56, -110, -565,-32766,-32766,-32766, 306, - 1041, 126, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -611, 1094, 106, 107, 108, 739, 276, - -611, 961, 962,-32766, 290, 287, 963, 1328, 57, 58, - -32766, 109, 371, 993, 59, 957, 60, 245, 246, 61, + 1042, 126, -110, -110, -110, -110, -110, -110, -110, -110, + -110, -110, -110, -611, 1095, 106, 107, 108, 740, 276, + -611, 962, 963,-32766, 290, 287, 964, 1329, 57, 58, + -32766, 109, 371, 994, 59, 958, 60, 245, 246, 61, 62, 63, 64, 65, 66, 67, 68,-32766, 28, 267, - 69, 440, 517, 375, -345, 74, 1292, 1293, 518, 391, - 837, 327, -565, -565, 1290, 42, 20, 519, 924, 520, - 922, 521, 712, 522, -563, 692, 523, 524, -565, 922, - 442, 44, 45, 446, 378, 377, 945, 46, 525, 922, - -571, 443, -565, 369, 339, 1344, 103, 104, 105, -562, - 1252, 922, 383, 382, 444, 527, 528, 529, 864, 718, - 865, 693, 424, 460, 461, 462, 445, 531, 532, 719, - 1278, 1279, 1280, 1281, 1283, 1275, 1276, 298, 864, 363, - 865, 722, 843, 1282, 1277, 694, 695, 1261, 1260, 1262, + 69, 441, 518, 375, -345, 74, 1293, 1294, 519, 391, + 838, 327, -565, -565, 1291, 42, 20, 520, 925, 521, + 923, 522, 713, 523, -563, 693, 524, 525, -565, 923, + 443, 44, 45, 447, 378, 377, 946, 46, 526, 923, + -571, 444, -565, 369, 339, 1345, 103, 104, 105, -562, + 1253, 923, 383, 382, 445, 528, 529, 530, 865, 719, + 866, 694, 425, 461, 462, 463, 446, 532, 533, 720, + 1279, 1280, 1281, 1282, 1284, 1276, 1277, 298, 865, 363, + 866, 723, 844, 1283, 1278, 695, 696, 1262, 1261, 1263, 299, -563, -563, 70, -153, -153, -153, 322, 323, 327, - -78, -4, 922, 912, 1261, 1260, 1262, -563, 150, -153, - 283, -153, 912, -153, 151, -153, -562, -562, 153, -570, - 1348, -563, 912, -58, 828, 376, -611, 1347, -611, 747, - 746, 836, -562, -605, 912, -605, 961, 962, 154, 747, - 746, 526, 616, 81, -569, 1038, -562, 327, 155, 898, - 957, -110, -110, -110, 32, 110, 111, 112, 113, 114, + -78, -4, 923, 913, 1262, 1261, 1263, -563, 150, -153, + 283, -153, 913, -153, 151, -153, -562, -562, 153, -570, + 1349, -563, 913, -58, 829, 376, -611, 1348, -611, 748, + 747, 837, -562, -605, 913, -605, 962, 963, 154, 748, + 747, 527, 617, 81, -569, 1039, -562, 327, 155, 899, + 958, -110, -110, -110, 32, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 157, -564, - 1041, 1373, 28, 268, 1374, 33, 922, -87, 659, 21, - 678, 679, 924, -57, 837, 912, 712, -153, 1290, 149, - 408, 924, 379, 380, 283, 712, 123, 1168, 1170, 385, - 386, 978, 124, 137, 138, 712, 729, 376, -561, 437, - 1064, 141, 144, 924, 297, 327, 158, 712, 961, 962, - 650, 651, 159, 526, 1252, -84, 160, 161, 747, 746, - 162, 530, 957, -110, -110, -110, -564, -564, -78, 287, - 1266, 531, 532, -73, 1278, 1279, 1280, 1281, 1283, 1275, - 1276, -72, -564, -71, -70, 11, 1259, 1282, 1277, 912, - -69, 747, 746, -68, 924,-32766, -564, 72, 712, -4, - -16, 1259, 323, 327, -67, -561, -561, 291,-32766,-32766, + 1042, 1374, 28, 268, 1375, 33, 923, -87, 660, 21, + 679, 680, 925, -57, 838, 913, 713, -153, 1291, 149, + 408, 925, 379, 380, 283, 713, 123, 1169, 1171, 385, + 386, 979, 124, 137, 138, 713, 730, 376, -561, 438, + 1065, 141, 144, 925, 297, 327, 158, 713, 962, 963, + 651, 652, 159, 527, 1253, -84, 160, 161, 748, 747, + 162, 531, 958, -110, -110, -110, -564, -564, -78, 287, + 1267, 532, 533, -73, 1279, 1280, 1281, 1282, 1284, 1276, + 1277, -72, -564, -71, -70, 11, 1260, 1283, 1278, 913, + -69, 748, 747, -68, 925,-32766, -564, 72, 713, -4, + -16, 1260, 323, 327, -67, -561, -561, 291,-32766,-32766, -32766, -66,-32766, -65,-32766, -46,-32766, -18, 142,-32766, - 275, -561, 1257, 284,-32766,-32766,-32766, 728,-32766, 731, - -32766,-32766, 921, 147, 1259, -561,-32766, 421, 28, 267, - -305,-32766,-32766,-32766, -301,-32766, 1040,-32766,-32766,-32766, - 837, 837,-32766, 288, 1290, 1038, 279,-32766,-32766,-32766, - 280, 285, 286,-32766,-32766, 1261, 1260, 1262, 924,-32766, - 421, 333, 712, 28, 268, 289, 292, 293, 146, 73, - 1041,-32766, 939, 109, 688, 837, -110, -110, -561, 1290, - 1252, -110, 276,-32766, 837, 828, 1375, 703, 705, 581, - -110, 1127, 307, 648, 283,-32766, 958, 665, 532,-32766, - 1278, 1279, 1280, 1281, 1283, 1275, 1276, 681, 1041, 660, - -50, 10, 666, 1282, 1277, 1252, 304, 467, 495, 311, - 941, 299, 682, 72, 74, 305, -527,-32766, 323, 327, - 327, 299, 290, 532, 836, 1278, 1279, 1280, 1281, 1283, - 1275, 1276, 587, 139, 1297, -561, -561, 614, 1282, 1277, - 34, 0, 0,-32766, 0, 0, 0, 0, 72, 1259, + 275, -561, 1258, 284,-32766,-32766,-32766, 729,-32766, 732, + -32766,-32766, 922, 147, 1260, -561,-32766, 422, 28, 267, + -305,-32766,-32766,-32766, -301,-32766, 1041,-32766,-32766,-32766, + 838, 838,-32766, 288, 1291, 1039, 279,-32766,-32766,-32766, + 280, 285, 286,-32766,-32766, 1262, 1261, 1263, 925,-32766, + 422, 333, 713, 28, 268, 289, 292, 293, 146, 73, + 1042,-32766, 940, 109, 689, 838, -110, -110, -561, 1291, + 1253, -110, 276,-32766, 838, 829, 1376, 704, 706, 582, + -110, 1128, 307, 649, 283,-32766, 959, 666, 533,-32766, + 1279, 1280, 1281, 1282, 1284, 1276, 1277, 682, 1042, 661, + -50, 10, 667, 1283, 1278, 1253, 304, 468, 496, 311, + 942, 299, 683, 72, 74, 305, -527,-32766, 323, 327, + 327, 299, 290, 533, 837, 1279, 1280, 1281, 1282, 1284, + 1276, 1277, 588, 139, 1298, -561, -561, 615, 1283, 1278, + 34, 0, 0,-32766, 0, 0, 0, 0, 72, 1260, 0, -561, 0, 323, 327, 0,-32766,-32766,-32766, 0, - -32766, -517,-32766, 1299,-32766, -561, 0,-32766, 0, 0, - 8, 0,-32766,-32766,-32766, 922,-32766, 40,-32766,-32766, - 27, 373, 1259, 0,-32766, 421, 41, -599, 736,-32766, - -32766,-32766, 737,-32766, 856,-32766,-32766,-32766, 922, 903, - -32766, 1002, 979, 986, 976,-32766,-32766,-32766, 987,-32766, - 901,-32766,-32766, 974, 1098, 1259, 1101,-32766, 421, 48, - 1102, 1099,-32766,-32766,-32766, 1100,-32766, 1106,-32766,-32766, - -32766, 1287, 848,-32766, 1314, 1332, 1366, 490,-32766,-32766, - -32766, 653,-32766, -598,-32766,-32766, -597, -571, 1259, 594, - -32766, 421, -570, -569, 1266,-32766,-32766,-32766, 912,-32766, + -32766, -517,-32766, 1300,-32766, -561, 0,-32766, 0, 0, + 8, 0,-32766,-32766,-32766, 923,-32766, 40,-32766,-32766, + 27, 373, 1260, 0,-32766, 422, 41, -599, 737,-32766, + -32766,-32766, 738,-32766, 857,-32766,-32766,-32766, 923, 904, + -32766, 1003, 980, 987, 977,-32766,-32766,-32766, 988,-32766, + 902,-32766,-32766, 975, 1099, 1260, 1102,-32766, 422, 48, + 1103, 1100,-32766,-32766,-32766, 1101,-32766, 1107,-32766,-32766, + -32766, 1288, 849,-32766, 1315, 1333, 1367, 491,-32766,-32766, + -32766, 654,-32766, -598,-32766,-32766, -597, -571, 1260, 595, + -32766, 422, -570, -569, 1267,-32766,-32766,-32766, 913,-32766, -568,-32766,-32766,-32766, -511, 1,-32766, -275, 29, 30, 39,-32766,-32766,-32766, -250, -250, -250,-32766,-32766, 43, - 376, 912, 71,-32766, 421, 75, 302, 303, 76, 77, - 78, 961, 962, 79, 80,-32766, 526, -249, -249, -249, - -273, 143, 374, 376, 898, 957, -110, -110, -110, 152, - 156, 243, 329, 358, 961, 962, 127, 359, 360, 526, - 361, 362, 363, 364, 365, 366, 367, 898, 957, -110, - -110, -110,-32766, -272, 368, 837, 370, 924, 1259, 13, - 438, 712, -250, 559, 321,-32766,-32766,-32766, 14,-32766, - 15,-32766, 16,-32766, 18, 407,-32766, 486, 487, 494, - 924,-32766,-32766,-32766, 712, -249, 497,-32766,-32766, 498, - -110, -110, 499,-32766, 421, -110, 500, 504, 505, 506, - 514, 592, 698, 1067, -110,-32766, 1208, 1288, 1066, 1047, - 1247, 1043, -277,-32766, -102, 12, 17, 22, 296, 406, - 606, 611, 639, 704, 1212, 1265, 1209, 1345, 0, 372, - 713, 716, 720, 721, 723, 299, 724, 725, 74, 726, - 1225, 730, 715, 0, 327, 733, 1291, 899, 1370, 1372, - 859, 858, 867, 951, 994, 866, 1371, 950, 948, 949, - 952, 1240, 932, 942, 930, 984, 985, 637, 1369, 1326, - 1315, 1333, 1342, 0, 0, 0, 327 + 376, 913, 71,-32766, 422, 75, 302, 303, 76, 77, + 78, 962, 963, 79, 80,-32766, 527, -249, -249, -249, + -273, 143, 374, 376, 899, 958, -110, -110, -110, 152, + 156, 243, 329, 358, 962, 963, 127, 359, 360, 527, + 361, 362, 363, 364, 365, 366, 367, 899, 958, -110, + -110, -110,-32766, -272, 368, 838, 370, 925, 1260, 13, + 439, 713, -250, 560, 321,-32766,-32766,-32766, 14,-32766, + 15,-32766, 16,-32766, 18, 406,-32766, 487, 488, 495, + 925,-32766,-32766,-32766, 713, -249, 498,-32766,-32766, 499, + -110, -110, 500,-32766, 422, -110, 501, 505, 506, 507, + 515, 593, 699, 1068, -110,-32766, 1209, 1289, 1067, 1048, + 1248, 1044, -277,-32766, -102, 12, 17, 22, 296, 405, + 607, 612, 640, 705, 1213, 1266, 1210, 1346, 0, 372, + 714, 717, 721, 722, 724, 299, 725, 726, 74, 727, + 1226, 731, 716, 0, 327, 407, 1292, 411, 734, 900, + 1371, 1373, 860, 859, 952, 995, 1372, 951, 949, 950, + 953, 1241, 933, 943, 931, 985, 986, 638, 1370, 1327, + 1316, 1334, 1343, 0, 0, 0, 327 ); protected array $actionCheck = array( @@ -697,44 +697,44 @@ class Php7 extends \PhpParser\ParserAbstract 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1115, 632, 1058, 145, 1115, 1115, 1115, 632, 632, 632, 632, 632, 632, 632, 632, 796, 632, 632, 649, 145, 643, - 645, 145, 846, 632, 37, 838, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, -18, 37, 360, 5, - 5, 341, 52, 5, 5, 5, 5, 37, 37, 37, - 37, 626, 845, 805, 633, 278, 810, 128, 845, 845, - 845, 26, 136, 120, 815, 819, 259, 825, 825, 829, - 930, 930, 825, 822, 825, 829, 825, 825, 930, 930, - 789, 930, 163, 562, 456, 535, 573, 930, 273, 825, - 825, 825, 825, 804, 930, 58, 586, 825, 234, 194, - 825, 825, 804, 801, 802, 809, 930, 930, 930, 804, - 514, 809, 809, 809, 855, 859, 800, 799, 430, 390, - 614, 127, 854, 799, 799, 825, 541, 800, 799, 800, - 799, 782, 799, 799, 799, 800, 799, 822, 470, 799, - 740, 746, 598, 75, 799, 19, 947, 950, 686, 953, - 935, 954, 1005, 955, 958, 1073, 929, 976, 944, 959, - 1008, 934, 933, 811, 720, 726, 847, 793, 925, 824, - 824, 824, 912, 917, 824, 824, 824, 824, 824, 824, - 824, 824, 720, 897, 858, 820, 982, 727, 728, 1045, - 814, 1089, 1081, 978, 947, 958, 734, 944, 959, 934, - 933, 792, 790, 772, 783, 769, 763, 760, 762, 797, - 1047, 966, 844, 736, 1018, 983, 1087, 1007, 985, 986, - 1019, 1050, 861, 1051, 1090, 818, 1091, 1092, 898, 988, - 1074, 824, 911, 852, 900, 987, 918, 720, 901, 1052, - 1003, 803, 1021, 1022, 1072, 840, 823, 902, 1093, 989, - 990, 991, 1075, 1076, 853, 1012, 931, 1023, 841, 1094, - 1030, 1033, 1036, 1040, 1077, 1095, 1079, 908, 1080, 866, - 839, 964, 821, 1096, 634, 836, 837, 850, 1001, 640, - 977, 1082, 1097, 1098, 1041, 1042, 1043, 1099, 1100, 974, - 868, 1014, 833, 1016, 997, 869, 870, 644, 849, 1053, - 831, 835, 848, 664, 674, 1101, 1102, 1103, 975, 806, - 817, 871, 875, 1054, 826, 1055, 1104, 694, 877, 1105, - 1046, 750, 751, 624, 707, 647, 754, 816, 1084, 857, - 798, 834, 999, 751, 808, 880, 1106, 881, 883, 887, - 1044, 888, 0, 0, 0, 0, 0, 0, 0, 0, + 645, 145, 846, 632, 838, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, -18, 37, 37, 360, 5, + 5, 37, 341, 52, 5, 5, 5, 5, 37, 37, + 37, 37, 626, 845, 805, 633, 278, 810, 128, 845, + 845, 845, 26, 136, 120, 815, 819, 259, 825, 825, + 829, 930, 930, 825, 822, 825, 829, 825, 825, 930, + 930, 789, 930, 163, 562, 456, 535, 573, 930, 273, + 825, 825, 825, 825, 804, 930, 58, 586, 825, 234, + 194, 825, 825, 804, 801, 802, 809, 930, 930, 930, + 804, 514, 809, 809, 809, 855, 859, 800, 799, 430, + 390, 614, 127, 854, 799, 799, 825, 541, 800, 799, + 800, 799, 782, 799, 799, 799, 800, 799, 822, 470, + 799, 740, 746, 598, 75, 799, 19, 947, 950, 686, + 953, 935, 954, 1005, 955, 958, 1073, 929, 976, 944, + 959, 1008, 934, 933, 811, 720, 726, 847, 793, 925, + 824, 824, 824, 912, 917, 824, 824, 824, 824, 824, + 824, 824, 824, 720, 897, 858, 820, 982, 727, 728, + 1045, 814, 1091, 1081, 978, 947, 958, 734, 944, 959, + 934, 933, 792, 790, 772, 783, 769, 763, 760, 762, + 797, 1047, 966, 844, 736, 1018, 983, 1090, 1007, 985, + 986, 1019, 1050, 861, 1051, 1092, 818, 1093, 1094, 898, + 988, 1074, 824, 911, 852, 900, 987, 918, 720, 901, + 1052, 1003, 803, 1021, 1022, 1072, 840, 823, 902, 1095, + 989, 990, 991, 1075, 1076, 853, 1012, 931, 1023, 841, + 1087, 1030, 1033, 1036, 1040, 1077, 1096, 1079, 908, 1080, + 866, 839, 964, 821, 1097, 634, 836, 837, 850, 1001, + 640, 977, 1082, 1089, 1098, 1041, 1042, 1043, 1099, 1100, + 974, 868, 1014, 833, 1016, 997, 869, 870, 644, 849, + 1053, 831, 835, 848, 664, 674, 1101, 1102, 1103, 975, + 806, 817, 871, 875, 1054, 826, 1055, 1104, 694, 877, + 1105, 1046, 750, 751, 624, 707, 647, 754, 816, 1084, + 857, 798, 834, 999, 751, 808, 880, 1106, 881, 883, + 887, 1044, 888, 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, 468, 468, 468, 468, 468, 468, 313, 313, - 313, 313, 313, 468, 468, 468, 468, 468, 468, 468, - 313, 468, 468, 468, 313, 0, 0, 313, 0, 468, + 0, 0, 0, 468, 468, 468, 468, 468, 468, 313, + 313, 313, 313, 313, 468, 468, 468, 468, 468, 468, + 468, 313, 468, 468, 468, 313, 0, 0, 313, 0, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, @@ -748,34 +748,34 @@ class Php7 extends \PhpParser\ParserAbstract 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 297, 297, 297, 297, 297, 297, + 468, 468, 468, 468, 468, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 0, 0, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 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, 297, 297, 297, 297, 297, + 0, 0, 0, 0, 0, 0, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 716, 716, - 297, 297, 297, 297, 716, 716, 716, 716, 716, 716, - 716, 716, 716, 716, 297, 297, 0, 297, 297, 297, - 297, 297, 297, 297, 297, 789, 716, 716, 716, 716, - 452, 452, 452, 452, -95, -95, 716, 716, 716, 394, - 716, 716, 452, 452, 716, 716, 716, 716, 716, 716, - 716, 716, 716, 716, 716, 0, 0, 0, 145, -70, - 716, 822, 822, 822, 822, 716, 716, 716, 716, -70, - -70, 716, 716, 716, 0, 0, 0, 0, 0, 0, - 0, 0, 145, 0, 0, 145, 0, 0, 822, 822, - 716, 394, 789, 659, 716, 0, 0, 0, 0, 145, - 822, 145, 632, 825, -70, -70, 632, 632, 825, 5, - 37, 659, 628, 628, 628, 628, 0, 0, 626, 789, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 716, + 716, 297, 297, 297, 297, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 297, 297, 0, 297, 297, + 297, 297, 297, 297, 297, 297, 789, 716, 716, 716, + 716, 452, 452, 452, 452, -95, -95, 716, 716, 716, + 394, 716, 716, 452, 452, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 0, 0, 0, 145, + -70, 716, 822, 822, 822, 822, 716, 716, 716, 716, + -70, -70, 716, 716, 716, 0, 0, 0, 0, 0, + 0, 0, 0, 145, 0, 0, 145, 0, 0, 822, + 822, 716, 394, 789, 659, 716, 0, 0, 0, 0, + 145, 822, 145, 632, 825, -70, -70, 632, 632, 825, + 5, 37, 659, 628, 628, 628, 628, 0, 0, 626, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 822, 0, 789, 0, 822, 822, 822, 0, 0, 0, - 0, 0, 0, 0, 0, 930, 0, 0, 0, 0, - 0, 0, 0, 822, 0, 0, 930, 0, 0, 0, + 789, 822, 0, 789, 0, 822, 822, 822, 0, 0, + 0, 0, 0, 0, 0, 0, 930, 0, 0, 0, + 0, 0, 0, 0, 822, 0, 930, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 822, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 824, 840, 0, 0, 840, 0, 824, - 824, 824, 0, 0, 0, 849, 826 + 0, 0, 0, 0, 0, 822, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 824, 840, 0, 0, 840, + 0, 824, 824, 824, 0, 0, 0, 849, 826 ); protected array $actionDefault = array( @@ -818,115 +818,112 @@ class Php7 extends \PhpParser\ParserAbstract 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, 110,32767,32767,32767, 100, 195, 195, 195, 195, 195, 195, 195, 195, 531, 195, 195, 190,32767, 268, - 270, 102, 578, 195,32767, 533,32767,32767,32767,32767, + 270, 102, 578, 195, 533,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, 516, 451, 138,32767, 518, 138, 561, 443, 444, - 445, 561, 561, 561, 315, 292,32767,32767,32767,32767, - 531, 531, 100, 100, 100, 100,32767,32767,32767,32767, - 111, 502, 99, 99, 99, 99, 99, 103, 101,32767, - 32767,32767,32767, 223,32767, 101, 99,32767, 101, 101, - 32767,32767, 223, 225, 212, 227,32767, 582, 583, 223, - 101, 227, 227, 227, 247, 247, 505, 321, 101, 99, - 101, 101, 197, 321, 321,32767, 101, 505, 321, 505, - 321, 199, 321, 321, 321, 505, 321,32767, 101, 321, - 214, 391, 99, 99, 321,32767,32767,32767, 518,32767, - 32767,32767,32767,32767,32767,32767, 222,32767,32767,32767, - 32767,32767,32767,32767,32767, 548,32767, 566, 580, 449, - 450, 452, 565, 563, 474, 475, 476, 477, 478, 479, - 480, 482, 612,32767, 522,32767,32767,32767, 341,32767, - 622,32767,32767,32767, 9, 74, 511, 42, 43, 51, - 57, 537, 538, 539, 540, 534, 535, 541, 536,32767, + 32767,32767, 516, 451, 138,32767, 518, 138, 561, 443, + 444, 445, 561, 561, 561, 315, 292,32767,32767,32767, + 32767, 531, 531, 100, 100, 100, 100,32767,32767,32767, + 32767, 111, 502, 99, 99, 99, 99, 99, 103, 101, + 32767,32767,32767,32767, 223,32767, 101, 99,32767, 101, + 101,32767,32767, 223, 225, 212, 227,32767, 582, 583, + 223, 101, 227, 227, 227, 247, 247, 505, 321, 101, + 99, 101, 101, 197, 321, 321,32767, 101, 505, 321, + 505, 321, 199, 321, 321, 321, 505, 321,32767, 101, + 321, 214, 391, 99, 99, 321,32767,32767,32767, 518, + 32767,32767,32767,32767,32767,32767,32767, 222,32767,32767, + 32767,32767,32767,32767,32767,32767, 548,32767, 566, 580, + 449, 450, 452, 565, 563, 474, 475, 476, 477, 478, + 479, 480, 482, 612,32767, 522,32767,32767,32767, 341, + 32767, 622,32767,32767,32767, 9, 74, 511, 42, 43, + 51, 57, 537, 538, 539, 540, 534, 535, 541, 536, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 623,32767, 561,32767,32767,32767, - 32767, 448, 543, 588,32767,32767, 562, 615,32767,32767, - 32767,32767,32767,32767,32767, 138,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 548,32767, 136,32767, - 32767,32767,32767,32767,32767,32767,32767, 544,32767,32767, - 32767, 561,32767,32767,32767,32767, 317, 314,32767,32767, + 32767,32767,32767,32767,32767, 623,32767, 561,32767,32767, + 32767,32767, 448, 543, 588,32767,32767, 562, 615,32767, + 32767,32767,32767,32767,32767,32767, 138,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 548,32767, 136, + 32767,32767,32767,32767,32767,32767,32767,32767, 544,32767, + 32767,32767, 561,32767,32767,32767,32767, 317, 314,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 561,32767,32767,32767,32767,32767, - 294,32767, 311,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 561,32767,32767,32767,32767, + 32767, 294,32767, 311,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 387, 518, 297, 299, 300,32767,32767,32767,32767, - 363,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 152, 152, 3, 3, 344, 152, 152, 152, - 344, 344, 152, 344, 344, 344, 152, 152, 152, 152, - 152, 152, 280, 185, 262, 265, 247, 247, 152, 355, - 152 + 32767,32767, 387, 518, 297, 299, 300,32767,32767,32767, + 32767, 363,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 152, 152, 3, 3, 344, 152, 152, + 152, 344, 344, 152, 344, 344, 344, 152, 152, 152, + 152, 152, 152, 280, 185, 262, 265, 247, 247, 152, + 355, 152 ); protected array $goto = array( - 196, 196, 1039, 1070, 699, 464, 586, 469, 469, 854, - 735, 640, 642, 1203, 855, 662, 469, 352, 708, 686, - 689, 1012, 697, 706, 1008, 624, 661, 166, 166, 166, + 196, 196, 1040, 1071, 700, 465, 587, 470, 470, 855, + 736, 641, 643, 1204, 856, 663, 470, 830, 709, 687, + 690, 1013, 698, 707, 1009, 625, 662, 166, 166, 166, 166, 220, 197, 193, 193, 176, 178, 215, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 188, 189, - 190, 191, 192, 217, 215, 218, 539, 540, 422, 541, - 544, 545, 546, 547, 548, 549, 550, 551, 1154, 167, + 190, 191, 192, 217, 215, 218, 540, 541, 423, 542, + 545, 546, 547, 548, 549, 550, 551, 552, 1155, 167, 168, 169, 195, 170, 171, 172, 165, 173, 174, 175, 177, 214, 216, 219, 239, 242, 253, 254, 256, 257, 258, 259, 260, 261, 262, 263, 269, 270, 271, 272, - 281, 282, 317, 318, 319, 428, 429, 430, 601, 221, + 281, 282, 317, 318, 319, 429, 430, 431, 602, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 179, 236, 180, 188, 189, 190, - 191, 192, 217, 1154, 198, 199, 200, 201, 240, 181, + 191, 192, 217, 1155, 198, 199, 200, 201, 240, 181, 182, 202, 183, 203, 199, 184, 241, 198, 164, 204, 205, 185, 206, 207, 208, 186, 209, 210, 187, 211, - 212, 213, 278, 278, 278, 278, 857, 1112, 1113, 1359, - 1359, 603, 613, 627, 630, 631, 632, 633, 654, 655, - 656, 710, 356, 895, 853, 895, 895, 1359, 432, 664, - 977, 459, 356, 356, 427, 320, 314, 315, 336, 596, - 431, 337, 433, 641, 1362, 1362, 356, 356, 563, 556, - 356, 862, 1376, 911, 906, 907, 920, 863, 908, 860, - 909, 910, 861, 558, 914, 1234, 946, 356, 356, 1235, - 1238, 947, 1239, 829, 1092, 1087, 1088, 1089, 441, 342, - 556, 563, 588, 589, 347, 599, 605, 420, 620, 621, - 355, 355, 355, 355, 657, 658, 25, 675, 676, 677, - 1258, 1039, 1258, 1258, 398, 401, 604, 608, 353, 354, - 1039, 1258, 1039, 696, 1039, 1039, 1320, 831, 1039, 1039, - 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 1039, 696, - 850, 481, 696, 888, 1258, 343, 511, 870, 483, 1258, - 1258, 1258, 1258, 593, 835, 1258, 1258, 1258, 1341, 1341, - 1341, 1341, 554, 882, 554, 554, 869, 1045, 1044, 344, - 343, 1048, 1049, 554, 928, 626, 626, 558, 929, 1336, - 1337, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, 1289, - 1289, 350, 915, 850, 916, 835, 457, 835, 326, 309, - 944, 971, 971, 971, 971, 944, 1349, 457, 965, 972, - 1308, 1308, 478, 1334, 1335, 998, 1308, 1308, 1308, 1308, - 1308, 1308, 1308, 1308, 1308, 1308, 502, 426, 503, 615, - 552, 552, 552, 552, 509, 607, 1305, 1305, 634, 636, - 638, 1251, 1305, 1305, 1305, 1305, 1305, 1305, 1305, 1305, - 1305, 1305, 543, 543, 396, 249, 249, 591, 543, 543, - 543, 543, 543, 543, 543, 543, 543, 543, 1253, 969, - 411, 707, 663, 450, 450, 1151, 450, 450, 1331, 1063, - 1331, 1331, 247, 247, 247, 247, 244, 250, 439, 1331, - 602, 1105, 5, 685, 6, 557, 583, 597, 618, 338, - 557, 711, 583, 847, 399, 463, 510, 702, 669, 1103, - 875, 960, 850, 1343, 1343, 1343, 1343, 472, 600, 473, - 474, 1254, 1255, 405, 1241, 880, 619, 872, 1367, 1368, - 845, 1249, 1076, 542, 542, 738, 1020, 1241, 884, 542, - 1327, 542, 542, 542, 542, 542, 542, 542, 542, 1256, - 1317, 1318, 1080, 878, 479, 1126, 982, 1030, 0, 0, - 0, 273, 325, 0, 325, 325, 0, 450, 450, 450, - 450, 450, 450, 450, 450, 450, 450, 450, 0, 0, - 450, 0, 1078, 0, 409, 410, 1329, 1329, 1078, 673, - 0, 674, 0, 413, 414, 415, 0, 687, 609, 0, - 416, 933, 1141, 0, 0, 348, 883, 871, 1075, 1079, - 0, 434, 0, 1017, 0, 0, 0, 0, 0, 980, - 0, 874, 434, 667, 996, 0, 0, 0, 0, 868, - 1046, 1046, 0, 0, 0, 668, 1057, 1053, 1054, 1015, - 1015, 1248, 970, 1042, 1042, 0, 0, 684, 954, 0, - 0, 1034, 1050, 1051, 1001, 0, 0, 973, 0, 734, - 0, 0, 555, 1010, 1005, 1124, 887, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 252, 252 + 212, 213, 278, 278, 278, 278, 858, 433, 665, 978, + 916, 604, 917, 428, 320, 314, 315, 336, 597, 432, + 337, 434, 642, 627, 627, 896, 854, 896, 896, 1290, + 1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290, 427, + 851, 616, 553, 553, 553, 553, 352, 608, 564, 557, + 871, 421, 912, 907, 908, 921, 864, 909, 861, 910, + 911, 862, 1002, 915, 868, 974, 883, 735, 867, 870, + 556, 1011, 1006, 1360, 1360, 1093, 1088, 1089, 1090, 342, + 557, 564, 589, 590, 347, 600, 606, 889, 621, 622, + 836, 1360, 594, 851, 658, 659, 25, 676, 677, 678, + 1259, 1040, 1259, 1259, 397, 400, 605, 609, 1363, 1363, + 1040, 1259, 1040, 697, 1040, 1040, 460, 832, 1040, 1040, + 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 697, + 350, 836, 697, 836, 1259, 355, 355, 355, 355, 1259, + 1259, 1259, 1259, 1113, 1114, 1259, 1259, 1259, 1342, 1342, + 1342, 1342, 884, 872, 1076, 1080, 343, 5, 503, 6, + 504, 356, 1350, 442, 929, 981, 510, 395, 930, 249, + 249, 356, 356, 479, 1335, 1336, 555, 999, 555, 555, + 344, 343, 970, 412, 708, 356, 356, 555, 971, 356, + 945, 1377, 635, 637, 639, 945, 247, 247, 247, 247, + 244, 250, 559, 1046, 1045, 592, 356, 356, 1049, 1050, + 458, 1125, 888, 851, 664, 972, 972, 972, 972, 1309, + 1309, 458, 966, 973, 1152, 1309, 1309, 1309, 1309, 1309, + 1309, 1309, 1309, 1309, 1309, 1306, 1306, 326, 309, 1337, + 1338, 1306, 1306, 1306, 1306, 1306, 1306, 1306, 1306, 1306, + 1306, 1016, 1016, 598, 619, 1321, 1064, 610, 603, 1106, + 934, 1142, 440, 451, 451, 670, 451, 451, 1332, 712, + 1332, 1332, 1018, 686, 511, 703, 512, 1104, 482, 1332, + 875, 338, 668, 997, 876, 484, 558, 584, 869, 848, + 404, 558, 961, 584, 873, 398, 464, 353, 354, 1250, + 1249, 1021, 620, 1344, 1344, 1344, 1344, 559, 473, 601, + 474, 475, 1077, 1043, 1043, 739, 881, 685, 955, 1368, + 1369, 1035, 1051, 1052, 480, 544, 544, 885, 983, 1081, + 1328, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 543, 543, 1127, 879, 1031, 0, 543, 0, 543, + 543, 543, 543, 543, 543, 543, 543, 451, 451, 451, + 451, 451, 451, 451, 451, 451, 451, 451, 1254, 0, + 451, 1252, 1079, 0, 409, 410, 1330, 1330, 1079, 674, + 0, 675, 0, 414, 415, 416, 0, 688, 0, 0, + 417, 0, 0, 0, 0, 348, 273, 325, 0, 325, + 325, 0, 0, 0, 0, 252, 252, 614, 628, 631, + 632, 633, 634, 655, 656, 657, 711, 435, 0, 0, + 0, 0, 0, 1255, 1256, 0, 1242, 0, 435, 0, + 0, 0, 846, 0, 0, 0, 1047, 1047, 0, 1242, + 0, 669, 1058, 1054, 1055, 0, 0, 0, 0, 1235, + 947, 1257, 1318, 1319, 1236, 1239, 948, 1240 ); protected array $gotoCheck = array( 42, 42, 73, 128, 73, 156, 48, 154, 154, 26, - 48, 48, 48, 156, 27, 48, 154, 97, 9, 48, + 48, 48, 48, 156, 27, 48, 154, 6, 9, 48, 48, 48, 48, 48, 48, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -941,101 +938,98 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 23, 23, 23, 23, 15, 145, 145, 188, - 188, 131, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 14, 25, 25, 25, 25, 188, 66, 66, - 49, 83, 14, 14, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 188, 188, 14, 14, 76, 76, - 14, 15, 14, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 14, 15, 79, 79, 14, 14, 79, - 79, 79, 79, 6, 15, 15, 15, 15, 83, 76, - 76, 76, 76, 76, 76, 76, 76, 43, 76, 76, - 24, 24, 24, 24, 86, 86, 76, 86, 86, 86, - 73, 73, 73, 73, 59, 59, 59, 59, 97, 97, - 73, 73, 73, 7, 73, 73, 14, 7, 73, 73, + 42, 42, 23, 23, 23, 23, 15, 66, 66, 49, + 65, 131, 65, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 108, 108, 25, 25, 25, 25, 108, + 108, 108, 108, 108, 108, 108, 108, 108, 108, 13, + 22, 13, 107, 107, 107, 107, 97, 107, 76, 76, + 35, 43, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 50, 15, 15, 50, 35, 50, 15, 35, + 50, 50, 50, 188, 188, 15, 15, 15, 15, 76, + 76, 76, 76, 76, 76, 76, 76, 45, 76, 76, + 12, 188, 178, 22, 86, 86, 76, 86, 86, 86, + 73, 73, 73, 73, 59, 59, 59, 59, 188, 188, + 73, 73, 73, 7, 73, 73, 83, 7, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 7, - 22, 84, 7, 45, 73, 174, 14, 35, 84, 73, - 73, 73, 73, 178, 12, 73, 73, 73, 9, 9, - 9, 9, 19, 35, 19, 19, 35, 119, 119, 174, - 174, 120, 120, 19, 73, 108, 108, 14, 73, 184, - 184, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 185, 65, 22, 65, 12, 19, 12, 175, 175, - 9, 19, 19, 19, 19, 9, 187, 19, 19, 19, - 176, 176, 182, 182, 182, 103, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 160, 13, 160, 13, - 107, 107, 107, 107, 160, 107, 177, 177, 85, 85, - 85, 14, 177, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 179, 179, 62, 5, 5, 104, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 20, 93, - 93, 93, 64, 23, 23, 155, 23, 23, 131, 115, - 131, 131, 5, 5, 5, 5, 5, 5, 113, 131, - 8, 8, 46, 117, 46, 9, 9, 2, 2, 29, - 9, 8, 9, 18, 9, 9, 8, 8, 121, 8, - 39, 92, 22, 131, 131, 131, 131, 9, 9, 9, - 9, 20, 20, 28, 20, 9, 80, 37, 9, 9, - 20, 166, 130, 162, 162, 99, 110, 20, 41, 162, - 131, 162, 162, 162, 162, 162, 162, 162, 162, 20, - 20, 20, 133, 9, 157, 148, 96, 114, -1, -1, - -1, 24, 24, -1, 24, 24, -1, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, -1, -1, - 23, -1, 131, -1, 82, 82, 131, 131, 131, 82, - -1, 82, -1, 82, 82, 82, -1, 82, 17, -1, - 82, 17, 17, -1, -1, 82, 16, 16, 16, 16, - -1, 118, -1, 17, -1, -1, -1, -1, -1, 16, - -1, 17, 118, 17, 17, -1, -1, -1, -1, 17, - 118, 118, -1, -1, -1, 118, 118, 118, 118, 107, - 107, 17, 16, 89, 89, -1, -1, 89, 89, -1, - -1, 89, 89, 89, 50, -1, -1, 50, -1, 50, - -1, -1, 50, 50, 50, 16, 16, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 5, 5 + 185, 12, 7, 12, 73, 24, 24, 24, 24, 73, + 73, 73, 73, 145, 145, 73, 73, 73, 9, 9, + 9, 9, 16, 16, 16, 16, 174, 46, 160, 46, + 160, 14, 187, 83, 73, 16, 160, 62, 73, 5, + 5, 14, 14, 182, 182, 182, 19, 103, 19, 19, + 174, 174, 93, 93, 93, 14, 14, 19, 16, 14, + 9, 14, 85, 85, 85, 9, 5, 5, 5, 5, + 5, 5, 14, 119, 119, 104, 14, 14, 120, 120, + 19, 16, 16, 22, 64, 19, 19, 19, 19, 176, + 176, 19, 19, 19, 155, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 177, 177, 175, 175, 184, + 184, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 107, 107, 2, 2, 14, 115, 17, 8, 8, + 17, 17, 113, 23, 23, 121, 23, 23, 131, 8, + 131, 131, 17, 117, 8, 8, 14, 8, 84, 131, + 17, 29, 17, 17, 39, 84, 9, 9, 17, 18, + 28, 9, 92, 9, 37, 9, 9, 97, 97, 166, + 17, 110, 80, 131, 131, 131, 131, 14, 9, 9, + 9, 9, 130, 89, 89, 99, 9, 89, 89, 9, + 9, 89, 89, 89, 157, 179, 179, 41, 96, 133, + 131, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 162, 162, 148, 9, 114, -1, 162, -1, 162, + 162, 162, 162, 162, 162, 162, 162, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 20, -1, + 23, 14, 131, -1, 82, 82, 131, 131, 131, 82, + -1, 82, -1, 82, 82, 82, -1, 82, -1, -1, + 82, -1, -1, -1, -1, 82, 24, 24, -1, 24, + 24, -1, -1, -1, -1, 5, 5, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 118, -1, -1, + -1, -1, -1, 20, 20, -1, 20, -1, 118, -1, + -1, -1, 20, -1, -1, -1, 118, 118, -1, 20, + -1, 118, 118, 118, 118, -1, -1, -1, -1, 79, + 79, 20, 20, 20, 79, 79, 79, 79 ); protected array $gotoBase = array( - 0, 0, -267, 0, 0, 404, 223, 266, 432, 8, - 0, 0, 7, 39, -116, -183, 103, 83, 143, 47, - 23, 0, 12, 159, 247, 180, 5, 10, 135, 152, - 0, 0, 0, 0, 0, -75, 0, 137, 0, 136, - 0, 46, -1, 224, 0, 267, -296, 0, -707, 172, - 592, 0, 0, 0, 0, 0, -15, 0, 0, 219, - 0, 0, 362, 0, 184, 328, -49, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -137, 0, 0, -184, - 129, -187, 41, -87, -181, -93, -466, 0, 0, 314, - 0, 0, 131, 114, 0, 0, 62, -468, 0, 77, - 0, 0, 0, 330, 364, 0, 0, 352, 88, 0, - 115, 0, 0, 161, -4, 154, 0, 160, 295, 38, - 36, 168, 0, 0, 0, 0, 0, 0, 1, 0, - 107, 163, 0, 59, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -106, 0, 0, 60, 0, - 0, 0, 0, 0, -27, 181, -263, 63, 0, 0, - -121, 0, 246, 0, 0, 0, 111, 0, 0, 0, - 0, 0, 0, 0, -3, 26, 123, 149, 274, 165, - 0, 0, 61, 0, -44, 311, 0, 325, -139, 0, + 0, 0, -302, 0, 0, 328, 7, 266, 410, 8, + 0, 0, -47, -139, 23, -183, -142, -49, 139, 71, + 134, 0, -78, 159, 292, 182, 5, 10, 112, 144, + 0, 0, 0, 0, 0, -162, 0, 114, 0, 120, + 0, 44, -1, 188, 0, 221, -422, 0, -708, 151, + 210, 0, 0, 0, 0, 0, -15, 0, 0, 219, + 0, 0, 285, 0, 136, 156, -70, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -137, 0, 0, 200, + 115, 208, 40, -2, -35, -130, -467, 0, 0, 194, + 0, 0, 122, 37, 0, 0, 43, -280, 0, 67, + 0, 0, 0, 302, 322, 0, 0, 174, -54, 0, + 90, 0, 0, 145, -7, 141, 0, 150, 311, 84, + 83, 135, 0, 0, 0, 0, 0, 0, 1, 0, + 97, 163, 0, 45, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 30, 0, 0, 57, 0, + 0, 0, 0, 0, -27, 140, -263, 42, 0, 0, + -180, 0, 264, 0, 0, 0, 89, 0, 0, 0, + 0, 0, 0, 0, 18, 75, 142, 158, 223, 248, + 0, 0, 32, 0, 26, 260, 0, 291, -75, 0, 0 ); protected array $gotoDefault = array( - -32768, 515, 742, 4, 743, 937, 818, 827, 579, 533, - 709, 349, 628, 423, 1325, 913, 1140, 598, 846, 1267, - 1273, 458, 849, 331, 732, 925, 896, 897, 402, 388, - 394, 400, 652, 629, 496, 881, 454, 873, 488, 876, - 453, 885, 163, 419, 513, 889, 3, 892, 561, 923, - 975, 389, 900, 390, 680, 902, 582, 904, 905, 397, - 403, 404, 1145, 590, 625, 917, 255, 584, 918, 387, - 919, 927, 392, 395, 690, 468, 507, 501, 412, 1107, - 585, 612, 649, 447, 475, 623, 635, 622, 482, 435, - 417, 330, 959, 967, 489, 466, 981, 351, 989, 740, - 1153, 643, 491, 997, 644, 1004, 1007, 534, 535, 480, - 1019, 266, 1022, 492, 1031, 23, 670, 1036, 1037, 671, - 645, 1059, 646, 672, 647, 1061, 465, 580, 1069, 455, - 1077, 1313, 456, 1081, 264, 1084, 277, 418, 436, 1090, - 1091, 9, 1097, 700, 701, 19, 274, 512, 1125, 691, - -32768,-32768,-32768,-32768, 452, 1152, 451, 1222, 1224, 562, - 493, 1242, 294, 1245, 683, 508, 1250, 448, 1316, 449, - 536, 476, 316, 537, 1360, 308, 334, 313, 553, 295, - 335, 538, 477, 1322, 1330, 332, 31, 1350, 1361, 595, - 617 + -32768, 516, 743, 4, 744, 938, 819, 828, 580, 534, + 710, 349, 629, 424, 1326, 914, 1141, 599, 847, 1268, + 1274, 459, 850, 331, 733, 926, 897, 898, 401, 388, + 863, 399, 653, 630, 497, 882, 455, 874, 489, 877, + 454, 886, 163, 420, 514, 890, 3, 893, 562, 924, + 976, 389, 901, 390, 681, 903, 583, 905, 906, 396, + 402, 403, 1146, 591, 626, 918, 255, 585, 919, 387, + 920, 928, 392, 394, 691, 469, 508, 502, 413, 1108, + 586, 613, 650, 448, 476, 624, 636, 623, 483, 436, + 418, 330, 960, 968, 490, 467, 982, 351, 990, 741, + 1154, 644, 492, 998, 645, 1005, 1008, 535, 536, 481, + 1020, 266, 1023, 493, 1032, 23, 671, 1037, 1038, 672, + 646, 1060, 647, 673, 648, 1062, 466, 581, 1070, 456, + 1078, 1314, 457, 1082, 264, 1085, 277, 419, 437, 1091, + 1092, 9, 1098, 701, 702, 19, 274, 513, 1126, 692, + -32768,-32768,-32768,-32768, 453, 1153, 452, 1223, 1225, 563, + 494, 1243, 294, 1246, 684, 509, 1251, 449, 1317, 450, + 537, 477, 316, 538, 1361, 308, 334, 313, 554, 295, + 335, 539, 478, 1323, 1331, 332, 31, 1351, 1362, 596, + 618 ); protected array $ruleToNonTerminal = array( @@ -1118,7 +1112,7 @@ class Php7 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, - 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, + 4, 1, 3, 1, 1, 8, 7, 2, 3, 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, 3, 3, 2, 0, 1, 1, 1, 1, 1, 3, 7, @@ -1381,10 +1375,10 @@ protected function initReduceCallbacks(): void { $self->semValue = Stmt\Use_::TYPE_CONSTANT; }, 125 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, 126 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, 127 => null, 128 => static function ($self, $stackPos) { diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 8c34240def..628beb5f34 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -165,15 +165,15 @@ class Php8 extends \PhpParser\ParserAbstract protected int $tokenToSymbolMapSize = 400; protected int $actionTableSize = 1289; - protected int $gotoTableSize = 685; + protected int $gotoTableSize = 641; protected int $invalidSymbol = 172; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 441; - protected int $numNonLeafStates = 752; + protected int $YY2TBLSTATE = 442; + protected int $numNonLeafStates = 753; protected array $symbolToName = array( "EOF", @@ -394,135 +394,135 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $action = array( - 126, 127, 128, 569, 129, 130, 954, 764, 765, 766, - 131, 38, 848, -85,-32766, 1374,-32766,-32766,-32766, 0, - 839, 1132, 1133, 1134, 1128, 1127, 1126, 1135, 1129, 1130, - 1131,-32766,-32766,-32766, 850, 758, 757,-32766,-32766,-32766, + 126, 127, 128, 570, 129, 130, 955, 765, 766, 767, + 131, 38, 849, -85,-32766, 1375,-32766,-32766,-32766, 0, + 840, 1133, 1134, 1135, 1129, 1128, 1127, 1136, 1130, 1131, + 1132,-32766,-32766,-32766, 851, 759, 758,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1003,-32766, 1043, -569, 767, 1132, 1133, 1134, 1128, - 1127, 1126, 1135, 1129, 1130, 1131, 388, 387, 841, 263, - 132, 389, 771, 772, 773, 774, 429,-32766, 430, -85, - 956, 36, 246, 47, 291, 828, 775, 776, 777, 778, - 779, 780, 781, 782, 783, 784, 804, 570, 805, 806, - 807, 808, 796, 797, 343, 344, 799, 800, 785, 786, - 787, 789, 790, 791, 359, 831, 832, 833, 834, 835, - 571, -569, -569, 360, 792, 793, 572, 573, -331, 816, - 814, 815, 827, 811, 812, 2, -194, 574, 575, 810, - 576, 577, 578, 579, 322, 580, 581, 875, 843, 876, - 297, 298, 813, 582, 583, 721, 133, 236, 126, 127, - 128, 569, 129, 130, 1076, 764, 765, 766, 131, 38, - -32766, 26, 734, 1036, 1035, 1034, 1040, 1037, 1038, 1039, - -32766,-32766,-32766, 1004, 104, 105, 106, 107, 108, 35, - 275, 956,-32766, 758, 757, 1052, 849,-32766,-32766,-32766, - 847,-32766, 109,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - 148, 475, 476, 767,-32766,-32766,-32766, 1052,-32766, 290, - -32766,-32766,-32766,-32766,-32766, 615, 134, 263, 132, 389, - 771, 772, 773, 774, 365,-32766, 430,-32766,-32766,-32766, - -32766, 290, 143, 828, 775, 776, 777, 778, 779, 780, - 781, 782, 783, 784, 804, 570, 805, 806, 807, 808, - 796, 797, 343, 344, 799, 800, 785, 786, 787, 789, - 790, 791, 359, 831, 832, 833, 834, 835, 571,-32766, - -32766,-32766, 792, 793, 572, 573, -331, 816, 814, 815, - 827, 811, 812, 1299, -194, 574, 575, 810, 576, 577, - 578, 579, 844, 580, 581, 149, 82, 83, 84, -272, - 813, 582, 583, 249, 146, 788, 759, 760, 761, 762, - 763, 235, 764, 765, 766, 801, 802, 37, 307, 85, + -32767, 1004,-32766, 1044, -569, 768, 1133, 1134, 1135, 1129, + 1128, 1127, 1136, 1130, 1131, 1132, 388, 387, 842, 263, + 132, 389, 772, 773, 774, 775, 430,-32766, 431, -85, + 957, 36, 246, 47, 291, 829, 776, 777, 778, 779, + 780, 781, 782, 783, 784, 785, 805, 571, 806, 807, + 808, 809, 797, 798, 343, 344, 800, 801, 786, 787, + 788, 790, 791, 792, 359, 832, 833, 834, 835, 836, + 572, -569, -569, 360, 793, 794, 573, 574, -331, 817, + 815, 816, 828, 812, 813, 2, -194, 575, 576, 811, + 577, 578, 579, 580, 322, 581, 582, 876, 844, 877, + 297, 298, 814, 583, 584, 722, 133, 236, 126, 127, + 128, 570, 129, 130, 1077, 765, 766, 767, 131, 38, + -32766, 26, 735, 1037, 1036, 1035, 1041, 1038, 1039, 1040, + -32766,-32766,-32766, 1005, 104, 105, 106, 107, 108, 35, + 275, 957,-32766, 759, 758, 1053, 850,-32766,-32766,-32766, + 848,-32766, 109,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + 148, 476, 477, 768,-32766,-32766,-32766, 1053,-32766, 290, + -32766,-32766,-32766,-32766,-32766, 616, 134, 263, 132, 389, + 772, 773, 774, 775, 365,-32766, 431,-32766,-32766,-32766, + -32766, 290, 143, 829, 776, 777, 778, 779, 780, 781, + 782, 783, 784, 785, 805, 571, 806, 807, 808, 809, + 797, 798, 343, 344, 800, 801, 786, 787, 788, 790, + 791, 792, 359, 832, 833, 834, 835, 836, 572,-32766, + -32766,-32766, 793, 794, 573, 574, -331, 817, 815, 816, + 828, 812, 813, 1300, -194, 575, 576, 811, 577, 578, + 579, 580, 845, 581, 582, 149, 82, 83, 84, -272, + 814, 583, 584, 249, 146, 789, 760, 761, 762, 763, + 764, 235, 765, 766, 767, 802, 803, 37, 307, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 157, 275,-32766,-32766,-32766,-32767,-32767, - -32767,-32767, 101, 102, 103, 1106, 109, 309, 621, 747, - 767,-32766,-32766,-32766, 848, 318,-32766, 1105,-32766,-32766, - -32766, 338, 845, 1355, 768, 769, 770, 771, 772, 773, - 774, 339,-32766, 837,-32766,-32766, 1384, 374, 1279, 1385, - 828, 775, 776, 777, 778, 779, 780, 781, 782, 783, - 784, 804, 826, 805, 806, 807, 808, 796, 797, 798, - 825, 799, 800, 785, 786, 787, 789, 790, 791, 830, - 831, 832, 833, 834, 835, 836, 1075, 430, -566, 792, - 793, 794, 795, 1359, 816, 814, 815, 827, 811, 812, - 1358, -193, 803, 809, 810, 817, 818, 820, 819, 138, - 821, 822, 839, 321, 380, 285, 24, 813, 824, 823, - 49, 50, 51, 521, 52, 53, -371, -110, -371, 848, - 54, 55, -110, 56, -110,-32766,-32766,-32766, 1340, 303, - 125, 1121, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, 161, 749, -566, -566, 291, 972, 973, - 465, 466, 467, 974, 396, 285, 1274, 1273, 1275, 57, - 58, -566, 565, 447, 59, 1107, 60, 243, 244, 61, + -32767,-32767, 101, 102, 103, 1107, 109, 309, 622, 748, + 768,-32766,-32766,-32766, 849, 318,-32766, 1106,-32766,-32766, + -32766, 338, 846, 1356, 769, 770, 771, 772, 773, 774, + 775, 339,-32766, 838,-32766,-32766, 1385, 374, 1280, 1386, + 829, 776, 777, 778, 779, 780, 781, 782, 783, 784, + 785, 805, 827, 806, 807, 808, 809, 797, 798, 799, + 826, 800, 801, 786, 787, 788, 790, 791, 792, 831, + 832, 833, 834, 835, 836, 837, 1076, 431, -566, 793, + 794, 795, 796, 1360, 817, 815, 816, 828, 812, 813, + 1359, -193, 804, 810, 811, 818, 819, 821, 820, 138, + 822, 823, 840, 321, 380, 285, 24, 814, 825, 824, + 49, 50, 51, 522, 52, 53, -371, -110, -371, 849, + 54, 55, -110, 56, -110,-32766,-32766,-32766, 1341, 303, + 125, 1122, -110, -110, -110, -110, -110, -110, -110, -110, + -110, -110, -110, 161, 750, -566, -566, 291, 973, 974, + 466, 467, 468, 975, 396, 285, 1275, 1274, 1276, 57, + 58, -566, 566, 448, 59, 1108, 60, 243, 244, 61, 62, 63, 64, 65, 66, 67, 68,-32766, 28, 265, - 69, 445, 522, 489, -345, 448, 1305, 1306, 523, 139, - 848, 1049, 449, 321, 1303, 42, 20, 524, 933, 525, - 933, 526, 74, 527, -567, 697, 528, 529, 321, 386, - 387, 44, 45, 451, 383, 382, 1052, 46, 530, 429, - 972, 973, 450, 372, 337, 974, 1279, 1311, 724, 933, - 1265,-32766,-32766,-32766, 968, 532, 533, 534, 854, 933, - 281, 698, -78, -565, 1272, 758, 757, 536, 537, -193, - 1291, 1292, 1293, 1294, 1296, 1288, 1289, 295, 1052, 725, - 398, 151, 7, 1295, 1290, 699, 700, 1274, 1273, 1275, + 69, 446, 523, 490, -345, 449, 1306, 1307, 524, 139, + 849, 1050, 450, 321, 1304, 42, 20, 525, 934, 526, + 934, 527, 74, 528, -567, 698, 529, 530, 321, 386, + 387, 44, 45, 452, 383, 382, 1053, 46, 531, 430, + 973, 974, 451, 372, 337, 975, 1280, 1312, 725, 934, + 1266,-32766,-32766,-32766, 969, 533, 534, 535, 855, 934, + 281, 699, -78, -565, 1273, 759, 758, 537, 538, -193, + 1292, 1293, 1294, 1295, 1297, 1289, 1290, 295, 1053, 726, + 398, 151, 7, 1296, 1291, 700, 701, 1275, 1274, 1276, 296, -567, -567, 70, -153, -153, -153, 316, 317, 321, - 1270, 923, 290, 923, 1274, 1273, 1275, -567, 1049, -153, - 281, -153, 1148, -153, 81, -153, 739, 152, 321, -573, - 153, 758, 757,-32766, 1051, 381, 875, 848, 876, 155, - -565, -565, 923, 1052, 1049, 33, 972, 973, -58, 490, - -57, 531, 923, 1274, 1273, 1275, -565, 123, 1052, 909, - 968, -110, -110, -110, 28, 266, 124, 281, -572, 1052, - 102, 103, -110, -110,-32766,-32766, 848, -110, 135, -563, - 1303, 136, -605, 142, -605, 156, -110, 664, 21, 158, - 935, 159, 935, 160, 719,-32766, 719, -153, -305, 48, + 1271, 924, 290, 924, 1275, 1274, 1276, -567, 1050, -153, + 281, -153, 1149, -153, 81, -153, 740, 152, 321, -573, + 153, 759, 758,-32766, 1052, 381, 876, 849, 877, 155, + -565, -565, 924, 1053, 1050, 33, 973, 974, -58, 491, + -57, 532, 924, 1275, 1274, 1276, -565, 123, 1053, 910, + 969, -110, -110, -110, 28, 266, 124, 281, -572, 1053, + 102, 103, -110, -110,-32766,-32766, 849, -110, 135, -563, + 1304, 136, -605, 142, -605, 156, -110, 665, 21, 158, + 936, 159, 936, 160, 720,-32766, 720, -153, -305, 48, 32, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 683, 684, 1265, 296, 758, 757, - 74, 935, -87, 933, -84, 719, 321, -4, 933, -78, - 933, 935, -73, 536, 537, 719, 1291, 1292, 1293, 1294, - 1296, 1288, 1289, 1181, 1183, 933, -563, -563, -564, 1295, - 1290, 758, 757, 726, -563,-32766, 147, 413, -301, 72, - 729, 1272, -563, -72, 317, 321, 299, 300,-32766,-32766, - -32766, -71,-32766, -70,-32766, 736,-32766, 384, 385,-32766, + 119, 120, 121, 122, 684, 685, 1266, 296, 759, 758, + 74, 936, -87, 934, -84, 720, 321, -4, 934, -78, + 934, 936, -73, 537, 538, 720, 1292, 1293, 1294, 1295, + 1297, 1289, 1290, 1182, 1184, 934, -563, -563, -564, 1296, + 1291, 759, 758, 727, -563,-32766, 147, 413, -301, 72, + 730, 1273, -563, -72, 317, 321, 299, 300,-32766,-32766, + -32766, -71,-32766, -70,-32766, 737,-32766, 384, 385,-32766, 390, 391, 379, -69,-32766,-32766,-32766, -68,-32766, -67, - -32766,-32766, -66, -65, 1272, -46,-32766, 426, 28, 265, - -18,-32766,-32766,-32766, 140,-32766, 923,-32766,-32766,-32766, - 848, 923,-32766, 923, 1303, -564, -564,-32766,-32766,-32766, - 274, -563, -563,-32766,-32766, 282, 655, 656, 923,-32766, - 426, -564, 735, 381, 738, 442, 932, -563, 145, 73, - 294,-32766, 950, -571, 972, 973, 279, 280, 283, 531, - 1265, 28, 266, 284, 327, 275, 109, 535, 968, -110, - -110, -110, 286, 848, 287, 292, 293, 1303, 537, 144, - 1291, 1292, 1293, 1294, 1296, 1288, 1289, 693, 848, 1139, - -32766, 11, 839, 1295, 1290, 989, 708, 686, 670, 719, - 935, 1386, 935, 72, 719, -4, 719, 653, 317, 321, - -50, 710, 304, 1265, 586, 968, 665, 935, 969, 1310, - 671, 719, 302, 301, 10, 308, 1312, 472, 500,-32766, - -529, 537, 687, 1291, 1292, 1293, 1294, 1296, 1288, 1289, - 952, 40, 592, 137, 41, -519, 1295, 1290, 8, 27, - 619, 321, 0,-32766, 378, 0, 72, 0, 0, 1272, - 0, 317, 321, 744, 0, 0,-32766,-32766,-32766, 0, + -32766,-32766, -66, -65, 1273, -46,-32766, 427, 28, 265, + -18,-32766,-32766,-32766, 140,-32766, 924,-32766,-32766,-32766, + 849, 924,-32766, 924, 1304, -564, -564,-32766,-32766,-32766, + 274, -563, -563,-32766,-32766, 282, 656, 657, 924,-32766, + 427, -564, 736, 381, 739, 443, 933, -563, 145, 73, + 294,-32766, 951, -571, 973, 974, 279, 280, 283, 532, + 1266, 28, 266, 284, 327, 275, 109, 536, 969, -110, + -110, -110, 286, 849, 287, 292, 293, 1304, 538, 144, + 1292, 1293, 1294, 1295, 1297, 1289, 1290, 694, 849, 1140, + -32766, 11, 840, 1296, 1291, 990, 709, 687, 671, 720, + 936, 1387, 936, 72, 720, -4, 720, 654, 317, 321, + -50, 711, 304, 1266, 587, 969, 666, 936, 970, 1311, + 672, 720, 302, 301, 10, 308, 1313, 473, 501,-32766, + -529, 538, 688, 1292, 1293, 1294, 1295, 1297, 1289, 1290, + 953, 40, 593, 137, 41, -519, 1296, 1291, 8, 27, + 620, 321, 0,-32766, 378, 0, 72, 0, 0, 1273, + 0, 317, 321, 745, 0, 0,-32766,-32766,-32766, 0, -32766, 0,-32766, 0,-32766, 0, 0,-32766, 0, 0, - 0, 0,-32766,-32766,-32766, 933,-32766, 745,-32766,-32766, - 0, 0, 1272, 847,-32766, 426, 867, 0, 296,-32766, - -32766,-32766, 0,-32766, 914,-32766,-32766,-32766, 933, 1013, - -32766, 990, 997, 987, 998,-32766,-32766,-32766, 912,-32766, - 985,-32766,-32766, 1110, 1113, 1272, 1114,-32766, 426, 1111, - 1150, 1112,-32766,-32766,-32766, 1118,-32766, 1300,-32766,-32766, - -32766, 859, 1327,-32766, 1344, 1377, 658, 495,-32766,-32766, - -32766, -599,-32766, -598,-32766,-32766, -597, -573, 1272, 599, - -32766, 426, -572, -571, -570,-32766,-32766,-32766, 923,-32766, + 0, 0,-32766,-32766,-32766, 934,-32766, 746,-32766,-32766, + 0, 0, 1273, 848,-32766, 427, 868, 0, 296,-32766, + -32766,-32766, 0,-32766, 915,-32766,-32766,-32766, 934, 1014, + -32766, 991, 998, 988, 999,-32766,-32766,-32766, 913,-32766, + 986,-32766,-32766, 1111, 1114, 1273, 1115,-32766, 427, 1112, + 1151, 1113,-32766,-32766,-32766, 1119,-32766, 1301,-32766,-32766, + -32766, 860, 1328,-32766, 1345, 1378, 659, 496,-32766,-32766, + -32766, -599,-32766, -598,-32766,-32766, -597, -573, 1273, 600, + -32766, 427, -572, -571, -570,-32766,-32766,-32766, 924,-32766, -513,-32766,-32766,-32766, 1, 29,-32766, -275, 30, 39, 43,-32766,-32766,-32766, -250, -250, -250,-32766,-32766, 71, - 381, 923, 75,-32766, 426, 76, 77, 78, 1279, 79, - 80, 972, 973, 141, 150,-32766, 531, -249, -249, -249, - -273, 154, 241, 381, 909, 968, -110, -110, -110, 323, - 360, 361, 362, 363, 972, 973, 364, 365, -16, 531, - 366, 367, 368, 369, 370, 373, 443, 909, 968, -110, - -110, -110,-32766, -272, 564, 371, 1304, 935, 1272, 13, - 741, 719, -250, 14, 15,-32766,-32766,-32766, 16,-32766, - 18,-32766, 354,-32766, 412, 491,-32766, 492, 499, 502, - 935,-32766,-32766,-32766, 719, -249, 503,-32766,-32766, 848, - 504, 505, 509,-32766, 426, 510, 511, 518, 597, 703, - 1078, 1221, 1301, 1077, 1058,-32766, 1260, 1054, -277, -102, - 12, 17, 22, 312, 411, 611, 616, 644, 709, 1225, - 1278, 1222, 1356, 0, -110, -110, 34, 315, 375, -110, - 720, 723, 727, 728, 730, 731, 732, 733, -110, 737, - 749, 722, 750, 0, 910, 1381, 0,-32766, 1383, 870, - 869, 878, 962, 1005, 877, 1382, 961, 959, 960, 963, - 1253, 943, 953, 941, 1149, 1145, 1099, 995, 996, 296, - 642, 1380, 74, 1338, 1353, 0, 0, 1238, 321 + 381, 924, 75,-32766, 427, 76, 77, 78, 1280, 79, + 80, 973, 974, 141, 150,-32766, 532, -249, -249, -249, + -273, 154, 241, 381, 910, 969, -110, -110, -110, 323, + 360, 361, 362, 363, 973, 974, 364, 365, -16, 532, + 366, 367, 368, 369, 370, 373, 444, 910, 969, -110, + -110, -110,-32766, -272, 565, 371, 1305, 936, 1273, 13, + 412, 720, -250, 14, 15,-32766,-32766,-32766, 16,-32766, + 18,-32766, 354,-32766, 411, 492,-32766, 493, 500, 503, + 936,-32766,-32766,-32766, 720, -249, 504,-32766,-32766, 849, + 505, 506, 510,-32766, 427, 511, 512, 519, 598, 704, + 1079, 1222, 1302, 1078, 1059,-32766, 1261, 1055, -277, -102, + 12, 17, 22, 312, 410, 612, 617, 645, 710, 1226, + 1279, 1223, 1357, 0, -110, -110, 34, 315, 375, -110, + 721, 724, 728, 729, 731, 732, 733, 734, -110, 738, + 750, 723, 751, 0, 416, 742, 0,-32766, 911, 1382, + 1384, 871, 870, 963, 1006, 1383, 962, 960, 961, 964, + 1254, 944, 954, 942, 1150, 1146, 1100, 996, 997, 296, + 643, 1381, 74, 1339, 1354, 0, 0, 1239, 321 ); protected array $actionCheck = array( @@ -697,45 +697,46 @@ class Php8 extends \PhpParser\ParserAbstract 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 800, 568, 1053, 222, 1107, 1108, 800, 800, 800, 568, 568, 568, 568, 568, 568, 568, 568, 799, - 568, 568, 745, 222, 642, 669, 222, 849, 568, 33, - 812, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 512, 33, 20, 5, 5, 202, 52, 5, 5, - 5, 337, 5, 33, 33, 33, 701, 828, 805, 704, - -18, 813, 443, 828, 828, 828, 120, 143, 128, 693, - 753, 514, 832, 832, 827, 929, 929, 832, 826, 832, - 827, 832, 832, 929, 929, 856, 929, 218, 515, 373, - 456, 537, 929, 320, 832, 832, 832, 832, 810, 929, - 127, 544, 832, 305, 234, 832, 832, 810, 808, 824, - 806, 929, 929, 929, 810, 389, 806, 806, 806, 820, - 844, 814, 819, 367, 359, 590, 181, 834, 819, 819, - 832, 506, 814, 819, 814, 819, 802, 819, 819, 819, - 814, 819, 826, 383, 819, 699, 574, 163, 819, 832, - 19, 944, 947, 721, 950, 934, 951, 991, 952, 954, - 1073, 925, 967, 935, 955, 999, 933, 930, 835, 671, - 680, 815, 797, 919, 817, 817, 817, 912, 917, 817, - 817, 817, 817, 817, 817, 817, 817, 671, 893, 821, - 845, 976, 692, 695, 1042, 789, 1086, 1118, 975, 944, - 954, 723, 935, 955, 933, 930, 792, 791, 786, 788, - 782, 772, 762, 770, 803, 1044, 958, 798, 697, 1014, - 977, 1002, 1070, 978, 981, 1018, 1045, 853, 1046, 1087, - 829, 1090, 1091, 897, 985, 1074, 817, 911, 906, 898, - 982, 918, 671, 900, 1047, 1003, 1069, 1019, 1021, 1071, - 850, 838, 901, 1092, 986, 987, 988, 1075, 1076, 801, - 1007, 931, 1022, 851, 1093, 1023, 1030, 1034, 1035, 1077, - 1094, 1078, 908, 1079, 861, 846, 964, 822, 1095, 196, - 843, 848, 859, 990, 291, 974, 1080, 1096, 1097, 1036, - 1039, 1040, 1098, 1099, 959, 866, 1008, 823, 1012, 997, - 868, 869, 607, 858, 1048, 841, 842, 857, 643, 646, - 1100, 1101, 1102, 966, 831, 830, 870, 871, 1050, 855, - 1051, 1103, 655, 875, 1104, 1043, 703, 705, 586, 664, - 662, 707, 839, 1082, 816, 818, 847, 989, 705, 833, - 877, 1105, 880, 881, 883, 1041, 886, 1016, 1106, 0, + 568, 568, 745, 222, 642, 669, 222, 849, 568, 812, + 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, + 512, 33, 33, 20, 5, 5, 33, 202, 52, 5, + 5, 5, 337, 5, 33, 33, 33, 701, 828, 805, + 704, -18, 813, 443, 828, 828, 828, 120, 143, 128, + 693, 753, 514, 832, 832, 827, 929, 929, 832, 826, + 832, 827, 832, 832, 929, 929, 856, 929, 218, 515, + 373, 456, 537, 929, 320, 832, 832, 832, 832, 810, + 929, 127, 544, 832, 305, 234, 832, 832, 810, 808, + 824, 806, 929, 929, 929, 810, 389, 806, 806, 806, + 820, 844, 814, 819, 367, 359, 590, 181, 834, 819, + 819, 832, 506, 814, 819, 814, 819, 802, 819, 819, + 819, 814, 819, 826, 383, 819, 699, 574, 163, 819, + 832, 19, 944, 947, 721, 950, 934, 951, 991, 952, + 954, 1073, 925, 967, 935, 955, 999, 933, 930, 835, + 671, 680, 815, 797, 919, 817, 817, 817, 912, 917, + 817, 817, 817, 817, 817, 817, 817, 817, 671, 893, + 821, 845, 976, 692, 695, 1042, 789, 1090, 1118, 975, + 944, 954, 723, 935, 955, 933, 930, 792, 791, 786, + 788, 782, 772, 762, 770, 803, 1044, 958, 798, 697, + 1014, 977, 1087, 1070, 978, 981, 1018, 1045, 853, 1046, + 1091, 829, 1092, 1093, 897, 985, 1074, 817, 911, 906, + 898, 982, 918, 671, 900, 1047, 1003, 1069, 1019, 1021, + 1071, 850, 838, 901, 1094, 986, 987, 988, 1075, 1076, + 801, 1007, 931, 1022, 851, 1002, 1023, 1030, 1034, 1035, + 1077, 1095, 1078, 908, 1079, 861, 846, 964, 822, 1096, + 196, 843, 848, 859, 990, 291, 974, 1080, 1086, 1097, + 1036, 1039, 1040, 1098, 1099, 959, 866, 1008, 823, 1012, + 997, 868, 869, 607, 858, 1048, 841, 842, 857, 643, + 646, 1100, 1101, 1102, 966, 831, 830, 870, 871, 1050, + 855, 1051, 1103, 655, 875, 1104, 1043, 703, 705, 586, + 664, 662, 707, 839, 1082, 816, 818, 847, 989, 705, + 833, 877, 1105, 880, 881, 883, 1041, 886, 1016, 1106, 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, 468, 468, 468, 468, 468, 468, 313, - 313, 313, 313, 313, 468, 468, 468, 468, 468, 468, - 468, 313, 468, 468, 468, 313, 0, 0, 313, 0, + 0, 0, 0, 0, 468, 468, 468, 468, 468, 468, + 313, 313, 313, 313, 313, 468, 468, 468, 468, 468, + 468, 468, 313, 468, 468, 468, 313, 0, 0, 313, + 0, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, @@ -748,36 +749,35 @@ class Php8 extends \PhpParser\ParserAbstract 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 297, 297, 297, 297, 297, 297, + 468, 468, 468, 468, 468, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 0, 0, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 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, 297, 297, 297, 297, 297, 297, + 0, 0, 0, 0, 0, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 524, 524, 297, - 297, 297, 297, 524, 524, 524, 524, 524, 524, 524, - 524, 524, 524, 297, 297, 297, 0, 297, 297, 297, - 297, 297, 297, 297, 856, 524, 524, 524, 524, 133, - 133, 133, 133, -95, -95, -95, 524, 524, 133, 524, - 856, 524, 524, 524, 524, 524, 524, 524, 524, 524, - 0, 0, 524, 524, 524, 524, 222, -70, 524, 826, - 826, 826, 826, 524, 524, 524, 524, -70, -70, 524, - 524, 524, 0, 0, 0, 133, 133, 222, 0, 0, - 222, 391, 0, 826, 826, 524, 391, 856, 442, 524, - 489, 0, 0, 0, 0, 0, 0, 0, 222, 826, - 222, 568, 832, -70, -70, 568, 568, 832, 5, 33, - 442, 685, 685, 685, 685, 33, 0, 0, 0, 0, - 0, 701, 856, 856, 856, 856, 856, 856, 856, 856, - 856, 856, 856, 856, 826, 0, 856, 0, 856, 856, - 826, 826, 826, 0, 0, 0, 0, 0, 0, 0, - 0, 929, 0, 0, 0, 0, 0, 0, 0, 826, + 297, 297, 297, 297, 297, 297, 297, 297, 524, 524, + 297, 297, 297, 297, 524, 524, 524, 524, 524, 524, + 524, 524, 524, 524, 297, 297, 297, 0, 297, 297, + 297, 297, 297, 297, 297, 856, 524, 524, 524, 524, + 133, 133, 133, 133, -95, -95, -95, 524, 524, 133, + 524, 856, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 0, 0, 524, 524, 524, 524, 222, -70, 524, + 826, 826, 826, 826, 524, 524, 524, 524, -70, -70, + 524, 524, 524, 0, 0, 0, 133, 133, 222, 0, + 0, 222, 391, 0, 826, 826, 524, 391, 856, 442, + 524, 489, 0, 0, 0, 0, 0, 0, 0, 222, + 826, 222, 568, 832, -70, -70, 568, 568, 832, 5, + 33, 442, 685, 685, 685, 685, 33, 0, 0, 0, + 0, 0, 701, 856, 856, 856, 856, 856, 856, 856, + 856, 856, 856, 856, 856, 826, 0, 856, 0, 856, + 856, 826, 826, 826, 0, 0, 0, 0, 0, 0, 0, 0, 929, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 826, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 817, - 850, 0, 0, 850, 0, 817, 817, 817, 0, 0, - 0, 858, 855 + 826, 0, 929, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 826, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 817, 850, 0, 0, 850, 0, 817, 817, 817, + 0, 0, 0, 858, 855 ); protected array $actionDefault = array( @@ -820,115 +820,111 @@ class Php8 extends \PhpParser\ParserAbstract 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, 110,32767, 110, 110,32767,32767, 100, 195, 195, 195, 195, 195, 195, 195, 195, 533, - 195, 195, 190,32767, 268, 270, 102, 579, 195,32767, - 535,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 195, 195, 190,32767, 268, 270, 102, 579, 195, 535, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 392,32767,32767,32767,32767, 518, 453, 138, + 32767, 520, 138, 563, 445, 446, 447, 563, 563, 563, + 315, 292,32767,32767,32767,32767, 533, 533, 100, 100, + 100, 100,32767,32767,32767,32767, 111, 504, 99, 99, + 99, 99, 99, 103, 101,32767,32767,32767,32767, 223, + 32767, 101, 99,32767, 101, 101,32767,32767, 223, 225, + 212, 227,32767, 583, 584, 223, 101, 227, 227, 227, + 247, 247, 507, 321, 101, 99, 101, 101, 197, 321, + 321,32767, 101, 507, 321, 507, 321, 199, 321, 321, + 321, 507, 321,32767, 101, 321, 214, 99, 99, 321, + 32767,32767,32767,32767, 520,32767,32767,32767,32767,32767, + 32767,32767, 222,32767,32767,32767,32767,32767,32767,32767, + 32767, 550,32767, 568, 581, 451, 452, 454, 567, 565, + 476, 477, 478, 479, 480, 481, 482, 484, 612,32767, + 524,32767,32767,32767, 341,32767, 622,32767,32767,32767, + 9, 74, 513, 42, 43, 51, 57, 539, 540, 541, + 542, 536, 537, 543, 538,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 623,32767, 563,32767,32767,32767,32767, 450, 545, 589, + 32767,32767, 564, 615,32767,32767,32767,32767,32767,32767, + 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 550,32767, 136,32767,32767,32767,32767,32767, + 32767,32767,32767, 546,32767,32767,32767, 563,32767,32767, + 32767,32767, 317, 314,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 392,32767,32767,32767,32767, 518, 453, 138,32767, - 520, 138, 563, 445, 446, 447, 563, 563, 563, 315, - 292,32767,32767,32767,32767, 533, 533, 100, 100, 100, - 100,32767,32767,32767,32767, 111, 504, 99, 99, 99, - 99, 99, 103, 101,32767,32767,32767,32767, 223,32767, - 101, 99,32767, 101, 101,32767,32767, 223, 225, 212, - 227,32767, 583, 584, 223, 101, 227, 227, 227, 247, - 247, 507, 321, 101, 99, 101, 101, 197, 321, 321, - 32767, 101, 507, 321, 507, 321, 199, 321, 321, 321, - 507, 321,32767, 101, 321, 214, 99, 99, 321,32767, - 32767,32767,32767, 520,32767,32767,32767,32767,32767,32767, - 32767, 222,32767,32767,32767,32767,32767,32767,32767,32767, - 550,32767, 568, 581, 451, 452, 454, 567, 565, 476, - 477, 478, 479, 480, 481, 482, 484, 612,32767, 524, - 32767,32767,32767, 341,32767, 622,32767,32767,32767, 9, - 74, 513, 42, 43, 51, 57, 539, 540, 541, 542, - 536, 537, 543, 538,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 623, - 32767, 563,32767,32767,32767,32767, 450, 545, 589,32767, - 32767, 564, 615,32767,32767,32767,32767,32767,32767,32767, - 138,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 550,32767, 136,32767,32767,32767,32767,32767,32767, - 32767,32767, 546,32767,32767,32767, 563,32767,32767,32767, - 32767, 317, 314,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 563, - 32767,32767,32767,32767,32767, 294,32767, 311,32767,32767, + 563,32767,32767,32767,32767,32767, 294,32767, 311,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 388, 520, 297, 299, - 300,32767,32767,32767,32767, 364,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 152, - 152, 3, 3, 344, 152, 152, 152, 344, 344, 152, - 344, 344, 344, 152, 152, 152, 152, 152, 152, 152, - 280, 185, 262, 265, 247, 247, 152, 356, 152, 390, - 390, 399 + 32767,32767,32767,32767,32767,32767,32767, 388, 520, 297, + 299, 300,32767,32767,32767,32767, 364,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 152, 152, 3, 3, 344, 152, 152, 152, 344, 344, + 152, 344, 344, 344, 152, 152, 152, 152, 152, 152, + 152, 280, 185, 262, 265, 247, 247, 152, 356, 152, + 390, 390, 399 ); protected array $goto = array( - 194, 194, 1050, 486, 704, 278, 278, 278, 278, 1081, - 488, 547, 547, 906, 864, 906, 906, 547, 713, 547, - 547, 547, 547, 547, 547, 547, 547, 166, 166, 166, + 194, 194, 1051, 487, 705, 278, 278, 278, 278, 1082, + 489, 548, 548, 907, 865, 907, 907, 548, 714, 548, + 548, 548, 548, 548, 548, 548, 548, 166, 166, 166, 166, 218, 195, 191, 191, 176, 178, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 544, 545, 427, 546, - 549, 550, 551, 552, 553, 554, 555, 556, 1167, 167, + 188, 189, 190, 215, 213, 216, 545, 546, 428, 547, + 550, 551, 552, 553, 554, 555, 556, 557, 1168, 167, 168, 169, 193, 170, 171, 172, 164, 173, 174, 175, 177, 212, 214, 217, 237, 240, 251, 252, 253, 255, 256, 257, 258, 259, 260, 261, 267, 268, 269, 270, - 276, 288, 289, 313, 314, 433, 434, 435, 606, 219, + 276, 288, 289, 313, 314, 434, 435, 436, 607, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 186, 187, 188, 189, 190, - 215, 1167, 196, 197, 198, 199, 238, 179, 180, 200, + 215, 1168, 196, 197, 198, 199, 238, 179, 180, 200, 181, 201, 197, 182, 239, 196, 163, 202, 203, 183, 204, 205, 206, 184, 207, 208, 165, 209, 210, 211, - 185, 868, 247, 247, 591, 474, 474, 1098, 743, 645, - 647, 865, 608, 667, 474, 866, 469, 691, 694, 1023, - 702, 711, 1019, 718, 464, 1216, 881, 358, 840, 245, - 245, 245, 245, 242, 248, 1370, 1370, 358, 358, 350, - 557, 557, 557, 557, 893, 612, 341, 880, 358, 358, - 1370, 988, 358, 873, 1387, 922, 917, 918, 931, 874, - 919, 871, 920, 921, 872, 446, 925, 342, 341, 563, - 425, 1373, 1373, 358, 358, 899, 861, 1104, 1100, 1101, - 437, 669, 403, 406, 609, 613, 432, 334, 330, 331, - 333, 601, 436, 335, 438, 646, 629, 666, 1271, 1050, - 1271, 1271, 1056, 1055, 455, 455, 598, 455, 455, 1050, - 1271, 348, 1050, 519, 1050, 1050, 1050, 1050, 1050, 1050, - 1050, 1050, 1050, 861, 1360, 1050, 1050, 1050, 1050, 1332, - 1009, 1271, 507, 926, 508, 927, 1271, 1271, 1271, 1271, - 514, 401, 1271, 1271, 1271, 1352, 1352, 1352, 1352, 421, - 355, 355, 355, 355, 1124, 1152, 1125, 596, 939, 631, - 631, 668, 940, 439, 1164, 1302, 1302, 1302, 1302, 1302, - 1302, 1302, 1302, 1302, 1302, 1074, 439, 483, 1345, 1346, - 563, 444, 1057, 1057, 568, 561, 1059, 1060, 955, 673, - 1068, 1064, 1065, 955, 662, 663, 846, 680, 681, 682, - 320, 306, 455, 455, 455, 455, 455, 455, 455, 455, - 455, 455, 455, 455, 690, 5, 455, 6, 455, 455, - 602, 623, 340, 561, 568, 593, 594, 345, 604, 610, - 674, 625, 626, 980, 416, 712, 250, 250, 846, 25, - 846, 1347, 1348, 559, 1264, 559, 559, 1026, 1026, 336, - 1321, 1321, 431, 861, 620, 559, 1321, 1321, 1321, 1321, - 1321, 1321, 1321, 1321, 1321, 1321, 858, 1343, 886, 1343, - 1343, 639, 641, 643, 410, 971, 462, 883, 1262, 1343, - 624, 982, 982, 982, 982, 1031, 1147, 462, 976, 983, - 562, 588, 701, 351, 352, 562, 842, 588, 1087, 404, - 468, 1354, 1354, 1354, 1354, 746, 1041, 895, 701, 1138, - 484, 701, 477, 605, 478, 479, 1091, 377, 993, 0, - 891, 1318, 1318, 1378, 1379, 1339, 0, 1318, 1318, 1318, - 1318, 1318, 1318, 1318, 1318, 1318, 1318, 0, 0, 0, - 0, 0, 0, 548, 548, 1266, 0, 0, 889, 548, - 548, 548, 548, 548, 548, 548, 548, 548, 548, 414, - 415, 0, 0, 0, 678, 0, 679, 328, 418, 419, - 420, 0, 692, 0, 0, 422, 1089, 0, 0, 346, - 0, 0, 1341, 1341, 1089, 618, 632, 635, 636, 637, - 638, 659, 660, 661, 715, 717, 0, 0, 1267, 1268, - 0, 1254, 894, 882, 1086, 1090, 0, 856, 0, 271, - 319, 0, 319, 319, 1254, 991, 614, 1247, 957, 944, - 1154, 1248, 1251, 958, 0, 1252, 1269, 1329, 1330, 0, - 0, 1028, 0, 0, 0, 0, 0, 0, 981, 885, - 0, 672, 1007, 1053, 1053, 689, 965, 879, 0, 1045, - 1061, 1062, 607, 1117, 0, 0, 0, 0, 0, 1261, - 1136, 898, 0, 716, 0, 0, 0, 1012, 515, 707, - 984, 1115, 742, 0, 0, 560, 1021, 1016, 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, 751, 751 + 185, 869, 560, 841, 560, 560, 592, 1099, 866, 847, + 744, 646, 648, 609, 560, 668, 1125, 1153, 1126, 692, + 695, 1024, 703, 712, 1020, 719, 355, 355, 355, 355, + 1054, 1054, 690, 966, 867, 463, 1046, 1062, 1063, 989, + 983, 983, 983, 983, 247, 247, 463, 977, 984, 1371, + 1371, 847, 426, 847, 923, 918, 919, 932, 875, 920, + 872, 921, 922, 873, 1371, 926, 879, 900, 475, 475, + 878, 245, 245, 245, 245, 242, 248, 475, 1105, 1101, + 1102, 438, 670, 1057, 1056, 1374, 1374, 433, 334, 330, + 331, 333, 602, 437, 335, 439, 647, 470, 1272, 1051, + 1272, 1272, 341, 599, 456, 456, 1217, 456, 456, 1051, + 1272, 350, 1051, 520, 1051, 1051, 1051, 1051, 1051, 1051, + 1051, 1051, 1051, 342, 341, 1051, 1051, 1051, 1051, 663, + 664, 1272, 681, 682, 683, 465, 1272, 1272, 1272, 1272, + 862, 440, 1272, 1272, 1272, 1353, 1353, 1353, 1353, 348, + 1248, 958, 1361, 358, 440, 1249, 1252, 959, 940, 1253, + 1058, 1058, 941, 358, 358, 882, 400, 674, 1069, 1065, + 1066, 630, 667, 702, 358, 358, 447, 843, 358, 927, + 1388, 928, 1010, 894, 569, 562, 881, 862, 956, 702, + 1060, 1061, 702, 956, 597, 564, 981, 417, 713, 358, + 358, 669, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 1165, 432, 456, 621, 456, 456, + 320, 306, 340, 562, 569, 594, 595, 345, 605, 611, + 1075, 626, 627, 675, 632, 632, 484, 1346, 1347, 25, + 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, + 1322, 1322, 640, 642, 644, 1333, 1322, 1322, 1322, 1322, + 1322, 1322, 1322, 1322, 1322, 1322, 445, 5, 1344, 6, + 1344, 1344, 558, 558, 558, 558, 422, 613, 250, 250, + 1344, 895, 883, 1087, 1091, 271, 319, 691, 319, 319, + 336, 563, 589, 859, 992, 887, 563, 972, 589, 409, + 403, 469, 1355, 1355, 1355, 1355, 884, 564, 402, 405, + 610, 614, 625, 478, 606, 479, 480, 982, 862, 1348, + 1349, 892, 1319, 1319, 1379, 1380, 1340, 1263, 1319, 1319, + 1319, 1319, 1319, 1319, 1319, 1319, 1319, 1319, 1013, 1137, + 899, 985, 1148, 743, 549, 549, 561, 1022, 1017, 890, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 1267, 1032, 608, 1118, 1088, 351, 352, 508, 328, 509, + 747, 1265, 1042, 717, 485, 515, 896, 1090, 516, 708, + 1092, 1116, 994, 1342, 1342, 1090, 619, 633, 636, 637, + 638, 639, 660, 661, 662, 716, 718, 414, 415, 752, + 752, 377, 679, 0, 680, 0, 419, 420, 421, 1139, + 693, 603, 624, 423, 0, 1268, 1269, 346, 1255, 0, + 0, 0, 0, 615, 857, 0, 945, 1155, 0, 0, + 0, 1255, 0, 0, 0, 0, 0, 0, 1029, 0, + 0, 0, 0, 1270, 1330, 1331, 886, 0, 673, 1008, + 0, 0, 0, 0, 880, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1262, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1027, + 1027 ); protected array $gotoCheck = array( @@ -948,105 +944,101 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 15, 5, 5, 48, 154, 154, 15, 48, 48, - 48, 26, 131, 48, 154, 27, 156, 48, 48, 48, - 48, 48, 48, 48, 83, 156, 35, 14, 6, 5, - 5, 5, 5, 5, 5, 188, 188, 14, 14, 97, - 107, 107, 107, 107, 35, 107, 174, 35, 14, 14, - 188, 49, 14, 15, 14, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 83, 15, 174, 174, 14, - 43, 188, 188, 14, 14, 45, 22, 15, 15, 15, - 66, 66, 59, 59, 59, 59, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 56, 56, 73, 73, - 73, 73, 119, 119, 23, 23, 178, 23, 23, 73, - 73, 185, 73, 76, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 22, 187, 73, 73, 73, 73, 14, - 103, 73, 160, 65, 160, 65, 73, 73, 73, 73, - 160, 62, 73, 73, 73, 9, 9, 9, 9, 14, - 24, 24, 24, 24, 146, 146, 146, 104, 73, 108, - 108, 64, 73, 118, 155, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 115, 118, 182, 182, 182, - 14, 113, 118, 118, 76, 76, 120, 120, 9, 118, - 118, 118, 118, 9, 86, 86, 12, 86, 86, 86, - 175, 175, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 117, 46, 23, 46, 23, 23, - 2, 2, 76, 76, 76, 76, 76, 76, 76, 76, - 121, 76, 76, 93, 93, 93, 5, 5, 12, 76, - 12, 184, 184, 19, 14, 19, 19, 107, 107, 29, - 176, 176, 13, 22, 13, 19, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 18, 131, 39, 131, - 131, 85, 85, 85, 28, 92, 19, 37, 166, 131, - 80, 19, 19, 19, 19, 110, 153, 19, 19, 19, - 9, 9, 7, 97, 97, 9, 7, 9, 130, 9, - 9, 131, 131, 131, 131, 99, 114, 41, 7, 149, - 157, 7, 9, 9, 9, 9, 133, 138, 96, -1, - 9, 177, 177, 9, 9, 131, -1, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, -1, -1, -1, - -1, -1, -1, 179, 179, 20, -1, -1, 9, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 82, - 82, -1, -1, -1, 82, -1, 82, 9, 82, 82, - 82, -1, 82, -1, -1, 82, 131, -1, -1, 82, - -1, -1, 131, 131, 131, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, -1, -1, 20, 20, - -1, 20, 16, 16, 16, 16, -1, 20, -1, 24, - 24, -1, 24, 24, 20, 16, 17, 79, 79, 17, - 17, 79, 79, 79, -1, 79, 20, 20, 20, -1, - -1, 17, -1, -1, -1, -1, -1, -1, 16, 17, - -1, 17, 17, 89, 89, 89, 89, 17, -1, 89, - 89, 89, 8, 8, -1, -1, -1, -1, -1, 17, - 16, 16, -1, 8, -1, -1, -1, 50, 8, 8, - 50, 8, 50, -1, -1, 50, 50, 50, -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, 24, 24 + 42, 15, 19, 6, 19, 19, 48, 15, 26, 12, + 48, 48, 48, 131, 19, 48, 146, 146, 146, 48, + 48, 48, 48, 48, 48, 48, 24, 24, 24, 24, + 89, 89, 89, 89, 27, 19, 89, 89, 89, 49, + 19, 19, 19, 19, 5, 5, 19, 19, 19, 188, + 188, 12, 43, 12, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 188, 15, 15, 45, 154, 154, + 15, 5, 5, 5, 5, 5, 5, 154, 15, 15, + 15, 66, 66, 119, 119, 188, 188, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 156, 73, 73, + 73, 73, 174, 178, 23, 23, 156, 23, 23, 73, + 73, 97, 73, 76, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 174, 174, 73, 73, 73, 73, 86, + 86, 73, 86, 86, 86, 83, 73, 73, 73, 73, + 22, 118, 73, 73, 73, 9, 9, 9, 9, 185, + 79, 79, 187, 14, 118, 79, 79, 79, 73, 79, + 118, 118, 73, 14, 14, 35, 62, 118, 118, 118, + 118, 56, 56, 7, 14, 14, 83, 7, 14, 65, + 14, 65, 103, 35, 76, 76, 35, 22, 9, 7, + 120, 120, 7, 9, 104, 14, 93, 93, 93, 14, + 14, 64, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 155, 13, 23, 13, 23, 23, + 175, 175, 76, 76, 76, 76, 76, 76, 76, 76, + 115, 76, 76, 121, 108, 108, 182, 182, 182, 76, + 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, + 176, 176, 85, 85, 85, 14, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 113, 46, 131, 46, + 131, 131, 107, 107, 107, 107, 14, 107, 5, 5, + 131, 16, 16, 16, 16, 24, 24, 117, 24, 24, + 29, 9, 9, 18, 16, 39, 9, 92, 9, 28, + 9, 9, 131, 131, 131, 131, 37, 14, 59, 59, + 59, 59, 80, 9, 9, 9, 9, 16, 22, 184, + 184, 9, 177, 177, 9, 9, 131, 166, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 50, 16, + 16, 50, 153, 50, 179, 179, 50, 50, 50, 9, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 20, 110, 8, 8, 130, 97, 97, 160, 9, 160, + 99, 14, 114, 8, 157, 160, 41, 131, 8, 8, + 133, 8, 96, 131, 131, 131, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 82, 82, 24, + 24, 138, 82, -1, 82, -1, 82, 82, 82, 149, + 82, 2, 2, 82, -1, 20, 20, 82, 20, -1, + -1, -1, -1, 17, 20, -1, 17, 17, -1, -1, + -1, 20, -1, -1, -1, -1, -1, -1, 17, -1, + -1, -1, -1, 20, 20, 20, 17, -1, 17, 17, + -1, -1, -1, -1, 17, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 17, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, + 107 ); protected array $gotoBase = array( - 0, 0, -341, 0, 0, 161, 178, 445, 604, 8, - 0, 0, 62, 76, -108, -186, 104, 106, 119, 140, - 105, 0, -42, 2, 307, 10, 167, 171, 98, 115, - 0, 0, 0, 0, 0, -189, 0, 99, 0, 110, - 0, 20, -1, 207, 0, 209, -371, 0, -556, 193, - 615, 0, 0, 0, 0, 0, 216, 0, 0, 197, - 0, 0, 259, 0, 85, 279, 5, 0, 0, 0, - 0, 0, 0, -5, 0, 0, 1, 0, 0, 163, - 95, 184, 21, -94, -474, -55, -373, 0, 0, 324, - 0, 0, 111, 91, 0, 0, 29, -291, 0, 52, - 0, 0, 0, 255, 274, 0, 0, 172, 84, 0, - 71, 0, 0, 64, 45, 61, 0, 93, 59, -17, - 63, 100, 0, 0, 0, 0, 0, 0, 7, 0, - 78, 164, 0, 28, 0, 0, 0, 0, -273, 0, - 0, 0, 0, 0, 0, 0, 43, 0, 0, 19, - 0, 0, 0, 92, 131, 82, -90, 24, 0, 0, - -210, 0, -224, 0, 0, 0, 65, 0, 0, 0, - 0, 0, 0, 0, -89, 44, 175, 246, 237, 268, - 0, 0, 39, 0, 23, 241, 0, 253, -110, 0, + 0, 0, -151, 0, 0, 203, 153, 326, 514, 8, + 0, 0, -125, 39, 18, -186, -18, 112, 146, -101, + 121, 0, 22, 2, 183, 10, 164, 190, 123, 156, + 0, 0, 0, 0, 0, -50, 0, 128, 0, 137, + 0, 88, -1, 189, 0, 201, -320, 0, -555, 181, + 486, 0, 0, 0, 0, 0, 291, 0, 0, 423, + 0, 0, 284, 0, 125, 325, 6, 0, 0, 0, + 0, 0, 0, -5, 0, 0, 1, 0, 0, -104, + 127, 185, 58, 17, -475, -75, -439, 0, 0, -89, + 0, 0, 133, 54, 0, 0, 92, -220, 0, 117, + 0, 0, 0, 307, 311, 0, 0, 404, 159, 0, + 147, 0, 0, 149, 110, 116, 0, 166, 37, -36, + 67, 103, 0, 0, 0, 0, 0, 0, 7, 0, + 144, 165, 0, 91, 0, 0, 0, 0, -190, 0, + 0, 0, 0, 0, 0, 0, -95, 0, 0, 118, + 0, 0, 0, 148, 194, 132, -9, 87, 0, 0, + 24, 0, -224, 0, 0, 0, 114, 0, 0, 0, + 0, 0, 0, 0, -33, 64, 175, 247, 234, 269, + 0, 0, 98, 0, 101, 279, 0, 281, -96, 0, 0 ); protected array $gotoDefault = array( - -32768, 520, 753, 4, 754, 948, 829, 838, 584, 538, - 714, 347, 633, 428, 1337, 924, 1153, 603, 857, 1280, - 1286, 463, 860, 325, 740, 936, 907, 908, 407, 393, - 399, 405, 657, 634, 501, 892, 459, 884, 493, 887, - 458, 896, 162, 424, 517, 900, 3, 903, 566, 934, - 986, 394, 911, 395, 685, 913, 587, 915, 916, 402, - 408, 409, 1158, 595, 630, 928, 254, 589, 929, 392, - 930, 938, 397, 400, 695, 473, 512, 506, 417, 1119, - 590, 617, 654, 452, 480, 628, 640, 627, 487, 440, - 423, 324, 970, 978, 494, 471, 992, 349, 1000, 748, - 1166, 648, 496, 1008, 649, 1015, 1018, 539, 540, 485, - 1030, 264, 1033, 497, 1042, 23, 675, 1047, 1048, 676, - 650, 1070, 651, 677, 652, 1072, 470, 585, 1080, 460, - 1088, 1326, 461, 1092, 262, 1095, 277, 353, 376, 441, - 1102, 1103, 9, 1109, 705, 706, 19, 273, 516, 1137, - 696, 1143, 272, 1146, 457, 1165, 456, 1235, 1237, 567, - 498, 1255, 310, 1258, 688, 513, 1263, 453, 1328, 454, - 541, 481, 332, 542, 1371, 305, 356, 329, 558, 311, - 357, 543, 482, 1334, 1342, 326, 31, 1361, 1372, 600, - 622 + -32768, 521, 754, 4, 755, 949, 830, 839, 585, 539, + 715, 347, 634, 429, 1338, 925, 1154, 604, 858, 1281, + 1287, 464, 861, 325, 741, 937, 908, 909, 406, 393, + 874, 404, 658, 635, 502, 893, 460, 885, 494, 888, + 459, 897, 162, 425, 518, 901, 3, 904, 567, 935, + 987, 394, 912, 395, 686, 914, 588, 916, 917, 401, + 407, 408, 1159, 596, 631, 929, 254, 590, 930, 392, + 931, 939, 397, 399, 696, 474, 513, 507, 418, 1120, + 591, 618, 655, 453, 481, 629, 641, 628, 488, 441, + 424, 324, 971, 979, 495, 472, 993, 349, 1001, 749, + 1167, 649, 497, 1009, 650, 1016, 1019, 540, 541, 486, + 1031, 264, 1034, 498, 1043, 23, 676, 1048, 1049, 677, + 651, 1071, 652, 678, 653, 1073, 471, 586, 1081, 461, + 1089, 1327, 462, 1093, 262, 1096, 277, 353, 376, 442, + 1103, 1104, 9, 1110, 706, 707, 19, 273, 517, 1138, + 697, 1144, 272, 1147, 458, 1166, 457, 1236, 1238, 568, + 499, 1256, 310, 1259, 689, 514, 1264, 454, 1329, 455, + 542, 482, 332, 543, 1372, 305, 356, 329, 559, 311, + 357, 544, 483, 1335, 1343, 326, 31, 1362, 1373, 601, + 623 ); protected array $ruleToNonTerminal = array( @@ -1129,7 +1121,7 @@ class Php8 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, - 4, 2, 3, 1, 1, 7, 6, 2, 3, 1, + 4, 1, 3, 1, 1, 8, 7, 2, 3, 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, 3, 3, 2, 0, 1, 1, 1, 1, 1, 3, 7, @@ -1392,10 +1384,10 @@ protected function initReduceCallbacks(): void { $self->semValue = Stmt\Use_::TYPE_CONSTANT; }, 125 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, 126 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, 127 => null, 128 => static function ($self, $stackPos) { diff --git a/test/code/formatPreservation/group_use.test b/test/code/formatPreservation/group_use.test new file mode 100644 index 0000000000..39c87b6489 --- /dev/null +++ b/test/code/formatPreservation/group_use.test @@ -0,0 +1,9 @@ +Group use should include trailing semicolon +----- + Date: Sat, 21 Sep 2024 16:03:21 +0200 Subject: [PATCH 377/428] Use PHP 8.4 for the PHP 7.4 integration test --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ff508c594..54be563fb5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,7 +56,7 @@ jobs: run: "php vendor/bin/phpunit" test_old_73_80: runs-on: "ubuntu-latest" - name: "PHP 7.4 Code on PHP 8.3 Integration Tests" + name: "PHP 7.4 Code on PHP 8.4 Integration Tests" steps: - name: "Checkout" uses: "actions/checkout@v4" @@ -64,7 +64,7 @@ jobs: uses: "shivammathur/setup-php@v2" with: coverage: "none" - php-version: "8.3" + php-version: "8.4" ini-file: "development" tools: composer:v2 - name: "Install PHP 8 dependencies" From e50c67b7a94d2d028f8792f462e31ba4ed9f2680 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 21 Sep 2024 18:54:50 +0200 Subject: [PATCH 378/428] Add basic support for tab indentation Add a new "indent" option for the pretty printer, which can be use to control the indentation width, or switch it to use tabs. Tab width is currenlty hardcoded to 4, but also shouldn't matter much. Possibly the formatting-preserving printer should auto-detect the indentation in the future. --- doc/component/Pretty_printing.markdown | 1 + lib/PhpParser/Internal/TokenStream.php | 17 +++-- lib/PhpParser/PrettyPrinterAbstract.php | 43 ++++++++++--- test/PhpParser/PrettyPrinterTest.php | 10 ++- test/code/formatPreservation/indent.test | 37 +++++++++++ test/code/prettyPrinter/indent.test | 82 ++++++++++++++++++++++++ 6 files changed, 176 insertions(+), 14 deletions(-) create mode 100644 test/code/formatPreservation/indent.test create mode 100644 test/code/prettyPrinter/indent.test diff --git a/doc/component/Pretty_printing.markdown b/doc/component/Pretty_printing.markdown index dcc55b6a3f..f7b9501609 100644 --- a/doc/component/Pretty_printing.markdown +++ b/doc/component/Pretty_printing.markdown @@ -37,6 +37,7 @@ integer should be printed as decimal, hexadecimal, etc). Additionally, it suppor * `phpVersion` (defaults to 7.4) allows opting into formatting that is not supported by older PHP versions. * `newline` (defaults to `"\n"`) can be set to `"\r\n"` in order to produce Windows newlines. +* `indent` (defaults to four spaces `" "`) can be set to any number of spaces or a single tab. * `shortArraySyntax` determines the used array syntax if the `kind` attribute is not set. This is a legacy option, and `phpVersion` should be used to control this behavior instead. diff --git a/lib/PhpParser/Internal/TokenStream.php b/lib/PhpParser/Internal/TokenStream.php index c02844ac75..cdbe2bdcc9 100644 --- a/lib/PhpParser/Internal/TokenStream.php +++ b/lib/PhpParser/Internal/TokenStream.php @@ -20,9 +20,9 @@ class TokenStream { * * @param Token[] $tokens Tokens in PhpToken::tokenize() format */ - public function __construct(array $tokens) { + public function __construct(array $tokens, int $tabWidth) { $this->tokens = $tokens; - $this->indentMap = $this->calcIndentMap(); + $this->indentMap = $this->calcIndentMap($tabWidth); } /** @@ -248,7 +248,7 @@ public function getTokenCode(int $from, int $to, int $indent): string { * * @return int[] Token position to indentation map */ - private function calcIndentMap(): array { + private function calcIndentMap(int $tabWidth): array { $indentMap = []; $indent = 0; foreach ($this->tokens as $i => $token) { @@ -258,11 +258,11 @@ private function calcIndentMap(): array { $content = $token->text; $newlinePos = \strrpos($content, "\n"); if (false !== $newlinePos) { - $indent = \strlen($content) - $newlinePos - 1; + $indent = $this->getIndent(\substr($content, $newlinePos + 1), $tabWidth); } elseif ($i === 1 && $this->tokens[0]->id === \T_OPEN_TAG && $this->tokens[0]->text[\strlen($this->tokens[0]->text) - 1] === "\n") { // Special case: Newline at the end of opening tag followed by whitespace. - $indent = \strlen($content); + $indent = $this->getIndent($content, $tabWidth); } } } @@ -272,4 +272,11 @@ private function calcIndentMap(): array { return $indentMap; } + + private function getIndent(string $ws, int $tabWidth): int { + $spaces = \substr_count($ws, " "); + $tabs = \substr_count($ws, "\t"); + assert(\strlen($ws) === $spaces + $tabs); + return $spaces + $tabs * $tabWidth; + } } diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 1367a4bfee..4941be95f4 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -106,6 +106,15 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { /** @var int Current indentation level. */ protected int $indentLevel; + /** @var string String for single level of indentation */ + private string $indent; + /** @var int Width in spaces to indent by. */ + private int $indentWidth; + /** @var bool Whether to use tab indentation. */ + private bool $useTabs; + /** @var int Width in spaces of one tab. */ + private int $tabWidth = 4; + /** @var string Newline style. Does not include current indentation. */ protected string $newline; /** @var string Newline including current indentation. */ @@ -170,12 +179,14 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { * PHP version while specifying an older target (but the result will * of course not be compatible with the older version in that case). * * string $newline: The newline style to use. Should be "\n" (default) or "\r\n". + * * string $indent: The indentation to use. Should either be all spaces or a single + * tab. Defaults to four spaces (" "). * * bool $shortArraySyntax: Whether to use [] instead of array() as the default array * syntax, if the node does not specify a format. Defaults to whether * the phpVersion support short array syntax. * * @param array{ - * phpVersion?: PhpVersion, newline?: string, shortArraySyntax?: bool + * phpVersion?: PhpVersion, newline?: string, indent?: string, shortArraySyntax?: bool * } $options Dictionary of formatting options */ public function __construct(array $options = []) { @@ -190,6 +201,17 @@ public function __construct(array $options = []) { $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); $this->docStringEndToken = $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); + + $this->indent = $indent = $options['indent'] ?? ' '; + if ($indent === "\t") { + $this->useTabs = true; + $this->indentWidth = $this->tabWidth; + } elseif ($indent === \str_repeat(' ', \strlen($indent))) { + $this->useTabs = false; + $this->indentWidth = \strlen($indent); + } else { + throw new \LogicException('Option "indent" must either be all spaces or a single tab'); + } } /** @@ -208,24 +230,29 @@ protected function resetState(): void { */ protected function setIndentLevel(int $level): void { $this->indentLevel = $level; - $this->nl = $this->newline . \str_repeat(' ', $level); + if ($this->useTabs) { + $tabs = \intdiv($level, $this->tabWidth); + $spaces = $level % $this->tabWidth; + $this->nl = $this->newline . \str_repeat("\t", $tabs) . \str_repeat(' ', $spaces); + } else { + $this->nl = $this->newline . \str_repeat(' ', $level); + } } /** * Increase indentation level. */ protected function indent(): void { - $this->indentLevel += 4; - $this->nl .= ' '; + $this->indentLevel += $this->indentWidth; + $this->nl .= $this->indent; } /** * Decrease indentation level. */ protected function outdent(): void { - assert($this->indentLevel >= 4); - $this->indentLevel -= 4; - $this->nl = $this->newline . str_repeat(' ', $this->indentLevel); + assert($this->indentLevel >= $this->indentWidth); + $this->setIndentLevel($this->indentLevel - $this->indentWidth); } /** @@ -537,7 +564,7 @@ public function printFormatPreserving(array $stmts, array $origStmts, array $ori $this->initializeModifierChangeMap(); $this->resetState(); - $this->origTokens = new TokenStream($origTokens); + $this->origTokens = new TokenStream($origTokens, $this->tabWidth); $this->preprocessNodes($stmts); diff --git a/test/PhpParser/PrettyPrinterTest.php b/test/PhpParser/PrettyPrinterTest.php index 5b650f1373..8e0e472179 100644 --- a/test/PhpParser/PrettyPrinterTest.php +++ b/test/PhpParser/PrettyPrinterTest.php @@ -17,11 +17,13 @@ class PrettyPrinterTest extends CodeTestAbstract { private function createParserAndPrinter(array $options): array { $parserVersion = $options['parserVersion'] ?? $options['version'] ?? null; $printerVersion = $options['version'] ?? null; + $indent = isset($options['indent']) ? json_decode($options['indent']) : null; $factory = new ParserFactory(); $parser = $factory->createForVersion($parserVersion !== null ? PhpVersion::fromString($parserVersion) : PhpVersion::getNewestSupported()); $prettyPrinter = new Standard([ - 'phpVersion' => $printerVersion !== null ? PhpVersion::fromString($printerVersion) : null + 'phpVersion' => $printerVersion !== null ? PhpVersion::fromString($printerVersion) : null, + 'indent' => $indent, ]); return [$parser, $prettyPrinter]; } @@ -297,4 +299,10 @@ public function testInvalidNewline(): void { $this->expectExceptionMessage('Option "newline" must be one of "\n" or "\r\n"'); new PrettyPrinter\Standard(['newline' => 'foo']); } + + public function testInvalidIndent(): void { + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Option "indent" must either be all spaces or a single tab'); + new PrettyPrinter\Standard(['indent' => "\t "]); + } } diff --git a/test/code/formatPreservation/indent.test b/test/code/formatPreservation/indent.test new file mode 100644 index 0000000000..c8113a07dd --- /dev/null +++ b/test/code/formatPreservation/indent.test @@ -0,0 +1,37 @@ +Indentation +----- + $stmts]); +----- +!!indent=" " + $stmts]); +----- +!!indent="\t" +stmts[] = new Stmt\Expression(new Expr\Variable('y')); +----- +!!indent="\t" + Date: Sun, 29 Sep 2024 15:34:59 +0200 Subject: [PATCH 379/428] Avoid negative indendation in formatting-preserving printer Fixes #1015. --- lib/PhpParser/PrettyPrinterAbstract.php | 4 +-- test/code/formatPreservation/indent.test | 33 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 4941be95f4..d32be24817 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -736,7 +736,7 @@ protected function p( $result .= $extraLeft; $origIndentLevel = $this->indentLevel; - $this->setIndentLevel($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment); + $this->setIndentLevel(max($this->origTokens->getIndentationBefore($subStartPos) + $indentAdjustment, 0)); // If it's the same node that was previously in this position, it certainly doesn't // need fixup. It's important to check this here, because our fixup checks are more @@ -839,7 +839,7 @@ protected function pArray( \assert($itemStartPos >= 0 && $itemEndPos >= 0 && $itemStartPos >= $pos); $origIndentLevel = $this->indentLevel; - $lastElemIndentLevel = $this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment; + $lastElemIndentLevel = max($this->origTokens->getIndentationBefore($itemStartPos) + $indentAdjustment, 0); $this->setIndentLevel($lastElemIndentLevel); $comments = $arrItem->getComments(); diff --git a/test/code/formatPreservation/indent.test b/test/code/formatPreservation/indent.test index c8113a07dd..8a66a7c944 100644 --- a/test/code/formatPreservation/indent.test +++ b/test/code/formatPreservation/indent.test @@ -35,3 +35,36 @@ if ($a) { @@{"\t"}@@$x; @@{"\t"}@@$y; } +----- +expr; +$stmts[0]->expr = new Expr\StaticCall(new Node\Name\FullyQualified('Compat'), $call->name, $call->args); +----- +cond, $stmts[0]->stmts); +----- + Date: Sun, 29 Sep 2024 15:56:26 +0200 Subject: [PATCH 380/428] Release PHP-Parser 5.3.0 --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fac7acf1e..3d0d629eb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +Version 5.3.0 (2024-09-29) +-------------------------- + +### Added + +* Added `indent` option to pretty printer, which can be used to specify the indentation to use + (defaulting to four spaces). This also allows using tab indentation. + +### Fixed + +* Resolve names in `PropertyHook`s in the `NameResolver`. +* Include the trailing semicolon inside `Stmt\GroupUse` nodes, making them consistent with + `Stmt\Use_` nodes. +* Fixed indentation sometimes becoming negative in formatting-preserving pretty printer, resulting + in `ValueError`s. + Version 5.2.0 (2024-09-15) -------------------------- From 26573ea64f7780185b5214cdc745594296aa3d1e Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Mon, 7 Oct 2024 09:35:46 +0200 Subject: [PATCH 381/428] Makefile works on windows --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9a7bdf2d2a..1473c9998c 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ tools/vendor: composer install -d tools phpstan: tools/vendor - tools/vendor/bin/phpstan + php tools/vendor/bin/phpstan php-cs-fixer: tools/vendor - tools/vendor/bin/php-cs-fixer fix + php tools/vendor/bin/php-cs-fixer fix From 9c7a3f8d8fa392fadb65dbb4cab29d90ded6ae9e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 8 Oct 2024 20:46:33 +0200 Subject: [PATCH 382/428] Support declaring functions with name exit/die For use in stubs. Fixes #1030. --- grammar/php.y | 7 +- lib/PhpParser/Parser/Php7.php | 1729 ++++++++-------- lib/PhpParser/Parser/Php8.php | 1805 ++++++++--------- .../stmt/function/exit_die_function.test | 90 + 4 files changed, 1863 insertions(+), 1768 deletions(-) create mode 100644 test/code/parser/stmt/function/exit_die_function.test diff --git a/grammar/php.y b/grammar/php.y index 9b682e6f39..b962a5e079 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -464,15 +464,16 @@ block_or_error: | error { $$ = []; } ; -identifier_maybe_readonly: +fn_identifier: identifier_not_reserved | T_READONLY { $$ = Node\Identifier[$1]; } + | T_EXIT { $$ = Node\Identifier[$1]; } ; function_declaration_statement: - T_FUNCTION optional_ref identifier_maybe_readonly '(' parameter_list ')' optional_return_type block_or_error + T_FUNCTION optional_ref fn_identifier '(' parameter_list ')' optional_return_type block_or_error { $$ = Stmt\Function_[$3, ['byRef' => $2, 'params' => $5, 'returnType' => $7, 'stmts' => $8, 'attrGroups' => []]]; } - | attributes T_FUNCTION optional_ref identifier_maybe_readonly '(' parameter_list ')' optional_return_type block_or_error + | attributes T_FUNCTION optional_ref fn_identifier '(' parameter_list ')' optional_return_type block_or_error { $$ = Stmt\Function_[$4, ['byRef' => $3, 'params' => $6, 'returnType' => $8, 'stmts' => $9, 'attrGroups' => $1]]; } ; diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 60bc49a1eb..2ab1695450 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -164,8 +164,8 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 399; protected int $tokenToSymbolMapSize = 400; - protected int $actionTableSize = 1287; - protected int $gotoTableSize = 618; + protected int $actionTableSize = 1286; + protected int $gotoTableSize = 646; protected int $invalidSymbol = 172; protected int $errorSymbol = 1; @@ -395,134 +395,134 @@ class Php7 extends \PhpParser\ParserAbstract protected array $action = array( 128, 129, 130, 565, 131, 132, 944, 754, 755, 756, - 133, 38, 838, 485, 561, 1364,-32766,-32766,-32766, 0, - 829, 1121, 1122, 1123, 1117, 1116, 1115, 1124, 1118, 1119, - 1120,-32766,-32766,-32766, -331, 748, 747,-32766, 840,-32766, + 133, 38, 838, 485, 561, 1365,-32766,-32766,-32766, 0, + 829, 1122, 1123, 1124, 1118, 1117, 1116, 1125, 1119, 1120, + 1121,-32766,-32766,-32766, -332, 748, 747,-32766, 840,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 24,-32766, 1033, -567, 757, 1121, 1122, 1123, 1117, - 1116, 1115, 1124, 1118, 1119, 1120, 2, 381, 382, 265, - 134, 384, 761, 762, 763, 764, 1110, 425, 426, 1299, - 328, 36, 248, 26, 291, 818, 765, 766, 767, 768, + -32767, 24,-32766, 1034, -568, 757, 1122, 1123, 1124, 1118, + 1117, 1116, 1125, 1119, 1120, 1121, 2, 381, 382, 265, + 134, 384, 761, 762, 763, 764, 1111, 425, 426, 1300, + 329, 36, 248, 26, 291, 818, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 794, 566, 795, 796, - 797, 798, 786, 787, 345, 346, 789, 790, 775, 776, + 797, 798, 786, 787, 346, 347, 789, 790, 775, 776, 777, 779, 780, 781, 357, 821, 822, 823, 824, 825, - 567, -567, -567, 299, 782, 783, 568, 569, -194, 806, + 567, -568, -568, 299, 782, 783, 568, 569, -194, 806, 804, 805, 817, 801, 802, 35, -193, 570, 571, 800, 572, 573, 574, 575,-32766, 576, 577, 471, 472, 486, - 238, -567, 803, 578, 579, -370, 135, -370, 128, 129, - 130, 565, 131, 132, 1066, 754, 755, 756, 133, 38, - -32766, 136, 728, 1026, 1025, 1024, 1030, 1027, 1028, 1029, + 238, -568, 803, 578, 579, -371, 135, -371, 128, 129, + 130, 565, 131, 132, 1067, 754, 755, 756, 133, 38, + -32766, 136, 728, 1027, 1026, 1025, 1031, 1028, 1029, 1030, -32766,-32766,-32766,-32767,-32767,-32767,-32767, 101, 102, 103, - 104, 105, -331, 748, 747, 1042, 923,-32766,-32766,-32766, + 104, 105, -332, 748, 747, 1043, 923,-32766,-32766,-32766, 839,-32766, 145,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -32766,-32766,-32766, 757,-32766,-32766,-32766, 611,-32766, 290, -32766,-32766,-32766,-32766,-32766, 834, 718, 265, 134, 384, - 761, 762, 763, 764, -614,-32766, 426,-32766,-32766,-32766, - -32766, -614, 251, 818, 765, 766, 767, 768, 769, 770, + 761, 762, 763, 764, -615,-32766, 426,-32766,-32766,-32766, + -32766, -615, 251, 818, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 794, 566, 795, 796, 797, 798, - 786, 787, 345, 346, 789, 790, 775, 776, 777, 779, + 786, 787, 346, 347, 789, 790, 775, 776, 777, 779, 780, 781, 357, 821, 822, 823, 824, 825, 567, 913, 426, 310, 782, 783, 568, 569, -194, 806, 804, 805, - 817, 801, 802, 1287, -193, 570, 571, 800, 572, 573, - 574, 575, -272, 576, 577, 835, 82, 83, 84, -85, + 817, 801, 802, 1288, -193, 570, 571, 800, 572, 573, + 574, 575, -273, 576, 577, 835, 82, 83, 84, -85, 803, 578, 579, 237, 148, 778, 749, 750, 751, 752, - 753, 946, 754, 755, 756, 791, 792, 37,-32766, 85, + 753, 150, 754, 755, 756, 791, 792, 37,-32766, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 1042, 276,-32766,-32766,-32766, 925, 1262, - 1261, 1263, 713, 831, 358, 393, 109, 7, 1096, 47, - 757,-32766,-32766,-32766, 838, -85,-32766, 1094,-32766,-32766, - -32766, 1267,-32766,-32766, 758, 759, 760, 761, 762, 763, - 764, 993,-32766, 827,-32766,-32766, 923, -614, 312, -614, + 106, 107, 108, 1043, 276,-32766,-32766,-32766, 925, 1263, + 1262, 1264, 713, 831, 312, 393, 109, 7, 1097, 47, + 757,-32766,-32766,-32766, 838, -85,-32766, 1095,-32766,-32766, + -32766, 1268,-32766,-32766, 758, 759, 760, 761, 762, 763, + 764, 994,-32766, 827,-32766,-32766, 923, -615, 324, -615, 818, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 794, 816, 795, 796, 797, 798, 786, 787, 788, 815, 789, 790, 775, 776, 777, 779, 780, 781, 820, - 821, 822, 823, 824, 825, 826, 300, 301, 324, 782, + 821, 822, 823, 824, 825, 826, 300, 301, 342, 782, 783, 784, 785, 833, 806, 804, 805, 817, 801, 802, - 715, 1039, 793, 799, 800, 807, 808, 810, 809, 140, - 811, 812, 838, 327, 340,-32766, 125, 803, 814, 813, - 49, 50, 51, 517, 52, 53, 1042, -110, 341, 913, - 54, 55, -110, 56, -110, -565,-32766,-32766,-32766, 306, - 1042, 126, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -611, 1095, 106, 107, 108, 740, 276, - -611, 962, 963,-32766, 290, 287, 964, 1329, 57, 58, - -32766, 109, 371, 994, 59, 958, 60, 245, 246, 61, + 715, 1040, 793, 799, 800, 807, 808, 810, 809, 140, + 811, 812, 838, 327, 343,-32766, 125, 803, 814, 813, + 49, 50, 51, 517, 52, 53, 1043, -110, 371, 913, + 54, 55, -110, 56, -110, -566,-32766,-32766,-32766, 306, + 1043, 126, -110, -110, -110, -110, -110, -110, -110, -110, + -110, -110, -110, -612, 1096, 106, 107, 108, 740, 276, + -612, 963, 964,-32766, 290, 287, 965, 1330, 57, 58, + -32766, 109, 375, 995, 59, 959, 60, 245, 246, 61, 62, 63, 64, 65, 66, 67, 68,-32766, 28, 267, - 69, 441, 518, 375, -345, 74, 1293, 1294, 519, 391, - 838, 327, -565, -565, 1291, 42, 20, 520, 925, 521, - 923, 522, 713, 523, -563, 693, 524, 525, -565, 923, - 443, 44, 45, 447, 378, 377, 946, 46, 526, 923, - -571, 444, -565, 369, 339, 1345, 103, 104, 105, -562, - 1253, 923, 383, 382, 445, 528, 529, 530, 865, 719, - 866, 694, 425, 461, 462, 463, 446, 532, 533, 720, - 1279, 1280, 1281, 1282, 1284, 1276, 1277, 298, 865, 363, - 866, 723, 844, 1283, 1278, 695, 696, 1262, 1261, 1263, - 299, -563, -563, 70, -153, -153, -153, 322, 323, 327, - -78, -4, 923, 913, 1262, 1261, 1263, -563, 150, -153, - 283, -153, 913, -153, 151, -153, -562, -562, 153, -570, - 1349, -563, 913, -58, 829, 376, -611, 1348, -611, 748, - 747, 837, -562, -605, 913, -605, 962, 963, 154, 748, - 747, 527, 617, 81, -569, 1039, -562, 327, 155, 899, - 958, -110, -110, -110, 32, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 157, -564, - 1042, 1374, 28, 268, 1375, 33, 923, -87, 660, 21, - 679, 680, 925, -57, 838, 913, 713, -153, 1291, 149, - 408, 925, 379, 380, 283, 713, 123, 1169, 1171, 385, - 386, 979, 124, 137, 138, 713, 730, 376, -561, 438, - 1065, 141, 144, 925, 297, 327, 158, 713, 962, 963, - 651, 652, 159, 527, 1253, -84, 160, 161, 748, 747, - 162, 531, 958, -110, -110, -110, -564, -564, -78, 287, - 1267, 532, 533, -73, 1279, 1280, 1281, 1282, 1284, 1276, - 1277, -72, -564, -71, -70, 11, 1260, 1283, 1278, 913, - -69, 748, 747, -68, 925,-32766, -564, 72, 713, -4, - -16, 1260, 323, 327, -67, -561, -561, 291,-32766,-32766, + 69, 441, 518, 391, -346, 74, 1294, 1295, 519, 443, + 838, 327, -566, -566, 1292, 42, 20, 520, 925, 521, + 923, 522, 713, 523, -564, 693, 524, 525, -566, 923, + 444, 44, 45, 447, 378, 377, -78, 46, 526, 923, + -572, 445, -566, 369, 341, 1346, 103, 104, 105, -563, + 1254, 923, 383, 382, 446, 528, 529, 530, 865, 719, + 866, 694, 425, 461, 462, 463, 844, 532, 533, 720, + 1280, 1281, 1282, 1283, 1285, 1277, 1278, 298, 865, 151, + 866, 723, 153, 1284, 1279, 695, 696, 1263, 1262, 1264, + 299, -564, -564, 70, -153, -153, -153, 322, 323, 327, + 154, -4, 923, 913, 1263, 1262, 1264, -564, 155, -153, + 283, -153, 913, -153, 157, -153, -563, -563, 33, -571, + 1350, -564, 913, -58, 829, 376, -612, 1349, -612, 748, + 747, 837, -563, -606, 913, -606, 963, 964, -57, 748, + 747, 527, 123, 81, -570, 1040, -563, 327, 617, 899, + 959, -110, -110, -110, 32, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 124, -565, + 1043, 947, 28, 268, 149, 408, 923, 1375, 829, 137, + 1376, 138, 925, 144, 838, 913, 713, -153, 1292, 660, + 21, 925, 679, 680, 283, 713, 158, 1170, 1172, 379, + 380, 980, 385, 386, 159, 713, 730, 376, -562, 438, + 1066, 141, 160, 925, 297, 327, 161, 713, 963, 964, + 946, 651, 652, 527, 1254, -87, 162, -306, 748, 747, + -84, 531, 959, -110, -110, -110, -565, -565, -78, 287, + 1268, 532, 533, -73, 1280, 1281, 1282, 1283, 1285, 1277, + 1278, -72, -565, -71, -70, 11, 1261, 1284, 1279, 913, + -69, 748, 747, -68, 925,-32766, -565, 72, 713, -4, + -16, 1261, 323, 327, -67, -562, -562, 291,-32766,-32766, -32766, -66,-32766, -65,-32766, -46,-32766, -18, 142,-32766, - 275, -561, 1258, 284,-32766,-32766,-32766, 729,-32766, 732, - -32766,-32766, 922, 147, 1260, -561,-32766, 422, 28, 267, - -305,-32766,-32766,-32766, -301,-32766, 1041,-32766,-32766,-32766, - 838, 838,-32766, 288, 1291, 1039, 279,-32766,-32766,-32766, - 280, 285, 286,-32766,-32766, 1262, 1261, 1263, 925,-32766, - 422, 333, 713, 28, 268, 289, 292, 293, 146, 73, - 1042,-32766, 940, 109, 689, 838, -110, -110, -561, 1291, - 1253, -110, 276,-32766, 838, 829, 1376, 704, 706, 582, - -110, 1128, 307, 649, 283,-32766, 959, 666, 533,-32766, - 1279, 1280, 1281, 1282, 1284, 1276, 1277, 682, 1042, 661, - -50, 10, 667, 1283, 1278, 1253, 304, 468, 496, 311, - 942, 299, 683, 72, 74, 305, -527,-32766, 323, 327, - 327, 299, 290, 533, 837, 1279, 1280, 1281, 1282, 1284, - 1276, 1277, 588, 139, 1298, -561, -561, 615, 1283, 1278, - 34, 0, 0,-32766, 0, 0, 0, 0, 72, 1260, - 0, -561, 0, 323, 327, 0,-32766,-32766,-32766, 0, - -32766, -517,-32766, 1300,-32766, -561, 0,-32766, 0, 0, - 8, 0,-32766,-32766,-32766, 923,-32766, 40,-32766,-32766, - 27, 373, 1260, 0,-32766, 422, 41, -599, 737,-32766, - -32766,-32766, 738,-32766, 857,-32766,-32766,-32766, 923, 904, - -32766, 1003, 980, 987, 977,-32766,-32766,-32766, 988,-32766, - 902,-32766,-32766, 975, 1099, 1260, 1102,-32766, 422, 48, - 1103, 1100,-32766,-32766,-32766, 1101,-32766, 1107,-32766,-32766, - -32766, 1288, 849,-32766, 1315, 1333, 1367, 491,-32766,-32766, - -32766, 654,-32766, -598,-32766,-32766, -597, -571, 1260, 595, - -32766, 422, -570, -569, 1267,-32766,-32766,-32766, 913,-32766, - -568,-32766,-32766,-32766, -511, 1,-32766, -275, 29, 30, - 39,-32766,-32766,-32766, -250, -250, -250,-32766,-32766, 43, - 376, 913, 71,-32766, 422, 75, 302, 303, 76, 77, - 78, 962, 963, 79, 80,-32766, 527, -249, -249, -249, - -273, 143, 374, 376, 899, 958, -110, -110, -110, 152, - 156, 243, 329, 358, 962, 963, 127, 359, 360, 527, - 361, 362, 363, 364, 365, 366, 367, 899, 958, -110, - -110, -110,-32766, -272, 368, 838, 370, 925, 1260, 13, - 439, 713, -250, 560, 321,-32766,-32766,-32766, 14,-32766, - 15,-32766, 16,-32766, 18, 406,-32766, 487, 488, 495, - 925,-32766,-32766,-32766, 713, -249, 498,-32766,-32766, 499, - -110, -110, 500,-32766, 422, -110, 501, 505, 506, 507, - 515, 593, 699, 1068, -110,-32766, 1209, 1289, 1067, 1048, - 1248, 1044, -277,-32766, -102, 12, 17, 22, 296, 405, - 607, 612, 640, 705, 1213, 1266, 1210, 1346, 0, 372, + 275, -562, 1259, 284,-32766,-32766,-32766, 729,-32766, 732, + -32766,-32766, 922, 147, 1261, -562,-32766, 422, 28, 267, + -302,-32766,-32766,-32766, 279,-32766, 1042,-32766,-32766,-32766, + 838, 838,-32766, 288, 1292, 1040, 280,-32766,-32766,-32766, + 285, 286, 335,-32766,-32766, 1263, 1262, 1264, 925,-32766, + 422, 289, 713, 28, 268, 292, 293, 276, 940, 73, + 1043,-32766, 109, 689, 146, 838, -110, -110, -562, 1292, + 1254, -110, 829,-32766, 1377, 704, 582, 10, 661, 838, + -110, 1129, 706, 649, 283, 307, 960,-32766, 533,-32766, + 1280, 1281, 1282, 1283, 1285, 1277, 1278, 682, 1043, 305, + -50, 468, 1299, 1284, 1279, 1254, 666, -528, 496, 667, + 304, 299, 683, 72, 74, 1301, 588,-32766, 323, 327, + 327, -518, 290, 533, 40, 1280, 1281, 1282, 1283, 1285, + 1277, 1278, 8, 139, 0, -562, -562, 27, 1284, 1279, + -276, 407, 0,-32766, 0, 0, 0, 0, 72, 1261, + 311, -562, 0, 323, 327, 0,-32766,-32766,-32766, 0, + -32766, 373,-32766, 0,-32766, -562, 0,-32766, 0, 0, + 615, 0,-32766,-32766,-32766, 923,-32766, 0,-32766,-32766, + 942, 1289, 1261, 837,-32766, 422, 41, 299, 34,-32766, + -32766,-32766, 737,-32766, 738,-32766,-32766,-32766, 923, 857, + -32766, 904, 1004, 981, 988,-32766,-32766,-32766, 978,-32766, + 989,-32766,-32766, 902, 976, 1261, 1100,-32766, 422, 48, + 1103, 1104,-32766,-32766,-32766, 1101,-32766, 1102,-32766,-32766, + -32766, 1108, -600,-32766, 849, 1316, 1334, 491,-32766,-32766, + -32766, 1368,-32766, 654,-32766,-32766, -599, -598, 1261, 595, + -32766, 422, -572, -571, 1268,-32766,-32766,-32766, 913,-32766, + -570,-32766,-32766,-32766, -569, -512,-32766, -274, 1, 29, + 30,-32766,-32766,-32766, -251, -251, -251,-32766,-32766, 39, + 376, 913, 43,-32766, 422, 71, 302, 303, 75, 76, + 77, 963, 964, 78, 79,-32766, 527, -250, -250, -250, + -273, 80, 374, 376, 899, 959, -110, -110, -110, 143, + 152, 156, 243, 331, 963, 964, 127, 358, 359, 527, + 360, 361, 362, 363, 364, 365, 366, 899, 959, -110, + -110, -110,-32766, 13, 367, 838, 368, 925, 1261, 14, + 370, 713, -251, 439, 560,-32766,-32766,-32766, 15,-32766, + 16,-32766, 18,-32766, 406, 487,-32766, 488, 495, 498, + 925,-32766,-32766,-32766, 713, -250, 499,-32766,-32766, 500, + -110, -110, 501,-32766, 422, -110, 505, 506, 507, 515, + 593, 699, 1069, 1210, -110,-32766, 1290, 1068, 1049, 1249, + 1045, -278, -102,-32766, 12, 17, 22, 296, 405, 607, + 612, 640, 705, 1214, 1267, 1211, 1347, 0, 321, 372, 714, 717, 721, 722, 724, 299, 725, 726, 74, 727, - 1226, 731, 716, 0, 327, 407, 1292, 411, 734, 900, - 1371, 1373, 860, 859, 952, 995, 1372, 951, 949, 950, - 953, 1241, 933, 943, 931, 985, 986, 638, 1370, 1327, - 1316, 1334, 1343, 0, 0, 0, 327 + 1227, 731, 716, 0, 327, 411, 1293, 734, 900, 1372, + 1374, 860, 859, 953, 996, 1373, 952, 950, 951, 954, + 1242, 933, 943, 931, 986, 987, 638, 1371, 1328, 1317, + 1335, 1344, 0, 0, 0, 327 ); protected array $actionCheck = array( @@ -558,11 +558,11 @@ class Php7 extends \PhpParser\ParserAbstract 134, 135, 136, 1, 166, 139, 140, 141, 142, 143, 144, 145, 166, 147, 148, 160, 9, 10, 11, 31, 154, 155, 156, 97, 158, 2, 3, 4, 5, 6, - 7, 122, 9, 10, 11, 12, 13, 30, 116, 32, + 7, 14, 9, 10, 11, 12, 13, 30, 116, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 141, 57, 9, 10, 11, 163, 159, - 160, 161, 167, 80, 165, 106, 69, 108, 168, 70, + 160, 161, 167, 80, 8, 106, 69, 108, 168, 70, 57, 9, 10, 11, 82, 97, 30, 1, 32, 33, 34, 1, 9, 10, 71, 72, 73, 74, 75, 76, 77, 31, 30, 80, 32, 33, 1, 164, 8, 166, @@ -583,27 +583,27 @@ class Php7 extends \PhpParser\ParserAbstract 72, 73, 74, 8, 168, 165, 78, 79, 80, 8, 82, 171, 137, 138, 86, 87, 88, 89, 163, 91, 1, 93, 167, 95, 70, 80, 98, 99, 153, 1, - 8, 103, 104, 105, 106, 107, 122, 109, 110, 1, + 8, 103, 104, 105, 106, 107, 16, 109, 110, 1, 165, 8, 167, 115, 116, 1, 50, 51, 52, 70, 122, 1, 106, 107, 8, 127, 128, 129, 106, 31, 108, 116, 116, 132, 133, 134, 8, 139, 140, 31, - 142, 143, 144, 145, 146, 147, 148, 149, 106, 165, - 108, 31, 8, 155, 156, 140, 141, 159, 160, 161, + 142, 143, 144, 145, 146, 147, 148, 149, 106, 14, + 108, 31, 14, 155, 156, 140, 141, 159, 160, 161, 162, 137, 138, 165, 75, 76, 77, 169, 170, 171, - 16, 0, 1, 84, 159, 160, 161, 153, 14, 90, + 14, 0, 1, 84, 159, 160, 161, 153, 14, 90, 165, 92, 84, 94, 14, 96, 137, 138, 14, 165, 1, 167, 84, 16, 80, 106, 164, 8, 166, 37, - 38, 159, 153, 164, 84, 166, 117, 118, 14, 37, - 38, 122, 51, 167, 165, 116, 167, 171, 14, 130, + 38, 159, 153, 164, 84, 166, 117, 118, 16, 37, + 38, 122, 16, 167, 165, 116, 167, 171, 51, 130, 131, 132, 133, 134, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 14, 70, - 141, 80, 70, 71, 83, 14, 1, 31, 75, 76, - 75, 76, 163, 16, 82, 84, 167, 168, 86, 101, - 102, 163, 106, 107, 165, 167, 16, 59, 60, 106, - 107, 163, 16, 16, 16, 167, 31, 106, 70, 108, + 22, 23, 24, 25, 26, 27, 28, 29, 16, 70, + 141, 73, 70, 71, 101, 102, 1, 80, 80, 16, + 83, 16, 163, 16, 82, 84, 167, 168, 86, 75, + 76, 163, 75, 76, 165, 167, 16, 59, 60, 106, + 107, 163, 106, 107, 16, 167, 31, 106, 70, 108, 1, 167, 16, 163, 113, 171, 16, 167, 117, 118, - 111, 112, 16, 122, 122, 31, 16, 16, 37, 38, - 16, 130, 131, 132, 133, 134, 137, 138, 31, 30, + 122, 111, 112, 122, 122, 31, 16, 35, 37, 38, + 31, 130, 131, 132, 133, 134, 137, 138, 31, 30, 1, 139, 140, 31, 142, 143, 144, 145, 146, 147, 148, 31, 153, 31, 31, 154, 80, 155, 156, 84, 31, 37, 38, 31, 163, 74, 167, 165, 167, 168, @@ -614,26 +614,26 @@ class Php7 extends \PhpParser\ParserAbstract 35, 87, 88, 89, 35, 91, 140, 93, 127, 95, 82, 82, 98, 37, 86, 116, 35, 103, 104, 105, 35, 35, 35, 109, 110, 159, 160, 161, 163, 115, - 116, 35, 167, 70, 71, 37, 37, 37, 70, 158, - 141, 127, 38, 69, 77, 82, 117, 118, 70, 86, - 122, 122, 57, 116, 82, 80, 83, 80, 92, 89, - 131, 82, 114, 113, 165, 85, 131, 96, 140, 140, - 142, 143, 144, 145, 146, 147, 148, 94, 141, 90, - 31, 97, 100, 155, 156, 122, 135, 97, 97, 135, - 158, 162, 100, 165, 165, 136, 153, 140, 170, 171, - 171, 162, 165, 140, 159, 142, 143, 144, 145, 146, - 147, 148, 157, 31, 150, 137, 138, 157, 155, 156, - 167, -1, -1, 74, -1, -1, -1, -1, 165, 80, - -1, 153, -1, 170, 171, -1, 87, 88, 89, -1, - 91, 153, 93, 150, 95, 167, -1, 98, -1, -1, - 153, -1, 103, 104, 105, 1, 74, 163, 109, 110, - 153, 153, 80, -1, 115, 116, 163, 165, 163, 87, + 116, 37, 167, 70, 71, 37, 37, 57, 38, 158, + 141, 127, 69, 77, 70, 82, 117, 118, 70, 86, + 122, 122, 80, 116, 83, 80, 89, 97, 90, 82, + 131, 82, 92, 113, 165, 114, 131, 85, 140, 140, + 142, 143, 144, 145, 146, 147, 148, 94, 141, 136, + 31, 97, 150, 155, 156, 122, 96, 153, 97, 100, + 135, 162, 100, 165, 165, 150, 157, 140, 170, 171, + 171, 153, 165, 140, 163, 142, 143, 144, 145, 146, + 147, 148, 153, 31, -1, 137, 138, 153, 155, 156, + 166, 168, -1, 74, -1, -1, -1, -1, 165, 80, + 135, 153, -1, 170, 171, -1, 87, 88, 89, -1, + 91, 153, 93, -1, 95, 167, -1, 98, -1, -1, + 157, -1, 103, 104, 105, 1, 74, -1, 109, 110, + 158, 164, 80, 159, 115, 116, 163, 162, 167, 87, 88, 89, 163, 91, 163, 93, 127, 95, 1, 163, 98, 163, 163, 163, 163, 103, 104, 105, 163, 74, 163, 109, 110, 163, 163, 80, 163, 115, 116, 70, 163, 163, 87, 88, 89, 163, 91, 163, 93, 127, - 95, 164, 164, 98, 164, 164, 164, 102, 103, 104, - 105, 164, 74, 165, 109, 110, 165, 165, 80, 81, + 95, 163, 165, 98, 164, 164, 164, 102, 103, 104, + 105, 164, 74, 164, 109, 110, 165, 165, 80, 81, 115, 116, 165, 165, 1, 87, 88, 89, 84, 91, 165, 93, 127, 95, 165, 165, 98, 166, 165, 165, 165, 103, 104, 105, 100, 101, 102, 109, 110, 165, @@ -643,24 +643,24 @@ class Php7 extends \PhpParser\ParserAbstract 165, 165, 165, 165, 117, 118, 167, 165, 165, 122, 165, 165, 165, 165, 165, 165, 165, 130, 131, 132, 133, 134, 74, 166, 165, 82, 165, 163, 80, 166, - 165, 167, 168, 165, 167, 87, 88, 89, 166, 91, + 165, 167, 168, 165, 165, 87, 88, 89, 166, 91, 166, 93, 166, 95, 166, 166, 98, 166, 166, 166, 163, 103, 104, 105, 167, 168, 166, 109, 110, 166, 117, 118, 166, 115, 116, 122, 166, 166, 166, 166, 166, 166, 166, 166, 131, 127, 166, 166, 166, 166, 166, 166, 166, 140, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, -1, 167, + 166, 166, 166, 166, 166, 166, 166, -1, 167, 167, 167, 167, 167, 167, 167, 162, 167, 167, 165, 167, 169, 167, 167, -1, 171, 168, 170, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, -1, -1, -1, 171 + 168, 168, -1, -1, -1, 171 ); protected array $actionBase = array( 0, -2, 156, 559, 641, 1004, 1027, 485, 292, 200, - -60, 283, 568, 590, 590, 715, 590, 195, 578, 892, - 395, 395, 395, 827, 313, 313, 827, 313, 731, 731, + -60, 283, 568, 590, 590, 715, 590, 195, 578, 894, + 395, 395, 395, 825, 313, 313, 825, 313, 731, 731, 731, 731, 764, 764, 965, 965, 998, 932, 899, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, @@ -674,9 +674,9 @@ class Php7 extends \PhpParser\ParserAbstract 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 37, 360, 216, 701, 1062, 1068, 1064, - 1069, 1060, 1059, 1063, 1065, 1070, 1110, 1111, 812, 1112, - 1113, 1109, 1114, 1066, 907, 1061, 1067, 297, 297, 297, + 1088, 1088, 1088, 37, 360, 216, 644, 1061, 1067, 1063, + 1068, 1059, 1058, 1062, 1064, 1069, 1109, 1110, 812, 1111, + 1112, 1108, 1113, 1065, 909, 1060, 1066, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 135, 477, 373, 201, 201, 201, @@ -688,48 +688,48 @@ class Php7 extends \PhpParser\ParserAbstract 139, 139, 139, -50, 49, 749, 380, 787, -39, 569, 569, 536, 536, 335, 335, 349, 349, 335, 335, 335, 212, 212, 212, 212, 415, 494, 519, 512, -71, 807, - 584, 584, 584, 584, 807, 807, 807, 807, 843, 1086, + 584, 584, 584, 584, 807, 807, 807, 807, 795, 1086, 807, 807, 807, 639, 828, 828, 979, 452, 452, 452, - 828, 492, -70, -70, 492, 394, -70, 516, 631, 397, - 785, 486, 509, 397, -16, 299, 502, 233, 795, 626, - 795, 1058, 199, 830, 830, 794, 752, 454, 894, 1085, - 1071, 832, 1107, 842, 1108, 471, 10, 747, 1056, 1056, - 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1115, - 632, 1058, 145, 1115, 1115, 1115, 632, 632, 632, 632, - 632, 632, 632, 632, 796, 632, 632, 649, 145, 643, - 645, 145, 846, 632, 838, 37, 37, 37, 37, 37, + 828, 492, -70, -70, 492, 394, -70, 516, 982, 637, + 988, 397, 785, 486, 509, 397, -16, 299, 502, 233, + 854, 633, 854, 1056, 832, 832, 794, 752, 898, 1085, + 1070, 839, 1106, 842, 1107, 471, 10, 747, 1055, 1055, + 1055, 1055, 1055, 1055, 1055, 1055, 1055, 1055, 1055, 1114, + 632, 1056, 145, 1114, 1114, 1114, 632, 632, 632, 632, + 632, 632, 632, 632, 796, 632, 632, 650, 145, 654, + 657, 145, 837, 632, 798, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, -18, 37, 37, 360, 5, 5, 37, 341, 52, 5, 5, 5, 5, 37, 37, - 37, 37, 626, 845, 805, 633, 278, 810, 128, 845, - 845, 845, 26, 136, 120, 815, 819, 259, 825, 825, - 829, 930, 930, 825, 822, 825, 829, 825, 825, 930, - 930, 789, 930, 163, 562, 456, 535, 573, 930, 273, - 825, 825, 825, 825, 804, 930, 58, 586, 825, 234, - 194, 825, 825, 804, 801, 802, 809, 930, 930, 930, - 804, 514, 809, 809, 809, 855, 859, 800, 799, 430, - 390, 614, 127, 854, 799, 799, 825, 541, 800, 799, - 800, 799, 782, 799, 799, 799, 800, 799, 822, 470, - 799, 740, 746, 598, 75, 799, 19, 947, 950, 686, - 953, 935, 954, 1005, 955, 958, 1073, 929, 976, 944, - 959, 1008, 934, 933, 811, 720, 726, 847, 793, 925, - 824, 824, 824, 912, 917, 824, 824, 824, 824, 824, - 824, 824, 824, 720, 897, 858, 820, 982, 727, 728, - 1045, 814, 1091, 1081, 978, 947, 958, 734, 944, 959, - 934, 933, 792, 790, 772, 783, 769, 763, 760, 762, - 797, 1047, 966, 844, 736, 1018, 983, 1090, 1007, 985, - 986, 1019, 1050, 861, 1051, 1092, 818, 1093, 1094, 898, - 988, 1074, 824, 911, 852, 900, 987, 918, 720, 901, - 1052, 1003, 803, 1021, 1022, 1072, 840, 823, 902, 1095, - 989, 990, 991, 1075, 1076, 853, 1012, 931, 1023, 841, - 1087, 1030, 1033, 1036, 1040, 1077, 1096, 1079, 908, 1080, - 866, 839, 964, 821, 1097, 634, 836, 837, 850, 1001, - 640, 977, 1082, 1089, 1098, 1041, 1042, 1043, 1099, 1100, - 974, 868, 1014, 833, 1016, 997, 869, 870, 644, 849, - 1053, 831, 835, 848, 664, 674, 1101, 1102, 1103, 975, - 806, 817, 871, 875, 1054, 826, 1055, 1104, 694, 877, - 1105, 1046, 750, 751, 624, 707, 647, 754, 816, 1084, - 857, 798, 834, 999, 751, 808, 880, 1106, 881, 883, - 887, 1044, 888, 0, 0, 0, 0, 0, 0, 0, + 37, 37, 633, 830, 789, 636, 278, 843, 128, 830, + 830, 830, 26, 136, 120, 732, 815, 259, 822, 822, + 829, 933, 933, 822, 827, 822, 829, 822, 822, 933, + 933, 855, 933, 163, 541, 430, 514, 562, 933, 273, + 822, 822, 822, 822, 845, 933, 58, 573, 822, 234, + 194, 822, 822, 845, 805, 802, 793, 933, 933, 933, + 845, 470, 793, 793, 793, 859, 861, 800, 799, 390, + 356, 598, 127, 850, 799, 799, 822, 535, 800, 799, + 800, 799, 852, 799, 799, 799, 800, 799, 827, 456, + 799, 720, 728, 586, 75, 799, 19, 950, 953, 734, + 954, 944, 955, 1008, 958, 959, 1073, 930, 977, 947, + 966, 1009, 935, 934, 811, 666, 692, 809, 784, 929, + 823, 823, 823, 917, 918, 823, 823, 823, 823, 823, + 823, 823, 823, 666, 847, 838, 817, 983, 703, 705, + 1044, 782, 1090, 1081, 982, 950, 959, 739, 947, 966, + 935, 934, 792, 790, 772, 783, 769, 763, 760, 762, + 797, 1046, 974, 791, 707, 1016, 985, 1089, 1071, 986, + 987, 1018, 1047, 866, 1050, 1091, 824, 1092, 1093, 900, + 989, 1074, 823, 912, 897, 901, 988, 925, 666, 902, + 1051, 997, 851, 1019, 1021, 1072, 834, 821, 907, 1094, + 990, 991, 999, 1075, 1076, 853, 1003, 804, 1022, 841, + 803, 1023, 1030, 1033, 1036, 1077, 1095, 1079, 911, 1080, + 868, 818, 931, 840, 1096, 307, 835, 836, 849, 1005, + 605, 978, 1082, 1087, 1097, 1040, 1041, 1042, 1098, 1099, + 975, 869, 1012, 833, 1014, 964, 870, 871, 608, 848, + 1052, 819, 831, 844, 626, 634, 1100, 1101, 1102, 976, + 806, 816, 875, 877, 1053, 826, 1054, 1103, 640, 880, + 1104, 1045, 736, 740, 560, 662, 647, 750, 820, 1084, + 814, 801, 810, 1001, 740, 808, 881, 1105, 883, 887, + 888, 1043, 892, 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, 468, 468, 468, 468, 468, 468, 313, @@ -758,33 +758,33 @@ class Php7 extends \PhpParser\ParserAbstract 297, 297, 297, 297, 297, 297, 297, 297, 297, 716, 716, 297, 297, 297, 297, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 297, 297, 0, 297, 297, - 297, 297, 297, 297, 297, 297, 789, 716, 716, 716, + 297, 297, 297, 297, 297, 297, 855, 716, 716, 716, 716, 452, 452, 452, 452, -95, -95, 716, 716, 716, 394, 716, 716, 452, 452, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 0, 0, 0, 145, - -70, 716, 822, 822, 822, 822, 716, 716, 716, 716, + -70, 716, 827, 827, 827, 827, 716, 716, 716, 716, -70, -70, 716, 716, 716, 0, 0, 0, 0, 0, - 0, 0, 0, 145, 0, 0, 145, 0, 0, 822, - 822, 716, 394, 789, 659, 716, 0, 0, 0, 0, - 145, 822, 145, 632, 825, -70, -70, 632, 632, 825, - 5, 37, 659, 628, 628, 628, 628, 0, 0, 626, - 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 822, 0, 789, 0, 822, 822, 822, 0, 0, - 0, 0, 0, 0, 0, 0, 930, 0, 0, 0, - 0, 0, 0, 0, 822, 0, 930, 0, 0, 0, + 0, 0, 0, 145, 0, 0, 145, 0, 0, 827, + 638, 827, 638, 716, 394, 855, 659, 716, 0, 0, + 0, 0, 145, 827, 145, 632, -70, -70, 632, 632, + 5, 37, 659, 613, 613, 613, 613, 0, 0, 633, + 855, 855, 855, 855, 855, 855, 855, 855, 855, 855, + 855, 827, 0, 855, 0, 827, 827, 827, 0, 0, + 0, 0, 0, 0, 0, 0, 933, 0, 0, 0, + 0, 0, 0, 0, 827, 0, 933, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 822, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 824, 840, 0, 0, 840, - 0, 824, 824, 824, 0, 0, 0, 849, 826 + 0, 0, 0, 0, 0, 827, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 823, 834, 0, 0, 834, + 0, 823, 823, 823, 0, 0, 0, 848, 826 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 617, 617, - 617, 617,32767,32767, 254, 102,32767,32767, 486, 403, - 403, 403,32767,32767, 559, 559, 559, 559, 559,32767, - 32767,32767,32767,32767,32767, 486,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 618, 618, + 618, 618,32767,32767, 255, 102,32767,32767, 487, 404, + 404, 404,32767,32767, 560, 560, 560, 560, 560,32767, + 32767,32767,32767,32767,32767, 487,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, @@ -792,138 +792,141 @@ class Php7 extends \PhpParser\ParserAbstract 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, 36, 7, - 8, 10, 11, 49, 17, 327, 100,32767,32767,32767, + 8, 10, 11, 49, 17, 328, 100,32767,32767,32767, 32767,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 610,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 611,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 391, 490, 469, - 470, 472, 473, 402, 560, 616, 330, 613, 332, 401, - 145, 342, 333, 242, 258, 491, 259, 492, 495, 496, - 215, 388, 149, 150, 433, 487, 435, 485, 489, 434, - 408, 414, 415, 416, 417, 418, 419, 420, 421, 422, - 423, 424, 425, 426, 406, 407, 488,32767,32767, 466, - 465, 464, 431,32767,32767,32767,32767,32767,32767,32767, - 32767, 102,32767, 432, 436, 405, 439, 437, 438, 455, - 456, 453, 454, 457,32767,32767, 319,32767,32767, 458, - 459, 460, 461, 369, 367,32767,32767, 319, 111,32767, - 32767, 446, 447,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 503, 553, 463,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 392, 491, 470, + 471, 473, 474, 403, 561, 617, 331, 614, 333, 402, + 145, 343, 334, 243, 259, 492, 260, 493, 496, 497, + 216, 389, 149, 150, 434, 488, 436, 486, 490, 435, + 409, 415, 416, 417, 418, 419, 420, 421, 422, 423, + 424, 425, 426, 427, 407, 408, 489,32767,32767, 467, + 466, 465, 432,32767,32767,32767,32767,32767,32767,32767, + 32767, 102,32767, 433, 437, 406, 440, 438, 439, 456, + 457, 454, 455, 458,32767,32767, 320,32767,32767, 459, + 460, 461, 462, 370, 368,32767,32767, 320, 111,32767, + 32767, 447, 448,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 504, 554, 464,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 102,32767, 100, 555, 428, 430, 523, 441, 442, 440, - 409,32767, 528,32767, 102,32767, 530,32767,32767,32767, - 32767,32767,32767,32767, 554,32767, 561, 561,32767, 516, - 100, 195,32767,32767, 529, 195, 195,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 624, 516, 110, 110, + 102,32767, 100, 556, 429, 431, 524, 442, 443, 441, + 410,32767, 529,32767, 102,32767, 531,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 555,32767, 562, 562, + 32767, 517, 100, 195,32767, 530, 195, 195,32767,32767, + 32767,32767,32767,32767,32767,32767, 625, 517, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, 110,32767,32767,32767, 100, 195, 195, 195, 195, - 195, 195, 195, 195, 531, 195, 195, 190,32767, 268, - 270, 102, 578, 195, 533,32767,32767,32767,32767,32767, + 195, 195, 195, 195, 532, 195, 195, 190,32767, 269, + 271, 102, 579, 195, 534,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, 516, 451, 138,32767, 518, 138, 561, 443, - 444, 445, 561, 561, 561, 315, 292,32767,32767,32767, - 32767, 531, 531, 100, 100, 100, 100,32767,32767,32767, - 32767, 111, 502, 99, 99, 99, 99, 99, 103, 101, - 32767,32767,32767,32767, 223,32767, 101, 99,32767, 101, - 101,32767,32767, 223, 225, 212, 227,32767, 582, 583, - 223, 101, 227, 227, 227, 247, 247, 505, 321, 101, - 99, 101, 101, 197, 321, 321,32767, 101, 505, 321, - 505, 321, 199, 321, 321, 321, 505, 321,32767, 101, - 321, 214, 391, 99, 99, 321,32767,32767,32767, 518, - 32767,32767,32767,32767,32767,32767,32767, 222,32767,32767, - 32767,32767,32767,32767,32767,32767, 548,32767, 566, 580, - 449, 450, 452, 565, 563, 474, 475, 476, 477, 478, - 479, 480, 482, 612,32767, 522,32767,32767,32767, 341, - 32767, 622,32767,32767,32767, 9, 74, 511, 42, 43, - 51, 57, 537, 538, 539, 540, 534, 535, 541, 536, + 32767,32767, 517, 452, 138,32767, 519, 138, 562, 444, + 445, 446, 562, 562, 562, 316, 293,32767,32767,32767, + 32767, 532, 532, 100, 100, 100, 100,32767,32767,32767, + 32767, 111, 503, 99, 99, 99, 99, 99, 103, 101, + 32767,32767,32767,32767, 224,32767, 101, 99,32767, 101, + 101,32767,32767, 224, 226, 213, 228,32767, 583, 584, + 224, 101, 228, 228, 228, 248, 248, 506, 322, 101, + 99, 101, 101, 197, 322, 322,32767, 101, 506, 322, + 506, 322, 199, 322, 322, 322, 506, 322,32767, 101, + 322, 215, 392, 99, 99, 322,32767,32767,32767, 519, + 32767,32767,32767,32767,32767,32767,32767, 223,32767,32767, + 32767,32767,32767,32767,32767,32767, 549,32767, 567, 581, + 450, 451, 453, 566, 564, 475, 476, 477, 478, 479, + 480, 481, 483, 613,32767, 523,32767,32767,32767, 342, + 32767, 623,32767,32767,32767, 9, 74, 512, 42, 43, + 51, 57, 538, 539, 540, 541, 535, 536, 542, 537, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 623,32767, 561,32767,32767, - 32767,32767, 448, 543, 588,32767,32767, 562, 615,32767, + 32767,32767,32767,32767,32767, 624,32767, 562,32767,32767, + 32767,32767, 449, 544, 589,32767,32767, 563, 616,32767, 32767,32767,32767,32767,32767,32767, 138,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 548,32767, 136, - 32767,32767,32767,32767,32767,32767,32767,32767, 544,32767, - 32767,32767, 561,32767,32767,32767,32767, 317, 314,32767, + 32767,32767,32767,32767,32767,32767,32767, 549,32767, 136, + 32767,32767,32767,32767,32767,32767,32767,32767, 545,32767, + 32767,32767, 562,32767,32767,32767,32767, 318, 315,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 561,32767,32767,32767,32767, - 32767, 294,32767, 311,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 562,32767,32767,32767,32767, + 32767, 295,32767, 312,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 387, 518, 297, 299, 300,32767,32767,32767, - 32767, 363,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 152, 152, 3, 3, 344, 152, 152, - 152, 344, 344, 152, 344, 344, 344, 152, 152, 152, - 152, 152, 152, 280, 185, 262, 265, 247, 247, 152, - 355, 152 + 32767,32767, 388, 519, 298, 300, 301,32767,32767,32767, + 32767, 364,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 152, 152, 3, 3, 345, 152, 152, + 152, 345, 345, 152, 345, 345, 345, 152, 152, 152, + 152, 152, 152, 281, 185, 263, 266, 248, 248, 152, + 356, 152 ); protected array $goto = array( - 196, 196, 1040, 1071, 700, 465, 587, 470, 470, 855, - 736, 641, 643, 1204, 856, 663, 470, 830, 709, 687, - 690, 1013, 698, 707, 1009, 625, 662, 166, 166, 166, + 196, 196, 1041, 352, 700, 465, 587, 470, 470, 1072, + 736, 641, 643, 1205, 855, 663, 470, 856, 709, 687, + 690, 1014, 698, 707, 1010, 625, 662, 166, 166, 166, 166, 220, 197, 193, 193, 176, 178, 215, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 188, 189, 190, 191, 192, 217, 215, 218, 540, 541, 423, 542, - 545, 546, 547, 548, 549, 550, 551, 552, 1155, 167, + 545, 546, 547, 548, 549, 550, 551, 552, 1156, 167, 168, 169, 195, 170, 171, 172, 165, 173, 174, 175, 177, 214, 216, 219, 239, 242, 253, 254, 256, 257, 258, 259, 260, 261, 262, 263, 269, 270, 271, 272, 281, 282, 317, 318, 319, 429, 430, 431, 602, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 179, 236, 180, 188, 189, 190, - 191, 192, 217, 1155, 198, 199, 200, 201, 240, 181, + 191, 192, 217, 1156, 198, 199, 200, 201, 240, 181, 182, 202, 183, 203, 199, 184, 241, 198, 164, 204, 205, 185, 206, 207, 208, 186, 209, 210, 187, 211, - 212, 213, 278, 278, 278, 278, 858, 433, 665, 978, - 916, 604, 917, 428, 320, 314, 315, 336, 597, 432, - 337, 434, 642, 627, 627, 896, 854, 896, 896, 1290, - 1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290, 1290, 427, - 851, 616, 553, 553, 553, 553, 352, 608, 564, 557, - 871, 421, 912, 907, 908, 921, 864, 909, 861, 910, - 911, 862, 1002, 915, 868, 974, 883, 735, 867, 870, - 556, 1011, 1006, 1360, 1360, 1093, 1088, 1089, 1090, 342, - 557, 564, 589, 590, 347, 600, 606, 889, 621, 622, - 836, 1360, 594, 851, 658, 659, 25, 676, 677, 678, - 1259, 1040, 1259, 1259, 397, 400, 605, 609, 1363, 1363, - 1040, 1259, 1040, 697, 1040, 1040, 460, 832, 1040, 1040, - 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 697, - 350, 836, 697, 836, 1259, 355, 355, 355, 355, 1259, - 1259, 1259, 1259, 1113, 1114, 1259, 1259, 1259, 1342, 1342, - 1342, 1342, 884, 872, 1076, 1080, 343, 5, 503, 6, - 504, 356, 1350, 442, 929, 981, 510, 395, 930, 249, - 249, 356, 356, 479, 1335, 1336, 555, 999, 555, 555, - 344, 343, 970, 412, 708, 356, 356, 555, 971, 356, - 945, 1377, 635, 637, 639, 945, 247, 247, 247, 247, - 244, 250, 559, 1046, 1045, 592, 356, 356, 1049, 1050, - 458, 1125, 888, 851, 664, 972, 972, 972, 972, 1309, - 1309, 458, 966, 973, 1152, 1309, 1309, 1309, 1309, 1309, - 1309, 1309, 1309, 1309, 1309, 1306, 1306, 326, 309, 1337, - 1338, 1306, 1306, 1306, 1306, 1306, 1306, 1306, 1306, 1306, - 1306, 1016, 1016, 598, 619, 1321, 1064, 610, 603, 1106, - 934, 1142, 440, 451, 451, 670, 451, 451, 1332, 712, - 1332, 1332, 1018, 686, 511, 703, 512, 1104, 482, 1332, - 875, 338, 668, 997, 876, 484, 558, 584, 869, 848, - 404, 558, 961, 584, 873, 398, 464, 353, 354, 1250, - 1249, 1021, 620, 1344, 1344, 1344, 1344, 559, 473, 601, - 474, 475, 1077, 1043, 1043, 739, 881, 685, 955, 1368, - 1369, 1035, 1051, 1052, 480, 544, 544, 885, 983, 1081, - 1328, 544, 544, 544, 544, 544, 544, 544, 544, 544, - 544, 543, 543, 1127, 879, 1031, 0, 543, 0, 543, + 212, 213, 278, 278, 278, 278, 858, 433, 665, 979, + 916, 604, 917, 428, 320, 314, 315, 338, 597, 432, + 339, 434, 642, 627, 627, 896, 854, 896, 896, 1291, + 1291, 1291, 1291, 1291, 1291, 1291, 1291, 1291, 1291, 614, + 628, 631, 632, 633, 634, 655, 656, 657, 711, 830, + 871, 460, 912, 907, 908, 921, 864, 909, 861, 910, + 911, 862, 356, 915, 868, 421, 883, 482, 867, 870, + 1361, 1361, 356, 356, 484, 1094, 1089, 1090, 1091, 889, + 603, 1107, 397, 400, 605, 609, 356, 356, 1361, 594, + 356, 712, 344, 1378, 353, 354, 511, 703, 442, 1105, + 1260, 1041, 1260, 1260, 350, 559, 1364, 1364, 356, 356, + 1041, 1260, 1041, 1351, 1041, 1041, 345, 344, 1041, 1041, + 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1000, + 1236, 948, 249, 249, 1260, 1237, 1240, 949, 1241, 1260, + 1260, 1260, 1260, 1114, 1115, 1260, 1260, 1260, 1343, 1343, + 1343, 1343, 564, 557, 851, 427, 1322, 616, 395, 247, + 247, 247, 247, 244, 250, 592, 929, 503, 664, 504, + 930, 355, 355, 355, 355, 510, 945, 512, 945, 479, + 1336, 1337, 328, 557, 564, 589, 590, 330, 600, 606, + 1153, 621, 622, 555, 1065, 555, 555, 658, 659, 25, + 676, 677, 678, 440, 555, 1310, 1310, 686, 559, 851, + 670, 1310, 1310, 1310, 1310, 1310, 1310, 1310, 1310, 1310, + 1310, 1044, 1044, 1047, 1046, 685, 956, 458, 340, 1036, + 1052, 1053, 973, 973, 973, 973, 1050, 1051, 458, 967, + 974, 1307, 1307, 971, 412, 708, 848, 1307, 1307, 1307, + 1307, 1307, 1307, 1307, 1307, 1307, 1307, 5, 610, 6, + 873, 934, 1143, 451, 451, 876, 451, 451, 1333, 962, + 1333, 1333, 1253, 1019, 404, 553, 553, 553, 553, 1333, + 608, 875, 620, 668, 998, 1251, 558, 584, 1022, 869, + 739, 558, 885, 584, 480, 398, 464, 1078, 697, 326, + 309, 1250, 832, 1345, 1345, 1345, 1345, 1082, 473, 601, + 474, 475, 1338, 1339, 697, 1128, 881, 697, 984, 1369, + 1370, 598, 619, 1032, 0, 544, 544, 851, 836, 0, + 1329, 544, 544, 544, 544, 544, 544, 544, 544, 544, + 544, 543, 543, 1255, 879, 0, 0, 543, 0, 543, 543, 543, 543, 543, 543, 543, 543, 451, 451, 451, - 451, 451, 451, 451, 451, 451, 451, 451, 1254, 0, - 451, 1252, 1079, 0, 409, 410, 1330, 1330, 1079, 674, + 451, 451, 451, 451, 451, 451, 451, 451, 252, 252, + 451, 836, 1080, 836, 409, 410, 1331, 1331, 1080, 674, 0, 675, 0, 414, 415, 416, 0, 688, 0, 0, - 417, 0, 0, 0, 0, 348, 273, 325, 0, 325, - 325, 0, 0, 0, 0, 252, 252, 614, 628, 631, - 632, 633, 634, 655, 656, 657, 711, 435, 0, 0, - 0, 0, 0, 1255, 1256, 0, 1242, 0, 435, 0, - 0, 0, 846, 0, 0, 0, 1047, 1047, 0, 1242, - 0, 669, 1058, 1054, 1055, 0, 0, 0, 0, 1235, - 947, 1257, 1318, 1319, 1236, 1239, 948, 1240 + 417, 635, 637, 639, 0, 348, 0, 0, 1256, 1257, + 0, 1243, 884, 872, 1077, 1081, 0, 846, 1003, 0, + 0, 975, 0, 735, 1243, 982, 556, 1012, 1007, 0, + 435, 0, 0, 0, 0, 0, 1258, 1319, 1320, 0, + 0, 435, 273, 325, 0, 325, 325, 0, 972, 1048, + 1048, 0, 0, 0, 669, 1059, 1055, 1056, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1126, 888, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1017, 1017 ); protected array $gotoCheck = array( - 42, 42, 73, 128, 73, 156, 48, 154, 154, 26, - 48, 48, 48, 156, 27, 48, 154, 6, 9, 48, + 42, 42, 73, 97, 73, 156, 48, 154, 154, 128, + 48, 48, 48, 156, 26, 48, 154, 27, 9, 48, 48, 48, 48, 48, 48, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -941,94 +944,97 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 23, 23, 23, 23, 15, 66, 66, 49, 65, 131, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 108, 108, 25, 25, 25, 25, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 13, - 22, 13, 107, 107, 107, 107, 97, 107, 76, 76, - 35, 43, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 50, 15, 15, 50, 35, 50, 15, 35, - 50, 50, 50, 188, 188, 15, 15, 15, 15, 76, - 76, 76, 76, 76, 76, 76, 76, 45, 76, 76, - 12, 188, 178, 22, 86, 86, 76, 86, 86, 86, - 73, 73, 73, 73, 59, 59, 59, 59, 188, 188, - 73, 73, 73, 7, 73, 73, 83, 7, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 7, - 185, 12, 7, 12, 73, 24, 24, 24, 24, 73, + 108, 108, 108, 108, 108, 108, 108, 108, 108, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 6, + 35, 83, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 14, 15, 15, 43, 35, 84, 15, 35, + 188, 188, 14, 14, 84, 15, 15, 15, 15, 45, + 8, 8, 59, 59, 59, 59, 14, 14, 188, 178, + 14, 8, 174, 14, 97, 97, 8, 8, 83, 8, + 73, 73, 73, 73, 185, 14, 188, 188, 14, 14, + 73, 73, 73, 187, 73, 73, 174, 174, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 103, + 79, 79, 5, 5, 73, 79, 79, 79, 79, 73, 73, 73, 73, 145, 145, 73, 73, 73, 9, 9, - 9, 9, 16, 16, 16, 16, 174, 46, 160, 46, - 160, 14, 187, 83, 73, 16, 160, 62, 73, 5, - 5, 14, 14, 182, 182, 182, 19, 103, 19, 19, - 174, 174, 93, 93, 93, 14, 14, 19, 16, 14, - 9, 14, 85, 85, 85, 9, 5, 5, 5, 5, - 5, 5, 14, 119, 119, 104, 14, 14, 120, 120, - 19, 16, 16, 22, 64, 19, 19, 19, 19, 176, - 176, 19, 19, 19, 155, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 177, 177, 175, 175, 184, - 184, 177, 177, 177, 177, 177, 177, 177, 177, 177, - 177, 107, 107, 2, 2, 14, 115, 17, 8, 8, - 17, 17, 113, 23, 23, 121, 23, 23, 131, 8, - 131, 131, 17, 117, 8, 8, 14, 8, 84, 131, - 17, 29, 17, 17, 39, 84, 9, 9, 17, 18, - 28, 9, 92, 9, 37, 9, 9, 97, 97, 166, - 17, 110, 80, 131, 131, 131, 131, 14, 9, 9, - 9, 9, 130, 89, 89, 99, 9, 89, 89, 9, - 9, 89, 89, 89, 157, 179, 179, 41, 96, 133, + 9, 9, 76, 76, 22, 13, 14, 13, 62, 5, + 5, 5, 5, 5, 5, 104, 73, 160, 64, 160, + 73, 24, 24, 24, 24, 160, 9, 14, 9, 182, + 182, 182, 76, 76, 76, 76, 76, 76, 76, 76, + 155, 76, 76, 19, 115, 19, 19, 86, 86, 76, + 86, 86, 86, 113, 19, 176, 176, 117, 14, 22, + 121, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 89, 89, 119, 119, 89, 89, 19, 29, 89, + 89, 89, 19, 19, 19, 19, 120, 120, 19, 19, + 19, 177, 177, 93, 93, 93, 18, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 46, 17, 46, + 37, 17, 17, 23, 23, 39, 23, 23, 131, 92, + 131, 131, 14, 17, 28, 107, 107, 107, 107, 131, + 107, 17, 80, 17, 17, 166, 9, 9, 110, 17, + 99, 9, 41, 9, 157, 9, 9, 130, 7, 175, + 175, 17, 7, 131, 131, 131, 131, 133, 9, 9, + 9, 9, 184, 184, 7, 148, 9, 7, 96, 9, + 9, 2, 2, 114, -1, 179, 179, 22, 12, -1, 131, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 162, 162, 148, 9, 114, -1, 162, -1, 162, + 179, 162, 162, 20, 9, -1, -1, 162, -1, 162, 162, 162, 162, 162, 162, 162, 162, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 20, -1, - 23, 14, 131, -1, 82, 82, 131, 131, 131, 82, + 23, 23, 23, 23, 23, 23, 23, 23, 5, 5, + 23, 12, 131, 12, 82, 82, 131, 131, 131, 82, -1, 82, -1, 82, 82, 82, -1, 82, -1, -1, - 82, -1, -1, -1, -1, 82, 24, 24, -1, 24, - 24, -1, -1, -1, -1, 5, 5, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 118, -1, -1, - -1, -1, -1, 20, 20, -1, 20, -1, 118, -1, - -1, -1, 20, -1, -1, -1, 118, 118, -1, 20, - -1, 118, 118, 118, 118, -1, -1, -1, -1, 79, - 79, 20, 20, 20, 79, 79, 79, 79 + 82, 85, 85, 85, -1, 82, -1, -1, 20, 20, + -1, 20, 16, 16, 16, 16, -1, 20, 50, -1, + -1, 50, -1, 50, 20, 16, 50, 50, 50, -1, + 118, -1, -1, -1, -1, -1, 20, 20, 20, -1, + -1, 118, 24, 24, -1, 24, 24, -1, 16, 118, + 118, -1, -1, -1, 118, 118, 118, 118, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 16, 16, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 107, 107 ); protected array $gotoBase = array( - 0, 0, -302, 0, 0, 328, 7, 266, 410, 8, - 0, 0, -47, -139, 23, -183, -142, -49, 139, 71, - 134, 0, -78, 159, 292, 182, 5, 10, 112, 144, - 0, 0, 0, 0, 0, -162, 0, 114, 0, 120, - 0, 44, -1, 188, 0, 221, -422, 0, -708, 151, - 210, 0, 0, 0, 0, 0, -15, 0, 0, 219, - 0, 0, 285, 0, 136, 156, -70, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -137, 0, 0, 200, - 115, 208, 40, -2, -35, -130, -467, 0, 0, 194, - 0, 0, 122, 37, 0, 0, 43, -280, 0, 67, - 0, 0, 0, 302, 322, 0, 0, 174, -54, 0, - 90, 0, 0, 145, -7, 141, 0, 150, 311, 84, - 83, 135, 0, 0, 0, 0, 0, 0, 1, 0, - 97, 163, 0, 45, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 30, 0, 0, 57, 0, - 0, 0, 0, 0, -27, 140, -263, 42, 0, 0, - -180, 0, 264, 0, 0, 0, 89, 0, 0, 0, - 0, 0, 0, 0, 18, 75, 142, 158, 223, 248, - 0, 0, 32, 0, 26, 260, 0, 291, -75, 0, + 0, 0, -234, 0, 0, 291, 199, 451, 232, 8, + 0, 0, 191, -25, -76, -183, 108, -48, 96, 88, + 109, 0, 36, 159, 328, 182, 10, 13, 94, 91, + 0, 0, 0, 0, 0, -162, 0, 78, 0, 101, + 0, 9, -1, 202, 0, 213, -322, 0, -708, 151, + 556, 0, 0, 0, 0, 0, -15, 0, 0, 197, + 0, 0, 276, 0, 90, 156, -70, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -34, 0, 0, -119, + 112, -160, 40, -67, -246, 69, -364, 0, 0, 102, + 0, 0, 97, 98, 0, 0, 33, -483, 0, 42, + 0, 0, 0, 254, 282, 0, 0, 407, -54, 0, + 77, 0, 0, 86, -29, 79, 0, 84, 314, 104, + 111, 80, 0, 0, 0, 0, 0, 0, 7, 0, + 82, 163, 0, 23, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 30, 0, 0, 29, 0, + 0, 0, 0, 0, -27, 106, -263, 12, 0, 0, + -171, 0, 264, 0, 0, 0, 75, 0, 0, 0, + 0, 0, 0, 0, -46, 137, 128, 164, 220, 248, + 0, 0, 38, 0, 99, 234, 0, 242, -78, 0, 0 ); protected array $gotoDefault = array( -32768, 516, 743, 4, 744, 938, 819, 828, 580, 534, - 710, 349, 629, 424, 1326, 914, 1141, 599, 847, 1268, - 1274, 459, 850, 331, 733, 926, 897, 898, 401, 388, + 710, 349, 629, 424, 1327, 914, 1142, 599, 847, 1269, + 1275, 459, 850, 333, 733, 926, 897, 898, 401, 388, 863, 399, 653, 630, 497, 882, 455, 874, 489, 877, 454, 886, 163, 420, 514, 890, 3, 893, 562, 924, - 976, 389, 901, 390, 681, 903, 583, 905, 906, 396, - 402, 403, 1146, 591, 626, 918, 255, 585, 919, 387, - 920, 928, 392, 394, 691, 469, 508, 502, 413, 1108, + 977, 389, 901, 390, 681, 903, 583, 905, 906, 396, + 402, 403, 1147, 591, 626, 918, 255, 585, 919, 387, + 920, 928, 392, 394, 691, 469, 508, 502, 413, 1109, 586, 613, 650, 448, 476, 624, 636, 623, 483, 436, - 418, 330, 960, 968, 490, 467, 982, 351, 990, 741, - 1154, 644, 492, 998, 645, 1005, 1008, 535, 536, 481, - 1020, 266, 1023, 493, 1032, 23, 671, 1037, 1038, 672, - 646, 1060, 647, 673, 648, 1062, 466, 581, 1070, 456, - 1078, 1314, 457, 1082, 264, 1085, 277, 419, 437, 1091, - 1092, 9, 1098, 701, 702, 19, 274, 513, 1126, 692, - -32768,-32768,-32768,-32768, 453, 1153, 452, 1223, 1225, 563, - 494, 1243, 294, 1246, 684, 509, 1251, 449, 1317, 450, - 537, 477, 316, 538, 1361, 308, 334, 313, 554, 295, - 335, 539, 478, 1323, 1331, 332, 31, 1351, 1362, 596, + 418, 332, 961, 969, 490, 467, 983, 351, 991, 741, + 1155, 644, 492, 999, 645, 1006, 1009, 535, 536, 481, + 1021, 266, 1024, 493, 1033, 23, 671, 1038, 1039, 672, + 646, 1061, 647, 673, 648, 1063, 466, 581, 1071, 456, + 1079, 1315, 457, 1083, 264, 1086, 277, 419, 437, 1092, + 1093, 9, 1099, 701, 702, 19, 274, 513, 1127, 692, + -32768,-32768,-32768,-32768, 453, 1154, 452, 1224, 1226, 563, + 494, 1244, 294, 1247, 684, 509, 1252, 449, 1318, 450, + 537, 477, 316, 538, 1362, 308, 336, 313, 554, 295, + 337, 539, 478, 1324, 1332, 334, 31, 1352, 1363, 596, 618 ); @@ -1053,27 +1059,27 @@ class Php7 extends \PhpParser\ParserAbstract 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 25, 25, 50, 69, 69, 72, 72, 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, 78, - 78, 79, 79, 80, 80, 26, 26, 27, 27, 27, - 27, 27, 88, 88, 90, 90, 83, 83, 91, 91, - 92, 92, 92, 84, 84, 87, 87, 85, 85, 93, - 94, 94, 57, 57, 65, 65, 68, 68, 68, 67, - 95, 95, 96, 58, 58, 58, 58, 97, 97, 98, - 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, - 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, - 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, - 111, 111, 112, 112, 112, 112, 112, 112, 112, 110, - 110, 110, 115, 115, 115, 115, 89, 89, 118, 118, - 118, 119, 119, 116, 116, 120, 120, 122, 122, 123, - 123, 117, 124, 124, 121, 125, 125, 125, 125, 113, - 113, 82, 82, 82, 20, 20, 20, 127, 126, 126, - 128, 128, 128, 128, 60, 129, 129, 130, 61, 132, - 132, 133, 133, 134, 134, 86, 135, 135, 135, 135, - 135, 135, 135, 140, 140, 141, 141, 142, 142, 142, - 142, 142, 143, 144, 144, 139, 139, 136, 136, 138, - 138, 146, 146, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 137, 147, 147, 149, 148, 148, 150, - 150, 114, 151, 151, 153, 153, 153, 152, 152, 62, - 104, 154, 154, 56, 56, 42, 42, 42, 42, 42, + 78, 79, 79, 80, 80, 80, 26, 26, 27, 27, + 27, 27, 27, 88, 88, 90, 90, 83, 83, 91, + 91, 92, 92, 92, 84, 84, 87, 87, 85, 85, + 93, 94, 94, 57, 57, 65, 65, 68, 68, 68, + 67, 95, 95, 96, 58, 58, 58, 58, 97, 97, + 98, 98, 99, 99, 100, 101, 101, 102, 102, 103, + 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, + 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, + 109, 111, 111, 112, 112, 112, 112, 112, 112, 112, + 110, 110, 110, 115, 115, 115, 115, 89, 89, 118, + 118, 118, 119, 119, 116, 116, 120, 120, 122, 122, + 123, 123, 117, 124, 124, 121, 125, 125, 125, 125, + 113, 113, 82, 82, 82, 20, 20, 20, 127, 126, + 126, 128, 128, 128, 128, 60, 129, 129, 130, 61, + 132, 132, 133, 133, 134, 134, 86, 135, 135, 135, + 135, 135, 135, 135, 140, 140, 141, 141, 142, 142, + 142, 142, 142, 143, 144, 144, 139, 139, 136, 136, + 138, 138, 146, 146, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 137, 147, 147, 149, 148, 148, + 150, 150, 114, 151, 151, 153, 153, 153, 152, 152, + 62, 104, 154, 154, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1082,21 +1088,21 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 161, - 162, 162, 163, 155, 155, 160, 160, 164, 165, 165, - 166, 167, 168, 168, 168, 168, 19, 19, 73, 73, - 73, 73, 156, 156, 156, 156, 170, 170, 159, 159, - 159, 157, 157, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 177, 177, 177, 108, 179, 179, 179, - 179, 158, 158, 158, 158, 158, 158, 158, 158, 59, - 59, 173, 173, 173, 173, 173, 180, 180, 169, 169, - 169, 169, 181, 181, 181, 181, 181, 181, 74, 74, - 66, 66, 66, 66, 131, 131, 131, 131, 184, 183, - 172, 172, 172, 172, 172, 172, 172, 171, 171, 171, - 182, 182, 182, 182, 107, 178, 186, 186, 185, 185, - 187, 187, 187, 187, 187, 187, 187, 187, 175, 175, - 175, 175, 174, 189, 188, 188, 188, 188, 188, 188, - 188, 188, 190, 190, 190, 190 + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 161, 162, 162, 163, 155, 155, 160, 160, 164, 165, + 165, 166, 167, 168, 168, 168, 168, 19, 19, 73, + 73, 73, 73, 156, 156, 156, 156, 170, 170, 159, + 159, 159, 157, 157, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 177, 177, 177, 108, 179, 179, + 179, 179, 158, 158, 158, 158, 158, 158, 158, 158, + 59, 59, 173, 173, 173, 173, 173, 180, 180, 169, + 169, 169, 169, 181, 181, 181, 181, 181, 181, 74, + 74, 66, 66, 66, 66, 131, 131, 131, 131, 184, + 183, 172, 172, 172, 172, 172, 172, 172, 171, 171, + 171, 182, 182, 182, 182, 107, 178, 186, 186, 185, + 185, 187, 187, 187, 187, 187, 187, 187, 187, 175, + 175, 175, 175, 174, 189, 188, 188, 188, 188, 188, + 188, 188, 188, 190, 190, 190, 190 ); protected array $ruleToLength = array( @@ -1120,50 +1126,50 @@ class Php7 extends \PhpParser\ParserAbstract 3, 1, 2, 5, 7, 9, 6, 5, 6, 3, 2, 1, 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, - 1, 3, 1, 1, 1, 8, 9, 7, 8, 7, - 6, 8, 0, 2, 0, 2, 1, 2, 1, 2, - 1, 1, 1, 0, 2, 0, 2, 0, 2, 2, - 1, 3, 1, 4, 1, 4, 1, 1, 4, 2, - 1, 3, 3, 3, 4, 4, 5, 0, 2, 4, - 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, - 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, - 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, - 0, 2, 1, 1, 1, 1, 1, 1, 1, 7, - 9, 6, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, - 3, 1, 3, 3, 1, 1, 2, 1, 1, 0, - 1, 0, 2, 2, 2, 4, 3, 1, 1, 3, - 1, 2, 2, 3, 2, 3, 1, 1, 2, 3, - 1, 1, 3, 2, 0, 1, 5, 5, 6, 10, - 3, 5, 1, 1, 3, 0, 2, 4, 5, 4, - 4, 4, 3, 1, 1, 1, 1, 1, 1, 0, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 1, 3, 1, 1, 3, 0, - 2, 0, 5, 8, 1, 3, 3, 0, 2, 2, - 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, - 4, 1, 1, 2, 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, 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, - 2, 8, 9, 8, 9, 9, 10, 9, 10, 8, - 3, 2, 2, 1, 1, 0, 4, 2, 1, 3, - 2, 1, 2, 2, 2, 4, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 1, 1, 0, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 5, 3, 3, 4, 1, 1, - 3, 1, 1, 1, 1, 1, 3, 2, 3, 0, - 1, 1, 3, 1, 1, 1, 1, 1, 1, 3, - 1, 1, 1, 4, 4, 1, 4, 4, 0, 1, - 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, - 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, - 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, - 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, - 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, - 6, 3, 1, 1, 2, 1 + 1, 3, 1, 1, 1, 1, 8, 9, 7, 8, + 7, 6, 8, 0, 2, 0, 2, 1, 2, 1, + 2, 1, 1, 1, 0, 2, 0, 2, 0, 2, + 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, + 2, 1, 3, 3, 3, 4, 4, 5, 0, 2, + 4, 3, 1, 1, 7, 0, 2, 1, 3, 3, + 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, + 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, + 3, 0, 2, 1, 1, 1, 1, 1, 1, 1, + 7, 9, 6, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, + 3, 3, 1, 3, 3, 1, 1, 2, 1, 1, + 0, 1, 0, 2, 2, 2, 4, 3, 1, 1, + 3, 1, 2, 2, 3, 2, 3, 1, 1, 2, + 3, 1, 1, 3, 2, 0, 1, 5, 5, 6, + 10, 3, 5, 1, 1, 3, 0, 2, 4, 5, + 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, + 0, 2, 0, 5, 8, 1, 3, 3, 0, 2, + 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, + 4, 4, 1, 1, 2, 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, 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, 2, 8, 9, 8, 9, 9, 10, 9, 10, + 8, 3, 2, 2, 1, 1, 0, 4, 2, 1, + 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, + 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 5, 3, 3, 4, 1, + 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, + 0, 1, 1, 3, 1, 1, 1, 1, 1, 1, + 3, 1, 1, 1, 4, 4, 1, 4, 4, 0, + 1, 1, 1, 3, 3, 1, 4, 2, 2, 1, + 3, 1, 4, 4, 3, 3, 3, 3, 1, 3, + 1, 1, 3, 1, 1, 4, 1, 1, 1, 3, + 1, 1, 2, 1, 3, 4, 3, 2, 0, 2, + 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, + 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1597,873 +1603,873 @@ protected function initReduceCallbacks(): void { $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 205 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 206 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, 207 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 208 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(7-2)); }, - 208 => static function ($self, $stackPos) { + 209 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(8-3)); }, - 209 => static function ($self, $stackPos) { + 210 => static function ($self, $stackPos) { $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkInterface($self->semValue, $stackPos-(7-3)); }, - 210 => static function ($self, $stackPos) { + 211 => static function ($self, $stackPos) { $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 211 => static function ($self, $stackPos) { + 212 => static function ($self, $stackPos) { $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkEnum($self->semValue, $stackPos-(8-3)); }, - 212 => static function ($self, $stackPos) { + 213 => static function ($self, $stackPos) { $self->semValue = null; }, - 213 => static function ($self, $stackPos) { + 214 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 214 => static function ($self, $stackPos) { + 215 => static function ($self, $stackPos) { $self->semValue = null; }, - 215 => static function ($self, $stackPos) { + 216 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 216 => static function ($self, $stackPos) { + 217 => static function ($self, $stackPos) { $self->semValue = 0; }, - 217 => null, 218 => null, - 219 => static function ($self, $stackPos) { + 219 => null, + 220 => static function ($self, $stackPos) { $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 220 => static function ($self, $stackPos) { + 221 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 221 => static function ($self, $stackPos) { + 222 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 222 => static function ($self, $stackPos) { + 223 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 223 => static function ($self, $stackPos) { + 224 => static function ($self, $stackPos) { $self->semValue = null; }, - 224 => static function ($self, $stackPos) { + 225 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 225 => static function ($self, $stackPos) { + 226 => static function ($self, $stackPos) { $self->semValue = array(); }, - 226 => static function ($self, $stackPos) { + 227 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 227 => static function ($self, $stackPos) { + 228 => static function ($self, $stackPos) { $self->semValue = array(); }, - 228 => static function ($self, $stackPos) { + 229 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 229 => null, - 230 => static function ($self, $stackPos) { + 230 => null, + 231 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 231 => static function ($self, $stackPos) { + 232 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 232 => null, - 233 => static function ($self, $stackPos) { + 233 => null, + 234 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 234 => null, - 235 => static function ($self, $stackPos) { + 235 => null, + 236 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 236 => static function ($self, $stackPos) { + 237 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 237 => static function ($self, $stackPos) { + 238 => static function ($self, $stackPos) { $self->semValue = null; }, - 238 => static function ($self, $stackPos) { + 239 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 239 => null, - 240 => static function ($self, $stackPos) { + 240 => null, + 241 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 241 => static function ($self, $stackPos) { + 242 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 242 => static function ($self, $stackPos) { + 243 => static function ($self, $stackPos) { $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 243 => static function ($self, $stackPos) { + 244 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 244 => static function ($self, $stackPos) { + 245 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 245 => static function ($self, $stackPos) { + 246 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 246 => static function ($self, $stackPos) { + 247 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(5-3)]; }, - 247 => static function ($self, $stackPos) { + 248 => static function ($self, $stackPos) { $self->semValue = array(); }, - 248 => static function ($self, $stackPos) { + 249 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 249 => static function ($self, $stackPos) { + 250 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 250 => static function ($self, $stackPos) { + 251 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 251 => null, 252 => null, - 253 => static function ($self, $stackPos) { + 253 => null, + 254 => static function ($self, $stackPos) { $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 254 => static function ($self, $stackPos) { + 255 => static function ($self, $stackPos) { $self->semValue = []; }, - 255 => null, - 256 => static function ($self, $stackPos) { + 256 => null, + 257 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 257 => static function ($self, $stackPos) { + 258 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 258 => static function ($self, $stackPos) { + 259 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 259 => static function ($self, $stackPos) { + 260 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 260 => static function ($self, $stackPos) { + 261 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 261 => static function ($self, $stackPos) { + 262 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 262 => static function ($self, $stackPos) { + 263 => static function ($self, $stackPos) { $self->semValue = array(); }, - 263 => static function ($self, $stackPos) { + 264 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 264 => static function ($self, $stackPos) { + 265 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 265 => static function ($self, $stackPos) { + 266 => static function ($self, $stackPos) { $self->semValue = array(); }, - 266 => static function ($self, $stackPos) { + 267 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 267 => static function ($self, $stackPos) { + 268 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 268 => static function ($self, $stackPos) { + 269 => static function ($self, $stackPos) { $self->semValue = null; }, - 269 => static function ($self, $stackPos) { + 270 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 270 => static function ($self, $stackPos) { + 271 => static function ($self, $stackPos) { $self->semValue = null; }, - 271 => static function ($self, $stackPos) { + 272 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 272 => static function ($self, $stackPos) { + 273 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 273 => static function ($self, $stackPos) { + 274 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-2)], true); }, - 274 => static function ($self, $stackPos) { + 275 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 275 => static function ($self, $stackPos) { + 276 => static function ($self, $stackPos) { $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); }, - 276 => null, - 277 => static function ($self, $stackPos) { + 277 => null, + 278 => static function ($self, $stackPos) { $self->semValue = array(); }, - 278 => static function ($self, $stackPos) { + 279 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 279 => static function ($self, $stackPos) { + 280 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 280 => static function ($self, $stackPos) { + 281 => static function ($self, $stackPos) { $self->semValue = 0; }, - 281 => static function ($self, $stackPos) { + 282 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 282 => static function ($self, $stackPos) { + 283 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 283 => static function ($self, $stackPos) { + 284 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 284 => static function ($self, $stackPos) { + 285 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 285 => static function ($self, $stackPos) { + 286 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 286 => static function ($self, $stackPos) { + 287 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 287 => static function ($self, $stackPos) { + 288 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 288 => static function ($self, $stackPos) { + 289 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 289 => static function ($self, $stackPos) { + 290 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); }, - 290 => static function ($self, $stackPos) { + 291 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); }, - 291 => static function ($self, $stackPos) { + 292 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, - 292 => null, - 293 => static function ($self, $stackPos) { + 293 => null, + 294 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 294 => static function ($self, $stackPos) { + 295 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 295 => null, 296 => null, - 297 => static function ($self, $stackPos) { + 297 => null, + 298 => static function ($self, $stackPos) { $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 298 => static function ($self, $stackPos) { + 299 => static function ($self, $stackPos) { $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 299 => static function ($self, $stackPos) { + 300 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 300 => static function ($self, $stackPos) { + 301 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 301 => null, - 302 => static function ($self, $stackPos) { + 302 => null, + 303 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 303 => static function ($self, $stackPos) { + 304 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 304 => static function ($self, $stackPos) { + 305 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 305 => null, - 306 => static function ($self, $stackPos) { + 306 => null, + 307 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 307 => static function ($self, $stackPos) { + 308 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 308 => static function ($self, $stackPos) { + 309 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 309 => static function ($self, $stackPos) { + 310 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 310 => static function ($self, $stackPos) { + 311 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 311 => static function ($self, $stackPos) { + 312 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 312 => static function ($self, $stackPos) { + 313 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 313 => static function ($self, $stackPos) { + 314 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 314 => static function ($self, $stackPos) { + 315 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 315 => null, - 316 => static function ($self, $stackPos) { + 316 => null, + 317 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 317 => static function ($self, $stackPos) { + 318 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 318 => null, - 319 => static function ($self, $stackPos) { + 319 => null, + 320 => static function ($self, $stackPos) { $self->semValue = null; }, - 320 => null, - 321 => static function ($self, $stackPos) { + 321 => null, + 322 => static function ($self, $stackPos) { $self->semValue = null; }, - 322 => static function ($self, $stackPos) { + 323 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 323 => static function ($self, $stackPos) { + 324 => static function ($self, $stackPos) { $self->semValue = null; }, - 324 => static function ($self, $stackPos) { + 325 => static function ($self, $stackPos) { $self->semValue = array(); }, - 325 => static function ($self, $stackPos) { + 326 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 326 => static function ($self, $stackPos) { + 327 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 327 => static function ($self, $stackPos) { + 328 => static function ($self, $stackPos) { $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 328 => static function ($self, $stackPos) { + 329 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 329 => static function ($self, $stackPos) { + 330 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 330 => static function ($self, $stackPos) { + 331 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 331 => static function ($self, $stackPos) { + 332 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 332 => static function ($self, $stackPos) { + 333 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 333 => static function ($self, $stackPos) { + 334 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, - 334 => null, - 335 => static function ($self, $stackPos) { + 335 => null, + 336 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 336 => static function ($self, $stackPos) { + 337 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 337 => null, 338 => null, - 339 => static function ($self, $stackPos) { + 339 => null, + 340 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 340 => static function ($self, $stackPos) { + 341 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 341 => static function ($self, $stackPos) { + 342 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 342 => static function ($self, $stackPos) { + 343 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 343 => static function ($self, $stackPos) { + 344 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 344 => static function ($self, $stackPos) { + 345 => static function ($self, $stackPos) { $self->semValue = array(); }, - 345 => static function ($self, $stackPos) { + 346 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 346 => static function ($self, $stackPos) { + 347 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 347 => static function ($self, $stackPos) { + 348 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 348 => static function ($self, $stackPos) { + 349 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 349 => static function ($self, $stackPos) { + 350 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 350 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, 351 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 352 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 353 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = null; /* will be skipped */ }, 354 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = array(); }, 355 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 356 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + $self->semValue = array(); }, 357 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 358 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 359 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 360 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 361 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 362 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 363 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 363 => null, - 364 => static function ($self, $stackPos) { + 364 => null, + 365 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 365 => static function ($self, $stackPos) { + 366 => static function ($self, $stackPos) { $self->semValue = null; }, - 366 => null, 367 => null, - 368 => static function ($self, $stackPos) { + 368 => null, + 369 => static function ($self, $stackPos) { $self->semValue = 0; }, - 369 => static function ($self, $stackPos) { + 370 => static function ($self, $stackPos) { $self->semValue = 0; }, - 370 => null, 371 => null, - 372 => static function ($self, $stackPos) { + 372 => null, + 373 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 373 => static function ($self, $stackPos) { + 374 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 374 => static function ($self, $stackPos) { + 375 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 375 => static function ($self, $stackPos) { + 376 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 376 => static function ($self, $stackPos) { + 377 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 377 => static function ($self, $stackPos) { + 378 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 378 => static function ($self, $stackPos) { + 379 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 379 => static function ($self, $stackPos) { + 380 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 380 => static function ($self, $stackPos) { + 381 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 381 => static function ($self, $stackPos) { + 382 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 382 => static function ($self, $stackPos) { + 383 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 383 => null, - 384 => static function ($self, $stackPos) { + 384 => null, + 385 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 385 => static function ($self, $stackPos) { + 386 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 386 => static function ($self, $stackPos) { + 387 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 387 => static function ($self, $stackPos) { + 388 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 388 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 389 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semValue = []; }, - 390 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 391 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semValue = []; }, - 392 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 393 => static function ($self, $stackPos) { + 394 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 394 => static function ($self, $stackPos) { - $self->semValue = null; - }, 395 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = null; }, 396 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 397 => static function ($self, $stackPos) { - $self->semValue = 0; + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 398 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 399 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 399 => null, 400 => null, - 401 => static function ($self, $stackPos) { + 401 => null, + 402 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 402 => static function ($self, $stackPos) { + 403 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 403 => static function ($self, $stackPos) { + 404 => static function ($self, $stackPos) { $self->semValue = array(); }, - 404 => null, 405 => null, - 406 => static function ($self, $stackPos) { + 406 => null, + 407 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 407 => static function ($self, $stackPos) { + 408 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 408 => static function ($self, $stackPos) { + 409 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 409 => static function ($self, $stackPos) { + 410 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 410 => static function ($self, $stackPos) { + 411 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 411 => null, 412 => null, - 413 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, + 413 => null, 414 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 415 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 416 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 417 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 418 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 419 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 420 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 421 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 422 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 423 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 424 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 425 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 426 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 438 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 439 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 440 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 441 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 442 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 450 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 452 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 463 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 464 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 465 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 466 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 467 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 475 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 476 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 476 => static function ($self, $stackPos) { + 477 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 477 => static function ($self, $stackPos) { + 478 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 478 => static function ($self, $stackPos) { + 479 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 479 => static function ($self, $stackPos) { + 480 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 480 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 481 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 483 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 483 => null, - 484 => static function ($self, $stackPos) { + 484 => null, + 485 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 485 => static function ($self, $stackPos) { + 486 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 486 => static function ($self, $stackPos) { + 487 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 487 => static function ($self, $stackPos) { + 488 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 488 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 489 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 490 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 500 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 503 => null, 504 => null, - 505 => static function ($self, $stackPos) { + 505 => null, + 506 => static function ($self, $stackPos) { $self->semValue = array(); }, - 506 => static function ($self, $stackPos) { + 507 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 507 => null, - 508 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, + 508 => null, 509 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 510 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 511 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 512 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 513 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2472,310 +2478,313 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 515 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 516 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 517 => null, - 518 => static function ($self, $stackPos) { + 517 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 518 => null, 519 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 520 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 521 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 522 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 522 => null, 523 => null, - 524 => static function ($self, $stackPos) { + 524 => null, + 525 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 525 => static function ($self, $stackPos) { + 526 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 526 => null, 527 => null, - 528 => static function ($self, $stackPos) { + 528 => null, + 529 => static function ($self, $stackPos) { $self->semValue = array(); }, - 529 => static function ($self, $stackPos) { + 530 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 530 => static function ($self, $stackPos) { + 531 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 531 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { $self->semValue = array(); }, - 532 => null, - 533 => static function ($self, $stackPos) { + 533 => null, + 534 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 534 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 535 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 536 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 537 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 540 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 541 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 542 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 543 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 544 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 545 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 546 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 547 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 548 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 549 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 550 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 551 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 552 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 553 => null, 554 => null, 555 => null, - 556 => static function ($self, $stackPos) { + 556 => null, + 557 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 557 => static function ($self, $stackPos) { + 558 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 558 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 559 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $self->semValue = null; }, - 560 => null, 561 => null, - 562 => static function ($self, $stackPos) { + 562 => null, + 563 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 563 => null, 564 => null, 565 => null, 566 => null, 567 => null, 568 => null, - 569 => static function ($self, $stackPos) { + 569 => null, + 570 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 570 => null, 571 => null, 572 => null, - 573 => static function ($self, $stackPos) { + 573 => null, + 574 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 574 => static function ($self, $stackPos) { + 575 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 575 => null, - 576 => static function ($self, $stackPos) { + 576 => null, + 577 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 577 => static function ($self, $stackPos) { + 578 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 578 => static function ($self, $stackPos) { + 579 => static function ($self, $stackPos) { $self->semValue = null; }, - 579 => null, 580 => null, 581 => null, - 582 => static function ($self, $stackPos) { + 582 => null, + 583 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 583 => static function ($self, $stackPos) { + 584 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 584 => null, - 585 => static function ($self, $stackPos) { + 585 => null, + 586 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 586 => static function ($self, $stackPos) { + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 587 => static function ($self, $stackPos) { + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 588 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 589 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 590 => null, - 591 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, + 591 => null, 592 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 593 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 594 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 595 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 596 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 597 => null, - 598 => static function ($self, $stackPos) { + 597 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 598 => null, + 599 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 599 => null, 600 => null, - 601 => static function ($self, $stackPos) { + 601 => null, + 602 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 602 => null, - 603 => static function ($self, $stackPos) { + 603 => null, + 604 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 604 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 605 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 606 => null, - 607 => static function ($self, $stackPos) { + 607 => null, + 608 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 608 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 609 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 610 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 611 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 612 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 613 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 615 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 616 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 617 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 618 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 619 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 620 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 621 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 622 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 623 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 624 => null, - 625 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 624 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 625 => null, 626 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 627 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 628 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 629 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 630 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 631 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 632 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 633 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 634 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 635 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 635 => null, + 636 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 628beb5f34..e1aa4b1f3e 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -165,7 +165,7 @@ class Php8 extends \PhpParser\ParserAbstract protected int $tokenToSymbolMapSize = 400; protected int $actionTableSize = 1289; - protected int $gotoTableSize = 641; + protected int $gotoTableSize = 608; protected int $invalidSymbol = 172; protected int $errorSymbol = 1; @@ -395,134 +395,134 @@ class Php8 extends \PhpParser\ParserAbstract protected array $action = array( 126, 127, 128, 570, 129, 130, 955, 765, 766, 767, - 131, 38, 849, -85,-32766, 1375,-32766,-32766,-32766, 0, - 840, 1133, 1134, 1135, 1129, 1128, 1127, 1136, 1130, 1131, - 1132,-32766,-32766,-32766, 851, 759, 758,-32766,-32766,-32766, + 131, 38, 849, -85,-32766, 1376,-32766,-32766,-32766, 0, + 840, 1134, 1135, 1136, 1130, 1129, 1128, 1137, 1131, 1132, + 1133,-32766,-32766,-32766, 851, 759, 758,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1004,-32766, 1044, -569, 768, 1133, 1134, 1135, 1129, - 1128, 1127, 1136, 1130, 1131, 1132, 388, 387, 842, 263, - 132, 389, 772, 773, 774, 775, 430,-32766, 431, -85, - 957, 36, 246, 47, 291, 829, 776, 777, 778, 779, + -32767, 1005,-32766, 1045, -570, 768, 1134, 1135, 1136, 1130, + 1129, 1128, 1137, 1131, 1132, 1133, 388, 387, 842, 263, + 132, 389, 772, 773, 774, 775, 430, 845, 431, -85, + 2, 36, 246, 47, 291, 829, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 805, 571, 806, 807, - 808, 809, 797, 798, 343, 344, 800, 801, 786, 787, + 808, 809, 797, 798, 344, 345, 800, 801, 786, 787, 788, 790, 791, 792, 359, 832, 833, 834, 835, 836, - 572, -569, -569, 360, 793, 794, 573, 574, -331, 817, - 815, 816, 828, 812, 813, 2, -194, 575, 576, 811, - 577, 578, 579, 580, 322, 581, 582, 876, 844, 877, - 297, 298, 814, 583, 584, 722, 133, 236, 126, 127, - 128, 570, 129, 130, 1077, 765, 766, 767, 131, 38, - -32766, 26, 735, 1037, 1036, 1035, 1041, 1038, 1039, 1040, - -32766,-32766,-32766, 1005, 104, 105, 106, 107, 108, 35, - 275, 957,-32766, 759, 758, 1053, 850,-32766,-32766,-32766, + 572, -570, -570, -332, 793, 794, 573, 574, 236, 817, + 815, 816, 828, 812, 813, 26, -194, 575, 576, 811, + 577, 578, 579, 580, 323, 581, 582, 876, 844, 877, + 297, 298, 814, 583, 584, 722, 133, 846, 126, 127, + 128, 570, 129, 130, 1078, 765, 766, 767, 131, 38, + -32766, 35, 735, 1038, 1037, 1036, 1042, 1039, 1040, 1041, + -32766,-32766,-32766, 1006, 104, 105, 106, 107, 108, -372, + 275, -372,-32766, 759, 758, 1054, 850,-32766,-32766,-32766, 848,-32766, 109,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - 148, 476, 477, 768,-32766,-32766,-32766, 1053,-32766, 290, - -32766,-32766,-32766,-32766,-32766, 616, 134, 263, 132, 389, - 772, 773, 774, 775, 365,-32766, 431,-32766,-32766,-32766, - -32766, 290, 143, 829, 776, 777, 778, 779, 780, 781, + 134, 476, 477, 768,-32766,-32766,-32766, 1054,-32766, 290, + -32766,-32766,-32766,-32766,-32766, 616, 143, 263, 132, 389, + 772, 773, 774, 775, 249,-32766, 431,-32766,-32766,-32766, + -32766, 290, 307, 829, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 805, 571, 806, 807, 808, 809, - 797, 798, 343, 344, 800, 801, 786, 787, 788, 790, - 791, 792, 359, 832, 833, 834, 835, 836, 572,-32766, - -32766,-32766, 793, 794, 573, 574, -331, 817, 815, 816, - 828, 812, 813, 1300, -194, 575, 576, 811, 577, 578, - 579, 580, 845, 581, 582, 149, 82, 83, 84, -272, - 814, 583, 584, 249, 146, 789, 760, 761, 762, 763, - 764, 235, 765, 766, 767, 802, 803, 37, 307, 85, + 797, 798, 344, 345, 800, 801, 786, 787, 788, 790, + 791, 792, 359, 832, 833, 834, 835, 836, 572, 958, + -273, -332, 793, 794, 573, 574, 840, 817, 815, 816, + 828, 812, 813, 1301, -194, 575, 576, 811, 577, 578, + 579, 580, 566, 581, 582, 1108, 82, 83, 84, 748, + 814, 583, 584, 309, 146, 789, 760, 761, 762, 763, + 764, 235, 765, 766, 767, 802, 803, 37, 957, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 157, 275,-32766,-32766,-32766,-32767,-32767, - -32767,-32767, 101, 102, 103, 1107, 109, 309, 622, 748, - 768,-32766,-32766,-32766, 849, 318,-32766, 1106,-32766,-32766, - -32766, 338, 846, 1356, 769, 770, 771, 772, 773, 774, - 775, 339,-32766, 838,-32766,-32766, 1385, 374, 1280, 1386, + -32767,-32767, 101, 102, 103,-32766, 109, 1313, 622, 318, + 768,-32766,-32766,-32766, 849, 1361,-32766, 1107,-32766,-32766, + -32766, 340, 1360, 1357, 769, 770, 771, 772, 773, 774, + 775, 341,-32766, 838,-32766,-32766, 1386, 374, 1281, 1387, 829, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 805, 827, 806, 807, 808, 809, 797, 798, 799, 826, 800, 801, 786, 787, 788, 790, 791, 792, 831, - 832, 833, 834, 835, 836, 837, 1076, 431, -566, 793, - 794, 795, 796, 1360, 817, 815, 816, 828, 812, 813, - 1359, -193, 804, 810, 811, 818, 819, 821, 820, 138, - 822, 823, 840, 321, 380, 285, 24, 814, 825, 824, - 49, 50, 51, 522, 52, 53, -371, -110, -371, 849, - 54, 55, -110, 56, -110,-32766,-32766,-32766, 1341, 303, - 125, 1122, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, 161, 750, -566, -566, 291, 973, 974, - 466, 467, 468, 975, 396, 285, 1275, 1274, 1276, 57, - 58, -566, 566, 448, 59, 1108, 60, 243, 244, 61, + 832, 833, 834, 835, 836, 837, 1077, 431, -567, 793, + 794, 795, 796, 148, 817, 815, 816, 828, 812, 813, + 380, -193, 804, 810, 811, 818, 819, 821, 820, 138, + 822, 823, 840, 321, 396, 285, 24, 814, 825, 824, + 49, 50, 51, 522, 52, 53, 398, -110, 7, 849, + 54, 55, -110, 56, -110,-32766,-32766,-32766, 1342, 303, + 125, 1123, -110, -110, -110, -110, -110, -110, -110, -110, + -110, -110, -110, 161, 750, -567, -567, 291, 974, 975, + -32766,-32766,-32766, 976, 448, 285, 1276, 1275, 1277, 57, + 58, -567,-32766,-32766, 59, 1109, 60, 243, 244, 61, 62, 63, 64, 65, 66, 67, 68,-32766, 28, 265, - 69, 446, 523, 490, -345, 449, 1306, 1307, 524, 139, - 849, 1050, 450, 321, 1304, 42, 20, 525, 934, 526, - 934, 527, 74, 528, -567, 698, 529, 530, 321, 386, - 387, 44, 45, 452, 383, 382, 1053, 46, 531, 430, - 973, 974, 451, 372, 337, 975, 1280, 1312, 725, 934, - 1266,-32766,-32766,-32766, 969, 533, 534, 535, 855, 934, - 281, 699, -78, -565, 1273, 759, 758, 537, 538, -193, - 1292, 1293, 1294, 1295, 1297, 1289, 1290, 295, 1053, 726, - 398, 151, 7, 1296, 1291, 700, 701, 1275, 1274, 1276, - 296, -567, -567, 70, -153, -153, -153, 316, 317, 321, - 1271, 924, 290, 924, 1275, 1274, 1276, -567, 1050, -153, - 281, -153, 1149, -153, 81, -153, 740, 152, 321, -573, - 153, 759, 758,-32766, 1052, 381, 876, 849, 877, 155, - -565, -565, 924, 1053, 1050, 33, 973, 974, -58, 491, - -57, 532, 924, 1275, 1274, 1276, -565, 123, 1053, 910, - 969, -110, -110, -110, 28, 266, 124, 281, -572, 1053, - 102, 103, -110, -110,-32766,-32766, 849, -110, 135, -563, - 1304, 136, -605, 142, -605, 156, -110, 665, 21, 158, - 936, 159, 936, 160, 720,-32766, 720, -153, -305, 48, + 69, 446, 523, 490, -346, 449, 1307, 1308, 524, 139, + 849, 1051, 450, 321, 1305, 42, 20, 525, 934, 526, + 934, 527, 74, 528, -568, 698, 529, 530, 321, 386, + 387, 44, 45, 452, 383, 382, 1054, 46, 531, 430, + 974, 975, 451, 372, 339, 976, 1281, 855, 725, 934, + 1267, 759, 758,-32766, 970, 533, 534, 535, 149, 934, + 281, 699, -78, -566, 1274, 102, 103, 537, 538, -193, + 1293, 1294, 1295, 1296, 1298, 1290, 1291, 295, 1054, 726, + 466, 467, 468, 1297, 1292, 700, 701, 1276, 1275, 1277, + 296, -568, -568, 70, -153, -153, -153, 316, 317, 321, + 1272, 924, 290, 924, 1276, 1275, 1277, -568, 1051, -153, + 281, -153, 1150, -153, 81, -153, 740, 151, 321, -574, + 152, 759, 758,-32766, 1053, 381, 876, 849, 877, 153, + -566, -566, 924, 1054, 1051, 155, 974, 975, -606, 491, + -606, 532, 924, 1276, 1275, 1277, -566, 33, 1054, 910, + 970, -110, -110, -110, 28, 266, -58, 281, -573, 1054, + -32766,-32766, -110, -110, 665, 21, 849, -110, -57, -564, + 1305, 684, 685, 147, 413, 123, -110, 384, 385, 124, + 936, 135, 936, 136, 720,-32766, 720, -153, 142, 48, 32, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 684, 685, 1266, 296, 759, 758, - 74, 936, -87, 934, -84, 720, 321, -4, 934, -78, - 934, 936, -73, 537, 538, 720, 1292, 1293, 1294, 1295, - 1297, 1289, 1290, 1182, 1184, 934, -563, -563, -564, 1296, - 1291, 759, 758, 727, -563,-32766, 147, 413, -301, 72, - 730, 1273, -563, -72, 317, 321, 299, 300,-32766,-32766, - -32766, -71,-32766, -70,-32766, 737,-32766, 384, 385,-32766, - 390, 391, 379, -69,-32766,-32766,-32766, -68,-32766, -67, - -32766,-32766, -66, -65, 1273, -46,-32766, 427, 28, 265, + 119, 120, 121, 122, 390, 391, 1267, 296, 759, 758, + 74, 936, 156, 934, 158, 720, 321, -4, 934, 159, + 934, 936, 160, 537, 538, 720, 1293, 1294, 1295, 1296, + 1298, 1290, 1291, 1183, 1185, 934, -564, -564, -565, 1297, + 1292, 759, 758, 727, -564,-32766, 656, 657, -306, 72, + 730, 1274, -564, -87, 317, 321, 299, 300,-32766,-32766, + -32766, -84,-32766, -78,-32766, 737,-32766, -73, -72,-32766, + -71, -70, 379, -69,-32766,-32766,-32766, -68,-32766, -67, + -32766,-32766, -66, -65, 1274, -46,-32766, 427, 28, 265, -18,-32766,-32766,-32766, 140,-32766, 924,-32766,-32766,-32766, - 849, 924,-32766, 924, 1304, -564, -564,-32766,-32766,-32766, - 274, -563, -563,-32766,-32766, 282, 656, 657, 924,-32766, - 427, -564, 736, 381, 739, 443, 933, -563, 145, 73, - 294,-32766, 951, -571, 973, 974, 279, 280, 283, 532, - 1266, 28, 266, 284, 327, 275, 109, 536, 969, -110, - -110, -110, 286, 849, 287, 292, 293, 1304, 538, 144, - 1292, 1293, 1294, 1295, 1297, 1289, 1290, 694, 849, 1140, - -32766, 11, 840, 1296, 1291, 990, 709, 687, 671, 720, - 936, 1387, 936, 72, 720, -4, 720, 654, 317, 321, - -50, 711, 304, 1266, 587, 969, 666, 936, 970, 1311, - 672, 720, 302, 301, 10, 308, 1313, 473, 501,-32766, - -529, 538, 688, 1292, 1293, 1294, 1295, 1297, 1289, 1290, - 953, 40, 593, 137, 41, -519, 1296, 1291, 8, 27, - 620, 321, 0,-32766, 378, 0, 72, 0, 0, 1273, - 0, 317, 321, 745, 0, 0,-32766,-32766,-32766, 0, + 849, 924,-32766, 924, 1305, -565, -565,-32766,-32766,-32766, + 274, -564, -564,-32766,-32766, 282, 736, 739, 924,-32766, + 427, -565, 933, 381, 145, 443, 286, -564, 951, 73, + 294,-32766, -302, -572, 974, 975, 279, 280, 283, 532, + 1267, 28, 266, 284, 329, 275, 109, 536, 970, -110, + -110, -110, 287, 849, 292, 293, 840, 1305, 538, 694, + 1293, 1294, 1295, 1296, 1298, 1290, 1291, 709, 144, 587, + 711, 11, 10, 1297, 1292, 991, 849, 1141, 473, 720, + 936,-32766, 936, 72, 720, -4, 720, 1388, 317, 321, + -50, 970, 672, 1267, 687, 666, 501, 936, 971, 301, + 308, 720, 671, 1312, 302, 1314,-32766, 688, 953, -530, + -520, 538, 40, 1293, 1294, 1295, 1296, 1298, 1290, 1291, + 848, 41, 8, 137, 654, 27, 1297, 1292, 304, 34, + 593, 620, 296,-32766, 0, 0, 72, 0, 0, 1274, + 0, 317, 321, 0, 0, 0,-32766,-32766,-32766, -276, -32766, 0,-32766, 0,-32766, 0, 0,-32766, 0, 0, - 0, 0,-32766,-32766,-32766, 934,-32766, 746,-32766,-32766, - 0, 0, 1273, 848,-32766, 427, 868, 0, 296,-32766, - -32766,-32766, 0,-32766, 915,-32766,-32766,-32766, 934, 1014, - -32766, 991, 998, 988, 999,-32766,-32766,-32766, 913,-32766, - 986,-32766,-32766, 1111, 1114, 1273, 1115,-32766, 427, 1112, - 1151, 1113,-32766,-32766,-32766, 1119,-32766, 1301,-32766,-32766, - -32766, 860, 1328,-32766, 1345, 1378, 659, 496,-32766,-32766, - -32766, -599,-32766, -598,-32766,-32766, -597, -573, 1273, 600, - -32766, 427, -572, -571, -570,-32766,-32766,-32766, 924,-32766, - -513,-32766,-32766,-32766, 1, 29,-32766, -275, 30, 39, - 43,-32766,-32766,-32766, -250, -250, -250,-32766,-32766, 71, - 381, 924, 75,-32766, 427, 76, 77, 78, 1280, 79, - 80, 973, 974, 141, 150,-32766, 532, -249, -249, -249, - -273, 154, 241, 381, 910, 969, -110, -110, -110, 323, - 360, 361, 362, 363, 973, 974, 364, 365, -16, 532, - 366, 367, 368, 369, 370, 373, 444, 910, 969, -110, - -110, -110,-32766, -272, 565, 371, 1305, 936, 1273, 13, - 412, 720, -250, 14, 15,-32766,-32766,-32766, 16,-32766, - 18,-32766, 354,-32766, 411, 492,-32766, 493, 500, 503, - 936,-32766,-32766,-32766, 720, -249, 504,-32766,-32766, 849, - 505, 506, 510,-32766, 427, 511, 512, 519, 598, 704, - 1079, 1222, 1302, 1078, 1059,-32766, 1261, 1055, -277, -102, - 12, 17, 22, 312, 410, 612, 617, 645, 710, 1226, - 1279, 1223, 1357, 0, -110, -110, 34, 315, 375, -110, - 721, 724, 728, 729, 731, 732, 733, 734, -110, 738, - 750, 723, 751, 0, 416, 742, 0,-32766, 911, 1382, - 1384, 871, 870, 963, 1006, 1383, 962, 960, 961, 964, - 1254, 944, 954, 942, 1150, 1146, 1100, 996, 997, 296, - 643, 1381, 74, 1339, 1354, 0, 0, 1239, 321 + 0, 0,-32766,-32766,-32766, 934,-32766, 0,-32766,-32766, + 0, 0, 1274, 378,-32766, 427, 745, -600, 412,-32766, + -32766,-32766, 746,-32766, 868,-32766,-32766,-32766, 934, 915, + -32766, 1015, 992, 999, 989,-32766,-32766,-32766, 1000,-32766, + 913,-32766,-32766, 987, 1112, 1274, 1115,-32766, 427, 1116, + 1113, 1152,-32766,-32766,-32766, 1114,-32766, 1120,-32766,-32766, + -32766, 1302, 860,-32766, 1329, 1346, 1379, 496,-32766,-32766, + -32766, 659,-32766, -599,-32766,-32766, -598, -574, 1274, 600, + -32766, 427, -573, -572, -571,-32766,-32766,-32766, 924,-32766, + -514,-32766,-32766,-32766, 1, 29,-32766, -274, 30, 39, + 43,-32766,-32766,-32766, -251, -251, -251,-32766,-32766, 71, + 381, 924, 75,-32766, 427, 76, 77, 78, 1281, 79, + 80, 974, 975, 141, 150,-32766, 532, -250, -250, -250, + -273, 154, 241, 381, 910, 970, -110, -110, -110, 325, + 360, 361, 362, 363, 974, 975, 364, 365, -16, 532, + 366, 367, 368, 369, 370, 373, 444, 910, 970, -110, + -110, -110,-32766, 13, 565, 371, 1306, 936, 1274, 14, + 416, 720, -251, 15, 16,-32766,-32766,-32766, 18,-32766, + 354,-32766, 411,-32766, 492, 493,-32766, 500, 503, 504, + 936,-32766,-32766,-32766, 720, -250, 505,-32766,-32766, 849, + 506, 510, 511,-32766, 427, 512, 519, 598, 704, 1080, + 1223, 1303, 1079, 1060, 1262,-32766, 1056, -278, -102, 12, + 17, 22, 312, 410, 612, 617, 645, 710, 1227, 1280, + 1224, 1358, 0, 315, -110, -110, 375, 721, 724, -110, + 728, 729, 731, 732, 733, 734, 738, 750, -110, 723, + 751, 0, 742, 911, 1383, 1385, 0,-32766, 871, 870, + 964, 1007, 1384, 963, 961, 962, 965, 1255, 944, 954, + 942, 1151, 1147, 1101, 997, 998, 643, 1382, 1340, 296, + 1355, 0, 74, 1240, 321, 0, 0, 0, 321 ); protected array $actionCheck = array( @@ -533,107 +533,107 @@ class Php8 extends \PhpParser\ParserAbstract 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 31, 30, 1, 70, 57, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 106, 107, 80, 71, - 72, 73, 74, 75, 76, 77, 116, 9, 80, 97, - 122, 151, 152, 70, 30, 87, 88, 89, 90, 91, + 72, 73, 74, 75, 76, 77, 116, 80, 80, 97, + 8, 151, 152, 70, 30, 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, 137, 138, 165, 126, 127, 128, 129, 8, 131, + 122, 137, 138, 8, 126, 127, 128, 129, 14, 131, 132, 133, 134, 135, 136, 8, 8, 139, 140, 141, 142, 143, 144, 145, 70, 147, 148, 106, 160, 108, - 137, 138, 154, 155, 156, 167, 158, 14, 2, 3, + 137, 138, 154, 155, 156, 167, 158, 160, 2, 3, 4, 5, 6, 7, 166, 9, 10, 11, 12, 13, 116, 8, 167, 119, 120, 121, 122, 123, 124, 125, - 9, 10, 11, 163, 51, 52, 53, 54, 55, 8, - 57, 122, 116, 37, 38, 141, 163, 9, 10, 11, + 9, 10, 11, 163, 51, 52, 53, 54, 55, 106, + 57, 108, 116, 37, 38, 141, 163, 9, 10, 11, 159, 30, 69, 32, 33, 34, 35, 36, 37, 38, - 14, 137, 138, 57, 9, 10, 11, 141, 30, 165, + 8, 137, 138, 57, 9, 10, 11, 141, 30, 165, 32, 33, 34, 35, 36, 1, 8, 71, 72, 73, - 74, 75, 76, 77, 165, 30, 80, 32, 33, 34, + 74, 75, 76, 77, 8, 30, 80, 32, 33, 34, 35, 165, 8, 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, 9, - 10, 11, 126, 127, 128, 129, 166, 131, 132, 133, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 73, + 166, 166, 126, 127, 128, 129, 80, 131, 132, 133, 134, 135, 136, 1, 166, 139, 140, 141, 142, 143, - 144, 145, 80, 147, 148, 14, 9, 10, 11, 166, + 144, 145, 85, 147, 148, 163, 9, 10, 11, 167, 154, 155, 156, 8, 158, 2, 3, 4, 5, 6, - 7, 97, 9, 10, 11, 12, 13, 30, 8, 32, + 7, 97, 9, 10, 11, 12, 13, 30, 122, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 16, 57, 9, 10, 11, 44, 45, - 46, 47, 48, 49, 50, 163, 69, 8, 52, 167, - 57, 9, 10, 11, 82, 8, 30, 1, 32, 33, - 34, 8, 160, 1, 71, 72, 73, 74, 75, 76, + 46, 47, 48, 49, 50, 9, 69, 150, 52, 8, + 57, 9, 10, 11, 82, 1, 30, 1, 32, 33, + 34, 8, 8, 1, 71, 72, 73, 74, 75, 76, 77, 8, 30, 80, 32, 33, 80, 8, 1, 83, 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, 1, 80, 70, 126, - 127, 128, 129, 1, 131, 132, 133, 134, 135, 136, + 127, 128, 129, 14, 131, 132, 133, 134, 135, 136, 8, 8, 139, 140, 141, 142, 143, 144, 145, 167, 147, 148, 80, 171, 8, 30, 101, 154, 155, 156, 2, 3, 4, 5, 6, 7, 106, 101, 108, 82, 12, 13, 106, 15, 108, 9, 10, 11, 1, 113, 14, 126, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 14, 167, 137, 138, 30, 117, 118, - 132, 133, 134, 122, 8, 30, 159, 160, 161, 51, - 52, 153, 85, 8, 56, 168, 58, 59, 60, 61, + 9, 10, 11, 122, 8, 30, 159, 160, 161, 51, + 52, 153, 9, 10, 56, 168, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 140, 70, 71, 72, 73, 74, 31, 168, 8, 78, 79, 80, 167, 82, 116, 8, 171, 86, 87, 88, 89, 1, 91, 1, 93, 165, 95, 70, 80, 98, 99, 171, 106, 107, 103, 104, 105, 106, 107, 141, 109, 110, 116, - 117, 118, 8, 115, 116, 122, 1, 150, 31, 1, - 122, 9, 10, 116, 131, 127, 128, 129, 8, 1, - 165, 116, 16, 70, 80, 37, 38, 139, 140, 166, + 117, 118, 8, 115, 116, 122, 1, 8, 31, 1, + 122, 37, 38, 116, 131, 127, 128, 129, 14, 1, + 165, 116, 16, 70, 80, 49, 50, 139, 140, 166, 142, 143, 144, 145, 146, 147, 148, 149, 141, 31, - 106, 14, 108, 155, 156, 140, 141, 159, 160, 161, + 132, 133, 134, 155, 156, 140, 141, 159, 160, 161, 162, 137, 138, 165, 75, 76, 77, 169, 170, 171, 116, 84, 165, 84, 159, 160, 161, 153, 116, 90, 165, 92, 163, 94, 167, 96, 167, 14, 171, 165, 14, 37, 38, 116, 140, 106, 106, 82, 108, 14, - 137, 138, 84, 141, 116, 14, 117, 118, 16, 167, - 16, 122, 84, 159, 160, 161, 153, 16, 141, 130, + 137, 138, 84, 141, 116, 14, 117, 118, 164, 167, + 166, 122, 84, 159, 160, 161, 153, 14, 141, 130, 131, 132, 133, 134, 70, 71, 16, 165, 165, 141, - 49, 50, 117, 118, 51, 52, 82, 122, 16, 70, - 86, 16, 164, 16, 166, 16, 131, 75, 76, 16, - 163, 16, 163, 16, 167, 140, 167, 168, 35, 70, + 51, 52, 117, 118, 75, 76, 82, 122, 16, 70, + 86, 75, 76, 101, 102, 16, 131, 106, 107, 16, + 163, 16, 163, 16, 167, 140, 167, 168, 16, 70, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 75, 76, 122, 162, 37, 38, - 165, 163, 31, 1, 31, 167, 171, 0, 1, 31, - 1, 163, 31, 139, 140, 167, 142, 143, 144, 145, + 26, 27, 28, 29, 106, 107, 122, 162, 37, 38, + 165, 163, 16, 1, 16, 167, 171, 0, 1, 16, + 1, 163, 16, 139, 140, 167, 142, 143, 144, 145, 146, 147, 148, 59, 60, 1, 137, 138, 70, 155, - 156, 37, 38, 31, 70, 74, 101, 102, 35, 165, + 156, 37, 38, 31, 70, 74, 111, 112, 35, 165, 31, 80, 153, 31, 170, 171, 137, 138, 87, 88, - 89, 31, 91, 31, 93, 31, 95, 106, 107, 98, - 106, 107, 153, 31, 103, 104, 105, 31, 74, 31, + 89, 31, 91, 31, 93, 31, 95, 31, 31, 98, + 31, 31, 153, 31, 103, 104, 105, 31, 74, 31, 109, 110, 31, 31, 80, 31, 115, 116, 70, 71, 31, 87, 88, 89, 31, 91, 84, 93, 127, 95, 82, 84, 98, 84, 86, 137, 138, 103, 104, 105, - 31, 137, 138, 109, 110, 31, 111, 112, 84, 115, - 116, 153, 31, 106, 31, 108, 31, 153, 31, 158, - 113, 127, 38, 165, 117, 118, 35, 35, 35, 122, + 31, 137, 138, 109, 110, 31, 31, 31, 84, 115, + 116, 153, 31, 106, 31, 108, 37, 153, 38, 158, + 113, 127, 35, 165, 117, 118, 35, 35, 35, 122, 122, 70, 71, 35, 35, 57, 69, 130, 131, 132, - 133, 134, 37, 82, 37, 37, 37, 86, 140, 70, - 142, 143, 144, 145, 146, 147, 148, 77, 82, 82, - 85, 154, 80, 155, 156, 163, 80, 94, 96, 167, - 163, 83, 163, 165, 167, 168, 167, 113, 170, 171, - 31, 92, 114, 122, 89, 131, 90, 163, 131, 150, - 100, 167, 136, 135, 97, 135, 150, 97, 97, 140, - 153, 140, 100, 142, 143, 144, 145, 146, 147, 148, - 158, 163, 157, 31, 163, 153, 155, 156, 153, 153, - 157, 171, -1, 74, 153, -1, 165, -1, -1, 80, - -1, 170, 171, 163, -1, -1, 87, 88, 89, -1, + 133, 134, 37, 82, 37, 37, 80, 86, 140, 77, + 142, 143, 144, 145, 146, 147, 148, 80, 70, 89, + 92, 154, 97, 155, 156, 163, 82, 82, 97, 167, + 163, 85, 163, 165, 167, 168, 167, 83, 170, 171, + 31, 131, 100, 122, 94, 90, 97, 163, 131, 135, + 135, 167, 96, 150, 136, 150, 140, 100, 158, 153, + 153, 140, 163, 142, 143, 144, 145, 146, 147, 148, + 159, 163, 153, 31, 113, 153, 155, 156, 114, 167, + 157, 157, 162, 74, -1, -1, 165, -1, -1, 80, + -1, 170, 171, -1, -1, -1, 87, 88, 89, 166, 91, -1, 93, -1, 95, -1, -1, 98, -1, -1, - -1, -1, 103, 104, 105, 1, 74, 163, 109, 110, - -1, -1, 80, 159, 115, 116, 163, -1, 162, 87, - 88, 89, -1, 91, 163, 93, 127, 95, 1, 163, + -1, -1, 103, 104, 105, 1, 74, -1, 109, 110, + -1, -1, 80, 153, 115, 116, 163, 165, 168, 87, + 88, 89, 163, 91, 163, 93, 127, 95, 1, 163, 98, 163, 163, 163, 163, 103, 104, 105, 163, 74, 163, 109, 110, 163, 163, 80, 163, 115, 116, 163, - 163, 163, 87, 88, 89, 163, 91, 164, 93, 127, + 163, 163, 87, 88, 89, 163, 91, 163, 93, 127, 95, 164, 164, 98, 164, 164, 164, 102, 103, 104, - 105, 165, 74, 165, 109, 110, 165, 165, 80, 81, + 105, 164, 74, 165, 109, 110, 165, 165, 80, 81, 115, 116, 165, 165, 165, 87, 88, 89, 84, 91, 165, 93, 127, 95, 165, 165, 98, 166, 165, 165, 165, 103, 104, 105, 100, 101, 102, 109, 110, 165, @@ -649,18 +649,18 @@ class Php8 extends \PhpParser\ParserAbstract 166, 166, 166, 115, 116, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 127, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, -1, 117, 118, 167, 167, 167, 122, + 166, 166, -1, 167, 117, 118, 167, 167, 167, 122, 167, 167, 167, 167, 167, 167, 167, 167, 131, 167, - 167, 167, 167, -1, 168, 168, -1, 140, 168, 168, + 167, -1, 168, 168, 168, 168, -1, 140, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 162, - 168, 168, 165, 168, 168, -1, -1, 169, 171 + 168, -1, 165, 169, 171, -1, -1, -1, 171 ); protected array $actionBase = array( 0, -2, 156, 559, 757, 1004, 1027, 485, 292, 357, - -60, -12, 588, 759, 759, 774, 759, 557, 752, 888, - 598, 598, 598, 836, 313, 313, 836, 313, 711, 711, + -60, -12, 588, 759, 759, 774, 759, 557, 752, 892, + 598, 598, 598, 827, 313, 313, 827, 313, 711, 711, 711, 711, 744, 744, 965, 965, 998, 932, 899, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, @@ -674,62 +674,62 @@ class Php8 extends \PhpParser\ParserAbstract 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 33, 20, 224, 1083, 661, 1057, 1063, 1059, - 1064, 1055, 1054, 1058, 1060, 1065, 1113, 1115, 837, 1112, - 1116, 1061, 902, 1056, 1062, 887, 297, 297, 297, 297, + 1088, 1088, 33, 20, 224, 1080, 673, 1056, 1062, 1058, + 1063, 1054, 1053, 1057, 1059, 1064, 1109, 1110, 833, 1108, + 1112, 1060, 907, 1055, 1061, 888, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 68, 476, 582, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 624, 624, 22, 22, 22, + 297, 297, 356, 476, 513, 501, 501, 501, 501, 501, + 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, + 501, 501, 501, 501, 501, 624, 624, 22, 22, 22, 362, 811, 758, 811, 811, 811, 811, 811, 811, 811, 811, 346, 205, 188, 714, 171, 171, 7, 7, 7, 7, 7, 376, 1117, 54, 585, 585, 314, 314, 314, - 314, 365, 568, 370, 435, 397, 651, 477, 463, 532, + 314, 365, 554, 83, 435, 397, 556, 477, 463, 532, 532, 558, 558, 76, 76, 558, 558, 558, 133, 133, - 547, 547, 547, 547, 41, 437, 809, 382, 382, 382, - 382, 809, 809, 809, 809, 796, 996, 809, 809, 809, - 494, 533, 708, 653, 653, 560, -70, -70, 560, 804, - -70, 487, 316, -102, 807, -40, 548, -102, 1000, 368, - 639, 639, 659, 639, 639, 639, 854, 701, 854, 1053, - -42, 825, 825, 794, 731, 69, 892, 1084, 1066, 840, - 1109, 852, 1110, 1085, 489, 378, -16, 13, 74, 728, - 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, 1052, - 1052, 1052, 800, 568, 1053, 222, 1107, 1108, 800, 800, - 800, 568, 568, 568, 568, 568, 568, 568, 568, 799, - 568, 568, 745, 222, 642, 669, 222, 849, 568, 812, + 547, 547, 547, 547, 41, 217, 806, 382, 382, 382, + 382, 806, 806, 806, 806, 795, 996, 806, 806, 806, + 494, 533, 708, 649, 649, 560, -70, -70, 560, 800, + -70, 487, 975, 316, 982, -102, 807, -40, 514, -102, + 1000, 368, 639, 639, 659, 639, 639, 639, 801, 611, + 801, 1052, 836, 836, 794, 776, 894, 1082, 1065, 832, + 1106, 847, 1107, 1083, 489, 488, -16, 13, 74, 772, + 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051, + 1051, 1051, 1113, 554, 1052, -3, 1104, 1105, 1113, 1113, + 1113, 554, 554, 554, 554, 554, 554, 554, 554, 799, + 554, 554, 675, -3, 629, 636, -3, 849, 554, 797, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 512, 33, 33, 20, 5, 5, 33, 202, 52, 5, - 5, 5, 337, 5, 33, 33, 33, 701, 828, 805, - 704, -18, 813, 443, 828, 828, 828, 120, 143, 128, - 693, 753, 514, 832, 832, 827, 929, 929, 832, 826, - 832, 827, 832, 832, 929, 929, 856, 929, 218, 515, - 373, 456, 537, 929, 320, 832, 832, 832, 832, 810, - 929, 127, 544, 832, 305, 234, 832, 832, 810, 808, - 824, 806, 929, 929, 929, 810, 389, 806, 806, 806, - 820, 844, 814, 819, 367, 359, 590, 181, 834, 819, - 819, 832, 506, 814, 819, 814, 819, 802, 819, 819, - 819, 814, 819, 826, 383, 819, 699, 574, 163, 819, - 832, 19, 944, 947, 721, 950, 934, 951, 991, 952, - 954, 1073, 925, 967, 935, 955, 999, 933, 930, 835, - 671, 680, 815, 797, 919, 817, 817, 817, 912, 917, - 817, 817, 817, 817, 817, 817, 817, 817, 671, 893, - 821, 845, 976, 692, 695, 1042, 789, 1090, 1118, 975, - 944, 954, 723, 935, 955, 933, 930, 792, 791, 786, - 788, 782, 772, 762, 770, 803, 1044, 958, 798, 697, - 1014, 977, 1087, 1070, 978, 981, 1018, 1045, 853, 1046, - 1091, 829, 1092, 1093, 897, 985, 1074, 817, 911, 906, - 898, 982, 918, 671, 900, 1047, 1003, 1069, 1019, 1021, - 1071, 850, 838, 901, 1094, 986, 987, 988, 1075, 1076, - 801, 1007, 931, 1022, 851, 1002, 1023, 1030, 1034, 1035, - 1077, 1095, 1078, 908, 1079, 861, 846, 964, 822, 1096, - 196, 843, 848, 859, 990, 291, 974, 1080, 1086, 1097, - 1036, 1039, 1040, 1098, 1099, 959, 866, 1008, 823, 1012, - 997, 868, 869, 607, 858, 1048, 841, 842, 857, 643, - 646, 1100, 1101, 1102, 966, 831, 830, 870, 871, 1050, - 855, 1051, 1103, 655, 875, 1104, 1043, 703, 705, 586, - 664, 662, 707, 839, 1082, 816, 818, 847, 989, 705, - 833, 877, 1105, 880, 881, 883, 1041, 886, 1016, 1106, + 512, 33, 33, 20, 5, 5, 33, 142, 52, 5, + 5, 5, 337, 5, 33, 33, 33, 611, 828, 813, + 638, -18, 814, 443, 828, 828, 828, 115, 114, 128, + 753, 837, 370, 816, 816, 835, 929, 929, 816, 834, + 816, 835, 816, 816, 929, 929, 810, 929, 202, 506, + 373, 442, 537, 929, 234, 816, 816, 816, 816, 805, + 929, 72, 544, 816, 226, 218, 816, 816, 805, 804, + 824, 808, 929, 929, 929, 805, 389, 808, 808, 808, + 853, 859, 851, 819, 361, 305, 579, 163, 830, 819, + 819, 816, 456, 851, 819, 851, 819, 790, 819, 819, + 819, 851, 819, 834, 383, 819, 736, 574, 127, 819, + 816, 19, 944, 947, 762, 950, 934, 951, 991, 952, + 954, 1070, 925, 967, 935, 955, 999, 933, 930, 831, + 699, 703, 809, 796, 919, 817, 817, 817, 912, 917, + 817, 817, 817, 817, 817, 817, 817, 817, 699, 897, + 860, 820, 976, 705, 707, 1041, 793, 1085, 1114, 975, + 944, 954, 770, 935, 955, 933, 930, 792, 791, 786, + 788, 782, 780, 777, 779, 803, 1043, 958, 789, 712, + 1012, 977, 1084, 1066, 978, 981, 1016, 1044, 861, 1045, + 1086, 838, 1087, 1090, 898, 985, 1071, 817, 911, 852, + 900, 982, 918, 699, 901, 1046, 997, 802, 1018, 1019, + 1069, 821, 844, 902, 1091, 986, 987, 988, 1073, 1074, + 798, 1003, 823, 1021, 839, 850, 1022, 1023, 1030, 1034, + 1075, 1092, 1076, 908, 1077, 866, 845, 931, 846, 1093, + 429, 843, 848, 858, 990, 584, 974, 1078, 1002, 1094, + 1035, 1036, 1039, 1095, 1096, 959, 868, 1007, 840, 1008, + 964, 869, 870, 643, 857, 1047, 841, 842, 855, 646, + 655, 1097, 1098, 1099, 966, 825, 822, 871, 875, 1048, + 829, 1050, 1100, 661, 877, 1101, 1042, 738, 743, 586, + 692, 680, 746, 818, 1079, 812, 854, 815, 989, 743, + 826, 880, 1102, 881, 883, 886, 1040, 887, 1014, 1103, 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, @@ -759,34 +759,34 @@ class Php8 extends \PhpParser\ParserAbstract 297, 297, 297, 297, 297, 297, 297, 297, 524, 524, 297, 297, 297, 297, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 297, 297, 297, 0, 297, 297, - 297, 297, 297, 297, 297, 856, 524, 524, 524, 524, + 297, 297, 297, 297, 297, 810, 524, 524, 524, 524, 133, 133, 133, 133, -95, -95, -95, 524, 524, 133, - 524, 856, 524, 524, 524, 524, 524, 524, 524, 524, - 524, 0, 0, 524, 524, 524, 524, 222, -70, 524, - 826, 826, 826, 826, 524, 524, 524, 524, -70, -70, - 524, 524, 524, 0, 0, 0, 133, 133, 222, 0, - 0, 222, 391, 0, 826, 826, 524, 391, 856, 442, - 524, 489, 0, 0, 0, 0, 0, 0, 0, 222, - 826, 222, 568, 832, -70, -70, 568, 568, 832, 5, - 33, 442, 685, 685, 685, 685, 33, 0, 0, 0, - 0, 0, 701, 856, 856, 856, 856, 856, 856, 856, - 856, 856, 856, 856, 856, 826, 0, 856, 0, 856, - 856, 826, 826, 826, 0, 0, 0, 0, 0, 0, + 524, 810, 524, 524, 524, 524, 524, 524, 524, 524, + 524, 0, 0, 524, 524, 524, 524, -3, -70, 524, + 834, 834, 834, 834, 524, 524, 524, 524, -70, -70, + 524, 524, 524, 0, 0, 0, 133, 133, -3, 0, + 0, -3, 391, 0, 834, 206, 834, 206, 524, 391, + 810, 374, 524, 489, 0, 0, 0, 0, 0, 0, + 0, -3, 834, -3, 554, -70, -70, 554, 554, 5, + 33, 374, 612, 612, 612, 612, 33, 0, 0, 0, + 0, 0, 611, 810, 810, 810, 810, 810, 810, 810, + 810, 810, 810, 810, 810, 834, 0, 810, 0, 810, + 810, 834, 834, 834, 0, 0, 0, 0, 0, 0, 0, 0, 929, 0, 0, 0, 0, 0, 0, 0, - 826, 0, 929, 0, 0, 0, 0, 0, 0, 0, + 834, 0, 929, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 826, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 817, 850, 0, 0, 850, 0, 817, 817, 817, - 0, 0, 0, 858, 855 + 0, 834, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 817, 821, 0, 0, 821, 0, 817, 817, 817, + 0, 0, 0, 857, 829 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 617, 617, - 617, 617,32767,32767, 254, 102,32767,32767, 488, 405, - 405, 405,32767,32767, 561, 561, 561, 561, 561,32767, - 32767,32767,32767,32767,32767, 488,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 618, 618, + 618, 618,32767,32767, 255, 102,32767,32767, 489, 406, + 406, 406,32767,32767, 562, 562, 562, 562, 562,32767, + 32767,32767,32767,32767,32767, 489,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, @@ -794,141 +794,137 @@ class Php8 extends \PhpParser\ParserAbstract 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, 36, 7, 8, 10, - 11, 49, 17, 327, 100,32767,32767,32767,32767,32767, + 11, 49, 17, 328, 100,32767,32767,32767,32767,32767, 32767,32767,32767, 102,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 392, 610,32767,32767,32767, + 32767,32767,32767,32767,32767, 393, 611,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 492, 471, 472, 474, - 475, 404, 562, 616, 330, 613, 332, 403, 145, 342, - 333, 242, 258, 493, 259, 494, 497, 498, 215, 389, - 149, 150, 435, 489, 437, 487, 491, 436, 410, 416, - 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, - 427, 428, 408, 409, 490,32767,32767, 468, 467, 466, - 433,32767,32767,32767,32767,32767,32767,32767,32767, 102, - 32767, 434, 438, 441, 407, 439, 440, 457, 458, 455, - 456, 459,32767,32767, 319,32767,32767, 460, 461, 462, - 463, 370, 195, 368,32767,32767, 442, 319, 111,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 448, 449, + 32767,32767,32767,32767,32767,32767, 493, 472, 473, 475, + 476, 405, 563, 617, 331, 614, 333, 404, 145, 343, + 334, 243, 259, 494, 260, 495, 498, 499, 216, 390, + 149, 150, 436, 490, 438, 488, 492, 437, 411, 417, + 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, + 428, 429, 409, 410, 491,32767,32767, 469, 468, 467, + 434,32767,32767,32767,32767,32767,32767,32767,32767, 102, + 32767, 435, 439, 442, 408, 440, 441, 458, 459, 456, + 457, 460,32767,32767, 320,32767,32767, 461, 462, 463, + 464, 371, 195, 369,32767,32767, 443, 320, 111,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 449, 450, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767, 102,32767, 100, - 505, 555, 465, 443, 444,32767, 530,32767, 102,32767, - 532,32767,32767,32767,32767,32767,32767,32767,32767, 557, - 430, 432, 525, 611, 411, 614,32767, 518, 100, 195, - 32767,32767, 531, 195, 195,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 556,32767, 624, 518, + 506, 556, 466, 444, 445,32767, 531,32767, 102,32767, + 533,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 558, 431, 433, 526, 612, 412, 615,32767, 519, + 100, 195,32767, 532, 195, 195,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 557,32767, 625, 519, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, 110,32767, 110, 110,32767,32767, - 100, 195, 195, 195, 195, 195, 195, 195, 195, 533, - 195, 195, 190,32767, 268, 270, 102, 579, 195, 535, + 100, 195, 195, 195, 195, 195, 195, 195, 195, 534, + 195, 195, 190,32767, 269, 271, 102, 580, 195, 536, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 392,32767,32767,32767,32767, 518, 453, 138, - 32767, 520, 138, 563, 445, 446, 447, 563, 563, 563, - 315, 292,32767,32767,32767,32767, 533, 533, 100, 100, - 100, 100,32767,32767,32767,32767, 111, 504, 99, 99, - 99, 99, 99, 103, 101,32767,32767,32767,32767, 223, - 32767, 101, 99,32767, 101, 101,32767,32767, 223, 225, - 212, 227,32767, 583, 584, 223, 101, 227, 227, 227, - 247, 247, 507, 321, 101, 99, 101, 101, 197, 321, - 321,32767, 101, 507, 321, 507, 321, 199, 321, 321, - 321, 507, 321,32767, 101, 321, 214, 99, 99, 321, - 32767,32767,32767,32767, 520,32767,32767,32767,32767,32767, - 32767,32767, 222,32767,32767,32767,32767,32767,32767,32767, - 32767, 550,32767, 568, 581, 451, 452, 454, 567, 565, - 476, 477, 478, 479, 480, 481, 482, 484, 612,32767, - 524,32767,32767,32767, 341,32767, 622,32767,32767,32767, - 9, 74, 513, 42, 43, 51, 57, 539, 540, 541, - 542, 536, 537, 543, 538,32767,32767,32767,32767,32767, + 32767,32767, 393,32767,32767,32767,32767, 519, 454, 138, + 32767, 521, 138, 564, 446, 447, 448, 564, 564, 564, + 316, 293,32767,32767,32767,32767, 534, 534, 100, 100, + 100, 100,32767,32767,32767,32767, 111, 505, 99, 99, + 99, 99, 99, 103, 101,32767,32767,32767,32767, 224, + 32767, 101, 99,32767, 101, 101,32767,32767, 224, 226, + 213, 228,32767, 584, 585, 224, 101, 228, 228, 228, + 248, 248, 508, 322, 101, 99, 101, 101, 197, 322, + 322,32767, 101, 508, 322, 508, 322, 199, 322, 322, + 322, 508, 322,32767, 101, 322, 215, 99, 99, 322, + 32767,32767,32767,32767, 521,32767,32767,32767,32767,32767, + 32767,32767, 223,32767,32767,32767,32767,32767,32767,32767, + 32767, 551,32767, 569, 582, 452, 453, 455, 568, 566, + 477, 478, 479, 480, 481, 482, 483, 485, 613,32767, + 525,32767,32767,32767, 342,32767, 623,32767,32767,32767, + 9, 74, 514, 42, 43, 51, 57, 540, 541, 542, + 543, 537, 538, 544, 539,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 623,32767, 563,32767,32767,32767,32767, 450, 545, 589, - 32767,32767, 564, 615,32767,32767,32767,32767,32767,32767, + 624,32767, 564,32767,32767,32767,32767, 451, 546, 590, + 32767,32767, 565, 616,32767,32767,32767,32767,32767,32767, 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 550,32767, 136,32767,32767,32767,32767,32767, - 32767,32767,32767, 546,32767,32767,32767, 563,32767,32767, - 32767,32767, 317, 314,32767,32767,32767,32767,32767,32767, + 32767,32767, 551,32767, 136,32767,32767,32767,32767,32767, + 32767,32767,32767, 547,32767,32767,32767, 564,32767,32767, + 32767,32767, 318, 315,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 563,32767,32767,32767,32767,32767, 294,32767, 311,32767, + 564,32767,32767,32767,32767,32767, 295,32767, 312,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 388, 520, 297, - 299, 300,32767,32767,32767,32767, 364,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 389, 521, 298, + 300, 301,32767,32767,32767,32767, 365,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 152, 152, 3, 3, 344, 152, 152, 152, 344, 344, - 152, 344, 344, 344, 152, 152, 152, 152, 152, 152, - 152, 280, 185, 262, 265, 247, 247, 152, 356, 152, - 390, 390, 399 + 152, 152, 3, 3, 345, 152, 152, 152, 345, 345, + 152, 345, 345, 345, 152, 152, 152, 152, 152, 152, + 152, 281, 185, 263, 266, 248, 248, 152, 357, 152, + 391, 391, 400 ); protected array $goto = array( - 194, 194, 1051, 487, 705, 278, 278, 278, 278, 1082, + 194, 194, 1052, 487, 705, 278, 278, 278, 278, 990, 489, 548, 548, 907, 865, 907, 907, 548, 714, 548, 548, 548, 548, 548, 548, 548, 548, 166, 166, 166, 166, 218, 195, 191, 191, 176, 178, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 186, 187, 188, 189, 190, 215, 213, 216, 545, 546, 428, 547, - 550, 551, 552, 553, 554, 555, 556, 557, 1168, 167, + 550, 551, 552, 553, 554, 555, 556, 557, 1169, 167, 168, 169, 193, 170, 171, 172, 164, 173, 174, 175, 177, 212, 214, 217, 237, 240, 251, 252, 253, 255, 256, 257, 258, 259, 260, 261, 267, 268, 269, 270, 276, 288, 289, 313, 314, 434, 435, 436, 607, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 186, 187, 188, 189, 190, - 215, 1168, 196, 197, 198, 199, 238, 179, 180, 200, + 215, 1169, 196, 197, 198, 199, 238, 179, 180, 200, 181, 201, 197, 182, 239, 196, 163, 202, 203, 183, 204, 205, 206, 184, 207, 208, 165, 209, 210, 211, - 185, 869, 560, 841, 560, 560, 592, 1099, 866, 847, - 744, 646, 648, 609, 560, 668, 1125, 1153, 1126, 692, - 695, 1024, 703, 712, 1020, 719, 355, 355, 355, 355, - 1054, 1054, 690, 966, 867, 463, 1046, 1062, 1063, 989, - 983, 983, 983, 983, 247, 247, 463, 977, 984, 1371, - 1371, 847, 426, 847, 923, 918, 919, 932, 875, 920, - 872, 921, 922, 873, 1371, 926, 879, 900, 475, 475, - 878, 245, 245, 245, 245, 242, 248, 475, 1105, 1101, - 1102, 438, 670, 1057, 1056, 1374, 1374, 433, 334, 330, - 331, 333, 602, 437, 335, 439, 647, 470, 1272, 1051, - 1272, 1272, 341, 599, 456, 456, 1217, 456, 456, 1051, - 1272, 350, 1051, 520, 1051, 1051, 1051, 1051, 1051, 1051, - 1051, 1051, 1051, 342, 341, 1051, 1051, 1051, 1051, 663, - 664, 1272, 681, 682, 683, 465, 1272, 1272, 1272, 1272, - 862, 440, 1272, 1272, 1272, 1353, 1353, 1353, 1353, 348, - 1248, 958, 1361, 358, 440, 1249, 1252, 959, 940, 1253, - 1058, 1058, 941, 358, 358, 882, 400, 674, 1069, 1065, - 1066, 630, 667, 702, 358, 358, 447, 843, 358, 927, - 1388, 928, 1010, 894, 569, 562, 881, 862, 956, 702, - 1060, 1061, 702, 956, 597, 564, 981, 417, 713, 358, - 358, 669, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 1165, 432, 456, 621, 456, 456, - 320, 306, 340, 562, 569, 594, 595, 345, 605, 611, - 1075, 626, 627, 675, 632, 632, 484, 1346, 1347, 25, - 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, 1303, - 1322, 1322, 640, 642, 644, 1333, 1322, 1322, 1322, 1322, - 1322, 1322, 1322, 1322, 1322, 1322, 445, 5, 1344, 6, - 1344, 1344, 558, 558, 558, 558, 422, 613, 250, 250, - 1344, 895, 883, 1087, 1091, 271, 319, 691, 319, 319, - 336, 563, 589, 859, 992, 887, 563, 972, 589, 409, - 403, 469, 1355, 1355, 1355, 1355, 884, 564, 402, 405, - 610, 614, 625, 478, 606, 479, 480, 982, 862, 1348, - 1349, 892, 1319, 1319, 1379, 1380, 1340, 1263, 1319, 1319, - 1319, 1319, 1319, 1319, 1319, 1319, 1319, 1319, 1013, 1137, - 899, 985, 1148, 743, 549, 549, 561, 1022, 1017, 890, - 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, - 1267, 1032, 608, 1118, 1088, 351, 352, 508, 328, 509, - 747, 1265, 1042, 717, 485, 515, 896, 1090, 516, 708, - 1092, 1116, 994, 1342, 1342, 1090, 619, 633, 636, 637, - 638, 639, 660, 661, 662, 716, 718, 414, 415, 752, - 752, 377, 679, 0, 680, 0, 419, 420, 421, 1139, - 693, 603, 624, 423, 0, 1268, 1269, 346, 1255, 0, - 0, 0, 0, 615, 857, 0, 945, 1155, 0, 0, - 0, 1255, 0, 0, 0, 0, 0, 0, 1029, 0, - 0, 0, 0, 1270, 1330, 1331, 886, 0, 673, 1008, - 0, 0, 0, 0, 880, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1262, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1027, - 1027 + 185, 869, 560, 1083, 560, 560, 592, 1100, 475, 475, + 744, 646, 648, 609, 560, 668, 432, 475, 621, 692, + 695, 1025, 703, 712, 1021, 719, 558, 558, 558, 558, + 470, 613, 866, 663, 664, 463, 681, 682, 683, 1218, + 984, 984, 984, 984, 247, 247, 463, 978, 985, 355, + 355, 355, 355, 867, 923, 918, 919, 932, 875, 920, + 872, 921, 922, 873, 350, 926, 879, 1126, 1154, 1127, + 878, 245, 245, 245, 245, 242, 248, 841, 1106, 1102, + 1103, 438, 670, 402, 405, 610, 614, 433, 336, 332, + 333, 335, 602, 437, 337, 439, 647, 426, 1273, 1052, + 1273, 1273, 342, 900, 456, 456, 348, 456, 456, 1052, + 1273, 882, 1052, 520, 1052, 1052, 1052, 1052, 1052, 1052, + 1052, 1052, 1052, 343, 342, 1052, 1052, 1052, 1052, 894, + 465, 1273, 881, 508, 599, 509, 1273, 1273, 1273, 1273, + 358, 515, 1273, 1273, 1273, 1354, 1354, 1354, 1354, 862, + 358, 358, 1372, 1372, 630, 667, 895, 883, 1088, 1092, + 940, 358, 358, 1362, 941, 358, 1011, 1372, 1389, 993, + 956, 447, 956, 619, 633, 636, 637, 638, 639, 660, + 661, 662, 716, 718, 564, 569, 562, 358, 358, 1375, + 1375, 400, 983, 1055, 1055, 690, 967, 597, 862, 1047, + 1063, 1064, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 1138, 899, 456, 669, 456, 456, + 1058, 1057, 322, 562, 569, 594, 595, 324, 605, 611, + 1166, 626, 627, 1028, 1028, 1061, 1062, 632, 632, 25, + 320, 306, 1334, 1304, 1304, 1304, 1304, 1304, 1304, 1304, + 1304, 1304, 1304, 702, 1349, 1350, 1014, 843, 5, 986, + 6, 743, 445, 422, 561, 1023, 1018, 1076, 1345, 702, + 1345, 1345, 702, 603, 624, 1323, 1323, 691, 250, 250, + 1345, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, + 1323, 563, 589, 927, 564, 928, 563, 675, 589, 859, + 403, 469, 1356, 1356, 1356, 1356, 338, 887, 271, 319, + 625, 319, 319, 478, 606, 479, 480, 973, 351, 352, + 409, 892, 1320, 1320, 1380, 1381, 1341, 862, 1320, 1320, + 1320, 1320, 1320, 1320, 1320, 1320, 1320, 1320, 982, 417, + 713, 1268, 1264, 414, 415, 1033, 884, 440, 679, 890, + 680, 1149, 419, 420, 421, 1089, 693, 847, 1266, 423, + 440, 747, 1043, 346, 485, 1093, 1059, 1059, 330, 484, + 1347, 1348, 1140, 674, 1070, 1066, 1067, 1091, 896, 995, + 549, 549, 377, 1343, 1343, 1091, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 1269, 1270, 0, 1256, + 0, 847, 0, 847, 615, 857, 0, 945, 1156, 640, + 642, 644, 1256, 0, 0, 0, 0, 608, 1119, 1030, + 0, 0, 752, 752, 1271, 1331, 1332, 886, 717, 673, + 1009, 0, 0, 516, 708, 880, 1117, 1249, 959, 0, + 0, 0, 1250, 1253, 960, 0, 1254, 1263 ); protected array $gotoCheck = array( - 42, 42, 73, 84, 73, 23, 23, 23, 23, 128, + 42, 42, 73, 84, 73, 23, 23, 23, 23, 49, 84, 162, 162, 25, 25, 25, 25, 162, 9, 162, 162, 162, 162, 162, 162, 162, 162, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -944,100 +940,96 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 15, 19, 6, 19, 19, 48, 15, 26, 12, - 48, 48, 48, 131, 19, 48, 146, 146, 146, 48, - 48, 48, 48, 48, 48, 48, 24, 24, 24, 24, - 89, 89, 89, 89, 27, 19, 89, 89, 89, 49, - 19, 19, 19, 19, 5, 5, 19, 19, 19, 188, - 188, 12, 43, 12, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 188, 15, 15, 45, 154, 154, - 15, 5, 5, 5, 5, 5, 5, 154, 15, 15, - 15, 66, 66, 119, 119, 188, 188, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 156, 73, 73, - 73, 73, 174, 178, 23, 23, 156, 23, 23, 73, - 73, 97, 73, 76, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 174, 174, 73, 73, 73, 73, 86, - 86, 73, 86, 86, 86, 83, 73, 73, 73, 73, - 22, 118, 73, 73, 73, 9, 9, 9, 9, 185, - 79, 79, 187, 14, 118, 79, 79, 79, 73, 79, - 118, 118, 73, 14, 14, 35, 62, 118, 118, 118, - 118, 56, 56, 7, 14, 14, 83, 7, 14, 65, - 14, 65, 103, 35, 76, 76, 35, 22, 9, 7, - 120, 120, 7, 9, 104, 14, 93, 93, 93, 14, - 14, 64, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 155, 13, 23, 13, 23, 23, - 175, 175, 76, 76, 76, 76, 76, 76, 76, 76, - 115, 76, 76, 121, 108, 108, 182, 182, 182, 76, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 176, 176, 85, 85, 85, 14, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 113, 46, 131, 46, - 131, 131, 107, 107, 107, 107, 14, 107, 5, 5, - 131, 16, 16, 16, 16, 24, 24, 117, 24, 24, - 29, 9, 9, 18, 16, 39, 9, 92, 9, 28, - 9, 9, 131, 131, 131, 131, 37, 14, 59, 59, - 59, 59, 80, 9, 9, 9, 9, 16, 22, 184, - 184, 9, 177, 177, 9, 9, 131, 166, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, 50, 16, - 16, 50, 153, 50, 179, 179, 50, 50, 50, 9, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 20, 110, 8, 8, 130, 97, 97, 160, 9, 160, - 99, 14, 114, 8, 157, 160, 41, 131, 8, 8, - 133, 8, 96, 131, 131, 131, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 81, 81, 82, 82, 24, - 24, 138, 82, -1, 82, -1, 82, 82, 82, 149, - 82, 2, 2, 82, -1, 20, 20, 82, 20, -1, - -1, -1, -1, 17, 20, -1, 17, 17, -1, -1, - -1, 20, -1, -1, -1, -1, -1, -1, 17, -1, - -1, -1, -1, 20, 20, 20, 17, -1, 17, 17, - -1, -1, -1, -1, 17, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 17, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, - 107 + 42, 15, 19, 128, 19, 19, 48, 15, 154, 154, + 48, 48, 48, 131, 19, 48, 13, 154, 13, 48, + 48, 48, 48, 48, 48, 48, 107, 107, 107, 107, + 156, 107, 26, 86, 86, 19, 86, 86, 86, 156, + 19, 19, 19, 19, 5, 5, 19, 19, 19, 24, + 24, 24, 24, 27, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 97, 15, 15, 146, 146, 146, + 15, 5, 5, 5, 5, 5, 5, 6, 15, 15, + 15, 66, 66, 59, 59, 59, 59, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 43, 73, 73, + 73, 73, 174, 45, 23, 23, 185, 23, 23, 73, + 73, 35, 73, 76, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 174, 174, 73, 73, 73, 73, 35, + 83, 73, 35, 160, 178, 160, 73, 73, 73, 73, + 14, 160, 73, 73, 73, 9, 9, 9, 9, 22, + 14, 14, 188, 188, 56, 56, 16, 16, 16, 16, + 73, 14, 14, 187, 73, 14, 103, 188, 14, 16, + 9, 83, 9, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 14, 76, 76, 14, 14, 188, + 188, 62, 16, 89, 89, 89, 89, 104, 22, 89, + 89, 89, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 16, 16, 23, 64, 23, 23, + 119, 119, 76, 76, 76, 76, 76, 76, 76, 76, + 155, 76, 76, 107, 107, 120, 120, 108, 108, 76, + 175, 175, 14, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 7, 184, 184, 50, 7, 46, 50, + 46, 50, 113, 14, 50, 50, 50, 115, 131, 7, + 131, 131, 7, 2, 2, 176, 176, 117, 5, 5, + 131, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 9, 9, 65, 14, 65, 9, 121, 9, 18, + 9, 9, 131, 131, 131, 131, 29, 39, 24, 24, + 80, 24, 24, 9, 9, 9, 9, 92, 97, 97, + 28, 9, 177, 177, 9, 9, 131, 22, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 93, 93, + 93, 20, 166, 82, 82, 110, 37, 118, 82, 9, + 82, 153, 82, 82, 82, 130, 82, 12, 14, 82, + 118, 99, 114, 82, 157, 133, 118, 118, 9, 182, + 182, 182, 149, 118, 118, 118, 118, 131, 41, 96, + 179, 179, 138, 131, 131, 131, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 20, 20, -1, 20, + -1, 12, -1, 12, 17, 20, -1, 17, 17, 85, + 85, 85, 20, -1, -1, -1, -1, 8, 8, 17, + -1, -1, 24, 24, 20, 20, 20, 17, 8, 17, + 17, -1, -1, 8, 8, 17, 8, 79, 79, -1, + -1, -1, 79, 79, 79, -1, 79, 17 ); protected array $gotoBase = array( - 0, 0, -151, 0, 0, 203, 153, 326, 514, 8, - 0, 0, -125, 39, 18, -186, -18, 112, 146, -101, - 121, 0, 22, 2, 183, 10, 164, 190, 123, 156, - 0, 0, 0, 0, 0, -50, 0, 128, 0, 137, - 0, 88, -1, 189, 0, 201, -320, 0, -555, 181, - 486, 0, 0, 0, 0, 0, 291, 0, 0, 423, - 0, 0, 284, 0, 125, 325, 6, 0, 0, 0, - 0, 0, 0, -5, 0, 0, 1, 0, 0, -104, - 127, 185, 58, 17, -475, -75, -439, 0, 0, -89, - 0, 0, 133, 54, 0, 0, 92, -220, 0, 117, - 0, 0, 0, 307, 311, 0, 0, 404, 159, 0, - 147, 0, 0, 149, 110, 116, 0, 166, 37, -36, - 67, 103, 0, 0, 0, 0, 0, 0, 7, 0, - 144, 165, 0, 91, 0, 0, 0, 0, -190, 0, - 0, 0, 0, 0, 0, 0, -95, 0, 0, 118, - 0, 0, 0, 148, 194, 132, -9, 87, 0, 0, - 24, 0, -224, 0, 0, 0, 114, 0, 0, 0, - 0, 0, 0, 0, -33, 64, 175, 247, 234, 269, - 0, 0, 98, 0, 101, 279, 0, 281, -96, 0, + 0, 0, -289, 0, 0, 203, 227, 406, 569, 8, + 0, 0, 223, -162, 5, -186, -143, 93, 152, -101, + 102, 0, 31, 2, 206, 10, 188, 209, 142, 172, + 0, 0, 0, 0, 0, -104, 0, 166, 0, 149, + 0, 90, -1, 234, 0, 237, -329, 0, -555, -9, + 404, 0, 0, 0, 0, 0, 274, 0, 0, 198, + 0, 0, 309, 0, 141, 439, 6, 0, 0, 0, + 0, 0, 0, -5, 0, 0, 1, 0, 0, 183, + 146, -28, 4, 12, -475, 82, -535, 0, 0, 74, + 0, 0, 151, 196, 0, 0, 89, -267, 0, 108, + 0, 0, 0, 291, 314, 0, 0, 158, 162, 0, + 131, 0, 0, 145, 100, 153, 0, 156, 243, 101, + 112, 167, 0, 0, 0, 0, 0, 0, 161, 0, + 135, 165, 0, 76, 0, 0, 0, 0, -209, 0, + 0, 0, 0, 0, 0, 0, -44, 0, 0, 81, + 0, 0, 0, 157, 134, 148, -76, 77, 0, 0, + -210, 0, -224, 0, 0, 0, 129, 0, 0, 0, + 0, 0, 0, 0, -33, 84, 200, 247, 265, 305, + 0, 0, 231, 0, 36, 236, 0, 292, 7, 0, 0 ); protected array $gotoDefault = array( -32768, 521, 754, 4, 755, 949, 830, 839, 585, 539, - 715, 347, 634, 429, 1338, 925, 1154, 604, 858, 1281, - 1287, 464, 861, 325, 741, 937, 908, 909, 406, 393, + 715, 347, 634, 429, 1339, 925, 1155, 604, 858, 1282, + 1288, 464, 861, 327, 741, 937, 908, 909, 406, 393, 874, 404, 658, 635, 502, 893, 460, 885, 494, 888, 459, 897, 162, 425, 518, 901, 3, 904, 567, 935, - 987, 394, 912, 395, 686, 914, 588, 916, 917, 401, - 407, 408, 1159, 596, 631, 929, 254, 590, 930, 392, - 931, 939, 397, 399, 696, 474, 513, 507, 418, 1120, + 988, 394, 912, 395, 686, 914, 588, 916, 917, 401, + 407, 408, 1160, 596, 631, 929, 254, 590, 930, 392, + 931, 939, 397, 399, 696, 474, 513, 507, 418, 1121, 591, 618, 655, 453, 481, 629, 641, 628, 488, 441, - 424, 324, 971, 979, 495, 472, 993, 349, 1001, 749, - 1167, 649, 497, 1009, 650, 1016, 1019, 540, 541, 486, - 1031, 264, 1034, 498, 1043, 23, 676, 1048, 1049, 677, - 651, 1071, 652, 678, 653, 1073, 471, 586, 1081, 461, - 1089, 1327, 462, 1093, 262, 1096, 277, 353, 376, 442, - 1103, 1104, 9, 1110, 706, 707, 19, 273, 517, 1138, - 697, 1144, 272, 1147, 458, 1166, 457, 1236, 1238, 568, - 499, 1256, 310, 1259, 689, 514, 1264, 454, 1329, 455, - 542, 482, 332, 543, 1372, 305, 356, 329, 559, 311, - 357, 544, 483, 1335, 1343, 326, 31, 1362, 1373, 601, + 424, 326, 972, 980, 495, 472, 994, 349, 1002, 749, + 1168, 649, 497, 1010, 650, 1017, 1020, 540, 541, 486, + 1032, 264, 1035, 498, 1044, 23, 676, 1049, 1050, 677, + 651, 1072, 652, 678, 653, 1074, 471, 586, 1082, 461, + 1090, 1328, 462, 1094, 262, 1097, 277, 353, 376, 442, + 1104, 1105, 9, 1111, 706, 707, 19, 273, 517, 1139, + 697, 1145, 272, 1148, 458, 1167, 457, 1237, 1239, 568, + 499, 1257, 310, 1260, 689, 514, 1265, 454, 1330, 455, + 542, 482, 334, 543, 1373, 305, 356, 331, 559, 311, + 357, 544, 483, 1336, 1344, 328, 31, 1363, 1374, 601, 623 ); @@ -1062,27 +1054,27 @@ class Php8 extends \PhpParser\ParserAbstract 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 25, 25, 50, 69, 69, 72, 72, 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, 78, - 78, 79, 79, 80, 80, 26, 26, 27, 27, 27, - 27, 27, 88, 88, 90, 90, 83, 83, 91, 91, - 92, 92, 92, 84, 84, 87, 87, 85, 85, 93, - 94, 94, 57, 57, 65, 65, 68, 68, 68, 67, - 95, 95, 96, 58, 58, 58, 58, 97, 97, 98, - 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, - 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, - 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, - 111, 111, 112, 112, 112, 112, 112, 112, 112, 110, - 110, 110, 115, 115, 115, 115, 89, 89, 118, 118, - 118, 119, 119, 116, 116, 120, 120, 122, 122, 123, - 123, 117, 124, 124, 121, 125, 125, 125, 125, 113, - 113, 82, 82, 82, 20, 20, 20, 127, 126, 126, - 128, 128, 128, 128, 60, 129, 129, 130, 61, 132, - 132, 133, 133, 134, 134, 86, 135, 135, 135, 135, - 135, 135, 135, 135, 141, 141, 142, 142, 143, 143, - 143, 143, 143, 144, 145, 145, 140, 140, 136, 136, - 139, 139, 147, 147, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 137, 148, 148, 150, 149, 149, - 138, 138, 114, 114, 151, 151, 153, 153, 153, 152, - 152, 62, 104, 154, 154, 56, 56, 42, 42, 42, + 78, 79, 79, 80, 80, 80, 26, 26, 27, 27, + 27, 27, 27, 88, 88, 90, 90, 83, 83, 91, + 91, 92, 92, 92, 84, 84, 87, 87, 85, 85, + 93, 94, 94, 57, 57, 65, 65, 68, 68, 68, + 67, 95, 95, 96, 58, 58, 58, 58, 97, 97, + 98, 98, 99, 99, 100, 101, 101, 102, 102, 103, + 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, + 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, + 109, 111, 111, 112, 112, 112, 112, 112, 112, 112, + 110, 110, 110, 115, 115, 115, 115, 89, 89, 118, + 118, 118, 119, 119, 116, 116, 120, 120, 122, 122, + 123, 123, 117, 124, 124, 121, 125, 125, 125, 125, + 113, 113, 82, 82, 82, 20, 20, 20, 127, 126, + 126, 128, 128, 128, 128, 60, 129, 129, 130, 61, + 132, 132, 133, 133, 134, 134, 86, 135, 135, 135, + 135, 135, 135, 135, 135, 141, 141, 142, 142, 143, + 143, 143, 143, 143, 144, 145, 145, 140, 140, 136, + 136, 139, 139, 147, 147, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 137, 148, 148, 150, 149, + 149, 138, 138, 114, 114, 151, 151, 153, 153, 153, + 152, 152, 62, 104, 154, 154, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1092,20 +1084,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 161, 162, 162, 163, 155, 155, 160, 160, 164, - 165, 165, 166, 167, 168, 168, 168, 168, 19, 19, - 73, 73, 73, 73, 156, 156, 156, 156, 170, 170, - 159, 159, 159, 157, 157, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 177, 177, 177, 108, 179, - 179, 179, 179, 158, 158, 158, 158, 158, 158, 158, - 158, 59, 59, 173, 173, 173, 173, 173, 180, 180, - 169, 169, 169, 169, 181, 181, 181, 181, 181, 74, - 74, 66, 66, 66, 66, 131, 131, 131, 131, 184, - 183, 172, 172, 172, 172, 172, 172, 171, 171, 171, - 182, 182, 182, 182, 107, 178, 186, 186, 185, 185, - 187, 187, 187, 187, 187, 187, 187, 187, 175, 175, - 175, 175, 174, 189, 188, 188, 188, 188, 188, 188, - 188, 188, 190, 190, 190, 190 + 42, 42, 161, 162, 162, 163, 155, 155, 160, 160, + 164, 165, 165, 166, 167, 168, 168, 168, 168, 19, + 19, 73, 73, 73, 73, 156, 156, 156, 156, 170, + 170, 159, 159, 159, 157, 157, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 177, 177, 177, 108, + 179, 179, 179, 179, 158, 158, 158, 158, 158, 158, + 158, 158, 59, 59, 173, 173, 173, 173, 173, 180, + 180, 169, 169, 169, 169, 181, 181, 181, 181, 181, + 74, 74, 66, 66, 66, 66, 131, 131, 131, 131, + 184, 183, 172, 172, 172, 172, 172, 172, 171, 171, + 171, 182, 182, 182, 182, 107, 178, 186, 186, 185, + 185, 187, 187, 187, 187, 187, 187, 187, 187, 175, + 175, 175, 175, 174, 189, 188, 188, 188, 188, 188, + 188, 188, 188, 190, 190, 190, 190 ); protected array $ruleToLength = array( @@ -1129,50 +1121,50 @@ class Php8 extends \PhpParser\ParserAbstract 3, 1, 2, 5, 7, 9, 6, 5, 6, 3, 2, 1, 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, - 1, 3, 1, 1, 1, 8, 9, 7, 8, 7, - 6, 8, 0, 2, 0, 2, 1, 2, 1, 2, - 1, 1, 1, 0, 2, 0, 2, 0, 2, 2, - 1, 3, 1, 4, 1, 4, 1, 1, 4, 2, - 1, 3, 3, 3, 4, 4, 5, 0, 2, 4, - 3, 1, 1, 7, 0, 2, 1, 3, 3, 4, - 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, - 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, - 0, 2, 1, 1, 1, 1, 1, 1, 1, 7, - 9, 6, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, - 3, 1, 3, 3, 1, 1, 2, 1, 1, 0, - 1, 0, 2, 2, 2, 4, 3, 1, 1, 3, - 1, 2, 2, 3, 2, 3, 1, 1, 2, 3, - 1, 1, 3, 2, 0, 1, 5, 7, 5, 6, - 10, 3, 5, 1, 1, 3, 0, 2, 4, 5, - 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, - 0, 2, 0, 3, 5, 8, 1, 3, 3, 0, - 2, 2, 2, 3, 1, 0, 1, 1, 3, 3, - 3, 4, 4, 1, 1, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, + 1, 3, 1, 1, 1, 1, 8, 9, 7, 8, + 7, 6, 8, 0, 2, 0, 2, 1, 2, 1, + 2, 1, 1, 1, 0, 2, 0, 2, 0, 2, + 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, + 2, 1, 3, 3, 3, 4, 4, 5, 0, 2, + 4, 3, 1, 1, 7, 0, 2, 1, 3, 3, + 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, + 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, + 3, 0, 2, 1, 1, 1, 1, 1, 1, 1, + 7, 9, 6, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, + 3, 3, 1, 3, 3, 1, 1, 2, 1, 1, + 0, 1, 0, 2, 2, 2, 4, 3, 1, 1, + 3, 1, 2, 2, 3, 2, 3, 1, 1, 2, + 3, 1, 1, 3, 2, 0, 1, 5, 7, 5, + 6, 10, 3, 5, 1, 1, 3, 0, 2, 4, + 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, + 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, + 3, 0, 2, 0, 3, 5, 8, 1, 3, 3, + 0, 2, 2, 2, 3, 1, 0, 1, 1, 3, + 3, 3, 4, 4, 1, 1, 2, 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, 2, 8, 9, 8, 9, 9, 10, 9, - 10, 8, 3, 2, 2, 1, 1, 0, 4, 2, - 1, 3, 2, 1, 2, 2, 2, 4, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, - 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, - 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 4, 1, 4, 4, 0, - 1, 1, 1, 3, 3, 1, 4, 2, 2, 1, - 3, 1, 4, 3, 3, 3, 3, 1, 3, 1, - 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, - 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, - 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, - 6, 3, 1, 1, 2, 1 + 2, 2, 2, 2, 3, 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, 2, 8, 9, 8, 9, 9, 10, + 9, 10, 8, 3, 2, 2, 1, 1, 0, 4, + 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, + 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 5, 3, 3, + 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, + 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, + 1, 1, 3, 1, 1, 1, 4, 1, 4, 4, + 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, + 1, 3, 1, 4, 3, 3, 3, 3, 1, 3, + 1, 1, 3, 1, 1, 4, 1, 1, 1, 3, + 1, 1, 2, 1, 3, 4, 3, 2, 0, 2, + 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, + 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1606,880 +1598,880 @@ protected function initReduceCallbacks(): void { $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 205 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 206 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, 207 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 208 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(7-2)); }, - 208 => static function ($self, $stackPos) { + 209 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(8-3)); }, - 209 => static function ($self, $stackPos) { + 210 => static function ($self, $stackPos) { $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkInterface($self->semValue, $stackPos-(7-3)); }, - 210 => static function ($self, $stackPos) { + 211 => static function ($self, $stackPos) { $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 211 => static function ($self, $stackPos) { + 212 => static function ($self, $stackPos) { $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkEnum($self->semValue, $stackPos-(8-3)); }, - 212 => static function ($self, $stackPos) { + 213 => static function ($self, $stackPos) { $self->semValue = null; }, - 213 => static function ($self, $stackPos) { + 214 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 214 => static function ($self, $stackPos) { + 215 => static function ($self, $stackPos) { $self->semValue = null; }, - 215 => static function ($self, $stackPos) { + 216 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 216 => static function ($self, $stackPos) { + 217 => static function ($self, $stackPos) { $self->semValue = 0; }, - 217 => null, 218 => null, - 219 => static function ($self, $stackPos) { + 219 => null, + 220 => static function ($self, $stackPos) { $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 220 => static function ($self, $stackPos) { + 221 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 221 => static function ($self, $stackPos) { + 222 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 222 => static function ($self, $stackPos) { + 223 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 223 => static function ($self, $stackPos) { + 224 => static function ($self, $stackPos) { $self->semValue = null; }, - 224 => static function ($self, $stackPos) { + 225 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 225 => static function ($self, $stackPos) { + 226 => static function ($self, $stackPos) { $self->semValue = array(); }, - 226 => static function ($self, $stackPos) { + 227 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 227 => static function ($self, $stackPos) { + 228 => static function ($self, $stackPos) { $self->semValue = array(); }, - 228 => static function ($self, $stackPos) { + 229 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 229 => null, - 230 => static function ($self, $stackPos) { + 230 => null, + 231 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 231 => static function ($self, $stackPos) { + 232 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 232 => null, - 233 => static function ($self, $stackPos) { + 233 => null, + 234 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 234 => null, - 235 => static function ($self, $stackPos) { + 235 => null, + 236 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 236 => static function ($self, $stackPos) { + 237 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 237 => static function ($self, $stackPos) { + 238 => static function ($self, $stackPos) { $self->semValue = null; }, - 238 => static function ($self, $stackPos) { + 239 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 239 => null, - 240 => static function ($self, $stackPos) { + 240 => null, + 241 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 241 => static function ($self, $stackPos) { + 242 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 242 => static function ($self, $stackPos) { + 243 => static function ($self, $stackPos) { $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 243 => static function ($self, $stackPos) { + 244 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 244 => static function ($self, $stackPos) { + 245 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 245 => static function ($self, $stackPos) { + 246 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 246 => static function ($self, $stackPos) { + 247 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(5-3)]; }, - 247 => static function ($self, $stackPos) { + 248 => static function ($self, $stackPos) { $self->semValue = array(); }, - 248 => static function ($self, $stackPos) { + 249 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 249 => static function ($self, $stackPos) { + 250 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 250 => static function ($self, $stackPos) { + 251 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 251 => null, 252 => null, - 253 => static function ($self, $stackPos) { + 253 => null, + 254 => static function ($self, $stackPos) { $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 254 => static function ($self, $stackPos) { + 255 => static function ($self, $stackPos) { $self->semValue = []; }, - 255 => null, - 256 => static function ($self, $stackPos) { + 256 => null, + 257 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 257 => static function ($self, $stackPos) { + 258 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 258 => static function ($self, $stackPos) { + 259 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 259 => static function ($self, $stackPos) { + 260 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 260 => static function ($self, $stackPos) { + 261 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 261 => static function ($self, $stackPos) { + 262 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 262 => static function ($self, $stackPos) { + 263 => static function ($self, $stackPos) { $self->semValue = array(); }, - 263 => static function ($self, $stackPos) { + 264 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 264 => static function ($self, $stackPos) { + 265 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 265 => static function ($self, $stackPos) { + 266 => static function ($self, $stackPos) { $self->semValue = array(); }, - 266 => static function ($self, $stackPos) { + 267 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 267 => static function ($self, $stackPos) { + 268 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 268 => static function ($self, $stackPos) { + 269 => static function ($self, $stackPos) { $self->semValue = null; }, - 269 => static function ($self, $stackPos) { + 270 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 270 => static function ($self, $stackPos) { + 271 => static function ($self, $stackPos) { $self->semValue = null; }, - 271 => static function ($self, $stackPos) { + 272 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 272 => static function ($self, $stackPos) { + 273 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 273 => static function ($self, $stackPos) { + 274 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-2)], true); }, - 274 => static function ($self, $stackPos) { + 275 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 275 => static function ($self, $stackPos) { + 276 => static function ($self, $stackPos) { $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); }, - 276 => null, - 277 => static function ($self, $stackPos) { + 277 => null, + 278 => static function ($self, $stackPos) { $self->semValue = array(); }, - 278 => static function ($self, $stackPos) { + 279 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 279 => static function ($self, $stackPos) { + 280 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 280 => static function ($self, $stackPos) { + 281 => static function ($self, $stackPos) { $self->semValue = 0; }, - 281 => static function ($self, $stackPos) { + 282 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 282 => static function ($self, $stackPos) { + 283 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 283 => static function ($self, $stackPos) { + 284 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 284 => static function ($self, $stackPos) { + 285 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 285 => static function ($self, $stackPos) { + 286 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 286 => static function ($self, $stackPos) { + 287 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 287 => static function ($self, $stackPos) { + 288 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 288 => static function ($self, $stackPos) { + 289 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 289 => static function ($self, $stackPos) { + 290 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); }, - 290 => static function ($self, $stackPos) { + 291 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); }, - 291 => static function ($self, $stackPos) { + 292 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, - 292 => null, - 293 => static function ($self, $stackPos) { + 293 => null, + 294 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 294 => static function ($self, $stackPos) { + 295 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 295 => null, 296 => null, - 297 => static function ($self, $stackPos) { + 297 => null, + 298 => static function ($self, $stackPos) { $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 298 => static function ($self, $stackPos) { + 299 => static function ($self, $stackPos) { $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 299 => static function ($self, $stackPos) { + 300 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 300 => static function ($self, $stackPos) { + 301 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 301 => null, - 302 => static function ($self, $stackPos) { + 302 => null, + 303 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 303 => static function ($self, $stackPos) { + 304 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 304 => static function ($self, $stackPos) { + 305 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 305 => null, - 306 => static function ($self, $stackPos) { + 306 => null, + 307 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 307 => static function ($self, $stackPos) { + 308 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 308 => static function ($self, $stackPos) { + 309 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 309 => static function ($self, $stackPos) { + 310 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 310 => static function ($self, $stackPos) { + 311 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 311 => static function ($self, $stackPos) { + 312 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 312 => static function ($self, $stackPos) { + 313 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 313 => static function ($self, $stackPos) { + 314 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 314 => static function ($self, $stackPos) { + 315 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 315 => null, - 316 => static function ($self, $stackPos) { + 316 => null, + 317 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 317 => static function ($self, $stackPos) { + 318 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 318 => null, - 319 => static function ($self, $stackPos) { + 319 => null, + 320 => static function ($self, $stackPos) { $self->semValue = null; }, - 320 => null, - 321 => static function ($self, $stackPos) { + 321 => null, + 322 => static function ($self, $stackPos) { $self->semValue = null; }, - 322 => static function ($self, $stackPos) { + 323 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 323 => static function ($self, $stackPos) { + 324 => static function ($self, $stackPos) { $self->semValue = null; }, - 324 => static function ($self, $stackPos) { + 325 => static function ($self, $stackPos) { $self->semValue = array(); }, - 325 => static function ($self, $stackPos) { + 326 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 326 => static function ($self, $stackPos) { + 327 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 327 => static function ($self, $stackPos) { + 328 => static function ($self, $stackPos) { $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 328 => static function ($self, $stackPos) { + 329 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 329 => static function ($self, $stackPos) { + 330 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 330 => static function ($self, $stackPos) { + 331 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 331 => static function ($self, $stackPos) { + 332 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 332 => static function ($self, $stackPos) { + 333 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 333 => static function ($self, $stackPos) { + 334 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, - 334 => null, - 335 => static function ($self, $stackPos) { + 335 => null, + 336 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 336 => static function ($self, $stackPos) { + 337 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 337 => null, 338 => null, - 339 => static function ($self, $stackPos) { + 339 => null, + 340 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 340 => static function ($self, $stackPos) { + 341 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 341 => static function ($self, $stackPos) { + 342 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 342 => static function ($self, $stackPos) { + 343 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 343 => static function ($self, $stackPos) { + 344 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 344 => static function ($self, $stackPos) { + 345 => static function ($self, $stackPos) { $self->semValue = array(); }, - 345 => static function ($self, $stackPos) { + 346 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 346 => static function ($self, $stackPos) { + 347 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 347 => static function ($self, $stackPos) { + 348 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); $self->checkPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); }, - 348 => static function ($self, $stackPos) { + 349 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 349 => static function ($self, $stackPos) { + 350 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 350 => static function ($self, $stackPos) { + 351 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 351 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, 352 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 353 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 354 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = null; /* will be skipped */ }, 355 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = array(); }, 356 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 357 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + $self->semValue = array(); }, 358 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 359 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 360 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 361 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 362 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 363 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 364 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 364 => null, - 365 => static function ($self, $stackPos) { + 365 => null, + 366 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 366 => static function ($self, $stackPos) { + 367 => static function ($self, $stackPos) { $self->semValue = null; }, - 367 => null, 368 => null, - 369 => static function ($self, $stackPos) { + 369 => null, + 370 => static function ($self, $stackPos) { $self->semValue = 0; }, - 370 => static function ($self, $stackPos) { + 371 => static function ($self, $stackPos) { $self->semValue = 0; }, - 371 => null, 372 => null, - 373 => static function ($self, $stackPos) { + 373 => null, + 374 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 374 => static function ($self, $stackPos) { + 375 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 375 => static function ($self, $stackPos) { + 376 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 376 => static function ($self, $stackPos) { + 377 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 377 => static function ($self, $stackPos) { + 378 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 378 => static function ($self, $stackPos) { + 379 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 379 => static function ($self, $stackPos) { + 380 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 380 => static function ($self, $stackPos) { + 381 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 381 => static function ($self, $stackPos) { + 382 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 382 => static function ($self, $stackPos) { + 383 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 383 => static function ($self, $stackPos) { + 384 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 384 => null, - 385 => static function ($self, $stackPos) { + 385 => null, + 386 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 386 => static function ($self, $stackPos) { + 387 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 387 => static function ($self, $stackPos) { + 388 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 388 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 389 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 390 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semValue = []; }, - 391 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 392 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semValue = []; }, - 393 => static function ($self, $stackPos) { + 394 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); }, - 394 => static function ($self, $stackPos) { + 395 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 395 => static function ($self, $stackPos) { + 396 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 396 => static function ($self, $stackPos) { - $self->semValue = null; - }, 397 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = null; }, 398 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 399 => static function ($self, $stackPos) { - $self->semValue = 0; + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 400 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 401 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 401 => null, 402 => null, - 403 => static function ($self, $stackPos) { + 403 => null, + 404 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 404 => static function ($self, $stackPos) { + 405 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 405 => static function ($self, $stackPos) { + 406 => static function ($self, $stackPos) { $self->semValue = array(); }, - 406 => null, 407 => null, - 408 => static function ($self, $stackPos) { + 408 => null, + 409 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 409 => static function ($self, $stackPos) { + 410 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 410 => static function ($self, $stackPos) { + 411 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 411 => static function ($self, $stackPos) { + 412 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 412 => static function ($self, $stackPos) { + 413 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 413 => null, 414 => null, - 415 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, + 415 => null, 416 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 417 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 418 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 419 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 420 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 421 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 422 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 423 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 424 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 425 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 426 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 438 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 439 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 440 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 441 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 442 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 450 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 452 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 463 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 464 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 465 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 466 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 467 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 475 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 476 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 477 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 478 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 478 => static function ($self, $stackPos) { + 479 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 479 => static function ($self, $stackPos) { + 480 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 480 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 481 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 483 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 483 => static function ($self, $stackPos) { + 484 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 484 => static function ($self, $stackPos) { + 485 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 485 => null, - 486 => static function ($self, $stackPos) { + 486 => null, + 487 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 487 => static function ($self, $stackPos) { + 488 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 488 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 489 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 490 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 502 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 505 => null, 506 => null, - 507 => static function ($self, $stackPos) { + 507 => null, + 508 => static function ($self, $stackPos) { $self->semValue = array(); }, - 508 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 509 => null, - 510 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, + 510 => null, 511 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 512 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 513 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 514 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 515 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2488,304 +2480,307 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 517 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 518 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 519 => null, - 520 => static function ($self, $stackPos) { + 519 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 520 => null, 521 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 522 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 523 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 524 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 524 => null, 525 => null, - 526 => static function ($self, $stackPos) { + 526 => null, + 527 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 527 => static function ($self, $stackPos) { + 528 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 528 => null, 529 => null, - 530 => static function ($self, $stackPos) { + 530 => null, + 531 => static function ($self, $stackPos) { $self->semValue = array(); }, - 531 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 532 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 533 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = array(); }, - 534 => null, - 535 => static function ($self, $stackPos) { + 535 => null, + 536 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 536 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 537 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 540 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 541 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 542 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 543 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 544 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 545 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 546 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 547 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 548 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 549 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 550 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 551 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 552 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 553 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 554 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 555 => null, 556 => null, 557 => null, - 558 => static function ($self, $stackPos) { + 558 => null, + 559 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 559 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 560 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 561 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = null; }, - 562 => null, 563 => null, - 564 => static function ($self, $stackPos) { + 564 => null, + 565 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 565 => null, 566 => null, 567 => null, 568 => null, 569 => null, 570 => null, - 571 => static function ($self, $stackPos) { + 571 => null, + 572 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 572 => null, 573 => null, 574 => null, - 575 => static function ($self, $stackPos) { + 575 => null, + 576 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 576 => null, - 577 => static function ($self, $stackPos) { + 577 => null, + 578 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 578 => static function ($self, $stackPos) { + 579 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 579 => static function ($self, $stackPos) { + 580 => static function ($self, $stackPos) { $self->semValue = null; }, - 580 => null, 581 => null, 582 => null, - 583 => static function ($self, $stackPos) { + 583 => null, + 584 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 584 => static function ($self, $stackPos) { + 585 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 585 => null, - 586 => static function ($self, $stackPos) { + 586 => null, + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 587 => static function ($self, $stackPos) { + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 588 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 589 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 590 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 591 => null, - 592 => static function ($self, $stackPos) { + 592 => null, + 593 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 593 => static function ($self, $stackPos) { + 594 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 594 => static function ($self, $stackPos) { + 595 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 595 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 597 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 597 => null, - 598 => static function ($self, $stackPos) { + 598 => null, + 599 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 599 => null, 600 => null, - 601 => static function ($self, $stackPos) { + 601 => null, + 602 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 602 => null, - 603 => static function ($self, $stackPos) { + 603 => null, + 604 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 604 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 605 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 606 => null, - 607 => static function ($self, $stackPos) { + 607 => null, + 608 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 608 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 609 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 610 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 611 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 612 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 613 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 615 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 616 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 617 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 618 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 619 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 620 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 621 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 622 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 623 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 624 => null, - 625 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 624 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 625 => null, 626 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 627 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 628 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 629 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 630 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 631 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 632 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 633 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 634 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 635 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 635 => null, + 636 => null, ]; } } diff --git a/test/code/parser/stmt/function/exit_die_function.test b/test/code/parser/stmt/function/exit_die_function.test new file mode 100644 index 0000000000..c90c8190a7 --- /dev/null +++ b/test/code/parser/stmt/function/exit_die_function.test @@ -0,0 +1,90 @@ +Declaring exit and die function stubs +----- + Date: Tue, 8 Oct 2024 20:51:32 +0200 Subject: [PATCH 383/428] Release PHP-Parser 5.3.1 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d0d629eb2..d4f0e6e2c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Version 5.3.1 (2024-10-08) +-------------------------- + +### Added + +* Added support for declaring functions with name `exit` or `die`, to allow their use in stubs. + Version 5.3.0 (2024-09-29) -------------------------- From 954f7a411f9411b16ee08cd8ad34914e20bc3906 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Tue, 5 Nov 2024 17:21:40 +0100 Subject: [PATCH 384/428] More precise `toLowerString()` return type --- lib/PhpParser/Node/Identifier.php | 2 +- lib/PhpParser/Node/Name.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/Node/Identifier.php b/lib/PhpParser/Node/Identifier.php index 01eebe5ca4..21473fad18 100644 --- a/lib/PhpParser/Node/Identifier.php +++ b/lib/PhpParser/Node/Identifier.php @@ -53,7 +53,7 @@ public function toString(): string { /** * Get lowercased identifier as string. * - * @psalm-return non-empty-string + * @psalm-return non-empty-string&lowercase-string * @return string Lowercased identifier as string */ public function toLowerString(): string { diff --git a/lib/PhpParser/Node/Name.php b/lib/PhpParser/Node/Name.php index aa2b90eb22..932080b544 100644 --- a/lib/PhpParser/Node/Name.php +++ b/lib/PhpParser/Node/Name.php @@ -129,7 +129,7 @@ public function toCodeString(): string { * Returns lowercased string representation of the name, without taking the name type into * account (e.g., no leading backslash for fully qualified names). * - * @psalm-return non-empty-string + * @psalm-return non-empty-string&lowercase-string * @return string Lowercased string representation */ public function toLowerString(): string { From 05ed79595b4eb1e5c8ee634a8eb66b4eec3ec80c Mon Sep 17 00:00:00 2001 From: Jorg Sowa Date: Mon, 18 Nov 2024 22:47:37 +0100 Subject: [PATCH 385/428] Removed unrecheable statement --- lib/PhpParser/ParserAbstract.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 3d1e4eed20..45902037ba 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -411,8 +411,6 @@ protected function doParse(): ?array { $rule = $state - $this->numNonLeafStates; } } - - throw new \RuntimeException('Reached end of parser loop'); } protected function emitError(Error $error): void { From 25828ea9527430faaeb7498a779526df69403894 Mon Sep 17 00:00:00 2001 From: Jorg Sowa Date: Mon, 18 Nov 2024 22:13:52 +0100 Subject: [PATCH 386/428] Updated target.php to new PHP-Parser version --- tools/fuzzing/target.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/fuzzing/target.php b/tools/fuzzing/target.php index 8cbd619c16..c1bb426ed4 100644 --- a/tools/fuzzing/target.php +++ b/tools/fuzzing/target.php @@ -104,7 +104,7 @@ public function leaveNode(PhpParser\Node $node) { $stmts = $parser->parse($input); $printed = $prettyPrinter->prettyPrintFile($stmts); - $visitor->setTokens($lexer->getTokens()); + $visitor->setTokens($lexer->tokenize($input)); $stmts = $traverser->traverse($stmts); if ($visitor->hasProblematicConstruct) { return; @@ -116,7 +116,7 @@ public function leaveNode(PhpParser\Node $node) { throw new Error("Failed to parse pretty printer output"); } - $visitor->setTokens($lexer->getTokens()); + $visitor->setTokens($lexer->tokenize($printed)); $printedStmts = $traverser->traverse($printedStmts); $same = $nodeDumper->dump($stmts) == $nodeDumper->dump($printedStmts); if (!$same && !preg_match('/<\?php<\?php/i', $input)) { From 74d3f7fc24b2cbf4707655f17fae919478db649d Mon Sep 17 00:00:00 2001 From: Jorg Sowa Date: Sun, 24 Nov 2024 01:37:31 +0100 Subject: [PATCH 387/428] Removed reudndant token generation --- tools/fuzzing/target.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/fuzzing/target.php b/tools/fuzzing/target.php index c1bb426ed4..7638af23c7 100644 --- a/tools/fuzzing/target.php +++ b/tools/fuzzing/target.php @@ -104,7 +104,7 @@ public function leaveNode(PhpParser\Node $node) { $stmts = $parser->parse($input); $printed = $prettyPrinter->prettyPrintFile($stmts); - $visitor->setTokens($lexer->tokenize($input)); + $visitor->setTokens($parser->getTokens()); $stmts = $traverser->traverse($stmts); if ($visitor->hasProblematicConstruct) { return; @@ -116,7 +116,7 @@ public function leaveNode(PhpParser\Node $node) { throw new Error("Failed to parse pretty printer output"); } - $visitor->setTokens($lexer->tokenize($printed)); + $visitor->setTokens($parser->getTokens()); $printedStmts = $traverser->traverse($printedStmts); $same = $nodeDumper->dump($stmts) == $nodeDumper->dump($printedStmts); if (!$same && !preg_match('/<\?php<\?php/i', $input)) { From 469377f4a8a55f75741549e3befab990a1f0600d Mon Sep 17 00:00:00 2001 From: Nathanael Esayeas Date: Fri, 6 Dec 2024 15:00:17 -0600 Subject: [PATCH 388/428] Fix classmap authoritative autoloading (#1046) This patch resolves #1045 by adding dummy class definitions behind if (false) checks that are picked up the authoritative autoloader. --- lib/PhpParser/Node/Expr/ArrayItem.php | 8 +++ lib/PhpParser/Node/Expr/ClosureUse.php | 8 +++ lib/PhpParser/Node/Scalar/DNumber.php | 8 +++ lib/PhpParser/Node/Scalar/Encapsed.php | 8 +++ .../Node/Scalar/EncapsedStringPart.php | 10 ++++ lib/PhpParser/Node/Scalar/LNumber.php | 8 +++ lib/PhpParser/Node/Stmt/DeclareDeclare.php | 10 ++++ lib/PhpParser/Node/Stmt/PropertyProperty.php | 10 ++++ lib/PhpParser/Node/Stmt/StaticVar.php | 8 +++ lib/PhpParser/Node/Stmt/UseUse.php | 10 ++++ phpstan-baseline.neon | 50 +++++++++++++++++++ 11 files changed, 138 insertions(+) diff --git a/lib/PhpParser/Node/Expr/ArrayItem.php b/lib/PhpParser/Node/Expr/ArrayItem.php index 490ac93793..be9d0708d1 100644 --- a/lib/PhpParser/Node/Expr/ArrayItem.php +++ b/lib/PhpParser/Node/Expr/ArrayItem.php @@ -1,3 +1,11 @@ Date: Wed, 11 Dec 2024 09:37:29 +0100 Subject: [PATCH 389/428] Promoted properties with hooks do not need visibility modifier --- lib/PhpParser/Node/Param.php | 13 +++++++++++-- test/PhpParser/Node/ParamTest.php | 14 ++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index a277ca0a15..57d15b7b0c 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -68,11 +68,20 @@ public function getType(): string { * Whether this parameter uses constructor property promotion. */ public function isPromoted(): bool { - return $this->flags !== 0; + return $this->flags !== 0 || $this->hooks !== []; } public function isPublic(): bool { - return (bool) ($this->flags & Modifiers::PUBLIC); + $public = (bool) ($this->flags & Modifiers::PUBLIC); + if ($public) { + return true; + } + + if ($this->hooks === []) { + return false; + } + + return ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } public function isProtected(): bool { diff --git a/test/PhpParser/Node/ParamTest.php b/test/PhpParser/Node/ParamTest.php index 93bbf92cdb..c488b659c1 100644 --- a/test/PhpParser/Node/ParamTest.php +++ b/test/PhpParser/Node/ParamTest.php @@ -47,4 +47,18 @@ public function testSetVisibility() { $node->flags = Modifiers::PUBLIC_SET; $this->assertTrue($node->isPublicSet()); } + + public function testPromotedPropertyWithoutVisibilityModifier(): void { + $node = new Param(new Variable('foo')); + $get = new PropertyHook('get', null); + $node->hooks[] = $get; + + $this->assertTrue($node->isPromoted()); + $this->assertTrue($node->isPublic()); + } + + public function testNonPromotedPropertyIsNotPublic(): void { + $node = new Param(new Variable('foo')); + $this->assertFalse($node->isPublic()); + } } From 73b160f8c45f283b0b2094c78f94c849c57afbfd Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 11 Dec 2024 10:55:30 +0100 Subject: [PATCH 390/428] Add flags helper methods `Property::isAbstract()` and `Property::isFinal()` --- lib/PhpParser/Node/Stmt/Property.php | 14 ++++++++++++++ test/PhpParser/Node/Stmt/PropertyTest.php | 10 ++++++++++ 2 files changed, 24 insertions(+) diff --git a/lib/PhpParser/Node/Stmt/Property.php b/lib/PhpParser/Node/Stmt/Property.php index 3b238c76a9..03e45a9526 100644 --- a/lib/PhpParser/Node/Stmt/Property.php +++ b/lib/PhpParser/Node/Stmt/Property.php @@ -80,6 +80,20 @@ public function isReadonly(): bool { return (bool) ($this->flags & Modifiers::READONLY); } + /** + * Whether the property is abstract. + */ + public function isAbstract(): bool { + return (bool) ($this->flags & Modifiers::ABSTRACT); + } + + /** + * Whether the property is final. + */ + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); + } + /** * Whether the property has explicit public(set) visibility. */ diff --git a/test/PhpParser/Node/Stmt/PropertyTest.php b/test/PhpParser/Node/Stmt/PropertyTest.php index 3b4f31c730..4eb252e008 100644 --- a/test/PhpParser/Node/Stmt/PropertyTest.php +++ b/test/PhpParser/Node/Stmt/PropertyTest.php @@ -57,4 +57,14 @@ public function testSetVisibility() { $node = new Property(Modifiers::PUBLIC_SET, []); $this->assertTrue($node->isPublicSet()); } + + public function testIsFinal() { + $node = new Property(Modifiers::FINAL, []); + $this->assertTrue($node->isFinal()); + } + + public function testIsAbstract() { + $node = new Property(Modifiers::ABSTRACT, []); + $this->assertTrue($node->isAbstract()); + } } From f43324a074bd9968f516a6fa748b25e48226b801 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 11 Dec 2024 11:04:32 +0100 Subject: [PATCH 391/428] Missing flags subNode description in PropertyHook constructor PHPDoc --- lib/PhpParser/Node/PropertyHook.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PhpParser/Node/PropertyHook.php b/lib/PhpParser/Node/PropertyHook.php index a8cde850f7..9ae77a2b6e 100644 --- a/lib/PhpParser/Node/PropertyHook.php +++ b/lib/PhpParser/Node/PropertyHook.php @@ -30,6 +30,7 @@ class PropertyHook extends NodeAbstract implements FunctionLike { * params?: Param[], * attrGroups?: AttributeGroup[], * } $subNodes Array of the following optional subnodes: + * 'flags => 0 : Flags * 'byRef' => false : Whether hook returns by reference * 'params' => array(): Parameters * 'attrGroups' => array(): PHP attribute groups From f212bb7afbe3f122681acbb70983d49721a76e3b Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 11 Dec 2024 11:04:44 +0100 Subject: [PATCH 392/428] Add `PropertyHook::isFinal()` helper method with tests --- lib/PhpParser/Node/PropertyHook.php | 8 ++++++ test/PhpParser/Node/PropertyHookTest.php | 34 ++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 test/PhpParser/Node/PropertyHookTest.php diff --git a/lib/PhpParser/Node/PropertyHook.php b/lib/PhpParser/Node/PropertyHook.php index 9ae77a2b6e..fab0e9d39a 100644 --- a/lib/PhpParser/Node/PropertyHook.php +++ b/lib/PhpParser/Node/PropertyHook.php @@ -2,6 +2,7 @@ namespace PhpParser\Node; +use PhpParser\Modifiers; use PhpParser\Node\Stmt\Return_; use PhpParser\NodeAbstract; @@ -58,6 +59,13 @@ public function getReturnType() { return null; } + /** + * Whether the property hook is final. + */ + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); + } + public function getStmts(): ?array { if ($this->body instanceof Expr) { return [new Return_($this->body)]; diff --git a/test/PhpParser/Node/PropertyHookTest.php b/test/PhpParser/Node/PropertyHookTest.php new file mode 100644 index 0000000000..c8bd07cffb --- /dev/null +++ b/test/PhpParser/Node/PropertyHookTest.php @@ -0,0 +1,34 @@ + constant(Modifiers::class . '::' . strtoupper($modifier)), + ] + ); + + $this->assertTrue($node->{'is' . $modifier}()); + } + + public function testNoModifiers(): void { + $node = new PropertyHook('get', null); + + $this->assertFalse($node->isFinal()); + } + + public static function provideModifiers() { + return [ + ['final'], + ]; + } +} From b396e9e0d6af67abc74ef8b67b5d37ed6ef72e52 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 24 Nov 2024 18:41:55 +0100 Subject: [PATCH 393/428] Add missing newline after usage message --- tools/fuzzing/generateCorpus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/fuzzing/generateCorpus.php b/tools/fuzzing/generateCorpus.php index 900ba462a1..712e9177ea 100644 --- a/tools/fuzzing/generateCorpus.php +++ b/tools/fuzzing/generateCorpus.php @@ -8,7 +8,7 @@ $inputDirs = [$testDir . '/code/parser', $testDir . '/code/prettyPrinter']; if ($argc < 2) { - echo "Usage: php generateCorpus.php dir/"; + echo "Usage: php generateCorpus.php dir/\n"; exit(1); } From 62dee28027ca177ae39f13ea5a425161d9aaf92f Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 11 Dec 2024 11:32:42 +0100 Subject: [PATCH 394/428] Rename ParserAbstract method checkPropertyHookList to checkEmptyPropertyHookList --- grammar/php.y | 4 ++-- lib/PhpParser/Parser/Php8.php | 4 ++-- lib/PhpParser/ParserAbstract.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index b962a5e079..e825d038e3 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -840,7 +840,7 @@ class_statement: #if PHP8 | optional_attributes variable_modifiers optional_type_without_static property_declaration_list '{' property_hook_list '}' { $$ = new Stmt\Property($2, $4, attributes(), $3, $1, $6); - $this->checkPropertyHookList($6, #5); } + $this->checkEmptyPropertyHookList($6, #5); } #endif | optional_attributes method_modifiers T_CONST class_const_list semi { $$ = new Stmt\ClassConst($4, $2, attributes(), $1); @@ -949,7 +949,7 @@ property_hook_list: optional_property_hook_list: /* empty */ { $$ = []; } #if PHP8 - | '{' property_hook_list '}' { $$ = $2; $this->checkPropertyHookList($2, #1); } + | '{' property_hook_list '}' { $$ = $2; $this->checkEmptyPropertyHookList($2, #1); } #endif ; diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index e1aa4b1f3e..f9cb6338fa 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1993,7 +1993,7 @@ protected function initReduceCallbacks(): void { }, 348 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); - $self->checkPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); + $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); }, 349 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); @@ -2122,7 +2122,7 @@ protected function initReduceCallbacks(): void { $self->semValue = []; }, 394 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); + $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); }, 395 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 45902037ba..6921a66fe9 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -1159,7 +1159,7 @@ protected function checkUseUse(UseItem $node, int $namePos): void { } /** @param PropertyHook[] $hooks */ - protected function checkPropertyHookList(array $hooks, int $hookPos): void { + protected function checkEmptyPropertyHookList(array $hooks, int $hookPos): void { if (empty($hooks)) { $this->emitError(new Error( 'Property hook list cannot be empty', $this->getAttributesAt($hookPos))); From d20a197ca73fc07d1aa980509b49f4ce268a22a4 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 11 Dec 2024 11:34:55 +0100 Subject: [PATCH 395/428] Emit error - Multiple properties cannot share the same hooks Closes GH-1052. --- grammar/php.y | 1 + lib/PhpParser/Parser/Php8.php | 1 + lib/PhpParser/ParserAbstract.php | 7 ++ .../parser/stmt/class/property_hooks.test | 113 ++++++++++++++++++ 4 files changed, 122 insertions(+) diff --git a/grammar/php.y b/grammar/php.y index e825d038e3..2545f7d845 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -840,6 +840,7 @@ class_statement: #if PHP8 | optional_attributes variable_modifiers optional_type_without_static property_declaration_list '{' property_hook_list '}' { $$ = new Stmt\Property($2, $4, attributes(), $3, $1, $6); + $this->checkPropertyHooksForMultiProperty($$, #5); $this->checkEmptyPropertyHookList($6, #5); } #endif | optional_attributes method_modifiers T_CONST class_const_list semi diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index f9cb6338fa..e97914a5f8 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1993,6 +1993,7 @@ protected function initReduceCallbacks(): void { }, 348 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); + $self->checkPropertyHooksForMultiProperty($self->semValue, $stackPos-(7-5)); $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); }, 349 => static function ($self, $stackPos) { diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 6921a66fe9..475b705e80 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -1158,6 +1158,13 @@ protected function checkUseUse(UseItem $node, int $namePos): void { } } + protected function checkPropertyHooksForMultiProperty(Property $property, int $hookPos): void { + if (count($property->props) > 1) { + $this->emitError(new Error( + 'Cannot use hooks when declaring multiple properties', $this->getAttributesAt($hookPos))); + } + } + /** @param PropertyHook[] $hooks */ protected function checkEmptyPropertyHookList(array $hooks, int $hookPos): void { if (empty($hooks)) { diff --git a/test/code/parser/stmt/class/property_hooks.test b/test/code/parser/stmt/class/property_hooks.test index f53211c6ff..c3a6c800bc 100644 --- a/test/code/parser/stmt/class/property_hooks.test +++ b/test/code/parser/stmt/class/property_hooks.test @@ -523,3 +523,116 @@ array( ) ) ) +----- + Date: Fri, 27 Dec 2024 16:30:03 +0100 Subject: [PATCH 396/428] Make PropertyHook::getStmts() less incorrect Still missing the assignment to the correct property, but at least we're not returning from a non-void function now... --- lib/PhpParser/Node/PropertyHook.php | 11 ++++++++++- test/PhpParser/Node/PropertyHookTest.php | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/Node/PropertyHook.php b/lib/PhpParser/Node/PropertyHook.php index fab0e9d39a..d8a77fe261 100644 --- a/lib/PhpParser/Node/PropertyHook.php +++ b/lib/PhpParser/Node/PropertyHook.php @@ -3,6 +3,7 @@ namespace PhpParser\Node; use PhpParser\Modifiers; +use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\Return_; use PhpParser\NodeAbstract; @@ -68,7 +69,15 @@ public function isFinal(): bool { public function getStmts(): ?array { if ($this->body instanceof Expr) { - return [new Return_($this->body)]; + $name = $this->name->toLowerString(); + if ($name === 'get') { + return [new Return_($this->body)]; + } + if ($name === 'set') { + // TODO: This should generate $this->prop = $expr, but we don't know the property name. + return [new Expression($this->body)]; + } + throw new \LogicException('Unknown property hook "' . $name . '"'); } return $this->body; } diff --git a/test/PhpParser/Node/PropertyHookTest.php b/test/PhpParser/Node/PropertyHookTest.php index c8bd07cffb..42ca1cd2cf 100644 --- a/test/PhpParser/Node/PropertyHookTest.php +++ b/test/PhpParser/Node/PropertyHookTest.php @@ -3,6 +3,9 @@ namespace PhpParser\Node; use PhpParser\Modifiers; +use PhpParser\Node\Expr\Variable; +use PhpParser\Node\Stmt\Expression; +use PhpParser\Node\Stmt\Return_; class PropertyHookTest extends \PHPUnit\Framework\TestCase { /** @@ -31,4 +34,24 @@ public static function provideModifiers() { ['final'], ]; } + + public function testGetStmts(): void { + $expr = new Variable('test'); + $get = new PropertyHook('get', $expr); + $this->assertEquals([new Return_($expr)], $get->getStmts()); + + // TODO: This is incorrect. + $set = new PropertyHook('set', $expr); + $this->assertEquals([new Expression($expr)], $set->getStmts()); + } + + public function testSetStmtsUnknownHook(): void + { + $expr = new Variable('test'); + $get = new PropertyHook('foobar', $expr); + + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Unknown property hook "foobar"'); + $get->getStmts(); + } } From 8bb415902e4ca66d7dd55eb3d81bfee919742594 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 27 Dec 2024 16:33:38 +0100 Subject: [PATCH 397/428] Fix cs --- test/PhpParser/Node/PropertyHookTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/PhpParser/Node/PropertyHookTest.php b/test/PhpParser/Node/PropertyHookTest.php index 42ca1cd2cf..755f257489 100644 --- a/test/PhpParser/Node/PropertyHookTest.php +++ b/test/PhpParser/Node/PropertyHookTest.php @@ -45,8 +45,7 @@ public function testGetStmts(): void { $this->assertEquals([new Expression($expr)], $set->getStmts()); } - public function testSetStmtsUnknownHook(): void - { + public function testSetStmtsUnknownHook(): void { $expr = new Variable('test'); $get = new PropertyHook('foobar', $expr); From 6478c5ac534d497e17e010eac1a0385474fe11b9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 27 Dec 2024 16:55:20 +0100 Subject: [PATCH 398/428] Fix PropertyHook::getStmts() for set hook Produce the correct desugaring if the propertyName attribute is set, and set it in the parser. Otherwise throw an exception. Fixes #1053. --- grammar/php.y | 9 +++-- lib/PhpParser/Node/PropertyHook.php | 13 +++++-- lib/PhpParser/Parser/Php7.php | 2 ++ lib/PhpParser/Parser/Php8.php | 3 ++ lib/PhpParser/ParserAbstract.php | 15 ++++++++ test/PhpParser/Node/PropertyHookTest.php | 45 ++++++++++++++++++++---- 6 files changed, 76 insertions(+), 11 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index 2545f7d845..7fe86b264b 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -686,11 +686,13 @@ parameter: optional_attributes optional_property_modifiers optional_type_without_static optional_arg_ref optional_ellipsis plain_variable optional_property_hook_list { $$ = new Node\Param($6, null, $3, $4, $5, attributes(), $2, $1, $7); - $this->checkParam($$); } + $this->checkParam($$); + $this->addPropertyNameToHooks($$); } | optional_attributes optional_property_modifiers optional_type_without_static optional_arg_ref optional_ellipsis plain_variable '=' expr optional_property_hook_list { $$ = new Node\Param($6, $8, $3, $4, $5, attributes(), $2, $1, $9); - $this->checkParam($$); } + $this->checkParam($$); + $this->addPropertyNameToHooks($$); } | optional_attributes optional_property_modifiers optional_type_without_static optional_arg_ref optional_ellipsis error { $$ = new Node\Param(Expr\Error[], null, $3, $4, $5, attributes(), $2, $1); } @@ -841,7 +843,8 @@ class_statement: | optional_attributes variable_modifiers optional_type_without_static property_declaration_list '{' property_hook_list '}' { $$ = new Stmt\Property($2, $4, attributes(), $3, $1, $6); $this->checkPropertyHooksForMultiProperty($$, #5); - $this->checkEmptyPropertyHookList($6, #5); } + $this->checkEmptyPropertyHookList($6, #5); + $this->addPropertyNameToHooks($$); } #endif | optional_attributes method_modifiers T_CONST class_const_list semi { $$ = new Stmt\ClassConst($4, $2, attributes(), $1); diff --git a/lib/PhpParser/Node/PropertyHook.php b/lib/PhpParser/Node/PropertyHook.php index d8a77fe261..349b9cef4a 100644 --- a/lib/PhpParser/Node/PropertyHook.php +++ b/lib/PhpParser/Node/PropertyHook.php @@ -3,6 +3,9 @@ namespace PhpParser\Node; use PhpParser\Modifiers; +use PhpParser\Node\Expr\Assign; +use PhpParser\Node\Expr\PropertyFetch; +use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\Return_; use PhpParser\NodeAbstract; @@ -74,8 +77,14 @@ public function getStmts(): ?array { return [new Return_($this->body)]; } if ($name === 'set') { - // TODO: This should generate $this->prop = $expr, but we don't know the property name. - return [new Expression($this->body)]; + if (!$this->hasAttribute('propertyName')) { + throw new \LogicException( + 'Can only use getStmts() on a "set" hook if the "propertyName" attribute is set'); + } + + $propName = $this->getAttribute('propertyName'); + $prop = new PropertyFetch(new Variable('this'), (string) $propName); + return [new Expression(new Assign($prop, $this->body))]; } throw new \LogicException('Unknown property hook "' . $name . '"'); } diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 2ab1695450..b909782018 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -1844,10 +1844,12 @@ protected function initReduceCallbacks(): void { 290 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); }, 291 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); }, 292 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index e97914a5f8..3addf9447a 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -1839,10 +1839,12 @@ protected function initReduceCallbacks(): void { 290 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); }, 291 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); + $self->addPropertyNameToHooks($self->semValue); }, 292 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); @@ -1995,6 +1997,7 @@ protected function initReduceCallbacks(): void { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); $self->checkPropertyHooksForMultiProperty($self->semValue, $stackPos-(7-5)); $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); + $self->addPropertyNameToHooks($self->semValue); }, 349 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 475b705e80..667f21f5a0 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -32,6 +32,7 @@ use PhpParser\Node\Stmt\Property; use PhpParser\Node\Stmt\TryCatch; use PhpParser\Node\UseItem; +use PhpParser\Node\VarLikeIdentifier; use PhpParser\NodeVisitor\CommentAnnotatingVisitor; abstract class ParserAbstract implements Parser { @@ -1201,6 +1202,20 @@ protected function checkPropertyHookModifiers(int $a, int $b, int $modifierPos): } } + /** + * @param Property|Param $node + */ + protected function addPropertyNameToHooks(Node $node): void { + if ($node instanceof Property) { + $name = $node->props[0]->name->toString(); + } else { + $name = $node->var->name; + } + foreach ($node->hooks as $hook) { + $hook->setAttribute('propertyName', $name); + } + } + /** @param array $args */ private function isSimpleExit(array $args): bool { if (\count($args) === 0) { diff --git a/test/PhpParser/Node/PropertyHookTest.php b/test/PhpParser/Node/PropertyHookTest.php index 755f257489..8e5cf99fa8 100644 --- a/test/PhpParser/Node/PropertyHookTest.php +++ b/test/PhpParser/Node/PropertyHookTest.php @@ -3,9 +3,14 @@ namespace PhpParser\Node; use PhpParser\Modifiers; +use PhpParser\Node\Expr\Assign; +use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Expr\Variable; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\Return_; +use PhpParser\ParserFactory; +use PhpParser\PrettyPrinter\Standard; class PropertyHookTest extends \PHPUnit\Framework\TestCase { /** @@ -40,17 +45,45 @@ public function testGetStmts(): void { $get = new PropertyHook('get', $expr); $this->assertEquals([new Return_($expr)], $get->getStmts()); - // TODO: This is incorrect. - $set = new PropertyHook('set', $expr); - $this->assertEquals([new Expression($expr)], $set->getStmts()); + $set = new PropertyHook('set', $expr, [], ['propertyName' => 'abc']); + $this->assertEquals([ + new Expression(new Assign(new PropertyFetch(new Variable('this'), 'abc'), $expr)) + ], $set->getStmts()); + } + + public function testGetStmtsSetHookFromParser(): void { + $parser = (new ParserFactory())->createForNewestSupportedVersion(); + $prettyPrinter = new Standard(); + $stmts = $parser->parse(<<<'CODE' + 123; } + + public function __construct(public $prop2 { set => 456; }) {} + } + CODE); + + $hook1 = $stmts[0]->stmts[0]->hooks[0]; + $this->assertEquals('$this->prop1 = 123;', $prettyPrinter->prettyPrint($hook1->getStmts())); + + $hook2 = $stmts[0]->stmts[1]->params[0]->hooks[0]; + $this->assertEquals('$this->prop2 = 456;', $prettyPrinter->prettyPrint($hook2->getStmts())); } - public function testSetStmtsUnknownHook(): void { + public function testGetStmtsUnknownHook(): void { $expr = new Variable('test'); - $get = new PropertyHook('foobar', $expr); + $hook = new PropertyHook('foobar', $expr); $this->expectException(\LogicException::class); $this->expectExceptionMessage('Unknown property hook "foobar"'); - $get->getStmts(); + $hook->getStmts(); + } + + public function testGetStmtsSetHookWithoutPropertyName(): void { + $expr = new Variable('test'); + $set = new PropertyHook('set', $expr); + $this->expectException(\LogicException::class); + $this->expectExceptionMessage('Can only use getStmts() on a "set" hook if the "propertyName" attribute is set'); + $set->getStmts(); } } From 74a361814d552c748edc6b312038ffbe123b80fc Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Mon, 30 Dec 2024 09:26:37 +0100 Subject: [PATCH 399/428] Simplify NodeTraverser->traverseArray() --- lib/PhpParser/NodeTraverser.php | 127 ++++++++++++++++---------------- 1 file changed, 65 insertions(+), 62 deletions(-) diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index f5b868a1f8..489aa13ef3 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -176,77 +176,80 @@ protected function traverseArray(array $nodes): array { $doNodes = []; foreach ($nodes as $i => $node) { - if ($node instanceof Node) { - $traverseChildren = true; - $visitorIndex = -1; - - foreach ($this->visitors as $visitorIndex => $visitor) { - $return = $visitor->enterNode($node); - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($node, $return); - $nodes[$i] = $node = $return; - } elseif (\is_array($return)) { - $doNodes[] = [$i, $return]; - continue 2; - } elseif (NodeVisitor::REMOVE_NODE === $return) { - $doNodes[] = [$i, []]; - continue 2; - } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { - $traverseChildren = false; - } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { - $traverseChildren = false; - break; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - throw new \LogicException( - 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); - } else { - throw new \LogicException( - 'enterNode() returned invalid value of type ' . gettype($return) - ); - } - } + if (!$node instanceof Node) { + if (\is_array($node)) { + throw new \LogicException('Invalid node structure: Contains nested arrays'); } + continue; + } - if ($traverseChildren) { - $this->traverseNode($node); - if ($this->stopTraversal) { + $traverseChildren = true; + $visitorIndex = -1; + + foreach ($this->visitors as $visitorIndex => $visitor) { + $return = $visitor->enterNode($node); + if (null !== $return) { + if ($return instanceof Node) { + $this->ensureReplacementReasonable($node, $return); + $nodes[$i] = $node = $return; + } elseif (\is_array($return)) { + $doNodes[] = [$i, $return]; + continue 2; + } elseif (NodeVisitor::REMOVE_NODE === $return) { + $doNodes[] = [$i, []]; + continue 2; + } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { + $traverseChildren = false; + } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { + $traverseChildren = false; break; + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + throw new \LogicException( + 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); + } else { + throw new \LogicException( + 'enterNode() returned invalid value of type ' . gettype($return) + ); } } + } - for (; $visitorIndex >= 0; --$visitorIndex) { - $visitor = $this->visitors[$visitorIndex]; - $return = $visitor->leaveNode($node); + if ($traverseChildren) { + $this->traverseNode($node); + if ($this->stopTraversal) { + break; + } + } - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($node, $return); - $nodes[$i] = $node = $return; - } elseif (\is_array($return)) { - $doNodes[] = [$i, $return]; - break; - } elseif (NodeVisitor::REMOVE_NODE === $return) { - $doNodes[] = [$i, []]; - break; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - throw new \LogicException( - 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); - } else { - throw new \LogicException( - 'leaveNode() returned invalid value of type ' . gettype($return) - ); - } + for (; $visitorIndex >= 0; --$visitorIndex) { + $visitor = $this->visitors[$visitorIndex]; + $return = $visitor->leaveNode($node); + + if (null !== $return) { + if ($return instanceof Node) { + $this->ensureReplacementReasonable($node, $return); + $nodes[$i] = $node = $return; + } elseif (\is_array($return)) { + $doNodes[] = [$i, $return]; + break; + } elseif (NodeVisitor::REMOVE_NODE === $return) { + $doNodes[] = [$i, []]; + break; + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + throw new \LogicException( + 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); + } else { + throw new \LogicException( + 'leaveNode() returned invalid value of type ' . gettype($return) + ); } } - } elseif (\is_array($node)) { - throw new \LogicException('Invalid node structure: Contains nested arrays'); } } From 45f70ed80aa4315be94656082006909405cba8d6 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Mon, 30 Dec 2024 09:34:17 +0100 Subject: [PATCH 400/428] Simplify NodeTraverser->traverseNode() --- lib/PhpParser/NodeTraverser.php | 116 +++++++++++++++++--------------- 1 file changed, 61 insertions(+), 55 deletions(-) diff --git a/lib/PhpParser/NodeTraverser.php b/lib/PhpParser/NodeTraverser.php index 489aa13ef3..bb3d6ddbfa 100644 --- a/lib/PhpParser/NodeTraverser.php +++ b/lib/PhpParser/NodeTraverser.php @@ -99,66 +99,72 @@ protected function traverseNode(Node $node): void { if ($this->stopTraversal) { break; } - } elseif ($subNode instanceof Node) { - $traverseChildren = true; - $visitorIndex = -1; - - foreach ($this->visitors as $visitorIndex => $visitor) { - $return = $visitor->enterNode($subNode); - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($subNode, $return); - $subNode = $node->$name = $return; - } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { - $traverseChildren = false; - } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { - $traverseChildren = false; - break; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - $node->$name = null; - continue 2; - } else { - throw new \LogicException( - 'enterNode() returned invalid value of type ' . gettype($return) - ); - } - } - } - if ($traverseChildren) { - $this->traverseNode($subNode); - if ($this->stopTraversal) { + continue; + } + + if (!$subNode instanceof Node) { + continue; + } + + $traverseChildren = true; + $visitorIndex = -1; + + foreach ($this->visitors as $visitorIndex => $visitor) { + $return = $visitor->enterNode($subNode); + if (null !== $return) { + if ($return instanceof Node) { + $this->ensureReplacementReasonable($subNode, $return); + $subNode = $node->$name = $return; + } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { + $traverseChildren = false; + } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { + $traverseChildren = false; break; + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + $node->$name = null; + continue 2; + } else { + throw new \LogicException( + 'enterNode() returned invalid value of type ' . gettype($return) + ); } } + } - for (; $visitorIndex >= 0; --$visitorIndex) { - $visitor = $this->visitors[$visitorIndex]; - $return = $visitor->leaveNode($subNode); - - if (null !== $return) { - if ($return instanceof Node) { - $this->ensureReplacementReasonable($subNode, $return); - $subNode = $node->$name = $return; - } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { - $this->stopTraversal = true; - break 2; - } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { - $node->$name = null; - break; - } elseif (\is_array($return)) { - throw new \LogicException( - 'leaveNode() may only return an array ' . - 'if the parent structure is an array' - ); - } else { - throw new \LogicException( - 'leaveNode() returned invalid value of type ' . gettype($return) - ); - } + if ($traverseChildren) { + $this->traverseNode($subNode); + if ($this->stopTraversal) { + break; + } + } + + for (; $visitorIndex >= 0; --$visitorIndex) { + $visitor = $this->visitors[$visitorIndex]; + $return = $visitor->leaveNode($subNode); + + if (null !== $return) { + if ($return instanceof Node) { + $this->ensureReplacementReasonable($subNode, $return); + $subNode = $node->$name = $return; + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { + $this->stopTraversal = true; + break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + $node->$name = null; + break; + } elseif (\is_array($return)) { + throw new \LogicException( + 'leaveNode() may only return an array ' . + 'if the parent structure is an array' + ); + } else { + throw new \LogicException( + 'leaveNode() returned invalid value of type ' . gettype($return) + ); } } } From 447a020a1f875a434d62f2a401f53b82a396e494 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 30 Dec 2024 12:07:19 +0100 Subject: [PATCH 401/428] Release PHP-Parser 5.4.0 --- CHANGELOG.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4f0e6e2c6..8b3bcc1a6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,23 @@ +Version 5.4.0 (2024-12-30) +-------------------------- + +### Added + +* Added `Property::isAbstract()` and `Property::isFinal()` methods. +* Added `PropertyHook::isFinal()` method. +* Emit an error if property hook is used on declaration with multiple properties. + +### Fixed + +* Make legacy class aliases compatible with classmap-authoritative autoloader. +* `Param::isPromoted()` and `Param::isPublic()` now returns true for parameters that have property + hooks but no explicit visibility modifier. +* `PropertyHook::getStmts()` now correctly desugars short `set` hooks. `set => $value` will be + expanded to `set { $this->propertyName = $value; }`. This requires the `propertyName` attribute + on the hook to be set, which is now also set by the parser. If the attribute is not set, + `getStmts()` will throw an error for short set hooks, as it is not possible to produce a correct + desugaring. + Version 5.3.1 (2024-10-08) -------------------------- From 7d3039c37823003d576247868fe755f3d7ec70b8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 30 Dec 2024 12:14:29 +0100 Subject: [PATCH 402/428] Update to phpstan 2.0 --- phpstan-baseline.neon | 154 +++++++++++++++++++++++------------------- tools/composer.json | 2 +- 2 files changed, 87 insertions(+), 69 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 8340a1a48e..7bd15ab912 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,241 +1,259 @@ parameters: ignoreErrors: - - message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:__construct\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\Builder\\ClassConst\:\:__construct\(\) has parameter \$value with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/Builder/ClassConst.php - - message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:addConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\Builder\\ClassConst\:\:addConst\(\) has parameter \$value with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/Builder/ClassConst.php - - message: "#^Method PhpParser\\\\BuilderFactory\\:\\:args\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\BuilderFactory\:\:args\(\) has parameter \$args with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/BuilderFactory.php - - message: "#^Method PhpParser\\\\BuilderFactory\\:\\:attribute\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\BuilderFactory\:\:attribute\(\) has parameter \$args with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/BuilderFactory.php - - message: "#^Method PhpParser\\\\BuilderFactory\\:\\:classConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\BuilderFactory\:\:classConst\(\) has parameter \$value with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/BuilderFactory.php - - message: "#^Method PhpParser\\\\BuilderFactory\\:\\:funcCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\BuilderFactory\:\:funcCall\(\) has parameter \$args with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/BuilderFactory.php - - message: "#^Method PhpParser\\\\BuilderFactory\\:\\:methodCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\BuilderFactory\:\:methodCall\(\) has parameter \$args with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/BuilderFactory.php - - message: "#^Method PhpParser\\\\BuilderFactory\\:\\:new\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\BuilderFactory\:\:new\(\) has parameter \$args with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/BuilderFactory.php - - message: "#^Method PhpParser\\\\BuilderFactory\\:\\:staticCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\BuilderFactory\:\:staticCall\(\) has parameter \$args with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/BuilderFactory.php - - message: "#^Method PhpParser\\\\BuilderFactory\\:\\:val\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\BuilderFactory\:\:val\(\) has parameter \$value with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/BuilderFactory.php - - message: "#^Method PhpParser\\\\BuilderHelpers\\:\\:normalizeValue\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\BuilderHelpers\:\:normalizeValue\(\) has parameter \$value with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/BuilderHelpers.php - - message: "#^Method PhpParser\\\\ConstExprEvaluator\\:\\:evaluateArray\\(\\) return type has no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\ConstExprEvaluator\:\:evaluateArray\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/ConstExprEvaluator.php - - message: "#^Unary operation \"~\" on mixed results in an error\\.$#" - count: 1 - path: lib/PhpParser/ConstExprEvaluator.php - - - - message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) has parameter \\$array with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\JsonDecoder\:\:decodeArray\(\) has parameter \$array with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/JsonDecoder.php - - message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) return type has no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\JsonDecoder\:\:decodeArray\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/JsonDecoder.php - - message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeComment\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\JsonDecoder\:\:decodeComment\(\) has parameter \$value with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/JsonDecoder.php - - message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeNode\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\JsonDecoder\:\:decodeNode\(\) has parameter \$value with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/JsonDecoder.php - - message: "#^Call to function assert\\(\\) with false will always evaluate to false\\.$#" + message: '#^Call to function assert\(\) with false will always evaluate to false\.$#' + identifier: function.impossibleType count: 1 path: lib/PhpParser/Lexer/Emulative.php - - message: "#^If condition is always false\\.$#" + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse count: 1 path: lib/PhpParser/Node/Expr/ArrayItem.php - - message: "#^If condition is always false\\.$#" + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse count: 1 path: lib/PhpParser/Node/Expr/ClosureUse.php - - message: "#^If condition is always false\\.$#" + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse count: 1 path: lib/PhpParser/Node/Scalar/DNumber.php - - message: "#^If condition is always false\\.$#" + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse count: 1 path: lib/PhpParser/Node/Scalar/Encapsed.php - - message: "#^If condition is always false\\.$#" + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse count: 1 path: lib/PhpParser/Node/Scalar/EncapsedStringPart.php - - message: "#^If condition is always false\\.$#" + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse count: 1 path: lib/PhpParser/Node/Scalar/LNumber.php - - message: "#^If condition is always false\\.$#" + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse count: 1 path: lib/PhpParser/Node/Stmt/DeclareDeclare.php - - message: "#^If condition is always false\\.$#" + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse count: 1 path: lib/PhpParser/Node/Stmt/PropertyProperty.php - - message: "#^If condition is always false\\.$#" + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse count: 1 path: lib/PhpParser/Node/Stmt/StaticVar.php - - message: "#^If condition is always false\\.$#" + message: '#^If condition is always false\.$#' + identifier: if.alwaysFalse count: 1 path: lib/PhpParser/Node/Stmt/UseUse.php - - message: "#^Constant T_PRIVATE_SET not found\\.$#" - count: 2 - path: lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php - - - - message: "#^Constant T_PROTECTED_SET not found\\.$#" - count: 2 - path: lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php - - - - message: "#^Constant T_PUBLIC_SET not found\\.$#" - count: 2 - path: lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php - - - - message: "#^Constant T_PROPERTY_C not found\\.$#" - count: 1 - path: lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php - - - - message: "#^Method PhpParser\\\\NodeDumper\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\NodeDumper\:\:__construct\(\) has parameter \$options with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/NodeDumper.php - - message: "#^Method PhpParser\\\\NodeDumper\\:\\:dump\\(\\) has parameter \\$node with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\NodeDumper\:\:dump\(\) has parameter \$node with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/NodeDumper.php - - message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) has parameter \\$nodes with no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\NodeTraverser\:\:traverseArray\(\) has parameter \$nodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/NodeTraverser.php - - message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) return type has no value type specified in iterable type array\\.$#" + message: '#^Method PhpParser\\NodeTraverser\:\:traverseArray\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: lib/PhpParser/NodeTraverser.php - - message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$attrGroups\\.$#" + message: '#^Access to an undefined property PhpParser\\Node\:\:\$attrGroups\.$#' + identifier: property.notFound count: 1 path: lib/PhpParser/NodeVisitor/NameResolver.php - - message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$name\\.$#" + message: '#^Access to an undefined property PhpParser\\Node\:\:\$name\.$#' + identifier: property.notFound count: 1 path: lib/PhpParser/NodeVisitor/NameResolver.php - - message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$namespacedName\\.$#" + message: '#^Access to an undefined property PhpParser\\Node\:\:\$namespacedName\.$#' + identifier: property.notFound count: 1 path: lib/PhpParser/NodeVisitor/NameResolver.php - - message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:beforeTraverse\\(\\) should return array\\\\|null but return statement is missing\\.$#" + message: '#^Method PhpParser\\NodeVisitor\\NodeConnectingVisitor\:\:beforeTraverse\(\) should return array\\|null but return statement is missing\.$#' + identifier: return.missing count: 1 path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php - - message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:enterNode\\(\\) should return array\\\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + message: '#^Method PhpParser\\NodeVisitor\\NodeConnectingVisitor\:\:enterNode\(\) should return array\\|int\|PhpParser\\Node\|null but return statement is missing\.$#' + identifier: return.missing count: 1 path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php - - message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:leaveNode\\(\\) should return array\\\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + message: '#^Method PhpParser\\NodeVisitor\\NodeConnectingVisitor\:\:leaveNode\(\) should return array\\|int\|PhpParser\\Node\|null but return statement is missing\.$#' + identifier: return.missing count: 1 path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php - - message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:beforeTraverse\\(\\) should return array\\\\|null but return statement is missing\\.$#" + message: '#^Method PhpParser\\NodeVisitor\\ParentConnectingVisitor\:\:beforeTraverse\(\) should return array\\|null but return statement is missing\.$#' + identifier: return.missing count: 1 path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php - - message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:enterNode\\(\\) should return array\\\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + message: '#^Method PhpParser\\NodeVisitor\\ParentConnectingVisitor\:\:enterNode\(\) should return array\\|int\|PhpParser\\Node\|null but return statement is missing\.$#' + identifier: return.missing count: 1 path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php - - message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:leaveNode\\(\\) should return array\\\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + message: '#^Method PhpParser\\NodeVisitor\\ParentConnectingVisitor\:\:leaveNode\(\) should return array\\|int\|PhpParser\\Node\|null but return statement is missing\.$#' + identifier: return.missing count: 1 path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php - - message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ECHO\\.$#" + message: '#^Access to undefined constant static\(PhpParser\\ParserAbstract\)\:\:T_ECHO\.$#' + identifier: classConstant.notFound count: 1 path: lib/PhpParser/ParserAbstract.php - - message: "#^Unary operation \"\\+\" on string results in an error\\.$#" + message: '#^Unary operation "\+" on string results in an error\.$#' + identifier: unaryOp.invalid count: 1 path: lib/PhpParser/ParserAbstract.php - - message: "#^Variable \\$action might not be defined\\.$#" + message: '#^Variable \$action might not be defined\.$#' + identifier: variable.undefined count: 1 path: lib/PhpParser/ParserAbstract.php diff --git a/tools/composer.json b/tools/composer.json index d263715f3f..b990d13f5b 100644 --- a/tools/composer.json +++ b/tools/composer.json @@ -1,6 +1,6 @@ { "require": { "friendsofphp/php-cs-fixer": "^3.10", - "phpstan/phpstan": "^1.8" + "phpstan/phpstan": "^2.0" } } From d4fce83c2cb5f8210f9a7ef22dc0678154d7a39b Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 17 Jan 2025 02:48:25 +0700 Subject: [PATCH 403/428] Remove useless cast (string) and @var doc --- lib/PhpParser/Node/MatchArm.php | 1 - lib/PhpParser/NodeDumper.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/PhpParser/Node/MatchArm.php b/lib/PhpParser/Node/MatchArm.php index 2927f029d6..192216dfb3 100644 --- a/lib/PhpParser/Node/MatchArm.php +++ b/lib/PhpParser/Node/MatchArm.php @@ -8,7 +8,6 @@ class MatchArm extends NodeAbstract { /** @var null|list */ public ?array $conds; - /** @var Node\Expr */ public Expr $body; /** diff --git a/lib/PhpParser/NodeDumper.php b/lib/PhpParser/NodeDumper.php index 39ce86aa23..7d62d038dc 100644 --- a/lib/PhpParser/NodeDumper.php +++ b/lib/PhpParser/NodeDumper.php @@ -145,7 +145,7 @@ protected function dumpRecursive($node, bool $indent = true): void { } elseif ($node instanceof Comment) { $this->res .= \str_replace("\n", $this->nl, $node->getReformattedText()); } elseif (\is_string($node)) { - $this->res .= \str_replace("\n", $this->nl, (string)$node); + $this->res .= \str_replace("\n", $this->nl, $node); } elseif (\is_int($node) || \is_float($node)) { $this->res .= $node; } elseif (null === $node) { From fa02db3f30ecdee4142bed51b860e1e3ca20bb5a Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 17 Jan 2025 13:41:39 -0800 Subject: [PATCH 404/428] Remove useless foreach key and cast string, and fix invalid @var definition in test (#1061) --- test/PhpParser/CodeTestParser.php | 4 ++-- test/PhpParser/Node/Scalar/DNumberTest.php | 8 ++++---- test/PhpParser/Node/Scalar/NumberTest.php | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/PhpParser/CodeTestParser.php b/test/PhpParser/CodeTestParser.php index bde0a5fde5..9f8ed596f2 100644 --- a/test/PhpParser/CodeTestParser.php +++ b/test/PhpParser/CodeTestParser.php @@ -24,7 +24,7 @@ function ($matches) { // multiple sections possible with always two forming a pair $chunks = array_chunk($parts, $chunksPerTest); $tests = []; - foreach ($chunks as $i => $chunk) { + foreach ($chunks as $chunk) { $lastPart = array_pop($chunk); list($lastPart, $mode) = $this->extractMode($lastPart); $tests[] = [$mode, array_merge($chunk, [$lastPart])]; @@ -61,7 +61,7 @@ private function extractMode(string $expected): array { return [$expected, null]; } - $expected = (string) substr($expected, $firstNewLine + 1); + $expected = substr($expected, $firstNewLine + 1); return [$expected, substr($firstLine, 2)]; } } diff --git a/test/PhpParser/Node/Scalar/DNumberTest.php b/test/PhpParser/Node/Scalar/DNumberTest.php index 659fc61661..2bd31c3367 100644 --- a/test/PhpParser/Node/Scalar/DNumberTest.php +++ b/test/PhpParser/Node/Scalar/DNumberTest.php @@ -15,11 +15,11 @@ public function testRawValue(): void { $this->assertInstanceOf(Echo_::class, $echo); /** @var Echo_ $echo */ - $lLumber = $echo->exprs[0]; - $this->assertInstanceOf(Float_::class, $lLumber); + $dnumber = $echo->exprs[0]; + $this->assertInstanceOf(Float_::class, $dnumber); /** @var Float_ $dnumber */ - $this->assertSame(1234.56, $lLumber->value); - $this->assertSame('1_234.56', $lLumber->getAttribute('rawValue')); + $this->assertSame(1234.56, $dnumber->value); + $this->assertSame('1_234.56', $dnumber->getAttribute('rawValue')); } } diff --git a/test/PhpParser/Node/Scalar/NumberTest.php b/test/PhpParser/Node/Scalar/NumberTest.php index db63ec2d12..27bfe5abcc 100644 --- a/test/PhpParser/Node/Scalar/NumberTest.php +++ b/test/PhpParser/Node/Scalar/NumberTest.php @@ -14,11 +14,11 @@ public function testRawValue(): void { $this->assertInstanceOf(Echo_::class, $echo); /** @var Echo_ $echo */ - $lLumber = $echo->exprs[0]; - $this->assertInstanceOf(Int_::class, $lLumber); + $lnumber = $echo->exprs[0]; + $this->assertInstanceOf(Int_::class, $lnumber); /** @var Int_ $lnumber */ - $this->assertSame(1234, $lLumber->value); - $this->assertSame('1_234', $lLumber->getAttribute('rawValue')); + $this->assertSame(1234, $lnumber->value); + $this->assertSame('1_234', $lnumber->getAttribute('rawValue')); } } From 14f9c9df7fab294d33cc4eb02207076cf2eb23ed Mon Sep 17 00:00:00 2001 From: Markus Staab <47448731+clxmstaab@users.noreply.github.com> Date: Tue, 18 Feb 2025 10:36:51 +0100 Subject: [PATCH 405/428] Use more precise list-types for getter methods --- lib/PhpParser/Node/Stmt/ClassLike.php | 8 ++++---- lib/PhpParser/NodeVisitor/FindingVisitor.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/PhpParser/Node/Stmt/ClassLike.php b/lib/PhpParser/Node/Stmt/ClassLike.php index fb9ba4f59a..e652177c44 100644 --- a/lib/PhpParser/Node/Stmt/ClassLike.php +++ b/lib/PhpParser/Node/Stmt/ClassLike.php @@ -17,7 +17,7 @@ abstract class ClassLike extends Node\Stmt { public ?Node\Name $namespacedName; /** - * @return TraitUse[] + * @return list */ public function getTraitUses(): array { $traitUses = []; @@ -30,7 +30,7 @@ public function getTraitUses(): array { } /** - * @return ClassConst[] + * @return list */ public function getConstants(): array { $constants = []; @@ -43,7 +43,7 @@ public function getConstants(): array { } /** - * @return Property[] + * @return list */ public function getProperties(): array { $properties = []; @@ -78,7 +78,7 @@ public function getProperty(string $name): ?Property { /** * Gets all methods defined directly in this class/interface/trait * - * @return ClassMethod[] + * @return list */ public function getMethods(): array { $methods = []; diff --git a/lib/PhpParser/NodeVisitor/FindingVisitor.php b/lib/PhpParser/NodeVisitor/FindingVisitor.php index 1f3f4bae88..65a1bd3f1b 100644 --- a/lib/PhpParser/NodeVisitor/FindingVisitor.php +++ b/lib/PhpParser/NodeVisitor/FindingVisitor.php @@ -12,7 +12,7 @@ class FindingVisitor extends NodeVisitorAbstract { /** @var callable Filter callback */ protected $filterCallback; - /** @var Node[] Found nodes */ + /** @var list Found nodes */ protected array $foundNodes; public function __construct(callable $filterCallback) { @@ -24,7 +24,7 @@ public function __construct(callable $filterCallback) { * * Nodes are returned in pre-order. * - * @return Node[] Found nodes + * @return list Found nodes */ public function getFoundNodes(): array { return $this->foundNodes; From c9d0b6c9f2c2c323661d31f7c81a26bf479ae3ff Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Wed, 26 Feb 2025 20:51:23 +0100 Subject: [PATCH 406/428] Support WeakReferences in NodeConnectingVisitor (#1057) Add a constructor argument which enables the use of WeakReferences. The attributes are called weak_parent, weak_next and weak_previous in that case. --- Makefile | 3 ++ doc/component/FAQ.markdown | 14 ++++++++ .../NodeVisitor/NodeConnectingVisitor.php | 32 ++++++++++++++++--- .../NodeVisitor/ParentConnectingVisitor.php | 17 ++++++++-- .../NodeVisitor/NodeConnectingVisitorTest.php | 24 ++++++++++++++ .../ParentConnectingVisitorTest.php | 18 +++++++++++ 6 files changed, 101 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 1473c9998c..a1057d052c 100644 --- a/Makefile +++ b/Makefile @@ -8,3 +8,6 @@ phpstan: tools/vendor php-cs-fixer: tools/vendor php tools/vendor/bin/php-cs-fixer fix + +tests: + php vendor/bin/phpunit \ No newline at end of file diff --git a/doc/component/FAQ.markdown b/doc/component/FAQ.markdown index 62c0970c31..2ef13f6707 100644 --- a/doc/component/FAQ.markdown +++ b/doc/component/FAQ.markdown @@ -51,3 +51,17 @@ obtained through `$node->getAttribute('next')`. `ParentConnectingVisitor` and `NodeConnectingVisitor` should not be used at the same time. The latter includes the functionality of the former. + + +How can I limit the impact of cyclic references in the AST? +----- + +NodeConnectingVisitor adds a parent reference, which introduces a cycle. This means that the AST can now only be collected by the cycle garbage collector. +This in turn can lead to performance and/or memory issues. + +To break the cyclic references between AST nodes `NodeConnectingVisitor` supports a boolean `$weakReferences` constructor parameter. +When set to `true`, all attributes added by `NodeConnectingVisitor` will be wrapped into a `WeakReference` object. + +After enabling this parameter, the parent node can be obtained through `$node->getAttribute('weak_parent')`, +the previous node can be obtained through `$node->getAttribute('weak_previous')`, and the next node can be +obtained through `$node->getAttribute('weak_next')`. \ No newline at end of file diff --git a/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php index 38fedfd506..70e051e2d9 100644 --- a/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +++ b/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php @@ -9,10 +9,12 @@ * Visitor that connects a child node to its parent node * as well as its sibling nodes. * - * On the child node, the parent node can be accessed through + * With $weakReferences=false on the child node, the parent node can be accessed through * $node->getAttribute('parent'), the previous * node can be accessed through $node->getAttribute('previous'), * and the next node can be accessed through $node->getAttribute('next'). + * + * With $weakReferences=true attribute names are prefixed by "weak_", e.g. "weak_parent". */ final class NodeConnectingVisitor extends NodeVisitorAbstract { /** @@ -25,6 +27,12 @@ final class NodeConnectingVisitor extends NodeVisitorAbstract { */ private $previous; + private bool $weakReferences; + + public function __construct(bool $weakReferences = false) { + $this->weakReferences = $weakReferences; + } + public function beforeTraverse(array $nodes) { $this->stack = []; $this->previous = null; @@ -32,12 +40,26 @@ public function beforeTraverse(array $nodes) { public function enterNode(Node $node) { if (!empty($this->stack)) { - $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); + $parent = $this->stack[count($this->stack) - 1]; + if ($this->weakReferences) { + $node->setAttribute('weak_parent', \WeakReference::create($parent)); + } else { + $node->setAttribute('parent', $parent); + } } - if ($this->previous !== null && $this->previous->getAttribute('parent') === $node->getAttribute('parent')) { - $node->setAttribute('previous', $this->previous); - $this->previous->setAttribute('next', $node); + if ($this->previous !== null) { + if ( + $this->weakReferences + ) { + if ($this->previous->getAttribute('weak_parent') === $node->getAttribute('weak_parent')) { + $node->setAttribute('weak_previous', \WeakReference::create($this->previous)); + $this->previous->setAttribute('weak_next', \WeakReference::create($node)); + } + } elseif ($this->previous->getAttribute('parent') === $node->getAttribute('parent')) { + $node->setAttribute('previous', $this->previous); + $this->previous->setAttribute('next', $node); + } } $this->stack[] = $node; diff --git a/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php index 1e7e9e8be5..abf6e37d2e 100644 --- a/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +++ b/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php @@ -11,8 +11,10 @@ /** * Visitor that connects a child node to its parent node. * - * On the child node, the parent node can be accessed through + * With $weakReferences=false on the child node, the parent node can be accessed through * $node->getAttribute('parent'). + * + * With $weakReferences=true the attribute name is "weak_parent" instead. */ final class ParentConnectingVisitor extends NodeVisitorAbstract { /** @@ -20,13 +22,24 @@ final class ParentConnectingVisitor extends NodeVisitorAbstract { */ private array $stack = []; + private bool $weakReferences; + + public function __construct(bool $weakReferences = false) { + $this->weakReferences = $weakReferences; + } + public function beforeTraverse(array $nodes) { $this->stack = []; } public function enterNode(Node $node) { if (!empty($this->stack)) { - $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); + $parent = $this->stack[count($this->stack) - 1]; + if ($this->weakReferences) { + $node->setAttribute('weak_parent', \WeakReference::create($parent)); + } else { + $node->setAttribute('parent', $parent); + } } $this->stack[] = $node; diff --git a/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php b/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php index eab58776cd..c9ac5e898a 100644 --- a/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php +++ b/test/PhpParser/NodeVisitor/NodeConnectingVisitorTest.php @@ -30,4 +30,28 @@ public function testConnectsNodeToItsParentNodeAndItsSiblingNodes(): void { $this->assertSame(Else_::class, get_class($node->getAttribute('next'))); } + + public function testWeakReferences(): void { + $ast = (new ParserFactory())->createForNewestSupportedVersion()->parse( + 'addVisitor(new NodeConnectingVisitor(true)); + + $ast = $traverser->traverse($ast); + + $node = (new NodeFinder())->findFirstInstanceof($ast, Else_::class); + + $this->assertInstanceOf(\WeakReference::class, $node->getAttribute('weak_parent')); + $this->assertSame(If_::class, get_class($node->getAttribute('weak_parent')->get())); + $this->assertInstanceOf(\WeakReference::class, $node->getAttribute('weak_previous')); + $this->assertSame(ConstFetch::class, get_class($node->getAttribute('weak_previous')->get())); + + $node = (new NodeFinder())->findFirstInstanceof($ast, ConstFetch::class); + + $this->assertInstanceOf(\WeakReference::class, $node->getAttribute('weak_next')); + $this->assertSame(Else_::class, get_class($node->getAttribute('weak_next')->get())); + } } diff --git a/test/PhpParser/NodeVisitor/ParentConnectingVisitorTest.php b/test/PhpParser/NodeVisitor/ParentConnectingVisitorTest.php index 8f66a36479..059c2260ff 100644 --- a/test/PhpParser/NodeVisitor/ParentConnectingVisitorTest.php +++ b/test/PhpParser/NodeVisitor/ParentConnectingVisitorTest.php @@ -23,4 +23,22 @@ public function testConnectsChildNodeToParentNode(): void { $this->assertSame('C', $node->getAttribute('parent')->name->toString()); } + + public function testWeakReferences(): void { + $ast = (new ParserFactory())->createForNewestSupportedVersion()->parse( + 'addVisitor(new ParentConnectingVisitor(true)); + + $ast = $traverser->traverse($ast); + + $node = (new NodeFinder())->findFirstInstanceof($ast, ClassMethod::class); + + $weakReference = $node->getAttribute('weak_parent'); + $this->assertInstanceOf(\WeakReference::class, $weakReference); + $this->assertSame('C', $weakReference->get()->name->toString()); + } } From 20b0d55f6655ef2d73d841f6b7d87117a90f9ee2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 24 Apr 2025 22:08:26 +0200 Subject: [PATCH 407/428] Use multi-line attributes for params when targeting PHP <8.0 When the pretty printer targets a version older than PHP 8, print the attributes for parameters on a separate line, so that they are interpreted as comments. Fixes https://github.com/nikic/PHP-Parser/issues/1081. --- lib/PhpParser/PhpVersion.php | 7 ++++ lib/PhpParser/PrettyPrinter/Standard.php | 33 +++++++++++++++---- test/PhpParser/BuilderFactoryTest.php | 5 ++- .../NodeVisitor/NameResolverTest.php | 15 +++++++-- test/code/prettyPrinter/stmt/attributes.test | 15 +++++++-- 5 files changed, 63 insertions(+), 12 deletions(-) diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index 04ff6ddcbf..1541ec693b 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -161,4 +161,11 @@ public function supportsYieldWithoutParentheses(): bool { public function supportsUnicodeEscapes(): bool { return $this->id >= 70000; } + + /* + * Whether this version supports attributes. + */ + public function supportsAttributes(): bool { + return $this->id >= 80000; + } } diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 51c54f7de6..d802d442bd 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -17,7 +17,7 @@ class Standard extends PrettyPrinterAbstract { // Special nodes protected function pParam(Node\Param $node): string { - return $this->pAttrGroups($node->attrGroups, true) + return $this->pAttrGroups($node->attrGroups, $this->phpVersion->supportsAttributes()) . $this->pModifiers($node->flags) . ($node->type ? $this->p($node->type) . ' ' : '') . ($node->byRef ? '&' : '') @@ -656,7 +656,7 @@ protected function pExpr_Closure(Expr\Closure $node): string { return $this->pAttrGroups($node->attrGroups, true) . $this->pStatic($node->static) . 'function ' . ($node->byRef ? '&' : '') - . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' + . '(' . $this->pParams($node->params) . ')' . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; @@ -688,7 +688,7 @@ protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $precedence $this->pAttrGroups($node->attrGroups, true) . $this->pStatic($node->static) . 'fn' . ($node->byRef ? '&' : '') - . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' + . '(' . $this->pParams($node->params) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' => ', $node->expr, $precedence, $lhsPrecedence); @@ -845,7 +845,7 @@ protected function pPropertyHook(Node\PropertyHook $node): string { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . ($node->byRef ? '&' : '') . $node->name - . ($node->params ? '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' : '') + . ($node->params ? '(' . $this->pParams($node->params) . ')' : '') . (\is_array($node->body) ? ' {' . $this->pStmts($node->body) . $this->nl . '}' : ($node->body !== null ? ' => ' . $this->p($node->body) : '') . ';'); } @@ -854,7 +854,7 @@ protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' + . '(' . $this->pParams($node->params) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . (null !== $node->stmts ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' @@ -872,7 +872,7 @@ protected function pStmt_ClassConst(Stmt\ClassConst $node): string { protected function pStmt_Function(Stmt\Function_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' + . '(' . $this->pParams($node->params) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } @@ -1179,6 +1179,27 @@ protected function pMaybeMultiline(array $nodes, bool $trailingComma = false): s } } + /** @param Node\Param[] $params + */ + private function hasParamWithAttributes(array $params): bool { + foreach ($params as $param) { + if ($param->attrGroups) { + return true; + } + } + return false; + } + + /** @param Node\Param[] $params */ + protected function pParams(array $params): string { + if ($this->hasNodeWithComments($params) || + ($this->hasParamWithAttributes($params) && !$this->phpVersion->supportsAttributes()) + ) { + return $this->pCommaSeparatedMultiline($params, $this->phpVersion->supportsTrailingCommaInParamList()) . $this->nl; + } + return $this->pCommaSeparated($params); + } + /** @param Node\AttributeGroup[] $nodes */ protected function pAttrGroups(array $nodes, bool $inline = false): string { $result = ''; diff --git a/test/PhpParser/BuilderFactoryTest.php b/test/PhpParser/BuilderFactoryTest.php index 7597a1442e..4f807c0fb3 100644 --- a/test/PhpParser/BuilderFactoryTest.php +++ b/test/PhpParser/BuilderFactoryTest.php @@ -365,7 +365,10 @@ function firstMethod() * @param SomeClass And takes a parameter */ abstract public function someMethod(SomeClass $someParam); - protected function anotherMethod(#[TaggedIterator('app.handlers')] $someParam = 'test') + protected function anotherMethod( + #[TaggedIterator('app.handlers')] + $someParam = 'test' + ) { print $someParam; } diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index e2d5c0386a..ff6caba483 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -283,12 +283,18 @@ class A extends \NS\B implements \NS\C, \NS\D public const \X\Foo C = \X\Foo::Bar; public \NS\Foo $foo { #[\NS\X] - set(#[\NS\X] \NS\Bar $v) { + set( + #[\NS\X] + \NS\Bar $v + ) { } } public function __construct(public \NS\Foo $bar { #[\NS\X] - set(#[\NS\X] \NS\Bar $v) { + set( + #[\NS\X] + \NS\Bar $v + ) { } }) { @@ -312,7 +318,10 @@ trait A { } #[\NS\X] -function f(#[\NS\X] \NS\A $a): \NS\A +function f( + #[\NS\X] + \NS\A $a +): \NS\A { } function f2(array $a): array diff --git a/test/code/prettyPrinter/stmt/attributes.test b/test/code/prettyPrinter/stmt/attributes.test index f727f6f706..b6f69eab0c 100644 --- a/test/code/prettyPrinter/stmt/attributes.test +++ b/test/code/prettyPrinter/stmt/attributes.test @@ -38,7 +38,10 @@ function a() class C { #[A6] - public function m(#[A7] $param) + public function m( + #[A7] + $param + ) { } #[A12] @@ -57,4 +60,12 @@ $x = #[A10] function () { $y = #[A11] fn() => 0; new #[A13] class { -}; \ No newline at end of file +}; +----- + Date: Tue, 29 Apr 2025 13:57:07 -0700 Subject: [PATCH 408/428] Add support for attributes on constants Just merged in php/php-src@3f03f7ed3d988567b5a59ae542579fd91cdfde42, updating this parser is needed to be able to use attributes on constants in the stub files. --- grammar/php.y | 5 +- lib/PhpParser/Node/Stmt/Const_.php | 12 +- lib/PhpParser/NodeVisitor/NameResolver.php | 1 + lib/PhpParser/Parser/Php7.php | 2111 ++++++++-------- lib/PhpParser/Parser/Php8.php | 2142 +++++++++-------- lib/PhpParser/ParserAbstract.php | 8 + lib/PhpParser/PrettyPrinter/Standard.php | 4 +- lib/PhpParser/PrettyPrinterAbstract.php | 1 + .../NodeVisitor/NameResolverTest.php | 5 + test/code/formatPreservation/constants.test | 50 + test/code/parser/errorHandling/recovery.test | 4 + test/code/parser/expr/constant_expr.test | 70 + test/code/parser/stmt/const.test | 143 ++ test/code/parser/stmt/newInInitializer.test | 2 + test/code/prettyPrinter/stmt/const.test | 19 +- 15 files changed, 2457 insertions(+), 2120 deletions(-) create mode 100644 test/code/formatPreservation/constants.test diff --git a/grammar/php.y b/grammar/php.y index 7fe86b264b..ec70451fe6 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -257,7 +257,10 @@ top_statement: | T_USE use_declarations semi { $$ = Stmt\Use_[$2, Stmt\Use_::TYPE_NORMAL]; } | T_USE use_type use_declarations semi { $$ = Stmt\Use_[$3, $2]; } | group_use_declaration - | T_CONST constant_declaration_list semi { $$ = Stmt\Const_[$2]; } + | T_CONST constant_declaration_list semi { $$ = new Stmt\Const_($2, attributes(), []); } + | attributes T_CONST constant_declaration_list semi + { $$ = new Stmt\Const_($3, attributes(), $1); + $this->checkConstantAttributes($$); } ; use_type: diff --git a/lib/PhpParser/Node/Stmt/Const_.php b/lib/PhpParser/Node/Stmt/Const_.php index f1165fd0b0..c54d6780e6 100644 --- a/lib/PhpParser/Node/Stmt/Const_.php +++ b/lib/PhpParser/Node/Stmt/Const_.php @@ -7,20 +7,28 @@ class Const_ extends Node\Stmt { /** @var Node\Const_[] Constant declarations */ public array $consts; + /** @var Node\AttributeGroup[] PHP attribute groups */ + public array $attrGroups; /** * Constructs a const list node. * * @param Node\Const_[] $consts Constant declarations * @param array $attributes Additional attributes + * @param list $attrGroups PHP attribute groups */ - public function __construct(array $consts, array $attributes = []) { + public function __construct( + array $consts, + array $attributes = [], + array $attrGroups = [] + ) { $this->attributes = $attributes; + $this->attrGroups = $attrGroups; $this->consts = $consts; } public function getSubNodeNames(): array { - return ['consts']; + return ['attrGroups', 'consts']; } public function getType(): string { diff --git a/lib/PhpParser/NodeVisitor/NameResolver.php b/lib/PhpParser/NodeVisitor/NameResolver.php index 99449c496f..e0066f2d09 100644 --- a/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/lib/PhpParser/NodeVisitor/NameResolver.php @@ -120,6 +120,7 @@ public function enterNode(Node $node) { foreach ($node->consts as $const) { $this->addNamespacedName($const); } + $this->resolveAttrGroups($node); } elseif ($node instanceof Stmt\ClassConst) { if (null !== $node->type) { $node->type = $this->resolveType($node->type); diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index b909782018..7371e8bb63 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -164,16 +164,16 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 399; protected int $tokenToSymbolMapSize = 400; - protected int $actionTableSize = 1286; - protected int $gotoTableSize = 646; + protected int $actionTableSize = 1291; + protected int $gotoTableSize = 609; protected int $invalidSymbol = 172; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 437; - protected int $numNonLeafStates = 742; + protected int $YY2TBLSTATE = 439; + protected int $numNonLeafStates = 745; protected array $symbolToName = array( "EOF", @@ -394,247 +394,248 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $action = array( - 128, 129, 130, 565, 131, 132, 944, 754, 755, 756, - 133, 38, 838, 485, 561, 1365,-32766,-32766,-32766, 0, - 829, 1122, 1123, 1124, 1118, 1117, 1116, 1125, 1119, 1120, - 1121,-32766,-32766,-32766, -332, 748, 747,-32766, 840,-32766, + 128, 129, 130, 568, 131, 132, 948, 757, 758, 759, + 133, 38, 841, -85, 0, 1369,-32766,-32766,-32766, 488, + 832, 1126, 1127, 1128, 1122, 1121, 1120, 1129, 1123, 1124, + 1125,-32766,-32766,-32766, -333, 751, 750,-32766, 843,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 24,-32766, 1034, -568, 757, 1122, 1123, 1124, 1118, - 1117, 1116, 1125, 1119, 1120, 1121, 2, 381, 382, 265, - 134, 384, 761, 762, 763, 764, 1111, 425, 426, 1300, - 329, 36, 248, 26, 291, 818, 765, 766, 767, 768, - 769, 770, 771, 772, 773, 774, 794, 566, 795, 796, - 797, 798, 786, 787, 346, 347, 789, 790, 775, 776, - 777, 779, 780, 781, 357, 821, 822, 823, 824, 825, - 567, -568, -568, 299, 782, 783, 568, 569, -194, 806, - 804, 805, 817, 801, 802, 35, -193, 570, 571, 800, - 572, 573, 574, 575,-32766, 576, 577, 471, 472, 486, - 238, -568, 803, 578, 579, -371, 135, -371, 128, 129, - 130, 565, 131, 132, 1067, 754, 755, 756, 133, 38, - -32766, 136, 728, 1027, 1026, 1025, 1031, 1028, 1029, 1030, + -32767, -372,-32766, -372, 1038, 760, 1126, 1127, 1128, 1122, + 1121, 1120, 1129, 1123, 1124, 1125, 382, 383, 442, 265, + 134, 385, 764, 765, 766, 767, 427, 837, 428, -85, + 330, 36, 248, 2, 292, 821, 768, 769, 770, 771, + 772, 773, 774, 775, 776, 777, 797, 569, 798, 799, + 800, 801, 789, 790, 347, 348, 792, 793, 778, 779, + 780, 782, 783, 784, 358, 824, 825, 826, 827, 828, + 570, 26, 300, -195, 785, 786, 571, 572, -194, 809, + 807, 808, 820, 804, 805,-32766,-32766, 573, 574, 803, + 575, 576, 577, 578,-32766, 579, 580, 474, 475, 869, + 238, 870, 806, 581, 582, 489, 135, 838, 128, 129, + 130, 568, 131, 132, 1071, 757, 758, 759, 133, 38, + -32766, 35, 731, 1031, 1030, 1029, 1035, 1032, 1033, 1034, -32766,-32766,-32766,-32767,-32767,-32767,-32767, 101, 102, 103, - 104, 105, -332, 748, 747, 1043, 923,-32766,-32766,-32766, - 839,-32766, 145,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 757,-32766,-32766,-32766, 611,-32766, 290, - -32766,-32766,-32766,-32766,-32766, 834, 718, 265, 134, 384, - 761, 762, 763, 764, -615,-32766, 426,-32766,-32766,-32766, - -32766, -615, 251, 818, 765, 766, 767, 768, 769, 770, - 771, 772, 773, 774, 794, 566, 795, 796, 797, 798, - 786, 787, 346, 347, 789, 790, 775, 776, 777, 779, - 780, 781, 357, 821, 822, 823, 824, 825, 567, 913, - 426, 310, 782, 783, 568, 569, -194, 806, 804, 805, - 817, 801, 802, 1288, -193, 570, 571, 800, 572, 573, - 574, 575, -273, 576, 577, 835, 82, 83, 84, -85, - 803, 578, 579, 237, 148, 778, 749, 750, 751, 752, - 753, 150, 754, 755, 756, 791, 792, 37,-32766, 85, + 104, 105, -333, 751, 750, 1047, 927,-32766,-32766,-32766, + 842,-32766, 840,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 760,-32766,-32766,-32766, 614,-32766, 291, + -32766,-32766,-32766,-32766,-32766, 136, 721, 265, 134, 385, + 764, 765, 766, 767, -616,-32766, 428,-32766,-32766,-32766, + -32766, -616, 145, 821, 768, 769, 770, 771, 772, 773, + 774, 775, 776, 777, 797, 569, 798, 799, 800, 801, + 789, 790, 347, 348, 792, 793, 778, 779, 780, 782, + 783, 784, 358, 824, 825, 826, 827, 828, 570, 917, + 428, -195, 785, 786, 571, 572, -194, 809, 807, 808, + 820, 804, 805, 1292, 251, 573, 574, 803, 575, 576, + 577, 578, -274, 579, 580, 1100, 82, 83, 84, 743, + 806, 581, 582, 237, 148, 781, 752, 753, 754, 755, + 756, 150, 757, 758, 759, 794, 795, 37, 24, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 1043, 276,-32766,-32766,-32766, 925, 1263, - 1262, 1264, 713, 831, 312, 393, 109, 7, 1097, 47, - 757,-32766,-32766,-32766, 838, -85,-32766, 1095,-32766,-32766, - -32766, 1268,-32766,-32766, 758, 759, 760, 761, 762, 763, - 764, 994,-32766, 827,-32766,-32766, 923, -615, 324, -615, - 818, 765, 766, 767, 768, 769, 770, 771, 772, 773, - 774, 794, 816, 795, 796, 797, 798, 786, 787, 788, - 815, 789, 790, 775, 776, 777, 779, 780, 781, 820, - 821, 822, 823, 824, 825, 826, 300, 301, 342, 782, - 783, 784, 785, 833, 806, 804, 805, 817, 801, 802, - 715, 1040, 793, 799, 800, 807, 808, 810, 809, 140, - 811, 812, 838, 327, 343,-32766, 125, 803, 814, 813, - 49, 50, 51, 517, 52, 53, 1043, -110, 371, 913, - 54, 55, -110, 56, -110, -566,-32766,-32766,-32766, 306, - 1043, 126, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -612, 1096, 106, 107, 108, 740, 276, - -612, 963, 964,-32766, 290, 287, 965, 1330, 57, 58, - -32766, 109, 375, 995, 59, 959, 60, 245, 246, 61, + 106, 107, 108, 1115, 276,-32766,-32766,-32766, 929, 1267, + 1266, 1268, 716, 834, 311, 394, 109, 7, 1101, -569, + 760,-32766,-32766,-32766, 841, 1354,-32766, 1099,-32766,-32766, + -32766, 1272, 1353, 313, 761, 762, 763, 764, 765, 766, + 767, 998,-32766, 830,-32766,-32766, 927, -616, 325, -616, + 821, 768, 769, 770, 771, 772, 773, 774, 775, 776, + 777, 797, 819, 798, 799, 800, 801, 789, 790, 791, + 818, 792, 793, 778, 779, 780, 782, 783, 784, 823, + 824, 825, 826, 827, 828, 829, -569, -569, 343, 785, + 786, 787, 788, 836, 809, 807, 808, 820, 804, 805, + 718, 564, 796, 802, 803, 810, 811, 813, 812, 140, + 814, 815, 841, 328, 344,-32766, -569, 806, 817, 816, + 49, 50, 51, 520, 52, 53, 869, -110, 870, 917, + 54, 55, -110, 56, -110, -567,-32766,-32766,-32766, 307, + 1047, 126, -110, -110, -110, -110, -110, -110, -110, -110, + -110, -110, -110, -613, 372, 106, 107, 108, 376, 276, + -613, 392, 1334,-32766, 291, 288, 1304, 446, 57, 58, + -32766, 109, 447, 999, 59, 47, 60, 245, 246, 61, 62, 63, 64, 65, 66, 67, 68,-32766, 28, 267, - 69, 441, 518, 391, -346, 74, 1294, 1295, 519, 443, - 838, 327, -566, -566, 1292, 42, 20, 520, 925, 521, - 923, 522, 713, 523, -564, 693, 524, 525, -566, 923, - 444, 44, 45, 447, 378, 377, -78, 46, 526, 923, - -572, 445, -566, 369, 341, 1346, 103, 104, 105, -563, - 1254, 923, 383, 382, 446, 528, 529, 530, 865, 719, - 866, 694, 425, 461, 462, 463, 844, 532, 533, 720, - 1280, 1281, 1282, 1283, 1285, 1277, 1278, 298, 865, 151, - 866, 723, 153, 1284, 1279, 695, 696, 1263, 1262, 1264, - 299, -564, -564, 70, -153, -153, -153, 322, 323, 327, - 154, -4, 923, 913, 1263, 1262, 1264, -564, 155, -153, - 283, -153, 913, -153, 157, -153, -563, -563, 33, -571, - 1350, -564, 913, -58, 829, 376, -612, 1349, -612, 748, - 747, 837, -563, -606, 913, -606, 963, 964, -57, 748, - 747, 527, 123, 81, -570, 1040, -563, 327, 617, 899, - 959, -110, -110, -110, 32, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 124, -565, - 1043, 947, 28, 268, 149, 408, 923, 1375, 829, 137, - 1376, 138, 925, 144, 838, 913, 713, -153, 1292, 660, - 21, 925, 679, 680, 283, 713, 158, 1170, 1172, 379, - 380, 980, 385, 386, 159, 713, 730, 376, -562, 438, - 1066, 141, 160, 925, 297, 327, 161, 713, 963, 964, - 946, 651, 652, 527, 1254, -87, 162, -306, 748, 747, - -84, 531, 959, -110, -110, -110, -565, -565, -78, 287, - 1268, 532, 533, -73, 1280, 1281, 1282, 1283, 1285, 1277, - 1278, -72, -565, -71, -70, 11, 1261, 1284, 1279, 913, - -69, 748, 747, -68, 925,-32766, -565, 72, 713, -4, - -16, 1261, 323, 327, -67, -562, -562, 291,-32766,-32766, - -32766, -66,-32766, -65,-32766, -46,-32766, -18, 142,-32766, - 275, -562, 1259, 284,-32766,-32766,-32766, 729,-32766, 732, - -32766,-32766, 922, 147, 1261, -562,-32766, 422, 28, 267, - -302,-32766,-32766,-32766, 279,-32766, 1042,-32766,-32766,-32766, - 838, 838,-32766, 288, 1292, 1040, 280,-32766,-32766,-32766, - 285, 286, 335,-32766,-32766, 1263, 1262, 1264, 925,-32766, - 422, 289, 713, 28, 268, 292, 293, 276, 940, 73, - 1043,-32766, 109, 689, 146, 838, -110, -110, -562, 1292, - 1254, -110, 829,-32766, 1377, 704, 582, 10, 661, 838, - -110, 1129, 706, 649, 283, 307, 960,-32766, 533,-32766, - 1280, 1281, 1282, 1283, 1285, 1277, 1278, 682, 1043, 305, - -50, 468, 1299, 1284, 1279, 1254, 666, -528, 496, 667, - 304, 299, 683, 72, 74, 1301, 588,-32766, 323, 327, - 327, -518, 290, 533, 40, 1280, 1281, 1282, 1283, 1285, - 1277, 1278, 8, 139, 0, -562, -562, 27, 1284, 1279, - -276, 407, 0,-32766, 0, 0, 0, 0, 72, 1261, - 311, -562, 0, 323, 327, 0,-32766,-32766,-32766, 0, - -32766, 373,-32766, 0,-32766, -562, 0,-32766, 0, 0, - 615, 0,-32766,-32766,-32766, 923,-32766, 0,-32766,-32766, - 942, 1289, 1261, 837,-32766, 422, 41, 299, 34,-32766, - -32766,-32766, 737,-32766, 738,-32766,-32766,-32766, 923, 857, - -32766, 904, 1004, 981, 988,-32766,-32766,-32766, 978,-32766, - 989,-32766,-32766, 902, 976, 1261, 1100,-32766, 422, 48, - 1103, 1104,-32766,-32766,-32766, 1101,-32766, 1102,-32766,-32766, - -32766, 1108, -600,-32766, 849, 1316, 1334, 491,-32766,-32766, - -32766, 1368,-32766, 654,-32766,-32766, -599, -598, 1261, 595, - -32766, 422, -572, -571, 1268,-32766,-32766,-32766, 913,-32766, - -570,-32766,-32766,-32766, -569, -512,-32766, -274, 1, 29, - 30,-32766,-32766,-32766, -251, -251, -251,-32766,-32766, 39, - 376, 913, 43,-32766, 422, 71, 302, 303, 75, 76, - 77, 963, 964, 78, 79,-32766, 527, -250, -250, -250, - -273, 80, 374, 376, 899, 959, -110, -110, -110, 143, - 152, 156, 243, 331, 963, 964, 127, 358, 359, 527, - 360, 361, 362, 363, 364, 365, 366, 899, 959, -110, - -110, -110,-32766, 13, 367, 838, 368, 925, 1261, 14, - 370, 713, -251, 439, 560,-32766,-32766,-32766, 15,-32766, - 16,-32766, 18,-32766, 406, 487,-32766, 488, 495, 498, - 925,-32766,-32766,-32766, 713, -250, 499,-32766,-32766, 500, - -110, -110, 501,-32766, 422, -110, 505, 506, 507, 515, - 593, 699, 1069, 1210, -110,-32766, 1290, 1068, 1049, 1249, - 1045, -278, -102,-32766, 12, 17, 22, 296, 405, 607, - 612, 640, 705, 1214, 1267, 1211, 1347, 0, 321, 372, - 714, 717, 721, 722, 724, 299, 725, 726, 74, 727, - 1227, 731, 716, 0, 327, 411, 1293, 734, 900, 1372, - 1374, 860, 859, 953, 996, 1373, 952, 950, 951, 954, - 1242, 933, 943, 931, 986, 987, 638, 1371, 1328, 1317, - 1335, 1344, 0, 0, 0, 327 + 69, 444, 521, 448, -347, 74, 1298, 1299, 522, 449, + 841, 328, -567, -567, 1296, 42, 20, 523, 929, 524, + 927, 525, 716, 526, -565, 696, 527, 528, -567, 927, + 847, 44, 45, 450, 379, 378, -78, 46, 529, 927, + -573,-32766, -567, 370, 342, 1350, 103, 104, 105, -564, + 1258, 927, 301, 302, 1044, 531, 532, 533, -607, 722, + -607, 697, 464, 465, 466, 151, 1047, 535, 536, 723, + 1284, 1285, 1286, 1287, 1289, 1281, 1282, 299, -58, 1047, + 153, 726, 125, 1288, 1283, 698, 699, 1267, 1266, 1268, + 300, -565, -565, 70, -154, -154, -154, 323, 324, 328, + -57, -4, 927, 917, 1267, 1266, 1268, -565, -87, -154, + 284, -154, 917, -154, 154, -154, -564, -564, 155, -572, + 157, -565, 917, 33, 832, 377, -613, 123, -613, 751, + 750, 124, -564, 137, 917, 289, 967, 968, 81, 751, + 750, 530, 328, 138, -571, 620, -564, 663, 21, 903, + 963, -110, -110, -110, 32, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 144, -566, + 382, 383, 28, 268, 1379, 158, 927, 1380, 967, 968, + 427, 159, 929, 969, 841, 917, 716, -154, 1296, 951, + 160, 929, 963, 384, 383, 716, 832, 1174, 1176, 682, + 683, 984, 1044, 427, 161, 716, 733, 377, -563, 440, + 1070, 141, 162, 929, 298, 328, -84, 716, 967, 968, + 149, 410, -307, 530, 1258, -78, 300, 1047, 751, 750, + -73, 534, 963, -110, -110, -110, -566, -566, 950, 288, + 1272, 535, 536, -72, 1284, 1285, 1286, 1287, 1289, 1281, + 1282, 284, -566, 380, 381, 11, 1265, 1288, 1283, 917, + -71, 751, 750, -70, 929,-32766, -566, 72, 716, -4, + -16, 1265, 324, 328, -69, -563, -563, 292,-32766,-32766, + -32766, -68,-32766, -67,-32766, -66,-32766, 386, 387,-32766, + -65, -563, 1263, -46,-32766,-32766,-32766, -18,-32766, 142, + -32766,-32766, 275, 285, 1265, -563,-32766, 424, 28, 267, + 732,-32766,-32766,-32766, 735,-32766, 1046,-32766,-32766,-32766, + 841, 841,-32766, 926, 1296, 1044, 147,-32766,-32766,-32766, + 654, 655, -303,-32766,-32766, 1267, 1266, 1268, 929,-32766, + 424, 280, 716, 28, 268, 281, 286, 287, 336, 73, + 1047,-32766, 290, 293, 294, 841, -110, -110, -563, 1296, + 1258, -110, 944,-32766, 276, 109, 692, 832, 146, 1381, + -110, 707, 841, 585, 284, 1133, 685, 709, 536,-32766, + 1284, 1285, 1286, 1287, 1289, 1281, 1282,-32766, 1047, 664, + -50, 10, 308, 1288, 1283, 1258, 669, 306, 471, 305, + 499, 300, 312, 72, 74, 670, 964, 1303, 324, 328, + 328, -529, 291, 536, 686, 1284, 1285, 1286, 1287, 1289, + 1281, 1282, 652, 139, 1305, -563, -563, 591, 1288, 1283, + -519, 300, 34,-32766, 8, 840, 0, 618, 72, 1265, + 0, -563, 0, 324, 328, 0,-32766,-32766,-32766, 0, + -32766, 0,-32766, 0,-32766, -563, 0,-32766,-32766, 0, + 0, 27,-32766,-32766,-32766, 927,-32766, 40,-32766,-32766, + 0, 0, 1265, 374,-32766, 424, 0, 946, 0,-32766, + -32766,-32766, 0,-32766, 41,-32766,-32766,-32766, 927, 740, + -32766, 741, 860, 908, 1008,-32766,-32766,-32766, 985,-32766, + 992,-32766,-32766, 982, 993, 1265, 906,-32766, 424, 48, + 980, 1104,-32766,-32766,-32766, 1107,-32766, 1108,-32766,-32766, + -32766, 1105, -601,-32766, 1106, 1112, -277, 494,-32766,-32766, + -32766, 1293,-32766, 852,-32766,-32766, 1320, 1338, 1265, 598, + -32766, 424, 1372, 657, 1272,-32766,-32766,-32766, 917,-32766, + -600,-32766,-32766,-32766, -599, -573,-32766, -275, -572, -571, + -570,-32766,-32766,-32766, -252, -252, -252,-32766,-32766, -513, + 377, 917, 1,-32766, 424, 29, 303, 304, 30, 39, + 43, 967, 968, 71, 75,-32766, 530, -251, -251, -251, + -274, 76, 375, 377, 903, 963, -110, -110, -110, 77, + 78, 79, 80, 143, 967, 968, 127, 152, 156, 530, + 243, 332, 359, 360, 361, 362, 363, 903, 963, -110, + -110, -110,-32766, 13, 364, 841, 365, 929, 1265, 14, + 366, 716, -252, 367, 368,-32766,-32766,-32766, 369,-32766, + 371,-32766, 441,-32766, 563, 322,-32766, 15, 16, 18, + 929,-32766,-32766,-32766, 716, -251, 408,-32766,-32766, 490, + -110, -110, 491,-32766, 424, -110, 498, 501, 502, 503, + 504, 508, 509, 510, -110,-32766, 518, 596, 702, 1073, + 1214, 1294, 1072,-32766, 1053, 1253, 1049, -279, -102, 12, + 17, 22, 297, 407, 610, 615, 643, 708, 1218, 1271, + 1215, 1351, 0, 373, 717, 300, 720, 724, 74, 725, + 1231, 727, 728, 729, 328, 409, 730, 734, 719, 0, + 413, 737, 904, 1376, 1378, 863, 862, 957, 1000, 1377, + 956, 954, 955, 958, 1246, 937, 947, 935, 990, 991, + 641, 1375, 1332, 1321, 1339, 1348, 0, 0, 1297, 0, + 328 ); protected array $actionCheck = array( 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, - 12, 13, 82, 31, 85, 85, 9, 10, 11, 0, + 12, 13, 82, 31, 0, 85, 9, 10, 11, 31, 80, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 9, 10, 11, 8, 37, 38, 30, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 101, 30, 1, 70, 57, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 8, 106, 107, 71, - 72, 73, 74, 75, 76, 77, 126, 116, 80, 150, + 43, 106, 30, 108, 1, 57, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 106, 107, 108, 71, + 72, 73, 74, 75, 76, 77, 116, 80, 80, 97, 70, 151, 152, 8, 30, 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, 137, 138, 162, 126, 127, 128, 129, 8, 131, - 132, 133, 134, 135, 136, 8, 8, 139, 140, 141, - 142, 143, 144, 145, 9, 147, 148, 137, 138, 167, - 14, 167, 154, 155, 156, 106, 158, 108, 2, 3, + 122, 8, 162, 8, 126, 127, 128, 129, 8, 131, + 132, 133, 134, 135, 136, 9, 10, 139, 140, 141, + 142, 143, 144, 145, 9, 147, 148, 137, 138, 106, + 14, 108, 154, 155, 156, 167, 158, 160, 2, 3, 4, 5, 6, 7, 166, 9, 10, 11, 12, 13, 116, 8, 167, 119, 120, 121, 122, 123, 124, 125, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 166, 37, 38, 141, 1, 9, 10, 11, - 163, 30, 8, 32, 33, 34, 35, 36, 37, 38, + 163, 30, 159, 32, 33, 34, 35, 36, 37, 38, 9, 10, 11, 57, 9, 10, 11, 1, 30, 165, - 32, 33, 34, 35, 36, 80, 31, 71, 72, 73, + 32, 33, 34, 35, 36, 8, 31, 71, 72, 73, 74, 75, 76, 77, 1, 30, 80, 32, 33, 34, 35, 8, 8, 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, 84, - 80, 8, 126, 127, 128, 129, 166, 131, 132, 133, - 134, 135, 136, 1, 166, 139, 140, 141, 142, 143, - 144, 145, 166, 147, 148, 160, 9, 10, 11, 31, + 80, 166, 126, 127, 128, 129, 166, 131, 132, 133, + 134, 135, 136, 1, 8, 139, 140, 141, 142, 143, + 144, 145, 166, 147, 148, 163, 9, 10, 11, 167, 154, 155, 156, 97, 158, 2, 3, 4, 5, 6, - 7, 14, 9, 10, 11, 12, 13, 30, 116, 32, + 7, 14, 9, 10, 11, 12, 13, 30, 101, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 141, 57, 9, 10, 11, 163, 159, + 53, 54, 55, 126, 57, 9, 10, 11, 163, 159, 160, 161, 167, 80, 8, 106, 69, 108, 168, 70, - 57, 9, 10, 11, 82, 97, 30, 1, 32, 33, - 34, 1, 9, 10, 71, 72, 73, 74, 75, 76, + 57, 9, 10, 11, 82, 1, 30, 1, 32, 33, + 34, 1, 8, 8, 71, 72, 73, 74, 75, 76, 77, 31, 30, 80, 32, 33, 1, 164, 8, 166, 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, 137, 138, 8, 126, 127, 128, 129, 160, 131, 132, 133, 134, 135, 136, - 167, 116, 139, 140, 141, 142, 143, 144, 145, 167, + 167, 85, 139, 140, 141, 142, 143, 144, 145, 167, 147, 148, 82, 171, 8, 116, 167, 154, 155, 156, - 2, 3, 4, 5, 6, 7, 141, 101, 8, 84, + 2, 3, 4, 5, 6, 7, 106, 101, 108, 84, 12, 13, 106, 15, 108, 70, 9, 10, 11, 113, 141, 14, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 1, 163, 53, 54, 55, 167, 57, - 8, 117, 118, 116, 165, 30, 122, 1, 50, 51, - 140, 69, 8, 163, 56, 131, 58, 59, 60, 61, + 124, 125, 126, 1, 8, 53, 54, 55, 8, 57, + 8, 8, 1, 116, 165, 30, 150, 8, 50, 51, + 140, 69, 8, 163, 56, 70, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 140, 70, 71, 72, 73, 74, 8, 168, 165, 78, 79, 80, 8, 82, 171, 137, 138, 86, 87, 88, 89, 163, 91, 1, 93, 167, 95, 70, 80, 98, 99, 153, 1, 8, 103, 104, 105, 106, 107, 16, 109, 110, 1, - 165, 8, 167, 115, 116, 1, 50, 51, 52, 70, - 122, 1, 106, 107, 8, 127, 128, 129, 106, 31, - 108, 116, 116, 132, 133, 134, 8, 139, 140, 31, - 142, 143, 144, 145, 146, 147, 148, 149, 106, 14, - 108, 31, 14, 155, 156, 140, 141, 159, 160, 161, + 165, 116, 167, 115, 116, 1, 50, 51, 52, 70, + 122, 1, 137, 138, 116, 127, 128, 129, 164, 31, + 166, 116, 132, 133, 134, 14, 141, 139, 140, 31, + 142, 143, 144, 145, 146, 147, 148, 149, 16, 141, + 14, 31, 167, 155, 156, 140, 141, 159, 160, 161, 162, 137, 138, 165, 75, 76, 77, 169, 170, 171, - 14, 0, 1, 84, 159, 160, 161, 153, 14, 90, + 16, 0, 1, 84, 159, 160, 161, 153, 31, 90, 165, 92, 84, 94, 14, 96, 137, 138, 14, 165, - 1, 167, 84, 16, 80, 106, 164, 8, 166, 37, - 38, 159, 153, 164, 84, 166, 117, 118, 16, 37, - 38, 122, 16, 167, 165, 116, 167, 171, 51, 130, + 14, 167, 84, 14, 80, 106, 164, 16, 166, 37, + 38, 16, 153, 16, 84, 37, 117, 118, 167, 37, + 38, 122, 171, 16, 165, 51, 167, 75, 76, 130, 131, 132, 133, 134, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 16, 70, - 141, 73, 70, 71, 101, 102, 1, 80, 80, 16, - 83, 16, 163, 16, 82, 84, 167, 168, 86, 75, - 76, 163, 75, 76, 165, 167, 16, 59, 60, 106, - 107, 163, 106, 107, 16, 167, 31, 106, 70, 108, - 1, 167, 16, 163, 113, 171, 16, 167, 117, 118, - 122, 111, 112, 122, 122, 31, 16, 35, 37, 38, - 31, 130, 131, 132, 133, 134, 137, 138, 31, 30, + 106, 107, 70, 71, 80, 16, 1, 83, 117, 118, + 116, 16, 163, 122, 82, 84, 167, 168, 86, 73, + 16, 163, 131, 106, 107, 167, 80, 59, 60, 75, + 76, 163, 116, 116, 16, 167, 31, 106, 70, 108, + 1, 167, 16, 163, 113, 171, 31, 167, 117, 118, + 101, 102, 35, 122, 122, 31, 162, 141, 37, 38, + 31, 130, 131, 132, 133, 134, 137, 138, 122, 30, 1, 139, 140, 31, 142, 143, 144, 145, 146, 147, - 148, 31, 153, 31, 31, 154, 80, 155, 156, 84, + 148, 165, 153, 106, 107, 154, 80, 155, 156, 84, 31, 37, 38, 31, 163, 74, 167, 165, 167, 168, 31, 80, 170, 171, 31, 137, 138, 30, 87, 88, - 89, 31, 91, 31, 93, 31, 95, 31, 31, 98, + 89, 31, 91, 31, 93, 31, 95, 106, 107, 98, 31, 153, 116, 31, 103, 104, 105, 31, 74, 31, 109, 110, 31, 31, 80, 167, 115, 116, 70, 71, - 35, 87, 88, 89, 35, 91, 140, 93, 127, 95, - 82, 82, 98, 37, 86, 116, 35, 103, 104, 105, - 35, 35, 35, 109, 110, 159, 160, 161, 163, 115, - 116, 37, 167, 70, 71, 37, 37, 57, 38, 158, - 141, 127, 69, 77, 70, 82, 117, 118, 70, 86, - 122, 122, 80, 116, 83, 80, 89, 97, 90, 82, - 131, 82, 92, 113, 165, 114, 131, 85, 140, 140, - 142, 143, 144, 145, 146, 147, 148, 94, 141, 136, - 31, 97, 150, 155, 156, 122, 96, 153, 97, 100, - 135, 162, 100, 165, 165, 150, 157, 140, 170, 171, - 171, 153, 165, 140, 163, 142, 143, 144, 145, 146, - 147, 148, 153, 31, -1, 137, 138, 153, 155, 156, - 166, 168, -1, 74, -1, -1, -1, -1, 165, 80, - 135, 153, -1, 170, 171, -1, 87, 88, 89, -1, - 91, 153, 93, -1, 95, 167, -1, 98, -1, -1, - 157, -1, 103, 104, 105, 1, 74, -1, 109, 110, - 158, 164, 80, 159, 115, 116, 163, 162, 167, 87, - 88, 89, 163, 91, 163, 93, 127, 95, 1, 163, + 31, 87, 88, 89, 31, 91, 140, 93, 127, 95, + 82, 82, 98, 31, 86, 116, 31, 103, 104, 105, + 111, 112, 35, 109, 110, 159, 160, 161, 163, 115, + 116, 35, 167, 70, 71, 35, 35, 35, 35, 158, + 141, 127, 37, 37, 37, 82, 117, 118, 70, 86, + 122, 122, 38, 116, 57, 69, 77, 80, 70, 83, + 131, 80, 82, 89, 165, 82, 94, 92, 140, 140, + 142, 143, 144, 145, 146, 147, 148, 85, 141, 90, + 31, 97, 114, 155, 156, 122, 96, 136, 97, 135, + 97, 162, 135, 165, 165, 100, 131, 150, 170, 171, + 171, 153, 165, 140, 100, 142, 143, 144, 145, 146, + 147, 148, 113, 31, 150, 137, 138, 157, 155, 156, + 153, 162, 167, 74, 153, 159, -1, 157, 165, 80, + -1, 153, -1, 170, 171, -1, 87, 88, 89, -1, + 91, -1, 93, -1, 95, 167, -1, 98, 140, -1, + -1, 153, 103, 104, 105, 1, 74, 163, 109, 110, + -1, -1, 80, 153, 115, 116, -1, 158, -1, 87, + 88, 89, -1, 91, 163, 93, 127, 95, 1, 163, 98, 163, 163, 163, 163, 103, 104, 105, 163, 74, 163, 109, 110, 163, 163, 80, 163, 115, 116, 70, 163, 163, 87, 88, 89, 163, 91, 163, 93, 127, - 95, 163, 165, 98, 164, 164, 164, 102, 103, 104, - 105, 164, 74, 164, 109, 110, 165, 165, 80, 81, - 115, 116, 165, 165, 1, 87, 88, 89, 84, 91, + 95, 163, 165, 98, 163, 163, 166, 102, 103, 104, + 105, 164, 74, 164, 109, 110, 164, 164, 80, 81, + 115, 116, 164, 164, 1, 87, 88, 89, 84, 91, 165, 93, 127, 95, 165, 165, 98, 166, 165, 165, 165, 103, 104, 105, 100, 101, 102, 109, 110, 165, 106, 84, 165, 115, 116, 165, 137, 138, 165, 165, @@ -643,24 +644,25 @@ class Php7 extends \PhpParser\ParserAbstract 165, 165, 165, 165, 117, 118, 167, 165, 165, 122, 165, 165, 165, 165, 165, 165, 165, 130, 131, 132, 133, 134, 74, 166, 165, 82, 165, 163, 80, 166, - 165, 167, 168, 165, 165, 87, 88, 89, 166, 91, - 166, 93, 166, 95, 166, 166, 98, 166, 166, 166, + 165, 167, 168, 165, 165, 87, 88, 89, 165, 91, + 165, 93, 165, 95, 165, 167, 98, 166, 166, 166, 163, 103, 104, 105, 167, 168, 166, 109, 110, 166, 117, 118, 166, 115, 116, 122, 166, 166, 166, 166, 166, 166, 166, 166, 131, 127, 166, 166, 166, 166, 166, 166, 166, 140, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, -1, 167, 167, - 167, 167, 167, 167, 167, 162, 167, 167, 165, 167, - 169, 167, 167, -1, 171, 168, 170, 168, 168, 168, + 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, + 166, 166, -1, 167, 167, 162, 167, 167, 165, 167, + 169, 167, 167, 167, 171, 168, 167, 167, 167, -1, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, -1, -1, -1, 171 + 168, 168, 168, 168, 168, 168, -1, -1, 170, -1, + 171 ); protected array $actionBase = array( 0, -2, 156, 559, 641, 1004, 1027, 485, 292, 200, - -60, 283, 568, 590, 590, 715, 590, 195, 578, 894, - 395, 395, 395, 825, 313, 313, 825, 313, 731, 731, + -60, 283, 568, 590, 590, 715, 590, 195, 578, 901, + 395, 395, 395, 831, 313, 313, 831, 313, 731, 731, 731, 731, 764, 764, 965, 965, 998, 932, 899, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, @@ -674,67 +676,68 @@ class Php7 extends \PhpParser\ParserAbstract 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 37, 360, 216, 644, 1061, 1067, 1063, - 1068, 1059, 1058, 1062, 1064, 1069, 1109, 1110, 812, 1111, - 1112, 1108, 1113, 1065, 909, 1060, 1066, 297, 297, 297, + 1088, 1088, 1088, 37, 360, 216, 649, 1066, 1072, 1068, + 1073, 1064, 1063, 1067, 1069, 1074, 1113, 1114, 835, 1115, + 1116, 1112, 1117, 1070, 919, 1065, 1071, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 135, 477, 373, 201, 201, 201, + 297, 297, 297, 297, 135, 477, 126, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 642, 642, 22, 22, 22, 362, 813, 778, 813, 813, 813, 813, 813, 813, 813, 813, 346, 205, 678, 188, 171, 171, 7, 7, 7, 7, 7, 376, 779, 54, 1083, 1083, 139, - 139, 139, 139, -50, 49, 749, 380, 787, -39, 569, - 569, 536, 536, 335, 335, 349, 349, 335, 335, 335, - 212, 212, 212, 212, 415, 494, 519, 512, -71, 807, - 584, 584, 584, 584, 807, 807, 807, 807, 795, 1086, - 807, 807, 807, 639, 828, 828, 979, 452, 452, 452, - 828, 492, -70, -70, 492, 394, -70, 516, 982, 637, - 988, 397, 785, 486, 509, 397, -16, 299, 502, 233, - 854, 633, 854, 1056, 832, 832, 794, 752, 898, 1085, - 1070, 839, 1106, 842, 1107, 471, 10, 747, 1055, 1055, - 1055, 1055, 1055, 1055, 1055, 1055, 1055, 1055, 1055, 1114, - 632, 1056, 145, 1114, 1114, 1114, 632, 632, 632, 632, - 632, 632, 632, 632, 796, 632, 632, 650, 145, 654, - 657, 145, 837, 632, 798, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, -18, 37, 37, 360, 5, - 5, 37, 341, 52, 5, 5, 5, 5, 37, 37, - 37, 37, 633, 830, 789, 636, 278, 843, 128, 830, - 830, 830, 26, 136, 120, 732, 815, 259, 822, 822, - 829, 933, 933, 822, 827, 822, 829, 822, 822, 933, - 933, 855, 933, 163, 541, 430, 514, 562, 933, 273, - 822, 822, 822, 822, 845, 933, 58, 573, 822, 234, - 194, 822, 822, 845, 805, 802, 793, 933, 933, 933, - 845, 470, 793, 793, 793, 859, 861, 800, 799, 390, - 356, 598, 127, 850, 799, 799, 822, 535, 800, 799, - 800, 799, 852, 799, 799, 799, 800, 799, 827, 456, - 799, 720, 728, 586, 75, 799, 19, 950, 953, 734, - 954, 944, 955, 1008, 958, 959, 1073, 930, 977, 947, - 966, 1009, 935, 934, 811, 666, 692, 809, 784, 929, - 823, 823, 823, 917, 918, 823, 823, 823, 823, 823, - 823, 823, 823, 666, 847, 838, 817, 983, 703, 705, - 1044, 782, 1090, 1081, 982, 950, 959, 739, 947, 966, - 935, 934, 792, 790, 772, 783, 769, 763, 760, 762, - 797, 1046, 974, 791, 707, 1016, 985, 1089, 1071, 986, - 987, 1018, 1047, 866, 1050, 1091, 824, 1092, 1093, 900, - 989, 1074, 823, 912, 897, 901, 988, 925, 666, 902, - 1051, 997, 851, 1019, 1021, 1072, 834, 821, 907, 1094, - 990, 991, 999, 1075, 1076, 853, 1003, 804, 1022, 841, - 803, 1023, 1030, 1033, 1036, 1077, 1095, 1079, 911, 1080, - 868, 818, 931, 840, 1096, 307, 835, 836, 849, 1005, - 605, 978, 1082, 1087, 1097, 1040, 1041, 1042, 1098, 1099, - 975, 869, 1012, 833, 1014, 964, 870, 871, 608, 848, - 1052, 819, 831, 844, 626, 634, 1100, 1101, 1102, 976, - 806, 816, 875, 877, 1053, 826, 1054, 1103, 640, 880, - 1104, 1045, 736, 740, 560, 662, 647, 750, 820, 1084, - 814, 801, 810, 1001, 740, 808, 881, 1105, 883, 887, - 888, 1043, 892, 0, 0, 0, 0, 0, 0, 0, + 139, 139, 139, 227, -55, 749, 380, -40, 787, 604, + 626, 626, 536, 536, 478, 478, 349, 349, 478, 478, + 478, 465, 465, 465, 465, 415, 494, 519, 43, 366, + 858, 584, 584, 584, 584, 858, 858, 858, 858, 814, + 1118, 858, 858, 858, 639, 828, 828, 979, 452, 452, + 452, 828, 370, -70, -70, 370, 601, -70, 511, 987, + 634, 999, 397, 815, 627, 434, 397, 299, 455, 502, + 233, 816, 687, 816, 1062, 842, 842, 802, 739, 902, + 1091, 1075, 845, 1110, 854, 1111, 470, 10, 734, 1061, + 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, + 1119, 632, 1062, -3, 1119, 1119, 1119, 632, 632, 632, + 632, 632, 632, 632, 632, 806, 632, 632, 759, -3, + 612, 664, -3, 853, 632, 817, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, -12, 37, 37, + 360, 5, 5, 37, 142, 53, 5, 5, 5, 5, + 37, 37, 37, 37, 687, 847, 810, 721, -18, 820, + 120, 847, 847, 847, 26, 136, 115, 727, 837, 259, + 827, 827, 827, 833, 947, 947, 827, 830, 827, 833, + 827, 827, 947, 947, 809, 947, 217, 509, 430, 500, + 514, 947, 356, 827, 827, 827, 827, 807, 947, 75, + 535, 827, 286, 234, 827, 827, 807, 804, 812, 801, + 947, 947, 947, 807, 496, 801, 801, 801, 866, 868, + 849, 811, 390, 375, 562, 163, 864, 811, 811, 827, + 503, 849, 811, 849, 811, 859, 811, 811, 811, 849, + 811, 830, 456, 811, 699, 705, 541, 113, 811, 14, + 958, 959, 617, 966, 954, 974, 1017, 975, 976, 1077, + 944, 985, 955, 977, 1019, 953, 950, 832, 651, 655, + 821, 798, 935, 836, 836, 836, 930, 933, 836, 836, + 836, 836, 836, 836, 836, 836, 651, 907, 860, 824, + 988, 657, 667, 1051, 797, 1094, 1081, 987, 958, 976, + 725, 955, 977, 953, 950, 799, 794, 790, 792, 783, + 772, 752, 769, 808, 1053, 978, 844, 692, 1023, 989, + 1093, 1018, 990, 991, 1030, 1054, 869, 1055, 1095, 838, + 1096, 1097, 909, 1001, 1079, 836, 929, 897, 912, 999, + 934, 651, 913, 1056, 997, 805, 1033, 1036, 1076, 841, + 826, 918, 1098, 1005, 1008, 1009, 1080, 1082, 861, 1003, + 900, 1040, 843, 1087, 1041, 1042, 1043, 1044, 1084, 1099, + 1085, 925, 1086, 870, 839, 931, 840, 1100, 307, 851, + 852, 857, 1015, 591, 986, 1089, 1092, 1101, 1045, 1046, + 1047, 1102, 1103, 982, 871, 1021, 822, 1022, 964, 875, + 877, 606, 856, 1058, 846, 850, 855, 640, 644, 1104, + 1105, 1106, 983, 819, 829, 880, 881, 1059, 638, 1060, + 1107, 646, 883, 1108, 1052, 714, 728, 560, 624, 602, + 736, 825, 1090, 848, 818, 834, 1013, 728, 823, 887, + 1109, 888, 892, 894, 1050, 898, 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, 468, 468, 468, 468, 468, 468, 313, - 313, 313, 313, 313, 468, 468, 468, 468, 468, 468, - 468, 313, 468, 468, 468, 313, 0, 0, 313, 0, + 0, 0, 0, 0, 0, 0, 468, 468, 468, 468, + 468, 468, 313, 313, 313, 313, 313, 468, 468, 468, + 468, 468, 468, 468, 313, 468, 468, 468, 313, 0, + 0, 313, 0, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, @@ -747,44 +750,44 @@ class Php7 extends \PhpParser\ParserAbstract 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 297, 297, 297, 297, 297, + 468, 468, 468, 468, 468, 468, 468, 468, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 297, 297, 297, 297, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 716, - 716, 297, 297, 297, 297, 716, 716, 716, 716, 716, - 716, 716, 716, 716, 716, 297, 297, 0, 297, 297, - 297, 297, 297, 297, 297, 297, 855, 716, 716, 716, - 716, 452, 452, 452, 452, -95, -95, 716, 716, 716, - 394, 716, 716, 452, 452, 716, 716, 716, 716, 716, - 716, 716, 716, 716, 716, 716, 0, 0, 0, 145, - -70, 716, 827, 827, 827, 827, 716, 716, 716, 716, - -70, -70, 716, 716, 716, 0, 0, 0, 0, 0, - 0, 0, 0, 145, 0, 0, 145, 0, 0, 827, - 638, 827, 638, 716, 394, 855, 659, 716, 0, 0, - 0, 0, 145, 827, 145, 632, -70, -70, 632, 632, - 5, 37, 659, 613, 613, 613, 613, 0, 0, 633, - 855, 855, 855, 855, 855, 855, 855, 855, 855, 855, - 855, 827, 0, 855, 0, 827, 827, 827, 0, 0, - 0, 0, 0, 0, 0, 0, 933, 0, 0, 0, - 0, 0, 0, 0, 827, 0, 933, 0, 0, 0, + 297, 297, 716, 716, 297, 297, 297, 297, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 297, 297, + 0, 297, 297, 297, 297, 297, 297, 297, 297, 809, + 716, 716, 716, 716, 452, 452, 452, 452, -95, -95, + 716, 716, 601, 716, 601, 716, 716, 452, 452, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 0, 0, 0, -3, -70, 716, 830, 830, 830, 830, + 716, 716, 716, 716, -70, -70, 716, 716, 716, 0, + 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, + -3, 0, 0, 830, 656, 830, 656, 716, 601, 809, + 374, 716, 0, 0, 0, 0, -3, 830, -3, 632, + -70, -70, 632, 632, 5, 37, 374, 659, 659, 659, + 659, 0, 0, 687, 809, 809, 809, 809, 809, 809, + 809, 809, 809, 809, 809, 830, 0, 809, 0, 830, + 830, 830, 0, 0, 0, 0, 0, 0, 0, 0, + 947, 0, 0, 0, 0, 0, 0, 0, 830, 0, + 947, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 827, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 823, 834, 0, 0, 834, - 0, 823, 823, 823, 0, 0, 0, 848, 826 + 830, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 836, 841, 0, 0, 841, 0, 836, 836, 836, 0, + 0, 0, 856, 638 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 618, 618, - 618, 618,32767,32767, 255, 102,32767,32767, 487, 404, - 404, 404,32767,32767, 560, 560, 560, 560, 560,32767, - 32767,32767,32767,32767,32767, 487,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 619, 619, + 619, 619,32767,32767, 256, 102,32767,32767, 488, 405, + 405, 405,32767,32767, 561, 561, 561, 561, 561,32767, + 32767,32767,32767,32767,32767, 488,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, @@ -792,142 +795,138 @@ class Php7 extends \PhpParser\ParserAbstract 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, 36, 7, - 8, 10, 11, 49, 17, 328, 100,32767,32767,32767, + 8, 10, 11, 49, 17, 329, 100,32767,32767,32767, 32767,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 611,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 612,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 392, 491, 470, - 471, 473, 474, 403, 561, 617, 331, 614, 333, 402, - 145, 343, 334, 243, 259, 492, 260, 493, 496, 497, - 216, 389, 149, 150, 434, 488, 436, 486, 490, 435, - 409, 415, 416, 417, 418, 419, 420, 421, 422, 423, - 424, 425, 426, 427, 407, 408, 489,32767,32767, 467, - 466, 465, 432,32767,32767,32767,32767,32767,32767,32767, - 32767, 102,32767, 433, 437, 406, 440, 438, 439, 456, - 457, 454, 455, 458,32767,32767, 320,32767,32767, 459, - 460, 461, 462, 370, 368,32767,32767, 320, 111,32767, - 32767, 447, 448,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 504, 554, 464,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 393, 492, 471, + 472, 474, 475, 404, 562, 618, 332, 615, 334, 403, + 146, 344, 335, 244, 260, 493, 261, 494, 497, 498, + 217, 390, 150, 151, 435, 489, 437, 487, 491, 436, + 410, 416, 417, 418, 419, 420, 421, 422, 423, 424, + 425, 426, 427, 428, 408, 409, 490,32767,32767, 468, + 467, 466, 433,32767,32767,32767,32767,32767,32767,32767, + 32767, 102,32767, 434, 438, 407, 441, 439, 440, 457, + 458, 455, 456, 459,32767,32767, 321,32767,32767, 460, + 461, 462, 463, 371, 369,32767,32767, 111, 321, 111, + 32767,32767, 448, 449,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 505, 555, 465,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 102,32767, 100, 556, 429, 431, 524, 442, 443, 441, - 410,32767, 529,32767, 102,32767, 531,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 555,32767, 562, 562, - 32767, 517, 100, 195,32767, 530, 195, 195,32767,32767, - 32767,32767,32767,32767,32767,32767, 625, 517, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, - 195, 110,32767,32767,32767, 100, 195, 195, 195, 195, - 195, 195, 195, 195, 532, 195, 195, 190,32767, 269, - 271, 102, 579, 195, 534,32767,32767,32767,32767,32767, + 32767, 102,32767, 100, 557, 430, 432, 525, 443, 444, + 442, 411,32767, 530,32767, 102,32767, 532,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 556,32767, 563, + 563,32767, 518, 100, 196,32767, 531, 196, 196,32767, + 32767,32767,32767,32767,32767,32767,32767, 626, 518, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 32767, 196, 110,32767,32767,32767, 100, 196, 196, 196, + 196, 196, 196, 196, 196, 533, 196, 196, 191,32767, + 270, 272, 102, 580, 196, 535,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, 517, 452, 138,32767, 519, 138, 562, 444, - 445, 446, 562, 562, 562, 316, 293,32767,32767,32767, - 32767, 532, 532, 100, 100, 100, 100,32767,32767,32767, - 32767, 111, 503, 99, 99, 99, 99, 99, 103, 101, - 32767,32767,32767,32767, 224,32767, 101, 99,32767, 101, - 101,32767,32767, 224, 226, 213, 228,32767, 583, 584, - 224, 101, 228, 228, 228, 248, 248, 506, 322, 101, - 99, 101, 101, 197, 322, 322,32767, 101, 506, 322, - 506, 322, 199, 322, 322, 322, 506, 322,32767, 101, - 322, 215, 392, 99, 99, 322,32767,32767,32767, 519, - 32767,32767,32767,32767,32767,32767,32767, 223,32767,32767, - 32767,32767,32767,32767,32767,32767, 549,32767, 567, 581, - 450, 451, 453, 566, 564, 475, 476, 477, 478, 479, - 480, 481, 483, 613,32767, 523,32767,32767,32767, 342, - 32767, 623,32767,32767,32767, 9, 74, 512, 42, 43, - 51, 57, 538, 539, 540, 541, 535, 536, 542, 537, + 32767,32767,32767,32767, 518, 453, 139,32767, 520, 139, + 563, 445, 446, 447, 563, 563, 563, 317, 294,32767, + 32767,32767,32767,32767, 533, 533, 100, 100, 100, 100, + 32767,32767,32767,32767, 111, 504, 99, 99, 99, 99, + 99, 103, 101,32767,32767,32767,32767, 225,32767, 101, + 99,32767, 101, 101,32767,32767, 225, 227, 214, 229, + 32767, 584, 585, 225, 101, 229, 229, 229, 249, 249, + 507, 323, 101, 99, 101, 101, 198, 323, 323,32767, + 101, 507, 323, 507, 323, 200, 323, 323, 323, 507, + 323,32767, 101, 323, 216, 393, 99, 99, 323,32767, + 32767,32767, 520,32767,32767,32767,32767,32767,32767,32767, + 224,32767,32767,32767,32767,32767,32767,32767,32767, 550, + 32767, 568, 582, 451, 452, 454, 567, 565, 476, 477, + 478, 479, 480, 481, 482, 484, 614,32767, 524,32767, + 32767,32767, 343,32767, 624,32767,32767,32767, 9, 74, + 513, 42, 43, 51, 57, 539, 540, 541, 542, 536, + 537, 543, 538,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 625,32767, + 563,32767,32767,32767,32767, 450, 545, 590,32767,32767, + 564, 617,32767,32767,32767,32767,32767,32767,32767, 139, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 624,32767, 562,32767,32767, - 32767,32767, 449, 544, 589,32767,32767, 563, 616,32767, - 32767,32767,32767,32767,32767,32767, 138,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 549,32767, 136, - 32767,32767,32767,32767,32767,32767,32767,32767, 545,32767, - 32767,32767, 562,32767,32767,32767,32767, 318, 315,32767, + 550,32767, 137,32767,32767,32767,32767,32767,32767,32767, + 32767, 546,32767,32767,32767, 563,32767,32767,32767,32767, + 319, 316,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 563,32767, + 32767,32767,32767,32767, 296,32767, 313,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 562,32767,32767,32767,32767, - 32767, 295,32767, 312,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 388, 519, 298, 300, 301,32767,32767,32767, - 32767, 364,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 152, 152, 3, 3, 345, 152, 152, - 152, 345, 345, 152, 345, 345, 345, 152, 152, 152, - 152, 152, 152, 281, 185, 263, 266, 248, 248, 152, - 356, 152 + 32767,32767,32767,32767,32767, 389, 520, 299, 301, 302, + 32767,32767,32767,32767, 365,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 153, 153, 3, 3, + 346, 153, 153, 153, 346, 346, 153, 346, 346, 346, + 153, 153, 153, 153, 153, 153, 282, 186, 264, 267, + 249, 249, 153, 357, 153 ); protected array $goto = array( - 196, 196, 1041, 352, 700, 465, 587, 470, 470, 1072, - 736, 641, 643, 1205, 855, 663, 470, 856, 709, 687, - 690, 1014, 698, 707, 1010, 625, 662, 166, 166, 166, + 196, 196, 1045, 1076, 703, 468, 590, 473, 473, 858, + 739, 644, 646, 1209, 859, 666, 473, 833, 712, 690, + 693, 1018, 701, 710, 1014, 423, 353, 166, 166, 166, 166, 220, 197, 193, 193, 176, 178, 215, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 188, 189, - 190, 191, 192, 217, 215, 218, 540, 541, 423, 542, - 545, 546, 547, 548, 549, 550, 551, 552, 1156, 167, + 190, 191, 192, 217, 215, 218, 543, 544, 425, 545, + 548, 549, 550, 551, 552, 553, 554, 555, 1160, 167, 168, 169, 195, 170, 171, 172, 165, 173, 174, 175, 177, 214, 216, 219, 239, 242, 253, 254, 256, 257, 258, 259, 260, 261, 262, 263, 269, 270, 271, 272, - 281, 282, 317, 318, 319, 429, 430, 431, 602, 221, + 282, 283, 318, 319, 320, 431, 432, 433, 605, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 179, 236, 180, 188, 189, 190, - 191, 192, 217, 1156, 198, 199, 200, 201, 240, 181, + 191, 192, 217, 1160, 198, 199, 200, 201, 240, 181, 182, 202, 183, 203, 199, 184, 241, 198, 164, 204, 205, 185, 206, 207, 208, 186, 209, 210, 187, 211, - 212, 213, 278, 278, 278, 278, 858, 433, 665, 979, - 916, 604, 917, 428, 320, 314, 315, 338, 597, 432, - 339, 434, 642, 627, 627, 896, 854, 896, 896, 1291, - 1291, 1291, 1291, 1291, 1291, 1291, 1291, 1291, 1291, 614, - 628, 631, 632, 633, 634, 655, 656, 657, 711, 830, - 871, 460, 912, 907, 908, 921, 864, 909, 861, 910, - 911, 862, 356, 915, 868, 421, 883, 482, 867, 870, - 1361, 1361, 356, 356, 484, 1094, 1089, 1090, 1091, 889, - 603, 1107, 397, 400, 605, 609, 356, 356, 1361, 594, - 356, 712, 344, 1378, 353, 354, 511, 703, 442, 1105, - 1260, 1041, 1260, 1260, 350, 559, 1364, 1364, 356, 356, - 1041, 1260, 1041, 1351, 1041, 1041, 345, 344, 1041, 1041, - 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1000, - 1236, 948, 249, 249, 1260, 1237, 1240, 949, 1241, 1260, - 1260, 1260, 1260, 1114, 1115, 1260, 1260, 1260, 1343, 1343, - 1343, 1343, 564, 557, 851, 427, 1322, 616, 395, 247, - 247, 247, 247, 244, 250, 592, 929, 503, 664, 504, - 930, 355, 355, 355, 355, 510, 945, 512, 945, 479, - 1336, 1337, 328, 557, 564, 589, 590, 330, 600, 606, - 1153, 621, 622, 555, 1065, 555, 555, 658, 659, 25, - 676, 677, 678, 440, 555, 1310, 1310, 686, 559, 851, - 670, 1310, 1310, 1310, 1310, 1310, 1310, 1310, 1310, 1310, - 1310, 1044, 1044, 1047, 1046, 685, 956, 458, 340, 1036, - 1052, 1053, 973, 973, 973, 973, 1050, 1051, 458, 967, - 974, 1307, 1307, 971, 412, 708, 848, 1307, 1307, 1307, - 1307, 1307, 1307, 1307, 1307, 1307, 1307, 5, 610, 6, - 873, 934, 1143, 451, 451, 876, 451, 451, 1333, 962, - 1333, 1333, 1253, 1019, 404, 553, 553, 553, 553, 1333, - 608, 875, 620, 668, 998, 1251, 558, 584, 1022, 869, - 739, 558, 885, 584, 480, 398, 464, 1078, 697, 326, - 309, 1250, 832, 1345, 1345, 1345, 1345, 1082, 473, 601, - 474, 475, 1338, 1339, 697, 1128, 881, 697, 984, 1369, - 1370, 598, 619, 1032, 0, 544, 544, 851, 836, 0, - 1329, 544, 544, 544, 544, 544, 544, 544, 544, 544, - 544, 543, 543, 1255, 879, 0, 0, 543, 0, 543, - 543, 543, 543, 543, 543, 543, 543, 451, 451, 451, - 451, 451, 451, 451, 451, 451, 451, 451, 252, 252, - 451, 836, 1080, 836, 409, 410, 1331, 1331, 1080, 674, - 0, 675, 0, 414, 415, 416, 0, 688, 0, 0, - 417, 635, 637, 639, 0, 348, 0, 0, 1256, 1257, - 0, 1243, 884, 872, 1077, 1081, 0, 846, 1003, 0, - 0, 975, 0, 735, 1243, 982, 556, 1012, 1007, 0, - 435, 0, 0, 0, 0, 0, 1258, 1319, 1320, 0, - 0, 435, 273, 325, 0, 325, 325, 0, 972, 1048, - 1048, 0, 0, 0, 669, 1059, 1055, 1056, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1126, 888, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1017, 1017 + 212, 213, 279, 277, 279, 279, 861, 983, 411, 412, + 920, 607, 921, 677, 854, 678, 854, 416, 417, 418, + 357, 691, 345, 463, 419, 463, 435, 668, 893, 349, + 357, 357, 430, 321, 315, 316, 339, 600, 434, 340, + 436, 645, 485, 597, 357, 357, 346, 345, 357, 487, + 351, 1382, 916, 911, 912, 925, 867, 913, 864, 914, + 915, 865, 868, 562, 919, 872, 357, 357, 429, 871, + 619, 854, 445, 1355, 630, 630, 1098, 1093, 1094, 1095, + 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, + 617, 631, 634, 635, 636, 637, 658, 659, 660, 714, + 1264, 1045, 1264, 1264, 661, 662, 1004, 679, 680, 681, + 1045, 1264, 396, 1045, 1326, 1045, 1045, 354, 355, 1045, + 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, + 900, 857, 900, 900, 595, 1264, 515, 506, 667, 507, + 1264, 1264, 1264, 1264, 1069, 513, 1264, 1264, 1264, 1347, + 1347, 1347, 1347, 567, 560, 356, 356, 356, 356, 1157, + 5, 558, 6, 558, 558, 628, 665, 933, 562, 1051, + 1050, 934, 558, 556, 556, 556, 556, 949, 611, 949, + 482, 1340, 1341, 329, 560, 567, 592, 593, 331, 603, + 609, 854, 624, 625, 249, 249, 461, 975, 414, 711, + 25, 977, 977, 977, 977, 1314, 1314, 461, 971, 978, + 443, 1314, 1314, 1314, 1314, 1314, 1314, 1314, 1314, 1314, + 1314, 247, 247, 247, 247, 244, 250, 1311, 1311, 1118, + 1119, 839, 1257, 1311, 1311, 1311, 1311, 1311, 1311, 1311, + 1311, 1311, 1311, 547, 547, 398, 401, 608, 612, 547, + 547, 547, 547, 547, 547, 547, 547, 547, 547, 638, + 640, 642, 689, 454, 454, 673, 454, 454, 1337, 1259, + 1337, 1337, 546, 546, 839, 341, 839, 851, 546, 1337, + 546, 546, 546, 546, 546, 546, 546, 546, 561, 587, + 561, 623, 1007, 405, 561, 979, 587, 738, 399, 467, + 559, 1016, 1011, 966, 1349, 1349, 1349, 1349, 1054, 1055, + 880, 476, 604, 477, 478, 877, 1365, 1365, 437, 885, + 1255, 700, 1373, 1374, 1082, 835, 1260, 1261, 742, 1247, + 437, 1333, 875, 1026, 1365, 849, 406, 700, 1052, 1052, + 700, 889, 1247, 672, 1063, 1059, 1060, 883, 887, 327, + 310, 874, 1368, 1368, 1262, 1323, 1324, 483, 454, 454, + 454, 454, 454, 454, 454, 454, 454, 454, 454, 1342, + 1343, 454, 613, 1084, 1086, 938, 1147, 1335, 1335, 1084, + 601, 622, 1021, 1021, 988, 1036, 1132, 1023, 888, 876, + 1081, 1085, 0, 0, 0, 879, 0, 671, 1002, 0, + 0, 986, 0, 873, 1048, 1048, 0, 0, 688, 960, + 606, 1111, 1040, 1056, 1057, 1254, 273, 326, 0, 326, + 326, 715, 0, 0, 976, 0, 514, 706, 0, 1109, + 252, 252, 1240, 952, 0, 0, 0, 1241, 1244, 953, + 1245, 0, 0, 0, 0, 0, 0, 1130, 892 ); protected array $gotoCheck = array( - 42, 42, 73, 97, 73, 156, 48, 154, 154, 128, - 48, 48, 48, 156, 26, 48, 154, 27, 9, 48, - 48, 48, 48, 48, 48, 56, 56, 42, 42, 42, + 42, 42, 73, 128, 73, 156, 48, 154, 154, 26, + 48, 48, 48, 156, 27, 48, 154, 6, 9, 48, + 48, 48, 48, 48, 48, 43, 97, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -941,101 +940,97 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 23, 23, 23, 23, 15, 66, 66, 49, - 65, 131, 65, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 108, 108, 25, 25, 25, 25, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 6, - 35, 83, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 14, 15, 15, 43, 35, 84, 15, 35, - 188, 188, 14, 14, 84, 15, 15, 15, 15, 45, - 8, 8, 59, 59, 59, 59, 14, 14, 188, 178, - 14, 8, 174, 14, 97, 97, 8, 8, 83, 8, - 73, 73, 73, 73, 185, 14, 188, 188, 14, 14, - 73, 73, 73, 187, 73, 73, 174, 174, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 103, - 79, 79, 5, 5, 73, 79, 79, 79, 79, 73, - 73, 73, 73, 145, 145, 73, 73, 73, 9, 9, - 9, 9, 76, 76, 22, 13, 14, 13, 62, 5, - 5, 5, 5, 5, 5, 104, 73, 160, 64, 160, - 73, 24, 24, 24, 24, 160, 9, 14, 9, 182, - 182, 182, 76, 76, 76, 76, 76, 76, 76, 76, - 155, 76, 76, 19, 115, 19, 19, 86, 86, 76, - 86, 86, 86, 113, 19, 176, 176, 117, 14, 22, - 121, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 89, 89, 119, 119, 89, 89, 19, 29, 89, - 89, 89, 19, 19, 19, 19, 120, 120, 19, 19, - 19, 177, 177, 93, 93, 93, 18, 177, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 46, 17, 46, - 37, 17, 17, 23, 23, 39, 23, 23, 131, 92, - 131, 131, 14, 17, 28, 107, 107, 107, 107, 131, - 107, 17, 80, 17, 17, 166, 9, 9, 110, 17, - 99, 9, 41, 9, 157, 9, 9, 130, 7, 175, - 175, 17, 7, 131, 131, 131, 131, 133, 9, 9, - 9, 9, 184, 184, 7, 148, 9, 7, 96, 9, - 9, 2, 2, 114, -1, 179, 179, 22, 12, -1, - 131, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 162, 162, 20, 9, -1, -1, 162, -1, 162, - 162, 162, 162, 162, 162, 162, 162, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 5, 5, - 23, 12, 131, 12, 82, 82, 131, 131, 131, 82, - -1, 82, -1, 82, 82, 82, -1, 82, -1, -1, - 82, 85, 85, 85, -1, 82, -1, -1, 20, 20, - -1, 20, 16, 16, 16, 16, -1, 20, 50, -1, - -1, 50, -1, 50, 20, 16, 50, 50, 50, -1, - 118, -1, -1, -1, -1, -1, 20, 20, 20, -1, - -1, 118, 24, 24, -1, 24, 24, -1, 16, 118, - 118, -1, -1, -1, 118, 118, 118, 118, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 16, 16, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 107, 107 + 42, 42, 23, 23, 23, 23, 15, 49, 82, 82, + 65, 131, 65, 82, 22, 82, 22, 82, 82, 82, + 14, 82, 174, 83, 82, 83, 66, 66, 45, 82, + 14, 14, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 84, 178, 14, 14, 174, 174, 14, 84, + 185, 14, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 14, 15, 15, 14, 14, 13, 15, + 13, 22, 83, 187, 108, 108, 15, 15, 15, 15, + 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 73, 73, 73, 73, 86, 86, 103, 86, 86, 86, + 73, 73, 62, 73, 14, 73, 73, 97, 97, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 25, 25, 25, 25, 104, 73, 14, 160, 64, 160, + 73, 73, 73, 73, 115, 160, 73, 73, 73, 9, + 9, 9, 9, 76, 76, 24, 24, 24, 24, 155, + 46, 19, 46, 19, 19, 56, 56, 73, 14, 119, + 119, 73, 19, 107, 107, 107, 107, 9, 107, 9, + 182, 182, 182, 76, 76, 76, 76, 76, 76, 76, + 76, 22, 76, 76, 5, 5, 19, 93, 93, 93, + 76, 19, 19, 19, 19, 176, 176, 19, 19, 19, + 113, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 5, 5, 5, 5, 5, 5, 177, 177, 145, + 145, 12, 14, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 179, 179, 59, 59, 59, 59, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 85, + 85, 85, 117, 23, 23, 121, 23, 23, 131, 20, + 131, 131, 162, 162, 12, 29, 12, 18, 162, 131, + 162, 162, 162, 162, 162, 162, 162, 162, 9, 9, + 9, 80, 50, 28, 9, 50, 9, 50, 9, 9, + 50, 50, 50, 92, 131, 131, 131, 131, 120, 120, + 39, 9, 9, 9, 9, 37, 188, 188, 118, 9, + 166, 7, 9, 9, 130, 7, 20, 20, 99, 20, + 118, 131, 35, 110, 188, 20, 31, 7, 118, 118, + 7, 41, 20, 118, 118, 118, 118, 9, 35, 175, + 175, 35, 188, 188, 20, 20, 20, 157, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 184, + 184, 23, 17, 131, 133, 17, 17, 131, 131, 131, + 2, 2, 107, 107, 96, 114, 148, 17, 16, 16, + 16, 16, -1, -1, -1, 17, -1, 17, 17, -1, + -1, 16, -1, 17, 89, 89, -1, -1, 89, 89, + 8, 8, 89, 89, 89, 17, 24, 24, -1, 24, + 24, 8, -1, -1, 16, -1, 8, 8, -1, 8, + 5, 5, 79, 79, -1, -1, -1, 79, 79, 79, + 79, -1, -1, -1, -1, -1, -1, 16, 16 ); protected array $gotoBase = array( - 0, 0, -234, 0, 0, 291, 199, 451, 232, 8, - 0, 0, 191, -25, -76, -183, 108, -48, 96, 88, - 109, 0, 36, 159, 328, 182, 10, 13, 94, 91, - 0, 0, 0, 0, 0, -162, 0, 78, 0, 101, - 0, 9, -1, 202, 0, 213, -322, 0, -708, 151, - 556, 0, 0, 0, 0, 0, -15, 0, 0, 197, - 0, 0, 276, 0, 90, 156, -70, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -34, 0, 0, -119, - 112, -160, 40, -67, -246, 69, -364, 0, 0, 102, - 0, 0, 97, 98, 0, 0, 33, -483, 0, 42, - 0, 0, 0, 254, 282, 0, 0, 407, -54, 0, - 77, 0, 0, 86, -29, 79, 0, 84, 314, 104, - 111, 80, 0, 0, 0, 0, 0, 0, 7, 0, - 82, 163, 0, 23, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 30, 0, 0, 29, 0, - 0, 0, 0, 0, -27, 106, -263, 12, 0, 0, - -171, 0, 264, 0, 0, 0, 75, 0, 0, 0, - 0, 0, 0, 0, -46, 137, 128, 164, 220, 248, - 0, 0, 38, 0, 99, 234, 0, 242, -78, 0, + 0, 0, -178, 0, 0, 353, 7, 474, 562, 8, + 0, 0, 93, -113, -119, -184, 91, 63, 126, 56, + 34, 0, -103, 159, 312, 287, 5, 10, 112, 137, + 0, 54, 0, 0, 0, 119, 0, 132, 0, 145, + 0, 55, -1, 2, 0, 162, -422, 0, -711, 149, + 440, 0, 0, 0, 0, 0, 285, 0, 0, 360, + 0, 0, 230, 0, 60, 156, -51, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -34, 0, 0, 181, + 120, -110, -329, -94, -274, -66, -460, 0, 0, 284, + 0, 0, 130, 51, 0, 0, 96, -463, 0, 78, + 0, 0, 0, 231, 251, 0, 0, 305, -3, 0, + 121, 0, 0, 92, 30, 29, 0, 138, 212, 49, + 182, 134, 0, 0, 0, 0, 0, 0, 1, 0, + 108, 163, 0, 87, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 116, 0, 0, 97, 0, + 0, 0, 0, 0, -27, 75, -263, 72, 0, 0, + -204, 0, 195, 0, 0, 0, 109, 0, 0, 0, + 0, 0, 0, 0, -117, 186, 128, 150, 174, 166, + 0, 0, 38, 0, 155, 180, 0, 202, 167, 0, 0 ); protected array $gotoDefault = array( - -32768, 516, 743, 4, 744, 938, 819, 828, 580, 534, - 710, 349, 629, 424, 1327, 914, 1142, 599, 847, 1269, - 1275, 459, 850, 333, 733, 926, 897, 898, 401, 388, - 863, 399, 653, 630, 497, 882, 455, 874, 489, 877, - 454, 886, 163, 420, 514, 890, 3, 893, 562, 924, - 977, 389, 901, 390, 681, 903, 583, 905, 906, 396, - 402, 403, 1147, 591, 626, 918, 255, 585, 919, 387, - 920, 928, 392, 394, 691, 469, 508, 502, 413, 1109, - 586, 613, 650, 448, 476, 624, 636, 623, 483, 436, - 418, 332, 961, 969, 490, 467, 983, 351, 991, 741, - 1155, 644, 492, 999, 645, 1006, 1009, 535, 536, 481, - 1021, 266, 1024, 493, 1033, 23, 671, 1038, 1039, 672, - 646, 1061, 647, 673, 648, 1063, 466, 581, 1071, 456, - 1079, 1315, 457, 1083, 264, 1086, 277, 419, 437, 1092, - 1093, 9, 1099, 701, 702, 19, 274, 513, 1127, 692, - -32768,-32768,-32768,-32768, 453, 1154, 452, 1224, 1226, 563, - 494, 1244, 294, 1247, 684, 509, 1252, 449, 1318, 450, - 537, 477, 316, 538, 1362, 308, 336, 313, 554, 295, - 337, 539, 478, 1324, 1332, 334, 31, 1352, 1363, 596, - 618 + -32768, 519, 746, 4, 747, 942, 822, 831, 583, 537, + 713, 350, 632, 426, 1331, 918, 1146, 602, 850, 1273, + 1279, 462, 853, 334, 736, 930, 901, 902, 402, 389, + 866, 400, 656, 633, 500, 886, 458, 878, 492, 881, + 457, 890, 163, 422, 517, 894, 3, 897, 565, 928, + 981, 390, 905, 391, 684, 907, 586, 909, 910, 397, + 403, 404, 1151, 594, 629, 922, 255, 588, 923, 388, + 924, 932, 393, 395, 694, 472, 511, 505, 415, 1113, + 589, 616, 653, 451, 479, 627, 639, 626, 486, 438, + 420, 333, 965, 973, 493, 470, 987, 352, 995, 744, + 1159, 647, 495, 1003, 648, 1010, 1013, 538, 539, 484, + 1025, 266, 1028, 496, 1037, 23, 674, 1042, 1043, 675, + 649, 1065, 650, 676, 651, 1067, 469, 584, 1075, 459, + 1083, 1319, 460, 1087, 264, 1090, 278, 421, 439, 1096, + 1097, 9, 1103, 704, 705, 19, 274, 516, 1131, 695, + -32768,-32768,-32768,-32768, 456, 1158, 455, 1228, 1230, 566, + 497, 1248, 295, 1251, 687, 512, 1256, 452, 1322, 453, + 540, 480, 317, 541, 1366, 309, 337, 314, 557, 296, + 338, 542, 481, 1328, 1336, 335, 31, 1356, 1367, 599, + 621 ); protected array $ruleToNonTerminal = array( @@ -1051,35 +1046,35 @@ class Php7 extends \PhpParser\ParserAbstract 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, - 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, - 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, - 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, + 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, + 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, + 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, + 45, 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 25, 25, 50, 69, 69, 72, 72, 71, - 70, 70, 63, 75, 75, 76, 76, 77, 77, 78, - 78, 79, 79, 80, 80, 80, 26, 26, 27, 27, - 27, 27, 27, 88, 88, 90, 90, 83, 83, 91, - 91, 92, 92, 92, 84, 84, 87, 87, 85, 85, - 93, 94, 94, 57, 57, 65, 65, 68, 68, 68, - 67, 95, 95, 96, 58, 58, 58, 58, 97, 97, - 98, 98, 99, 99, 100, 101, 101, 102, 102, 103, - 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, - 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, - 109, 111, 111, 112, 112, 112, 112, 112, 112, 112, - 110, 110, 110, 115, 115, 115, 115, 89, 89, 118, - 118, 118, 119, 119, 116, 116, 120, 120, 122, 122, - 123, 123, 117, 124, 124, 121, 125, 125, 125, 125, - 113, 113, 82, 82, 82, 20, 20, 20, 127, 126, - 126, 128, 128, 128, 128, 60, 129, 129, 130, 61, - 132, 132, 133, 133, 134, 134, 86, 135, 135, 135, - 135, 135, 135, 135, 140, 140, 141, 141, 142, 142, - 142, 142, 142, 143, 144, 144, 139, 139, 136, 136, - 138, 138, 146, 146, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 137, 147, 147, 149, 148, 148, - 150, 150, 114, 151, 151, 153, 153, 153, 152, 152, - 62, 104, 154, 154, 56, 56, 42, 42, 42, 42, + 49, 49, 49, 25, 25, 50, 69, 69, 72, 72, + 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, + 78, 78, 79, 79, 80, 80, 80, 26, 26, 27, + 27, 27, 27, 27, 88, 88, 90, 90, 83, 83, + 91, 91, 92, 92, 92, 84, 84, 87, 87, 85, + 85, 93, 94, 94, 57, 57, 65, 65, 68, 68, + 68, 67, 95, 95, 96, 58, 58, 58, 58, 97, + 97, 98, 98, 99, 99, 100, 101, 101, 102, 102, + 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, + 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, + 109, 109, 111, 111, 112, 112, 112, 112, 112, 112, + 112, 110, 110, 110, 115, 115, 115, 115, 89, 89, + 118, 118, 118, 119, 119, 116, 116, 120, 120, 122, + 122, 123, 123, 117, 124, 124, 121, 125, 125, 125, + 125, 113, 113, 82, 82, 82, 20, 20, 20, 127, + 126, 126, 128, 128, 128, 128, 60, 129, 129, 130, + 61, 132, 132, 133, 133, 134, 134, 86, 135, 135, + 135, 135, 135, 135, 135, 140, 140, 141, 141, 142, + 142, 142, 142, 142, 143, 144, 144, 139, 139, 136, + 136, 138, 138, 146, 146, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 137, 147, 147, 149, 148, + 148, 150, 150, 114, 151, 151, 153, 153, 153, 152, + 152, 62, 104, 154, 154, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1089,20 +1084,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 161, 162, 162, 163, 155, 155, 160, 160, 164, 165, - 165, 166, 167, 168, 168, 168, 168, 19, 19, 73, - 73, 73, 73, 156, 156, 156, 156, 170, 170, 159, - 159, 159, 157, 157, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 177, 177, 177, 108, 179, 179, - 179, 179, 158, 158, 158, 158, 158, 158, 158, 158, - 59, 59, 173, 173, 173, 173, 173, 180, 180, 169, - 169, 169, 169, 181, 181, 181, 181, 181, 181, 74, - 74, 66, 66, 66, 66, 131, 131, 131, 131, 184, - 183, 172, 172, 172, 172, 172, 172, 172, 171, 171, - 171, 182, 182, 182, 182, 107, 178, 186, 186, 185, - 185, 187, 187, 187, 187, 187, 187, 187, 187, 175, - 175, 175, 175, 174, 189, 188, 188, 188, 188, 188, - 188, 188, 188, 190, 190, 190, 190 + 42, 161, 162, 162, 163, 155, 155, 160, 160, 164, + 165, 165, 166, 167, 168, 168, 168, 168, 19, 19, + 73, 73, 73, 73, 156, 156, 156, 156, 170, 170, + 159, 159, 159, 157, 157, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 177, 177, 177, 108, 179, + 179, 179, 179, 158, 158, 158, 158, 158, 158, 158, + 158, 59, 59, 173, 173, 173, 173, 173, 180, 180, + 169, 169, 169, 169, 181, 181, 181, 181, 181, 181, + 74, 74, 66, 66, 66, 66, 131, 131, 131, 131, + 184, 183, 172, 172, 172, 172, 172, 172, 172, 171, + 171, 171, 182, 182, 182, 182, 107, 178, 186, 186, + 185, 185, 187, 187, 187, 187, 187, 187, 187, 187, + 175, 175, 175, 175, 174, 189, 188, 188, 188, 188, + 188, 188, 188, 188, 190, 190, 190, 190 ); protected array $ruleToLength = array( @@ -1118,58 +1113,58 @@ class Php7 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, - 4, 1, 3, 1, 1, 8, 7, 2, 3, 1, - 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, - 1, 2, 2, 3, 1, 3, 2, 3, 1, 3, - 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, 6, 5, 6, 3, - 2, 1, 1, 1, 1, 0, 2, 1, 3, 8, - 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, - 1, 3, 1, 1, 1, 1, 8, 9, 7, 8, - 7, 6, 8, 0, 2, 0, 2, 1, 2, 1, - 2, 1, 1, 1, 0, 2, 0, 2, 0, 2, - 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, - 2, 1, 3, 3, 3, 4, 4, 5, 0, 2, - 4, 3, 1, 1, 7, 0, 2, 1, 3, 3, - 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, - 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, - 3, 0, 2, 1, 1, 1, 1, 1, 1, 1, - 7, 9, 6, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, - 3, 3, 1, 3, 3, 1, 1, 2, 1, 1, - 0, 1, 0, 2, 2, 2, 4, 3, 1, 1, - 3, 1, 2, 2, 3, 2, 3, 1, 1, 2, - 3, 1, 1, 3, 2, 0, 1, 5, 5, 6, - 10, 3, 5, 1, 1, 3, 0, 2, 4, 5, - 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, - 0, 2, 0, 5, 8, 1, 3, 3, 0, 2, - 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, - 4, 4, 1, 1, 2, 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, + 4, 1, 3, 4, 1, 1, 8, 7, 2, 3, + 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, + 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, + 3, 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, 6, 5, 6, + 3, 2, 1, 1, 1, 1, 0, 2, 1, 3, + 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, + 0, 1, 3, 1, 1, 1, 1, 8, 9, 7, + 8, 7, 6, 8, 0, 2, 0, 2, 1, 2, + 1, 2, 1, 1, 1, 0, 2, 0, 2, 0, + 2, 2, 1, 3, 1, 4, 1, 4, 1, 1, + 4, 2, 1, 3, 3, 3, 4, 4, 5, 0, + 2, 4, 3, 1, 1, 7, 0, 2, 1, 3, + 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, + 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, + 1, 3, 0, 2, 1, 1, 1, 1, 1, 1, + 1, 7, 9, 6, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, + 3, 3, 3, 1, 3, 3, 1, 1, 2, 1, + 1, 0, 1, 0, 2, 2, 2, 4, 3, 1, + 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, + 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, + 6, 10, 3, 5, 1, 1, 3, 0, 2, 4, + 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, + 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, + 3, 0, 2, 0, 5, 8, 1, 3, 3, 0, + 2, 2, 2, 3, 1, 0, 1, 1, 3, 3, + 3, 4, 4, 1, 1, 2, 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, 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, 2, 8, 9, 8, 9, 9, 10, 9, 10, - 8, 3, 2, 2, 1, 1, 0, 4, 2, 1, - 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, - 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 5, 3, 3, 4, 1, - 1, 3, 1, 1, 1, 1, 1, 3, 2, 3, - 0, 1, 1, 3, 1, 1, 1, 1, 1, 1, - 3, 1, 1, 1, 4, 4, 1, 4, 4, 0, - 1, 1, 1, 3, 3, 1, 4, 2, 2, 1, - 3, 1, 4, 4, 3, 3, 3, 3, 1, 3, - 1, 1, 3, 1, 1, 4, 1, 1, 1, 3, - 1, 1, 2, 1, 3, 4, 3, 2, 0, 2, - 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, - 3, 6, 3, 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, 10, 9, + 10, 8, 3, 2, 2, 1, 1, 0, 4, 2, + 1, 3, 2, 1, 2, 2, 2, 4, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, + 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, + 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 4, 4, 1, 4, 4, + 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, + 1, 3, 1, 4, 4, 3, 3, 3, 3, 1, + 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, + 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, + 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, + 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1372,1109 +1367,1110 @@ protected function initReduceCallbacks(): void { }, 121 => null, 122 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), []); }, 123 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_FUNCTION; + $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(4-1)]); + $self->checkConstantAttributes($self->semValue); }, 124 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_CONSTANT; + $self->semValue = Stmt\Use_::TYPE_FUNCTION; }, 125 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = Stmt\Use_::TYPE_CONSTANT; }, 126 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 127 => static function ($self, $stackPos) { $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 127 => null, - 128 => static function ($self, $stackPos) { + 128 => null, + 129 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 129 => static function ($self, $stackPos) { + 130 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 130 => null, - 131 => static function ($self, $stackPos) { + 131 => null, + 132 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 132 => static function ($self, $stackPos) { + 133 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 133 => null, - 134 => static function ($self, $stackPos) { + 134 => null, + 135 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 135 => static function ($self, $stackPos) { + 136 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 136 => static function ($self, $stackPos) { + 137 => static function ($self, $stackPos) { $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); }, - 137 => static function ($self, $stackPos) { + 138 => static function ($self, $stackPos) { $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); }, - 138 => static function ($self, $stackPos) { + 139 => static function ($self, $stackPos) { $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); }, - 139 => static function ($self, $stackPos) { + 140 => static function ($self, $stackPos) { $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); }, - 140 => static function ($self, $stackPos) { + 141 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL; }, - 141 => static function ($self, $stackPos) { + 142 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; $self->semValue->type = $self->semStack[$stackPos-(2-1)]; }, - 142 => null, - 143 => static function ($self, $stackPos) { + 143 => null, + 144 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 144 => static function ($self, $stackPos) { + 145 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 145 => static function ($self, $stackPos) { + 146 => static function ($self, $stackPos) { $self->semValue = new Node\Const_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 146 => null, - 147 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, + 147 => null, 148 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 149 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 150 => static function ($self, $stackPos) { $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 151 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 152 => static function ($self, $stackPos) { - $self->semValue = array(); + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; }, 153 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 154 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 154 => null, 155 => null, 156 => null, - 157 => static function ($self, $stackPos) { + 157 => null, + 158 => static function ($self, $stackPos) { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 158 => static function ($self, $stackPos) { + 159 => static function ($self, $stackPos) { $self->semValue = new Stmt\Block($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 159 => static function ($self, $stackPos) { + 160 => static function ($self, $stackPos) { $self->semValue = new Stmt\If_($self->semStack[$stackPos-(7-3)], ['stmts' => $self->semStack[$stackPos-(7-5)], 'elseifs' => $self->semStack[$stackPos-(7-6)], 'else' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 160 => static function ($self, $stackPos) { + 161 => static function ($self, $stackPos) { $self->semValue = new Stmt\If_($self->semStack[$stackPos-(10-3)], ['stmts' => $self->semStack[$stackPos-(10-6)], 'elseifs' => $self->semStack[$stackPos-(10-7)], 'else' => $self->semStack[$stackPos-(10-8)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 161 => static function ($self, $stackPos) { + 162 => static function ($self, $stackPos) { $self->semValue = new Stmt\While_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 162 => static function ($self, $stackPos) { + 163 => static function ($self, $stackPos) { $self->semValue = new Stmt\Do_($self->semStack[$stackPos-(7-5)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 163 => static function ($self, $stackPos) { + 164 => static function ($self, $stackPos) { $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos-(9-3)], 'cond' => $self->semStack[$stackPos-(9-5)], 'loop' => $self->semStack[$stackPos-(9-7)], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 164 => static function ($self, $stackPos) { + 165 => static function ($self, $stackPos) { $self->semValue = new Stmt\Switch_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 165 => static function ($self, $stackPos) { + 166 => static function ($self, $stackPos) { $self->semValue = new Stmt\Break_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 166 => static function ($self, $stackPos) { + 167 => static function ($self, $stackPos) { $self->semValue = new Stmt\Continue_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 167 => static function ($self, $stackPos) { + 168 => static function ($self, $stackPos) { $self->semValue = new Stmt\Return_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 168 => static function ($self, $stackPos) { + 169 => static function ($self, $stackPos) { $self->semValue = new Stmt\Global_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 169 => static function ($self, $stackPos) { + 170 => static function ($self, $stackPos) { $self->semValue = new Stmt\Static_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 170 => static function ($self, $stackPos) { + 171 => static function ($self, $stackPos) { $self->semValue = new Stmt\Echo_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 171 => static function ($self, $stackPos) { + 172 => static function ($self, $stackPos) { $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos-(1-1))); }, - 172 => static function ($self, $stackPos) { + 173 => static function ($self, $stackPos) { $self->semValue = new Stmt\Expression($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 173 => static function ($self, $stackPos) { + 174 => static function ($self, $stackPos) { $self->semValue = new Stmt\Unset_($self->semStack[$stackPos-(5-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 174 => static function ($self, $stackPos) { + 175 => static function ($self, $stackPos) { $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos-(7-5)][1], 'stmts' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 175 => static function ($self, $stackPos) { + 176 => static function ($self, $stackPos) { $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-7)][0], ['keyVar' => $self->semStack[$stackPos-(9-5)], 'byRef' => $self->semStack[$stackPos-(9-7)][1], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 176 => static function ($self, $stackPos) { + 177 => static function ($self, $stackPos) { $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(6-3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-4)], $self->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $self->semStack[$stackPos-(6-6)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 177 => static function ($self, $stackPos) { + 178 => static function ($self, $stackPos) { $self->semValue = new Stmt\Declare_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 178 => static function ($self, $stackPos) { + 179 => static function ($self, $stackPos) { $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->checkTryCatch($self->semValue); }, - 179 => static function ($self, $stackPos) { + 180 => static function ($self, $stackPos) { $self->semValue = new Stmt\Goto_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 180 => static function ($self, $stackPos) { + 181 => static function ($self, $stackPos) { $self->semValue = new Stmt\Label($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 181 => static function ($self, $stackPos) { + 182 => static function ($self, $stackPos) { $self->semValue = null; /* means: no statement */ }, - 182 => null, - 183 => static function ($self, $stackPos) { + 183 => null, + 184 => static function ($self, $stackPos) { $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); }, - 184 => static function ($self, $stackPos) { + 185 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 185 => static function ($self, $stackPos) { + 186 => static function ($self, $stackPos) { $self->semValue = array(); }, - 186 => static function ($self, $stackPos) { + 187 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 187 => static function ($self, $stackPos) { + 188 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 188 => static function ($self, $stackPos) { + 189 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 189 => static function ($self, $stackPos) { + 190 => static function ($self, $stackPos) { $self->semValue = new Stmt\Catch_($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-7)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 190 => static function ($self, $stackPos) { + 191 => static function ($self, $stackPos) { $self->semValue = null; }, - 191 => static function ($self, $stackPos) { + 192 => static function ($self, $stackPos) { $self->semValue = new Stmt\Finally_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 192 => null, - 193 => static function ($self, $stackPos) { + 193 => null, + 194 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 194 => static function ($self, $stackPos) { + 195 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 195 => static function ($self, $stackPos) { + 196 => static function ($self, $stackPos) { $self->semValue = false; }, - 196 => static function ($self, $stackPos) { + 197 => static function ($self, $stackPos) { $self->semValue = true; }, - 197 => static function ($self, $stackPos) { + 198 => static function ($self, $stackPos) { $self->semValue = false; }, - 198 => static function ($self, $stackPos) { + 199 => static function ($self, $stackPos) { $self->semValue = true; }, - 199 => static function ($self, $stackPos) { + 200 => static function ($self, $stackPos) { $self->semValue = false; }, - 200 => static function ($self, $stackPos) { + 201 => static function ($self, $stackPos) { $self->semValue = true; }, - 201 => static function ($self, $stackPos) { + 202 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 202 => static function ($self, $stackPos) { + 203 => static function ($self, $stackPos) { $self->semValue = []; }, - 203 => null, - 204 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, + 204 => null, 205 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 206 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 207 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, 208 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 209 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(7-2)); }, - 209 => static function ($self, $stackPos) { + 210 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(8-3)); }, - 210 => static function ($self, $stackPos) { + 211 => static function ($self, $stackPos) { $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkInterface($self->semValue, $stackPos-(7-3)); }, - 211 => static function ($self, $stackPos) { + 212 => static function ($self, $stackPos) { $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 212 => static function ($self, $stackPos) { + 213 => static function ($self, $stackPos) { $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkEnum($self->semValue, $stackPos-(8-3)); }, - 213 => static function ($self, $stackPos) { + 214 => static function ($self, $stackPos) { $self->semValue = null; }, - 214 => static function ($self, $stackPos) { + 215 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 215 => static function ($self, $stackPos) { + 216 => static function ($self, $stackPos) { $self->semValue = null; }, - 216 => static function ($self, $stackPos) { + 217 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 217 => static function ($self, $stackPos) { + 218 => static function ($self, $stackPos) { $self->semValue = 0; }, - 218 => null, 219 => null, - 220 => static function ($self, $stackPos) { + 220 => null, + 221 => static function ($self, $stackPos) { $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 221 => static function ($self, $stackPos) { + 222 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 222 => static function ($self, $stackPos) { + 223 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 223 => static function ($self, $stackPos) { + 224 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 224 => static function ($self, $stackPos) { + 225 => static function ($self, $stackPos) { $self->semValue = null; }, - 225 => static function ($self, $stackPos) { + 226 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 226 => static function ($self, $stackPos) { + 227 => static function ($self, $stackPos) { $self->semValue = array(); }, - 227 => static function ($self, $stackPos) { + 228 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 228 => static function ($self, $stackPos) { + 229 => static function ($self, $stackPos) { $self->semValue = array(); }, - 229 => static function ($self, $stackPos) { + 230 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 230 => null, - 231 => static function ($self, $stackPos) { + 231 => null, + 232 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 232 => static function ($self, $stackPos) { + 233 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 233 => null, - 234 => static function ($self, $stackPos) { + 234 => null, + 235 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 235 => null, - 236 => static function ($self, $stackPos) { + 236 => null, + 237 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 237 => static function ($self, $stackPos) { + 238 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 238 => static function ($self, $stackPos) { + 239 => static function ($self, $stackPos) { $self->semValue = null; }, - 239 => static function ($self, $stackPos) { + 240 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 240 => null, - 241 => static function ($self, $stackPos) { + 241 => null, + 242 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 242 => static function ($self, $stackPos) { + 243 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 243 => static function ($self, $stackPos) { + 244 => static function ($self, $stackPos) { $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 244 => static function ($self, $stackPos) { + 245 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 245 => static function ($self, $stackPos) { + 246 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 246 => static function ($self, $stackPos) { + 247 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 247 => static function ($self, $stackPos) { + 248 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(5-3)]; }, - 248 => static function ($self, $stackPos) { + 249 => static function ($self, $stackPos) { $self->semValue = array(); }, - 249 => static function ($self, $stackPos) { + 250 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 250 => static function ($self, $stackPos) { + 251 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 251 => static function ($self, $stackPos) { + 252 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 252 => null, 253 => null, - 254 => static function ($self, $stackPos) { + 254 => null, + 255 => static function ($self, $stackPos) { $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 255 => static function ($self, $stackPos) { + 256 => static function ($self, $stackPos) { $self->semValue = []; }, - 256 => null, - 257 => static function ($self, $stackPos) { + 257 => null, + 258 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 258 => static function ($self, $stackPos) { + 259 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 259 => static function ($self, $stackPos) { + 260 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 260 => static function ($self, $stackPos) { + 261 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 261 => static function ($self, $stackPos) { + 262 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 262 => static function ($self, $stackPos) { + 263 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 263 => static function ($self, $stackPos) { + 264 => static function ($self, $stackPos) { $self->semValue = array(); }, - 264 => static function ($self, $stackPos) { + 265 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 265 => static function ($self, $stackPos) { + 266 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 266 => static function ($self, $stackPos) { + 267 => static function ($self, $stackPos) { $self->semValue = array(); }, - 267 => static function ($self, $stackPos) { + 268 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 268 => static function ($self, $stackPos) { + 269 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 269 => static function ($self, $stackPos) { + 270 => static function ($self, $stackPos) { $self->semValue = null; }, - 270 => static function ($self, $stackPos) { + 271 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 271 => static function ($self, $stackPos) { + 272 => static function ($self, $stackPos) { $self->semValue = null; }, - 272 => static function ($self, $stackPos) { + 273 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 273 => static function ($self, $stackPos) { + 274 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 274 => static function ($self, $stackPos) { + 275 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-2)], true); }, - 275 => static function ($self, $stackPos) { + 276 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 276 => static function ($self, $stackPos) { + 277 => static function ($self, $stackPos) { $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); }, - 277 => null, - 278 => static function ($self, $stackPos) { + 278 => null, + 279 => static function ($self, $stackPos) { $self->semValue = array(); }, - 279 => static function ($self, $stackPos) { + 280 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 280 => static function ($self, $stackPos) { + 281 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 281 => static function ($self, $stackPos) { + 282 => static function ($self, $stackPos) { $self->semValue = 0; }, - 282 => static function ($self, $stackPos) { + 283 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 283 => static function ($self, $stackPos) { + 284 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 284 => static function ($self, $stackPos) { + 285 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 285 => static function ($self, $stackPos) { + 286 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 286 => static function ($self, $stackPos) { + 287 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 287 => static function ($self, $stackPos) { + 288 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 288 => static function ($self, $stackPos) { + 289 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 289 => static function ($self, $stackPos) { + 290 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 290 => static function ($self, $stackPos) { + 291 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 291 => static function ($self, $stackPos) { + 292 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 292 => static function ($self, $stackPos) { + 293 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, - 293 => null, - 294 => static function ($self, $stackPos) { + 294 => null, + 295 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 295 => static function ($self, $stackPos) { + 296 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 296 => null, 297 => null, - 298 => static function ($self, $stackPos) { + 298 => null, + 299 => static function ($self, $stackPos) { $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 299 => static function ($self, $stackPos) { + 300 => static function ($self, $stackPos) { $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 300 => static function ($self, $stackPos) { + 301 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 301 => static function ($self, $stackPos) { + 302 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 302 => null, - 303 => static function ($self, $stackPos) { + 303 => null, + 304 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 304 => static function ($self, $stackPos) { + 305 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 305 => static function ($self, $stackPos) { + 306 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 306 => null, - 307 => static function ($self, $stackPos) { + 307 => null, + 308 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 308 => static function ($self, $stackPos) { + 309 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 309 => static function ($self, $stackPos) { + 310 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 310 => static function ($self, $stackPos) { + 311 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 311 => static function ($self, $stackPos) { + 312 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 312 => static function ($self, $stackPos) { + 313 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 313 => static function ($self, $stackPos) { + 314 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 314 => static function ($self, $stackPos) { + 315 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 315 => static function ($self, $stackPos) { + 316 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 316 => null, - 317 => static function ($self, $stackPos) { + 317 => null, + 318 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 318 => static function ($self, $stackPos) { + 319 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 319 => null, - 320 => static function ($self, $stackPos) { + 320 => null, + 321 => static function ($self, $stackPos) { $self->semValue = null; }, - 321 => null, - 322 => static function ($self, $stackPos) { + 322 => null, + 323 => static function ($self, $stackPos) { $self->semValue = null; }, - 323 => static function ($self, $stackPos) { + 324 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 324 => static function ($self, $stackPos) { + 325 => static function ($self, $stackPos) { $self->semValue = null; }, - 325 => static function ($self, $stackPos) { + 326 => static function ($self, $stackPos) { $self->semValue = array(); }, - 326 => static function ($self, $stackPos) { + 327 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 327 => static function ($self, $stackPos) { + 328 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 328 => static function ($self, $stackPos) { + 329 => static function ($self, $stackPos) { $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 329 => static function ($self, $stackPos) { + 330 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 330 => static function ($self, $stackPos) { + 331 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 331 => static function ($self, $stackPos) { + 332 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 332 => static function ($self, $stackPos) { + 333 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 333 => static function ($self, $stackPos) { + 334 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 334 => static function ($self, $stackPos) { + 335 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, - 335 => null, - 336 => static function ($self, $stackPos) { + 336 => null, + 337 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 337 => static function ($self, $stackPos) { + 338 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 338 => null, 339 => null, - 340 => static function ($self, $stackPos) { + 340 => null, + 341 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 341 => static function ($self, $stackPos) { + 342 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 342 => static function ($self, $stackPos) { + 343 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 343 => static function ($self, $stackPos) { + 344 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 344 => static function ($self, $stackPos) { + 345 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 345 => static function ($self, $stackPos) { + 346 => static function ($self, $stackPos) { $self->semValue = array(); }, - 346 => static function ($self, $stackPos) { + 347 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 347 => static function ($self, $stackPos) { + 348 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 348 => static function ($self, $stackPos) { + 349 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 349 => static function ($self, $stackPos) { + 350 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 350 => static function ($self, $stackPos) { + 351 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 351 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, 352 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 353 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 354 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = null; /* will be skipped */ }, 355 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = array(); }, 356 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 357 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + $self->semValue = array(); }, 358 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 359 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 360 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 361 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 362 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 363 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 364 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 364 => null, - 365 => static function ($self, $stackPos) { + 365 => null, + 366 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 366 => static function ($self, $stackPos) { + 367 => static function ($self, $stackPos) { $self->semValue = null; }, - 367 => null, 368 => null, - 369 => static function ($self, $stackPos) { + 369 => null, + 370 => static function ($self, $stackPos) { $self->semValue = 0; }, - 370 => static function ($self, $stackPos) { + 371 => static function ($self, $stackPos) { $self->semValue = 0; }, - 371 => null, 372 => null, - 373 => static function ($self, $stackPos) { + 373 => null, + 374 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 374 => static function ($self, $stackPos) { + 375 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 375 => static function ($self, $stackPos) { + 376 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 376 => static function ($self, $stackPos) { + 377 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 377 => static function ($self, $stackPos) { + 378 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 378 => static function ($self, $stackPos) { + 379 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 379 => static function ($self, $stackPos) { + 380 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 380 => static function ($self, $stackPos) { + 381 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 381 => static function ($self, $stackPos) { + 382 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 382 => static function ($self, $stackPos) { + 383 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 383 => static function ($self, $stackPos) { + 384 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 384 => null, - 385 => static function ($self, $stackPos) { + 385 => null, + 386 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 386 => static function ($self, $stackPos) { + 387 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 387 => static function ($self, $stackPos) { + 388 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 388 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 389 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 390 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semValue = []; }, - 391 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 392 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semValue = []; }, - 393 => static function ($self, $stackPos) { + 394 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 394 => static function ($self, $stackPos) { + 395 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 395 => static function ($self, $stackPos) { - $self->semValue = null; - }, 396 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = null; }, 397 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 398 => static function ($self, $stackPos) { - $self->semValue = 0; + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 399 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 400 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 400 => null, 401 => null, - 402 => static function ($self, $stackPos) { + 402 => null, + 403 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 403 => static function ($self, $stackPos) { + 404 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 404 => static function ($self, $stackPos) { + 405 => static function ($self, $stackPos) { $self->semValue = array(); }, - 405 => null, 406 => null, - 407 => static function ($self, $stackPos) { + 407 => null, + 408 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 408 => static function ($self, $stackPos) { + 409 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 409 => static function ($self, $stackPos) { + 410 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 410 => static function ($self, $stackPos) { + 411 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 411 => static function ($self, $stackPos) { + 412 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 412 => null, 413 => null, - 414 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, + 414 => null, 415 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 416 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 417 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 418 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 419 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 420 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 421 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 422 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 423 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 424 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 425 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 426 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 438 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 439 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 440 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 441 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 442 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 450 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 452 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 463 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 464 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 465 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 466 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 467 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 475 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 476 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 477 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 477 => static function ($self, $stackPos) { + 478 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 478 => static function ($self, $stackPos) { + 479 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 479 => static function ($self, $stackPos) { + 480 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 480 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 481 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 483 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 483 => static function ($self, $stackPos) { + 484 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 484 => null, - 485 => static function ($self, $stackPos) { + 485 => null, + 486 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 486 => static function ($self, $stackPos) { + 487 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 487 => static function ($self, $stackPos) { + 488 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 488 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 489 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 490 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 501 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 504 => null, 505 => null, - 506 => static function ($self, $stackPos) { + 506 => null, + 507 => static function ($self, $stackPos) { $self->semValue = array(); }, - 507 => static function ($self, $stackPos) { + 508 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 508 => null, - 509 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, + 509 => null, 510 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 511 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 512 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 513 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 514 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2483,310 +2479,313 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 516 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 517 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 518 => null, - 519 => static function ($self, $stackPos) { + 518 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 519 => null, 520 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 521 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 522 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 523 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 523 => null, 524 => null, - 525 => static function ($self, $stackPos) { + 525 => null, + 526 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 526 => static function ($self, $stackPos) { + 527 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 527 => null, 528 => null, - 529 => static function ($self, $stackPos) { + 529 => null, + 530 => static function ($self, $stackPos) { $self->semValue = array(); }, - 530 => static function ($self, $stackPos) { + 531 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 531 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 532 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = array(); }, - 533 => null, - 534 => static function ($self, $stackPos) { + 534 => null, + 535 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 535 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 536 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 537 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 540 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 541 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 542 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 543 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 544 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 545 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 546 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 547 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 548 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 549 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 550 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 551 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 552 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 553 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 554 => null, 555 => null, 556 => null, - 557 => static function ($self, $stackPos) { + 557 => null, + 558 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 558 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 559 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 560 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $self->semValue = null; }, - 561 => null, 562 => null, - 563 => static function ($self, $stackPos) { + 563 => null, + 564 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 564 => null, 565 => null, 566 => null, 567 => null, 568 => null, 569 => null, - 570 => static function ($self, $stackPos) { + 570 => null, + 571 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 571 => null, 572 => null, 573 => null, - 574 => static function ($self, $stackPos) { + 574 => null, + 575 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 575 => static function ($self, $stackPos) { + 576 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 576 => null, - 577 => static function ($self, $stackPos) { + 577 => null, + 578 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 578 => static function ($self, $stackPos) { + 579 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 579 => static function ($self, $stackPos) { + 580 => static function ($self, $stackPos) { $self->semValue = null; }, - 580 => null, 581 => null, 582 => null, - 583 => static function ($self, $stackPos) { + 583 => null, + 584 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 584 => static function ($self, $stackPos) { + 585 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 585 => null, - 586 => static function ($self, $stackPos) { + 586 => null, + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 587 => static function ($self, $stackPos) { + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 588 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 589 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 590 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 591 => null, - 592 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, + 592 => null, 593 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 594 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 595 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 596 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 597 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 598 => null, - 599 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 599 => null, + 600 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 600 => null, 601 => null, - 602 => static function ($self, $stackPos) { + 602 => null, + 603 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 603 => null, - 604 => static function ($self, $stackPos) { + 604 => null, + 605 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 605 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 606 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 607 => null, - 608 => static function ($self, $stackPos) { + 608 => null, + 609 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 609 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 610 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 611 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 612 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 613 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 615 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 616 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 617 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 618 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 619 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 620 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 621 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 622 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 623 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 624 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 625 => null, - 626 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 625 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 626 => null, 627 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 628 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 629 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 630 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 631 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 632 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 633 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 634 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 635 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 636 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 636 => null, + 637 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 3addf9447a..19309dcdfe 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -165,15 +165,15 @@ class Php8 extends \PhpParser\ParserAbstract protected int $tokenToSymbolMapSize = 400; protected int $actionTableSize = 1289; - protected int $gotoTableSize = 608; + protected int $gotoTableSize = 710; protected int $invalidSymbol = 172; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 442; - protected int $numNonLeafStates = 753; + protected int $YY2TBLSTATE = 444; + protected int $numNonLeafStates = 756; protected array $symbolToName = array( "EOF", @@ -394,245 +394,245 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $action = array( - 126, 127, 128, 570, 129, 130, 955, 765, 766, 767, - 131, 38, 849, -85,-32766, 1376,-32766,-32766,-32766, 0, - 840, 1134, 1135, 1136, 1130, 1129, 1128, 1137, 1131, 1132, - 1133,-32766,-32766,-32766, 851, 759, 758,-32766,-32766,-32766, + 126, 127, 128, 573, 129, 130, 959, 768, 769, 770, + 131, 38, 852, 493, 569, 1380,-32766,-32766,-32766, 0, + 843, 1138, 1139, 1140, 1134, 1133, 1132, 1141, 1135, 1136, + 1137,-32766,-32766,-32766, 854, 762, 761,-32766, 1049,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1005,-32766, 1045, -570, 768, 1134, 1135, 1136, 1130, - 1129, 1128, 1137, 1131, 1132, 1133, 388, 387, 842, 263, - 132, 389, 772, 773, 774, 775, 430, 845, 431, -85, - 2, 36, 246, 47, 291, 829, 776, 777, 778, 779, - 780, 781, 782, 783, 784, 785, 805, 571, 806, 807, - 808, 809, 797, 798, 344, 345, 800, 801, 786, 787, - 788, 790, 791, 792, 359, 832, 833, 834, 835, 836, - 572, -570, -570, -332, 793, 794, 573, 574, 236, 817, - 815, 816, 828, 812, 813, 26, -194, 575, 576, 811, - 577, 578, 579, 580, 323, 581, 582, 876, 844, 877, - 297, 298, 814, 583, 584, 722, 133, 846, 126, 127, - 128, 570, 129, 130, 1078, 765, 766, 767, 131, 38, - -32766, 35, 735, 1038, 1037, 1036, 1042, 1039, 1040, 1041, - -32766,-32766,-32766, 1006, 104, 105, 106, 107, 108, -372, - 275, -372,-32766, 759, 758, 1054, 850,-32766,-32766,-32766, - 848,-32766, 109,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - 134, 476, 477, 768,-32766,-32766,-32766, 1054,-32766, 290, - -32766,-32766,-32766,-32766,-32766, 616, 143, 263, 132, 389, - 772, 773, 774, 775, 249,-32766, 431,-32766,-32766,-32766, - -32766, 290, 307, 829, 776, 777, 778, 779, 780, 781, - 782, 783, 784, 785, 805, 571, 806, 807, 808, 809, - 797, 798, 344, 345, 800, 801, 786, 787, 788, 790, - 791, 792, 359, 832, 833, 834, 835, 836, 572, 958, - -273, -332, 793, 794, 573, 574, 840, 817, 815, 816, - 828, 812, 813, 1301, -194, 575, 576, 811, 577, 578, - 579, 580, 566, 581, 582, 1108, 82, 83, 84, 748, - 814, 583, 584, 309, 146, 789, 760, 761, 762, 763, - 764, 235, 765, 766, 767, 802, 803, 37, 957, 85, + -32767, 1009,-32766,-32766,-32766, 771, 1138, 1139, 1140, 1134, + 1133, 1132, 1141, 1135, 1136, 1137, 387, 388, 447, 263, + 132, 390, 775, 776, 777, 778, 432, 848, 433, 1317, + -571, 36, 246, 47, 292, 832, 779, 780, 781, 782, + 783, 784, 785, 786, 787, 788, 808, 574, 809, 810, + 811, 812, 800, 801, 345, 346, 803, 804, 789, 790, + 791, 793, 794, 795, 360, 835, 836, 837, 838, 839, + 575, 2, 297, -333, 796, 797, 576, 577, 236, 820, + 818, 819, 831, 815, 816, 26, -195, 578, 579, 814, + 580, 581, 582, 583, 324, 584, 585, -571, -571, 494, + 298, 299, 817, 586, 587, 35, 133, 849, 126, 127, + 128, 573, 129, 130, 1082, 768, 769, 770, 131, 38, + -32766, 134, 738, 1042, 1041, 1040, 1046, 1043, 1044, 1045, + -32766,-32766,-32766, 1010, 104, 105, 106, 107, 108, 880, + 275, 881,-32766, 762, 761, 1058, 853,-32766,-32766,-32766, + 143,-32766, 109,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32766, 479, 480, 771,-32766,-32766,-32766, 1058,-32766, 291, + -32766,-32766,-32766,-32766,-32766, -194, 249, 263, 132, 390, + 775, 776, 777, 778,-32766,-32766, 433,-32766,-32766,-32766, + -32766, 291, 851, 832, 779, 780, 781, 782, 783, 784, + 785, 786, 787, 788, 808, 574, 809, 810, 811, 812, + 800, 801, 345, 346, 803, 804, 789, 790, 791, 793, + 794, 795, 360, 835, 836, 837, 838, 839, 575, 962, + -274, -333, 796, 797, 576, 577, 843, 820, 818, 819, + 831, 815, 816, 1305, -195, 578, 579, 814, 580, 581, + 582, 583, 308, 584, 585,-32766, 82, 83, 84, -85, + 817, 586, 587, 161, 146, 792, 763, 764, 765, 766, + 767, 1346, 768, 769, 770, 805, 806, 37, 961, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 157, 275,-32766,-32766,-32766,-32767,-32767, - -32767,-32767, 101, 102, 103,-32766, 109, 1313, 622, 318, - 768,-32766,-32766,-32766, 849, 1361,-32766, 1107,-32766,-32766, - -32766, 340, 1360, 1357, 769, 770, 771, 772, 773, 774, - 775, 341,-32766, 838,-32766,-32766, 1386, 374, 1281, 1387, - 829, 776, 777, 778, 779, 780, 781, 782, 783, 784, - 785, 805, 827, 806, 807, 808, 809, 797, 798, 799, - 826, 800, 801, 786, 787, 788, 790, 791, 792, 831, - 832, 833, 834, 835, 836, 837, 1077, 431, -567, 793, - 794, 795, 796, 148, 817, 815, 816, 828, 812, 813, - 380, -193, 804, 810, 811, 818, 819, 821, 820, 138, - 822, 823, 840, 321, 396, 285, 24, 814, 825, 824, - 49, 50, 51, 522, 52, 53, 398, -110, 7, 849, - 54, 55, -110, 56, -110,-32766,-32766,-32766, 1342, 303, - 125, 1123, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, 161, 750, -567, -567, 291, 974, 975, - -32766,-32766,-32766, 976, 448, 285, 1276, 1275, 1277, 57, - 58, -567,-32766,-32766, 59, 1109, 60, 243, 244, 61, + 106, 107, 108, 310, 275,-32766,-32766,-32766,-32767,-32767, + -32767,-32767, 101, 102, 103, 1112, 109, 319, 625, 751, + 771,-32766,-32766,-32766, 852, -85,-32766, 1111,-32766,-32766, + -32766, 389, 388, -194, 772, 773, 774, 775, 776, 777, + 778, 432,-32766, 841,-32766,-32766, 1390, 341, 1285, 1391, + 832, 779, 780, 781, 782, 783, 784, 785, 786, 787, + 788, 808, 830, 809, 810, 811, 812, 800, 801, 802, + 829, 803, 804, 789, 790, 791, 793, 794, 795, 834, + 835, 836, 837, 838, 839, 840, 1081, 433, -568, 796, + 797, 798, 799, 1365, 820, 818, 819, 831, 815, 816, + 1364, 24, 807, 813, 814, 821, 822, 824, 823, 138, + 825, 826, 1154, 322, 342, 286, 743, 817, 828, 827, + 49, 50, 51, 525, 52, 53, 1127, -110, 375, 852, + 54, 55, -110, 56, -110, 619,-32766, 81, 381, 304, + 1361, 322, -110, -110, -110, -110, -110, -110, -110, -110, + -110, -110, -110, 157, 938, -568, -568, 292, 978, 979, + 397, 1058, 845, 980, 451, 286, 1280, 1279, 1281, 57, + 58, -568, 974, 148, 59, 1113, 60, 243, 244, 61, 62, 63, 64, 65, 66, 67, 68,-32766, 28, 265, - 69, 446, 523, 490, -346, 449, 1307, 1308, 524, 139, - 849, 1051, 450, 321, 1305, 42, 20, 525, 934, 526, - 934, 527, 74, 528, -568, 698, 529, 530, 321, 386, - 387, 44, 45, 452, 383, 382, 1054, 46, 531, 430, - 974, 975, 451, 372, 339, 976, 1281, 855, 725, 934, - 1267, 759, 758,-32766, 970, 533, 534, 535, 149, 934, - 281, 699, -78, -566, 1274, 102, 103, 537, 538, -193, - 1293, 1294, 1295, 1296, 1298, 1290, 1291, 295, 1054, 726, - 466, 467, 468, 1297, 1292, 700, 701, 1276, 1275, 1277, - 296, -568, -568, 70, -153, -153, -153, 316, 317, 321, - 1272, 924, 290, 924, 1276, 1275, 1277, -568, 1051, -153, - 281, -153, 1150, -153, 81, -153, 740, 151, 321, -574, - 152, 759, 758,-32766, 1053, 381, 876, 849, 877, 153, - -566, -566, 924, 1054, 1051, 155, 974, 975, -606, 491, - -606, 532, 924, 1276, 1275, 1277, -566, 33, 1054, 910, - 970, -110, -110, -110, 28, 266, -58, 281, -573, 1054, - -32766,-32766, -110, -110, 665, 21, 849, -110, -57, -564, - 1305, 684, 685, 147, 413, 123, -110, 384, 385, 124, - 936, 135, 936, 136, 720,-32766, 720, -153, 142, 48, + 69, 449, 526, 452, -347, 1055, 1311, 1312, 527, 938, + 852, 1055, 762, 761, 1309, 42, 20, 528, 938, 529, + 938, 530, 74, 531, 453, 701, 532, 533, 322, 843, + 1058, 44, 45, 455, 384, 383, 1058, 46, 534, 728, + -569, 235, 454, 373, 340, 858, 1285, 928, 729, 938, + 1271, -567, 847,-32766, 282, 536, 537, 538, 149, 725, + 282, 702, -78, -373, 1278, -373, 151, 540, 541, -58, + 1297, 1298, 1299, 1300, 1302, 1294, 1295, 296, 1058, 730, + -32766,-32766,-32766, 1301, 1296, 703, 704, 1280, 1279, 1281, + 297, -565, 928, 70, -154, -154, -154, 317, 318, 322, + 1276, 928, 291, 928, 1280, 1279, 1281, -569, -569, -154, + 282, -154, -57, -154, 753, -154, 139, 1055, -567, -567, + 322, 762, 761, -569, 1057, 382, 940, 852, 152, 399, + 723, 7, 928, 153, -567, -575, 978, 979, 469, 470, + 471, 535, 1058, 1280, 1279, 1281, -574, 102, 103, 914, + 974, -110, -110, -110, 28, 266,-32766,-32766, -565, -565, + 668, 21, -110, -110, 687, 688, 852, -110, 155, 48, + 1309, 940, 385, 386, -565, 723, -110, 147, 415, 880, + 940, 881, 940, 33, 723,-32766, 723, -154, 391, 392, 32, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 390, 391, 1267, 296, 759, 758, - 74, 936, 156, 934, 158, 720, 321, -4, 934, 159, - 934, 936, 160, 537, 538, 720, 1293, 1294, 1295, 1296, - 1298, 1290, 1291, 1183, 1185, 934, -564, -564, -565, 1297, - 1292, 759, 758, 727, -564,-32766, 656, 657, -306, 72, - 730, 1274, -564, -87, 317, 321, 299, 300,-32766,-32766, - -32766, -84,-32766, -78,-32766, 737,-32766, -73, -72,-32766, - -71, -70, 379, -69,-32766,-32766,-32766, -68,-32766, -67, - -32766,-32766, -66, -65, 1274, -46,-32766, 427, 28, 265, - -18,-32766,-32766,-32766, 140,-32766, 924,-32766,-32766,-32766, - 849, 924,-32766, 924, 1305, -565, -565,-32766,-32766,-32766, - 274, -564, -564,-32766,-32766, 282, 736, 739, 924,-32766, - 427, -565, 933, 381, 145, 443, 286, -564, 951, 73, - 294,-32766, -302, -572, 974, 975, 279, 280, 283, 532, - 1267, 28, 266, 284, 329, 275, 109, 536, 970, -110, - -110, -110, 287, 849, 292, 293, 840, 1305, 538, 694, - 1293, 1294, 1295, 1296, 1298, 1290, 1291, 709, 144, 587, - 711, 11, 10, 1297, 1292, 991, 849, 1141, 473, 720, - 936,-32766, 936, 72, 720, -4, 720, 1388, 317, 321, - -50, 970, 672, 1267, 687, 666, 501, 936, 971, 301, - 308, 720, 671, 1312, 302, 1314,-32766, 688, 953, -530, - -520, 538, 40, 1293, 1294, 1295, 1296, 1298, 1290, 1291, - 848, 41, 8, 137, 654, 27, 1297, 1292, 304, 34, - 593, 620, 296,-32766, 0, 0, 72, 0, 0, 1274, - 0, 317, 321, 0, 0, 0,-32766,-32766,-32766, -276, - -32766, 0,-32766, 0,-32766, 0, 0,-32766, 0, 0, - 0, 0,-32766,-32766,-32766, 934,-32766, 0,-32766,-32766, - 0, 0, 1274, 378,-32766, 427, 745, -600, 412,-32766, - -32766,-32766, 746,-32766, 868,-32766,-32766,-32766, 934, 915, - -32766, 1015, 992, 999, 989,-32766,-32766,-32766, 1000,-32766, - 913,-32766,-32766, 987, 1112, 1274, 1115,-32766, 427, 1116, - 1113, 1152,-32766,-32766,-32766, 1114,-32766, 1120,-32766,-32766, - -32766, 1302, 860,-32766, 1329, 1346, 1379, 496,-32766,-32766, - -32766, 659,-32766, -599,-32766,-32766, -598, -574, 1274, 600, - -32766, 427, -573, -572, -571,-32766,-32766,-32766, 924,-32766, - -514,-32766,-32766,-32766, 1, 29,-32766, -274, 30, 39, - 43,-32766,-32766,-32766, -251, -251, -251,-32766,-32766, 71, - 381, 924, 75,-32766, 427, 76, 77, 78, 1281, 79, - 80, 974, 975, 141, 150,-32766, 532, -250, -250, -250, - -273, 154, 241, 381, 910, 970, -110, -110, -110, 325, - 360, 361, 362, 363, 974, 975, 364, 365, -16, 532, - 366, 367, 368, 369, 370, 373, 444, 910, 970, -110, - -110, -110,-32766, 13, 565, 371, 1306, 936, 1274, 14, - 416, 720, -251, 15, 16,-32766,-32766,-32766, 18,-32766, - 354,-32766, 411,-32766, 492, 493,-32766, 500, 503, 504, - 936,-32766,-32766,-32766, 720, -250, 505,-32766,-32766, 849, - 506, 510, 511,-32766, 427, 512, 519, 598, 704, 1080, - 1223, 1303, 1079, 1060, 1262,-32766, 1056, -278, -102, 12, - 17, 22, 312, 410, 612, 617, 645, 710, 1227, 1280, - 1224, 1358, 0, 315, -110, -110, 375, 721, 724, -110, - 728, 729, 731, 732, 733, 734, 738, 750, -110, 723, - 751, 0, 742, 911, 1383, 1385, 0,-32766, 871, 870, - 964, 1007, 1384, 963, 961, 962, 965, 1255, 944, 954, - 942, 1151, 1147, 1101, 997, 998, 643, 1382, 1340, 296, - 1355, 0, 74, 1240, 321, 0, 0, 0, 321 + 119, 120, 121, 122, 659, 660, 1271, 297, 762, 761, + 74, 995, 123, 938, 124, 723, 322, -4, 938, -607, + 938, -607, 135, 540, 541, 136, 1297, 1298, 1299, 1300, + 1302, 1294, 1295, 1187, 1189, -307, 300, 301, -566, 1301, + 1296, 762, 761, 733, -565,-32766, 142, 156, 158, 72, + 740, 1278, 380, 159, 318, 322, 160, -87,-32766,-32766, + -32766, 287,-32766, -303,-32766, -84,-32766, -78, 280,-32766, + -73, 275, 387, 388,-32766,-32766,-32766, -72,-32766, -71, + -32766,-32766, 432, -70, 1278, -69,-32766, 429, 28, 265, + -68,-32766,-32766,-32766, -67,-32766, 928,-32766,-32766,-32766, + 852, 928,-32766, 928, 1309, -566, -566,-32766,-32766,-32766, + -66, -565, -565,-32766,-32766, -65, -46, -18, 140,-32766, + 429, -566, 274, 382, 283, 445, 739, -565, 297, 73, + 295,-32766, 742, -573, 978, 979, 937, 145, 281, 535, + 1271, 28, 266, 284, 285, 330, 109, 539, 974, -110, + -110, -110, 288, 852,-32766,-32766,-32766, 1309, 541, 125, + 1297, 1298, 1299, 1300, 1302, 1294, 1295, 293, 294, 144, + 955, 11, 843, 1301, 1296, 940, 712, 697, 590, 723, + 940, 1392, 940, 72, 723, -4, 723,-32766, 318, 322, + -50, 690, 305, 1271, 852, 1145, 714, 669, 975, 302, + 309, 657, 303, 1316, -531, 1318, 596, 674,-32766, -521, + 8, 541, 297, 1297, 1298, 1299, 1300, 1302, 1294, 1295, + 10, 476, 504, 137, 40, 27, 1301, 1296, 675, 691, + 623, 1244, 957,-32766, 379, 851, 72, 34, 41, 1278, + 322, 318, 322, 748, 0, 749,-32766,-32766,-32766, -277, + -32766, 0,-32766, 871,-32766, 0, 0,-32766, 1306, 0, + 0, 0,-32766,-32766,-32766, 938,-32766, 0,-32766,-32766, + 0, 0, 1278, 0,-32766, 429, 0, 919, 0,-32766, + -32766,-32766, 1019,-32766, 996,-32766,-32766,-32766, 938, 1003, + -32766, 863, 1310, 0, 0,-32766,-32766,-32766, 993,-32766, + 1004,-32766,-32766, 917, 991, 1278, 1116,-32766, 429, 1119, + 1120, 1117,-32766,-32766,-32766, 1156,-32766, 1118,-32766,-32766, + -32766, 1124, -601,-32766, 1333, 1350, 1383, 499,-32766,-32766, + -32766, 662,-32766, -600,-32766,-32766, -599, -575, 1278, 603, + -32766, 429, -574, -573, -572,-32766,-32766,-32766, 928,-32766, + -515,-32766,-32766,-32766, 1, 29,-32766, -275, 30, 39, + 43,-32766,-32766,-32766, -252, -252, -252,-32766,-32766, 71, + 382, 928, 75,-32766, 429, 76, 77, 78, 1285, 79, + 80, 978, 979, 141, 150,-32766, 535, -251, -251, -251, + -274, 154, 241, 382, 914, 974, -110, -110, -110, 326, + 361, 362, 363, 364, 978, 979, 365, 366, -16, 535, + 367, 368, 369, 370, 371, 374, 446, 914, 974, -110, + -110, -110,-32766, 13, 568, 372, 0, 940, 1278, 14, + 414, 723, -252, 15, 16,-32766,-32766,-32766, 18,-32766, + 355,-32766, 413,-32766, 495, 496,-32766, 503, 506, 507, + 940,-32766,-32766,-32766, 723, -251, 508,-32766,-32766, 852, + 509, 513, 514,-32766, 429, 515, 522, 601, 707, 1084, + 1227, 1307, 1083, 1064, 1266,-32766, 1060, -279, -102, 12, + 17, 22, 313, 412, 615, 620, 648, 713, 1231, 1284, + 1228, 1362, 0, 316, -110, -110, 376, 724, 727, -110, + 731, 732, 734, 735, 736, 737, 741, 753, -110, 726, + 754, 0, 418, 745, 915, 1387, 0,-32766, 1389, 874, + 873, 968, 1011, 1388, 967, 965, 966, 969, 1259, 948, + 958, 946, 1155, 1151, 1105, 1001, 1002, 646, 1386, 297, + 1344, 1359, 74, 0, 0, 0, 0, 0, 322 ); protected array $actionCheck = array( 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, - 12, 13, 82, 31, 116, 85, 9, 10, 11, 0, + 12, 13, 82, 31, 85, 85, 9, 10, 11, 0, 80, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 9, 10, 11, 1, 37, 38, 30, 140, 32, + 125, 9, 10, 11, 1, 37, 38, 30, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 31, 30, 1, 70, 57, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 106, 107, 80, 71, - 72, 73, 74, 75, 76, 77, 116, 80, 80, 97, - 8, 151, 152, 70, 30, 87, 88, 89, 90, 91, + 43, 31, 30, 9, 10, 57, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 106, 107, 108, 71, + 72, 73, 74, 75, 76, 77, 116, 80, 80, 150, + 70, 151, 152, 70, 30, 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, 137, 138, 8, 126, 127, 128, 129, 14, 131, + 122, 8, 162, 8, 126, 127, 128, 129, 14, 131, 132, 133, 134, 135, 136, 8, 8, 139, 140, 141, - 142, 143, 144, 145, 70, 147, 148, 106, 160, 108, - 137, 138, 154, 155, 156, 167, 158, 160, 2, 3, + 142, 143, 144, 145, 70, 147, 148, 137, 138, 167, + 137, 138, 154, 155, 156, 8, 158, 160, 2, 3, 4, 5, 6, 7, 166, 9, 10, 11, 12, 13, 116, 8, 167, 119, 120, 121, 122, 123, 124, 125, 9, 10, 11, 163, 51, 52, 53, 54, 55, 106, 57, 108, 116, 37, 38, 141, 163, 9, 10, 11, - 159, 30, 69, 32, 33, 34, 35, 36, 37, 38, - 8, 137, 138, 57, 9, 10, 11, 141, 30, 165, - 32, 33, 34, 35, 36, 1, 8, 71, 72, 73, - 74, 75, 76, 77, 8, 30, 80, 32, 33, 34, - 35, 165, 8, 87, 88, 89, 90, 91, 92, 93, + 8, 30, 69, 32, 33, 34, 35, 36, 37, 38, + 116, 137, 138, 57, 9, 10, 11, 141, 30, 165, + 32, 33, 34, 35, 36, 8, 8, 71, 72, 73, + 74, 75, 76, 77, 140, 30, 80, 32, 33, 34, + 35, 165, 159, 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, 73, 166, 166, 126, 127, 128, 129, 80, 131, 132, 133, 134, 135, 136, 1, 166, 139, 140, 141, 142, 143, - 144, 145, 85, 147, 148, 163, 9, 10, 11, 167, - 154, 155, 156, 8, 158, 2, 3, 4, 5, 6, - 7, 97, 9, 10, 11, 12, 13, 30, 122, 32, + 144, 145, 8, 147, 148, 9, 9, 10, 11, 31, + 154, 155, 156, 14, 158, 2, 3, 4, 5, 6, + 7, 1, 9, 10, 11, 12, 13, 30, 122, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 16, 57, 9, 10, 11, 44, 45, - 46, 47, 48, 49, 50, 9, 69, 150, 52, 8, - 57, 9, 10, 11, 82, 1, 30, 1, 32, 33, - 34, 8, 8, 1, 71, 72, 73, 74, 75, 76, - 77, 8, 30, 80, 32, 33, 80, 8, 1, 83, + 53, 54, 55, 8, 57, 9, 10, 11, 44, 45, + 46, 47, 48, 49, 50, 163, 69, 8, 52, 167, + 57, 9, 10, 11, 82, 97, 30, 1, 32, 33, + 34, 106, 107, 166, 71, 72, 73, 74, 75, 76, + 77, 116, 30, 80, 32, 33, 80, 8, 1, 83, 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, 1, 80, 70, 126, - 127, 128, 129, 14, 131, 132, 133, 134, 135, 136, - 8, 8, 139, 140, 141, 142, 143, 144, 145, 167, - 147, 148, 80, 171, 8, 30, 101, 154, 155, 156, - 2, 3, 4, 5, 6, 7, 106, 101, 108, 82, - 12, 13, 106, 15, 108, 9, 10, 11, 1, 113, - 14, 126, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 14, 167, 137, 138, 30, 117, 118, - 9, 10, 11, 122, 8, 30, 159, 160, 161, 51, - 52, 153, 9, 10, 56, 168, 58, 59, 60, 61, + 127, 128, 129, 1, 131, 132, 133, 134, 135, 136, + 8, 101, 139, 140, 141, 142, 143, 144, 145, 167, + 147, 148, 163, 171, 8, 30, 167, 154, 155, 156, + 2, 3, 4, 5, 6, 7, 126, 101, 8, 82, + 12, 13, 106, 15, 108, 1, 116, 167, 8, 113, + 1, 171, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 16, 1, 137, 138, 30, 117, 118, + 8, 141, 80, 122, 8, 30, 159, 160, 161, 51, + 52, 153, 131, 14, 56, 168, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 140, 70, 71, - 72, 73, 74, 31, 168, 8, 78, 79, 80, 167, - 82, 116, 8, 171, 86, 87, 88, 89, 1, 91, - 1, 93, 165, 95, 70, 80, 98, 99, 171, 106, - 107, 103, 104, 105, 106, 107, 141, 109, 110, 116, - 117, 118, 8, 115, 116, 122, 1, 8, 31, 1, - 122, 37, 38, 116, 131, 127, 128, 129, 14, 1, - 165, 116, 16, 70, 80, 49, 50, 139, 140, 166, + 72, 73, 74, 8, 168, 116, 78, 79, 80, 1, + 82, 116, 37, 38, 86, 87, 88, 89, 1, 91, + 1, 93, 165, 95, 8, 80, 98, 99, 171, 80, + 141, 103, 104, 105, 106, 107, 141, 109, 110, 31, + 70, 97, 8, 115, 116, 8, 1, 84, 31, 1, + 122, 70, 160, 116, 165, 127, 128, 129, 14, 167, + 165, 116, 16, 106, 80, 108, 14, 139, 140, 16, 142, 143, 144, 145, 146, 147, 148, 149, 141, 31, - 132, 133, 134, 155, 156, 140, 141, 159, 160, 161, - 162, 137, 138, 165, 75, 76, 77, 169, 170, 171, - 116, 84, 165, 84, 159, 160, 161, 153, 116, 90, - 165, 92, 163, 94, 167, 96, 167, 14, 171, 165, - 14, 37, 38, 116, 140, 106, 106, 82, 108, 14, - 137, 138, 84, 141, 116, 14, 117, 118, 164, 167, - 166, 122, 84, 159, 160, 161, 153, 14, 141, 130, - 131, 132, 133, 134, 70, 71, 16, 165, 165, 141, - 51, 52, 117, 118, 75, 76, 82, 122, 16, 70, - 86, 75, 76, 101, 102, 16, 131, 106, 107, 16, - 163, 16, 163, 16, 167, 140, 167, 168, 16, 70, + 9, 10, 11, 155, 156, 140, 141, 159, 160, 161, + 162, 70, 84, 165, 75, 76, 77, 169, 170, 171, + 116, 84, 165, 84, 159, 160, 161, 137, 138, 90, + 165, 92, 16, 94, 167, 96, 167, 116, 137, 138, + 171, 37, 38, 153, 140, 106, 163, 82, 14, 106, + 167, 108, 84, 14, 153, 165, 117, 118, 132, 133, + 134, 122, 141, 159, 160, 161, 165, 49, 50, 130, + 131, 132, 133, 134, 70, 71, 51, 52, 137, 138, + 75, 76, 117, 118, 75, 76, 82, 122, 14, 70, + 86, 163, 106, 107, 153, 167, 131, 101, 102, 106, + 163, 108, 163, 14, 167, 140, 167, 168, 106, 107, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 106, 107, 122, 162, 37, 38, - 165, 163, 16, 1, 16, 167, 171, 0, 1, 16, - 1, 163, 16, 139, 140, 167, 142, 143, 144, 145, - 146, 147, 148, 59, 60, 1, 137, 138, 70, 155, - 156, 37, 38, 31, 70, 74, 111, 112, 35, 165, - 31, 80, 153, 31, 170, 171, 137, 138, 87, 88, - 89, 31, 91, 31, 93, 31, 95, 31, 31, 98, - 31, 31, 153, 31, 103, 104, 105, 31, 74, 31, - 109, 110, 31, 31, 80, 31, 115, 116, 70, 71, + 26, 27, 28, 29, 111, 112, 122, 162, 37, 38, + 165, 163, 16, 1, 16, 167, 171, 0, 1, 164, + 1, 166, 16, 139, 140, 16, 142, 143, 144, 145, + 146, 147, 148, 59, 60, 35, 137, 138, 70, 155, + 156, 37, 38, 31, 70, 74, 16, 16, 16, 165, + 31, 80, 153, 16, 170, 171, 16, 31, 87, 88, + 89, 37, 91, 35, 93, 31, 95, 31, 35, 98, + 31, 57, 106, 107, 103, 104, 105, 31, 74, 31, + 109, 110, 116, 31, 80, 31, 115, 116, 70, 71, 31, 87, 88, 89, 31, 91, 84, 93, 127, 95, 82, 84, 98, 84, 86, 137, 138, 103, 104, 105, - 31, 137, 138, 109, 110, 31, 31, 31, 84, 115, - 116, 153, 31, 106, 31, 108, 37, 153, 38, 158, - 113, 127, 35, 165, 117, 118, 35, 35, 35, 122, - 122, 70, 71, 35, 35, 57, 69, 130, 131, 132, - 133, 134, 37, 82, 37, 37, 80, 86, 140, 77, - 142, 143, 144, 145, 146, 147, 148, 80, 70, 89, - 92, 154, 97, 155, 156, 163, 82, 82, 97, 167, - 163, 85, 163, 165, 167, 168, 167, 83, 170, 171, - 31, 131, 100, 122, 94, 90, 97, 163, 131, 135, - 135, 167, 96, 150, 136, 150, 140, 100, 158, 153, - 153, 140, 163, 142, 143, 144, 145, 146, 147, 148, - 159, 163, 153, 31, 113, 153, 155, 156, 114, 167, - 157, 157, 162, 74, -1, -1, 165, -1, -1, 80, - -1, 170, 171, -1, -1, -1, 87, 88, 89, 166, - 91, -1, 93, -1, 95, -1, -1, 98, -1, -1, + 31, 137, 138, 109, 110, 31, 31, 31, 31, 115, + 116, 153, 31, 106, 31, 108, 31, 153, 162, 158, + 113, 127, 31, 165, 117, 118, 31, 31, 35, 122, + 122, 70, 71, 35, 35, 35, 69, 130, 131, 132, + 133, 134, 37, 82, 9, 10, 11, 86, 140, 14, + 142, 143, 144, 145, 146, 147, 148, 37, 37, 70, + 38, 154, 80, 155, 156, 163, 80, 77, 89, 167, + 163, 83, 163, 165, 167, 168, 167, 85, 170, 171, + 31, 94, 114, 122, 82, 82, 92, 90, 131, 135, + 135, 113, 136, 150, 153, 150, 157, 96, 140, 153, + 153, 140, 162, 142, 143, 144, 145, 146, 147, 148, + 97, 97, 97, 31, 163, 153, 155, 156, 100, 100, + 157, 169, 158, 74, 153, 159, 165, 167, 163, 80, + 171, 170, 171, 163, -1, 163, 87, 88, 89, 166, + 91, -1, 93, 163, 95, -1, -1, 98, 164, -1, -1, -1, 103, 104, 105, 1, 74, -1, 109, 110, - -1, -1, 80, 153, 115, 116, 163, 165, 168, 87, + -1, -1, 80, -1, 115, 116, -1, 163, -1, 87, 88, 89, 163, 91, 163, 93, 127, 95, 1, 163, - 98, 163, 163, 163, 163, 103, 104, 105, 163, 74, + 98, 164, 170, -1, -1, 103, 104, 105, 163, 74, 163, 109, 110, 163, 163, 80, 163, 115, 116, 163, 163, 163, 87, 88, 89, 163, 91, 163, 93, 127, - 95, 164, 164, 98, 164, 164, 164, 102, 103, 104, + 95, 163, 165, 98, 164, 164, 164, 102, 103, 104, 105, 164, 74, 165, 109, 110, 165, 165, 80, 81, 115, 116, 165, 165, 165, 87, 88, 89, 84, 91, 165, 93, 127, 95, 165, 165, 98, 166, 165, 165, @@ -642,7 +642,7 @@ class Php8 extends \PhpParser\ParserAbstract 166, 165, 165, 106, 130, 131, 132, 133, 134, 165, 165, 165, 165, 165, 117, 118, 165, 165, 31, 122, 165, 165, 165, 165, 165, 165, 165, 130, 131, 132, - 133, 134, 74, 166, 165, 165, 170, 163, 80, 166, + 133, 134, 74, 166, 165, 165, -1, 163, 80, 166, 168, 167, 168, 166, 166, 87, 88, 89, 166, 91, 166, 93, 166, 95, 166, 166, 98, 166, 166, 166, 163, 103, 104, 105, 167, 168, 166, 109, 110, 82, @@ -654,13 +654,13 @@ class Php8 extends \PhpParser\ParserAbstract 167, -1, 168, 168, 168, 168, -1, 140, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 162, - 168, -1, 165, 169, 171, -1, -1, -1, 171 + 168, 168, 165, -1, -1, -1, -1, -1, 171 ); protected array $actionBase = array( 0, -2, 156, 559, 757, 1004, 1027, 485, 292, 357, - -60, -12, 588, 759, 759, 774, 759, 557, 752, 892, - 598, 598, 598, 827, 313, 313, 827, 313, 711, 711, + -60, 432, 557, 752, 752, 759, 752, 548, 588, 894, + 503, 503, 503, 836, 313, 313, 836, 313, 711, 711, 711, 711, 744, 744, 965, 965, 998, 932, 899, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, @@ -674,69 +674,69 @@ class Php8 extends \PhpParser\ParserAbstract 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 33, 20, 224, 1080, 673, 1056, 1062, 1058, - 1063, 1054, 1053, 1057, 1059, 1064, 1109, 1110, 833, 1108, - 1112, 1060, 907, 1055, 1061, 888, 297, 297, 297, 297, + 1088, 1088, 33, 20, 484, 1080, 709, 1056, 1062, 1058, + 1063, 1054, 1053, 1057, 1059, 1064, 1110, 1112, 846, 1109, + 1113, 1060, 907, 1055, 1061, 892, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 356, 476, 513, 501, 501, 501, 501, 501, - 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, - 501, 501, 501, 501, 501, 624, 624, 22, 22, 22, + 297, 297, 296, 885, 44, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, + 611, 611, 611, 611, 611, 624, 624, 22, 22, 22, 362, 811, 758, 811, 811, 811, 811, 811, 811, 811, 811, 346, 205, 188, 714, 171, 171, 7, 7, 7, 7, 7, 376, 1117, 54, 585, 585, 314, 314, 314, - 314, 365, 554, 83, 435, 397, 556, 477, 463, 532, - 532, 558, 558, 76, 76, 558, 558, 558, 133, 133, - 547, 547, 547, 547, 41, 217, 806, 382, 382, 382, - 382, 806, 806, 806, 806, 795, 996, 806, 806, 806, - 494, 533, 708, 649, 649, 560, -70, -70, 560, 800, - -70, 487, 975, 316, 982, -102, 807, -40, 514, -102, - 1000, 368, 639, 639, 659, 639, 639, 639, 801, 611, - 801, 1052, 836, 836, 794, 776, 894, 1082, 1065, 832, - 1106, 847, 1107, 1083, 489, 488, -16, 13, 74, 772, - 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051, - 1051, 1051, 1113, 554, 1052, -3, 1104, 1105, 1113, 1113, - 1113, 554, 554, 554, 554, 554, 554, 554, 554, 799, - 554, 554, 675, -3, 629, 636, -3, 849, 554, 797, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 512, 33, 33, 20, 5, 5, 33, 142, 52, 5, - 5, 5, 337, 5, 33, 33, 33, 611, 828, 813, - 638, -18, 814, 443, 828, 828, 828, 115, 114, 128, - 753, 837, 370, 816, 816, 835, 929, 929, 816, 834, - 816, 835, 816, 816, 929, 929, 810, 929, 202, 506, - 373, 442, 537, 929, 234, 816, 816, 816, 816, 805, - 929, 72, 544, 816, 226, 218, 816, 816, 805, 804, - 824, 808, 929, 929, 929, 805, 389, 808, 808, 808, - 853, 859, 851, 819, 361, 305, 579, 163, 830, 819, - 819, 816, 456, 851, 819, 851, 819, 790, 819, 819, - 819, 851, 819, 834, 383, 819, 736, 574, 127, 819, - 816, 19, 944, 947, 762, 950, 934, 951, 991, 952, - 954, 1070, 925, 967, 935, 955, 999, 933, 930, 831, - 699, 703, 809, 796, 919, 817, 817, 817, 912, 917, - 817, 817, 817, 817, 817, 817, 817, 817, 699, 897, - 860, 820, 976, 705, 707, 1041, 793, 1085, 1114, 975, - 944, 954, 770, 935, 955, 933, 930, 792, 791, 786, - 788, 782, 780, 777, 779, 803, 1043, 958, 789, 712, - 1012, 977, 1084, 1066, 978, 981, 1016, 1044, 861, 1045, - 1086, 838, 1087, 1090, 898, 985, 1071, 817, 911, 852, - 900, 982, 918, 699, 901, 1046, 997, 802, 1018, 1019, - 1069, 821, 844, 902, 1091, 986, 987, 988, 1073, 1074, - 798, 1003, 823, 1021, 839, 850, 1022, 1023, 1030, 1034, - 1075, 1092, 1076, 908, 1077, 866, 845, 931, 846, 1093, - 429, 843, 848, 858, 990, 584, 974, 1078, 1002, 1094, - 1035, 1036, 1039, 1095, 1096, 959, 868, 1007, 840, 1008, - 964, 869, 870, 643, 857, 1047, 841, 842, 855, 646, - 655, 1097, 1098, 1099, 966, 825, 822, 871, 875, 1048, - 829, 1050, 1100, 661, 877, 1101, 1042, 738, 743, 586, - 692, 680, 746, 818, 1079, 812, 854, 815, 989, 743, - 826, 880, 1102, 881, 883, 886, 1040, 887, 1014, 1103, + 314, 350, 515, 497, 435, 397, -40, 638, 477, 706, + 429, 429, 541, 541, 76, 76, 541, 541, 541, 133, + 133, 370, 370, 370, 370, 83, -71, 808, 489, 489, + 489, 489, 808, 808, 808, 808, 795, 862, 808, 808, + 808, 510, 521, 708, 645, 645, 613, -70, -70, 613, + 391, -70, 320, 975, 316, 982, 94, 807, 275, 595, + 94, 1000, 368, 561, 561, 639, 561, 561, 561, 816, + 606, 816, 1052, 842, 842, 825, 779, 898, 1082, 1065, + 868, 1107, 869, 1108, 1083, 299, 546, 10, 13, 74, + 776, 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051, + 1051, 1051, 1051, 809, 515, 1052, -3, 1105, 1106, 809, + 809, 809, 515, 515, 515, 515, 515, 515, 515, 515, + 826, 515, 515, 633, -3, 625, 629, -3, 850, 515, + 796, 33, 33, 33, 33, 33, 33, 33, 33, 33, + 33, 33, -18, 33, 33, 20, 5, 5, 33, 202, + 37, 5, 5, 5, 487, 5, 33, 33, 33, 606, + 754, 789, 622, 278, 813, 217, 754, 754, 754, 115, + 114, 128, 740, 768, 563, 832, 832, 832, 853, 929, + 929, 832, 852, 832, 853, 832, 832, 929, 929, 790, + 929, 163, 506, 389, 480, 535, 929, 294, 832, 832, + 832, 832, 805, 929, 113, 556, 832, 218, 192, 832, + 832, 805, 804, 833, 806, 929, 929, 929, 805, 470, + 806, 806, 806, 820, 822, 828, 831, 359, 345, 577, + 147, 872, 831, 831, 832, 502, 828, 831, 828, 831, + 814, 831, 831, 831, 828, 831, 852, 456, 831, 771, + 574, 127, 831, 832, 19, 944, 947, 766, 950, 934, + 951, 991, 952, 954, 1070, 925, 967, 935, 955, 999, + 933, 930, 845, 736, 738, 797, 791, 919, 817, 817, + 817, 912, 917, 817, 817, 817, 817, 817, 817, 817, + 817, 736, 834, 821, 829, 976, 746, 749, 1041, 793, + 1086, 802, 975, 944, 954, 774, 935, 955, 933, 930, + 824, 819, 799, 803, 794, 792, 786, 788, 827, 1043, + 958, 801, 770, 1012, 977, 1085, 1066, 978, 981, 1016, + 1044, 830, 1045, 1087, 839, 1090, 1091, 867, 985, 1071, + 817, 911, 897, 900, 982, 918, 736, 901, 1046, 997, + 810, 1018, 1019, 1069, 864, 838, 902, 1092, 986, 987, + 988, 1073, 1074, 815, 1003, 823, 1021, 865, 1002, 1022, + 1023, 1030, 1034, 1075, 1093, 1076, 908, 1077, 854, 847, + 931, 851, 1094, 509, 848, 849, 871, 990, 584, 974, + 1078, 1084, 1095, 1035, 1036, 1039, 1096, 1097, 959, 859, + 1007, 837, 1008, 964, 861, 866, 592, 870, 1047, 773, + 843, 855, 654, 659, 1098, 1099, 1100, 966, 835, 840, + 875, 877, 1048, 764, 1050, 1101, 694, 880, 1102, 1042, + 772, 777, 586, 636, 593, 780, 844, 1079, 812, 818, + 863, 989, 777, 841, 881, 1103, 883, 886, 887, 1040, + 888, 1014, 1104, 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, 468, 468, 468, 468, 468, 468, - 313, 313, 313, 313, 313, 468, 468, 468, 468, 468, - 468, 468, 313, 468, 468, 468, 313, 0, 0, 313, - 0, 468, 468, 468, 468, 468, 468, 468, 468, 468, + 0, 0, 0, 0, 0, 0, 0, 468, 468, 468, + 468, 468, 468, 313, 313, 313, 313, 313, 468, 468, + 468, 468, 468, 468, 468, 313, 468, 468, 468, 313, + 0, 0, 313, 0, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, @@ -749,44 +749,44 @@ class Php8 extends \PhpParser\ParserAbstract 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 297, 297, 297, 297, 297, + 468, 468, 468, 468, 468, 468, 468, 468, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 297, 297, 297, 297, 297, + 0, 0, 0, 0, 0, 0, 0, 0, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 524, 524, - 297, 297, 297, 297, 524, 524, 524, 524, 524, 524, - 524, 524, 524, 524, 297, 297, 297, 0, 297, 297, - 297, 297, 297, 297, 297, 810, 524, 524, 524, 524, - 133, 133, 133, 133, -95, -95, -95, 524, 524, 133, - 524, 810, 524, 524, 524, 524, 524, 524, 524, 524, - 524, 0, 0, 524, 524, 524, 524, -3, -70, 524, - 834, 834, 834, 834, 524, 524, 524, 524, -70, -70, - 524, 524, 524, 0, 0, 0, 133, 133, -3, 0, - 0, -3, 391, 0, 834, 206, 834, 206, 524, 391, - 810, 374, 524, 489, 0, 0, 0, 0, 0, 0, - 0, -3, 834, -3, 554, -70, -70, 554, 554, 5, - 33, 374, 612, 612, 612, 612, 33, 0, 0, 0, - 0, 0, 611, 810, 810, 810, 810, 810, 810, 810, - 810, 810, 810, 810, 810, 834, 0, 810, 0, 810, - 810, 834, 834, 834, 0, 0, 0, 0, 0, 0, - 0, 0, 929, 0, 0, 0, 0, 0, 0, 0, - 834, 0, 929, 0, 0, 0, 0, 0, 0, 0, + 297, 524, 524, 297, 297, 297, 297, 524, 524, 524, + 524, 524, 524, 524, 524, 524, 524, 297, 297, 297, + 0, 297, 297, 297, 297, 297, 297, 297, 790, 524, + 524, 524, 524, 133, 133, 133, 133, -95, -95, -95, + 524, 524, 391, 133, 524, 391, 524, 524, 524, 524, + 524, 524, 524, 524, 524, 0, 0, 524, 524, 524, + 524, -3, -70, 524, 852, 852, 852, 852, 524, 524, + 524, 524, -70, -70, 524, 524, 524, 0, 0, 0, + 133, 133, -3, 0, 0, -3, 0, 0, 852, 206, + 852, 206, 524, 391, 790, 442, 524, 299, 0, 0, + 0, 0, 0, 0, 0, -3, 852, -3, 515, -70, + -70, 515, 515, 5, 33, 442, 616, 616, 616, 616, + 33, 0, 0, 0, 0, 0, 606, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 790, 790, 852, + 0, 790, 0, 790, 790, 852, 852, 852, 0, 0, + 0, 0, 0, 0, 0, 0, 929, 0, 0, 0, + 0, 0, 0, 0, 852, 0, 929, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 834, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 817, 821, 0, 0, 821, 0, 817, 817, 817, - 0, 0, 0, 857, 829 + 0, 0, 0, 0, 0, 0, 852, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 817, 864, 0, 0, + 864, 0, 817, 817, 817, 0, 0, 0, 870, 764 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 618, 618, - 618, 618,32767,32767, 255, 102,32767,32767, 489, 406, - 406, 406,32767,32767, 562, 562, 562, 562, 562,32767, - 32767,32767,32767,32767,32767, 489,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 619, 619, + 619, 619,32767,32767, 256, 102,32767,32767, 490, 407, + 407, 407,32767,32767, 563, 563, 563, 563, 563,32767, + 32767,32767,32767,32767,32767, 490,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, @@ -794,133 +794,143 @@ class Php8 extends \PhpParser\ParserAbstract 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, 36, 7, 8, 10, - 11, 49, 17, 328, 100,32767,32767,32767,32767,32767, + 11, 49, 17, 329, 100,32767,32767,32767,32767,32767, 32767,32767,32767, 102,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 393, 611,32767,32767,32767, + 32767,32767,32767,32767,32767, 394, 612,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 493, 472, 473, 475, - 476, 405, 563, 617, 331, 614, 333, 404, 145, 343, - 334, 243, 259, 494, 260, 495, 498, 499, 216, 390, - 149, 150, 436, 490, 438, 488, 492, 437, 411, 417, - 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, - 428, 429, 409, 410, 491,32767,32767, 469, 468, 467, - 434,32767,32767,32767,32767,32767,32767,32767,32767, 102, - 32767, 435, 439, 442, 408, 440, 441, 458, 459, 456, - 457, 460,32767,32767, 320,32767,32767, 461, 462, 463, - 464, 371, 195, 369,32767,32767, 443, 320, 111,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 449, 450, + 32767,32767,32767,32767,32767,32767, 494, 473, 474, 476, + 477, 406, 564, 618, 332, 615, 334, 405, 146, 344, + 335, 244, 260, 495, 261, 496, 499, 500, 217, 391, + 150, 151, 437, 491, 439, 489, 493, 438, 412, 418, + 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, + 429, 430, 410, 411, 492,32767,32767, 470, 469, 468, + 435,32767,32767,32767,32767,32767,32767,32767,32767, 102, + 32767, 436, 440, 443, 409, 441, 442, 459, 460, 457, + 458, 461,32767,32767, 321,32767,32767, 462, 463, 464, + 465, 372, 196, 370,32767,32767, 111, 444, 321, 111, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 450, + 451,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, + 100, 507, 557, 467, 445, 446,32767, 532,32767, 102, + 32767, 534,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 559, 432, 434, 527, 613, 413, 616,32767, + 520, 100, 196,32767, 533, 196, 196,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 558,32767, 626, + 520, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110,32767, 196, 110,32767, 110, 110,32767, + 32767, 100, 196, 196, 196, 196, 196, 196, 196, 196, + 535, 196, 196, 191,32767, 270, 272, 102, 581, 196, + 537,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, 102,32767, 100, - 506, 556, 466, 444, 445,32767, 531,32767, 102,32767, - 533,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 558, 431, 433, 526, 612, 412, 615,32767, 519, - 100, 195,32767, 532, 195, 195,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 557,32767, 625, 519, - 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110,32767, 195, 110,32767, 110, 110,32767,32767, - 100, 195, 195, 195, 195, 195, 195, 195, 195, 534, - 195, 195, 190,32767, 269, 271, 102, 580, 195, 536, + 32767,32767,32767,32767, 394,32767,32767,32767,32767, 520, + 455, 139,32767, 522, 139, 565, 447, 448, 449, 565, + 565, 565, 317, 294,32767,32767,32767,32767,32767, 535, + 535, 100, 100, 100, 100,32767,32767,32767,32767, 111, + 506, 99, 99, 99, 99, 99, 103, 101,32767,32767, + 32767,32767, 225,32767, 101, 99,32767, 101, 101,32767, + 32767, 225, 227, 214, 229,32767, 585, 586, 225, 101, + 229, 229, 229, 249, 249, 509, 323, 101, 99, 101, + 101, 198, 323, 323,32767, 101, 509, 323, 509, 323, + 200, 323, 323, 323, 509, 323,32767, 101, 323, 216, + 99, 99, 323,32767,32767,32767,32767, 522,32767,32767, + 32767,32767,32767,32767,32767, 224,32767,32767,32767,32767, + 32767,32767,32767,32767, 552,32767, 570, 583, 453, 454, + 456, 569, 567, 478, 479, 480, 481, 482, 483, 484, + 486, 614,32767, 526,32767,32767,32767, 343,32767, 624, + 32767,32767,32767, 9, 74, 515, 42, 43, 51, 57, + 541, 542, 543, 544, 538, 539, 545, 540,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 625,32767, 565,32767,32767,32767,32767, + 452, 547, 591,32767,32767, 566, 617,32767,32767,32767, + 32767,32767,32767,32767, 139,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 552,32767, 137,32767,32767, + 32767,32767,32767,32767,32767,32767, 548,32767,32767,32767, + 565,32767,32767,32767,32767, 319, 316,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 393,32767,32767,32767,32767, 519, 454, 138, - 32767, 521, 138, 564, 446, 447, 448, 564, 564, 564, - 316, 293,32767,32767,32767,32767, 534, 534, 100, 100, - 100, 100,32767,32767,32767,32767, 111, 505, 99, 99, - 99, 99, 99, 103, 101,32767,32767,32767,32767, 224, - 32767, 101, 99,32767, 101, 101,32767,32767, 224, 226, - 213, 228,32767, 584, 585, 224, 101, 228, 228, 228, - 248, 248, 508, 322, 101, 99, 101, 101, 197, 322, - 322,32767, 101, 508, 322, 508, 322, 199, 322, 322, - 322, 508, 322,32767, 101, 322, 215, 99, 99, 322, - 32767,32767,32767,32767, 521,32767,32767,32767,32767,32767, - 32767,32767, 223,32767,32767,32767,32767,32767,32767,32767, - 32767, 551,32767, 569, 582, 452, 453, 455, 568, 566, - 477, 478, 479, 480, 481, 482, 483, 485, 613,32767, - 525,32767,32767,32767, 342,32767, 623,32767,32767,32767, - 9, 74, 514, 42, 43, 51, 57, 540, 541, 542, - 543, 537, 538, 544, 539,32767,32767,32767,32767,32767, + 32767,32767,32767, 565,32767,32767,32767,32767,32767, 296, + 32767, 313,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 624,32767, 564,32767,32767,32767,32767, 451, 546, 590, - 32767,32767, 565, 616,32767,32767,32767,32767,32767,32767, - 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 551,32767, 136,32767,32767,32767,32767,32767, - 32767,32767,32767, 547,32767,32767,32767, 564,32767,32767, - 32767,32767, 318, 315,32767,32767,32767,32767,32767,32767, + 390, 522, 299, 301, 302,32767,32767,32767,32767, 366, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 564,32767,32767,32767,32767,32767, 295,32767, 312,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 389, 521, 298, - 300, 301,32767,32767,32767,32767, 365,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 152, 152, 3, 3, 345, 152, 152, 152, 345, 345, - 152, 345, 345, 345, 152, 152, 152, 152, 152, 152, - 152, 281, 185, 263, 266, 248, 248, 152, 357, 152, - 391, 391, 400 + 32767,32767,32767, 153, 153, 3, 3, 346, 153, 153, + 153, 346, 346, 153, 346, 346, 346, 153, 153, 153, + 153, 153, 153, 153, 282, 186, 264, 267, 249, 249, + 153, 358, 153, 392, 392, 401 ); protected array $goto = array( - 194, 194, 1052, 487, 705, 278, 278, 278, 278, 990, - 489, 548, 548, 907, 865, 907, 907, 548, 714, 548, - 548, 548, 548, 548, 548, 548, 548, 166, 166, 166, + 194, 194, 1056, 490, 708, 279, 276, 279, 279, 994, + 492, 551, 551, 911, 868, 911, 911, 551, 717, 551, + 551, 551, 551, 551, 551, 551, 551, 166, 166, 166, 166, 218, 195, 191, 191, 176, 178, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 545, 546, 428, 547, - 550, 551, 552, 553, 554, 555, 556, 557, 1169, 167, + 188, 189, 190, 215, 213, 216, 548, 549, 430, 550, + 553, 554, 555, 556, 557, 558, 559, 560, 1173, 167, 168, 169, 193, 170, 171, 172, 164, 173, 174, 175, 177, 212, 214, 217, 237, 240, 251, 252, 253, 255, 256, 257, 258, 259, 260, 261, 267, 268, 269, 270, - 276, 288, 289, 313, 314, 434, 435, 436, 607, 219, + 277, 289, 290, 314, 315, 436, 437, 438, 610, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 186, 187, 188, 189, 190, - 215, 1169, 196, 197, 198, 199, 238, 179, 180, 200, + 215, 1173, 196, 197, 198, 199, 238, 179, 180, 200, 181, 201, 197, 182, 239, 196, 163, 202, 203, 183, 204, 205, 206, 184, 207, 208, 165, 209, 210, 211, - 185, 869, 560, 1083, 560, 560, 592, 1100, 475, 475, - 744, 646, 648, 609, 560, 668, 432, 475, 621, 692, - 695, 1025, 703, 712, 1021, 719, 558, 558, 558, 558, - 470, 613, 866, 663, 664, 463, 681, 682, 683, 1218, - 984, 984, 984, 984, 247, 247, 463, 978, 985, 355, - 355, 355, 355, 867, 923, 918, 919, 932, 875, 920, - 872, 921, 922, 873, 350, 926, 879, 1126, 1154, 1127, - 878, 245, 245, 245, 245, 242, 248, 841, 1106, 1102, - 1103, 438, 670, 402, 405, 610, 614, 433, 336, 332, - 333, 335, 602, 437, 337, 439, 647, 426, 1273, 1052, - 1273, 1273, 342, 900, 456, 456, 348, 456, 456, 1052, - 1273, 882, 1052, 520, 1052, 1052, 1052, 1052, 1052, 1052, - 1052, 1052, 1052, 343, 342, 1052, 1052, 1052, 1052, 894, - 465, 1273, 881, 508, 599, 509, 1273, 1273, 1273, 1273, - 358, 515, 1273, 1273, 1273, 1354, 1354, 1354, 1354, 862, - 358, 358, 1372, 1372, 630, 667, 895, 883, 1088, 1092, - 940, 358, 358, 1362, 941, 358, 1011, 1372, 1389, 993, - 956, 447, 956, 619, 633, 636, 637, 638, 639, 660, - 661, 662, 716, 718, 564, 569, 562, 358, 358, 1375, - 1375, 400, 983, 1055, 1055, 690, 967, 597, 862, 1047, - 1063, 1064, 456, 456, 456, 456, 456, 456, 456, 456, - 456, 456, 456, 456, 1138, 899, 456, 669, 456, 456, - 1058, 1057, 322, 562, 569, 594, 595, 324, 605, 611, - 1166, 626, 627, 1028, 1028, 1061, 1062, 632, 632, 25, - 320, 306, 1334, 1304, 1304, 1304, 1304, 1304, 1304, 1304, - 1304, 1304, 1304, 702, 1349, 1350, 1014, 843, 5, 986, - 6, 743, 445, 422, 561, 1023, 1018, 1076, 1345, 702, - 1345, 1345, 702, 603, 624, 1323, 1323, 691, 250, 250, - 1345, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, 1323, - 1323, 563, 589, 927, 564, 928, 563, 675, 589, 859, - 403, 469, 1356, 1356, 1356, 1356, 338, 887, 271, 319, - 625, 319, 319, 478, 606, 479, 480, 973, 351, 352, - 409, 892, 1320, 1320, 1380, 1381, 1341, 862, 1320, 1320, - 1320, 1320, 1320, 1320, 1320, 1320, 1320, 1320, 982, 417, - 713, 1268, 1264, 414, 415, 1033, 884, 440, 679, 890, - 680, 1149, 419, 420, 421, 1089, 693, 847, 1266, 423, - 440, 747, 1043, 346, 485, 1093, 1059, 1059, 330, 484, - 1347, 1348, 1140, 674, 1070, 1066, 1067, 1091, 896, 995, - 549, 549, 377, 1343, 1343, 1091, 549, 549, 549, 549, - 549, 549, 549, 549, 549, 549, 1269, 1270, 0, 1256, - 0, 847, 0, 847, 615, 857, 0, 945, 1156, 640, - 642, 644, 1256, 0, 0, 0, 0, 608, 1119, 1030, - 0, 0, 752, 752, 1271, 1331, 1332, 886, 717, 673, - 1009, 0, 0, 516, 708, 880, 1117, 1249, 959, 0, - 0, 0, 1250, 1253, 960, 0, 1254, 1263 + 185, 872, 563, 1087, 563, 563, 869, 1104, 1376, 1376, + 478, 478, 595, 473, 563, 612, 747, 649, 651, 478, + 351, 671, 1222, 1376, 870, 695, 698, 1029, 706, 715, + 1025, 722, 1059, 1059, 693, 971, 466, 844, 1051, 1067, + 1068, 988, 988, 988, 988, 1379, 1379, 466, 982, 989, + 356, 356, 356, 356, 927, 922, 923, 936, 878, 924, + 875, 925, 926, 876, 879, 1018, 930, 883, 990, 428, + 746, 882, 343, 564, 1027, 1022, 440, 673, 904, 1110, + 1106, 1107, 435, 337, 333, 334, 336, 605, 439, 338, + 441, 650, 602, 344, 343, 611, 1123, 349, 1277, 1056, + 1277, 1277, 633, 670, 459, 459, 720, 459, 459, 1056, + 1277, 519, 711, 1056, 1121, 1056, 1056, 1056, 1056, 1056, + 1056, 1056, 1056, 1056, 850, 523, 1056, 1056, 1056, 1056, + 666, 667, 1277, 684, 685, 686, 1366, 1277, 1277, 1277, + 1277, 359, 1015, 1277, 1277, 1277, 1358, 1358, 1358, 1358, + 672, 359, 359, 403, 406, 613, 617, 468, 1062, 1061, + 468, 944, 359, 359, 401, 945, 359, 600, 850, 1393, + 850, 960, 1170, 960, 622, 636, 639, 640, 641, 642, + 663, 664, 665, 719, 721, 567, 1253, 963, 359, 359, + 1080, 1254, 1257, 964, 865, 1258, 678, 865, 572, 565, + 931, 450, 932, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 635, 635, 459, 448, 459, + 459, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, + 1308, 1130, 1158, 1131, 694, 323, 565, 572, 597, 598, + 325, 608, 614, 1338, 629, 630, 865, 1327, 1327, 487, + 1351, 1352, 25, 1327, 1327, 1327, 1327, 1327, 1327, 1327, + 1327, 1327, 1327, 1065, 1066, 424, 561, 561, 561, 561, + 1349, 616, 1349, 1349, 352, 353, 339, 1324, 1324, 643, + 645, 647, 1349, 1324, 1324, 1324, 1324, 1324, 1324, 1324, + 1324, 1324, 1324, 566, 592, 566, 434, 567, 624, 566, + 862, 592, 886, 404, 472, 1360, 1360, 1360, 1360, 271, + 320, 628, 320, 320, 247, 247, 481, 609, 482, 483, + 898, 321, 307, 885, 896, 552, 552, 1384, 1385, 1345, + 891, 552, 552, 552, 552, 552, 552, 552, 552, 552, + 552, 245, 245, 245, 245, 242, 248, 1272, 977, 416, + 417, 705, 894, 410, 682, 846, 683, 1268, 421, 422, + 423, 1270, 696, 888, 511, 425, 512, 705, 1153, 347, + 705, 331, 518, 1037, 5, 618, 6, 865, 949, 1160, + 1095, 899, 887, 1092, 1096, 750, 1347, 1347, 1095, 1093, + 1034, 986, 419, 716, 997, 1353, 1354, 1047, 890, 488, + 676, 1013, 606, 627, 1273, 1274, 884, 1260, 442, 411, + 900, 999, 378, 860, 0, 1097, 0, 987, 1267, 1144, + 1260, 0, 442, 0, 755, 755, 0, 0, 1063, 1063, + 0, 0, 1275, 1335, 1336, 677, 1074, 1070, 1071, 1142, + 903, 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, 1032, 1032, 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, 250, 250 ); protected array $gotoCheck = array( @@ -940,97 +950,107 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 15, 19, 128, 19, 19, 48, 15, 154, 154, - 48, 48, 48, 131, 19, 48, 13, 154, 13, 48, - 48, 48, 48, 48, 48, 48, 107, 107, 107, 107, - 156, 107, 26, 86, 86, 19, 86, 86, 86, 156, - 19, 19, 19, 19, 5, 5, 19, 19, 19, 24, - 24, 24, 24, 27, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 97, 15, 15, 146, 146, 146, - 15, 5, 5, 5, 5, 5, 5, 6, 15, 15, - 15, 66, 66, 59, 59, 59, 59, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 43, 73, 73, - 73, 73, 174, 45, 23, 23, 185, 23, 23, 73, - 73, 35, 73, 76, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 174, 174, 73, 73, 73, 73, 35, - 83, 73, 35, 160, 178, 160, 73, 73, 73, 73, - 14, 160, 73, 73, 73, 9, 9, 9, 9, 22, - 14, 14, 188, 188, 56, 56, 16, 16, 16, 16, - 73, 14, 14, 187, 73, 14, 103, 188, 14, 16, - 9, 83, 9, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 14, 76, 76, 14, 14, 188, - 188, 62, 16, 89, 89, 89, 89, 104, 22, 89, - 89, 89, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 16, 16, 23, 64, 23, 23, - 119, 119, 76, 76, 76, 76, 76, 76, 76, 76, - 155, 76, 76, 107, 107, 120, 120, 108, 108, 76, - 175, 175, 14, 108, 108, 108, 108, 108, 108, 108, - 108, 108, 108, 7, 184, 184, 50, 7, 46, 50, - 46, 50, 113, 14, 50, 50, 50, 115, 131, 7, - 131, 131, 7, 2, 2, 176, 176, 117, 5, 5, - 131, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 9, 9, 65, 14, 65, 9, 121, 9, 18, - 9, 9, 131, 131, 131, 131, 29, 39, 24, 24, - 80, 24, 24, 9, 9, 9, 9, 92, 97, 97, - 28, 9, 177, 177, 9, 9, 131, 22, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, 93, 93, - 93, 20, 166, 82, 82, 110, 37, 118, 82, 9, - 82, 153, 82, 82, 82, 130, 82, 12, 14, 82, - 118, 99, 114, 82, 157, 133, 118, 118, 9, 182, - 182, 182, 149, 118, 118, 118, 118, 131, 41, 96, - 179, 179, 138, 131, 131, 131, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 20, 20, -1, 20, - -1, 12, -1, 12, 17, 20, -1, 17, 17, 85, - 85, 85, 20, -1, -1, -1, -1, 8, 8, 17, - -1, -1, 24, 24, 20, 20, 20, 17, 8, 17, - 17, -1, -1, 8, 8, 17, 8, 79, 79, -1, - -1, -1, 79, 79, 79, -1, 79, 17 + 42, 15, 19, 128, 19, 19, 26, 15, 188, 188, + 154, 154, 48, 156, 19, 131, 48, 48, 48, 154, + 97, 48, 156, 188, 27, 48, 48, 48, 48, 48, + 48, 48, 89, 89, 89, 89, 19, 6, 89, 89, + 89, 19, 19, 19, 19, 188, 188, 19, 19, 19, + 24, 24, 24, 24, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 50, 15, 15, 50, 43, + 50, 15, 174, 50, 50, 50, 66, 66, 45, 15, + 15, 15, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 178, 174, 174, 8, 8, 185, 73, 73, + 73, 73, 56, 56, 23, 23, 8, 23, 23, 73, + 73, 8, 8, 73, 8, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 12, 76, 73, 73, 73, 73, + 86, 86, 73, 86, 86, 86, 187, 73, 73, 73, + 73, 14, 103, 73, 73, 73, 9, 9, 9, 9, + 64, 14, 14, 59, 59, 59, 59, 83, 119, 119, + 83, 73, 14, 14, 62, 73, 14, 104, 12, 14, + 12, 9, 155, 9, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 14, 79, 79, 14, 14, + 115, 79, 79, 79, 22, 79, 121, 22, 76, 76, + 65, 83, 65, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 108, 108, 23, 113, 23, + 23, 108, 108, 108, 108, 108, 108, 108, 108, 108, + 108, 146, 146, 146, 117, 76, 76, 76, 76, 76, + 76, 76, 76, 14, 76, 76, 22, 176, 176, 182, + 182, 182, 76, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 120, 120, 14, 107, 107, 107, 107, + 131, 107, 131, 131, 97, 97, 29, 177, 177, 85, + 85, 85, 131, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 9, 9, 9, 13, 14, 13, 9, + 18, 9, 35, 9, 9, 131, 131, 131, 131, 24, + 24, 80, 24, 24, 5, 5, 9, 9, 9, 9, + 35, 175, 175, 35, 9, 179, 179, 9, 9, 131, + 39, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 5, 5, 5, 5, 5, 5, 20, 92, 82, + 82, 7, 9, 28, 82, 7, 82, 166, 82, 82, + 82, 14, 82, 37, 160, 82, 160, 7, 153, 82, + 7, 9, 160, 110, 46, 17, 46, 22, 17, 17, + 131, 16, 16, 16, 16, 99, 131, 131, 131, 130, + 17, 93, 93, 93, 16, 184, 184, 114, 17, 157, + 17, 17, 2, 2, 20, 20, 17, 20, 118, 31, + 41, 96, 138, 20, -1, 133, -1, 16, 17, 149, + 20, -1, 118, -1, 24, 24, -1, -1, 118, 118, + -1, -1, 20, 20, 20, 118, 118, 118, 118, 16, + 16, -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, 107, 107, -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, 5, 5 ); protected array $gotoBase = array( - 0, 0, -289, 0, 0, 203, 227, 406, 569, 8, - 0, 0, 223, -162, 5, -186, -143, 93, 152, -101, - 102, 0, 31, 2, 206, 10, 188, 209, 142, 172, - 0, 0, 0, 0, 0, -104, 0, 166, 0, 149, - 0, 90, -1, 234, 0, 237, -329, 0, -555, -9, - 404, 0, 0, 0, 0, 0, 274, 0, 0, 198, - 0, 0, 309, 0, 141, 439, 6, 0, 0, 0, - 0, 0, 0, -5, 0, 0, 1, 0, 0, 183, - 146, -28, 4, 12, -475, 82, -535, 0, 0, 74, - 0, 0, 151, 196, 0, 0, 89, -267, 0, 108, - 0, 0, 0, 291, 314, 0, 0, 158, 162, 0, - 131, 0, 0, 145, 100, 153, 0, 156, 243, 101, - 112, 167, 0, 0, 0, 0, 0, 0, 161, 0, - 135, 165, 0, 76, 0, 0, 0, 0, -209, 0, - 0, 0, 0, 0, 0, 0, -44, 0, 0, 81, - 0, 0, 0, 157, 134, 148, -76, 77, 0, 0, - -210, 0, -224, 0, 0, 0, 129, 0, 0, 0, - 0, 0, 0, 0, -33, 84, 200, 247, 265, 305, - 0, 0, 231, 0, 36, 236, 0, 292, 7, 0, + 0, 0, -163, 0, 0, 473, 187, 504, 247, 8, + 0, 0, -11, 117, 5, -187, 79, 61, 152, -101, + 107, 0, 78, 2, 207, 10, 162, 180, 174, 141, + 0, 122, 0, 0, 0, 86, 0, 182, 0, 171, + 0, 119, -1, 206, 0, 212, -216, 0, -552, -9, + 213, 0, 0, 0, 0, 0, 222, 0, 0, 268, + 0, 0, 282, 0, 74, 346, 1, 0, 0, 0, + 0, 0, 0, -5, 0, 0, 13, 0, 0, -70, + 146, -28, 7, 41, -478, -51, -441, 0, 0, -88, + 0, 0, 181, 248, 0, 0, 118, -314, 0, 130, + 0, 0, 0, 267, 284, 0, 0, 398, 140, 0, + 158, 0, 0, 100, 133, 76, 0, 112, 304, 38, + 139, 65, 0, 0, 0, 0, 0, 0, 161, 0, + 168, 167, 0, 123, 0, 0, 0, 0, -182, 0, + 0, 0, 0, 0, 0, 0, 120, 0, 0, 125, + 0, 0, 0, 173, 136, 90, -93, 109, 0, 0, + 18, 0, -224, 0, 0, 0, 143, 0, 0, 0, + 0, 0, 0, 0, -64, 164, 172, 202, 223, 250, + 0, 0, 110, 0, 176, 227, 0, 265, -138, 0, 0 ); protected array $gotoDefault = array( - -32768, 521, 754, 4, 755, 949, 830, 839, 585, 539, - 715, 347, 634, 429, 1339, 925, 1155, 604, 858, 1282, - 1288, 464, 861, 327, 741, 937, 908, 909, 406, 393, - 874, 404, 658, 635, 502, 893, 460, 885, 494, 888, - 459, 897, 162, 425, 518, 901, 3, 904, 567, 935, - 988, 394, 912, 395, 686, 914, 588, 916, 917, 401, - 407, 408, 1160, 596, 631, 929, 254, 590, 930, 392, - 931, 939, 397, 399, 696, 474, 513, 507, 418, 1121, - 591, 618, 655, 453, 481, 629, 641, 628, 488, 441, - 424, 326, 972, 980, 495, 472, 994, 349, 1002, 749, - 1168, 649, 497, 1010, 650, 1017, 1020, 540, 541, 486, - 1032, 264, 1035, 498, 1044, 23, 676, 1049, 1050, 677, - 651, 1072, 652, 678, 653, 1074, 471, 586, 1082, 461, - 1090, 1328, 462, 1094, 262, 1097, 277, 353, 376, 442, - 1104, 1105, 9, 1111, 706, 707, 19, 273, 517, 1139, - 697, 1145, 272, 1148, 458, 1167, 457, 1237, 1239, 568, - 499, 1257, 310, 1260, 689, 514, 1265, 454, 1330, 455, - 542, 482, 334, 543, 1373, 305, 356, 331, 559, 311, - 357, 544, 483, 1336, 1344, 328, 31, 1363, 1374, 601, - 623 + -32768, 524, 757, 4, 758, 953, 833, 842, 588, 542, + 718, 348, 637, 431, 1343, 929, 1159, 607, 861, 1286, + 1292, 467, 864, 328, 744, 941, 912, 913, 407, 394, + 877, 405, 661, 638, 505, 897, 463, 889, 497, 892, + 462, 901, 162, 427, 521, 905, 3, 908, 570, 939, + 992, 395, 916, 396, 689, 918, 591, 920, 921, 402, + 408, 409, 1164, 599, 634, 933, 254, 593, 934, 393, + 935, 943, 398, 400, 699, 477, 516, 510, 420, 1125, + 594, 621, 658, 456, 484, 632, 644, 631, 491, 443, + 426, 327, 976, 984, 498, 475, 998, 350, 1006, 752, + 1172, 652, 500, 1014, 653, 1021, 1024, 543, 544, 489, + 1036, 264, 1039, 501, 1048, 23, 679, 1053, 1054, 680, + 654, 1076, 655, 681, 656, 1078, 474, 589, 1086, 464, + 1094, 1332, 465, 1098, 262, 1101, 278, 354, 377, 444, + 1108, 1109, 9, 1115, 709, 710, 19, 273, 520, 1143, + 700, 1149, 272, 1152, 461, 1171, 460, 1241, 1243, 571, + 502, 1261, 311, 1264, 692, 517, 1269, 457, 1334, 458, + 545, 485, 335, 546, 1377, 306, 357, 332, 562, 312, + 358, 547, 486, 1340, 1348, 329, 31, 1367, 1378, 604, + 626 ); protected array $ruleToNonTerminal = array( @@ -1046,35 +1066,35 @@ class Php8 extends \PhpParser\ParserAbstract 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, - 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, - 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, - 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, + 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, + 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, + 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, + 45, 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 25, 25, 50, 69, 69, 72, 72, 71, - 70, 70, 63, 75, 75, 76, 76, 77, 77, 78, - 78, 79, 79, 80, 80, 80, 26, 26, 27, 27, - 27, 27, 27, 88, 88, 90, 90, 83, 83, 91, - 91, 92, 92, 92, 84, 84, 87, 87, 85, 85, - 93, 94, 94, 57, 57, 65, 65, 68, 68, 68, - 67, 95, 95, 96, 58, 58, 58, 58, 97, 97, - 98, 98, 99, 99, 100, 101, 101, 102, 102, 103, - 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, - 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, - 109, 111, 111, 112, 112, 112, 112, 112, 112, 112, - 110, 110, 110, 115, 115, 115, 115, 89, 89, 118, - 118, 118, 119, 119, 116, 116, 120, 120, 122, 122, - 123, 123, 117, 124, 124, 121, 125, 125, 125, 125, - 113, 113, 82, 82, 82, 20, 20, 20, 127, 126, - 126, 128, 128, 128, 128, 60, 129, 129, 130, 61, - 132, 132, 133, 133, 134, 134, 86, 135, 135, 135, - 135, 135, 135, 135, 135, 141, 141, 142, 142, 143, - 143, 143, 143, 143, 144, 145, 145, 140, 140, 136, - 136, 139, 139, 147, 147, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 137, 148, 148, 150, 149, - 149, 138, 138, 114, 114, 151, 151, 153, 153, 153, - 152, 152, 62, 104, 154, 154, 56, 56, 42, 42, + 49, 49, 49, 25, 25, 50, 69, 69, 72, 72, + 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, + 78, 78, 79, 79, 80, 80, 80, 26, 26, 27, + 27, 27, 27, 27, 88, 88, 90, 90, 83, 83, + 91, 91, 92, 92, 92, 84, 84, 87, 87, 85, + 85, 93, 94, 94, 57, 57, 65, 65, 68, 68, + 68, 67, 95, 95, 96, 58, 58, 58, 58, 97, + 97, 98, 98, 99, 99, 100, 101, 101, 102, 102, + 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, + 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, + 109, 109, 111, 111, 112, 112, 112, 112, 112, 112, + 112, 110, 110, 110, 115, 115, 115, 115, 89, 89, + 118, 118, 118, 119, 119, 116, 116, 120, 120, 122, + 122, 123, 123, 117, 124, 124, 121, 125, 125, 125, + 125, 113, 113, 82, 82, 82, 20, 20, 20, 127, + 126, 126, 128, 128, 128, 128, 60, 129, 129, 130, + 61, 132, 132, 133, 133, 134, 134, 86, 135, 135, + 135, 135, 135, 135, 135, 135, 141, 141, 142, 142, + 143, 143, 143, 143, 143, 144, 145, 145, 140, 140, + 136, 136, 139, 139, 147, 147, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 137, 148, 148, 150, + 149, 149, 138, 138, 114, 114, 151, 151, 153, 153, + 153, 152, 152, 62, 104, 154, 154, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1084,20 +1104,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 161, 162, 162, 163, 155, 155, 160, 160, - 164, 165, 165, 166, 167, 168, 168, 168, 168, 19, - 19, 73, 73, 73, 73, 156, 156, 156, 156, 170, - 170, 159, 159, 159, 157, 157, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 177, 177, 177, 108, - 179, 179, 179, 179, 158, 158, 158, 158, 158, 158, - 158, 158, 59, 59, 173, 173, 173, 173, 173, 180, - 180, 169, 169, 169, 169, 181, 181, 181, 181, 181, - 74, 74, 66, 66, 66, 66, 131, 131, 131, 131, - 184, 183, 172, 172, 172, 172, 172, 172, 171, 171, - 171, 182, 182, 182, 182, 107, 178, 186, 186, 185, - 185, 187, 187, 187, 187, 187, 187, 187, 187, 175, - 175, 175, 175, 174, 189, 188, 188, 188, 188, 188, - 188, 188, 188, 190, 190, 190, 190 + 42, 42, 42, 161, 162, 162, 163, 155, 155, 160, + 160, 164, 165, 165, 166, 167, 168, 168, 168, 168, + 19, 19, 73, 73, 73, 73, 156, 156, 156, 156, + 170, 170, 159, 159, 159, 157, 157, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 177, 177, 177, + 108, 179, 179, 179, 179, 158, 158, 158, 158, 158, + 158, 158, 158, 59, 59, 173, 173, 173, 173, 173, + 180, 180, 169, 169, 169, 169, 181, 181, 181, 181, + 181, 74, 74, 66, 66, 66, 66, 131, 131, 131, + 131, 184, 183, 172, 172, 172, 172, 172, 172, 171, + 171, 171, 182, 182, 182, 182, 107, 178, 186, 186, + 185, 185, 187, 187, 187, 187, 187, 187, 187, 187, + 175, 175, 175, 175, 174, 189, 188, 188, 188, 188, + 188, 188, 188, 188, 190, 190, 190, 190 ); protected array $ruleToLength = array( @@ -1113,58 +1133,58 @@ class Php8 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, 2, 0, 1, 1, 1, 1, 4, 3, 5, 4, 3, - 4, 1, 3, 1, 1, 8, 7, 2, 3, 1, - 2, 3, 1, 2, 3, 1, 1, 3, 1, 3, - 1, 2, 2, 3, 1, 3, 2, 3, 1, 3, - 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, 6, 5, 6, 3, - 2, 1, 1, 1, 1, 0, 2, 1, 3, 8, - 0, 4, 2, 1, 3, 0, 1, 0, 1, 0, - 1, 3, 1, 1, 1, 1, 8, 9, 7, 8, - 7, 6, 8, 0, 2, 0, 2, 1, 2, 1, - 2, 1, 1, 1, 0, 2, 0, 2, 0, 2, - 2, 1, 3, 1, 4, 1, 4, 1, 1, 4, - 2, 1, 3, 3, 3, 4, 4, 5, 0, 2, - 4, 3, 1, 1, 7, 0, 2, 1, 3, 3, - 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, - 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, - 3, 0, 2, 1, 1, 1, 1, 1, 1, 1, - 7, 9, 6, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, - 3, 3, 1, 3, 3, 1, 1, 2, 1, 1, - 0, 1, 0, 2, 2, 2, 4, 3, 1, 1, - 3, 1, 2, 2, 3, 2, 3, 1, 1, 2, - 3, 1, 1, 3, 2, 0, 1, 5, 7, 5, - 6, 10, 3, 5, 1, 1, 3, 0, 2, 4, - 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, - 3, 0, 2, 0, 3, 5, 8, 1, 3, 3, - 0, 2, 2, 2, 3, 1, 0, 1, 1, 3, - 3, 3, 4, 4, 1, 1, 2, 3, 3, 3, + 4, 1, 3, 4, 1, 1, 8, 7, 2, 3, + 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, + 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, + 3, 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, 6, 5, 6, + 3, 2, 1, 1, 1, 1, 0, 2, 1, 3, + 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, + 0, 1, 3, 1, 1, 1, 1, 8, 9, 7, + 8, 7, 6, 8, 0, 2, 0, 2, 1, 2, + 1, 2, 1, 1, 1, 0, 2, 0, 2, 0, + 2, 2, 1, 3, 1, 4, 1, 4, 1, 1, + 4, 2, 1, 3, 3, 3, 4, 4, 5, 0, + 2, 4, 3, 1, 1, 7, 0, 2, 1, 3, + 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, + 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, + 1, 3, 0, 2, 1, 1, 1, 1, 1, 1, + 1, 7, 9, 6, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, + 3, 3, 3, 1, 3, 3, 1, 1, 2, 1, + 1, 0, 1, 0, 2, 2, 2, 4, 3, 1, + 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, + 2, 3, 1, 1, 3, 2, 0, 1, 5, 7, + 5, 6, 10, 3, 5, 1, 1, 3, 0, 2, + 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, + 1, 3, 0, 2, 0, 3, 5, 8, 1, 3, + 3, 0, 2, 2, 2, 3, 1, 0, 1, 1, + 3, 3, 3, 4, 4, 1, 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, 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, 2, 8, 9, 8, 9, 9, 10, - 9, 10, 8, 3, 2, 2, 1, 1, 0, 4, - 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, - 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 5, 3, 3, - 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, - 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, - 1, 1, 3, 1, 1, 1, 4, 1, 4, 4, - 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, - 1, 3, 1, 4, 3, 3, 3, 3, 1, 3, - 1, 1, 3, 1, 1, 4, 1, 1, 1, 3, - 1, 1, 2, 1, 3, 4, 3, 2, 0, 2, - 2, 1, 2, 1, 1, 1, 4, 3, 3, 3, - 3, 6, 3, 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, + 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, + 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, + 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 4, 1, 4, + 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, + 2, 1, 3, 1, 4, 3, 3, 3, 3, 1, + 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, + 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, + 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, + 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1367,1118 +1387,1119 @@ protected function initReduceCallbacks(): void { }, 121 => null, 122 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), []); }, 123 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_FUNCTION; + $self->semValue = new Stmt\Const_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(4-1)]); + $self->checkConstantAttributes($self->semValue); }, 124 => static function ($self, $stackPos) { - $self->semValue = Stmt\Use_::TYPE_CONSTANT; + $self->semValue = Stmt\Use_::TYPE_FUNCTION; }, 125 => static function ($self, $stackPos) { - $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = Stmt\Use_::TYPE_CONSTANT; }, 126 => static function ($self, $stackPos) { + $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-6)], $self->semStack[$stackPos-(8-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + }, + 127 => static function ($self, $stackPos) { $self->semValue = new Stmt\GroupUse($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-5)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 127 => null, - 128 => static function ($self, $stackPos) { + 128 => null, + 129 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 129 => static function ($self, $stackPos) { + 130 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 130 => null, - 131 => static function ($self, $stackPos) { + 131 => null, + 132 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 132 => static function ($self, $stackPos) { + 133 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 133 => null, - 134 => static function ($self, $stackPos) { + 134 => null, + 135 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 135 => static function ($self, $stackPos) { + 136 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 136 => static function ($self, $stackPos) { + 137 => static function ($self, $stackPos) { $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); }, - 137 => static function ($self, $stackPos) { + 138 => static function ($self, $stackPos) { $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); }, - 138 => static function ($self, $stackPos) { + 139 => static function ($self, $stackPos) { $self->semValue = new Node\UseItem($self->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(1-1)); }, - 139 => static function ($self, $stackPos) { + 140 => static function ($self, $stackPos) { $self->semValue = new Node\UseItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->checkUseUse($self->semValue, $stackPos-(3-3)); }, - 140 => static function ($self, $stackPos) { + 141 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->semValue->type = Stmt\Use_::TYPE_NORMAL; }, - 141 => static function ($self, $stackPos) { + 142 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; $self->semValue->type = $self->semStack[$stackPos-(2-1)]; }, - 142 => null, - 143 => static function ($self, $stackPos) { + 143 => null, + 144 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 144 => static function ($self, $stackPos) { + 145 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 145 => static function ($self, $stackPos) { + 146 => static function ($self, $stackPos) { $self->semValue = new Node\Const_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 146 => null, - 147 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; - }, + 147 => null, 148 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 149 => static function ($self, $stackPos) { - $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 150 => static function ($self, $stackPos) { $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 151 => static function ($self, $stackPos) { - if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; + $self->semValue = new Node\Const_(new Node\Identifier($self->semStack[$stackPos-(3-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 152 => static function ($self, $stackPos) { - $self->semValue = array(); + if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; } $self->semValue = $self->semStack[$stackPos-(2-1)];; }, 153 => static function ($self, $stackPos) { + $self->semValue = array(); + }, + 154 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 154 => null, 155 => null, 156 => null, - 157 => static function ($self, $stackPos) { + 157 => null, + 158 => static function ($self, $stackPos) { throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 158 => static function ($self, $stackPos) { + 159 => static function ($self, $stackPos) { $self->semValue = new Stmt\Block($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 159 => static function ($self, $stackPos) { + 160 => static function ($self, $stackPos) { $self->semValue = new Stmt\If_($self->semStack[$stackPos-(7-3)], ['stmts' => $self->semStack[$stackPos-(7-5)], 'elseifs' => $self->semStack[$stackPos-(7-6)], 'else' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 160 => static function ($self, $stackPos) { + 161 => static function ($self, $stackPos) { $self->semValue = new Stmt\If_($self->semStack[$stackPos-(10-3)], ['stmts' => $self->semStack[$stackPos-(10-6)], 'elseifs' => $self->semStack[$stackPos-(10-7)], 'else' => $self->semStack[$stackPos-(10-8)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 161 => static function ($self, $stackPos) { + 162 => static function ($self, $stackPos) { $self->semValue = new Stmt\While_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 162 => static function ($self, $stackPos) { + 163 => static function ($self, $stackPos) { $self->semValue = new Stmt\Do_($self->semStack[$stackPos-(7-5)], $self->semStack[$stackPos-(7-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 163 => static function ($self, $stackPos) { + 164 => static function ($self, $stackPos) { $self->semValue = new Stmt\For_(['init' => $self->semStack[$stackPos-(9-3)], 'cond' => $self->semStack[$stackPos-(9-5)], 'loop' => $self->semStack[$stackPos-(9-7)], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 164 => static function ($self, $stackPos) { + 165 => static function ($self, $stackPos) { $self->semValue = new Stmt\Switch_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 165 => static function ($self, $stackPos) { + 166 => static function ($self, $stackPos) { $self->semValue = new Stmt\Break_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 166 => static function ($self, $stackPos) { + 167 => static function ($self, $stackPos) { $self->semValue = new Stmt\Continue_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 167 => static function ($self, $stackPos) { + 168 => static function ($self, $stackPos) { $self->semValue = new Stmt\Return_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 168 => static function ($self, $stackPos) { + 169 => static function ($self, $stackPos) { $self->semValue = new Stmt\Global_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 169 => static function ($self, $stackPos) { + 170 => static function ($self, $stackPos) { $self->semValue = new Stmt\Static_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 170 => static function ($self, $stackPos) { + 171 => static function ($self, $stackPos) { $self->semValue = new Stmt\Echo_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 171 => static function ($self, $stackPos) { + 172 => static function ($self, $stackPos) { $self->semValue = new Stmt\InlineHTML($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('hasLeadingNewline', $self->inlineHtmlHasLeadingNewline($stackPos-(1-1))); }, - 172 => static function ($self, $stackPos) { + 173 => static function ($self, $stackPos) { $self->semValue = new Stmt\Expression($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 173 => static function ($self, $stackPos) { + 174 => static function ($self, $stackPos) { $self->semValue = new Stmt\Unset_($self->semStack[$stackPos-(5-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 174 => static function ($self, $stackPos) { + 175 => static function ($self, $stackPos) { $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $self->semStack[$stackPos-(7-5)][1], 'stmts' => $self->semStack[$stackPos-(7-7)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 175 => static function ($self, $stackPos) { + 176 => static function ($self, $stackPos) { $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-7)][0], ['keyVar' => $self->semStack[$stackPos-(9-5)], 'byRef' => $self->semStack[$stackPos-(9-7)][1], 'stmts' => $self->semStack[$stackPos-(9-9)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 176 => static function ($self, $stackPos) { + 177 => static function ($self, $stackPos) { $self->semValue = new Stmt\Foreach_($self->semStack[$stackPos-(6-3)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-4)], $self->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $self->semStack[$stackPos-(6-6)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 177 => static function ($self, $stackPos) { + 178 => static function ($self, $stackPos) { $self->semValue = new Stmt\Declare_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 178 => static function ($self, $stackPos) { + 179 => static function ($self, $stackPos) { $self->semValue = new Stmt\TryCatch($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->checkTryCatch($self->semValue); }, - 179 => static function ($self, $stackPos) { + 180 => static function ($self, $stackPos) { $self->semValue = new Stmt\Goto_($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 180 => static function ($self, $stackPos) { + 181 => static function ($self, $stackPos) { $self->semValue = new Stmt\Label($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 181 => static function ($self, $stackPos) { + 182 => static function ($self, $stackPos) { $self->semValue = null; /* means: no statement */ }, - 182 => null, - 183 => static function ($self, $stackPos) { + 183 => null, + 184 => static function ($self, $stackPos) { $self->semValue = $self->maybeCreateNop($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); }, - 184 => static function ($self, $stackPos) { + 185 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 185 => static function ($self, $stackPos) { + 186 => static function ($self, $stackPos) { $self->semValue = array(); }, - 186 => static function ($self, $stackPos) { + 187 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 187 => static function ($self, $stackPos) { + 188 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 188 => static function ($self, $stackPos) { + 189 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 189 => static function ($self, $stackPos) { + 190 => static function ($self, $stackPos) { $self->semValue = new Stmt\Catch_($self->semStack[$stackPos-(8-3)], $self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-7)], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 190 => static function ($self, $stackPos) { + 191 => static function ($self, $stackPos) { $self->semValue = null; }, - 191 => static function ($self, $stackPos) { + 192 => static function ($self, $stackPos) { $self->semValue = new Stmt\Finally_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 192 => null, - 193 => static function ($self, $stackPos) { + 193 => null, + 194 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 194 => static function ($self, $stackPos) { + 195 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 195 => static function ($self, $stackPos) { + 196 => static function ($self, $stackPos) { $self->semValue = false; }, - 196 => static function ($self, $stackPos) { + 197 => static function ($self, $stackPos) { $self->semValue = true; }, - 197 => static function ($self, $stackPos) { + 198 => static function ($self, $stackPos) { $self->semValue = false; }, - 198 => static function ($self, $stackPos) { + 199 => static function ($self, $stackPos) { $self->semValue = true; }, - 199 => static function ($self, $stackPos) { + 200 => static function ($self, $stackPos) { $self->semValue = false; }, - 200 => static function ($self, $stackPos) { + 201 => static function ($self, $stackPos) { $self->semValue = true; }, - 201 => static function ($self, $stackPos) { + 202 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 202 => static function ($self, $stackPos) { + 203 => static function ($self, $stackPos) { $self->semValue = []; }, - 203 => null, - 204 => static function ($self, $stackPos) { - $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); - }, + 204 => null, 205 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 206 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 207 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, 208 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 209 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(7-2)); }, - 209 => static function ($self, $stackPos) { + 210 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(8-3)); }, - 210 => static function ($self, $stackPos) { + 211 => static function ($self, $stackPos) { $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkInterface($self->semValue, $stackPos-(7-3)); }, - 211 => static function ($self, $stackPos) { + 212 => static function ($self, $stackPos) { $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 212 => static function ($self, $stackPos) { + 213 => static function ($self, $stackPos) { $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkEnum($self->semValue, $stackPos-(8-3)); }, - 213 => static function ($self, $stackPos) { + 214 => static function ($self, $stackPos) { $self->semValue = null; }, - 214 => static function ($self, $stackPos) { + 215 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 215 => static function ($self, $stackPos) { + 216 => static function ($self, $stackPos) { $self->semValue = null; }, - 216 => static function ($self, $stackPos) { + 217 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 217 => static function ($self, $stackPos) { + 218 => static function ($self, $stackPos) { $self->semValue = 0; }, - 218 => null, 219 => null, - 220 => static function ($self, $stackPos) { + 220 => null, + 221 => static function ($self, $stackPos) { $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 221 => static function ($self, $stackPos) { + 222 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 222 => static function ($self, $stackPos) { + 223 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 223 => static function ($self, $stackPos) { + 224 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 224 => static function ($self, $stackPos) { + 225 => static function ($self, $stackPos) { $self->semValue = null; }, - 225 => static function ($self, $stackPos) { + 226 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 226 => static function ($self, $stackPos) { + 227 => static function ($self, $stackPos) { $self->semValue = array(); }, - 227 => static function ($self, $stackPos) { + 228 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 228 => static function ($self, $stackPos) { + 229 => static function ($self, $stackPos) { $self->semValue = array(); }, - 229 => static function ($self, $stackPos) { + 230 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 230 => null, - 231 => static function ($self, $stackPos) { + 231 => null, + 232 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 232 => static function ($self, $stackPos) { + 233 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 233 => null, - 234 => static function ($self, $stackPos) { + 234 => null, + 235 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 235 => null, - 236 => static function ($self, $stackPos) { + 236 => null, + 237 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 237 => static function ($self, $stackPos) { + 238 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 238 => static function ($self, $stackPos) { + 239 => static function ($self, $stackPos) { $self->semValue = null; }, - 239 => static function ($self, $stackPos) { + 240 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 240 => null, - 241 => static function ($self, $stackPos) { + 241 => null, + 242 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 242 => static function ($self, $stackPos) { + 243 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 243 => static function ($self, $stackPos) { + 244 => static function ($self, $stackPos) { $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 244 => static function ($self, $stackPos) { + 245 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 245 => static function ($self, $stackPos) { + 246 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 246 => static function ($self, $stackPos) { + 247 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 247 => static function ($self, $stackPos) { + 248 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(5-3)]; }, - 248 => static function ($self, $stackPos) { + 249 => static function ($self, $stackPos) { $self->semValue = array(); }, - 249 => static function ($self, $stackPos) { + 250 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 250 => static function ($self, $stackPos) { + 251 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 251 => static function ($self, $stackPos) { + 252 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 252 => null, 253 => null, - 254 => static function ($self, $stackPos) { + 254 => null, + 255 => static function ($self, $stackPos) { $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 255 => static function ($self, $stackPos) { + 256 => static function ($self, $stackPos) { $self->semValue = []; }, - 256 => null, - 257 => static function ($self, $stackPos) { + 257 => null, + 258 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 258 => static function ($self, $stackPos) { + 259 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 259 => static function ($self, $stackPos) { + 260 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 260 => static function ($self, $stackPos) { + 261 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 261 => static function ($self, $stackPos) { + 262 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 262 => static function ($self, $stackPos) { + 263 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 263 => static function ($self, $stackPos) { + 264 => static function ($self, $stackPos) { $self->semValue = array(); }, - 264 => static function ($self, $stackPos) { + 265 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 265 => static function ($self, $stackPos) { + 266 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 266 => static function ($self, $stackPos) { + 267 => static function ($self, $stackPos) { $self->semValue = array(); }, - 267 => static function ($self, $stackPos) { + 268 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 268 => static function ($self, $stackPos) { + 269 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 269 => static function ($self, $stackPos) { + 270 => static function ($self, $stackPos) { $self->semValue = null; }, - 270 => static function ($self, $stackPos) { + 271 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 271 => static function ($self, $stackPos) { + 272 => static function ($self, $stackPos) { $self->semValue = null; }, - 272 => static function ($self, $stackPos) { + 273 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 273 => static function ($self, $stackPos) { + 274 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 274 => static function ($self, $stackPos) { + 275 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-2)], true); }, - 275 => static function ($self, $stackPos) { + 276 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 276 => static function ($self, $stackPos) { + 277 => static function ($self, $stackPos) { $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); }, - 277 => null, - 278 => static function ($self, $stackPos) { + 278 => null, + 279 => static function ($self, $stackPos) { $self->semValue = array(); }, - 279 => static function ($self, $stackPos) { + 280 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 280 => static function ($self, $stackPos) { + 281 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 281 => static function ($self, $stackPos) { + 282 => static function ($self, $stackPos) { $self->semValue = 0; }, - 282 => static function ($self, $stackPos) { + 283 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 283 => static function ($self, $stackPos) { + 284 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 284 => static function ($self, $stackPos) { + 285 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 285 => static function ($self, $stackPos) { + 286 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 286 => static function ($self, $stackPos) { + 287 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 287 => static function ($self, $stackPos) { + 288 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 288 => static function ($self, $stackPos) { + 289 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 289 => static function ($self, $stackPos) { + 290 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 290 => static function ($self, $stackPos) { + 291 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 291 => static function ($self, $stackPos) { + 292 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 292 => static function ($self, $stackPos) { + 293 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, - 293 => null, - 294 => static function ($self, $stackPos) { + 294 => null, + 295 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 295 => static function ($self, $stackPos) { + 296 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 296 => null, 297 => null, - 298 => static function ($self, $stackPos) { + 298 => null, + 299 => static function ($self, $stackPos) { $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 299 => static function ($self, $stackPos) { + 300 => static function ($self, $stackPos) { $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 300 => static function ($self, $stackPos) { + 301 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 301 => static function ($self, $stackPos) { + 302 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 302 => null, - 303 => static function ($self, $stackPos) { + 303 => null, + 304 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 304 => static function ($self, $stackPos) { + 305 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 305 => static function ($self, $stackPos) { + 306 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 306 => null, - 307 => static function ($self, $stackPos) { + 307 => null, + 308 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 308 => static function ($self, $stackPos) { + 309 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 309 => static function ($self, $stackPos) { + 310 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 310 => static function ($self, $stackPos) { + 311 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 311 => static function ($self, $stackPos) { + 312 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 312 => static function ($self, $stackPos) { + 313 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 313 => static function ($self, $stackPos) { + 314 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 314 => static function ($self, $stackPos) { + 315 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 315 => static function ($self, $stackPos) { + 316 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 316 => null, - 317 => static function ($self, $stackPos) { + 317 => null, + 318 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 318 => static function ($self, $stackPos) { + 319 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 319 => null, - 320 => static function ($self, $stackPos) { + 320 => null, + 321 => static function ($self, $stackPos) { $self->semValue = null; }, - 321 => null, - 322 => static function ($self, $stackPos) { + 322 => null, + 323 => static function ($self, $stackPos) { $self->semValue = null; }, - 323 => static function ($self, $stackPos) { + 324 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 324 => static function ($self, $stackPos) { + 325 => static function ($self, $stackPos) { $self->semValue = null; }, - 325 => static function ($self, $stackPos) { + 326 => static function ($self, $stackPos) { $self->semValue = array(); }, - 326 => static function ($self, $stackPos) { + 327 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 327 => static function ($self, $stackPos) { + 328 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 328 => static function ($self, $stackPos) { + 329 => static function ($self, $stackPos) { $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 329 => static function ($self, $stackPos) { + 330 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 330 => static function ($self, $stackPos) { + 331 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 331 => static function ($self, $stackPos) { + 332 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 332 => static function ($self, $stackPos) { + 333 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 333 => static function ($self, $stackPos) { + 334 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 334 => static function ($self, $stackPos) { + 335 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, - 335 => null, - 336 => static function ($self, $stackPos) { + 336 => null, + 337 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 337 => static function ($self, $stackPos) { + 338 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 338 => null, 339 => null, - 340 => static function ($self, $stackPos) { + 340 => null, + 341 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 341 => static function ($self, $stackPos) { + 342 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 342 => static function ($self, $stackPos) { + 343 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 343 => static function ($self, $stackPos) { + 344 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 344 => static function ($self, $stackPos) { + 345 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 345 => static function ($self, $stackPos) { + 346 => static function ($self, $stackPos) { $self->semValue = array(); }, - 346 => static function ($self, $stackPos) { + 347 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 347 => static function ($self, $stackPos) { + 348 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 348 => static function ($self, $stackPos) { + 349 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); $self->checkPropertyHooksForMultiProperty($self->semValue, $stackPos-(7-5)); $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); $self->addPropertyNameToHooks($self->semValue); }, - 349 => static function ($self, $stackPos) { + 350 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 350 => static function ($self, $stackPos) { + 351 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 351 => static function ($self, $stackPos) { + 352 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 352 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, 353 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 354 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 355 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = null; /* will be skipped */ }, 356 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = array(); }, 357 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 358 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + $self->semValue = array(); }, 359 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 360 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 361 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 362 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 363 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 364 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 365 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 365 => null, - 366 => static function ($self, $stackPos) { + 366 => null, + 367 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 367 => static function ($self, $stackPos) { + 368 => static function ($self, $stackPos) { $self->semValue = null; }, - 368 => null, 369 => null, - 370 => static function ($self, $stackPos) { + 370 => null, + 371 => static function ($self, $stackPos) { $self->semValue = 0; }, - 371 => static function ($self, $stackPos) { + 372 => static function ($self, $stackPos) { $self->semValue = 0; }, - 372 => null, 373 => null, - 374 => static function ($self, $stackPos) { + 374 => null, + 375 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 375 => static function ($self, $stackPos) { + 376 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 376 => static function ($self, $stackPos) { + 377 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 377 => static function ($self, $stackPos) { + 378 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 378 => static function ($self, $stackPos) { + 379 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 379 => static function ($self, $stackPos) { + 380 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 380 => static function ($self, $stackPos) { + 381 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 381 => static function ($self, $stackPos) { + 382 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 382 => static function ($self, $stackPos) { + 383 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 383 => static function ($self, $stackPos) { + 384 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 384 => static function ($self, $stackPos) { + 385 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 385 => null, - 386 => static function ($self, $stackPos) { + 386 => null, + 387 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 387 => static function ($self, $stackPos) { + 388 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 388 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 389 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 390 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 391 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semValue = []; }, - 392 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 393 => static function ($self, $stackPos) { + 394 => static function ($self, $stackPos) { $self->semValue = []; }, - 394 => static function ($self, $stackPos) { + 395 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); }, - 395 => static function ($self, $stackPos) { + 396 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 396 => static function ($self, $stackPos) { + 397 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 397 => static function ($self, $stackPos) { - $self->semValue = null; - }, 398 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = null; }, 399 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 400 => static function ($self, $stackPos) { - $self->semValue = 0; + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 401 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 402 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 402 => null, 403 => null, - 404 => static function ($self, $stackPos) { + 404 => null, + 405 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 405 => static function ($self, $stackPos) { + 406 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 406 => static function ($self, $stackPos) { + 407 => static function ($self, $stackPos) { $self->semValue = array(); }, - 407 => null, 408 => null, - 409 => static function ($self, $stackPos) { + 409 => null, + 410 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 410 => static function ($self, $stackPos) { + 411 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 411 => static function ($self, $stackPos) { + 412 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 412 => static function ($self, $stackPos) { + 413 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 413 => static function ($self, $stackPos) { + 414 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 414 => null, 415 => null, - 416 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, + 416 => null, 417 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 418 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 419 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 420 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 421 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 422 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 423 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 424 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 425 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 426 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 438 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 439 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 440 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 441 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 442 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 450 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 452 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 463 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 464 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 465 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 466 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 467 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 475 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 476 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 477 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 478 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 479 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 479 => static function ($self, $stackPos) { + 480 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 480 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 481 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 483 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 483 => static function ($self, $stackPos) { + 484 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 484 => static function ($self, $stackPos) { + 485 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 485 => static function ($self, $stackPos) { + 486 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 486 => null, - 487 => static function ($self, $stackPos) { + 487 => null, + 488 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 488 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 489 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 490 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 503 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 505 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 506 => null, 507 => null, - 508 => static function ($self, $stackPos) { + 508 => null, + 509 => static function ($self, $stackPos) { $self->semValue = array(); }, - 509 => static function ($self, $stackPos) { + 510 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 510 => null, - 511 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, + 511 => null, 512 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 513 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 514 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 515 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 516 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2487,304 +2508,307 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 518 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 519 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 520 => null, - 521 => static function ($self, $stackPos) { + 520 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 521 => null, 522 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 523 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 524 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 525 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 525 => null, 526 => null, - 527 => static function ($self, $stackPos) { + 527 => null, + 528 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 528 => static function ($self, $stackPos) { + 529 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 529 => null, 530 => null, - 531 => static function ($self, $stackPos) { + 531 => null, + 532 => static function ($self, $stackPos) { $self->semValue = array(); }, - 532 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 533 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 534 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $self->semValue = array(); }, - 535 => null, - 536 => static function ($self, $stackPos) { + 536 => null, + 537 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 537 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 540 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 541 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 542 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 543 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 544 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 545 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 546 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 547 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 548 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 549 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 550 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 551 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 552 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 553 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 554 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 555 => static function ($self, $stackPos) { + 556 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 556 => null, 557 => null, 558 => null, - 559 => static function ($self, $stackPos) { + 559 => null, + 560 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 560 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 561 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 562 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = null; }, - 563 => null, 564 => null, - 565 => static function ($self, $stackPos) { + 565 => null, + 566 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 566 => null, 567 => null, 568 => null, 569 => null, 570 => null, 571 => null, - 572 => static function ($self, $stackPos) { + 572 => null, + 573 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 573 => null, 574 => null, 575 => null, - 576 => static function ($self, $stackPos) { + 576 => null, + 577 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 577 => null, - 578 => static function ($self, $stackPos) { + 578 => null, + 579 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 579 => static function ($self, $stackPos) { + 580 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 580 => static function ($self, $stackPos) { + 581 => static function ($self, $stackPos) { $self->semValue = null; }, - 581 => null, 582 => null, 583 => null, - 584 => static function ($self, $stackPos) { + 584 => null, + 585 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 585 => static function ($self, $stackPos) { + 586 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 586 => null, - 587 => static function ($self, $stackPos) { + 587 => null, + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 588 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 589 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 590 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 591 => static function ($self, $stackPos) { + 592 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 592 => null, - 593 => static function ($self, $stackPos) { + 593 => null, + 594 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 594 => static function ($self, $stackPos) { + 595 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 595 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 597 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 597 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 598 => null, - 599 => static function ($self, $stackPos) { + 599 => null, + 600 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 600 => null, 601 => null, - 602 => static function ($self, $stackPos) { + 602 => null, + 603 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 603 => null, - 604 => static function ($self, $stackPos) { + 604 => null, + 605 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 605 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 606 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 607 => null, - 608 => static function ($self, $stackPos) { + 608 => null, + 609 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 609 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 610 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 611 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 612 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 613 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 615 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 616 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 617 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 618 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 619 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 620 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 621 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 622 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 623 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 624 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 625 => null, - 626 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 625 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 626 => null, 627 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 628 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 629 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 630 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 631 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 632 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 633 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 634 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 635 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 636 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 636 => null, + 637 => null, ]; } } diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 667f21f5a0..cf643ee892 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -23,6 +23,7 @@ use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassConst; use PhpParser\Node\Stmt\ClassMethod; +use PhpParser\Node\Stmt\Const_; use PhpParser\Node\Stmt\Else_; use PhpParser\Node\Stmt\ElseIf_; use PhpParser\Node\Stmt\Enum_; @@ -1202,6 +1203,13 @@ protected function checkPropertyHookModifiers(int $a, int $b, int $modifierPos): } } + protected function checkConstantAttributes(Const_ $node): void { + if ($node->attrGroups !== [] && count($node->consts) > 1) { + $this->emitError(new Error( + 'Cannot use attributes on multiple constants at once', $node->getAttributes())); + } + } + /** * @param Property|Param $node */ diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index d802d442bd..f4ca36645d 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -878,7 +878,9 @@ protected function pStmt_Function(Stmt\Function_ $node): string { } protected function pStmt_Const(Stmt\Const_ $node): string { - return 'const ' . $this->pCommaSeparated($node->consts) . ';'; + return $this->pAttrGroups($node->attrGroups) + . 'const ' + . $this->pCommaSeparated($node->consts) . ';'; } protected function pStmt_Declare(Stmt\Declare_ $node): string { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index d32be24817..99ee4e9cbc 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -1634,6 +1634,7 @@ protected function initializeEmptyListInsertionMap(): void { Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], Expr\Closure::class . '->attrGroups' => [null, '', ' '], + Stmt\Const_::class . '->attrGroups' => [null, '', "\n"], PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], /* These cannot be empty to start with: diff --git a/test/PhpParser/NodeVisitor/NameResolverTest.php b/test/PhpParser/NodeVisitor/NameResolverTest.php index ff6caba483..a50a59525b 100644 --- a/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -245,6 +245,9 @@ function(A $a) : A {}; fn(A $a): A => $a; fn(?A $a): ?A => $a; +#[X] +const EXAMPLE = true; + A::b(); A::$b; A::B; @@ -338,6 +341,8 @@ function fn4(?array $a): ?array #[\NS\X] fn(array $a): array => $a; fn(\NS\A $a): \NS\A => $a; fn(?\NS\A $a): ?\NS\A => $a; +#[\NS\X] +const EXAMPLE = true; \NS\A::b(); \NS\A::$b; \NS\A::B; diff --git a/test/code/formatPreservation/constants.test b/test/code/formatPreservation/constants.test new file mode 100644 index 0000000000..78552d9ac0 --- /dev/null +++ b/test/code/formatPreservation/constants.test @@ -0,0 +1,50 @@ +Constants +----- +attrGroups[] = $attrGroup; +$stmts[1]->attrGroups[] = $attrGroup; +----- +attrGroups[0]->attrs[] = $attr; +$stmts[1]->attrGroups[0]->attrs[] = $attr; +----- + Date: Sat, 31 May 2025 10:24:38 +0200 Subject: [PATCH 409/428] Release PHP-Parser 5.5.0 --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b3bcc1a6f..51b8a14647 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +Version 5.5.0 (2025-05-31) +-------------------------- + +### Added + +* [8.5] Added support for attributes on constants. `Stmt\Const_` now has an `attrGroups` subnode. +* Added `weakReferences` option to `NodeConnectingVisitor` and `ParentConnectingVisitor`. This + will create the parent/next/prev references as WeakReferences, to avoid making the AST cyclic + and thus increasing GC pressure. + +### Changed + +* Attributes on parameters are now printed on separate lines if the pretty printer target version + is PHP 7.4 or older (which is the default). This allows them to be interpreted as comments, + instead of causing a parse error. Specify a target version of PHP 8.0 or newer to restore the + previous behavior. + Version 5.4.0 (2024-12-30) -------------------------- From acf8f5ef01f7f1efd68032ecced96f9118f1de55 Mon Sep 17 00:00:00 2001 From: Brian Henry Date: Sun, 1 Jun 2025 01:24:40 -0700 Subject: [PATCH 410/428] Minor spelling creatForHostVersion() -> createForHostVersion() (#1087) --- UPGRADE-5.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index 3460934f42..bbe1adae96 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -37,7 +37,7 @@ The `ParserFactory::create()` method has been removed in favor of three new meth * `createForHostVersion()`: Use this if you're parsing code for the PHP version you're running on. * `createForVersion()`: Use this if you know the PHP version of the code you want to parse. -The `createForNewestSupportedVersion()` and `creatForHostVersion()` are available since PHP-Parser 4.18.0, to allow libraries to support PHP-Parser 4 and 5 at the same time more easily. +The `createForNewestSupportedVersion()` and `createForHostVersion()` are available since PHP-Parser 4.18.0, to allow libraries to support PHP-Parser 4 and 5 at the same time more easily. In all cases, the PHP version is a fairly weak hint that is only used on a best-effort basis. The parser will usually accept code for newer versions if it does not have any backwards-compatibility implications. From 7fc3bcf97001c4a7aae5c355f0b03e7af54ca728 Mon Sep 17 00:00:00 2001 From: Brian Henry Date: Sun, 1 Jun 2025 01:25:00 -0700 Subject: [PATCH 411/428] Minor spelling `now longer` -> `no longer` (#1088) --- UPGRADE-5.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index bbe1adae96..cc323cad1e 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -308,7 +308,7 @@ PhpParser\Node\Stmt\Class_::VISIBILITY_MODIFIER_MASK -> PhpParser\Modifiers::VIS ### Changes to node constructors -Node constructor arguments accepting types now longer accept plain strings. Either an `Identifier` or `Name` (or `ComplexType`) should be passed instead. This affects the following constructor arguments: +Node constructor arguments accepting types no longer accept plain strings. Either an `Identifier` or `Name` (or `ComplexType`) should be passed instead. This affects the following constructor arguments: * The `'returnType'` key of `$subNodes` argument of `Node\Expr\ArrowFunction`. * The `'returnType'` key of `$subNodes` argument of `Node\Expr\Closure`. From 8ab65b4adc75172a8390bd9c0ade7e524f22b800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 23 Jun 2025 14:35:24 +0200 Subject: [PATCH 412/428] Support declaring functions with name clone (#1090) For use in stubs. see 9c7a3f8d8fa392fadb65dbb4cab29d90ded6ae9e see https://wiki.php.net/rfc/clone_with_v2 see php/php-src#18919 --- grammar/php.y | 1 + lib/PhpParser/Parser/Php7.php | 1707 ++++++++-------- lib/PhpParser/Parser/Php8.php | 1813 +++++++++-------- .../parser/stmt/function/clone_function.test | 58 + 4 files changed, 1830 insertions(+), 1749 deletions(-) create mode 100644 test/code/parser/stmt/function/clone_function.test diff --git a/grammar/php.y b/grammar/php.y index ec70451fe6..c33fa0b347 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -471,6 +471,7 @@ fn_identifier: identifier_not_reserved | T_READONLY { $$ = Node\Identifier[$1]; } | T_EXIT { $$ = Node\Identifier[$1]; } + | T_CLONE { $$ = Node\Identifier[$1]; } ; function_declaration_statement: diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 7371e8bb63..7c2bf4d593 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -164,8 +164,8 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 399; protected int $tokenToSymbolMapSize = 400; - protected int $actionTableSize = 1291; - protected int $gotoTableSize = 609; + protected int $actionTableSize = 1289; + protected int $gotoTableSize = 651; protected int $invalidSymbol = 172; protected int $errorSymbol = 1; @@ -395,14 +395,14 @@ class Php7 extends \PhpParser\ParserAbstract protected array $action = array( 128, 129, 130, 568, 131, 132, 948, 757, 758, 759, - 133, 38, 841, -85, 0, 1369,-32766,-32766,-32766, 488, - 832, 1126, 1127, 1128, 1122, 1121, 1120, 1129, 1123, 1124, - 1125,-32766,-32766,-32766, -333, 751, 750,-32766, 843,-32766, + 133, 38, 841, -85, 0, 1370,-32766,-32766,-32766, 488, + 832, 1127, 1128, 1129, 1123, 1122, 1121, 1130, 1124, 1125, + 1126,-32766,-32766,-32766, -334, 751, 750,-32766, 843,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, -372,-32766, -372, 1038, 760, 1126, 1127, 1128, 1122, - 1121, 1120, 1129, 1123, 1124, 1125, 382, 383, 442, 265, + -32767, -373,-32766, -373, 1039, 760, 1127, 1128, 1129, 1123, + 1122, 1121, 1130, 1124, 1125, 1126, 382, 383, 442, 265, 134, 385, 764, 765, 766, 767, 427, 837, 428, -85, - 330, 36, 248, 2, 292, 821, 768, 769, 770, 771, + 331, 36, 248, 2, 292, 821, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 797, 569, 798, 799, 800, 801, 789, 790, 347, 348, 792, 793, 778, 779, 780, 782, 783, 784, 358, 824, 825, 826, 827, 828, @@ -410,120 +410,119 @@ class Php7 extends \PhpParser\ParserAbstract 807, 808, 820, 804, 805,-32766,-32766, 573, 574, 803, 575, 576, 577, 578,-32766, 579, 580, 474, 475, 869, 238, 870, 806, 581, 582, 489, 135, 838, 128, 129, - 130, 568, 131, 132, 1071, 757, 758, 759, 133, 38, - -32766, 35, 731, 1031, 1030, 1029, 1035, 1032, 1033, 1034, + 130, 568, 131, 132, 1072, 757, 758, 759, 133, 38, + -32766, 35, 731, 1032, 1031, 1030, 1036, 1033, 1034, 1035, -32766,-32766,-32766,-32767,-32767,-32767,-32767, 101, 102, 103, - 104, 105, -333, 751, 750, 1047, 927,-32766,-32766,-32766, + 104, 105, -334, 751, 750, 1048, 927,-32766,-32766,-32766, 842,-32766, 840,-32766,-32766,-32766,-32766,-32766,-32766,-32766, -32766,-32766,-32766, 760,-32766,-32766,-32766, 614,-32766, 291, -32766,-32766,-32766,-32766,-32766, 136, 721, 265, 134, 385, - 764, 765, 766, 767, -616,-32766, 428,-32766,-32766,-32766, - -32766, -616, 145, 821, 768, 769, 770, 771, 772, 773, + 764, 765, 766, 767, -617,-32766, 428,-32766,-32766,-32766, + -32766, -617, 145, 821, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 797, 569, 798, 799, 800, 801, 789, 790, 347, 348, 792, 793, 778, 779, 780, 782, 783, 784, 358, 824, 825, 826, 827, 828, 570, 917, 428, -195, 785, 786, 571, 572, -194, 809, 807, 808, - 820, 804, 805, 1292, 251, 573, 574, 803, 575, 576, - 577, 578, -274, 579, 580, 1100, 82, 83, 84, 743, + 820, 804, 805, 1293, 251, 573, 574, 803, 575, 576, + 577, 578, -275, 579, 580, 1101, 82, 83, 84, 743, 806, 581, 582, 237, 148, 781, 752, 753, 754, 755, 756, 150, 757, 758, 759, 794, 795, 37, 24, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 1115, 276,-32766,-32766,-32766, 929, 1267, - 1266, 1268, 716, 834, 311, 394, 109, 7, 1101, -569, - 760,-32766,-32766,-32766, 841, 1354,-32766, 1099,-32766,-32766, - -32766, 1272, 1353, 313, 761, 762, 763, 764, 765, 766, - 767, 998,-32766, 830,-32766,-32766, 927, -616, 325, -616, + 106, 107, 108, 1116, 276,-32766,-32766,-32766, 929, 1268, + 1267, 1269, 716, 834, 311, 394, 109, 7, 1102, -570, + 760,-32766,-32766,-32766, 841, 1355,-32766, 1100,-32766,-32766, + -32766, 1273, 1354, 315, 761, 762, 763, 764, 765, 766, + 767, 999,-32766, 830,-32766,-32766, 927, -617, 327, -617, 821, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 797, 819, 798, 799, 800, 801, 789, 790, 791, 818, 792, 793, 778, 779, 780, 782, 783, 784, 823, - 824, 825, 826, 827, 828, 829, -569, -569, 343, 785, + 824, 825, 826, 827, 828, 829, -570, -570, 343, 785, 786, 787, 788, 836, 809, 807, 808, 820, 804, 805, 718, 564, 796, 802, 803, 810, 811, 813, 812, 140, - 814, 815, 841, 328, 344,-32766, -569, 806, 817, 816, + 814, 815, 841, 330, 344,-32766, -570, 806, 817, 816, 49, 50, 51, 520, 52, 53, 869, -110, 870, 917, - 54, 55, -110, 56, -110, -567,-32766,-32766,-32766, 307, - 1047, 126, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -613, 372, 106, 107, 108, 376, 276, - -613, 392, 1334,-32766, 291, 288, 1304, 446, 57, 58, - -32766, 109, 447, 999, 59, 47, 60, 245, 246, 61, + 54, 55, -110, 56, -110, -568,-32766,-32766,-32766, 307, + 1048, 126, -110, -110, -110, -110, -110, -110, -110, -110, + -110, -110, -110, -614, 372, 106, 107, 108, 376, 276, + -614, 392, 1335,-32766, 291, 288, 1305, 446, 57, 58, + -32766, 109, 447, 1000, 59, 47, 60, 245, 246, 61, 62, 63, 64, 65, 66, 67, 68,-32766, 28, 267, - 69, 444, 521, 448, -347, 74, 1298, 1299, 522, 449, - 841, 328, -567, -567, 1296, 42, 20, 523, 929, 524, - 927, 525, 716, 526, -565, 696, 527, 528, -567, 927, + 69, 444, 521, 448, -348, 74, 1299, 1300, 522, 449, + 841, 330, -568, -568, 1297, 42, 20, 523, 929, 524, + 927, 525, 716, 526, -566, 696, 527, 528, -568, 927, 847, 44, 45, 450, 379, 378, -78, 46, 529, 927, - -573,-32766, -567, 370, 342, 1350, 103, 104, 105, -564, - 1258, 927, 301, 302, 1044, 531, 532, 533, -607, 722, - -607, 697, 464, 465, 466, 151, 1047, 535, 536, 723, - 1284, 1285, 1286, 1287, 1289, 1281, 1282, 299, -58, 1047, - 153, 726, 125, 1288, 1283, 698, 699, 1267, 1266, 1268, - 300, -565, -565, 70, -154, -154, -154, 323, 324, 328, - -57, -4, 927, 917, 1267, 1266, 1268, -565, -87, -154, - 284, -154, 917, -154, 154, -154, -564, -564, 155, -572, - 157, -565, 917, 33, 832, 377, -613, 123, -613, 751, - 750, 124, -564, 137, 917, 289, 967, 968, 81, 751, - 750, 530, 328, 138, -571, 620, -564, 663, 21, 903, - 963, -110, -110, -110, 32, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 144, -566, - 382, 383, 28, 268, 1379, 158, 927, 1380, 967, 968, - 427, 159, 929, 969, 841, 917, 716, -154, 1296, 951, - 160, 929, 963, 384, 383, 716, 832, 1174, 1176, 682, - 683, 984, 1044, 427, 161, 716, 733, 377, -563, 440, - 1070, 141, 162, 929, 298, 328, -84, 716, 967, 968, - 149, 410, -307, 530, 1258, -78, 300, 1047, 751, 750, - -73, 534, 963, -110, -110, -110, -566, -566, 950, 288, - 1272, 535, 536, -72, 1284, 1285, 1286, 1287, 1289, 1281, - 1282, 284, -566, 380, 381, 11, 1265, 1288, 1283, 917, - -71, 751, 750, -70, 929,-32766, -566, 72, 716, -4, - -16, 1265, 324, 328, -69, -563, -563, 292,-32766,-32766, - -32766, -68,-32766, -67,-32766, -66,-32766, 386, 387,-32766, - -65, -563, 1263, -46,-32766,-32766,-32766, -18,-32766, 142, - -32766,-32766, 275, 285, 1265, -563,-32766, 424, 28, 267, - 732,-32766,-32766,-32766, 735,-32766, 1046,-32766,-32766,-32766, - 841, 841,-32766, 926, 1296, 1044, 147,-32766,-32766,-32766, - 654, 655, -303,-32766,-32766, 1267, 1266, 1268, 929,-32766, + -574,-32766, -568, 370, 342, 1351, 103, 104, 105, -565, + 1259, 927, 301, 302, 1045, 531, 532, 533, -608, 722, + -608, 697, 464, 465, 466, 151, 1048, 535, 536, 723, + 1285, 1286, 1287, 1288, 1290, 1282, 1283, 299, -58, 1048, + 153, 726, 125, 1289, 1284, 698, 699, 1268, 1267, 1269, + 300, -566, -566, 70, -154, -154, -154, 325, 326, 330, + -57, -4, 927, 917, 1268, 1267, 1269, -566, -87, -154, + 284, -154, 917, -154, 154, -154, -565, -565, 155, -573, + 157, -566, 917, 33, 832, 377, -614, 123, -614, 751, + 750, 124, -565, 137, 917, 289, 968, 969, 81, 751, + 750, 530, 330, 138, -572, 620, -565, 663, 21, 903, + 964, -110, -110, -110, 32, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 144, -567, + 382, 383, 28, 268, 1380, 158, 927, 1381, 968, 969, + 427, 159, 929, 970, 841, 917, 716, -154, 1297, 384, + 383, 929, 964, 682, 683, 716, 160, 1175, 1177, 427, + 161, 985, 1045, 380, 381, 716, 733, 377, -564, 440, + 1071, 141, 162, 929, 298, 330, -84, 716, 968, 969, + 149, 410, -308, 530, 1259, -78, 300, 1048, 751, 750, + -73, 534, 964, -110, -110, -110, -567, -567, -72, 288, + 1273, 535, 536, -71, 1285, 1286, 1287, 1288, 1290, 1282, + 1283, 284, -567, 386, 387, 11, 1266, 1289, 1284, 917, + -70, 751, 750, -69, 929,-32766, -567, 72, 716, -4, + -16, 1266, 326, 330, -68, -564, -564, 292,-32766,-32766, + -32766, -67,-32766, -66,-32766, -65,-32766, -46, -18,-32766, + 142, -564, 1264, 275,-32766,-32766,-32766, 285,-32766, 732, + -32766,-32766, 952, 951, 1266, -564,-32766, 424, 28, 267, + 832,-32766,-32766,-32766, 735,-32766, 1047,-32766,-32766,-32766, + 841, 841,-32766, 926, 1297, 1045, 147,-32766,-32766,-32766, + 654, 655, -304,-32766,-32766, 1268, 1267, 1269, 929,-32766, 424, 280, 716, 28, 268, 281, 286, 287, 336, 73, - 1047,-32766, 290, 293, 294, 841, -110, -110, -563, 1296, - 1258, -110, 944,-32766, 276, 109, 692, 832, 146, 1381, - -110, 707, 841, 585, 284, 1133, 685, 709, 536,-32766, - 1284, 1285, 1286, 1287, 1289, 1281, 1282,-32766, 1047, 664, - -50, 10, 308, 1288, 1283, 1258, 669, 306, 471, 305, - 499, 300, 312, 72, 74, 670, 964, 1303, 324, 328, - 328, -529, 291, 536, 686, 1284, 1285, 1286, 1287, 1289, - 1281, 1282, 652, 139, 1305, -563, -563, 591, 1288, 1283, - -519, 300, 34,-32766, 8, 840, 0, 618, 72, 1265, - 0, -563, 0, 324, 328, 0,-32766,-32766,-32766, 0, - -32766, 0,-32766, 0,-32766, -563, 0,-32766,-32766, 0, - 0, 27,-32766,-32766,-32766, 927,-32766, 40,-32766,-32766, - 0, 0, 1265, 374,-32766, 424, 0, 946, 0,-32766, - -32766,-32766, 0,-32766, 41,-32766,-32766,-32766, 927, 740, - -32766, 741, 860, 908, 1008,-32766,-32766,-32766, 985,-32766, - 992,-32766,-32766, 982, 993, 1265, 906,-32766, 424, 48, - 980, 1104,-32766,-32766,-32766, 1107,-32766, 1108,-32766,-32766, - -32766, 1105, -601,-32766, 1106, 1112, -277, 494,-32766,-32766, - -32766, 1293,-32766, 852,-32766,-32766, 1320, 1338, 1265, 598, - -32766, 424, 1372, 657, 1272,-32766,-32766,-32766, 917,-32766, - -600,-32766,-32766,-32766, -599, -573,-32766, -275, -572, -571, - -570,-32766,-32766,-32766, -252, -252, -252,-32766,-32766, -513, - 377, 917, 1,-32766, 424, 29, 303, 304, 30, 39, - 43, 967, 968, 71, 75,-32766, 530, -251, -251, -251, - -274, 76, 375, 377, 903, 963, -110, -110, -110, 77, - 78, 79, 80, 143, 967, 968, 127, 152, 156, 530, - 243, 332, 359, 360, 361, 362, 363, 903, 963, -110, - -110, -110,-32766, 13, 364, 841, 365, 929, 1265, 14, - 366, 716, -252, 367, 368,-32766,-32766,-32766, 369,-32766, - 371,-32766, 441,-32766, 563, 322,-32766, 15, 16, 18, - 929,-32766,-32766,-32766, 716, -251, 408,-32766,-32766, 490, - -110, -110, 491,-32766, 424, -110, 498, 501, 502, 503, - 504, 508, 509, 510, -110,-32766, 518, 596, 702, 1073, - 1214, 1294, 1072,-32766, 1053, 1253, 1049, -279, -102, 12, - 17, 22, 297, 407, 610, 615, 643, 708, 1218, 1271, - 1215, 1351, 0, 373, 717, 300, 720, 724, 74, 725, - 1231, 727, 728, 729, 328, 409, 730, 734, 719, 0, - 413, 737, 904, 1376, 1378, 863, 862, 957, 1000, 1377, - 956, 954, 955, 958, 1246, 937, 947, 935, 990, 991, - 641, 1375, 1332, 1321, 1339, 1348, 0, 0, 1297, 0, - 328 + 1048,-32766, 950, 290, 293, 841, -110, -110, -564, 1297, + 1259, -110, 294,-32766, 944, 276, 146, 109, 692, 832, + -110,-32766, 841, 707, 284, 664, 1134, 669, 536,-32766, + 1285, 1286, 1287, 1288, 1290, 1282, 1283, 1382, 1048, 585, + -50, 709, 652, 1289, 1284, 1259, 685, 306, 10, 305, + 471, 300, 499, 72, 74, 965, 314, 670, 326, 330, + 330, -530, 291, 536, 686, 1285, 1286, 1287, 1288, 1290, + 1282, 1283,-32766, 139, 591, -564, -564, 1304, 1289, 1284, + 1306, -520, 308,-32766, 946, 40, -278, 8, 72, 1266, + 27, -564, 34, 326, 330, 0,-32766,-32766,-32766, 0, + -32766, 0,-32766, 0,-32766, -564, 0,-32766, 0, 0, + 0, 0,-32766,-32766,-32766, 927,-32766, 0,-32766,-32766, + 0, 300, 1266, 374,-32766, 424, 618, 0, 41,-32766, + -32766,-32766, 840,-32766, 740,-32766,-32766,-32766, 927, -602, + -32766, 741, 860, 908, 1009,-32766,-32766,-32766, 986,-32766, + 993,-32766,-32766, 983, 994, 1266, 906,-32766, 424, 48, + 981, 1105,-32766,-32766,-32766, 1108,-32766, 1109,-32766,-32766, + -32766, 1106, -601,-32766, 1107, 1113, -276, 494,-32766,-32766, + -32766, 1294,-32766, 852,-32766,-32766, 1321, 1339, 1266, 598, + -32766, 424, 1373, 657, 1273,-32766,-32766,-32766, 917,-32766, + -600,-32766,-32766,-32766, -574, -573,-32766, -275, -572, -571, + -514,-32766,-32766,-32766, -253, -253, -253,-32766,-32766, 1, + 377, 917, 29,-32766, 424, 30, 303, 304, 39, 43, + 71, 968, 969, 75, 76,-32766, 530, -252, -252, -252, + 13, 77, 375, 377, 903, 964, -110, -110, -110, 78, + 79, 80, 143, 152, 968, 969, 127, 156, 243, 530, + 332, 359, 360, 361, 362, 363, 364, 903, 964, -110, + -110, -110,-32766, 14, 365, 841, 366, 929, 1266, 15, + 367, 716, -253, 368, 369,-32766,-32766,-32766, 371,-32766, + 441,-32766, 563,-32766, 16, 18,-32766, 408, 490, 491, + 929,-32766,-32766,-32766, 716, -252, 498,-32766,-32766, 501, + -110, -110, 502,-32766, 424, -110, 503, 504, 508, 509, + 510, 518, 596, 702, -110,-32766, 1074, 1215, 1295, 1073, + 1054, 1254, 1050,-32766, -280, -102, 12, 17, 22, 297, + 407, 610, 615, 643, 708, 1219, 1272, 1216, 1352, 0, + 324, 373, 717, 720, 724, 300, 725, 727, 74, 728, + 1232, 729, 730, 734, 330, 409, 719, 0, 413, 737, + 904, 1377, 1379, 863, 862, 958, 1001, 1378, 957, 955, + 956, 959, 1247, 937, 947, 935, 991, 992, 641, 1376, + 1333, 1322, 1340, 1349, 0, 0, 1298, 0, 330 ); protected array $actionCheck = array( @@ -599,37 +598,37 @@ class Php7 extends \PhpParser\ParserAbstract 131, 132, 133, 134, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 16, 70, 106, 107, 70, 71, 80, 16, 1, 83, 117, 118, - 116, 16, 163, 122, 82, 84, 167, 168, 86, 73, - 16, 163, 131, 106, 107, 167, 80, 59, 60, 75, - 76, 163, 116, 116, 16, 167, 31, 106, 70, 108, + 116, 16, 163, 122, 82, 84, 167, 168, 86, 106, + 107, 163, 131, 75, 76, 167, 16, 59, 60, 116, + 16, 163, 116, 106, 107, 167, 31, 106, 70, 108, 1, 167, 16, 163, 113, 171, 31, 167, 117, 118, 101, 102, 35, 122, 122, 31, 162, 141, 37, 38, - 31, 130, 131, 132, 133, 134, 137, 138, 122, 30, + 31, 130, 131, 132, 133, 134, 137, 138, 31, 30, 1, 139, 140, 31, 142, 143, 144, 145, 146, 147, 148, 165, 153, 106, 107, 154, 80, 155, 156, 84, 31, 37, 38, 31, 163, 74, 167, 165, 167, 168, 31, 80, 170, 171, 31, 137, 138, 30, 87, 88, - 89, 31, 91, 31, 93, 31, 95, 106, 107, 98, + 89, 31, 91, 31, 93, 31, 95, 31, 31, 98, 31, 153, 116, 31, 103, 104, 105, 31, 74, 31, - 109, 110, 31, 31, 80, 167, 115, 116, 70, 71, - 31, 87, 88, 89, 31, 91, 140, 93, 127, 95, + 109, 110, 72, 73, 80, 167, 115, 116, 70, 71, + 80, 87, 88, 89, 31, 91, 140, 93, 127, 95, 82, 82, 98, 31, 86, 116, 31, 103, 104, 105, 111, 112, 35, 109, 110, 159, 160, 161, 163, 115, 116, 35, 167, 70, 71, 35, 35, 35, 35, 158, - 141, 127, 37, 37, 37, 82, 117, 118, 70, 86, - 122, 122, 38, 116, 57, 69, 77, 80, 70, 83, - 131, 80, 82, 89, 165, 82, 94, 92, 140, 140, - 142, 143, 144, 145, 146, 147, 148, 85, 141, 90, - 31, 97, 114, 155, 156, 122, 96, 136, 97, 135, - 97, 162, 135, 165, 165, 100, 131, 150, 170, 171, + 141, 127, 122, 37, 37, 82, 117, 118, 70, 86, + 122, 122, 37, 116, 38, 57, 70, 69, 77, 80, + 131, 85, 82, 80, 165, 90, 82, 96, 140, 140, + 142, 143, 144, 145, 146, 147, 148, 83, 141, 89, + 31, 92, 113, 155, 156, 122, 94, 136, 97, 135, + 97, 162, 97, 165, 165, 131, 135, 100, 170, 171, 171, 153, 165, 140, 100, 142, 143, 144, 145, 146, - 147, 148, 113, 31, 150, 137, 138, 157, 155, 156, - 153, 162, 167, 74, 153, 159, -1, 157, 165, 80, - -1, 153, -1, 170, 171, -1, 87, 88, 89, -1, - 91, -1, 93, -1, 95, 167, -1, 98, 140, -1, - -1, 153, 103, 104, 105, 1, 74, 163, 109, 110, - -1, -1, 80, 153, 115, 116, -1, 158, -1, 87, - 88, 89, -1, 91, 163, 93, 127, 95, 1, 163, + 147, 148, 140, 31, 157, 137, 138, 150, 155, 156, + 150, 153, 114, 74, 158, 163, 166, 153, 165, 80, + 153, 153, 167, 170, 171, -1, 87, 88, 89, -1, + 91, -1, 93, -1, 95, 167, -1, 98, -1, -1, + -1, -1, 103, 104, 105, 1, 74, -1, 109, 110, + -1, 162, 80, 153, 115, 116, 157, -1, 163, 87, + 88, 89, 159, 91, 163, 93, 127, 95, 1, 165, 98, 163, 163, 163, 163, 103, 104, 105, 163, 74, 163, 109, 110, 163, 163, 80, 163, 115, 116, 70, 163, 163, 87, 88, 89, 163, 91, 163, 93, 127, @@ -645,24 +644,23 @@ class Php7 extends \PhpParser\ParserAbstract 165, 165, 165, 165, 165, 165, 165, 130, 131, 132, 133, 134, 74, 166, 165, 82, 165, 163, 80, 166, 165, 167, 168, 165, 165, 87, 88, 89, 165, 91, - 165, 93, 165, 95, 165, 167, 98, 166, 166, 166, + 165, 93, 165, 95, 166, 166, 98, 166, 166, 166, 163, 103, 104, 105, 167, 168, 166, 109, 110, 166, 117, 118, 166, 115, 116, 122, 166, 166, 166, 166, 166, 166, 166, 166, 131, 127, 166, 166, 166, 166, 166, 166, 166, 140, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, -1, 167, 167, 162, 167, 167, 165, 167, - 169, 167, 167, 167, 171, 168, 167, 167, 167, -1, + 166, 166, 166, 166, 166, 166, 166, 166, 166, -1, + 167, 167, 167, 167, 167, 162, 167, 167, 165, 167, + 169, 167, 167, 167, 171, 168, 167, -1, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, -1, -1, 170, -1, - 171 + 168, 168, 168, 168, -1, -1, 170, -1, 171 ); protected array $actionBase = array( 0, -2, 156, 559, 641, 1004, 1027, 485, 292, 200, -60, 283, 568, 590, 590, 715, 590, 195, 578, 901, - 395, 395, 395, 831, 313, 313, 831, 313, 731, 731, + 395, 395, 395, 833, 313, 313, 833, 313, 731, 731, 731, 731, 764, 764, 965, 965, 998, 932, 899, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, @@ -676,9 +674,9 @@ class Php7 extends \PhpParser\ParserAbstract 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 37, 360, 216, 649, 1066, 1072, 1068, - 1073, 1064, 1063, 1067, 1069, 1074, 1113, 1114, 835, 1115, - 1116, 1112, 1117, 1070, 919, 1065, 1071, 297, 297, 297, + 1088, 1088, 1088, 37, 360, 216, 649, 1063, 1069, 1065, + 1070, 1061, 1060, 1064, 1066, 1071, 1111, 1112, 835, 1113, + 1114, 1110, 1115, 1067, 919, 1062, 1068, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 135, 477, 126, 201, 201, 201, @@ -690,48 +688,48 @@ class Php7 extends \PhpParser\ParserAbstract 139, 139, 139, 227, -55, 749, 380, -40, 787, 604, 626, 626, 536, 536, 478, 478, 349, 349, 478, 478, 478, 465, 465, 465, 465, 415, 494, 519, 43, 366, - 858, 584, 584, 584, 584, 858, 858, 858, 858, 814, - 1118, 858, 858, 858, 639, 828, 828, 979, 452, 452, - 452, 828, 370, -70, -70, 370, 601, -70, 511, 987, - 634, 999, 397, 815, 627, 434, 397, 299, 455, 502, - 233, 816, 687, 816, 1062, 842, 842, 802, 739, 902, - 1091, 1075, 845, 1110, 854, 1111, 470, 10, 734, 1061, - 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, - 1119, 632, 1062, -3, 1119, 1119, 1119, 632, 632, 632, - 632, 632, 632, 632, 632, 806, 632, 632, 759, -3, - 612, 664, -3, 853, 632, 817, 37, 37, 37, 37, + 822, 584, 584, 584, 584, 822, 822, 822, 822, 820, + 1116, 822, 986, 991, 822, 822, 639, 828, 828, 979, + 452, 452, 452, 828, 370, -70, -70, 370, 601, -70, + 511, 634, 397, 814, 623, 434, 397, 299, 455, 502, + 233, 863, 637, 863, 1059, 826, 826, 796, 739, 902, + 1089, 1072, 847, 1108, 854, 1109, 470, 10, 734, 1058, + 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1058, + 1117, 632, 1059, -3, 1117, 1117, 1117, 632, 632, 632, + 632, 632, 632, 632, 632, 797, 632, 632, 759, -3, + 612, 658, -3, 853, 632, 818, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, -12, 37, 37, 360, 5, 5, 37, 142, 53, 5, 5, 5, 5, - 37, 37, 37, 37, 687, 847, 810, 721, -18, 820, - 120, 847, 847, 847, 26, 136, 115, 727, 837, 259, - 827, 827, 827, 833, 947, 947, 827, 830, 827, 833, - 827, 827, 947, 947, 809, 947, 217, 509, 430, 500, - 514, 947, 356, 827, 827, 827, 827, 807, 947, 75, - 535, 827, 286, 234, 827, 827, 807, 804, 812, 801, - 947, 947, 947, 807, 496, 801, 801, 801, 866, 868, - 849, 811, 390, 375, 562, 163, 864, 811, 811, 827, - 503, 849, 811, 849, 811, 859, 811, 811, 811, 849, - 811, 830, 456, 811, 699, 705, 541, 113, 811, 14, - 958, 959, 617, 966, 954, 974, 1017, 975, 976, 1077, - 944, 985, 955, 977, 1019, 953, 950, 832, 651, 655, - 821, 798, 935, 836, 836, 836, 930, 933, 836, 836, - 836, 836, 836, 836, 836, 836, 651, 907, 860, 824, - 988, 657, 667, 1051, 797, 1094, 1081, 987, 958, 976, - 725, 955, 977, 953, 950, 799, 794, 790, 792, 783, - 772, 752, 769, 808, 1053, 978, 844, 692, 1023, 989, - 1093, 1018, 990, 991, 1030, 1054, 869, 1055, 1095, 838, - 1096, 1097, 909, 1001, 1079, 836, 929, 897, 912, 999, - 934, 651, 913, 1056, 997, 805, 1033, 1036, 1076, 841, - 826, 918, 1098, 1005, 1008, 1009, 1080, 1082, 861, 1003, - 900, 1040, 843, 1087, 1041, 1042, 1043, 1044, 1084, 1099, - 1085, 925, 1086, 870, 839, 931, 840, 1100, 307, 851, - 852, 857, 1015, 591, 986, 1089, 1092, 1101, 1045, 1046, - 1047, 1102, 1103, 982, 871, 1021, 822, 1022, 964, 875, - 877, 606, 856, 1058, 846, 850, 855, 640, 644, 1104, - 1105, 1106, 983, 819, 829, 880, 881, 1059, 638, 1060, - 1107, 646, 883, 1108, 1052, 714, 728, 560, 624, 602, - 736, 825, 1090, 848, 818, 834, 1013, 728, 823, 887, - 1109, 888, 892, 894, 1050, 898, 0, 0, 0, 0, + 37, 37, 37, 37, 637, 848, 807, 687, -18, 859, + 120, 848, 848, 848, 26, 136, 115, 727, 837, 259, + 829, 829, 829, 834, 944, 944, 829, 830, 829, 834, + 829, 829, 944, 944, 849, 944, 217, 509, 430, 500, + 514, 944, 356, 829, 829, 829, 829, 811, 944, 75, + 535, 829, 286, 234, 829, 829, 811, 804, 806, 801, + 944, 944, 944, 811, 496, 801, 801, 801, 861, 868, + 819, 802, 390, 375, 562, 163, 866, 802, 802, 829, + 503, 819, 802, 819, 802, 816, 802, 802, 802, 819, + 802, 830, 456, 802, 699, 705, 541, 113, 802, 14, + 955, 958, 617, 959, 953, 966, 1015, 974, 975, 1075, + 935, 983, 954, 976, 1017, 950, 947, 832, 651, 655, + 824, 798, 934, 838, 838, 838, 929, 930, 838, 838, + 838, 838, 838, 838, 838, 838, 651, 907, 860, 840, + 987, 657, 667, 1046, 817, 1092, 1081, 986, 955, 975, + 725, 954, 976, 950, 947, 794, 792, 783, 790, 772, + 769, 747, 752, 799, 1050, 977, 812, 692, 1019, 988, + 1091, 1073, 989, 990, 1021, 1051, 869, 1052, 1093, 836, + 1094, 1095, 909, 999, 1076, 838, 925, 864, 912, 991, + 933, 651, 913, 1053, 964, 815, 1022, 1023, 1074, 843, + 844, 918, 1096, 1001, 1005, 1008, 1077, 1079, 855, 997, + 810, 1030, 845, 1087, 1033, 1036, 1040, 1041, 1080, 1097, + 1082, 897, 1084, 870, 825, 900, 821, 1098, 307, 851, + 852, 865, 1013, 591, 985, 1085, 1090, 1099, 1042, 1043, + 1044, 1100, 1101, 978, 871, 1003, 842, 1018, 931, 875, + 877, 606, 857, 1054, 846, 850, 856, 640, 644, 1102, + 1103, 1104, 982, 808, 831, 880, 881, 1055, 638, 1056, + 1105, 646, 883, 1106, 1047, 720, 724, 560, 624, 602, + 736, 839, 1086, 827, 858, 841, 1009, 724, 823, 887, + 1107, 888, 892, 894, 1045, 898, 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, 468, 468, 468, 468, @@ -760,34 +758,34 @@ class Php7 extends \PhpParser\ParserAbstract 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 716, 716, 297, 297, 297, 297, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 297, 297, - 0, 297, 297, 297, 297, 297, 297, 297, 297, 809, + 0, 297, 297, 297, 297, 297, 297, 297, 297, 849, 716, 716, 716, 716, 452, 452, 452, 452, -95, -95, 716, 716, 601, 716, 601, 716, 716, 452, 452, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 0, 0, 0, -3, -70, 716, 830, 830, 830, 830, - 716, 716, 716, 716, -70, -70, 716, 716, 716, 0, - 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, - -3, 0, 0, 830, 656, 830, 656, 716, 601, 809, + 716, 716, 716, 716, -70, -70, 716, 770, 770, 716, + 716, 0, 0, 0, 0, 0, 0, 0, 0, -3, + 0, 0, -3, 0, 0, 830, 830, 716, 601, 849, 374, 716, 0, 0, 0, 0, -3, 830, -3, 632, -70, -70, 632, 632, 5, 37, 374, 659, 659, 659, - 659, 0, 0, 687, 809, 809, 809, 809, 809, 809, - 809, 809, 809, 809, 809, 830, 0, 809, 0, 830, + 659, 0, 0, 637, 849, 849, 849, 849, 849, 849, + 849, 849, 849, 849, 849, 830, 0, 849, 0, 830, 830, 830, 0, 0, 0, 0, 0, 0, 0, 0, - 947, 0, 0, 0, 0, 0, 0, 0, 830, 0, - 947, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 944, 0, 0, 0, 0, 0, 0, 0, 830, 0, + 944, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 830, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 836, 841, 0, 0, 841, 0, 836, 836, 836, 0, - 0, 0, 856, 638 + 838, 843, 0, 0, 843, 0, 838, 838, 838, 0, + 0, 0, 857, 638 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 619, 619, - 619, 619,32767,32767, 256, 102,32767,32767, 488, 405, - 405, 405,32767,32767, 561, 561, 561, 561, 561,32767, - 32767,32767,32767,32767,32767, 488,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 620, 620, + 620, 620,32767,32767, 257, 102,32767,32767, 489, 406, + 406, 406,32767,32767, 562, 562, 562, 562, 562,32767, + 32767,32767,32767,32767,32767, 489,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, @@ -795,138 +793,143 @@ class Php7 extends \PhpParser\ParserAbstract 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, 36, 7, - 8, 10, 11, 49, 17, 329, 100,32767,32767,32767, + 8, 10, 11, 49, 17, 330, 100,32767,32767,32767, 32767,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 612,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 613,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 393, 492, 471, - 472, 474, 475, 404, 562, 618, 332, 615, 334, 403, - 146, 344, 335, 244, 260, 493, 261, 494, 497, 498, - 217, 390, 150, 151, 435, 489, 437, 487, 491, 436, - 410, 416, 417, 418, 419, 420, 421, 422, 423, 424, - 425, 426, 427, 428, 408, 409, 490,32767,32767, 468, - 467, 466, 433,32767,32767,32767,32767,32767,32767,32767, - 32767, 102,32767, 434, 438, 407, 441, 439, 440, 457, - 458, 455, 456, 459,32767,32767, 321,32767,32767, 460, - 461, 462, 463, 371, 369,32767,32767, 111, 321, 111, - 32767,32767, 448, 449,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 505, 555, 465,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 394, 493, 472, + 473, 475, 476, 405, 563, 619, 333, 616, 335, 404, + 146, 345, 336, 245, 261, 494, 262, 495, 498, 499, + 218, 391, 150, 151, 436, 490, 438, 488, 492, 437, + 411, 417, 418, 419, 420, 421, 422, 423, 424, 425, + 426, 427, 428, 429, 409, 410, 491,32767,32767, 469, + 468, 467, 434,32767,32767,32767,32767,32767,32767,32767, + 32767, 102,32767, 435, 439, 408, 442, 440, 441, 458, + 459, 456, 457, 460,32767,32767, 322,32767,32767, 461, + 462, 463, 464, 372, 370,32767,32767, 111, 322, 111, + 32767,32767, 449, 450,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 506, 556, 466,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 102,32767, 100, 557, 430, 432, 525, 443, 444, - 442, 411,32767, 530,32767, 102,32767, 532,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 556,32767, 563, - 563,32767, 518, 100, 196,32767, 531, 196, 196,32767, - 32767,32767,32767,32767,32767,32767,32767, 626, 518, 110, + 32767, 102,32767,32767,32767, 100, 558, 431, 433, 526, + 444, 445, 443, 412,32767, 531,32767, 102,32767, 533, + 32767,32767,32767,32767,32767,32767,32767, 557,32767, 564, + 564,32767, 519, 100, 196,32767, 532, 196, 196,32767, + 32767,32767,32767,32767,32767,32767,32767, 627, 519, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 32767, 196, 110,32767,32767,32767, 100, 196, 196, 196, - 196, 196, 196, 196, 196, 533, 196, 196, 191,32767, - 270, 272, 102, 580, 196, 535,32767,32767,32767,32767, + 196, 196, 196, 196, 196, 534, 196, 196, 191,32767, + 271, 273, 102, 581, 196, 536,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, 518, 453, 139,32767, 520, 139, - 563, 445, 446, 447, 563, 563, 563, 317, 294,32767, - 32767,32767,32767,32767, 533, 533, 100, 100, 100, 100, - 32767,32767,32767,32767, 111, 504, 99, 99, 99, 99, - 99, 103, 101,32767,32767,32767,32767, 225,32767, 101, - 99,32767, 101, 101,32767,32767, 225, 227, 214, 229, - 32767, 584, 585, 225, 101, 229, 229, 229, 249, 249, - 507, 323, 101, 99, 101, 101, 198, 323, 323,32767, - 101, 507, 323, 507, 323, 200, 323, 323, 323, 507, - 323,32767, 101, 323, 216, 393, 99, 99, 323,32767, - 32767,32767, 520,32767,32767,32767,32767,32767,32767,32767, - 224,32767,32767,32767,32767,32767,32767,32767,32767, 550, - 32767, 568, 582, 451, 452, 454, 567, 565, 476, 477, - 478, 479, 480, 481, 482, 484, 614,32767, 524,32767, - 32767,32767, 343,32767, 624,32767,32767,32767, 9, 74, - 513, 42, 43, 51, 57, 539, 540, 541, 542, 536, - 537, 543, 538,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 625,32767, - 563,32767,32767,32767,32767, 450, 545, 590,32767,32767, - 564, 617,32767,32767,32767,32767,32767,32767,32767, 139, + 32767,32767,32767,32767, 519, 454, 139,32767, 521, 139, + 564, 446, 447, 448, 564, 564, 564, 318, 295,32767, + 32767,32767,32767,32767, 534, 534, 100, 100, 100, 100, + 32767,32767,32767,32767, 111, 505, 99, 99, 99, 99, + 99, 103, 101,32767,32767,32767,32767, 226,32767, 101, + 99,32767, 101, 101,32767,32767, 226, 228, 215, 230, + 32767, 585, 586, 226, 101, 230, 230, 230, 250, 250, + 508, 324, 101, 99, 101, 101, 198, 324, 324,32767, + 101, 508, 324, 508, 324, 200, 324, 324, 324, 508, + 324,32767, 101, 324, 217, 394, 99, 99, 324,32767, + 32767,32767, 521,32767,32767,32767,32767,32767,32767,32767, + 225,32767,32767,32767,32767,32767,32767,32767,32767, 551, + 32767, 569, 583, 452, 453, 455, 568, 566, 477, 478, + 479, 480, 481, 482, 483, 485, 615,32767, 525,32767, + 32767,32767, 344,32767, 625,32767,32767,32767, 9, 74, + 514, 42, 43, 51, 57, 540, 541, 542, 543, 537, + 538, 544, 539,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 626,32767, + 564,32767,32767,32767,32767, 451, 546, 591,32767,32767, + 565, 618,32767,32767,32767,32767,32767,32767,32767, 139, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 550,32767, 137,32767,32767,32767,32767,32767,32767,32767, - 32767, 546,32767,32767,32767, 563,32767,32767,32767,32767, - 319, 316,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 563,32767, - 32767,32767,32767,32767, 296,32767, 313,32767,32767,32767, + 551,32767, 137,32767,32767,32767,32767,32767,32767,32767, + 32767, 547,32767,32767,32767, 564,32767,32767,32767,32767, + 320, 317,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 564,32767, + 32767,32767,32767,32767, 297,32767, 314,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 389, 520, 299, 301, 302, - 32767,32767,32767,32767, 365,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 390, 521, 300, 302, 303, + 32767,32767,32767,32767, 366,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767, 153, 153, 3, 3, - 346, 153, 153, 153, 346, 346, 153, 346, 346, 346, - 153, 153, 153, 153, 153, 153, 282, 186, 264, 267, - 249, 249, 153, 357, 153 + 347, 153, 153, 153, 347, 347, 153, 347, 347, 347, + 153, 153, 153, 153, 153, 153, 283, 186, 265, 268, + 250, 250, 153, 358, 153 ); protected array $goto = array( - 196, 196, 1045, 1076, 703, 468, 590, 473, 473, 858, - 739, 644, 646, 1209, 859, 666, 473, 833, 712, 690, - 693, 1018, 701, 710, 1014, 423, 353, 166, 166, 166, + 196, 196, 1046, 920, 703, 921, 661, 662, 590, 679, + 680, 681, 739, 644, 646, 1077, 429, 666, 619, 858, + 712, 690, 693, 1019, 701, 710, 1015, 166, 166, 166, 166, 220, 197, 193, 193, 176, 178, 215, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 188, 189, 190, 191, 192, 217, 215, 218, 543, 544, 425, 545, - 548, 549, 550, 551, 552, 553, 554, 555, 1160, 167, + 548, 549, 550, 551, 552, 553, 554, 555, 1161, 167, 168, 169, 195, 170, 171, 172, 165, 173, 174, 175, 177, 214, 216, 219, 239, 242, 253, 254, 256, 257, 258, 259, 260, 261, 262, 263, 269, 270, 271, 272, - 282, 283, 318, 319, 320, 431, 432, 433, 605, 221, + 282, 283, 320, 321, 322, 431, 432, 433, 605, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 179, 236, 180, 188, 189, 190, - 191, 192, 217, 1160, 198, 199, 200, 201, 240, 181, + 191, 192, 217, 1161, 198, 199, 200, 201, 240, 181, 182, 202, 183, 203, 199, 184, 241, 198, 164, 204, 205, 185, 206, 207, 208, 186, 209, 210, 187, 211, - 212, 213, 279, 277, 279, 279, 861, 983, 411, 412, - 920, 607, 921, 677, 854, 678, 854, 416, 417, 418, - 357, 691, 345, 463, 419, 463, 435, 668, 893, 349, - 357, 357, 430, 321, 315, 316, 339, 600, 434, 340, - 436, 645, 485, 597, 357, 357, 346, 345, 357, 487, - 351, 1382, 916, 911, 912, 925, 867, 913, 864, 914, - 915, 865, 868, 562, 919, 872, 357, 357, 429, 871, - 619, 854, 445, 1355, 630, 630, 1098, 1093, 1094, 1095, - 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, 1295, + 212, 213, 279, 277, 279, 279, 861, 435, 668, 859, + 5, 607, 6, 430, 323, 317, 318, 339, 600, 434, + 340, 436, 645, 630, 630, 900, 857, 900, 900, 1296, + 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 833, + 357, 556, 556, 556, 556, 984, 611, 345, 628, 665, + 357, 357, 916, 911, 912, 925, 867, 913, 864, 914, + 915, 865, 868, 423, 919, 872, 357, 357, 485, 871, + 357, 353, 1383, 346, 345, 487, 1099, 1094, 1095, 1096, + 473, 473, 893, 562, 1315, 1315, 357, 357, 351, 473, + 1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315, + 1265, 1046, 1265, 1265, 398, 401, 608, 612, 597, 468, + 1046, 1265, 1356, 1046, 700, 1046, 1046, 1210, 835, 1046, + 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, + 700, 1241, 953, 700, 1327, 1265, 1242, 1245, 954, 1246, + 1265, 1265, 1265, 1265, 567, 560, 1265, 1119, 1120, 1265, + 1265, 1348, 1348, 1348, 1348, 558, 515, 558, 558, 1005, + 1049, 1049, 949, 949, 688, 961, 558, 933, 1041, 1057, + 1058, 934, 396, 875, 312, 560, 567, 592, 593, 313, + 603, 609, 595, 624, 625, 463, 667, 463, 562, 887, + 461, 25, 874, 1052, 1051, 978, 978, 978, 978, 1343, + 1344, 461, 1312, 1312, 972, 979, 1055, 1056, 1312, 1312, + 1312, 1312, 1312, 1312, 1312, 1312, 1312, 1312, 547, 547, + 356, 356, 356, 356, 547, 547, 547, 547, 547, 547, + 547, 547, 547, 547, 546, 546, 445, 1366, 1366, 1158, + 546, 1070, 546, 546, 546, 546, 546, 546, 546, 546, + 1022, 1022, 1258, 249, 249, 329, 310, 1366, 443, 888, + 876, 1082, 1086, 454, 454, 839, 454, 454, 1338, 689, + 1338, 1338, 987, 1369, 1369, 482, 1341, 1342, 673, 1338, + 247, 247, 247, 247, 244, 250, 506, 854, 507, 854, + 561, 587, 561, 851, 513, 977, 561, 623, 587, 341, + 399, 467, 601, 622, 1350, 1350, 1350, 1350, 839, 967, + 839, 405, 877, 476, 604, 477, 478, 880, 1131, 892, + 1256, 885, 354, 355, 1374, 1375, 1027, 411, 412, 976, + 414, 711, 677, 1334, 678, 1260, 416, 417, 418, 1083, + 691, 406, 1008, 419, 854, 980, 742, 738, 349, 883, + 559, 1017, 1012, 638, 640, 642, 483, 1087, 454, 454, + 454, 454, 454, 454, 454, 454, 454, 454, 454, 889, + 989, 454, 1037, 1085, 1133, 0, 0, 1336, 1336, 1085, 617, 631, 634, 635, 636, 637, 658, 659, 660, 714, - 1264, 1045, 1264, 1264, 661, 662, 1004, 679, 680, 681, - 1045, 1264, 396, 1045, 1326, 1045, 1045, 354, 355, 1045, - 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, 1045, - 900, 857, 900, 900, 595, 1264, 515, 506, 667, 507, - 1264, 1264, 1264, 1264, 1069, 513, 1264, 1264, 1264, 1347, - 1347, 1347, 1347, 567, 560, 356, 356, 356, 356, 1157, - 5, 558, 6, 558, 558, 628, 665, 933, 562, 1051, - 1050, 934, 558, 556, 556, 556, 556, 949, 611, 949, - 482, 1340, 1341, 329, 560, 567, 592, 593, 331, 603, - 609, 854, 624, 625, 249, 249, 461, 975, 414, 711, - 25, 977, 977, 977, 977, 1314, 1314, 461, 971, 978, - 443, 1314, 1314, 1314, 1314, 1314, 1314, 1314, 1314, 1314, - 1314, 247, 247, 247, 247, 244, 250, 1311, 1311, 1118, - 1119, 839, 1257, 1311, 1311, 1311, 1311, 1311, 1311, 1311, - 1311, 1311, 1311, 547, 547, 398, 401, 608, 612, 547, - 547, 547, 547, 547, 547, 547, 547, 547, 547, 638, - 640, 642, 689, 454, 454, 673, 454, 454, 1337, 1259, - 1337, 1337, 546, 546, 839, 341, 839, 851, 546, 1337, - 546, 546, 546, 546, 546, 546, 546, 546, 561, 587, - 561, 623, 1007, 405, 561, 979, 587, 738, 399, 467, - 559, 1016, 1011, 966, 1349, 1349, 1349, 1349, 1054, 1055, - 880, 476, 604, 477, 478, 877, 1365, 1365, 437, 885, - 1255, 700, 1373, 1374, 1082, 835, 1260, 1261, 742, 1247, - 437, 1333, 875, 1026, 1365, 849, 406, 700, 1052, 1052, - 700, 889, 1247, 672, 1063, 1059, 1060, 883, 887, 327, - 310, 874, 1368, 1368, 1262, 1323, 1324, 483, 454, 454, - 454, 454, 454, 454, 454, 454, 454, 454, 454, 1342, - 1343, 454, 613, 1084, 1086, 938, 1147, 1335, 1335, 1084, - 601, 622, 1021, 1021, 988, 1036, 1132, 1023, 888, 876, - 1081, 1085, 0, 0, 0, 879, 0, 671, 1002, 0, - 0, 986, 0, 873, 1048, 1048, 0, 0, 688, 960, - 606, 1111, 1040, 1056, 1057, 1254, 273, 326, 0, 326, - 326, 715, 0, 0, 976, 0, 514, 706, 0, 1109, - 252, 252, 1240, 952, 0, 0, 0, 1241, 1244, 953, - 1245, 0, 0, 0, 0, 0, 0, 1130, 892 + 0, 0, 1261, 1262, 0, 1248, 0, 0, 0, 0, + 613, 849, 0, 938, 1148, 0, 0, 437, 1248, 0, + 0, 0, 0, 0, 0, 1024, 0, 0, 0, 437, + 1263, 1324, 1325, 879, 0, 671, 1003, 1053, 1053, 606, + 1112, 873, 672, 1064, 1060, 1061, 0, 0, 0, 0, + 715, 0, 0, 1255, 0, 514, 706, 0, 1110, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 854, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 273, 328, 0, 328, 328, 0, 0, 0, 252, + 252 ); protected array $gotoCheck = array( - 42, 42, 73, 128, 73, 156, 48, 154, 154, 26, - 48, 48, 48, 156, 27, 48, 154, 6, 9, 48, - 48, 48, 48, 48, 48, 43, 97, 42, 42, 42, + 42, 42, 73, 65, 73, 65, 86, 86, 48, 86, + 86, 86, 48, 48, 48, 128, 13, 48, 13, 26, + 9, 48, 48, 48, 48, 48, 48, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -940,96 +943,101 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 23, 23, 23, 23, 15, 49, 82, 82, - 65, 131, 65, 82, 22, 82, 22, 82, 82, 82, - 14, 82, 174, 83, 82, 83, 66, 66, 45, 82, - 14, 14, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 84, 178, 14, 14, 174, 174, 14, 84, - 185, 14, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 14, 15, 15, 14, 14, 13, 15, - 13, 22, 83, 187, 108, 108, 15, 15, 15, 15, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 73, 73, 73, 73, 86, 86, 103, 86, 86, 86, - 73, 73, 62, 73, 14, 73, 73, 97, 97, 73, + 42, 42, 23, 23, 23, 23, 15, 66, 66, 27, + 46, 131, 46, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 108, 108, 25, 25, 25, 25, 108, + 108, 108, 108, 108, 108, 108, 108, 108, 108, 6, + 14, 107, 107, 107, 107, 49, 107, 174, 56, 56, + 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 43, 15, 15, 14, 14, 84, 15, + 14, 97, 14, 174, 174, 84, 15, 15, 15, 15, + 154, 154, 45, 14, 176, 176, 14, 14, 185, 154, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 73, 73, 73, 73, 59, 59, 59, 59, 178, 156, + 73, 73, 187, 73, 7, 73, 73, 156, 7, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 25, 25, 25, 25, 104, 73, 14, 160, 64, 160, - 73, 73, 73, 73, 115, 160, 73, 73, 73, 9, - 9, 9, 9, 76, 76, 24, 24, 24, 24, 155, - 46, 19, 46, 19, 19, 56, 56, 73, 14, 119, - 119, 73, 19, 107, 107, 107, 107, 9, 107, 9, - 182, 182, 182, 76, 76, 76, 76, 76, 76, 76, - 76, 22, 76, 76, 5, 5, 19, 93, 93, 93, - 76, 19, 19, 19, 19, 176, 176, 19, 19, 19, - 113, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 5, 5, 5, 5, 5, 5, 177, 177, 145, - 145, 12, 14, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 179, 179, 59, 59, 59, 59, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 85, - 85, 85, 117, 23, 23, 121, 23, 23, 131, 20, - 131, 131, 162, 162, 12, 29, 12, 18, 162, 131, - 162, 162, 162, 162, 162, 162, 162, 162, 9, 9, - 9, 80, 50, 28, 9, 50, 9, 50, 9, 9, - 50, 50, 50, 92, 131, 131, 131, 131, 120, 120, - 39, 9, 9, 9, 9, 37, 188, 188, 118, 9, - 166, 7, 9, 9, 130, 7, 20, 20, 99, 20, - 118, 131, 35, 110, 188, 20, 31, 7, 118, 118, - 7, 41, 20, 118, 118, 118, 118, 9, 35, 175, - 175, 35, 188, 188, 20, 20, 20, 157, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 184, - 184, 23, 17, 131, 133, 17, 17, 131, 131, 131, - 2, 2, 107, 107, 96, 114, 148, 17, 16, 16, - 16, 16, -1, -1, -1, 17, -1, 17, 17, -1, - -1, 16, -1, 17, 89, 89, -1, -1, 89, 89, - 8, 8, 89, 89, 89, 17, 24, 24, -1, 24, - 24, 8, -1, -1, 16, -1, 8, 8, -1, 8, - 5, 5, 79, 79, -1, -1, -1, 79, 79, 79, - 79, -1, -1, -1, -1, -1, -1, 16, 16 + 7, 79, 79, 7, 14, 73, 79, 79, 79, 79, + 73, 73, 73, 73, 76, 76, 73, 145, 145, 73, + 73, 9, 9, 9, 9, 19, 14, 19, 19, 103, + 89, 89, 9, 9, 89, 89, 19, 73, 89, 89, + 89, 73, 62, 35, 76, 76, 76, 76, 76, 76, + 76, 76, 104, 76, 76, 83, 64, 83, 14, 35, + 19, 76, 35, 119, 119, 19, 19, 19, 19, 184, + 184, 19, 177, 177, 19, 19, 120, 120, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 179, 179, + 24, 24, 24, 24, 179, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 162, 162, 83, 188, 188, 155, + 162, 115, 162, 162, 162, 162, 162, 162, 162, 162, + 107, 107, 14, 5, 5, 175, 175, 188, 113, 16, + 16, 16, 16, 23, 23, 12, 23, 23, 131, 117, + 131, 131, 16, 188, 188, 182, 182, 182, 121, 131, + 5, 5, 5, 5, 5, 5, 160, 22, 160, 22, + 9, 9, 9, 18, 160, 16, 9, 80, 9, 29, + 9, 9, 2, 2, 131, 131, 131, 131, 12, 92, + 12, 28, 37, 9, 9, 9, 9, 39, 16, 16, + 166, 9, 97, 97, 9, 9, 110, 82, 82, 93, + 93, 93, 82, 131, 82, 20, 82, 82, 82, 130, + 82, 31, 50, 82, 22, 50, 99, 50, 82, 9, + 50, 50, 50, 85, 85, 85, 157, 133, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 41, + 96, 23, 114, 131, 148, -1, -1, 131, 131, 131, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + -1, -1, 20, 20, -1, 20, -1, -1, -1, -1, + 17, 20, -1, 17, 17, -1, -1, 118, 20, -1, + -1, -1, -1, -1, -1, 17, -1, -1, -1, 118, + 20, 20, 20, 17, -1, 17, 17, 118, 118, 8, + 8, 17, 118, 118, 118, 118, -1, -1, -1, -1, + 8, -1, -1, 17, -1, 8, 8, -1, 8, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 24, 24, -1, 24, 24, -1, -1, -1, 5, + 5 ); protected array $gotoBase = array( - 0, 0, -178, 0, 0, 353, 7, 474, 562, 8, - 0, 0, 93, -113, -119, -184, 91, 63, 126, 56, - 34, 0, -103, 159, 312, 287, 5, 10, 112, 137, - 0, 54, 0, 0, 0, 119, 0, 132, 0, 145, - 0, 55, -1, 2, 0, 162, -422, 0, -711, 149, - 440, 0, 0, 0, 0, 0, 285, 0, 0, 360, - 0, 0, 230, 0, 60, 156, -51, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -34, 0, 0, 181, - 120, -110, -329, -94, -274, -66, -460, 0, 0, 284, - 0, 0, 130, 51, 0, 0, 96, -463, 0, 78, - 0, 0, 0, 231, 251, 0, 0, 305, -3, 0, - 121, 0, 0, 92, 30, 29, 0, 138, 212, 49, - 182, 134, 0, 0, 0, 0, 0, 0, 1, 0, - 108, 163, 0, 87, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 116, 0, 0, 97, 0, - 0, 0, 0, 0, -27, 75, -263, 72, 0, 0, - -204, 0, 195, 0, 0, 0, 109, 0, 0, 0, - 0, 0, 0, 0, -117, 186, 128, 150, 174, 166, - 0, 0, 38, 0, 155, 180, 0, 202, 167, 0, + 0, 0, -256, 0, 0, 412, 189, 267, 581, 10, + 0, 0, 127, -325, -99, -184, -38, 91, 142, 50, + 100, 0, 170, 159, 377, 182, 15, 165, 130, 161, + 0, 59, 0, 0, 0, -40, 0, 129, 0, 150, + 0, 83, -1, 200, 0, 216, -572, 0, -709, 187, + 490, 0, 0, 0, 0, 0, 168, 0, 0, 219, + 0, 0, 290, 0, 108, -11, -70, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -43, 0, 0, -120, + 144, 180, -10, 68, -248, 28, -718, 0, 0, 40, + 0, 0, 136, 183, 0, 0, 82, -258, 0, 96, + 0, 0, 0, 284, 299, 0, 0, 173, -54, 0, + 114, 0, 0, 140, 17, 126, 0, 145, 301, 73, + 80, 147, 0, 0, 0, 0, 0, 0, 13, 0, + 123, 163, 0, 70, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 34, 0, 0, 85, 0, + 0, 0, 0, 0, 206, 155, 1, 71, 0, 0, + -55, 0, 157, 0, 0, 0, 109, 0, 0, 0, + 0, 0, 0, 0, -92, 90, 7, 125, 239, 141, + 0, 0, 133, 0, -15, 218, 0, 241, 88, 0, 0 ); protected array $gotoDefault = array( -32768, 519, 746, 4, 747, 942, 822, 831, 583, 537, - 713, 350, 632, 426, 1331, 918, 1146, 602, 850, 1273, - 1279, 462, 853, 334, 736, 930, 901, 902, 402, 389, + 713, 350, 632, 426, 1332, 918, 1147, 602, 850, 1274, + 1280, 462, 853, 334, 736, 930, 901, 902, 402, 389, 866, 400, 656, 633, 500, 886, 458, 878, 492, 881, 457, 890, 163, 422, 517, 894, 3, 897, 565, 928, - 981, 390, 905, 391, 684, 907, 586, 909, 910, 397, - 403, 404, 1151, 594, 629, 922, 255, 588, 923, 388, - 924, 932, 393, 395, 694, 472, 511, 505, 415, 1113, + 982, 390, 905, 391, 684, 907, 586, 909, 910, 397, + 403, 404, 1152, 594, 629, 922, 255, 588, 923, 388, + 924, 932, 393, 395, 694, 472, 511, 505, 415, 1114, 589, 616, 653, 451, 479, 627, 639, 626, 486, 438, - 420, 333, 965, 973, 493, 470, 987, 352, 995, 744, - 1159, 647, 495, 1003, 648, 1010, 1013, 538, 539, 484, - 1025, 266, 1028, 496, 1037, 23, 674, 1042, 1043, 675, - 649, 1065, 650, 676, 651, 1067, 469, 584, 1075, 459, - 1083, 1319, 460, 1087, 264, 1090, 278, 421, 439, 1096, - 1097, 9, 1103, 704, 705, 19, 274, 516, 1131, 695, - -32768,-32768,-32768,-32768, 456, 1158, 455, 1228, 1230, 566, - 497, 1248, 295, 1251, 687, 512, 1256, 452, 1322, 453, - 540, 480, 317, 541, 1366, 309, 337, 314, 557, 296, - 338, 542, 481, 1328, 1336, 335, 31, 1356, 1367, 599, + 420, 333, 966, 974, 493, 470, 988, 352, 996, 744, + 1160, 647, 495, 1004, 648, 1011, 1014, 538, 539, 484, + 1026, 266, 1029, 496, 1038, 23, 674, 1043, 1044, 675, + 649, 1066, 650, 676, 651, 1068, 469, 584, 1076, 459, + 1084, 1320, 460, 1088, 264, 1091, 278, 421, 439, 1097, + 1098, 9, 1104, 704, 705, 19, 274, 516, 1132, 695, + -32768,-32768,-32768,-32768, 456, 1159, 455, 1229, 1231, 566, + 497, 1249, 295, 1252, 687, 512, 1257, 452, 1323, 453, + 540, 480, 319, 541, 1367, 309, 337, 316, 557, 296, + 338, 542, 481, 1329, 1337, 335, 31, 1357, 1368, 599, 621 ); @@ -1054,27 +1062,27 @@ class Php7 extends \PhpParser\ParserAbstract 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 25, 25, 50, 69, 69, 72, 72, 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, - 78, 78, 79, 79, 80, 80, 80, 26, 26, 27, - 27, 27, 27, 27, 88, 88, 90, 90, 83, 83, - 91, 91, 92, 92, 92, 84, 84, 87, 87, 85, - 85, 93, 94, 94, 57, 57, 65, 65, 68, 68, - 68, 67, 95, 95, 96, 58, 58, 58, 58, 97, - 97, 98, 98, 99, 99, 100, 101, 101, 102, 102, - 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, - 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, - 109, 109, 111, 111, 112, 112, 112, 112, 112, 112, - 112, 110, 110, 110, 115, 115, 115, 115, 89, 89, - 118, 118, 118, 119, 119, 116, 116, 120, 120, 122, - 122, 123, 123, 117, 124, 124, 121, 125, 125, 125, - 125, 113, 113, 82, 82, 82, 20, 20, 20, 127, - 126, 126, 128, 128, 128, 128, 60, 129, 129, 130, - 61, 132, 132, 133, 133, 134, 134, 86, 135, 135, - 135, 135, 135, 135, 135, 140, 140, 141, 141, 142, - 142, 142, 142, 142, 143, 144, 144, 139, 139, 136, - 136, 138, 138, 146, 146, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 137, 147, 147, 149, 148, - 148, 150, 150, 114, 151, 151, 153, 153, 153, 152, - 152, 62, 104, 154, 154, 56, 56, 42, 42, 42, + 78, 78, 79, 79, 80, 80, 80, 80, 26, 26, + 27, 27, 27, 27, 27, 88, 88, 90, 90, 83, + 83, 91, 91, 92, 92, 92, 84, 84, 87, 87, + 85, 85, 93, 94, 94, 57, 57, 65, 65, 68, + 68, 68, 67, 95, 95, 96, 58, 58, 58, 58, + 97, 97, 98, 98, 99, 99, 100, 101, 101, 102, + 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, + 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, + 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, + 112, 112, 110, 110, 110, 115, 115, 115, 115, 89, + 89, 118, 118, 118, 119, 119, 116, 116, 120, 120, + 122, 122, 123, 123, 117, 124, 124, 121, 125, 125, + 125, 125, 113, 113, 82, 82, 82, 20, 20, 20, + 127, 126, 126, 128, 128, 128, 128, 60, 129, 129, + 130, 61, 132, 132, 133, 133, 134, 134, 86, 135, + 135, 135, 135, 135, 135, 135, 140, 140, 141, 141, + 142, 142, 142, 142, 142, 143, 144, 144, 139, 139, + 136, 136, 138, 138, 146, 146, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 137, 147, 147, 149, + 148, 148, 150, 150, 114, 151, 151, 153, 153, 153, + 152, 152, 62, 104, 154, 154, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1084,20 +1092,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 161, 162, 162, 163, 155, 155, 160, 160, 164, - 165, 165, 166, 167, 168, 168, 168, 168, 19, 19, - 73, 73, 73, 73, 156, 156, 156, 156, 170, 170, - 159, 159, 159, 157, 157, 176, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 177, 177, 177, 108, 179, - 179, 179, 179, 158, 158, 158, 158, 158, 158, 158, - 158, 59, 59, 173, 173, 173, 173, 173, 180, 180, - 169, 169, 169, 169, 181, 181, 181, 181, 181, 181, - 74, 74, 66, 66, 66, 66, 131, 131, 131, 131, - 184, 183, 172, 172, 172, 172, 172, 172, 172, 171, - 171, 171, 182, 182, 182, 182, 107, 178, 186, 186, - 185, 185, 187, 187, 187, 187, 187, 187, 187, 187, - 175, 175, 175, 175, 174, 189, 188, 188, 188, 188, - 188, 188, 188, 188, 190, 190, 190, 190 + 42, 42, 161, 162, 162, 163, 155, 155, 160, 160, + 164, 165, 165, 166, 167, 168, 168, 168, 168, 19, + 19, 73, 73, 73, 73, 156, 156, 156, 156, 170, + 170, 159, 159, 159, 157, 157, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 177, 177, 177, 108, + 179, 179, 179, 179, 158, 158, 158, 158, 158, 158, + 158, 158, 59, 59, 173, 173, 173, 173, 173, 180, + 180, 169, 169, 169, 169, 181, 181, 181, 181, 181, + 181, 74, 74, 66, 66, 66, 66, 131, 131, 131, + 131, 184, 183, 172, 172, 172, 172, 172, 172, 172, + 171, 171, 171, 182, 182, 182, 182, 107, 178, 186, + 186, 185, 185, 187, 187, 187, 187, 187, 187, 187, + 187, 175, 175, 175, 175, 174, 189, 188, 188, 188, + 188, 188, 188, 188, 188, 190, 190, 190, 190 ); protected array $ruleToLength = array( @@ -1121,50 +1129,50 @@ class Php7 extends \PhpParser\ParserAbstract 3, 3, 1, 2, 5, 7, 9, 6, 5, 6, 3, 2, 1, 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, - 0, 1, 3, 1, 1, 1, 1, 8, 9, 7, - 8, 7, 6, 8, 0, 2, 0, 2, 1, 2, - 1, 2, 1, 1, 1, 0, 2, 0, 2, 0, - 2, 2, 1, 3, 1, 4, 1, 4, 1, 1, - 4, 2, 1, 3, 3, 3, 4, 4, 5, 0, - 2, 4, 3, 1, 1, 7, 0, 2, 1, 3, - 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, - 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, - 1, 3, 0, 2, 1, 1, 1, 1, 1, 1, - 1, 7, 9, 6, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, - 3, 3, 3, 1, 3, 3, 1, 1, 2, 1, - 1, 0, 1, 0, 2, 2, 2, 4, 3, 1, - 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, - 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, - 6, 10, 3, 5, 1, 1, 3, 0, 2, 4, - 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, - 3, 0, 2, 0, 5, 8, 1, 3, 3, 0, - 2, 2, 2, 3, 1, 0, 1, 1, 3, 3, - 3, 4, 4, 1, 1, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, + 0, 1, 3, 1, 1, 1, 1, 1, 8, 9, + 7, 8, 7, 6, 8, 0, 2, 0, 2, 1, + 2, 1, 2, 1, 1, 1, 0, 2, 0, 2, + 0, 2, 2, 1, 3, 1, 4, 1, 4, 1, + 1, 4, 2, 1, 3, 3, 3, 4, 4, 5, + 0, 2, 4, 3, 1, 1, 7, 0, 2, 1, + 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, + 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, + 0, 1, 3, 0, 2, 1, 1, 1, 1, 1, + 1, 1, 7, 9, 6, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, + 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, + 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, + 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, + 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, + 5, 6, 10, 3, 5, 1, 1, 3, 0, 2, + 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, + 1, 3, 0, 2, 0, 5, 8, 1, 3, 3, + 0, 2, 2, 2, 3, 1, 0, 1, 1, 3, + 3, 3, 4, 4, 1, 1, 2, 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, 2, 8, 9, 8, 9, 9, 10, 9, - 10, 8, 3, 2, 2, 1, 1, 0, 4, 2, - 1, 3, 2, 1, 2, 2, 2, 4, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, - 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, - 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, - 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, - 1, 3, 1, 1, 1, 4, 4, 1, 4, 4, - 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, - 1, 3, 1, 4, 4, 3, 3, 3, 3, 1, - 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, - 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, - 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, - 3, 3, 6, 3, 1, 1, 2, 1 + 2, 2, 2, 2, 3, 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, 2, 8, 9, 8, 9, 9, 10, + 9, 10, 8, 3, 2, 2, 1, 1, 0, 4, + 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, + 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 5, 3, 3, + 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, + 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, + 1, 1, 3, 1, 1, 1, 4, 4, 1, 4, + 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, + 2, 1, 3, 1, 4, 4, 3, 3, 3, 3, + 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, + 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, + 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, + 3, 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1605,875 +1613,875 @@ protected function initReduceCallbacks(): void { $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 207 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 208 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, 209 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 210 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(7-2)); }, - 210 => static function ($self, $stackPos) { + 211 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(8-3)); }, - 211 => static function ($self, $stackPos) { + 212 => static function ($self, $stackPos) { $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkInterface($self->semValue, $stackPos-(7-3)); }, - 212 => static function ($self, $stackPos) { + 213 => static function ($self, $stackPos) { $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 213 => static function ($self, $stackPos) { + 214 => static function ($self, $stackPos) { $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkEnum($self->semValue, $stackPos-(8-3)); }, - 214 => static function ($self, $stackPos) { + 215 => static function ($self, $stackPos) { $self->semValue = null; }, - 215 => static function ($self, $stackPos) { + 216 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 216 => static function ($self, $stackPos) { + 217 => static function ($self, $stackPos) { $self->semValue = null; }, - 217 => static function ($self, $stackPos) { + 218 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 218 => static function ($self, $stackPos) { + 219 => static function ($self, $stackPos) { $self->semValue = 0; }, - 219 => null, 220 => null, - 221 => static function ($self, $stackPos) { + 221 => null, + 222 => static function ($self, $stackPos) { $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 222 => static function ($self, $stackPos) { + 223 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 223 => static function ($self, $stackPos) { + 224 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 224 => static function ($self, $stackPos) { + 225 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 225 => static function ($self, $stackPos) { + 226 => static function ($self, $stackPos) { $self->semValue = null; }, - 226 => static function ($self, $stackPos) { + 227 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 227 => static function ($self, $stackPos) { + 228 => static function ($self, $stackPos) { $self->semValue = array(); }, - 228 => static function ($self, $stackPos) { + 229 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 229 => static function ($self, $stackPos) { + 230 => static function ($self, $stackPos) { $self->semValue = array(); }, - 230 => static function ($self, $stackPos) { + 231 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 231 => null, - 232 => static function ($self, $stackPos) { + 232 => null, + 233 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 233 => static function ($self, $stackPos) { + 234 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 234 => null, - 235 => static function ($self, $stackPos) { + 235 => null, + 236 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 236 => null, - 237 => static function ($self, $stackPos) { + 237 => null, + 238 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 238 => static function ($self, $stackPos) { + 239 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 239 => static function ($self, $stackPos) { + 240 => static function ($self, $stackPos) { $self->semValue = null; }, - 240 => static function ($self, $stackPos) { + 241 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 241 => null, - 242 => static function ($self, $stackPos) { + 242 => null, + 243 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 243 => static function ($self, $stackPos) { + 244 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 244 => static function ($self, $stackPos) { + 245 => static function ($self, $stackPos) { $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 245 => static function ($self, $stackPos) { + 246 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 246 => static function ($self, $stackPos) { + 247 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 247 => static function ($self, $stackPos) { + 248 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 248 => static function ($self, $stackPos) { + 249 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(5-3)]; }, - 249 => static function ($self, $stackPos) { + 250 => static function ($self, $stackPos) { $self->semValue = array(); }, - 250 => static function ($self, $stackPos) { + 251 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 251 => static function ($self, $stackPos) { + 252 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 252 => static function ($self, $stackPos) { + 253 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 253 => null, 254 => null, - 255 => static function ($self, $stackPos) { + 255 => null, + 256 => static function ($self, $stackPos) { $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 256 => static function ($self, $stackPos) { + 257 => static function ($self, $stackPos) { $self->semValue = []; }, - 257 => null, - 258 => static function ($self, $stackPos) { + 258 => null, + 259 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 259 => static function ($self, $stackPos) { + 260 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 260 => static function ($self, $stackPos) { + 261 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 261 => static function ($self, $stackPos) { + 262 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 262 => static function ($self, $stackPos) { + 263 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 263 => static function ($self, $stackPos) { + 264 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 264 => static function ($self, $stackPos) { + 265 => static function ($self, $stackPos) { $self->semValue = array(); }, - 265 => static function ($self, $stackPos) { + 266 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 266 => static function ($self, $stackPos) { + 267 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 267 => static function ($self, $stackPos) { + 268 => static function ($self, $stackPos) { $self->semValue = array(); }, - 268 => static function ($self, $stackPos) { + 269 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 269 => static function ($self, $stackPos) { + 270 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 270 => static function ($self, $stackPos) { + 271 => static function ($self, $stackPos) { $self->semValue = null; }, - 271 => static function ($self, $stackPos) { + 272 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 272 => static function ($self, $stackPos) { + 273 => static function ($self, $stackPos) { $self->semValue = null; }, - 273 => static function ($self, $stackPos) { + 274 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 274 => static function ($self, $stackPos) { + 275 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 275 => static function ($self, $stackPos) { + 276 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-2)], true); }, - 276 => static function ($self, $stackPos) { + 277 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 277 => static function ($self, $stackPos) { + 278 => static function ($self, $stackPos) { $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); }, - 278 => null, - 279 => static function ($self, $stackPos) { + 279 => null, + 280 => static function ($self, $stackPos) { $self->semValue = array(); }, - 280 => static function ($self, $stackPos) { + 281 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 281 => static function ($self, $stackPos) { + 282 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 282 => static function ($self, $stackPos) { + 283 => static function ($self, $stackPos) { $self->semValue = 0; }, - 283 => static function ($self, $stackPos) { + 284 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 284 => static function ($self, $stackPos) { + 285 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 285 => static function ($self, $stackPos) { + 286 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 286 => static function ($self, $stackPos) { + 287 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 287 => static function ($self, $stackPos) { + 288 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 288 => static function ($self, $stackPos) { + 289 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 289 => static function ($self, $stackPos) { + 290 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 290 => static function ($self, $stackPos) { + 291 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 291 => static function ($self, $stackPos) { + 292 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 292 => static function ($self, $stackPos) { + 293 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 293 => static function ($self, $stackPos) { + 294 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, - 294 => null, - 295 => static function ($self, $stackPos) { + 295 => null, + 296 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 296 => static function ($self, $stackPos) { + 297 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 297 => null, 298 => null, - 299 => static function ($self, $stackPos) { + 299 => null, + 300 => static function ($self, $stackPos) { $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 300 => static function ($self, $stackPos) { + 301 => static function ($self, $stackPos) { $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 301 => static function ($self, $stackPos) { + 302 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 302 => static function ($self, $stackPos) { + 303 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 303 => null, - 304 => static function ($self, $stackPos) { + 304 => null, + 305 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 305 => static function ($self, $stackPos) { + 306 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 306 => static function ($self, $stackPos) { + 307 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 307 => null, - 308 => static function ($self, $stackPos) { + 308 => null, + 309 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 309 => static function ($self, $stackPos) { + 310 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 310 => static function ($self, $stackPos) { + 311 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 311 => static function ($self, $stackPos) { + 312 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 312 => static function ($self, $stackPos) { + 313 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 313 => static function ($self, $stackPos) { + 314 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 314 => static function ($self, $stackPos) { + 315 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 315 => static function ($self, $stackPos) { + 316 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 316 => static function ($self, $stackPos) { + 317 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 317 => null, - 318 => static function ($self, $stackPos) { + 318 => null, + 319 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 319 => static function ($self, $stackPos) { + 320 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 320 => null, - 321 => static function ($self, $stackPos) { + 321 => null, + 322 => static function ($self, $stackPos) { $self->semValue = null; }, - 322 => null, - 323 => static function ($self, $stackPos) { + 323 => null, + 324 => static function ($self, $stackPos) { $self->semValue = null; }, - 324 => static function ($self, $stackPos) { + 325 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 325 => static function ($self, $stackPos) { + 326 => static function ($self, $stackPos) { $self->semValue = null; }, - 326 => static function ($self, $stackPos) { + 327 => static function ($self, $stackPos) { $self->semValue = array(); }, - 327 => static function ($self, $stackPos) { + 328 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 328 => static function ($self, $stackPos) { + 329 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 329 => static function ($self, $stackPos) { + 330 => static function ($self, $stackPos) { $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 330 => static function ($self, $stackPos) { + 331 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 331 => static function ($self, $stackPos) { + 332 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 332 => static function ($self, $stackPos) { + 333 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 333 => static function ($self, $stackPos) { + 334 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 334 => static function ($self, $stackPos) { + 335 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 335 => static function ($self, $stackPos) { + 336 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, - 336 => null, - 337 => static function ($self, $stackPos) { + 337 => null, + 338 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 338 => static function ($self, $stackPos) { + 339 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 339 => null, 340 => null, - 341 => static function ($self, $stackPos) { + 341 => null, + 342 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 342 => static function ($self, $stackPos) { + 343 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 343 => static function ($self, $stackPos) { + 344 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 344 => static function ($self, $stackPos) { + 345 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 345 => static function ($self, $stackPos) { + 346 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 346 => static function ($self, $stackPos) { + 347 => static function ($self, $stackPos) { $self->semValue = array(); }, - 347 => static function ($self, $stackPos) { + 348 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 348 => static function ($self, $stackPos) { + 349 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 349 => static function ($self, $stackPos) { + 350 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 350 => static function ($self, $stackPos) { + 351 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 351 => static function ($self, $stackPos) { + 352 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 352 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, 353 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 354 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 355 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = null; /* will be skipped */ }, 356 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = array(); }, 357 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 358 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + $self->semValue = array(); }, 359 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 360 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 361 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 362 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 363 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 364 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 365 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 365 => null, - 366 => static function ($self, $stackPos) { + 366 => null, + 367 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 367 => static function ($self, $stackPos) { + 368 => static function ($self, $stackPos) { $self->semValue = null; }, - 368 => null, 369 => null, - 370 => static function ($self, $stackPos) { + 370 => null, + 371 => static function ($self, $stackPos) { $self->semValue = 0; }, - 371 => static function ($self, $stackPos) { + 372 => static function ($self, $stackPos) { $self->semValue = 0; }, - 372 => null, 373 => null, - 374 => static function ($self, $stackPos) { + 374 => null, + 375 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 375 => static function ($self, $stackPos) { + 376 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 376 => static function ($self, $stackPos) { + 377 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 377 => static function ($self, $stackPos) { + 378 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 378 => static function ($self, $stackPos) { + 379 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 379 => static function ($self, $stackPos) { + 380 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 380 => static function ($self, $stackPos) { + 381 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 381 => static function ($self, $stackPos) { + 382 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 382 => static function ($self, $stackPos) { + 383 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 383 => static function ($self, $stackPos) { + 384 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 384 => static function ($self, $stackPos) { + 385 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 385 => null, - 386 => static function ($self, $stackPos) { + 386 => null, + 387 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 387 => static function ($self, $stackPos) { + 388 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 388 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 389 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 390 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 391 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semValue = []; }, - 392 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 393 => static function ($self, $stackPos) { + 394 => static function ($self, $stackPos) { $self->semValue = []; }, - 394 => static function ($self, $stackPos) { + 395 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 395 => static function ($self, $stackPos) { + 396 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 396 => static function ($self, $stackPos) { - $self->semValue = null; - }, 397 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = null; }, 398 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 399 => static function ($self, $stackPos) { - $self->semValue = 0; + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 400 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 401 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 401 => null, 402 => null, - 403 => static function ($self, $stackPos) { + 403 => null, + 404 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 404 => static function ($self, $stackPos) { + 405 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 405 => static function ($self, $stackPos) { + 406 => static function ($self, $stackPos) { $self->semValue = array(); }, - 406 => null, 407 => null, - 408 => static function ($self, $stackPos) { + 408 => null, + 409 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 409 => static function ($self, $stackPos) { + 410 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 410 => static function ($self, $stackPos) { + 411 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 411 => static function ($self, $stackPos) { + 412 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 412 => static function ($self, $stackPos) { + 413 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 413 => null, 414 => null, - 415 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, + 415 => null, 416 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 417 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 418 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 419 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 420 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 421 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 422 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 423 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 424 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 425 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 426 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 438 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 439 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 440 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 441 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 442 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 450 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 452 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 463 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 464 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 465 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 466 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 467 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 475 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 476 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 477 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 478 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 478 => static function ($self, $stackPos) { + 479 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 479 => static function ($self, $stackPos) { + 480 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 480 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 481 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 483 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 483 => static function ($self, $stackPos) { + 484 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 484 => static function ($self, $stackPos) { + 485 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 485 => null, - 486 => static function ($self, $stackPos) { + 486 => null, + 487 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 487 => static function ($self, $stackPos) { + 488 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 488 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 489 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 490 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 502 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 505 => null, 506 => null, - 507 => static function ($self, $stackPos) { + 507 => null, + 508 => static function ($self, $stackPos) { $self->semValue = array(); }, - 508 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 509 => null, - 510 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, + 510 => null, 511 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 512 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 513 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 514 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 515 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2482,310 +2490,313 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 517 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 518 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 519 => null, - 520 => static function ($self, $stackPos) { + 519 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 520 => null, 521 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 522 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 523 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 524 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 524 => null, 525 => null, - 526 => static function ($self, $stackPos) { + 526 => null, + 527 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 527 => static function ($self, $stackPos) { + 528 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 528 => null, 529 => null, - 530 => static function ($self, $stackPos) { + 530 => null, + 531 => static function ($self, $stackPos) { $self->semValue = array(); }, - 531 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 532 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 533 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = array(); }, - 534 => null, - 535 => static function ($self, $stackPos) { + 535 => null, + 536 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 536 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 537 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 540 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 541 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 542 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 543 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 544 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 545 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 546 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 547 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 548 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 549 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 550 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 551 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 552 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 553 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 554 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 555 => null, 556 => null, 557 => null, - 558 => static function ($self, $stackPos) { + 558 => null, + 559 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 559 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 560 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 561 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = null; }, - 562 => null, 563 => null, - 564 => static function ($self, $stackPos) { + 564 => null, + 565 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 565 => null, 566 => null, 567 => null, 568 => null, 569 => null, 570 => null, - 571 => static function ($self, $stackPos) { + 571 => null, + 572 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 572 => null, 573 => null, 574 => null, - 575 => static function ($self, $stackPos) { + 575 => null, + 576 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 576 => static function ($self, $stackPos) { + 577 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 577 => null, - 578 => static function ($self, $stackPos) { + 578 => null, + 579 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 579 => static function ($self, $stackPos) { + 580 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 580 => static function ($self, $stackPos) { + 581 => static function ($self, $stackPos) { $self->semValue = null; }, - 581 => null, 582 => null, 583 => null, - 584 => static function ($self, $stackPos) { + 584 => null, + 585 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 585 => static function ($self, $stackPos) { + 586 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 586 => null, - 587 => static function ($self, $stackPos) { + 587 => null, + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 588 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 589 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 590 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 591 => static function ($self, $stackPos) { + 592 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 592 => null, - 593 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, + 593 => null, 594 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 595 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 596 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 597 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 598 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 599 => null, - 600 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 600 => null, + 601 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 601 => null, 602 => null, - 603 => static function ($self, $stackPos) { + 603 => null, + 604 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 604 => null, - 605 => static function ($self, $stackPos) { + 605 => null, + 606 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 606 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 607 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 608 => null, - 609 => static function ($self, $stackPos) { + 609 => null, + 610 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 610 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 611 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 612 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 613 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 615 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 616 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 617 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 618 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 619 => static function ($self, $stackPos) { + 620 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 620 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 621 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 622 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 623 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 624 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 625 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 626 => null, - 627 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 626 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 627 => null, 628 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 629 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 630 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 631 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 632 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 633 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 634 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 635 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 636 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 637 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 637 => null, + 638 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 19309dcdfe..4dfb7390fd 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -165,7 +165,7 @@ class Php8 extends \PhpParser\ParserAbstract protected int $tokenToSymbolMapSize = 400; protected int $actionTableSize = 1289; - protected int $gotoTableSize = 710; + protected int $gotoTableSize = 743; protected int $invalidSymbol = 172; protected int $errorSymbol = 1; @@ -395,134 +395,134 @@ class Php8 extends \PhpParser\ParserAbstract protected array $action = array( 126, 127, 128, 573, 129, 130, 959, 768, 769, 770, - 131, 38, 852, 493, 569, 1380,-32766,-32766,-32766, 0, - 843, 1138, 1139, 1140, 1134, 1133, 1132, 1141, 1135, 1136, - 1137,-32766,-32766,-32766, 854, 762, 761,-32766, 1049,-32766, + 131, 38, 852, 493, 569, 1381,-32766,-32766,-32766, 0, + 843, 1139, 1140, 1141, 1135, 1134, 1133, 1142, 1136, 1137, + 1138,-32766,-32766,-32766, 854, 762, 761,-32766, 1050,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1009,-32766,-32766,-32766, 771, 1138, 1139, 1140, 1134, - 1133, 1132, 1141, 1135, 1136, 1137, 387, 388, 447, 263, - 132, 390, 775, 776, 777, 778, 432, 848, 433, 1317, - -571, 36, 246, 47, 292, 832, 779, 780, 781, 782, + -32767, 1010,-32766,-32766, 2, 771, 1139, 1140, 1141, 1135, + 1134, 1133, 1142, 1136, 1137, 1138, 387, 388, 447, 263, + 132, 390, 775, 776, 777, 778, 432,-32766, 433, 1318, + -572, 36, 246, 47, 292, 832, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 808, 574, 809, 810, 811, 812, 800, 801, 345, 346, 803, 804, 789, 790, 791, 793, 794, 795, 360, 835, 836, 837, 838, 839, - 575, 2, 297, -333, 796, 797, 576, 577, 236, 820, + 575, -374, 297, -374, 796, 797, 576, 577, -334, 820, 818, 819, 831, 815, 816, 26, -195, 578, 579, 814, - 580, 581, 582, 583, 324, 584, 585, -571, -571, 494, - 298, 299, 817, 586, 587, 35, 133, 849, 126, 127, - 128, 573, 129, 130, 1082, 768, 769, 770, 131, 38, - -32766, 134, 738, 1042, 1041, 1040, 1046, 1043, 1044, 1045, - -32766,-32766,-32766, 1010, 104, 105, 106, 107, 108, 880, - 275, 881,-32766, 762, 761, 1058, 853,-32766,-32766,-32766, + 580, 581, 582, 583, 325, 584, 585, -572, -572, 494, + 298, 299, 817, 586, 587, 35, 133, 236, 126, 127, + 128, 573, 129, 130, 1083, 768, 769, 770, 131, 38, + -32766, 134, 738, 1043, 1042, 1041, 1047, 1044, 1045, 1046, + -32766,-32766,-32766, 1011, 104, 105, 106, 107, 108, 880, + 275, 881,-32766, 762, 761, 1059, 853,-32766,-32766,-32766, 143,-32766, 109,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766, 479, 480, 771,-32766,-32766,-32766, 1058,-32766, 291, + -32766, 479, 480, 771,-32766,-32766,-32766, 1059,-32766, 291, -32766,-32766,-32766,-32766,-32766, -194, 249, 263, 132, 390, - 775, 776, 777, 778,-32766,-32766, 433,-32766,-32766,-32766, + 775, 776, 777, 778, 308,-32766, 433,-32766,-32766,-32766, -32766, 291, 851, 832, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 808, 574, 809, 810, 811, 812, 800, 801, 345, 346, 803, 804, 789, 790, 791, 793, - 794, 795, 360, 835, 836, 837, 838, 839, 575, 962, - -274, -333, 796, 797, 576, 577, 843, 820, 818, 819, - 831, 815, 816, 1305, -195, 578, 579, 814, 580, 581, - 582, 583, 308, 584, 585,-32766, 82, 83, 84, -85, + 794, 795, 360, 835, 836, 837, 838, 839, 575,-32766, + -32766,-32766, 796, 797, 576, 577, -334, 820, 818, 819, + 831, 815, 816, 1306, -195, 578, 579, 814, 580, 581, + 582, 583, 312, 584, 585, 148, 82, 83, 84, -275, 817, 586, 587, 161, 146, 792, 763, 764, 765, 766, - 767, 1346, 768, 769, 770, 805, 806, 37, 961, 85, + 767, 1347, 768, 769, 770, 805, 806, 37, 24, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 310, 275,-32766,-32766,-32766,-32767,-32767, - -32767,-32767, 101, 102, 103, 1112, 109, 319, 625, 751, - 771,-32766,-32766,-32766, 852, -85,-32766, 1111,-32766,-32766, + 106, 107, 108, 1128, 275,-32766,-32766,-32766,-32767,-32767, + -32767,-32767, 101, 102, 103, 1113, 109, 321, 625, 751, + 771,-32766,-32766,-32766, 852, 341,-32766, 1112,-32766,-32766, -32766, 389, 388, -194, 772, 773, 774, 775, 776, 777, - 778, 432,-32766, 841,-32766,-32766, 1390, 341, 1285, 1391, + 778, 432,-32766, 841,-32766,-32766, 1391, 342, 1286, 1392, 832, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 808, 830, 809, 810, 811, 812, 800, 801, 802, 829, 803, 804, 789, 790, 791, 793, 794, 795, 834, - 835, 836, 837, 838, 839, 840, 1081, 433, -568, 796, - 797, 798, 799, 1365, 820, 818, 819, 831, 815, 816, - 1364, 24, 807, 813, 814, 821, 822, 824, 823, 138, - 825, 826, 1154, 322, 342, 286, 743, 817, 828, 827, - 49, 50, 51, 525, 52, 53, 1127, -110, 375, 852, - 54, 55, -110, 56, -110, 619,-32766, 81, 381, 304, - 1361, 322, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, 157, 938, -568, -568, 292, 978, 979, - 397, 1058, 845, 980, 451, 286, 1280, 1279, 1281, 57, - 58, -568, 974, 148, 59, 1113, 60, 243, 244, 61, + 835, 836, 837, 838, 839, 840, 1082, 433, -569, 796, + 797, 798, 799, 848, 820, 818, 819, 831, 815, 816, + 375,-32766, 807, 813, 814, 821, 822, 824, 823, 138, + 825, 826, 1155, 324, 381, 286, 743, 817, 828, 827, + 49, 50, 51, 525, 52, 53, 1059, -110, 397, 852, + 54, 55, -110, 56, -110, 619, -85, 81, 451, 304, + 1362, 324, -110, -110, -110, -110, -110, -110, -110, -110, + -110, -110, -110, 157, 938, -569, -569, 292, 979, 980, + -32766,-32766, 845, 981, 452, 286, 1281, 1280, 1282, 57, + 58, -569, 975, 849, 59, 1114, 60, 243, 244, 61, 62, 63, 64, 65, 66, 67, 68,-32766, 28, 265, - 69, 449, 526, 452, -347, 1055, 1311, 1312, 527, 938, - 852, 1055, 762, 761, 1309, 42, 20, 528, 938, 529, - 938, 530, 74, 531, 453, 701, 532, 533, 322, 843, - 1058, 44, 45, 455, 384, 383, 1058, 46, 534, 728, - -569, 235, 454, 373, 340, 858, 1285, 928, 729, 938, - 1271, -567, 847,-32766, 282, 536, 537, 538, 149, 725, - 282, 702, -78, -373, 1278, -373, 151, 540, 541, -58, - 1297, 1298, 1299, 1300, 1302, 1294, 1295, 296, 1058, 730, - -32766,-32766,-32766, 1301, 1296, 703, 704, 1280, 1279, 1281, - 297, -565, 928, 70, -154, -154, -154, 317, 318, 322, - 1276, 928, 291, 928, 1280, 1279, 1281, -569, -569, -154, - 282, -154, -57, -154, 753, -154, 139, 1055, -567, -567, - 322, 762, 761, -569, 1057, 382, 940, 852, 152, 399, - 723, 7, 928, 153, -567, -575, 978, 979, 469, 470, - 471, 535, 1058, 1280, 1279, 1281, -574, 102, 103, 914, - 974, -110, -110, -110, 28, 266,-32766,-32766, -565, -565, - 668, 21, -110, -110, 687, 688, 852, -110, 155, 48, - 1309, 940, 385, 386, -565, 723, -110, 147, 415, 880, - 940, 881, 940, 33, 723,-32766, 723, -154, 391, 392, + 69, 449, 526, 453, -348, 1056, 1312, 1313, 527, 938, + 852, 1056, -85, 454, 1310, 42, 20, 528, 938, 529, + 938, 530, 74, 531, 858, 701, 532, 533, 324, 843, + 1059, 44, 45, 455, 384, 383, 1059, 46, 534, 728, + -570, 235, 149, 373, 340, 151, 1286, 928, 729, 938, + 1272, -568, 847,-32766, 282, 536, 537, 538, 1366, 725, + 282, 702, 762, 761, 1279, 1365, 152, 540, 541, -78, + 1298, 1299, 1300, 1301, 1303, 1295, 1296, 296, 1059, 730, + 469, 470, 471, 1302, 1297, 703, 704, 1281, 1280, 1282, + 297, -566, 928, 70, -154, -154, -154, 319, 320, 324, + 1277, 928, 291, 928, 1281, 1280, 1282, -570, -570, -154, + 282, -154, 153, -154, 753, -154, 139, 1056, -568, -568, + 324, 762, 761, -570, 1058, 382, 940, 852, 155, 399, + 723, 7, 928, 33, -568, -576, 979, 980, -58, 963, + 962, 535, 1059, 1281, 1280, 1282, -575, 843, -57, 914, + 975, -110, -110, -110, 28, 266, 102, 103, -566, -566, + -32766,-32766, -110, -110, 668, 21, 852, -110, 123, 48, + 1310, 940, 687, 688, -566, 723, -110, 880, 124, 881, + 940, 135, 940, 136, 723,-32766, 723, -154, 142, 961, 32, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 659, 660, 1271, 297, 762, 761, - 74, 995, 123, 938, 124, 723, 322, -4, 938, -607, - 938, -607, 135, 540, 541, 136, 1297, 1298, 1299, 1300, - 1302, 1294, 1295, 1187, 1189, -307, 300, 301, -566, 1301, - 1296, 762, 761, 733, -565,-32766, 142, 156, 158, 72, - 740, 1278, 380, 159, 318, 322, 160, -87,-32766,-32766, - -32766, 287,-32766, -303,-32766, -84,-32766, -78, 280,-32766, - -73, 275, 387, 388,-32766,-32766,-32766, -72,-32766, -71, - -32766,-32766, 432, -70, 1278, -69,-32766, 429, 28, 265, - -68,-32766,-32766,-32766, -67,-32766, 928,-32766,-32766,-32766, - 852, 928,-32766, 928, 1309, -566, -566,-32766,-32766,-32766, - -66, -565, -565,-32766,-32766, -65, -46, -18, 140,-32766, - 429, -566, 274, 382, 283, 445, 739, -565, 297, 73, - 295,-32766, 742, -573, 978, 979, 937, 145, 281, 535, - 1271, 28, 266, 284, 285, 330, 109, 539, 974, -110, - -110, -110, 288, 852,-32766,-32766,-32766, 1309, 541, 125, - 1297, 1298, 1299, 1300, 1302, 1294, 1295, 293, 294, 144, - 955, 11, 843, 1301, 1296, 940, 712, 697, 590, 723, - 940, 1392, 940, 72, 723, -4, 723,-32766, 318, 322, - -50, 690, 305, 1271, 852, 1145, 714, 669, 975, 302, - 309, 657, 303, 1316, -531, 1318, 596, 674,-32766, -521, - 8, 541, 297, 1297, 1298, 1299, 1300, 1302, 1294, 1295, - 10, 476, 504, 137, 40, 27, 1301, 1296, 675, 691, - 623, 1244, 957,-32766, 379, 851, 72, 34, 41, 1278, - 322, 318, 322, 748, 0, 749,-32766,-32766,-32766, -277, - -32766, 0,-32766, 871,-32766, 0, 0,-32766, 1306, 0, + 119, 120, 121, 122, 147, 415, 1272, 297, 762, 761, + 74, 996, 156, 938, 158, 723, 324, -4, 938, -608, + 938, -608, 159, 540, 541, 160, 1298, 1299, 1300, 1301, + 1303, 1295, 1296, 1188, 1190, -308, 300, 301, -567, 1302, + 1297, 762, 761, 733, -566,-32766, 385, 386, -304, 72, + 740, 1279, 380, -87, 320, 324, 391, 392,-32766,-32766, + -32766, -84,-32766, -78,-32766, -73,-32766, 659, 660,-32766, + -72, -71, 387, 388,-32766,-32766,-32766, -70,-32766, -69, + -32766,-32766, 432, -68, 1279, -67,-32766, 429, 28, 265, + -66,-32766,-32766,-32766, -65,-32766, 928,-32766,-32766,-32766, + 852, 928,-32766, 928, 1310, -567, -567,-32766,-32766,-32766, + -46, -566, -566,-32766,-32766, -18, 140, 274, 283,-32766, + 429, -567, 739, 382, 742, 445, 937, -566, 297, 73, + 295,-32766, 145, -574, 979, 980, 287, 280, 281, 535, + 1272, 28, 266, 284, 285, 330, 275, 539, 975, -110, + -110, -110, 288, 852,-32766,-32766,-32766, 1310, 541, 125, + 1298, 1299, 1300, 1301, 1303, 1295, 1296, 293, 294, 109, + 955, 11, 843, 1302, 1297, 940, 144, 712, 852, 723, + 940, 697, 940, 72, 723, -4, 723, 1146, 320, 324, + -50, 10,-32766, 1272, 1393, 476, 657, 976, 303, 302, + 311, 590, 305, 669, -532, 1317, 714,-32766, 1319, -522, + 690, 541, 851, 1298, 1299, 1300, 1301, 1303, 1295, 1296, + 674, 675, 504, 137, 40, 8, 1302, 1297, 691, 27, + 379, 596, 623,-32766, 1307, 297, 72, 414, 957, 1279, + 0, 320, 324, -602, 41, 748,-32766,-32766,-32766, 0, + -32766, 0,-32766, 749,-32766, 0, 0,-32766, 0, 0, 0, 0,-32766,-32766,-32766, 938,-32766, 0,-32766,-32766, - 0, 0, 1278, 0,-32766, 429, 0, 919, 0,-32766, - -32766,-32766, 1019,-32766, 996,-32766,-32766,-32766, 938, 1003, - -32766, 863, 1310, 0, 0,-32766,-32766,-32766, 993,-32766, - 1004,-32766,-32766, 917, 991, 1278, 1116,-32766, 429, 1119, - 1120, 1117,-32766,-32766,-32766, 1156,-32766, 1118,-32766,-32766, - -32766, 1124, -601,-32766, 1333, 1350, 1383, 499,-32766,-32766, - -32766, 662,-32766, -600,-32766,-32766, -599, -575, 1278, 603, - -32766, 429, -574, -573, -572,-32766,-32766,-32766, 928,-32766, - -515,-32766,-32766,-32766, 1, 29,-32766, -275, 30, 39, - 43,-32766,-32766,-32766, -252, -252, -252,-32766,-32766, 71, - 382, 928, 75,-32766, 429, 76, 77, 78, 1285, 79, - 80, 978, 979, 141, 150,-32766, 535, -251, -251, -251, - -274, 154, 241, 382, 914, 974, -110, -110, -110, 326, - 361, 362, 363, 364, 978, 979, 365, 366, -16, 535, - 367, 368, 369, 370, 371, 374, 446, 914, 974, -110, - -110, -110,-32766, 13, 568, 372, 0, 940, 1278, 14, - 414, 723, -252, 15, 16,-32766,-32766,-32766, 18,-32766, - 355,-32766, 413,-32766, 495, 496,-32766, 503, 506, 507, - 940,-32766,-32766,-32766, 723, -251, 508,-32766,-32766, 852, - 509, 513, 514,-32766, 429, 515, 522, 601, 707, 1084, - 1227, 1307, 1083, 1064, 1266,-32766, 1060, -279, -102, 12, - 17, 22, 313, 412, 615, 620, 648, 713, 1231, 1284, - 1228, 1362, 0, 316, -110, -110, 376, 724, 727, -110, + 0, 0, 1279, 0,-32766, 429, 0, 0, 0,-32766, + -32766,-32766, 871,-32766, 863,-32766,-32766,-32766, 938, 919, + -32766, 1334, 1020, 1311, 0,-32766,-32766,-32766, 997,-32766, + 1004,-32766,-32766, 994, 1005, 1279, 917,-32766, 429, 992, + 1117, 1120,-32766,-32766,-32766, 1121,-32766, 1118,-32766,-32766, + -32766, 1157, -601,-32766, 1119, 1125, -278, 499,-32766,-32766, + -32766, 1351,-32766, 1384,-32766,-32766, 662, -276, 1279, 603, + -32766, 429, -600, -576, -575,-32766,-32766,-32766, 928,-32766, + -574,-32766,-32766,-32766, -573, -516,-32766, -275, 1, 29, + 30,-32766,-32766,-32766, -253, -253, -253,-32766,-32766, 39, + 382, 928, 43,-32766, 429, 71, 75, 76, 1286, 77, + 78, 979, 980, 79, 80,-32766, 535, -252, -252, -252, + 13, 141, 150, 382, 914, 975, -110, -110, -110, 154, + 241, 326, 361, 362, 979, 980, 363, 364, -16, 535, + 365, 366, 367, 368, 369, 370, 371, 914, 975, -110, + -110, -110,-32766, 14, 374, 446, 568, 940, 1279, 15, + 372, 723, -253, 16, 18,-32766,-32766,-32766, 355,-32766, + 413,-32766, 495,-32766, 496, 503,-32766, 506, 507, 508, + 940,-32766,-32766,-32766, 723, -252, 509,-32766,-32766, 852, + 513, 514, 515,-32766, 429, 522, 601, 707, 1085, 1228, + 1308, 1084, 1065, 1267, 1061,-32766, -280, -102, 12, 17, + 22, 315, 412, 615, 620, 648, 713, 1232, 1285, 1229, + 1363, 0, 34, 318, -110, -110, 376, 724, 727, -110, 731, 732, 734, 735, 736, 737, 741, 753, -110, 726, - 754, 0, 418, 745, 915, 1387, 0,-32766, 1389, 874, - 873, 968, 1011, 1388, 967, 965, 966, 969, 1259, 948, - 958, 946, 1155, 1151, 1105, 1001, 1002, 646, 1386, 297, - 1344, 1359, 74, 0, 0, 0, 0, 0, 322 + 754, 0, 418, 745, 915, 1388, 0,-32766, 1390, 874, + 873, 969, 1012, 1389, 968, 966, 967, 970, 1260, 948, + 958, 946, 1156, 1152, 1106, 1002, 1003, 646, 1387, 297, + 1345, 1360, 74, 1245, 0, 0, 324, 0, 324 ); protected array $actionCheck = array( @@ -531,109 +531,109 @@ class Php8 extends \PhpParser\ParserAbstract 80, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 9, 10, 11, 1, 37, 38, 30, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 31, 30, 9, 10, 57, 116, 117, 118, 119, + 43, 31, 30, 116, 8, 57, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 106, 107, 108, 71, - 72, 73, 74, 75, 76, 77, 116, 80, 80, 150, + 72, 73, 74, 75, 76, 77, 116, 140, 80, 150, 70, 151, 152, 70, 30, 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, 8, 162, 8, 126, 127, 128, 129, 14, 131, + 122, 106, 162, 108, 126, 127, 128, 129, 8, 131, 132, 133, 134, 135, 136, 8, 8, 139, 140, 141, 142, 143, 144, 145, 70, 147, 148, 137, 138, 167, - 137, 138, 154, 155, 156, 8, 158, 160, 2, 3, + 137, 138, 154, 155, 156, 8, 158, 14, 2, 3, 4, 5, 6, 7, 166, 9, 10, 11, 12, 13, 116, 8, 167, 119, 120, 121, 122, 123, 124, 125, 9, 10, 11, 163, 51, 52, 53, 54, 55, 106, 57, 108, 116, 37, 38, 141, 163, 9, 10, 11, 8, 30, 69, 32, 33, 34, 35, 36, 37, 38, - 116, 137, 138, 57, 9, 10, 11, 141, 30, 165, + 9, 137, 138, 57, 9, 10, 11, 141, 30, 165, 32, 33, 34, 35, 36, 8, 8, 71, 72, 73, - 74, 75, 76, 77, 140, 30, 80, 32, 33, 34, + 74, 75, 76, 77, 8, 30, 80, 32, 33, 34, 35, 165, 159, 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, 73, - 166, 166, 126, 127, 128, 129, 80, 131, 132, 133, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 9, + 10, 11, 126, 127, 128, 129, 166, 131, 132, 133, 134, 135, 136, 1, 166, 139, 140, 141, 142, 143, - 144, 145, 8, 147, 148, 9, 9, 10, 11, 31, + 144, 145, 8, 147, 148, 14, 9, 10, 11, 166, 154, 155, 156, 14, 158, 2, 3, 4, 5, 6, - 7, 1, 9, 10, 11, 12, 13, 30, 122, 32, + 7, 1, 9, 10, 11, 12, 13, 30, 101, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 8, 57, 9, 10, 11, 44, 45, + 53, 54, 55, 126, 57, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 163, 69, 8, 52, 167, - 57, 9, 10, 11, 82, 97, 30, 1, 32, 33, + 57, 9, 10, 11, 82, 8, 30, 1, 32, 33, 34, 106, 107, 166, 71, 72, 73, 74, 75, 76, 77, 116, 30, 80, 32, 33, 80, 8, 1, 83, 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, 1, 80, 70, 126, - 127, 128, 129, 1, 131, 132, 133, 134, 135, 136, - 8, 101, 139, 140, 141, 142, 143, 144, 145, 167, + 127, 128, 129, 80, 131, 132, 133, 134, 135, 136, + 8, 116, 139, 140, 141, 142, 143, 144, 145, 167, 147, 148, 163, 171, 8, 30, 167, 154, 155, 156, - 2, 3, 4, 5, 6, 7, 126, 101, 8, 82, - 12, 13, 106, 15, 108, 1, 116, 167, 8, 113, + 2, 3, 4, 5, 6, 7, 141, 101, 8, 82, + 12, 13, 106, 15, 108, 1, 31, 167, 8, 113, 1, 171, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 16, 1, 137, 138, 30, 117, 118, - 8, 141, 80, 122, 8, 30, 159, 160, 161, 51, - 52, 153, 131, 14, 56, 168, 58, 59, 60, 61, + 9, 10, 80, 122, 8, 30, 159, 160, 161, 51, + 52, 153, 131, 160, 56, 168, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 140, 70, 71, 72, 73, 74, 8, 168, 116, 78, 79, 80, 1, - 82, 116, 37, 38, 86, 87, 88, 89, 1, 91, + 82, 116, 97, 8, 86, 87, 88, 89, 1, 91, 1, 93, 165, 95, 8, 80, 98, 99, 171, 80, 141, 103, 104, 105, 106, 107, 141, 109, 110, 31, - 70, 97, 8, 115, 116, 8, 1, 84, 31, 1, - 122, 70, 160, 116, 165, 127, 128, 129, 14, 167, - 165, 116, 16, 106, 80, 108, 14, 139, 140, 16, + 70, 97, 14, 115, 116, 14, 1, 84, 31, 1, + 122, 70, 160, 116, 165, 127, 128, 129, 1, 167, + 165, 116, 37, 38, 80, 8, 14, 139, 140, 16, 142, 143, 144, 145, 146, 147, 148, 149, 141, 31, - 9, 10, 11, 155, 156, 140, 141, 159, 160, 161, + 132, 133, 134, 155, 156, 140, 141, 159, 160, 161, 162, 70, 84, 165, 75, 76, 77, 169, 170, 171, 116, 84, 165, 84, 159, 160, 161, 137, 138, 90, - 165, 92, 16, 94, 167, 96, 167, 116, 137, 138, + 165, 92, 14, 94, 167, 96, 167, 116, 137, 138, 171, 37, 38, 153, 140, 106, 163, 82, 14, 106, - 167, 108, 84, 14, 153, 165, 117, 118, 132, 133, - 134, 122, 141, 159, 160, 161, 165, 49, 50, 130, - 131, 132, 133, 134, 70, 71, 51, 52, 137, 138, - 75, 76, 117, 118, 75, 76, 82, 122, 14, 70, - 86, 163, 106, 107, 153, 167, 131, 101, 102, 106, - 163, 108, 163, 14, 167, 140, 167, 168, 106, 107, + 167, 108, 84, 14, 153, 165, 117, 118, 16, 72, + 73, 122, 141, 159, 160, 161, 165, 80, 16, 130, + 131, 132, 133, 134, 70, 71, 49, 50, 137, 138, + 51, 52, 117, 118, 75, 76, 82, 122, 16, 70, + 86, 163, 75, 76, 153, 167, 131, 106, 16, 108, + 163, 16, 163, 16, 167, 140, 167, 168, 16, 122, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 111, 112, 122, 162, 37, 38, + 26, 27, 28, 29, 101, 102, 122, 162, 37, 38, 165, 163, 16, 1, 16, 167, 171, 0, 1, 164, 1, 166, 16, 139, 140, 16, 142, 143, 144, 145, 146, 147, 148, 59, 60, 35, 137, 138, 70, 155, - 156, 37, 38, 31, 70, 74, 16, 16, 16, 165, - 31, 80, 153, 16, 170, 171, 16, 31, 87, 88, - 89, 37, 91, 35, 93, 31, 95, 31, 35, 98, - 31, 57, 106, 107, 103, 104, 105, 31, 74, 31, + 156, 37, 38, 31, 70, 74, 106, 107, 35, 165, + 31, 80, 153, 31, 170, 171, 106, 107, 87, 88, + 89, 31, 91, 31, 93, 31, 95, 111, 112, 98, + 31, 31, 106, 107, 103, 104, 105, 31, 74, 31, 109, 110, 116, 31, 80, 31, 115, 116, 70, 71, 31, 87, 88, 89, 31, 91, 84, 93, 127, 95, 82, 84, 98, 84, 86, 137, 138, 103, 104, 105, 31, 137, 138, 109, 110, 31, 31, 31, 31, 115, 116, 153, 31, 106, 31, 108, 31, 153, 162, 158, - 113, 127, 31, 165, 117, 118, 31, 31, 35, 122, - 122, 70, 71, 35, 35, 35, 69, 130, 131, 132, + 113, 127, 31, 165, 117, 118, 37, 35, 35, 122, + 122, 70, 71, 35, 35, 35, 57, 130, 131, 132, 133, 134, 37, 82, 9, 10, 11, 86, 140, 14, - 142, 143, 144, 145, 146, 147, 148, 37, 37, 70, - 38, 154, 80, 155, 156, 163, 80, 77, 89, 167, - 163, 83, 163, 165, 167, 168, 167, 85, 170, 171, - 31, 94, 114, 122, 82, 82, 92, 90, 131, 135, - 135, 113, 136, 150, 153, 150, 157, 96, 140, 153, - 153, 140, 162, 142, 143, 144, 145, 146, 147, 148, - 97, 97, 97, 31, 163, 153, 155, 156, 100, 100, - 157, 169, 158, 74, 153, 159, 165, 167, 163, 80, - 171, 170, 171, 163, -1, 163, 87, 88, 89, 166, - 91, -1, 93, 163, 95, -1, -1, 98, 164, -1, + 142, 143, 144, 145, 146, 147, 148, 37, 37, 69, + 38, 154, 80, 155, 156, 163, 70, 80, 82, 167, + 163, 77, 163, 165, 167, 168, 167, 82, 170, 171, + 31, 97, 85, 122, 83, 97, 113, 131, 136, 135, + 135, 89, 114, 90, 153, 150, 92, 140, 150, 153, + 94, 140, 159, 142, 143, 144, 145, 146, 147, 148, + 96, 100, 97, 31, 163, 153, 155, 156, 100, 153, + 153, 157, 157, 74, 164, 162, 165, 168, 158, 80, + -1, 170, 171, 165, 163, 163, 87, 88, 89, -1, + 91, -1, 93, 163, 95, -1, -1, 98, -1, -1, -1, -1, 103, 104, 105, 1, 74, -1, 109, 110, - -1, -1, 80, -1, 115, 116, -1, 163, -1, 87, - 88, 89, 163, 91, 163, 93, 127, 95, 1, 163, - 98, 164, 170, -1, -1, 103, 104, 105, 163, 74, + -1, -1, 80, -1, 115, 116, -1, -1, -1, 87, + 88, 89, 163, 91, 164, 93, 127, 95, 1, 163, + 98, 164, 163, 170, -1, 103, 104, 105, 163, 74, 163, 109, 110, 163, 163, 80, 163, 115, 116, 163, 163, 163, 87, 88, 89, 163, 91, 163, 93, 127, - 95, 163, 165, 98, 164, 164, 164, 102, 103, 104, - 105, 164, 74, 165, 109, 110, 165, 165, 80, 81, + 95, 163, 165, 98, 163, 163, 166, 102, 103, 104, + 105, 164, 74, 164, 109, 110, 164, 166, 80, 81, 115, 116, 165, 165, 165, 87, 88, 89, 84, 91, 165, 93, 127, 95, 165, 165, 98, 166, 165, 165, 165, 103, 104, 105, 100, 101, 102, 109, 110, 165, @@ -642,25 +642,25 @@ class Php8 extends \PhpParser\ParserAbstract 166, 165, 165, 106, 130, 131, 132, 133, 134, 165, 165, 165, 165, 165, 117, 118, 165, 165, 31, 122, 165, 165, 165, 165, 165, 165, 165, 130, 131, 132, - 133, 134, 74, 166, 165, 165, -1, 163, 80, 166, - 168, 167, 168, 166, 166, 87, 88, 89, 166, 91, + 133, 134, 74, 166, 165, 165, 165, 163, 80, 166, + 165, 167, 168, 166, 166, 87, 88, 89, 166, 91, 166, 93, 166, 95, 166, 166, 98, 166, 166, 166, 163, 103, 104, 105, 167, 168, 166, 109, 110, 82, 166, 166, 166, 115, 116, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 127, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, -1, 167, 117, 118, 167, 167, 167, 122, + 166, -1, 167, 167, 117, 118, 167, 167, 167, 122, 167, 167, 167, 167, 167, 167, 167, 167, 131, 167, 167, -1, 168, 168, 168, 168, -1, 140, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 162, - 168, 168, 165, -1, -1, -1, -1, -1, 171 + 168, 168, 165, 169, -1, -1, 171, -1, 171 ); protected array $actionBase = array( 0, -2, 156, 559, 757, 1004, 1027, 485, 292, 357, - -60, 432, 557, 752, 752, 759, 752, 548, 588, 894, - 503, 503, 503, 836, 313, 313, 836, 313, 711, 711, + -60, 432, 557, 752, 752, 759, 752, 548, 588, 901, + 503, 503, 503, 837, 313, 313, 837, 313, 711, 711, 711, 711, 744, 744, 965, 965, 998, 932, 899, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, @@ -674,63 +674,63 @@ class Php8 extends \PhpParser\ParserAbstract 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 33, 20, 484, 1080, 709, 1056, 1062, 1058, - 1063, 1054, 1053, 1057, 1059, 1064, 1110, 1112, 846, 1109, - 1113, 1060, 907, 1055, 1061, 892, 297, 297, 297, 297, + 1088, 1088, 33, 20, 484, 1080, 659, 1055, 1061, 1057, + 1062, 1053, 1052, 1056, 1058, 1063, 1110, 1112, 841, 1109, + 1113, 1059, 912, 1054, 1060, 898, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 296, 885, 44, 611, 611, 611, 611, 611, - 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, - 611, 611, 611, 611, 611, 624, 624, 22, 22, 22, + 297, 297, 201, 885, 501, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 624, 624, 22, 22, 22, 362, 811, 758, 811, 811, 811, 811, 811, 811, 811, 811, 346, 205, 188, 714, 171, 171, 7, 7, 7, 7, 7, 376, 1117, 54, 585, 585, 314, 314, 314, - 314, 350, 515, 497, 435, 397, -40, 638, 477, 706, + 314, 227, 565, 15, 435, 397, -40, 647, 477, 706, 429, 429, 541, 541, 76, 76, 541, 541, 541, 133, - 133, 370, 370, 370, 370, 83, -71, 808, 489, 489, - 489, 489, 808, 808, 808, 808, 795, 862, 808, 808, - 808, 510, 521, 708, 645, 645, 613, -70, -70, 613, - 391, -70, 320, 975, 316, 982, 94, 807, 275, 595, - 94, 1000, 368, 561, 561, 639, 561, 561, 561, 816, - 606, 816, 1052, 842, 842, 825, 779, 898, 1082, 1065, - 868, 1107, 869, 1108, 1083, 299, 546, 10, 13, 74, - 776, 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051, 1051, - 1051, 1051, 1051, 809, 515, 1052, -3, 1105, 1106, 809, - 809, 809, 515, 515, 515, 515, 515, 515, 515, 515, - 826, 515, 515, 633, -3, 625, 629, -3, 850, 515, + 133, 335, 335, 335, 335, 83, -71, 807, 489, 489, + 489, 489, 807, 807, 807, 807, 798, 863, 807, 977, + 986, 807, 807, 510, 521, 708, 649, 649, 611, -70, + -70, 611, 391, -70, 320, 316, -63, 806, 275, 595, + -63, 1005, 368, 561, 561, 639, 561, 561, 561, 793, + 680, 793, 1051, 847, 847, 819, 774, 902, 1082, 1064, + 861, 1107, 868, 1108, 1083, 299, 488, 10, 13, 74, + 772, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, + 1050, 1050, 1050, 1115, 565, 1051, 363, 1105, 1106, 1115, + 1115, 1115, 565, 565, 565, 565, 565, 565, 565, 565, + 824, 565, 565, 696, 363, 629, 637, 363, 850, 565, 796, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, -18, 33, 33, 20, 5, 5, 33, 202, - 37, 5, 5, 5, 487, 5, 33, 33, 33, 606, - 754, 789, 622, 278, 813, 217, 754, 754, 754, 115, - 114, 128, 740, 768, 563, 832, 832, 832, 853, 929, - 929, 832, 852, 832, 853, 832, 832, 929, 929, 790, - 929, 163, 506, 389, 480, 535, 929, 294, 832, 832, - 832, 832, 805, 929, 113, 556, 832, 218, 192, 832, - 832, 805, 804, 833, 806, 929, 929, 929, 805, 470, - 806, 806, 806, 820, 822, 828, 831, 359, 345, 577, - 147, 872, 831, 831, 832, 502, 828, 831, 828, 831, - 814, 831, 831, 831, 828, 831, 852, 456, 831, 771, - 574, 127, 831, 832, 19, 944, 947, 766, 950, 934, - 951, 991, 952, 954, 1070, 925, 967, 935, 955, 999, - 933, 930, 845, 736, 738, 797, 791, 919, 817, 817, - 817, 912, 917, 817, 817, 817, 817, 817, 817, 817, - 817, 736, 834, 821, 829, 976, 746, 749, 1041, 793, - 1086, 802, 975, 944, 954, 774, 935, 955, 933, 930, - 824, 819, 799, 803, 794, 792, 786, 788, 827, 1043, - 958, 801, 770, 1012, 977, 1085, 1066, 978, 981, 1016, - 1044, 830, 1045, 1087, 839, 1090, 1091, 867, 985, 1071, - 817, 911, 897, 900, 982, 918, 736, 901, 1046, 997, - 810, 1018, 1019, 1069, 864, 838, 902, 1092, 986, 987, - 988, 1073, 1074, 815, 1003, 823, 1021, 865, 1002, 1022, - 1023, 1030, 1034, 1075, 1093, 1076, 908, 1077, 854, 847, - 931, 851, 1094, 509, 848, 849, 871, 990, 584, 974, - 1078, 1084, 1095, 1035, 1036, 1039, 1096, 1097, 959, 859, - 1007, 837, 1008, 964, 861, 866, 592, 870, 1047, 773, - 843, 855, 654, 659, 1098, 1099, 1100, 966, 835, 840, - 875, 877, 1048, 764, 1050, 1101, 694, 880, 1102, 1042, - 772, 777, 586, 636, 593, 780, 844, 1079, 812, 818, - 863, 989, 777, 841, 881, 1103, 883, 886, 887, 1040, - 888, 1014, 1104, 0, 0, 0, 0, 0, 0, 0, + 37, 5, 5, 5, 487, 5, 33, 33, 33, 680, + 829, 814, 690, 455, 815, 217, 829, 829, 829, 120, + 143, 128, 740, 753, 563, 832, 832, 832, 845, 933, + 933, 832, 836, 832, 845, 832, 832, 933, 933, 813, + 933, 163, 480, 367, 456, 506, 933, 226, 832, 832, + 832, 832, 805, 933, 46, 535, 832, 218, 192, 832, + 832, 805, 804, 827, 802, 933, 933, 933, 805, 442, + 802, 802, 802, 822, 830, 823, 826, 359, 294, 556, + 147, 872, 826, 826, 832, 470, 823, 826, 823, 826, + 820, 826, 826, 826, 823, 826, 836, 389, 826, 736, + 545, 127, 826, 832, 19, 950, 951, 762, 952, 944, + 954, 1000, 955, 958, 1070, 930, 975, 947, 959, 1001, + 935, 934, 835, 692, 702, 812, 791, 929, 840, 840, + 840, 918, 919, 840, 840, 840, 840, 840, 840, 840, + 840, 692, 810, 817, 852, 978, 705, 707, 1040, 795, + 1086, 1114, 977, 950, 958, 770, 947, 959, 935, 934, + 803, 799, 792, 794, 788, 786, 779, 780, 825, 1042, + 966, 801, 712, 1008, 981, 1085, 1066, 982, 985, 1014, + 1043, 859, 1044, 1087, 846, 1090, 1091, 860, 987, 1071, + 840, 917, 818, 867, 986, 925, 692, 907, 1045, 964, + 1065, 1016, 1018, 1069, 838, 851, 909, 1092, 988, 989, + 990, 1073, 1074, 821, 997, 900, 1019, 865, 809, 1021, + 1022, 1023, 1030, 1075, 1093, 1076, 897, 1077, 866, 853, + 911, 864, 1094, 291, 848, 849, 871, 999, 568, 976, + 1078, 1084, 1095, 1034, 1035, 1036, 1096, 1097, 967, 869, + 1003, 856, 1007, 931, 875, 877, 571, 870, 1046, 842, + 843, 855, 592, 638, 1098, 1099, 1100, 974, 831, 844, + 880, 881, 1047, 839, 1048, 1101, 654, 883, 1102, 1041, + 738, 746, 593, 672, 662, 749, 854, 1079, 816, 828, + 834, 991, 746, 833, 886, 1103, 887, 888, 892, 1039, + 894, 1012, 1104, 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, 468, 468, 468, @@ -759,34 +759,34 @@ class Php8 extends \PhpParser\ParserAbstract 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 524, 524, 297, 297, 297, 297, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 297, 297, 297, - 0, 297, 297, 297, 297, 297, 297, 297, 790, 524, + 0, 297, 297, 297, 297, 297, 297, 297, 813, 524, 524, 524, 524, 133, 133, 133, 133, -95, -95, -95, 524, 524, 391, 133, 524, 391, 524, 524, 524, 524, 524, 524, 524, 524, 524, 0, 0, 524, 524, 524, - 524, -3, -70, 524, 852, 852, 852, 852, 524, 524, - 524, 524, -70, -70, 524, 524, 524, 0, 0, 0, - 133, 133, -3, 0, 0, -3, 0, 0, 852, 206, - 852, 206, 524, 391, 790, 442, 524, 299, 0, 0, - 0, 0, 0, 0, 0, -3, 852, -3, 515, -70, - -70, 515, 515, 5, 33, 442, 616, 616, 616, 616, - 33, 0, 0, 0, 0, 0, 606, 790, 790, 790, - 790, 790, 790, 790, 790, 790, 790, 790, 790, 852, - 0, 790, 0, 790, 790, 852, 852, 852, 0, 0, - 0, 0, 0, 0, 0, 0, 929, 0, 0, 0, - 0, 0, 0, 0, 852, 0, 929, 0, 0, 0, + 524, 363, -70, 524, 836, 836, 836, 836, 524, 524, + 524, 524, -70, -70, 524, 607, 607, 524, 524, 0, + 0, 0, 133, 133, 363, 0, 0, 363, 0, 0, + 836, 836, 524, 391, 813, 597, 524, 299, 0, 0, + 0, 0, 0, 0, 0, 363, 836, 363, 565, -70, + -70, 565, 565, 5, 33, 597, 643, 643, 643, 643, + 33, 0, 0, 0, 0, 0, 680, 813, 813, 813, + 813, 813, 813, 813, 813, 813, 813, 813, 813, 836, + 0, 813, 0, 813, 813, 836, 836, 836, 0, 0, + 0, 0, 0, 0, 0, 0, 933, 0, 0, 0, + 0, 0, 0, 0, 836, 0, 933, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 852, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 817, 864, 0, 0, - 864, 0, 817, 817, 817, 0, 0, 0, 870, 764 + 0, 0, 0, 0, 0, 0, 836, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 840, 838, 0, 0, + 838, 0, 840, 840, 840, 0, 0, 0, 870, 839 ); protected array $actionDefault = array( 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 619, 619, - 619, 619,32767,32767, 256, 102,32767,32767, 490, 407, - 407, 407,32767,32767, 563, 563, 563, 563, 563,32767, - 32767,32767,32767,32767,32767, 490,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 100,32767, 620, 620, + 620, 620,32767,32767, 257, 102,32767,32767, 491, 408, + 408, 408,32767,32767, 564, 564, 564, 564, 564,32767, + 32767,32767,32767,32767,32767, 491,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, @@ -794,149 +794,153 @@ class Php8 extends \PhpParser\ParserAbstract 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, 36, 7, 8, 10, - 11, 49, 17, 329, 100,32767,32767,32767,32767,32767, + 11, 49, 17, 330, 100,32767,32767,32767,32767,32767, 32767,32767,32767, 102,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 394, 612,32767,32767,32767, + 32767,32767,32767,32767,32767, 395, 613,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 494, 473, 474, 476, - 477, 406, 564, 618, 332, 615, 334, 405, 146, 344, - 335, 244, 260, 495, 261, 496, 499, 500, 217, 391, - 150, 151, 437, 491, 439, 489, 493, 438, 412, 418, - 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, - 429, 430, 410, 411, 492,32767,32767, 470, 469, 468, - 435,32767,32767,32767,32767,32767,32767,32767,32767, 102, - 32767, 436, 440, 443, 409, 441, 442, 459, 460, 457, - 458, 461,32767,32767, 321,32767,32767, 462, 463, 464, - 465, 372, 196, 370,32767,32767, 111, 444, 321, 111, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 450, - 451,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 495, 474, 475, 477, + 478, 407, 565, 619, 333, 616, 335, 406, 146, 345, + 336, 245, 261, 496, 262, 497, 500, 501, 218, 392, + 150, 151, 438, 492, 440, 490, 494, 439, 413, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, + 430, 431, 411, 412, 493,32767,32767, 471, 470, 469, + 436,32767,32767,32767,32767,32767,32767,32767,32767, 102, + 32767, 437, 441, 444, 410, 442, 443, 460, 461, 458, + 459, 462,32767,32767, 322,32767,32767, 463, 464, 465, + 466, 373, 196, 371,32767,32767, 111, 445, 322, 111, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 451, + 452,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, - 100, 507, 557, 467, 445, 446,32767, 532,32767, 102, - 32767, 534,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 559, 432, 434, 527, 613, 413, 616,32767, - 520, 100, 196,32767, 533, 196, 196,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 558,32767, 626, - 520, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 32767,32767, 100, 508, 558, 468, 446, 447,32767, 533, + 32767, 102,32767, 535,32767,32767,32767,32767,32767,32767, + 32767,32767, 560, 433, 435, 528, 614, 414, 617,32767, + 521, 100, 196,32767, 534, 196, 196,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 559,32767, 627, + 521, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, 196, 110,32767, 110, 110,32767, 32767, 100, 196, 196, 196, 196, 196, 196, 196, 196, - 535, 196, 196, 191,32767, 270, 272, 102, 581, 196, - 537,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 536, 196, 196, 191,32767, 271, 273, 102, 582, 196, + 538,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 394,32767,32767,32767,32767, 520, - 455, 139,32767, 522, 139, 565, 447, 448, 449, 565, - 565, 565, 317, 294,32767,32767,32767,32767,32767, 535, - 535, 100, 100, 100, 100,32767,32767,32767,32767, 111, - 506, 99, 99, 99, 99, 99, 103, 101,32767,32767, - 32767,32767, 225,32767, 101, 99,32767, 101, 101,32767, - 32767, 225, 227, 214, 229,32767, 585, 586, 225, 101, - 229, 229, 229, 249, 249, 509, 323, 101, 99, 101, - 101, 198, 323, 323,32767, 101, 509, 323, 509, 323, - 200, 323, 323, 323, 509, 323,32767, 101, 323, 216, - 99, 99, 323,32767,32767,32767,32767, 522,32767,32767, - 32767,32767,32767,32767,32767, 224,32767,32767,32767,32767, - 32767,32767,32767,32767, 552,32767, 570, 583, 453, 454, - 456, 569, 567, 478, 479, 480, 481, 482, 483, 484, - 486, 614,32767, 526,32767,32767,32767, 343,32767, 624, - 32767,32767,32767, 9, 74, 515, 42, 43, 51, 57, - 541, 542, 543, 544, 538, 539, 545, 540,32767,32767, + 32767,32767,32767,32767, 395,32767,32767,32767,32767, 521, + 456, 139,32767, 523, 139, 566, 448, 449, 450, 566, + 566, 566, 318, 295,32767,32767,32767,32767,32767, 536, + 536, 100, 100, 100, 100,32767,32767,32767,32767, 111, + 507, 99, 99, 99, 99, 99, 103, 101,32767,32767, + 32767,32767, 226,32767, 101, 99,32767, 101, 101,32767, + 32767, 226, 228, 215, 230,32767, 586, 587, 226, 101, + 230, 230, 230, 250, 250, 510, 324, 101, 99, 101, + 101, 198, 324, 324,32767, 101, 510, 324, 510, 324, + 200, 324, 324, 324, 510, 324,32767, 101, 324, 217, + 99, 99, 324,32767,32767,32767,32767, 523,32767,32767, + 32767,32767,32767,32767,32767, 225,32767,32767,32767,32767, + 32767,32767,32767,32767, 553,32767, 571, 584, 454, 455, + 457, 570, 568, 479, 480, 481, 482, 483, 484, 485, + 487, 615,32767, 527,32767,32767,32767, 344,32767, 625, + 32767,32767,32767, 9, 74, 516, 42, 43, 51, 57, + 542, 543, 544, 545, 539, 540, 546, 541,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 625,32767, 565,32767,32767,32767,32767, - 452, 547, 591,32767,32767, 566, 617,32767,32767,32767, + 32767,32767,32767, 626,32767, 566,32767,32767,32767,32767, + 453, 548, 592,32767,32767, 567, 618,32767,32767,32767, 32767,32767,32767,32767, 139,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 552,32767, 137,32767,32767, - 32767,32767,32767,32767,32767,32767, 548,32767,32767,32767, - 565,32767,32767,32767,32767, 319, 316,32767,32767,32767, + 32767,32767,32767,32767,32767, 553,32767, 137,32767,32767, + 32767,32767,32767,32767,32767,32767, 549,32767,32767,32767, + 566,32767,32767,32767,32767, 320, 317,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 565,32767,32767,32767,32767,32767, 296, - 32767, 313,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 566,32767,32767,32767,32767,32767, 297, + 32767, 314,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 390, 522, 299, 301, 302,32767,32767,32767,32767, 366, + 391, 523, 300, 302, 303,32767,32767,32767,32767, 367, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 153, 153, 3, 3, 346, 153, 153, - 153, 346, 346, 153, 346, 346, 346, 153, 153, 153, - 153, 153, 153, 153, 282, 186, 264, 267, 249, 249, - 153, 358, 153, 392, 392, 401 + 32767,32767,32767, 153, 153, 3, 3, 347, 153, 153, + 153, 347, 347, 153, 347, 347, 347, 153, 153, 153, + 153, 153, 153, 153, 283, 186, 265, 268, 250, 250, + 153, 359, 153, 393, 393, 402 ); protected array $goto = array( - 194, 194, 1056, 490, 708, 279, 276, 279, 279, 994, - 492, 551, 551, 911, 868, 911, 911, 551, 717, 551, - 551, 551, 551, 551, 551, 551, 551, 166, 166, 166, + 194, 194, 1057, 995, 708, 279, 276, 279, 279, 622, + 636, 639, 640, 641, 642, 663, 664, 665, 719, 721, + 717, 561, 561, 561, 561, 1088, 616, 166, 166, 166, 166, 218, 195, 191, 191, 176, 178, 213, 191, 191, 191, 191, 191, 192, 192, 192, 192, 192, 186, 187, 188, 189, 190, 215, 213, 216, 548, 549, 430, 550, - 553, 554, 555, 556, 557, 558, 559, 560, 1173, 167, + 553, 554, 555, 556, 557, 558, 559, 560, 1174, 167, 168, 169, 193, 170, 171, 172, 164, 173, 174, 175, 177, 212, 214, 217, 237, 240, 251, 252, 253, 255, 256, 257, 258, 259, 260, 261, 267, 268, 269, 270, - 277, 289, 290, 314, 315, 436, 437, 438, 610, 219, + 277, 289, 290, 316, 317, 436, 437, 438, 610, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 186, 187, 188, 189, 190, - 215, 1173, 196, 197, 198, 199, 238, 179, 180, 200, + 215, 1174, 196, 197, 198, 199, 238, 179, 180, 200, 181, 201, 197, 182, 239, 196, 163, 202, 203, 183, 204, 205, 206, 184, 207, 208, 165, 209, 210, 211, - 185, 872, 563, 1087, 563, 563, 869, 1104, 1376, 1376, - 478, 478, 595, 473, 563, 612, 747, 649, 651, 478, - 351, 671, 1222, 1376, 870, 695, 698, 1029, 706, 715, - 1025, 722, 1059, 1059, 693, 971, 466, 844, 1051, 1067, - 1068, 988, 988, 988, 988, 1379, 1379, 466, 982, 989, - 356, 356, 356, 356, 927, 922, 923, 936, 878, 924, - 875, 925, 926, 876, 879, 1018, 930, 883, 990, 428, - 746, 882, 343, 564, 1027, 1022, 440, 673, 904, 1110, - 1106, 1107, 435, 337, 333, 334, 336, 605, 439, 338, - 441, 650, 602, 344, 343, 611, 1123, 349, 1277, 1056, - 1277, 1277, 633, 670, 459, 459, 720, 459, 459, 1056, - 1277, 519, 711, 1056, 1121, 1056, 1056, 1056, 1056, 1056, - 1056, 1056, 1056, 1056, 850, 523, 1056, 1056, 1056, 1056, - 666, 667, 1277, 684, 685, 686, 1366, 1277, 1277, 1277, - 1277, 359, 1015, 1277, 1277, 1277, 1358, 1358, 1358, 1358, - 672, 359, 359, 403, 406, 613, 617, 468, 1062, 1061, - 468, 944, 359, 359, 401, 945, 359, 600, 850, 1393, - 850, 960, 1170, 960, 622, 636, 639, 640, 641, 642, - 663, 664, 665, 719, 721, 567, 1253, 963, 359, 359, - 1080, 1254, 1257, 964, 865, 1258, 678, 865, 572, 565, - 931, 450, 932, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 635, 635, 459, 448, 459, - 459, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, 1308, - 1308, 1130, 1158, 1131, 694, 323, 565, 572, 597, 598, - 325, 608, 614, 1338, 629, 630, 865, 1327, 1327, 487, - 1351, 1352, 25, 1327, 1327, 1327, 1327, 1327, 1327, 1327, - 1327, 1327, 1327, 1065, 1066, 424, 561, 561, 561, 561, - 1349, 616, 1349, 1349, 352, 353, 339, 1324, 1324, 643, - 645, 647, 1349, 1324, 1324, 1324, 1324, 1324, 1324, 1324, - 1324, 1324, 1324, 566, 592, 566, 434, 567, 624, 566, - 862, 592, 886, 404, 472, 1360, 1360, 1360, 1360, 271, - 320, 628, 320, 320, 247, 247, 481, 609, 482, 483, - 898, 321, 307, 885, 896, 552, 552, 1384, 1385, 1345, - 891, 552, 552, 552, 552, 552, 552, 552, 552, 552, - 552, 245, 245, 245, 245, 242, 248, 1272, 977, 416, - 417, 705, 894, 410, 682, 846, 683, 1268, 421, 422, - 423, 1270, 696, 888, 511, 425, 512, 705, 1153, 347, - 705, 331, 518, 1037, 5, 618, 6, 865, 949, 1160, - 1095, 899, 887, 1092, 1096, 750, 1347, 1347, 1095, 1093, - 1034, 986, 419, 716, 997, 1353, 1354, 1047, 890, 488, - 676, 1013, 606, 627, 1273, 1274, 884, 1260, 442, 411, - 900, 999, 378, 860, 0, 1097, 0, 987, 1267, 1144, - 1260, 0, 442, 0, 755, 755, 0, 0, 1063, 1063, - 0, 0, 1275, 1335, 1336, 677, 1074, 1070, 1071, 1142, - 903, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 185, 872, 563, 869, 563, 563, 595, 1105, 870, 351, + 747, 649, 651, 865, 563, 671, 865, 612, 428, 695, + 698, 1030, 706, 715, 1026, 722, 1060, 1060, 693, 972, + 633, 670, 1052, 1068, 1069, 844, 466, 911, 868, 911, + 911, 989, 989, 989, 989, 490, 468, 466, 904, 468, + 983, 990, 492, 602, 927, 922, 923, 936, 878, 924, + 875, 925, 926, 876, 879, 865, 930, 883, 1033, 1033, + 349, 882, 403, 406, 613, 617, 440, 673, 1367, 1111, + 1107, 1108, 435, 337, 333, 334, 336, 605, 439, 338, + 441, 650, 450, 356, 356, 356, 356, 473, 1278, 1057, + 1278, 1278, 478, 478, 459, 459, 1223, 459, 459, 1057, + 1278, 478, 931, 1057, 932, 1057, 1057, 1057, 1057, 1057, + 1057, 1057, 1057, 1057, 523, 401, 1057, 1057, 1057, 1057, + 666, 667, 1278, 684, 685, 686, 1016, 1278, 1278, 1278, + 1278, 850, 600, 1278, 359, 672, 1278, 1278, 1359, 1359, + 1359, 1359, 1063, 1062, 359, 359, 1171, 1254, 964, 960, + 960, 944, 1255, 1258, 965, 945, 1259, 359, 359, 635, + 635, 359, 886, 1394, 1081, 1309, 1309, 1309, 1309, 1309, + 1309, 1309, 1309, 1309, 1309, 850, 448, 850, 567, 694, + 898, 359, 359, 885, 1066, 1067, 865, 572, 565, 1131, + 1159, 1132, 862, 459, 459, 459, 459, 459, 459, 459, + 459, 459, 459, 459, 459, 1328, 1328, 459, 678, 459, + 459, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, + 1328, 339, 1377, 1377, 309, 565, 572, 597, 598, 310, + 608, 614, 343, 629, 630, 628, 1339, 1325, 1325, 1377, + 434, 25, 624, 1325, 1325, 1325, 1325, 1325, 1325, 1325, + 1325, 1325, 1325, 352, 353, 344, 343, 978, 424, 1380, + 1380, 410, 1350, 1019, 1350, 1350, 991, 891, 746, 552, + 552, 564, 1028, 1023, 1350, 552, 552, 552, 552, 552, + 552, 552, 552, 552, 552, 566, 592, 566, 705, 888, + 567, 566, 846, 592, 1154, 404, 472, 1361, 1361, 1361, + 1361, 987, 419, 716, 705, 323, 307, 705, 481, 609, + 482, 483, 899, 887, 1093, 1097, 896, 1354, 1355, 1385, + 1386, 551, 551, 1346, 5, 998, 6, 551, 1269, 551, + 551, 551, 551, 551, 551, 551, 551, 247, 247, 511, + 1273, 512, 271, 322, 894, 322, 322, 518, 988, 487, + 1352, 1353, 606, 627, 1271, 643, 645, 647, 1038, 1094, + 750, 1048, 411, 331, 245, 245, 245, 245, 242, 248, + 1143, 903, 1096, 488, 442, 1145, 416, 417, 1348, 1348, + 1096, 682, 1000, 683, 900, 421, 422, 423, 442, 696, + 378, 0, 425, 1098, 1064, 1064, 347, 1274, 1275, 0, + 1261, 677, 1075, 1071, 1072, 618, 860, 0, 949, 1161, + 0, 0, 0, 1261, 0, 0, 0, 0, 611, 1124, + 1035, 0, 0, 0, 0, 1276, 1336, 1337, 890, 720, + 676, 1014, 0, 0, 519, 711, 884, 1122, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1268, 0, + 0, 0, 0, 0, 0, 0, 0, 755, 755, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1032, 1032, 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, 250, 250 + 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, 250, 250 ); protected array $gotoCheck = array( - 42, 42, 73, 84, 73, 23, 23, 23, 23, 49, - 84, 162, 162, 25, 25, 25, 25, 162, 9, 162, - 162, 162, 162, 162, 162, 162, 162, 42, 42, 42, + 42, 42, 73, 49, 73, 23, 23, 23, 23, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 9, 107, 107, 107, 107, 128, 107, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -950,106 +954,110 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 15, 19, 128, 19, 19, 26, 15, 188, 188, - 154, 154, 48, 156, 19, 131, 48, 48, 48, 154, - 97, 48, 156, 188, 27, 48, 48, 48, 48, 48, - 48, 48, 89, 89, 89, 89, 19, 6, 89, 89, - 89, 19, 19, 19, 19, 188, 188, 19, 19, 19, - 24, 24, 24, 24, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 50, 15, 15, 50, 43, - 50, 15, 174, 50, 50, 50, 66, 66, 45, 15, + 42, 15, 19, 26, 19, 19, 48, 15, 27, 97, + 48, 48, 48, 22, 19, 48, 22, 131, 43, 48, + 48, 48, 48, 48, 48, 48, 89, 89, 89, 89, + 56, 56, 89, 89, 89, 6, 19, 25, 25, 25, + 25, 19, 19, 19, 19, 84, 83, 19, 45, 83, + 19, 19, 84, 178, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 22, 15, 15, 107, 107, + 185, 15, 59, 59, 59, 59, 66, 66, 187, 15, 15, 15, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 178, 174, 174, 8, 8, 185, 73, 73, - 73, 73, 56, 56, 23, 23, 8, 23, 23, 73, - 73, 8, 8, 73, 8, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 12, 76, 73, 73, 73, 73, - 86, 86, 73, 86, 86, 86, 187, 73, 73, 73, - 73, 14, 103, 73, 73, 73, 9, 9, 9, 9, - 64, 14, 14, 59, 59, 59, 59, 83, 119, 119, - 83, 73, 14, 14, 62, 73, 14, 104, 12, 14, - 12, 9, 155, 9, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 81, 14, 79, 79, 14, 14, - 115, 79, 79, 79, 22, 79, 121, 22, 76, 76, - 65, 83, 65, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 108, 108, 23, 113, 23, - 23, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 146, 146, 146, 117, 76, 76, 76, 76, 76, - 76, 76, 76, 14, 76, 76, 22, 176, 176, 182, - 182, 182, 76, 176, 176, 176, 176, 176, 176, 176, - 176, 176, 176, 120, 120, 14, 107, 107, 107, 107, - 131, 107, 131, 131, 97, 97, 29, 177, 177, 85, - 85, 85, 131, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 9, 9, 9, 13, 14, 13, 9, - 18, 9, 35, 9, 9, 131, 131, 131, 131, 24, - 24, 80, 24, 24, 5, 5, 9, 9, 9, 9, - 35, 175, 175, 35, 9, 179, 179, 9, 9, 131, - 39, 179, 179, 179, 179, 179, 179, 179, 179, 179, - 179, 5, 5, 5, 5, 5, 5, 20, 92, 82, - 82, 7, 9, 28, 82, 7, 82, 166, 82, 82, - 82, 14, 82, 37, 160, 82, 160, 7, 153, 82, - 7, 9, 160, 110, 46, 17, 46, 22, 17, 17, - 131, 16, 16, 16, 16, 99, 131, 131, 131, 130, - 17, 93, 93, 93, 16, 184, 184, 114, 17, 157, - 17, 17, 2, 2, 20, 20, 17, 20, 118, 31, - 41, 96, 138, 20, -1, 133, -1, 16, 17, 149, - 20, -1, 118, -1, 24, 24, -1, -1, 118, 118, - -1, -1, 20, 20, 20, 118, 118, 118, 118, 16, - 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 66, 66, 83, 24, 24, 24, 24, 156, 73, 73, + 73, 73, 154, 154, 23, 23, 156, 23, 23, 73, + 73, 154, 65, 73, 65, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 76, 62, 73, 73, 73, 73, + 86, 86, 73, 86, 86, 86, 103, 73, 73, 73, + 73, 12, 104, 73, 14, 64, 73, 73, 9, 9, + 9, 9, 119, 119, 14, 14, 155, 79, 79, 9, + 9, 73, 79, 79, 79, 73, 79, 14, 14, 108, + 108, 14, 35, 14, 115, 108, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 12, 113, 12, 14, 117, + 35, 14, 14, 35, 120, 120, 22, 76, 76, 146, + 146, 146, 18, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 176, 176, 23, 121, 23, + 23, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 29, 188, 188, 76, 76, 76, 76, 76, 76, + 76, 76, 174, 76, 76, 80, 14, 177, 177, 188, + 13, 76, 13, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 97, 97, 174, 174, 92, 14, 188, + 188, 28, 131, 50, 131, 131, 50, 39, 50, 179, + 179, 50, 50, 50, 131, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 9, 9, 9, 7, 37, + 14, 9, 7, 9, 153, 9, 9, 131, 131, 131, + 131, 93, 93, 93, 7, 175, 175, 7, 9, 9, + 9, 9, 16, 16, 16, 16, 9, 184, 184, 9, + 9, 162, 162, 131, 46, 16, 46, 162, 166, 162, + 162, 162, 162, 162, 162, 162, 162, 5, 5, 160, + 20, 160, 24, 24, 9, 24, 24, 160, 16, 182, + 182, 182, 2, 2, 14, 85, 85, 85, 110, 130, + 99, 114, 31, 9, 5, 5, 5, 5, 5, 5, + 16, 16, 131, 157, 118, 149, 82, 82, 131, 131, + 131, 82, 96, 82, 41, 82, 82, 82, 118, 82, + 138, -1, 82, 133, 118, 118, 82, 20, 20, -1, + 20, 118, 118, 118, 118, 17, 20, -1, 17, 17, + -1, -1, -1, 20, -1, -1, -1, -1, 8, 8, + 17, -1, -1, -1, -1, 20, 20, 20, 17, 8, + 17, 17, -1, -1, 8, 8, 17, 8, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, + -1, -1, -1, -1, -1, -1, -1, 24, 24, -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, 107, 107, -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, 5, 5 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 5, 5 ); protected array $gotoBase = array( - 0, 0, -163, 0, 0, 473, 187, 504, 247, 8, - 0, 0, -11, 117, 5, -187, 79, 61, 152, -101, - 107, 0, 78, 2, 207, 10, 162, 180, 174, 141, - 0, 122, 0, 0, 0, 86, 0, 182, 0, 171, - 0, 119, -1, 206, 0, 212, -216, 0, -552, -9, - 213, 0, 0, 0, 0, 0, 222, 0, 0, 268, - 0, 0, 282, 0, 74, 346, 1, 0, 0, 0, - 0, 0, 0, -5, 0, 0, 13, 0, 0, -70, - 146, -28, 7, 41, -478, -51, -441, 0, 0, -88, - 0, 0, 181, 248, 0, 0, 118, -314, 0, 130, - 0, 0, 0, 267, 284, 0, 0, 398, 140, 0, - 158, 0, 0, 100, 133, 76, 0, 112, 304, 38, - 139, 65, 0, 0, 0, 0, 0, 0, 161, 0, - 168, 167, 0, 123, 0, 0, 0, 0, -182, 0, - 0, 0, 0, 0, 0, 0, 120, 0, 0, 125, - 0, 0, 0, 173, 136, 90, -93, 109, 0, 0, - 18, 0, -224, 0, 0, 0, 143, 0, 0, 0, - 0, 0, 0, 0, -64, 164, 172, 202, 223, 250, - 0, 0, 110, 0, 176, 227, 0, 265, -138, 0, + 0, 0, -203, 0, 0, 506, 185, 451, 580, 10, + 0, 0, 6, 71, 8, -187, 20, 101, 54, -101, + 110, 0, -103, 2, 250, 194, 159, 164, 92, 96, + 0, 85, 0, 0, 0, -44, 0, 118, 0, 116, + 0, 103, -1, 155, 0, 182, -256, 0, -558, -15, + 421, 0, 0, 0, 0, 0, 150, 0, 0, 187, + 0, 0, 243, 0, 69, 258, 1, 0, 0, 0, + 0, 0, 0, -5, 0, 0, 12, 0, 0, -99, + 95, -353, 44, -70, -276, 35, -441, 0, 0, -94, + 0, 0, 100, 168, 0, 0, 99, -325, 0, 115, + 0, 0, 0, 261, 259, 0, 0, -7, 94, 0, + 153, 0, 0, 68, 107, 60, 0, 67, 280, 32, + 70, 87, 0, 0, 0, 0, 0, 0, 23, 0, + 148, 169, 0, 111, 0, 0, 0, 0, -194, 0, + 0, 0, 0, 0, 0, 0, 88, 0, 0, 91, + 0, 0, 0, 109, 228, 74, -9, 93, 0, 0, + 3, 0, 256, 0, 0, 0, 124, 0, 0, 0, + 0, 0, 0, 0, 106, 156, 140, 172, 184, 204, + 0, 0, 220, 0, 108, 200, 0, 207, 86, 0, 0 ); protected array $gotoDefault = array( -32768, 524, 757, 4, 758, 953, 833, 842, 588, 542, - 718, 348, 637, 431, 1343, 929, 1159, 607, 861, 1286, - 1292, 467, 864, 328, 744, 941, 912, 913, 407, 394, + 718, 348, 637, 431, 1344, 929, 1160, 607, 861, 1287, + 1293, 467, 864, 328, 744, 941, 912, 913, 407, 394, 877, 405, 661, 638, 505, 897, 463, 889, 497, 892, 462, 901, 162, 427, 521, 905, 3, 908, 570, 939, - 992, 395, 916, 396, 689, 918, 591, 920, 921, 402, - 408, 409, 1164, 599, 634, 933, 254, 593, 934, 393, - 935, 943, 398, 400, 699, 477, 516, 510, 420, 1125, + 993, 395, 916, 396, 689, 918, 591, 920, 921, 402, + 408, 409, 1165, 599, 634, 933, 254, 593, 934, 393, + 935, 943, 398, 400, 699, 477, 516, 510, 420, 1126, 594, 621, 658, 456, 484, 632, 644, 631, 491, 443, - 426, 327, 976, 984, 498, 475, 998, 350, 1006, 752, - 1172, 652, 500, 1014, 653, 1021, 1024, 543, 544, 489, - 1036, 264, 1039, 501, 1048, 23, 679, 1053, 1054, 680, - 654, 1076, 655, 681, 656, 1078, 474, 589, 1086, 464, - 1094, 1332, 465, 1098, 262, 1101, 278, 354, 377, 444, - 1108, 1109, 9, 1115, 709, 710, 19, 273, 520, 1143, - 700, 1149, 272, 1152, 461, 1171, 460, 1241, 1243, 571, - 502, 1261, 311, 1264, 692, 517, 1269, 457, 1334, 458, - 545, 485, 335, 546, 1377, 306, 357, 332, 562, 312, - 358, 547, 486, 1340, 1348, 329, 31, 1367, 1378, 604, + 426, 327, 977, 985, 498, 475, 999, 350, 1007, 752, + 1173, 652, 500, 1015, 653, 1022, 1025, 543, 544, 489, + 1037, 264, 1040, 501, 1049, 23, 679, 1054, 1055, 680, + 654, 1077, 655, 681, 656, 1079, 474, 589, 1087, 464, + 1095, 1333, 465, 1099, 262, 1102, 278, 354, 377, 444, + 1109, 1110, 9, 1116, 709, 710, 19, 273, 520, 1144, + 700, 1150, 272, 1153, 461, 1172, 460, 1242, 1244, 571, + 502, 1262, 313, 1265, 692, 517, 1270, 457, 1335, 458, + 545, 485, 335, 546, 1378, 306, 357, 332, 562, 314, + 358, 547, 486, 1341, 1349, 329, 31, 1368, 1379, 604, 626 ); @@ -1074,27 +1082,27 @@ class Php8 extends \PhpParser\ParserAbstract 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 25, 25, 50, 69, 69, 72, 72, 71, 70, 70, 63, 75, 75, 76, 76, 77, 77, - 78, 78, 79, 79, 80, 80, 80, 26, 26, 27, - 27, 27, 27, 27, 88, 88, 90, 90, 83, 83, - 91, 91, 92, 92, 92, 84, 84, 87, 87, 85, - 85, 93, 94, 94, 57, 57, 65, 65, 68, 68, - 68, 67, 95, 95, 96, 58, 58, 58, 58, 97, - 97, 98, 98, 99, 99, 100, 101, 101, 102, 102, - 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, - 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, - 109, 109, 111, 111, 112, 112, 112, 112, 112, 112, - 112, 110, 110, 110, 115, 115, 115, 115, 89, 89, - 118, 118, 118, 119, 119, 116, 116, 120, 120, 122, - 122, 123, 123, 117, 124, 124, 121, 125, 125, 125, - 125, 113, 113, 82, 82, 82, 20, 20, 20, 127, - 126, 126, 128, 128, 128, 128, 60, 129, 129, 130, - 61, 132, 132, 133, 133, 134, 134, 86, 135, 135, - 135, 135, 135, 135, 135, 135, 141, 141, 142, 142, - 143, 143, 143, 143, 143, 144, 145, 145, 140, 140, - 136, 136, 139, 139, 147, 147, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 137, 148, 148, 150, - 149, 149, 138, 138, 114, 114, 151, 151, 153, 153, - 153, 152, 152, 62, 104, 154, 154, 56, 56, 42, + 78, 78, 79, 79, 80, 80, 80, 80, 26, 26, + 27, 27, 27, 27, 27, 88, 88, 90, 90, 83, + 83, 91, 91, 92, 92, 92, 84, 84, 87, 87, + 85, 85, 93, 94, 94, 57, 57, 65, 65, 68, + 68, 68, 67, 95, 95, 96, 58, 58, 58, 58, + 97, 97, 98, 98, 99, 99, 100, 101, 101, 102, + 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, + 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, + 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, + 112, 112, 110, 110, 110, 115, 115, 115, 115, 89, + 89, 118, 118, 118, 119, 119, 116, 116, 120, 120, + 122, 122, 123, 123, 117, 124, 124, 121, 125, 125, + 125, 125, 113, 113, 82, 82, 82, 20, 20, 20, + 127, 126, 126, 128, 128, 128, 128, 60, 129, 129, + 130, 61, 132, 132, 133, 133, 134, 134, 86, 135, + 135, 135, 135, 135, 135, 135, 135, 141, 141, 142, + 142, 143, 143, 143, 143, 143, 144, 145, 145, 140, + 140, 136, 136, 139, 139, 147, 147, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 137, 148, 148, + 150, 149, 149, 138, 138, 114, 114, 151, 151, 153, + 153, 153, 152, 152, 62, 104, 154, 154, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1104,20 +1112,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 161, 162, 162, 163, 155, 155, 160, - 160, 164, 165, 165, 166, 167, 168, 168, 168, 168, - 19, 19, 73, 73, 73, 73, 156, 156, 156, 156, - 170, 170, 159, 159, 159, 157, 157, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 177, 177, 177, - 108, 179, 179, 179, 179, 158, 158, 158, 158, 158, - 158, 158, 158, 59, 59, 173, 173, 173, 173, 173, - 180, 180, 169, 169, 169, 169, 181, 181, 181, 181, - 181, 74, 74, 66, 66, 66, 66, 131, 131, 131, - 131, 184, 183, 172, 172, 172, 172, 172, 172, 171, - 171, 171, 182, 182, 182, 182, 107, 178, 186, 186, - 185, 185, 187, 187, 187, 187, 187, 187, 187, 187, - 175, 175, 175, 175, 174, 189, 188, 188, 188, 188, - 188, 188, 188, 188, 190, 190, 190, 190 + 42, 42, 42, 42, 161, 162, 162, 163, 155, 155, + 160, 160, 164, 165, 165, 166, 167, 168, 168, 168, + 168, 19, 19, 73, 73, 73, 73, 156, 156, 156, + 156, 170, 170, 159, 159, 159, 157, 157, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 177, 177, + 177, 108, 179, 179, 179, 179, 158, 158, 158, 158, + 158, 158, 158, 158, 59, 59, 173, 173, 173, 173, + 173, 180, 180, 169, 169, 169, 169, 181, 181, 181, + 181, 181, 74, 74, 66, 66, 66, 66, 131, 131, + 131, 131, 184, 183, 172, 172, 172, 172, 172, 172, + 171, 171, 171, 182, 182, 182, 182, 107, 178, 186, + 186, 185, 185, 187, 187, 187, 187, 187, 187, 187, + 187, 175, 175, 175, 175, 174, 189, 188, 188, 188, + 188, 188, 188, 188, 188, 190, 190, 190, 190 ); protected array $ruleToLength = array( @@ -1141,50 +1149,50 @@ class Php8 extends \PhpParser\ParserAbstract 3, 3, 1, 2, 5, 7, 9, 6, 5, 6, 3, 2, 1, 1, 1, 1, 0, 2, 1, 3, 8, 0, 4, 2, 1, 3, 0, 1, 0, 1, - 0, 1, 3, 1, 1, 1, 1, 8, 9, 7, - 8, 7, 6, 8, 0, 2, 0, 2, 1, 2, - 1, 2, 1, 1, 1, 0, 2, 0, 2, 0, - 2, 2, 1, 3, 1, 4, 1, 4, 1, 1, - 4, 2, 1, 3, 3, 3, 4, 4, 5, 0, - 2, 4, 3, 1, 1, 7, 0, 2, 1, 3, - 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, - 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, - 1, 3, 0, 2, 1, 1, 1, 1, 1, 1, - 1, 7, 9, 6, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, - 3, 3, 3, 1, 3, 3, 1, 1, 2, 1, - 1, 0, 1, 0, 2, 2, 2, 4, 3, 1, - 1, 3, 1, 2, 2, 3, 2, 3, 1, 1, - 2, 3, 1, 1, 3, 2, 0, 1, 5, 7, - 5, 6, 10, 3, 5, 1, 1, 3, 0, 2, - 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, - 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, - 1, 3, 0, 2, 0, 3, 5, 8, 1, 3, - 3, 0, 2, 2, 2, 3, 1, 0, 1, 1, - 3, 3, 3, 4, 4, 1, 1, 2, 3, 3, + 0, 1, 3, 1, 1, 1, 1, 1, 8, 9, + 7, 8, 7, 6, 8, 0, 2, 0, 2, 1, + 2, 1, 2, 1, 1, 1, 0, 2, 0, 2, + 0, 2, 2, 1, 3, 1, 4, 1, 4, 1, + 1, 4, 2, 1, 3, 3, 3, 4, 4, 5, + 0, 2, 4, 3, 1, 1, 7, 0, 2, 1, + 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, + 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, + 0, 1, 3, 0, 2, 1, 1, 1, 1, 1, + 1, 1, 7, 9, 6, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, + 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, + 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, + 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, + 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, + 7, 5, 6, 10, 3, 5, 1, 1, 3, 0, + 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, + 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, + 1, 1, 3, 0, 2, 0, 3, 5, 8, 1, + 3, 3, 0, 2, 2, 2, 3, 1, 0, 1, + 1, 3, 3, 3, 4, 4, 1, 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, 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, 2, 8, 9, 8, 9, 9, - 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, - 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, - 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, - 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 4, 1, 4, - 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, - 2, 1, 3, 1, 4, 3, 3, 3, 3, 1, - 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, - 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, - 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, - 3, 3, 6, 3, 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, + 9, 10, 9, 10, 8, 3, 2, 2, 1, 1, + 0, 4, 2, 1, 3, 2, 1, 2, 2, 2, + 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, + 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, + 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, + 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, + 2, 2, 1, 3, 1, 4, 3, 3, 3, 3, + 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, + 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, + 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, + 3, 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1625,884 +1633,884 @@ protected function initReduceCallbacks(): void { $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 207 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\Identifier($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 208 => static function ($self, $stackPos) { - $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(8-3)], ['byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-5)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, 209 => static function ($self, $stackPos) { + $self->semValue = new Stmt\Function_($self->semStack[$stackPos-(9-4)], ['byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-6)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); + }, + 210 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(7-2)], ['type' => $self->semStack[$stackPos-(7-1)], 'extends' => $self->semStack[$stackPos-(7-3)], 'implements' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(7-2)); }, - 210 => static function ($self, $stackPos) { + 211 => static function ($self, $stackPos) { $self->semValue = new Stmt\Class_($self->semStack[$stackPos-(8-3)], ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkClass($self->semValue, $stackPos-(8-3)); }, - 211 => static function ($self, $stackPos) { + 212 => static function ($self, $stackPos) { $self->semValue = new Stmt\Interface_($self->semStack[$stackPos-(7-3)], ['extends' => $self->semStack[$stackPos-(7-4)], 'stmts' => $self->semStack[$stackPos-(7-6)], 'attrGroups' => $self->semStack[$stackPos-(7-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); $self->checkInterface($self->semValue, $stackPos-(7-3)); }, - 212 => static function ($self, $stackPos) { + 213 => static function ($self, $stackPos) { $self->semValue = new Stmt\Trait_($self->semStack[$stackPos-(6-3)], ['stmts' => $self->semStack[$stackPos-(6-5)], 'attrGroups' => $self->semStack[$stackPos-(6-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 213 => static function ($self, $stackPos) { + 214 => static function ($self, $stackPos) { $self->semValue = new Stmt\Enum_($self->semStack[$stackPos-(8-3)], ['scalarType' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkEnum($self->semValue, $stackPos-(8-3)); }, - 214 => static function ($self, $stackPos) { + 215 => static function ($self, $stackPos) { $self->semValue = null; }, - 215 => static function ($self, $stackPos) { + 216 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 216 => static function ($self, $stackPos) { + 217 => static function ($self, $stackPos) { $self->semValue = null; }, - 217 => static function ($self, $stackPos) { + 218 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 218 => static function ($self, $stackPos) { + 219 => static function ($self, $stackPos) { $self->semValue = 0; }, - 219 => null, 220 => null, - 221 => static function ($self, $stackPos) { + 221 => null, + 222 => static function ($self, $stackPos) { $self->checkClassModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 222 => static function ($self, $stackPos) { + 223 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 223 => static function ($self, $stackPos) { + 224 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 224 => static function ($self, $stackPos) { + 225 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 225 => static function ($self, $stackPos) { + 226 => static function ($self, $stackPos) { $self->semValue = null; }, - 226 => static function ($self, $stackPos) { + 227 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 227 => static function ($self, $stackPos) { + 228 => static function ($self, $stackPos) { $self->semValue = array(); }, - 228 => static function ($self, $stackPos) { + 229 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 229 => static function ($self, $stackPos) { + 230 => static function ($self, $stackPos) { $self->semValue = array(); }, - 230 => static function ($self, $stackPos) { + 231 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 231 => null, - 232 => static function ($self, $stackPos) { + 232 => null, + 233 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 233 => static function ($self, $stackPos) { + 234 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 234 => null, - 235 => static function ($self, $stackPos) { + 235 => null, + 236 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 236 => null, - 237 => static function ($self, $stackPos) { + 237 => null, + 238 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 238 => static function ($self, $stackPos) { + 239 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $self->semValue = $self->semStack[$stackPos-(1-1)]->stmts; } else if ($self->semStack[$stackPos-(1-1)] === null) { $self->semValue = []; } else { $self->semValue = [$self->semStack[$stackPos-(1-1)]]; }; }, - 239 => static function ($self, $stackPos) { + 240 => static function ($self, $stackPos) { $self->semValue = null; }, - 240 => static function ($self, $stackPos) { + 241 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 241 => null, - 242 => static function ($self, $stackPos) { + 242 => null, + 243 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 243 => static function ($self, $stackPos) { + 244 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 244 => static function ($self, $stackPos) { + 245 => static function ($self, $stackPos) { $self->semValue = new Node\DeclareItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 245 => static function ($self, $stackPos) { + 246 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 246 => static function ($self, $stackPos) { + 247 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 247 => static function ($self, $stackPos) { + 248 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 248 => static function ($self, $stackPos) { + 249 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(5-3)]; }, - 249 => static function ($self, $stackPos) { + 250 => static function ($self, $stackPos) { $self->semValue = array(); }, - 250 => static function ($self, $stackPos) { + 251 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 251 => static function ($self, $stackPos) { + 252 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_($self->semStack[$stackPos-(4-2)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 252 => static function ($self, $stackPos) { + 253 => static function ($self, $stackPos) { $self->semValue = new Stmt\Case_(null, $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 253 => null, 254 => null, - 255 => static function ($self, $stackPos) { + 255 => null, + 256 => static function ($self, $stackPos) { $self->semValue = new Expr\Match_($self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos])); }, - 256 => static function ($self, $stackPos) { + 257 => static function ($self, $stackPos) { $self->semValue = []; }, - 257 => null, - 258 => static function ($self, $stackPos) { + 258 => null, + 259 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 259 => static function ($self, $stackPos) { + 260 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 260 => static function ($self, $stackPos) { + 261 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 261 => static function ($self, $stackPos) { + 262 => static function ($self, $stackPos) { $self->semValue = new Node\MatchArm(null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 262 => static function ($self, $stackPos) { + 263 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 263 => static function ($self, $stackPos) { + 264 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 264 => static function ($self, $stackPos) { + 265 => static function ($self, $stackPos) { $self->semValue = array(); }, - 265 => static function ($self, $stackPos) { + 266 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 266 => static function ($self, $stackPos) { + 267 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 267 => static function ($self, $stackPos) { + 268 => static function ($self, $stackPos) { $self->semValue = array(); }, - 268 => static function ($self, $stackPos) { + 269 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 269 => static function ($self, $stackPos) { + 270 => static function ($self, $stackPos) { $self->semValue = new Stmt\ElseIf_($self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-6)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 270 => static function ($self, $stackPos) { + 271 => static function ($self, $stackPos) { $self->semValue = null; }, - 271 => static function ($self, $stackPos) { + 272 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 272 => static function ($self, $stackPos) { + 273 => static function ($self, $stackPos) { $self->semValue = null; }, - 273 => static function ($self, $stackPos) { + 274 => static function ($self, $stackPos) { $self->semValue = new Stmt\Else_($self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->fixupAlternativeElse($self->semValue); }, - 274 => static function ($self, $stackPos) { + 275 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 275 => static function ($self, $stackPos) { + 276 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-2)], true); }, - 276 => static function ($self, $stackPos) { + 277 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)], false); }, - 277 => static function ($self, $stackPos) { + 278 => static function ($self, $stackPos) { $self->semValue = array($self->fixupArrayDestructuring($self->semStack[$stackPos-(1-1)]), false); }, - 278 => null, - 279 => static function ($self, $stackPos) { + 279 => null, + 280 => static function ($self, $stackPos) { $self->semValue = array(); }, - 280 => static function ($self, $stackPos) { + 281 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 281 => static function ($self, $stackPos) { + 282 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 282 => static function ($self, $stackPos) { + 283 => static function ($self, $stackPos) { $self->semValue = 0; }, - 283 => static function ($self, $stackPos) { + 284 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 284 => static function ($self, $stackPos) { + 285 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 285 => static function ($self, $stackPos) { + 286 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 286 => static function ($self, $stackPos) { + 287 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 287 => static function ($self, $stackPos) { + 288 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 288 => static function ($self, $stackPos) { + 289 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 289 => static function ($self, $stackPos) { + 290 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 290 => static function ($self, $stackPos) { + 291 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 291 => static function ($self, $stackPos) { + 292 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 292 => static function ($self, $stackPos) { + 293 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 293 => static function ($self, $stackPos) { + 294 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, - 294 => null, - 295 => static function ($self, $stackPos) { + 295 => null, + 296 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 296 => static function ($self, $stackPos) { + 297 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 297 => null, 298 => null, - 299 => static function ($self, $stackPos) { + 299 => null, + 300 => static function ($self, $stackPos) { $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 300 => static function ($self, $stackPos) { + 301 => static function ($self, $stackPos) { $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 301 => static function ($self, $stackPos) { + 302 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 302 => static function ($self, $stackPos) { + 303 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 303 => null, - 304 => static function ($self, $stackPos) { + 304 => null, + 305 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 305 => static function ($self, $stackPos) { + 306 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 306 => static function ($self, $stackPos) { + 307 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 307 => null, - 308 => static function ($self, $stackPos) { + 308 => null, + 309 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 309 => static function ($self, $stackPos) { + 310 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 310 => static function ($self, $stackPos) { + 311 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 311 => static function ($self, $stackPos) { + 312 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 312 => static function ($self, $stackPos) { + 313 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 313 => static function ($self, $stackPos) { + 314 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 314 => static function ($self, $stackPos) { + 315 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 315 => static function ($self, $stackPos) { + 316 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 316 => static function ($self, $stackPos) { + 317 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 317 => null, - 318 => static function ($self, $stackPos) { + 318 => null, + 319 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 319 => static function ($self, $stackPos) { + 320 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 320 => null, - 321 => static function ($self, $stackPos) { + 321 => null, + 322 => static function ($self, $stackPos) { $self->semValue = null; }, - 322 => null, - 323 => static function ($self, $stackPos) { + 323 => null, + 324 => static function ($self, $stackPos) { $self->semValue = null; }, - 324 => static function ($self, $stackPos) { + 325 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 325 => static function ($self, $stackPos) { + 326 => static function ($self, $stackPos) { $self->semValue = null; }, - 326 => static function ($self, $stackPos) { + 327 => static function ($self, $stackPos) { $self->semValue = array(); }, - 327 => static function ($self, $stackPos) { + 328 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 328 => static function ($self, $stackPos) { + 329 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 329 => static function ($self, $stackPos) { + 330 => static function ($self, $stackPos) { $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 330 => static function ($self, $stackPos) { + 331 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 331 => static function ($self, $stackPos) { + 332 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 332 => static function ($self, $stackPos) { + 333 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 333 => static function ($self, $stackPos) { + 334 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 334 => static function ($self, $stackPos) { + 335 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 335 => static function ($self, $stackPos) { + 336 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, - 336 => null, - 337 => static function ($self, $stackPos) { + 337 => null, + 338 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 338 => static function ($self, $stackPos) { + 339 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 339 => null, 340 => null, - 341 => static function ($self, $stackPos) { + 341 => null, + 342 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 342 => static function ($self, $stackPos) { + 343 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 343 => static function ($self, $stackPos) { + 344 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 344 => static function ($self, $stackPos) { + 345 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 345 => static function ($self, $stackPos) { + 346 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 346 => static function ($self, $stackPos) { + 347 => static function ($self, $stackPos) { $self->semValue = array(); }, - 347 => static function ($self, $stackPos) { + 348 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 348 => static function ($self, $stackPos) { + 349 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 349 => static function ($self, $stackPos) { + 350 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); $self->checkPropertyHooksForMultiProperty($self->semValue, $stackPos-(7-5)); $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); $self->addPropertyNameToHooks($self->semValue); }, - 350 => static function ($self, $stackPos) { + 351 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 351 => static function ($self, $stackPos) { + 352 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 352 => static function ($self, $stackPos) { + 353 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 353 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, 354 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 355 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 356 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = null; /* will be skipped */ }, 357 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = array(); }, 358 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 359 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + $self->semValue = array(); }, 360 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 361 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 362 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 363 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 364 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 365 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 366 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 366 => null, - 367 => static function ($self, $stackPos) { + 367 => null, + 368 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 368 => static function ($self, $stackPos) { + 369 => static function ($self, $stackPos) { $self->semValue = null; }, - 369 => null, 370 => null, - 371 => static function ($self, $stackPos) { + 371 => null, + 372 => static function ($self, $stackPos) { $self->semValue = 0; }, - 372 => static function ($self, $stackPos) { + 373 => static function ($self, $stackPos) { $self->semValue = 0; }, - 373 => null, 374 => null, - 375 => static function ($self, $stackPos) { + 375 => null, + 376 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 376 => static function ($self, $stackPos) { + 377 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 377 => static function ($self, $stackPos) { + 378 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 378 => static function ($self, $stackPos) { + 379 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 379 => static function ($self, $stackPos) { + 380 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 380 => static function ($self, $stackPos) { + 381 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 381 => static function ($self, $stackPos) { + 382 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 382 => static function ($self, $stackPos) { + 383 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 383 => static function ($self, $stackPos) { + 384 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 384 => static function ($self, $stackPos) { + 385 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 385 => static function ($self, $stackPos) { + 386 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 386 => null, - 387 => static function ($self, $stackPos) { + 387 => null, + 388 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 388 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 389 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 390 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 391 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 392 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semValue = []; }, - 393 => static function ($self, $stackPos) { + 394 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 394 => static function ($self, $stackPos) { + 395 => static function ($self, $stackPos) { $self->semValue = []; }, - 395 => static function ($self, $stackPos) { + 396 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); }, - 396 => static function ($self, $stackPos) { + 397 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 397 => static function ($self, $stackPos) { + 398 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 398 => static function ($self, $stackPos) { - $self->semValue = null; - }, 399 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = null; }, 400 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 401 => static function ($self, $stackPos) { - $self->semValue = 0; + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 402 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 403 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 403 => null, 404 => null, - 405 => static function ($self, $stackPos) { + 405 => null, + 406 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 406 => static function ($self, $stackPos) { + 407 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 407 => static function ($self, $stackPos) { + 408 => static function ($self, $stackPos) { $self->semValue = array(); }, - 408 => null, 409 => null, - 410 => static function ($self, $stackPos) { + 410 => null, + 411 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 411 => static function ($self, $stackPos) { + 412 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 412 => static function ($self, $stackPos) { + 413 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 413 => static function ($self, $stackPos) { + 414 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 414 => static function ($self, $stackPos) { + 415 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 415 => null, 416 => null, - 417 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, + 417 => null, 418 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 419 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 420 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 421 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 422 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 423 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 424 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 425 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 426 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 438 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 439 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 440 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 441 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 442 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 450 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 452 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 463 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 464 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 465 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 466 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 467 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 475 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 476 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 477 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 478 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 479 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 480 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 480 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 481 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 483 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 483 => static function ($self, $stackPos) { + 484 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 484 => static function ($self, $stackPos) { + 485 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 485 => static function ($self, $stackPos) { + 486 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 486 => static function ($self, $stackPos) { + 487 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 487 => null, - 488 => static function ($self, $stackPos) { + 488 => null, + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 489 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 490 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 504 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 505 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 506 => static function ($self, $stackPos) { + 507 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 507 => null, 508 => null, - 509 => static function ($self, $stackPos) { + 509 => null, + 510 => static function ($self, $stackPos) { $self->semValue = array(); }, - 510 => static function ($self, $stackPos) { + 511 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 511 => null, - 512 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, + 512 => null, 513 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 514 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 515 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 516 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 517 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2511,304 +2519,307 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 519 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 520 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 521 => null, - 522 => static function ($self, $stackPos) { + 521 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 522 => null, 523 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 524 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 525 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 526 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 526 => null, 527 => null, - 528 => static function ($self, $stackPos) { + 528 => null, + 529 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 529 => static function ($self, $stackPos) { + 530 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 530 => null, 531 => null, - 532 => static function ($self, $stackPos) { + 532 => null, + 533 => static function ($self, $stackPos) { $self->semValue = array(); }, - 533 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 534 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 535 => static function ($self, $stackPos) { + 536 => static function ($self, $stackPos) { $self->semValue = array(); }, - 536 => null, - 537 => static function ($self, $stackPos) { + 537 => null, + 538 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 540 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 541 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 542 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 543 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 544 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 545 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 546 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 547 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 548 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 549 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 550 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 551 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 552 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 553 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 554 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 555 => static function ($self, $stackPos) { + 556 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 556 => static function ($self, $stackPos) { + 557 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 557 => null, 558 => null, 559 => null, - 560 => static function ($self, $stackPos) { + 560 => null, + 561 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 561 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 562 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 563 => static function ($self, $stackPos) { + 564 => static function ($self, $stackPos) { $self->semValue = null; }, - 564 => null, 565 => null, - 566 => static function ($self, $stackPos) { + 566 => null, + 567 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 567 => null, 568 => null, 569 => null, 570 => null, 571 => null, 572 => null, - 573 => static function ($self, $stackPos) { + 573 => null, + 574 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 574 => null, 575 => null, 576 => null, - 577 => static function ($self, $stackPos) { + 577 => null, + 578 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 578 => null, - 579 => static function ($self, $stackPos) { + 579 => null, + 580 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 580 => static function ($self, $stackPos) { + 581 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 581 => static function ($self, $stackPos) { + 582 => static function ($self, $stackPos) { $self->semValue = null; }, - 582 => null, 583 => null, 584 => null, - 585 => static function ($self, $stackPos) { + 585 => null, + 586 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 586 => static function ($self, $stackPos) { + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 587 => null, - 588 => static function ($self, $stackPos) { + 588 => null, + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 589 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 590 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 591 => static function ($self, $stackPos) { + 592 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 592 => static function ($self, $stackPos) { + 593 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 593 => null, - 594 => static function ($self, $stackPos) { + 594 => null, + 595 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 595 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 597 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 597 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 598 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 599 => null, - 600 => static function ($self, $stackPos) { + 600 => null, + 601 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 601 => null, 602 => null, - 603 => static function ($self, $stackPos) { + 603 => null, + 604 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 604 => null, - 605 => static function ($self, $stackPos) { + 605 => null, + 606 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 606 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 607 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 608 => null, - 609 => static function ($self, $stackPos) { + 609 => null, + 610 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 610 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 611 => static function ($self, $stackPos) { + 612 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 612 => static function ($self, $stackPos) { + 613 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 613 => static function ($self, $stackPos) { + 614 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 615 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 615 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 616 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 617 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 618 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 619 => static function ($self, $stackPos) { + 620 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 620 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 621 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 622 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 623 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 624 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 625 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 626 => null, - 627 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 626 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 627 => null, 628 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 629 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 630 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 631 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 632 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 633 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 634 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 635 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 636 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 637 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 637 => null, + 638 => null, ]; } } diff --git a/test/code/parser/stmt/function/clone_function.test b/test/code/parser/stmt/function/clone_function.test new file mode 100644 index 0000000000..db13ff60ae --- /dev/null +++ b/test/code/parser/stmt/function/clone_function.test @@ -0,0 +1,58 @@ +Declaring clone function stub +----- + Date: Wed, 2 Jul 2025 22:09:49 +0200 Subject: [PATCH 413/428] Support every argument syntax for `clone()` (#1092) See php/php-src#18938 --- grammar/php.y | 27 +- lib/PhpParser/Parser/Php7.php | 1985 ++++++++-------- lib/PhpParser/Parser/Php8.php | 1990 +++++++++-------- .../parser/stmt/function/clone_function.test | 390 ++++ 4 files changed, 2499 insertions(+), 1893 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index c33fa0b347..b390525379 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -785,6 +785,22 @@ argument_list: | '(' variadic_placeholder ')' { init($2); } ; +clone_argument_list: + '(' ')' { $$ = array(); } + | '(' non_empty_clone_argument_list optional_comma ')' { $$ = $2; } + | '(' expr ',' ')' { init(Node\Arg[$2, false, false]); } + | '(' variadic_placeholder ')' { init($2); } +; + +non_empty_clone_argument_list: + expr ',' argument + { init(new Node\Arg($1, false, false, stackAttributes(#1)), $3); } + | argument_no_expr + { init($1); } + | non_empty_clone_argument_list ',' argument + { push($1, $3); } +; + variadic_placeholder: T_ELLIPSIS { $$ = Node\VariadicPlaceholder[]; } ; @@ -794,14 +810,18 @@ non_empty_argument_list: | non_empty_argument_list ',' argument { push($1, $3); } ; -argument: - expr { $$ = Node\Arg[$1, false, false]; } - | ampersand variable { $$ = Node\Arg[$2, true, false]; } +argument_no_expr: + ampersand variable { $$ = Node\Arg[$2, true, false]; } | T_ELLIPSIS expr { $$ = Node\Arg[$2, false, true]; } | identifier_maybe_reserved ':' expr { $$ = new Node\Arg($3, false, false, attributes(), $1); } ; +argument: + expr { $$ = Node\Arg[$1, false, false]; } + | argument_no_expr { $$ = $1; } +; + global_var_list: non_empty_global_var_list no_comma ; @@ -1015,6 +1035,7 @@ expr: } | new_expr | match + | T_CLONE clone_argument_list { $$ = Expr\FuncCall[new Node\Name($1, stackAttributes(#1)), $2]; } | 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]; } diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 7c2bf4d593..5c1dce0d39 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -164,16 +164,16 @@ class Php7 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 399; protected int $tokenToSymbolMapSize = 400; - protected int $actionTableSize = 1289; - protected int $gotoTableSize = 651; + protected int $actionTableSize = 1604; + protected int $gotoTableSize = 720; protected int $invalidSymbol = 172; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 439; - protected int $numNonLeafStates = 745; + protected int $YY2TBLSTATE = 443; + protected int $numNonLeafStates = 752; protected array $symbolToName = array( "EOF", @@ -394,542 +394,614 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $action = array( - 128, 129, 130, 568, 131, 132, 948, 757, 758, 759, - 133, 38, 841, -85, 0, 1370,-32766,-32766,-32766, 488, - 832, 1127, 1128, 1129, 1123, 1122, 1121, 1130, 1124, 1125, - 1126,-32766,-32766,-32766, -334, 751, 750,-32766, 843,-32766, + 132, 133, 134, 573, 135, 136, 955, 764, 765, 766, + 137, 41, 848, -85,-32766, 1386,-32766,-32766,-32766, 493, + 839, 1142, 1143, 1144, 1138, 1137, 1136, 1145, 1139, 1140, + 1141,-32766,-32766,-32766, 850, 758, 757,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, -373,-32766, -373, 1039, 760, 1127, 1128, 1129, 1123, - 1122, 1121, 1130, 1124, 1125, 1126, 382, 383, 442, 265, - 134, 385, 764, 765, 766, 767, 427, 837, 428, -85, - 331, 36, 248, 2, 292, 821, 768, 769, 770, 771, - 772, 773, 774, 775, 776, 777, 797, 569, 798, 799, - 800, 801, 789, 790, 347, 348, 792, 793, 778, 779, - 780, 782, 783, 784, 358, 824, 825, 826, 827, 828, - 570, 26, 300, -195, 785, 786, 571, 572, -194, 809, - 807, 808, 820, 804, 805,-32766,-32766, 573, 574, 803, - 575, 576, 577, 578,-32766, 579, 580, 474, 475, 869, - 238, 870, 806, 581, 582, 489, 135, 838, 128, 129, - 130, 568, 131, 132, 1072, 757, 758, 759, 133, 38, - -32766, 35, 731, 1032, 1031, 1030, 1036, 1033, 1034, 1035, - -32766,-32766,-32766,-32767,-32767,-32767,-32767, 101, 102, 103, - 104, 105, -334, 751, 750, 1048, 927,-32766,-32766,-32766, - 842,-32766, 840,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 760,-32766,-32766,-32766, 614,-32766, 291, - -32766,-32766,-32766,-32766,-32766, 136, 721, 265, 134, 385, - 764, 765, 766, 767, -617,-32766, 428,-32766,-32766,-32766, - -32766, -617, 145, 821, 768, 769, 770, 771, 772, 773, - 774, 775, 776, 777, 797, 569, 798, 799, 800, 801, - 789, 790, 347, 348, 792, 793, 778, 779, 780, 782, - 783, 784, 358, 824, 825, 826, 827, 828, 570, 917, - 428, -195, 785, 786, 571, 572, -194, 809, 807, 808, - 820, 804, 805, 1293, 251, 573, 574, 803, 575, 576, - 577, 578, -275, 579, 580, 1101, 82, 83, 84, 743, - 806, 581, 582, 237, 148, 781, 752, 753, 754, 755, - 756, 150, 757, 758, 759, 794, 795, 37, 24, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 1116, 276,-32766,-32766,-32766, 929, 1268, - 1267, 1269, 716, 834, 311, 394, 109, 7, 1102, -570, - 760,-32766,-32766,-32766, 841, 1355,-32766, 1100,-32766,-32766, - -32766, 1273, 1354, 315, 761, 762, 763, 764, 765, 766, - 767, 999,-32766, 830,-32766,-32766, 927, -617, 327, -617, - 821, 768, 769, 770, 771, 772, 773, 774, 775, 776, - 777, 797, 819, 798, 799, 800, 801, 789, 790, 791, - 818, 792, 793, 778, 779, 780, 782, 783, 784, 823, - 824, 825, 826, 827, 828, 829, -570, -570, 343, 785, - 786, 787, 788, 836, 809, 807, 808, 820, 804, 805, - 718, 564, 796, 802, 803, 810, 811, 813, 812, 140, - 814, 815, 841, 330, 344,-32766, -570, 806, 817, 816, - 49, 50, 51, 520, 52, 53, 869, -110, 870, 917, - 54, 55, -110, 56, -110, -568,-32766,-32766,-32766, 307, - 1048, 126, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -614, 372, 106, 107, 108, 376, 276, - -614, 392, 1335,-32766, 291, 288, 1305, 446, 57, 58, - -32766, 109, 447, 1000, 59, 47, 60, 245, 246, 61, - 62, 63, 64, 65, 66, 67, 68,-32766, 28, 267, - 69, 444, 521, 448, -348, 74, 1299, 1300, 522, 449, - 841, 330, -568, -568, 1297, 42, 20, 523, 929, 524, - 927, 525, 716, 526, -566, 696, 527, 528, -568, 927, - 847, 44, 45, 450, 379, 378, -78, 46, 529, 927, - -574,-32766, -568, 370, 342, 1351, 103, 104, 105, -565, - 1259, 927, 301, 302, 1045, 531, 532, 533, -608, 722, - -608, 697, 464, 465, 466, 151, 1048, 535, 536, 723, - 1285, 1286, 1287, 1288, 1290, 1282, 1283, 299, -58, 1048, - 153, 726, 125, 1289, 1284, 698, 699, 1268, 1267, 1269, - 300, -566, -566, 70, -154, -154, -154, 325, 326, 330, - -57, -4, 927, 917, 1268, 1267, 1269, -566, -87, -154, - 284, -154, 917, -154, 154, -154, -565, -565, 155, -573, - 157, -566, 917, 33, 832, 377, -614, 123, -614, 751, - 750, 124, -565, 137, 917, 289, 968, 969, 81, 751, - 750, 530, 330, 138, -572, 620, -565, 663, 21, 903, - 964, -110, -110, -110, 32, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 144, -567, - 382, 383, 28, 268, 1380, 158, 927, 1381, 968, 969, - 427, 159, 929, 970, 841, 917, 716, -154, 1297, 384, - 383, 929, 964, 682, 683, 716, 160, 1175, 1177, 427, - 161, 985, 1045, 380, 381, 716, 733, 377, -564, 440, - 1071, 141, 162, 929, 298, 330, -84, 716, 968, 969, - 149, 410, -308, 530, 1259, -78, 300, 1048, 751, 750, - -73, 534, 964, -110, -110, -110, -567, -567, -72, 288, - 1273, 535, 536, -71, 1285, 1286, 1287, 1288, 1290, 1282, - 1283, 284, -567, 386, 387, 11, 1266, 1289, 1284, 917, - -70, 751, 750, -69, 929,-32766, -567, 72, 716, -4, - -16, 1266, 326, 330, -68, -564, -564, 292,-32766,-32766, - -32766, -67,-32766, -66,-32766, -65,-32766, -46, -18,-32766, - 142, -564, 1264, 275,-32766,-32766,-32766, 285,-32766, 732, - -32766,-32766, 952, 951, 1266, -564,-32766, 424, 28, 267, - 832,-32766,-32766,-32766, 735,-32766, 1047,-32766,-32766,-32766, - 841, 841,-32766, 926, 1297, 1045, 147,-32766,-32766,-32766, - 654, 655, -304,-32766,-32766, 1268, 1267, 1269, 929,-32766, - 424, 280, 716, 28, 268, 281, 286, 287, 336, 73, - 1048,-32766, 950, 290, 293, 841, -110, -110, -564, 1297, - 1259, -110, 294,-32766, 944, 276, 146, 109, 692, 832, - -110,-32766, 841, 707, 284, 664, 1134, 669, 536,-32766, - 1285, 1286, 1287, 1288, 1290, 1282, 1283, 1382, 1048, 585, - -50, 709, 652, 1289, 1284, 1259, 685, 306, 10, 305, - 471, 300, 499, 72, 74, 965, 314, 670, 326, 330, - 330, -530, 291, 536, 686, 1285, 1286, 1287, 1288, 1290, - 1282, 1283,-32766, 139, 591, -564, -564, 1304, 1289, 1284, - 1306, -520, 308,-32766, 946, 40, -278, 8, 72, 1266, - 27, -564, 34, 326, 330, 0,-32766,-32766,-32766, 0, - -32766, 0,-32766, 0,-32766, -564, 0,-32766, 0, 0, - 0, 0,-32766,-32766,-32766, 927,-32766, 0,-32766,-32766, - 0, 300, 1266, 374,-32766, 424, 618, 0, 41,-32766, - -32766,-32766, 840,-32766, 740,-32766,-32766,-32766, 927, -602, - -32766, 741, 860, 908, 1009,-32766,-32766,-32766, 986,-32766, - 993,-32766,-32766, 983, 994, 1266, 906,-32766, 424, 48, - 981, 1105,-32766,-32766,-32766, 1108,-32766, 1109,-32766,-32766, - -32766, 1106, -601,-32766, 1107, 1113, -276, 494,-32766,-32766, - -32766, 1294,-32766, 852,-32766,-32766, 1321, 1339, 1266, 598, - -32766, 424, 1373, 657, 1273,-32766,-32766,-32766, 917,-32766, - -600,-32766,-32766,-32766, -574, -573,-32766, -275, -572, -571, - -514,-32766,-32766,-32766, -253, -253, -253,-32766,-32766, 1, - 377, 917, 29,-32766, 424, 30, 303, 304, 39, 43, - 71, 968, 969, 75, 76,-32766, 530, -252, -252, -252, - 13, 77, 375, 377, 903, 964, -110, -110, -110, 78, - 79, 80, 143, 152, 968, 969, 127, 156, 243, 530, - 332, 359, 360, 361, 362, 363, 364, 903, 964, -110, - -110, -110,-32766, 14, 365, 841, 366, 929, 1266, 15, - 367, 716, -253, 368, 369,-32766,-32766,-32766, 371,-32766, - 441,-32766, 563,-32766, 16, 18,-32766, 408, 490, 491, - 929,-32766,-32766,-32766, 716, -252, 498,-32766,-32766, 501, - -110, -110, 502,-32766, 424, -110, 503, 504, 508, 509, - 510, 518, 596, 702, -110,-32766, 1074, 1215, 1295, 1073, - 1054, 1254, 1050,-32766, -280, -102, 12, 17, 22, 297, - 407, 610, 615, 643, 708, 1219, 1272, 1216, 1352, 0, - 324, 373, 717, 720, 724, 300, 725, 727, 74, 728, - 1232, 729, 730, 734, 330, 409, 719, 0, 413, 737, - 904, 1377, 1379, 863, 862, 958, 1001, 1378, 957, 955, - 956, 959, 1247, 937, 947, 935, 991, 992, 641, 1376, - 1333, 1322, 1340, 1349, 0, 0, 1298, 0, 330 + -32767, -381,-32766, -381, -340, 767, 1142, 1143, 1144, 1138, + 1137, 1136, 1145, 1139, 1140, 1141, 386, 387, 446, 269, + 53, 389, 771, 772, 773, 774, 431, 0, 432, -85, + 335, 39, 252, 1046, 296, 828, 775, 776, 777, 778, + 779, 780, 781, 782, 783, 784, 804, 574, 805, 806, + 807, 808, 796, 797, 351, 352, 799, 800, 785, 786, + 787, 789, 790, 791, 362, 831, 832, 833, 834, 835, + 575, 1371, 304, 4, 792, 793, 576, 577, 1370, 816, + 814, 815, 827, 811, 812, -195, 1309, 578, 579, 810, + 580, 581, 582, 583, 5, 584, 585, 479, 480, 876, + -626, 877, 813, 586, 587, 494, 138, -626, 132, 133, + 134, 573, 135, 136, 1082, 764, 765, 766, 137, 41, + -32766, -194, 738, 1039, 1038, 1037, 1043, 1040, 1041, 1042, + -32766,-32766,-32766,-32767,-32767,-32767,-32767, 105, 106, 107, + 108, 109, 29, 758, 757, 1055, 849,-32766,-32766,-32766, + 1289,-32766, 847,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + 38, 934, -340, 767,-32766,-32766,-32766, 848,-32766, 295, + -32766,-32766,-32766,-32766,-32766, 139, 1367, 269, 53, 389, + 771, 772, 773, 774, 148,-32766, 432,-32766,-32766,-32766, + -32766, 728,-32766, 828, 775, 776, 777, 778, 779, 780, + 781, 782, 783, 784, 804, 574, 805, 806, 807, 808, + 796, 797, 351, 352, 799, 800, 785, 786, 787, 789, + 790, 791, 362, 831, 832, 833, 834, 835, 575, -577, + 432, 848, 792, 793, 576, 577, -575, 816, 814, 815, + 827, 811, 812, -195, 924, 578, 579, 810, 580, 581, + 582, 583, 143, 584, 585, 839, 334,-32766,-32766,-32766, + 813, 586, 587, -626, 138, -626, 132, 133, 134, 573, + 135, 136, 1079, 764, 765, 766, 137, 41,-32766, -194, + -32766,-32766,-32766, 1006,-32766,-32766,-32766, 255, -623,-32766, + 110, 111, 112, 315, 280, -623, -577, -577, 242, 1078, + -32766, 758, 757, -575, -575,-32766, 113,-32766,-32766, 1284, + 1283, 1285, -577, 319, 78, 1351, 627, 621, 1117, -575, + 334, 767, 844, 936, -583, 1055, -577, 723, 292, 569, + 296, -582, 398, -575, 10, 269, 53, 389, 771, 772, + 773, 774, 144, 3, 432, 1396, 334, 331, 1397, 295, + 153, 828, 775, 776, 777, 778, 779, 780, 781, 782, + 783, 784, 804, 574, 805, 806, 807, 808, 796, 797, + 351, 352, 799, 800, 785, 786, 787, 789, 790, 791, + 362, 831, 832, 833, 834, 835, 575, -574, 841, -576, + 792, 793, 576, 577, 1321, 816, 814, 815, 827, 811, + 812, 347, 845, 578, 579, 810, 580, 581, 582, 583, + -579, 584, 585, 241, 1052, 1007,-32766, 348, 813, 586, + 587, 27, 151, 376, 132, 133, 134, 573, 135, 136, + 1084, 764, 765, 766, 137, 41, 1116, 959, 958, 1055, + 750, 1055,-32766,-32766,-32766, 839, 1131, 130, 386, 387, + -275, -623, 380, -623, -574, -574, -576, -576, 431, 758, + 757, 396, 934, 288, 934, 295, 975, 976, 843, 154, + -574, 977, -576, 388, 387, 725, 934, -579, -579, 767, + 971, 85, -581, 431, -574, 334, -576, 957,-32766,-32766, + -32766, 450, 729, 269, 53, 389, 771, 772, 773, 774, + 451, 301, 432, 876, 304, 877, 730, -579, 452, 828, + 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, + 804, 574, 805, 806, 807, 808, 796, 797, 351, 352, + 799, 800, 785, 786, 787, 789, 790, 791, 362, 831, + 832, 833, 834, 835, 575, 924,-32766, 924, 792, 793, + 576, 577, 453, 816, 814, 815, 827, 811, 812, 924, + 854, 578, 579, 810, 580, 581, 582, 583, 156, 584, + 585, 1055, 86, 87, 88, 157, 813, 586, 587, -87, + 151, 788, 759, 760, 761, 762, 763, 158, 764, 765, + 766, 801, 802, 40, 1052, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 1055, + 280, 107, 108, 109, 936, 160, 936, 36, 723, -617, + 723, -617, 113,-32766,-32766, 51, 767, -78, 992, 468, + 469, 470, 723, 1115, 758, 757, -58, 670, 24, -57, + 768, 769, 770, 771, 772, 773, 774, 689, 690, 837, + 152, 414, 384, 385, 390, 391, 828, 775, 776, 777, + 778, 779, 780, 781, 782, 783, 784, 804, 826, 805, + 806, 807, 808, 796, 797, 798, 825, 799, 800, 785, + 786, 787, 789, 790, 791, 830, 831, 832, 833, 834, + 835, 836, 305, 306, 1052, 792, 793, 794, 795, 127, + 816, 814, 815, 827, 811, 812, 661, 662, 803, 809, + 810, 817, 818, 820, 819, 128, 821, 822, 140, 1055, + 141, 147, 129, 813, 824, 823, 54, 55, 56, 525, + 57, 58, 161, -110, 162, 163, 59, 60, -110, 61, + -110, -573, 164, 288, 165, 311, -84, -308, -110, -110, + -110, -110, -110, -110, -110, -110, -110, -110, -110, 293, + -78, -73, -72, -71, -70, -69, -68, -67, -66, -65, + -46, 292, 113, -18, 62, 63, 145, 279, 289, 739, + 64, 742, 65, 249, 250, 66, 67, 68, 69, 70, + 71, 72, 73, 933, 31, 271, 47, 448, 526, 150, + -356, -304, 1315, 1316, 527, 934, 848, 284, -573, -573, + 1313, 45, 23, 528, 285, 529, 934, 530, 290, 531, + 291, 703, 532, 533, -573, 934, 340, 48, 49, 454, + 383, 382, 294, 50, 534, 733, 297, 298, -573, 374, + 346, 951, 699, 280, 149, 52, 1275, 839,-32766, 714, + 591, 536, 537, 538, 1398, 740, 716, 704, 848, 1149, + 1282, 310, 659, 540, 541, 312, 1301, 1302, 1303, 1304, + 1306, 1298, 1299, 303, 671, 692, -539, 1320, 676, 1305, + 1300, 705, 706, 1284, 1283, 1285, 304, 13, 924, 74, + -154, -154, -154, 329, 330, 334, 1280, -4, 934, 924, + 1284, 1283, 1285, 476, 504, -154, 288, -154, 924, -154, + 677, -154, 307, 308, 693, 597, 625, 304, 972, 847, + 1054, 381, -611, 309, 318, 1248, -529, 0, 379, 0, + 0, 11, 975, 976,-32766, 758, 757, 535, 413, 1284, + 1283, 1285, 131, 1322, 0, 910, 971, -110, -110, -110, + 35, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 30, 378, 953, 936, 31, 272, + -610, 723, 43, 334, 0, 0, 44, 0, 936, 747, + 848, 924, 723, -154, 1313, 748, 867, 936, 915, 1016, + 993, 723, 1000, 1191, 1193, 990, 1001, 913, 988, 1120, + 1123, 1124, 1121, 381, -573, 444, 1122, 1128, -278, 1310, + 302, 859, 1337, 1355, 975, 976, 1389, 664, 37, 535, + 1275, -609, -583, -582, 758, 757, -581, 539, 971, -110, + -110, -110, -580, -523, 1, 32, 1289, 540, 541, 33, + 1301, 1302, 1303, 1304, 1306, 1298, 1299, 42, 46, 75, + 79, 14, 80, 1305, 1300, 81, 82, 758, 757, 83, + 936,-32766, -276, 76, 723, -4, -16, 1282, 330, 334, + 84, -573, -573, 146,-32766,-32766,-32766, 155,-32766, 159, + -32766, 247,-32766, 336, 363,-32766, 364, -573, 365, 366, + -32766,-32766,-32766, 367,-32766, 368,-32766,-32766, 369, 328, + 1282, -573,-32766, 428, 31, 271, 370,-32766,-32766,-32766, + 371,-32766, 372,-32766,-32766,-32766, 848, 848,-32766, 373, + 1313, 375, 445,-32766,-32766,-32766, 568, 377, -275,-32766, + -32766, 16, 17, 18, 19,-32766, 428, 21, 412, 31, + 272, 495, 496, 503, 506, 77, 507,-32766, 508, 509, + 513, 848, -110, -110, 514, 1313, 1275, -110, 515, 523, + 602, 709, 1085, 1081, 1231, 1311, -110, 1083, 1080, 1061, + 1270, 1057, -280, -102, 541,-32766, 1301, 1302, 1303, 1304, + 1306, 1298, 1299, 15, 20, 25, -50, 301, 411, 1305, + 1300, 1275, 616, 622, 650, 715, 1235, 304, 1288, 76, + 78, 417, 1232, 1368, 330, 334, 334, 724, 727, 541, + 731, 1301, 1302, 1303, 1304, 1306, 1298, 1299, 732, 142, + 734, 735, 736, 737, 1305, 1300, 741, 726, 1314,-32766, + 744, 911, 1393, 1395, 76, 1282, 870, 0, 869, 330, + 334, 965,-32766,-32766,-32766, 1008,-32766, 1394,-32766, 964, + -32766, 962, 963,-32766, 966, 1263, 944, 954,-32766,-32766, + -32766, 942,-32766, 998,-32766,-32766, 999, 648, 1282, 1392, + -32766, 428, 1349, 1338, 1356,-32766,-32766,-32766, 1365,-32766, + 0,-32766,-32766,-32766, 0, 0,-32766, 0, 0, 0, + 0,-32766,-32766,-32766, 934,-32766, 0,-32766,-32766, 0, + 0, 1282, 0,-32766, 428, 0, 0, 0,-32766,-32766, + -32766, 0,-32766, 0,-32766,-32766,-32766, 934, 0,-32766, + 0, 0, 0, 0,-32766,-32766,-32766, 0,-32766, 0, + -32766,-32766, 0, 0, 1282, 0,-32766, 428, 0, 0, + 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766,-32766, + 0, 0,-32766, 0, 0, 0, 499,-32766,-32766,-32766, + 0,-32766, 0,-32766,-32766, 0, 0, 1282, 604,-32766, + 428, 0, 0, 1289,-32766,-32766,-32766, 924,-32766, 0, + -32766,-32766,-32766, 0, 0,-32766, 2, 0, 0, 0, + -32766,-32766,-32766, -253, -253, -253,-32766,-32766, 0, 381, + 924, 0,-32766, 428, 0, 0, 0, 0, 0, 0, + 975, 976, 0, 0,-32766, 535, -252, -252, -252, 0, + 0, 0, 381, 910, 971, -110, -110, -110, 0, 0, + 0, 0, 0, 975, 976, 0, 0, 0, 535, 0, + 0, 0, 0, 0, 0, 0, 910, 971, -110, -110, + -110,-32766, 0, 0, 848, 0, 936, 1282, 0, 0, + 723, -253, 0, 0,-32766,-32766,-32766, 0,-32766, 0, + -32766, 0,-32766, 0, 0,-32766, 0, 0, 0, 936, + -32766,-32766,-32766, 723, -252, 0,-32766,-32766, 0, -110, + -110, 0,-32766, 428, -110, 0, 0, 0, 0, 0, + 0, 0, 0, -110,-32766, 0, 0, 0, 0, 0, + 0, 0,-32766, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 304, 0, 0, 78, 0, 0, + 0, 0, 0, 334 ); protected array $actionCheck = array( 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, - 12, 13, 82, 31, 0, 85, 9, 10, 11, 31, + 12, 13, 82, 31, 116, 85, 9, 10, 11, 31, 80, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 9, 10, 11, 8, 37, 38, 30, 1, 32, + 125, 9, 10, 11, 1, 37, 38, 30, 140, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 106, 30, 108, 1, 57, 116, 117, 118, 119, + 43, 106, 30, 108, 8, 57, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 106, 107, 108, 71, - 72, 73, 74, 75, 76, 77, 116, 80, 80, 97, - 70, 151, 152, 8, 30, 87, 88, 89, 90, 91, + 72, 73, 74, 75, 76, 77, 116, 0, 80, 97, + 70, 151, 152, 1, 30, 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, 8, 162, 8, 126, 127, 128, 129, 8, 131, - 132, 133, 134, 135, 136, 9, 10, 139, 140, 141, - 142, 143, 144, 145, 9, 147, 148, 137, 138, 106, - 14, 108, 154, 155, 156, 167, 158, 160, 2, 3, + 122, 1, 162, 8, 126, 127, 128, 129, 8, 131, + 132, 133, 134, 135, 136, 8, 1, 139, 140, 141, + 142, 143, 144, 145, 8, 147, 148, 137, 138, 106, + 1, 108, 154, 155, 156, 167, 158, 8, 2, 3, 4, 5, 6, 7, 166, 9, 10, 11, 12, 13, 116, 8, 167, 119, 120, 121, 122, 123, 124, 125, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 166, 37, 38, 141, 1, 9, 10, 11, - 163, 30, 159, 32, 33, 34, 35, 36, 37, 38, - 9, 10, 11, 57, 9, 10, 11, 1, 30, 165, - 32, 33, 34, 35, 36, 8, 31, 71, 72, 73, - 74, 75, 76, 77, 1, 30, 80, 32, 33, 34, - 35, 8, 8, 87, 88, 89, 90, 91, 92, 93, + 51, 52, 8, 37, 38, 141, 163, 9, 10, 11, + 1, 30, 159, 32, 33, 34, 35, 36, 37, 38, + 8, 1, 166, 57, 9, 10, 11, 82, 30, 165, + 32, 33, 34, 35, 36, 8, 1, 71, 72, 73, + 74, 75, 76, 77, 8, 30, 80, 32, 33, 34, + 35, 31, 9, 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, 84, - 80, 166, 126, 127, 128, 129, 166, 131, 132, 133, - 134, 135, 136, 1, 8, 139, 140, 141, 142, 143, - 144, 145, 166, 147, 148, 163, 9, 10, 11, 167, - 154, 155, 156, 97, 158, 2, 3, 4, 5, 6, - 7, 14, 9, 10, 11, 12, 13, 30, 101, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 126, 57, 9, 10, 11, 163, 159, - 160, 161, 167, 80, 8, 106, 69, 108, 168, 70, - 57, 9, 10, 11, 82, 1, 30, 1, 32, 33, - 34, 1, 8, 8, 71, 72, 73, 74, 75, 76, - 77, 31, 30, 80, 32, 33, 1, 164, 8, 166, - 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, 137, 138, 8, 126, - 127, 128, 129, 160, 131, 132, 133, 134, 135, 136, - 167, 85, 139, 140, 141, 142, 143, 144, 145, 167, - 147, 148, 82, 171, 8, 116, 167, 154, 155, 156, - 2, 3, 4, 5, 6, 7, 106, 101, 108, 84, - 12, 13, 106, 15, 108, 70, 9, 10, 11, 113, - 141, 14, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 1, 8, 53, 54, 55, 8, 57, - 8, 8, 1, 116, 165, 30, 150, 8, 50, 51, - 140, 69, 8, 163, 56, 70, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 140, 70, 71, - 72, 73, 74, 8, 168, 165, 78, 79, 80, 8, - 82, 171, 137, 138, 86, 87, 88, 89, 163, 91, - 1, 93, 167, 95, 70, 80, 98, 99, 153, 1, - 8, 103, 104, 105, 106, 107, 16, 109, 110, 1, - 165, 116, 167, 115, 116, 1, 50, 51, 52, 70, - 122, 1, 137, 138, 116, 127, 128, 129, 164, 31, - 166, 116, 132, 133, 134, 14, 141, 139, 140, 31, - 142, 143, 144, 145, 146, 147, 148, 149, 16, 141, - 14, 31, 167, 155, 156, 140, 141, 159, 160, 161, - 162, 137, 138, 165, 75, 76, 77, 169, 170, 171, - 16, 0, 1, 84, 159, 160, 161, 153, 31, 90, - 165, 92, 84, 94, 14, 96, 137, 138, 14, 165, - 14, 167, 84, 14, 80, 106, 164, 16, 166, 37, - 38, 16, 153, 16, 84, 37, 117, 118, 167, 37, - 38, 122, 171, 16, 165, 51, 167, 75, 76, 130, - 131, 132, 133, 134, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 16, 70, - 106, 107, 70, 71, 80, 16, 1, 83, 117, 118, - 116, 16, 163, 122, 82, 84, 167, 168, 86, 106, - 107, 163, 131, 75, 76, 167, 16, 59, 60, 116, - 16, 163, 116, 106, 107, 167, 31, 106, 70, 108, - 1, 167, 16, 163, 113, 171, 31, 167, 117, 118, - 101, 102, 35, 122, 122, 31, 162, 141, 37, 38, - 31, 130, 131, 132, 133, 134, 137, 138, 31, 30, - 1, 139, 140, 31, 142, 143, 144, 145, 146, 147, - 148, 165, 153, 106, 107, 154, 80, 155, 156, 84, - 31, 37, 38, 31, 163, 74, 167, 165, 167, 168, - 31, 80, 170, 171, 31, 137, 138, 30, 87, 88, - 89, 31, 91, 31, 93, 31, 95, 31, 31, 98, - 31, 153, 116, 31, 103, 104, 105, 31, 74, 31, - 109, 110, 72, 73, 80, 167, 115, 116, 70, 71, - 80, 87, 88, 89, 31, 91, 140, 93, 127, 95, - 82, 82, 98, 31, 86, 116, 31, 103, 104, 105, - 111, 112, 35, 109, 110, 159, 160, 161, 163, 115, - 116, 35, 167, 70, 71, 35, 35, 35, 35, 158, - 141, 127, 122, 37, 37, 82, 117, 118, 70, 86, - 122, 122, 37, 116, 38, 57, 70, 69, 77, 80, - 131, 85, 82, 80, 165, 90, 82, 96, 140, 140, - 142, 143, 144, 145, 146, 147, 148, 83, 141, 89, - 31, 92, 113, 155, 156, 122, 94, 136, 97, 135, - 97, 162, 97, 165, 165, 131, 135, 100, 170, 171, - 171, 153, 165, 140, 100, 142, 143, 144, 145, 146, - 147, 148, 140, 31, 157, 137, 138, 150, 155, 156, - 150, 153, 114, 74, 158, 163, 166, 153, 165, 80, - 153, 153, 167, 170, 171, -1, 87, 88, 89, -1, - 91, -1, 93, -1, 95, 167, -1, 98, -1, -1, - -1, -1, 103, 104, 105, 1, 74, -1, 109, 110, - -1, 162, 80, 153, 115, 116, 157, -1, 163, 87, - 88, 89, 159, 91, 163, 93, 127, 95, 1, 165, - 98, 163, 163, 163, 163, 103, 104, 105, 163, 74, - 163, 109, 110, 163, 163, 80, 163, 115, 116, 70, - 163, 163, 87, 88, 89, 163, 91, 163, 93, 127, - 95, 163, 165, 98, 163, 163, 166, 102, 103, 104, - 105, 164, 74, 164, 109, 110, 164, 164, 80, 81, - 115, 116, 164, 164, 1, 87, 88, 89, 84, 91, - 165, 93, 127, 95, 165, 165, 98, 166, 165, 165, - 165, 103, 104, 105, 100, 101, 102, 109, 110, 165, - 106, 84, 165, 115, 116, 165, 137, 138, 165, 165, - 165, 117, 118, 165, 165, 127, 122, 100, 101, 102, - 166, 165, 153, 106, 130, 131, 132, 133, 134, 165, - 165, 165, 165, 165, 117, 118, 167, 165, 165, 122, - 165, 165, 165, 165, 165, 165, 165, 130, 131, 132, - 133, 134, 74, 166, 165, 82, 165, 163, 80, 166, - 165, 167, 168, 165, 165, 87, 88, 89, 165, 91, - 165, 93, 165, 95, 166, 166, 98, 166, 166, 166, - 163, 103, 104, 105, 167, 168, 166, 109, 110, 166, - 117, 118, 166, 115, 116, 122, 166, 166, 166, 166, - 166, 166, 166, 166, 131, 127, 166, 166, 166, 166, - 166, 166, 166, 140, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 166, 166, 166, 166, -1, - 167, 167, 167, 167, 167, 162, 167, 167, 165, 167, - 169, 167, 167, 167, 171, 168, 167, -1, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, -1, -1, 170, -1, 171 + 114, 115, 116, 117, 118, 119, 120, 121, 122, 70, + 80, 82, 126, 127, 128, 129, 70, 131, 132, 133, + 134, 135, 136, 166, 84, 139, 140, 141, 142, 143, + 144, 145, 167, 147, 148, 80, 171, 9, 10, 11, + 154, 155, 156, 164, 158, 166, 2, 3, 4, 5, + 6, 7, 166, 9, 10, 11, 12, 13, 30, 166, + 32, 33, 34, 31, 9, 10, 11, 8, 1, 140, + 53, 54, 55, 8, 57, 8, 137, 138, 14, 1, + 116, 37, 38, 137, 138, 30, 69, 32, 33, 159, + 160, 161, 153, 8, 165, 1, 51, 1, 168, 153, + 171, 57, 80, 163, 165, 141, 167, 167, 30, 85, + 30, 165, 106, 167, 108, 71, 72, 73, 74, 75, + 76, 77, 167, 8, 80, 80, 171, 8, 83, 165, + 14, 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, 70, 80, 70, + 126, 127, 128, 129, 150, 131, 132, 133, 134, 135, + 136, 8, 160, 139, 140, 141, 142, 143, 144, 145, + 70, 147, 148, 97, 116, 163, 116, 8, 154, 155, + 156, 101, 158, 8, 2, 3, 4, 5, 6, 7, + 166, 9, 10, 11, 12, 13, 163, 72, 73, 141, + 167, 141, 9, 10, 11, 80, 126, 14, 106, 107, + 166, 164, 8, 166, 137, 138, 137, 138, 116, 37, + 38, 8, 1, 165, 1, 165, 117, 118, 160, 14, + 153, 122, 153, 106, 107, 167, 1, 137, 138, 57, + 131, 167, 165, 116, 167, 171, 167, 122, 9, 10, + 11, 8, 31, 71, 72, 73, 74, 75, 76, 77, + 8, 166, 80, 106, 162, 108, 31, 167, 8, 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, 84, 116, 84, 126, 127, + 128, 129, 8, 131, 132, 133, 134, 135, 136, 84, + 8, 139, 140, 141, 142, 143, 144, 145, 14, 147, + 148, 141, 9, 10, 11, 14, 154, 155, 156, 31, + 158, 2, 3, 4, 5, 6, 7, 14, 9, 10, + 11, 12, 13, 30, 116, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 141, + 57, 50, 51, 52, 163, 14, 163, 14, 167, 164, + 167, 166, 69, 9, 10, 70, 57, 16, 163, 132, + 133, 134, 167, 1, 37, 38, 16, 75, 76, 16, + 71, 72, 73, 74, 75, 76, 77, 75, 76, 80, + 101, 102, 106, 107, 106, 107, 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, 137, 138, 116, 126, 127, 128, 129, 16, + 131, 132, 133, 134, 135, 136, 111, 112, 139, 140, + 141, 142, 143, 144, 145, 16, 147, 148, 16, 141, + 16, 16, 167, 154, 155, 156, 2, 3, 4, 5, + 6, 7, 16, 101, 16, 16, 12, 13, 106, 15, + 108, 70, 16, 165, 16, 113, 31, 35, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 37, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 30, 69, 31, 50, 51, 31, 31, 31, 31, + 56, 31, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 31, 70, 71, 72, 73, 74, 31, + 168, 35, 78, 79, 80, 1, 82, 35, 137, 138, + 86, 87, 88, 89, 35, 91, 1, 93, 35, 95, + 35, 80, 98, 99, 153, 1, 35, 103, 104, 105, + 106, 107, 37, 109, 110, 31, 37, 37, 167, 115, + 116, 38, 77, 57, 70, 70, 122, 80, 85, 80, + 89, 127, 128, 129, 83, 31, 92, 116, 82, 82, + 80, 136, 113, 139, 140, 114, 142, 143, 144, 145, + 146, 147, 148, 149, 90, 94, 153, 150, 96, 155, + 156, 140, 141, 159, 160, 161, 162, 97, 84, 165, + 75, 76, 77, 169, 170, 171, 116, 0, 1, 84, + 159, 160, 161, 97, 97, 90, 165, 92, 84, 94, + 100, 96, 137, 138, 100, 157, 157, 162, 131, 159, + 140, 106, 165, 135, 135, 169, 153, -1, 153, -1, + -1, 153, 117, 118, 140, 37, 38, 122, 168, 159, + 160, 161, 167, 150, -1, 130, 131, 132, 133, 134, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 153, 153, 158, 163, 70, 71, + 165, 167, 163, 171, -1, -1, 163, -1, 163, 163, + 82, 84, 167, 168, 86, 163, 163, 163, 163, 163, + 163, 167, 163, 59, 60, 163, 163, 163, 163, 163, + 163, 163, 163, 106, 70, 108, 163, 163, 166, 164, + 113, 164, 164, 164, 117, 118, 164, 164, 167, 122, + 122, 165, 165, 165, 37, 38, 165, 130, 131, 132, + 133, 134, 165, 165, 165, 165, 1, 139, 140, 165, + 142, 143, 144, 145, 146, 147, 148, 165, 165, 165, + 165, 154, 165, 155, 156, 165, 165, 37, 38, 165, + 163, 74, 166, 165, 167, 168, 31, 80, 170, 171, + 165, 137, 138, 165, 87, 88, 89, 165, 91, 165, + 93, 165, 95, 165, 165, 98, 165, 153, 165, 165, + 103, 104, 105, 165, 74, 165, 109, 110, 165, 167, + 80, 167, 115, 116, 70, 71, 165, 87, 88, 89, + 165, 91, 165, 93, 127, 95, 82, 82, 98, 165, + 86, 165, 165, 103, 104, 105, 165, 167, 166, 109, + 110, 166, 166, 166, 166, 115, 116, 166, 166, 70, + 71, 166, 166, 166, 166, 158, 166, 127, 166, 166, + 166, 82, 117, 118, 166, 86, 122, 122, 166, 166, + 166, 166, 166, 166, 166, 166, 131, 166, 166, 166, + 166, 166, 166, 166, 140, 140, 142, 143, 144, 145, + 146, 147, 148, 166, 166, 166, 31, 166, 166, 155, + 156, 122, 166, 166, 166, 166, 166, 162, 166, 165, + 165, 168, 166, 166, 170, 171, 171, 167, 167, 140, + 167, 142, 143, 144, 145, 146, 147, 148, 167, 31, + 167, 167, 167, 167, 155, 156, 167, 167, 170, 74, + 168, 168, 168, 168, 165, 80, 168, -1, 168, 170, + 171, 168, 87, 88, 89, 168, 91, 168, 93, 168, + 95, 168, 168, 98, 168, 168, 168, 168, 103, 104, + 105, 168, 74, 168, 109, 110, 168, 168, 80, 168, + 115, 116, 168, 168, 168, 87, 88, 89, 168, 91, + -1, 93, 127, 95, -1, -1, 98, -1, -1, -1, + -1, 103, 104, 105, 1, 74, -1, 109, 110, -1, + -1, 80, -1, 115, 116, -1, -1, -1, 87, 88, + 89, -1, 91, -1, 93, 127, 95, 1, -1, 98, + -1, -1, -1, -1, 103, 104, 105, -1, 74, -1, + 109, 110, -1, -1, 80, -1, 115, 116, -1, -1, + -1, 87, 88, 89, -1, 91, -1, 93, 127, 95, + -1, -1, 98, -1, -1, -1, 102, 103, 104, 105, + -1, 74, -1, 109, 110, -1, -1, 80, 81, 115, + 116, -1, -1, 1, 87, 88, 89, 84, 91, -1, + 93, 127, 95, -1, -1, 98, 165, -1, -1, -1, + 103, 104, 105, 100, 101, 102, 109, 110, -1, 106, + 84, -1, 115, 116, -1, -1, -1, -1, -1, -1, + 117, 118, -1, -1, 127, 122, 100, 101, 102, -1, + -1, -1, 106, 130, 131, 132, 133, 134, -1, -1, + -1, -1, -1, 117, 118, -1, -1, -1, 122, -1, + -1, -1, -1, -1, -1, -1, 130, 131, 132, 133, + 134, 74, -1, -1, 82, -1, 163, 80, -1, -1, + 167, 168, -1, -1, 87, 88, 89, -1, 91, -1, + 93, -1, 95, -1, -1, 98, -1, -1, -1, 163, + 103, 104, 105, 167, 168, -1, 109, 110, -1, 117, + 118, -1, 115, 116, 122, -1, -1, -1, -1, -1, + -1, -1, -1, 131, 127, -1, -1, -1, -1, -1, + -1, -1, 140, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 162, -1, -1, 165, -1, -1, + -1, -1, -1, 171 ); protected array $actionBase = array( - 0, -2, 156, 559, 641, 1004, 1027, 485, 292, 200, - -60, 283, 568, 590, 590, 715, 590, 195, 578, 901, - 395, 395, 395, 833, 313, 313, 833, 313, 731, 731, - 731, 731, 764, 764, 965, 965, 998, 932, 899, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 37, 360, 216, 649, 1063, 1069, 1065, - 1070, 1061, 1060, 1064, 1066, 1071, 1111, 1112, 835, 1113, - 1114, 1110, 1115, 1067, 919, 1062, 1068, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 135, 477, 126, 201, 201, 201, - 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, - 201, 201, 201, 201, 201, 201, 201, 642, 642, 22, - 22, 22, 362, 813, 778, 813, 813, 813, 813, 813, - 813, 813, 813, 346, 205, 678, 188, 171, 171, 7, - 7, 7, 7, 7, 376, 779, 54, 1083, 1083, 139, - 139, 139, 139, 227, -55, 749, 380, -40, 787, 604, - 626, 626, 536, 536, 478, 478, 349, 349, 478, 478, - 478, 465, 465, 465, 465, 415, 494, 519, 43, 366, - 822, 584, 584, 584, 584, 822, 822, 822, 822, 820, - 1116, 822, 986, 991, 822, 822, 639, 828, 828, 979, - 452, 452, 452, 828, 370, -70, -70, 370, 601, -70, - 511, 634, 397, 814, 623, 434, 397, 299, 455, 502, - 233, 863, 637, 863, 1059, 826, 826, 796, 739, 902, - 1089, 1072, 847, 1108, 854, 1109, 470, 10, 734, 1058, - 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1058, - 1117, 632, 1059, -3, 1117, 1117, 1117, 632, 632, 632, - 632, 632, 632, 632, 632, 797, 632, 632, 759, -3, - 612, 658, -3, 853, 632, 818, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, 37, -12, 37, 37, - 360, 5, 5, 37, 142, 53, 5, 5, 5, 5, - 37, 37, 37, 37, 637, 848, 807, 687, -18, 859, - 120, 848, 848, 848, 26, 136, 115, 727, 837, 259, - 829, 829, 829, 834, 944, 944, 829, 830, 829, 834, - 829, 829, 944, 944, 849, 944, 217, 509, 430, 500, - 514, 944, 356, 829, 829, 829, 829, 811, 944, 75, - 535, 829, 286, 234, 829, 829, 811, 804, 806, 801, - 944, 944, 944, 811, 496, 801, 801, 801, 861, 868, - 819, 802, 390, 375, 562, 163, 866, 802, 802, 829, - 503, 819, 802, 819, 802, 816, 802, 802, 802, 819, - 802, 830, 456, 802, 699, 705, 541, 113, 802, 14, - 955, 958, 617, 959, 953, 966, 1015, 974, 975, 1075, - 935, 983, 954, 976, 1017, 950, 947, 832, 651, 655, - 824, 798, 934, 838, 838, 838, 929, 930, 838, 838, - 838, 838, 838, 838, 838, 838, 651, 907, 860, 840, - 987, 657, 667, 1046, 817, 1092, 1081, 986, 955, 975, - 725, 954, 976, 950, 947, 794, 792, 783, 790, 772, - 769, 747, 752, 799, 1050, 977, 812, 692, 1019, 988, - 1091, 1073, 989, 990, 1021, 1051, 869, 1052, 1093, 836, - 1094, 1095, 909, 999, 1076, 838, 925, 864, 912, 991, - 933, 651, 913, 1053, 964, 815, 1022, 1023, 1074, 843, - 844, 918, 1096, 1001, 1005, 1008, 1077, 1079, 855, 997, - 810, 1030, 845, 1087, 1033, 1036, 1040, 1041, 1080, 1097, - 1082, 897, 1084, 870, 825, 900, 821, 1098, 307, 851, - 852, 865, 1013, 591, 985, 1085, 1090, 1099, 1042, 1043, - 1044, 1100, 1101, 978, 871, 1003, 842, 1018, 931, 875, - 877, 606, 857, 1054, 846, 850, 856, 640, 644, 1102, - 1103, 1104, 982, 808, 831, 880, 881, 1055, 638, 1056, - 1105, 646, 883, 1106, 1047, 720, 724, 560, 624, 602, - 736, 839, 1086, 827, 858, 841, 1009, 724, 823, 887, - 1107, 888, 892, 894, 1045, 898, 0, 0, 0, 0, + 0, 156, -2, 314, 472, 472, 875, 957, 1353, 1376, + 801, 135, 200, -60, 358, 511, 864, 864, 884, 864, + 210, 525, 903, 513, 513, 513, 829, 629, 629, 829, + 629, 1047, 1047, 1047, 1047, 1080, 1080, 1314, 1314, 1347, + 1248, 1215, 1437, 1437, 1437, 1437, 1437, 1281, 1437, 1437, + 1437, 1437, 1437, 1281, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 33, 302, 385, 366, + 663, 1081, 1090, 1086, 1092, 1078, 1077, 1082, 1087, 1096, + 1161, 1164, 828, 1165, 1166, 1159, 1170, 1088, 913, 1079, + 1089, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 233, 483, + 674, 529, 529, 529, 529, 529, 529, 529, 529, 529, + 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, + 529, 958, 958, 22, 22, 22, 325, 1129, 1094, 1129, + 1129, 1129, 1129, 1129, 1129, 1129, 1129, 298, 205, 994, + 188, 171, 171, 7, 7, 7, 7, 7, 692, 1095, + 54, 1432, 1432, 139, 139, 139, 139, 370, -55, 348, + 199, -40, 350, 392, 638, 638, 621, 621, 528, 528, + 234, 234, 528, 528, 528, 480, 480, 480, 480, 209, + 216, 367, 43, 294, 854, 225, 225, 225, 225, 854, + 854, 854, 854, 853, 1118, 854, 979, 990, 854, 854, + 369, 731, 731, 835, 287, 287, 287, 731, 447, -70, + -70, 447, 399, -70, 364, 315, -102, 847, 417, 515, + -102, 390, 615, 337, 149, 820, 606, 820, 1067, 823, + 823, 799, 790, 904, 1120, 1097, 870, 1155, 874, 1158, + 557, 10, 789, 1066, 1066, 1066, 1066, 1066, 1066, 1066, + 1066, 1066, 1066, 1066, 862, 657, 1067, 292, 862, 862, + 862, 657, 657, 657, 657, 657, 657, 657, 657, 802, + 657, 657, 655, 292, 622, 632, 292, 851, 657, 833, + 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, + 33, -12, 33, 33, 302, 5, 5, 33, 323, 82, + 5, 5, 5, 5, 33, 33, 33, 33, 606, 846, + 818, 608, -18, 819, 163, 846, 846, 846, 46, 334, + 127, 772, 826, 276, 827, 827, 827, 837, 929, 929, + 827, 836, 827, 837, 827, 827, 929, 929, 815, 929, + 217, 533, 443, 494, 542, 929, 335, 827, 827, 827, + 827, 849, 929, 115, 136, 550, 827, 329, 226, 827, + 827, 849, 848, 807, 785, 929, 929, 929, 849, 465, + 785, 785, 785, 876, 882, 809, 806, 389, 355, 602, + 202, 863, 806, 806, 827, 503, 809, 806, 809, 806, + 868, 806, 806, 806, 809, 806, 836, 459, 806, 776, + 778, 594, 184, 806, 77, 944, 945, 598, 947, 942, + 950, 1017, 951, 954, 1100, 928, 976, 943, 965, 1021, + 934, 930, 822, 743, 759, 838, 783, 927, 763, 763, + 763, 917, 918, 763, 763, 763, 763, 763, 763, 763, + 763, 743, 905, 872, 821, 981, 762, 764, 1054, 787, + 1123, 816, 979, 944, 954, 775, 943, 965, 934, 930, + 798, 797, 795, 796, 794, 793, 791, 792, 805, 1056, + 1057, 968, 869, 765, 1031, 983, 1122, 992, 984, 988, + 1032, 1058, 883, 1059, 1124, 834, 1125, 1128, 907, 993, + 1101, 763, 916, 817, 908, 990, 921, 743, 909, 1061, + 1062, 1025, 911, 1035, 1036, 1020, 866, 831, 912, 1130, + 1001, 1005, 1007, 1103, 1111, 873, 1026, 902, 1037, 867, + 830, 1038, 1040, 1042, 1043, 1113, 1133, 1114, 865, 1115, + 885, 844, 956, 842, 1137, 386, 843, 845, 860, 1016, + 505, 978, 1116, 1093, 1139, 1044, 1048, 1052, 1141, 1143, + 972, 886, 1027, 841, 1028, 1022, 887, 889, 604, 859, + 1063, 832, 839, 855, 611, 623, 1144, 1146, 1147, 974, + 808, 825, 892, 893, 1064, 782, 1065, 1148, 661, 894, + 1149, 1055, 779, 786, 671, 683, 680, 788, 824, 1119, + 871, 811, 850, 1014, 786, 810, 895, 1153, 896, 897, + 898, 1053, 899, 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, 468, 468, 468, 468, - 468, 468, 313, 313, 313, 313, 313, 468, 468, 468, - 468, 468, 468, 468, 313, 468, 468, 468, 313, 0, - 0, 313, 0, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 629, 629, 629, 629, 629, 784, 784, 784, + 784, 784, 784, 784, 629, 784, 784, 784, 629, 0, + 0, 629, 0, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 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, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 716, 716, 297, 297, 297, 297, 716, 716, - 716, 716, 716, 716, 716, 716, 716, 716, 297, 297, - 0, 297, 297, 297, 297, 297, 297, 297, 297, 849, - 716, 716, 716, 716, 452, 452, 452, 452, -95, -95, - 716, 716, 601, 716, 601, 716, 716, 452, 452, 716, - 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, - 0, 0, 0, -3, -70, 716, 830, 830, 830, 830, - 716, 716, 716, 716, -70, -70, 716, 770, 770, 716, - 716, 0, 0, 0, 0, 0, 0, 0, 0, -3, - 0, 0, -3, 0, 0, 830, 830, 716, 601, 849, - 374, 716, 0, 0, 0, 0, -3, 830, -3, 632, - -70, -70, 632, 632, 5, 37, 374, 659, 659, 659, - 659, 0, 0, 637, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 830, 0, 849, 0, 830, - 830, 830, 0, 0, 0, 0, 0, 0, 0, 0, - 944, 0, 0, 0, 0, 0, 0, 0, 830, 0, - 944, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 830, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 838, 843, 0, 0, 843, 0, 838, 838, 838, 0, - 0, 0, 857, 638 + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 840, 840, 613, 613, 613, 613, 840, + 840, 840, 840, 840, 840, 840, 840, 840, 840, 613, + 613, 0, 613, 613, 613, 613, 613, 613, 613, 613, + 815, 840, 840, 840, 840, 287, 287, 287, 287, -95, + -95, 840, 840, 399, 840, 399, 840, 840, 287, 287, + 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, + 840, 0, 0, 0, 292, -70, 840, 836, 836, 836, + 836, 840, 840, 840, 840, -70, -70, 840, 415, 415, + 840, 840, 0, 0, 0, 0, 0, 0, 0, 0, + 292, 0, 0, 292, 0, 0, 836, 836, 840, 399, + 815, 120, 840, 0, 0, 0, 0, 292, 836, 292, + 657, -70, -70, 657, 657, 5, 33, 120, 609, 609, + 609, 609, 0, 0, 606, 815, 815, 815, 815, 815, + 815, 815, 815, 815, 815, 815, 836, 0, 815, 0, + 836, 836, 836, 0, 0, 0, 0, 0, 0, 0, + 0, 929, 0, 0, 0, 0, 0, 0, 0, 836, + 0, 929, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 836, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 763, 866, 0, 0, 866, 0, 763, 763, 763, + 0, 0, 0, 859, 782 ); protected array $actionDefault = array( - 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, + 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, + 32767, 629, 629, 629, 629,32767,32767, 257, 102,32767, + 32767, 498, 414, 414, 414,32767,32767,32767, 571, 571, + 571, 571, 571, 17,32767,32767,32767,32767,32767,32767, + 498,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, 100,32767, 620, 620, - 620, 620,32767,32767, 257, 102,32767,32767, 489, 406, - 406, 406,32767,32767, 562, 562, 562, 562, 562,32767, - 32767,32767,32767,32767,32767, 489,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, 36, 7, 8, 10, 11, 49, 337, 100, + 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 36, 7, - 8, 10, 11, 49, 17, 330, 100,32767,32767,32767, - 32767,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 613,32767,32767,32767, + 622,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, 394, 493, 472, - 473, 475, 476, 405, 563, 619, 333, 616, 335, 404, - 146, 345, 336, 245, 261, 494, 262, 495, 498, 499, - 218, 391, 150, 151, 436, 490, 438, 488, 492, 437, - 411, 417, 418, 419, 420, 421, 422, 423, 424, 425, - 426, 427, 428, 429, 409, 410, 491,32767,32767, 469, - 468, 467, 434,32767,32767,32767,32767,32767,32767,32767, - 32767, 102,32767, 435, 439, 408, 442, 440, 441, 458, - 459, 456, 457, 460,32767,32767, 322,32767,32767, 461, - 462, 463, 464, 372, 370,32767,32767, 111, 322, 111, - 32767,32767, 449, 450,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 506, 556, 466,32767,32767, + 32767, 402, 502, 481, 482, 484, 485, 413, 572, 628, + 343, 625, 341, 412, 146, 353, 342, 245, 261, 503, + 262, 504, 507, 508, 218, 399, 150, 151, 445, 499, + 447, 497, 501, 446, 419, 426, 427, 428, 429, 430, + 431, 432, 433, 434, 435, 436, 437, 438, 417, 418, + 500,32767,32767, 478, 477, 476, 443,32767,32767,32767, + 32767,32767,32767,32767,32767, 102,32767, 444, 448, 416, + 451, 449, 450, 467, 468, 465, 466, 469,32767,32767, + 322,32767,32767, 470, 471, 472, 473, 380, 378,32767, + 32767, 111, 322, 111,32767,32767, 458, 459,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 515, + 565, 475,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 102,32767,32767,32767, 100, + 567, 440, 442, 535, 453, 454, 452, 420,32767, 540, + 32767, 102,32767, 542,32767,32767,32767,32767,32767,32767, + 32767, 566,32767, 573, 573,32767, 528, 100, 196,32767, + 541, 196, 196,32767,32767,32767,32767,32767,32767,32767, + 32767, 636, 528, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110,32767, 196, 110,32767,32767,32767, + 100, 196, 196, 196, 196, 196, 196, 196, 196, 543, + 196, 196, 191,32767, 271, 273, 102, 590, 196, 545, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 102,32767,32767,32767, 100, 558, 431, 433, 526, - 444, 445, 443, 412,32767, 531,32767, 102,32767, 533, - 32767,32767,32767,32767,32767,32767,32767, 557,32767, 564, - 564,32767, 519, 100, 196,32767, 532, 196, 196,32767, - 32767,32767,32767,32767,32767,32767,32767, 627, 519, 110, - 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 32767, 196, 110,32767,32767,32767, 100, 196, 196, 196, - 196, 196, 196, 196, 196, 534, 196, 196, 191,32767, - 271, 273, 102, 581, 196, 536,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 528, 463, + 139,32767, 530, 139, 573, 455, 456, 457, 573, 573, + 573, 318, 295,32767,32767,32767,32767,32767, 543, 543, + 100, 100, 100, 100,32767,32767,32767,32767, 111, 514, + 99, 99, 99, 99, 99, 103, 101,32767,32767,32767, + 32767, 226,32767, 101, 101, 99,32767, 101, 101,32767, + 32767, 226, 228, 215, 230,32767, 594, 595, 226, 101, + 230, 230, 230, 250, 250, 517, 324, 101, 99, 101, + 101, 198, 324, 324,32767, 101, 517, 324, 517, 324, + 200, 324, 324, 324, 517, 324,32767, 101, 324, 217, + 402, 99, 99, 324,32767,32767,32767, 530,32767,32767, + 32767,32767,32767,32767,32767, 225,32767,32767,32767,32767, + 32767,32767,32767,32767, 560,32767, 578, 592, 461, 462, + 464, 577, 575, 486, 487, 488, 489, 490, 491, 492, + 494, 624,32767, 534,32767,32767,32767, 352,32767, 634, + 32767,32767,32767, 9, 74, 523, 42, 43, 51, 57, + 549, 550, 551, 552, 546, 547, 553, 548,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 519, 454, 139,32767, 521, 139, - 564, 446, 447, 448, 564, 564, 564, 318, 295,32767, - 32767,32767,32767,32767, 534, 534, 100, 100, 100, 100, - 32767,32767,32767,32767, 111, 505, 99, 99, 99, 99, - 99, 103, 101,32767,32767,32767,32767, 226,32767, 101, - 99,32767, 101, 101,32767,32767, 226, 228, 215, 230, - 32767, 585, 586, 226, 101, 230, 230, 230, 250, 250, - 508, 324, 101, 99, 101, 101, 198, 324, 324,32767, - 101, 508, 324, 508, 324, 200, 324, 324, 324, 508, - 324,32767, 101, 324, 217, 394, 99, 99, 324,32767, - 32767,32767, 521,32767,32767,32767,32767,32767,32767,32767, - 225,32767,32767,32767,32767,32767,32767,32767,32767, 551, - 32767, 569, 583, 452, 453, 455, 568, 566, 477, 478, - 479, 480, 481, 482, 483, 485, 615,32767, 525,32767, - 32767,32767, 344,32767, 625,32767,32767,32767, 9, 74, - 514, 42, 43, 51, 57, 540, 541, 542, 543, 537, - 538, 544, 539,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 626,32767, - 564,32767,32767,32767,32767, 451, 546, 591,32767,32767, - 565, 618,32767,32767,32767,32767,32767,32767,32767, 139, + 32767,32767,32767,32767, 635,32767, 573,32767,32767,32767, + 32767, 460, 555, 600,32767,32767, 574, 627,32767,32767, + 32767,32767,32767,32767,32767,32767, 139,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 560,32767, 137, + 32767,32767,32767,32767,32767,32767,32767,32767, 556,32767, + 32767,32767, 573,32767,32767,32767,32767, 320, 317,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 551,32767, 137,32767,32767,32767,32767,32767,32767,32767, - 32767, 547,32767,32767,32767, 564,32767,32767,32767,32767, - 320, 317,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 564,32767, - 32767,32767,32767,32767, 297,32767, 314,32767,32767,32767, + 32767,32767,32767,32767,32767, 573,32767,32767,32767,32767, + 32767, 297,32767, 314,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 390, 521, 300, 302, 303, - 32767,32767,32767,32767, 366,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 153, 153, 3, 3, - 347, 153, 153, 153, 347, 347, 153, 347, 347, 347, - 153, 153, 153, 153, 153, 153, 283, 186, 265, 268, - 250, 250, 153, 358, 153 + 32767,32767, 398, 530, 300, 302, 303,32767,32767,32767, + 32767, 374,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 153, 153, 3, 3, 355, 153, 153, + 153, 355, 355, 153, 355, 355, 355, 153, 153, 153, + 153, 153, 153, 283, 186, 265, 268, 250, 250, 153, + 366, 153 ); protected array $goto = array( - 196, 196, 1046, 920, 703, 921, 661, 662, 590, 679, - 680, 681, 739, 644, 646, 1077, 429, 666, 619, 858, - 712, 690, 693, 1019, 701, 710, 1015, 166, 166, 166, - 166, 220, 197, 193, 193, 176, 178, 215, 193, 193, - 193, 193, 193, 194, 194, 194, 194, 194, 188, 189, - 190, 191, 192, 217, 215, 218, 543, 544, 425, 545, - 548, 549, 550, 551, 552, 553, 554, 555, 1161, 167, - 168, 169, 195, 170, 171, 172, 165, 173, 174, 175, - 177, 214, 216, 219, 239, 242, 253, 254, 256, 257, - 258, 259, 260, 261, 262, 263, 269, 270, 271, 272, - 282, 283, 320, 321, 322, 431, 432, 433, 605, 221, - 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 179, 236, 180, 188, 189, 190, - 191, 192, 217, 1161, 198, 199, 200, 201, 240, 181, - 182, 202, 183, 203, 199, 184, 241, 198, 164, 204, - 205, 185, 206, 207, 208, 186, 209, 210, 187, 211, - 212, 213, 279, 277, 279, 279, 861, 435, 668, 859, - 5, 607, 6, 430, 323, 317, 318, 339, 600, 434, - 340, 436, 645, 630, 630, 900, 857, 900, 900, 1296, - 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 1296, 833, - 357, 556, 556, 556, 556, 984, 611, 345, 628, 665, - 357, 357, 916, 911, 912, 925, 867, 913, 864, 914, - 915, 865, 868, 423, 919, 872, 357, 357, 485, 871, - 357, 353, 1383, 346, 345, 487, 1099, 1094, 1095, 1096, - 473, 473, 893, 562, 1315, 1315, 357, 357, 351, 473, - 1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315, - 1265, 1046, 1265, 1265, 398, 401, 608, 612, 597, 468, - 1046, 1265, 1356, 1046, 700, 1046, 1046, 1210, 835, 1046, - 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, 1046, - 700, 1241, 953, 700, 1327, 1265, 1242, 1245, 954, 1246, - 1265, 1265, 1265, 1265, 567, 560, 1265, 1119, 1120, 1265, - 1265, 1348, 1348, 1348, 1348, 558, 515, 558, 558, 1005, - 1049, 1049, 949, 949, 688, 961, 558, 933, 1041, 1057, - 1058, 934, 396, 875, 312, 560, 567, 592, 593, 313, - 603, 609, 595, 624, 625, 463, 667, 463, 562, 887, - 461, 25, 874, 1052, 1051, 978, 978, 978, 978, 1343, - 1344, 461, 1312, 1312, 972, 979, 1055, 1056, 1312, 1312, - 1312, 1312, 1312, 1312, 1312, 1312, 1312, 1312, 547, 547, - 356, 356, 356, 356, 547, 547, 547, 547, 547, 547, - 547, 547, 547, 547, 546, 546, 445, 1366, 1366, 1158, - 546, 1070, 546, 546, 546, 546, 546, 546, 546, 546, - 1022, 1022, 1258, 249, 249, 329, 310, 1366, 443, 888, - 876, 1082, 1086, 454, 454, 839, 454, 454, 1338, 689, - 1338, 1338, 987, 1369, 1369, 482, 1341, 1342, 673, 1338, - 247, 247, 247, 247, 244, 250, 506, 854, 507, 854, - 561, 587, 561, 851, 513, 977, 561, 623, 587, 341, - 399, 467, 601, 622, 1350, 1350, 1350, 1350, 839, 967, - 839, 405, 877, 476, 604, 477, 478, 880, 1131, 892, - 1256, 885, 354, 355, 1374, 1375, 1027, 411, 412, 976, - 414, 711, 677, 1334, 678, 1260, 416, 417, 418, 1083, - 691, 406, 1008, 419, 854, 980, 742, 738, 349, 883, - 559, 1017, 1012, 638, 640, 642, 483, 1087, 454, 454, - 454, 454, 454, 454, 454, 454, 454, 454, 454, 889, - 989, 454, 1037, 1085, 1133, 0, 0, 1336, 1336, 1085, - 617, 631, 634, 635, 636, 637, 658, 659, 660, 714, - 0, 0, 1261, 1262, 0, 1248, 0, 0, 0, 0, - 613, 849, 0, 938, 1148, 0, 0, 437, 1248, 0, - 0, 0, 0, 0, 0, 1024, 0, 0, 0, 437, - 1263, 1324, 1325, 879, 0, 671, 1003, 1053, 1053, 606, - 1112, 873, 672, 1064, 1060, 1061, 0, 0, 0, 0, - 715, 0, 0, 1255, 0, 514, 706, 0, 1110, 0, + 200, 168, 200, 200, 200, 1053, 927, 710, 928, 668, + 669, 596, 686, 687, 688, 746, 651, 653, 357, 433, + 673, 626, 589, 719, 697, 700, 1026, 708, 717, 1022, + 170, 170, 170, 170, 224, 201, 197, 197, 180, 182, + 219, 197, 197, 197, 197, 197, 1177, 198, 198, 198, + 198, 198, 1177, 192, 193, 194, 195, 196, 221, 219, + 222, 548, 549, 429, 550, 553, 554, 555, 556, 557, + 558, 559, 560, 171, 172, 173, 199, 174, 175, 176, + 169, 177, 178, 179, 181, 218, 220, 223, 243, 246, + 257, 258, 260, 261, 262, 263, 264, 265, 266, 267, + 273, 274, 275, 276, 286, 287, 324, 325, 326, 435, + 436, 437, 611, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 183, 240, + 184, 192, 193, 194, 195, 196, 221, 202, 203, 204, + 205, 244, 185, 186, 206, 187, 207, 203, 188, 245, + 202, 167, 208, 209, 189, 210, 211, 212, 190, 213, + 214, 191, 215, 216, 217, 283, 281, 283, 283, 868, + 907, 864, 907, 907, 613, 635, 672, 253, 253, 253, + 253, 253, 439, 675, 402, 405, 614, 618, 434, 327, + 321, 322, 343, 606, 438, 344, 440, 652, 1087, 8, + 467, 9, 467, 361, 1086, 1088, 1091, 251, 251, 251, + 251, 248, 254, 361, 361, 923, 918, 919, 932, 874, + 920, 871, 921, 922, 872, 875, 472, 926, 879, 361, + 361, 490, 878, 361, 1226, 1399, 478, 478, 492, 1114, + 1109, 1110, 1111, 349, 865, 478, 567, 637, 637, 361, + 361, 449, 866, 1312, 1312, 1312, 1312, 1312, 1312, 1312, + 1312, 1312, 1312, 840, 1281, 1053, 1281, 1281, 991, 350, + 349, 358, 359, 900, 1053, 1281, 355, 1053, 427, 1053, + 1053, 1134, 1135, 1053, 1053, 1053, 1053, 1053, 1053, 1053, + 1053, 1053, 1053, 1053, 333, 314, 861, 1343, 861, 1281, + 1276, 983, 418, 718, 1281, 1281, 1281, 1281, 572, 565, + 1281, 1059, 1058, 1281, 1281, 1364, 1364, 1364, 1364, 520, + 511, 563, 512, 563, 563, 603, 956, 956, 518, 1372, + 707, 940, 563, 400, 842, 941, 1062, 1063, 316, 565, + 572, 598, 599, 317, 609, 615, 707, 631, 632, 707, + 1012, 567, 601, 861, 674, 28, 465, 1277, 1278, 1173, + 1264, 985, 985, 985, 985, 1077, 856, 465, 1331, 1331, + 979, 986, 447, 1264, 1331, 1331, 1331, 1331, 1331, 1331, + 1331, 1331, 1331, 1331, 1328, 1328, 1279, 1340, 1341, 696, + 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, + 624, 638, 641, 642, 643, 644, 665, 666, 667, 721, + 360, 360, 360, 360, 607, 629, 1274, 256, 256, 487, + 1357, 1358, 895, 883, 1097, 1101, 680, 458, 458, 858, + 458, 458, 1354, 630, 1354, 1354, 994, 887, 552, 552, + 1359, 1360, 846, 1354, 552, 552, 552, 552, 552, 552, + 552, 552, 552, 552, 566, 593, 566, 345, 974, 984, + 566, 1034, 593, 409, 403, 471, 884, 1272, 1366, 1366, + 1366, 1366, 882, 861, 645, 647, 649, 481, 610, 482, + 483, 749, 1146, 899, 1098, 846, 892, 846, 894, 1390, + 1391, 881, 551, 551, 410, 896, 488, 1350, 551, 1044, + 551, 551, 551, 551, 551, 551, 551, 551, 561, 561, + 561, 561, 1102, 617, 890, 996, 0, 1148, 0, 0, + 0, 0, 458, 458, 458, 458, 458, 458, 458, 458, + 458, 458, 458, 0, 0, 458, 0, 1100, 1382, 1382, + 0, 1352, 1352, 1100, 619, 620, 415, 416, 945, 1163, + 0, 684, 441, 685, 0, 420, 421, 422, 1382, 698, + 1031, 0, 423, 0, 441, 0, 0, 353, 886, 0, + 678, 1010, 1060, 1060, 1385, 1385, 880, 679, 1071, 1067, + 1068, 1056, 1056, 612, 1127, 695, 968, 0, 1271, 1048, + 1064, 1065, 0, 0, 722, 0, 0, 0, 1015, 519, + 713, 987, 1125, 745, 1257, 960, 564, 1024, 1019, 1258, + 1261, 961, 1262, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 273, 328, 0, 328, 328, 0, 0, 0, 252, - 252 + 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, 277, 332, 0, 332, 332, 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, 1029, 1029 ); protected array $gotoCheck = array( - 42, 42, 73, 65, 73, 65, 86, 86, 48, 86, - 86, 86, 48, 48, 48, 128, 13, 48, 13, 26, - 9, 48, 48, 48, 48, 48, 48, 42, 42, 42, + 42, 42, 42, 42, 42, 73, 65, 73, 65, 86, + 86, 48, 86, 86, 86, 48, 48, 48, 97, 13, + 48, 13, 127, 9, 48, 48, 48, 48, 48, 48, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -943,102 +1015,108 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 23, 23, 23, 23, 15, 66, 66, 27, - 46, 131, 46, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 108, 108, 25, 25, 25, 25, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 6, - 14, 107, 107, 107, 107, 49, 107, 174, 56, 56, - 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 43, 15, 15, 14, 14, 84, 15, - 14, 97, 14, 174, 174, 84, 15, 15, 15, 15, - 154, 154, 45, 14, 176, 176, 14, 14, 185, 154, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 73, 73, 73, 73, 59, 59, 59, 59, 178, 156, - 73, 73, 187, 73, 7, 73, 73, 156, 7, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 7, 79, 79, 7, 14, 73, 79, 79, 79, 79, - 73, 73, 73, 73, 76, 76, 73, 145, 145, 73, - 73, 9, 9, 9, 9, 19, 14, 19, 19, 103, - 89, 89, 9, 9, 89, 89, 19, 73, 89, 89, - 89, 73, 62, 35, 76, 76, 76, 76, 76, 76, - 76, 76, 104, 76, 76, 83, 64, 83, 14, 35, - 19, 76, 35, 119, 119, 19, 19, 19, 19, 184, - 184, 19, 177, 177, 19, 19, 120, 120, 177, 177, - 177, 177, 177, 177, 177, 177, 177, 177, 179, 179, - 24, 24, 24, 24, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 162, 162, 83, 188, 188, 155, - 162, 115, 162, 162, 162, 162, 162, 162, 162, 162, - 107, 107, 14, 5, 5, 175, 175, 188, 113, 16, - 16, 16, 16, 23, 23, 12, 23, 23, 131, 117, - 131, 131, 16, 188, 188, 182, 182, 182, 121, 131, - 5, 5, 5, 5, 5, 5, 160, 22, 160, 22, - 9, 9, 9, 18, 160, 16, 9, 80, 9, 29, - 9, 9, 2, 2, 131, 131, 131, 131, 12, 92, - 12, 28, 37, 9, 9, 9, 9, 39, 16, 16, - 166, 9, 97, 97, 9, 9, 110, 82, 82, 93, - 93, 93, 82, 131, 82, 20, 82, 82, 82, 130, - 82, 31, 50, 82, 22, 50, 99, 50, 82, 9, - 50, 50, 50, 85, 85, 85, 157, 133, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 41, - 96, 23, 114, 131, 148, -1, -1, 131, 131, 131, + 42, 42, 42, 42, 42, 23, 23, 23, 23, 15, + 25, 25, 25, 25, 134, 56, 56, 5, 5, 5, + 5, 5, 66, 66, 59, 59, 59, 59, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 131, 46, + 83, 46, 83, 14, 130, 130, 130, 5, 5, 5, + 5, 5, 5, 14, 14, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 159, 15, 15, 14, + 14, 84, 15, 14, 159, 14, 157, 157, 84, 15, + 15, 15, 15, 177, 26, 157, 14, 108, 108, 14, + 14, 83, 27, 108, 108, 108, 108, 108, 108, 108, + 108, 108, 108, 6, 73, 73, 73, 73, 49, 177, + 177, 97, 97, 45, 73, 73, 188, 73, 43, 73, + 73, 148, 148, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 178, 178, 22, 14, 22, 73, + 20, 93, 93, 93, 73, 73, 73, 73, 76, 76, + 73, 119, 119, 73, 73, 9, 9, 9, 9, 14, + 163, 19, 163, 19, 19, 181, 9, 9, 163, 190, + 7, 73, 19, 62, 7, 73, 120, 120, 76, 76, + 76, 76, 76, 76, 76, 76, 7, 76, 76, 7, + 103, 14, 104, 22, 64, 76, 19, 20, 20, 158, + 20, 19, 19, 19, 19, 115, 20, 19, 179, 179, + 19, 19, 113, 20, 179, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 180, 180, 20, 20, 20, 117, + 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - -1, -1, 20, 20, -1, 20, -1, -1, -1, -1, - 17, 20, -1, 17, 17, -1, -1, 118, 20, -1, - -1, -1, -1, -1, -1, 17, -1, -1, -1, 118, - 20, 20, 20, 17, -1, 17, 17, 118, 118, 8, - 8, 17, 118, 118, 118, 118, -1, -1, -1, -1, - 8, -1, -1, 17, -1, 8, 8, -1, 8, -1, + 24, 24, 24, 24, 2, 2, 14, 5, 5, 185, + 185, 185, 16, 16, 16, 16, 121, 23, 23, 18, + 23, 23, 134, 80, 134, 134, 16, 39, 182, 182, + 187, 187, 12, 134, 182, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 9, 9, 9, 29, 92, 16, + 9, 110, 9, 28, 9, 9, 37, 169, 134, 134, + 134, 134, 35, 22, 85, 85, 85, 9, 9, 9, + 9, 99, 16, 16, 133, 12, 9, 12, 35, 9, + 9, 35, 165, 165, 31, 41, 160, 134, 165, 114, + 165, 165, 165, 165, 165, 165, 165, 165, 107, 107, + 107, 107, 136, 107, 9, 96, -1, 151, -1, -1, + -1, -1, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, -1, -1, 23, -1, 134, 191, 191, + -1, 134, 134, 134, 17, 17, 82, 82, 17, 17, + -1, 82, 118, 82, -1, 82, 82, 82, 191, 82, + 17, -1, 82, -1, 118, -1, -1, 82, 17, -1, + 17, 17, 118, 118, 191, 191, 17, 118, 118, 118, + 118, 89, 89, 8, 8, 89, 89, -1, 17, 89, + 89, 89, -1, -1, 8, -1, -1, -1, 50, 8, + 8, 50, 8, 50, 79, 79, 50, 50, 50, 79, + 79, 79, 79, -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, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 24, 24, -1, 24, 24, -1, -1, -1, 5, - 5 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 24, 24, -1, 24, 24, -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, 107, 107 ); protected array $gotoBase = array( - 0, 0, -256, 0, 0, 412, 189, 267, 581, 10, - 0, 0, 127, -325, -99, -184, -38, 91, 142, 50, - 100, 0, 170, 159, 377, 182, 15, 165, 130, 161, - 0, 59, 0, 0, 0, -40, 0, 129, 0, 150, - 0, 83, -1, 200, 0, 216, -572, 0, -709, 187, - 490, 0, 0, 0, 0, 0, 168, 0, 0, 219, - 0, 0, 290, 0, 108, -11, -70, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -43, 0, 0, -120, - 144, 180, -10, 68, -248, 28, -718, 0, 0, 40, - 0, 0, 136, 183, 0, 0, 82, -258, 0, 96, - 0, 0, 0, 284, 299, 0, 0, 173, -54, 0, - 114, 0, 0, 140, 17, 126, 0, 145, 301, 73, - 80, 147, 0, 0, 0, 0, 0, 0, 13, 0, - 123, 163, 0, 70, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 34, 0, 0, 85, 0, - 0, 0, 0, 0, 206, 155, 1, 71, 0, 0, - -55, 0, 157, 0, 0, 0, 109, 0, 0, 0, - 0, 0, 0, 0, -92, 90, 7, 125, 239, 141, - 0, 0, 133, 0, -15, 218, 0, 241, 88, 0, - 0 + 0, 0, -311, 0, 0, 176, 250, 320, 572, 10, + 0, 0, 140, -326, -100, -185, -39, 71, 114, 52, + -99, 0, 15, 159, 404, 164, 237, 245, 118, 155, + 0, 48, 0, 0, 0, 95, 0, 119, 0, 106, + 0, 45, -1, 252, 0, 244, -550, 0, -713, 247, + 583, 0, 0, 0, 0, 0, 132, 0, 0, 135, + 0, 0, 288, 0, 112, -11, -59, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -43, 0, 0, 189, + 116, 36, 44, -81, -250, -16, -722, 0, 0, 297, + 0, 0, 121, -9, 0, 0, 63, -476, 0, 67, + 0, 0, 0, 312, 306, 0, 0, 477, 6, 0, + 85, 0, 0, 90, -21, 86, 0, 101, 282, 27, + 46, 131, 0, 0, 0, 0, 0, 20, 0, 0, + 201, 196, 0, 104, 163, 0, 61, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, + 0, 64, 0, 0, 0, 0, 0, 199, 111, -46, + 47, 0, 0, -186, 0, 251, 0, 0, 0, 92, + 0, 0, 0, 0, 0, 0, 0, -60, -35, 127, + 143, 293, 197, 0, 0, 113, 0, 62, 243, 0, + 295, 225, 0, 0 ); protected array $gotoDefault = array( - -32768, 519, 746, 4, 747, 942, 822, 831, 583, 537, - 713, 350, 632, 426, 1332, 918, 1147, 602, 850, 1274, - 1280, 462, 853, 334, 736, 930, 901, 902, 402, 389, - 866, 400, 656, 633, 500, 886, 458, 878, 492, 881, - 457, 890, 163, 422, 517, 894, 3, 897, 565, 928, - 982, 390, 905, 391, 684, 907, 586, 909, 910, 397, - 403, 404, 1152, 594, 629, 922, 255, 588, 923, 388, - 924, 932, 393, 395, 694, 472, 511, 505, 415, 1114, - 589, 616, 653, 451, 479, 627, 639, 626, 486, 438, - 420, 333, 966, 974, 493, 470, 988, 352, 996, 744, - 1160, 647, 495, 1004, 648, 1011, 1014, 538, 539, 484, - 1026, 266, 1029, 496, 1038, 23, 674, 1043, 1044, 675, - 649, 1066, 650, 676, 651, 1068, 469, 584, 1076, 459, - 1084, 1320, 460, 1088, 264, 1091, 278, 421, 439, 1097, - 1098, 9, 1104, 704, 705, 19, 274, 516, 1132, 695, - -32768,-32768,-32768,-32768, 456, 1159, 455, 1229, 1231, 566, - 497, 1249, 295, 1252, 687, 512, 1257, 452, 1323, 453, - 540, 480, 319, 541, 1367, 309, 337, 316, 557, 296, - 338, 542, 481, 1329, 1337, 335, 31, 1357, 1368, 599, - 621 + -32768, 524, 753, 7, 754, 949, 829, 838, 588, 542, + 720, 354, 639, 430, 1348, 925, 1162, 608, 857, 1290, + 1296, 466, 860, 338, 743, 937, 908, 909, 406, 393, + 873, 404, 663, 640, 505, 893, 462, 885, 497, 888, + 461, 897, 166, 426, 522, 901, 6, 904, 570, 935, + 989, 394, 912, 395, 691, 914, 592, 916, 917, 401, + 407, 408, 1167, 600, 636, 929, 259, 594, 930, 392, + 931, 939, 397, 399, 701, 477, 516, 510, 419, 1129, + 595, 623, 660, 455, 484, 634, 646, 633, 491, 442, + 424, 337, 973, 981, 498, 475, 995, 356, 1003, 751, + 1175, 654, 500, 1011, 655, 1018, 1021, 543, 544, 489, + 1033, 270, 1036, 501, 1045, 26, 681, 1050, 1051, 682, + 656, 1073, 657, 683, 658, 1075, 474, 590, 1176, 473, + 1090, 1096, 463, 1099, 1336, 464, 1103, 268, 1106, 282, + 425, 443, 1112, 1113, 12, 1119, 711, 712, 22, 278, + 521, 1147, 702,-32768,-32768,-32768,-32768, 460, 1174, 459, + 1245, 1247, 571, 502, 1265, 299, 1268, 694, 517, 1273, + 456, 1339, 457, 545, 485, 323, 546, 1383, 313, 341, + 320, 562, 300, 342, 547, 486, 1345, 1353, 339, 34, + 1373, 1384, 605, 628 ); protected array $ruleToNonTerminal = array( @@ -1075,14 +1153,15 @@ class Php7 extends \PhpParser\ParserAbstract 89, 118, 118, 118, 119, 119, 116, 116, 120, 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, 20, - 127, 126, 126, 128, 128, 128, 128, 60, 129, 129, - 130, 61, 132, 132, 133, 133, 134, 134, 86, 135, - 135, 135, 135, 135, 135, 135, 140, 140, 141, 141, - 142, 142, 142, 142, 142, 143, 144, 144, 139, 139, - 136, 136, 138, 138, 146, 146, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 137, 147, 147, 149, - 148, 148, 150, 150, 114, 151, 151, 153, 153, 153, - 152, 152, 62, 104, 154, 154, 56, 56, 42, 42, + 128, 128, 128, 128, 129, 129, 129, 127, 126, 126, + 131, 131, 131, 130, 130, 60, 132, 132, 133, 61, + 135, 135, 136, 136, 137, 137, 86, 138, 138, 138, + 138, 138, 138, 138, 143, 143, 144, 144, 145, 145, + 145, 145, 145, 146, 147, 147, 142, 142, 139, 139, + 141, 141, 149, 149, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 140, 150, 150, 152, 151, 151, + 153, 153, 114, 154, 154, 156, 156, 156, 155, 155, + 62, 104, 157, 157, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1092,20 +1171,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 161, 162, 162, 163, 155, 155, 160, 160, - 164, 165, 165, 166, 167, 168, 168, 168, 168, 19, - 19, 73, 73, 73, 73, 156, 156, 156, 156, 170, - 170, 159, 159, 159, 157, 157, 176, 176, 176, 176, - 176, 176, 176, 176, 176, 176, 177, 177, 177, 108, - 179, 179, 179, 179, 158, 158, 158, 158, 158, 158, - 158, 158, 59, 59, 173, 173, 173, 173, 173, 180, - 180, 169, 169, 169, 169, 181, 181, 181, 181, 181, - 181, 74, 74, 66, 66, 66, 66, 131, 131, 131, - 131, 184, 183, 172, 172, 172, 172, 172, 172, 172, - 171, 171, 171, 182, 182, 182, 182, 107, 178, 186, - 186, 185, 185, 187, 187, 187, 187, 187, 187, 187, - 187, 175, 175, 175, 175, 174, 189, 188, 188, 188, - 188, 188, 188, 188, 188, 190, 190, 190, 190 + 42, 164, 165, 165, 166, 158, 158, 163, 163, 167, + 168, 168, 169, 170, 171, 171, 171, 171, 19, 19, + 73, 73, 73, 73, 159, 159, 159, 159, 173, 173, + 162, 162, 162, 160, 160, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 180, 180, 180, 108, 182, + 182, 182, 182, 161, 161, 161, 161, 161, 161, 161, + 161, 59, 59, 176, 176, 176, 176, 176, 183, 183, + 172, 172, 172, 172, 184, 184, 184, 184, 184, 184, + 74, 74, 66, 66, 66, 66, 134, 134, 134, 134, + 187, 186, 175, 175, 175, 175, 175, 175, 175, 174, + 174, 174, 185, 185, 185, 185, 107, 181, 189, 189, + 188, 188, 190, 190, 190, 190, 190, 190, 190, 190, + 178, 178, 178, 178, 177, 192, 191, 191, 191, 191, + 191, 191, 191, 191, 193, 193, 193, 193 ); protected array $ruleToLength = array( @@ -1142,37 +1221,38 @@ class Php7 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, - 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, - 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, - 5, 6, 10, 3, 5, 1, 1, 3, 0, 2, - 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, - 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, - 1, 3, 0, 2, 0, 5, 8, 1, 3, 3, - 0, 2, 2, 2, 3, 1, 0, 1, 1, 3, - 3, 3, 4, 4, 1, 1, 2, 3, 3, 3, + 2, 4, 4, 3, 3, 1, 3, 1, 1, 3, + 2, 2, 3, 1, 1, 2, 3, 1, 1, 2, + 3, 1, 1, 3, 2, 0, 1, 5, 5, 6, + 10, 3, 5, 1, 1, 3, 0, 2, 4, 5, + 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, + 0, 2, 0, 5, 8, 1, 3, 3, 0, 2, + 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, + 4, 4, 1, 1, 2, 2, 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, 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, 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, 2, 8, 9, 8, 9, 9, 10, - 9, 10, 8, 3, 2, 2, 1, 1, 0, 4, - 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, - 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 5, 3, 3, - 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, - 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, - 1, 1, 3, 1, 1, 1, 4, 4, 1, 4, - 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, - 2, 1, 3, 1, 4, 4, 3, 3, 3, 3, - 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, - 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, - 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, - 3, 3, 3, 6, 3, 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, 10, 9, + 10, 8, 3, 2, 2, 1, 1, 0, 4, 2, + 1, 3, 2, 1, 2, 2, 2, 4, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, + 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, + 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 4, 4, 1, 4, 4, + 0, 1, 1, 1, 3, 3, 1, 4, 2, 2, + 1, 3, 1, 4, 4, 3, 3, 3, 3, 1, + 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, + 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, + 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, + 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1954,849 +2034,876 @@ protected function initReduceCallbacks(): void { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, 330 => static function ($self, $stackPos) { - $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = array(); }, 331 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, 332 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(4-2)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); }, 333 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, 334 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(3-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)]); }, 335 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 336 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 337 => static function ($self, $stackPos) { + $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 337 => null, 338 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 339 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 340 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 341 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 340 => null, - 341 => null, 342 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, 343 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 344 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 345 => null, + 346 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 347 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 348 => null, + 349 => null, + 350 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 351 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 352 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 345 => static function ($self, $stackPos) { + 353 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 346 => static function ($self, $stackPos) { + 354 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 347 => static function ($self, $stackPos) { + 355 => static function ($self, $stackPos) { $self->semValue = array(); }, - 348 => static function ($self, $stackPos) { + 356 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 349 => static function ($self, $stackPos) { + 357 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 350 => static function ($self, $stackPos) { + 358 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 351 => static function ($self, $stackPos) { + 359 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 352 => static function ($self, $stackPos) { + 360 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 353 => static function ($self, $stackPos) { + 361 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 354 => static function ($self, $stackPos) { + 362 => static function ($self, $stackPos) { $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 355 => static function ($self, $stackPos) { + 363 => static function ($self, $stackPos) { $self->semValue = null; /* will be skipped */ }, - 356 => static function ($self, $stackPos) { + 364 => static function ($self, $stackPos) { $self->semValue = array(); }, - 357 => static function ($self, $stackPos) { + 365 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 358 => static function ($self, $stackPos) { + 366 => static function ($self, $stackPos) { $self->semValue = array(); }, - 359 => static function ($self, $stackPos) { + 367 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 360 => static function ($self, $stackPos) { + 368 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 361 => static function ($self, $stackPos) { + 369 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 362 => static function ($self, $stackPos) { + 370 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 363 => static function ($self, $stackPos) { + 371 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 364 => static function ($self, $stackPos) { + 372 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 365 => static function ($self, $stackPos) { + 373 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 366 => null, - 367 => static function ($self, $stackPos) { + 374 => null, + 375 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 368 => static function ($self, $stackPos) { + 376 => static function ($self, $stackPos) { $self->semValue = null; }, - 369 => null, - 370 => null, - 371 => static function ($self, $stackPos) { + 377 => null, + 378 => null, + 379 => static function ($self, $stackPos) { $self->semValue = 0; }, - 372 => static function ($self, $stackPos) { + 380 => static function ($self, $stackPos) { $self->semValue = 0; }, - 373 => null, - 374 => null, - 375 => static function ($self, $stackPos) { + 381 => null, + 382 => null, + 383 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 376 => static function ($self, $stackPos) { + 384 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 377 => static function ($self, $stackPos) { + 385 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 378 => static function ($self, $stackPos) { + 386 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 379 => static function ($self, $stackPos) { + 387 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 380 => static function ($self, $stackPos) { + 388 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 381 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 382 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 383 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 384 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 385 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 386 => null, - 387 => static function ($self, $stackPos) { + 394 => null, + 395 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 388 => static function ($self, $stackPos) { + 396 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 389 => static function ($self, $stackPos) { + 397 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 390 => static function ($self, $stackPos) { + 398 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 391 => static function ($self, $stackPos) { + 399 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 392 => static function ($self, $stackPos) { + 400 => static function ($self, $stackPos) { $self->semValue = []; }, - 393 => static function ($self, $stackPos) { + 401 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 394 => static function ($self, $stackPos) { + 402 => static function ($self, $stackPos) { $self->semValue = []; }, - 395 => static function ($self, $stackPos) { + 403 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 396 => static function ($self, $stackPos) { + 404 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 397 => static function ($self, $stackPos) { + 405 => static function ($self, $stackPos) { $self->semValue = null; }, - 398 => static function ($self, $stackPos) { + 406 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 399 => static function ($self, $stackPos) { + 407 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 400 => static function ($self, $stackPos) { + 408 => static function ($self, $stackPos) { $self->semValue = 0; }, - 401 => static function ($self, $stackPos) { + 409 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 402 => null, - 403 => null, - 404 => static function ($self, $stackPos) { + 410 => null, + 411 => null, + 412 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 405 => static function ($self, $stackPos) { + 413 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 406 => static function ($self, $stackPos) { + 414 => static function ($self, $stackPos) { $self->semValue = array(); }, - 407 => null, - 408 => null, - 409 => static function ($self, $stackPos) { + 415 => null, + 416 => null, + 417 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 410 => static function ($self, $stackPos) { + 418 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 411 => static function ($self, $stackPos) { + 419 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 412 => static function ($self, $stackPos) { + 420 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 413 => static function ($self, $stackPos) { + 421 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 414 => null, - 415 => null, - 416 => static function ($self, $stackPos) { + 422 => null, + 423 => null, + 424 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 425 => static function ($self, $stackPos) { $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 417 => static function ($self, $stackPos) { + 426 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 418 => static function ($self, $stackPos) { + 427 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 419 => static function ($self, $stackPos) { + 428 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 420 => static function ($self, $stackPos) { + 429 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 421 => static function ($self, $stackPos) { + 430 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 422 => static function ($self, $stackPos) { + 431 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 423 => static function ($self, $stackPos) { + 432 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 424 => static function ($self, $stackPos) { + 433 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 425 => static function ($self, $stackPos) { + 434 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 426 => static function ($self, $stackPos) { + 435 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 427 => static function ($self, $stackPos) { + 436 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 428 => static function ($self, $stackPos) { + 437 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 429 => static function ($self, $stackPos) { + 438 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 430 => static function ($self, $stackPos) { + 439 => static function ($self, $stackPos) { $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 431 => static function ($self, $stackPos) { + 440 => static function ($self, $stackPos) { $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 432 => static function ($self, $stackPos) { + 441 => static function ($self, $stackPos) { $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 433 => static function ($self, $stackPos) { + 442 => static function ($self, $stackPos) { $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 434 => static function ($self, $stackPos) { + 443 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 435 => static function ($self, $stackPos) { + 444 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 436 => static function ($self, $stackPos) { + 445 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 437 => static function ($self, $stackPos) { + 446 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 438 => static function ($self, $stackPos) { + 447 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 439 => static function ($self, $stackPos) { + 448 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 440 => static function ($self, $stackPos) { + 449 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 441 => static function ($self, $stackPos) { + 450 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 442 => static function ($self, $stackPos) { + 451 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 443 => static function ($self, $stackPos) { + 452 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 444 => static function ($self, $stackPos) { + 453 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 445 => static function ($self, $stackPos) { + 454 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 446 => static function ($self, $stackPos) { + 455 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 447 => static function ($self, $stackPos) { + 456 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 448 => static function ($self, $stackPos) { + 457 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 449 => static function ($self, $stackPos) { + 458 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 450 => static function ($self, $stackPos) { + 459 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 451 => static function ($self, $stackPos) { + 460 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 452 => static function ($self, $stackPos) { + 461 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 453 => static function ($self, $stackPos) { + 462 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 454 => static function ($self, $stackPos) { + 463 => static function ($self, $stackPos) { $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 455 => static function ($self, $stackPos) { + 464 => static function ($self, $stackPos) { $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 456 => static function ($self, $stackPos) { + 465 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 457 => static function ($self, $stackPos) { + 466 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 458 => static function ($self, $stackPos) { + 467 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 459 => static function ($self, $stackPos) { + 468 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 460 => static function ($self, $stackPos) { + 469 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 461 => static function ($self, $stackPos) { + 470 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 462 => static function ($self, $stackPos) { + 471 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 463 => static function ($self, $stackPos) { + 472 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 464 => static function ($self, $stackPos) { + 473 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 465 => static function ($self, $stackPos) { + 474 => static function ($self, $stackPos) { $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 466 => static function ($self, $stackPos) { + 475 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 467 => static function ($self, $stackPos) { + 476 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 468 => static function ($self, $stackPos) { + 477 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 469 => static function ($self, $stackPos) { + 478 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 470 => static function ($self, $stackPos) { + 479 => static function ($self, $stackPos) { $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 471 => static function ($self, $stackPos) { + 480 => static function ($self, $stackPos) { $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 472 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 473 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 474 => static function ($self, $stackPos) { + 483 => static function ($self, $stackPos) { $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 475 => static function ($self, $stackPos) { + 484 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 476 => static function ($self, $stackPos) { + 485 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 477 => static function ($self, $stackPos) { + 486 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 478 => static function ($self, $stackPos) { + 487 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 479 => static function ($self, $stackPos) { + 488 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 480 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 481 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 483 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 484 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 485 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 486 => null, - 487 => static function ($self, $stackPos) { + 495 => null, + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 488 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 489 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 490 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 507 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 508 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 510 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 511 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 503 => static function ($self, $stackPos) { + 512 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 505 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 506 => null, - 507 => null, - 508 => static function ($self, $stackPos) { + 515 => null, + 516 => null, + 517 => static function ($self, $stackPos) { $self->semValue = array(); }, - 509 => static function ($self, $stackPos) { + 518 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 510 => null, - 511 => static function ($self, $stackPos) { + 519 => null, + 520 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 512 => static function ($self, $stackPos) { + 521 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 513 => static function ($self, $stackPos) { + 522 => static function ($self, $stackPos) { $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 514 => static function ($self, $stackPos) { + 523 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 515 => static function ($self, $stackPos) { + 524 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 516 => static function ($self, $stackPos) { + 525 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 517 => static function ($self, $stackPos) { + 526 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 518 => static function ($self, $stackPos) { + 527 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 519 => static function ($self, $stackPos) { + 528 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 520 => null, - 521 => static function ($self, $stackPos) { + 529 => null, + 530 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 522 => static function ($self, $stackPos) { + 531 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 523 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 524 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 525 => null, - 526 => null, - 527 => static function ($self, $stackPos) { + 534 => null, + 535 => null, + 536 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 528 => static function ($self, $stackPos) { + 537 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 529 => null, - 530 => null, - 531 => static function ($self, $stackPos) { + 538 => null, + 539 => null, + 540 => static function ($self, $stackPos) { $self->semValue = array(); }, - 532 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 533 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 534 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = array(); }, - 535 => null, - 536 => static function ($self, $stackPos) { + 544 => null, + 545 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 537 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 540 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 541 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 542 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 543 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 544 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 545 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 546 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 547 => static function ($self, $stackPos) { + 556 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 548 => static function ($self, $stackPos) { + 557 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 549 => static function ($self, $stackPos) { + 558 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 550 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 551 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 552 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 553 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 554 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 555 => static function ($self, $stackPos) { + 564 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 556 => null, - 557 => null, - 558 => null, - 559 => static function ($self, $stackPos) { + 565 => null, + 566 => null, + 567 => null, + 568 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 560 => static function ($self, $stackPos) { + 569 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 561 => static function ($self, $stackPos) { + 570 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 562 => static function ($self, $stackPos) { + 571 => static function ($self, $stackPos) { $self->semValue = null; }, - 563 => null, - 564 => null, - 565 => static function ($self, $stackPos) { + 572 => null, + 573 => null, + 574 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 566 => null, - 567 => null, - 568 => null, - 569 => null, - 570 => null, - 571 => null, - 572 => static function ($self, $stackPos) { + 575 => null, + 576 => null, + 577 => null, + 578 => null, + 579 => null, + 580 => null, + 581 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 573 => null, - 574 => null, - 575 => null, - 576 => static function ($self, $stackPos) { + 582 => null, + 583 => null, + 584 => null, + 585 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 577 => static function ($self, $stackPos) { + 586 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 578 => null, - 579 => static function ($self, $stackPos) { + 587 => null, + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 580 => static function ($self, $stackPos) { + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 581 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = null; }, - 582 => null, - 583 => null, - 584 => null, - 585 => static function ($self, $stackPos) { + 591 => null, + 592 => null, + 593 => null, + 594 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 586 => static function ($self, $stackPos) { + 595 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 587 => null, - 588 => static function ($self, $stackPos) { + 596 => null, + 597 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 589 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 590 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 591 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 592 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 593 => null, - 594 => static function ($self, $stackPos) { + 602 => null, + 603 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 595 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 597 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 598 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 599 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 600 => null, - 601 => static function ($self, $stackPos) { + 609 => null, + 610 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 602 => null, - 603 => null, - 604 => static function ($self, $stackPos) { + 611 => null, + 612 => null, + 613 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 605 => null, - 606 => static function ($self, $stackPos) { + 614 => null, + 615 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 607 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 608 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 609 => null, - 610 => static function ($self, $stackPos) { + 618 => null, + 619 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 611 => static function ($self, $stackPos) { + 620 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 612 => static function ($self, $stackPos) { + 621 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 613 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 615 => static function ($self, $stackPos) { + 624 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 616 => static function ($self, $stackPos) { + 625 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 617 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 618 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 619 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 620 => static function ($self, $stackPos) { + 629 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 621 => static function ($self, $stackPos) { + 630 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 622 => static function ($self, $stackPos) { + 631 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 623 => static function ($self, $stackPos) { + 632 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 624 => static function ($self, $stackPos) { + 633 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 625 => static function ($self, $stackPos) { + 634 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 626 => static function ($self, $stackPos) { + 635 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 627 => null, - 628 => static function ($self, $stackPos) { + 636 => null, + 637 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 629 => static function ($self, $stackPos) { + 638 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 630 => static function ($self, $stackPos) { + 639 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 631 => static function ($self, $stackPos) { + 640 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 632 => static function ($self, $stackPos) { + 641 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 633 => static function ($self, $stackPos) { + 642 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 634 => static function ($self, $stackPos) { + 643 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 635 => static function ($self, $stackPos) { + 644 => static function ($self, $stackPos) { $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 636 => static function ($self, $stackPos) { + 645 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 637 => static function ($self, $stackPos) { + 646 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 638 => null, + 647 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 4dfb7390fd..52af894629 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -164,16 +164,16 @@ class Php8 extends \PhpParser\ParserAbstract public const T_ATTRIBUTE = 399; protected int $tokenToSymbolMapSize = 400; - protected int $actionTableSize = 1289; - protected int $gotoTableSize = 743; + protected int $actionTableSize = 1638; + protected int $gotoTableSize = 674; protected int $invalidSymbol = 172; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 444; - protected int $numNonLeafStates = 756; + protected int $YY2TBLSTATE = 448; + protected int $numNonLeafStates = 763; protected array $symbolToName = array( "EOF", @@ -394,553 +394,619 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $action = array( - 126, 127, 128, 573, 129, 130, 959, 768, 769, 770, - 131, 38, 852, 493, 569, 1381,-32766,-32766,-32766, 0, - 843, 1139, 1140, 1141, 1135, 1134, 1133, 1142, 1136, 1137, - 1138,-32766,-32766,-32766, 854, 762, 761,-32766, 1050,-32766, + 130, 131, 132, 578, 133, 134, 966, 775, 776, 777, + 135, 41, 859, 498, 574, 1397,-32766,-32766,-32766, 0, + 850, 1154, 1155, 1156, 1150, 1149, 1148, 1157, 1151, 1152, + 1153,-32766,-32766,-32766, -340, 769, 768,-32766, 861,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1010,-32766,-32766, 2, 771, 1139, 1140, 1141, 1135, - 1134, 1133, 1142, 1136, 1137, 1138, 387, 388, 447, 263, - 132, 390, 775, 776, 777, 778, 432,-32766, 433, 1318, - -572, 36, 246, 47, 292, 832, 779, 780, 781, 782, - 783, 784, 785, 786, 787, 788, 808, 574, 809, 810, - 811, 812, 800, 801, 345, 346, 803, 804, 789, 790, - 791, 793, 794, 795, 360, 835, 836, 837, 838, 839, - 575, -374, 297, -374, 796, 797, 576, 577, -334, 820, - 818, 819, 831, 815, 816, 26, -195, 578, 579, 814, - 580, 581, 582, 583, 325, 584, 585, -572, -572, 494, - 298, 299, 817, 586, 587, 35, 133, 236, 126, 127, - 128, 573, 129, 130, 1083, 768, 769, 770, 131, 38, - -32766, 134, 738, 1043, 1042, 1041, 1047, 1044, 1045, 1046, - -32766,-32766,-32766, 1011, 104, 105, 106, 107, 108, 880, - 275, 881,-32766, 762, 761, 1059, 853,-32766,-32766,-32766, - 143,-32766, 109,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766, 479, 480, 771,-32766,-32766,-32766, 1059,-32766, 291, - -32766,-32766,-32766,-32766,-32766, -194, 249, 263, 132, 390, - 775, 776, 777, 778, 308,-32766, 433,-32766,-32766,-32766, - -32766, 291, 851, 832, 779, 780, 781, 782, 783, 784, - 785, 786, 787, 788, 808, 574, 809, 810, 811, 812, - 800, 801, 345, 346, 803, 804, 789, 790, 791, 793, - 794, 795, 360, 835, 836, 837, 838, 839, 575,-32766, - -32766,-32766, 796, 797, 576, 577, -334, 820, 818, 819, - 831, 815, 816, 1306, -195, 578, 579, 814, 580, 581, - 582, 583, 312, 584, 585, 148, 82, 83, 84, -275, - 817, 586, 587, 161, 146, 792, 763, 764, 765, 766, - 767, 1347, 768, 769, 770, 805, 806, 37, 24, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 1128, 275,-32766,-32766,-32766,-32767,-32767, - -32767,-32767, 101, 102, 103, 1113, 109, 321, 625, 751, - 771,-32766,-32766,-32766, 852, 341,-32766, 1112,-32766,-32766, - -32766, 389, 388, -194, 772, 773, 774, 775, 776, 777, - 778, 432,-32766, 841,-32766,-32766, 1391, 342, 1286, 1392, - 832, 779, 780, 781, 782, 783, 784, 785, 786, 787, - 788, 808, 830, 809, 810, 811, 812, 800, 801, 802, - 829, 803, 804, 789, 790, 791, 793, 794, 795, 834, - 835, 836, 837, 838, 839, 840, 1082, 433, -569, 796, - 797, 798, 799, 848, 820, 818, 819, 831, 815, 816, - 375,-32766, 807, 813, 814, 821, 822, 824, 823, 138, - 825, 826, 1155, 324, 381, 286, 743, 817, 828, 827, - 49, 50, 51, 525, 52, 53, 1059, -110, 397, 852, - 54, 55, -110, 56, -110, 619, -85, 81, 451, 304, - 1362, 324, -110, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, 157, 938, -569, -569, 292, 979, 980, - -32766,-32766, 845, 981, 452, 286, 1281, 1280, 1282, 57, - 58, -569, 975, 849, 59, 1114, 60, 243, 244, 61, - 62, 63, 64, 65, 66, 67, 68,-32766, 28, 265, - 69, 449, 526, 453, -348, 1056, 1312, 1313, 527, 938, - 852, 1056, -85, 454, 1310, 42, 20, 528, 938, 529, - 938, 530, 74, 531, 858, 701, 532, 533, 324, 843, - 1059, 44, 45, 455, 384, 383, 1059, 46, 534, 728, - -570, 235, 149, 373, 340, 151, 1286, 928, 729, 938, - 1272, -568, 847,-32766, 282, 536, 537, 538, 1366, 725, - 282, 702, 762, 761, 1279, 1365, 152, 540, 541, -78, - 1298, 1299, 1300, 1301, 1303, 1295, 1296, 296, 1059, 730, - 469, 470, 471, 1302, 1297, 703, 704, 1281, 1280, 1282, - 297, -566, 928, 70, -154, -154, -154, 319, 320, 324, - 1277, 928, 291, 928, 1281, 1280, 1282, -570, -570, -154, - 282, -154, 153, -154, 753, -154, 139, 1056, -568, -568, - 324, 762, 761, -570, 1058, 382, 940, 852, 155, 399, - 723, 7, 928, 33, -568, -576, 979, 980, -58, 963, - 962, 535, 1059, 1281, 1280, 1282, -575, 843, -57, 914, - 975, -110, -110, -110, 28, 266, 102, 103, -566, -566, - -32766,-32766, -110, -110, 668, 21, 852, -110, 123, 48, - 1310, 940, 687, 688, -566, 723, -110, 880, 124, 881, - 940, 135, 940, 136, 723,-32766, 723, -154, 142, 961, - 32, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 147, 415, 1272, 297, 762, 761, - 74, 996, 156, 938, 158, 723, 324, -4, 938, -608, - 938, -608, 159, 540, 541, 160, 1298, 1299, 1300, 1301, - 1303, 1295, 1296, 1188, 1190, -308, 300, 301, -567, 1302, - 1297, 762, 761, 733, -566,-32766, 385, 386, -304, 72, - 740, 1279, 380, -87, 320, 324, 391, 392,-32766,-32766, - -32766, -84,-32766, -78,-32766, -73,-32766, 659, 660,-32766, - -72, -71, 387, 388,-32766,-32766,-32766, -70,-32766, -69, - -32766,-32766, 432, -68, 1279, -67,-32766, 429, 28, 265, - -66,-32766,-32766,-32766, -65,-32766, 928,-32766,-32766,-32766, - 852, 928,-32766, 928, 1310, -567, -567,-32766,-32766,-32766, - -46, -566, -566,-32766,-32766, -18, 140, 274, 283,-32766, - 429, -567, 739, 382, 742, 445, 937, -566, 297, 73, - 295,-32766, 145, -574, 979, 980, 287, 280, 281, 535, - 1272, 28, 266, 284, 285, 330, 275, 539, 975, -110, - -110, -110, 288, 852,-32766,-32766,-32766, 1310, 541, 125, - 1298, 1299, 1300, 1301, 1303, 1295, 1296, 293, 294, 109, - 955, 11, 843, 1302, 1297, 940, 144, 712, 852, 723, - 940, 697, 940, 72, 723, -4, 723, 1146, 320, 324, - -50, 10,-32766, 1272, 1393, 476, 657, 976, 303, 302, - 311, 590, 305, 669, -532, 1317, 714,-32766, 1319, -522, - 690, 541, 851, 1298, 1299, 1300, 1301, 1303, 1295, 1296, - 674, 675, 504, 137, 40, 8, 1302, 1297, 691, 27, - 379, 596, 623,-32766, 1307, 297, 72, 414, 957, 1279, - 0, 320, 324, -602, 41, 748,-32766,-32766,-32766, 0, - -32766, 0,-32766, 749,-32766, 0, 0,-32766, 0, 0, - 0, 0,-32766,-32766,-32766, 938,-32766, 0,-32766,-32766, - 0, 0, 1279, 0,-32766, 429, 0, 0, 0,-32766, - -32766,-32766, 871,-32766, 863,-32766,-32766,-32766, 938, 919, - -32766, 1334, 1020, 1311, 0,-32766,-32766,-32766, 997,-32766, - 1004,-32766,-32766, 994, 1005, 1279, 917,-32766, 429, 992, - 1117, 1120,-32766,-32766,-32766, 1121,-32766, 1118,-32766,-32766, - -32766, 1157, -601,-32766, 1119, 1125, -278, 499,-32766,-32766, - -32766, 1351,-32766, 1384,-32766,-32766, 662, -276, 1279, 603, - -32766, 429, -600, -576, -575,-32766,-32766,-32766, 928,-32766, - -574,-32766,-32766,-32766, -573, -516,-32766, -275, 1, 29, - 30,-32766,-32766,-32766, -253, -253, -253,-32766,-32766, 39, - 382, 928, 43,-32766, 429, 71, 75, 76, 1286, 77, - 78, 979, 980, 79, 80,-32766, 535, -252, -252, -252, - 13, 141, 150, 382, 914, 975, -110, -110, -110, 154, - 241, 326, 361, 362, 979, 980, 363, 364, -16, 535, - 365, 366, 367, 368, 369, 370, 371, 914, 975, -110, - -110, -110,-32766, 14, 374, 446, 568, 940, 1279, 15, - 372, 723, -253, 16, 18,-32766,-32766,-32766, 355,-32766, - 413,-32766, 495,-32766, 496, 503,-32766, 506, 507, 508, - 940,-32766,-32766,-32766, 723, -252, 509,-32766,-32766, 852, - 513, 514, 515,-32766, 429, 522, 601, 707, 1085, 1228, - 1308, 1084, 1065, 1267, 1061,-32766, -280, -102, 12, 17, - 22, 315, 412, 615, 620, 648, 713, 1232, 1285, 1229, - 1363, 0, 34, 318, -110, -110, 376, 724, 727, -110, - 731, 732, 734, 735, 736, 737, 741, 753, -110, 726, - 754, 0, 418, 745, 915, 1388, 0,-32766, 1390, 874, - 873, 969, 1012, 1389, 968, 966, 967, 970, 1260, 948, - 958, 946, 1156, 1152, 1106, 1002, 1003, 646, 1387, 297, - 1345, 1360, 74, 1245, 0, 0, 324, 0, 324 + -32767, 1017,-32766,-32766,-32766, 778, 1154, 1155, 1156, 1150, + 1149, 1148, 1157, 1151, 1152, 1153, 391, 392, 451, 267, + 53, 394, 782, 783, 784, 785, 436, 855, 437, 1334, + -581, 39, 250, 51, 296, 839, 786, 787, 788, 789, + 790, 791, 792, 793, 794, 795, 815, 579, 816, 817, + 818, 819, 807, 808, 349, 350, 810, 811, 796, 797, + 798, 800, 801, 802, 364, 842, 843, 844, 845, 846, + 580, 4, 301, -195, 803, 804, 581, 582, -194, 827, + 825, 826, 838, 822, 823, 1057, 1322, 583, 584, 821, + 585, 586, 587, 588, 329, 589, 590, -581, -581, 499, + 302, 303, 824, 591, 592, 5, 136, 856, 130, 131, + 132, 578, 133, 134, 1093, 775, 776, 777, 135, 41, + -32766, 29, 745, 1050, 1049, 1048, 1054, 1051, 1052, 1053, + -32766,-32766,-32766, 1018, 108, 109, 110, 111, 112, 887, + 279, 888, -340, 769, 768, 1066, 945,-32766,-32766,-32766, + 860,-32766, 113,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + -32766, 484, 485, 778,-32766,-32766,-32766, 859,-32766, 295, + -32766,-32766,-32766,-32766,-32766, 38, 735, 267, 53, 394, + 782, 783, 784, 785,-32766,-32766, 437,-32766,-32766,-32766, + -32766, 240, 858, 839, 786, 787, 788, 789, 790, 791, + 792, 793, 794, 795, 815, 579, 816, 817, 818, 819, + 807, 808, 349, 350, 810, 811, 796, 797, 798, 800, + 801, 802, 364, 842, 843, 844, 845, 846, 580, 935, + 27, -195, 803, 804, 581, 582, -194, 827, 825, 826, + 838, 822, 823, 1295, 137, 583, 584, 821, 585, 586, + 587, 588, 141, 589, 590, 1143, 328,-32766,-32766,-32766, + 824, 591, 592, -578, 136, 632, 130, 131, 132, 578, + 133, 134, 1090, 775, 776, 777, 135, 41,-32766, 1293, + -32766,-32766,-32766,-32767,-32767,-32767,-32767, 105, 106, 107, + -32766,-32766,-32766, 1407, 391, 392, 1408, 146, 164, 1089, + 253, 769, 768, 1065, 436, 945, 1302, -382, 947, -382, + 3,-32766, 730,-32766,-32766,-32766,-32766,-32766, 945, 945, + 129, 778, 1297, 1296, 1298,-32766,-32766,-32766, 290, 296, + -578, -578, 393, 392, 1378, 267, 53, 394, 782, 783, + 784, 785, 436, -275, 437, 312, -578, 626, 736, 737, + 301, 839, 786, 787, 788, 789, 790, 791, 792, 793, + 794, 795, 815, 579, 816, 817, 818, 819, 807, 808, + 349, 350, 810, 811, 796, 797, 798, 800, 801, 802, + 364, 842, 843, 844, 845, 846, 580, 859, 935, -575, + 803, 804, 581, 582, 437, 827, 825, 826, 838, 822, + 823, 935, 935, 583, 584, 821, 585, 586, 587, 588, + 316, 589, 590, 850, 1063,-32766, 325, 160, 824, 591, + 592, 852, 149, 52, 130, 131, 132, 578, 133, 134, + 1095, 775, 776, 777, 135, 41, 970, 969, 345, 1066, + 1066, 986, 987, 239, 850,-32766, 988, 1170, 769, 768, + 346, 750,-32766, 1363, 1382, 982, -575, -575,-32766, 769, + 768, 1381, 945, 286, 295, 106, 107, 947, 319,-32766, + 78, 730, -575, 1297, 1296, 1298, 328, 1066, 1063, 778, + 947, 1003, 1129, 1066, 730, 730, 968, 473, 474, 475, + 304, 305, 740, 267, 53, 394, 782, 783, 784, 785, + 142, 854, 437, 1066, 328, -85, 384, 295, 732, 839, + 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, + 815, 579, 816, 817, 818, 819, 807, 808, 349, 350, + 810, 811, 796, 797, 798, 800, 801, 802, 364, 842, + 843, 844, 845, 846, 580, 935,-32766,-32766, 803, 804, + 581, 582, 379, 827, 825, 826, 838, 822, 823, 675, + 24, 583, 584, 821, 585, 586, 587, 588, 760, 589, + 590, -85, 86, 87, 88, 1128, 824, 591, 592, 758, + 149, 799, 770, 771, 772, 773, 774, 151, 775, 776, + 777, 812, 813, 40, 385, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 85, + 279, 694, 695, 328, 947, 403, 401, 10, 730, 887, + 455, 888, 113, -617, 456, -617, 778, 150, 419, 389, + 390, 395, 396, 1127, 457, 666, 667, 458, 865, 152, + 779, 780, 781, 782, 783, 784, 785, 154, 155, 848, + 156, -579, 158, 36, -87, -84, 839, 786, 787, 788, + 789, 790, 791, 792, 793, 794, 795, 815, 837, 816, + 817, 818, 819, 807, 808, 809, 836, 810, 811, 796, + 797, 798, 800, 801, 802, 841, 842, 843, 844, 845, + 846, 847, -78, -58, -57, 803, 804, 805, 806, 127, + 827, 825, 826, 838, 822, 823, 128, 138, 814, 820, + 821, 828, 829, 831, 830, 139, 832, 833, -579, -579, + 145, 159, 161, 824, 835, 834, 54, 55, 56, 530, + 57, 58, 162, -110, -579, 163, 59, 60, -110, 61, + -110, -577, -78, -73, 1063, 308, -585, 291, -110, -110, + -110, -110, -110, -110, -110, -110, -110, -110, -110, -72, + -71, -70, -69, -68, -67, -66, -65, -46, -18, 1066, + 143, 290, 279, 278, 287, 62, 63, 945, 746, 749, + 64, -308, 65, 247, 248, 66, 67, 68, 69, 70, + 71, 72, 73, 286, 31, 269, 47, 453, 531, 944, + -356, 148, 1328, 1329, 532, 962, 859, 747, -577, -577, + 1326, 45, 23, 533, -304, 534, 945, 535, 284, 536, + -576, 708, 537, 538, -577, 285, 288, 48, 49, 459, + 388, 387, 289, 50, 539, 334, -584, 704, 292, 377, + 344, 297, 1302, 298, 113, 850, 1288, 147, 859, 719, + 596, 541, 542, 543, 1161, 721, 1409, 709, 697,-32766, + 935, 676, 682, 545, 546, 664, 1314, 1315, 1316, 1317, + 1319, 1311, 1312, 300, 681, 983, 307, 13, 481, 1318, + 1313, 710, 711, 1297, 1296, 1298, 301, -576, -576, 74, + -154, -154, -154, 323, 324, 328, 509,-32766, 698, 935, + 1297, 1296, 1298, -576, 1333, -154, 286, -154, 309, -154, + 602, -154, -541, 630, 858, -583, 964, 769, 768, 306, + 315, 386, 328, 859, 0, 0, 0, 0, 0, 0, + 0, 0, 986, 987, 0, -531, 1335, 540, 0, 947, + 11, 30, 383, 730, 0, 921, 982, -110, -110, -110, + 31, 270, 0, 0, 301, 0, 43, 0, -110, -110, + 1323, -278, 859, -110, 0, 44, 1326, 870, 755, 0, + 756, 878, -110, 926, 1027, 1004, 1011, 1001, 947, 1012, + 924,-32766, 730, -154, 999, 1132, 35, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 1135, 1136, 1288, 301, 769, 768, 78, 1133, 1172, 1134, + 1140, 418, 328, -4, 945, 1350, 1367, 1400, 669, 545, + 546, -611, 1314, 1315, 1316, 1317, 1319, 1311, 1312, 1204, + 1206, -610, -609, -585, -584, 1318, 1313, 769, 768, -583, + -575,-32766, -582, -525, 1, 76, 32, 1295, 33, 42, + 324, 328, 46, 75,-32766,-32766,-32766, 79,-32766, 80, + -32766, 81,-32766, 82, 83,-32766, 84, 144, 153, 157, + -32766,-32766,-32766, 245,-32766, 330,-32766,-32766, 365, 366, + 1295, 367,-32766, 433, 31, 269, 368,-32766,-32766,-32766, + 369,-32766, 370,-32766,-32766,-32766, 859, 935,-32766, 371, + 1326, 372, 373,-32766,-32766,-32766, 374, -575, -575,-32766, + -32766, 375, 378, 450, 573,-32766, 433, 376, 37, 386, + -276, 449, -275, -575, 16, 77, 299,-32766, 17, 18, + 986, 987, 19, 422, 21, 540, 1288, 31, 270, 359, + 417, 500, 501, 544, 982, -110, -110, -110, 508, 859, + 511, 512, 513, 1326, 546, 514, 1314, 1315, 1316, 1317, + 1319, 1311, 1312, 518, 519, 520, 1327, 14, 527, 1318, + 1313, 607, 714, 1096, 1092, 1244, 947, 1324, 1094, 76, + 730, -4, 1091, 1072, 324, 328, -50, 1283, 1068, 1288, + -280, -102, 15, 20, 25, 319, 416, 621, 627, 655, + 720, 1248, 1301, 1245, 1379, 0, 322, 546, 380, 1314, + 1315, 1316, 1317, 1319, 1311, 1312, 731, 734, 738, 140, + 739, 741, 1318, 1313, 742, 743, 744, 748, 760,-32766, + 733, 761, 76, 752, 922, 1295, 1404, 324, 328, 1406, + 881, 880,-32766,-32766,-32766, 976,-32766, 1019,-32766, 1405, + -32766, 975, 973,-32766, 974, 977, 1276, 955,-32766,-32766, + -32766, 965,-32766, 953,-32766,-32766, 1171, 1167, 1295, 1121, + -32766, 433, 1009, 1010, 653,-32766,-32766,-32766, 1403,-32766, + 1361,-32766,-32766,-32766, 1376, 0,-32766, 1261, 0, 0, + 0,-32766,-32766,-32766, 945,-32766, 0,-32766,-32766, 0, + 0, 1295, 0,-32766, 433, 0, 0, 0,-32766,-32766, + -32766, 0,-32766, 0,-32766,-32766,-32766, 945, 0,-32766, + 0, 0, 0, 0,-32766,-32766,-32766, 0,-32766, 0, + -32766,-32766, 0, 0, 1295, 0,-32766, 433, 0, 0, + 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766,-32766, + 0, 0,-32766, 0, 0, 0, 504,-32766,-32766,-32766, + 0,-32766, 0,-32766,-32766, 0, 0, 1295, 609,-32766, + 433, 0, 0, 0,-32766,-32766,-32766, 935,-32766, 0, + -32766,-32766,-32766, 0, 0,-32766, 2, 0, 0, 0, + -32766,-32766,-32766, -253, -253, -253,-32766,-32766, 0, 386, + 935, 0,-32766, 433, 0, 0, 0, 1302, 0, 0, + 986, 987, 0, 0,-32766, 540, -252, -252, -252, 0, + 0, 0, 386, 921, 982, -110, -110, -110, 0, 0, + 0, 0, 0, 986, 987, 0, 0, -16, 540, 0, + 0, 0, 0, 0, 0, 0, 921, 982, -110, -110, + -110,-32766, 0, 0, 0, 0, 947, 1295, 0, 0, + 730, -253, 0, 0,-32766,-32766,-32766, 0,-32766, 0, + -32766, 0,-32766, 0, 0,-32766, 0, 0, 0, 947, + -32766,-32766,-32766, 730, -252, 0,-32766,-32766, 859, 0, + 0, 0,-32766, 433, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,-32766, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -110, -110, 0, 0, 0, -110, 0, + 0, 0, 0, 0, 0, 0, 0, -110, 0, 0, + 0, 0, 0, 0, 0, 0,-32766, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 301, 0, + 0, 78, 0, 0, 0, 0, 0, 328 ); protected array $actionCheck = array( 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, 12, 13, 82, 31, 85, 85, 9, 10, 11, 0, 80, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 9, 10, 11, 1, 37, 38, 30, 1, 32, + 125, 9, 10, 11, 8, 37, 38, 30, 1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 31, 30, 116, 8, 57, 116, 117, 118, 119, + 43, 31, 30, 9, 10, 57, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 106, 107, 108, 71, - 72, 73, 74, 75, 76, 77, 116, 140, 80, 150, + 72, 73, 74, 75, 76, 77, 116, 80, 80, 150, 70, 151, 152, 70, 30, 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, 106, 162, 108, 126, 127, 128, 129, 8, 131, - 132, 133, 134, 135, 136, 8, 8, 139, 140, 141, + 122, 8, 162, 8, 126, 127, 128, 129, 8, 131, + 132, 133, 134, 135, 136, 1, 1, 139, 140, 141, 142, 143, 144, 145, 70, 147, 148, 137, 138, 167, - 137, 138, 154, 155, 156, 8, 158, 14, 2, 3, + 137, 138, 154, 155, 156, 8, 158, 160, 2, 3, 4, 5, 6, 7, 166, 9, 10, 11, 12, 13, 116, 8, 167, 119, 120, 121, 122, 123, 124, 125, 9, 10, 11, 163, 51, 52, 53, 54, 55, 106, - 57, 108, 116, 37, 38, 141, 163, 9, 10, 11, - 8, 30, 69, 32, 33, 34, 35, 36, 37, 38, - 9, 137, 138, 57, 9, 10, 11, 141, 30, 165, - 32, 33, 34, 35, 36, 8, 8, 71, 72, 73, - 74, 75, 76, 77, 8, 30, 80, 32, 33, 34, - 35, 165, 159, 87, 88, 89, 90, 91, 92, 93, + 57, 108, 166, 37, 38, 141, 1, 9, 10, 11, + 163, 30, 69, 32, 33, 34, 35, 36, 37, 38, + 116, 137, 138, 57, 9, 10, 11, 82, 30, 165, + 32, 33, 34, 35, 36, 8, 31, 71, 72, 73, + 74, 75, 76, 77, 140, 30, 80, 32, 33, 34, + 35, 14, 159, 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, 9, - 10, 11, 126, 127, 128, 129, 166, 131, 132, 133, - 134, 135, 136, 1, 166, 139, 140, 141, 142, 143, - 144, 145, 8, 147, 148, 14, 9, 10, 11, 166, - 154, 155, 156, 14, 158, 2, 3, 4, 5, 6, - 7, 1, 9, 10, 11, 12, 13, 30, 101, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 126, 57, 9, 10, 11, 44, 45, - 46, 47, 48, 49, 50, 163, 69, 8, 52, 167, - 57, 9, 10, 11, 82, 8, 30, 1, 32, 33, - 34, 106, 107, 166, 71, 72, 73, 74, 75, 76, - 77, 116, 30, 80, 32, 33, 80, 8, 1, 83, - 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, 1, 80, 70, 126, - 127, 128, 129, 80, 131, 132, 133, 134, 135, 136, - 8, 116, 139, 140, 141, 142, 143, 144, 145, 167, - 147, 148, 163, 171, 8, 30, 167, 154, 155, 156, - 2, 3, 4, 5, 6, 7, 141, 101, 8, 82, - 12, 13, 106, 15, 108, 1, 31, 167, 8, 113, - 1, 171, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 16, 1, 137, 138, 30, 117, 118, - 9, 10, 80, 122, 8, 30, 159, 160, 161, 51, - 52, 153, 131, 160, 56, 168, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 140, 70, 71, - 72, 73, 74, 8, 168, 116, 78, 79, 80, 1, - 82, 116, 97, 8, 86, 87, 88, 89, 1, 91, - 1, 93, 165, 95, 8, 80, 98, 99, 171, 80, - 141, 103, 104, 105, 106, 107, 141, 109, 110, 31, - 70, 97, 14, 115, 116, 14, 1, 84, 31, 1, - 122, 70, 160, 116, 165, 127, 128, 129, 1, 167, - 165, 116, 37, 38, 80, 8, 14, 139, 140, 16, - 142, 143, 144, 145, 146, 147, 148, 149, 141, 31, - 132, 133, 134, 155, 156, 140, 141, 159, 160, 161, - 162, 70, 84, 165, 75, 76, 77, 169, 170, 171, - 116, 84, 165, 84, 159, 160, 161, 137, 138, 90, - 165, 92, 14, 94, 167, 96, 167, 116, 137, 138, - 171, 37, 38, 153, 140, 106, 163, 82, 14, 106, - 167, 108, 84, 14, 153, 165, 117, 118, 16, 72, - 73, 122, 141, 159, 160, 161, 165, 80, 16, 130, - 131, 132, 133, 134, 70, 71, 49, 50, 137, 138, - 51, 52, 117, 118, 75, 76, 82, 122, 16, 70, - 86, 163, 75, 76, 153, 167, 131, 106, 16, 108, - 163, 16, 163, 16, 167, 140, 167, 168, 16, 122, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 101, 102, 122, 162, 37, 38, - 165, 163, 16, 1, 16, 167, 171, 0, 1, 164, - 1, 166, 16, 139, 140, 16, 142, 143, 144, 145, - 146, 147, 148, 59, 60, 35, 137, 138, 70, 155, - 156, 37, 38, 31, 70, 74, 106, 107, 35, 165, - 31, 80, 153, 31, 170, 171, 106, 107, 87, 88, - 89, 31, 91, 31, 93, 31, 95, 111, 112, 98, - 31, 31, 106, 107, 103, 104, 105, 31, 74, 31, - 109, 110, 116, 31, 80, 31, 115, 116, 70, 71, - 31, 87, 88, 89, 31, 91, 84, 93, 127, 95, - 82, 84, 98, 84, 86, 137, 138, 103, 104, 105, - 31, 137, 138, 109, 110, 31, 31, 31, 31, 115, - 116, 153, 31, 106, 31, 108, 31, 153, 162, 158, - 113, 127, 31, 165, 117, 118, 37, 35, 35, 122, - 122, 70, 71, 35, 35, 35, 57, 130, 131, 132, - 133, 134, 37, 82, 9, 10, 11, 86, 140, 14, - 142, 143, 144, 145, 146, 147, 148, 37, 37, 69, - 38, 154, 80, 155, 156, 163, 70, 80, 82, 167, - 163, 77, 163, 165, 167, 168, 167, 82, 170, 171, - 31, 97, 85, 122, 83, 97, 113, 131, 136, 135, - 135, 89, 114, 90, 153, 150, 92, 140, 150, 153, - 94, 140, 159, 142, 143, 144, 145, 146, 147, 148, - 96, 100, 97, 31, 163, 153, 155, 156, 100, 153, - 153, 157, 157, 74, 164, 162, 165, 168, 158, 80, - -1, 170, 171, 165, 163, 163, 87, 88, 89, -1, - 91, -1, 93, 163, 95, -1, -1, 98, -1, -1, - -1, -1, 103, 104, 105, 1, 74, -1, 109, 110, - -1, -1, 80, -1, 115, 116, -1, -1, -1, 87, - 88, 89, 163, 91, 164, 93, 127, 95, 1, 163, - 98, 164, 163, 170, -1, 103, 104, 105, 163, 74, - 163, 109, 110, 163, 163, 80, 163, 115, 116, 163, - 163, 163, 87, 88, 89, 163, 91, 163, 93, 127, - 95, 163, 165, 98, 163, 163, 166, 102, 103, 104, - 105, 164, 74, 164, 109, 110, 164, 166, 80, 81, - 115, 116, 165, 165, 165, 87, 88, 89, 84, 91, - 165, 93, 127, 95, 165, 165, 98, 166, 165, 165, - 165, 103, 104, 105, 100, 101, 102, 109, 110, 165, - 106, 84, 165, 115, 116, 165, 165, 165, 1, 165, - 165, 117, 118, 165, 165, 127, 122, 100, 101, 102, - 166, 165, 165, 106, 130, 131, 132, 133, 134, 165, - 165, 165, 165, 165, 117, 118, 165, 165, 31, 122, - 165, 165, 165, 165, 165, 165, 165, 130, 131, 132, - 133, 134, 74, 166, 165, 165, 165, 163, 80, 166, - 165, 167, 168, 166, 166, 87, 88, 89, 166, 91, - 166, 93, 166, 95, 166, 166, 98, 166, 166, 166, - 163, 103, 104, 105, 167, 168, 166, 109, 110, 82, - 166, 166, 166, 115, 116, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, 127, 166, 166, 166, 166, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 84, + 101, 166, 126, 127, 128, 129, 166, 131, 132, 133, + 134, 135, 136, 80, 8, 139, 140, 141, 142, 143, + 144, 145, 167, 147, 148, 126, 171, 9, 10, 11, + 154, 155, 156, 70, 158, 52, 2, 3, 4, 5, + 6, 7, 166, 9, 10, 11, 12, 13, 30, 116, + 32, 33, 34, 44, 45, 46, 47, 48, 49, 50, + 9, 10, 11, 80, 106, 107, 83, 8, 14, 1, + 8, 37, 38, 140, 116, 1, 1, 106, 163, 108, + 8, 30, 167, 32, 33, 9, 10, 11, 1, 1, + 14, 57, 159, 160, 161, 9, 10, 11, 30, 30, + 137, 138, 106, 107, 1, 71, 72, 73, 74, 75, + 76, 77, 116, 166, 80, 8, 153, 1, 31, 31, + 162, 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, 82, 84, 70, + 126, 127, 128, 129, 80, 131, 132, 133, 134, 135, + 136, 84, 84, 139, 140, 141, 142, 143, 144, 145, + 8, 147, 148, 80, 116, 116, 8, 16, 154, 155, + 156, 80, 158, 70, 2, 3, 4, 5, 6, 7, + 166, 9, 10, 11, 12, 13, 72, 73, 8, 141, + 141, 117, 118, 97, 80, 140, 122, 163, 37, 38, + 8, 167, 116, 1, 1, 131, 137, 138, 116, 37, + 38, 8, 1, 165, 165, 49, 50, 163, 166, 9, + 165, 167, 153, 159, 160, 161, 171, 141, 116, 57, + 163, 163, 168, 141, 167, 167, 122, 132, 133, 134, + 137, 138, 31, 71, 72, 73, 74, 75, 76, 77, + 167, 160, 80, 141, 171, 31, 153, 165, 167, 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, 84, 51, 52, 126, 127, + 128, 129, 8, 131, 132, 133, 134, 135, 136, 75, + 76, 139, 140, 141, 142, 143, 144, 145, 167, 147, + 148, 97, 9, 10, 11, 163, 154, 155, 156, 167, + 158, 2, 3, 4, 5, 6, 7, 14, 9, 10, + 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 167, + 57, 75, 76, 171, 163, 106, 8, 108, 167, 106, + 8, 108, 69, 164, 8, 166, 57, 101, 102, 106, + 107, 106, 107, 1, 8, 111, 112, 8, 8, 14, + 71, 72, 73, 74, 75, 76, 77, 14, 14, 80, + 14, 70, 14, 14, 31, 31, 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, 16, 16, 16, 126, 127, 128, 129, 16, + 131, 132, 133, 134, 135, 136, 16, 16, 139, 140, + 141, 142, 143, 144, 145, 16, 147, 148, 137, 138, + 16, 16, 16, 154, 155, 156, 2, 3, 4, 5, + 6, 7, 16, 101, 153, 16, 12, 13, 106, 15, + 108, 70, 31, 31, 116, 113, 165, 37, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 141, + 31, 30, 57, 31, 31, 51, 52, 1, 31, 31, + 56, 35, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 165, 70, 71, 72, 73, 74, 31, + 168, 31, 78, 79, 80, 38, 82, 31, 137, 138, + 86, 87, 88, 89, 35, 91, 1, 93, 35, 95, + 70, 80, 98, 99, 153, 35, 35, 103, 104, 105, + 106, 107, 35, 109, 110, 35, 165, 77, 37, 115, + 116, 37, 1, 37, 69, 80, 122, 70, 82, 80, + 89, 127, 128, 129, 82, 92, 83, 116, 94, 85, + 84, 90, 100, 139, 140, 113, 142, 143, 144, 145, + 146, 147, 148, 149, 96, 131, 136, 97, 97, 155, + 156, 140, 141, 159, 160, 161, 162, 137, 138, 165, + 75, 76, 77, 169, 170, 171, 97, 140, 100, 84, + 159, 160, 161, 153, 150, 90, 165, 92, 114, 94, + 157, 96, 153, 157, 159, 165, 158, 37, 38, 135, + 135, 106, 171, 82, -1, -1, -1, -1, -1, -1, + -1, -1, 117, 118, -1, 153, 150, 122, -1, 163, + 153, 153, 153, 167, -1, 130, 131, 132, 133, 134, + 70, 71, -1, -1, 162, -1, 163, -1, 117, 118, + 164, 166, 82, 122, -1, 163, 86, 164, 163, -1, + 163, 163, 131, 163, 163, 163, 163, 163, 163, 163, + 163, 140, 167, 168, 163, 163, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 163, 163, 122, 162, 37, 38, 165, 163, 163, 163, + 163, 168, 171, 0, 1, 164, 164, 164, 164, 139, + 140, 165, 142, 143, 144, 145, 146, 147, 148, 59, + 60, 165, 165, 165, 165, 155, 156, 37, 38, 165, + 70, 74, 165, 165, 165, 165, 165, 80, 165, 165, + 170, 171, 165, 165, 87, 88, 89, 165, 91, 165, + 93, 165, 95, 165, 165, 98, 165, 165, 165, 165, + 103, 104, 105, 165, 74, 165, 109, 110, 165, 165, + 80, 165, 115, 116, 70, 71, 165, 87, 88, 89, + 165, 91, 165, 93, 127, 95, 82, 84, 98, 165, + 86, 165, 165, 103, 104, 105, 165, 137, 138, 109, + 110, 165, 165, 165, 165, 115, 116, 165, 167, 106, + 166, 108, 166, 153, 166, 158, 113, 127, 166, 166, + 117, 118, 166, 168, 166, 122, 122, 70, 71, 166, + 166, 166, 166, 130, 131, 132, 133, 134, 166, 82, + 166, 166, 166, 86, 140, 166, 142, 143, 144, 145, + 146, 147, 148, 166, 166, 166, 170, 154, 166, 155, + 156, 166, 166, 166, 166, 166, 163, 166, 166, 165, + 167, 168, 166, 166, 170, 171, 31, 166, 166, 122, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, -1, 167, 167, 117, 118, 167, 167, 167, 122, - 167, 167, 167, 167, 167, 167, 167, 167, 131, 167, - 167, -1, 168, 168, 168, 168, -1, 140, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 162, - 168, 168, 165, 169, -1, -1, 171, -1, 171 + 166, 166, 166, 166, 166, -1, 167, 140, 167, 142, + 143, 144, 145, 146, 147, 148, 167, 167, 167, 31, + 167, 167, 155, 156, 167, 167, 167, 167, 167, 74, + 167, 167, 165, 168, 168, 80, 168, 170, 171, 168, + 168, 168, 87, 88, 89, 168, 91, 168, 93, 168, + 95, 168, 168, 98, 168, 168, 168, 168, 103, 104, + 105, 168, 74, 168, 109, 110, 168, 168, 80, 168, + 115, 116, 168, 168, 168, 87, 88, 89, 168, 91, + 168, 93, 127, 95, 168, -1, 98, 169, -1, -1, + -1, 103, 104, 105, 1, 74, -1, 109, 110, -1, + -1, 80, -1, 115, 116, -1, -1, -1, 87, 88, + 89, -1, 91, -1, 93, 127, 95, 1, -1, 98, + -1, -1, -1, -1, 103, 104, 105, -1, 74, -1, + 109, 110, -1, -1, 80, -1, 115, 116, -1, -1, + -1, 87, 88, 89, -1, 91, -1, 93, 127, 95, + -1, -1, 98, -1, -1, -1, 102, 103, 104, 105, + -1, 74, -1, 109, 110, -1, -1, 80, 81, 115, + 116, -1, -1, -1, 87, 88, 89, 84, 91, -1, + 93, 127, 95, -1, -1, 98, 165, -1, -1, -1, + 103, 104, 105, 100, 101, 102, 109, 110, -1, 106, + 84, -1, 115, 116, -1, -1, -1, 1, -1, -1, + 117, 118, -1, -1, 127, 122, 100, 101, 102, -1, + -1, -1, 106, 130, 131, 132, 133, 134, -1, -1, + -1, -1, -1, 117, 118, -1, -1, 31, 122, -1, + -1, -1, -1, -1, -1, -1, 130, 131, 132, 133, + 134, 74, -1, -1, -1, -1, 163, 80, -1, -1, + 167, 168, -1, -1, 87, 88, 89, -1, 91, -1, + 93, -1, 95, -1, -1, 98, -1, -1, -1, 163, + 103, 104, 105, 167, 168, -1, 109, 110, 82, -1, + -1, -1, 115, 116, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 127, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 117, 118, -1, -1, -1, 122, -1, + -1, -1, -1, -1, -1, -1, -1, 131, -1, -1, + -1, -1, -1, -1, -1, -1, 140, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 162, -1, + -1, 165, -1, -1, -1, -1, -1, 171 ); protected array $actionBase = array( - 0, -2, 156, 559, 757, 1004, 1027, 485, 292, 357, - -60, 432, 557, 752, 752, 759, 752, 548, 588, 901, - 503, 503, 503, 837, 313, 313, 837, 313, 711, 711, - 711, 711, 744, 744, 965, 965, 998, 932, 899, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, 1088, - 1088, 1088, 33, 20, 484, 1080, 659, 1055, 1061, 1057, - 1062, 1053, 1052, 1056, 1058, 1063, 1110, 1112, 841, 1109, - 1113, 1059, 912, 1054, 1060, 898, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 201, 885, 501, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, - 270, 270, 270, 270, 270, 624, 624, 22, 22, 22, - 362, 811, 758, 811, 811, 811, 811, 811, 811, 811, - 811, 346, 205, 188, 714, 171, 171, 7, 7, 7, - 7, 7, 376, 1117, 54, 585, 585, 314, 314, 314, - 314, 227, 565, 15, 435, 397, -40, 647, 477, 706, - 429, 429, 541, 541, 76, 76, 541, 541, 541, 133, - 133, 335, 335, 335, 335, 83, -71, 807, 489, 489, - 489, 489, 807, 807, 807, 807, 798, 863, 807, 977, - 986, 807, 807, 510, 521, 708, 649, 649, 611, -70, - -70, 611, 391, -70, 320, 316, -63, 806, 275, 595, - -63, 1005, 368, 561, 561, 639, 561, 561, 561, 793, - 680, 793, 1051, 847, 847, 819, 774, 902, 1082, 1064, - 861, 1107, 868, 1108, 1083, 299, 488, 10, 13, 74, - 772, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, - 1050, 1050, 1050, 1115, 565, 1051, 363, 1105, 1106, 1115, - 1115, 1115, 565, 565, 565, 565, 565, 565, 565, 565, - 824, 565, 565, 696, 363, 629, 637, 363, 850, 565, - 796, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, -18, 33, 33, 20, 5, 5, 33, 202, - 37, 5, 5, 5, 487, 5, 33, 33, 33, 680, - 829, 814, 690, 455, 815, 217, 829, 829, 829, 120, - 143, 128, 740, 753, 563, 832, 832, 832, 845, 933, - 933, 832, 836, 832, 845, 832, 832, 933, 933, 813, - 933, 163, 480, 367, 456, 506, 933, 226, 832, 832, - 832, 832, 805, 933, 46, 535, 832, 218, 192, 832, - 832, 805, 804, 827, 802, 933, 933, 933, 805, 442, - 802, 802, 802, 822, 830, 823, 826, 359, 294, 556, - 147, 872, 826, 826, 832, 470, 823, 826, 823, 826, - 820, 826, 826, 826, 823, 826, 836, 389, 826, 736, - 545, 127, 826, 832, 19, 950, 951, 762, 952, 944, - 954, 1000, 955, 958, 1070, 930, 975, 947, 959, 1001, - 935, 934, 835, 692, 702, 812, 791, 929, 840, 840, - 840, 918, 919, 840, 840, 840, 840, 840, 840, 840, - 840, 692, 810, 817, 852, 978, 705, 707, 1040, 795, - 1086, 1114, 977, 950, 958, 770, 947, 959, 935, 934, - 803, 799, 792, 794, 788, 786, 779, 780, 825, 1042, - 966, 801, 712, 1008, 981, 1085, 1066, 982, 985, 1014, - 1043, 859, 1044, 1087, 846, 1090, 1091, 860, 987, 1071, - 840, 917, 818, 867, 986, 925, 692, 907, 1045, 964, - 1065, 1016, 1018, 1069, 838, 851, 909, 1092, 988, 989, - 990, 1073, 1074, 821, 997, 900, 1019, 865, 809, 1021, - 1022, 1023, 1030, 1075, 1093, 1076, 897, 1077, 866, 853, - 911, 864, 1094, 291, 848, 849, 871, 999, 568, 976, - 1078, 1084, 1095, 1034, 1035, 1036, 1096, 1097, 967, 869, - 1003, 856, 1007, 931, 875, 877, 571, 870, 1046, 842, - 843, 855, 592, 638, 1098, 1099, 1100, 974, 831, 844, - 880, 881, 1047, 839, 1048, 1101, 654, 883, 1102, 1041, - 738, 746, 593, 672, 662, 749, 854, 1079, 816, 828, - 834, 991, 746, 833, 886, 1103, 887, 888, 892, 1039, - 894, 1012, 1104, 0, 0, 0, 0, 0, 0, 0, + 0, 156, -2, 314, 472, 472, 875, 1073, 1353, 1376, + 801, 135, 364, -60, 391, 367, 511, 511, 836, 511, + 195, 368, 906, 354, 354, 354, 829, 629, 629, 829, + 629, 1027, 1027, 1027, 1027, 1060, 1060, 1314, 1314, 1347, + 1248, 1215, 1437, 1437, 1437, 1437, 1437, 1281, 1437, 1437, + 1437, 1437, 1437, 1281, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, + 1437, 1437, 1437, 1437, 1437, 37, 20, 352, 396, 1121, + 699, 1089, 1095, 1091, 1096, 1087, 1086, 1090, 1092, 1097, + 1170, 1172, 830, 1166, 1176, 1093, 914, 1088, 1094, 905, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 510, 356, 44, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 366, 366, 366, 366, 366, 366, 366, 366, 940, + 940, 22, 22, 22, 331, 1127, 1074, 1127, 1127, 1127, + 1127, 1127, 1127, 1127, 1127, 298, 205, 188, 1030, 171, + 171, 7, 7, 7, 7, 7, 692, 1466, 54, 901, + 901, 289, 289, 289, 289, 179, 461, 251, 348, 355, + -40, 466, 349, 238, 688, 688, 412, 412, 392, 392, + 412, 412, 412, 133, 133, 386, 386, 386, 386, 83, + -71, 817, 383, 383, 383, 383, 817, 817, 817, 817, + 846, 1056, 817, 973, 987, 817, 817, 641, 731, 810, + 545, 545, 573, -70, -70, 573, 374, -70, 502, 263, + 94, 804, 276, 519, 94, 1012, 243, 369, 369, 403, + 369, 369, 369, 815, 583, 815, 1085, 834, 834, 796, + 772, 907, 1123, 1098, 822, 1164, 858, 1165, 1124, 334, + 405, 10, 13, 74, 771, 1084, 1084, 1084, 1084, 1084, + 1084, 1084, 1084, 1084, 1084, 1084, 1084, 811, 461, 1085, + -3, 1159, 1161, 811, 811, 811, 461, 461, 461, 461, + 461, 461, 461, 461, 797, 461, 461, 584, -3, 534, + 596, -3, 860, 461, 842, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, -18, 37, 37, 20, + 5, 5, 37, 462, 134, 5, 5, 5, 451, 5, + 37, 37, 37, 583, 775, 813, 585, 524, 816, 120, + 775, 775, 775, 26, 227, 115, 806, 839, 569, 825, + 825, 825, 832, 939, 939, 825, 826, 825, 832, 825, + 825, 939, 939, 852, 939, 286, 672, 480, 636, 676, + 939, 387, 825, 825, 825, 825, 845, 939, 113, 147, + 686, 825, 342, 339, 825, 825, 845, 844, 803, 800, + 939, 939, 939, 845, 594, 800, 800, 800, 865, 867, + 812, 802, 458, 452, 690, 217, 827, 802, 802, 825, + 668, 812, 802, 812, 802, 818, 802, 802, 802, 812, + 802, 826, 492, 802, 765, 689, 163, 802, 825, 19, + 948, 952, 683, 954, 944, 956, 1008, 958, 959, 1109, + 938, 968, 947, 961, 1009, 943, 941, 828, 743, 750, + 847, 819, 937, 835, 835, 835, 928, 929, 835, 835, + 835, 835, 835, 835, 835, 835, 743, 856, 849, 821, + 974, 751, 759, 1065, 814, 1126, 1178, 973, 948, 959, + 684, 947, 961, 943, 941, 795, 794, 792, 793, 791, + 790, 788, 789, 799, 1067, 1068, 962, 853, 764, 1028, + 976, 1125, 1099, 981, 985, 1034, 1069, 868, 1071, 1128, + 837, 1131, 1132, 863, 994, 1110, 835, 927, 916, 911, + 987, 934, 743, 912, 1072, 1076, 1018, 1011, 1035, 1036, + 1101, 841, 833, 913, 1133, 996, 997, 1001, 1111, 1113, + 862, 1022, 855, 1042, 859, 903, 1044, 1045, 1046, 1049, + 1114, 1137, 1117, 926, 1118, 870, 831, 1014, 838, 1139, + 623, 851, 857, 866, 1007, 685, 970, 1119, 1025, 1141, + 1057, 1058, 1059, 1143, 1144, 963, 871, 1023, 824, 1026, + 1016, 872, 873, 693, 864, 1077, 843, 850, 861, 694, + 696, 1146, 1147, 1148, 964, 807, 820, 874, 876, 1081, + 770, 1082, 1149, 698, 877, 1153, 1066, 766, 776, 736, + 738, 737, 779, 823, 1120, 848, 854, 840, 1006, 776, + 808, 881, 1155, 882, 897, 898, 1062, 904, 1033, 1158, 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, 468, 468, 468, - 468, 468, 468, 313, 313, 313, 313, 313, 468, 468, - 468, 468, 468, 468, 468, 313, 468, 468, 468, 313, - 0, 0, 313, 0, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, - 468, 468, 468, 468, 468, 468, 468, 468, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 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, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, - 297, 524, 524, 297, 297, 297, 297, 524, 524, 524, - 524, 524, 524, 524, 524, 524, 524, 297, 297, 297, - 0, 297, 297, 297, 297, 297, 297, 297, 813, 524, - 524, 524, 524, 133, 133, 133, 133, -95, -95, -95, - 524, 524, 391, 133, 524, 391, 524, 524, 524, 524, - 524, 524, 524, 524, 524, 0, 0, 524, 524, 524, - 524, 363, -70, 524, 836, 836, 836, 836, 524, 524, - 524, 524, -70, -70, 524, 607, 607, 524, 524, 0, - 0, 0, 133, 133, 363, 0, 0, 363, 0, 0, - 836, 836, 524, 391, 813, 597, 524, 299, 0, 0, - 0, 0, 0, 0, 0, 363, 836, 363, 565, -70, - -70, 565, 565, 5, 33, 597, 643, 643, 643, 643, - 33, 0, 0, 0, 0, 0, 680, 813, 813, 813, - 813, 813, 813, 813, 813, 813, 813, 813, 813, 836, - 0, 813, 0, 813, 813, 836, 836, 836, 0, 0, - 0, 0, 0, 0, 0, 0, 933, 0, 0, 0, - 0, 0, 0, 0, 836, 0, 933, 0, 0, 0, + 0, 0, 0, 0, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 629, 629, 629, 629, 629, 784, 784, + 784, 784, 784, 784, 784, 629, 784, 784, 784, 629, + 0, 0, 629, 0, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 836, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 840, 838, 0, 0, - 838, 0, 840, 840, 840, 0, 0, 0, 870, 839 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 213, 213, 613, 613, 613, 613, 213, 213, + 213, 213, 213, 213, 213, 213, 213, 213, 613, 613, + 613, 0, 613, 613, 613, 613, 613, 613, 613, 852, + 213, 213, 213, 213, 133, 133, 133, 133, -95, -95, + -95, 213, 213, 374, 133, 213, 374, 213, 213, 213, + 213, 213, 213, 213, 213, 213, 0, 0, 213, 213, + 213, 213, -3, -70, 213, 826, 826, 826, 826, 213, + 213, 213, 213, -70, -70, 213, 414, 414, 213, 213, + 0, 0, 0, 133, 133, -3, 0, 0, -3, 0, + 0, 826, 826, 213, 374, 852, 503, 213, 334, 0, + 0, 0, 0, 0, 0, 0, -3, 826, -3, 461, + -70, -70, 461, 461, 5, 37, 503, 586, 586, 586, + 586, 37, 0, 0, 0, 0, 0, 583, 852, 852, + 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, + 826, 0, 852, 0, 852, 852, 826, 826, 826, 0, + 0, 0, 0, 0, 0, 0, 0, 939, 0, 0, + 0, 0, 0, 0, 0, 826, 0, 939, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 826, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 835, 841, 0, + 0, 841, 0, 835, 835, 835, 0, 0, 0, 864, + 770 ); protected array $actionDefault = array( - 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, + 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 100,32767, 620, 620, - 620, 620,32767,32767, 257, 102,32767,32767, 491, 408, - 408, 408,32767,32767, 564, 564, 564, 564, 564,32767, - 32767,32767,32767,32767,32767, 491,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, + 32767, 629, 629, 629, 629,32767,32767, 257, 102,32767, + 32767, 500, 416, 416, 416,32767,32767,32767, 573, 573, + 573, 573, 573, 17,32767,32767,32767,32767,32767,32767, + 500,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, 36, 7, 8, 10, - 11, 49, 17, 330, 100,32767,32767,32767,32767,32767, - 32767,32767,32767, 102,32767,32767,32767,32767,32767,32767, + 36, 7, 8, 10, 11, 49, 337, 100,32767,32767, + 32767,32767,32767,32767,32767,32767, 102,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 395, 613,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 403, + 622,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, 495, 474, 475, 477, - 478, 407, 565, 619, 333, 616, 335, 406, 146, 345, - 336, 245, 261, 496, 262, 497, 500, 501, 218, 392, - 150, 151, 438, 492, 440, 490, 494, 439, 413, 419, - 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, - 430, 431, 411, 412, 493,32767,32767, 471, 470, 469, - 436,32767,32767,32767,32767,32767,32767,32767,32767, 102, - 32767, 437, 441, 444, 410, 442, 443, 460, 461, 458, - 459, 462,32767,32767, 322,32767,32767, 463, 464, 465, - 466, 373, 196, 371,32767,32767, 111, 445, 322, 111, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 451, - 452,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, - 32767,32767, 100, 508, 558, 468, 446, 447,32767, 533, - 32767, 102,32767, 535,32767,32767,32767,32767,32767,32767, - 32767,32767, 560, 433, 435, 528, 614, 414, 617,32767, - 521, 100, 196,32767, 534, 196, 196,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 559,32767, 627, - 521, 110, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110,32767, 196, 110,32767, 110, 110,32767, - 32767, 100, 196, 196, 196, 196, 196, 196, 196, 196, - 536, 196, 196, 191,32767, 271, 273, 102, 582, 196, - 538,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 504, 483, 484, 486, 487, 415, 574, 628, 343, 625, + 341, 414, 146, 353, 342, 245, 261, 505, 262, 506, + 509, 510, 218, 400, 150, 151, 447, 501, 449, 499, + 503, 448, 421, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 440, 419, 420, 502,32767, + 32767, 480, 479, 478, 445,32767,32767,32767,32767,32767, + 32767,32767,32767, 102,32767, 446, 450, 453, 418, 451, + 452, 469, 470, 467, 468, 471,32767,32767, 322,32767, + 32767, 472, 473, 474, 475, 381, 196, 379,32767,32767, + 111, 454, 322, 111,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 460, 461,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 395,32767,32767,32767,32767, 521, - 456, 139,32767, 523, 139, 566, 448, 449, 450, 566, - 566, 566, 318, 295,32767,32767,32767,32767,32767, 536, - 536, 100, 100, 100, 100,32767,32767,32767,32767, 111, - 507, 99, 99, 99, 99, 99, 103, 101,32767,32767, - 32767,32767, 226,32767, 101, 99,32767, 101, 101,32767, - 32767, 226, 228, 215, 230,32767, 586, 587, 226, 101, - 230, 230, 230, 250, 250, 510, 324, 101, 99, 101, - 101, 198, 324, 324,32767, 101, 510, 324, 510, 324, - 200, 324, 324, 324, 510, 324,32767, 101, 324, 217, - 99, 99, 324,32767,32767,32767,32767, 523,32767,32767, - 32767,32767,32767,32767,32767, 225,32767,32767,32767,32767, - 32767,32767,32767,32767, 553,32767, 571, 584, 454, 455, - 457, 570, 568, 479, 480, 481, 482, 483, 484, 485, - 487, 615,32767, 527,32767,32767,32767, 344,32767, 625, - 32767,32767,32767, 9, 74, 516, 42, 43, 51, 57, - 542, 543, 544, 545, 539, 540, 546, 541,32767,32767, + 32767,32767, 102,32767,32767,32767, 100, 517, 567, 477, + 455, 456,32767, 542,32767, 102,32767, 544,32767,32767, + 32767,32767,32767,32767,32767,32767, 569, 442, 444, 537, + 623, 422, 626,32767, 530, 100, 196,32767, 543, 196, + 196,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 568,32767, 636, 530, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110,32767, 196, 110, + 32767, 110, 110,32767,32767, 100, 196, 196, 196, 196, + 196, 196, 196, 196, 545, 196, 196, 191,32767, 271, + 273, 102, 591, 196, 547,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 626,32767, 566,32767,32767,32767,32767, - 453, 548, 592,32767,32767, 567, 618,32767,32767,32767, - 32767,32767,32767,32767, 139,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 553,32767, 137,32767,32767, - 32767,32767,32767,32767,32767,32767, 549,32767,32767,32767, - 566,32767,32767,32767,32767, 320, 317,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 403,32767, + 32767,32767,32767, 530, 465, 139,32767, 532, 139, 575, + 457, 458, 459, 575, 575, 575, 318, 295,32767,32767, + 32767,32767,32767, 545, 545, 100, 100, 100, 100,32767, + 32767,32767,32767, 111, 516, 99, 99, 99, 99, 99, + 103, 101,32767,32767,32767,32767, 226,32767, 101, 101, + 99,32767, 101, 101,32767,32767, 226, 228, 215, 230, + 32767, 595, 596, 226, 101, 230, 230, 230, 250, 250, + 519, 324, 101, 99, 101, 101, 198, 324, 324,32767, + 101, 519, 324, 519, 324, 200, 324, 324, 324, 519, + 324,32767, 101, 324, 217, 99, 99, 324,32767,32767, + 32767,32767, 532,32767,32767,32767,32767,32767,32767,32767, + 225,32767,32767,32767,32767,32767,32767,32767,32767, 562, + 32767, 580, 593, 463, 464, 466, 579, 577, 488, 489, + 490, 491, 492, 493, 494, 496, 624,32767, 536,32767, + 32767,32767, 352,32767, 634,32767,32767,32767, 9, 74, + 525, 42, 43, 51, 57, 551, 552, 553, 554, 548, + 549, 555, 550,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 635, + 32767, 575,32767,32767,32767,32767, 462, 557, 601,32767, + 32767, 576, 627,32767,32767,32767,32767,32767,32767,32767, + 32767, 139,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767, 562,32767, 137,32767,32767,32767,32767,32767, + 32767,32767,32767, 558,32767,32767,32767, 575,32767,32767, + 32767,32767, 320, 317,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 566,32767,32767,32767,32767,32767, 297, - 32767, 314,32767,32767,32767,32767,32767,32767,32767,32767, + 575,32767,32767,32767,32767,32767, 297,32767, 314,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 391, 523, 300, 302, 303,32767,32767,32767,32767, 367, + 32767,32767,32767,32767,32767,32767,32767, 399, 532, 300, + 302, 303,32767,32767,32767,32767, 375,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 153, 153, 3, 3, 347, 153, 153, - 153, 347, 347, 153, 347, 347, 347, 153, 153, 153, - 153, 153, 153, 153, 283, 186, 265, 268, 250, 250, - 153, 359, 153, 393, 393, 402 + 153, 153, 3, 3, 355, 153, 153, 153, 355, 355, + 153, 355, 355, 355, 153, 153, 153, 153, 153, 153, + 153, 283, 186, 265, 268, 250, 250, 153, 367, 153, + 401, 401, 410 ); protected array $goto = array( - 194, 194, 1057, 995, 708, 279, 276, 279, 279, 622, - 636, 639, 640, 641, 642, 663, 664, 665, 719, 721, - 717, 561, 561, 561, 561, 1088, 616, 166, 166, 166, - 166, 218, 195, 191, 191, 176, 178, 213, 191, 191, - 191, 191, 191, 192, 192, 192, 192, 192, 186, 187, - 188, 189, 190, 215, 213, 216, 548, 549, 430, 550, - 553, 554, 555, 556, 557, 558, 559, 560, 1174, 167, - 168, 169, 193, 170, 171, 172, 164, 173, 174, 175, - 177, 212, 214, 217, 237, 240, 251, 252, 253, 255, - 256, 257, 258, 259, 260, 261, 267, 268, 269, 270, - 277, 289, 290, 316, 317, 436, 437, 438, 610, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, 234, 186, 187, 188, 189, 190, - 215, 1174, 196, 197, 198, 199, 238, 179, 180, 200, - 181, 201, 197, 182, 239, 196, 163, 202, 203, 183, - 204, 205, 206, 184, 207, 208, 165, 209, 210, 211, - 185, 872, 563, 869, 563, 563, 595, 1105, 870, 351, - 747, 649, 651, 865, 563, 671, 865, 612, 428, 695, - 698, 1030, 706, 715, 1026, 722, 1060, 1060, 693, 972, - 633, 670, 1052, 1068, 1069, 844, 466, 911, 868, 911, - 911, 989, 989, 989, 989, 490, 468, 466, 904, 468, - 983, 990, 492, 602, 927, 922, 923, 936, 878, 924, - 875, 925, 926, 876, 879, 865, 930, 883, 1033, 1033, - 349, 882, 403, 406, 613, 617, 440, 673, 1367, 1111, - 1107, 1108, 435, 337, 333, 334, 336, 605, 439, 338, - 441, 650, 450, 356, 356, 356, 356, 473, 1278, 1057, - 1278, 1278, 478, 478, 459, 459, 1223, 459, 459, 1057, - 1278, 478, 931, 1057, 932, 1057, 1057, 1057, 1057, 1057, - 1057, 1057, 1057, 1057, 523, 401, 1057, 1057, 1057, 1057, - 666, 667, 1278, 684, 685, 686, 1016, 1278, 1278, 1278, - 1278, 850, 600, 1278, 359, 672, 1278, 1278, 1359, 1359, - 1359, 1359, 1063, 1062, 359, 359, 1171, 1254, 964, 960, - 960, 944, 1255, 1258, 965, 945, 1259, 359, 359, 635, - 635, 359, 886, 1394, 1081, 1309, 1309, 1309, 1309, 1309, - 1309, 1309, 1309, 1309, 1309, 850, 448, 850, 567, 694, - 898, 359, 359, 885, 1066, 1067, 865, 572, 565, 1131, - 1159, 1132, 862, 459, 459, 459, 459, 459, 459, 459, - 459, 459, 459, 459, 459, 1328, 1328, 459, 678, 459, - 459, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, - 1328, 339, 1377, 1377, 309, 565, 572, 597, 598, 310, - 608, 614, 343, 629, 630, 628, 1339, 1325, 1325, 1377, - 434, 25, 624, 1325, 1325, 1325, 1325, 1325, 1325, 1325, - 1325, 1325, 1325, 352, 353, 344, 343, 978, 424, 1380, - 1380, 410, 1350, 1019, 1350, 1350, 991, 891, 746, 552, - 552, 564, 1028, 1023, 1350, 552, 552, 552, 552, 552, - 552, 552, 552, 552, 552, 566, 592, 566, 705, 888, - 567, 566, 846, 592, 1154, 404, 472, 1361, 1361, 1361, - 1361, 987, 419, 716, 705, 323, 307, 705, 481, 609, - 482, 483, 899, 887, 1093, 1097, 896, 1354, 1355, 1385, - 1386, 551, 551, 1346, 5, 998, 6, 551, 1269, 551, - 551, 551, 551, 551, 551, 551, 551, 247, 247, 511, - 1273, 512, 271, 322, 894, 322, 322, 518, 988, 487, - 1352, 1353, 606, 627, 1271, 643, 645, 647, 1038, 1094, - 750, 1048, 411, 331, 245, 245, 245, 245, 242, 248, - 1143, 903, 1096, 488, 442, 1145, 416, 417, 1348, 1348, - 1096, 682, 1000, 683, 900, 421, 422, 423, 442, 696, - 378, 0, 425, 1098, 1064, 1064, 347, 1274, 1275, 0, - 1261, 677, 1075, 1071, 1072, 618, 860, 0, 949, 1161, - 0, 0, 0, 1261, 0, 0, 0, 0, 611, 1124, - 1035, 0, 0, 0, 0, 1276, 1336, 1337, 890, 720, - 676, 1014, 0, 0, 519, 711, 884, 1122, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1268, 0, - 0, 0, 0, 0, 0, 0, 0, 755, 755, 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, + 198, 167, 198, 198, 198, 1064, 594, 715, 283, 280, + 283, 283, 629, 643, 646, 647, 648, 649, 670, 671, + 672, 726, 728, 724, 673, 674, 1098, 691, 692, 693, + 170, 170, 170, 170, 222, 199, 195, 195, 180, 182, + 217, 195, 195, 195, 195, 195, 1190, 196, 196, 196, + 196, 196, 1190, 190, 191, 192, 193, 194, 219, 217, + 220, 553, 554, 434, 555, 558, 559, 560, 561, 562, + 563, 564, 565, 171, 172, 173, 197, 174, 175, 176, + 168, 177, 178, 179, 181, 216, 218, 221, 241, 244, + 255, 256, 257, 259, 260, 261, 262, 263, 264, 265, + 271, 272, 273, 274, 281, 293, 294, 320, 321, 440, + 441, 442, 616, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 190, + 191, 192, 193, 194, 219, 200, 201, 202, 203, 242, + 183, 184, 204, 185, 205, 201, 186, 243, 200, 166, + 206, 207, 187, 208, 209, 210, 188, 211, 212, 169, + 213, 214, 215, 189, 879, 363, 568, 355, 568, 568, + 1120, 918, 875, 918, 918, 363, 363, 516, 568, 517, + 618, 566, 566, 566, 566, 523, 622, 851, 363, 363, + 483, 483, 363, 876, 1410, 1067, 1067, 700, 979, 483, + 470, 1059, 1075, 1076, 877, 996, 996, 996, 996, 572, + 1002, 470, 363, 363, 990, 997, 347, 934, 929, 930, + 943, 885, 931, 882, 932, 933, 883, 886, 1026, 937, + 890, 998, 528, 753, 889, 432, 569, 1035, 1030, 348, + 347, 601, 1126, 1122, 1123, 754, 656, 658, 472, 911, + 678, 472, 477, 608, 702, 705, 1037, 713, 722, 1033, + 729, 1239, 1294, 1064, 1294, 1294, 353, 1355, 463, 463, + 1383, 463, 463, 1064, 1294, 1023, 938, 1064, 939, 1064, + 1064, 1064, 1064, 1064, 1064, 1064, 1064, 1064, 495, 428, + 1064, 1064, 1064, 1064, 454, 497, 1294, 360, 360, 360, + 360, 1294, 1294, 1294, 1294, 577, 570, 1294, 640, 677, + 1294, 1294, 1375, 1375, 1375, 1375, 405, 407, 410, 619, + 623, 572, 712, 967, 967, 951, 853, 1070, 1069, 952, + 251, 251, 251, 251, 251, 438, 857, 631, 712, 617, + 1139, 712, 313, 570, 577, 603, 604, 314, 614, 620, + 727, 636, 637, 606, 872, 524, 718, 872, 1137, 28, + 249, 249, 249, 249, 246, 252, 679, 463, 463, 463, + 463, 463, 463, 463, 463, 463, 463, 463, 463, 1186, + 857, 463, 857, 463, 463, 1088, 1287, 444, 680, 1040, + 1040, 1073, 1074, 439, 341, 337, 338, 340, 611, 443, + 342, 445, 657, 642, 642, 8, 872, 9, 701, 1325, + 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1344, + 1344, 327, 311, 356, 357, 1344, 1344, 1344, 1344, 1344, + 1344, 1344, 1344, 1344, 1344, 685, 1366, 452, 1366, 1366, + 1097, 1099, 1102, 1341, 1341, 893, 1370, 1371, 1366, 1341, + 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 571, + 598, 571, 343, 905, 869, 571, 892, 598, 635, 408, + 476, 1377, 1377, 1377, 1377, 1146, 1174, 1147, 492, 1368, + 1369, 898, 486, 615, 487, 488, 994, 423, 723, 612, + 634, 903, 557, 557, 1401, 1402, 895, 1362, 557, 557, + 557, 557, 557, 557, 557, 557, 557, 557, 650, 652, + 654, 414, 556, 556, 906, 894, 1108, 1112, 556, 901, + 556, 556, 556, 556, 556, 556, 556, 556, 1005, 985, + 1169, 1109, 1289, 757, 1055, 1285, 415, 872, 335, 624, + 625, 1045, 493, 956, 1176, 907, 1111, 1113, 382, 1007, + 0, 995, 1364, 1364, 1111, 1042, 0, 275, 326, 1160, + 326, 326, 0, 897, 0, 683, 1021, 0, 254, 254, + 0, 891, 0, 1158, 910, 420, 421, 1393, 1393, 446, + 689, 0, 690, 1284, 425, 426, 427, 0, 703, 1290, + 1291, 429, 1277, 446, 1393, 351, 0, 0, 867, 1071, + 1071, 0, 0, 0, 0, 1277, 684, 1082, 1078, 1079, + 0, 0, 0, 0, 1396, 1396, 1270, 971, 1292, 1352, + 1353, 1271, 1274, 972, 0, 1275, 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, 250, 250 + 0, 0, 762, 762 ); protected array $gotoCheck = array( - 42, 42, 73, 49, 73, 23, 23, 23, 23, 81, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 9, 107, 107, 107, 107, 128, 107, 42, 42, 42, + 42, 42, 42, 42, 42, 73, 127, 73, 23, 23, + 23, 23, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 9, 86, 86, 131, 86, 86, 86, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -954,111 +1020,104 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 15, 19, 26, 19, 19, 48, 15, 27, 97, - 48, 48, 48, 22, 19, 48, 22, 131, 43, 48, - 48, 48, 48, 48, 48, 48, 89, 89, 89, 89, - 56, 56, 89, 89, 89, 6, 19, 25, 25, 25, - 25, 19, 19, 19, 19, 84, 83, 19, 45, 83, - 19, 19, 84, 178, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 22, 15, 15, 107, 107, - 185, 15, 59, 59, 59, 59, 66, 66, 187, 15, - 15, 15, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 83, 24, 24, 24, 24, 156, 73, 73, - 73, 73, 154, 154, 23, 23, 156, 23, 23, 73, - 73, 154, 65, 73, 65, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 76, 62, 73, 73, 73, 73, - 86, 86, 73, 86, 86, 86, 103, 73, 73, 73, - 73, 12, 104, 73, 14, 64, 73, 73, 9, 9, - 9, 9, 119, 119, 14, 14, 155, 79, 79, 9, - 9, 73, 79, 79, 79, 73, 79, 14, 14, 108, - 108, 14, 35, 14, 115, 108, 108, 108, 108, 108, - 108, 108, 108, 108, 108, 12, 113, 12, 14, 117, - 35, 14, 14, 35, 120, 120, 22, 76, 76, 146, - 146, 146, 18, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 176, 176, 23, 121, 23, - 23, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 29, 188, 188, 76, 76, 76, 76, 76, 76, - 76, 76, 174, 76, 76, 80, 14, 177, 177, 188, - 13, 76, 13, 177, 177, 177, 177, 177, 177, 177, - 177, 177, 177, 97, 97, 174, 174, 92, 14, 188, - 188, 28, 131, 50, 131, 131, 50, 39, 50, 179, - 179, 50, 50, 50, 131, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 9, 9, 9, 7, 37, - 14, 9, 7, 9, 153, 9, 9, 131, 131, 131, - 131, 93, 93, 93, 7, 175, 175, 7, 9, 9, - 9, 9, 16, 16, 16, 16, 9, 184, 184, 9, - 9, 162, 162, 131, 46, 16, 46, 162, 166, 162, - 162, 162, 162, 162, 162, 162, 162, 5, 5, 160, - 20, 160, 24, 24, 9, 24, 24, 160, 16, 182, - 182, 182, 2, 2, 14, 85, 85, 85, 110, 130, - 99, 114, 31, 9, 5, 5, 5, 5, 5, 5, - 16, 16, 131, 157, 118, 149, 82, 82, 131, 131, - 131, 82, 96, 82, 41, 82, 82, 82, 118, 82, - 138, -1, 82, 133, 118, 118, 82, 20, 20, -1, - 20, 118, 118, 118, 118, 17, 20, -1, 17, 17, - -1, -1, -1, 20, -1, -1, -1, -1, 8, 8, - 17, -1, -1, -1, -1, 20, 20, 20, 17, 8, - 17, 17, -1, -1, 8, 8, 17, 8, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 17, -1, - -1, -1, -1, -1, -1, -1, -1, 24, 24, -1, + 42, 42, 42, 42, 15, 14, 19, 97, 19, 19, + 15, 25, 25, 25, 25, 14, 14, 163, 19, 163, + 134, 107, 107, 107, 107, 163, 107, 6, 14, 14, + 157, 157, 14, 26, 14, 89, 89, 89, 89, 157, + 19, 89, 89, 89, 27, 19, 19, 19, 19, 14, + 49, 19, 14, 14, 19, 19, 177, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 50, 15, + 15, 50, 76, 50, 15, 43, 50, 50, 50, 177, + 177, 48, 15, 15, 15, 48, 48, 48, 83, 45, + 48, 83, 159, 181, 48, 48, 48, 48, 48, 48, + 48, 159, 73, 73, 73, 73, 188, 14, 23, 23, + 190, 23, 23, 73, 73, 103, 65, 73, 65, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 84, 14, + 73, 73, 73, 73, 83, 84, 73, 24, 24, 24, + 24, 73, 73, 73, 73, 76, 76, 73, 56, 56, + 73, 73, 9, 9, 9, 9, 62, 59, 59, 59, + 59, 14, 7, 9, 9, 73, 7, 119, 119, 73, + 5, 5, 5, 5, 5, 13, 12, 13, 7, 8, + 8, 7, 76, 76, 76, 76, 76, 76, 76, 76, + 8, 76, 76, 104, 22, 8, 8, 22, 8, 76, + 5, 5, 5, 5, 5, 5, 64, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 158, + 12, 23, 12, 23, 23, 115, 14, 66, 66, 107, + 107, 120, 120, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 108, 108, 46, 22, 46, 117, 108, + 108, 108, 108, 108, 108, 108, 108, 108, 108, 179, + 179, 178, 178, 97, 97, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 121, 134, 113, 134, 134, + 130, 130, 130, 180, 180, 35, 187, 187, 134, 180, + 180, 180, 180, 180, 180, 180, 180, 180, 180, 9, + 9, 9, 29, 35, 18, 9, 35, 9, 80, 9, + 9, 134, 134, 134, 134, 149, 149, 149, 185, 185, + 185, 39, 9, 9, 9, 9, 93, 93, 93, 2, + 2, 9, 182, 182, 9, 9, 37, 134, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 85, 85, + 85, 28, 165, 165, 16, 16, 16, 16, 165, 9, + 165, 165, 165, 165, 165, 165, 165, 165, 16, 92, + 156, 133, 20, 99, 114, 169, 31, 22, 9, 17, + 17, 110, 160, 17, 17, 41, 134, 136, 141, 96, + -1, 16, 134, 134, 134, 17, -1, 24, 24, 152, + 24, 24, -1, 17, -1, 17, 17, -1, 5, 5, + -1, 17, -1, 16, 16, 82, 82, 191, 191, 118, + 82, -1, 82, 17, 82, 82, 82, -1, 82, 20, + 20, 82, 20, 118, 191, 82, -1, -1, 20, 118, + 118, -1, -1, -1, -1, 20, 118, 118, 118, 118, + -1, -1, -1, -1, 191, 191, 79, 79, 20, 20, + 20, 79, 79, 79, -1, 79, -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, -1, -1, -1, - -1, 5, 5 + -1, -1, 24, 24 ); protected array $gotoBase = array( - 0, 0, -203, 0, 0, 506, 185, 451, 580, 10, - 0, 0, 6, 71, 8, -187, 20, 101, 54, -101, - 110, 0, -103, 2, 250, 194, 159, 164, 92, 96, - 0, 85, 0, 0, 0, -44, 0, 118, 0, 116, - 0, 103, -1, 155, 0, 182, -256, 0, -558, -15, - 421, 0, 0, 0, 0, 0, 150, 0, 0, 187, - 0, 0, 243, 0, 69, 258, 1, 0, 0, 0, - 0, 0, 0, -5, 0, 0, 12, 0, 0, -99, - 95, -353, 44, -70, -276, 35, -441, 0, 0, -94, - 0, 0, 100, 168, 0, 0, 99, -325, 0, 115, - 0, 0, 0, 261, 259, 0, 0, -7, 94, 0, - 153, 0, 0, 68, 107, 60, 0, 67, 280, 32, - 70, 87, 0, 0, 0, 0, 0, 0, 23, 0, - 148, 169, 0, 111, 0, 0, 0, 0, -194, 0, - 0, 0, 0, 0, 0, 0, 88, 0, 0, 91, - 0, 0, 0, 109, 228, 74, -9, 93, 0, 0, - 3, 0, 256, 0, 0, 0, 124, 0, 0, 0, - 0, 0, 0, 0, 106, 156, 140, 172, 184, 204, - 0, 0, 220, 0, 108, 200, 0, 207, 86, 0, - 0 + 0, 0, -243, 0, 0, 329, 174, 312, 328, 10, + 0, 0, 37, -8, -135, -188, 48, 61, 152, -101, + 128, 0, 74, 2, 291, 165, 186, 197, 168, 163, + 0, 85, 0, 0, 0, 65, 0, 151, 0, 156, + 0, 90, -1, 209, 0, 220, -352, 0, -490, 189, + 213, 0, 0, 0, 0, 0, 265, 0, 0, 268, + 0, 0, 271, 0, 126, 259, 148, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -44, 0, 0, 196, + 154, -354, 68, -32, -198, 13, -714, 0, 0, -89, + 0, 0, 198, 179, 0, 0, 92, -332, 0, 114, + 0, 0, 0, 237, 307, 0, 0, 150, 164, 0, + 162, 0, 0, 155, 106, 107, 0, 122, 311, 43, + 103, 140, 0, 0, 0, 0, 0, 4, 0, 0, + 437, 24, 0, 146, 169, 0, 91, 0, 0, 0, + 0, -213, 0, 0, 0, 0, 0, 0, 0, 200, + 0, 0, 101, 0, 0, 0, 171, 153, 133, -18, + 88, 0, 0, -334, 0, 273, 0, 0, 0, 157, + 0, 0, 0, 0, 0, 0, 0, -84, 98, 180, + 204, 221, 253, 0, 0, 175, 0, 63, 233, 0, + 236, 267, 0, 0 ); protected array $gotoDefault = array( - -32768, 524, 757, 4, 758, 953, 833, 842, 588, 542, - 718, 348, 637, 431, 1344, 929, 1160, 607, 861, 1287, - 1293, 467, 864, 328, 744, 941, 912, 913, 407, 394, - 877, 405, 661, 638, 505, 897, 463, 889, 497, 892, - 462, 901, 162, 427, 521, 905, 3, 908, 570, 939, - 993, 395, 916, 396, 689, 918, 591, 920, 921, 402, - 408, 409, 1165, 599, 634, 933, 254, 593, 934, 393, - 935, 943, 398, 400, 699, 477, 516, 510, 420, 1126, - 594, 621, 658, 456, 484, 632, 644, 631, 491, 443, - 426, 327, 977, 985, 498, 475, 999, 350, 1007, 752, - 1173, 652, 500, 1015, 653, 1022, 1025, 543, 544, 489, - 1037, 264, 1040, 501, 1049, 23, 679, 1054, 1055, 680, - 654, 1077, 655, 681, 656, 1079, 474, 589, 1087, 464, - 1095, 1333, 465, 1099, 262, 1102, 278, 354, 377, 444, - 1109, 1110, 9, 1116, 709, 710, 19, 273, 520, 1144, - 700, 1150, 272, 1153, 461, 1172, 460, 1242, 1244, 571, - 502, 1262, 313, 1265, 692, 517, 1270, 457, 1335, 458, - 545, 485, 335, 546, 1378, 306, 357, 332, 562, 314, - 358, 547, 486, 1341, 1349, 329, 31, 1368, 1379, 604, - 626 + -32768, 529, 764, 7, 765, 960, 840, 849, 593, 547, + 725, 352, 644, 435, 1360, 936, 1175, 613, 868, 1303, + 1309, 471, 871, 332, 751, 948, 919, 920, 411, 398, + 884, 409, 668, 645, 510, 904, 467, 896, 502, 899, + 466, 908, 165, 431, 526, 912, 6, 915, 575, 946, + 1000, 399, 923, 400, 696, 925, 597, 927, 928, 406, + 412, 413, 1180, 605, 641, 940, 258, 599, 941, 397, + 942, 950, 402, 404, 706, 482, 521, 515, 424, 1141, + 600, 628, 665, 460, 489, 639, 651, 638, 496, 447, + 430, 331, 984, 992, 503, 480, 1006, 354, 1014, 759, + 1188, 659, 505, 1022, 660, 1029, 1032, 548, 549, 494, + 1044, 268, 1047, 506, 1056, 26, 686, 1061, 1062, 687, + 661, 1084, 662, 688, 663, 1086, 479, 595, 1189, 478, + 1101, 1107, 468, 1110, 1349, 469, 1114, 266, 1117, 282, + 358, 381, 448, 1124, 1125, 12, 1131, 716, 717, 22, + 277, 525, 1159, 707, 1165, 276, 1168, 465, 1187, 464, + 1258, 1260, 576, 507, 1278, 317, 1281, 699, 522, 1286, + 461, 1351, 462, 550, 490, 339, 551, 1394, 310, 361, + 336, 567, 318, 362, 552, 491, 1357, 1365, 333, 34, + 1384, 1395, 610, 633 ); protected array $ruleToNonTerminal = array( @@ -1095,14 +1154,15 @@ class Php8 extends \PhpParser\ParserAbstract 89, 118, 118, 118, 119, 119, 116, 116, 120, 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, 20, - 127, 126, 126, 128, 128, 128, 128, 60, 129, 129, - 130, 61, 132, 132, 133, 133, 134, 134, 86, 135, - 135, 135, 135, 135, 135, 135, 135, 141, 141, 142, - 142, 143, 143, 143, 143, 143, 144, 145, 145, 140, - 140, 136, 136, 139, 139, 147, 147, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 137, 148, 148, - 150, 149, 149, 138, 138, 114, 114, 151, 151, 153, - 153, 153, 152, 152, 62, 104, 154, 154, 56, 56, + 128, 128, 128, 128, 129, 129, 129, 127, 126, 126, + 131, 131, 131, 130, 130, 60, 132, 132, 133, 61, + 135, 135, 136, 136, 137, 137, 86, 138, 138, 138, + 138, 138, 138, 138, 138, 144, 144, 145, 145, 146, + 146, 146, 146, 146, 147, 148, 148, 143, 143, 139, + 139, 142, 142, 150, 150, 149, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 140, 151, 151, 153, 152, + 152, 141, 141, 114, 114, 154, 154, 156, 156, 156, + 155, 155, 62, 104, 157, 157, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1112,20 +1172,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 161, 162, 162, 163, 155, 155, - 160, 160, 164, 165, 165, 166, 167, 168, 168, 168, - 168, 19, 19, 73, 73, 73, 73, 156, 156, 156, - 156, 170, 170, 159, 159, 159, 157, 157, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 177, 177, - 177, 108, 179, 179, 179, 179, 158, 158, 158, 158, - 158, 158, 158, 158, 59, 59, 173, 173, 173, 173, - 173, 180, 180, 169, 169, 169, 169, 181, 181, 181, - 181, 181, 74, 74, 66, 66, 66, 66, 131, 131, - 131, 131, 184, 183, 172, 172, 172, 172, 172, 172, - 171, 171, 171, 182, 182, 182, 182, 107, 178, 186, - 186, 185, 185, 187, 187, 187, 187, 187, 187, 187, - 187, 175, 175, 175, 175, 174, 189, 188, 188, 188, - 188, 188, 188, 188, 188, 190, 190, 190, 190 + 42, 42, 42, 164, 165, 165, 166, 158, 158, 163, + 163, 167, 168, 168, 169, 170, 171, 171, 171, 171, + 19, 19, 73, 73, 73, 73, 159, 159, 159, 159, + 173, 173, 162, 162, 162, 160, 160, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 180, 180, 180, + 108, 182, 182, 182, 182, 161, 161, 161, 161, 161, + 161, 161, 161, 59, 59, 176, 176, 176, 176, 176, + 183, 183, 172, 172, 172, 172, 184, 184, 184, 184, + 184, 74, 74, 66, 66, 66, 66, 134, 134, 134, + 134, 187, 186, 175, 175, 175, 175, 175, 175, 174, + 174, 174, 185, 185, 185, 185, 107, 181, 189, 189, + 188, 188, 190, 190, 190, 190, 190, 190, 190, 190, + 178, 178, 178, 178, 177, 192, 191, 191, 191, 191, + 191, 191, 191, 191, 193, 193, 193, 193 ); protected array $ruleToLength = array( @@ -1162,37 +1222,38 @@ class Php8 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, - 1, 1, 3, 1, 2, 2, 3, 2, 3, 1, - 1, 2, 3, 1, 1, 3, 2, 0, 1, 5, - 7, 5, 6, 10, 3, 5, 1, 1, 3, 0, - 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, - 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, - 1, 1, 3, 0, 2, 0, 3, 5, 8, 1, - 3, 3, 0, 2, 2, 2, 3, 1, 0, 1, - 1, 3, 3, 3, 4, 4, 1, 1, 2, 3, + 2, 4, 4, 3, 3, 1, 3, 1, 1, 3, + 2, 2, 3, 1, 1, 2, 3, 1, 1, 2, + 3, 1, 1, 3, 2, 0, 1, 5, 7, 5, + 6, 10, 3, 5, 1, 1, 3, 0, 2, 4, + 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, + 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, + 3, 0, 2, 0, 3, 5, 8, 1, 3, 3, + 0, 2, 2, 2, 3, 1, 0, 1, 1, 3, + 3, 3, 4, 4, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 2, 2, 2, 2, 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, 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, 2, 8, 9, 8, 9, - 9, 10, 9, 10, 8, 3, 2, 2, 1, 1, - 0, 4, 2, 1, 3, 2, 1, 2, 2, 2, - 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, - 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, - 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, - 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, - 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, - 2, 2, 1, 3, 1, 4, 3, 3, 3, 3, - 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, - 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, - 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, - 3, 3, 3, 6, 3, 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, 9, + 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, + 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, + 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 4, 1, 4, + 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, + 2, 1, 3, 1, 4, 3, 3, 3, 3, 1, + 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, + 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, + 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, + 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1974,852 +2035,879 @@ protected function initReduceCallbacks(): void { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, 330 => static function ($self, $stackPos) { - $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = array(); }, 331 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semValue = $self->semStack[$stackPos-(4-2)]; }, 332 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(4-2)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); }, 333 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, 334 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(3-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)]); }, 335 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 336 => static function ($self, $stackPos) { - $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 337 => static function ($self, $stackPos) { + $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 337 => null, 338 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 339 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 340 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 341 => static function ($self, $stackPos) { + $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 340 => null, - 341 => null, 342 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, 343 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 344 => static function ($self, $stackPos) { + $self->semValue = $self->semStack[$stackPos-(1-1)]; + }, + 345 => null, + 346 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 347 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 348 => null, + 349 => null, + 350 => static function ($self, $stackPos) { + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + }, + 351 => static function ($self, $stackPos) { + $self->semValue = array($self->semStack[$stackPos-(1-1)]); + }, + 352 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 345 => static function ($self, $stackPos) { + 353 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 346 => static function ($self, $stackPos) { + 354 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 347 => static function ($self, $stackPos) { + 355 => static function ($self, $stackPos) { $self->semValue = array(); }, - 348 => static function ($self, $stackPos) { + 356 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 349 => static function ($self, $stackPos) { + 357 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 350 => static function ($self, $stackPos) { + 358 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); $self->checkPropertyHooksForMultiProperty($self->semValue, $stackPos-(7-5)); $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); $self->addPropertyNameToHooks($self->semValue); }, - 351 => static function ($self, $stackPos) { + 359 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 352 => static function ($self, $stackPos) { + 360 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 353 => static function ($self, $stackPos) { + 361 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 354 => static function ($self, $stackPos) { + 362 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 355 => static function ($self, $stackPos) { + 363 => static function ($self, $stackPos) { $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 356 => static function ($self, $stackPos) { + 364 => static function ($self, $stackPos) { $self->semValue = null; /* will be skipped */ }, - 357 => static function ($self, $stackPos) { + 365 => static function ($self, $stackPos) { $self->semValue = array(); }, - 358 => static function ($self, $stackPos) { + 366 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 359 => static function ($self, $stackPos) { + 367 => static function ($self, $stackPos) { $self->semValue = array(); }, - 360 => static function ($self, $stackPos) { + 368 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 361 => static function ($self, $stackPos) { + 369 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 362 => static function ($self, $stackPos) { + 370 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 363 => static function ($self, $stackPos) { + 371 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 364 => static function ($self, $stackPos) { + 372 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 365 => static function ($self, $stackPos) { + 373 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 366 => static function ($self, $stackPos) { + 374 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 367 => null, - 368 => static function ($self, $stackPos) { + 375 => null, + 376 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 369 => static function ($self, $stackPos) { + 377 => static function ($self, $stackPos) { $self->semValue = null; }, - 370 => null, - 371 => null, - 372 => static function ($self, $stackPos) { + 378 => null, + 379 => null, + 380 => static function ($self, $stackPos) { $self->semValue = 0; }, - 373 => static function ($self, $stackPos) { + 381 => static function ($self, $stackPos) { $self->semValue = 0; }, - 374 => null, - 375 => null, - 376 => static function ($self, $stackPos) { + 382 => null, + 383 => null, + 384 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 377 => static function ($self, $stackPos) { + 385 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 378 => static function ($self, $stackPos) { + 386 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 379 => static function ($self, $stackPos) { + 387 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 380 => static function ($self, $stackPos) { + 388 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 381 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 382 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 383 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 384 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 385 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 386 => static function ($self, $stackPos) { + 394 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 387 => null, - 388 => static function ($self, $stackPos) { + 395 => null, + 396 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 389 => static function ($self, $stackPos) { + 397 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 390 => static function ($self, $stackPos) { + 398 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 391 => static function ($self, $stackPos) { + 399 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 392 => static function ($self, $stackPos) { + 400 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 393 => static function ($self, $stackPos) { + 401 => static function ($self, $stackPos) { $self->semValue = []; }, - 394 => static function ($self, $stackPos) { + 402 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 395 => static function ($self, $stackPos) { + 403 => static function ($self, $stackPos) { $self->semValue = []; }, - 396 => static function ($self, $stackPos) { + 404 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); }, - 397 => static function ($self, $stackPos) { + 405 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 398 => static function ($self, $stackPos) { + 406 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 399 => static function ($self, $stackPos) { + 407 => static function ($self, $stackPos) { $self->semValue = null; }, - 400 => static function ($self, $stackPos) { + 408 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 401 => static function ($self, $stackPos) { + 409 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 402 => static function ($self, $stackPos) { + 410 => static function ($self, $stackPos) { $self->semValue = 0; }, - 403 => static function ($self, $stackPos) { + 411 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 404 => null, - 405 => null, - 406 => static function ($self, $stackPos) { + 412 => null, + 413 => null, + 414 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 407 => static function ($self, $stackPos) { + 415 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 408 => static function ($self, $stackPos) { + 416 => static function ($self, $stackPos) { $self->semValue = array(); }, - 409 => null, - 410 => null, - 411 => static function ($self, $stackPos) { + 417 => null, + 418 => null, + 419 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 412 => static function ($self, $stackPos) { + 420 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 413 => static function ($self, $stackPos) { + 421 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 414 => static function ($self, $stackPos) { + 422 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 415 => static function ($self, $stackPos) { + 423 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 416 => null, - 417 => null, - 418 => static function ($self, $stackPos) { + 424 => null, + 425 => null, + 426 => static function ($self, $stackPos) { + $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 427 => static function ($self, $stackPos) { $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 419 => static function ($self, $stackPos) { + 428 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 420 => static function ($self, $stackPos) { + 429 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 421 => static function ($self, $stackPos) { + 430 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 422 => static function ($self, $stackPos) { + 431 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 423 => static function ($self, $stackPos) { + 432 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 424 => static function ($self, $stackPos) { + 433 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 425 => static function ($self, $stackPos) { + 434 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 426 => static function ($self, $stackPos) { + 435 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 427 => static function ($self, $stackPos) { + 436 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 428 => static function ($self, $stackPos) { + 437 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 429 => static function ($self, $stackPos) { + 438 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 430 => static function ($self, $stackPos) { + 439 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 431 => static function ($self, $stackPos) { + 440 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 432 => static function ($self, $stackPos) { + 441 => static function ($self, $stackPos) { $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 433 => static function ($self, $stackPos) { + 442 => static function ($self, $stackPos) { $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 434 => static function ($self, $stackPos) { + 443 => static function ($self, $stackPos) { $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 435 => static function ($self, $stackPos) { + 444 => static function ($self, $stackPos) { $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 436 => static function ($self, $stackPos) { + 445 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 437 => static function ($self, $stackPos) { + 446 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 438 => static function ($self, $stackPos) { + 447 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 439 => static function ($self, $stackPos) { + 448 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 440 => static function ($self, $stackPos) { + 449 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 441 => static function ($self, $stackPos) { + 450 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 442 => static function ($self, $stackPos) { + 451 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 443 => static function ($self, $stackPos) { + 452 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 444 => static function ($self, $stackPos) { + 453 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 445 => static function ($self, $stackPos) { + 454 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 446 => static function ($self, $stackPos) { + 455 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 447 => static function ($self, $stackPos) { + 456 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 448 => static function ($self, $stackPos) { + 457 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 449 => static function ($self, $stackPos) { + 458 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 450 => static function ($self, $stackPos) { + 459 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 451 => static function ($self, $stackPos) { + 460 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 452 => static function ($self, $stackPos) { + 461 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 453 => static function ($self, $stackPos) { + 462 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 454 => static function ($self, $stackPos) { + 463 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 455 => static function ($self, $stackPos) { + 464 => static function ($self, $stackPos) { $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 456 => static function ($self, $stackPos) { + 465 => static function ($self, $stackPos) { $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 457 => static function ($self, $stackPos) { + 466 => static function ($self, $stackPos) { $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 458 => static function ($self, $stackPos) { + 467 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 459 => static function ($self, $stackPos) { + 468 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 460 => static function ($self, $stackPos) { + 469 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 461 => static function ($self, $stackPos) { + 470 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 462 => static function ($self, $stackPos) { + 471 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 463 => static function ($self, $stackPos) { + 472 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 464 => static function ($self, $stackPos) { + 473 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 465 => static function ($self, $stackPos) { + 474 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 466 => static function ($self, $stackPos) { + 475 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 467 => static function ($self, $stackPos) { + 476 => static function ($self, $stackPos) { $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 468 => static function ($self, $stackPos) { + 477 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 469 => static function ($self, $stackPos) { + 478 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 470 => static function ($self, $stackPos) { + 479 => static function ($self, $stackPos) { $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 471 => static function ($self, $stackPos) { + 480 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 472 => static function ($self, $stackPos) { + 481 => static function ($self, $stackPos) { $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 473 => static function ($self, $stackPos) { + 482 => static function ($self, $stackPos) { $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 474 => static function ($self, $stackPos) { + 483 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 475 => static function ($self, $stackPos) { + 484 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 476 => static function ($self, $stackPos) { + 485 => static function ($self, $stackPos) { $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 477 => static function ($self, $stackPos) { + 486 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 478 => static function ($self, $stackPos) { + 487 => static function ($self, $stackPos) { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 479 => static function ($self, $stackPos) { + 488 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 480 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 481 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 482 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 483 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 484 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 485 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 486 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 487 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 488 => null, - 489 => static function ($self, $stackPos) { + 497 => null, + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 490 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 507 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 508 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 510 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 511 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 512 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 505 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 506 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 507 => static function ($self, $stackPos) { + 516 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 508 => null, - 509 => null, - 510 => static function ($self, $stackPos) { + 517 => null, + 518 => null, + 519 => static function ($self, $stackPos) { $self->semValue = array(); }, - 511 => static function ($self, $stackPos) { + 520 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 512 => null, - 513 => static function ($self, $stackPos) { + 521 => null, + 522 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 514 => static function ($self, $stackPos) { + 523 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 515 => static function ($self, $stackPos) { + 524 => static function ($self, $stackPos) { $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 516 => static function ($self, $stackPos) { + 525 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 517 => static function ($self, $stackPos) { + 526 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 518 => static function ($self, $stackPos) { + 527 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 519 => static function ($self, $stackPos) { + 528 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 520 => static function ($self, $stackPos) { + 529 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 521 => static function ($self, $stackPos) { + 530 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 522 => null, - 523 => static function ($self, $stackPos) { + 531 => null, + 532 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 524 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 525 => static function ($self, $stackPos) { + 534 => static function ($self, $stackPos) { $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 526 => static function ($self, $stackPos) { + 535 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 527 => null, - 528 => null, - 529 => static function ($self, $stackPos) { + 536 => null, + 537 => null, + 538 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 530 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 531 => null, - 532 => null, - 533 => static function ($self, $stackPos) { + 540 => null, + 541 => null, + 542 => static function ($self, $stackPos) { $self->semValue = array(); }, - 534 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 535 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 536 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = array(); }, - 537 => null, - 538 => static function ($self, $stackPos) { + 546 => null, + 547 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 539 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 540 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 541 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 542 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 543 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 544 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 545 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 546 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 547 => static function ($self, $stackPos) { + 556 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 548 => static function ($self, $stackPos) { + 557 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 549 => static function ($self, $stackPos) { + 558 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 550 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 551 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 552 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 553 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 554 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 555 => static function ($self, $stackPos) { + 564 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 556 => static function ($self, $stackPos) { + 565 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 557 => static function ($self, $stackPos) { + 566 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 558 => null, - 559 => null, - 560 => null, - 561 => static function ($self, $stackPos) { + 567 => null, + 568 => null, + 569 => null, + 570 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 562 => static function ($self, $stackPos) { + 571 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 563 => static function ($self, $stackPos) { + 572 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 564 => static function ($self, $stackPos) { + 573 => static function ($self, $stackPos) { $self->semValue = null; }, - 565 => null, - 566 => null, - 567 => static function ($self, $stackPos) { + 574 => null, + 575 => null, + 576 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 568 => null, - 569 => null, - 570 => null, - 571 => null, - 572 => null, - 573 => null, - 574 => static function ($self, $stackPos) { + 577 => null, + 578 => null, + 579 => null, + 580 => null, + 581 => null, + 582 => null, + 583 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 575 => null, - 576 => null, - 577 => null, - 578 => static function ($self, $stackPos) { + 584 => null, + 585 => null, + 586 => null, + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 579 => null, - 580 => static function ($self, $stackPos) { + 588 => null, + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 581 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 582 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $self->semValue = null; }, - 583 => null, - 584 => null, - 585 => null, - 586 => static function ($self, $stackPos) { + 592 => null, + 593 => null, + 594 => null, + 595 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 587 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 588 => null, - 589 => static function ($self, $stackPos) { + 597 => null, + 598 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 590 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 591 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 592 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 593 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 594 => null, - 595 => static function ($self, $stackPos) { + 603 => null, + 604 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 597 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 598 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 599 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 600 => null, - 601 => static function ($self, $stackPos) { + 609 => null, + 610 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 602 => null, - 603 => null, - 604 => static function ($self, $stackPos) { + 611 => null, + 612 => null, + 613 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 605 => null, - 606 => static function ($self, $stackPos) { + 614 => null, + 615 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 607 => static function ($self, $stackPos) { + 616 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 608 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 609 => null, - 610 => static function ($self, $stackPos) { + 618 => null, + 619 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 611 => static function ($self, $stackPos) { + 620 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 612 => static function ($self, $stackPos) { + 621 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 613 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 614 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 615 => static function ($self, $stackPos) { + 624 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 616 => static function ($self, $stackPos) { + 625 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 617 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 618 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 619 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 620 => static function ($self, $stackPos) { + 629 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 621 => static function ($self, $stackPos) { + 630 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 622 => static function ($self, $stackPos) { + 631 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 623 => static function ($self, $stackPos) { + 632 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 624 => static function ($self, $stackPos) { + 633 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, - 625 => static function ($self, $stackPos) { + 634 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 626 => static function ($self, $stackPos) { + 635 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 627 => null, - 628 => static function ($self, $stackPos) { + 636 => null, + 637 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 629 => static function ($self, $stackPos) { + 638 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 630 => static function ($self, $stackPos) { + 639 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 631 => static function ($self, $stackPos) { + 640 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 632 => static function ($self, $stackPos) { + 641 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 633 => static function ($self, $stackPos) { + 642 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, - 634 => static function ($self, $stackPos) { + 643 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 635 => static function ($self, $stackPos) { + 644 => static function ($self, $stackPos) { $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 636 => static function ($self, $stackPos) { + 645 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 637 => static function ($self, $stackPos) { + 646 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 638 => null, + 647 => null, ]; } } diff --git a/test/code/parser/stmt/function/clone_function.test b/test/code/parser/stmt/function/clone_function.test index db13ff60ae..b832727ace 100644 --- a/test/code/parser/stmt/function/clone_function.test +++ b/test/code/parser/stmt/function/clone_function.test @@ -3,6 +3,18 @@ Declaring clone function stub $foo, "bar" => $bar ]); +clone($x, $array); +clone($x, $array, $extraParameter, $trailingComma, ); +clone(object: $x, withProperties: [ "foo" => $foo, "bar" => $bar ]); +clone($x, withProperties: [ "foo" => $foo, "bar" => $bar ]); +clone(object: $x); +clone(object: $x, [ "foo" => $foo, "bar" => $bar ]); +clone(...["object" => $x, "withProperties" => [ "foo" => $foo, "bar" => $bar ]]); +clone(...); ----- array( 0: Stmt_Function( @@ -55,4 +67,382 @@ array( stmts: array( ) ) + 1: Stmt_Expression( + expr: Expr_Clone( + expr: Expr_Variable( + name: x + ) + ) + ) + 2: Stmt_Expression( + expr: Expr_Clone( + expr: Expr_Variable( + name: x + ) + ) + ) + 3: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: clone + ) + args: array( + 0: Arg( + name: null + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) + ) + ) + ) + 4: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: clone + ) + args: array( + 0: Arg( + name: null + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) + 1: Arg( + name: null + value: Expr_Array( + items: array( + 0: ArrayItem( + key: Scalar_String( + value: foo + ) + value: Expr_Variable( + name: foo + ) + byRef: false + unpack: false + ) + 1: ArrayItem( + key: Scalar_String( + value: bar + ) + value: Expr_Variable( + name: bar + ) + byRef: false + unpack: false + ) + ) + ) + byRef: false + unpack: false + ) + ) + ) + ) + 5: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: clone + ) + args: array( + 0: Arg( + name: null + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) + 1: Arg( + name: null + value: Expr_Variable( + name: array + ) + byRef: false + unpack: false + ) + ) + ) + ) + 6: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: clone + ) + args: array( + 0: Arg( + name: null + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) + 1: Arg( + name: null + value: Expr_Variable( + name: array + ) + byRef: false + unpack: false + ) + 2: Arg( + name: null + value: Expr_Variable( + name: extraParameter + ) + byRef: false + unpack: false + ) + 3: Arg( + name: null + value: Expr_Variable( + name: trailingComma + ) + byRef: false + unpack: false + ) + ) + ) + ) + 7: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: clone + ) + args: array( + 0: Arg( + name: Identifier( + name: object + ) + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) + 1: Arg( + name: Identifier( + name: withProperties + ) + value: Expr_Array( + items: array( + 0: ArrayItem( + key: Scalar_String( + value: foo + ) + value: Expr_Variable( + name: foo + ) + byRef: false + unpack: false + ) + 1: ArrayItem( + key: Scalar_String( + value: bar + ) + value: Expr_Variable( + name: bar + ) + byRef: false + unpack: false + ) + ) + ) + byRef: false + unpack: false + ) + ) + ) + ) + 8: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: clone + ) + args: array( + 0: Arg( + name: null + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) + 1: Arg( + name: Identifier( + name: withProperties + ) + value: Expr_Array( + items: array( + 0: ArrayItem( + key: Scalar_String( + value: foo + ) + value: Expr_Variable( + name: foo + ) + byRef: false + unpack: false + ) + 1: ArrayItem( + key: Scalar_String( + value: bar + ) + value: Expr_Variable( + name: bar + ) + byRef: false + unpack: false + ) + ) + ) + byRef: false + unpack: false + ) + ) + ) + ) + 9: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: clone + ) + args: array( + 0: Arg( + name: Identifier( + name: object + ) + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) + ) + ) + ) + 10: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: clone + ) + args: array( + 0: Arg( + name: Identifier( + name: object + ) + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) + 1: Arg( + name: null + value: Expr_Array( + items: array( + 0: ArrayItem( + key: Scalar_String( + value: foo + ) + value: Expr_Variable( + name: foo + ) + byRef: false + unpack: false + ) + 1: ArrayItem( + key: Scalar_String( + value: bar + ) + value: Expr_Variable( + name: bar + ) + byRef: false + unpack: false + ) + ) + ) + byRef: false + unpack: false + ) + ) + ) + ) + 11: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: clone + ) + args: array( + 0: Arg( + name: null + value: Expr_Array( + items: array( + 0: ArrayItem( + key: Scalar_String( + value: object + ) + value: Expr_Variable( + name: x + ) + byRef: false + unpack: false + ) + 1: ArrayItem( + key: Scalar_String( + value: withProperties + ) + value: Expr_Array( + items: array( + 0: ArrayItem( + key: Scalar_String( + value: foo + ) + value: Expr_Variable( + name: foo + ) + byRef: false + unpack: false + ) + 1: ArrayItem( + key: Scalar_String( + value: bar + ) + value: Expr_Variable( + name: bar + ) + byRef: false + unpack: false + ) + ) + ) + byRef: false + unpack: false + ) + ) + ) + byRef: false + unpack: true + ) + ) + ) + ) + 12: Stmt_Expression( + expr: Expr_FuncCall( + name: Name( + name: clone + ) + args: array( + 0: VariadicPlaceholder( + ) + ) + ) + ) ) From 66d5018bb758a1f5924452f96c25a19c955b9f2d Mon Sep 17 00:00:00 2001 From: Caleb White Date: Sat, 19 Jul 2025 14:41:11 -0500 Subject: [PATCH 414/428] feat: add CallLike::getArg() method (#1089) This method returns the named argument that matches the given `$name`, or the positional (unnamed) argument that exists at the given `$position`, otherwise, returns `null` for first-class callables or if no match is found. --- lib/PhpParser/Node/Expr/CallLike.php | 25 ++++++++ test/PhpParser/Node/Expr/CallableLikeTest.php | 60 +++++++++++++++++++ 2 files changed, 85 insertions(+) diff --git a/lib/PhpParser/Node/Expr/CallLike.php b/lib/PhpParser/Node/Expr/CallLike.php index 2af2245bab..86e781c102 100644 --- a/lib/PhpParser/Node/Expr/CallLike.php +++ b/lib/PhpParser/Node/Expr/CallLike.php @@ -32,4 +32,29 @@ public function getArgs(): array { assert(!$this->isFirstClassCallable()); return $this->getRawArgs(); } + + /** + * Retrieves a specific argument from the raw arguments. + * + * Returns the named argument that matches the given `$name`, or the + * positional (unnamed) argument that exists at the given `$position`, + * otherwise, returns `null` for first-class callables or if no match is found. + */ + public function getArg(string $name, int $position): ?Arg { + if ($this->isFirstClassCallable()) { + return null; + } + foreach ($this->getRawArgs() as $i => $arg) { + if ($arg->unpack) { + continue; + } + if ( + ($arg->name !== null && $arg->name->toString() === $name) + || ($arg->name === null && $i === $position) + ) { + return $arg; + } + } + return null; + } } diff --git a/test/PhpParser/Node/Expr/CallableLikeTest.php b/test/PhpParser/Node/Expr/CallableLikeTest.php index c30e21aaef..618c9723f9 100644 --- a/test/PhpParser/Node/Expr/CallableLikeTest.php +++ b/test/PhpParser/Node/Expr/CallableLikeTest.php @@ -3,6 +3,7 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Arg; +use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar\Int_; use PhpParser\Node\VariadicPlaceholder; @@ -18,6 +19,13 @@ public function testIsFirstClassCallable(CallLike $node, bool $isFirstClassCalla } } + /** + * @dataProvider provideTestGetArg + */ + public function testGetArg(CallLike $node, ?Arg $expected): void { + $this->assertSame($expected, $node->getArg('bar', 1)); + } + public static function provideTestIsFirstClassCallable() { $normalArgs = [new Arg(new Int_(1))]; $callableArgs = [new VariadicPlaceholder()]; @@ -35,4 +43,56 @@ public static function provideTestIsFirstClassCallable() { [new NullsafeMethodCall(new Variable('this'), 'test', $callableArgs), true], ]; } + + public static function provideTestGetArg() { + $foo = new Arg(new Int_(1)); + $namedFoo = new Arg(new Int_(1), false, false, [], new Identifier('foo')); + $bar = new Arg(new Int_(2)); + $namedBar = new Arg(new Int_(2), false, false, [], new Identifier('bar')); + $unpack = new Arg(new Int_(3), false, true); + $callableArgs = [new VariadicPlaceholder()]; + return [ + [new FuncCall(new Name('test'), [$foo]), null], + [new FuncCall(new Name('test'), [$namedFoo]), null], + [new FuncCall(new Name('test'), [$foo, $bar]), $bar], + [new FuncCall(new Name('test'), [$namedBar]), $namedBar], + [new FuncCall(new Name('test'), [$namedFoo, $namedBar]), $namedBar], + [new FuncCall(new Name('test'), [$namedBar, $namedFoo]), $namedBar], + [new FuncCall(new Name('test'), [$namedFoo, $unpack]), null], + [new FuncCall(new Name('test'), $callableArgs), null], + [new MethodCall(new Variable('this'), 'test', [$foo]), null], + [new MethodCall(new Variable('this'), 'test', [$namedFoo]), null], + [new MethodCall(new Variable('this'), 'test', [$foo, $bar]), $bar], + [new MethodCall(new Variable('this'), 'test', [$namedBar]), $namedBar], + [new MethodCall(new Variable('this'), 'test', [$namedFoo, $namedBar]), $namedBar], + [new MethodCall(new Variable('this'), 'test', [$namedBar, $namedFoo]), $namedBar], + [new MethodCall(new Variable('this'), 'test', [$namedFoo, $unpack]), null], + [new MethodCall(new Variable('this'), 'test', $callableArgs), null], + [new StaticCall(new Name('Test'), 'test', [$foo]), null], + [new StaticCall(new Name('Test'), 'test', [$namedFoo]), null], + [new StaticCall(new Name('Test'), 'test', [$foo, $bar]), $bar], + [new StaticCall(new Name('Test'), 'test', [$namedBar]), $namedBar], + [new StaticCall(new Name('Test'), 'test', [$namedFoo, $namedBar]), $namedBar], + [new StaticCall(new Name('Test'), 'test', [$namedBar, $namedFoo]), $namedBar], + [new StaticCall(new Name('Test'), 'test', [$namedFoo, $unpack]), null], + [new StaticCall(new Name('Test'), 'test', $callableArgs), null], + [new New_(new Name('test'), [$foo]), null], + [new New_(new Name('test'), [$namedFoo]), null], + [new New_(new Name('test'), [$foo, $bar]), $bar], + [new New_(new Name('test'), [$namedBar]), $namedBar], + [new New_(new Name('test'), [$namedFoo, $namedBar]), $namedBar], + [new New_(new Name('test'), [$namedBar, $namedFoo]), $namedBar], + [new New_(new Name('test'), [$namedFoo, $unpack]), null], + [new NullsafeMethodCall(new Variable('this'), 'test', [$foo]), null], + [new NullsafeMethodCall(new Variable('this'), 'test', [$namedFoo]), null], + [new NullsafeMethodCall(new Variable('this'), 'test', [$foo, $bar]), $bar], + [new NullsafeMethodCall(new Variable('this'), 'test', [$namedBar]), $namedBar], + [new NullsafeMethodCall(new Variable('this'), 'test', [$namedFoo, $namedBar]), $namedBar], + [new NullsafeMethodCall(new Variable('this'), 'test', [$namedBar, $namedFoo]), $namedBar], + [new NullsafeMethodCall(new Variable('this'), 'test', [$namedFoo, $unpack]), null], + // This is not legal code, but accepted by the parser. + [new New_(new Name('Test'), $callableArgs), null], + [new NullsafeMethodCall(new Variable('this'), 'test', $callableArgs), null], + ]; + } } From c1f6c4c8d8c6633cd22b24a533ff423b32a2df2d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 20 Jul 2025 18:27:01 +0200 Subject: [PATCH 415/428] Add lexer emulation support for pipe operator --- lib/PhpParser/Lexer/Emulative.php | 2 + .../TokenEmulator/PipeOperatorEmulator.php | 48 +++++++++++++++++++ lib/PhpParser/PhpVersion.php | 2 +- lib/PhpParser/compatibility_tokens.php | 2 + test/PhpParser/Lexer/EmulativeTest.php | 12 +++++ 5 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index c9b3b6d306..be4a41f95e 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -11,6 +11,7 @@ use PhpParser\Lexer\TokenEmulator\ExplicitOctalEmulator; use PhpParser\Lexer\TokenEmulator\MatchTokenEmulator; use PhpParser\Lexer\TokenEmulator\NullsafeTokenEmulator; +use PhpParser\Lexer\TokenEmulator\PipeOperatorEmulator; use PhpParser\Lexer\TokenEmulator\PropertyTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReadonlyFunctionTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator; @@ -47,6 +48,7 @@ public function __construct(?PhpVersion $phpVersion = null) { new ReadonlyFunctionTokenEmulator(), new PropertyTokenEmulator(), new AsymmetricVisibilityTokenEmulator(), + new PipeOperatorEmulator(), ]; // Collect emulators that are relevant for the PHP version we're running diff --git a/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php new file mode 100644 index 0000000000..948d1d12a2 --- /dev/null +++ b/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php @@ -0,0 +1,48 @@ +') !== false; + } + + public function emulate(string $code, array $tokens): array + { + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if ($token->text === '|' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '>') { + array_splice($tokens, $i, 2, [ + new Token(\T_PIPE, '|>', $token->line, $token->pos), + ]); + $c--; + } + } + return $tokens; + } + + public function reverseEmulate(string $code, array $tokens): array + { + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if ($token->id === \T_PIPE) { + array_splice($tokens, $i, 1, [ + new Token(\ord('|'), '|', $token->line, $token->pos), + new Token(\ord('>'), '>', $token->line, $token->pos + 1), + ]); + $i++; + $c++; + } + } + return $tokens; + } +} \ No newline at end of file diff --git a/lib/PhpParser/PhpVersion.php b/lib/PhpParser/PhpVersion.php index 1541ec693b..077d7cdc42 100644 --- a/lib/PhpParser/PhpVersion.php +++ b/lib/PhpParser/PhpVersion.php @@ -43,7 +43,7 @@ public static function fromComponents(int $major, int $minor): self { * if it is still under development. */ public static function getNewestSupported(): self { - return self::fromComponents(8, 4); + return self::fromComponents(8, 5); } /** diff --git a/lib/PhpParser/compatibility_tokens.php b/lib/PhpParser/compatibility_tokens.php index 13576c42fa..28eb489dd0 100644 --- a/lib/PhpParser/compatibility_tokens.php +++ b/lib/PhpParser/compatibility_tokens.php @@ -22,6 +22,8 @@ function defineCompatibilityTokens(): void { 'T_PUBLIC_SET', 'T_PROTECTED_SET', 'T_PRIVATE_SET', + // PHP 8.5 + 'T_PIPE', ]; // PHP-Parser might be used together with another library that also emulates some or all diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index 6bb52ec79e..209cbbe42f 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -424,6 +424,11 @@ public static function provideTestLexNewFeatures() { [\T_STRING, 'set'], [\ord(')'), ')'], ]], + + // PHP 8.5: Pipe operator + ['|>', [ + [\T_PIPE, '|>'] + ]], ]; } @@ -471,6 +476,13 @@ public static function provideTestTargetVersion() { [\T_STRING, 'set'], [\ord(')'), ')'] ]], + ['8.5', '|>', [ + [\T_PIPE, '|>'] + ]], + ['8.4', '|>', [ + [\ord('|'), '|'], + [\ord('>'), '>'], + ]] ]; } } From b815a165bd1c252bc8b200a65f9424e01f73c545 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 20 Jul 2025 18:43:38 +0200 Subject: [PATCH 416/428] Add support for pipe operator --- grammar/php.y | 4 + lib/PhpParser/ConstExprEvaluator.php | 3 + .../TokenEmulator/PipeOperatorEmulator.php | 11 +- lib/PhpParser/Node/Expr/BinaryOp/Pipe.php | 15 + lib/PhpParser/Parser/Php8.php | 1954 ++++++++--------- lib/PhpParser/PrettyPrinter/Standard.php | 4 + lib/PhpParser/PrettyPrinterAbstract.php | 4 +- phpstan-baseline.neon | 6 + test/PhpParser/ConstExprEvaluatorTest.php | 3 +- test/code/parser/expr/pipe.test | 75 + test/code/prettyPrinter/expr/pipe.test | 16 + 11 files changed, 1105 insertions(+), 990 deletions(-) create mode 100644 lib/PhpParser/Node/Expr/BinaryOp/Pipe.php create mode 100644 test/code/parser/expr/pipe.test create mode 100644 test/code/prettyPrinter/expr/pipe.test diff --git a/grammar/php.y b/grammar/php.y index b390525379..f82f045b60 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -26,6 +26,7 @@ %left '+' '-' '.' #endif #if PHP8 +%left T_PIPE %left '.' %left T_SL T_SR %left '+' '-' @@ -1085,6 +1086,9 @@ expr: | 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]; } +#if PHP8 + | expr T_PIPE expr { $$ = Expr\BinaryOp\Pipe[$1, $3]; } +#endif | expr T_INSTANCEOF class_name_reference { $$ = Expr\Instanceof_[$1, $3]; } | '(' expr ')' { $$ = $2; } | expr '?' expr ':' expr { $$ = Expr\Ternary[$1, $3, $5]; } diff --git a/lib/PhpParser/ConstExprEvaluator.php b/lib/PhpParser/ConstExprEvaluator.php index 73e59fc516..9526787142 100644 --- a/lib/PhpParser/ConstExprEvaluator.php +++ b/lib/PhpParser/ConstExprEvaluator.php @@ -215,6 +215,9 @@ private function evaluateBinaryOp(Expr\BinaryOp $expr) { case '<': return $this->evaluate($l) < $this->evaluate($r); case '<=': return $this->evaluate($l) <= $this->evaluate($r); case '<=>': return $this->evaluate($l) <=> $this->evaluate($r); + case '|>': + $lval = $this->evaluate($l); + return $this->evaluate($r)($lval); } throw new \Exception('Should not happen'); diff --git a/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php index 948d1d12a2..b561692395 100644 --- a/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php +++ b/lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php @@ -6,8 +6,7 @@ use PhpParser\PhpVersion; use PhpParser\Token; -class PipeOperatorEmulator extends TokenEmulator -{ +class PipeOperatorEmulator extends TokenEmulator { public function getPhpVersion(): PhpVersion { return PhpVersion::fromComponents(8, 5); } @@ -16,8 +15,7 @@ public function isEmulationNeeded(string $code): bool { return \strpos($code, '|>') !== false; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { for ($i = 0, $c = count($tokens); $i < $c; ++$i) { $token = $tokens[$i]; if ($token->text === '|' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '>') { @@ -30,8 +28,7 @@ public function emulate(string $code, array $tokens): array return $tokens; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { for ($i = 0, $c = count($tokens); $i < $c; ++$i) { $token = $tokens[$i]; if ($token->id === \T_PIPE) { @@ -45,4 +42,4 @@ public function reverseEmulate(string $code, array $tokens): array } return $tokens; } -} \ No newline at end of file +} diff --git a/lib/PhpParser/Node/Expr/BinaryOp/Pipe.php b/lib/PhpParser/Node/Expr/BinaryOp/Pipe.php new file mode 100644 index 0000000000..8dd8890bd2 --- /dev/null +++ b/lib/PhpParser/Node/Expr/BinaryOp/Pipe.php @@ -0,0 +1,15 @@ +'; + } + + public function getType(): string { + return 'Expr_BinaryOp_Pipe'; + } +} diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 52af894629..8327f110fe 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -57,123 +57,124 @@ class Php8 extends \PhpParser\ParserAbstract public const T_SPACESHIP = 292; public const T_IS_SMALLER_OR_EQUAL = 293; public const T_IS_GREATER_OR_EQUAL = 294; - public const T_SL = 295; - public const T_SR = 296; - public const T_INSTANCEOF = 297; - public const T_INC = 298; - public const T_DEC = 299; - public const T_INT_CAST = 300; - public const T_DOUBLE_CAST = 301; - public const T_STRING_CAST = 302; - public const T_ARRAY_CAST = 303; - public const T_OBJECT_CAST = 304; - public const T_BOOL_CAST = 305; - public const T_UNSET_CAST = 306; - public const T_POW = 307; - public const T_NEW = 308; - public const T_CLONE = 309; - public const T_EXIT = 310; - public const T_IF = 311; - public const T_ELSEIF = 312; - public const T_ELSE = 313; - public const T_ENDIF = 314; - public const T_LNUMBER = 315; - public const T_DNUMBER = 316; - public const T_STRING = 317; - public const T_STRING_VARNAME = 318; - public const T_VARIABLE = 319; - public const T_NUM_STRING = 320; - public const T_INLINE_HTML = 321; - public const T_ENCAPSED_AND_WHITESPACE = 322; - public const T_CONSTANT_ENCAPSED_STRING = 323; - public const T_ECHO = 324; - public const T_DO = 325; - public const T_WHILE = 326; - public const T_ENDWHILE = 327; - public const T_FOR = 328; - public const T_ENDFOR = 329; - public const T_FOREACH = 330; - public const T_ENDFOREACH = 331; - public const T_DECLARE = 332; - public const T_ENDDECLARE = 333; - public const T_AS = 334; - public const T_SWITCH = 335; - public const T_MATCH = 336; - public const T_ENDSWITCH = 337; - public const T_CASE = 338; - public const T_DEFAULT = 339; - public const T_BREAK = 340; - public const T_CONTINUE = 341; - public const T_GOTO = 342; - public const T_FUNCTION = 343; - public const T_FN = 344; - public const T_CONST = 345; - public const T_RETURN = 346; - public const T_TRY = 347; - public const T_CATCH = 348; - public const T_FINALLY = 349; - public const T_USE = 350; - public const T_INSTEADOF = 351; - public const T_GLOBAL = 352; - public const T_STATIC = 353; - public const T_ABSTRACT = 354; - public const T_FINAL = 355; - public const T_PRIVATE = 356; - public const T_PROTECTED = 357; - public const T_PUBLIC = 358; - public const T_READONLY = 359; - public const T_PUBLIC_SET = 360; - public const T_PROTECTED_SET = 361; - public const T_PRIVATE_SET = 362; - public const T_VAR = 363; - public const T_UNSET = 364; - public const T_ISSET = 365; - public const T_EMPTY = 366; - public const T_HALT_COMPILER = 367; - public const T_CLASS = 368; - public const T_TRAIT = 369; - public const T_INTERFACE = 370; - public const T_ENUM = 371; - public const T_EXTENDS = 372; - public const T_IMPLEMENTS = 373; - public const T_OBJECT_OPERATOR = 374; - public const T_NULLSAFE_OBJECT_OPERATOR = 375; - public const T_LIST = 376; - public const T_ARRAY = 377; - public const T_CALLABLE = 378; - public const T_CLASS_C = 379; - public const T_TRAIT_C = 380; - public const T_METHOD_C = 381; - public const T_FUNC_C = 382; - public const T_PROPERTY_C = 383; - public const T_LINE = 384; - public const T_FILE = 385; - public const T_START_HEREDOC = 386; - public const T_END_HEREDOC = 387; - public const T_DOLLAR_OPEN_CURLY_BRACES = 388; - public const T_CURLY_OPEN = 389; - public const T_PAAMAYIM_NEKUDOTAYIM = 390; - public const T_NAMESPACE = 391; - public const T_NS_C = 392; - public const T_DIR = 393; - public const T_NS_SEPARATOR = 394; - public const T_ELLIPSIS = 395; - public const T_NAME_FULLY_QUALIFIED = 396; - public const T_NAME_QUALIFIED = 397; - public const T_NAME_RELATIVE = 398; - public const T_ATTRIBUTE = 399; + public const T_PIPE = 295; + public const T_SL = 296; + public const T_SR = 297; + public const T_INSTANCEOF = 298; + public const T_INC = 299; + public const T_DEC = 300; + public const T_INT_CAST = 301; + public const T_DOUBLE_CAST = 302; + public const T_STRING_CAST = 303; + public const T_ARRAY_CAST = 304; + public const T_OBJECT_CAST = 305; + public const T_BOOL_CAST = 306; + public const T_UNSET_CAST = 307; + public const T_POW = 308; + public const T_NEW = 309; + public const T_CLONE = 310; + public const T_EXIT = 311; + public const T_IF = 312; + public const T_ELSEIF = 313; + public const T_ELSE = 314; + public const T_ENDIF = 315; + public const T_LNUMBER = 316; + public const T_DNUMBER = 317; + public const T_STRING = 318; + public const T_STRING_VARNAME = 319; + public const T_VARIABLE = 320; + public const T_NUM_STRING = 321; + public const T_INLINE_HTML = 322; + public const T_ENCAPSED_AND_WHITESPACE = 323; + public const T_CONSTANT_ENCAPSED_STRING = 324; + public const T_ECHO = 325; + public const T_DO = 326; + public const T_WHILE = 327; + public const T_ENDWHILE = 328; + public const T_FOR = 329; + public const T_ENDFOR = 330; + public const T_FOREACH = 331; + public const T_ENDFOREACH = 332; + public const T_DECLARE = 333; + public const T_ENDDECLARE = 334; + public const T_AS = 335; + public const T_SWITCH = 336; + public const T_MATCH = 337; + public const T_ENDSWITCH = 338; + public const T_CASE = 339; + public const T_DEFAULT = 340; + public const T_BREAK = 341; + public const T_CONTINUE = 342; + public const T_GOTO = 343; + public const T_FUNCTION = 344; + public const T_FN = 345; + public const T_CONST = 346; + public const T_RETURN = 347; + public const T_TRY = 348; + public const T_CATCH = 349; + public const T_FINALLY = 350; + public const T_USE = 351; + public const T_INSTEADOF = 352; + public const T_GLOBAL = 353; + public const T_STATIC = 354; + public const T_ABSTRACT = 355; + public const T_FINAL = 356; + public const T_PRIVATE = 357; + public const T_PROTECTED = 358; + public const T_PUBLIC = 359; + public const T_READONLY = 360; + public const T_PUBLIC_SET = 361; + public const T_PROTECTED_SET = 362; + public const T_PRIVATE_SET = 363; + public const T_VAR = 364; + public const T_UNSET = 365; + public const T_ISSET = 366; + public const T_EMPTY = 367; + public const T_HALT_COMPILER = 368; + public const T_CLASS = 369; + public const T_TRAIT = 370; + public const T_INTERFACE = 371; + public const T_ENUM = 372; + public const T_EXTENDS = 373; + public const T_IMPLEMENTS = 374; + public const T_OBJECT_OPERATOR = 375; + public const T_NULLSAFE_OBJECT_OPERATOR = 376; + public const T_LIST = 377; + public const T_ARRAY = 378; + public const T_CALLABLE = 379; + public const T_CLASS_C = 380; + public const T_TRAIT_C = 381; + public const T_METHOD_C = 382; + public const T_FUNC_C = 383; + public const T_PROPERTY_C = 384; + public const T_LINE = 385; + public const T_FILE = 386; + public const T_START_HEREDOC = 387; + public const T_END_HEREDOC = 388; + public const T_DOLLAR_OPEN_CURLY_BRACES = 389; + public const T_CURLY_OPEN = 390; + public const T_PAAMAYIM_NEKUDOTAYIM = 391; + public const T_NAMESPACE = 392; + public const T_NS_C = 393; + public const T_DIR = 394; + public const T_NS_SEPARATOR = 395; + public const T_ELLIPSIS = 396; + public const T_NAME_FULLY_QUALIFIED = 397; + public const T_NAME_QUALIFIED = 398; + public const T_NAME_RELATIVE = 399; + public const T_ATTRIBUTE = 400; - protected int $tokenToSymbolMapSize = 400; - protected int $actionTableSize = 1638; - protected int $gotoTableSize = 674; + protected int $tokenToSymbolMapSize = 401; + protected int $actionTableSize = 1528; + protected int $gotoTableSize = 715; - protected int $invalidSymbol = 172; + protected int $invalidSymbol = 173; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 448; - protected int $numNonLeafStates = 763; + protected int $YY2TBLSTATE = 450; + protected int $numNonLeafStates = 765; protected array $symbolToName = array( "EOF", @@ -224,6 +225,7 @@ class Php8 extends \PhpParser\ParserAbstract "T_IS_SMALLER_OR_EQUAL", "'>'", "T_IS_GREATER_OR_EQUAL", + "T_PIPE", "'.'", "T_SL", "T_SR", @@ -351,37 +353,37 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $tokenToSymbol = array( - 0, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 56, 170, 172, 171, 55, 172, 172, - 165, 166, 53, 51, 8, 52, 48, 54, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 31, 163, - 44, 16, 46, 30, 68, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 70, 172, 164, 36, 172, 169, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 167, 35, 168, 58, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, - 172, 172, 172, 172, 172, 172, 1, 2, 3, 4, + 0, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 57, 171, 173, 172, 56, 173, 173, + 166, 167, 54, 52, 8, 53, 49, 55, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 31, 164, + 44, 16, 46, 30, 69, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 71, 173, 165, 36, 173, 170, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 168, 35, 169, 59, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, - 41, 42, 43, 45, 47, 49, 50, 57, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, + 41, 42, 43, 45, 47, 48, 50, 51, 58, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, @@ -390,623 +392,606 @@ class Php8 extends \PhpParser\ParserAbstract 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162 + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163 ); protected array $action = array( - 130, 131, 132, 578, 133, 134, 966, 775, 776, 777, - 135, 41, 859, 498, 574, 1397,-32766,-32766,-32766, 0, - 850, 1154, 1155, 1156, 1150, 1149, 1148, 1157, 1151, 1152, - 1153,-32766,-32766,-32766, -340, 769, 768,-32766, 861,-32766, - -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 1017,-32766,-32766,-32766, 778, 1154, 1155, 1156, 1150, - 1149, 1148, 1157, 1151, 1152, 1153, 391, 392, 451, 267, - 53, 394, 782, 783, 784, 785, 436, 855, 437, 1334, - -581, 39, 250, 51, 296, 839, 786, 787, 788, 789, - 790, 791, 792, 793, 794, 795, 815, 579, 816, 817, - 818, 819, 807, 808, 349, 350, 810, 811, 796, 797, - 798, 800, 801, 802, 364, 842, 843, 844, 845, 846, - 580, 4, 301, -195, 803, 804, 581, 582, -194, 827, - 825, 826, 838, 822, 823, 1057, 1322, 583, 584, 821, - 585, 586, 587, 588, 329, 589, 590, -581, -581, 499, - 302, 303, 824, 591, 592, 5, 136, 856, 130, 131, - 132, 578, 133, 134, 1093, 775, 776, 777, 135, 41, - -32766, 29, 745, 1050, 1049, 1048, 1054, 1051, 1052, 1053, - -32766,-32766,-32766, 1018, 108, 109, 110, 111, 112, 887, - 279, 888, -340, 769, 768, 1066, 945,-32766,-32766,-32766, - 860,-32766, 113,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32766, 484, 485, 778,-32766,-32766,-32766, 859,-32766, 295, - -32766,-32766,-32766,-32766,-32766, 38, 735, 267, 53, 394, - 782, 783, 784, 785,-32766,-32766, 437,-32766,-32766,-32766, - -32766, 240, 858, 839, 786, 787, 788, 789, 790, 791, - 792, 793, 794, 795, 815, 579, 816, 817, 818, 819, - 807, 808, 349, 350, 810, 811, 796, 797, 798, 800, - 801, 802, 364, 842, 843, 844, 845, 846, 580, 935, - 27, -195, 803, 804, 581, 582, -194, 827, 825, 826, - 838, 822, 823, 1295, 137, 583, 584, 821, 585, 586, - 587, 588, 141, 589, 590, 1143, 328,-32766,-32766,-32766, - 824, 591, 592, -578, 136, 632, 130, 131, 132, 578, - 133, 134, 1090, 775, 776, 777, 135, 41,-32766, 1293, - -32766,-32766,-32766,-32767,-32767,-32767,-32767, 105, 106, 107, - -32766,-32766,-32766, 1407, 391, 392, 1408, 146, 164, 1089, - 253, 769, 768, 1065, 436, 945, 1302, -382, 947, -382, - 3,-32766, 730,-32766,-32766,-32766,-32766,-32766, 945, 945, - 129, 778, 1297, 1296, 1298,-32766,-32766,-32766, 290, 296, - -578, -578, 393, 392, 1378, 267, 53, 394, 782, 783, - 784, 785, 436, -275, 437, 312, -578, 626, 736, 737, - 301, 839, 786, 787, 788, 789, 790, 791, 792, 793, - 794, 795, 815, 579, 816, 817, 818, 819, 807, 808, - 349, 350, 810, 811, 796, 797, 798, 800, 801, 802, - 364, 842, 843, 844, 845, 846, 580, 859, 935, -575, - 803, 804, 581, 582, 437, 827, 825, 826, 838, 822, - 823, 935, 935, 583, 584, 821, 585, 586, 587, 588, - 316, 589, 590, 850, 1063,-32766, 325, 160, 824, 591, - 592, 852, 149, 52, 130, 131, 132, 578, 133, 134, - 1095, 775, 776, 777, 135, 41, 970, 969, 345, 1066, - 1066, 986, 987, 239, 850,-32766, 988, 1170, 769, 768, - 346, 750,-32766, 1363, 1382, 982, -575, -575,-32766, 769, - 768, 1381, 945, 286, 295, 106, 107, 947, 319,-32766, - 78, 730, -575, 1297, 1296, 1298, 328, 1066, 1063, 778, - 947, 1003, 1129, 1066, 730, 730, 968, 473, 474, 475, - 304, 305, 740, 267, 53, 394, 782, 783, 784, 785, - 142, 854, 437, 1066, 328, -85, 384, 295, 732, 839, - 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, - 815, 579, 816, 817, 818, 819, 807, 808, 349, 350, - 810, 811, 796, 797, 798, 800, 801, 802, 364, 842, - 843, 844, 845, 846, 580, 935,-32766,-32766, 803, 804, - 581, 582, 379, 827, 825, 826, 838, 822, 823, 675, - 24, 583, 584, 821, 585, 586, 587, 588, 760, 589, - 590, -85, 86, 87, 88, 1128, 824, 591, 592, 758, - 149, 799, 770, 771, 772, 773, 774, 151, 775, 776, - 777, 812, 813, 40, 385, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 85, - 279, 694, 695, 328, 947, 403, 401, 10, 730, 887, - 455, 888, 113, -617, 456, -617, 778, 150, 419, 389, - 390, 395, 396, 1127, 457, 666, 667, 458, 865, 152, - 779, 780, 781, 782, 783, 784, 785, 154, 155, 848, - 156, -579, 158, 36, -87, -84, 839, 786, 787, 788, - 789, 790, 791, 792, 793, 794, 795, 815, 837, 816, - 817, 818, 819, 807, 808, 809, 836, 810, 811, 796, - 797, 798, 800, 801, 802, 841, 842, 843, 844, 845, - 846, 847, -78, -58, -57, 803, 804, 805, 806, 127, - 827, 825, 826, 838, 822, 823, 128, 138, 814, 820, - 821, 828, 829, 831, 830, 139, 832, 833, -579, -579, - 145, 159, 161, 824, 835, 834, 54, 55, 56, 530, - 57, 58, 162, -110, -579, 163, 59, 60, -110, 61, - -110, -577, -78, -73, 1063, 308, -585, 291, -110, -110, - -110, -110, -110, -110, -110, -110, -110, -110, -110, -72, - -71, -70, -69, -68, -67, -66, -65, -46, -18, 1066, - 143, 290, 279, 278, 287, 62, 63, 945, 746, 749, - 64, -308, 65, 247, 248, 66, 67, 68, 69, 70, - 71, 72, 73, 286, 31, 269, 47, 453, 531, 944, - -356, 148, 1328, 1329, 532, 962, 859, 747, -577, -577, - 1326, 45, 23, 533, -304, 534, 945, 535, 284, 536, - -576, 708, 537, 538, -577, 285, 288, 48, 49, 459, - 388, 387, 289, 50, 539, 334, -584, 704, 292, 377, - 344, 297, 1302, 298, 113, 850, 1288, 147, 859, 719, - 596, 541, 542, 543, 1161, 721, 1409, 709, 697,-32766, - 935, 676, 682, 545, 546, 664, 1314, 1315, 1316, 1317, - 1319, 1311, 1312, 300, 681, 983, 307, 13, 481, 1318, - 1313, 710, 711, 1297, 1296, 1298, 301, -576, -576, 74, - -154, -154, -154, 323, 324, 328, 509,-32766, 698, 935, - 1297, 1296, 1298, -576, 1333, -154, 286, -154, 309, -154, - 602, -154, -541, 630, 858, -583, 964, 769, 768, 306, - 315, 386, 328, 859, 0, 0, 0, 0, 0, 0, - 0, 0, 986, 987, 0, -531, 1335, 540, 0, 947, - 11, 30, 383, 730, 0, 921, 982, -110, -110, -110, - 31, 270, 0, 0, 301, 0, 43, 0, -110, -110, - 1323, -278, 859, -110, 0, 44, 1326, 870, 755, 0, - 756, 878, -110, 926, 1027, 1004, 1011, 1001, 947, 1012, - 924,-32766, 730, -154, 999, 1132, 35, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 1135, 1136, 1288, 301, 769, 768, 78, 1133, 1172, 1134, - 1140, 418, 328, -4, 945, 1350, 1367, 1400, 669, 545, - 546, -611, 1314, 1315, 1316, 1317, 1319, 1311, 1312, 1204, - 1206, -610, -609, -585, -584, 1318, 1313, 769, 768, -583, - -575,-32766, -582, -525, 1, 76, 32, 1295, 33, 42, - 324, 328, 46, 75,-32766,-32766,-32766, 79,-32766, 80, - -32766, 81,-32766, 82, 83,-32766, 84, 144, 153, 157, - -32766,-32766,-32766, 245,-32766, 330,-32766,-32766, 365, 366, - 1295, 367,-32766, 433, 31, 269, 368,-32766,-32766,-32766, - 369,-32766, 370,-32766,-32766,-32766, 859, 935,-32766, 371, - 1326, 372, 373,-32766,-32766,-32766, 374, -575, -575,-32766, - -32766, 375, 378, 450, 573,-32766, 433, 376, 37, 386, - -276, 449, -275, -575, 16, 77, 299,-32766, 17, 18, - 986, 987, 19, 422, 21, 540, 1288, 31, 270, 359, - 417, 500, 501, 544, 982, -110, -110, -110, 508, 859, - 511, 512, 513, 1326, 546, 514, 1314, 1315, 1316, 1317, - 1319, 1311, 1312, 518, 519, 520, 1327, 14, 527, 1318, - 1313, 607, 714, 1096, 1092, 1244, 947, 1324, 1094, 76, - 730, -4, 1091, 1072, 324, 328, -50, 1283, 1068, 1288, - -280, -102, 15, 20, 25, 319, 416, 621, 627, 655, - 720, 1248, 1301, 1245, 1379, 0, 322, 546, 380, 1314, - 1315, 1316, 1317, 1319, 1311, 1312, 731, 734, 738, 140, - 739, 741, 1318, 1313, 742, 743, 744, 748, 760,-32766, - 733, 761, 76, 752, 922, 1295, 1404, 324, 328, 1406, - 881, 880,-32766,-32766,-32766, 976,-32766, 1019,-32766, 1405, - -32766, 975, 973,-32766, 974, 977, 1276, 955,-32766,-32766, - -32766, 965,-32766, 953,-32766,-32766, 1171, 1167, 1295, 1121, - -32766, 433, 1009, 1010, 653,-32766,-32766,-32766, 1403,-32766, - 1361,-32766,-32766,-32766, 1376, 0,-32766, 1261, 0, 0, - 0,-32766,-32766,-32766, 945,-32766, 0,-32766,-32766, 0, - 0, 1295, 0,-32766, 433, 0, 0, 0,-32766,-32766, - -32766, 0,-32766, 0,-32766,-32766,-32766, 945, 0,-32766, - 0, 0, 0, 0,-32766,-32766,-32766, 0,-32766, 0, - -32766,-32766, 0, 0, 1295, 0,-32766, 433, 0, 0, - 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766,-32766, - 0, 0,-32766, 0, 0, 0, 504,-32766,-32766,-32766, - 0,-32766, 0,-32766,-32766, 0, 0, 1295, 609,-32766, - 433, 0, 0, 0,-32766,-32766,-32766, 935,-32766, 0, - -32766,-32766,-32766, 0, 0,-32766, 2, 0, 0, 0, - -32766,-32766,-32766, -253, -253, -253,-32766,-32766, 0, 386, - 935, 0,-32766, 433, 0, 0, 0, 1302, 0, 0, - 986, 987, 0, 0,-32766, 540, -252, -252, -252, 0, - 0, 0, 386, 921, 982, -110, -110, -110, 0, 0, - 0, 0, 0, 986, 987, 0, 0, -16, 540, 0, - 0, 0, 0, 0, 0, 0, 921, 982, -110, -110, - -110,-32766, 0, 0, 0, 0, 947, 1295, 0, 0, - 730, -253, 0, 0,-32766,-32766,-32766, 0,-32766, 0, - -32766, 0,-32766, 0, 0,-32766, 0, 0, 0, 947, - -32766,-32766,-32766, 730, -252, 0,-32766,-32766, 859, 0, - 0, 0,-32766, 433, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,-32766, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -110, -110, 0, 0, 0, -110, 0, - 0, 0, 0, 0, 0, 0, 0, -110, 0, 0, - 0, 0, 0, 0, 0, 0,-32766, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 301, 0, - 0, 78, 0, 0, 0, 0, 0, 328 + 131, 132, 133, 580, 134, 135, 0, 777, 778, 779, + 136, 41, 861,-32766, 863, 1400, -582, 972, 971, 1298, + 576, 393, 394, 453, 1059, 852,-32766,-32766,-32766, 4, + -32766, 438,-32766, 968,-32766, 771, 770,-32766,-32766,-32766, + -32766, 506,-32766,-32766,-32766, 244, 988, 989,-32766,-32766, + -382, 990, -382, -340,-32766, 435, 780, 1381, 5,-32766, + 984,-32766,-32766,-32766,-32766,-32766,-32766, 970, 29, 298, + 268, 53, 396, 784, 785, 786, 787, 303, -195, 439, + 38, 39, 252, -582, -582, 1337, 841, 788, 789, 790, + 791, 792, 793, 794, 795, 796, 797, 817, 581, 818, + 819, 820, 821, 809, 810, 351, 352, 812, 813, 798, + 799, 800, 802, 803, 804, 366, 844, 845, 846, 847, + 848, 582,-32766,-32766,-32766, 805, 806, 583, 584, 138, + 829, 827, 828, 840, 824, 825, -194, 852, 585, 586, + 823, 587, 588, 589, 590, 3, 591, 592, 393, 394, + -32766,-32766,-32766, 826, 593, 594,-32766, 137, 438, 131, + 132, 133, 580, 134, 135, 1095, 777, 778, 779, 136, + 41,-32766,-32766,-32766,-32766,-32766,-32766, 862, 1298, 611, + 1366, 1068, 106, 107, 108,-32766,-32766,-32766, 165,-32766, + 889,-32766, 890,-32766, 771, 770,-32766, 161, -275, 1305, + 747,-32766,-32766,-32766, 303, 297, 500,-32766,-32766, 475, + 476, 477, -340,-32766, 435, 780,-32767,-32767,-32767,-32767, + 105, 106, 107, 108, 143,-32766, 395, 394, 330, 268, + 53, 396, 784, 785, 786, 787, 438, -195, 439,-32766, + -32766,-32766, 147, 860, 130, 841, 788, 789, 790, 791, + 792, 793, 794, 795, 796, 797, 817, 581, 818, 819, + 820, 821, 809, 810, 351, 352, 812, 813, 798, 799, + 800, 802, 803, 804, 366, 844, 845, 846, 847, 848, + 582, 861, 255, 857, 805, 806, 583, 584, 854, 829, + 827, 828, 840, 824, 825, -194, 314, 585, 586, 823, + 587, 588, 589, 590, 321, 591, 592, 1019,-32766,-32766, + -32766,-32766, 826, 593, 594, -85, 137,-32766, 131, 132, + 133, 580, 134, 135, 1092, 777, 778, 779, 136, 41, + -32766,-32766,-32766,-32766,-32766, 51, 152, 1298, 1172,-32766, + 27,-32766, 752, 501,-32766,-32766,-32766, 85,-32766, 762, + -32766, 330,-32766, 771, 770,-32766, 405, 628, 10, 318, + -32766,-32766,-32766, 858, 78, 1145,-32766,-32766, 856, 327, + 330,-32766,-32766, 435, 780, 734, 1065, 109, 110, 111, + 112, 113, -85, 281,-32766, 889, 347, 890, 268, 53, + 396, 784, 785, 786, 787, 114, 1068, 439, -618, 331, + -618, 1068, 304, 305, 841, 788, 789, 790, 791, 792, + 793, 794, 795, 796, 797, 817, 581, 818, 819, 820, + 821, 809, 810, 351, 352, 812, 813, 798, 799, 800, + 802, 803, 804, 366, 844, 845, 846, 847, 848, 582, + 1020, 348, -580, 805, 806, 583, 584, 381, 829, 827, + 828, 840, 824, 825, 243, 387, 585, 586, 823, 587, + 588, 589, 590, 403, 591, 592, 486, 487,-32766,-32766, + -32766, 826, 593, 594, 457, 150, -579, 131, 132, 133, + 580, 134, 135, 1097, 777, 778, 779, 136, 41,-32766, + 458,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, + -32767,-32767,-32767,-32766,-32766,-32766, 459, 1130, 460, -580, + -580, 760, 771, 770, 1156, 1157, 1158, 1152, 1151, 1150, + 1159, 1153, 1154, 1155,-32766, -580,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 780,-32766,-32766,-32766, -586, 1385,-32766, + -32766,-32766, 867, -579, -579, 1384, -87, 268, 53, 396, + 784, 785, 786, 787, 153,-32766, 439,-32766,-32766, -579, + -32766,-32766,-32766, 841, 788, 789, 790, 791, 792, 793, + 794, 795, 796, 797, 817, 581, 818, 819, 820, 821, + 809, 810, 351, 352, 812, 813, 798, 799, 800, 802, + 803, 804, 366, 844, 845, 846, 847, 848, 582, 771, + 770, 155, 805, 806, 583, 584, 156, 829, 827, 828, + 840, 824, 825, 439, 157, 585, 586, 823, 587, 588, + 589, 590, 159, 591, 592, 36, 86, 87, 88, -78, + 826, 593, 594, -84, 150, 801, 772, 773, 774, 775, + 776, 852, 777, 778, 779, 814, 815, 40, -58, 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, -57, 281, 128, 1156, 1157, 1158, + 1152, 1151, 1150, 1159, 1153, 1154, 1155, 114, 129, 634, + 139, 780, 1300, 1299, 1301,-32766,-32766, 1129, 107, 108, + 140, 1131, 677, 24, 1325, 781, 782, 783, 784, 785, + 786, 787, 151, 421, 850, 146, -578, 1410, 696, 697, + 1411, 841, 788, 789, 790, 791, 792, 793, 794, 795, + 796, 797, 817, 839, 818, 819, 820, 821, 809, 810, + 811, 838, 812, 813, 798, 799, 800, 802, 803, 804, + 843, 844, 845, 846, 847, 848, 849, 391, 392, 160, + 805, 806, 807, 808, 1298, 829, 827, 828, 840, 824, + 825, 397, 398, 816, 822, 823, 830, 831, 833, 832, + 162, 834, 835, -578, -578, 163, 861, 164, 826, 837, + 836, 54, 55, 56, 532, 57, 58, -78, -110, -578, + 1296, 59, 60, -110, 61, -110, 947, 947, -73, -72, + 310, -585, -71, -110, -110, -110, -110, -110, -110, -110, + -110, -110, -110, -110, 1067, 947, 668, 669, -70, -69, + -68, -67, -66, -65, -46, -18, 737, 738, 144, 279, + 289, 62, 63, 1300, 1299, 1301, 64, 748, 65, 249, + 250, 66, 67, 68, 69, 70, 71, 72, 73, -577, + 31, 274, 47, 455, 533, -356, 751,-32766, 1331, 1332, + 534, 142, 861, 946, 1091, 330, 1329, 45, 23, 535, + 149, 536, 1065, 537, 293, 538, -308, 947, 539, 540, + 937, 937, 1068, 48, 49, 461, 390, 389, -304, 50, + 541, 286, 287, 292, 298, 379, 346, 1068, 294, 937, + 290, 291, 1291, 336, 299, 281, 297, 543, 544, 545, + 300, 148, 771, 770, 114, 964, -577, -577, 947, 547, + 548, 288, 1317, 1318, 1319, 1320, 1322, 1314, 1315, 302, + 706, 852, -577, 1412, 861, 1321, 1316, 1163, 598, 1300, + 1299, 1301, 303, 721, -584, 74, 31, 275, 739, 325, + 326, 330, -154, -154, -154,-32766, 683, 666, 861, 949, + 949, 937, 1329, 732, 732, 678, 699, -154, 13, -154, + 483, -154, 723, -154, 985, 311, 511,-32766, 949, 1336, + 1065,-32766, 732, 388, 1052, 1051, 1050, 1056, 1053, 1054, + 1055, 684, 700, 604, 988, 989, 1338, 966, 1291, 542, + -576, -278, 937, 1264, 632, 1068, 1068, 923, 984, -110, + -110, -110, -542, 0, 0, 547, 548, 308, 1317, 1318, + 1319, 1320, 1322, 1314, 1315, 317, 1330, 771, 770, 288, + 297, 1321, 1316, 309, -532, 0, 11, 52, 30, 385, + 949, 76, 0, 860, 732, -154, 326, 330, 35, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 303, 1326, 43,-32766, 44, -576, -576, -4, + 947, 1298, 771, 770, 757, 758, 880, 928,-32766,-32766, + -32766, 1005,-32766, -576,-32766, 732,-32766, 1029, 1006,-32766, + 1013, 1003, 1206, 1208,-32766,-32766,-32766, 1014, 926, 1001, + -32766,-32766, 1134, -576, 306, 307,-32766, 435, 1137, 1138, + -32766, 1135, 1174, 1136, 1142, 420, 1298, 872,-32766, 1353, + 386, 31, 274,-32766,-32766,-32766, 1370,-32766, 1403,-32766, + 671,-32766, 37, 861,-32766, -612, 947, 1329, -611,-32766, + -32766,-32766, -610, -586, -585,-32766,-32766, 947, -584, 77, + -583,-32766, 435, -526, 937, 1, 324, 32, 33, 42, + 46, 75, 79,-32766, 80, 81, 742, 82, 83, 84, + -576, -576, 145, 1291, 154, 158, 388, 749, 451, 247, + 332, 367, -50, 301, 368, 369, -576, 988, 989, 370, + 371, 548, 542, 1317, 1318, 1319, 1320, 1322, 1314, 1315, + 546, 984, -110, -110, -110, 372, 1321, 1316, 373, 374, + 375, 31, 275, 376, 377, 380, 76, 452, 575, 378, + 937, 326, 330, 861, 14, -276,-32766, 1329, -275, 16, + 17, 937, 1298, 949, 18, 19, 330, 732, -4,-32766, + -32766,-32766, 21,-32766, 361,-32766, 419,-32766, 502, 503, + -32766, 510, 513, 514, 515,-32766,-32766,-32766, 141, 516, + 520,-32766,-32766, 1291, 521, 522, 529,-32766, 435, 609, + 716, 1098, 1094, 947, 1247, 1327, 1096, 1093, 1074,-32766, + 1286, 548, 1070, 1317, 1318, 1319, 1320, 1322, 1314, 1315, + -280, -102, 15, 20, 25, 321, 1321, 1316, 418, 949, + 623, 629,-32766, 732, 657, 722, 76, 382, 1298, 1251, + 949, 326, 330, 947, 732,-32766,-32766,-32766, 733,-32766, + 1305,-32766, 1304,-32766, 1248, 1382,-32766, 736, 740, 741, + 743,-32766,-32766,-32766, 744,-32766, 745,-32766,-32766, 1305, + 746, 1298, 750,-32766, 435, 762, 735, 763,-32766,-32766, + -32766, 424,-32766, 754,-32766,-32766,-32766, 937, 924,-32766, + 1407, 1409, 883, 882,-32766,-32766,-32766, 978, 1021, -16, + -32766,-32766, 1408, -253, -253, -253,-32766, 435, 977, 388, + 975, 292, 976, 979, 1279, 957, 967, 955,-32766, 1173, + 988, 989, 1169, 1123, 1011, 542, 0, 937, 1012, 655, + 1406, 1364, 861, 923, 984, -110, -110, -110, 1379, 0, + 0, 0, 0, -252, -252, -252, 0, 0, 0, 388, + 0, 861, 0, 0, 0, 0, 2, 0, 0, 0, + 988, 989, 710, 0, 0, 542, 949, -110, -110, 0, + 732, -253, -110, 923, 984, -110, -110, -110, 0, 0, + 0, -110, 0, 0, 0, 0, -110, -110, 0, 0, + -32766, -110, 0, 0, 0, 0, 0, 0, 711, 0, + -110, 0, 0, 0, 0, 0, 949, 0, 0,-32766, + 732, -252, 303, 0, 0, 78, 0, 0, 0, 0, + 0, 330, 712, 713, 0, 0, 0, 0, 0, 0, + 0, 303, 0, 0, 78, 0, 0, 0, 0, 0, + 330, 1300, 1299, 1301, 0, 0, 0, 288 ); protected array $actionCheck = array( - 2, 3, 4, 5, 6, 7, 1, 9, 10, 11, - 12, 13, 82, 31, 85, 85, 9, 10, 11, 0, - 80, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 9, 10, 11, 8, 37, 38, 30, 1, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 31, 30, 9, 10, 57, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 106, 107, 108, 71, - 72, 73, 74, 75, 76, 77, 116, 80, 80, 150, - 70, 151, 152, 70, 30, 87, 88, 89, 90, 91, + 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, + 12, 13, 83, 75, 1, 86, 71, 73, 74, 81, + 86, 107, 108, 109, 1, 81, 88, 89, 90, 8, + 92, 117, 94, 1, 96, 37, 38, 99, 9, 10, + 11, 103, 104, 105, 106, 14, 118, 119, 110, 111, + 107, 123, 109, 8, 116, 117, 58, 1, 8, 30, + 132, 32, 33, 34, 35, 36, 128, 123, 8, 30, + 72, 73, 74, 75, 76, 77, 78, 163, 8, 81, + 8, 152, 153, 138, 139, 151, 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, 8, 162, 8, 126, 127, 128, 129, 8, 131, - 132, 133, 134, 135, 136, 1, 1, 139, 140, 141, - 142, 143, 144, 145, 70, 147, 148, 137, 138, 167, - 137, 138, 154, 155, 156, 8, 158, 160, 2, 3, - 4, 5, 6, 7, 166, 9, 10, 11, 12, 13, - 116, 8, 167, 119, 120, 121, 122, 123, 124, 125, - 9, 10, 11, 163, 51, 52, 53, 54, 55, 106, - 57, 108, 166, 37, 38, 141, 1, 9, 10, 11, - 163, 30, 69, 32, 33, 34, 35, 36, 37, 38, - 116, 137, 138, 57, 9, 10, 11, 82, 30, 165, - 32, 33, 34, 35, 36, 8, 31, 71, 72, 73, - 74, 75, 76, 77, 140, 30, 80, 32, 33, 34, - 35, 14, 159, 87, 88, 89, 90, 91, 92, 93, + 122, 123, 9, 10, 11, 127, 128, 129, 130, 8, + 132, 133, 134, 135, 136, 137, 8, 81, 140, 141, + 142, 143, 144, 145, 146, 8, 148, 149, 107, 108, + 9, 10, 11, 155, 156, 157, 117, 159, 117, 2, + 3, 4, 5, 6, 7, 167, 9, 10, 11, 12, + 13, 30, 75, 32, 33, 34, 35, 164, 81, 82, + 1, 142, 49, 50, 51, 88, 89, 90, 14, 92, + 107, 94, 109, 96, 37, 38, 99, 16, 167, 1, + 168, 104, 105, 106, 163, 166, 31, 110, 111, 133, + 134, 135, 167, 116, 117, 58, 44, 45, 46, 47, + 48, 49, 50, 51, 168, 128, 107, 108, 172, 72, + 73, 74, 75, 76, 77, 78, 117, 167, 81, 9, + 10, 11, 8, 160, 14, 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, 83, 8, 81, 127, 128, 129, 130, 81, 132, + 133, 134, 135, 136, 137, 167, 8, 140, 141, 142, + 143, 144, 145, 146, 167, 148, 149, 31, 9, 9, + 10, 11, 155, 156, 157, 31, 159, 117, 2, 3, + 4, 5, 6, 7, 167, 9, 10, 11, 12, 13, + 30, 75, 32, 33, 34, 71, 14, 81, 164, 141, + 102, 141, 168, 168, 88, 89, 90, 168, 92, 168, + 94, 172, 96, 37, 38, 99, 107, 1, 109, 8, + 104, 105, 106, 161, 166, 127, 110, 111, 161, 8, + 172, 117, 116, 117, 58, 168, 117, 52, 53, 54, + 55, 56, 98, 58, 128, 107, 8, 109, 72, 73, + 74, 75, 76, 77, 78, 70, 142, 81, 165, 71, + 167, 142, 138, 139, 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, 84, - 101, 166, 126, 127, 128, 129, 166, 131, 132, 133, - 134, 135, 136, 80, 8, 139, 140, 141, 142, 143, - 144, 145, 167, 147, 148, 126, 171, 9, 10, 11, - 154, 155, 156, 70, 158, 52, 2, 3, 4, 5, - 6, 7, 166, 9, 10, 11, 12, 13, 30, 116, - 32, 33, 34, 44, 45, 46, 47, 48, 49, 50, - 9, 10, 11, 80, 106, 107, 83, 8, 14, 1, - 8, 37, 38, 140, 116, 1, 1, 106, 163, 108, - 8, 30, 167, 32, 33, 9, 10, 11, 1, 1, - 14, 57, 159, 160, 161, 9, 10, 11, 30, 30, - 137, 138, 106, 107, 1, 71, 72, 73, 74, 75, - 76, 77, 116, 166, 80, 8, 153, 1, 31, 31, - 162, 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, 82, 84, 70, - 126, 127, 128, 129, 80, 131, 132, 133, 134, 135, - 136, 84, 84, 139, 140, 141, 142, 143, 144, 145, - 8, 147, 148, 80, 116, 116, 8, 16, 154, 155, - 156, 80, 158, 70, 2, 3, 4, 5, 6, 7, - 166, 9, 10, 11, 12, 13, 72, 73, 8, 141, - 141, 117, 118, 97, 80, 140, 122, 163, 37, 38, - 8, 167, 116, 1, 1, 131, 137, 138, 116, 37, - 38, 8, 1, 165, 165, 49, 50, 163, 166, 9, - 165, 167, 153, 159, 160, 161, 171, 141, 116, 57, - 163, 163, 168, 141, 167, 167, 122, 132, 133, 134, - 137, 138, 31, 71, 72, 73, 74, 75, 76, 77, - 167, 160, 80, 141, 171, 31, 153, 165, 167, 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, 84, 51, 52, 126, 127, - 128, 129, 8, 131, 132, 133, 134, 135, 136, 75, - 76, 139, 140, 141, 142, 143, 144, 145, 167, 147, - 148, 97, 9, 10, 11, 163, 154, 155, 156, 167, - 158, 2, 3, 4, 5, 6, 7, 14, 9, 10, - 11, 12, 13, 30, 8, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 167, - 57, 75, 76, 171, 163, 106, 8, 108, 167, 106, - 8, 108, 69, 164, 8, 166, 57, 101, 102, 106, - 107, 106, 107, 1, 8, 111, 112, 8, 8, 14, - 71, 72, 73, 74, 75, 76, 77, 14, 14, 80, - 14, 70, 14, 14, 31, 31, 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, 16, 16, 16, 126, 127, 128, 129, 16, - 131, 132, 133, 134, 135, 136, 16, 16, 139, 140, - 141, 142, 143, 144, 145, 16, 147, 148, 137, 138, - 16, 16, 16, 154, 155, 156, 2, 3, 4, 5, - 6, 7, 16, 101, 153, 16, 12, 13, 106, 15, - 108, 70, 31, 31, 116, 113, 165, 37, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 141, - 31, 30, 57, 31, 31, 51, 52, 1, 31, 31, - 56, 35, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 165, 70, 71, 72, 73, 74, 31, - 168, 31, 78, 79, 80, 38, 82, 31, 137, 138, - 86, 87, 88, 89, 35, 91, 1, 93, 35, 95, - 70, 80, 98, 99, 153, 35, 35, 103, 104, 105, - 106, 107, 35, 109, 110, 35, 165, 77, 37, 115, - 116, 37, 1, 37, 69, 80, 122, 70, 82, 80, - 89, 127, 128, 129, 82, 92, 83, 116, 94, 85, - 84, 90, 100, 139, 140, 113, 142, 143, 144, 145, - 146, 147, 148, 149, 96, 131, 136, 97, 97, 155, - 156, 140, 141, 159, 160, 161, 162, 137, 138, 165, - 75, 76, 77, 169, 170, 171, 97, 140, 100, 84, - 159, 160, 161, 153, 150, 90, 165, 92, 114, 94, - 157, 96, 153, 157, 159, 165, 158, 37, 38, 135, - 135, 106, 171, 82, -1, -1, -1, -1, -1, -1, - -1, -1, 117, 118, -1, 153, 150, 122, -1, 163, - 153, 153, 153, 167, -1, 130, 131, 132, 133, 134, - 70, 71, -1, -1, 162, -1, 163, -1, 117, 118, - 164, 166, 82, 122, -1, 163, 86, 164, 163, -1, - 163, 163, 131, 163, 163, 163, 163, 163, 163, 163, - 163, 140, 167, 168, 163, 163, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 163, 163, 122, 162, 37, 38, 165, 163, 163, 163, - 163, 168, 171, 0, 1, 164, 164, 164, 164, 139, - 140, 165, 142, 143, 144, 145, 146, 147, 148, 59, - 60, 165, 165, 165, 165, 155, 156, 37, 38, 165, - 70, 74, 165, 165, 165, 165, 165, 80, 165, 165, - 170, 171, 165, 165, 87, 88, 89, 165, 91, 165, - 93, 165, 95, 165, 165, 98, 165, 165, 165, 165, - 103, 104, 105, 165, 74, 165, 109, 110, 165, 165, - 80, 165, 115, 116, 70, 71, 165, 87, 88, 89, - 165, 91, 165, 93, 127, 95, 82, 84, 98, 165, - 86, 165, 165, 103, 104, 105, 165, 137, 138, 109, - 110, 165, 165, 165, 165, 115, 116, 165, 167, 106, - 166, 108, 166, 153, 166, 158, 113, 127, 166, 166, - 117, 118, 166, 168, 166, 122, 122, 70, 71, 166, - 166, 166, 166, 130, 131, 132, 133, 134, 166, 82, - 166, 166, 166, 86, 140, 166, 142, 143, 144, 145, - 146, 147, 148, 166, 166, 166, 170, 154, 166, 155, - 156, 166, 166, 166, 166, 166, 163, 166, 166, 165, - 167, 168, 166, 166, 170, 171, 31, 166, 166, 122, - 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 166, 166, -1, 167, 140, 167, 142, - 143, 144, 145, 146, 147, 148, 167, 167, 167, 31, - 167, 167, 155, 156, 167, 167, 167, 167, 167, 74, - 167, 167, 165, 168, 168, 80, 168, 170, 171, 168, - 168, 168, 87, 88, 89, 168, 91, 168, 93, 168, - 95, 168, 168, 98, 168, 168, 168, 168, 103, 104, - 105, 168, 74, 168, 109, 110, 168, 168, 80, 168, - 115, 116, 168, 168, 168, 87, 88, 89, 168, 91, - 168, 93, 127, 95, 168, -1, 98, 169, -1, -1, - -1, 103, 104, 105, 1, 74, -1, 109, 110, -1, - -1, 80, -1, 115, 116, -1, -1, -1, 87, 88, - 89, -1, 91, -1, 93, 127, 95, 1, -1, 98, - -1, -1, -1, -1, 103, 104, 105, -1, 74, -1, - 109, 110, -1, -1, 80, -1, 115, 116, -1, -1, - -1, 87, 88, 89, -1, 91, -1, 93, 127, 95, - -1, -1, 98, -1, -1, -1, 102, 103, 104, 105, - -1, 74, -1, 109, 110, -1, -1, 80, 81, 115, - 116, -1, -1, -1, 87, 88, 89, 84, 91, -1, - 93, 127, 95, -1, -1, 98, 165, -1, -1, -1, - 103, 104, 105, 100, 101, 102, 109, 110, -1, 106, - 84, -1, 115, 116, -1, -1, -1, 1, -1, -1, - 117, 118, -1, -1, 127, 122, 100, 101, 102, -1, - -1, -1, 106, 130, 131, 132, 133, 134, -1, -1, - -1, -1, -1, 117, 118, -1, -1, 31, 122, -1, - -1, -1, -1, -1, -1, -1, 130, 131, 132, 133, - 134, 74, -1, -1, -1, -1, 163, 80, -1, -1, - 167, 168, -1, -1, 87, 88, 89, -1, 91, -1, - 93, -1, 95, -1, -1, 98, -1, -1, -1, 163, - 103, 104, 105, 167, 168, -1, 109, 110, 82, -1, - -1, -1, 115, 116, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 127, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 117, 118, -1, -1, -1, 122, -1, - -1, -1, -1, -1, -1, -1, -1, 131, -1, -1, - -1, -1, -1, -1, -1, -1, 140, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 162, -1, - -1, 165, -1, -1, -1, -1, -1, 171 + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 164, 8, 71, 127, 128, 129, 130, 8, 132, 133, + 134, 135, 136, 137, 98, 8, 140, 141, 142, 143, + 144, 145, 146, 8, 148, 149, 138, 139, 9, 10, + 11, 155, 156, 157, 8, 159, 71, 2, 3, 4, + 5, 6, 7, 167, 9, 10, 11, 12, 13, 30, + 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 9, 10, 11, 8, 164, 8, 138, + 139, 168, 37, 38, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 30, 154, 32, 33, 34, 35, + 36, 37, 38, 58, 9, 10, 11, 166, 1, 9, + 10, 11, 8, 138, 139, 8, 31, 72, 73, 74, + 75, 76, 77, 78, 14, 30, 81, 32, 33, 154, + 30, 9, 10, 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, 37, + 38, 14, 127, 128, 129, 130, 14, 132, 133, 134, + 135, 136, 137, 81, 14, 140, 141, 142, 143, 144, + 145, 146, 14, 148, 149, 14, 9, 10, 11, 16, + 155, 156, 157, 31, 159, 2, 3, 4, 5, 6, + 7, 81, 9, 10, 11, 12, 13, 30, 16, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 16, 58, 16, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 70, 16, 53, + 16, 58, 160, 161, 162, 52, 53, 1, 50, 51, + 16, 169, 76, 77, 1, 72, 73, 74, 75, 76, + 77, 78, 102, 103, 81, 16, 71, 81, 76, 77, + 84, 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, 107, 108, 16, + 127, 128, 129, 130, 81, 132, 133, 134, 135, 136, + 137, 107, 108, 140, 141, 142, 143, 144, 145, 146, + 16, 148, 149, 138, 139, 16, 83, 16, 155, 156, + 157, 2, 3, 4, 5, 6, 7, 31, 102, 154, + 117, 12, 13, 107, 15, 109, 1, 1, 31, 31, + 114, 166, 31, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 141, 1, 112, 113, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 52, 53, 160, 161, 162, 57, 31, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, + 71, 72, 73, 74, 75, 169, 31, 117, 79, 80, + 81, 168, 83, 31, 1, 172, 87, 88, 89, 90, + 31, 92, 117, 94, 37, 96, 35, 1, 99, 100, + 85, 85, 142, 104, 105, 106, 107, 108, 35, 110, + 111, 35, 35, 30, 30, 116, 117, 142, 37, 85, + 35, 35, 123, 35, 37, 58, 166, 128, 129, 130, + 37, 71, 37, 38, 70, 38, 138, 139, 1, 140, + 141, 166, 143, 144, 145, 146, 147, 148, 149, 150, + 78, 81, 154, 84, 83, 156, 157, 83, 90, 160, + 161, 162, 163, 81, 166, 166, 71, 72, 31, 170, + 171, 172, 76, 77, 78, 86, 97, 114, 83, 164, + 164, 85, 87, 168, 168, 91, 95, 91, 98, 93, + 98, 95, 93, 97, 132, 115, 98, 141, 164, 151, + 117, 117, 168, 107, 120, 121, 122, 123, 124, 125, + 126, 101, 101, 158, 118, 119, 151, 159, 123, 123, + 71, 167, 85, 170, 158, 142, 142, 131, 132, 133, + 134, 135, 154, -1, -1, 140, 141, 136, 143, 144, + 145, 146, 147, 148, 149, 136, 171, 37, 38, 166, + 166, 156, 157, 137, 154, -1, 154, 71, 154, 154, + 164, 166, -1, 160, 168, 169, 171, 172, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 163, 165, 164, 75, 164, 138, 139, 0, + 1, 81, 37, 38, 164, 164, 164, 164, 88, 89, + 90, 164, 92, 154, 94, 168, 96, 164, 164, 99, + 164, 164, 60, 61, 104, 105, 106, 164, 164, 164, + 110, 111, 164, 71, 138, 139, 116, 117, 164, 164, + 75, 164, 164, 164, 164, 169, 81, 165, 128, 165, + 154, 71, 72, 88, 89, 90, 165, 92, 165, 94, + 165, 96, 168, 83, 99, 166, 1, 87, 166, 104, + 105, 106, 166, 166, 166, 110, 111, 1, 166, 159, + 166, 116, 117, 166, 85, 166, 168, 166, 166, 166, + 166, 166, 166, 128, 166, 166, 31, 166, 166, 166, + 138, 139, 166, 123, 166, 166, 107, 31, 109, 166, + 166, 166, 31, 114, 166, 166, 154, 118, 119, 166, + 166, 141, 123, 143, 144, 145, 146, 147, 148, 149, + 131, 132, 133, 134, 135, 166, 156, 157, 166, 166, + 166, 71, 72, 166, 166, 166, 166, 166, 166, 166, + 85, 171, 172, 83, 155, 167, 75, 87, 167, 167, + 167, 85, 81, 164, 167, 167, 172, 168, 169, 88, + 89, 90, 167, 92, 167, 94, 167, 96, 167, 167, + 99, 167, 167, 167, 167, 104, 105, 106, 31, 167, + 167, 110, 111, 123, 167, 167, 167, 116, 117, 167, + 167, 167, 167, 1, 167, 167, 167, 167, 167, 128, + 167, 141, 167, 143, 144, 145, 146, 147, 148, 149, + 167, 167, 167, 167, 167, 167, 156, 157, 167, 164, + 167, 167, 75, 168, 167, 167, 166, 168, 81, 167, + 164, 171, 172, 1, 168, 88, 89, 90, 168, 92, + 1, 94, 167, 96, 167, 167, 99, 168, 168, 168, + 168, 104, 105, 106, 168, 75, 168, 110, 111, 1, + 168, 81, 168, 116, 117, 168, 168, 168, 88, 89, + 90, 169, 92, 169, 94, 128, 96, 85, 169, 99, + 169, 169, 169, 169, 104, 105, 106, 169, 169, 31, + 110, 111, 169, 101, 102, 103, 116, 117, 169, 107, + 169, 30, 169, 169, 169, 169, 169, 169, 128, 169, + 118, 119, 169, 169, 169, 123, -1, 85, 169, 169, + 169, 169, 83, 131, 132, 133, 134, 135, 169, -1, + -1, -1, -1, 101, 102, 103, -1, -1, -1, 107, + -1, 83, -1, -1, -1, -1, 166, -1, -1, -1, + 118, 119, 81, -1, -1, 123, 164, 118, 119, -1, + 168, 169, 123, 131, 132, 133, 134, 135, -1, -1, + -1, 132, -1, -1, -1, -1, 118, 119, -1, -1, + 141, 123, -1, -1, -1, -1, -1, -1, 117, -1, + 132, -1, -1, -1, -1, -1, 164, -1, -1, 141, + 168, 169, 163, -1, -1, 166, -1, -1, -1, -1, + -1, 172, 141, 142, -1, -1, -1, -1, -1, -1, + -1, 163, -1, -1, 166, -1, -1, -1, -1, -1, + 172, 160, 161, 162, -1, -1, -1, 166 ); protected array $actionBase = array( - 0, 156, -2, 314, 472, 472, 875, 1073, 1353, 1376, - 801, 135, 364, -60, 391, 367, 511, 511, 836, 511, - 195, 368, 906, 354, 354, 354, 829, 629, 629, 829, - 629, 1027, 1027, 1027, 1027, 1060, 1060, 1314, 1314, 1347, - 1248, 1215, 1437, 1437, 1437, 1437, 1437, 1281, 1437, 1437, - 1437, 1437, 1437, 1281, 1437, 1437, 1437, 1437, 1437, 1437, - 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, - 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, - 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, - 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, - 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, - 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, - 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, - 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, - 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, - 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, 1437, - 1437, 1437, 1437, 1437, 1437, 37, 20, 352, 396, 1121, - 699, 1089, 1095, 1091, 1096, 1087, 1086, 1090, 1092, 1097, - 1170, 1172, 830, 1166, 1176, 1093, 914, 1088, 1094, 905, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 613, 510, 356, 44, 366, - 366, 366, 366, 366, 366, 366, 366, 366, 366, 366, - 366, 366, 366, 366, 366, 366, 366, 366, 366, 940, - 940, 22, 22, 22, 331, 1127, 1074, 1127, 1127, 1127, - 1127, 1127, 1127, 1127, 1127, 298, 205, 188, 1030, 171, - 171, 7, 7, 7, 7, 7, 692, 1466, 54, 901, - 901, 289, 289, 289, 289, 179, 461, 251, 348, 355, - -40, 466, 349, 238, 688, 688, 412, 412, 392, 392, - 412, 412, 412, 133, 133, 386, 386, 386, 386, 83, - -71, 817, 383, 383, 383, 383, 817, 817, 817, 817, - 846, 1056, 817, 973, 987, 817, 817, 641, 731, 810, - 545, 545, 573, -70, -70, 573, 374, -70, 502, 263, - 94, 804, 276, 519, 94, 1012, 243, 369, 369, 403, - 369, 369, 369, 815, 583, 815, 1085, 834, 834, 796, - 772, 907, 1123, 1098, 822, 1164, 858, 1165, 1124, 334, - 405, 10, 13, 74, 771, 1084, 1084, 1084, 1084, 1084, - 1084, 1084, 1084, 1084, 1084, 1084, 1084, 811, 461, 1085, - -3, 1159, 1161, 811, 811, 811, 461, 461, 461, 461, - 461, 461, 461, 461, 797, 461, 461, 584, -3, 534, - 596, -3, 860, 461, 842, 37, 37, 37, 37, 37, - 37, 37, 37, 37, 37, 37, -18, 37, 37, 20, - 5, 5, 37, 462, 134, 5, 5, 5, 451, 5, - 37, 37, 37, 583, 775, 813, 585, 524, 816, 120, - 775, 775, 775, 26, 227, 115, 806, 839, 569, 825, - 825, 825, 832, 939, 939, 825, 826, 825, 832, 825, - 825, 939, 939, 852, 939, 286, 672, 480, 636, 676, - 939, 387, 825, 825, 825, 825, 845, 939, 113, 147, - 686, 825, 342, 339, 825, 825, 845, 844, 803, 800, - 939, 939, 939, 845, 594, 800, 800, 800, 865, 867, - 812, 802, 458, 452, 690, 217, 827, 802, 802, 825, - 668, 812, 802, 812, 802, 818, 802, 802, 802, 812, - 802, 826, 492, 802, 765, 689, 163, 802, 825, 19, - 948, 952, 683, 954, 944, 956, 1008, 958, 959, 1109, - 938, 968, 947, 961, 1009, 943, 941, 828, 743, 750, - 847, 819, 937, 835, 835, 835, 928, 929, 835, 835, - 835, 835, 835, 835, 835, 835, 743, 856, 849, 821, - 974, 751, 759, 1065, 814, 1126, 1178, 973, 948, 959, - 684, 947, 961, 943, 941, 795, 794, 792, 793, 791, - 790, 788, 789, 799, 1067, 1068, 962, 853, 764, 1028, - 976, 1125, 1099, 981, 985, 1034, 1069, 868, 1071, 1128, - 837, 1131, 1132, 863, 994, 1110, 835, 927, 916, 911, - 987, 934, 743, 912, 1072, 1076, 1018, 1011, 1035, 1036, - 1101, 841, 833, 913, 1133, 996, 997, 1001, 1111, 1113, - 862, 1022, 855, 1042, 859, 903, 1044, 1045, 1046, 1049, - 1114, 1137, 1117, 926, 1118, 870, 831, 1014, 838, 1139, - 623, 851, 857, 866, 1007, 685, 970, 1119, 1025, 1141, - 1057, 1058, 1059, 1143, 1144, 963, 871, 1023, 824, 1026, - 1016, 872, 873, 693, 864, 1077, 843, 850, 861, 694, - 696, 1146, 1147, 1148, 964, 807, 820, 874, 876, 1081, - 770, 1082, 1149, 698, 877, 1153, 1066, 766, 776, 736, - 738, 737, 779, 823, 1120, 848, 854, 840, 1006, 776, - 808, 881, 1155, 882, 897, 898, 1062, 904, 1033, 1158, + 0, 157, -2, 316, 475, 475, 886, 1079, 1282, 1322, + 1361, 703, 532, 560, 207, 806, 1145, 1145, 1156, 1145, + 805, 927, 959, 824, 824, 824, 872, 633, 633, 872, + 633, 1000, 1000, 1000, 1000, 1045, 1045, -62, -62, 97, + 1237, 1161, 256, 256, 256, 256, 256, 1270, 256, 256, + 256, 256, 256, 1270, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 13, 276, 137, 356, + 1187, 611, 1138, 1152, 1143, 1165, 1136, 1135, 1141, 1144, + 1167, 1241, 1242, 849, 1240, 1249, 1147, 975, 1137, 1148, + 958, 617, 617, 617, 617, 617, 617, 617, 617, 617, + 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, + 617, 617, 617, 617, 617, 617, 617, 299, 230, 552, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 530, 530, 530, 885, 885, 525, 300, 1150, 1060, 1150, + 1150, 1150, 1150, 1150, 1150, 1150, 1150, 141, 29, 1042, + 494, 494, 459, 459, 459, 459, 459, 696, 1348, 874, + 172, 172, 172, 172, 1329, 1329, 238, 562, -57, 873, + 133, 198, -86, 648, 39, 41, 765, 765, 259, 259, + 750, 750, 259, 259, 259, 325, 325, 254, 254, 254, + 254, 83, -66, 846, 56, 56, 56, 56, 846, 846, + 846, 846, 855, 865, 846, 1025, 1049, 846, 846, 371, + 645, 788, 643, 643, 278, -71, -71, 278, -72, -71, + 179, 636, 200, 852, 119, 233, 200, 1063, 405, 939, + 939, 976, 939, 939, 939, 893, 650, 893, 1134, 879, + 879, 803, 777, 960, 1188, 1168, 900, 1235, 901, 1239, + 1189, 174, 76, -55, 264, 328, 766, 1133, 1133, 1133, + 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1074, + 562, 1134, 202, 1233, 1234, 1074, 1074, 1074, 562, 562, + 562, 562, 562, 562, 562, 562, 804, 562, 562, 714, + 202, 626, 642, 202, 878, 562, 890, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 175, 13, + 13, 276, 32, 32, 13, 343, 23, 32, 32, 32, + 181, 32, 13, 13, 13, 650, 857, 845, 664, 284, + 856, 128, 857, 857, 857, 45, 31, 70, 851, 863, + 249, 860, 860, 860, 864, 999, 999, 860, 861, 860, + 864, 860, 860, 999, 999, 909, 999, 121, 466, 378, + 447, 482, 999, 288, 860, 860, 860, 860, 899, 999, + 21, 50, 498, 860, 274, 234, 860, 860, 899, 891, + 809, 906, 999, 999, 999, 899, 439, 906, 906, 906, + 920, 921, 853, 808, 361, 351, 534, 72, 887, 808, + 808, 860, 455, 853, 808, 853, 808, 848, 808, 808, + 808, 853, 808, 861, 433, 808, 743, 500, 60, 808, + 860, 6, 1005, 1006, 515, 1008, 1003, 1009, 1061, 1011, + 1012, 1160, 997, 1023, 1004, 1013, 1062, 1002, 1001, 842, + 660, 672, 892, 868, 994, 854, 854, 854, 987, 988, + 854, 854, 854, 854, 854, 854, 854, 854, 660, 908, + 895, 858, 1028, 674, 684, 1112, 838, 1199, 843, 1025, + 1005, 1012, 602, 1004, 1013, 1002, 1001, 802, 801, 799, + 800, 798, 797, 778, 781, 807, 1114, 1115, 1016, 910, + 699, 1085, 1029, 1194, 998, 1033, 1034, 1089, 1117, 922, + 1118, 1201, 850, 1202, 1203, 962, 1052, 1169, 854, 986, + 979, 964, 1049, 992, 660, 971, 1119, 1120, 1072, 974, + 1091, 1092, 1149, 882, 859, 973, 1204, 1053, 1054, 1057, + 1170, 1171, 912, 1073, 844, 1094, 888, 956, 1095, 1096, + 1097, 1102, 1172, 1208, 1176, 982, 1178, 923, 884, 1068, + 869, 1209, 322, 875, 876, 883, 1059, 540, 1024, 1182, + 1192, 1213, 1103, 1107, 1108, 1219, 1221, 1018, 933, 1077, + 881, 1078, 1071, 934, 936, 587, 877, 1121, 866, 867, + 871, 592, 600, 1223, 1224, 1225, 1019, 816, 862, 937, + 943, 1123, 847, 1125, 1226, 608, 944, 1227, 1113, 764, + 769, 613, 658, 632, 771, 889, 1184, 894, 870, 880, + 1058, 769, 835, 945, 1228, 948, 954, 955, 1109, 957, + 1087, 1230, 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, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 633, 633, 633, 633, 633, + 789, 789, 789, 789, 789, 789, 789, 633, 789, 789, + 789, 633, 0, 0, 633, 0, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, + 789, 617, 617, 617, 617, 617, 617, 617, 617, 617, + 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, + 617, 617, 617, 617, 617, 617, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 629, 629, 629, 629, 629, 784, 784, - 784, 784, 784, 784, 784, 629, 784, 784, 784, 629, - 0, 0, 629, 0, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 784, 784, - 784, 784, 784, 784, 784, 784, 784, 784, 613, 613, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 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, 613, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, - 613, 613, 213, 213, 613, 613, 613, 613, 213, 213, - 213, 213, 213, 213, 213, 213, 213, 213, 613, 613, - 613, 0, 613, 613, 613, 613, 613, 613, 613, 852, - 213, 213, 213, 213, 133, 133, 133, 133, -95, -95, - -95, 213, 213, 374, 133, 213, 374, 213, 213, 213, - 213, 213, 213, 213, 213, 213, 0, 0, 213, 213, - 213, 213, -3, -70, 213, 826, 826, 826, 826, 213, - 213, 213, 213, -70, -70, 213, 414, 414, 213, 213, - 0, 0, 0, 133, 133, -3, 0, 0, -3, 0, - 0, 826, 826, 213, 374, 852, 503, 213, 334, 0, - 0, 0, 0, 0, 0, 0, -3, 826, -3, 461, - -70, -70, 461, 461, 5, 37, 503, 586, 586, 586, - 586, 37, 0, 0, 0, 0, 0, 583, 852, 852, - 852, 852, 852, 852, 852, 852, 852, 852, 852, 852, - 826, 0, 852, 0, 852, 852, 826, 826, 826, 0, - 0, 0, 0, 0, 0, 0, 0, 939, 0, 0, - 0, 0, 0, 0, 0, 826, 0, 939, 0, 0, + 0, 0, 617, 617, 617, 617, 617, 617, 617, 617, + 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, + 617, 617, 617, 617, 617, 617, 617, 617, 683, 683, + 617, 617, 683, 683, 683, 683, 683, 683, 683, 683, + 683, 683, 617, 617, 0, 617, 617, 617, 617, 617, + 617, 617, 909, 683, 683, 325, 325, 325, 325, 683, + 683, 397, 397, 397, 683, 325, 683, -72, 325, 683, + -72, 683, 683, 683, 683, 683, 683, 683, 683, 683, + 0, 0, 683, 683, 683, 683, 202, -71, 683, 861, + 861, 861, 861, 683, 683, 683, 683, -71, -71, 683, + -56, -56, 683, 683, 0, 0, 0, 325, 325, 202, + 0, 0, 202, 0, 0, 861, 861, 683, -72, 909, + 537, 683, 174, 0, 0, 0, 0, 0, 0, 0, + 202, 861, 202, 562, -71, -71, 562, 562, 32, 13, + 537, 610, 610, 610, 610, 13, 0, 0, 0, 0, + 0, 650, 909, 909, 909, 909, 909, 909, 909, 909, + 909, 909, 909, 909, 861, 0, 909, 0, 909, 909, + 861, 861, 861, 0, 0, 0, 0, 0, 0, 0, + 0, 999, 0, 0, 0, 0, 0, 0, 0, 861, + 0, 999, 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, 826, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 835, 841, 0, - 0, 841, 0, 835, 835, 835, 0, 0, 0, 864, - 770 + 0, 861, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 854, 882, 0, 0, 882, 0, 854, 854, 854, + 0, 0, 0, 877, 847 ); protected array $actionDefault = array( 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767, 629, 629, 629, 629,32767,32767, 257, 102,32767, - 32767, 500, 416, 416, 416,32767,32767,32767, 573, 573, - 573, 573, 573, 17,32767,32767,32767,32767,32767,32767, - 500,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 630, 630, 630, 630,32767,32767, 257, 102,32767, + 32767, 501, 416, 416, 416,32767,32767,32767, 574, 574, + 574, 574, 574, 17,32767,32767,32767,32767,32767,32767, + 501,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, 36, 7, 8, 10, 11, 49, 337, 100,32767, + 32767,32767,32767,32767,32767,32767,32767, 102,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 36, 7, 8, 10, 11, 49, 337, 100,32767,32767, - 32767,32767,32767,32767,32767,32767, 102,32767,32767,32767, + 403, 623,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, 403, - 622,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 505, 484, 485, 487, 488, 415, 575, 629, 343, + 626, 341, 414, 146, 353, 342, 245, 261, 506, 262, + 507, 510, 511, 218, 400, 150, 151, 447, 502, 449, + 500, 504, 448, 421, 428, 429, 430, 431, 432, 433, + 434, 435, 436, 437, 438, 439, 440, 419, 420, 503, + 481, 480, 479,32767,32767, 445, 446,32767,32767,32767, + 32767,32767,32767,32767,32767, 102,32767, 450, 453, 418, + 451, 452, 469, 470, 467, 468, 471,32767,32767, 322, + 472, 473, 474, 475,32767,32767, 381, 196, 379,32767, + 476,32767, 111, 454, 322, 111,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 460, 461,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 504, 483, 484, 486, 487, 415, 574, 628, 343, 625, - 341, 414, 146, 353, 342, 245, 261, 505, 262, 506, - 509, 510, 218, 400, 150, 151, 447, 501, 449, 499, - 503, 448, 421, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437, 438, 439, 440, 419, 420, 502,32767, - 32767, 480, 479, 478, 445,32767,32767,32767,32767,32767, - 32767,32767,32767, 102,32767, 446, 450, 453, 418, 451, - 452, 469, 470, 467, 468, 471,32767,32767, 322,32767, - 32767, 472, 473, 474, 475, 381, 196, 379,32767,32767, - 111, 454, 322, 111,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 460, 461,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 102,32767,32767,32767, 100, 518, + 568, 478, 455, 456,32767, 543,32767, 102,32767, 545, + 32767,32767,32767,32767,32767,32767,32767,32767, 570, 442, + 444, 538, 624, 422, 627,32767, 531, 100, 196,32767, + 544, 196, 196,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 569,32767, 637, 531, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, + 196, 110,32767, 110, 110,32767,32767, 100, 196, 196, + 196, 196, 196, 196, 196, 196, 546, 196, 196, 191, + 32767, 271, 273, 102, 592, 196, 548,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 102,32767,32767,32767, 100, 517, 567, 477, - 455, 456,32767, 542,32767, 102,32767, 544,32767,32767, - 32767,32767,32767,32767,32767,32767, 569, 442, 444, 537, - 623, 422, 626,32767, 530, 100, 196,32767, 543, 196, - 196,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 568,32767, 636, 530, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110,32767, 196, 110, - 32767, 110, 110,32767,32767, 100, 196, 196, 196, 196, - 196, 196, 196, 196, 545, 196, 196, 191,32767, 271, - 273, 102, 591, 196, 547,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 403,32767, - 32767,32767,32767, 530, 465, 139,32767, 532, 139, 575, - 457, 458, 459, 575, 575, 575, 318, 295,32767,32767, - 32767,32767,32767, 545, 545, 100, 100, 100, 100,32767, - 32767,32767,32767, 111, 516, 99, 99, 99, 99, 99, - 103, 101,32767,32767,32767,32767, 226,32767, 101, 101, - 99,32767, 101, 101,32767,32767, 226, 228, 215, 230, - 32767, 595, 596, 226, 101, 230, 230, 230, 250, 250, - 519, 324, 101, 99, 101, 101, 198, 324, 324,32767, - 101, 519, 324, 519, 324, 200, 324, 324, 324, 519, - 324,32767, 101, 324, 217, 99, 99, 324,32767,32767, - 32767,32767, 532,32767,32767,32767,32767,32767,32767,32767, - 225,32767,32767,32767,32767,32767,32767,32767,32767, 562, - 32767, 580, 593, 463, 464, 466, 579, 577, 488, 489, - 490, 491, 492, 493, 494, 496, 624,32767, 536,32767, - 32767,32767, 352,32767, 634,32767,32767,32767, 9, 74, - 525, 42, 43, 51, 57, 551, 552, 553, 554, 548, - 549, 555, 550,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 635, - 32767, 575,32767,32767,32767,32767, 462, 557, 601,32767, - 32767, 576, 627,32767,32767,32767,32767,32767,32767,32767, - 32767, 139,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 562,32767, 137,32767,32767,32767,32767,32767, - 32767,32767,32767, 558,32767,32767,32767, 575,32767,32767, - 32767,32767, 320, 317,32767,32767,32767,32767,32767,32767, + 403,32767,32767,32767,32767, 531, 465, 139,32767, 533, + 139, 576, 457, 458, 459, 576, 576, 576, 318, 295, + 32767,32767,32767,32767,32767, 546, 546, 100, 100, 100, + 100,32767,32767,32767,32767, 111, 517, 99, 99, 99, + 99, 99, 103, 101,32767,32767,32767,32767, 226,32767, + 101, 101, 99,32767, 101, 101,32767,32767, 226, 228, + 215, 230,32767, 596, 597, 226, 101, 230, 230, 230, + 250, 250, 520, 324, 101, 99, 101, 101, 198, 324, + 324,32767, 101, 520, 324, 520, 324, 200, 324, 324, + 324, 520, 324,32767, 101, 324, 217, 99, 99, 324, + 32767,32767,32767,32767, 533,32767,32767,32767,32767,32767, + 32767,32767, 225,32767,32767,32767,32767,32767,32767,32767, + 32767, 563,32767, 581, 594, 463, 464, 466, 580, 578, + 489, 490, 491, 492, 493, 494, 495, 497, 625,32767, + 537,32767,32767,32767, 352,32767, 635,32767,32767,32767, + 9, 74, 526, 42, 43, 51, 57, 552, 553, 554, + 555, 549, 550, 556, 551,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 575,32767,32767,32767,32767,32767, 297,32767, 314,32767, + 32767, 636,32767, 576,32767,32767,32767,32767, 462, 558, + 602,32767,32767, 577, 628,32767,32767,32767,32767,32767, + 32767,32767,32767, 139,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 563,32767, 137,32767,32767,32767, + 32767,32767,32767,32767,32767, 559,32767,32767,32767, 576, + 32767,32767,32767,32767, 320, 317,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 399, 532, 300, - 302, 303,32767,32767,32767,32767, 375,32767,32767,32767, + 32767,32767, 576,32767,32767,32767,32767,32767, 297,32767, + 314,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 399, + 533, 300, 302, 303,32767,32767,32767,32767, 375,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 153, 153, 3, 3, 355, 153, 153, 153, 355, 355, - 153, 355, 355, 355, 153, 153, 153, 153, 153, 153, - 153, 283, 186, 265, 268, 250, 250, 153, 367, 153, - 401, 401, 410 + 32767,32767, 153, 153, 3, 3, 355, 153, 153, 153, + 355, 355, 153, 355, 355, 355, 153, 153, 153, 153, + 153, 153, 153, 283, 186, 265, 268, 250, 250, 153, + 367, 153, 401, 401, 410 ); protected array $goto = array( - 198, 167, 198, 198, 198, 1064, 594, 715, 283, 280, - 283, 283, 629, 643, 646, 647, 648, 649, 670, 671, - 672, 726, 728, 724, 673, 674, 1098, 691, 692, 693, - 170, 170, 170, 170, 222, 199, 195, 195, 180, 182, - 217, 195, 195, 195, 195, 195, 1190, 196, 196, 196, - 196, 196, 1190, 190, 191, 192, 193, 194, 219, 217, - 220, 553, 554, 434, 555, 558, 559, 560, 561, 562, - 563, 564, 565, 171, 172, 173, 197, 174, 175, 176, - 168, 177, 178, 179, 181, 216, 218, 221, 241, 244, - 255, 256, 257, 259, 260, 261, 262, 263, 264, 265, - 271, 272, 273, 274, 281, 293, 294, 320, 321, 440, - 441, 442, 616, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, 234, 235, 236, 237, 238, 190, - 191, 192, 193, 194, 219, 200, 201, 202, 203, 242, - 183, 184, 204, 185, 205, 201, 186, 243, 200, 166, - 206, 207, 187, 208, 209, 210, 188, 211, 212, 169, - 213, 214, 215, 189, 879, 363, 568, 355, 568, 568, - 1120, 918, 875, 918, 918, 363, 363, 516, 568, 517, - 618, 566, 566, 566, 566, 523, 622, 851, 363, 363, - 483, 483, 363, 876, 1410, 1067, 1067, 700, 979, 483, - 470, 1059, 1075, 1076, 877, 996, 996, 996, 996, 572, - 1002, 470, 363, 363, 990, 997, 347, 934, 929, 930, - 943, 885, 931, 882, 932, 933, 883, 886, 1026, 937, - 890, 998, 528, 753, 889, 432, 569, 1035, 1030, 348, - 347, 601, 1126, 1122, 1123, 754, 656, 658, 472, 911, - 678, 472, 477, 608, 702, 705, 1037, 713, 722, 1033, - 729, 1239, 1294, 1064, 1294, 1294, 353, 1355, 463, 463, - 1383, 463, 463, 1064, 1294, 1023, 938, 1064, 939, 1064, - 1064, 1064, 1064, 1064, 1064, 1064, 1064, 1064, 495, 428, - 1064, 1064, 1064, 1064, 454, 497, 1294, 360, 360, 360, - 360, 1294, 1294, 1294, 1294, 577, 570, 1294, 640, 677, - 1294, 1294, 1375, 1375, 1375, 1375, 405, 407, 410, 619, - 623, 572, 712, 967, 967, 951, 853, 1070, 1069, 952, - 251, 251, 251, 251, 251, 438, 857, 631, 712, 617, - 1139, 712, 313, 570, 577, 603, 604, 314, 614, 620, - 727, 636, 637, 606, 872, 524, 718, 872, 1137, 28, - 249, 249, 249, 249, 246, 252, 679, 463, 463, 463, - 463, 463, 463, 463, 463, 463, 463, 463, 463, 1186, - 857, 463, 857, 463, 463, 1088, 1287, 444, 680, 1040, - 1040, 1073, 1074, 439, 341, 337, 338, 340, 611, 443, - 342, 445, 657, 642, 642, 8, 872, 9, 701, 1325, - 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1325, 1344, - 1344, 327, 311, 356, 357, 1344, 1344, 1344, 1344, 1344, - 1344, 1344, 1344, 1344, 1344, 685, 1366, 452, 1366, 1366, - 1097, 1099, 1102, 1341, 1341, 893, 1370, 1371, 1366, 1341, - 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 571, - 598, 571, 343, 905, 869, 571, 892, 598, 635, 408, - 476, 1377, 1377, 1377, 1377, 1146, 1174, 1147, 492, 1368, - 1369, 898, 486, 615, 487, 488, 994, 423, 723, 612, - 634, 903, 557, 557, 1401, 1402, 895, 1362, 557, 557, - 557, 557, 557, 557, 557, 557, 557, 557, 650, 652, - 654, 414, 556, 556, 906, 894, 1108, 1112, 556, 901, - 556, 556, 556, 556, 556, 556, 556, 556, 1005, 985, - 1169, 1109, 1289, 757, 1055, 1285, 415, 872, 335, 624, - 625, 1045, 493, 956, 1176, 907, 1111, 1113, 382, 1007, - 0, 995, 1364, 1364, 1111, 1042, 0, 275, 326, 1160, - 326, 326, 0, 897, 0, 683, 1021, 0, 254, 254, - 0, 891, 0, 1158, 910, 420, 421, 1393, 1393, 446, - 689, 0, 690, 1284, 425, 426, 427, 0, 703, 1290, - 1291, 429, 1277, 446, 1393, 351, 0, 0, 867, 1071, - 1071, 0, 0, 0, 0, 1277, 684, 1082, 1078, 1079, - 0, 0, 0, 0, 1396, 1396, 1270, 971, 1292, 1352, - 1353, 1271, 1274, 972, 0, 1275, 0, 0, 0, 0, + 199, 168, 199, 199, 199, 1066, 1004, 717, 446, 682, + 642, 679, 441, 343, 339, 340, 342, 613, 445, 344, + 447, 659, 479, 726, 568, 568, 568, 568, 1242, 624, + 171, 171, 171, 171, 223, 200, 196, 196, 181, 183, + 218, 196, 196, 196, 196, 196, 1192, 197, 197, 197, + 197, 197, 1192, 191, 192, 193, 194, 195, 220, 218, + 221, 555, 556, 436, 557, 560, 561, 562, 563, 564, + 565, 566, 567, 172, 173, 174, 198, 175, 176, 177, + 169, 178, 179, 180, 182, 217, 219, 222, 240, 245, + 246, 257, 258, 260, 261, 262, 263, 264, 265, 266, + 270, 271, 272, 273, 280, 283, 295, 296, 322, 323, + 442, 443, 444, 618, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 191, 192, 193, 194, 195, 220, 201, 202, 203, 204, + 241, 184, 185, 205, 186, 206, 202, 187, 242, 201, + 167, 207, 208, 188, 209, 210, 211, 189, 212, 213, + 170, 214, 215, 216, 190, 881, 285, 282, 285, 285, + 596, 1122, 253, 253, 253, 253, 253, 603, 485, 485, + 620, 756, 658, 660, 1072, 1071, 680, 485, 329, 313, + 704, 707, 1039, 715, 724, 1035, 731, 920, 877, 920, + 920, 1100, 251, 251, 251, 251, 248, 254, 1069, 1069, + 702, 981, 1396, 1396, 1061, 1077, 1078, 878, 936, 931, + 932, 945, 887, 933, 884, 934, 935, 885, 888, 1396, + 939, 892, 357, 497, 879, 891, 1042, 1042, 874, 853, + 499, 874, 913, 1128, 1124, 1125, 530, 644, 644, 1399, + 1399, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, + 1328, 619, 1141, 1297, 1066, 409, 412, 621, 625, 1297, + 1297, 940, 729, 941, 1066, 434, 1297, 526, 720, 1066, + 1139, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, + 874, 610, 1066, 1066, 1066, 1066, 675, 676, 1297, 693, + 694, 695, 355, 1297, 1297, 1297, 1297, 1386, 474, 1297, + 1025, 474, 1297, 1297, 1378, 1378, 1378, 1378, 349, 407, + 579, 572, 1075, 1076, 365, 969, 969, 953, 440, 859, + 633, 954, 1373, 1374, 365, 365, 362, 362, 362, 362, + 608, 350, 349, 570, 1099, 1101, 1104, 365, 365, 570, + 570, 365, 1292, 1413, 456, 681, 570, 315, 572, 579, + 605, 606, 316, 616, 622, 1188, 638, 639, 574, 614, + 636, 365, 365, 859, 28, 859, 1090, 454, 472, 518, + 8, 519, 9, 998, 998, 998, 998, 525, 703, 472, + 1347, 1347, 992, 999, 1347, 1347, 1347, 1347, 1347, 1347, + 1347, 1347, 1347, 1347, 687, 908, 896, 1110, 1114, 1293, + 1294, 345, 1280, 714, 256, 256, 871, 855, 869, 1007, + 987, 874, 1148, 1176, 1149, 1280, 1358, 465, 465, 714, + 637, 416, 714, 900, 465, 465, 897, 1369, 1295, 1355, + 1356, 1171, 997, 1369, 1369, 558, 558, 1288, 430, 558, + 1369, 558, 558, 558, 558, 558, 558, 558, 558, 1111, + 895, 573, 600, 573, 1160, 912, 1047, 573, 759, 600, + 1057, 410, 478, 1380, 1380, 1380, 1380, 417, 907, 495, + 574, 894, 909, 384, 488, 617, 489, 490, 358, 359, + 494, 1371, 1372, 905, 1115, 1162, 1404, 1405, 1009, 1365, + 1344, 1344, 0, 0, 1344, 1344, 1344, 1344, 1344, 1344, + 1344, 1344, 1344, 1344, 1028, 0, 0, 1000, 0, 755, + 0, 903, 571, 1037, 1032, 0, 0, 465, 465, 465, + 465, 465, 465, 465, 465, 465, 465, 465, 465, 0, + 337, 465, 0, 465, 465, 1290, 0, 0, 1113, 996, + 425, 725, 0, 0, 1367, 1367, 1113, 559, 559, 0, + 0, 559, 559, 559, 559, 559, 559, 559, 559, 559, + 559, 631, 645, 648, 649, 650, 651, 672, 673, 674, + 728, 730, 0, 626, 627, 1273, 973, 958, 1178, 0, + 1274, 1277, 974, 0, 1278, 0, 0, 276, 328, 1044, + 0, 0, 0, 0, 328, 328, 0, 899, 0, 685, + 1023, 0, 0, 422, 423, 893, 448, 0, 691, 0, + 692, 0, 427, 428, 429, 0, 705, 1287, 0, 431, + 0, 448, 0, 353, 652, 654, 656, 1073, 1073, 0, + 0, 0, 0, 0, 686, 1084, 1080, 1081, 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, 762, 762 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 764, 764 ); protected array $gotoCheck = array( - 42, 42, 42, 42, 42, 73, 127, 73, 23, 23, - 23, 23, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 9, 86, 86, 131, 86, 86, 86, + 42, 42, 42, 42, 42, 73, 49, 73, 66, 66, + 56, 56, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 159, 9, 107, 107, 107, 107, 159, 107, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1020,104 +1005,108 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 15, 14, 19, 97, 19, 19, - 15, 25, 25, 25, 25, 14, 14, 163, 19, 163, - 134, 107, 107, 107, 107, 163, 107, 6, 14, 14, - 157, 157, 14, 26, 14, 89, 89, 89, 89, 157, - 19, 89, 89, 89, 27, 19, 19, 19, 19, 14, - 49, 19, 14, 14, 19, 19, 177, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 50, 15, - 15, 50, 76, 50, 15, 43, 50, 50, 50, 177, - 177, 48, 15, 15, 15, 48, 48, 48, 83, 45, - 48, 83, 159, 181, 48, 48, 48, 48, 48, 48, - 48, 159, 73, 73, 73, 73, 188, 14, 23, 23, - 190, 23, 23, 73, 73, 103, 65, 73, 65, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 84, 14, - 73, 73, 73, 73, 83, 84, 73, 24, 24, 24, - 24, 73, 73, 73, 73, 76, 76, 73, 56, 56, - 73, 73, 9, 9, 9, 9, 62, 59, 59, 59, - 59, 14, 7, 9, 9, 73, 7, 119, 119, 73, - 5, 5, 5, 5, 5, 13, 12, 13, 7, 8, - 8, 7, 76, 76, 76, 76, 76, 76, 76, 76, - 8, 76, 76, 104, 22, 8, 8, 22, 8, 76, - 5, 5, 5, 5, 5, 5, 64, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 158, - 12, 23, 12, 23, 23, 115, 14, 66, 66, 107, - 107, 120, 120, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 108, 108, 46, 22, 46, 117, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 179, - 179, 178, 178, 97, 97, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 121, 134, 113, 134, 134, - 130, 130, 130, 180, 180, 35, 187, 187, 134, 180, - 180, 180, 180, 180, 180, 180, 180, 180, 180, 9, - 9, 9, 29, 35, 18, 9, 35, 9, 80, 9, - 9, 134, 134, 134, 134, 149, 149, 149, 185, 185, - 185, 39, 9, 9, 9, 9, 93, 93, 93, 2, - 2, 9, 182, 182, 9, 9, 37, 134, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 85, 85, - 85, 28, 165, 165, 16, 16, 16, 16, 165, 9, - 165, 165, 165, 165, 165, 165, 165, 165, 16, 92, - 156, 133, 20, 99, 114, 169, 31, 22, 9, 17, - 17, 110, 160, 17, 17, 41, 134, 136, 141, 96, - -1, 16, 134, 134, 134, 17, -1, 24, 24, 152, - 24, 24, -1, 17, -1, 17, 17, -1, 5, 5, - -1, 17, -1, 16, 16, 82, 82, 191, 191, 118, - 82, -1, 82, 17, 82, 82, 82, -1, 82, 20, - 20, 82, 20, 118, 191, 82, -1, -1, 20, 118, - 118, -1, -1, -1, -1, 20, 118, 118, 118, 118, - -1, -1, -1, -1, 191, 191, 79, 79, 20, 20, - 20, 79, 79, 79, -1, 79, -1, -1, -1, -1, + 42, 42, 42, 42, 42, 15, 23, 23, 23, 23, + 127, 15, 5, 5, 5, 5, 5, 48, 157, 157, + 134, 48, 48, 48, 119, 119, 48, 157, 178, 178, + 48, 48, 48, 48, 48, 48, 48, 25, 25, 25, + 25, 131, 5, 5, 5, 5, 5, 5, 89, 89, + 89, 89, 191, 191, 89, 89, 89, 26, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 191, + 15, 15, 97, 84, 27, 15, 107, 107, 22, 6, + 84, 22, 45, 15, 15, 15, 76, 108, 108, 191, + 191, 108, 108, 108, 108, 108, 108, 108, 108, 108, + 108, 8, 8, 73, 73, 59, 59, 59, 59, 73, + 73, 65, 8, 65, 73, 43, 73, 8, 8, 73, + 8, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 22, 181, 73, 73, 73, 73, 86, 86, 73, 86, + 86, 86, 188, 73, 73, 73, 73, 190, 83, 73, + 103, 83, 73, 73, 9, 9, 9, 9, 177, 62, + 76, 76, 120, 120, 14, 9, 9, 73, 13, 12, + 13, 73, 187, 187, 14, 14, 24, 24, 24, 24, + 104, 177, 177, 19, 130, 130, 130, 14, 14, 19, + 19, 14, 20, 14, 83, 64, 19, 76, 76, 76, + 76, 76, 76, 76, 76, 158, 76, 76, 14, 2, + 2, 14, 14, 12, 76, 12, 115, 113, 19, 163, + 46, 163, 46, 19, 19, 19, 19, 163, 117, 19, + 179, 179, 19, 19, 179, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 121, 16, 16, 16, 16, 20, + 20, 29, 20, 7, 5, 5, 18, 7, 20, 16, + 92, 22, 149, 149, 149, 20, 14, 23, 23, 7, + 80, 28, 7, 39, 23, 23, 37, 134, 20, 20, + 20, 156, 16, 134, 134, 165, 165, 169, 14, 165, + 134, 165, 165, 165, 165, 165, 165, 165, 165, 133, + 35, 9, 9, 9, 16, 16, 110, 9, 99, 9, + 114, 9, 9, 134, 134, 134, 134, 31, 35, 160, + 14, 35, 41, 141, 9, 9, 9, 9, 97, 97, + 185, 185, 185, 9, 136, 152, 9, 9, 96, 134, + 180, 180, -1, -1, 180, 180, 180, 180, 180, 180, + 180, 180, 180, 180, 50, -1, -1, 50, -1, 50, + -1, 9, 50, 50, 50, -1, -1, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, -1, + 9, 23, -1, 23, 23, 14, -1, -1, 134, 93, + 93, 93, -1, -1, 134, 134, 134, 182, 182, -1, + -1, 182, 182, 182, 182, 182, 182, 182, 182, 182, + 182, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, -1, 17, 17, 79, 79, 17, 17, -1, + 79, 79, 79, -1, 79, -1, -1, 24, 24, 17, + -1, -1, -1, -1, 24, 24, -1, 17, -1, 17, + 17, -1, -1, 82, 82, 17, 118, -1, 82, -1, + 82, -1, 82, 82, 82, -1, 82, 17, -1, 82, + -1, 118, -1, 82, 85, 85, 85, 118, 118, -1, + -1, -1, -1, -1, 118, 118, 118, 118, -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, 24, 24 + -1, -1, -1, 24, 24 ); protected array $gotoBase = array( - 0, 0, -243, 0, 0, 329, 174, 312, 328, 10, - 0, 0, 37, -8, -135, -188, 48, 61, 152, -101, - 128, 0, 74, 2, 291, 165, 186, 197, 168, 163, - 0, 85, 0, 0, 0, 65, 0, 151, 0, 156, - 0, 90, -1, 209, 0, 220, -352, 0, -490, 189, - 213, 0, 0, 0, 0, 0, 265, 0, 0, 268, - 0, 0, 271, 0, 126, 259, 148, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -44, 0, 0, 196, - 154, -354, 68, -32, -198, 13, -714, 0, 0, -89, - 0, 0, 198, 179, 0, 0, 92, -332, 0, 114, - 0, 0, 0, 237, 307, 0, 0, 150, 164, 0, - 162, 0, 0, 155, 106, 107, 0, 122, 311, 43, - 103, 140, 0, 0, 0, 0, 0, 4, 0, 0, - 437, 24, 0, 146, 169, 0, 91, 0, 0, 0, - 0, -213, 0, 0, 0, 0, 0, 0, 0, 200, - 0, 0, 101, 0, 0, 0, 171, 153, 133, -18, - 88, 0, 0, -334, 0, 273, 0, 0, 0, 157, - 0, 0, 0, 0, 0, 0, 0, -84, 98, 180, - 204, 221, 253, 0, 0, 175, 0, 63, 233, 0, - 236, 267, 0, 0 + 0, 0, -365, 0, 0, 171, 226, 403, 250, 10, + 0, 0, 28, -17, 22, -189, -63, 103, 102, 75, + -54, 0, -44, 160, 330, 191, 210, 227, 86, 110, + 0, 24, 0, 0, 0, 78, 0, 89, 0, 106, + 0, 25, -1, 249, 0, 213, -379, 0, -556, -15, + 499, 0, 0, 0, 0, 0, -33, 0, 0, 216, + 0, 0, 274, 0, 111, 254, -235, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -31, 0, 0, 163, + 114, 203, 104, 26, -255, 137, -444, 0, 0, -78, + 0, 0, 87, 240, 0, 0, 39, -269, 0, 47, + 0, 0, 0, 272, 294, 0, 0, -7, 4, 0, + 85, 0, 0, 93, 40, 97, 0, 100, 347, -102, + 32, 107, 0, 0, 0, 0, 0, 168, 0, 0, + 341, 199, 0, 72, 169, 0, 36, 0, 0, 0, + 0, -280, 0, 0, 0, 0, 0, 0, 0, 146, + 0, 0, 35, 0, 0, 0, 80, 141, 117, -253, + 23, 0, 0, -134, 0, 202, 0, 0, 0, 67, + 0, 0, 0, 0, 0, 0, 0, 16, -137, 147, + 257, 259, 314, 0, 0, 185, 0, -53, 269, 0, + 273, -100, 0, 0 ); protected array $gotoDefault = array( - -32768, 529, 764, 7, 765, 960, 840, 849, 593, 547, - 725, 352, 644, 435, 1360, 936, 1175, 613, 868, 1303, - 1309, 471, 871, 332, 751, 948, 919, 920, 411, 398, - 884, 409, 668, 645, 510, 904, 467, 896, 502, 899, - 466, 908, 165, 431, 526, 912, 6, 915, 575, 946, - 1000, 399, 923, 400, 696, 925, 597, 927, 928, 406, - 412, 413, 1180, 605, 641, 940, 258, 599, 941, 397, - 942, 950, 402, 404, 706, 482, 521, 515, 424, 1141, - 600, 628, 665, 460, 489, 639, 651, 638, 496, 447, - 430, 331, 984, 992, 503, 480, 1006, 354, 1014, 759, - 1188, 659, 505, 1022, 660, 1029, 1032, 548, 549, 494, - 1044, 268, 1047, 506, 1056, 26, 686, 1061, 1062, 687, - 661, 1084, 662, 688, 663, 1086, 479, 595, 1189, 478, - 1101, 1107, 468, 1110, 1349, 469, 1114, 266, 1117, 282, - 358, 381, 448, 1124, 1125, 12, 1131, 716, 717, 22, - 277, 525, 1159, 707, 1165, 276, 1168, 465, 1187, 464, - 1258, 1260, 576, 507, 1278, 317, 1281, 699, 522, 1286, - 461, 1351, 462, 550, 490, 339, 551, 1394, 310, 361, - 336, 567, 318, 362, 552, 491, 1357, 1365, 333, 34, - 1384, 1395, 610, 633 + -32768, 531, 766, 7, 767, 962, 842, 851, 595, 549, + 727, 354, 646, 437, 1363, 938, 1177, 615, 870, 1306, + 1312, 473, 873, 334, 753, 950, 921, 922, 413, 400, + 886, 411, 670, 647, 512, 906, 469, 898, 504, 901, + 468, 910, 166, 433, 528, 914, 6, 917, 577, 948, + 1002, 401, 925, 402, 698, 927, 599, 929, 930, 408, + 414, 415, 1182, 607, 643, 942, 259, 601, 943, 399, + 944, 952, 404, 406, 708, 484, 523, 517, 426, 1143, + 602, 630, 667, 462, 491, 641, 653, 640, 498, 449, + 432, 333, 986, 994, 505, 482, 1008, 356, 1016, 761, + 1190, 661, 507, 1024, 662, 1031, 1034, 550, 551, 496, + 1046, 269, 1049, 508, 1058, 26, 688, 1063, 1064, 689, + 663, 1086, 664, 690, 665, 1088, 481, 597, 1191, 480, + 1103, 1109, 470, 1112, 1352, 471, 1116, 267, 1119, 284, + 360, 383, 450, 1126, 1127, 12, 1133, 718, 719, 22, + 278, 527, 1161, 709, 1167, 277, 1170, 467, 1189, 466, + 1261, 1263, 578, 509, 1281, 319, 1284, 701, 524, 1289, + 463, 1354, 464, 552, 492, 341, 553, 1397, 312, 363, + 338, 569, 320, 364, 554, 493, 1360, 1368, 335, 34, + 1387, 1398, 612, 635 ); protected array $ruleToNonTerminal = array( @@ -1172,20 +1161,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 164, 165, 165, 166, 158, 158, 163, - 163, 167, 168, 168, 169, 170, 171, 171, 171, 171, - 19, 19, 73, 73, 73, 73, 159, 159, 159, 159, - 173, 173, 162, 162, 162, 160, 160, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 180, 180, 180, - 108, 182, 182, 182, 182, 161, 161, 161, 161, 161, - 161, 161, 161, 59, 59, 176, 176, 176, 176, 176, - 183, 183, 172, 172, 172, 172, 184, 184, 184, 184, - 184, 74, 74, 66, 66, 66, 66, 134, 134, 134, - 134, 187, 186, 175, 175, 175, 175, 175, 175, 174, - 174, 174, 185, 185, 185, 185, 107, 181, 189, 189, - 188, 188, 190, 190, 190, 190, 190, 190, 190, 190, - 178, 178, 178, 178, 177, 192, 191, 191, 191, 191, - 191, 191, 191, 191, 193, 193, 193, 193 + 42, 42, 42, 42, 164, 165, 165, 166, 158, 158, + 163, 163, 167, 168, 168, 169, 170, 171, 171, 171, + 171, 19, 19, 73, 73, 73, 73, 159, 159, 159, + 159, 173, 173, 162, 162, 162, 160, 160, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 180, 180, + 180, 108, 182, 182, 182, 182, 161, 161, 161, 161, + 161, 161, 161, 161, 59, 59, 176, 176, 176, 176, + 176, 183, 183, 172, 172, 172, 172, 184, 184, 184, + 184, 184, 74, 74, 66, 66, 66, 66, 134, 134, + 134, 134, 187, 186, 175, 175, 175, 175, 175, 175, + 174, 174, 174, 185, 185, 185, 185, 107, 181, 189, + 189, 188, 188, 190, 190, 190, 190, 190, 190, 190, + 190, 178, 178, 178, 178, 177, 192, 191, 191, 191, + 191, 191, 191, 191, 191, 193, 193, 193, 193 ); protected array $ruleToLength = array( @@ -1236,24 +1225,24 @@ class Php8 extends \PhpParser\ParserAbstract 3, 2, 2, 2, 2, 3, 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, 2, 8, 9, 8, 9, 9, - 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, - 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, - 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, - 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, - 1, 1, 1, 3, 1, 1, 1, 4, 1, 4, - 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, - 2, 1, 3, 1, 4, 3, 3, 3, 3, 1, - 3, 1, 1, 3, 1, 1, 4, 1, 1, 1, - 3, 1, 1, 2, 1, 3, 4, 3, 2, 0, - 2, 2, 1, 2, 1, 1, 1, 4, 3, 3, - 3, 3, 6, 3, 1, 1, 2, 1 + 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, 2, 8, 9, 8, 9, + 9, 10, 9, 10, 8, 3, 2, 2, 1, 1, + 0, 4, 2, 1, 3, 2, 1, 2, 2, 2, + 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, + 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, + 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, + 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, + 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, + 2, 2, 1, 3, 1, 4, 3, 3, 3, 3, + 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, + 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, + 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, + 3, 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -2456,152 +2445,152 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 476 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Pipe($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 477 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 478 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 479 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 480 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 481 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 482 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 483 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 484 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 485 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 486 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 487 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 488 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 489 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 490 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 490 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 497 => null, - 498 => static function ($self, $stackPos) { + 498 => null, + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 505 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 506 => static function ($self, $stackPos) { + 507 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 507 => static function ($self, $stackPos) { + 508 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 508 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 509 => static function ($self, $stackPos) { + 510 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 510 => static function ($self, $stackPos) { + 511 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 511 => static function ($self, $stackPos) { + 512 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 512 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 513 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 514 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 515 => static function ($self, $stackPos) { + 516 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 516 => static function ($self, $stackPos) { + 517 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 517 => null, 518 => null, - 519 => static function ($self, $stackPos) { + 519 => null, + 520 => static function ($self, $stackPos) { $self->semValue = array(); }, - 520 => static function ($self, $stackPos) { + 521 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 521 => null, - 522 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, + 522 => null, 523 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 524 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 525 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 526 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 527 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2610,304 +2599,307 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 529 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 530 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 531 => null, - 532 => static function ($self, $stackPos) { + 531 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 532 => null, 533 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 534 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 535 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 536 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 536 => null, 537 => null, - 538 => static function ($self, $stackPos) { + 538 => null, + 539 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 539 => static function ($self, $stackPos) { + 540 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 540 => null, 541 => null, - 542 => static function ($self, $stackPos) { + 542 => null, + 543 => static function ($self, $stackPos) { $self->semValue = array(); }, - 543 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 544 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 545 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = array(); }, - 546 => null, - 547 => static function ($self, $stackPos) { + 547 => null, + 548 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 548 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 549 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 550 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 551 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 552 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 553 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 554 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 555 => static function ($self, $stackPos) { + 556 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 556 => static function ($self, $stackPos) { + 557 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 557 => static function ($self, $stackPos) { + 558 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 558 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 559 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 560 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 561 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 562 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 563 => static function ($self, $stackPos) { + 564 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 564 => static function ($self, $stackPos) { + 565 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 565 => static function ($self, $stackPos) { + 566 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 566 => static function ($self, $stackPos) { + 567 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 567 => null, 568 => null, 569 => null, - 570 => static function ($self, $stackPos) { + 570 => null, + 571 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 571 => static function ($self, $stackPos) { + 572 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 572 => static function ($self, $stackPos) { + 573 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 573 => static function ($self, $stackPos) { + 574 => static function ($self, $stackPos) { $self->semValue = null; }, - 574 => null, 575 => null, - 576 => static function ($self, $stackPos) { + 576 => null, + 577 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 577 => null, 578 => null, 579 => null, 580 => null, 581 => null, 582 => null, - 583 => static function ($self, $stackPos) { + 583 => null, + 584 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 584 => null, 585 => null, 586 => null, - 587 => static function ($self, $stackPos) { + 587 => null, + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 588 => null, - 589 => static function ($self, $stackPos) { + 589 => null, + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 590 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 591 => static function ($self, $stackPos) { + 592 => static function ($self, $stackPos) { $self->semValue = null; }, - 592 => null, 593 => null, 594 => null, - 595 => static function ($self, $stackPos) { + 595 => null, + 596 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 597 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 597 => null, - 598 => static function ($self, $stackPos) { + 598 => null, + 599 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 599 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 600 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 601 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 602 => static function ($self, $stackPos) { + 603 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 603 => null, - 604 => static function ($self, $stackPos) { + 604 => null, + 605 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 605 => static function ($self, $stackPos) { + 606 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 606 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 607 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 608 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 609 => null, - 610 => static function ($self, $stackPos) { + 610 => null, + 611 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 611 => null, 612 => null, - 613 => static function ($self, $stackPos) { + 613 => null, + 614 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 614 => null, - 615 => static function ($self, $stackPos) { + 615 => null, + 616 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 616 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 617 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 618 => null, - 619 => static function ($self, $stackPos) { + 619 => null, + 620 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 620 => static function ($self, $stackPos) { + 621 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 621 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 622 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 623 => static function ($self, $stackPos) { + 624 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 624 => static function ($self, $stackPos) { + 625 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 625 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 626 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 627 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 628 => static function ($self, $stackPos) { + 629 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 629 => static function ($self, $stackPos) { + 630 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 630 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 631 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 632 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 633 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 634 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 635 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 636 => null, - 637 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 636 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 637 => null, 638 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 639 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 640 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 641 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 642 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 643 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 644 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 645 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 646 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 647 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 647 => null, + 648 => null, ]; } } diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index f4ca36645d..3ac0757c2d 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -425,6 +425,10 @@ protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node, int $precede return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right, $precedence, $lhsPrecedence); } + protected function pExpr_BinaryOp_Pipe(BinaryOp\Pipe $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Pipe::class, $node->left, ' |> ', $node->right, $precedence, $lhsPrecedence); + } + protected function pExpr_Instanceof(Expr\Instanceof_ $node, int $precedence, int $lhsPrecedence): string { return $this->pPostfixOp( Expr\Instanceof_::class, $node->expr, diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index 99ee4e9cbc..b4dec925c9 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -59,9 +59,11 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { BinaryOp\Mod::class => [ 40, 41, 40], BinaryOp\Plus::class => [ 50, 51, 50], BinaryOp\Minus::class => [ 50, 51, 50], + // FIXME: This precedence is incorrect for PHP 8. BinaryOp\Concat::class => [ 50, 51, 50], BinaryOp\ShiftLeft::class => [ 60, 61, 60], BinaryOp\ShiftRight::class => [ 60, 61, 60], + BinaryOp\Pipe::class => [ 65, 66, 65], BinaryOp\Smaller::class => [ 70, 70, 70], BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], BinaryOp\Greater::class => [ 70, 70, 70], @@ -1372,7 +1374,7 @@ protected function initializeFixupMap(): void { BinaryOp\NotIdentical::class, BinaryOp\Spaceship::class, BinaryOp\BitwiseAnd::class, BinaryOp\BitwiseXor::class, BinaryOp\BitwiseOr::class, BinaryOp\BooleanAnd::class, BinaryOp\BooleanOr::class, BinaryOp\Coalesce::class, BinaryOp\LogicalAnd::class, - BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, + BinaryOp\LogicalXor::class, BinaryOp\LogicalOr::class, BinaryOp\Pipe::class, ]; foreach ($binaryOps as $binaryOp) { $this->fixupMap[$binaryOp] = [ diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 7bd15ab912..539fd34f28 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -102,6 +102,12 @@ parameters: count: 1 path: lib/PhpParser/Lexer/Emulative.php + - + message: '#^Constant T_PIPE not found\.$#' + identifier: constant.notFound + count: 2 + path: lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php + - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse diff --git a/test/PhpParser/ConstExprEvaluatorTest.php b/test/PhpParser/ConstExprEvaluatorTest.php index fa0484ba8f..513918e56d 100644 --- a/test/PhpParser/ConstExprEvaluatorTest.php +++ b/test/PhpParser/ConstExprEvaluatorTest.php @@ -8,7 +8,7 @@ class ConstExprEvaluatorTest extends \PHPUnit\Framework\TestCase { /** @dataProvider provideTestEvaluate */ public function testEvaluate($exprString, $expected): void { - $parser = new Parser\Php7(new Lexer()); + $parser = (new ParserFactory())->createForNewestSupportedVersion(); $expr = $parser->parse('expr; $evaluator = new ConstExprEvaluator(); $this->assertSame($expected, $evaluator->evaluateDirectly($expr)); @@ -71,6 +71,7 @@ public static function provideTestEvaluate() { ['true || (1/0)', true], ['true or (1/0)', true], ['true xor false', true], + ['"foo" |> "strlen"', 3], ]; } diff --git a/test/code/parser/expr/pipe.test b/test/code/parser/expr/pipe.test new file mode 100644 index 0000000000..19b011d879 --- /dev/null +++ b/test/code/parser/expr/pipe.test @@ -0,0 +1,75 @@ +Pipe operator +----- + $b |> $c; +$a . $b |> $c . $d; +$a |> $b == $c; +$c == $a |> $b; +----- +array( + 0: Stmt_Expression( + expr: Expr_BinaryOp_Pipe( + left: Expr_BinaryOp_Pipe( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + right: Expr_Variable( + name: c + ) + ) + ) + 1: Stmt_Expression( + expr: Expr_BinaryOp_Pipe( + left: Expr_BinaryOp_Concat( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + right: Expr_BinaryOp_Concat( + left: Expr_Variable( + name: c + ) + right: Expr_Variable( + name: d + ) + ) + ) + ) + 2: Stmt_Expression( + expr: Expr_BinaryOp_Equal( + left: Expr_BinaryOp_Pipe( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + right: Expr_Variable( + name: c + ) + ) + ) + 3: Stmt_Expression( + expr: Expr_BinaryOp_Equal( + left: Expr_Variable( + name: c + ) + right: Expr_BinaryOp_Pipe( + left: Expr_Variable( + name: a + ) + right: Expr_Variable( + name: b + ) + ) + ) + ) +) \ No newline at end of file diff --git a/test/code/prettyPrinter/expr/pipe.test b/test/code/prettyPrinter/expr/pipe.test new file mode 100644 index 0000000000..68b2195d36 --- /dev/null +++ b/test/code/prettyPrinter/expr/pipe.test @@ -0,0 +1,16 @@ +Pipe operator +----- + $b |> $c; +$a . $b |> $c . $d; +$a |> $b == $c; +$c == $a |> $b; +($a == $b) |> ($c == $d); +$a . ($b |> $c) . $d; +----- +$a |> $b |> $c; +$a . $b |> $c . $d; +$a |> $b == $c; +$c == $a |> $b; +($a == $b) |> ($c == $d); +$a . ($b |> $c) . $d; \ No newline at end of file From 3e74153456f9a3f69000272eeac8779f3289ab4f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 20 Jul 2025 19:10:09 +0200 Subject: [PATCH 417/428] Add emulation support for void cast --- lib/PhpParser/Lexer/Emulative.php | 2 + .../Lexer/TokenEmulator/VoidCastEmulator.php | 98 +++++++++++++++++++ lib/PhpParser/compatibility_tokens.php | 1 + phpstan-baseline.neon | 6 ++ test/PhpParser/Lexer/EmulativeTest.php | 34 ++++++- 5 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php diff --git a/lib/PhpParser/Lexer/Emulative.php b/lib/PhpParser/Lexer/Emulative.php index be4a41f95e..3185e808ea 100644 --- a/lib/PhpParser/Lexer/Emulative.php +++ b/lib/PhpParser/Lexer/Emulative.php @@ -17,6 +17,7 @@ use PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReverseEmulator; use PhpParser\Lexer\TokenEmulator\TokenEmulator; +use PhpParser\Lexer\TokenEmulator\VoidCastEmulator; use PhpParser\PhpVersion; use PhpParser\Token; @@ -49,6 +50,7 @@ public function __construct(?PhpVersion $phpVersion = null) { new PropertyTokenEmulator(), new AsymmetricVisibilityTokenEmulator(), new PipeOperatorEmulator(), + new VoidCastEmulator(), ]; // Collect emulators that are relevant for the PHP version we're running diff --git a/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php b/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php new file mode 100644 index 0000000000..b6dcacf667 --- /dev/null +++ b/lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php @@ -0,0 +1,98 @@ +text !== '(') { + continue; + } + + $numTokens = 1; + $text = '('; + $j = $i + 1; + if ($j < $c && $tokens[$j]->id === \T_WHITESPACE && preg_match('/[ \t]+/', $tokens[$j]->text)) { + $text .= $tokens[$j]->text; + $numTokens++; + $j++; + } + + if ($j >= $c || $tokens[$j]->id !== \T_STRING || \strtolower($tokens[$j]->text) !== 'void') { + continue; + } + + $text .= $tokens[$j]->text; + $numTokens++; + $k = $j + 1; + if ($k < $c && $tokens[$k]->id === \T_WHITESPACE && preg_match('/[ \t]+/', $tokens[$k]->text)) { + $text .= $tokens[$k]->text; + $numTokens++; + $k++; + } + + if ($k >= $c || $tokens[$k]->text !== ')') { + continue; + } + + $text .= ')'; + $numTokens++; + array_splice($tokens, $i, $numTokens, [ + new Token(\T_VOID_CAST, $text, $token->line, $token->pos), + ]); + $c -= $numTokens - 1; + } + return $tokens; + } + + public function reverseEmulate(string $code, array $tokens): array { + for ($i = 0, $c = count($tokens); $i < $c; ++$i) { + $token = $tokens[$i]; + if ($token->id !== \T_VOID_CAST) { + continue; + } + + if (!preg_match('/^\(([ \t]*)(void)([ \t]*)\)$/i', $token->text, $match)) { + throw new \LogicException('Unexpected T_VOID_CAST contents'); + } + + $newTokens = []; + $pos = $token->pos; + + $newTokens[] = new Token(\ord('('), '(', $token->line, $pos); + $pos++; + + if ($match[1] !== '') { + $newTokens[] = new Token(\T_WHITESPACE, $match[1], $token->line, $pos); + $pos += \strlen($match[1]); + } + + $newTokens[] = new Token(\T_STRING, $match[2], $token->line, $pos); + $pos += \strlen($match[2]); + + if ($match[3] !== '') { + $newTokens[] = new Token(\T_WHITESPACE, $match[3], $token->line, $pos); + $pos += \strlen($match[3]); + } + + $newTokens[] = new Token(\ord(')'), ')', $token->line, $pos); + + array_splice($tokens, $i, 1, $newTokens); + $i += \count($newTokens) - 1; + $c += \count($newTokens) - 1; + } + return $tokens; + } +} diff --git a/lib/PhpParser/compatibility_tokens.php b/lib/PhpParser/compatibility_tokens.php index 28eb489dd0..ced038d47f 100644 --- a/lib/PhpParser/compatibility_tokens.php +++ b/lib/PhpParser/compatibility_tokens.php @@ -24,6 +24,7 @@ function defineCompatibilityTokens(): void { 'T_PRIVATE_SET', // PHP 8.5 'T_PIPE', + 'T_VOID_CAST', ]; // PHP-Parser might be used together with another library that also emulates some or all diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 539fd34f28..fb65409e3b 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -108,6 +108,12 @@ parameters: count: 2 path: lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php + - + message: '#^Constant T_VOID_CAST not found\.$#' + identifier: constant.notFound + count: 2 + path: lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php + - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse diff --git a/test/PhpParser/Lexer/EmulativeTest.php b/test/PhpParser/Lexer/EmulativeTest.php index 209cbbe42f..2613289a30 100644 --- a/test/PhpParser/Lexer/EmulativeTest.php +++ b/test/PhpParser/Lexer/EmulativeTest.php @@ -429,6 +429,22 @@ public static function provideTestLexNewFeatures() { ['|>', [ [\T_PIPE, '|>'] ]], + + // PHP 8.5: Void cast + ['(void)', [ + [\T_VOID_CAST, '(void)'], + ]], + ["( \tvoid \t)", [ + [\T_VOID_CAST, "( \tvoid \t)"], + ]], + ['( vOiD)', [ + [\T_VOID_CAST, '( vOiD)'], + ]], + ["(void\n)", [ + [\ord('('), '('], + [\T_STRING, 'void'], + [\ord(')'), ')'], + ]], ]; } @@ -482,7 +498,23 @@ public static function provideTestTargetVersion() { ['8.4', '|>', [ [\ord('|'), '|'], [\ord('>'), '>'], - ]] + ]], + ['8.5', '(void)', [ + [\T_VOID_CAST, '(void)'], + ]], + ['8.5', "( \tvoid \t)", [ + [\T_VOID_CAST, "( \tvoid \t)"], + ]], + ['8.4', '(void)', [ + [\ord('('), '('], + [\T_STRING, 'void'], + [\ord(')'), ')'], + ]], + ['8.4', "( \tVOID \t)", [ + [\ord('('), '('], + [\T_STRING, 'VOID'], + [\ord(')'), ')'], + ]], ]; } } From 507fa7632ea7d88d022f55bcd668b30f51daf224 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 20 Jul 2025 20:45:23 +0200 Subject: [PATCH 418/428] Add support for void cast We model this as an expression, just like all the other casts, even though PHP treats (void) specially and makes it a statement. However, it has a peculiar carve-out where (void) *is* allowed in for init and loop expression lists (which only accept expressions, not statements). As such, we need to model it as an expression. --- grammar/php.y | 2 + lib/PhpParser/Node/Expr/Cast/Void_.php | 11 + lib/PhpParser/Parser/Php7.php | 1970 ++++++++++---------- lib/PhpParser/Parser/Php8.php | 1939 ++++++++++--------- lib/PhpParser/PrettyPrinter/Standard.php | 4 + lib/PhpParser/PrettyPrinterAbstract.php | 1 + test/code/parser/stmt/voidCast.test | 95 + test/code/prettyPrinter/stmt/voidCast.test | 6 + 8 files changed, 2068 insertions(+), 1960 deletions(-) create mode 100644 lib/PhpParser/Node/Expr/Cast/Void_.php create mode 100644 test/code/parser/stmt/voidCast.test create mode 100644 test/code/prettyPrinter/stmt/voidCast.test diff --git a/grammar/php.y b/grammar/php.y index f82f045b60..e152e1d606 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1,6 +1,7 @@ %pure_parser %expect 2 +%right T_VOID_CAST %right T_THROW %left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE %left ',' @@ -1111,6 +1112,7 @@ expr: | 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_VOID_CAST expr { $$ = Expr\Cast\Void_ [$2]; } | T_EXIT ctor_arguments { $$ = $this->createExitExpr($1, #1, $2, attributes()); } | '@' expr { $$ = Expr\ErrorSuppress[$2]; } diff --git a/lib/PhpParser/Node/Expr/Cast/Void_.php b/lib/PhpParser/Node/Expr/Cast/Void_.php new file mode 100644 index 0000000000..bc9c23fc00 --- /dev/null +++ b/lib/PhpParser/Node/Expr/Cast/Void_.php @@ -0,0 +1,11 @@ +semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 493 => static function ($self, $stackPos) { - $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 494 => static function ($self, $stackPos) { + $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 495 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => null, - 496 => static function ($self, $stackPos) { + 496 => null, + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 505 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 506 => static function ($self, $stackPos) { + 507 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 507 => static function ($self, $stackPos) { + 508 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 508 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 509 => static function ($self, $stackPos) { + 510 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 510 => static function ($self, $stackPos) { + 511 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 511 => static function ($self, $stackPos) { + 512 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 512 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 513 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 514 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 515 => null, 516 => null, - 517 => static function ($self, $stackPos) { + 517 => null, + 518 => static function ($self, $stackPos) { $self->semValue = array(); }, - 518 => static function ($self, $stackPos) { + 519 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 519 => null, - 520 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, + 520 => null, 521 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 522 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 523 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 524 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 525 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2600,310 +2593,313 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 527 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 528 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 529 => null, - 530 => static function ($self, $stackPos) { + 529 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 530 => null, 531 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 532 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 533 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 534 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 534 => null, 535 => null, - 536 => static function ($self, $stackPos) { + 536 => null, + 537 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 537 => static function ($self, $stackPos) { + 538 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 538 => null, 539 => null, - 540 => static function ($self, $stackPos) { + 540 => null, + 541 => static function ($self, $stackPos) { $self->semValue = array(); }, - 541 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 542 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 543 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { $self->semValue = array(); }, - 544 => null, - 545 => static function ($self, $stackPos) { + 545 => null, + 546 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 546 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 547 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 548 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 549 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 550 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 551 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 552 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 553 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 554 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 555 => static function ($self, $stackPos) { + 556 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 556 => static function ($self, $stackPos) { + 557 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 557 => static function ($self, $stackPos) { + 558 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 558 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 559 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 560 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 561 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 562 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 563 => static function ($self, $stackPos) { + 564 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 564 => static function ($self, $stackPos) { + 565 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 565 => null, 566 => null, 567 => null, - 568 => static function ($self, $stackPos) { + 568 => null, + 569 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 569 => static function ($self, $stackPos) { + 570 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 570 => static function ($self, $stackPos) { + 571 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 571 => static function ($self, $stackPos) { + 572 => static function ($self, $stackPos) { $self->semValue = null; }, - 572 => null, 573 => null, - 574 => static function ($self, $stackPos) { + 574 => null, + 575 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 575 => null, 576 => null, 577 => null, 578 => null, 579 => null, 580 => null, - 581 => static function ($self, $stackPos) { + 581 => null, + 582 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 582 => null, 583 => null, 584 => null, - 585 => static function ($self, $stackPos) { + 585 => null, + 586 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 586 => static function ($self, $stackPos) { + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 587 => null, - 588 => static function ($self, $stackPos) { + 588 => null, + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 589 => static function ($self, $stackPos) { + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 590 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $self->semValue = null; }, - 591 => null, 592 => null, 593 => null, - 594 => static function ($self, $stackPos) { + 594 => null, + 595 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 595 => static function ($self, $stackPos) { + 596 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 596 => null, - 597 => static function ($self, $stackPos) { + 597 => null, + 598 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 598 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 599 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 600 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 601 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 602 => null, - 603 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, + 603 => null, 604 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 605 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 606 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 607 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 608 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 609 => null, - 610 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 610 => null, + 611 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 611 => null, 612 => null, - 613 => static function ($self, $stackPos) { + 613 => null, + 614 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 614 => null, - 615 => static function ($self, $stackPos) { + 615 => null, + 616 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 616 => static function ($self, $stackPos) { + 617 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 617 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 618 => null, - 619 => static function ($self, $stackPos) { + 619 => null, + 620 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 620 => static function ($self, $stackPos) { + 621 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 621 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 622 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 623 => static function ($self, $stackPos) { + 624 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 624 => static function ($self, $stackPos) { + 625 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 625 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 626 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 627 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 628 => static function ($self, $stackPos) { + 629 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 629 => static function ($self, $stackPos) { + 630 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 630 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 631 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 632 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 633 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 634 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 635 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 636 => null, - 637 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 636 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 637 => null, 638 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 639 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 640 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 641 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 642 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 643 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 644 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 645 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 646 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 647 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 647 => null, + 648 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 8327f110fe..882a9dc69f 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -19,166 +19,168 @@ class Php8 extends \PhpParser\ParserAbstract { public const YYERRTOK = 256; - public const T_THROW = 257; - public const T_INCLUDE = 258; - public const T_INCLUDE_ONCE = 259; - public const T_EVAL = 260; - public const T_REQUIRE = 261; - public const T_REQUIRE_ONCE = 262; - public const T_LOGICAL_OR = 263; - public const T_LOGICAL_XOR = 264; - public const T_LOGICAL_AND = 265; - public const T_PRINT = 266; - public const T_YIELD = 267; - public const T_DOUBLE_ARROW = 268; - public const T_YIELD_FROM = 269; - public const T_PLUS_EQUAL = 270; - public const T_MINUS_EQUAL = 271; - public const T_MUL_EQUAL = 272; - public const T_DIV_EQUAL = 273; - public const T_CONCAT_EQUAL = 274; - public const T_MOD_EQUAL = 275; - public const T_AND_EQUAL = 276; - public const T_OR_EQUAL = 277; - public const T_XOR_EQUAL = 278; - public const T_SL_EQUAL = 279; - public const T_SR_EQUAL = 280; - public const T_POW_EQUAL = 281; - public const T_COALESCE_EQUAL = 282; - public const T_COALESCE = 283; - public const T_BOOLEAN_OR = 284; - public const T_BOOLEAN_AND = 285; - public const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286; - public const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287; - public const T_IS_EQUAL = 288; - public const T_IS_NOT_EQUAL = 289; - public const T_IS_IDENTICAL = 290; - public const T_IS_NOT_IDENTICAL = 291; - public const T_SPACESHIP = 292; - public const T_IS_SMALLER_OR_EQUAL = 293; - public const T_IS_GREATER_OR_EQUAL = 294; - public const T_PIPE = 295; - public const T_SL = 296; - public const T_SR = 297; - public const T_INSTANCEOF = 298; - public const T_INC = 299; - public const T_DEC = 300; - public const T_INT_CAST = 301; - public const T_DOUBLE_CAST = 302; - public const T_STRING_CAST = 303; - public const T_ARRAY_CAST = 304; - public const T_OBJECT_CAST = 305; - public const T_BOOL_CAST = 306; - public const T_UNSET_CAST = 307; - public const T_POW = 308; - public const T_NEW = 309; - public const T_CLONE = 310; - public const T_EXIT = 311; - public const T_IF = 312; - public const T_ELSEIF = 313; - public const T_ELSE = 314; - public const T_ENDIF = 315; - public const T_LNUMBER = 316; - public const T_DNUMBER = 317; - public const T_STRING = 318; - public const T_STRING_VARNAME = 319; - public const T_VARIABLE = 320; - public const T_NUM_STRING = 321; - public const T_INLINE_HTML = 322; - public const T_ENCAPSED_AND_WHITESPACE = 323; - public const T_CONSTANT_ENCAPSED_STRING = 324; - public const T_ECHO = 325; - public const T_DO = 326; - public const T_WHILE = 327; - public const T_ENDWHILE = 328; - public const T_FOR = 329; - public const T_ENDFOR = 330; - public const T_FOREACH = 331; - public const T_ENDFOREACH = 332; - public const T_DECLARE = 333; - public const T_ENDDECLARE = 334; - public const T_AS = 335; - public const T_SWITCH = 336; - public const T_MATCH = 337; - public const T_ENDSWITCH = 338; - public const T_CASE = 339; - public const T_DEFAULT = 340; - public const T_BREAK = 341; - public const T_CONTINUE = 342; - public const T_GOTO = 343; - public const T_FUNCTION = 344; - public const T_FN = 345; - public const T_CONST = 346; - public const T_RETURN = 347; - public const T_TRY = 348; - public const T_CATCH = 349; - public const T_FINALLY = 350; - public const T_USE = 351; - public const T_INSTEADOF = 352; - public const T_GLOBAL = 353; - public const T_STATIC = 354; - public const T_ABSTRACT = 355; - public const T_FINAL = 356; - public const T_PRIVATE = 357; - public const T_PROTECTED = 358; - public const T_PUBLIC = 359; - public const T_READONLY = 360; - public const T_PUBLIC_SET = 361; - public const T_PROTECTED_SET = 362; - public const T_PRIVATE_SET = 363; - public const T_VAR = 364; - public const T_UNSET = 365; - public const T_ISSET = 366; - public const T_EMPTY = 367; - public const T_HALT_COMPILER = 368; - public const T_CLASS = 369; - public const T_TRAIT = 370; - public const T_INTERFACE = 371; - public const T_ENUM = 372; - public const T_EXTENDS = 373; - public const T_IMPLEMENTS = 374; - public const T_OBJECT_OPERATOR = 375; - public const T_NULLSAFE_OBJECT_OPERATOR = 376; - public const T_LIST = 377; - public const T_ARRAY = 378; - public const T_CALLABLE = 379; - public const T_CLASS_C = 380; - public const T_TRAIT_C = 381; - public const T_METHOD_C = 382; - public const T_FUNC_C = 383; - public const T_PROPERTY_C = 384; - public const T_LINE = 385; - public const T_FILE = 386; - public const T_START_HEREDOC = 387; - public const T_END_HEREDOC = 388; - public const T_DOLLAR_OPEN_CURLY_BRACES = 389; - public const T_CURLY_OPEN = 390; - public const T_PAAMAYIM_NEKUDOTAYIM = 391; - public const T_NAMESPACE = 392; - public const T_NS_C = 393; - public const T_DIR = 394; - public const T_NS_SEPARATOR = 395; - public const T_ELLIPSIS = 396; - public const T_NAME_FULLY_QUALIFIED = 397; - public const T_NAME_QUALIFIED = 398; - public const T_NAME_RELATIVE = 399; - public const T_ATTRIBUTE = 400; + public const T_VOID_CAST = 257; + public const T_THROW = 258; + public const T_INCLUDE = 259; + public const T_INCLUDE_ONCE = 260; + public const T_EVAL = 261; + public const T_REQUIRE = 262; + public const T_REQUIRE_ONCE = 263; + public const T_LOGICAL_OR = 264; + public const T_LOGICAL_XOR = 265; + public const T_LOGICAL_AND = 266; + public const T_PRINT = 267; + public const T_YIELD = 268; + public const T_DOUBLE_ARROW = 269; + public const T_YIELD_FROM = 270; + public const T_PLUS_EQUAL = 271; + public const T_MINUS_EQUAL = 272; + public const T_MUL_EQUAL = 273; + public const T_DIV_EQUAL = 274; + public const T_CONCAT_EQUAL = 275; + public const T_MOD_EQUAL = 276; + public const T_AND_EQUAL = 277; + public const T_OR_EQUAL = 278; + public const T_XOR_EQUAL = 279; + public const T_SL_EQUAL = 280; + public const T_SR_EQUAL = 281; + public const T_POW_EQUAL = 282; + public const T_COALESCE_EQUAL = 283; + public const T_COALESCE = 284; + public const T_BOOLEAN_OR = 285; + public const T_BOOLEAN_AND = 286; + public const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 287; + public const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 288; + public const T_IS_EQUAL = 289; + public const T_IS_NOT_EQUAL = 290; + public const T_IS_IDENTICAL = 291; + public const T_IS_NOT_IDENTICAL = 292; + public const T_SPACESHIP = 293; + public const T_IS_SMALLER_OR_EQUAL = 294; + public const T_IS_GREATER_OR_EQUAL = 295; + public const T_PIPE = 296; + public const T_SL = 297; + public const T_SR = 298; + public const T_INSTANCEOF = 299; + public const T_INC = 300; + public const T_DEC = 301; + public const T_INT_CAST = 302; + public const T_DOUBLE_CAST = 303; + public const T_STRING_CAST = 304; + public const T_ARRAY_CAST = 305; + public const T_OBJECT_CAST = 306; + public const T_BOOL_CAST = 307; + public const T_UNSET_CAST = 308; + public const T_POW = 309; + public const T_NEW = 310; + public const T_CLONE = 311; + public const T_EXIT = 312; + public const T_IF = 313; + public const T_ELSEIF = 314; + public const T_ELSE = 315; + public const T_ENDIF = 316; + public const T_LNUMBER = 317; + public const T_DNUMBER = 318; + public const T_STRING = 319; + public const T_STRING_VARNAME = 320; + public const T_VARIABLE = 321; + public const T_NUM_STRING = 322; + public const T_INLINE_HTML = 323; + public const T_ENCAPSED_AND_WHITESPACE = 324; + public const T_CONSTANT_ENCAPSED_STRING = 325; + public const T_ECHO = 326; + public const T_DO = 327; + public const T_WHILE = 328; + public const T_ENDWHILE = 329; + public const T_FOR = 330; + public const T_ENDFOR = 331; + public const T_FOREACH = 332; + public const T_ENDFOREACH = 333; + public const T_DECLARE = 334; + public const T_ENDDECLARE = 335; + public const T_AS = 336; + public const T_SWITCH = 337; + public const T_MATCH = 338; + public const T_ENDSWITCH = 339; + public const T_CASE = 340; + public const T_DEFAULT = 341; + public const T_BREAK = 342; + public const T_CONTINUE = 343; + public const T_GOTO = 344; + public const T_FUNCTION = 345; + public const T_FN = 346; + public const T_CONST = 347; + public const T_RETURN = 348; + public const T_TRY = 349; + public const T_CATCH = 350; + public const T_FINALLY = 351; + public const T_USE = 352; + public const T_INSTEADOF = 353; + public const T_GLOBAL = 354; + public const T_STATIC = 355; + public const T_ABSTRACT = 356; + public const T_FINAL = 357; + public const T_PRIVATE = 358; + public const T_PROTECTED = 359; + public const T_PUBLIC = 360; + public const T_READONLY = 361; + public const T_PUBLIC_SET = 362; + public const T_PROTECTED_SET = 363; + public const T_PRIVATE_SET = 364; + public const T_VAR = 365; + public const T_UNSET = 366; + public const T_ISSET = 367; + public const T_EMPTY = 368; + public const T_HALT_COMPILER = 369; + public const T_CLASS = 370; + public const T_TRAIT = 371; + public const T_INTERFACE = 372; + public const T_ENUM = 373; + public const T_EXTENDS = 374; + public const T_IMPLEMENTS = 375; + public const T_OBJECT_OPERATOR = 376; + public const T_NULLSAFE_OBJECT_OPERATOR = 377; + public const T_LIST = 378; + public const T_ARRAY = 379; + public const T_CALLABLE = 380; + public const T_CLASS_C = 381; + public const T_TRAIT_C = 382; + public const T_METHOD_C = 383; + public const T_FUNC_C = 384; + public const T_PROPERTY_C = 385; + public const T_LINE = 386; + public const T_FILE = 387; + public const T_START_HEREDOC = 388; + public const T_END_HEREDOC = 389; + public const T_DOLLAR_OPEN_CURLY_BRACES = 390; + public const T_CURLY_OPEN = 391; + public const T_PAAMAYIM_NEKUDOTAYIM = 392; + public const T_NAMESPACE = 393; + public const T_NS_C = 394; + public const T_DIR = 395; + public const T_NS_SEPARATOR = 396; + public const T_ELLIPSIS = 397; + public const T_NAME_FULLY_QUALIFIED = 398; + public const T_NAME_QUALIFIED = 399; + public const T_NAME_RELATIVE = 400; + public const T_ATTRIBUTE = 401; - protected int $tokenToSymbolMapSize = 401; - protected int $actionTableSize = 1528; - protected int $gotoTableSize = 715; + protected int $tokenToSymbolMapSize = 402; + protected int $actionTableSize = 1537; + protected int $gotoTableSize = 642; - protected int $invalidSymbol = 173; + protected int $invalidSymbol = 174; protected int $errorSymbol = 1; protected int $defaultAction = -32766; protected int $unexpectedTokenRule = 32767; - protected int $YY2TBLSTATE = 450; - protected int $numNonLeafStates = 765; + protected int $YY2TBLSTATE = 452; + protected int $numNonLeafStates = 767; protected array $symbolToName = array( "EOF", "error", + "T_VOID_CAST", "T_THROW", "T_INCLUDE", "T_INCLUDE_ONCE", @@ -353,37 +355,37 @@ class Php8 extends \PhpParser\ParserAbstract ); protected array $tokenToSymbol = array( - 0, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 57, 171, 173, 172, 56, 173, 173, - 166, 167, 54, 52, 8, 53, 49, 55, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 31, 164, - 44, 16, 46, 30, 69, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 71, 173, 165, 36, 173, 170, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 168, 35, 169, 59, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 1, 2, 3, 4, - 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, - 41, 42, 43, 45, 47, 48, 50, 51, 58, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 70, 72, + 0, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 58, 172, 174, 173, 57, 174, 174, + 167, 168, 55, 53, 9, 54, 50, 56, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 32, 165, + 45, 17, 47, 31, 70, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 72, 174, 166, 37, 174, 171, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 169, 36, 170, 60, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 174, + 174, 174, 174, 174, 174, 174, 1, 2, 3, 4, + 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, + 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 33, 34, 35, 38, 39, 40, + 41, 42, 43, 44, 46, 48, 49, 51, 52, 59, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, @@ -393,402 +395,404 @@ class Php8 extends \PhpParser\ParserAbstract 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163 + 163, 164 ); protected array $action = array( - 131, 132, 133, 580, 134, 135, 0, 777, 778, 779, - 136, 41, 861,-32766, 863, 1400, -582, 972, 971, 1298, - 576, 393, 394, 453, 1059, 852,-32766,-32766,-32766, 4, - -32766, 438,-32766, 968,-32766, 771, 770,-32766,-32766,-32766, - -32766, 506,-32766,-32766,-32766, 244, 988, 989,-32766,-32766, - -382, 990, -382, -340,-32766, 435, 780, 1381, 5,-32766, - 984,-32766,-32766,-32766,-32766,-32766,-32766, 970, 29, 298, - 268, 53, 396, 784, 785, 786, 787, 303, -195, 439, - 38, 39, 252, -582, -582, 1337, 841, 788, 789, 790, - 791, 792, 793, 794, 795, 796, 797, 817, 581, 818, - 819, 820, 821, 809, 810, 351, 352, 812, 813, 798, - 799, 800, 802, 803, 804, 366, 844, 845, 846, 847, - 848, 582,-32766,-32766,-32766, 805, 806, 583, 584, 138, - 829, 827, 828, 840, 824, 825, -194, 852, 585, 586, - 823, 587, 588, 589, 590, 3, 591, 592, 393, 394, - -32766,-32766,-32766, 826, 593, 594,-32766, 137, 438, 131, - 132, 133, 580, 134, 135, 1095, 777, 778, 779, 136, - 41,-32766,-32766,-32766,-32766,-32766,-32766, 862, 1298, 611, - 1366, 1068, 106, 107, 108,-32766,-32766,-32766, 165,-32766, - 889,-32766, 890,-32766, 771, 770,-32766, 161, -275, 1305, - 747,-32766,-32766,-32766, 303, 297, 500,-32766,-32766, 475, - 476, 477, -340,-32766, 435, 780,-32767,-32767,-32767,-32767, - 105, 106, 107, 108, 143,-32766, 395, 394, 330, 268, - 53, 396, 784, 785, 786, 787, 438, -195, 439,-32766, - -32766,-32766, 147, 860, 130, 841, 788, 789, 790, 791, - 792, 793, 794, 795, 796, 797, 817, 581, 818, 819, - 820, 821, 809, 810, 351, 352, 812, 813, 798, 799, - 800, 802, 803, 804, 366, 844, 845, 846, 847, 848, - 582, 861, 255, 857, 805, 806, 583, 584, 854, 829, - 827, 828, 840, 824, 825, -194, 314, 585, 586, 823, - 587, 588, 589, 590, 321, 591, 592, 1019,-32766,-32766, - -32766,-32766, 826, 593, 594, -85, 137,-32766, 131, 132, - 133, 580, 134, 135, 1092, 777, 778, 779, 136, 41, - -32766,-32766,-32766,-32766,-32766, 51, 152, 1298, 1172,-32766, - 27,-32766, 752, 501,-32766,-32766,-32766, 85,-32766, 762, - -32766, 330,-32766, 771, 770,-32766, 405, 628, 10, 318, - -32766,-32766,-32766, 858, 78, 1145,-32766,-32766, 856, 327, - 330,-32766,-32766, 435, 780, 734, 1065, 109, 110, 111, - 112, 113, -85, 281,-32766, 889, 347, 890, 268, 53, - 396, 784, 785, 786, 787, 114, 1068, 439, -618, 331, - -618, 1068, 304, 305, 841, 788, 789, 790, 791, 792, - 793, 794, 795, 796, 797, 817, 581, 818, 819, 820, - 821, 809, 810, 351, 352, 812, 813, 798, 799, 800, - 802, 803, 804, 366, 844, 845, 846, 847, 848, 582, - 1020, 348, -580, 805, 806, 583, 584, 381, 829, 827, - 828, 840, 824, 825, 243, 387, 585, 586, 823, 587, - 588, 589, 590, 403, 591, 592, 486, 487,-32766,-32766, - -32766, 826, 593, 594, 457, 150, -579, 131, 132, 133, - 580, 134, 135, 1097, 777, 778, 779, 136, 41,-32766, - 458,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, - -32767,-32767,-32767,-32766,-32766,-32766, 459, 1130, 460, -580, - -580, 760, 771, 770, 1156, 1157, 1158, 1152, 1151, 1150, - 1159, 1153, 1154, 1155,-32766, -580,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 780,-32766,-32766,-32766, -586, 1385,-32766, - -32766,-32766, 867, -579, -579, 1384, -87, 268, 53, 396, - 784, 785, 786, 787, 153,-32766, 439,-32766,-32766, -579, - -32766,-32766,-32766, 841, 788, 789, 790, 791, 792, 793, - 794, 795, 796, 797, 817, 581, 818, 819, 820, 821, - 809, 810, 351, 352, 812, 813, 798, 799, 800, 802, - 803, 804, 366, 844, 845, 846, 847, 848, 582, 771, - 770, 155, 805, 806, 583, 584, 156, 829, 827, 828, - 840, 824, 825, 439, 157, 585, 586, 823, 587, 588, - 589, 590, 159, 591, 592, 36, 86, 87, 88, -78, - 826, 593, 594, -84, 150, 801, 772, 773, 774, 775, - 776, 852, 777, 778, 779, 814, 815, 40, -58, 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, -57, 281, 128, 1156, 1157, 1158, - 1152, 1151, 1150, 1159, 1153, 1154, 1155, 114, 129, 634, - 139, 780, 1300, 1299, 1301,-32766,-32766, 1129, 107, 108, - 140, 1131, 677, 24, 1325, 781, 782, 783, 784, 785, - 786, 787, 151, 421, 850, 146, -578, 1410, 696, 697, - 1411, 841, 788, 789, 790, 791, 792, 793, 794, 795, - 796, 797, 817, 839, 818, 819, 820, 821, 809, 810, - 811, 838, 812, 813, 798, 799, 800, 802, 803, 804, - 843, 844, 845, 846, 847, 848, 849, 391, 392, 160, - 805, 806, 807, 808, 1298, 829, 827, 828, 840, 824, - 825, 397, 398, 816, 822, 823, 830, 831, 833, 832, - 162, 834, 835, -578, -578, 163, 861, 164, 826, 837, - 836, 54, 55, 56, 532, 57, 58, -78, -110, -578, - 1296, 59, 60, -110, 61, -110, 947, 947, -73, -72, - 310, -585, -71, -110, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, 1067, 947, 668, 669, -70, -69, - -68, -67, -66, -65, -46, -18, 737, 738, 144, 279, - 289, 62, 63, 1300, 1299, 1301, 64, 748, 65, 249, - 250, 66, 67, 68, 69, 70, 71, 72, 73, -577, - 31, 274, 47, 455, 533, -356, 751,-32766, 1331, 1332, - 534, 142, 861, 946, 1091, 330, 1329, 45, 23, 535, - 149, 536, 1065, 537, 293, 538, -308, 947, 539, 540, - 937, 937, 1068, 48, 49, 461, 390, 389, -304, 50, - 541, 286, 287, 292, 298, 379, 346, 1068, 294, 937, - 290, 291, 1291, 336, 299, 281, 297, 543, 544, 545, - 300, 148, 771, 770, 114, 964, -577, -577, 947, 547, - 548, 288, 1317, 1318, 1319, 1320, 1322, 1314, 1315, 302, - 706, 852, -577, 1412, 861, 1321, 1316, 1163, 598, 1300, - 1299, 1301, 303, 721, -584, 74, 31, 275, 739, 325, - 326, 330, -154, -154, -154,-32766, 683, 666, 861, 949, - 949, 937, 1329, 732, 732, 678, 699, -154, 13, -154, - 483, -154, 723, -154, 985, 311, 511,-32766, 949, 1336, - 1065,-32766, 732, 388, 1052, 1051, 1050, 1056, 1053, 1054, - 1055, 684, 700, 604, 988, 989, 1338, 966, 1291, 542, - -576, -278, 937, 1264, 632, 1068, 1068, 923, 984, -110, - -110, -110, -542, 0, 0, 547, 548, 308, 1317, 1318, - 1319, 1320, 1322, 1314, 1315, 317, 1330, 771, 770, 288, - 297, 1321, 1316, 309, -532, 0, 11, 52, 30, 385, - 949, 76, 0, 860, 732, -154, 326, 330, 35, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 303, 1326, 43,-32766, 44, -576, -576, -4, - 947, 1298, 771, 770, 757, 758, 880, 928,-32766,-32766, - -32766, 1005,-32766, -576,-32766, 732,-32766, 1029, 1006,-32766, - 1013, 1003, 1206, 1208,-32766,-32766,-32766, 1014, 926, 1001, - -32766,-32766, 1134, -576, 306, 307,-32766, 435, 1137, 1138, - -32766, 1135, 1174, 1136, 1142, 420, 1298, 872,-32766, 1353, - 386, 31, 274,-32766,-32766,-32766, 1370,-32766, 1403,-32766, - 671,-32766, 37, 861,-32766, -612, 947, 1329, -611,-32766, - -32766,-32766, -610, -586, -585,-32766,-32766, 947, -584, 77, - -583,-32766, 435, -526, 937, 1, 324, 32, 33, 42, - 46, 75, 79,-32766, 80, 81, 742, 82, 83, 84, - -576, -576, 145, 1291, 154, 158, 388, 749, 451, 247, - 332, 367, -50, 301, 368, 369, -576, 988, 989, 370, - 371, 548, 542, 1317, 1318, 1319, 1320, 1322, 1314, 1315, - 546, 984, -110, -110, -110, 372, 1321, 1316, 373, 374, - 375, 31, 275, 376, 377, 380, 76, 452, 575, 378, - 937, 326, 330, 861, 14, -276,-32766, 1329, -275, 16, - 17, 937, 1298, 949, 18, 19, 330, 732, -4,-32766, - -32766,-32766, 21,-32766, 361,-32766, 419,-32766, 502, 503, - -32766, 510, 513, 514, 515,-32766,-32766,-32766, 141, 516, - 520,-32766,-32766, 1291, 521, 522, 529,-32766, 435, 609, - 716, 1098, 1094, 947, 1247, 1327, 1096, 1093, 1074,-32766, - 1286, 548, 1070, 1317, 1318, 1319, 1320, 1322, 1314, 1315, - -280, -102, 15, 20, 25, 321, 1321, 1316, 418, 949, - 623, 629,-32766, 732, 657, 722, 76, 382, 1298, 1251, - 949, 326, 330, 947, 732,-32766,-32766,-32766, 733,-32766, - 1305,-32766, 1304,-32766, 1248, 1382,-32766, 736, 740, 741, - 743,-32766,-32766,-32766, 744,-32766, 745,-32766,-32766, 1305, - 746, 1298, 750,-32766, 435, 762, 735, 763,-32766,-32766, - -32766, 424,-32766, 754,-32766,-32766,-32766, 937, 924,-32766, - 1407, 1409, 883, 882,-32766,-32766,-32766, 978, 1021, -16, - -32766,-32766, 1408, -253, -253, -253,-32766, 435, 977, 388, - 975, 292, 976, 979, 1279, 957, 967, 955,-32766, 1173, - 988, 989, 1169, 1123, 1011, 542, 0, 937, 1012, 655, - 1406, 1364, 861, 923, 984, -110, -110, -110, 1379, 0, - 0, 0, 0, -252, -252, -252, 0, 0, 0, 388, - 0, 861, 0, 0, 0, 0, 2, 0, 0, 0, - 988, 989, 710, 0, 0, 542, 949, -110, -110, 0, - 732, -253, -110, 923, 984, -110, -110, -110, 0, 0, - 0, -110, 0, 0, 0, 0, -110, -110, 0, 0, - -32766, -110, 0, 0, 0, 0, 0, 0, 711, 0, - -110, 0, 0, 0, 0, 0, 949, 0, 0,-32766, - 732, -252, 303, 0, 0, 78, 0, 0, 0, 0, - 0, 330, 712, 713, 0, 0, 0, 0, 0, 0, - 0, 303, 0, 0, 78, 0, 0, 0, 0, 0, - 330, 1300, 1299, 1301, 0, 0, 0, 288 + 132, 133, 134, 582, 135, 136, 162, 779, 780, 781, + 137, 41, 863,-32766, 970, 1403, -583, 974, 973, 1301, + 0, 395, 396, 455, 246, 854,-32766,-32766,-32766,-32766, + -32766, 440,-32766, 27,-32766, 773, 772,-32766,-32766,-32766, + -32766, 508,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + 131,-32766,-32766,-32766,-32766, 437, 782, 859, 1147,-32766, + 949,-32766,-32766,-32766,-32766,-32766,-32766, 972, 1384, 300, + 270, 53, 398, 786, 787, 788, 789, 305, 865, 441, + -340, 39, 254, -583, -583, -195, 843, 790, 791, 792, + 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, + 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, + 801, 802, 804, 805, 806, 368, 846, 847, 848, 849, + 850, 584, 1061, -194, 856, 807, 808, 585, 586, 3, + 831, 829, 830, 842, 826, 827, 4, 860, 587, 588, + 825, 589, 590, 591, 592, 939, 593, 594, 5, 854, + -32766,-32766,-32766, 828, 595, 596,-32766, 138, 764, 132, + 133, 134, 582, 135, 136, 1097, 779, 780, 781, 137, + 41,-32766,-32766,-32766,-32766,-32766,-32766, -275, 1301, 613, + 153, 1070, 749, 990, 991,-32766,-32766,-32766, 992,-32766, + 891,-32766, 892,-32766, 773, 772,-32766, 986, 1308, 397, + 396,-32766,-32766,-32766, 858, 299, 630,-32766,-32766, 440, + 502, 736,-32766,-32766, 437, 782,-32767,-32767,-32767,-32767, + 106, 107, 108, 109, 951,-32766, 1021, 29, 734, 270, + 53, 398, 786, 787, 788, 789, 144, 1070, 441, -340, + 332, 38, 864, 862, -195, 843, 790, 791, 792, 793, + 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, + 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, + 802, 804, 805, 806, 368, 846, 847, 848, 849, 850, + 584, 863, -194, 139, 807, 808, 585, 586, 323, 831, + 829, 830, 842, 826, 827, 1369, 148, 587, 588, 825, + 589, 590, 591, 592, 245, 593, 594, 395, 396,-32766, + -32766,-32766, 828, 595, 596, -85, 138, 440, 132, 133, + 134, 582, 135, 136, 1094, 779, 780, 781, 137, 41, + -32766,-32766,-32766,-32766,-32766, 51, 578, 1301, 257,-32766, + 636, 107, 108, 109,-32766,-32766,-32766, 503,-32766, 316, + -32766,-32766,-32766, 773, 772,-32766, -382, 166, -382, 1022, + -32766,-32766,-32766, 305, 79, 1132,-32766,-32766, 1413, 762, + 332, 1414,-32766, 437, 782,-32766, 1070, 110, 111, 112, + 113, 114, -85, 283,-32766, 477, 478, 479, 270, 53, + 398, 786, 787, 788, 789, 115, 407, 441, 10,-32766, + 299, 1340, 306, 307, 843, 790, 791, 792, 793, 794, + 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, + 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, + 804, 805, 806, 368, 846, 847, 848, 849, 850, 584, + 320, 1067, -581, 807, 808, 585, 586, 1388, 831, 829, + 830, 842, 826, 827, 329, 1387, 587, 588, 825, 589, + 590, 591, 592, 86, 593, 594, 1070, 332,-32766,-32766, + -32766, 828, 595, 596, 349, 151, -580, 132, 133, 134, + 582, 135, 136, 1099, 779, 780, 781, 137, 41,-32766, + 290,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, + -32767,-32767,-32767,-32766,-32766,-32766, 891, 1174, 892, -581, + -581, 754, 773, 772, 1158, 1159, 1160, 1154, 1153, 1152, + 1161, 1155, 1156, 1157,-32766, -581,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 782,-32766,-32766,-32766, -587, -78,-32766, + -32766,-32766, 350, -580, -580,-32766,-32766, 270, 53, 398, + 786, 787, 788, 789, 383,-32766, 441,-32766,-32766, -580, + -32766, 773, 772, 843, 790, 791, 792, 793, 794, 795, + 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, + 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, + 805, 806, 368, 846, 847, 848, 849, 850, 584, -619, + 1067, -619, 807, 808, 585, 586, 389, 831, 829, 830, + 842, 826, 827, 441, 405, 587, 588, 825, 589, 590, + 591, 592, 333, 593, 594, 1070, 87, 88, 89, 459, + 828, 595, 596, 460, 151, 803, 774, 775, 776, 777, + 778, 854, 779, 780, 781, 816, 817, 40, 461, 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, 462, 283, 1328, 1158, 1159, 1160, + 1154, 1153, 1152, 1161, 1155, 1156, 1157, 115, 869, 488, + 489, 782, 1303, 1302, 1304, 108, 109, 1131, 154,-32766, + -32766, 1133, 679, 23, 156, 783, 784, 785, 786, 787, + 788, 789, 698, 699, 852, 152, 423, -579, 393, 394, + 157, 843, 790, 791, 792, 793, 794, 795, 796, 797, + 798, 799, 819, 841, 820, 821, 822, 823, 811, 812, + 813, 840, 814, 815, 800, 801, 802, 804, 805, 806, + 845, 846, 847, 848, 849, 850, 851, 1093, -577, 863, + 807, 808, 809, 810, -58, 831, 829, 830, 842, 826, + 827, 399, 400, 818, 824, 825, 832, 833, 835, 834, + 294, 836, 837, 158, -579, -579, 160, 294, 828, 839, + 838, 54, 55, 56, 57, 534, 58, 59, 36, -110, + -579, -57, 60, 61, -110, 62, -110, 670, 671, 129, + 130, 312, -586, 140, -110, -110, -110, -110, -110, -110, + -110, -110, -110, -110, -110, -577, -577, 141, 147, 949, + 161, 712, -87, 163, 164, 165, -84, 949, -78, -73, + -72, -577, 63, 64, 143, -308, -71, 65, 332, 66, + 251, 252, 67, 68, 69, 70, 71, 72, 73, 74, + 739, 31, 276, 47, 457, 535, -356, 713, 740, 1334, + 1335, 536, -70, 863, 1067, -69, -68, 1332, 45, 22, + 537, 949, 538, -67, 539, -66, 540, 52, -65, 541, + 542, 714, 715, -46, 48, 49, 463, 392, 391, 1070, + 50, 543, -18, 145, 281, 1301, 381, 348, 291, 750, + 1303, 1302, 1304, 1294, 939, 753, 290, 948, 545, 546, + 547, 150, 939, 290, -304, 295, 288, 289, 292, 293, + 549, 550, 338, 1320, 1321, 1322, 1323, 1325, 1317, 1318, + 304, 1299, 296, 301, 302, 283, 1324, 1319, 773, 772, + 1303, 1302, 1304, 305, 308, 309, 75, -154, -154, -154, + 327, 328, 332, 966, 854, 1069, 939, 149, 115, 1415, + 388, 680, -154, 708, -154, 725, -154, 13, -154, 668, + 723, 313, 31, 277, 1303, 1302, 1304, 863, 390,-32766, + 600, 1165, 987, 951, 863, 310, 701, 734, 1332, 990, + 991, 951,-32766, 686, 544, 734, 949, 685, 606, 1339, + 485, 513, 925, 986, -110, -110, -110, 35, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 702, 949, 634, 1294, 773, 772, 741, -578, 305, + -613, 1333, 0, 0, 0, 951, 311, 949, 0, 734, + -154, 549, 550, 319, 1320, 1321, 1322, 1323, 1325, 1317, + 1318, 1208, 1210, 744, 0, 1341, 0, 1324, 1319, -543, + -533, 0, -577,-32766, -4, 949, 11, 77, 751, 1301, + 30, 387, 328, 332, 862, 43,-32766,-32766,-32766, -612, + -32766, 939,-32766, 968,-32766, 44, 759,-32766, 1329, 773, + 772, 760,-32766,-32766,-32766, -578, -578, 882,-32766,-32766, + 930, 1031, 1008, 1015,-32766, 437, 1005, 939, 1016, 928, + 1003, -578, 1136, 1139, 1140, 1137,-32766, 1176, 1138, 1144, + 37, 874, 939, -585, 1356, 1373, 1406,-32766, 673, -577, + -577, -611, -587, 1301, -586, -585, -584, 31, 276, -527, + -32766,-32766,-32766, 1,-32766, -577,-32766, 78,-32766, 863, + 939,-32766, 32, 1332, -278, 33,-32766,-32766,-32766, 42, + 1007, 46,-32766,-32766, 734, 76, 80, 81,-32766, 437, + 82, 83, 390, 84, 453, 31, 277, 85, 146, 303, + -32766, 155, 159, 990, 991, 249, 951, 863, 544, 1294, + 734, 1332, 334, 369, 370, 371, 548, 986, -110, -110, + -110, 951, 372, 326, 373, 734, 374, 550, 375, 1320, + 1321, 1322, 1323, 1325, 1317, 1318, 376, 377, 422, 378, + 21, -50, 1324, 1319, 379, 382, 454, 1294, 577, 951, + 380, 384, 77, 734, -4, -276, -275, 328, 332, 15, + 16, 17, 18, 20, 363, 550, 421, 1320, 1321, 1322, + 1323, 1325, 1317, 1318, 142, 504, 505, 512, 515, 516, + 1324, 1319, 949, 517, 518,-32766, 522, 523, 524, 531, + 77, 1301, 611, 718, 1100, 328, 332, 1096,-32766,-32766, + -32766, 1249,-32766, 1330,-32766, 949,-32766, 1098, 1095,-32766, + 1076, 1289, 1308, 1072,-32766,-32766,-32766, -280,-32766, -102, + -32766,-32766, 14, 19, 1301, 24,-32766, 437, 323, 420, + 625,-32766,-32766,-32766, 631,-32766, 659,-32766,-32766,-32766, + 724, 1253,-32766, -16, 1307, 1250, 1385,-32766,-32766,-32766, + 735,-32766, 738,-32766,-32766, 742, 743, 1301, 745,-32766, + 437, 746, 747, 748,-32766,-32766,-32766, 939,-32766, 300, + -32766,-32766,-32766, 752, 1308,-32766, 764, 737, 332, 765, + -32766,-32766,-32766, -253, -253, -253,-32766,-32766, 426, 390, + 939, 756,-32766, 437, 926, 863, 1410, 1412, 885, 884, + 990, 991, 980, 1023,-32766, 544, -252, -252, -252, 1411, + 979, 977, 390, 925, 986, -110, -110, -110, 978, 981, + 1282, 959, 969, 990, 991, 957, 1175, 1171, 544, 1125, + -110, -110, 1013, 1014, 657, -110, 925, 986, -110, -110, + -110, 1409, 2, 1367, -110, 1267, 951, 1382, 0, 0, + 734, -253, 0,-32766, 0, 0,-32766, 863, 0, 1054, + 1053, 1052, 1058, 1055, 1056, 1057, 0, 0, 0, 951, + 0, 0, 0, 734, -252, 305, 0, 0, 79, 0, + 0, 1070, 0, 0, 332, 0, 0, 0, 0, 0, + 0, 0, -110, -110, 0, 0, 0, -110, 0, 0, + 0, 0, 0, 0, 0, 299, -110, 0, 0, 0, + 0, 0, 0, 0, 0,-32766, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 305, 0, 0, + 79, 0, 0, 0, 0, 0, 332 ); protected array $actionCheck = array( - 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 83, 75, 1, 86, 71, 73, 74, 81, - 86, 107, 108, 109, 1, 81, 88, 89, 90, 8, - 92, 117, 94, 1, 96, 37, 38, 99, 9, 10, - 11, 103, 104, 105, 106, 14, 118, 119, 110, 111, - 107, 123, 109, 8, 116, 117, 58, 1, 8, 30, - 132, 32, 33, 34, 35, 36, 128, 123, 8, 30, - 72, 73, 74, 75, 76, 77, 78, 163, 8, 81, - 8, 152, 153, 138, 139, 151, 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, 9, 10, 11, 127, 128, 129, 130, 8, - 132, 133, 134, 135, 136, 137, 8, 81, 140, 141, - 142, 143, 144, 145, 146, 8, 148, 149, 107, 108, - 9, 10, 11, 155, 156, 157, 117, 159, 117, 2, - 3, 4, 5, 6, 7, 167, 9, 10, 11, 12, - 13, 30, 75, 32, 33, 34, 35, 164, 81, 82, - 1, 142, 49, 50, 51, 88, 89, 90, 14, 92, - 107, 94, 109, 96, 37, 38, 99, 16, 167, 1, - 168, 104, 105, 106, 163, 166, 31, 110, 111, 133, - 134, 135, 167, 116, 117, 58, 44, 45, 46, 47, - 48, 49, 50, 51, 168, 128, 107, 108, 172, 72, - 73, 74, 75, 76, 77, 78, 117, 167, 81, 9, - 10, 11, 8, 160, 14, 88, 89, 90, 91, 92, + 3, 4, 5, 6, 7, 8, 17, 10, 11, 12, + 13, 14, 84, 76, 1, 87, 72, 74, 75, 82, + 0, 108, 109, 110, 15, 82, 89, 90, 91, 10, + 93, 118, 95, 103, 97, 38, 39, 100, 10, 11, + 12, 104, 105, 106, 107, 10, 11, 12, 111, 112, + 15, 10, 11, 12, 117, 118, 59, 82, 128, 31, + 1, 33, 34, 35, 36, 37, 129, 124, 1, 31, + 73, 74, 75, 76, 77, 78, 79, 164, 1, 82, + 9, 153, 154, 139, 140, 9, 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, 83, 8, 81, 127, 128, 129, 130, 81, 132, - 133, 134, 135, 136, 137, 167, 8, 140, 141, 142, - 143, 144, 145, 146, 167, 148, 149, 31, 9, 9, - 10, 11, 155, 156, 157, 31, 159, 117, 2, 3, - 4, 5, 6, 7, 167, 9, 10, 11, 12, 13, - 30, 75, 32, 33, 34, 71, 14, 81, 164, 141, - 102, 141, 168, 168, 88, 89, 90, 168, 92, 168, - 94, 172, 96, 37, 38, 99, 107, 1, 109, 8, - 104, 105, 106, 161, 166, 127, 110, 111, 161, 8, - 172, 117, 116, 117, 58, 168, 117, 52, 53, 54, - 55, 56, 98, 58, 128, 107, 8, 109, 72, 73, - 74, 75, 76, 77, 78, 70, 142, 81, 165, 71, - 167, 142, 138, 139, 88, 89, 90, 91, 92, 93, + 123, 124, 1, 9, 82, 128, 129, 130, 131, 9, + 133, 134, 135, 136, 137, 138, 9, 162, 141, 142, + 143, 144, 145, 146, 147, 86, 149, 150, 9, 82, + 10, 11, 12, 156, 157, 158, 118, 160, 169, 3, + 4, 5, 6, 7, 8, 168, 10, 11, 12, 13, + 14, 31, 76, 33, 34, 35, 36, 168, 82, 83, + 15, 143, 169, 119, 120, 89, 90, 91, 124, 93, + 108, 95, 110, 97, 38, 39, 100, 133, 1, 108, + 109, 105, 106, 107, 162, 167, 1, 111, 112, 118, + 32, 169, 118, 117, 118, 59, 45, 46, 47, 48, + 49, 50, 51, 52, 165, 129, 32, 9, 169, 73, + 74, 75, 76, 77, 78, 79, 169, 143, 82, 168, + 173, 9, 165, 161, 168, 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, - 164, 8, 71, 127, 128, 129, 130, 8, 132, 133, - 134, 135, 136, 137, 98, 8, 140, 141, 142, 143, - 144, 145, 146, 8, 148, 149, 138, 139, 9, 10, - 11, 155, 156, 157, 8, 159, 71, 2, 3, 4, - 5, 6, 7, 167, 9, 10, 11, 12, 13, 30, - 8, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 9, 10, 11, 8, 164, 8, 138, - 139, 168, 37, 38, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 30, 154, 32, 33, 34, 35, - 36, 37, 38, 58, 9, 10, 11, 166, 1, 9, - 10, 11, 8, 138, 139, 8, 31, 72, 73, 74, - 75, 76, 77, 78, 14, 30, 81, 32, 33, 154, - 30, 9, 10, 88, 89, 90, 91, 92, 93, 94, + 124, 84, 168, 9, 128, 129, 130, 131, 168, 133, + 134, 135, 136, 137, 138, 1, 9, 141, 142, 143, + 144, 145, 146, 147, 99, 149, 150, 108, 109, 10, + 11, 12, 156, 157, 158, 32, 160, 118, 3, 4, + 5, 6, 7, 8, 168, 10, 11, 12, 13, 14, + 31, 76, 33, 34, 35, 72, 87, 82, 9, 142, + 54, 50, 51, 52, 89, 90, 91, 169, 93, 9, + 95, 118, 97, 38, 39, 100, 108, 15, 110, 165, + 105, 106, 107, 164, 167, 165, 111, 112, 82, 169, + 173, 85, 117, 118, 59, 118, 143, 53, 54, 55, + 56, 57, 99, 59, 129, 134, 135, 136, 73, 74, + 75, 76, 77, 78, 79, 71, 108, 82, 110, 142, + 167, 152, 139, 140, 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, 37, - 38, 14, 127, 128, 129, 130, 14, 132, 133, 134, - 135, 136, 137, 81, 14, 140, 141, 142, 143, 144, - 145, 146, 14, 148, 149, 14, 9, 10, 11, 16, - 155, 156, 157, 31, 159, 2, 3, 4, 5, 6, - 7, 81, 9, 10, 11, 12, 13, 30, 16, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 16, 58, 16, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 70, 16, 53, - 16, 58, 160, 161, 162, 52, 53, 1, 50, 51, - 16, 169, 76, 77, 1, 72, 73, 74, 75, 76, - 77, 78, 102, 103, 81, 16, 71, 81, 76, 77, - 84, 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, 107, 108, 16, - 127, 128, 129, 130, 81, 132, 133, 134, 135, 136, - 137, 107, 108, 140, 141, 142, 143, 144, 145, 146, - 16, 148, 149, 138, 139, 16, 83, 16, 155, 156, - 157, 2, 3, 4, 5, 6, 7, 31, 102, 154, - 117, 12, 13, 107, 15, 109, 1, 1, 31, 31, - 114, 166, 31, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 141, 1, 112, 113, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 52, 53, 160, 161, 162, 57, 31, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, - 71, 72, 73, 74, 75, 169, 31, 117, 79, 80, - 81, 168, 83, 31, 1, 172, 87, 88, 89, 90, - 31, 92, 117, 94, 37, 96, 35, 1, 99, 100, - 85, 85, 142, 104, 105, 106, 107, 108, 35, 110, - 111, 35, 35, 30, 30, 116, 117, 142, 37, 85, - 35, 35, 123, 35, 37, 58, 166, 128, 129, 130, - 37, 71, 37, 38, 70, 38, 138, 139, 1, 140, - 141, 166, 143, 144, 145, 146, 147, 148, 149, 150, - 78, 81, 154, 84, 83, 156, 157, 83, 90, 160, - 161, 162, 163, 81, 166, 166, 71, 72, 31, 170, - 171, 172, 76, 77, 78, 86, 97, 114, 83, 164, - 164, 85, 87, 168, 168, 91, 95, 91, 98, 93, - 98, 95, 93, 97, 132, 115, 98, 141, 164, 151, - 117, 117, 168, 107, 120, 121, 122, 123, 124, 125, - 126, 101, 101, 158, 118, 119, 151, 159, 123, 123, - 71, 167, 85, 170, 158, 142, 142, 131, 132, 133, - 134, 135, 154, -1, -1, 140, 141, 136, 143, 144, - 145, 146, 147, 148, 149, 136, 171, 37, 38, 166, - 166, 156, 157, 137, 154, -1, 154, 71, 154, 154, - 164, 166, -1, 160, 168, 169, 171, 172, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 163, 165, 164, 75, 164, 138, 139, 0, - 1, 81, 37, 38, 164, 164, 164, 164, 88, 89, - 90, 164, 92, 154, 94, 168, 96, 164, 164, 99, - 164, 164, 60, 61, 104, 105, 106, 164, 164, 164, - 110, 111, 164, 71, 138, 139, 116, 117, 164, 164, - 75, 164, 164, 164, 164, 169, 81, 165, 128, 165, - 154, 71, 72, 88, 89, 90, 165, 92, 165, 94, - 165, 96, 168, 83, 99, 166, 1, 87, 166, 104, - 105, 106, 166, 166, 166, 110, 111, 1, 166, 159, - 166, 116, 117, 166, 85, 166, 168, 166, 166, 166, - 166, 166, 166, 128, 166, 166, 31, 166, 166, 166, - 138, 139, 166, 123, 166, 166, 107, 31, 109, 166, - 166, 166, 31, 114, 166, 166, 154, 118, 119, 166, - 166, 141, 123, 143, 144, 145, 146, 147, 148, 149, - 131, 132, 133, 134, 135, 166, 156, 157, 166, 166, - 166, 71, 72, 166, 166, 166, 166, 166, 166, 166, - 85, 171, 172, 83, 155, 167, 75, 87, 167, 167, - 167, 85, 81, 164, 167, 167, 172, 168, 169, 88, - 89, 90, 167, 92, 167, 94, 167, 96, 167, 167, - 99, 167, 167, 167, 167, 104, 105, 106, 31, 167, - 167, 110, 111, 123, 167, 167, 167, 116, 117, 167, - 167, 167, 167, 1, 167, 167, 167, 167, 167, 128, - 167, 141, 167, 143, 144, 145, 146, 147, 148, 149, - 167, 167, 167, 167, 167, 167, 156, 157, 167, 164, - 167, 167, 75, 168, 167, 167, 166, 168, 81, 167, - 164, 171, 172, 1, 168, 88, 89, 90, 168, 92, - 1, 94, 167, 96, 167, 167, 99, 168, 168, 168, - 168, 104, 105, 106, 168, 75, 168, 110, 111, 1, - 168, 81, 168, 116, 117, 168, 168, 168, 88, 89, - 90, 169, 92, 169, 94, 128, 96, 85, 169, 99, - 169, 169, 169, 169, 104, 105, 106, 169, 169, 31, - 110, 111, 169, 101, 102, 103, 116, 117, 169, 107, - 169, 30, 169, 169, 169, 169, 169, 169, 128, 169, - 118, 119, 169, 169, 169, 123, -1, 85, 169, 169, - 169, 169, 83, 131, 132, 133, 134, 135, 169, -1, - -1, -1, -1, 101, 102, 103, -1, -1, -1, 107, - -1, 83, -1, -1, -1, -1, 166, -1, -1, -1, - 118, 119, 81, -1, -1, 123, 164, 118, 119, -1, - 168, 169, 123, 131, 132, 133, 134, 135, -1, -1, - -1, 132, -1, -1, -1, -1, 118, 119, -1, -1, - 141, 123, -1, -1, -1, -1, -1, -1, 117, -1, - 132, -1, -1, -1, -1, -1, 164, -1, -1, 141, - 168, 169, 163, -1, -1, 166, -1, -1, -1, -1, - -1, 172, 141, 142, -1, -1, -1, -1, -1, -1, - -1, 163, -1, -1, 166, -1, -1, -1, -1, -1, - 172, 160, 161, 162, -1, -1, -1, 166 + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 9, 118, 72, 128, 129, 130, 131, 1, 133, 134, + 135, 136, 137, 138, 9, 9, 141, 142, 143, 144, + 145, 146, 147, 169, 149, 150, 143, 173, 10, 11, + 12, 156, 157, 158, 9, 160, 72, 3, 4, 5, + 6, 7, 8, 168, 10, 11, 12, 13, 14, 31, + 167, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 10, 11, 12, 108, 165, 110, 139, + 140, 169, 38, 39, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 31, 155, 33, 34, 35, 36, + 37, 38, 39, 59, 10, 11, 12, 167, 17, 10, + 11, 12, 9, 139, 140, 10, 11, 73, 74, 75, + 76, 77, 78, 79, 9, 31, 82, 33, 34, 155, + 31, 38, 39, 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, 166, + 118, 168, 128, 129, 130, 131, 9, 133, 134, 135, + 136, 137, 138, 82, 9, 141, 142, 143, 144, 145, + 146, 147, 72, 149, 150, 143, 10, 11, 12, 9, + 156, 157, 158, 9, 160, 3, 4, 5, 6, 7, + 8, 82, 10, 11, 12, 13, 14, 31, 9, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 9, 59, 1, 118, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 71, 9, 139, + 140, 59, 161, 162, 163, 51, 52, 1, 15, 53, + 54, 170, 77, 78, 15, 73, 74, 75, 76, 77, + 78, 79, 77, 78, 82, 103, 104, 72, 108, 109, + 15, 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, 1, 72, 84, + 128, 129, 130, 131, 17, 133, 134, 135, 136, 137, + 138, 108, 109, 141, 142, 143, 144, 145, 146, 147, + 31, 149, 150, 15, 139, 140, 15, 31, 156, 157, + 158, 2, 3, 4, 5, 6, 7, 8, 15, 103, + 155, 17, 13, 14, 108, 16, 110, 113, 114, 17, + 17, 115, 167, 17, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 139, 140, 17, 17, 1, + 17, 82, 32, 17, 17, 17, 32, 1, 32, 32, + 32, 155, 53, 54, 169, 36, 32, 58, 173, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 32, 72, 73, 74, 75, 76, 170, 118, 32, 80, + 81, 82, 32, 84, 118, 32, 32, 88, 89, 90, + 91, 1, 93, 32, 95, 32, 97, 72, 32, 100, + 101, 142, 143, 32, 105, 106, 107, 108, 109, 143, + 111, 112, 32, 32, 32, 82, 117, 118, 32, 32, + 161, 162, 163, 124, 86, 32, 167, 32, 129, 130, + 131, 32, 86, 167, 36, 38, 36, 36, 36, 36, + 141, 142, 36, 144, 145, 146, 147, 148, 149, 150, + 151, 118, 38, 38, 38, 59, 157, 158, 38, 39, + 161, 162, 163, 164, 139, 140, 167, 77, 78, 79, + 171, 172, 173, 39, 82, 142, 86, 72, 71, 85, + 155, 92, 92, 79, 94, 94, 96, 99, 98, 115, + 82, 116, 72, 73, 161, 162, 163, 84, 108, 87, + 91, 84, 133, 165, 84, 137, 96, 169, 88, 119, + 120, 165, 142, 102, 124, 169, 1, 98, 159, 152, + 99, 99, 132, 133, 134, 135, 136, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 102, 1, 159, 124, 38, 39, 32, 72, 164, + 167, 172, -1, -1, -1, 165, 138, 1, -1, 169, + 170, 141, 142, 137, 144, 145, 146, 147, 148, 149, + 150, 61, 62, 32, -1, 152, -1, 157, 158, 155, + 155, -1, 72, 76, 0, 1, 155, 167, 32, 82, + 155, 155, 172, 173, 161, 165, 89, 90, 91, 167, + 93, 86, 95, 160, 97, 165, 165, 100, 166, 38, + 39, 165, 105, 106, 107, 139, 140, 165, 111, 112, + 165, 165, 165, 165, 117, 118, 165, 86, 165, 165, + 165, 155, 165, 165, 165, 165, 129, 165, 165, 165, + 169, 166, 86, 167, 166, 166, 166, 76, 166, 139, + 140, 167, 167, 82, 167, 167, 167, 72, 73, 167, + 89, 90, 91, 167, 93, 155, 95, 160, 97, 84, + 86, 100, 167, 88, 168, 167, 105, 106, 107, 167, + 165, 167, 111, 112, 169, 167, 167, 167, 117, 118, + 167, 167, 108, 167, 110, 72, 73, 167, 167, 115, + 129, 167, 167, 119, 120, 167, 165, 84, 124, 124, + 169, 88, 167, 167, 167, 167, 132, 133, 134, 135, + 136, 165, 167, 169, 167, 169, 167, 142, 167, 144, + 145, 146, 147, 148, 149, 150, 167, 167, 170, 167, + 156, 32, 157, 158, 167, 167, 167, 124, 167, 165, + 167, 169, 167, 169, 170, 168, 168, 172, 173, 168, + 168, 168, 168, 168, 168, 142, 168, 144, 145, 146, + 147, 148, 149, 150, 32, 168, 168, 168, 168, 168, + 157, 158, 1, 168, 168, 76, 168, 168, 168, 168, + 167, 82, 168, 168, 168, 172, 173, 168, 89, 90, + 91, 168, 93, 168, 95, 1, 97, 168, 168, 100, + 168, 168, 1, 168, 105, 106, 107, 168, 76, 168, + 111, 112, 168, 168, 82, 168, 117, 118, 168, 168, + 168, 89, 90, 91, 168, 93, 168, 95, 129, 97, + 168, 168, 100, 32, 168, 168, 168, 105, 106, 107, + 169, 76, 169, 111, 112, 169, 169, 82, 169, 117, + 118, 169, 169, 169, 89, 90, 91, 86, 93, 31, + 95, 129, 97, 169, 1, 100, 169, 169, 173, 169, + 105, 106, 107, 102, 103, 104, 111, 112, 170, 108, + 86, 170, 117, 118, 170, 84, 170, 170, 170, 170, + 119, 120, 170, 170, 129, 124, 102, 103, 104, 170, + 170, 170, 108, 132, 133, 134, 135, 136, 170, 170, + 170, 170, 170, 119, 120, 170, 170, 170, 124, 170, + 119, 120, 170, 170, 170, 124, 132, 133, 134, 135, + 136, 170, 167, 170, 133, 171, 165, 170, -1, -1, + 169, 170, -1, 142, -1, -1, 118, 84, -1, 121, + 122, 123, 124, 125, 126, 127, -1, -1, -1, 165, + -1, -1, -1, 169, 170, 164, -1, -1, 167, -1, + -1, 143, -1, -1, 173, -1, -1, -1, -1, -1, + -1, -1, 119, 120, -1, -1, -1, 124, -1, -1, + -1, -1, -1, -1, -1, 167, 133, -1, -1, -1, + -1, -1, -1, -1, -1, 142, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 164, -1, -1, + 167, -1, -1, -1, -1, -1, 173 ); protected array $actionBase = array( - 0, 157, -2, 316, 475, 475, 886, 1079, 1282, 1322, - 1361, 703, 532, 560, 207, 806, 1145, 1145, 1156, 1145, - 805, 927, 959, 824, 824, 824, 872, 633, 633, 872, - 633, 1000, 1000, 1000, 1000, 1045, 1045, -62, -62, 97, - 1237, 1161, 256, 256, 256, 256, 256, 1270, 256, 256, - 256, 256, 256, 1270, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, - 256, 256, 256, 256, 256, 256, 13, 276, 137, 356, - 1187, 611, 1138, 1152, 1143, 1165, 1136, 1135, 1141, 1144, - 1167, 1241, 1242, 849, 1240, 1249, 1147, 975, 1137, 1148, - 958, 617, 617, 617, 617, 617, 617, 617, 617, 617, - 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, - 617, 617, 617, 617, 617, 617, 617, 299, 230, 552, - 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, - 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, - 530, 530, 530, 885, 885, 525, 300, 1150, 1060, 1150, - 1150, 1150, 1150, 1150, 1150, 1150, 1150, 141, 29, 1042, - 494, 494, 459, 459, 459, 459, 459, 696, 1348, 874, - 172, 172, 172, 172, 1329, 1329, 238, 562, -57, 873, - 133, 198, -86, 648, 39, 41, 765, 765, 259, 259, - 750, 750, 259, 259, 259, 325, 325, 254, 254, 254, - 254, 83, -66, 846, 56, 56, 56, 56, 846, 846, - 846, 846, 855, 865, 846, 1025, 1049, 846, 846, 371, - 645, 788, 643, 643, 278, -71, -71, 278, -72, -71, - 179, 636, 200, 852, 119, 233, 200, 1063, 405, 939, - 939, 976, 939, 939, 939, 893, 650, 893, 1134, 879, - 879, 803, 777, 960, 1188, 1168, 900, 1235, 901, 1239, - 1189, 174, 76, -55, 264, 328, 766, 1133, 1133, 1133, - 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1074, - 562, 1134, 202, 1233, 1234, 1074, 1074, 1074, 562, 562, - 562, 562, 562, 562, 562, 562, 804, 562, 562, 714, - 202, 626, 642, 202, 878, 562, 890, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 175, 13, - 13, 276, 32, 32, 13, 343, 23, 32, 32, 32, - 181, 32, 13, 13, 13, 650, 857, 845, 664, 284, - 856, 128, 857, 857, 857, 45, 31, 70, 851, 863, - 249, 860, 860, 860, 864, 999, 999, 860, 861, 860, - 864, 860, 860, 999, 999, 909, 999, 121, 466, 378, - 447, 482, 999, 288, 860, 860, 860, 860, 899, 999, - 21, 50, 498, 860, 274, 234, 860, 860, 899, 891, - 809, 906, 999, 999, 999, 899, 439, 906, 906, 906, - 920, 921, 853, 808, 361, 351, 534, 72, 887, 808, - 808, 860, 455, 853, 808, 853, 808, 848, 808, 808, - 808, 853, 808, 861, 433, 808, 743, 500, 60, 808, - 860, 6, 1005, 1006, 515, 1008, 1003, 1009, 1061, 1011, - 1012, 1160, 997, 1023, 1004, 1013, 1062, 1002, 1001, 842, - 660, 672, 892, 868, 994, 854, 854, 854, 987, 988, - 854, 854, 854, 854, 854, 854, 854, 854, 660, 908, - 895, 858, 1028, 674, 684, 1112, 838, 1199, 843, 1025, - 1005, 1012, 602, 1004, 1013, 1002, 1001, 802, 801, 799, - 800, 798, 797, 778, 781, 807, 1114, 1115, 1016, 910, - 699, 1085, 1029, 1194, 998, 1033, 1034, 1089, 1117, 922, - 1118, 1201, 850, 1202, 1203, 962, 1052, 1169, 854, 986, - 979, 964, 1049, 992, 660, 971, 1119, 1120, 1072, 974, - 1091, 1092, 1149, 882, 859, 973, 1204, 1053, 1054, 1057, - 1170, 1171, 912, 1073, 844, 1094, 888, 956, 1095, 1096, - 1097, 1102, 1172, 1208, 1176, 982, 1178, 923, 884, 1068, - 869, 1209, 322, 875, 876, 883, 1059, 540, 1024, 1182, - 1192, 1213, 1103, 1107, 1108, 1219, 1221, 1018, 933, 1077, - 881, 1078, 1071, 934, 936, 587, 877, 1121, 866, 867, - 871, 592, 600, 1223, 1224, 1225, 1019, 816, 862, 937, - 943, 1123, 847, 1125, 1226, 608, 944, 1227, 1113, 764, - 769, 613, 658, 632, 771, 889, 1184, 894, 870, 880, - 1058, 769, 835, 945, 1228, 948, 954, 955, 1109, 957, - 1087, 1230, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 156, -3, 315, 474, 474, 880, 1074, 1271, 1294, + 749, 675, 531, 559, 836, 1031, 1031, 1046, 1031, 828, + 1005, 42, 59, 59, 59, 963, 898, 632, 632, 898, + 632, 997, 997, 997, 997, 1061, 1061, -63, -63, 96, + 1232, 1199, 255, 255, 255, 255, 255, 1265, 255, 255, + 255, 255, 255, 1265, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 77, 194, 120, + 205, 1197, 783, 1150, 1163, 1152, 1166, 1145, 1144, 1151, + 1156, 1167, 1261, 1263, 889, 1254, 1267, 1158, 972, 1147, + 1162, 962, 616, 616, 616, 616, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 19, + 35, 535, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 529, 529, 529, 910, 910, 524, 299, 1113, + 1075, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 140, + 28, 1000, 493, 493, 458, 458, 458, 458, 458, 696, + 1301, 1328, 171, 171, 171, 171, 1363, 1363, -70, 523, + 248, 756, 291, 197, -87, 644, 38, 199, 323, 323, + 482, 482, 233, 233, 482, 482, 482, 324, 324, 94, + 94, 94, 94, 82, 249, 860, 67, 67, 67, 67, + 860, 860, 860, 860, 913, 869, 860, 1036, 1049, 860, + 860, 370, 645, 966, 646, 646, 398, -72, -72, 398, + 64, -72, 294, 286, 257, 859, 91, 433, 257, 1073, + 404, 686, 686, 815, 686, 686, 686, 923, 610, 923, + 1141, 902, 902, 861, 807, 964, 1198, 1168, 901, 1252, + 929, 1253, 1200, 342, 251, -56, 263, 550, 806, 1139, + 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, 1139, + 1139, 1195, 523, 1141, -25, 1247, 1249, 1195, 1195, 1195, + 523, 523, 523, 523, 523, 523, 523, 523, 870, 523, + 523, 694, -25, 625, 635, -25, 896, 523, 915, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 178, 77, 77, 194, 13, 13, 77, 200, 121, 13, + 13, 13, -11, 13, 77, 77, 77, 610, 886, 849, + 663, 283, 874, 114, 886, 886, 886, 71, 9, 76, + 809, 888, 288, 882, 882, 882, 907, 986, 986, 882, + 903, 882, 907, 882, 882, 986, 986, 875, 986, 274, + 620, 465, 597, 624, 986, 340, 882, 882, 882, 882, + 916, 986, 127, 139, 639, 882, 329, 287, 882, 882, + 916, 858, 876, 908, 986, 986, 986, 916, 545, 908, + 908, 908, 931, 936, 864, 872, 445, 431, 679, 232, + 924, 872, 872, 882, 605, 864, 872, 864, 872, 933, + 872, 872, 872, 864, 872, 903, 533, 872, 813, 665, + 218, 872, 882, 20, 1008, 1009, 800, 1010, 1002, 1013, + 1069, 1014, 1016, 1171, 982, 1028, 1004, 1020, 1071, 998, + 995, 885, 792, 793, 921, 914, 979, 897, 897, 897, + 975, 977, 897, 897, 897, 897, 897, 897, 897, 897, + 792, 932, 926, 899, 1037, 796, 810, 1114, 857, 1214, + 1264, 1036, 1008, 1016, 804, 1004, 1020, 998, 995, 856, + 853, 844, 851, 843, 840, 808, 814, 871, 1116, 1119, + 1021, 920, 811, 1085, 1038, 1211, 1044, 1045, 1047, 1088, + 1123, 942, 1125, 1216, 895, 1217, 1218, 965, 1051, 1173, + 897, 974, 873, 968, 1049, 978, 792, 969, 1129, 1130, + 1081, 961, 1097, 1098, 1072, 911, 884, 970, 1219, 1059, + 1060, 1062, 1176, 1177, 930, 1082, 996, 1099, 912, 1058, + 1100, 1101, 1105, 1106, 1179, 1222, 1182, 922, 1183, 945, + 879, 1077, 909, 1223, 165, 892, 893, 906, 1068, 683, + 1035, 1184, 1208, 1229, 1108, 1109, 1110, 1230, 1231, 1024, + 946, 1083, 900, 1084, 1078, 947, 948, 689, 905, 1132, + 890, 891, 904, 705, 768, 1238, 1239, 1240, 1025, 877, + 894, 951, 953, 1133, 887, 1135, 1241, 771, 954, 1242, + 1115, 816, 817, 521, 784, 747, 818, 881, 1194, 925, + 865, 878, 1067, 817, 883, 955, 1245, 957, 958, 959, + 1111, 960, 1086, 1246, 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, 789, 789, 789, 789, - 789, 789, 789, 789, 789, 633, 633, 633, 633, 633, - 789, 789, 789, 789, 789, 789, 789, 633, 789, 789, - 789, 633, 0, 0, 633, 0, 789, 789, 789, 789, + 0, 0, 0, 0, 0, 0, 0, 0, 789, 789, + 789, 789, 789, 789, 789, 789, 789, 632, 632, 632, + 632, 789, 789, 789, 789, 789, 789, 789, 632, 789, + 789, 789, 632, 632, 0, 0, 632, 0, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, @@ -802,194 +806,187 @@ class Php8 extends \PhpParser\ParserAbstract 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, 789, - 789, 617, 617, 617, 617, 617, 617, 617, 617, 617, - 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, - 617, 617, 617, 617, 617, 617, 0, 0, 0, 0, + 789, 789, 789, 789, 616, 616, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 617, 617, 617, 617, 617, 617, 617, 617, - 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, - 617, 617, 617, 617, 617, 617, 617, 617, 683, 683, - 617, 617, 683, 683, 683, 683, 683, 683, 683, 683, - 683, 683, 617, 617, 0, 617, 617, 617, 617, 617, - 617, 617, 909, 683, 683, 325, 325, 325, 325, 683, - 683, 397, 397, 397, 683, 325, 683, -72, 325, 683, - -72, 683, 683, 683, 683, 683, 683, 683, 683, 683, - 0, 0, 683, 683, 683, 683, 202, -71, 683, 861, - 861, 861, 861, 683, 683, 683, 683, -71, -71, 683, - -56, -56, 683, 683, 0, 0, 0, 325, 325, 202, - 0, 0, 202, 0, 0, 861, 861, 683, -72, 909, - 537, 683, 174, 0, 0, 0, 0, 0, 0, 0, - 202, 861, 202, 562, -71, -71, 562, 562, 32, 13, - 537, 610, 610, 610, 610, 13, 0, 0, 0, 0, - 0, 650, 909, 909, 909, 909, 909, 909, 909, 909, - 909, 909, 909, 909, 861, 0, 909, 0, 909, 909, - 861, 861, 861, 0, 0, 0, 0, 0, 0, 0, - 0, 999, 0, 0, 0, 0, 0, 0, 0, 861, - 0, 999, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, + 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, + 616, 616, 823, 823, 616, 616, 823, 823, 823, 823, + 823, 823, 823, 823, 823, 823, 616, 616, 0, 616, + 616, 616, 616, 616, 616, 616, 875, 823, 823, 324, + 324, 324, 324, 823, 823, 396, 396, 396, 823, 324, + 823, 64, 324, 823, 64, 823, 823, 823, 823, 823, + 823, 823, 823, 823, 0, 0, 823, 823, 823, 823, + -25, -72, 823, 903, 903, 903, 903, 823, 823, 823, + 823, -72, -72, 823, -57, -57, 823, 823, 0, 0, + 0, 324, 324, -25, 0, 0, -25, 0, 0, 903, + 903, 823, 64, 875, 446, 823, 342, 0, 0, 0, + 0, 0, 0, 0, -25, 903, -25, 523, -72, -72, + 523, 523, 13, 77, 446, 612, 612, 612, 612, 77, + 0, 0, 0, 0, 0, 610, 875, 875, 875, 875, + 875, 875, 875, 875, 875, 875, 875, 875, 903, 0, + 875, 0, 875, 875, 903, 903, 903, 0, 0, 0, + 0, 0, 0, 0, 0, 986, 0, 0, 0, 0, + 0, 0, 0, 903, 0, 986, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 861, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 854, 882, 0, 0, 882, 0, 854, 854, 854, - 0, 0, 0, 877, 847 + 0, 0, 0, 0, 0, 903, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 897, 911, 0, 0, 911, + 0, 897, 897, 897, 0, 0, 0, 905, 887 ); protected array $actionDefault = array( 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767, 630, 630, 630, 630,32767,32767, 257, 102,32767, - 32767, 501, 416, 416, 416,32767,32767,32767, 574, 574, - 574, 574, 574, 17,32767,32767,32767,32767,32767,32767, - 501,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 631, 631, 631, 631,32767,32767, 257, 102,32767, + 32767, 502, 416, 416, 416,32767,32767,32767, 575, 575, + 575, 575, 575, 17,32767,32767,32767,32767,32767,32767, + 32767, 502,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, 36, 7, 8, 10, 11, 49, 337, 100,32767, - 32767,32767,32767,32767,32767,32767,32767, 102,32767,32767, + 32767,32767, 36, 7, 8, 10, 11, 49, 337, 100, + 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 403, 623,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 403, 624,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 505, 484, 485, 487, 488, 415, 575, 629, 343, - 626, 341, 414, 146, 353, 342, 245, 261, 506, 262, - 507, 510, 511, 218, 400, 150, 151, 447, 502, 449, - 500, 504, 448, 421, 428, 429, 430, 431, 432, 433, - 434, 435, 436, 437, 438, 439, 440, 419, 420, 503, - 481, 480, 479,32767,32767, 445, 446,32767,32767,32767, - 32767,32767,32767,32767,32767, 102,32767, 450, 453, 418, - 451, 452, 469, 470, 467, 468, 471,32767,32767, 322, - 472, 473, 474, 475,32767,32767, 381, 196, 379,32767, - 476,32767, 111, 454, 322, 111,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 460, 461,32767,32767,32767, + 32767,32767, 496, 506, 484, 485, 487, 488, 415, 576, + 630, 343, 627, 341, 414, 146, 353, 342, 245, 261, + 507, 262, 508, 511, 512, 218, 400, 150, 151, 447, + 503, 449, 501, 505, 448, 421, 428, 429, 430, 431, + 432, 433, 434, 435, 436, 437, 438, 439, 440, 419, + 420, 504, 481, 480, 479,32767,32767, 445, 446,32767, + 32767,32767,32767,32767,32767,32767,32767, 102,32767, 450, + 453, 418, 451, 452, 469, 470, 467, 468, 471,32767, + 32767, 322, 472, 473, 474, 475,32767,32767, 381, 196, + 379,32767, 476,32767, 111, 454, 322, 111,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 460, 461,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 102,32767,32767,32767, 100, 518, - 568, 478, 455, 456,32767, 543,32767, 102,32767, 545, - 32767,32767,32767,32767,32767,32767,32767,32767, 570, 442, - 444, 538, 624, 422, 627,32767, 531, 100, 196,32767, - 544, 196, 196,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 569,32767, 637, 531, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, - 196, 110,32767, 110, 110,32767,32767, 100, 196, 196, - 196, 196, 196, 196, 196, 196, 546, 196, 196, 191, - 32767, 271, 273, 102, 592, 196, 548,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 102,32767,32767,32767, + 100, 519, 569, 478, 455, 456,32767, 544,32767, 102, + 32767, 546,32767,32767,32767,32767,32767,32767,32767,32767, + 571, 442, 444, 539, 625, 422, 628,32767, 532, 100, + 196,32767, 545, 196, 196,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 570,32767, 638, 532, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 110,32767, 196, 110,32767, 110, 110,32767,32767, 100, + 196, 196, 196, 196, 196, 196, 196, 196, 547, 196, + 196, 191,32767, 271, 273, 102, 593, 196, 549,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 403,32767,32767,32767,32767, 531, 465, 139,32767, 533, - 139, 576, 457, 458, 459, 576, 576, 576, 318, 295, - 32767,32767,32767,32767,32767, 546, 546, 100, 100, 100, - 100,32767,32767,32767,32767, 111, 517, 99, 99, 99, - 99, 99, 103, 101,32767,32767,32767,32767, 226,32767, - 101, 101, 99,32767, 101, 101,32767,32767, 226, 228, - 215, 230,32767, 596, 597, 226, 101, 230, 230, 230, - 250, 250, 520, 324, 101, 99, 101, 101, 198, 324, - 324,32767, 101, 520, 324, 520, 324, 200, 324, 324, - 324, 520, 324,32767, 101, 324, 217, 99, 99, 324, - 32767,32767,32767,32767, 533,32767,32767,32767,32767,32767, - 32767,32767, 225,32767,32767,32767,32767,32767,32767,32767, - 32767, 563,32767, 581, 594, 463, 464, 466, 580, 578, - 489, 490, 491, 492, 493, 494, 495, 497, 625,32767, - 537,32767,32767,32767, 352,32767, 635,32767,32767,32767, - 9, 74, 526, 42, 43, 51, 57, 552, 553, 554, - 555, 549, 550, 556, 551,32767,32767,32767,32767,32767, + 32767,32767, 403,32767,32767,32767,32767, 532, 465, 139, + 32767, 534, 139, 577, 457, 458, 459, 577, 577, 577, + 318, 295,32767,32767,32767,32767,32767, 547, 547, 100, + 100, 100, 100,32767,32767,32767,32767, 111, 518, 99, + 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, + 226,32767, 101, 101, 99,32767, 101, 101,32767,32767, + 226, 228, 215, 230,32767, 597, 598, 226, 101, 230, + 230, 230, 250, 250, 521, 324, 101, 99, 101, 101, + 198, 324, 324,32767, 101, 521, 324, 521, 324, 200, + 324, 324, 324, 521, 324,32767, 101, 324, 217, 99, + 99, 324,32767,32767,32767,32767, 534,32767,32767,32767, + 32767,32767,32767,32767, 225,32767,32767,32767,32767,32767, + 32767,32767,32767, 564,32767, 582, 595, 463, 464, 466, + 581, 579, 489, 490, 491, 492, 493, 494, 495, 498, + 626,32767, 538,32767,32767,32767, 352,32767, 636,32767, + 32767,32767, 9, 74, 527, 42, 43, 51, 57, 553, + 554, 555, 556, 550, 551, 557, 552,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 636,32767, 576,32767,32767,32767,32767, 462, 558, - 602,32767,32767, 577, 628,32767,32767,32767,32767,32767, - 32767,32767,32767, 139,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 563,32767, 137,32767,32767,32767, - 32767,32767,32767,32767,32767, 559,32767,32767,32767, 576, - 32767,32767,32767,32767, 320, 317,32767,32767,32767,32767, + 32767,32767,32767, 637,32767, 577,32767,32767,32767,32767, + 462, 559, 603,32767,32767, 578, 629,32767,32767,32767, + 32767,32767,32767,32767,32767, 139,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 564,32767, 137,32767, + 32767,32767,32767,32767,32767,32767,32767, 560,32767,32767, + 32767, 577,32767,32767,32767,32767, 320, 317,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 576,32767,32767,32767,32767,32767, 297,32767, - 314,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 399, - 533, 300, 302, 303,32767,32767,32767,32767, 375,32767, + 32767,32767,32767,32767, 577,32767,32767,32767,32767,32767, + 297,32767, 314,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 153, 153, 3, 3, 355, 153, 153, 153, - 355, 355, 153, 355, 355, 355, 153, 153, 153, 153, - 153, 153, 153, 283, 186, 265, 268, 250, 250, 153, - 367, 153, 401, 401, 410 + 32767, 399, 534, 300, 302, 303,32767,32767,32767,32767, + 375,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 153, 153, 3, 3, 355, 153, + 153, 153, 355, 355, 153, 355, 355, 355, 153, 153, + 153, 153, 153, 153, 153, 283, 186, 265, 268, 250, + 250, 153, 367, 153, 401, 401, 410 ); protected array $goto = array( - 199, 168, 199, 199, 199, 1066, 1004, 717, 446, 682, - 642, 679, 441, 343, 339, 340, 342, 613, 445, 344, - 447, 659, 479, 726, 568, 568, 568, 568, 1242, 624, - 171, 171, 171, 171, 223, 200, 196, 196, 181, 183, - 218, 196, 196, 196, 196, 196, 1192, 197, 197, 197, - 197, 197, 1192, 191, 192, 193, 194, 195, 220, 218, - 221, 555, 556, 436, 557, 560, 561, 562, 563, 564, - 565, 566, 567, 172, 173, 174, 198, 175, 176, 177, - 169, 178, 179, 180, 182, 217, 219, 222, 240, 245, - 246, 257, 258, 260, 261, 262, 263, 264, 265, 266, - 270, 271, 272, 273, 280, 283, 295, 296, 322, 323, - 442, 443, 444, 618, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 191, 192, 193, 194, 195, 220, 201, 202, 203, 204, - 241, 184, 185, 205, 186, 206, 202, 187, 242, 201, - 167, 207, 208, 188, 209, 210, 211, 189, 212, 213, - 170, 214, 215, 216, 190, 881, 285, 282, 285, 285, - 596, 1122, 253, 253, 253, 253, 253, 603, 485, 485, - 620, 756, 658, 660, 1072, 1071, 680, 485, 329, 313, - 704, 707, 1039, 715, 724, 1035, 731, 920, 877, 920, - 920, 1100, 251, 251, 251, 251, 248, 254, 1069, 1069, - 702, 981, 1396, 1396, 1061, 1077, 1078, 878, 936, 931, - 932, 945, 887, 933, 884, 934, 935, 885, 888, 1396, - 939, 892, 357, 497, 879, 891, 1042, 1042, 874, 853, - 499, 874, 913, 1128, 1124, 1125, 530, 644, 644, 1399, - 1399, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, 1328, - 1328, 619, 1141, 1297, 1066, 409, 412, 621, 625, 1297, - 1297, 940, 729, 941, 1066, 434, 1297, 526, 720, 1066, - 1139, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, - 874, 610, 1066, 1066, 1066, 1066, 675, 676, 1297, 693, - 694, 695, 355, 1297, 1297, 1297, 1297, 1386, 474, 1297, - 1025, 474, 1297, 1297, 1378, 1378, 1378, 1378, 349, 407, - 579, 572, 1075, 1076, 365, 969, 969, 953, 440, 859, - 633, 954, 1373, 1374, 365, 365, 362, 362, 362, 362, - 608, 350, 349, 570, 1099, 1101, 1104, 365, 365, 570, - 570, 365, 1292, 1413, 456, 681, 570, 315, 572, 579, - 605, 606, 316, 616, 622, 1188, 638, 639, 574, 614, - 636, 365, 365, 859, 28, 859, 1090, 454, 472, 518, - 8, 519, 9, 998, 998, 998, 998, 525, 703, 472, - 1347, 1347, 992, 999, 1347, 1347, 1347, 1347, 1347, 1347, - 1347, 1347, 1347, 1347, 687, 908, 896, 1110, 1114, 1293, - 1294, 345, 1280, 714, 256, 256, 871, 855, 869, 1007, - 987, 874, 1148, 1176, 1149, 1280, 1358, 465, 465, 714, - 637, 416, 714, 900, 465, 465, 897, 1369, 1295, 1355, - 1356, 1171, 997, 1369, 1369, 558, 558, 1288, 430, 558, - 1369, 558, 558, 558, 558, 558, 558, 558, 558, 1111, - 895, 573, 600, 573, 1160, 912, 1047, 573, 759, 600, - 1057, 410, 478, 1380, 1380, 1380, 1380, 417, 907, 495, - 574, 894, 909, 384, 488, 617, 489, 490, 358, 359, - 494, 1371, 1372, 905, 1115, 1162, 1404, 1405, 1009, 1365, - 1344, 1344, 0, 0, 1344, 1344, 1344, 1344, 1344, 1344, - 1344, 1344, 1344, 1344, 1028, 0, 0, 1000, 0, 755, - 0, 903, 571, 1037, 1032, 0, 0, 465, 465, 465, - 465, 465, 465, 465, 465, 465, 465, 465, 465, 0, - 337, 465, 0, 465, 465, 1290, 0, 0, 1113, 996, - 425, 725, 0, 0, 1367, 1367, 1113, 559, 559, 0, - 0, 559, 559, 559, 559, 559, 559, 559, 559, 559, - 559, 631, 645, 648, 649, 650, 651, 672, 673, 674, - 728, 730, 0, 626, 627, 1273, 973, 958, 1178, 0, - 1274, 1277, 974, 0, 1278, 0, 0, 276, 328, 1044, - 0, 0, 0, 0, 328, 328, 0, 899, 0, 685, - 1023, 0, 0, 422, 423, 893, 448, 0, 691, 0, - 692, 0, 427, 428, 429, 0, 705, 1287, 0, 431, - 0, 448, 0, 353, 652, 654, 656, 1073, 1073, 0, - 0, 0, 0, 0, 686, 1084, 1080, 1081, 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, + 201, 169, 201, 201, 201, 1068, 598, 719, 448, 684, + 644, 681, 443, 345, 341, 342, 344, 615, 447, 346, + 449, 661, 481, 728, 570, 570, 570, 570, 1244, 626, + 172, 172, 172, 172, 225, 202, 198, 198, 182, 184, + 220, 198, 198, 198, 198, 198, 1194, 199, 199, 199, + 199, 199, 1194, 192, 193, 194, 195, 196, 197, 222, + 220, 223, 557, 558, 438, 559, 562, 563, 564, 565, + 566, 567, 568, 569, 173, 174, 175, 200, 176, 177, + 178, 170, 179, 180, 181, 183, 219, 221, 224, 242, + 247, 248, 259, 260, 262, 263, 264, 265, 266, 267, + 268, 272, 273, 274, 275, 282, 285, 297, 298, 324, + 325, 444, 445, 446, 620, 226, 227, 228, 229, 230, + 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 241, 193, 194, 195, 196, 197, 222, 203, 204, 205, + 206, 243, 185, 186, 207, 187, 208, 204, 188, 244, + 203, 168, 209, 210, 189, 211, 212, 213, 190, 214, + 215, 171, 216, 217, 218, 191, 287, 284, 287, 287, + 883, 255, 255, 255, 255, 255, 1124, 605, 487, 487, + 622, 758, 660, 662, 359, 1102, 682, 487, 1074, 1073, + 706, 709, 1041, 717, 726, 1037, 733, 922, 879, 922, + 922, 253, 253, 253, 253, 250, 256, 646, 646, 1077, + 1078, 1331, 1331, 1331, 1331, 1331, 1331, 1331, 1331, 1331, + 1331, 855, 351, 938, 933, 934, 947, 889, 935, 886, + 936, 937, 887, 890, 476, 941, 894, 476, 1044, 1044, + 893, 364, 364, 364, 364, 352, 351, 532, 1130, 1126, + 1127, 1350, 1350, 331, 315, 1350, 1350, 1350, 1350, 1350, + 1350, 1350, 1350, 1350, 1350, 1300, 1068, 1071, 1071, 704, + 983, 1300, 1300, 1063, 1079, 1080, 1068, 880, 1300, 861, + 458, 1068, 881, 1068, 1068, 1068, 1068, 1068, 1068, 1068, + 1068, 1068, 897, 716, 1068, 1068, 1068, 1068, 677, 678, + 1300, 695, 696, 697, 857, 1300, 1300, 1300, 1300, 716, + 909, 1300, 716, 896, 1300, 1300, 1381, 1381, 1381, 1381, + 1006, 581, 574, 861, 436, 861, 367, 971, 971, 955, + 1101, 1103, 1106, 956, 915, 1030, 367, 367, 1002, 499, + 757, 572, 612, 573, 1039, 1034, 501, 572, 572, 367, + 367, 1376, 1377, 367, 572, 1416, 616, 638, 317, 574, + 581, 607, 608, 318, 618, 624, 357, 640, 641, 942, + 576, 943, 1389, 367, 367, 28, 474, 411, 414, 623, + 627, 1000, 1000, 1000, 1000, 1027, 409, 474, 1347, 1347, + 994, 1001, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347, + 1347, 1347, 633, 647, 650, 651, 652, 653, 674, 675, + 676, 730, 732, 561, 561, 258, 258, 561, 561, 561, + 561, 561, 561, 561, 561, 561, 561, 610, 1361, 467, + 467, 876, 683, 442, 876, 635, 467, 467, 1190, 1372, + 360, 361, 1150, 1178, 1151, 1372, 1372, 560, 560, 456, + 432, 560, 1372, 560, 560, 560, 560, 560, 560, 560, + 560, 1276, 975, 575, 602, 575, 1277, 1280, 976, 575, + 1281, 602, 705, 412, 480, 1383, 1383, 1383, 1383, 496, + 1374, 1375, 576, 876, 1092, 639, 490, 619, 491, 492, + 347, 8, 520, 9, 521, 907, 689, 873, 1407, 1408, + 527, 1368, 902, 1295, 278, 330, 989, 899, 424, 425, + 1291, 330, 330, 693, 1173, 694, 1049, 429, 430, 431, + 1113, 707, 418, 905, 433, 998, 427, 727, 355, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, + 467, 761, 339, 467, 1059, 467, 467, 1293, 628, 629, + 1115, 419, 960, 1180, 621, 1143, 1370, 1370, 1115, 497, + 1296, 1297, 911, 1283, 1046, 1117, 1164, 1011, 731, 871, + 528, 722, 901, 1141, 687, 1025, 1283, 386, 450, 0, + 895, 910, 898, 1112, 1116, 1399, 1399, 0, 0, 1298, + 1358, 1359, 1290, 450, 0, 1009, 654, 656, 658, 1075, + 1075, 0, 1399, 0, 0, 0, 688, 1086, 1082, 1083, + 0, 0, 0, 0, 876, 0, 0, 0, 999, 0, + 766, 766, 1402, 1402, 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, 764, 764 + 1162, 914 ); protected array $gotoCheck = array( - 42, 42, 42, 42, 42, 73, 49, 73, 66, 66, + 42, 42, 42, 42, 42, 73, 127, 73, 66, 66, 56, 56, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 159, 9, 107, 107, 107, 107, 159, 107, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1005,108 +1002,101 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 15, 23, 23, 23, 23, - 127, 15, 5, 5, 5, 5, 5, 48, 157, 157, - 134, 48, 48, 48, 119, 119, 48, 157, 178, 178, + 42, 42, 42, 42, 42, 42, 23, 23, 23, 23, + 15, 5, 5, 5, 5, 5, 15, 48, 157, 157, + 134, 48, 48, 48, 97, 131, 48, 157, 119, 119, 48, 48, 48, 48, 48, 48, 48, 25, 25, 25, - 25, 131, 5, 5, 5, 5, 5, 5, 89, 89, - 89, 89, 191, 191, 89, 89, 89, 26, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 191, - 15, 15, 97, 84, 27, 15, 107, 107, 22, 6, - 84, 22, 45, 15, 15, 15, 76, 108, 108, 191, - 191, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 8, 8, 73, 73, 59, 59, 59, 59, 73, - 73, 65, 8, 65, 73, 43, 73, 8, 8, 73, - 8, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 22, 181, 73, 73, 73, 73, 86, 86, 73, 86, - 86, 86, 188, 73, 73, 73, 73, 190, 83, 73, - 103, 83, 73, 73, 9, 9, 9, 9, 177, 62, - 76, 76, 120, 120, 14, 9, 9, 73, 13, 12, - 13, 73, 187, 187, 14, 14, 24, 24, 24, 24, - 104, 177, 177, 19, 130, 130, 130, 14, 14, 19, - 19, 14, 20, 14, 83, 64, 19, 76, 76, 76, - 76, 76, 76, 76, 76, 158, 76, 76, 14, 2, - 2, 14, 14, 12, 76, 12, 115, 113, 19, 163, - 46, 163, 46, 19, 19, 19, 19, 163, 117, 19, - 179, 179, 19, 19, 179, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 121, 16, 16, 16, 16, 20, - 20, 29, 20, 7, 5, 5, 18, 7, 20, 16, - 92, 22, 149, 149, 149, 20, 14, 23, 23, 7, - 80, 28, 7, 39, 23, 23, 37, 134, 20, 20, - 20, 156, 16, 134, 134, 165, 165, 169, 14, 165, - 134, 165, 165, 165, 165, 165, 165, 165, 165, 133, - 35, 9, 9, 9, 16, 16, 110, 9, 99, 9, - 114, 9, 9, 134, 134, 134, 134, 31, 35, 160, - 14, 35, 41, 141, 9, 9, 9, 9, 97, 97, - 185, 185, 185, 9, 136, 152, 9, 9, 96, 134, - 180, 180, -1, -1, 180, 180, 180, 180, 180, 180, - 180, 180, 180, 180, 50, -1, -1, 50, -1, 50, - -1, 9, 50, 50, 50, -1, -1, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, -1, - 9, 23, -1, 23, 23, 14, -1, -1, 134, 93, - 93, 93, -1, -1, 134, 134, 134, 182, 182, -1, - -1, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, -1, 17, 17, 79, 79, 17, 17, -1, - 79, 79, 79, -1, 79, -1, -1, 24, 24, 17, - -1, -1, -1, -1, 24, 24, -1, 17, -1, 17, - 17, -1, -1, 82, 82, 17, 118, -1, 82, -1, - 82, -1, 82, 82, 82, -1, 82, 17, -1, 82, - -1, 118, -1, 82, 85, 85, 85, 118, 118, -1, - -1, -1, -1, -1, 118, 118, 118, 118, -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, + 25, 5, 5, 5, 5, 5, 5, 108, 108, 120, + 120, 108, 108, 108, 108, 108, 108, 108, 108, 108, + 108, 6, 177, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 83, 15, 15, 83, 107, 107, + 15, 24, 24, 24, 24, 177, 177, 76, 15, 15, + 15, 179, 179, 178, 178, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 73, 73, 89, 89, 89, + 89, 73, 73, 89, 89, 89, 73, 26, 73, 12, + 83, 73, 27, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 35, 7, 73, 73, 73, 73, 86, 86, + 73, 86, 86, 86, 7, 73, 73, 73, 73, 7, + 35, 73, 7, 35, 73, 73, 9, 9, 9, 9, + 49, 76, 76, 12, 43, 12, 14, 9, 9, 73, + 130, 130, 130, 73, 45, 50, 14, 14, 50, 84, + 50, 19, 181, 50, 50, 50, 84, 19, 19, 14, + 14, 187, 187, 14, 19, 14, 2, 2, 76, 76, + 76, 76, 76, 76, 76, 76, 188, 76, 76, 65, + 14, 65, 190, 14, 14, 76, 19, 59, 59, 59, + 59, 19, 19, 19, 19, 103, 62, 19, 180, 180, + 19, 19, 180, 180, 180, 180, 180, 180, 180, 180, + 180, 180, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 182, 182, 5, 5, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 104, 14, 23, + 23, 22, 64, 13, 22, 13, 23, 23, 158, 134, + 97, 97, 149, 149, 149, 134, 134, 165, 165, 113, + 14, 165, 134, 165, 165, 165, 165, 165, 165, 165, + 165, 79, 79, 9, 9, 9, 79, 79, 79, 9, + 79, 9, 117, 9, 9, 134, 134, 134, 134, 185, + 185, 185, 14, 22, 115, 80, 9, 9, 9, 9, + 29, 46, 163, 46, 163, 9, 121, 18, 9, 9, + 163, 134, 39, 20, 24, 24, 92, 37, 82, 82, + 169, 24, 24, 82, 156, 82, 110, 82, 82, 82, + 133, 82, 28, 9, 82, 93, 93, 93, 82, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 99, 9, 23, 114, 23, 23, 14, 17, 17, + 134, 31, 17, 17, 8, 8, 134, 134, 134, 160, + 20, 20, 41, 20, 17, 136, 152, 96, 8, 20, + 8, 8, 17, 8, 17, 17, 20, 141, 118, -1, + 17, 16, 16, 16, 16, 191, 191, -1, -1, 20, + 20, 20, 17, 118, -1, 16, 85, 85, 85, 118, + 118, -1, 191, -1, -1, -1, 118, 118, 118, 118, + -1, -1, -1, -1, 22, -1, -1, -1, 16, -1, + 24, 24, 191, 191, -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, 24, 24 + 16, 16 ); protected array $gotoBase = array( - 0, 0, -365, 0, 0, 171, 226, 403, 250, 10, - 0, 0, 28, -17, 22, -189, -63, 103, 102, 75, - -54, 0, -44, 160, 330, 191, 210, 227, 86, 110, - 0, 24, 0, 0, 0, 78, 0, 89, 0, 106, - 0, 25, -1, 249, 0, 213, -379, 0, -556, -15, - 499, 0, 0, 0, 0, 0, -33, 0, 0, 216, - 0, 0, 274, 0, 111, 254, -235, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -31, 0, 0, 163, - 114, 203, 104, 26, -255, 137, -444, 0, 0, -78, - 0, 0, 87, 240, 0, 0, 39, -269, 0, 47, - 0, 0, 0, 272, 294, 0, 0, -7, 4, 0, - 85, 0, 0, 93, 40, 97, 0, 100, 347, -102, - 32, 107, 0, 0, 0, 0, 0, 168, 0, 0, - 341, 199, 0, 72, 169, 0, 36, 0, 0, 0, - 0, -280, 0, 0, 0, 0, 0, 0, 0, 146, - 0, 0, 35, 0, 0, 0, 80, 141, 117, -253, - 23, 0, 0, -134, 0, 202, 0, 0, 0, 67, - 0, 0, 0, 0, 0, 0, 0, 16, -137, 147, - 257, 259, 314, 0, 0, 185, 0, -53, 269, 0, - 273, -100, 0, 0 + 0, 0, -380, 0, 0, 170, 208, 283, 543, 10, + 0, 0, -24, 86, 22, -186, 111, 66, 181, 71, + 95, 0, 147, 160, 235, 191, 270, 275, 175, 187, + 0, 96, 0, 0, 0, -92, 0, 158, 0, 173, + 0, 103, -1, 298, 0, 305, -270, 0, -558, 300, + 321, 0, 0, 0, 0, 0, -33, 0, 0, 328, + 0, 0, 341, 0, 186, 353, -237, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -32, 0, 0, 37, + 167, 32, -3, -50, -151, 97, -444, 0, 0, -21, + 0, 0, 171, 214, 0, 0, 106, -319, 0, 118, + 0, 0, 0, 347, 381, 0, 0, -7, -38, 0, + 133, 0, 0, 163, 112, 203, 0, 182, 307, -100, + -83, 197, 0, 0, 0, 0, 0, 4, 0, 0, + 327, 183, 0, 131, 169, 0, 105, 0, 0, 0, + 0, -188, 0, 0, 0, 0, 0, 0, 0, 164, + 0, 0, 104, 0, 0, 0, 151, 141, 188, -255, + 101, 0, 0, -23, 0, 202, 0, 0, 0, 128, + 0, 0, 0, 0, 0, 0, 0, -82, -74, 6, + 143, 310, 168, 0, 0, 172, 0, -36, 333, 0, + 338, 271, 0, 0 ); protected array $gotoDefault = array( - -32768, 531, 766, 7, 767, 962, 842, 851, 595, 549, - 727, 354, 646, 437, 1363, 938, 1177, 615, 870, 1306, - 1312, 473, 873, 334, 753, 950, 921, 922, 413, 400, - 886, 411, 670, 647, 512, 906, 469, 898, 504, 901, - 468, 910, 166, 433, 528, 914, 6, 917, 577, 948, - 1002, 401, 925, 402, 698, 927, 599, 929, 930, 408, - 414, 415, 1182, 607, 643, 942, 259, 601, 943, 399, - 944, 952, 404, 406, 708, 484, 523, 517, 426, 1143, - 602, 630, 667, 462, 491, 641, 653, 640, 498, 449, - 432, 333, 986, 994, 505, 482, 1008, 356, 1016, 761, - 1190, 661, 507, 1024, 662, 1031, 1034, 550, 551, 496, - 1046, 269, 1049, 508, 1058, 26, 688, 1063, 1064, 689, - 663, 1086, 664, 690, 665, 1088, 481, 597, 1191, 480, - 1103, 1109, 470, 1112, 1352, 471, 1116, 267, 1119, 284, - 360, 383, 450, 1126, 1127, 12, 1133, 718, 719, 22, - 278, 527, 1161, 709, 1167, 277, 1170, 467, 1189, 466, - 1261, 1263, 578, 509, 1281, 319, 1284, 701, 524, 1289, - 463, 1354, 464, 552, 492, 341, 553, 1397, 312, 363, - 338, 569, 320, 364, 554, 493, 1360, 1368, 335, 34, - 1387, 1398, 612, 635 + -32768, 533, 768, 7, 769, 964, 844, 853, 597, 551, + 729, 356, 648, 439, 1366, 940, 1179, 617, 872, 1309, + 1315, 475, 875, 336, 755, 952, 923, 924, 415, 402, + 888, 413, 672, 649, 514, 908, 471, 900, 506, 903, + 470, 912, 167, 435, 530, 916, 6, 919, 579, 950, + 1004, 403, 927, 404, 700, 929, 601, 931, 932, 410, + 416, 417, 1184, 609, 645, 944, 261, 603, 945, 401, + 946, 954, 406, 408, 710, 486, 525, 519, 428, 1145, + 604, 632, 669, 464, 493, 643, 655, 642, 500, 451, + 434, 335, 988, 996, 507, 484, 1010, 358, 1018, 763, + 1192, 663, 509, 1026, 664, 1033, 1036, 552, 553, 498, + 1048, 271, 1051, 510, 1060, 26, 690, 1065, 1066, 691, + 665, 1088, 666, 692, 667, 1090, 483, 599, 1193, 482, + 1105, 1111, 472, 1114, 1355, 473, 1118, 269, 1121, 286, + 362, 385, 452, 1128, 1129, 12, 1135, 720, 721, 25, + 280, 529, 1163, 711, 1169, 279, 1172, 469, 1191, 468, + 1264, 1266, 580, 511, 1284, 321, 1287, 703, 526, 1292, + 465, 1357, 466, 554, 494, 343, 555, 1400, 314, 365, + 340, 571, 322, 366, 556, 495, 1363, 1371, 337, 34, + 1390, 1401, 614, 637 ); protected array $ruleToNonTerminal = array( @@ -1161,20 +1151,20 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 164, 165, 165, 166, 158, 158, - 163, 163, 167, 168, 168, 169, 170, 171, 171, 171, - 171, 19, 19, 73, 73, 73, 73, 159, 159, 159, - 159, 173, 173, 162, 162, 162, 160, 160, 179, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 180, 180, - 180, 108, 182, 182, 182, 182, 161, 161, 161, 161, - 161, 161, 161, 161, 59, 59, 176, 176, 176, 176, - 176, 183, 183, 172, 172, 172, 172, 184, 184, 184, - 184, 184, 74, 74, 66, 66, 66, 66, 134, 134, - 134, 134, 187, 186, 175, 175, 175, 175, 175, 175, - 174, 174, 174, 185, 185, 185, 185, 107, 181, 189, - 189, 188, 188, 190, 190, 190, 190, 190, 190, 190, - 190, 178, 178, 178, 178, 177, 192, 191, 191, 191, - 191, 191, 191, 191, 191, 193, 193, 193, 193 + 42, 42, 42, 42, 42, 164, 165, 165, 166, 158, + 158, 163, 163, 167, 168, 168, 169, 170, 171, 171, + 171, 171, 19, 19, 73, 73, 73, 73, 159, 159, + 159, 159, 173, 173, 162, 162, 162, 160, 160, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 180, + 180, 180, 108, 182, 182, 182, 182, 161, 161, 161, + 161, 161, 161, 161, 161, 59, 59, 176, 176, 176, + 176, 176, 183, 183, 172, 172, 172, 172, 184, 184, + 184, 184, 184, 74, 74, 66, 66, 66, 66, 134, + 134, 134, 134, 187, 186, 175, 175, 175, 175, 175, + 175, 174, 174, 174, 185, 185, 185, 185, 107, 181, + 189, 189, 188, 188, 190, 190, 190, 190, 190, 190, + 190, 190, 178, 178, 178, 178, 177, 192, 191, 191, + 191, 191, 191, 191, 191, 191, 193, 193, 193, 193 ); protected array $ruleToLength = array( @@ -1227,22 +1217,22 @@ class Php8 extends \PhpParser\ParserAbstract 3, 3, 3, 2, 2, 2, 2, 3, 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, 2, 8, 9, 8, 9, - 9, 10, 9, 10, 8, 3, 2, 2, 1, 1, - 0, 4, 2, 1, 3, 2, 1, 2, 2, 2, - 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, - 3, 3, 4, 1, 1, 3, 1, 1, 1, 1, - 1, 3, 2, 3, 0, 1, 1, 3, 1, 1, - 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, - 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, - 2, 2, 1, 3, 1, 4, 3, 3, 3, 3, - 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, - 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, - 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, - 3, 3, 3, 6, 3, 1, 1, 2, 1 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, + 3, 2, 1, 2, 4, 2, 2, 8, 9, 8, + 9, 9, 10, 9, 10, 8, 3, 2, 2, 1, + 1, 0, 4, 2, 1, 3, 2, 1, 2, 2, + 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 1, 1, 1, 0, 1, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 5, 3, 3, 4, 1, 1, 3, 1, 1, 1, + 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, + 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, + 4, 2, 2, 1, 3, 1, 4, 3, 3, 3, + 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, + 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, + 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, + 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -2507,93 +2497,93 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 496 => static function ($self, $stackPos) { - $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 497 => static function ($self, $stackPos) { + $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 498 => null, - 499 => static function ($self, $stackPos) { + 499 => null, + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 505 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 506 => static function ($self, $stackPos) { + 507 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 507 => static function ($self, $stackPos) { + 508 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 508 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 509 => static function ($self, $stackPos) { + 510 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 510 => static function ($self, $stackPos) { + 511 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 511 => static function ($self, $stackPos) { + 512 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 512 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 513 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 514 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 515 => static function ($self, $stackPos) { + 516 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 516 => static function ($self, $stackPos) { + 517 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 517 => static function ($self, $stackPos) { + 518 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 518 => null, 519 => null, - 520 => static function ($self, $stackPos) { + 520 => null, + 521 => static function ($self, $stackPos) { $self->semValue = array(); }, - 521 => static function ($self, $stackPos) { + 522 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 522 => null, - 523 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, + 523 => null, 524 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 525 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 526 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 527 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 528 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2602,304 +2592,307 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 530 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 531 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 532 => null, - 533 => static function ($self, $stackPos) { + 532 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 533 => null, 534 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 535 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 536 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 537 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 537 => null, 538 => null, - 539 => static function ($self, $stackPos) { + 539 => null, + 540 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 540 => static function ($self, $stackPos) { + 541 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 541 => null, 542 => null, - 543 => static function ($self, $stackPos) { + 543 => null, + 544 => static function ($self, $stackPos) { $self->semValue = array(); }, - 544 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 545 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 546 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { $self->semValue = array(); }, - 547 => null, - 548 => static function ($self, $stackPos) { + 548 => null, + 549 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 549 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 550 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 551 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 552 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 553 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 554 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 555 => static function ($self, $stackPos) { + 556 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 556 => static function ($self, $stackPos) { + 557 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 557 => static function ($self, $stackPos) { + 558 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 558 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 559 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 560 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 561 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 562 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 563 => static function ($self, $stackPos) { + 564 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 564 => static function ($self, $stackPos) { + 565 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 565 => static function ($self, $stackPos) { + 566 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 566 => static function ($self, $stackPos) { + 567 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 567 => static function ($self, $stackPos) { + 568 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 568 => null, 569 => null, 570 => null, - 571 => static function ($self, $stackPos) { + 571 => null, + 572 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 572 => static function ($self, $stackPos) { + 573 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 573 => static function ($self, $stackPos) { + 574 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 574 => static function ($self, $stackPos) { + 575 => static function ($self, $stackPos) { $self->semValue = null; }, - 575 => null, 576 => null, - 577 => static function ($self, $stackPos) { + 577 => null, + 578 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 578 => null, 579 => null, 580 => null, 581 => null, 582 => null, 583 => null, - 584 => static function ($self, $stackPos) { + 584 => null, + 585 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 585 => null, 586 => null, 587 => null, - 588 => static function ($self, $stackPos) { + 588 => null, + 589 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 589 => null, - 590 => static function ($self, $stackPos) { + 590 => null, + 591 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 591 => static function ($self, $stackPos) { + 592 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 592 => static function ($self, $stackPos) { + 593 => static function ($self, $stackPos) { $self->semValue = null; }, - 593 => null, 594 => null, 595 => null, - 596 => static function ($self, $stackPos) { + 596 => null, + 597 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 597 => static function ($self, $stackPos) { + 598 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 598 => null, - 599 => static function ($self, $stackPos) { + 599 => null, + 600 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 600 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 601 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 602 => static function ($self, $stackPos) { + 603 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 603 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 604 => null, - 605 => static function ($self, $stackPos) { + 605 => null, + 606 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 606 => static function ($self, $stackPos) { + 607 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 607 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 608 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 609 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 610 => null, - 611 => static function ($self, $stackPos) { + 611 => null, + 612 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 612 => null, 613 => null, - 614 => static function ($self, $stackPos) { + 614 => null, + 615 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 615 => null, - 616 => static function ($self, $stackPos) { + 616 => null, + 617 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 617 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 618 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 619 => null, - 620 => static function ($self, $stackPos) { + 620 => null, + 621 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 621 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 622 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 623 => static function ($self, $stackPos) { + 624 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 624 => static function ($self, $stackPos) { + 625 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 625 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 626 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 627 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 628 => static function ($self, $stackPos) { + 629 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 629 => static function ($self, $stackPos) { + 630 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 630 => static function ($self, $stackPos) { + 631 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 631 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 632 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 633 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 634 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 635 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 636 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 637 => null, - 638 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 637 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 638 => null, 639 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 640 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 641 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 642 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 643 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 644 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 645 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 646 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 647 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 648 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 648 => null, + 649 => null, ]; } } diff --git a/lib/PhpParser/PrettyPrinter/Standard.php b/lib/PhpParser/PrettyPrinter/Standard.php index 3ac0757c2d..0a9dfd750c 100644 --- a/lib/PhpParser/PrettyPrinter/Standard.php +++ b/lib/PhpParser/PrettyPrinter/Standard.php @@ -521,6 +521,10 @@ protected function pExpr_Cast_Unset(Cast\Unset_ $node, int $precedence, int $lhs return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr, $precedence, $lhsPrecedence); } + protected function pExpr_Cast_Void(Cast\Void_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Void_::class, '(void) ', $node->expr, $precedence, $lhsPrecedence); + } + // Function calls and similar constructs protected function pExpr_FuncCall(Expr\FuncCall $node): string { diff --git a/lib/PhpParser/PrettyPrinterAbstract.php b/lib/PhpParser/PrettyPrinterAbstract.php index b4dec925c9..ac8bda29ee 100644 --- a/lib/PhpParser/PrettyPrinterAbstract.php +++ b/lib/PhpParser/PrettyPrinterAbstract.php @@ -104,6 +104,7 @@ abstract class PrettyPrinterAbstract implements PrettyPrinter { Expr\Include_::class => [220, -1, -1], Expr\ArrowFunction::class => [230, -1, -1], Expr\Throw_::class => [240, -1, -1], + Expr\Cast\Void_::class => [250, -1, -1], ]; /** @var int Current indentation level. */ diff --git a/test/code/parser/stmt/voidCast.test b/test/code/parser/stmt/voidCast.test new file mode 100644 index 0000000000..bc640765f0 --- /dev/null +++ b/test/code/parser/stmt/voidCast.test @@ -0,0 +1,95 @@ +Void cast +----- + Date: Sun, 20 Jul 2025 20:56:21 +0200 Subject: [PATCH 419/428] Remove use of E_STRICT in test runner This is deprecated in PHP 8.4. --- test_old/run.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_old/run.php b/test_old/run.php index 758f250a3d..603c935015 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -1,6 +1,6 @@ Date: Sun, 20 Jul 2025 21:05:13 +0200 Subject: [PATCH 420/428] Exclude one clone php-src test clone($x, ) will parse as a function call, but be printed as clone($x), which parses as a clone expression. The difference is harmless. --- test_old/run.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_old/run.php b/test_old/run.php index 603c935015..1f430b49e9 100644 --- a/test_old/run.php +++ b/test_old/run.php @@ -121,6 +121,8 @@ function showHelp($error) { | Zend.tests.type_declarations.intersection_types.parsing_comment # comments in property fetch syntax, not emulated on old PHP versions | Zend.tests.gh14961 +# harmless pretty print difference for clone($x, ) +| Zend.tests.clone.ast )\.phpt$~x', $file)) { return null; } From c724dde741624926dc8b4fd1c0e219ec419f050d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 20 Jul 2025 21:13:06 +0200 Subject: [PATCH 421/428] Allow final on promoted properties --- grammar/php.y | 1 + lib/PhpParser/Parser/Php7.php | 1579 +++++++++-------- lib/PhpParser/Parser/Php8.php | 1297 +++++++------- .../parser/stmt/class/property_promotion.test | 15 + .../stmt/property_promotion.test | 3 +- 5 files changed, 1460 insertions(+), 1435 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index e152e1d606..20ec27aa10 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -686,6 +686,7 @@ property_modifier: | T_PROTECTED_SET { $$ = Modifiers::PROTECTED_SET; } | T_PRIVATE_SET { $$ = Modifiers::PRIVATE_SET; } | T_READONLY { $$ = Modifiers::READONLY; } + | T_FINAL { $$ = Modifiers::FINAL; } ; parameter: diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index f3da7e4630..2d29b6c8c1 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -397,150 +397,150 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $action = array( - 133, 134, 135, 575, 136, 137,-32766, 766, 767, 768, - 138, 41, 850, -340, -195, 1389,-32766,-32766,-32766, 495, - 841, 1144, 1145, 1146, 1140, 1139, 1138, 1147, 1141, 1142, - 1143,-32766,-32766,-32766, -194, 760, 759,-32766, 3,-32766, + 133, 134, 135, 575, 136, 137, 1049, 766, 767, 768, + 138, 41, 850, -341, 495, 1390,-32766,-32766,-32766, 1008, + 841, 1145, 1146, 1147, 1141, 1140, 1139, 1148, 1142, 1143, + 1144,-32766,-32766,-32766, -195, 760, 759,-32766, -194,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 0,-32766, 623, 4, 769, 1144, 1145, 1146, 1140, - 1139, 1138, 1147, 1141, 1142, 1143, 388, 389, 448, 271, - 53, 391, 773, 774, 775, 776, 433, 1048, 434, 1008, - 337, 39, 254, 5, 298, 830, 777, 778, 779, 780, + -32767, 0,-32766, 3, 4, 769, 1145, 1146, 1147, 1141, + 1140, 1139, 1148, 1142, 1143, 1144, 388, 389, 448, 272, + 53, 391, 773, 774, 775, 776, 433, 5, 434, 571, + 337, 39, 254, 29, 298, 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 806, 576, 807, 808, 809, 810, 798, 799, 353, 354, 801, 802, 787, 788, 789, 791, 792, 793, 364, 833, 834, 835, 836, 837, - 577, -381, 306, -381, 794, 795, 578, 579, 244, 818, - 816, 817, 829, 813, 814, 1312, 1374, 580, 581, 812, - 582, 583, 584, 585, 1373, 586, 587, 481, 482, -627, - 243, 29, 815, 588, 589, 496, 139, -627, 133, 134, - 135, 575, 136, 137, 1084, 766, 767, 768, 138, 41, - -32766, -340, -195, 1041, 1040, 1039, 1045, 1042, 1043, 1044, + 577, -382, 306, -382, 794, 795, 578, 579, 244, 818, + 816, 817, 829, 813, 814, 1313, 38, 580, 581, 812, + 582, 583, 584, 585, 1325, 586, 587, 481, 482, -628, + 496, 1009, 815, 588, 589, 140, 139, -628, 133, 134, + 135, 575, 136, 137, 1085, 766, 767, 768, 138, 41, + -32766, -341, 1046, 1041, 1040, 1039, 1045, 1042, 1043, 1044, -32766,-32766,-32766,-32767,-32767,-32767,-32767, 106, 107, 108, - 109, 110, -194, 760, 759, 1057, 303,-32766,-32766,-32766, - 38,-32766, 852,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - 936, 1009, 140, 769,-32766,-32766,-32766, 850,-32766, 297, - -32766,-32766,-32766,-32766,-32766, 1370, 1354, 271, 53, 391, - 773, 774, 775, 776, -624,-32766, 434,-32766,-32766,-32766, - -32766, 730, -624, 830, 777, 778, 779, 780, 781, 782, + 109, 110, -195, 760, 759, 1058, -194,-32766,-32766,-32766, + 149,-32766, 852,-32766,-32766,-32766,-32766,-32766,-32766,-32766, + 936, 303, 257, 769,-32766,-32766,-32766, 850,-32766, 297, + -32766,-32766,-32766,-32766,-32766, 1371, 1355, 272, 53, 391, + 773, 774, 775, 776, -625,-32766, 434,-32766,-32766,-32766, + -32766, 730, -625, 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 806, 576, 807, 808, 809, 810, 798, 799, 353, 354, 801, 802, 787, 788, 789, 791, - 792, 793, 364, 833, 834, 835, 836, 837, 577, -578, - -275, 149, 794, 795, 578, 579, -576, 818, 816, 817, + 792, 793, 364, 833, 834, 835, 836, 837, 577, -579, + -275, 317, 794, 795, 578, 579, -577, 818, 816, 817, 829, 813, 814, 957, 926, 580, 581, 812, 582, 583, 584, 585, 144, 586, 587, 841, 336,-32766,-32766,-32766, - 815, 588, 589, -627, 139, -627, 133, 134, 135, 575, - 136, 137, 1081, 766, 767, 768, 138, 41,-32766, 1118, - -32766,-32766,-32766, 752,-32766,-32766,-32766, 257, 629, 388, - 389,-32766,-32766,-32766,-32766,-32766, -578, -578, 1080, 433, - 317, 760, 759, -576, -576,-32766, 1292,-32766,-32766, 111, - 112, 113, -578, 282, 843, 851, 321, 1399, 936, -576, - 1400, 769, 333, 938, -584, 114, -578, 725, 294, 298, - 400, -583, 10, -576, 349, 271, 53, 391, 773, 774, - 775, 776, 145, 86, 434, 306, 336, 336, -624, 731, - -624, 830, 777, 778, 779, 780, 781, 782, 783, 784, + 815, 588, 589, -628, 139, -628, 133, 134, 135, 575, + 136, 137, 1082, 766, 767, 768, 138, 41,-32766, 1375, + -32766,-32766,-32766,-32766,-32766,-32766,-32766, 1374, 629, 388, + 389,-32766,-32766,-32766,-32766,-32766, -579, -579, 1081, 433, + 321, 760, 759, -577, -577,-32766, 1293,-32766,-32766, 111, + 112, 113, -579, 282, 843, 851, 623, 1400, 936, -577, + 1401, 769, 333, 938, -585, 114, -579, 725, 294, 298, + 1119, -584, 349, -577, 752, 272, 53, 391, 773, 774, + 775, 776, 145, 86, 434, 306, 336, 336, -625, 731, + -625, 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 806, 576, 807, 808, 809, 810, 798, 799, 353, 354, 801, 802, 787, 788, 789, 791, 792, 793, - 364, 833, 834, 835, 836, 837, 577, -575, 850, -577, + 364, 833, 834, 835, 836, 837, 577, -576, 850, -578, 794, 795, 578, 579, 845, 818, 816, 817, 829, 813, 814, 727, 926, 580, 581, 812, 582, 583, 584, 585, - 740, 586, 587, 571, 1054,-32766,-32766, -85, 815, 588, + 740, 586, 587, 243, 1055,-32766,-32766, -85, 815, 588, 589, 878, 152, 879, 133, 134, 135, 575, 136, 137, - 1086, 766, 767, 768, 138, 41, 350, 961, 960, 1057, - 1057, 1057,-32766,-32766,-32766, 841,-32766, 131, 977, 978, - 878, 1054, 879, 979, -575, -575, -577, -577, 378, 760, + 1087, 766, 767, 768, 138, 41, 350, 961, 960, 1058, + 1058, 1058,-32766,-32766,-32766, 841,-32766, 131, 977, 978, + 400, 1055, 10, 979, -576, -576, -578, -578, 378, 760, 759, 936, 973, 290, 297, 297,-32766, 846, 936, 154, - -575, 79, -577, 382, 849, 936, 1057, 336, 1324, 769, - 398, 938, -582, -85, -575, 725, -577, 959, 108, 109, - 110, 1057, 732, 271, 53, 391, 773, 774, 775, 776, + -576, 79, -578, 382, 849, 936, 1058, 336, 878, 769, + 879, 938, -583, -85, -576, 725, -578, 959, 108, 109, + 110, 1058, 732, 272, 53, 391, 773, 774, 775, 776, 290, 155, 434, 470, 471, 472, 735, 760, 759, 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 806, 576, 807, 808, 809, 810, 798, 799, 353, 354, 801, 802, 787, 788, 789, 791, 792, 793, 364, 833, 834, 835, 836, 837, 577, 926, 434, 847, 794, 795, 578, 579, 926, 818, 816, 817, 829, 813, 814, 926, - 452, 580, 581, 812, 582, 583, 584, 585, 453, 586, - 587, 157, 87, 88, 89, 454, 815, 588, 589, 455, + 398, 580, 581, 812, 582, 583, 584, 585, 452, 586, + 587, 157, 87, 88, 89, 453, 815, 588, 589, 454, 152, 790, 761, 762, 763, 764, 765, 158, 766, 767, 768, 803, 804, 40, 27, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 1133, - 282, 1054, 856,-32766, 994, 1287, 1286, 1288, 725, 390, - 389, 938, 114, 159, 1119, 725, 769, 161, 938, 433, - 672, 23, 725, 1117, 691, 692, 1057,-32766, 153, 416, - 770, 771, 772, 773, 774, 775, 776, -78, -618, 839, - -618, -580, 386, 387, 392, 393, 830, 777, 778, 779, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 1134, + 282, 1055, 455,-32766, 994, 1288, 1287, 1289, 725, 390, + 389, 938, 114, 856, 1120, 725, 769, 159, 938, 433, + 672, 23, 725, 1118, 691, 692, 1058,-32766, 153, 416, + 770, 771, 772, 773, 774, 775, 776, -78, -619, 839, + -619, -581, 386, 387, 392, 393, 830, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 806, 828, 807, 808, 809, 810, 798, 799, 800, 827, 801, 802, 787, 788, 789, 791, 792, 793, 832, 833, 834, 835, 836, - 837, 838, 36, 663, 664, 794, 795, 796, 797, -58, - 818, 816, 817, 829, 813, 814, -57, 128, 805, 811, - 812, 819, 820, 822, 821, -87, 823, 824, -580, -580, - 129, 141, 142, 815, 826, 825, 54, 55, 56, 57, - 527, 58, 59, 148, -110, 162, 163, 60, 61, -110, - 62, -110, 936, 164, 165, 166, 313, -84, -580, -110, + 837, 838, 161, 663, 664, 794, 795, 796, 797, 36, + 818, 816, 817, 829, 813, 814, -58, -57, 805, 811, + 812, 819, 820, 822, 821, -87, 823, 824, -581, -581, + 128, 129, 141, 815, 826, 825, 54, 55, 56, 57, + 527, 58, 59, 142, -110, 148, 162, 60, 61, -110, + 62, -110, 936, 163, 164, 165, 313, 166, -581, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, -110, - 1292, -78, -73, -72, -71, -70, -69, -68, -67, -66, - -65, -46, -18, 742, 146, 63, 64, 281, -574, 1285, - 291, 65, 51, 66, 251, 252, 67, 68, 69, 70, - 71, 72, 73, 74, 741, 31, 273, 47, 450, 528, - 744, -356, 935, 1318, 1319, 529, 151, 850, -308, -304, - 953, 1316, 45, 22, 530, 1283, 531, 286, 532, 287, - 533, 292, 936, 534, 535, 293, 926, 342, 48, 49, - 456, 385, 384, 295, 50, 536, 296, 299, 300, 1056, - 376, 348, 850, 701, 282, -574, -574, 1278, 114, 307, - 308, 150, 538, 539, 540,-32766, 841, 716, 1287, 1286, - 1288, -574, 850, 294, 542, 543, 1401, 1304, 1305, 1306, - 1307, 1309, 1301, 1302, 305, -574, 1151, -110, -110, 130, - 1308, 1303, -110, 673, 1287, 1286, 1288, 306, 13, 718, - 75, -110, 593, 974, 331, 332, 336, -154, -154, -154, - -32766, 694, 678, -4, 936, 938, 926, 478, 506, 725, - -540, 661, -154, 705, -154, 679, -154, 695, -154, 314, - 311, -530, 306, 320, 599, 79, 306, -278, 383,-32766, - -612, 336, 0, 0, 0, 627, 52, 0, 312, 977, - 978, 0, 760, 759, 537, 1323, 0, 0, 0, 706, + 1293, -84, 953, -78, -73, -72, -71, -70, -69, -68, + -67, -66, -65, 742, -46, 63, 64, -18, -575, 1286, + 146, 65, 51, 66, 251, 252, 67, 68, 69, 70, + 71, 72, 73, 74, 281, 31, 273, 47, 450, 528, + 291, -357, 741, 1319, 1320, 529, 744, 850, 935, 151, + 295, 1317, 45, 22, 530, 1284, 531, -309, 532, -305, + 533, 286, 936, 534, 535, 287, 926, 292, 48, 49, + 456, 385, 384, 293, 50, 536, 342, 296, 282, 1057, + 376, 348, 850, 299, 300, -575, -575, 1279, 114, 307, + 308, 701, 538, 539, 540, 150, 841,-32766, 1288, 1287, + 1289, -575, 850, 294, 542, 543, 1402, 1305, 1306, 1307, + 1308, 1310, 1302, 1303, 305, -575, 716, -110, -110, 130, + 1309, 1304, -110, 593, 1288, 1287, 1289, 306, 13, 673, + 75, -110, 1152, 678, 331, 332, 336, -154, -154, -154, + -32766, 718, 694, -4, 936, 938, 926, 314, 478, 725, + 506, 1324, -154, 705, -154, 679, -154, 695, -154, 974, + 1326, -541, 306, 312, 311, 79, 849, 661, 383, 43, + 320, 336, 37, 1252, 0, 0, 52, 0, 0, 977, + 978, 0, 760, 759, 537,-32766, 0, 0, 0, 706, 0, 0, 912, 973, -110, -110, -110, 35, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 1325, 11, 707, 708, 31, 274, 30, 380, 849, - 1313, 955, 861, 1251, 336, 938, 0, 850, 926, 725, - -154, 1316, 1287, 1286, 1288, 43, -611, 44, 290, 749, - 1193, 1195, 750, 309, 310, 869, 917, 1018, 995, 1002, - 383, -574, 446, 992, 1003, 915, 990, 304, 1122, 381, - 1125, 977, 978, 1126, 1123, 1124, 537, 1278, 1130, -610, - 37, 760, 759, 132, 541, 973, -110, -110, -110, 1340, - 1358, 1392, 1292, 666, 542, 543, -584, 1304, 1305, 1306, - 1307, 1309, 1301, 1302, -583, -582, -581, -524, 21, 1, - 1308, 1303, 32, 33, 760, 759, 42, 938,-32766, -276, - 77, 725, -4, -16, 1285, 332, 336, 46, -574, -574, - 76,-32766,-32766,-32766, 80,-32766, 81,-32766, 82,-32766, - 83, 84,-32766, 85, -574, 147, 156,-32766,-32766,-32766, - 160,-32766, 249,-32766,-32766, 338, 330, 1285, -574,-32766, - 430, 31, 273, 365,-32766,-32766,-32766, 366,-32766, 367, - -32766,-32766,-32766, 850, 850,-32766, 368, 1316, 369, 370, - -32766,-32766,-32766, 371, 372, 373,-32766,-32766, 374, 375, - 377, 447,-32766, 430, 570, 379, 31, 274, -275, 15, - 16, 17, 78, 18,-32766, 20, 414, 497, 850, -110, - -110, 498, 1316, 1278, -110, 505, 508, 509, 510, 511, - 515, 516, 517, -110, 525, 604, 711, 1087, 1083, 1233, - 1314, 543,-32766, 1304, 1305, 1306, 1307, 1309, 1301, 1302, - 1085, 1082, 1063, -50, 1273, 1059, 1308, 1303, 1278, -280, - -102, 14, 19, 24, 306, 303, 77, 79, 415, 413, - 618, 332, 336, 336, 624, 652, 543, 717, 1304, 1305, - 1306, 1307, 1309, 1301, 1302, 1237, 143, 1291, 1234, 1371, - 1317, 1308, 1303, 726, 729, 733,-32766, 734, 736, 737, - 738, 77, 1285, 419, 739, 743, 332, 336, 728,-32766, - -32766,-32766, 746,-32766, 913,-32766, 1396,-32766, 1398, 872, - -32766, 871, 967, 1010, 1397,-32766,-32766,-32766, 966,-32766, - 964,-32766,-32766, 965, 968, 1285, 1266,-32766, 430, 946, + 127, -531, 11, 707, 708, 31, 274, 30, 380, 955, + 599, -613, 306, 627, 0, 938, 0, 850, 926, 725, + -154, 1317, 1288, 1287, 1289, 44, -612, 749, 290, 750, + 1194, 1196, 869, 309, 310, 917, 1018, 995, 1002, 992, + 383, -575, 446, 1003, 915, 990, 1123, 304, 1126, 381, + 1127, 977, 978, 1124, 1125, 1131, 537, 1279, 1314, 861, + 330, 760, 759, 132, 541, 973, -110, -110, -110, 1341, + 1359, 1393, 1293, 666, 542, 543, -611, 1305, 1306, 1307, + 1308, 1310, 1302, 1303, -585, -584, -583, -582, 21, -525, + 1309, 1304, 1, 32, 760, 759, 33, 938,-32766, -278, + 77, 725, -4, -16, 1286, 332, 336, 42, -575, -575, + 46,-32766,-32766,-32766, 76,-32766, 80,-32766, 81,-32766, + 82, 83,-32766, 84, -575, 85, 147,-32766,-32766,-32766, + 156,-32766, 160,-32766,-32766, 249, 379, 1286, -575,-32766, + 430, 31, 273, 338,-32766,-32766,-32766, 365,-32766, 366, + -32766,-32766,-32766, 850, 850,-32766, 367, 1317, 368, 369, + -32766,-32766,-32766, 370, 371, 372,-32766,-32766, 373, 374, + 375, 377,-32766, 430, 447, 570, 31, 274, -276, -275, + 15, 16, 78, 17,-32766, 18, 20, 414, 850, -110, + -110, 497, 1317, 1279, -110, 498, 505, 508, 509, 510, + 511, 515, 516, -110, 517, 525, 604, 711, 1088, 1084, + 1234, 543,-32766, 1305, 1306, 1307, 1308, 1310, 1302, 1303, + 1315, 1086, 1083, -50, 1064, 1274, 1309, 1304, 1279, 1060, + -280, -102, 14, 19, 306, 24, 77, 79, 415, 303, + 413, 332, 336, 336, 618, 624, 543, 652, 1305, 1306, + 1307, 1308, 1310, 1302, 1303, 717, 143, 1238, 1292, 1235, + 1372, 1309, 1304, 726, 729, 733,-32766, 734, 736, 737, + 738, 77, 1286, 419, 739, 743, 332, 336, 728,-32766, + -32766,-32766, 746,-32766, 913,-32766, 1397,-32766, 1399, 872, + -32766, 871, 967, 1010, 1398,-32766,-32766,-32766, 966,-32766, + 964,-32766,-32766, 965, 968, 1286, 1267,-32766, 430, 946, 956, 944,-32766,-32766,-32766, 1000,-32766, 1001,-32766,-32766, - -32766, 650, 1395,-32766, 1352, 1341, 1359, 1368,-32766,-32766, - -32766, 0,-32766, 0,-32766,-32766, 936, 0, 1285, 0, + -32766, 650, 1396,-32766, 1353, 1342, 1360, 1369,-32766,-32766, + -32766, 1318,-32766, 336,-32766,-32766, 936, 0, 1286, 0, -32766, 430, 0, 0, 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766,-32766, 0, 0,-32766, 0, 0, 936, 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766, 0, - 0, 1285, 0,-32766, 430, 0, 0, 0,-32766,-32766, + 0, 1286, 0,-32766, 430, 0, 0, 0,-32766,-32766, -32766, 0,-32766, 0,-32766,-32766,-32766, 0, 0,-32766, 0, 0, 0, 501,-32766,-32766,-32766, 0,-32766, 0, - -32766,-32766, 0, 0, 1285, 606,-32766, 430, 0, 0, + -32766,-32766, 0, 0, 1286, 606,-32766, 430, 0, 0, 0,-32766,-32766,-32766, 0,-32766, 0,-32766,-32766,-32766, 926, 0,-32766, 2, 0, 0, 0,-32766,-32766,-32766, 0, 0, 0,-32766,-32766, 0, -253, -253, -253,-32766, @@ -550,7 +550,7 @@ class Php7 extends \PhpParser\ParserAbstract -110, 0, 0, 0, 0, 0, 977, 978, 0, 0, 0, 537, 0, 0, 0, 0, 0, 0, 0, 912, 973, -110, -110, -110,-32766, 0, 0, 0, 0, 938, - 1285, 0, 0, 725, -253, 0, 0,-32766,-32766,-32766, + 1286, 0, 0, 725, -253, 0, 0,-32766,-32766,-32766, 0,-32766, 0,-32766, 0,-32766, 0, 0,-32766, 0, 0, 0, 938,-32766,-32766,-32766, 725, -252, 0,-32766, -32766, 0, 0, 0, 0,-32766, 430, 0, 0, 0, @@ -558,28 +558,28 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $actionCheck = array( - 3, 4, 5, 6, 7, 8, 10, 10, 11, 12, - 13, 14, 83, 9, 9, 86, 10, 11, 12, 32, + 3, 4, 5, 6, 7, 8, 1, 10, 11, 12, + 13, 14, 83, 9, 32, 86, 10, 11, 12, 32, 81, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 10, 11, 12, 9, 38, 39, 31, 9, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 0, 31, 1, 9, 58, 117, 118, 119, 120, + 44, 0, 31, 9, 9, 58, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 107, 108, 109, 72, - 73, 74, 75, 76, 77, 78, 117, 1, 81, 32, + 73, 74, 75, 76, 77, 78, 117, 9, 81, 86, 71, 152, 153, 9, 31, 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, 107, 163, 109, 127, 128, 129, 130, 15, 132, - 133, 134, 135, 136, 137, 1, 1, 140, 141, 142, - 143, 144, 145, 146, 9, 148, 149, 138, 139, 1, - 98, 9, 155, 156, 157, 168, 159, 9, 3, 4, + 133, 134, 135, 136, 137, 1, 9, 140, 141, 142, + 143, 144, 145, 146, 151, 148, 149, 138, 139, 1, + 168, 164, 155, 156, 157, 9, 159, 9, 3, 4, 5, 6, 7, 8, 167, 10, 11, 12, 13, 14, - 117, 167, 167, 120, 121, 122, 123, 124, 125, 126, + 117, 167, 119, 120, 121, 122, 123, 124, 125, 126, 10, 11, 12, 45, 46, 47, 48, 49, 50, 51, 52, 53, 167, 38, 39, 142, 167, 10, 11, 12, 9, 31, 1, 33, 34, 35, 36, 37, 38, 39, - 1, 164, 9, 58, 10, 11, 12, 83, 31, 166, + 1, 167, 9, 58, 10, 11, 12, 83, 31, 166, 33, 34, 35, 36, 37, 1, 1, 72, 73, 74, 75, 76, 77, 78, 1, 31, 81, 33, 34, 35, 36, 32, 9, 88, 89, 90, 91, 92, 93, 94, @@ -590,13 +590,13 @@ class Php7 extends \PhpParser\ParserAbstract 135, 136, 137, 1, 85, 140, 141, 142, 143, 144, 145, 146, 168, 148, 149, 81, 172, 10, 11, 12, 155, 156, 157, 165, 159, 167, 3, 4, 5, 6, - 7, 8, 167, 10, 11, 12, 13, 14, 31, 164, - 33, 34, 35, 168, 10, 11, 12, 9, 52, 107, + 7, 8, 167, 10, 11, 12, 13, 14, 31, 1, + 33, 34, 35, 10, 10, 11, 12, 9, 52, 107, 108, 10, 11, 12, 10, 11, 138, 139, 1, 117, 9, 38, 39, 138, 139, 31, 1, 33, 34, 54, - 55, 56, 154, 58, 81, 164, 9, 81, 1, 154, + 55, 56, 154, 58, 81, 164, 1, 81, 1, 154, 84, 58, 9, 164, 166, 70, 168, 168, 31, 31, - 107, 166, 109, 168, 9, 72, 73, 74, 75, 76, + 164, 166, 9, 168, 168, 72, 73, 74, 75, 76, 77, 78, 168, 168, 81, 163, 172, 172, 165, 32, 167, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, @@ -604,14 +604,14 @@ class Php7 extends \PhpParser\ParserAbstract 117, 118, 119, 120, 121, 122, 123, 71, 83, 71, 127, 128, 129, 130, 161, 132, 133, 134, 135, 136, 137, 168, 85, 140, 141, 142, 143, 144, 145, 146, - 168, 148, 149, 86, 117, 117, 117, 32, 155, 156, + 168, 148, 149, 98, 117, 117, 117, 32, 155, 156, 157, 107, 159, 109, 3, 4, 5, 6, 7, 8, 167, 10, 11, 12, 13, 14, 9, 73, 74, 142, 142, 142, 10, 11, 12, 81, 141, 15, 118, 119, 107, 117, 109, 123, 138, 139, 138, 139, 9, 38, 39, 1, 132, 166, 166, 166, 117, 81, 1, 15, - 154, 166, 154, 9, 160, 1, 142, 172, 151, 58, - 9, 164, 166, 98, 168, 168, 168, 123, 51, 52, + 154, 166, 154, 9, 160, 1, 142, 172, 107, 58, + 109, 164, 166, 98, 168, 168, 168, 123, 51, 52, 53, 142, 32, 72, 73, 74, 75, 76, 77, 78, 166, 15, 81, 133, 134, 135, 32, 38, 39, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, @@ -626,47 +626,47 @@ class Php7 extends \PhpParser\ParserAbstract 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 127, 58, 117, 9, 117, 164, 160, 161, 162, 168, 107, - 108, 164, 70, 15, 169, 168, 58, 15, 164, 117, + 108, 164, 70, 9, 169, 168, 58, 15, 164, 117, 76, 77, 168, 1, 76, 77, 142, 141, 102, 103, 72, 73, 74, 75, 76, 77, 78, 17, 165, 81, 167, 71, 107, 108, 107, 108, 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, 15, 112, 113, 127, 128, 129, 130, 17, + 122, 123, 15, 112, 113, 127, 128, 129, 130, 15, 132, 133, 134, 135, 136, 137, 17, 17, 140, 141, 142, 143, 144, 145, 146, 32, 148, 149, 138, 139, 17, 17, 17, 155, 156, 157, 2, 3, 4, 5, 6, 7, 8, 17, 102, 17, 17, 13, 14, 107, - 16, 109, 1, 17, 17, 17, 114, 32, 168, 117, + 16, 109, 1, 17, 17, 17, 114, 17, 168, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 1, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 1, 32, 39, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 51, 52, 32, 71, 81, 32, 57, 71, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 32, 71, 72, 73, 74, 75, - 32, 169, 32, 79, 80, 81, 32, 83, 36, 36, - 39, 87, 88, 89, 90, 117, 92, 36, 94, 36, + 32, 169, 32, 79, 80, 81, 32, 83, 32, 32, + 38, 87, 88, 89, 90, 117, 92, 36, 94, 36, 96, 36, 1, 99, 100, 36, 85, 36, 104, 105, - 106, 107, 108, 38, 110, 111, 38, 38, 38, 141, - 116, 117, 83, 78, 58, 138, 139, 123, 70, 138, - 139, 71, 128, 129, 130, 86, 81, 81, 160, 161, + 106, 107, 108, 36, 110, 111, 36, 38, 58, 141, + 116, 117, 83, 38, 38, 138, 139, 123, 70, 138, + 139, 78, 128, 129, 130, 71, 81, 86, 160, 161, 162, 154, 83, 31, 140, 141, 84, 143, 144, 145, - 146, 147, 148, 149, 150, 168, 83, 118, 119, 168, - 156, 157, 123, 91, 160, 161, 162, 163, 98, 93, - 166, 132, 90, 132, 170, 171, 172, 76, 77, 78, - 141, 95, 97, 0, 1, 164, 85, 98, 98, 168, - 154, 114, 91, 81, 93, 101, 95, 101, 97, 115, - 136, 154, 163, 136, 158, 166, 163, 167, 107, 141, - 166, 172, -1, -1, -1, 158, 71, -1, 137, 118, - 119, -1, 38, 39, 123, 151, -1, -1, -1, 117, + 146, 147, 148, 149, 150, 168, 81, 118, 119, 168, + 156, 157, 123, 90, 160, 161, 162, 163, 98, 91, + 166, 132, 83, 97, 170, 171, 172, 76, 77, 78, + 141, 93, 95, 0, 1, 164, 85, 115, 98, 168, + 98, 151, 91, 81, 93, 101, 95, 101, 97, 132, + 151, 154, 163, 137, 136, 166, 160, 114, 107, 164, + 136, 172, 168, 170, -1, -1, 71, -1, -1, 118, + 119, -1, 38, 39, 123, 141, -1, -1, -1, 117, -1, -1, 131, 132, 133, 134, 135, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 151, 154, 141, 142, 71, 72, 154, 154, 160, - 165, 159, 165, 170, 172, 164, -1, 83, 85, 168, + 30, 154, 154, 141, 142, 71, 72, 154, 154, 159, + 158, 166, 163, 158, -1, 164, -1, 83, 85, 168, 169, 87, 160, 161, 162, 164, 166, 164, 166, 164, 60, 61, 164, 138, 139, 164, 164, 164, 164, 164, 107, 71, 109, 164, 164, 164, 164, 114, 164, 154, - 164, 118, 119, 164, 164, 164, 123, 123, 164, 166, + 164, 118, 119, 164, 164, 164, 123, 123, 165, 165, 168, 38, 39, 168, 131, 132, 133, 134, 135, 165, 165, 165, 1, 165, 140, 141, 166, 143, 144, 145, 146, 147, 148, 149, 166, 166, 166, 166, 155, 166, @@ -678,7 +678,7 @@ class Php7 extends \PhpParser\ParserAbstract 117, 71, 72, 166, 88, 89, 90, 166, 92, 166, 94, 128, 96, 83, 83, 99, 166, 87, 166, 166, 104, 105, 106, 166, 166, 166, 110, 111, 166, 166, - 166, 166, 116, 117, 166, 168, 71, 72, 167, 167, + 166, 166, 116, 117, 166, 166, 71, 72, 167, 167, 167, 167, 159, 167, 128, 167, 167, 167, 83, 118, 119, 167, 87, 123, 123, 167, 167, 167, 167, 167, 167, 167, 167, 132, 167, 167, 167, 167, 167, 167, @@ -687,14 +687,14 @@ class Php7 extends \PhpParser\ParserAbstract 167, 167, 167, 167, 163, 167, 166, 166, 169, 167, 167, 171, 172, 172, 167, 167, 141, 167, 143, 144, 145, 146, 147, 148, 149, 167, 32, 167, 167, 167, - 171, 156, 157, 168, 168, 168, 75, 168, 168, 168, + 167, 156, 157, 168, 168, 168, 75, 168, 168, 168, 168, 166, 81, 169, 168, 168, 171, 172, 168, 88, 89, 90, 169, 92, 169, 94, 169, 96, 169, 169, 99, 169, 169, 169, 169, 104, 105, 106, 169, 75, 169, 110, 111, 169, 169, 81, 169, 116, 117, 169, 169, 169, 88, 89, 90, 169, 92, 169, 94, 128, 96, 169, 169, 99, 169, 169, 169, 169, 104, 105, - 106, -1, 75, -1, 110, 111, 1, -1, 81, -1, + 106, 171, 75, 172, 110, 111, 1, -1, 81, -1, 116, 117, -1, -1, -1, 88, 89, 90, -1, 92, -1, 94, 128, 96, -1, -1, 99, -1, -1, 1, -1, 104, 105, 106, -1, 75, -1, 110, 111, -1, @@ -721,7 +721,7 @@ class Php7 extends \PhpParser\ParserAbstract protected array $actionBase = array( 0, 155, -3, 313, 471, 471, 881, 963, 1365, 1388, 892, 134, 515, -61, 367, 524, 524, 801, 524, 209, - 510, 283, 517, 517, 517, 921, 836, 628, 628, 836, + 510, 283, 517, 517, 517, 920, 855, 628, 628, 855, 628, 1053, 1053, 1053, 1053, 1086, 1086, 1320, 1320, 1353, 1254, 1221, 1449, 1449, 1449, 1449, 1449, 1287, 1449, 1449, 1449, 1449, 1449, 1287, 1449, 1449, 1449, 1449, 1449, 1449, @@ -735,63 +735,63 @@ class Php7 extends \PhpParser\ParserAbstract 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, 1449, - 1449, 1449, 1449, 1449, 1449, 1449, 1449, 201, 47, 29, - 52, 737, 1098, 1118, 1103, 1120, 1095, 1094, 1102, 1107, - 1121, 1183, 1185, 834, 1186, 1187, 1182, 1188, 1108, 938, - 1096, 1110, 612, 612, 612, 612, 612, 612, 612, 612, + 1449, 1449, 1449, 1449, 1449, 1449, 1449, 201, -13, 44, + 365, 744, 1102, 1120, 1107, 1121, 1096, 1095, 1103, 1108, + 1122, 1183, 1185, 837, 1186, 1187, 1182, 1188, 1110, 938, + 1098, 1118, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, - -4, 482, 334, 331, 331, 331, 331, 331, 331, 331, + 323, 482, 334, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 964, 964, 21, 21, 21, 324, 1135, 1100, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 297, 204, 1000, 187, 170, 170, 6, 6, 6, 6, 6, - 692, 1101, 53, 819, 819, 138, 138, 138, 138, 542, + 692, 53, 1101, 819, 819, 138, 138, 138, 138, 542, 14, 347, 355, -41, 348, 232, 384, 384, 487, 487, 554, 554, 349, 349, 554, 554, 554, 399, 399, 399, - 399, 208, 215, 366, 364, 377, 848, 224, 224, 224, - 224, 848, 848, 848, 848, 880, 1119, 848, 1007, 1023, - 848, 848, 368, 767, 767, 925, 305, 305, 305, 767, - 393, -71, -71, 393, 380, -71, 225, 286, 556, 821, - 572, 543, 556, 640, 771, 233, 148, 879, 605, 879, - 1093, 829, 829, 799, 790, 924, 1140, 1122, 874, 1176, - 876, 1178, 420, 9, 789, 1092, 1092, 1092, 1092, 1092, - 1092, 1092, 1092, 1092, 1092, 1092, 872, 519, 1093, 436, - 872, 872, 872, 519, 519, 519, 519, 519, 519, 519, - 519, 800, 519, 519, 641, 436, 614, 618, 436, 851, - 519, 827, 201, 201, 201, 201, 201, 201, 201, 201, - 201, 201, 201, -13, 201, 201, 47, 292, 292, 201, - 165, 76, 292, 292, 292, 292, 201, 201, 201, 201, - 605, 846, 826, 607, 435, 837, 25, 846, 846, 846, - 4, 113, 5, 832, 833, 273, 835, 835, 835, 853, - 953, 953, 835, 839, 835, 853, 835, 835, 953, 953, - 823, 953, 203, 601, 375, 514, 609, 953, 341, 835, - 835, 835, 835, 847, 953, 45, 74, 616, 835, 328, - 272, 835, 835, 847, 844, 808, 861, 953, 953, 953, - 847, 499, 861, 861, 861, 895, 898, 857, 805, 363, - 357, 663, 191, 831, 805, 805, 835, 521, 857, 805, - 857, 805, 882, 805, 805, 805, 857, 805, 839, 477, - 805, 778, 779, 620, 142, 805, 51, 974, 978, 743, - 980, 960, 982, 1035, 984, 985, 1125, 951, 996, 971, - 987, 1038, 957, 956, 830, 750, 763, 878, 816, 950, - 838, 838, 838, 940, 948, 838, 838, 838, 838, 838, - 838, 838, 838, 750, 875, 884, 862, 1011, 764, 765, - 1068, 854, 1145, 873, 1007, 974, 985, 775, 971, 987, - 957, 956, 798, 797, 795, 796, 794, 793, 791, 792, - 802, 1070, 1071, 989, 891, 776, 1048, 1013, 1143, 998, - 1020, 1022, 1049, 1072, 901, 1073, 1147, 840, 1149, 1150, - 877, 1027, 1126, 838, 923, 824, 934, 1023, 949, 750, - 935, 1083, 1084, 1042, 922, 1050, 1054, 1037, 869, 842, - 936, 1152, 1028, 1029, 1032, 1127, 1129, 893, 1043, 820, - 1058, 870, 1099, 1059, 1060, 1061, 1062, 1130, 1153, 1131, - 890, 1132, 902, 852, 962, 865, 1154, 504, 845, 849, - 860, 1034, 536, 999, 1136, 1134, 1155, 1063, 1064, 1065, - 1159, 1161, 990, 903, 1044, 866, 1046, 1041, 904, 905, - 606, 859, 1085, 841, 843, 858, 622, 668, 1164, 1165, - 1167, 994, 822, 825, 909, 910, 1087, 855, 1088, 1170, - 672, 911, 1171, 1069, 786, 787, 690, 749, 742, 788, - 856, 1137, 883, 864, 850, 1033, 787, 828, 912, 1172, - 914, 916, 919, 1067, 920, 0, 0, 0, 0, 0, + 399, 208, 215, 366, 364, -7, 864, 224, 224, 224, + 224, 864, 864, 864, 864, 829, 1190, 864, 1011, 1027, + 864, 864, 368, 767, 767, 925, 305, 305, 305, 767, + 421, -71, -71, 421, 380, -71, 225, 286, 556, 847, + 572, 543, 556, 640, 771, 233, 148, 826, 605, 826, + 1094, 831, 831, 802, 792, 921, 1140, 1123, 874, 1176, + 876, 1178, 420, 9, 791, 1093, 1093, 1093, 1093, 1093, + 1093, 1093, 1093, 1093, 1093, 1093, 1191, 519, 1094, 436, + 1191, 1191, 1191, 519, 519, 519, 519, 519, 519, 519, + 519, 805, 519, 519, 641, 436, 614, 618, 436, 860, + 519, 877, 201, 201, 201, 201, 201, 201, 201, 201, + 201, 201, 201, -18, 201, 201, -13, 292, 292, 201, + 216, 5, 292, 292, 292, 292, 201, 201, 201, 201, + 605, 840, 882, 607, 435, 885, 29, 840, 840, 840, + 4, 113, 25, 841, 843, 393, 835, 835, 835, 869, + 956, 956, 835, 839, 835, 869, 835, 835, 956, 956, + 879, 956, 146, 609, 373, 514, 616, 956, 272, 835, + 835, 835, 835, 854, 956, 45, 68, 620, 835, 203, + 191, 835, 835, 854, 848, 828, 846, 956, 956, 956, + 854, 499, 846, 846, 846, 893, 895, 873, 822, 363, + 341, 674, 127, 783, 822, 822, 835, 601, 873, 822, + 873, 822, 880, 822, 822, 822, 873, 822, 839, 477, + 822, 779, 786, 663, 74, 822, 51, 978, 980, 743, + 982, 971, 984, 1038, 985, 987, 1125, 953, 999, 974, + 989, 1039, 960, 957, 836, 763, 764, 878, 827, 951, + 838, 838, 838, 948, 949, 838, 838, 838, 838, 838, + 838, 838, 838, 763, 923, 884, 853, 1013, 765, 776, + 1069, 820, 1145, 823, 1011, 978, 987, 789, 974, 989, + 960, 957, 800, 799, 797, 798, 796, 795, 793, 794, + 808, 1071, 1072, 990, 825, 778, 1049, 1020, 1143, 922, + 1022, 1023, 1050, 1073, 898, 1083, 1147, 844, 1149, 1150, + 924, 1028, 1126, 838, 940, 875, 934, 1027, 950, 763, + 935, 1084, 1085, 1043, 824, 1054, 1058, 998, 870, 842, + 936, 1152, 1029, 1032, 1033, 1127, 1129, 891, 1044, 962, + 1059, 872, 1099, 1060, 1061, 1062, 1063, 1130, 1153, 1131, + 890, 1132, 901, 858, 1041, 856, 1154, 504, 851, 857, + 866, 1035, 536, 1007, 1136, 1134, 1155, 1064, 1065, 1067, + 1159, 1161, 994, 902, 1046, 867, 1048, 1042, 903, 904, + 606, 865, 1087, 845, 849, 859, 622, 672, 1164, 1165, + 1167, 996, 830, 833, 905, 909, 1088, 832, 1092, 1170, + 737, 910, 1171, 1070, 787, 788, 690, 750, 749, 790, + 868, 1137, 883, 852, 850, 1034, 788, 834, 911, 1172, + 912, 914, 916, 1068, 919, 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, 784, 784, 784, 784, 784, @@ -821,112 +821,112 @@ class Php7 extends \PhpParser\ParserAbstract 612, 612, 612, 612, 612, 612, 612, 758, 758, 612, 612, 612, 612, 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 612, 612, 0, 612, 612, 612, 612, - 612, 612, 612, 612, 823, 758, 758, 758, 758, 305, + 612, 612, 612, 612, 879, 758, 758, 758, 758, 305, 305, 305, 305, -96, -96, 758, 758, 380, 758, 380, 758, 758, 305, 305, 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 0, 0, 0, 436, -71, 758, 839, 839, 839, 839, 758, 758, 758, 758, -71, -71, 758, 414, 414, 758, 758, 0, 0, 0, 0, 0, 0, 0, 0, 436, 0, 0, 436, 0, 0, - 839, 839, 758, 380, 823, 135, 758, 0, 0, 0, + 839, 839, 758, 380, 879, 328, 758, 0, 0, 0, 0, 436, 839, 436, 519, -71, -71, 519, 519, 292, - 201, 135, 596, 596, 596, 596, 0, 0, 605, 823, - 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, - 839, 0, 823, 0, 839, 839, 839, 0, 0, 0, - 0, 0, 0, 0, 0, 953, 0, 0, 0, 0, - 0, 0, 0, 839, 0, 953, 0, 0, 0, 0, + 201, 328, 596, 596, 596, 596, 0, 0, 605, 879, + 879, 879, 879, 879, 879, 879, 879, 879, 879, 879, + 839, 0, 879, 0, 839, 839, 839, 0, 0, 0, + 0, 0, 0, 0, 0, 956, 0, 0, 0, 0, + 0, 0, 0, 839, 0, 956, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 839, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 838, 869, 0, 0, 869, - 0, 838, 838, 838, 0, 0, 0, 859, 855 + 0, 0, 0, 0, 0, 838, 870, 0, 0, 870, + 0, 838, 838, 838, 0, 0, 0, 865, 832 ); protected array $actionDefault = array( 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767, 630, 630, 630, 630,32767,32767, 257, 102,32767, - 32767, 499, 414, 414, 414,32767,32767,32767, 572, 572, - 572, 572, 572, 17,32767,32767,32767,32767,32767,32767, - 32767, 499,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 631, 631, 631, 631,32767,32767, 257, 102,32767, + 32767, 500, 415, 415, 415,32767,32767,32767, 573, 573, + 573, 573, 573, 17,32767,32767,32767,32767,32767,32767, + 32767, 500,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, 36, 7, 8, 10, 11, 49, 337, + 32767,32767,32767, 36, 7, 8, 10, 11, 49, 338, 100,32767,32767,32767,32767,32767,32767,32767,32767, 102, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 623,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 624,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 402, 493, 503, 481, 482, 484, 485, 413, - 573, 629, 343, 626, 341, 412, 146, 353, 342, 245, - 261, 504, 262, 505, 508, 509, 218, 399, 150, 151, - 445, 500, 447, 498, 502, 446, 419, 426, 427, 428, - 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, - 417, 418, 501,32767,32767, 478, 477, 476, 443,32767, - 32767,32767,32767,32767,32767,32767,32767, 102,32767, 444, - 448, 416, 451, 449, 450, 467, 468, 465, 466, 469, - 32767,32767, 322,32767,32767, 470, 471, 472, 473, 380, - 378,32767,32767, 111, 322, 111,32767,32767, 458, 459, + 32767,32767, 403, 494, 504, 482, 483, 485, 486, 414, + 574, 630, 344, 627, 342, 413, 146, 354, 343, 245, + 261, 505, 262, 506, 509, 510, 218, 400, 150, 151, + 446, 501, 448, 499, 503, 447, 420, 427, 428, 429, + 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, + 418, 419, 502,32767,32767, 479, 478, 477, 444,32767, + 32767,32767,32767,32767,32767,32767,32767, 102,32767, 445, + 449, 417, 452, 450, 451, 468, 469, 466, 467, 470, + 32767, 323,32767,32767,32767, 471, 472, 473, 474, 381, + 379,32767,32767, 111, 323, 111,32767,32767, 459, 460, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 516, 566, 475,32767,32767,32767,32767,32767,32767, + 32767, 517, 567, 476,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767, 102,32767,32767, - 32767, 100, 568, 440, 442, 536, 453, 454, 452, 420, - 32767, 541,32767, 102,32767, 543,32767,32767,32767,32767, - 32767,32767,32767, 567,32767, 574, 574,32767, 529, 100, - 196,32767, 542, 196, 196,32767,32767,32767,32767,32767, - 32767,32767,32767, 637, 529, 110, 110, 110, 110, 110, + 32767, 100, 569, 441, 443, 537, 454, 455, 453, 421, + 32767, 542,32767, 102,32767, 544,32767,32767,32767,32767, + 32767,32767,32767, 568,32767, 575, 575,32767, 530, 100, + 196,32767, 543, 196, 196,32767,32767,32767,32767,32767, + 32767,32767,32767, 638, 530, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, 196, 110,32767, 32767,32767, 100, 196, 196, 196, 196, 196, 196, 196, - 196, 544, 196, 196, 191,32767, 271, 273, 102, 591, - 196, 546,32767,32767,32767,32767,32767,32767,32767,32767, + 196, 545, 196, 196, 191,32767, 271, 273, 102, 592, + 196, 547,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, - 529, 463, 139,32767, 531, 139, 574, 455, 456, 457, - 574, 574, 574, 318, 295,32767,32767,32767,32767,32767, - 544, 544, 100, 100, 100, 100,32767,32767,32767,32767, - 111, 515, 99, 99, 99, 99, 99, 103, 101,32767, + 530, 464, 139,32767, 532, 139, 575, 456, 457, 458, + 575, 575, 575, 319, 296,32767,32767,32767,32767,32767, + 545, 545, 100, 100, 100, 100,32767,32767,32767,32767, + 111, 516, 99, 99, 99, 99, 99, 103, 101,32767, 32767,32767,32767, 226,32767, 101, 101, 99,32767, 101, - 101,32767,32767, 226, 228, 215, 230,32767, 595, 596, - 226, 101, 230, 230, 230, 250, 250, 518, 324, 101, - 99, 101, 101, 198, 324, 324,32767, 101, 518, 324, - 518, 324, 200, 324, 324, 324, 518, 324,32767, 101, - 324, 217, 402, 99, 99, 324,32767,32767,32767, 531, + 101,32767,32767, 226, 228, 215, 230,32767, 596, 597, + 226, 101, 230, 230, 230, 250, 250, 519, 325, 101, + 99, 101, 101, 198, 325, 325,32767, 101, 519, 325, + 519, 325, 200, 325, 325, 325, 519, 325,32767, 101, + 325, 217, 403, 99, 99, 325,32767,32767,32767, 532, 32767,32767,32767,32767,32767,32767,32767, 225,32767,32767, - 32767,32767,32767,32767,32767,32767, 561,32767, 579, 593, - 461, 462, 464, 578, 576, 486, 487, 488, 489, 490, - 491, 492, 495, 625,32767, 535,32767,32767,32767, 352, - 32767, 635,32767,32767,32767, 9, 74, 524, 42, 43, - 51, 57, 550, 551, 552, 553, 547, 548, 554, 549, + 32767,32767,32767,32767,32767,32767, 562,32767, 580, 594, + 462, 463, 465, 579, 577, 487, 488, 489, 490, 491, + 492, 493, 496, 626,32767, 536,32767,32767,32767, 353, + 32767, 636,32767,32767,32767, 9, 74, 525, 42, 43, + 51, 57, 551, 552, 553, 554, 548, 549, 555, 550, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 636,32767, 574,32767, - 32767,32767,32767, 460, 556, 601,32767,32767, 575, 628, + 32767,32767,32767,32767,32767,32767, 637,32767, 575,32767, + 32767,32767,32767, 461, 557, 602,32767,32767, 576, 629, 32767,32767,32767,32767,32767,32767,32767,32767, 139,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 561, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 562, 32767, 137,32767,32767,32767,32767,32767,32767,32767,32767, - 557,32767,32767,32767, 574,32767,32767,32767,32767, 320, - 317,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 574,32767,32767, - 32767,32767,32767, 297,32767, 314,32767,32767,32767,32767, + 558,32767,32767,32767, 575,32767,32767,32767,32767, 321, + 318,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 575,32767,32767, + 32767,32767,32767, 298,32767, 315,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 398, 531, 300, 302, 303,32767, - 32767,32767,32767, 374,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 153, 153, 3, 3, 355, - 153, 153, 153, 355, 355, 153, 355, 355, 355, 153, + 32767,32767,32767,32767, 399, 532, 301, 303, 304,32767, + 32767,32767,32767, 375,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 153, 153, 3, 3, 356, + 153, 153, 153, 356, 356, 153, 356, 356, 356, 153, 153, 153, 153, 153, 153, 283, 186, 265, 268, 250, - 250, 153, 366, 153 + 250, 153, 367, 153 ); protected array $goto = array( - 202, 169, 202, 202, 202, 1055, 929, 712, 930, 670, - 671, 598, 688, 689, 690, 748, 653, 655, 359, 435, - 675, 628, 591, 721, 699, 702, 1028, 710, 719, 1024, + 202, 169, 202, 202, 202, 1056, 842, 712, 359, 670, + 671, 598, 688, 689, 690, 748, 653, 655, 591, 929, + 675, 930, 1090, 721, 699, 702, 1028, 710, 719, 1024, 171, 171, 171, 171, 226, 203, 199, 199, 181, 183, - 221, 199, 199, 199, 199, 199, 1179, 200, 200, 200, - 200, 200, 1179, 193, 194, 195, 196, 197, 198, 223, + 221, 199, 199, 199, 199, 199, 1180, 200, 200, 200, + 200, 200, 1180, 193, 194, 195, 196, 197, 198, 223, 221, 224, 550, 551, 431, 552, 555, 556, 557, 558, 559, 560, 561, 562, 172, 173, 174, 201, 175, 176, 177, 170, 178, 179, 180, 182, 220, 222, 225, 245, @@ -938,55 +938,55 @@ class Php7 extends \PhpParser\ParserAbstract 206, 207, 246, 186, 187, 208, 188, 209, 205, 189, 247, 204, 168, 210, 211, 190, 212, 213, 214, 191, 215, 216, 192, 217, 218, 219, 285, 283, 285, 285, - 870, 909, 866, 909, 909, 615, 255, 255, 255, 255, - 255, 441, 677, 362, 362, 362, 362, 436, 329, 323, - 324, 345, 608, 440, 346, 442, 654, 1260, 962, 469, - 1089, 469, 1261, 1264, 963, 1265, 253, 253, 253, 253, - 250, 256, 1385, 1385, 867, 884, 925, 920, 921, 934, + 870, 1089, 1091, 1094, 615, 255, 255, 255, 255, 255, + 441, 677, 614, 1130, 884, 867, 436, 329, 323, 324, + 345, 608, 440, 346, 442, 654, 724, 492, 521, 715, + 896, 1128, 993, 883, 494, 253, 253, 253, 253, 250, + 256, 489, 1361, 1362, 1386, 1386, 925, 920, 921, 934, 876, 922, 873, 923, 924, 874, 877, 363, 928, 881, - 868, 896, 1385, 880, 883, 443, 993, 363, 363, 842, - 1116, 1111, 1112, 1113, 513, 429, 514, 443, 1388, 1388, - 451, 492, 520, 363, 363, 1062, 1062, 363, 494, 1402, - 681, 1073, 1069, 1070, 637, 674, 1284, 1055, 1284, 1284, - 569, 360, 361, 363, 363, 902, 1055, 1284, 351, 1055, - 605, 1055, 1055, 614, 1129, 1055, 1055, 1055, 1055, 1055, - 1055, 1055, 1055, 1055, 1055, 1055, 8, 724, 9, 521, - 715, 1284, 1127, 474, 352, 351, 1284, 1284, 1284, 1284, - 357, 1228, 1284, 1136, 1137, 1284, 1284, 1367, 1367, 1367, - 1367, 1346, 574, 567, 404, 407, 616, 620, 958, 958, - 1375, 480, 480, 942, 1061, 1060, 565, 943, 565, 565, - 480, 1058, 1058, 522, 1014, 697, 970, 565, 402, 1050, - 1066, 1067, 318, 567, 574, 600, 601, 319, 611, 617, - 676, 633, 634, 1088, 1090, 1093, 489, 1360, 1361, 28, - 603, 467, 848, 1064, 1065, 569, 987, 987, 987, 987, - 335, 316, 467, 639, 639, 981, 988, 1362, 1363, 1315, - 1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315, 1315, 1334, - 1334, 1175, 863, 1079, 863, 1334, 1334, 1334, 1334, 1334, - 1334, 1334, 1334, 1334, 1334, 848, 449, 848, 258, 258, - 626, 640, 643, 644, 645, 646, 667, 668, 669, 723, - 460, 460, 698, 460, 460, 1357, 682, 1357, 1357, 347, - 1277, 860, 985, 420, 720, 632, 1357, 279, 334, 976, - 334, 334, 647, 649, 651, 411, 568, 595, 568, 863, - 1017, 889, 568, 989, 595, 747, 405, 473, 566, 1026, - 1021, 1369, 1369, 1369, 1369, 609, 631, 1275, 1100, 483, - 612, 484, 485, 886, 563, 563, 563, 563, 894, 619, - 1036, 1393, 1394, 751, 412, 1331, 1331, 898, 490, 1150, - 1353, 1331, 1331, 1331, 1331, 1331, 1331, 1331, 1331, 1331, - 1331, 998, 1104, 1046, 0, 0, 892, 0, 0, 0, - 0, 0, 0, 0, 0, 460, 460, 460, 460, 460, - 460, 460, 460, 460, 460, 460, 0, 0, 460, 0, - 1102, 554, 554, 0, 1355, 1355, 1102, 554, 554, 554, - 554, 554, 554, 554, 554, 554, 554, 553, 553, 0, - 0, 0, 1279, 553, 0, 553, 553, 553, 553, 553, - 553, 553, 553, 621, 622, 417, 418, 947, 1165, 863, - 686, 0, 687, 0, 422, 423, 424, 0, 700, 1033, - 0, 425, 897, 885, 1099, 1103, 355, 888, 0, 680, - 1012, 0, 709, 0, 0, 882, 996, 0, 0, 0, - 0, 0, 0, 844, 0, 0, 0, 1274, 709, 1280, - 1281, 709, 1267, 0, 0, 0, 0, 0, 858, 986, - 0, 0, 0, 0, 0, 1267, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1282, 1343, - 1344, 0, 1148, 901, 0, 0, 0, 0, 0, 0, + 480, 480, 868, 880, 1386, 848, 474, 363, 363, 480, + 1117, 1112, 1113, 1114, 1229, 351, 362, 362, 362, 362, + 1389, 1389, 429, 363, 363, 1017, 902, 363, 989, 1403, + 747, 360, 361, 566, 1026, 1021, 1056, 1285, 1285, 1285, + 569, 352, 351, 363, 363, 605, 1056, 1285, 848, 1056, + 848, 1056, 1056, 1137, 1138, 1056, 1056, 1056, 1056, 1056, + 1056, 1056, 1056, 1056, 1056, 1056, 357, 1261, 962, 637, + 674, 1285, 1262, 1265, 963, 1266, 1285, 1285, 1285, 1285, + 1376, 435, 1285, 628, 402, 1285, 1285, 1368, 1368, 1368, + 1368, 1347, 574, 567, 1062, 1061, 1059, 1059, 958, 958, + 697, 970, 1014, 942, 1051, 1067, 1068, 943, 565, 565, + 565, 603, 513, 522, 514, 863, 676, 863, 565, 709, + 520, 1176, 318, 567, 574, 600, 601, 319, 611, 617, + 844, 633, 634, 1080, 8, 709, 9, 449, 709, 28, + 1065, 1066, 467, 335, 316, 569, 698, 987, 987, 987, + 987, 1363, 1364, 467, 639, 639, 981, 988, 609, 631, + 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, 1316, + 1335, 1335, 863, 469, 682, 469, 1335, 1335, 1335, 1335, + 1335, 1335, 1335, 1335, 1335, 1335, 347, 258, 258, 626, + 640, 643, 644, 645, 646, 667, 668, 669, 723, 632, + 460, 860, 460, 460, 460, 1358, 1358, 1358, 553, 553, + 1278, 985, 420, 720, 553, 1358, 553, 553, 553, 553, + 553, 553, 553, 553, 451, 889, 568, 595, 568, 647, + 649, 651, 568, 976, 595, 411, 405, 473, 886, 1276, + 1370, 1370, 1370, 1370, 909, 866, 909, 909, 1036, 483, + 612, 484, 485, 751, 563, 563, 563, 563, 894, 619, + 1101, 1394, 1395, 412, 1332, 1332, 898, 490, 1151, 1354, + 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, + 279, 1105, 334, 334, 334, 998, 892, 0, 1280, 1047, + 0, 0, 863, 0, 0, 460, 460, 460, 460, 460, + 460, 460, 460, 460, 460, 460, 0, 0, 460, 1103, + 554, 554, 0, 1356, 1356, 1103, 554, 554, 554, 554, + 554, 554, 554, 554, 554, 554, 621, 622, 417, 418, + 947, 1166, 0, 686, 0, 687, 0, 422, 423, 424, + 0, 700, 1033, 0, 425, 1281, 1282, 0, 1268, 355, + 888, 0, 680, 1012, 858, 0, 0, 0, 882, 443, + 0, 1268, 0, 897, 885, 1100, 1104, 0, 0, 0, + 1275, 0, 443, 0, 1283, 1344, 1345, 996, 0, 0, + 1063, 1063, 0, 0, 0, 681, 1074, 1070, 1071, 404, + 407, 616, 620, 0, 0, 0, 0, 0, 0, 0, + 986, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1149, 901, 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, @@ -994,9 +994,9 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $gotoCheck = array( - 42, 42, 42, 42, 42, 73, 65, 73, 65, 86, - 86, 48, 86, 86, 86, 48, 48, 48, 97, 13, - 48, 13, 127, 9, 48, 48, 48, 48, 48, 48, + 42, 42, 42, 42, 42, 73, 6, 73, 97, 86, + 86, 48, 86, 86, 86, 48, 48, 48, 127, 65, + 48, 65, 131, 9, 48, 48, 48, 48, 48, 48, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1011,55 +1011,55 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 23, 23, 23, 23, - 15, 25, 25, 25, 25, 134, 5, 5, 5, 5, - 5, 66, 66, 24, 24, 24, 24, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 79, 79, 83, - 131, 83, 79, 79, 79, 79, 5, 5, 5, 5, - 5, 5, 191, 191, 26, 35, 15, 15, 15, 15, + 15, 130, 130, 130, 134, 5, 5, 5, 5, 5, + 66, 66, 8, 8, 35, 26, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 8, 84, 8, 8, + 35, 8, 49, 35, 84, 5, 5, 5, 5, 5, + 5, 185, 185, 185, 191, 191, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 15, 15, - 27, 35, 191, 15, 35, 118, 49, 14, 14, 6, - 15, 15, 15, 15, 163, 43, 163, 118, 191, 191, - 83, 84, 163, 14, 14, 118, 118, 14, 84, 14, - 118, 118, 118, 118, 56, 56, 73, 73, 73, 73, - 14, 97, 97, 14, 14, 45, 73, 73, 177, 73, - 181, 73, 73, 8, 8, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 46, 8, 46, 8, - 8, 73, 8, 159, 177, 177, 73, 73, 73, 73, - 188, 159, 73, 148, 148, 73, 73, 9, 9, 9, - 9, 14, 76, 76, 59, 59, 59, 59, 9, 9, - 190, 157, 157, 73, 119, 119, 19, 73, 19, 19, - 157, 89, 89, 14, 103, 89, 89, 19, 62, 89, - 89, 89, 76, 76, 76, 76, 76, 76, 76, 76, - 64, 76, 76, 130, 130, 130, 185, 185, 185, 76, - 104, 19, 12, 120, 120, 14, 19, 19, 19, 19, - 178, 178, 19, 108, 108, 19, 19, 187, 187, 108, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 179, - 179, 158, 22, 115, 22, 179, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 12, 113, 12, 5, 5, - 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 23, 23, 117, 23, 23, 134, 121, 134, 134, 29, - 14, 18, 93, 93, 93, 80, 134, 24, 24, 92, - 24, 24, 85, 85, 85, 28, 9, 9, 9, 22, - 50, 39, 9, 50, 9, 50, 9, 9, 50, 50, - 50, 134, 134, 134, 134, 2, 2, 169, 133, 9, - 9, 9, 9, 37, 107, 107, 107, 107, 9, 107, - 110, 9, 9, 99, 31, 180, 180, 41, 160, 151, - 134, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 180, 96, 136, 114, -1, -1, 9, -1, -1, -1, - -1, -1, -1, -1, -1, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, -1, -1, 23, -1, - 134, 182, 182, -1, 134, 134, 134, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 165, 165, -1, - -1, -1, 20, 165, -1, 165, 165, 165, 165, 165, - 165, 165, 165, 17, 17, 82, 82, 17, 17, 22, - 82, -1, 82, -1, 82, 82, 82, -1, 82, 17, - -1, 82, 16, 16, 16, 16, 82, 17, -1, 17, - 17, -1, 7, -1, -1, 17, 16, -1, -1, -1, - -1, -1, -1, 7, -1, -1, -1, 17, 7, 20, - 20, 7, 20, -1, -1, -1, -1, -1, 20, 16, - -1, -1, -1, -1, -1, 20, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 20, 20, - 20, -1, 16, 16, -1, -1, -1, -1, -1, -1, + 157, 157, 27, 15, 191, 12, 159, 14, 14, 157, + 15, 15, 15, 15, 159, 177, 24, 24, 24, 24, + 191, 191, 43, 14, 14, 50, 45, 14, 50, 14, + 50, 97, 97, 50, 50, 50, 73, 73, 73, 73, + 14, 177, 177, 14, 14, 181, 73, 73, 12, 73, + 12, 73, 73, 148, 148, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 188, 79, 79, 56, + 56, 73, 79, 79, 79, 79, 73, 73, 73, 73, + 190, 13, 73, 13, 62, 73, 73, 9, 9, 9, + 9, 14, 76, 76, 119, 119, 89, 89, 9, 9, + 89, 89, 103, 73, 89, 89, 89, 73, 19, 19, + 19, 104, 163, 14, 163, 22, 64, 22, 19, 7, + 163, 158, 76, 76, 76, 76, 76, 76, 76, 76, + 7, 76, 76, 115, 46, 7, 46, 113, 7, 76, + 120, 120, 19, 178, 178, 14, 117, 19, 19, 19, + 19, 187, 187, 19, 108, 108, 19, 19, 2, 2, + 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, + 179, 179, 22, 83, 121, 83, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 29, 5, 5, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 80, + 23, 18, 23, 23, 23, 134, 134, 134, 165, 165, + 14, 93, 93, 93, 165, 134, 165, 165, 165, 165, + 165, 165, 165, 165, 83, 39, 9, 9, 9, 85, + 85, 85, 9, 92, 9, 28, 9, 9, 37, 169, + 134, 134, 134, 134, 25, 25, 25, 25, 110, 9, + 9, 9, 9, 99, 107, 107, 107, 107, 9, 107, + 133, 9, 9, 31, 180, 180, 41, 160, 151, 134, + 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, + 24, 136, 24, 24, 24, 96, 9, -1, 20, 114, + -1, -1, 22, -1, -1, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, -1, -1, 23, 134, + 182, 182, -1, 134, 134, 134, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 17, 17, 82, 82, + 17, 17, -1, 82, -1, 82, -1, 82, 82, 82, + -1, 82, 17, -1, 82, 20, 20, -1, 20, 82, + 17, -1, 17, 17, 20, -1, -1, -1, 17, 118, + -1, 20, -1, 16, 16, 16, 16, -1, -1, -1, + 17, -1, 118, -1, 20, 20, 20, 16, -1, -1, + 118, 118, -1, -1, -1, 118, 118, 118, 118, 59, + 59, 59, 59, -1, -1, -1, -1, -1, -1, -1, + 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 16, 16, -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, @@ -1067,49 +1067,49 @@ class Php7 extends \PhpParser\ParserAbstract ); protected array $gotoBase = array( - 0, 0, -252, 0, 0, 175, 226, 592, 272, 10, - 0, 0, 68, -328, -78, -186, 129, 98, 124, 65, - 161, 0, 119, 160, 177, 165, 207, 223, 108, 135, - 0, 46, 0, 0, 0, -164, 0, 134, 0, 128, - 0, 45, -1, 219, 0, 246, -455, 0, -715, 216, - 446, 0, 0, 0, 0, 0, 221, 0, 0, 275, - 0, 0, 303, 0, 116, -10, -62, 0, 0, 0, - 0, 0, 0, -5, 0, 0, -31, 0, 0, -220, - 126, 54, 71, -84, -232, -40, -724, 0, 0, 55, - 0, 0, 110, 130, 0, 0, 57, -478, 0, 77, - 0, 0, 0, 306, 324, 0, 0, 453, 140, 0, - 112, 0, 0, 132, -9, 122, 0, 142, -37, 48, - 81, 139, 0, 0, 0, 0, 0, 20, 0, 0, - 360, 198, 0, 96, 164, 0, 59, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, - 0, 44, 0, 0, 0, 0, 0, 294, 151, 29, - 47, 0, 0, -264, 0, 314, 0, 0, 0, 100, - 0, 0, 0, 0, 0, 0, 0, -27, 49, 156, - 252, 248, 298, 0, 0, 58, 0, 7, 277, 0, - 296, -103, 0, 0 + 0, 0, -339, 0, 0, 174, -7, 339, 171, 10, + 0, 0, -69, -36, -78, -186, 130, 81, 114, 66, + 117, 0, 62, 160, 240, 468, 178, 225, 118, 112, + 0, 45, 0, 0, 0, -195, 0, 119, 0, 122, + 0, 44, -1, 226, 0, 227, -387, 0, -715, 182, + 241, 0, 0, 0, 0, 0, 256, 0, 0, 570, + 0, 0, 269, 0, 102, 3, -63, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -31, 0, 0, -120, + 110, 53, 54, 120, -286, -33, -724, 0, 0, 40, + 0, 0, 124, 129, 0, 0, 61, -488, 0, 67, + 0, 0, 0, 294, 295, 0, 0, 453, 141, 0, + 100, 0, 0, 83, -3, 82, 0, 86, 318, 38, + 78, 107, 0, 0, 0, 0, 0, 16, 0, 0, + 168, 20, 0, 108, 163, 0, 58, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, + 0, 43, 0, 0, 0, 0, 0, 193, 101, -38, + 46, 0, 0, -166, 0, 195, 0, 0, 0, 92, + 0, 0, 0, 0, 0, 0, 0, -60, 42, 157, + 251, 243, 297, 0, 0, -97, 0, 1, 263, 0, + 276, -101, 0, 0 ); protected array $gotoDefault = array( -32768, 526, 755, 7, 756, 951, 831, 840, 590, 544, - 722, 356, 641, 432, 1351, 927, 1164, 610, 859, 1293, - 1299, 468, 862, 340, 745, 939, 910, 911, 408, 395, + 722, 356, 641, 432, 1352, 927, 1165, 610, 859, 1294, + 1300, 468, 862, 340, 745, 939, 910, 911, 408, 395, 875, 406, 665, 642, 507, 895, 464, 887, 499, 890, 463, 899, 167, 428, 524, 903, 6, 906, 572, 937, 991, 396, 914, 397, 693, 916, 594, 918, 919, 403, - 409, 410, 1169, 602, 638, 931, 261, 596, 932, 394, - 933, 941, 399, 401, 703, 479, 518, 512, 421, 1131, + 409, 410, 1170, 602, 638, 931, 261, 596, 932, 394, + 933, 941, 399, 401, 703, 479, 518, 512, 421, 1132, 597, 625, 662, 457, 486, 636, 648, 635, 493, 444, 426, 339, 975, 983, 500, 477, 997, 358, 1005, 753, - 1177, 656, 502, 1013, 657, 1020, 1023, 545, 546, 491, - 1035, 272, 1038, 503, 1047, 26, 683, 1052, 1053, 684, - 658, 1075, 659, 685, 660, 1077, 476, 592, 1178, 475, - 1092, 1098, 465, 1101, 1339, 466, 1105, 270, 1108, 284, - 427, 445, 1114, 1115, 12, 1121, 713, 714, 25, 280, - 523, 1149, 704,-32768,-32768,-32768,-32768, 462, 1176, 461, - 1248, 1250, 573, 504, 1268, 301, 1271, 696, 519, 1276, - 458, 1342, 459, 547, 487, 325, 548, 1386, 315, 343, - 322, 564, 302, 344, 549, 488, 1348, 1356, 341, 34, - 1376, 1387, 607, 630 + 1178, 656, 502, 1013, 657, 1020, 1023, 545, 546, 491, + 1035, 271, 1038, 503, 1048, 26, 683, 1053, 1054, 684, + 658, 1076, 659, 685, 660, 1078, 476, 592, 1179, 475, + 1093, 1099, 465, 1102, 1340, 466, 1106, 270, 1109, 284, + 427, 445, 1115, 1116, 12, 1122, 713, 714, 25, 280, + 523, 1150, 704,-32768,-32768,-32768,-32768, 462, 1177, 461, + 1249, 1251, 573, 504, 1269, 301, 1272, 696, 519, 1277, + 458, 1343, 459, 547, 487, 325, 548, 1387, 315, 343, + 322, 564, 302, 344, 549, 488, 1349, 1357, 341, 34, + 1377, 1388, 607, 630 ); protected array $ruleToNonTerminal = array( @@ -1142,19 +1142,19 @@ class Php7 extends \PhpParser\ParserAbstract 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, - 112, 112, 110, 110, 110, 115, 115, 115, 115, 89, - 89, 118, 118, 118, 119, 119, 116, 116, 120, 120, - 122, 122, 123, 123, 117, 124, 124, 121, 125, 125, - 125, 125, 113, 113, 82, 82, 82, 20, 20, 20, - 128, 128, 128, 128, 129, 129, 129, 127, 126, 126, - 131, 131, 131, 130, 130, 60, 132, 132, 133, 61, - 135, 135, 136, 136, 137, 137, 86, 138, 138, 138, - 138, 138, 138, 138, 143, 143, 144, 144, 145, 145, - 145, 145, 145, 146, 147, 147, 142, 142, 139, 139, - 141, 141, 149, 149, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 140, 150, 150, 152, 151, 151, - 153, 153, 114, 154, 154, 156, 156, 156, 155, 155, - 62, 104, 157, 157, 56, 56, 42, 42, 42, 42, + 112, 112, 112, 110, 110, 110, 115, 115, 115, 115, + 89, 89, 118, 118, 118, 119, 119, 116, 116, 120, + 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, + 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, + 20, 128, 128, 128, 128, 129, 129, 129, 127, 126, + 126, 131, 131, 131, 130, 130, 60, 132, 132, 133, + 61, 135, 135, 136, 136, 137, 137, 86, 138, 138, + 138, 138, 138, 138, 138, 143, 143, 144, 144, 145, + 145, 145, 145, 145, 146, 147, 147, 142, 142, 139, + 139, 141, 141, 149, 149, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 140, 150, 150, 152, 151, + 151, 153, 153, 114, 154, 154, 156, 156, 156, 155, + 155, 62, 104, 157, 157, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1164,20 +1164,20 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 164, 165, 165, 166, 158, 158, 163, 163, - 167, 168, 168, 169, 170, 171, 171, 171, 171, 19, - 19, 73, 73, 73, 73, 159, 159, 159, 159, 173, - 173, 162, 162, 162, 160, 160, 179, 179, 179, 179, - 179, 179, 179, 179, 179, 179, 180, 180, 180, 108, - 182, 182, 182, 182, 161, 161, 161, 161, 161, 161, - 161, 161, 59, 59, 176, 176, 176, 176, 176, 183, - 183, 172, 172, 172, 172, 184, 184, 184, 184, 184, - 184, 74, 74, 66, 66, 66, 66, 134, 134, 134, - 134, 187, 186, 175, 175, 175, 175, 175, 175, 175, - 174, 174, 174, 185, 185, 185, 185, 107, 181, 189, - 189, 188, 188, 190, 190, 190, 190, 190, 190, 190, - 190, 178, 178, 178, 178, 177, 192, 191, 191, 191, - 191, 191, 191, 191, 191, 193, 193, 193, 193 + 42, 42, 42, 164, 165, 165, 166, 158, 158, 163, + 163, 167, 168, 168, 169, 170, 171, 171, 171, 171, + 19, 19, 73, 73, 73, 73, 159, 159, 159, 159, + 173, 173, 162, 162, 162, 160, 160, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 180, 180, 180, + 108, 182, 182, 182, 182, 161, 161, 161, 161, 161, + 161, 161, 161, 59, 59, 176, 176, 176, 176, 176, + 183, 183, 172, 172, 172, 172, 184, 184, 184, 184, + 184, 184, 74, 74, 66, 66, 66, 66, 134, 134, + 134, 134, 187, 186, 175, 175, 175, 175, 175, 175, + 175, 174, 174, 174, 185, 185, 185, 185, 107, 181, + 189, 189, 188, 188, 190, 190, 190, 190, 190, 190, + 190, 190, 178, 178, 178, 178, 177, 192, 191, 191, + 191, 191, 191, 191, 191, 191, 193, 193, 193, 193 ); protected array $ruleToLength = array( @@ -1210,42 +1210,42 @@ class Php7 extends \PhpParser\ParserAbstract 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, 2, 1, 1, 1, 1, 1, - 1, 1, 7, 9, 6, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, - 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, - 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, - 2, 4, 4, 3, 3, 1, 3, 1, 1, 3, - 2, 2, 3, 1, 1, 2, 3, 1, 1, 2, - 3, 1, 1, 3, 2, 0, 1, 5, 5, 6, - 10, 3, 5, 1, 1, 3, 0, 2, 4, 5, - 4, 4, 4, 3, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, - 0, 2, 0, 5, 8, 1, 3, 3, 0, 2, - 2, 2, 3, 1, 0, 1, 1, 3, 3, 3, - 4, 4, 1, 1, 2, 2, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, + 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, + 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, + 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, + 3, 2, 4, 4, 3, 3, 1, 3, 1, 1, + 3, 2, 2, 3, 1, 1, 2, 3, 1, 1, + 2, 3, 1, 1, 3, 2, 0, 1, 5, 5, + 6, 10, 3, 5, 1, 1, 3, 0, 2, 4, + 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, + 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, + 3, 0, 2, 0, 5, 8, 1, 3, 3, 0, + 2, 2, 2, 3, 1, 0, 1, 1, 3, 3, + 3, 4, 4, 1, 1, 2, 2, 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, 2, 1, 3, 2, 1, - 2, 4, 2, 2, 8, 9, 8, 9, 9, 10, - 9, 10, 8, 3, 2, 2, 1, 1, 0, 4, - 2, 1, 3, 2, 1, 2, 2, 2, 4, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, - 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 5, 3, 3, - 4, 1, 1, 3, 1, 1, 1, 1, 1, 3, - 2, 3, 0, 1, 1, 3, 1, 1, 1, 1, - 1, 1, 3, 1, 1, 1, 4, 4, 1, 4, - 4, 0, 1, 1, 1, 3, 3, 1, 4, 2, - 2, 1, 3, 1, 4, 4, 3, 3, 3, 3, - 1, 3, 1, 1, 3, 1, 1, 4, 1, 1, - 1, 3, 1, 1, 2, 1, 3, 4, 3, 2, - 0, 2, 2, 1, 2, 1, 1, 1, 4, 3, - 3, 3, 3, 6, 3, 1, 1, 2, 1 + 2, 2, 2, 2, 3, 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, 2, 1, 3, 2, + 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, + 10, 9, 10, 8, 3, 2, 2, 1, 1, 0, + 4, 2, 1, 3, 2, 1, 2, 2, 2, 4, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, + 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 5, 3, + 3, 4, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 2, 3, 0, 1, 1, 3, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 1, 4, 4, 1, + 4, 4, 0, 1, 1, 1, 3, 3, 1, 4, + 2, 2, 1, 3, 1, 4, 4, 3, 3, 3, + 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, + 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, + 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, + 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 ); protected function initReduceCallbacks(): void { @@ -1925,669 +1925,669 @@ protected function initReduceCallbacks(): void { $self->semValue = Modifiers::READONLY; }, 292 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, + 293 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 293 => static function ($self, $stackPos) { + 294 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 294 => static function ($self, $stackPos) { + 295 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, - 295 => null, - 296 => static function ($self, $stackPos) { + 296 => null, + 297 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 297 => static function ($self, $stackPos) { + 298 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 298 => null, 299 => null, - 300 => static function ($self, $stackPos) { + 300 => null, + 301 => static function ($self, $stackPos) { $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 301 => static function ($self, $stackPos) { + 302 => static function ($self, $stackPos) { $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 302 => static function ($self, $stackPos) { + 303 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 303 => static function ($self, $stackPos) { + 304 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 304 => null, - 305 => static function ($self, $stackPos) { + 305 => null, + 306 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 306 => static function ($self, $stackPos) { + 307 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 307 => static function ($self, $stackPos) { + 308 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 308 => null, - 309 => static function ($self, $stackPos) { + 309 => null, + 310 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 310 => static function ($self, $stackPos) { + 311 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 311 => static function ($self, $stackPos) { + 312 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 312 => static function ($self, $stackPos) { + 313 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 313 => static function ($self, $stackPos) { + 314 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 314 => static function ($self, $stackPos) { + 315 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 315 => static function ($self, $stackPos) { + 316 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 316 => static function ($self, $stackPos) { + 317 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 317 => static function ($self, $stackPos) { + 318 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 318 => null, - 319 => static function ($self, $stackPos) { + 319 => null, + 320 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 320 => static function ($self, $stackPos) { + 321 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 321 => null, - 322 => static function ($self, $stackPos) { + 322 => null, + 323 => static function ($self, $stackPos) { $self->semValue = null; }, - 323 => null, - 324 => static function ($self, $stackPos) { + 324 => null, + 325 => static function ($self, $stackPos) { $self->semValue = null; }, - 325 => static function ($self, $stackPos) { + 326 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 326 => static function ($self, $stackPos) { + 327 => static function ($self, $stackPos) { $self->semValue = null; }, - 327 => static function ($self, $stackPos) { + 328 => static function ($self, $stackPos) { $self->semValue = array(); }, - 328 => static function ($self, $stackPos) { + 329 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 329 => static function ($self, $stackPos) { + 330 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 330 => static function ($self, $stackPos) { + 331 => static function ($self, $stackPos) { $self->semValue = array(); }, - 331 => static function ($self, $stackPos) { + 332 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 332 => static function ($self, $stackPos) { + 333 => static function ($self, $stackPos) { $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(4-2)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); }, - 333 => static function ($self, $stackPos) { + 334 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 334 => static function ($self, $stackPos) { + 335 => static function ($self, $stackPos) { $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(3-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)]); }, - 335 => static function ($self, $stackPos) { + 336 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 336 => static function ($self, $stackPos) { + 337 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 337 => static function ($self, $stackPos) { + 338 => static function ($self, $stackPos) { $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 338 => static function ($self, $stackPos) { + 339 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 339 => static function ($self, $stackPos) { + 340 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 340 => static function ($self, $stackPos) { + 341 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 341 => static function ($self, $stackPos) { + 342 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 342 => static function ($self, $stackPos) { + 343 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, - 343 => static function ($self, $stackPos) { + 344 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 344 => static function ($self, $stackPos) { + 345 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 345 => null, - 346 => static function ($self, $stackPos) { + 346 => null, + 347 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 347 => static function ($self, $stackPos) { + 348 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 348 => null, 349 => null, - 350 => static function ($self, $stackPos) { + 350 => null, + 351 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 351 => static function ($self, $stackPos) { + 352 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 352 => static function ($self, $stackPos) { + 353 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 353 => static function ($self, $stackPos) { + 354 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 354 => static function ($self, $stackPos) { + 355 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 355 => static function ($self, $stackPos) { + 356 => static function ($self, $stackPos) { $self->semValue = array(); }, - 356 => static function ($self, $stackPos) { + 357 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 357 => static function ($self, $stackPos) { + 358 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 358 => static function ($self, $stackPos) { + 359 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 359 => static function ($self, $stackPos) { + 360 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 360 => static function ($self, $stackPos) { + 361 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 361 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, 362 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 363 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 364 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = null; /* will be skipped */ }, 365 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = array(); }, 366 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 367 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + $self->semValue = array(); }, 368 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 369 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 370 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 371 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 372 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 373 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 374 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 374 => null, - 375 => static function ($self, $stackPos) { + 375 => null, + 376 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 376 => static function ($self, $stackPos) { + 377 => static function ($self, $stackPos) { $self->semValue = null; }, - 377 => null, 378 => null, - 379 => static function ($self, $stackPos) { + 379 => null, + 380 => static function ($self, $stackPos) { $self->semValue = 0; }, - 380 => static function ($self, $stackPos) { + 381 => static function ($self, $stackPos) { $self->semValue = 0; }, - 381 => null, 382 => null, - 383 => static function ($self, $stackPos) { + 383 => null, + 384 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 384 => static function ($self, $stackPos) { + 385 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 385 => static function ($self, $stackPos) { + 386 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 386 => static function ($self, $stackPos) { + 387 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 387 => static function ($self, $stackPos) { + 388 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 388 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 389 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 390 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 391 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 392 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 393 => static function ($self, $stackPos) { + 394 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 394 => null, - 395 => static function ($self, $stackPos) { + 395 => null, + 396 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 396 => static function ($self, $stackPos) { + 397 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 397 => static function ($self, $stackPos) { + 398 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 398 => static function ($self, $stackPos) { + 399 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 399 => static function ($self, $stackPos) { + 400 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 400 => static function ($self, $stackPos) { + 401 => static function ($self, $stackPos) { $self->semValue = []; }, - 401 => static function ($self, $stackPos) { + 402 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 402 => static function ($self, $stackPos) { + 403 => static function ($self, $stackPos) { $self->semValue = []; }, - 403 => static function ($self, $stackPos) { + 404 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 404 => static function ($self, $stackPos) { + 405 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 405 => static function ($self, $stackPos) { - $self->semValue = null; - }, 406 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = null; }, 407 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 408 => static function ($self, $stackPos) { - $self->semValue = 0; + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 409 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 410 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 410 => null, 411 => null, - 412 => static function ($self, $stackPos) { + 412 => null, + 413 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 413 => static function ($self, $stackPos) { + 414 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 414 => static function ($self, $stackPos) { + 415 => static function ($self, $stackPos) { $self->semValue = array(); }, - 415 => null, 416 => null, - 417 => static function ($self, $stackPos) { + 417 => null, + 418 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 418 => static function ($self, $stackPos) { + 419 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 419 => static function ($self, $stackPos) { + 420 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 420 => static function ($self, $stackPos) { + 421 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 421 => static function ($self, $stackPos) { + 422 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 422 => null, 423 => null, - 424 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, + 424 => null, 425 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 426 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 438 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 439 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 440 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 441 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 442 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 450 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 452 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 463 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 464 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 465 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 466 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 467 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 475 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 476 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 477 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 478 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 479 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 480 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 481 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 482 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 483 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 484 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 485 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 486 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 487 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 488 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 488 => static function ($self, $stackPos) { + 489 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 489 => static function ($self, $stackPos) { + 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 490 => static function ($self, $stackPos) { + 491 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 491 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 496 => null, - 497 => static function ($self, $stackPos) { + 497 => null, + 498 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 499 => static function ($self, $stackPos) { + 500 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 500 => static function ($self, $stackPos) { + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 505 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 506 => static function ($self, $stackPos) { + 507 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 507 => static function ($self, $stackPos) { + 508 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 508 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 509 => static function ($self, $stackPos) { + 510 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 510 => static function ($self, $stackPos) { + 511 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 511 => static function ($self, $stackPos) { + 512 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 512 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 513 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 514 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 515 => static function ($self, $stackPos) { + 516 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 516 => null, 517 => null, - 518 => static function ($self, $stackPos) { + 518 => null, + 519 => static function ($self, $stackPos) { $self->semValue = array(); }, - 519 => static function ($self, $stackPos) { + 520 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 520 => null, - 521 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, + 521 => null, 522 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 523 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 524 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 525 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 526 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2596,310 +2596,313 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 528 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 529 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 530 => null, - 531 => static function ($self, $stackPos) { + 530 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 531 => null, 532 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 533 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 534 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 535 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 535 => null, 536 => null, - 537 => static function ($self, $stackPos) { + 537 => null, + 538 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 538 => static function ($self, $stackPos) { + 539 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 539 => null, 540 => null, - 541 => static function ($self, $stackPos) { + 541 => null, + 542 => static function ($self, $stackPos) { $self->semValue = array(); }, - 542 => static function ($self, $stackPos) { + 543 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 543 => static function ($self, $stackPos) { + 544 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 544 => static function ($self, $stackPos) { + 545 => static function ($self, $stackPos) { $self->semValue = array(); }, - 545 => null, - 546 => static function ($self, $stackPos) { + 546 => null, + 547 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 547 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 548 => static function ($self, $stackPos) { + 549 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 549 => static function ($self, $stackPos) { + 550 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 550 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 551 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 552 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 553 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 554 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 555 => static function ($self, $stackPos) { + 556 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 556 => static function ($self, $stackPos) { + 557 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 557 => static function ($self, $stackPos) { + 558 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 558 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 559 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 560 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 561 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 562 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 563 => static function ($self, $stackPos) { + 564 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 564 => static function ($self, $stackPos) { + 565 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 565 => static function ($self, $stackPos) { + 566 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 566 => null, 567 => null, 568 => null, - 569 => static function ($self, $stackPos) { + 569 => null, + 570 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 570 => static function ($self, $stackPos) { + 571 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 571 => static function ($self, $stackPos) { + 572 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 572 => static function ($self, $stackPos) { + 573 => static function ($self, $stackPos) { $self->semValue = null; }, - 573 => null, 574 => null, - 575 => static function ($self, $stackPos) { + 575 => null, + 576 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 576 => null, 577 => null, 578 => null, 579 => null, 580 => null, 581 => null, - 582 => static function ($self, $stackPos) { + 582 => null, + 583 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 583 => null, 584 => null, 585 => null, - 586 => static function ($self, $stackPos) { + 586 => null, + 587 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 587 => static function ($self, $stackPos) { + 588 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 588 => null, - 589 => static function ($self, $stackPos) { + 589 => null, + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 590 => static function ($self, $stackPos) { + 591 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 591 => static function ($self, $stackPos) { + 592 => static function ($self, $stackPos) { $self->semValue = null; }, - 592 => null, 593 => null, 594 => null, - 595 => static function ($self, $stackPos) { + 595 => null, + 596 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 596 => static function ($self, $stackPos) { + 597 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 597 => null, - 598 => static function ($self, $stackPos) { + 598 => null, + 599 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 599 => static function ($self, $stackPos) { + 600 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 600 => static function ($self, $stackPos) { + 601 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 601 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 602 => static function ($self, $stackPos) { + 603 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 603 => null, - 604 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); - }, + 604 => null, 605 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 606 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 607 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 608 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 609 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 610 => null, - 611 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { + $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + }, + 611 => null, + 612 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 612 => null, 613 => null, - 614 => static function ($self, $stackPos) { + 614 => null, + 615 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 615 => null, - 616 => static function ($self, $stackPos) { + 616 => null, + 617 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 617 => static function ($self, $stackPos) { + 618 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 618 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 619 => null, - 620 => static function ($self, $stackPos) { + 620 => null, + 621 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 621 => static function ($self, $stackPos) { + 622 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 622 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 623 => static function ($self, $stackPos) { + 624 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 624 => static function ($self, $stackPos) { + 625 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 625 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 626 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 627 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 628 => static function ($self, $stackPos) { + 629 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 629 => static function ($self, $stackPos) { + 630 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 630 => static function ($self, $stackPos) { + 631 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 631 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 632 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 633 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 634 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 635 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 636 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 637 => null, - 638 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 637 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 638 => null, 639 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 640 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 641 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 642 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 643 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 644 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 645 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 646 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 647 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 648 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 648 => null, + 649 => null, ]; } } diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 882a9dc69f..8745e67cb0 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -400,153 +400,153 @@ class Php8 extends \PhpParser\ParserAbstract protected array $action = array( 132, 133, 134, 582, 135, 136, 162, 779, 780, 781, - 137, 41, 863,-32766, 970, 1403, -583, 974, 973, 1301, + 137, 41, 863,-32766, 970, 1404, -584, 974, 973, 1302, 0, 395, 396, 455, 246, 854,-32766,-32766,-32766,-32766, -32766, 440,-32766, 27,-32766, 773, 772,-32766,-32766,-32766, -32766, 508,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - 131,-32766,-32766,-32766,-32766, 437, 782, 859, 1147,-32766, - 949,-32766,-32766,-32766,-32766,-32766,-32766, 972, 1384, 300, - 270, 53, 398, 786, 787, 788, 789, 305, 865, 441, - -340, 39, 254, -583, -583, -195, 843, 790, 791, 792, + 131,-32766,-32766,-32766,-32766, 437, 782, 859, 1148,-32766, + 949,-32766,-32766,-32766,-32766,-32766,-32766, 972, 1385, 300, + 271, 53, 398, 786, 787, 788, 789, 305, 865, 441, + -341, 39, 254, -584, -584, -195, 843, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, 805, 806, 368, 846, 847, 848, 849, - 850, 584, 1061, -194, 856, 807, 808, 585, 586, 3, + 850, 584, 1062, -194, 856, 807, 808, 585, 586, 3, 831, 829, 830, 842, 826, 827, 4, 860, 587, 588, 825, 589, 590, 591, 592, 939, 593, 594, 5, 854, -32766,-32766,-32766, 828, 595, 596,-32766, 138, 764, 132, - 133, 134, 582, 135, 136, 1097, 779, 780, 781, 137, - 41,-32766,-32766,-32766,-32766,-32766,-32766, -275, 1301, 613, - 153, 1070, 749, 990, 991,-32766,-32766,-32766, 992,-32766, - 891,-32766, 892,-32766, 773, 772,-32766, 986, 1308, 397, + 133, 134, 582, 135, 136, 1098, 779, 780, 781, 137, + 41,-32766,-32766,-32766,-32766,-32766,-32766, -275, 1302, 613, + 153, 1071, 749, 990, 991,-32766,-32766,-32766, 992,-32766, + 891,-32766, 892,-32766, 773, 772,-32766, 986, 1309, 397, 396,-32766,-32766,-32766, 858, 299, 630,-32766,-32766, 440, 502, 736,-32766,-32766, 437, 782,-32767,-32767,-32767,-32767, - 106, 107, 108, 109, 951,-32766, 1021, 29, 734, 270, - 53, 398, 786, 787, 788, 789, 144, 1070, 441, -340, + 106, 107, 108, 109, 951,-32766, 1021, 29, 734, 271, + 53, 398, 786, 787, 788, 789, 144, 1071, 441, -341, 332, 38, 864, 862, -195, 843, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, 805, 806, 368, 846, 847, 848, 849, 850, 584, 863, -194, 139, 807, 808, 585, 586, 323, 831, - 829, 830, 842, 826, 827, 1369, 148, 587, 588, 825, + 829, 830, 842, 826, 827, 1370, 148, 587, 588, 825, 589, 590, 591, 592, 245, 593, 594, 395, 396,-32766, -32766,-32766, 828, 595, 596, -85, 138, 440, 132, 133, - 134, 582, 135, 136, 1094, 779, 780, 781, 137, 41, - -32766,-32766,-32766,-32766,-32766, 51, 578, 1301, 257,-32766, + 134, 582, 135, 136, 1095, 779, 780, 781, 137, 41, + -32766,-32766,-32766,-32766,-32766, 51, 578, 1302, 257,-32766, 636, 107, 108, 109,-32766,-32766,-32766, 503,-32766, 316, - -32766,-32766,-32766, 773, 772,-32766, -382, 166, -382, 1022, - -32766,-32766,-32766, 305, 79, 1132,-32766,-32766, 1413, 762, - 332, 1414,-32766, 437, 782,-32766, 1070, 110, 111, 112, - 113, 114, -85, 283,-32766, 477, 478, 479, 270, 53, + -32766,-32766,-32766, 773, 772,-32766, -383, 166, -383, 1022, + -32766,-32766,-32766, 305, 79, 1133,-32766,-32766, 1414, 762, + 332, 1415,-32766, 437, 782,-32766, 1071, 110, 111, 112, + 113, 114, -85, 283,-32766, 477, 478, 479, 271, 53, 398, 786, 787, 788, 789, 115, 407, 441, 10,-32766, - 299, 1340, 306, 307, 843, 790, 791, 792, 793, 794, + 299, 1341, 306, 307, 843, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, 805, 806, 368, 846, 847, 848, 849, 850, 584, - 320, 1067, -581, 807, 808, 585, 586, 1388, 831, 829, - 830, 842, 826, 827, 329, 1387, 587, 588, 825, 589, - 590, 591, 592, 86, 593, 594, 1070, 332,-32766,-32766, - -32766, 828, 595, 596, 349, 151, -580, 132, 133, 134, - 582, 135, 136, 1099, 779, 780, 781, 137, 41,-32766, + 320, 1068, -582, 807, 808, 585, 586, 1389, 831, 829, + 830, 842, 826, 827, 329, 1388, 587, 588, 825, 589, + 590, 591, 592, 86, 593, 594, 1071, 332,-32766,-32766, + -32766, 828, 595, 596, 349, 151, -581, 132, 133, 134, + 582, 135, 136, 1100, 779, 780, 781, 137, 41,-32766, 290,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, - -32767,-32767,-32767,-32766,-32766,-32766, 891, 1174, 892, -581, - -581, 754, 773, 772, 1158, 1159, 1160, 1154, 1153, 1152, - 1161, 1155, 1156, 1157,-32766, -581,-32766,-32766,-32766,-32766, - -32766,-32766,-32766, 782,-32766,-32766,-32766, -587, -78,-32766, - -32766,-32766, 350, -580, -580,-32766,-32766, 270, 53, 398, - 786, 787, 788, 789, 383,-32766, 441,-32766,-32766, -580, + -32767,-32767,-32767,-32766,-32766,-32766, 891, 1175, 892, -582, + -582, 754, 773, 772, 1159, 1160, 1161, 1155, 1154, 1153, + 1162, 1156, 1157, 1158,-32766, -582,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 782,-32766,-32766,-32766, -588, -78,-32766, + -32766,-32766, 350, -581, -581,-32766,-32766, 271, 53, 398, + 786, 787, 788, 789, 383,-32766, 441,-32766,-32766, -581, -32766, 773, 772, 843, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 819, 583, 820, 821, 822, 823, 811, 812, 353, 354, 814, 815, 800, 801, 802, 804, - 805, 806, 368, 846, 847, 848, 849, 850, 584, -619, - 1067, -619, 807, 808, 585, 586, 389, 831, 829, 830, + 805, 806, 368, 846, 847, 848, 849, 850, 584, -620, + 1068, -620, 807, 808, 585, 586, 389, 831, 829, 830, 842, 826, 827, 441, 405, 587, 588, 825, 589, 590, - 591, 592, 333, 593, 594, 1070, 87, 88, 89, 459, + 591, 592, 333, 593, 594, 1071, 87, 88, 89, 459, 828, 595, 596, 460, 151, 803, 774, 775, 776, 777, 778, 854, 779, 780, 781, 816, 817, 40, 461, 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, 462, 283, 1328, 1158, 1159, 1160, - 1154, 1153, 1152, 1161, 1155, 1156, 1157, 115, 869, 488, - 489, 782, 1303, 1302, 1304, 108, 109, 1131, 154,-32766, - -32766, 1133, 679, 23, 156, 783, 784, 785, 786, 787, - 788, 789, 698, 699, 852, 152, 423, -579, 393, 394, + 111, 112, 113, 114, 462, 283, 1329, 1159, 1160, 1161, + 1155, 1154, 1153, 1162, 1156, 1157, 1158, 115, 869, 488, + 489, 782, 1304, 1303, 1305, 108, 109, 1132, 154,-32766, + -32766, 1134, 679, 23, 156, 783, 784, 785, 786, 787, + 788, 789, 698, 699, 852, 152, 423, -580, 393, 394, 157, 843, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 819, 841, 820, 821, 822, 823, 811, 812, 813, 840, 814, 815, 800, 801, 802, 804, 805, 806, - 845, 846, 847, 848, 849, 850, 851, 1093, -577, 863, + 845, 846, 847, 848, 849, 850, 851, 1094, -578, 863, 807, 808, 809, 810, -58, 831, 829, 830, 842, 826, 827, 399, 400, 818, 824, 825, 832, 833, 835, 834, - 294, 836, 837, 158, -579, -579, 160, 294, 828, 839, + 294, 836, 837, 158, -580, -580, 160, 294, 828, 839, 838, 54, 55, 56, 57, 534, 58, 59, 36, -110, - -579, -57, 60, 61, -110, 62, -110, 670, 671, 129, - 130, 312, -586, 140, -110, -110, -110, -110, -110, -110, - -110, -110, -110, -110, -110, -577, -577, 141, 147, 949, + -580, -57, 60, 61, -110, 62, -110, 670, 671, 129, + 130, 312, -587, 140, -110, -110, -110, -110, -110, -110, + -110, -110, -110, -110, -110, -578, -578, 141, 147, 949, 161, 712, -87, 163, 164, 165, -84, 949, -78, -73, - -72, -577, 63, 64, 143, -308, -71, 65, 332, 66, + -72, -578, 63, 64, 143, -309, -71, 65, 332, 66, 251, 252, 67, 68, 69, 70, 71, 72, 73, 74, - 739, 31, 276, 47, 457, 535, -356, 713, 740, 1334, - 1335, 536, -70, 863, 1067, -69, -68, 1332, 45, 22, + 739, 31, 276, 47, 457, 535, -357, 713, 740, 1335, + 1336, 536, -70, 863, 1068, -69, -68, 1333, 45, 22, 537, 949, 538, -67, 539, -66, 540, 52, -65, 541, - 542, 714, 715, -46, 48, 49, 463, 392, 391, 1070, - 50, 543, -18, 145, 281, 1301, 381, 348, 291, 750, - 1303, 1302, 1304, 1294, 939, 753, 290, 948, 545, 546, - 547, 150, 939, 290, -304, 295, 288, 289, 292, 293, - 549, 550, 338, 1320, 1321, 1322, 1323, 1325, 1317, 1318, - 304, 1299, 296, 301, 302, 283, 1324, 1319, 773, 772, - 1303, 1302, 1304, 305, 308, 309, 75, -154, -154, -154, - 327, 328, 332, 966, 854, 1069, 939, 149, 115, 1415, + 542, 714, 715, -46, 48, 49, 463, 392, 391, 1071, + 50, 543, -18, 145, 281, 1302, 381, 348, 291, 750, + 1304, 1303, 1305, 1295, 939, 753, 290, 948, 545, 546, + 547, 150, 939, 290, -305, 295, 288, 289, 292, 293, + 549, 550, 338, 1321, 1322, 1323, 1324, 1326, 1318, 1319, + 304, 1300, 296, 301, 302, 283, 1325, 1320, 773, 772, + 1304, 1303, 1305, 305, 308, 309, 75, -154, -154, -154, + 327, 328, 332, 966, 854, 1070, 939, 149, 115, 1416, 388, 680, -154, 708, -154, 725, -154, 13, -154, 668, - 723, 313, 31, 277, 1303, 1302, 1304, 863, 390,-32766, - 600, 1165, 987, 951, 863, 310, 701, 734, 1332, 990, - 991, 951,-32766, 686, 544, 734, 949, 685, 606, 1339, + 723, 313, 31, 277, 1304, 1303, 1305, 863, 390,-32766, + 600, 1166, 987, 951, 863, 310, 701, 734, 1333, 990, + 991, 951,-32766, 686, 544, 734, 949, 685, 606, 1340, 485, 513, 925, 986, -110, -110, -110, 35, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 702, 949, 634, 1294, 773, 772, 741, -578, 305, - -613, 1333, 0, 0, 0, 951, 311, 949, 0, 734, - -154, 549, 550, 319, 1320, 1321, 1322, 1323, 1325, 1317, - 1318, 1208, 1210, 744, 0, 1341, 0, 1324, 1319, -543, - -533, 0, -577,-32766, -4, 949, 11, 77, 751, 1301, - 30, 387, 328, 332, 862, 43,-32766,-32766,-32766, -612, - -32766, 939,-32766, 968,-32766, 44, 759,-32766, 1329, 773, - 772, 760,-32766,-32766,-32766, -578, -578, 882,-32766,-32766, + 128, 702, 949, 634, 1295, 773, 772, 741, -579, 305, + -614, 1334, 0, 0, 0, 951, 311, 949, 0, 734, + -154, 549, 550, 319, 1321, 1322, 1323, 1324, 1326, 1318, + 1319, 1209, 1211, 744, 0, 1342, 0, 1325, 1320, -544, + -534, 0, -578,-32766, -4, 949, 11, 77, 751, 1302, + 30, 387, 328, 332, 862, 43,-32766,-32766,-32766, -613, + -32766, 939,-32766, 968,-32766, 44, 759,-32766, 1330, 773, + 772, 760,-32766,-32766,-32766, -579, -579, 882,-32766,-32766, 930, 1031, 1008, 1015,-32766, 437, 1005, 939, 1016, 928, - 1003, -578, 1136, 1139, 1140, 1137,-32766, 1176, 1138, 1144, - 37, 874, 939, -585, 1356, 1373, 1406,-32766, 673, -577, - -577, -611, -587, 1301, -586, -585, -584, 31, 276, -527, - -32766,-32766,-32766, 1,-32766, -577,-32766, 78,-32766, 863, - 939,-32766, 32, 1332, -278, 33,-32766,-32766,-32766, 42, + 1003, -579, 1137, 1140, 1141, 1138,-32766, 1177, 1139, 1145, + 37, 874, 939, -586, 1357, 1374, 1407,-32766, 673, -578, + -578, -612, -588, 1302, -587, -586, -585, 31, 276, -528, + -32766,-32766,-32766, 1,-32766, -578,-32766, 78,-32766, 863, + 939,-32766, 32, 1333, -278, 33,-32766,-32766,-32766, 42, 1007, 46,-32766,-32766, 734, 76, 80, 81,-32766, 437, 82, 83, 390, 84, 453, 31, 277, 85, 146, 303, - -32766, 155, 159, 990, 991, 249, 951, 863, 544, 1294, - 734, 1332, 334, 369, 370, 371, 548, 986, -110, -110, - -110, 951, 372, 326, 373, 734, 374, 550, 375, 1320, - 1321, 1322, 1323, 1325, 1317, 1318, 376, 377, 422, 378, - 21, -50, 1324, 1319, 379, 382, 454, 1294, 577, 951, + -32766, 155, 159, 990, 991, 249, 951, 863, 544, 1295, + 734, 1333, 334, 369, 370, 371, 548, 986, -110, -110, + -110, 951, 372, 326, 373, 734, 374, 550, 375, 1321, + 1322, 1323, 1324, 1326, 1318, 1319, 376, 377, 422, 378, + 21, -50, 1325, 1320, 379, 382, 454, 1295, 577, 951, 380, 384, 77, 734, -4, -276, -275, 328, 332, 15, - 16, 17, 18, 20, 363, 550, 421, 1320, 1321, 1322, - 1323, 1325, 1317, 1318, 142, 504, 505, 512, 515, 516, - 1324, 1319, 949, 517, 518,-32766, 522, 523, 524, 531, - 77, 1301, 611, 718, 1100, 328, 332, 1096,-32766,-32766, - -32766, 1249,-32766, 1330,-32766, 949,-32766, 1098, 1095,-32766, - 1076, 1289, 1308, 1072,-32766,-32766,-32766, -280,-32766, -102, - -32766,-32766, 14, 19, 1301, 24,-32766, 437, 323, 420, + 16, 17, 18, 20, 363, 550, 421, 1321, 1322, 1323, + 1324, 1326, 1318, 1319, 142, 504, 505, 512, 515, 516, + 1325, 1320, 949, 517, 518,-32766, 522, 523, 524, 531, + 77, 1302, 611, 718, 1101, 328, 332, 1097,-32766,-32766, + -32766, 1250,-32766, 1331,-32766, 949,-32766, 1099, 1096,-32766, + 1077, 1290, 1309, 1073,-32766,-32766,-32766, -280,-32766, -102, + -32766,-32766, 14, 19, 1302, 24,-32766, 437, 323, 420, 625,-32766,-32766,-32766, 631,-32766, 659,-32766,-32766,-32766, - 724, 1253,-32766, -16, 1307, 1250, 1385,-32766,-32766,-32766, - 735,-32766, 738,-32766,-32766, 742, 743, 1301, 745,-32766, + 724, 1254,-32766, -16, 1308, 1251, 1386,-32766,-32766,-32766, + 735,-32766, 738,-32766,-32766, 742, 743, 1302, 745,-32766, 437, 746, 747, 748,-32766,-32766,-32766, 939,-32766, 300, - -32766,-32766,-32766, 752, 1308,-32766, 764, 737, 332, 765, + -32766,-32766,-32766, 752, 1309,-32766, 764, 737, 332, 765, -32766,-32766,-32766, -253, -253, -253,-32766,-32766, 426, 390, - 939, 756,-32766, 437, 926, 863, 1410, 1412, 885, 884, - 990, 991, 980, 1023,-32766, 544, -252, -252, -252, 1411, + 939, 756,-32766, 437, 926, 863, 1411, 1413, 885, 884, + 990, 991, 980, 1023,-32766, 544, -252, -252, -252, 1412, 979, 977, 390, 925, 986, -110, -110, -110, 978, 981, - 1282, 959, 969, 990, 991, 957, 1175, 1171, 544, 1125, + 1283, 959, 969, 990, 991, 957, 1176, 1172, 544, 1126, -110, -110, 1013, 1014, 657, -110, 925, 986, -110, -110, - -110, 1409, 2, 1367, -110, 1267, 951, 1382, 0, 0, - 734, -253, 0,-32766, 0, 0,-32766, 863, 0, 1054, + -110, 1410, 2, 1368, -110, 1268, 951, 1383, 0, 0, + 734, -253, 0,-32766, 0, 0,-32766, 863, 1059, 1054, 1053, 1052, 1058, 1055, 1056, 1057, 0, 0, 0, 951, 0, 0, 0, 734, -252, 305, 0, 0, 79, 0, - 0, 1070, 0, 0, 332, 0, 0, 0, 0, 0, + 0, 1071, 0, 0, 332, 0, 0, 0, 0, 0, 0, 0, -110, -110, 0, 0, 0, -110, 0, 0, 0, 0, 0, 0, 0, 299, -110, 0, 0, 0, 0, 0, 0, 0, 0,-32766, 0, 0, 0, 0, @@ -700,7 +700,7 @@ class Php8 extends \PhpParser\ParserAbstract 170, 170, 170, 119, 120, 170, 170, 170, 124, 170, 119, 120, 170, 170, 170, 124, 132, 133, 134, 135, 136, 170, 167, 170, 133, 171, 165, 170, -1, -1, - 169, 170, -1, 142, -1, -1, 118, 84, -1, 121, + 169, 170, -1, 142, -1, -1, 118, 84, 120, 121, 122, 123, 124, 125, 126, 127, -1, -1, -1, 165, -1, -1, -1, 169, 170, 164, -1, -1, 167, -1, -1, 143, -1, -1, 173, -1, -1, -1, -1, -1, @@ -740,7 +740,7 @@ class Php8 extends \PhpParser\ParserAbstract 41, 41, 529, 529, 529, 910, 910, 524, 299, 1113, 1075, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 140, 28, 1000, 493, 493, 458, 458, 458, 458, 458, 696, - 1301, 1328, 171, 171, 171, 171, 1363, 1363, -70, 523, + 1328, 1301, 171, 171, 171, 171, 1363, 1363, -70, 523, 248, 756, 291, 197, -87, 644, 38, 199, 323, 323, 482, 482, 233, 233, 482, 482, 482, 324, 324, 94, 94, 94, 94, 82, 249, 860, 67, 67, 67, 67, @@ -841,89 +841,89 @@ class Php8 extends \PhpParser\ParserAbstract 3,32767,32767,32767, 102, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, - 32767, 631, 631, 631, 631,32767,32767, 257, 102,32767, - 32767, 502, 416, 416, 416,32767,32767,32767, 575, 575, - 575, 575, 575, 17,32767,32767,32767,32767,32767,32767, - 32767, 502,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 632, 632, 632, 632,32767,32767, 257, 102,32767, + 32767, 503, 417, 417, 417,32767,32767,32767, 576, 576, + 576, 576, 576, 17,32767,32767,32767,32767,32767,32767, + 32767, 503,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, 36, 7, 8, 10, 11, 49, 337, 100, + 32767,32767, 36, 7, 8, 10, 11, 49, 338, 100, 32767,32767,32767,32767,32767,32767,32767,32767, 102,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 403, 624,32767,32767,32767,32767,32767,32767,32767, + 32767, 404, 625,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 496, 506, 484, 485, 487, 488, 415, 576, - 630, 343, 627, 341, 414, 146, 353, 342, 245, 261, - 507, 262, 508, 511, 512, 218, 400, 150, 151, 447, - 503, 449, 501, 505, 448, 421, 428, 429, 430, 431, - 432, 433, 434, 435, 436, 437, 438, 439, 440, 419, - 420, 504, 481, 480, 479,32767,32767, 445, 446,32767, - 32767,32767,32767,32767,32767,32767,32767, 102,32767, 450, - 453, 418, 451, 452, 469, 470, 467, 468, 471,32767, - 32767, 322, 472, 473, 474, 475,32767,32767, 381, 196, - 379,32767, 476,32767, 111, 454, 322, 111,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 460, 461,32767, + 32767,32767, 497, 507, 485, 486, 488, 489, 416, 577, + 631, 344, 628, 342, 415, 146, 354, 343, 245, 261, + 508, 262, 509, 512, 513, 218, 401, 150, 151, 448, + 504, 450, 502, 506, 449, 422, 429, 430, 431, 432, + 433, 434, 435, 436, 437, 438, 439, 440, 441, 420, + 421, 505, 482, 481, 480,32767,32767, 446, 447,32767, + 32767,32767,32767,32767,32767,32767,32767, 102,32767, 451, + 454, 419, 452, 453, 470, 471, 468, 469, 472,32767, + 323,32767, 473, 474, 475, 476,32767,32767, 382, 196, + 380,32767, 477,32767, 111, 455, 323, 111,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 461, 462,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767, 102,32767,32767,32767, - 100, 519, 569, 478, 455, 456,32767, 544,32767, 102, - 32767, 546,32767,32767,32767,32767,32767,32767,32767,32767, - 571, 442, 444, 539, 625, 422, 628,32767, 532, 100, - 196,32767, 545, 196, 196,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 570,32767, 638, 532, 110, + 100, 520, 570, 479, 456, 457,32767, 545,32767, 102, + 32767, 547,32767,32767,32767,32767,32767,32767,32767,32767, + 572, 443, 445, 540, 626, 423, 629,32767, 533, 100, + 196,32767, 546, 196, 196,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767, 571,32767, 639, 533, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,32767, 196, 110,32767, 110, 110,32767,32767, 100, - 196, 196, 196, 196, 196, 196, 196, 196, 547, 196, - 196, 191,32767, 271, 273, 102, 593, 196, 549,32767, + 196, 196, 196, 196, 196, 196, 196, 196, 548, 196, + 196, 191,32767, 271, 273, 102, 594, 196, 550,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 403,32767,32767,32767,32767, 532, 465, 139, - 32767, 534, 139, 577, 457, 458, 459, 577, 577, 577, - 318, 295,32767,32767,32767,32767,32767, 547, 547, 100, - 100, 100, 100,32767,32767,32767,32767, 111, 518, 99, + 32767,32767, 404,32767,32767,32767,32767, 533, 466, 139, + 32767, 535, 139, 578, 458, 459, 460, 578, 578, 578, + 319, 296,32767,32767,32767,32767,32767, 548, 548, 100, + 100, 100, 100,32767,32767,32767,32767, 111, 519, 99, 99, 99, 99, 99, 103, 101,32767,32767,32767,32767, 226,32767, 101, 101, 99,32767, 101, 101,32767,32767, - 226, 228, 215, 230,32767, 597, 598, 226, 101, 230, - 230, 230, 250, 250, 521, 324, 101, 99, 101, 101, - 198, 324, 324,32767, 101, 521, 324, 521, 324, 200, - 324, 324, 324, 521, 324,32767, 101, 324, 217, 99, - 99, 324,32767,32767,32767,32767, 534,32767,32767,32767, + 226, 228, 215, 230,32767, 598, 599, 226, 101, 230, + 230, 230, 250, 250, 522, 325, 101, 99, 101, 101, + 198, 325, 325,32767, 101, 522, 325, 522, 325, 200, + 325, 325, 325, 522, 325,32767, 101, 325, 217, 99, + 99, 325,32767,32767,32767,32767, 535,32767,32767,32767, 32767,32767,32767,32767, 225,32767,32767,32767,32767,32767, - 32767,32767,32767, 564,32767, 582, 595, 463, 464, 466, - 581, 579, 489, 490, 491, 492, 493, 494, 495, 498, - 626,32767, 538,32767,32767,32767, 352,32767, 636,32767, - 32767,32767, 9, 74, 527, 42, 43, 51, 57, 553, - 554, 555, 556, 550, 551, 557, 552,32767,32767,32767, + 32767,32767,32767, 565,32767, 583, 596, 464, 465, 467, + 582, 580, 490, 491, 492, 493, 494, 495, 496, 499, + 627,32767, 539,32767,32767,32767, 353,32767, 637,32767, + 32767,32767, 9, 74, 528, 42, 43, 51, 57, 554, + 555, 556, 557, 551, 552, 558, 553,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 637,32767, 577,32767,32767,32767,32767, - 462, 559, 603,32767,32767, 578, 629,32767,32767,32767, + 32767,32767,32767, 638,32767, 578,32767,32767,32767,32767, + 463, 560, 604,32767,32767, 579, 630,32767,32767,32767, 32767,32767,32767,32767,32767, 139,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 564,32767, 137,32767, - 32767,32767,32767,32767,32767,32767,32767, 560,32767,32767, - 32767, 577,32767,32767,32767,32767, 320, 317,32767,32767, + 32767,32767,32767,32767,32767,32767, 565,32767, 137,32767, + 32767,32767,32767,32767,32767,32767,32767, 561,32767,32767, + 32767, 578,32767,32767,32767,32767, 321, 318,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 577,32767,32767,32767,32767,32767, - 297,32767, 314,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 578,32767,32767,32767,32767,32767, + 298,32767, 315,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 399, 534, 300, 302, 303,32767,32767,32767,32767, - 375,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 153, 153, 3, 3, 355, 153, - 153, 153, 355, 355, 153, 355, 355, 355, 153, 153, + 32767, 400, 535, 301, 303, 304,32767,32767,32767,32767, + 376,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 153, 153, 3, 3, 356, 153, + 153, 153, 356, 356, 153, 356, 356, 356, 153, 153, 153, 153, 153, 153, 153, 283, 186, 265, 268, 250, - 250, 153, 367, 153, 401, 401, 410 + 250, 153, 368, 153, 402, 402, 411 ); protected array $goto = array( - 201, 169, 201, 201, 201, 1068, 598, 719, 448, 684, + 201, 169, 201, 201, 201, 1069, 598, 719, 448, 684, 644, 681, 443, 345, 341, 342, 344, 615, 447, 346, - 449, 661, 481, 728, 570, 570, 570, 570, 1244, 626, + 449, 661, 481, 728, 570, 570, 570, 570, 1245, 626, 172, 172, 172, 172, 225, 202, 198, 198, 182, 184, - 220, 198, 198, 198, 198, 198, 1194, 199, 199, 199, - 199, 199, 1194, 192, 193, 194, 195, 196, 197, 222, + 220, 198, 198, 198, 198, 198, 1195, 199, 199, 199, + 199, 199, 1195, 192, 193, 194, 195, 196, 197, 222, 220, 223, 557, 558, 438, 559, 562, 563, 564, 565, 566, 567, 568, 569, 173, 174, 175, 200, 176, 177, 178, 170, 179, 180, 181, 183, 219, 221, 224, 242, @@ -935,54 +935,54 @@ class Php8 extends \PhpParser\ParserAbstract 206, 243, 185, 186, 207, 187, 208, 204, 188, 244, 203, 168, 209, 210, 189, 211, 212, 213, 190, 214, 215, 171, 216, 217, 218, 191, 287, 284, 287, 287, - 883, 255, 255, 255, 255, 255, 1124, 605, 487, 487, - 622, 758, 660, 662, 359, 1102, 682, 487, 1074, 1073, + 883, 255, 255, 255, 255, 255, 1125, 605, 487, 487, + 622, 758, 660, 662, 1103, 359, 682, 487, 1075, 1074, 706, 709, 1041, 717, 726, 1037, 733, 922, 879, 922, - 922, 253, 253, 253, 253, 250, 256, 646, 646, 1077, - 1078, 1331, 1331, 1331, 1331, 1331, 1331, 1331, 1331, 1331, - 1331, 855, 351, 938, 933, 934, 947, 889, 935, 886, + 922, 253, 253, 253, 253, 250, 256, 646, 646, 1078, + 1079, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, + 1332, 880, 351, 938, 933, 934, 947, 889, 935, 886, 936, 937, 887, 890, 476, 941, 894, 476, 1044, 1044, - 893, 364, 364, 364, 364, 352, 351, 532, 1130, 1126, - 1127, 1350, 1350, 331, 315, 1350, 1350, 1350, 1350, 1350, - 1350, 1350, 1350, 1350, 1350, 1300, 1068, 1071, 1071, 704, - 983, 1300, 1300, 1063, 1079, 1080, 1068, 880, 1300, 861, - 458, 1068, 881, 1068, 1068, 1068, 1068, 1068, 1068, 1068, - 1068, 1068, 897, 716, 1068, 1068, 1068, 1068, 677, 678, - 1300, 695, 696, 697, 857, 1300, 1300, 1300, 1300, 716, - 909, 1300, 716, 896, 1300, 1300, 1381, 1381, 1381, 1381, - 1006, 581, 574, 861, 436, 861, 367, 971, 971, 955, - 1101, 1103, 1106, 956, 915, 1030, 367, 367, 1002, 499, - 757, 572, 612, 573, 1039, 1034, 501, 572, 572, 367, - 367, 1376, 1377, 367, 572, 1416, 616, 638, 317, 574, - 581, 607, 608, 318, 618, 624, 357, 640, 641, 942, - 576, 943, 1389, 367, 367, 28, 474, 411, 414, 623, - 627, 1000, 1000, 1000, 1000, 1027, 409, 474, 1347, 1347, - 994, 1001, 1347, 1347, 1347, 1347, 1347, 1347, 1347, 1347, - 1347, 1347, 633, 647, 650, 651, 652, 653, 674, 675, + 893, 364, 364, 364, 364, 352, 351, 532, 1131, 1127, + 1128, 1351, 1351, 331, 315, 1351, 1351, 1351, 1351, 1351, + 1351, 1351, 1351, 1351, 1351, 1069, 1301, 1072, 1072, 704, + 983, 1301, 1301, 1064, 1080, 1081, 1069, 942, 1301, 943, + 458, 1069, 881, 1069, 1069, 1069, 1069, 1069, 1069, 1069, + 1069, 1069, 897, 855, 1069, 1069, 1069, 1069, 677, 678, + 1301, 695, 696, 697, 1006, 1301, 1301, 1301, 1301, 450, + 909, 1301, 436, 896, 1301, 1301, 1382, 1382, 1382, 1382, + 915, 581, 574, 499, 612, 450, 367, 971, 971, 955, + 501, 1076, 1076, 956, 1400, 1400, 367, 367, 688, 1087, + 1083, 1084, 572, 411, 414, 623, 627, 572, 572, 367, + 367, 1400, 357, 367, 572, 1417, 1377, 1378, 317, 574, + 581, 607, 608, 318, 618, 624, 1390, 640, 641, 1027, + 576, 1403, 1403, 367, 367, 28, 474, 520, 442, 521, + 635, 1000, 1000, 1000, 1000, 527, 409, 474, 1348, 1348, + 994, 1001, 1348, 1348, 1348, 1348, 1348, 1348, 1348, 1348, + 1348, 1348, 633, 647, 650, 651, 652, 653, 674, 675, 676, 730, 732, 561, 561, 258, 258, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 610, 1361, 467, - 467, 876, 683, 442, 876, 635, 467, 467, 1190, 1372, - 360, 361, 1150, 1178, 1151, 1372, 1372, 560, 560, 456, - 432, 560, 1372, 560, 560, 560, 560, 560, 560, 560, - 560, 1276, 975, 575, 602, 575, 1277, 1280, 976, 575, - 1281, 602, 705, 412, 480, 1383, 1383, 1383, 1383, 496, - 1374, 1375, 576, 876, 1092, 639, 490, 619, 491, 492, - 347, 8, 520, 9, 521, 907, 689, 873, 1407, 1408, - 527, 1368, 902, 1295, 278, 330, 989, 899, 424, 425, - 1291, 330, 330, 693, 1173, 694, 1049, 429, 430, 431, - 1113, 707, 418, 905, 433, 998, 427, 727, 355, 467, + 561, 561, 561, 561, 561, 561, 561, 610, 1362, 467, + 683, 467, 876, 616, 638, 876, 467, 467, 1191, 861, + 1373, 360, 361, 1093, 456, 1373, 1373, 560, 560, 705, + 432, 560, 1373, 560, 560, 560, 560, 560, 560, 560, + 560, 1277, 975, 575, 602, 575, 1278, 1281, 976, 575, + 1282, 602, 689, 412, 480, 1384, 1384, 1384, 1384, 347, + 873, 716, 576, 861, 876, 861, 490, 619, 491, 492, + 639, 8, 857, 9, 902, 907, 989, 716, 1408, 1409, + 716, 1369, 418, 1296, 278, 899, 330, 1174, 424, 425, + 1292, 330, 330, 693, 1049, 694, 1114, 429, 430, 431, + 761, 707, 1060, 905, 433, 1102, 1104, 1107, 355, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, - 467, 761, 339, 467, 1059, 467, 467, 1293, 628, 629, - 1115, 419, 960, 1180, 621, 1143, 1370, 1370, 1115, 497, - 1296, 1297, 911, 1283, 1046, 1117, 1164, 1011, 731, 871, - 528, 722, 901, 1141, 687, 1025, 1283, 386, 450, 0, - 895, 910, 898, 1112, 1116, 1399, 1399, 0, 0, 1298, - 1358, 1359, 1290, 450, 0, 1009, 654, 656, 658, 1075, - 1075, 0, 1399, 0, 0, 0, 688, 1086, 1082, 1083, - 0, 0, 0, 0, 876, 0, 0, 0, 999, 0, - 766, 766, 1402, 1402, 0, 0, 0, 0, 0, 0, + 467, 419, 339, 467, 911, 467, 467, 1294, 628, 629, + 1116, 497, 960, 1181, 621, 1144, 1371, 1371, 1116, 1118, + 1297, 1298, 1011, 1284, 1046, 1151, 1179, 1152, 731, 871, + 528, 722, 901, 1142, 687, 1025, 1284, 496, 1375, 1376, + 895, 910, 898, 1113, 1117, 998, 427, 727, 1165, 1299, + 1359, 1360, 1291, 1030, 386, 1009, 1002, 0, 757, 0, + 0, 573, 1039, 1034, 654, 656, 658, 0, 0, 0, + 0, 0, 0, 0, 0, 876, 0, 0, 999, 0, + 766, 766, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1162, 914 + 1163, 914 ); protected array $gotoCheck = array( @@ -1004,99 +1004,99 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 23, 23, 23, 23, 15, 5, 5, 5, 5, 5, 15, 48, 157, 157, - 134, 48, 48, 48, 97, 131, 48, 157, 119, 119, + 134, 48, 48, 48, 131, 97, 48, 157, 119, 119, 48, 48, 48, 48, 48, 48, 48, 25, 25, 25, 25, 5, 5, 5, 5, 5, 5, 108, 108, 120, 120, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 6, 177, 15, 15, 15, 15, 15, 15, 15, + 108, 26, 177, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 83, 15, 15, 83, 107, 107, 15, 24, 24, 24, 24, 177, 177, 76, 15, 15, 15, 179, 179, 178, 178, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 73, 73, 89, 89, 89, - 89, 73, 73, 89, 89, 89, 73, 26, 73, 12, + 89, 73, 73, 89, 89, 89, 73, 65, 73, 65, 83, 73, 27, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 35, 7, 73, 73, 73, 73, 86, 86, - 73, 86, 86, 86, 7, 73, 73, 73, 73, 7, - 35, 73, 7, 35, 73, 73, 9, 9, 9, 9, - 49, 76, 76, 12, 43, 12, 14, 9, 9, 73, - 130, 130, 130, 73, 45, 50, 14, 14, 50, 84, - 50, 19, 181, 50, 50, 50, 84, 19, 19, 14, - 14, 187, 187, 14, 19, 14, 2, 2, 76, 76, - 76, 76, 76, 76, 76, 76, 188, 76, 76, 65, - 14, 65, 190, 14, 14, 76, 19, 59, 59, 59, - 59, 19, 19, 19, 19, 103, 62, 19, 180, 180, + 73, 73, 35, 6, 73, 73, 73, 73, 86, 86, + 73, 86, 86, 86, 49, 73, 73, 73, 73, 118, + 35, 73, 43, 35, 73, 73, 9, 9, 9, 9, + 45, 76, 76, 84, 181, 118, 14, 9, 9, 73, + 84, 118, 118, 73, 191, 191, 14, 14, 118, 118, + 118, 118, 19, 59, 59, 59, 59, 19, 19, 14, + 14, 191, 188, 14, 19, 14, 187, 187, 76, 76, + 76, 76, 76, 76, 76, 76, 190, 76, 76, 103, + 14, 191, 191, 14, 14, 76, 19, 163, 13, 163, + 13, 19, 19, 19, 19, 163, 62, 19, 180, 180, 19, 19, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 182, 182, 5, 5, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 104, 14, 23, - 23, 22, 64, 13, 22, 13, 23, 23, 158, 134, - 97, 97, 149, 149, 149, 134, 134, 165, 165, 113, + 64, 23, 22, 2, 2, 22, 23, 23, 158, 12, + 134, 97, 97, 115, 113, 134, 134, 165, 165, 117, 14, 165, 134, 165, 165, 165, 165, 165, 165, 165, 165, 79, 79, 9, 9, 9, 79, 79, 79, 9, - 79, 9, 117, 9, 9, 134, 134, 134, 134, 185, - 185, 185, 14, 22, 115, 80, 9, 9, 9, 9, - 29, 46, 163, 46, 163, 9, 121, 18, 9, 9, - 163, 134, 39, 20, 24, 24, 92, 37, 82, 82, - 169, 24, 24, 82, 156, 82, 110, 82, 82, 82, - 133, 82, 28, 9, 82, 93, 93, 93, 82, 23, + 79, 9, 121, 9, 9, 134, 134, 134, 134, 29, + 18, 7, 14, 12, 22, 12, 9, 9, 9, 9, + 80, 46, 7, 46, 39, 9, 92, 7, 9, 9, + 7, 134, 28, 20, 24, 37, 24, 156, 82, 82, + 169, 24, 24, 82, 110, 82, 133, 82, 82, 82, + 99, 82, 114, 9, 82, 130, 130, 130, 82, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 99, 9, 23, 114, 23, 23, 14, 17, 17, - 134, 31, 17, 17, 8, 8, 134, 134, 134, 160, - 20, 20, 41, 20, 17, 136, 152, 96, 8, 20, - 8, 8, 17, 8, 17, 17, 20, 141, 118, -1, - 17, 16, 16, 16, 16, 191, 191, -1, -1, 20, - 20, 20, 17, 118, -1, 16, 85, 85, 85, 118, - 118, -1, 191, -1, -1, -1, 118, 118, 118, 118, - -1, -1, -1, -1, 22, -1, -1, -1, 16, -1, - 24, 24, 191, 191, -1, -1, -1, -1, -1, -1, + 23, 31, 9, 23, 41, 23, 23, 14, 17, 17, + 134, 160, 17, 17, 8, 8, 134, 134, 134, 136, + 20, 20, 96, 20, 17, 149, 149, 149, 8, 20, + 8, 8, 17, 8, 17, 17, 20, 185, 185, 185, + 17, 16, 16, 16, 16, 93, 93, 93, 152, 20, + 20, 20, 17, 50, 141, 16, 50, -1, 50, -1, + -1, 50, 50, 50, 85, 85, 85, -1, -1, -1, + -1, -1, -1, -1, -1, 22, -1, -1, 16, -1, + 24, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 16, 16 ); protected array $gotoBase = array( - 0, 0, -380, 0, 0, 170, 208, 283, 543, 10, - 0, 0, -24, 86, 22, -186, 111, 66, 181, 71, - 95, 0, 147, 160, 235, 191, 270, 275, 175, 187, - 0, 96, 0, 0, 0, -92, 0, 158, 0, 173, - 0, 103, -1, 298, 0, 305, -270, 0, -558, 300, - 321, 0, 0, 0, 0, 0, -33, 0, 0, 328, - 0, 0, 341, 0, 186, 353, -237, 0, 0, 0, + 0, 0, -303, 0, 0, 170, 280, 471, 543, 10, + 0, 0, 136, 31, 22, -186, 111, 66, 164, 71, + 95, 0, 148, 160, 235, 191, 214, 275, 155, 176, + 0, 86, 0, 0, 0, -92, 0, 156, 0, 165, + 0, 85, -1, 286, 0, 291, -270, 0, -558, 284, + 579, 0, 0, 0, 0, 0, -33, 0, 0, 294, + 0, 0, 341, 0, 184, 261, -237, 0, 0, 0, 0, 0, 0, -5, 0, 0, -32, 0, 0, 37, - 167, 32, -3, -50, -151, 97, -444, 0, 0, -21, - 0, 0, 171, 214, 0, 0, 106, -319, 0, 118, - 0, 0, 0, 347, 381, 0, 0, -7, -38, 0, - 133, 0, 0, 163, 112, 203, 0, 182, 307, -100, - -83, 197, 0, 0, 0, 0, 0, 4, 0, 0, - 327, 183, 0, 131, 169, 0, 105, 0, 0, 0, - 0, -188, 0, 0, 0, 0, 0, 0, 0, 164, - 0, 0, 104, 0, 0, 0, 151, 141, 188, -255, - 101, 0, 0, -23, 0, 202, 0, 0, 0, 128, + 172, 32, -3, -50, -167, 105, -444, 0, 0, -21, + 0, 0, 161, 274, 0, 0, 101, -318, 0, 97, + 0, 0, 0, 331, 381, 0, 0, -7, -38, 0, + 131, 0, 0, 158, 90, 162, 0, 159, 39, -100, + -83, 173, 0, 0, 0, 0, 0, 4, 0, 0, + 522, 182, 0, 127, 169, 0, 99, 0, 0, 0, + 0, -171, 0, 0, 0, 0, 0, 0, 0, 287, + 0, 0, 126, 0, 0, 0, 144, 141, 188, -255, + 93, 0, 0, -138, 0, 202, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, -82, -74, 6, - 143, 310, 168, 0, 0, 172, 0, -36, 333, 0, - 338, 271, 0, 0 + 143, 292, 168, 0, 0, 270, 0, -31, 319, 0, + 332, 20, 0, 0 ); protected array $gotoDefault = array( -32768, 533, 768, 7, 769, 964, 844, 853, 597, 551, - 729, 356, 648, 439, 1366, 940, 1179, 617, 872, 1309, - 1315, 475, 875, 336, 755, 952, 923, 924, 415, 402, + 729, 356, 648, 439, 1367, 940, 1180, 617, 872, 1310, + 1316, 475, 875, 336, 755, 952, 923, 924, 415, 402, 888, 413, 672, 649, 514, 908, 471, 900, 506, 903, 470, 912, 167, 435, 530, 916, 6, 919, 579, 950, 1004, 403, 927, 404, 700, 929, 601, 931, 932, 410, - 416, 417, 1184, 609, 645, 944, 261, 603, 945, 401, - 946, 954, 406, 408, 710, 486, 525, 519, 428, 1145, + 416, 417, 1185, 609, 645, 944, 261, 603, 945, 401, + 946, 954, 406, 408, 710, 486, 525, 519, 428, 1146, 604, 632, 669, 464, 493, 643, 655, 642, 500, 451, 434, 335, 988, 996, 507, 484, 1010, 358, 1018, 763, - 1192, 663, 509, 1026, 664, 1033, 1036, 552, 553, 498, - 1048, 271, 1051, 510, 1060, 26, 690, 1065, 1066, 691, - 665, 1088, 666, 692, 667, 1090, 483, 599, 1193, 482, - 1105, 1111, 472, 1114, 1355, 473, 1118, 269, 1121, 286, - 362, 385, 452, 1128, 1129, 12, 1135, 720, 721, 25, - 280, 529, 1163, 711, 1169, 279, 1172, 469, 1191, 468, - 1264, 1266, 580, 511, 1284, 321, 1287, 703, 526, 1292, - 465, 1357, 466, 554, 494, 343, 555, 1400, 314, 365, - 340, 571, 322, 366, 556, 495, 1363, 1371, 337, 34, - 1390, 1401, 614, 637 + 1193, 663, 509, 1026, 664, 1033, 1036, 552, 553, 498, + 1048, 270, 1051, 510, 1061, 26, 690, 1066, 1067, 691, + 665, 1089, 666, 692, 667, 1091, 483, 599, 1194, 482, + 1106, 1112, 472, 1115, 1356, 473, 1119, 269, 1122, 286, + 362, 385, 452, 1129, 1130, 12, 1136, 720, 721, 25, + 280, 529, 1164, 711, 1170, 279, 1173, 469, 1192, 468, + 1265, 1267, 580, 511, 1285, 321, 1288, 703, 526, 1293, + 465, 1358, 466, 554, 494, 343, 555, 1401, 314, 365, + 340, 571, 322, 366, 556, 495, 1364, 1372, 337, 34, + 1391, 1402, 614, 637 ); protected array $ruleToNonTerminal = array( @@ -1129,19 +1129,19 @@ class Php8 extends \PhpParser\ParserAbstract 102, 103, 103, 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, 111, 111, 112, 112, 112, 112, 112, - 112, 112, 110, 110, 110, 115, 115, 115, 115, 89, - 89, 118, 118, 118, 119, 119, 116, 116, 120, 120, - 122, 122, 123, 123, 117, 124, 124, 121, 125, 125, - 125, 125, 113, 113, 82, 82, 82, 20, 20, 20, - 128, 128, 128, 128, 129, 129, 129, 127, 126, 126, - 131, 131, 131, 130, 130, 60, 132, 132, 133, 61, - 135, 135, 136, 136, 137, 137, 86, 138, 138, 138, - 138, 138, 138, 138, 138, 144, 144, 145, 145, 146, - 146, 146, 146, 146, 147, 148, 148, 143, 143, 139, - 139, 142, 142, 150, 150, 149, 149, 149, 149, 149, - 149, 149, 149, 149, 149, 140, 151, 151, 153, 152, - 152, 141, 141, 114, 114, 154, 154, 156, 156, 156, - 155, 155, 62, 104, 157, 157, 56, 56, 42, 42, + 112, 112, 112, 110, 110, 110, 115, 115, 115, 115, + 89, 89, 118, 118, 118, 119, 119, 116, 116, 120, + 120, 122, 122, 123, 123, 117, 124, 124, 121, 125, + 125, 125, 125, 113, 113, 82, 82, 82, 20, 20, + 20, 128, 128, 128, 128, 129, 129, 129, 127, 126, + 126, 131, 131, 131, 130, 130, 60, 132, 132, 133, + 61, 135, 135, 136, 136, 137, 137, 86, 138, 138, + 138, 138, 138, 138, 138, 138, 144, 144, 145, 145, + 146, 146, 146, 146, 146, 147, 148, 148, 143, 143, + 139, 139, 142, 142, 150, 150, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 140, 151, 151, 153, + 152, 152, 141, 141, 114, 114, 154, 154, 156, 156, + 156, 155, 155, 62, 104, 157, 157, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -1151,20 +1151,21 @@ class Php8 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 164, 165, 165, 166, 158, - 158, 163, 163, 167, 168, 168, 169, 170, 171, 171, - 171, 171, 19, 19, 73, 73, 73, 73, 159, 159, - 159, 159, 173, 173, 162, 162, 162, 160, 160, 179, - 179, 179, 179, 179, 179, 179, 179, 179, 179, 180, - 180, 180, 108, 182, 182, 182, 182, 161, 161, 161, - 161, 161, 161, 161, 161, 59, 59, 176, 176, 176, - 176, 176, 183, 183, 172, 172, 172, 172, 184, 184, - 184, 184, 184, 74, 74, 66, 66, 66, 66, 134, - 134, 134, 134, 187, 186, 175, 175, 175, 175, 175, - 175, 174, 174, 174, 185, 185, 185, 185, 107, 181, - 189, 189, 188, 188, 190, 190, 190, 190, 190, 190, - 190, 190, 178, 178, 178, 178, 177, 192, 191, 191, - 191, 191, 191, 191, 191, 191, 193, 193, 193, 193 + 42, 42, 42, 42, 42, 42, 164, 165, 165, 166, + 158, 158, 163, 163, 167, 168, 168, 169, 170, 171, + 171, 171, 171, 19, 19, 73, 73, 73, 73, 159, + 159, 159, 159, 173, 173, 162, 162, 162, 160, 160, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 180, 180, 180, 108, 182, 182, 182, 182, 161, 161, + 161, 161, 161, 161, 161, 161, 59, 59, 176, 176, + 176, 176, 176, 183, 183, 172, 172, 172, 172, 184, + 184, 184, 184, 184, 74, 74, 66, 66, 66, 66, + 134, 134, 134, 134, 187, 186, 175, 175, 175, 175, + 175, 175, 174, 174, 174, 185, 185, 185, 185, 107, + 181, 189, 189, 188, 188, 190, 190, 190, 190, 190, + 190, 190, 190, 178, 178, 178, 178, 177, 192, 191, + 191, 191, 191, 191, 191, 191, 191, 193, 193, 193, + 193 ); protected array $ruleToLength = array( @@ -1197,42 +1198,43 @@ class Php8 extends \PhpParser\ParserAbstract 3, 3, 4, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, 0, 2, 1, 1, 1, 1, 1, - 1, 1, 7, 9, 6, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 1, 3, - 3, 3, 3, 3, 1, 3, 3, 1, 1, 2, - 1, 1, 0, 1, 0, 2, 2, 2, 4, 3, - 2, 4, 4, 3, 3, 1, 3, 1, 1, 3, - 2, 2, 3, 1, 1, 2, 3, 1, 1, 2, - 3, 1, 1, 3, 2, 0, 1, 5, 7, 5, - 6, 10, 3, 5, 1, 1, 3, 0, 2, 4, - 5, 4, 4, 4, 3, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, - 3, 0, 2, 0, 3, 5, 8, 1, 3, 3, - 0, 2, 2, 2, 3, 1, 0, 1, 1, 3, - 3, 3, 4, 4, 1, 1, 2, 2, 3, 3, + 1, 1, 1, 7, 9, 6, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 1, + 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, + 2, 1, 1, 0, 1, 0, 2, 2, 2, 4, + 3, 2, 4, 4, 3, 3, 1, 3, 1, 1, + 3, 2, 2, 3, 1, 1, 2, 3, 1, 1, + 2, 3, 1, 1, 3, 2, 0, 1, 5, 7, + 5, 6, 10, 3, 5, 1, 1, 3, 0, 2, + 4, 5, 4, 4, 4, 3, 1, 1, 1, 1, + 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, + 1, 3, 0, 2, 0, 3, 5, 8, 1, 3, + 3, 0, 2, 2, 2, 3, 1, 0, 1, 1, + 3, 3, 3, 4, 4, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 2, 2, 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, 3, 5, - 4, 3, 4, 4, 2, 2, 4, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, - 3, 2, 1, 2, 4, 2, 2, 8, 9, 8, - 9, 9, 10, 9, 10, 8, 3, 2, 2, 1, - 1, 0, 4, 2, 1, 3, 2, 1, 2, 2, - 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, - 3, 1, 1, 1, 0, 1, 1, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 5, 3, 3, 4, 1, 1, 3, 1, 1, 1, - 1, 1, 3, 2, 3, 0, 1, 1, 3, 1, - 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, - 1, 4, 4, 0, 1, 1, 1, 3, 3, 1, - 4, 2, 2, 1, 3, 1, 4, 3, 3, 3, - 3, 1, 3, 1, 1, 3, 1, 1, 4, 1, - 1, 1, 3, 1, 1, 2, 1, 3, 4, 3, - 2, 0, 2, 2, 1, 2, 1, 1, 1, 4, - 3, 3, 3, 3, 6, 3, 1, 1, 2, 1 + 3, 3, 3, 3, 2, 2, 2, 2, 3, 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, 2, + 1, 3, 2, 1, 2, 4, 2, 2, 8, 9, + 8, 9, 9, 10, 9, 10, 8, 3, 2, 2, + 1, 1, 0, 4, 2, 1, 3, 2, 1, 2, + 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 1, 0, 1, 1, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 3, 5, 3, 3, 4, 1, 1, 3, 1, 1, + 1, 1, 1, 3, 2, 3, 0, 1, 1, 3, + 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, + 4, 1, 4, 4, 0, 1, 1, 1, 3, 3, + 1, 4, 2, 2, 1, 3, 1, 4, 3, 3, + 3, 3, 1, 3, 1, 1, 3, 1, 1, 4, + 1, 1, 1, 3, 1, 1, 2, 1, 3, 4, + 3, 2, 0, 2, 2, 1, 2, 1, 1, 1, + 4, 3, 3, 3, 3, 6, 3, 1, 1, 2, + 1 ); protected function initReduceCallbacks(): void { @@ -1912,681 +1914,681 @@ protected function initReduceCallbacks(): void { $self->semValue = Modifiers::READONLY; }, 292 => static function ($self, $stackPos) { + $self->semValue = Modifiers::FINAL; + }, + 293 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(7-6)], null, $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-4)], $self->semStack[$stackPos-(7-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-7)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 293 => static function ($self, $stackPos) { + 294 => static function ($self, $stackPos) { $self->semValue = new Node\Param($self->semStack[$stackPos-(9-6)], $self->semStack[$stackPos-(9-8)], $self->semStack[$stackPos-(9-3)], $self->semStack[$stackPos-(9-4)], $self->semStack[$stackPos-(9-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(9-2)], $self->semStack[$stackPos-(9-1)], $self->semStack[$stackPos-(9-9)]); $self->checkParam($self->semValue); $self->addPropertyNameToHooks($self->semValue); }, - 294 => static function ($self, $stackPos) { + 295 => static function ($self, $stackPos) { $self->semValue = new Node\Param(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])), null, $self->semStack[$stackPos-(6-3)], $self->semStack[$stackPos-(6-4)], $self->semStack[$stackPos-(6-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-1)]); }, - 295 => null, - 296 => static function ($self, $stackPos) { + 296 => null, + 297 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 297 => static function ($self, $stackPos) { + 298 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 298 => null, 299 => null, - 300 => static function ($self, $stackPos) { + 300 => null, + 301 => static function ($self, $stackPos) { $self->semValue = new Node\Name('static', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 301 => static function ($self, $stackPos) { + 302 => static function ($self, $stackPos) { $self->semValue = $self->handleBuiltinTypes($self->semStack[$stackPos-(1-1)]); }, - 302 => static function ($self, $stackPos) { + 303 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('array', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 303 => static function ($self, $stackPos) { + 304 => static function ($self, $stackPos) { $self->semValue = new Node\Identifier('callable', $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 304 => null, - 305 => static function ($self, $stackPos) { + 305 => null, + 306 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 306 => static function ($self, $stackPos) { + 307 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 307 => static function ($self, $stackPos) { + 308 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 308 => null, - 309 => static function ($self, $stackPos) { + 309 => null, + 310 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 310 => static function ($self, $stackPos) { + 311 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 311 => static function ($self, $stackPos) { + 312 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 312 => static function ($self, $stackPos) { + 313 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 313 => static function ($self, $stackPos) { + 314 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 314 => static function ($self, $stackPos) { + 315 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 315 => static function ($self, $stackPos) { + 316 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 316 => static function ($self, $stackPos) { + 317 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 317 => static function ($self, $stackPos) { + 318 => static function ($self, $stackPos) { $self->semValue = new Node\IntersectionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 318 => null, - 319 => static function ($self, $stackPos) { + 319 => null, + 320 => static function ($self, $stackPos) { $self->semValue = new Node\NullableType($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 320 => static function ($self, $stackPos) { + 321 => static function ($self, $stackPos) { $self->semValue = new Node\UnionType($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 321 => null, - 322 => static function ($self, $stackPos) { + 322 => null, + 323 => static function ($self, $stackPos) { $self->semValue = null; }, - 323 => null, - 324 => static function ($self, $stackPos) { + 324 => null, + 325 => static function ($self, $stackPos) { $self->semValue = null; }, - 325 => static function ($self, $stackPos) { + 326 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(2-2)]; }, - 326 => static function ($self, $stackPos) { + 327 => static function ($self, $stackPos) { $self->semValue = null; }, - 327 => static function ($self, $stackPos) { + 328 => static function ($self, $stackPos) { $self->semValue = array(); }, - 328 => static function ($self, $stackPos) { + 329 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 329 => static function ($self, $stackPos) { + 330 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 330 => static function ($self, $stackPos) { + 331 => static function ($self, $stackPos) { $self->semValue = array(); }, - 331 => static function ($self, $stackPos) { + 332 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-2)]; }, - 332 => static function ($self, $stackPos) { + 333 => static function ($self, $stackPos) { $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(4-2)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); }, - 333 => static function ($self, $stackPos) { + 334 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-2)]); }, - 334 => static function ($self, $stackPos) { + 335 => static function ($self, $stackPos) { $self->semValue = array(new Node\Arg($self->semStack[$stackPos-(3-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos-(3-1)])), $self->semStack[$stackPos-(3-3)]); }, - 335 => static function ($self, $stackPos) { + 336 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 336 => static function ($self, $stackPos) { + 337 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 337 => static function ($self, $stackPos) { + 338 => static function ($self, $stackPos) { $self->semValue = new Node\VariadicPlaceholder($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 338 => static function ($self, $stackPos) { + 339 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 339 => static function ($self, $stackPos) { + 340 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 340 => static function ($self, $stackPos) { + 341 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], true, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 341 => static function ($self, $stackPos) { + 342 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(2-2)], false, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 342 => static function ($self, $stackPos) { + 343 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(3-3)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(3-1)]); }, - 343 => static function ($self, $stackPos) { + 344 => static function ($self, $stackPos) { $self->semValue = new Node\Arg($self->semStack[$stackPos-(1-1)], false, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 344 => static function ($self, $stackPos) { + 345 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 345 => null, - 346 => static function ($self, $stackPos) { + 346 => null, + 347 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 347 => static function ($self, $stackPos) { + 348 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 348 => null, 349 => null, - 350 => static function ($self, $stackPos) { + 350 => null, + 351 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 351 => static function ($self, $stackPos) { + 352 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 352 => static function ($self, $stackPos) { + 353 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 353 => static function ($self, $stackPos) { + 354 => static function ($self, $stackPos) { $self->semValue = new Node\StaticVar($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 354 => static function ($self, $stackPos) { + 355 => static function ($self, $stackPos) { if ($self->semStack[$stackPos-(2-2)] !== null) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; } else { $self->semValue = $self->semStack[$stackPos-(2-1)]; } }, - 355 => static function ($self, $stackPos) { + 356 => static function ($self, $stackPos) { $self->semValue = array(); }, - 356 => static function ($self, $stackPos) { + 357 => static function ($self, $stackPos) { $nop = $self->maybeCreateZeroLengthNop($self->tokenPos);; if ($nop !== null) { $self->semStack[$stackPos-(1-1)][] = $nop; } $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 357 => static function ($self, $stackPos) { + 358 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(5-2)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-1)]); }, - 358 => static function ($self, $stackPos) { + 359 => static function ($self, $stackPos) { $self->semValue = new Stmt\Property($self->semStack[$stackPos-(7-2)], $self->semStack[$stackPos-(7-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(7-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(7-3)], $self->semStack[$stackPos-(7-1)], $self->semStack[$stackPos-(7-6)]); $self->checkPropertyHooksForMultiProperty($self->semValue, $stackPos-(7-5)); $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(7-6)], $stackPos-(7-5)); $self->addPropertyNameToHooks($self->semValue); }, - 359 => static function ($self, $stackPos) { + 360 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(5-1)]); $self->checkClassConst($self->semValue, $stackPos-(5-2)); }, - 360 => static function ($self, $stackPos) { + 361 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassConst($self->semStack[$stackPos-(6-5)], $self->semStack[$stackPos-(6-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos]), $self->semStack[$stackPos-(6-1)], $self->semStack[$stackPos-(6-4)]); $self->checkClassConst($self->semValue, $stackPos-(6-2)); }, - 361 => static function ($self, $stackPos) { + 362 => static function ($self, $stackPos) { $self->semValue = new Stmt\ClassMethod($self->semStack[$stackPos-(10-5)], ['type' => $self->semStack[$stackPos-(10-2)], 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-7)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); $self->checkClassMethod($self->semValue, $stackPos-(10-2)); }, - 362 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); - }, 363 => static function ($self, $stackPos) { - $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUse($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 364 => static function ($self, $stackPos) { - $self->semValue = null; /* will be skipped */ + $self->semValue = new Stmt\EnumCase($self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 365 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = null; /* will be skipped */ }, 366 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = array(); }, 367 => static function ($self, $stackPos) { - $self->semValue = array(); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 368 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; + $self->semValue = array(); }, 369 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 370 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Precedence($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 371 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(5-1)][0], $self->semStack[$stackPos-(5-1)][1], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 372 => static function ($self, $stackPos) { - $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], $self->semStack[$stackPos-(4-3)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 373 => static function ($self, $stackPos) { $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 374 => static function ($self, $stackPos) { + $self->semValue = new Stmt\TraitUseAdaptation\Alias($self->semStack[$stackPos-(4-1)][0], $self->semStack[$stackPos-(4-1)][1], null, $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + }, + 375 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)]); }, - 375 => null, - 376 => static function ($self, $stackPos) { + 376 => null, + 377 => static function ($self, $stackPos) { $self->semValue = array(null, $self->semStack[$stackPos-(1-1)]); }, - 377 => static function ($self, $stackPos) { + 378 => static function ($self, $stackPos) { $self->semValue = null; }, - 378 => null, 379 => null, - 380 => static function ($self, $stackPos) { + 380 => null, + 381 => static function ($self, $stackPos) { $self->semValue = 0; }, - 381 => static function ($self, $stackPos) { + 382 => static function ($self, $stackPos) { $self->semValue = 0; }, - 382 => null, 383 => null, - 384 => static function ($self, $stackPos) { + 384 => null, + 385 => static function ($self, $stackPos) { $self->checkModifier($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 385 => static function ($self, $stackPos) { + 386 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC; }, - 386 => static function ($self, $stackPos) { + 387 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED; }, - 387 => static function ($self, $stackPos) { + 388 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE; }, - 388 => static function ($self, $stackPos) { + 389 => static function ($self, $stackPos) { $self->semValue = Modifiers::PUBLIC_SET; }, - 389 => static function ($self, $stackPos) { + 390 => static function ($self, $stackPos) { $self->semValue = Modifiers::PROTECTED_SET; }, - 390 => static function ($self, $stackPos) { + 391 => static function ($self, $stackPos) { $self->semValue = Modifiers::PRIVATE_SET; }, - 391 => static function ($self, $stackPos) { + 392 => static function ($self, $stackPos) { $self->semValue = Modifiers::STATIC; }, - 392 => static function ($self, $stackPos) { + 393 => static function ($self, $stackPos) { $self->semValue = Modifiers::ABSTRACT; }, - 393 => static function ($self, $stackPos) { + 394 => static function ($self, $stackPos) { $self->semValue = Modifiers::FINAL; }, - 394 => static function ($self, $stackPos) { + 395 => static function ($self, $stackPos) { $self->semValue = Modifiers::READONLY; }, - 395 => null, - 396 => static function ($self, $stackPos) { + 396 => null, + 397 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 397 => static function ($self, $stackPos) { + 398 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 398 => static function ($self, $stackPos) { + 399 => static function ($self, $stackPos) { $self->semValue = new Node\VarLikeIdentifier(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 399 => static function ($self, $stackPos) { + 400 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(1-1)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 400 => static function ($self, $stackPos) { + 401 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyItem($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 401 => static function ($self, $stackPos) { + 402 => static function ($self, $stackPos) { $self->semValue = []; }, - 402 => static function ($self, $stackPos) { + 403 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, - 403 => static function ($self, $stackPos) { + 404 => static function ($self, $stackPos) { $self->semValue = []; }, - 404 => static function ($self, $stackPos) { + 405 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; $self->checkEmptyPropertyHookList($self->semStack[$stackPos-(3-2)], $stackPos-(3-1)); }, - 405 => static function ($self, $stackPos) { + 406 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(5-4)], $self->semStack[$stackPos-(5-5)], ['flags' => $self->semStack[$stackPos-(5-2)], 'byRef' => $self->semStack[$stackPos-(5-3)], 'params' => [], 'attrGroups' => $self->semStack[$stackPos-(5-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, null); }, - 406 => static function ($self, $stackPos) { + 407 => static function ($self, $stackPos) { $self->semValue = new Node\PropertyHook($self->semStack[$stackPos-(8-4)], $self->semStack[$stackPos-(8-8)], ['flags' => $self->semStack[$stackPos-(8-2)], 'byRef' => $self->semStack[$stackPos-(8-3)], 'params' => $self->semStack[$stackPos-(8-6)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); $self->checkPropertyHook($self->semValue, $stackPos-(8-5)); }, - 407 => static function ($self, $stackPos) { - $self->semValue = null; - }, 408 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = null; }, 409 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 410 => static function ($self, $stackPos) { - $self->semValue = 0; + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 411 => static function ($self, $stackPos) { + $self->semValue = 0; + }, + 412 => static function ($self, $stackPos) { $self->checkPropertyHookModifiers($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $self->semValue = $self->semStack[$stackPos-(2-1)] | $self->semStack[$stackPos-(2-2)]; }, - 412 => null, 413 => null, - 414 => static function ($self, $stackPos) { + 414 => null, + 415 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 415 => static function ($self, $stackPos) { + 416 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 416 => static function ($self, $stackPos) { + 417 => static function ($self, $stackPos) { $self->semValue = array(); }, - 417 => null, 418 => null, - 419 => static function ($self, $stackPos) { + 419 => null, + 420 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 420 => static function ($self, $stackPos) { + 421 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->fixupArrayDestructuring($self->semStack[$stackPos-(3-1)]), $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 421 => static function ($self, $stackPos) { + 422 => static function ($self, $stackPos) { $self->semValue = new Expr\Assign($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 422 => static function ($self, $stackPos) { + 423 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 423 => static function ($self, $stackPos) { + 424 => static function ($self, $stackPos) { $self->semValue = new Expr\AssignRef($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); if (!$self->phpVersion->allowsAssignNewByReference()) { $self->emitError(new Error('Cannot assign new by reference', $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]))); } }, - 424 => null, 425 => null, - 426 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); - }, + 426 => null, 427 => static function ($self, $stackPos) { - $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall(new Node\Name($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos-(2-1)])), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 428 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Clone_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 429 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 430 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 431 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 432 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 433 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 434 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 435 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 436 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 437 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 438 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 439 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 440 => static function ($self, $stackPos) { - $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 441 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\AssignOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 442 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostInc($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 443 => static function ($self, $stackPos) { - $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreInc($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 444 => static function ($self, $stackPos) { - $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PostDec($self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 445 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PreDec($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 446 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 447 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BooleanAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 448 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 449 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 450 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\LogicalXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 451 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseOr($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 452 => static function ($self, $stackPos) { $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 453 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseAnd($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 454 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\BitwiseXor($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 455 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Concat($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 456 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Plus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 457 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Minus($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 458 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mul($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 459 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Div($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 460 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Mod($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 461 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftLeft($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 462 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\ShiftRight($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 463 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Pow($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 464 => static function ($self, $stackPos) { - $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryPlus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 465 => static function ($self, $stackPos) { - $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\UnaryMinus($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 466 => static function ($self, $stackPos) { - $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BooleanNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 467 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BitwiseNot($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 468 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Identical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 469 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotIdentical($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 470 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Equal($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 471 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\NotEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 472 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Spaceship($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 473 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Smaller($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 474 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\SmallerOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 475 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Greater($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 476 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Pipe($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\GreaterOrEqual($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 477 => static function ($self, $stackPos) { - $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Pipe($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 478 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\Instanceof_($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 479 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 480 => static function ($self, $stackPos) { - $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-3)], $self->semStack[$stackPos-(5-5)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, 481 => static function ($self, $stackPos) { - $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Ternary($self->semStack[$stackPos-(4-1)], null, $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 482 => static function ($self, $stackPos) { - $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\BinaryOp\Coalesce($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 483 => static function ($self, $stackPos) { - $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Isset_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 484 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Empty_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 485 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 486 => static function ($self, $stackPos) { - $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 487 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Eval_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 488 => static function ($self, $stackPos) { - $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 489 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 490 => static function ($self, $stackPos) { + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + }, + 491 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = $self->getFloatCastKind($self->semStack[$stackPos-(2-1)]); $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, - 491 => static function ($self, $stackPos) { + 492 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 492 => static function ($self, $stackPos) { + 493 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 493 => static function ($self, $stackPos) { + 494 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 494 => static function ($self, $stackPos) { + 495 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 495 => static function ($self, $stackPos) { + 496 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 496 => static function ($self, $stackPos) { + 497 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Void_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 497 => static function ($self, $stackPos) { + 498 => static function ($self, $stackPos) { $self->semValue = $self->createExitExpr($self->semStack[$stackPos-(2-1)], $stackPos-(2-1), $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 498 => static function ($self, $stackPos) { + 499 => static function ($self, $stackPos) { $self->semValue = new Expr\ErrorSuppress($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 499 => null, - 500 => static function ($self, $stackPos) { + 500 => null, + 501 => static function ($self, $stackPos) { $self->semValue = new Expr\ShellExec($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 501 => static function ($self, $stackPos) { + 502 => static function ($self, $stackPos) { $self->semValue = new Expr\Print_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 502 => static function ($self, $stackPos) { + 503 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_(null, null, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 503 => static function ($self, $stackPos) { + 504 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(2-2)], null, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 504 => static function ($self, $stackPos) { + 505 => static function ($self, $stackPos) { $self->semValue = new Expr\Yield_($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 505 => static function ($self, $stackPos) { + 506 => static function ($self, $stackPos) { $self->semValue = new Expr\YieldFrom($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 506 => static function ($self, $stackPos) { + 507 => static function ($self, $stackPos) { $self->semValue = new Expr\Throw_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 507 => static function ($self, $stackPos) { + 508 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'returnType' => $self->semStack[$stackPos-(8-6)], 'expr' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 508 => static function ($self, $stackPos) { + 509 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 509 => static function ($self, $stackPos) { + 510 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(8-2)], 'params' => $self->semStack[$stackPos-(8-4)], 'uses' => $self->semStack[$stackPos-(8-6)], 'returnType' => $self->semStack[$stackPos-(8-7)], 'stmts' => $self->semStack[$stackPos-(8-8)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])); }, - 510 => static function ($self, $stackPos) { + 511 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => []], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 511 => static function ($self, $stackPos) { + 512 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'returnType' => $self->semStack[$stackPos-(9-7)], 'expr' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 512 => static function ($self, $stackPos) { + 513 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'returnType' => $self->semStack[$stackPos-(10-8)], 'expr' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 513 => static function ($self, $stackPos) { + 514 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => false, 'byRef' => $self->semStack[$stackPos-(9-3)], 'params' => $self->semStack[$stackPos-(9-5)], 'uses' => $self->semStack[$stackPos-(9-7)], 'returnType' => $self->semStack[$stackPos-(9-8)], 'stmts' => $self->semStack[$stackPos-(9-9)], 'attrGroups' => $self->semStack[$stackPos-(9-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(9-1)], $self->tokenEndStack[$stackPos])); }, - 514 => static function ($self, $stackPos) { + 515 => static function ($self, $stackPos) { $self->semValue = new Expr\Closure(['static' => true, 'byRef' => $self->semStack[$stackPos-(10-4)], 'params' => $self->semStack[$stackPos-(10-6)], 'uses' => $self->semStack[$stackPos-(10-8)], 'returnType' => $self->semStack[$stackPos-(10-9)], 'stmts' => $self->semStack[$stackPos-(10-10)], 'attrGroups' => $self->semStack[$stackPos-(10-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(10-1)], $self->tokenEndStack[$stackPos])); }, - 515 => static function ($self, $stackPos) { + 516 => static function ($self, $stackPos) { $self->semValue = array(new Stmt\Class_(null, ['type' => $self->semStack[$stackPos-(8-2)], 'extends' => $self->semStack[$stackPos-(8-4)], 'implements' => $self->semStack[$stackPos-(8-5)], 'stmts' => $self->semStack[$stackPos-(8-7)], 'attrGroups' => $self->semStack[$stackPos-(8-1)]], $self->getAttributes($self->tokenStartStack[$stackPos-(8-1)], $self->tokenEndStack[$stackPos])), $self->semStack[$stackPos-(8-3)]); $self->checkClass($self->semValue[0], -1); }, - 516 => static function ($self, $stackPos) { + 517 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 517 => static function ($self, $stackPos) { + 518 => static function ($self, $stackPos) { list($class, $ctorArgs) = $self->semStack[$stackPos-(2-2)]; $self->semValue = new Expr\New_($class, $ctorArgs, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 518 => static function ($self, $stackPos) { + 519 => static function ($self, $stackPos) { $self->semValue = new Expr\New_($self->semStack[$stackPos-(2-2)], [], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 519 => null, 520 => null, - 521 => static function ($self, $stackPos) { + 521 => null, + 522 => static function ($self, $stackPos) { $self->semValue = array(); }, - 522 => static function ($self, $stackPos) { + 523 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(4-3)]; }, - 523 => null, - 524 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); - }, + 524 => null, 525 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 526 => static function ($self, $stackPos) { - $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, 527 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Node\ClosureUse($self->semStack[$stackPos-(2-2)], $self->semStack[$stackPos-(2-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 528 => static function ($self, $stackPos) { - $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 529 => static function ($self, $stackPos) { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2595,304 +2597,307 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 531 => static function ($self, $stackPos) { - $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\FuncCall($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 532 => static function ($self, $stackPos) { - $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\StaticCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 533 => null, - 534 => static function ($self, $stackPos) { + 533 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 534 => null, 535 => static function ($self, $stackPos) { $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 536 => static function ($self, $stackPos) { - $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Name($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 537 => static function ($self, $stackPos) { + $self->semValue = new Name\FullyQualified(substr($self->semStack[$stackPos-(1-1)], 1), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 538 => static function ($self, $stackPos) { $self->semValue = new Name\Relative(substr($self->semStack[$stackPos-(1-1)], 10), $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 538 => null, 539 => null, - 540 => static function ($self, $stackPos) { + 540 => null, + 541 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 541 => static function ($self, $stackPos) { + 542 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 542 => null, 543 => null, - 544 => static function ($self, $stackPos) { + 544 => null, + 545 => static function ($self, $stackPos) { $self->semValue = array(); }, - 545 => static function ($self, $stackPos) { + 546 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); foreach ($self->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; }, - 546 => static function ($self, $stackPos) { + 547 => static function ($self, $stackPos) { foreach ($self->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = $self->semStack[$stackPos-(1-1)]; }, - 547 => static function ($self, $stackPos) { + 548 => static function ($self, $stackPos) { $self->semValue = array(); }, - 548 => null, - 549 => static function ($self, $stackPos) { + 549 => null, + 550 => static function ($self, $stackPos) { $self->semValue = new Expr\ConstFetch($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 550 => static function ($self, $stackPos) { + 551 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Line($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 551 => static function ($self, $stackPos) { + 552 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\File($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 552 => static function ($self, $stackPos) { + 553 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Dir($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 553 => static function ($self, $stackPos) { + 554 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Class_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 554 => static function ($self, $stackPos) { + 555 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Trait_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 555 => static function ($self, $stackPos) { + 556 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Method($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 556 => static function ($self, $stackPos) { + 557 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Function_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 557 => static function ($self, $stackPos) { + 558 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Namespace_($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 558 => static function ($self, $stackPos) { + 559 => static function ($self, $stackPos) { $self->semValue = new Scalar\MagicConst\Property($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 559 => static function ($self, $stackPos) { + 560 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 560 => static function ($self, $stackPos) { + 561 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(5-1)], $self->semStack[$stackPos-(5-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(5-1)], $self->tokenEndStack[$stackPos])); }, - 561 => static function ($self, $stackPos) { + 562 => static function ($self, $stackPos) { $self->semValue = new Expr\ClassConstFetch($self->semStack[$stackPos-(3-1)], new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)])), $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 562 => static function ($self, $stackPos) { + 563 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(3-2)], $attrs); }, - 563 => static function ($self, $stackPos) { + 564 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); $self->createdArrays->attach($self->semValue); }, - 564 => static function ($self, $stackPos) { + 565 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); }, - 565 => static function ($self, $stackPos) { + 566 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); }, - 566 => static function ($self, $stackPos) { + 567 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($self->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicodeEscapes()); } }; $self->semValue = new Scalar\InterpolatedString($self->semStack[$stackPos-(3-2)], $attrs); }, - 567 => static function ($self, $stackPos) { + 568 => static function ($self, $stackPos) { $self->semValue = $self->parseLNumber($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOctals()); }, - 568 => static function ($self, $stackPos) { + 569 => static function ($self, $stackPos) { $self->semValue = Scalar\Float_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 569 => null, 570 => null, 571 => null, - 572 => static function ($self, $stackPos) { + 572 => null, + 573 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 573 => static function ($self, $stackPos) { + 574 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(2-1)], '', $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(2-2)], $self->tokenEndStack[$stackPos-(2-2)]), true); }, - 574 => static function ($self, $stackPos) { + 575 => static function ($self, $stackPos) { $self->semValue = $self->parseDocString($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-2)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos]), $self->getAttributes($self->tokenStartStack[$stackPos-(3-3)], $self->tokenEndStack[$stackPos-(3-3)]), true); }, - 575 => static function ($self, $stackPos) { + 576 => static function ($self, $stackPos) { $self->semValue = null; }, - 576 => null, 577 => null, - 578 => static function ($self, $stackPos) { + 578 => null, + 579 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 579 => null, 580 => null, 581 => null, 582 => null, 583 => null, 584 => null, - 585 => static function ($self, $stackPos) { + 585 => null, + 586 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 586 => null, 587 => null, 588 => null, - 589 => static function ($self, $stackPos) { + 589 => null, + 590 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 590 => null, - 591 => static function ($self, $stackPos) { + 591 => null, + 592 => static function ($self, $stackPos) { $self->semValue = new Expr\MethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 592 => static function ($self, $stackPos) { + 593 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafeMethodCall($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->semStack[$stackPos-(4-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 593 => static function ($self, $stackPos) { + 594 => static function ($self, $stackPos) { $self->semValue = null; }, - 594 => null, 595 => null, 596 => null, - 597 => static function ($self, $stackPos) { + 597 => null, + 598 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 598 => static function ($self, $stackPos) { + 599 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 599 => null, - 600 => static function ($self, $stackPos) { + 600 => null, + 601 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 601 => static function ($self, $stackPos) { + 602 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 602 => static function ($self, $stackPos) { + 603 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable(new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])), $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 603 => static function ($self, $stackPos) { + 604 => static function ($self, $stackPos) { $var = $self->semStack[$stackPos-(1-1)]->name; $self->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])) : $var; }, - 604 => static function ($self, $stackPos) { + 605 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 605 => null, - 606 => static function ($self, $stackPos) { + 606 => null, + 607 => static function ($self, $stackPos) { $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 607 => static function ($self, $stackPos) { + 608 => static function ($self, $stackPos) { $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 608 => static function ($self, $stackPos) { + 609 => static function ($self, $stackPos) { $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 609 => static function ($self, $stackPos) { + 610 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 610 => static function ($self, $stackPos) { + 611 => static function ($self, $stackPos) { $self->semValue = new Expr\StaticPropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 611 => null, - 612 => static function ($self, $stackPos) { + 612 => null, + 613 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 613 => null, 614 => null, - 615 => static function ($self, $stackPos) { + 615 => null, + 616 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(3-2)]; }, - 616 => null, - 617 => static function ($self, $stackPos) { + 617 => null, + 618 => static function ($self, $stackPos) { $self->semValue = new Expr\Error($self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); $self->errorState = 2; }, - 618 => static function ($self, $stackPos) { + 619 => static function ($self, $stackPos) { $self->semValue = new Expr\List_($self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); $self->semValue->setAttribute('kind', Expr\List_::KIND_LIST); $self->postprocessList($self->semValue); }, - 619 => static function ($self, $stackPos) { + 620 => static function ($self, $stackPos) { $self->semValue = $self->semStack[$stackPos-(1-1)]; $end = count($self->semValue)-1; if ($self->semValue[$end]->value instanceof Expr\Error) array_pop($self->semValue); }, - 620 => null, - 621 => static function ($self, $stackPos) { + 621 => null, + 622 => static function ($self, $stackPos) { /* do nothing -- prevent default action of $$=$self->semStack[$1]. See $551. */ }, - 622 => static function ($self, $stackPos) { + 623 => static function ($self, $stackPos) { $self->semStack[$stackPos-(3-1)][] = $self->semStack[$stackPos-(3-3)]; $self->semValue = $self->semStack[$stackPos-(3-1)]; }, - 623 => static function ($self, $stackPos) { + 624 => static function ($self, $stackPos) { $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, - 624 => static function ($self, $stackPos) { + 625 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 625 => static function ($self, $stackPos) { + 626 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, true, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 626 => static function ($self, $stackPos) { + 627 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(1-1)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, - 627 => static function ($self, $stackPos) { + 628 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 628 => static function ($self, $stackPos) { + 629 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(4-4)], $self->semStack[$stackPos-(4-1)], true, $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, - 629 => static function ($self, $stackPos) { + 630 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(3-3)], $self->semStack[$stackPos-(3-1)], false, $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, - 630 => static function ($self, $stackPos) { + 631 => static function ($self, $stackPos) { $self->semValue = new Node\ArrayItem($self->semStack[$stackPos-(2-2)], null, false, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]), true); }, - 631 => static function ($self, $stackPos) { + 632 => static function ($self, $stackPos) { /* Create an Error node now to remember the position. We'll later either report an error, or convert this into a null element, depending on whether this is a creation or destructuring context. */ $attrs = $self->createEmptyElemAttributes($self->tokenPos); $self->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, - 632 => static function ($self, $stackPos) { - $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; - }, 633 => static function ($self, $stackPos) { $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 634 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(1-1)]); + $self->semStack[$stackPos-(2-1)][] = $self->semStack[$stackPos-(2-2)]; $self->semValue = $self->semStack[$stackPos-(2-1)]; }, 635 => static function ($self, $stackPos) { - $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); + $self->semValue = array($self->semStack[$stackPos-(1-1)]); }, 636 => static function ($self, $stackPos) { - $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); + $self->semValue = array($self->semStack[$stackPos-(2-1)], $self->semStack[$stackPos-(2-2)]); }, 637 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]); $attrs['rawValue'] = $self->semStack[$stackPos-(1-1)]; $self->semValue = new Node\InterpolatedStringPart($self->semStack[$stackPos-(1-1)], $attrs); }, - 638 => null, - 639 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); + 638 => static function ($self, $stackPos) { + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, + 639 => null, 640 => static function ($self, $stackPos) { - $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(4-1)], $self->semStack[$stackPos-(4-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos])); }, 641 => static function ($self, $stackPos) { - $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\PropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 642 => static function ($self, $stackPos) { - $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\NullsafePropertyFetch($self->semStack[$stackPos-(3-1)], $self->semStack[$stackPos-(3-3)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 643 => static function ($self, $stackPos) { $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 644 => static function ($self, $stackPos) { - $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Expr\Variable($self->semStack[$stackPos-(3-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(3-1)], $self->tokenEndStack[$stackPos])); }, 645 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(3-2)]; + $self->semValue = new Expr\ArrayDimFetch($self->semStack[$stackPos-(6-2)], $self->semStack[$stackPos-(6-4)], $self->getAttributes($self->tokenStartStack[$stackPos-(6-1)], $self->tokenEndStack[$stackPos])); }, 646 => static function ($self, $stackPos) { - $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = $self->semStack[$stackPos-(3-2)]; }, 647 => static function ($self, $stackPos) { - $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + $self->semValue = new Scalar\String_($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); }, 648 => static function ($self, $stackPos) { + $self->semValue = $self->parseNumString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos])); + }, + 649 => static function ($self, $stackPos) { $self->semValue = $self->parseNumString('-' . $self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, - 649 => null, + 650 => null, ]; } } diff --git a/test/code/parser/stmt/class/property_promotion.test b/test/code/parser/stmt/class/property_promotion.test index bdfadf9194..338cce460c 100644 --- a/test/code/parser/stmt/class/property_promotion.test +++ b/test/code/parser/stmt/class/property_promotion.test @@ -10,6 +10,7 @@ class Point { public readonly int $a = 0, public $h { set => $value; }, public $g = 1 { get => 2; }, + final $i, ) {} } ----- @@ -165,6 +166,20 @@ array( ) ) ) + 6: Param( + attrGroups: array( + ) + flags: FINAL (32) + type: null + byRef: false + variadic: false + var: Expr_Variable( + name: i + ) + default: null + hooks: array( + ) + ) ) returnType: null stmts: array( diff --git a/test/code/prettyPrinter/stmt/property_promotion.test b/test/code/prettyPrinter/stmt/property_promotion.test index 8606b5bdba..03a5f856bb 100644 --- a/test/code/prettyPrinter/stmt/property_promotion.test +++ b/test/code/prettyPrinter/stmt/property_promotion.test @@ -9,13 +9,14 @@ class Point protected array $y = [], private string $z = 'hello', public readonly int $a = 0, + protected final bool $b = true, ) { } } ----- class Point { - public function __construct(public float $x = 0.0, protected array $y = [], private string $z = 'hello', public readonly int $a = 0) + public function __construct(public float $x = 0.0, protected array $y = [], private string $z = 'hello', public readonly int $a = 0, final protected bool $b = true) { } } From 3b8d8aba031d6eeee0c2edbbfaeee28b0cfc3412 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 27 Jul 2025 21:59:34 +0200 Subject: [PATCH 422/428] Add special case for clone in fuzzer --- tools/fuzzing/target.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/fuzzing/target.php b/tools/fuzzing/target.php index 7638af23c7..206cc9ecdd 100644 --- a/tools/fuzzing/target.php +++ b/tools/fuzzing/target.php @@ -2,6 +2,7 @@ /** @var PhpFuzzer\Fuzzer $fuzzer */ +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; @@ -95,6 +96,13 @@ public function leaveNode(PhpParser\Node $node) { ) { $this->hasProblematicConstruct = true; } + + // clone($x, ) is not preserved precisely. + if ($node instanceof Expr\FuncCall && $node->name instanceof Node\Name && + $node->name->toLowerString() == 'clone' && count($node->args) == 1 + ) { + $this->hasProblematicConstruct = true; + } } }; $traverser = new PhpParser\NodeTraverser(); From 221b0d0fdf1369c71047ad1d18bb5880017bbc56 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 27 Jul 2025 22:03:57 +0200 Subject: [PATCH 423/428] Release PHP-Parser 5.6.0 --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51b8a14647..6002138209 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +Version 5.6.0 (2025-07-27) +-------------------------- + +### Added + +* [8.5] Added support for `clone` with arbitrary function arguments. This will be parsed as an + `Expr\FuncCall` node, instead of the usual `Expr\Clone_` node. +* [8.5] Permit declaration of `function clone` for use in stubs. +* [8.5] Added support for the pipe operator, represented by `Expr\BinaryOp\Pipe`. +* [8.5] Added support for the `(void)` cast, represented by `Expr\Cast\Void_`. +* [8.5] Added support for the `final` modifier on promoted properties. +* Added `CallLike::getArg()` to fetch an argument by position and name. + Version 5.5.0 (2025-05-31) -------------------------- From 63114fe833458c43c3c9d012f9e50580f34f56d5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 28 Jul 2025 20:42:42 +0200 Subject: [PATCH 424/428] Fix Param::isPublic() for param with asymmetric visibility Fixes https://github.com/nikic/PHP-Parser/issues/1096. --- lib/PhpParser/Node/Param.php | 2 +- test/PhpParser/Node/ParamTest.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/PhpParser/Node/Param.php b/lib/PhpParser/Node/Param.php index 57d15b7b0c..6634930bd5 100644 --- a/lib/PhpParser/Node/Param.php +++ b/lib/PhpParser/Node/Param.php @@ -77,7 +77,7 @@ public function isPublic(): bool { return true; } - if ($this->hooks === []) { + if (!$this->isPromoted()) { return false; } diff --git a/test/PhpParser/Node/ParamTest.php b/test/PhpParser/Node/ParamTest.php index c488b659c1..e4b670c317 100644 --- a/test/PhpParser/Node/ParamTest.php +++ b/test/PhpParser/Node/ParamTest.php @@ -42,10 +42,13 @@ public function testSetVisibility() { $node = new Param(new Variable('foo')); $node->flags = Modifiers::PRIVATE_SET; $this->assertTrue($node->isPrivateSet()); + $this->assertTrue($node->isPublic()); $node->flags = Modifiers::PROTECTED_SET; $this->assertTrue($node->isProtectedSet()); + $this->assertTrue($node->isPublic()); $node->flags = Modifiers::PUBLIC_SET; $this->assertTrue($node->isPublicSet()); + $this->assertTrue($node->isPublic()); } public function testPromotedPropertyWithoutVisibilityModifier(): void { From 5ad295a61524fda27c80d4c426052c3e9646c9d1 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 6 Aug 2025 21:44:37 +0200 Subject: [PATCH 425/428] Add cast kinds for bool, int, string (#1098) --- grammar/php.y | 15 ++++-- lib/PhpParser/Node/Expr/Cast/Bool_.php | 4 ++ lib/PhpParser/Node/Expr/Cast/Int_.php | 4 ++ lib/PhpParser/Node/Expr/Cast/String_.php | 4 ++ lib/PhpParser/Parser/Php7.php | 12 +++-- lib/PhpParser/Parser/Php8.php | 12 +++-- lib/PhpParser/ParserAbstract.php | 27 +++++++++++ test/code/parser/formattingAttributes.test | 54 ++++++++++++++++++++++ test/code/prettyPrinter/expr/cast.test | 17 +++++++ 9 files changed, 140 insertions(+), 9 deletions(-) create mode 100644 test/code/prettyPrinter/expr/cast.test diff --git a/grammar/php.y b/grammar/php.y index 20ec27aa10..33a5956b70 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1103,15 +1103,24 @@ expr: | 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_INT_CAST expr + { $attrs = attributes(); + $attrs['kind'] = $this->getIntCastKind($1); + $$ = new Expr\Cast\Int_($2, $attrs); } | T_DOUBLE_CAST expr { $attrs = attributes(); $attrs['kind'] = $this->getFloatCastKind($1); $$ = new Expr\Cast\Double($2, $attrs); } - | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; } + | T_STRING_CAST expr + { $attrs = attributes(); + $attrs['kind'] = $this->getStringCastKind($1); + $$ = new Expr\Cast\String_($2, $attrs); } | 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_BOOL_CAST expr + { $attrs = attributes(); + $attrs['kind'] = $this->getBoolCastKind($1); + $$ = new Expr\Cast\Bool_($2, $attrs); } | T_UNSET_CAST expr { $$ = Expr\Cast\Unset_ [$2]; } | T_VOID_CAST expr { $$ = Expr\Cast\Void_ [$2]; } | T_EXIT ctor_arguments diff --git a/lib/PhpParser/Node/Expr/Cast/Bool_.php b/lib/PhpParser/Node/Expr/Cast/Bool_.php index 3aed497c71..ca02586dd1 100644 --- a/lib/PhpParser/Node/Expr/Cast/Bool_.php +++ b/lib/PhpParser/Node/Expr/Cast/Bool_.php @@ -5,6 +5,10 @@ use PhpParser\Node\Expr\Cast; class Bool_ extends Cast { + // For use in "kind" attribute + public const KIND_BOOL = 1; // "bool" syntax + public const KIND_BOOLEAN = 2; // "boolean" syntax + public function getType(): string { return 'Expr_Cast_Bool'; } diff --git a/lib/PhpParser/Node/Expr/Cast/Int_.php b/lib/PhpParser/Node/Expr/Cast/Int_.php index 20744b9b0f..7e5d4a36a2 100644 --- a/lib/PhpParser/Node/Expr/Cast/Int_.php +++ b/lib/PhpParser/Node/Expr/Cast/Int_.php @@ -5,6 +5,10 @@ use PhpParser\Node\Expr\Cast; class Int_ extends Cast { + // For use in "kind" attribute + public const KIND_INT = 1; // "int" syntax + public const KIND_INTEGER = 2; // "integer" syntax + public function getType(): string { return 'Expr_Cast_Int'; } diff --git a/lib/PhpParser/Node/Expr/Cast/String_.php b/lib/PhpParser/Node/Expr/Cast/String_.php index c7605ab82c..a8f8c25486 100644 --- a/lib/PhpParser/Node/Expr/Cast/String_.php +++ b/lib/PhpParser/Node/Expr/Cast/String_.php @@ -5,6 +5,10 @@ use PhpParser\Node\Expr\Cast; class String_ extends Cast { + // For use in "kind" attribute + public const KIND_STRING = 1; // "string" syntax + public const KIND_BINARY = 2; // "binary" syntax + public function getType(): string { return 'Expr_Cast_String'; } diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 2d29b6c8c1..467e57b1f2 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2478,7 +2478,9 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 487 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getIntCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $attrs); }, 488 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); @@ -2486,7 +2488,9 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, 489 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getStringCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $attrs); }, 490 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2495,7 +2499,9 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 492 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getBoolCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $attrs); }, 493 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 8745e67cb0..426fabc33c 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2479,7 +2479,9 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 490 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getIntCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $attrs); }, 491 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); @@ -2487,7 +2489,9 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs); }, 492 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getStringCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $attrs); }, 493 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); @@ -2496,7 +2500,9 @@ protected function initReduceCallbacks(): void { $self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); }, 495 => static function ($self, $stackPos) { - $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); + $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]); + $attrs['kind'] = $self->getBoolCastKind($self->semStack[$stackPos-(2-1)]); + $self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $attrs); }, 496 => static function ($self, $stackPos) { $self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos])); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index cf643ee892..47f6614633 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -736,6 +736,33 @@ protected function getFloatCastKind(string $cast): int { return Double::KIND_DOUBLE; } + protected function getIntCastKind(string $cast): int { + $cast = strtolower($cast); + if (strpos($cast, 'integer') !== false) { + return Expr\Cast\Int_::KIND_INTEGER; + } + + return Expr\Cast\Int_::KIND_INT; + } + + protected function getBoolCastKind(string $cast): int { + $cast = strtolower($cast); + if (strpos($cast, 'boolean') !== false) { + return Expr\Cast\Bool_::KIND_BOOLEAN; + } + + return Expr\Cast\Bool_::KIND_BOOL; + } + + protected function getStringCastKind(string $cast): int { + $cast = strtolower($cast); + if (strpos($cast, 'binary') !== false) { + return Expr\Cast\String_::KIND_BINARY; + } + + return Expr\Cast\String_::KIND_STRING; + } + /** @param array $attributes */ protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false): Int_ { try { diff --git a/test/code/parser/formattingAttributes.test b/test/code/parser/formattingAttributes.test index cb5370ac1c..065fb51c50 100644 --- a/test/code/parser/formattingAttributes.test +++ b/test/code/parser/formattingAttributes.test @@ -43,6 +43,12 @@ array(); []; list($x) = $y; [$x] = $y; +(int) $int; +(integer) $integer; +(bool) $bool; +(boolean) $boolean; +(string) $string; +(binary) $binary; ----- !!attributes array( @@ -301,4 +307,52 @@ array( ) ) ) + 24: Stmt_Expression( + expr: Expr_Cast_Int( + expr: Expr_Variable( + name: int + ) + kind: 1 + ) + ) + 25: Stmt_Expression( + expr: Expr_Cast_Int( + expr: Expr_Variable( + name: integer + ) + kind: 2 + ) + ) + 26: Stmt_Expression( + expr: Expr_Cast_Bool( + expr: Expr_Variable( + name: bool + ) + kind: 1 + ) + ) + 27: Stmt_Expression( + expr: Expr_Cast_Bool( + expr: Expr_Variable( + name: boolean + ) + kind: 2 + ) + ) + 28: Stmt_Expression( + expr: Expr_Cast_String( + expr: Expr_Variable( + name: string + ) + kind: 1 + ) + ) + 29: Stmt_Expression( + expr: Expr_Cast_String( + expr: Expr_Variable( + name: binary + ) + kind: 2 + ) + ) ) diff --git a/test/code/prettyPrinter/expr/cast.test b/test/code/prettyPrinter/expr/cast.test new file mode 100644 index 0000000000..b52d056a24 --- /dev/null +++ b/test/code/prettyPrinter/expr/cast.test @@ -0,0 +1,17 @@ +Casts +----- + Date: Wed, 6 Aug 2025 21:56:56 +0200 Subject: [PATCH 426/428] Update phpstan baseline --- phpstan-baseline.neon | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index fb65409e3b..7bd15ab912 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -102,18 +102,6 @@ parameters: count: 1 path: lib/PhpParser/Lexer/Emulative.php - - - message: '#^Constant T_PIPE not found\.$#' - identifier: constant.notFound - count: 2 - path: lib/PhpParser/Lexer/TokenEmulator/PipeOperatorEmulator.php - - - - message: '#^Constant T_VOID_CAST not found\.$#' - identifier: constant.notFound - count: 2 - path: lib/PhpParser/Lexer/TokenEmulator/VoidCastEmulator.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse From f7d285665c24ad25cab73a6f5466c6d925d613ed Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 9 Aug 2025 20:53:06 +0200 Subject: [PATCH 427/428] Add PHP 8.5 to CI --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 54be563fb5..efa88241aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,7 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" fail-fast: false steps: - name: "Checkout" From 02dcdd74bb328ca0bd9b9e459ca25c2bbc2448aa Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 9 Aug 2025 21:19:03 +0200 Subject: [PATCH 428/428] Avoid deprecated SplObjectStorage::attach/detach Use offsetSet and offsetUnset instead. --- grammar/php.y | 5 +++-- lib/PhpParser/Parser/Php7.php | 4 ++-- lib/PhpParser/Parser/Php8.php | 4 ++-- lib/PhpParser/ParserAbstract.php | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/grammar/php.y b/grammar/php.y index 33a5956b70..44c76f8b0f 100644 --- a/grammar/php.y +++ b/grammar/php.y @@ -1275,8 +1275,9 @@ dereferenceable_scalar: T_ARRAY '(' array_pair_list ')' { $attrs = attributes(); $attrs['kind'] = Expr\Array_::KIND_LONG; $$ = new Expr\Array_($3, $attrs); - $this->createdArrays->attach($$); } - | array_short_syntax { $$ = $1; $this->createdArrays->attach($$); } + $this->createdArrays->offsetSet($$); } + | array_short_syntax + { $$ = $1; $this->createdArrays->offsetSet($$); } | T_CONSTANT_ENCAPSED_STRING { $$ = Scalar\String_::fromString($1, attributes(), $this->phpVersion->supportsUnicodeEscapes()); } | '"' encaps_list '"' diff --git a/lib/PhpParser/Parser/Php7.php b/lib/PhpParser/Parser/Php7.php index 467e57b1f2..7784e8806c 100644 --- a/lib/PhpParser/Parser/Php7.php +++ b/lib/PhpParser/Parser/Php7.php @@ -2692,10 +2692,10 @@ protected function initReduceCallbacks(): void { 561 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); - $self->createdArrays->attach($self->semValue); + $self->createdArrays->offsetSet($self->semValue); }, 562 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->offsetSet($self->semValue); }, 563 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); diff --git a/lib/PhpParser/Parser/Php8.php b/lib/PhpParser/Parser/Php8.php index 426fabc33c..7a15cef564 100644 --- a/lib/PhpParser/Parser/Php8.php +++ b/lib/PhpParser/Parser/Php8.php @@ -2693,10 +2693,10 @@ protected function initReduceCallbacks(): void { 564 => static function ($self, $stackPos) { $attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; $self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs); - $self->createdArrays->attach($self->semValue); + $self->createdArrays->offsetSet($self->semValue); }, 565 => static function ($self, $stackPos) { - $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue); + $self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->offsetSet($self->semValue); }, 566 => static function ($self, $stackPos) { $self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes()); diff --git a/lib/PhpParser/ParserAbstract.php b/lib/PhpParser/ParserAbstract.php index 47f6614633..c10a0c9757 100644 --- a/lib/PhpParser/ParserAbstract.php +++ b/lib/PhpParser/ParserAbstract.php @@ -1003,7 +1003,7 @@ protected function createEmptyElemAttributes(int $tokenPos): array { } protected function fixupArrayDestructuring(Array_ $node): Expr\List_ { - $this->createdArrays->detach($node); + $this->createdArrays->offsetUnset($node); return new Expr\List_(array_map(function (Node\ArrayItem $item) { if ($item->value instanceof Expr\Error) { // We used Error as a placeholder for empty elements, which are legal for destructuring.